diff --git a/.gitignore b/.gitignore index 00b6ce1e97..b6bb45c206 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ lib/oe/*.pyc lib/oe/*.pyo contrib/*/*.pyc contrib/*/*.pyo +tmp +oe_sources +bitbake +!.gitignore diff --git a/MAINTAINERS b/MAINTAINERS index 096e766943..45e92d11c2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -138,6 +138,11 @@ Recipes: quagga, iputils, ndic6, hping2, lilo-sh, conserver, ipsec-tools, Recipes: lilo-sh, clamav, havp, p3scan, clamsmtp, librsync, rdiff-backup, Recipes: net-snmp, ebtables, ethtool, arpwatch, lib*-perl +Person: Jan Kobler +Mail: eng1@koblersystems.de +Interests: embedded systems, powerpc, arm +Machines: pcm043 + Person: Jan Luebbe Mail: jluebbe@lasnet.de Website: http://sicherheitsschwankung.de diff --git a/bin/install b/bin/install index ab316f61a4..5cb4071748 100755 --- a/bin/install +++ b/bin/install @@ -3,12 +3,12 @@ . $(dirname $0)/wrapper.sh saved="" -while getopts dbCcMpSsvB:f:g:m:o:D opt; do +while getopts dbCcMpSsvB:f:g:m:o:t:D opt; do case "$opt" in s) # Ignore strip argument ;; - B|f|g|m|o) + B|f|g|m|o|t) save "-$opt" save "$OPTARG" ;; diff --git a/build/conf/local.conf b/build/conf/local.conf new file mode 100644 index 0000000000..1ced668276 --- /dev/null +++ b/build/conf/local.conf @@ -0,0 +1,40 @@ +# Use this to specify where BitBake should place the downloaded sources +DL_DIR = "${TOPDIR}/oe_sources/" + +BBFILES = "${TOPDIR}/recipes/*/*.bb" + +# Use the BBMASK below to instruct BitBake to _NOT_ consider some .bb files +# This is a regular expression, so be sure to get your parentheses balanced. +BBMASK = "" + +# Select between multiple alternative providers, if more than one is eligible. +PREFERRED_PROVIDERS = "virtual/qte:qte virtual/libqpe:libqpe-opie" +PREFERRED_PROVIDERS += " virtual/libsdl:libsdl-x11" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-intermediate:gcc-cross-intermediate" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross" + +MACHINE ?= "at91sam9g20ek" + +DISTRO = "angstrom-2008.1" + +DISTRO_SSH_DAEMON = "openssh" + +IMAGE_FSTYPES = "tar.bz2" + +IMAGE_KEEPROOTFS = "1" + +PARALLEL_MAKE = "-j 4" + +BB_NUMBER_THREADS = "2" + +BBINCLUDELOGS = "yes" + +# To save space +INHERIT += "rm_work" + +# Cache values of all SRCREV variables first time it runs +BB_SRCREV_POLICY = "cache" + +DISTRO_FEATURES_local = "largefile ipv4 ipv6 nfs smbfs wifi ppp alsa bluetooth ext2 vfat irda pcmcia usbgadget usbhost pci pam thumb-interwork thumb-interwork" diff --git a/classes/angstrom.bbclass b/classes/angstrom.bbclass index 4a810a638a..12d9100dcd 100644 --- a/classes/angstrom.bbclass +++ b/classes/angstrom.bbclass @@ -12,7 +12,7 @@ python () { pkgnm = bb.data.getVar("PN", d, 1) if blacklist: - bb.note("Angstrom DOES NOT support %s because %s" % (pkgnm, blacklist)) + # bb.note("Angstrom DOES NOT support %s because %s" % (pkgnm, blacklist)) raise bb.parse.SkipPackage("Angstrom DOES NOT support %s because %s" % (pkgnm, blacklist)) } diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index a88a4d1e30..974458928a 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -137,11 +137,11 @@ oe_autoreconf () { if grep "sed.*POTFILES" $CONFIGURE_AC >/dev/null; then : do nothing -- we still have an old unmodified configure.ac else - echo "no" | glib-gettextize --force + echo "no" | glib-gettextize --force --copy fi else if grep "^[[:space:]]*AM_GNU_GETTEXT" $CONFIGURE_AC >/dev/null; then if [ -e ${STAGING_DATADIR}/gettext/config.rpath ]; then - ln -sf ${STAGING_DATADIR}/gettext/config.rpath ${S}/ + cp ${STAGING_DATADIR}/gettext/config.rpath ${S}/ else oenote ${STAGING_DATADIR}/gettext/config.rpath not found. gettext is not installed. fi @@ -151,9 +151,9 @@ oe_autoreconf () { for aux in m4 `sed -n -e '/^[[:space:]]*AC_CONFIG_MACRO_DIR/s|[^(]*([[]*\([^])]*\)[]]*)|\1|p' $CONFIGURE_AC`; do mkdir -p ${aux} done - autoreconf -Wcross --verbose --install --symlink --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed." + autoreconf -Wcross --verbose --install --force ${EXTRA_AUTORECONF} $acpaths || oefatal "autoreconf execution failed." if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" $CONFIGURE_AC >/dev/null; then - intltoolize --force --automake + intltoolize --copy --force --automake fi } diff --git a/classes/gnome.bbclass b/classes/gnome.bbclass index 7bc5d9c14e..6bc5530456 100644 --- a/classes/gnome.bbclass +++ b/classes/gnome.bbclass @@ -1,4 +1,4 @@ inherit gnomebase gtk-icon-cache gconf mime -EXTRA_OECONF += "--enable-introspection=no" +EXTRA_OECONF += "--enable-introspection=no --disable-scrollkeeper" diff --git a/classes/gtk-icon-cache.bbclass b/classes/gtk-icon-cache.bbclass index 2449e954ce..d9b5d1bdd6 100644 --- a/classes/gtk-icon-cache.bbclass +++ b/classes/gtk-icon-cache.bbclass @@ -1,6 +1,4 @@ FILES_${PN} += "${datadir}/icons/hicolor" -# Only add runtime dependency on hicolor-icon-theme for target recipes -RDEPENDS_${PN} += "${@['', 'hicolor-icon-theme']['${PN}' == '${BPN}']}" # This could run on the host as icon cache files are architecture independent, # but there is no gtk-update-icon-cache built natively. @@ -10,7 +8,7 @@ if [ "x$D" != "x" ]; then fi # Update the pixbuf loaders in case they haven't been registered yet -gdk-pixbuf-query-loaders > /etc/gtk-2.0/gdk-pixbuf.loaders +GDK_PIXBUF_MODULEDIR=${libdir}/gdk-pixbuf-2.0/2.10.0/loaders gdk-pixbuf-query-loaders --update-cache for icondir in /usr/share/icons/* ; do if [ -d $icondir ] ; then @@ -35,7 +33,12 @@ python populate_packages_append () { icon_dir = '%s/%s/%s/icons' % (pkgdest, pkg, bb.data.getVar('datadir', d, 1)) if not os.path.exists(icon_dir): continue - + + bb.note("adding hicolor-icon-theme dependency to %s" % pkg) + rdepends = bb.data.getVar('RDEPENDS', d, 1) + rdepends += "hicolor-icon-theme" + bb.data.setVar('RDEPENDS', rdepends, d) + bb.note("adding gtk-icon-cache postinst and postrm scripts to %s" % pkg) postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1) diff --git a/classes/image.bbclass b/classes/image.bbclass index 962161410f..d7fe9b015e 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -140,7 +140,11 @@ def get_imagecmds(d): cmd = "\t#Code for image type " + type + "\n" cmd += "\t${IMAGE_CMD_" + type + "}\n" cmd += "\tcd ${DEPLOY_DIR_IMAGE}/\n" - cmd += "\tln -fs ${IMAGE_NAME}.rootfs." + type + " ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}." + type + "\n\n" + cmd += "\tif [ -f ${IMAGE_NAME}.rootfs." + type + " ]; then\n" + cmd += "\tln -fs ${IMAGE_NAME}.rootfs." + type + " ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}." + type + "\n" + cmd += "\telif [ -f ${IMAGE_NAME}." + type + ".img ]; then\n" + cmd += "\tln -fs ${IMAGE_NAME}." + type + ".img ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}." + type + "\n" + cmd += "\tfi\n\n" cmds += bb.data.expand(cmd, localdata) return cmds diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 11e671c7ce..f2da284601 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -342,9 +342,9 @@ def package_qa_check_staged(path,d): pkgconfigcheck = workdir iscrossnative = True - # find all .la and .pc files - # read the content - # and check for stuff that looks wrong + # Grab the lock, find all .la and .pc files, read the content and check for + # stuff that looks wrong + lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) for root, dirs, files in os.walk(path): for file in files: path = os.path.join(root,file) @@ -363,6 +363,7 @@ def package_qa_check_staged(path,d): if pkgconfigcheck in file_content: error_msg = "%s failed sanity test (tmpdir) in path %s" % (file,root) sane = package_qa_handle_error(6, error_msg, "staging", path, d) + bb.utils.unlockfile(lf) return sane diff --git a/classes/mirrors.bbclass b/classes/mirrors.bbclass index 71ee5f63bf..c030fa5f0a 100644 --- a/classes/mirrors.bbclass +++ b/classes/mirrors.bbclass @@ -56,6 +56,8 @@ ftp://.*/.* http://mirrors.openembedded.org/ https?$://.*/.* http://mirrors.openembedded.org/ ftp://.*/.* http://sources.openembedded.org/ https?$://.*/.* http://sources.openembedded.org/ +ftp://.*/.* http://rascalmicro.com/sources/ +https?$://.*/.* http://rascalmicro.com/sources/ } diff --git a/classes/mozilla.bbclass b/classes/mozilla.bbclass index 2b2f770d58..6d9492cfd6 100644 --- a/classes/mozilla.bbclass +++ b/classes/mozilla.bbclass @@ -26,6 +26,14 @@ export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" export HOST_LDFLAGS = "${BUILD_LDFLAGS}" export HOST_RANLIB = "${BUILD_RANLIB}" export HOST_AR = "${BUILD_AR}" +# Set the host libIDL stuff correctly. +export HOST_LIBIDL_CONFIG="PKG_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/pkgconfig pkg-config libIDL-2.0" +# Due to sysroot we need to sed out references to the target staging +# when building the native version of xpidl Symptons of the failure +# include "gthread.h:344: error: size of array 'type name' is negative" +export HOST_LIBIDL_CFLAGS="`${HOST_LIBIDL_CONFIG} --cflags | sed -e s:${STAGING_DIR_TARGET}::g`" +export HOST_LIBIDL_LIBS="`${HOST_LIBIDL_CONFIG} --libs`" + mozilla_do_configure() { ( @@ -44,14 +52,6 @@ mozilla_do_configure() { >> ${MOZCONFIG} fi - # Set the host libIDL stuff correctly. - export HOST_LIBIDL_CONFIG="PKG_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/pkgconfig pkg-config libIDL-2.0" - # Due to sysroot we need to sed out references to the target staging - # when building the native version of xpidl Symptons of the failure - # include "gthread.h:344: error: size of array 'type name' is negative" - export HOST_LIBIDL_CFLAGS="`${HOST_LIBIDL_CONFIG} --cflags | sed -e s:${STAGING_DIR_TARGET}:${STAGING_DIR_NATIVE}:g`" - export HOST_LIBIDL_LIBS="`${HOST_LIBIDL_CONFIG} --libs`" - if [ -e ${MOZ_OBJDIR}/Makefile ] ; then oe_runmake -f client.mk ${MOZ_OBJDIR}/Makefile \ ${MOZ_OBJDIR}/config.status diff --git a/classes/native.bbclass b/classes/native.bbclass index 000ad61fc4..b8a792f735 100644 --- a/classes/native.bbclass +++ b/classes/native.bbclass @@ -37,6 +37,8 @@ CXXFLAGS = "${BUILD_CFLAGS}" LDFLAGS = "${BUILD_LDFLAGS}" LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE} " +TOOLCHAIN_OPTIONS = "" + STAGING_BINDIR = "${STAGING_BINDIR_NATIVE}" STAGING_BINDIR_CROSS = "${STAGING_BINDIR_NATIVE}" diff --git a/classes/nativesdk.bbclass b/classes/nativesdk.bbclass index 6f2153436a..66893995d0 100644 --- a/classes/nativesdk.bbclass +++ b/classes/nativesdk.bbclass @@ -36,6 +36,8 @@ CFLAGS = "${BUILDSDK_CFLAGS}" CXXFLAGS = "${BUILDSDK_CFLAGS}" LDFLAGS = "${BUILDSDK_LDFLAGS}" +TOOLCHAIN_OPTIONS = "" + # Change to place files in SDKPATH prefix = "${SDKPATH}" exec_prefix = "${SDKPATH}" diff --git a/classes/package.bbclass b/classes/package.bbclass index ce7ff869e4..901ad9d1c3 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -543,9 +543,7 @@ python emit_pkgdata() { pkgdest = bb.data.getVar('PKGDEST', d, 1) pkgdatadir = bb.data.getVar('PKGDATA_DIR', d, True) - pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) - if pstageactive == "1": - lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) + lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) data_file = pkgdatadir + bb.data.expand("/${PN}" , d) f = open(data_file, 'w') @@ -593,8 +591,7 @@ python emit_pkgdata() { packagedfile = pkgdatadir + '/runtime/%s.packaged' % pkg file(packagedfile, 'w').close() package_stagefile(packagedfile, d) - if pstageactive == "1": - bb.utils.unlockfile(lf) + bb.utils.unlockfile(lf) } emit_pkgdata[dirs] = "${PKGDATA_DIR}/runtime" @@ -634,10 +631,6 @@ python package_do_shlibs() { shlibs_dir = bb.data.getVar('SHLIBSDIR', d, True) bb.mkdirhier(shlibs_dir) - pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) - if pstageactive == "1": - lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) - if bb.data.getVar('PACKAGE_SNAP_LIB_SYMLINKS', d, True) == "1": snap_symlinks = True else: @@ -650,6 +643,8 @@ python package_do_shlibs() { needed = {} private_libs = bb.data.getVar('PRIVATE_LIBS', d, True) + + lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) for pkg in packages.split(): needs_ldconfig = False bb.debug(2, "calculating shlib provides for %s" % pkg) @@ -715,9 +710,6 @@ python package_do_shlibs() { postinst += bb.data.getVar('ldconfig_postinst_fragment', d, True) bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d) - if pstageactive == "1": - bb.utils.unlockfile(lf) - shlib_provider = {} list_re = re.compile('^(.*)\.list$') for dir in [shlibs_dir]: @@ -738,6 +730,7 @@ python package_do_shlibs() { fd.close() for l in lines: shlib_provider[l.rstrip()] = (dep_pkg, lib_ver) + bb.utils.unlockfile(lf) assumed_libs = bb.data.getVar('ASSUME_SHLIBS', d, True) if assumed_libs: @@ -831,9 +824,7 @@ python package_do_pkgconfig () { if hdr == 'Requires': pkgconfig_needed[pkg] += exp.replace(',', ' ').split() - pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True) - if pstageactive == "1": - lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) + lf = bb.utils.lockfile(bb.data.expand("${STAGING_DIR}/staging.lock", d)) for pkg in packages.split(): pkgs_file = os.path.join(shlibs_dir, pkg + ".pclist") @@ -881,8 +872,7 @@ python package_do_pkgconfig () { fd.close() package_stagefile(deps_file, d) - if pstageactive == "1": - bb.utils.unlockfile(lf) + bb.utils.unlockfile(lf) } python read_shlibdeps () { diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass index bf77744eb6..8d5b3dc330 100644 --- a/classes/sdk.bbclass +++ b/classes/sdk.bbclass @@ -34,6 +34,8 @@ CFLAGS = "${BUILD_CFLAGS}" CXXFLAGS = "${BUILD_CFLAGS}" LDFLAGS = "${BUILD_LDFLAGS}" +TOOLCHAIN_OPTIONS = "" + # Path prefixes prefix = "${SDK_PATH}" exec_prefix = "${prefix}" diff --git a/classes/sourceipk.bbclass b/classes/sourceipk.bbclass index b37bbf9aa9..546ec6787a 100644 --- a/classes/sourceipk.bbclass +++ b/classes/sourceipk.bbclass @@ -50,6 +50,9 @@ SRCIPK_INSTALL_DIR ?= "/usr/src/${PN}-src" # Default PACKAGE_ARCH for sources is "all" SRCIPK_PACKAGE_ARCH ?= "all" +# Default section matches the recipe section +SRCIPK_SECTION ?= "${SECTION}" + # Default SRCIPK_INCLUDE_EXTRAFILES is to include the extra files SRCIPK_INCLUDE_EXTRAFILES ?= "1" @@ -86,7 +89,7 @@ sourceipk_do_create_srcipk() { echo "Package: ${PN}-src" > $control_file echo "Version: ${PV}-${PR}" >> $control_file echo "Description: Patched sources for ${PN}" >> $control_file - echo "Section: ${SECTION}" >> $control_file + echo "Section: ${SRCIPK_SECTION}" >> $control_file echo "Priority: Optional" >> $control_file echo "Maintainer: ${MAINTAINER}" >> $control_file echo "License: ${LICENSE}" >> $control_file @@ -105,17 +108,12 @@ sourceipk_do_create_srcipk() { # Copy sources for packaging mkdir -p $tmp_dir/${SRCIPK_INSTALL_DIR} - cp -RLf ${S}/* $tmp_dir/${SRCIPK_INSTALL_DIR}/ - # Copy any hidden files in the source directory such as - # eclipse project files. Use a regex to avoid trying to - # copy the . and .. directories. This is only required for - # the top-level directory as the hidden files will be copied - # for subdiretories. - hidden_files=`find ${S} -maxdepth 1 -name ".*"` - for f in $hidden_files - do - cp -rf $f $tmp_dir/${SRCIPK_INSTALL_DIR}/ - done + if [ -e ${S} ]; then + if [ "${S}" = "${WORKDIR}" ]; then + excludes='--exclude ./temp/\* --exclude ./sourceipk-tmp/\* --exclude ./sourceipk-data/\*' + fi + tar -C ${S} -cO $excludes . | tar -C $tmp_dir/${SRCIPK_INSTALL_DIR} -xpf - + fi if [ ${SRCIPK_INCLUDE_EXTRAFILES} != "0" ] then @@ -124,7 +122,7 @@ sourceipk_do_create_srcipk() { fi #Write the data tarball - tar -C $tmp_dir --owner=0 --group=0 -czf $srcipk_dir/data.tar.gz . + tar -C $tmp_dir --owner=0 --group=0 -chzf $srcipk_dir/data.tar.gz . # Create the debian-binary file echo "2.0" > $srcipk_dir/debian-binary @@ -144,18 +142,14 @@ EXPORT_FUNCTIONS do_create_srcipk do_create_srcipk[deptask] = "do_patch" -# Add a blank compileconfigs task. This allows the sourceipk to schedule -# its copy of the sources for kernels using the multi-kernel functionality -# before the compileconfigs task. Failure to do this results in a race -# condition where in the best case the sources packaged may contain binary -# builds and in the worst case binary files being cleaned cause an error -# in the copy command for the sourceipk. -do_compileconfigs() { - : -} -addtask compileconfigs after do_patch before do_configure +addtask create_srcipk after do_patch before do_configure -addtask create_srcipk after do_patch before do_compileconfigs +python () { + if d.getVar('do_compileconfigs', False): + deps = d.getVarFlag('do_compileconfigs', 'deps') or [] + deps.append('do_create_srcipk') + d.setVarFlag('do_compileconfigs', 'deps', deps) +} #Add source packages to list of packages OE knows about PACKAGES_DYNAMIC += "${PN}-src" diff --git a/classes/src_distribute.bbclass b/classes/src_distribute.bbclass index 242d70ceec..f3d3cbacd1 100644 --- a/classes/src_distribute.bbclass +++ b/classes/src_distribute.bbclass @@ -16,6 +16,7 @@ python do_distribute_sources () { dldir = os.path.realpath(d.getVar("DL_DIR", 1) or "") licenses = (bb.data.getVar('LICENSE', d, 1) or "unknown").split() + distribute_licenses = (bb.data.getVar('SRC_DISTRIBUTE_LICENSES', d, 1) or "All").split() urldatadict = bb.fetch.init(d.getVar("SRC_URI", True).split(), d, True) src_uri = oe.data.typed_value("SRC_URI", d) if not src_uri: @@ -33,8 +34,9 @@ python do_distribute_sources () { bb.data.setVar('SRC', os.path.abspath(local), d) for license in licenses: for entry in license.split("|"): - bb.data.setVar('LIC', entry, d) - bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d) + if entry in distribute_licenses or "All" in distribute_licenses: + bb.data.setVar('LIC', entry, d) + bb.build.exec_func('SRC_DISTRIBUTECOMMAND', d) } addtask distribute_sources_all after do_distribute_sources diff --git a/conf/bitbake.conf b/conf/bitbake.conf index 34f77260d0..01b9321c23 100644 --- a/conf/bitbake.conf +++ b/conf/bitbake.conf @@ -399,7 +399,7 @@ IMAGE_CMD_cpio.gz = "type cpio >/dev/null; cd ${IMAGE_ROOTFS} && (find . | cpio IMAGE_CMD_cpio.xz = "type cpio >/dev/null; cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | xz -c ${XZ_COMPRESSION_LEVEL} > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.xz) ${EXTRA_IMAGECMD}" IMAGE_CMD_cpio.gz.u-boot = "type cpio >/dev/null; cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | gzip -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz) ${EXTRA_IMAGECMD}; mkimage -A ${UBOOT_ARCH} -O linux -T ramdisk -C gzip -n ${IMAGE_NAME} -d ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.gz.u-boot" IMAGE_CMD_cpio.lzma = "type cpio >/dev/null; cd ${IMAGE_ROOTFS} && (find . | cpio -o -H newc | lzma -c -9 >${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cpio.lzma) ${EXTRA_IMAGECMD}" -IMAGE_CMD_ubi = "echo \[ubifs\] > ubinize.cfg ; echo mode=ubi >> ubinize.cfg ; echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs >> ubinize.cfg ; echo vol_id=0 >> ubinize.cfg ; echo vol_type=dynamic >> ubinize.cfg ; echo vol_name=${UBI_VOLNAME} >> ubinize.cfg ; echo vol_flags=autoresize >> ubinize.cfg;mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubifs ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg" +IMAGE_CMD_ubi = "echo \[ubifs\] > ubinize.cfg ; echo mode=ubi >> ubinize.cfg ; echo image=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img >> ubinize.cfg ; echo vol_id=0 >> ubinize.cfg ; echo vol_type=dynamic >> ubinize.cfg ; echo vol_name=${UBI_VOLNAME} >> ubinize.cfg ; echo vol_flags=autoresize >> ubinize.cfg;mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS} && ubinize -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ubi ${UBINIZE_ARGS} ubinize.cfg" IMAGE_CMD_ubifs = "mkfs.ubifs -r ${IMAGE_ROOTFS} -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.ubifs.img ${MKUBIFS_ARGS}" EXTRA_IMAGECMD = "" @@ -460,7 +460,7 @@ export PATH ################################################################## CCACHE ?= "" -TOOLCHAIN_OPTIONS = "" +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" TOOLCHAIN_PATH ?= "${STAGING_DIR_NATIVE}${prefix_native}/${BASE_PACKAGE_ARCH}" TOOLCHAIN_SYSPATH ?= "${TOOLCHAIN_PATH}/${TARGET_SYS}" diff --git a/conf/distro/angstrom-2008.1.conf b/conf/distro/angstrom-2008.1.conf index ec032760f7..ae1ed4cc0d 100644 --- a/conf/distro/angstrom-2008.1.conf +++ b/conf/distro/angstrom-2008.1.conf @@ -13,9 +13,8 @@ # For more contact info please visit # http://www.angstrom-distribution.org/contact -#DISTRO_VERSION = "2009.X" -DISTRO_VERSION = "2010.7-test-${DATE}" -DISTRO_REVISION = "3" +DISTRO_VERSION = "2011.03" +DISTRO_REVISION = "4" DISTRO_PR = ".6" OLDEST_KERNEL ?= "2.6.16" @@ -133,6 +132,9 @@ ANGSTROM_BLACKLIST_pn-fso-apm = "regular apmd is good enough" ANGSTROM_BLACKLIST_pn-ipkg = "ipkg has been superseded by opkg" +ANGSTROM_BLACKLIST_pn-bash-noemu = "doesn't work on the target" +PREFERRED_PROVIDER_bash = "bash" + ANGSTROMLIBC ?= "glibc" require conf/distro/include/angstrom.inc diff --git a/conf/distro/include/angstrom-2008-preferred-versions.inc b/conf/distro/include/angstrom-2008-preferred-versions.inc index feaa2a7518..4833d35cbc 100644 --- a/conf/distro/include/angstrom-2008-preferred-versions.inc +++ b/conf/distro/include/angstrom-2008-preferred-versions.inc @@ -37,8 +37,6 @@ PREFERRED_VERSION_mythplugins = "0.23" PREFERRED_VERSION_myththemes = "0.23" PREFERRED_VERSION_mythtv = "0.23" PREFERRED_VERSION_mplayer = "0.0+1.0rc3+svnr%" -PREFERRED_VERSION_network-manager-applet = "0.8.1" -PREFERRED_VERSION_networkmanager = "0.8.1" PREFERRED_VERSION_openssl = "1.0.0d" PREFERRED_VERSION_openssl-native = "1.0.0d" PREFERRED_VERSION_pango = "1.24.4" @@ -47,6 +45,7 @@ PREFERRED_VERSION_pango-native = "1.24.4" PREFERRED_VERSION_pkgconfig = "0.23" PREFERRED_VERSION_pkgconfig-native = "0.23" PREFERRED_VERSION_pulseaudio = "0.9.15" +PREFERRED_VERSION_pulseaudio_armv7a = "0.9.22" PREFERRED_VERSION_python-pycairo = "1.8.0" PREFERRED_VERSION_qt4-tools-native = "${ANGSTROM_QT_VERSION}" PREFERRED_VERSION_qt4-tools-sdk = "${ANGSTROM_QT_VERSION}" diff --git a/conf/distro/include/angstrom-2010-preferred-versions.inc b/conf/distro/include/angstrom-2010-preferred-versions.inc index 7a19f2d35b..ceb84fe820 100644 --- a/conf/distro/include/angstrom-2010-preferred-versions.inc +++ b/conf/distro/include/angstrom-2010-preferred-versions.inc @@ -17,8 +17,8 @@ PREFERRED_VERSION_cairo = "1.10.0" PREFERRED_VERSION_dbus = "1.2.24" PREFERRED_VERSION_dropbear = "0.52" PREFERRED_VERSION_fontconfig = "2.8.0" -PREFERRED_VERSION_glib-2.0 = "2.28.0" -PREFERRED_VERSION_glib-2.0-native = "2.28.0" +PREFERRED_VERSION_glib-2.0 = "2.28.5" +PREFERRED_VERSION_glib-2.0-native = "2.28.5" PREFERRED_VERSION_glibmm = "2.24.0" PREFERRED_VERSION_gst-pulse = "0.9.7" PREFERRED_VERSION_gtk+ = "2.20.1" @@ -42,9 +42,6 @@ PREFERRED_VERSION_mythplugins = "0.23" PREFERRED_VERSION_myththemes = "0.23" PREFERRED_VERSION_mythtv = "0.23" PREFERRED_VERSION_mplayer = "0.0+1.0rc3+svnr%" -PREFERRED_VERSION_network-manager-applet = "0.8.1" -PREFERRED_VERSION_networkmanager = "0.8.1" -PREFERRED_VERSION_networkmanager-openvpn = "0.8.1" PREFERRED_VERSION_openssl = "1.0.0d" PREFERRED_VERSION_openssl-native = "1.0.0d" PREFERRED_VERSION_pango = "1.28.3" diff --git a/conf/distro/include/angstrom-jalimo.conf b/conf/distro/include/angstrom-jalimo.conf index 76cd5f1674..48727c40be 100644 --- a/conf/distro/include/angstrom-jalimo.conf +++ b/conf/distro/include/angstrom-jalimo.conf @@ -5,9 +5,8 @@ PREFERRED_VERSION_jamvm-initial = "1.4.5" PREFERRED_VERSION_classpath-initial = "0.93" # Native VM -PREFERRED_PROVIDER_virtual/java-native = "jamvm-native" -PREFERRED_VERSION_jamvm-native = "1.5.3" -#PREFERRED_VERSION_cacao-native = "0.99.3" +PREFERRED_PROVIDER_virtual/java-native ?= "cacao-native" +SRCREV_pn-cacao-native ?= "c7bf150bfa46" PREFERRED_VERSION_classpath-native = "0.98" # Native compiler settings @@ -22,8 +21,8 @@ PREFERRED_VERSION_jamvm = "1.5.2" PREFERRED_PROVIDER_swt3.4-gtk = "swt3.4-gtk" PREFERRED_PROVIDER_classpath = "classpath" -PREFERRED_VERSION_openjdk-6-jre = "6b18-1.8" -PREFERRED_VERSION_icedtea6-native = "1.7.6" +PREFERRED_VERSION_openjdk-6-jre = "6b18-1.8.5" +PREFERRED_VERSION_icedtea6-native = "1.7.10" # Stage JAR files not into ARCH related dirs STAGING_DIR_JAVA = "${STAGING_DIR}/java" diff --git a/conf/distro/include/angstrom.inc b/conf/distro/include/angstrom.inc index 5a027232d0..199cf724a7 100644 --- a/conf/distro/include/angstrom.inc +++ b/conf/distro/include/angstrom.inc @@ -63,7 +63,7 @@ THUMB_INTERWORK = "yes" #Use this variable in feeds and other parts that need a URI -ANGSTROM_URI ?= "http://feeds.angstrom-distribution.org" +ANGSTROM_URI ?= "http://rascalmicro.com/packages" #Use this variable to select which recipe you want to use to get feed configs (/etc/ipkg/, /etc/apt/sources.list) # usefull for derivative distros and local testing @@ -178,7 +178,7 @@ SEPPUKU_COMPONENT = "org.openembedded.dev" OESTATS_SERVER ?= "tinderbox.openembedded.org" # We want images supporting the following features (for task-base) -DISTRO_FEATURES = "largefile ipv4 ipv6 nfs smbfs wifi ppp alsa bluetooth ext2 vfat irda pcmcia usbgadget usbhost pci pam" +DISTRO_FEATURES = "xattr largefile ipv4 ipv6 nfs smbfs wifi ppp alsa bluetooth ext2 vfat irda pcmcia usbgadget usbhost pci pam" # Use-like features DISTRO_FEATURES += "tk" diff --git a/conf/distro/include/sane-feed.inc b/conf/distro/include/sane-feed.inc index 873972f5aa..70fc7a9470 100644 --- a/conf/distro/include/sane-feed.inc +++ b/conf/distro/include/sane-feed.inc @@ -119,6 +119,7 @@ FEED_ARCH_mx31moboard = "armv6" FEED_ARCH_nokia800 = "armv6" FEED_ARCH_omap2420h4 = "armv6" FEED_ARCH_omap2430sdp = "armv6" +FEED_ARCH_pcm043 = "armv6" # i486 machines FEED_ARCH_geodegx = "i486" diff --git a/conf/distro/include/sane-toolchain-java.inc b/conf/distro/include/sane-toolchain-java.inc index a0f579252c..365a3d654c 100644 --- a/conf/distro/include/sane-toolchain-java.inc +++ b/conf/distro/include/sane-toolchain-java.inc @@ -1,6 +1,6 @@ # Set PREFFERED and VERSION stuff for working java-toolchain -PREFERRED_PROVIDER_virtual/java-initial = "jamvm-initial" -PREFERRED_PROVIDER_virtual/java-native = "jamvm-native" +PREFERRED_PROVIDER_virtual/java-initial ?= "jamvm-initial" +PREFERRED_PROVIDER_virtual/java-native ?= "cacao-native" PREFERRED_VERSION_classpath-native = "0.98" PREFERRED_VERSION_classpath = "0.98" diff --git a/conf/distro/include/sane-toolchain.inc b/conf/distro/include/sane-toolchain.inc index dd066508b3..a174a070fd 100644 --- a/conf/distro/include/sane-toolchain.inc +++ b/conf/distro/include/sane-toolchain.inc @@ -73,7 +73,7 @@ require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc # Add BASE_PACKAGE_ARCH to the overrides list so that we can override the # ARM_INSTRUCTION_SET like below -OVERRIDES =. "${BASE_PACKAGE_ARCH}:" +MACHINE_OVERRIDES += "${FEED_ARCH}" # ARM920T and up can use thumb mode to decrease binary size at the expense of speed # (the complete story is a bit more nuanced due to cache starvation) @@ -114,6 +114,7 @@ TARGET_FPU_ppc405 ?= "soft" TARGET_FPU_armv6 ?= "hard" TARGET_FPU_armv6-novfp ?= "soft" TARGET_FPU_armv7a ?= "hard" +TARGET_FPU_armv7a-hardfp ?= "hard" TARGET_FPU_ppc603e ?= "hard" # webkit-gtk and cairo have alignment issues with double instructions on armv5 so @@ -199,8 +200,8 @@ def compute_os_portion_of_target_triplet (d): bb.note("DISTRO_FEATURES is not set abi suffix not set") abi_suffix = "" - if bb.data.getVar('TOOLCHAIN_BRAND',d,1) is not None and \ - bb.data.getVar('TOOLCHAIN_BRAND',d,1) in "csl": + if bb.data.getVar('TOOLCHAIN_BRAND', d, 1) is not None and \ + "csl" in bb.data.getVar('TOOLCHAIN_BRAND', d, 1): gnu_suffix = "gnu" if libc_suffix + gnu_suffix + abi_suffix is not "": diff --git a/conf/distro/include/slugos.inc b/conf/distro/include/slugos.inc index 32ec09d196..0451fc1f38 100644 --- a/conf/distro/include/slugos.inc +++ b/conf/distro/include/slugos.inc @@ -16,7 +16,7 @@ #TARGET_OS "linux" or "linux-uclibc" # The following may be overridden to make sub-versions -SLUGOS_VERSION = "5.8" +SLUGOS_VERSION = "6.0" DISTRO_REVISION ?= "" DISTRO_VERSION ?= "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}" # For release (only): @@ -30,7 +30,7 @@ THUMB_INTERWORK = "yes" # arm system and vice versa. It is strongly recommended that DISTROs not # turn this off - the actual cost is very small. # We want images supporting the following features (for task-base) -DISTRO_FEATURES = "largefile ipv4 ipv6 nfs smbfs wifi ppp alsa bluetooth ext2 vfat irda pcmcia usbhost pci eabi" +DISTRO_FEATURES = "largefile ipv4 ipv6 nfs smbfs wifi ppp alsa bluetooth ext2 vfat irda pcmcia usbhost pci eabi xattr" # We may also wish to enable raid support at some point (space permitting) #DISTRO_FEATURES += " raid" diff --git a/conf/distro/include/toolchain-external.inc b/conf/distro/include/toolchain-external.inc index ab503081d4..6ea2a3793f 100644 --- a/conf/distro/include/toolchain-external.inc +++ b/conf/distro/include/toolchain-external.inc @@ -4,7 +4,8 @@ PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-initial = "external-toolchain-${T PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc-intermediate = "external-toolchain-${TOOLCHAIN_BRAND}" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}gcc = "external-toolchain-${TOOLCHAIN_BRAND}" PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}g++ = "external-toolchain-${TOOLCHAIN_BRAND}" -PREFERRED_PROVIDER_linux-libc-headers = "external-toolchain-${TOOLCHAIN_BRAND}" +PREFERRED_PROVIDER_linux-libc-headers ?= "external-toolchain-${TOOLCHAIN_BRAND}" +PREFERRED_PROVIDER_gdbserver ?= "external-toolchain-${TOOLCHAIN_BRAND}" TOOLCHAIN_VENDOR ?= "${TARGET_VENDOR}" TARGET_VENDOR := "${TOOLCHAIN_VENDOR}" diff --git a/conf/distro/micro-uclibc.conf b/conf/distro/micro-uclibc.conf index 85ea9b3bf5..55b4ebd3ed 100644 --- a/conf/distro/micro-uclibc.conf +++ b/conf/distro/micro-uclibc.conf @@ -12,6 +12,7 @@ ############################################################################# DISTRO_NAME = "micro-uclibc" +DISTRO_FEATURES = "xattr" ############################################################################# # TOOLCHAIN diff --git a/conf/distro/micro.conf b/conf/distro/micro.conf index b1f8f1e42c..bb417b1cd9 100644 --- a/conf/distro/micro.conf +++ b/conf/distro/micro.conf @@ -19,7 +19,7 @@ DISTRO_VERSION = "${SRCDATE}" # DISTRO FEATURE SELECTION ############################################################################# # No features selected -DISTRO_FEATURES = "eabi" +DISTRO_FEATURES += "eabi" ############################################################################# # LIBRARY NAMES diff --git a/conf/distro/minimal-uclibc.conf b/conf/distro/minimal-uclibc.conf index bc9615b79f..487ae1bdd7 100644 --- a/conf/distro/minimal-uclibc.conf +++ b/conf/distro/minimal-uclibc.conf @@ -13,9 +13,6 @@ # DISTRO_NAME = "minimal-uclibc" -TARGET_FPU_arm = "soft" -TARGET_FPU_armeb = "soft" - LIBC = "uclibc" require conf/distro/minimal.conf @@ -42,6 +39,8 @@ DISTRO_FEATURES += "eabi" DISTRO_FEATURES += "pam" # large file support is needed for libsndfile DISTRO_FEATURES += "largefile" +# libcap2 is pulled in via avahi +DISTRO_FEATURES += "xattr" # glib-2.0 needs ipv6 and there is no knob to control it DISTRO_FEATURES += "ipv4 ipv6" DISTRO_FEATURES += ' ${@["", "thumb-interwork"][bb.data.getVar('THUMB_INTERWORK', d, 1) == "yes"]}' diff --git a/conf/distro/shr.conf b/conf/distro/shr.conf index 59ad0be135..415e44961c 100644 --- a/conf/distro/shr.conf +++ b/conf/distro/shr.conf @@ -53,7 +53,6 @@ INHERIT += "recipe_sanity" ANGSTROM_BLACKLIST_pn-bluez-libs = "bluez-libs 3.x has been replaced by bluez4" ANGSTROM_BLACKLIST_pn-bluez-utils = "bluez-utils 3.x has been replaced by bluez4" ANGSTROM_BLACKLIST_pn-atd = "atd has been replaced by atd-over-fso" -ANGSTROM_BLACKLIST_pn-libnl = "libnld has been replaced by libnl2" ANGSTROM_BLACKLIST_pn-update-alternatives-cworth-native = "update-alternatives-cworth-native has been replaced by opkg implementation of u-a script" ANGSTROM_BLACKLIST_pn-update-alternatives-cworth = "update-alternatives-cworth has been replaced by opkg implementation of u-a script" ANGSTROM_BLACKLIST_pn-qt4-x11-free-gles = "qt4-x11-free is fine even without gles" @@ -79,7 +78,6 @@ ANGSTROM_BLACKLIST_pn-linux-jlime-current = "strange kernel, spank maintainer" ANGSTROM_BLACKLIST_pn-linux-ml403-mvista-2.6.x = "strange kernel, spank maintainer" ANGSTROM_BLACKLIST_pn-linux-davinci = "strange kernel, spank maintainer" - CVS_TARBALL_STASH += "http://build.shr-project.org/sources/" #The shr-mirrors.bbclass repleaces this diff --git a/conf/distro/slugos.conf b/conf/distro/slugos.conf index 049e24ebed..4679d95c3b 100644 --- a/conf/distro/slugos.conf +++ b/conf/distro/slugos.conf @@ -2,14 +2,9 @@ #@NAME: SlugOS #@DESCRIPTION: SlugOS Linux Distribution for the NSLU2 -#---------------------------------------------------------------------------------- -# STANDARD SlugOS/BE DEFINITIONS -#---------------------------------------------------------------------------------- DISTRO_NAME = "SlugOS" -# DISTRO_VERSION = "${SLUGOS_VERSION}${DISTRO_REVISION}-${DISTRO_TYPE}" -# DISTRO_FEED = "unstable" DISTRO_TYPE = "alpha" -TARGET_ARCH ?= "armeb" + ARM_INSTRUCTION_SET = "thumb" IPKG_VARIANT ?= "opkg" PREFERRED_PROVIDER_opkg ?= "opkg" @@ -18,6 +13,7 @@ IMAGE_INITSCRIPTS ?= "initscripts-slugos" IMAGE_DEV_MANAGER = "udev" # Disable installing ldconfig USE_LDCONFIG = "0" + require conf/distro/include/slugos.inc require conf/distro/include/sane-toolchain.inc require conf/distro/include/arm-thumb.inc diff --git a/conf/distro/ucslugc.conf b/conf/distro/ucslugc.conf index 8f6fbe58a9..e9109f167d 100644 --- a/conf/distro/ucslugc.conf +++ b/conf/distro/ucslugc.conf @@ -5,15 +5,14 @@ DISTRO_NAME = "UcSlugC" DISTRO_TYPE = "alpha" IMAGE_BASENAME = "ucslugc" -TARGET_ARCH = "armeb" ARM_INSTRUCTION_SET = "thumb" IPKG_VARIANT ?= "opkg" PREFERRED_PROVIDER_opkg ?= "opkg" PREFERRED_PROVIDER_virtual/update-alternatives ?= "opkg" IMAGE_INITSCRIPTS ?= "initscripts-slugos" +IMAGE_DEV_MANAGER = "busybox-mdev" LIBC = "uclibc" -IMAGE_DEV_MANAGER = "busybox-mdev" require conf/distro/include/slugos.inc require conf/distro/include/sane-toolchain.inc diff --git a/conf/local.conf.sample b/conf/local.conf.sample index bb76dbe089..4a27130d3a 100644 --- a/conf/local.conf.sample +++ b/conf/local.conf.sample @@ -27,8 +27,8 @@ DL_DIR = "${HOME}/sources" BBFILES := "${@bb.fatal('Edit your conf/local.conf: BBFILES')}" # Use the BBMASK below to instruct BitBake to _NOT_ consider some .bb files -# This is a regulary expression, so be sure to get your parenthesis balanced. -BBMASK = "" +# This is a regular expression, so be sure to get your parenthesis balanced. +# BBMASK = "/(nonworking|obsolete)/" # Comment this if your host distribution does not provide the # help2man tool. @@ -90,6 +90,28 @@ PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross" # Stay away from unversioned distros unless you really know what you are doing # DISTRO = "angstrom-2008.1" +# Uncomment and modify the following lines if you wish to use an external +# binary toolchain, in this case one built by CodeSourcery. The following +# example is for ARM and we set TOOLCHAIN_VENDOR to "-none" as the CodeSourcery +# ARM tools are arm-none-linux-gnueabi-$tool. Other arches need different +# values here. This assumes that the tools are already in the users PATH. +# TOOLCHAIN_VENDOR = "-none" +# TOOLCHAIN_TYPE = "external" +# TOOLCHAIN_BRAND = "csl" +# TOOLCHAIN_PATH = "/path/to/installed/copy/of/CodeSourcery/Sourcery_G++_Lite" + +# This example is for the Angstrom ARM toolchain, that uses cross prefix of +# arm-angstrom-linux-gnueabi-$tool. This assumes that the tools are already +# in the users PATH. +# TOOLCHAIN_VENDOR = "-angstrom" +# TOOLCHAIN_TYPE = "external" +# TOOLCHAIN_BRAND = "angstrom" +# TOOLCHAIN_PATH = "/usr/local/angstrom/arm" + +# Uncomment this if you want to use linux-headers from the linux-libc-headers +# recipe as opposed to those bundled with the external (csl/angstrom) toolchain +# PREFERRED_PROVIDER_linux-libc-headers = "linux-libc-headers" + # So far, angstrom.conf sets ENABLE_BINARY_LOCALE_GENERATION # to generate binary locale packages at build time using qemu-native and # thereby guarantee i18n support on all devices. If your build breaks on diff --git a/conf/machine/am387x-evm.conf b/conf/machine/am387x-evm.conf new file mode 100644 index 0000000000..ebf98890bd --- /dev/null +++ b/conf/machine/am387x-evm.conf @@ -0,0 +1,5 @@ +#@TYPE: Machine +#@NAME: AM389x evm +#@DESCRIPTION: Machine configuration for the AM389x evm + +require conf/machine/include/ti814x.inc diff --git a/conf/machine/am45x-evm.conf b/conf/machine/am45x-evm.conf new file mode 100644 index 0000000000..3597d37109 --- /dev/null +++ b/conf/machine/am45x-evm.conf @@ -0,0 +1,10 @@ +#@TYPE: Machine +#@NAME: AM45X EVM +#@DESCRIPTION: Machine configuration for the AM45x EVM + +# Currently the am45x-evm machine type mimics the panda +# machine for its configuration. This is expected to change +# as the hardware and software evolves. Currently the unique +# machine type is used to differentiate software stack being +# built for the two devices. +require conf/machine/omap4430-panda.conf diff --git a/conf/machine/beaglehyb.conf b/conf/machine/beaglehyb.conf new file mode 100644 index 0000000000..b4ec3f0700 --- /dev/null +++ b/conf/machine/beaglehyb.conf @@ -0,0 +1,44 @@ +#@TYPE: Machine +#@NAME: Beagleboard machine +#@DESCRIPTION: Machine configuration for the http://beagleboard.org/ board +TARGET_ARCH = "arm" + +PREFERRED_PROVIDER_virtual/xserver = "xserver-xorg" +XSERVER = "xserver-xorg \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-video-omapfb \ + xf86-input-keyboard" + +# Only has DVI connector for external screen +GUI_MACHINE_CLASS = "bigscreen" + +require conf/machine/include/omap3.inc + +PREFERRED_PROVIDER_virtual/kernel = "linux-gta04" + +IMAGE_FSTYPES += "tar.bz2 ubi" +EXTRA_IMAGECMD_jffs2 = "-lnp " + +# Guesswork +SERIAL_CONSOLE = "115200 ttyS2" + +UBOOT_MACHINE = "omap3_beagle_config" + +# do ubiattach /dev/ubi_ctrl -m 4 +# From dmesg: +# UBI: smallest flash I/O unit: 2048 +# UBI: logical eraseblock size: 129024 bytes +# from ubiattach stdout: +# UBI device number 0, total 1996 LEBs +MKUBIFS_ARGS = "-m 2048 -e 129024 -c 1996" + +# do ubiattach /dev/ubi_ctrl -m 4 +# from dmesg: +# UBI: smallest flash I/O unit: 2048 +# UBI: physical eraseblock size: 131072 bytes (128 KiB) +# UBI: sub-page size: 512 +UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512" + +# and sdio +MACHINE_FEATURES = "kernel26 screen apm usbgadget usbhost vfat alsa" diff --git a/conf/machine/ben-nanonote.conf b/conf/machine/ben-nanonote.conf index f9632cf576..fd4aba48f8 100644 --- a/conf/machine/ben-nanonote.conf +++ b/conf/machine/ben-nanonote.conf @@ -6,7 +6,10 @@ TARGET_ARCH = "mipsel" require conf/machine/include/tune-mips32.inc PREFERRED_PROVIDER_virtual/kernel = "linux-jlime-ben-nanonote" -KERNEL_IMAGETYPE = "uImage" + +# With 2.6.37 there is not yet uImage target (pending patches) +#KERNEL_IMAGETYPE = "uImage" +KERNEL_IMAGETYPE = "vmlinux.bin" IMAGE_FSTYPES ?= "jffs2" @@ -21,3 +24,9 @@ MACHINE_DISPLAY_WIDTH_PIXELS = "320" MACHINE_DISPLAY_HEIGHT_PIXELS = "240" LOGO_SIZE = "qvga" +################################## +# build kexecboot kernel while +# making sure rootfs is compatible +################################## + +# require conf/machine/include/initramfs-kexecboot.inc diff --git a/conf/machine/bug20.conf b/conf/machine/bug20.conf index a9441bd0a7..95ce49c7f5 100644 --- a/conf/machine/bug20.conf +++ b/conf/machine/bug20.conf @@ -47,7 +47,7 @@ UBINIZE_ARGS = "-m 2048 -p 128KiB -s 512" PREFERRED_VERSION_u-boot = "git" # and sdio -MACHINE_FEATURES = "kernel26 screen apm usbgadget usbhost vfat alsa" +MACHINE_FEATURES = "kernel26 screen apm usbgadget usbhost vfat alsa wifi bluetooth" # We don't provide a bug20 x-load config yet XLOAD_MACHINE = "omap3530beagle_config" diff --git a/conf/machine/c6a814x-evm.conf b/conf/machine/c6a814x-evm.conf new file mode 100644 index 0000000000..b85c4894cd --- /dev/null +++ b/conf/machine/c6a814x-evm.conf @@ -0,0 +1,5 @@ +#@TYPE: Machine +#@NAME: c6a814x evm +#@DESCRIPTION: Machine configuration for the c6a814x evm + +require conf/machine/include/ti814x.inc diff --git a/conf/machine/dm368-evm.conf b/conf/machine/dm368-evm.conf new file mode 100644 index 0000000000..f916b36e8a --- /dev/null +++ b/conf/machine/dm368-evm.conf @@ -0,0 +1,8 @@ +#@TYPE: Machine +#@NAME: DM368 CPUs on a Davinci DM368 EVM board +#@DESCRIPTION: Machine configuration for the TI Davinci DM368 EVM board + +require conf/machine/include/davinci.inc +require conf/machine/include/dm365.inc + +UBOOT_MACHINE = "davinci_dm365_evm_config" diff --git a/conf/machine/dm814x-evm.conf b/conf/machine/dm814x-evm.conf new file mode 100644 index 0000000000..140dcc10eb --- /dev/null +++ b/conf/machine/dm814x-evm.conf @@ -0,0 +1,5 @@ +#@TYPE: Machine +#@NAME: DM814x evm +#@DESCRIPTION: Machine configuration for the DM814x evm + +require conf/machine/include/ti814x.inc diff --git a/conf/machine/include/omap4.inc b/conf/machine/include/omap4.inc new file mode 100644 index 0000000000..a5a920cd24 --- /dev/null +++ b/conf/machine/include/omap4.inc @@ -0,0 +1,15 @@ +SOC_FAMILY = "omap4" +TARGET_ARCH = "arm" + +require conf/machine/include/tune-cortexa8.inc +PREFERRED_PROVIDER_virtual/kernel = "linux-omap" +# Increase this everytime you change something in the kernel +MACHINE_KERNEL_PR = "r101" + +KERNEL_IMAGETYPE = "uImage" + +UBOOT_ENTRYPOINT = "0x80008000" +UBOOT_LOADADDRESS = "0x80008000" + +EXTRA_IMAGEDEPENDS += "u-boot x-load" + diff --git a/conf/machine/include/ti814x.inc b/conf/machine/include/ti814x.inc new file mode 100644 index 0000000000..8fa7ee9a49 --- /dev/null +++ b/conf/machine/include/ti814x.inc @@ -0,0 +1,26 @@ +TARGET_ARCH = "arm" +SOC_FAMILY = "ti814x" + +require conf/machine/include/tune-cortexa8.inc + +PREFERRED_PROVIDER_virtual/kernel = "linux-omap3" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot" + +# Increase this everytime you change something in the kernel +MACHINE_KERNEL_PR = "r1" + +KERNEL_IMAGETYPE = "uImage" + +UBOOT_ARCH = "arm" +UBOOT_MACHINE = "ti8148_evm_config_nand" +UBOOT_ENTRYPOINT = "0x80008000" +UBOOT_LOADADDRESS = "0x80008000" + +# Only build u-boot +EXTRA_IMAGEDEPENDS += "u-boot" + +# Ship all kernel modules +IMAGE_FSTYPES ?= "jffs2 tar.bz2" +EXTRA_IMAGECMD_jffs2 = "-lqn -e 128" +SERIAL_CONSOLE = "115200 ttyO0" +MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 ethernet" diff --git a/conf/machine/include/ti816x.inc b/conf/machine/include/ti816x.inc index ebf51661b6..ef562647e9 100644 --- a/conf/machine/include/ti816x.inc +++ b/conf/machine/include/ti816x.inc @@ -21,6 +21,6 @@ EXTRA_IMAGEDEPENDS += "u-boot" # Ship all kernel modules IMAGE_FSTYPES += "jffs2 tar.bz2" -EXTRA_IMAGECMD_jffs2 = "-lnp -e 0x20000 -s 2048" -SERIAL_CONSOLE = "115200 ttyS2" +EXTRA_IMAGECMD_jffs2 = "-lqn -e 128" +SERIAL_CONSOLE = "115200 ttyO2" MACHINE_FEATURES = "kernel26 apm usbgadget usbhost vfat ext2 ethernet" diff --git a/conf/machine/include/tune-cortexa8.inc b/conf/machine/include/tune-cortexa8.inc index 2ac0ebfe45..5f556e0514 100644 --- a/conf/machine/include/tune-cortexa8.inc +++ b/conf/machine/include/tune-cortexa8.inc @@ -4,10 +4,10 @@ # [3] https://support.codesourcery.com/GNUToolchain/kbentry29 # Can be 'softfp' or 'hardfp' -ARM_FP_MODE ?= "softfp" +ARM_FP_ABI ?= "softfp" -ARM_FP_OPT = "${@['-mfloat-abi=softfp', '-mfloat-abi=hard'][bb.data.getVar('ARM_FP_MODE', d, 1) == 'hardfp']}" -ARM_FP_PACKAGESUFFIX = "${@['', '-hardfp'][bb.data.getVar('ARM_FP_MODE', d, 1) == 'hardfp']}" +ARM_FP_OPT = "${@['-mfloat-abi=softfp', '-mfloat-abi=hard'][bb.data.getVar('ARM_FP_ABI', d, 1) == 'hardfp']}" +ARM_FP_PACKAGESUFFIX = "${@['', '-hardfp'][bb.data.getVar('ARM_FP_ABI', d, 1) == 'hardfp']}" TARGET_CC_ARCH = "-march=armv7-a -mtune=cortex-a8 -mfpu=neon ${ARM_FP_OPT}" diff --git a/conf/machine/omap4430-panda.conf b/conf/machine/omap4430-panda.conf index df2658e949..f5f8757533 100644 --- a/conf/machine/omap4430-panda.conf +++ b/conf/machine/omap4430-panda.conf @@ -2,14 +2,12 @@ #@NAME: OMAP4430 Panda #@DESCRIPTION: Machine configuration for the OMAP4430 Panda -require conf/machine/include/omap3.inc - -EXTRA_IMAGEDEPENDS = "x-load-rsalveti u-boot-sakoman " +require conf/machine/include/omap4.inc XLOAD_MACHINE = "omap4430panda_config" XLOAD_LOAD_ADDRESS = 0x40304350 -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-sakoman" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot" UBOOT_MACHINE = "omap4_panda_config" PREFERRED_PROVIDER_virtual/kernel = "linux-omap4" diff --git a/conf/machine/pcm043.conf b/conf/machine/pcm043.conf new file mode 100644 index 0000000000..fdf2f0e3e6 --- /dev/null +++ b/conf/machine/pcm043.conf @@ -0,0 +1,25 @@ +#@TYPE: Machine +#@Name: Phytec phyCORE-i.MX35 +#@DESCRIPTION: Machine configuration for Phytec phyCORE-i.MX35 + +TARGET_ARCH = "arm" + +MACHINE_FEATURES = "kernel26 apm alsa ext2 pcmcia usbhost usbgadget touchscreen" + +GUI_MACHINE_CLASS = "smallscreen" + +PREFERRED_PROVIDER_virtual/kernel = "linux" + +require conf/machine/include/tune-arm1136jf-s.inc + +# used by sysvinit_2 +SERIAL_CONSOLE = "115200 ttymxc0" + +# used by opie-collections.inc +ROOT_FLASH_SIZE = "32" + +IMAGE_FSTYPES += "tar.gz" + +KERNEL_IMAGETYPE = "uImage" + +UBOOT_ENTRYPOINT = "0x80008000" diff --git a/contrib/angstrom/personal-feed.sh b/contrib/angstrom/personal-feed.sh index 2896ec6479..787dbf84f4 100644 --- a/contrib/angstrom/personal-feed.sh +++ b/contrib/angstrom/personal-feed.sh @@ -8,7 +8,7 @@ REMOTEM=http://www.angstrom-distribution.org # Feed dir we want to upload to -REMOTED=feeds/unstable/ipk/$(basename $PWD) +REMOTED=feeds/2011.03/ipk/$(basename $PWD) # create upload dir mkdir -p upload-queue || true diff --git a/contrib/angstrom/rss.php b/contrib/angstrom/rss.php index 2e1f49c4cc..4dab45d57f 100644 --- a/contrib/angstrom/rss.php +++ b/contrib/angstrom/rss.php @@ -15,7 +15,7 @@ * */ -$build_link_base = 'http://www.angstrom-distribution.org/unstable/autobuild/'; +$build_link_base = 'http://www.angstrom-distribution.org/2011.03/autobuild/'; $builder_log_date = file('autobuilder.log'); diff --git a/contrib/angstrom/sort.sh b/contrib/angstrom/sort.sh index 893d9285b5..ca13ce282e 100755 --- a/contrib/angstrom/sort.sh +++ b/contrib/angstrom/sort.sh @@ -59,15 +59,15 @@ case "$arch" in at91sam9263ek at91sam9g10ek at91sam9g20ek at91sam9g45ek at91sam9g45ekes at91sam9rlek aximx50 aximx50v bd-neon c7x0 chumby chumby-falconwing cm-x270 cm-x300 da830-omapl137-evm da850-omapl138-evm davinci-dvevm davinci-sffsdr - devkitidp-pxa255 dm355-evm dm355-leopard dm357-evm dm365-evm dm6446-evm - dm6467-evm dm6467t-evm dns323 dockstar e680 ea3250 em-x270 er0100 eseries - ghi270 gumstix gumstix-connex gumstix-custom-connex gumstix-custom-verdex - gumstix-verdex h1910 h2200 h3900 h4000 h5000 hawkboard hipox htcalpine - htcapache htcblueangel htchimalaya htcsable htctornado htcuniversal hx2000 - hx4700 imote2 ixp4xxle kixrp435 kuropro logicpd-pxa270 looxc550 lspro - magician mainstone mh355 mp900c mtx-3 mtx-3a mv2120 mx21ads mx27ads n2100 - navman-icn330 netbook-pro neuros-osd neuros-osd2 nhk15 nokia770 nslu2le - omap1510inn omap1610h2 omap1710h3 omap5912osk openrd-base openrd-client + devkitidp-pxa255 dm355-evm dm355-leopard dm357-evm dm365-evm dm368-evm + dm6446-evm dm6467-evm dm6467t-evm dns323 dockstar e680 ea3250 em-x270 er0100 + eseries ghi270 gumstix gumstix-connex gumstix-custom-connex + gumstix-custom-verdex gumstix-verdex h1910 h2200 h3900 h4000 h5000 hawkboard + hipox htcalpine htcapache htcblueangel htchimalaya htcsable htctornado + htcuniversal hx2000 hx4700 imote2 ixp4xxle kixrp435 kuropro logicpd-pxa270 + looxc550 lspro magician mainstone mh355 mp900c mtx-3 mtx-3a mv2120 mx21ads + mx27ads n2100 navman-icn330 netbook-pro neuros-osd neuros-osd2 nhk15 nokia770 + nslu2le omap1510inn omap1610h2 omap1710h3 omap5912osk openrd-base openrd-client palmld palmt650 palmt680 palmtc palmtt palmtt3 palmtt5 palmtx palmz31 palmz71 palmz72 poodle qemuarm rokre2 rokr-e2 rokre6 ronetix-pm9261 ronetix-pm9263 sgh-i900 sheevaplug spitz stamp9g20evb topas910 tosa @@ -75,11 +75,11 @@ case "$arch" in "armv5teb") machines="fsg3be ixp4xxbe nslu2be" ;; "armv6") - machines="bug iphone mx31ads mx31moboard mini6410 nokia800 omap2420h4 omap2430sdp smartq5 smartqv7 smdk6410" ;; + machines="bug iphone mx31ads mx31moboard mini6410 nokia800 omap2420h4 omap2430sdp pcm043 smartq5 smartqv7 smdk6410" ;; "armv6-novfp") machines="htcblackstone htcdiamond htcdream htckaiser htcnike htcpolaris htcraphael htctitan htcvogue" ;; "armv7a") - machines="am3517-evm am3517-crane archos5 archos5it beagleboard bug20 cm-t35 dm37x-evm am37x-evm am389x-evm babbage c6a816x-evm efikamx htcleo igep0020 nokia900 omap3517-evm omap3evm omap3-pandora omap3-touchbook omap4430-sdp omapzoom omapzoom2 omapzoom36x overo palmpre omap4430-panda usrp-embedded usrp-e1xx" ;; + machines="am3517-evm am3517-crane am45x-evm archos5 archos5it beagleboard bug20 cm-t35 dm37x-evm am37x-evm am387x-evm am389x-evm babbage c6a814x-evm c6a816x-evm dm814x-evm efikamx htcleo igep0020 nokia900 omap3517-evm omap3evm omap3-pandora omap3-touchbook omap4430-sdp omapzoom omapzoom2 omapzoom36x overo palmpre omap4430-panda usrp-embedded usrp-e1xx" ;; "armv7a-vfp") machines="ac100" ;; "avr32") diff --git a/contrib/angstrom/source-mirror.txt b/contrib/angstrom/source-mirror.txt index 0b4f67886c..b2ca895b72 100644 --- a/contrib/angstrom/source-mirror.txt +++ b/contrib/angstrom/source-mirror.txt @@ -1,6 +1,6 @@ #To populate the source mirror the autobuilder uses the following command: -rsync ~/OE/downloads/ angstrom@linuxtogo.org:~/website/unstable/sources/ -aPvz \ +rsync ~/OE/downloads/ angstrom@linuxtogo.org:~/website/2011.03/sources/ -aPvz \ --exclude "*.md5" \ --exclude "*.done" \ --exclude "svn" \ diff --git a/contrib/angstrom/upload-packages.sh b/contrib/angstrom/upload-packages.sh index 2b3871a129..aa7e82738c 100644 --- a/contrib/angstrom/upload-packages.sh +++ b/contrib/angstrom/upload-packages.sh @@ -5,10 +5,10 @@ # Run this from inside ${DEPLOY_DIR} e.g. tmp/deploy/glibc/ # Angstrom webserver -REMOTEM=angstrom@feeds.angstrom-distribution.org +REMOTEM=angstrom@eu.feeds.angstrom-distribution.org # Feed dir we want to upload to -REMOTED=website/feeds/unstable/ipk/$(basename $PWD) +REMOTED=website/feeds/2011.03/ipk/$(basename $PWD) # create upload dir mkdir -p upload-queue || true diff --git a/contrib/feed-browser/includes/config.inc b/contrib/feed-browser/includes/config.inc index 341ba87c36..667fcc6db0 100644 --- a/contrib/feed-browser/includes/config.inc +++ b/contrib/feed-browser/includes/config.inc @@ -244,6 +244,11 @@ $feeds = array( 'url'=>'armv6/machine/mx31ads', ), + array( + 'name'=>'Phytec phyCORE-i.MX35', + 'url'=>'armv6/machine/pcm043', + ), + array( 'name'=>'Tyan thunder K7 s2462 mainboard (guinness)', 'url'=>'i686/machine/guinness', diff --git a/env.sh b/env.sh new file mode 100755 index 0000000000..1189d08f7f --- /dev/null +++ b/env.sh @@ -0,0 +1,19 @@ +export OE_DIR=${PWD} +export PATH=${OE_DIR}/bitbake/bin:$PATH +export BBPATH=${OE_DIR}/build:${OE_DIR} +export BBFILES=${OE_DIR}/recipes/*/*.bb + +if [ -z ${ORG_PATH} ] ; then + ORG_PATH=${PATH} + export ORG_PATH +fi + +if [ -z ${ORG_LD_LIBRARY_PATH} ] ; then + ORG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH} + export ORG_LD_LIBRARY_PATH +fi + +LD_LIBRARY_PATH= +export PATH LD_LIBRARY_PATH BBPATH +export LANG=C +export BB_ENV_EXTRAWHITE="MACHINE DISTRO ANGSTROM_MODE" diff --git a/rebuild-uwsgi.sh b/rebuild-uwsgi.sh new file mode 100755 index 0000000000..10bbcf4bbf --- /dev/null +++ b/rebuild-uwsgi.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +rm oe_sources/uwsgi-1.2.3.tar.gz* +bitbake -c clean uwsgi +cog.py -r recipes/uwsgi/uwsgi_1.2.3.bb +bitbake -D -b uwsgi_1.2.3.bb diff --git a/recipes/ack/ack_1.94.bb b/recipes/ack/ack_1.94.bb new file mode 100644 index 0000000000..f3f4133cbf --- /dev/null +++ b/recipes/ack/ack_1.94.bb @@ -0,0 +1,16 @@ +DESCRIPTION = "Ack is a tool like grep, designed for programmers with large trees of heterogeneous source code." +HOMEPAGE = "http://betterthangrep.com" +PRIORITY = "optional" +LICENSE = "Artistic License 2.0" + +RDEPENDS = "perl perl-modules" +PR = "r0" + +SRCREV = "39cd1f31cc379b2df4b63ca6564c80b6b4caa929" +SRC_URI = "git://github.com/petdance/ack.git;protocol=git" +S = "${WORKDIR}/git" + +do_install () { + install -d ${D}${bindir}/ + install -m 0755 ${S}/ack ${D}${bindir}/ +} diff --git a/recipes/alsa/alsa-lib_1.0.24.1.bb b/recipes/alsa/alsa-lib_1.0.24.1.bb new file mode 100644 index 0000000000..8532a4123d --- /dev/null +++ b/recipes/alsa/alsa-lib_1.0.24.1.bb @@ -0,0 +1,48 @@ +DESCRIPTION = "Alsa sound library" +HOMEPAGE = "http://www.alsa-project.org" +SECTION = "libs/multimedia" +LICENSE = "LGPLv2.1" + +# configure.in sets -D__arm__ on the command line for any arm system +# (not just those with the ARM instruction set), this should be removed, +# (or replaced by a permitted #define). +#FIXME: remove the following +ARM_INSTRUCTION_SET = "arm" + +SRC_URI = "ftp://ftp.alsa-project.org/pub/lib/alsa-lib-${PV}.tar.bz2 \ + file://fix-tstamp-declaration.patch \ + file://fix_libmath.patch \ + " + +SRC_URI[md5sum] = "7cc05f25e1d5b65da8fb3fdcd540f226" +SRC_URI[sha256sum] = "a32f7c21015b6c71f9a80ff70a2b6a50e4ff4d5c77c744ff0793dea7ba7a2517" + +inherit autotools pkgconfig + + +EXTRA_OECONF = "--with-cards=pdaudiocf --with-oss=yes --disable-python --enable-shared --enable-static" + + +require alsa-fpu.inc +EXTRA_OECONF += "${@get_alsa_fpu_setting(bb, d)} " + + +require alsa-versym.inc +EXTRA_OECONF += "${@get_alsa_versym_setting(bb, d)} " + + +PACKAGES =+ "alsa-server libasound alsa-conf-base alsa-conf alsa-doc alsa-dev" +FILES_${PN}-dbg += "${libdir}/alsa-lib/*/.debu*" +FILES_libasound = "${libdir}/libasound.so.*" +FILES_alsa-server = "${bindir}/*" +FILES_alsa-conf = "${datadir}/alsa/" +FILES_alsa-dev += "${libdir}/libasound.so ${libdir}/pkgconfig/ /usr/include/ ${datadir}/aclocal/*" +FILES_alsa-conf-base = "\ +${datadir}/alsa/alsa.conf \ +${datadir}/alsa/cards/aliases.conf \ +${datadir}/alsa/pcm/default.conf \ +${datadir}/alsa/pcm/dmix.conf \ +${datadir}/alsa/pcm/dsnoop.conf" + +RDEPENDS_libasound = "alsa-conf-base" + diff --git a/recipes/alsa/alsa-state/am45x-evm/asound.conf b/recipes/alsa/alsa-state/am45x-evm/asound.conf new file mode 100644 index 0000000000..f241f8690e --- /dev/null +++ b/recipes/alsa/alsa-state/am45x-evm/asound.conf @@ -0,0 +1,8 @@ + +# HDMI +pcm.!default { + type hw + card 0 + device 7 +} + diff --git a/recipes/alsa/alsa-utils-1.0.24.2/remove-xmlto.patch b/recipes/alsa/alsa-utils-1.0.24.2/remove-xmlto.patch new file mode 100644 index 0000000000..41691a917b --- /dev/null +++ b/recipes/alsa/alsa-utils-1.0.24.2/remove-xmlto.patch @@ -0,0 +1,33 @@ +From 4fa1ac725e8d8376e99a383501cdaeedfed0ed8f Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Tue, 1 Mar 2011 08:37:09 +0100 +Subject: [PATCH] alsa-utils: don't run xmlto when crosscompiling + +Signed-off-by: Koen Kooi +--- + alsactl/Makefile.am | 5 ----- + 1 files changed, 0 insertions(+), 5 deletions(-) + +diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am +index 5cfc415..e1fa44a 100644 +--- a/alsactl/Makefile.am ++++ b/alsactl/Makefile.am +@@ -2,9 +2,6 @@ SUBDIRS = init + + sbin_PROGRAMS=alsactl + man_MANS=alsactl.1 +-if USE_XMLTO +-man_MANS += alsactl_init.7 +-endif + EXTRA_DIST=alsactl.1 alsactl_init.xml + + alsactl_SOURCES=alsactl.c state.c utils.c init_parse.c +@@ -55,5 +52,3 @@ CLEANFILES = \ + alsa-restore.service \ + 90-alsa-restore.rules + +-%.7: %.xml +- xmlto man $? +-- +1.6.6.1 + diff --git a/recipes/alsa/alsa-utils_1.0.24.2.bb b/recipes/alsa/alsa-utils_1.0.24.2.bb new file mode 100644 index 0000000000..a2a92533c5 --- /dev/null +++ b/recipes/alsa/alsa-utils_1.0.24.2.bb @@ -0,0 +1,62 @@ +DESCRIPTION = "ALSA Utilities" +HOMEPAGE = "http://www.alsa-project.org" +SECTION = "console/utils" +LICENSE = "GPLv2" +DEPENDS = "alsa-lib ncurses" + +SRC_URI = "ftp://ftp.alsa-project.org/pub/utils/alsa-utils-${PV}.tar.bz2 \ + file://remove-xmlto.patch \ + " + +SRC_URI[md5sum] = "8238cd57cb301d1c36bcf0ecb59ce6b2" +SRC_URI[sha256sum] = "95127f740291086486c06c28118cabca0814bde48fd14dac041a9812a5ac1be2" + +inherit gettext autotools + +EXTRA_OECONF += " --with-alsa-prefix=${STAGING_LIBDIR} --with-alsa-inc-prefix=${STAGING_INCDIR}" + +# This are all packages that we need to make. Also, the now empty alsa-utils +# ipk depend on them. + +PACKAGES += "\ + alsa-utils-alsamixer \ + alsa-utils-midi \ + alsa-utils-aplay \ + alsa-utils-amixer \ + alsa-utils-aconnect \ + alsa-utils-iecset \ + alsa-utils-speakertest \ + alsa-utils-aseqnet \ + alsa-utils-aseqdump \ + alsa-utils-alsaconf \ + alsa-utils-alsactl " + +# We omit alsaconf, because +# a) this is a bash script +# b) it creates config files not suitable for OE-based distros + +FILES_${PN} = "" +FILES_alsa-utils-aplay = "${bindir}/aplay ${bindir}/arecord" +FILES_alsa-utils-amixer = "${bindir}/amixer" +FILES_alsa-utils-alsamixer = "${bindir}/alsamixer" +FILES_alsa-utils-speakertest = "${bindir}/speaker-test ${datadir}/sounds/alsa/ ${datadir}/alsa/" +FILES_alsa-utils-midi = "${bindir}/aplaymidi ${bindir}/arecordmidi ${bindir}/amidi" +FILES_alsa-utils-aconnect = "${bindir}/aconnect" +FILES_alsa-utils-aseqnet = "${bindir}/aseqnet" +FILES_alsa-utils-iecset = "${bindir}/iecset" +FILES_alsa-utils-alsactl = "${sbindir}/alsactl" +FILES_alsa-utils-aseqdump = "${bindir}/aseqdump" +FILES_alsa-utils-alsaconf = "${sbindir}/alsaconf" + +DESCRIPTION_alsa-utils-aplay = "play (and record) sound files via ALSA" +DESCRIPTION_alsa-utils-amixer = "command-line based control for ALSA mixer and settings" +DESCRIPTION_alsa-utils-alsamixer = "ncurses based control for ALSA mixer and settings" +DESCRIPTION_alsa-utils-speakertest = "ALSA surround speaker test utility" +DESCRIPTION_alsa-utils-midi = "miscalleanous MIDI utilities for ALSA" +DESCRIPTION_alsa-utils-aconnect = "ALSA sequencer connection manager" +DESCRIPTION_alsa-utils-aseqnet = "network client/server on ALSA sequencer" +DESCRIPTION_alsa-utils-alsactl = "saves/restores ALSA-settings in /etc/asound.state" +DESCRIPTION_alsa-utils-alsaconf = "a bash script that creates ALSA configuration files" + +ALLOW_EMPTY_alsa-utils = "1" + diff --git a/recipes/angstrom/angstrom-feed-configs.bb b/recipes/angstrom/angstrom-feed-configs.bb index 9d76d51f22..403a3a1a2c 100644 --- a/recipes/angstrom/angstrom-feed-configs.bb +++ b/recipes/angstrom/angstrom-feed-configs.bb @@ -7,7 +7,7 @@ RRECOMMENDS_${PN} += "opkg" PR = "r14" PACKAGE_ARCH = "${MACHINE_ARCH}" -FEED_BASEPATH ?= "unstable/feed/" +FEED_BASEPATH = "beta/" IWMMXT_FEED = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '',d)}" diff --git a/recipes/angstrom/angstrom-version.bb b/recipes/angstrom/angstrom-version.bb index 0173f166f2..c4b3623bbb 100644 --- a/recipes/angstrom/angstrom-version.bb +++ b/recipes/angstrom/angstrom-version.bb @@ -1,7 +1,7 @@ LICENSE = "MIT" PV = "${DISTRO_VERSION}" -PR = "r6" +PR = "r7" PE = "1" SRC_URI = "file://lsb_release" diff --git a/recipes/angstrom/angstrom-version/lsb_release b/recipes/angstrom/angstrom-version/lsb_release index f6e7f16628..7746dd0e35 100755 --- a/recipes/angstrom/angstrom-version/lsb_release +++ b/recipes/angstrom/angstrom-version/lsb_release @@ -1,6 +1,6 @@ #!/bin/sh VERSION="$(cat /etc/angstrom-version | head -n1 | awk '{print $2}')" -CODENAME="foo" +CODENAME="Dureza" case $1 in "-v") diff --git a/recipes/angstrom/bigbuckbunny-720p.bb b/recipes/angstrom/bigbuckbunny-720p.bb index 69839d1bef..ed46f8bf2f 100644 --- a/recipes/angstrom/bigbuckbunny-720p.bb +++ b/recipes/angstrom/bigbuckbunny-720p.bb @@ -1,7 +1,7 @@ DESCRIPTION = "Big Buck Bunny movie" LICENSE = "CC-BY" -SRC_URI = "http://mirror.bigbuckbunny.de/peach/bigbuckbunny_movies/big_buck_bunny_720p_surround.avi" +SRC_URI = "http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_surround.avi" do_install() { install -d ${D}${datadir}/movies diff --git a/recipes/apr/apr-util_1.3.10.bb b/recipes/apr/apr-util_1.3.10.bb new file mode 100644 index 0000000000..32b568ec0d --- /dev/null +++ b/recipes/apr/apr-util_1.3.10.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "Apache Portable Runtime (APR) companion library" +SECTION = "libs" +DEPENDS = "apr expat gdbm" +LICENSE = "Apache License, Version 2.0" + +PR = "r1" + +SRC_URI = "${APACHE_MIRROR}/apr/${P}.tar.gz \ + file://configfix.patch \ + file://configure_fixes.patch" + +EXTRA_OECONF = "--with-apr=${STAGING_BINDIR_CROSS}/apr-1-config \ + --with-dbm=gdbm \ + --with-gdbm=${STAGING_DIR_HOST}${layout_prefix} \ + --without-sqlite2 \ + --without-sqlite3 \ + --without-pgsql \ + --without-odbc \ + --with-expat=${STAGING_DIR_HOST}${layout_prefix}" + +SRC_URI[md5sum] = "82acd25cf3df8c72eba44eaee8b80c19" +SRC_URI[sha256sum] = "7c37ac40b2351bfc23000fb6b7b54a67e0872255df315c82eb60c821bcef4b23" + +inherit autotools lib_package binconfig + +OE_BINCONFIG_EXTRA_MANGLE = " -e 's:location=source:location=installed:'" + +do_configure_prepend() { + cp ${STAGING_DATADIR}/apr/apr_rules.mk ${S}/build/rules.mk + echo "AC_PROG_LIBTOOL" >> ${S}/configure.in +} + +do_configure_append() { + sed -i -e s:apr_builders=/usr/share/build-1:apr_builders=${STAGING_DATADIR}/build-1:g ${S}/build/rules.mk + sed -i /^LIBTOOL/d ${S}/build/rules.mk + echo LIBTOOL="${HOST_SYS}-libtool --tag=CC" >> ${S}/build/rules.mk +} diff --git a/recipes/asterisk/asterisk-1.4.23.1/Makefile.patch b/recipes/asterisk/asterisk-1.4.39.2/Makefile.patch similarity index 100% rename from recipes/asterisk/asterisk-1.4.23.1/Makefile.patch rename to recipes/asterisk/asterisk-1.4.39.2/Makefile.patch diff --git a/recipes/asterisk/asterisk-1.4.39.2/asterisk-1.4-bugid18301.patch b/recipes/asterisk/asterisk-1.4.39.2/asterisk-1.4-bugid18301.patch new file mode 100644 index 0000000000..4a80d01145 --- /dev/null +++ b/recipes/asterisk/asterisk-1.4.39.2/asterisk-1.4-bugid18301.patch @@ -0,0 +1,43 @@ +--- asterisk-1.4.39-rc1/configure.ac.orig 2011-01-09 12:46:51.000000000 -0600 ++++ asterisk-1.4.39-rc1/configure.ac 2011-01-09 12:48:28.000000000 -0600 +@@ -485,40 +485,6 @@ + AC_MSG_RESULT(cross-compile) + ) + +-ac_cv_have_variable_fdset=0 +-AC_MSG_CHECKING(if we can increase the maximum select-able file descriptor) +-AC_RUN_IFELSE( +-AC_LANG_PROGRAM([ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-], [[ +- struct rlimit rlim = { FD_SETSIZE + 2, FD_SETSIZE + 2 }; +- int fd[[2]]; +- struct timeval tv = { 0, }; +- struct ast_fdset { long fds_bits[[1024]]; } fds = { { 0, } }; +- if (setrlimit(RLIMIT_NOFILE, &rlim)) { exit(1); } +- if ((fd0 = open("/dev/null", O_RDONLY)) < 0) { exit(1); } +- if (dup2(fd0, (fd1 = FD_SETSIZE + 1)) < 0) { exit(1); } +- FD_SET(fd[[0]], (fd_set *) &fds); +- FD_SET(fd[[1]], (fd_set *) &fds); +- if (select(FD_SETSIZE + 2, (fd_set *) &fds, NULL, NULL, &tv) < 0) { exit(1); } +- exit(0)]]), +- AC_MSG_RESULT(yes) +- ac_cv_have_variable_fdset=1 +- AC_DEFINE([HAVE_VARIABLE_FDSET], 1, [Define to 1 if your system can support larger than default select bitmasks.]), +- AC_MSG_RESULT(no), +- AC_MSG_RESULT(cross-compile) +-) +- + if test "${ac_cv_have_variable_fdset}x" = "0x"; then + AC_RUN_IFELSE( + AC_LANG_PROGRAM([ diff --git a/recipes/asterisk/asterisk-1.4.23.1/init b/recipes/asterisk/asterisk-1.4.39.2/init similarity index 95% rename from recipes/asterisk/asterisk-1.4.23.1/init rename to recipes/asterisk/asterisk-1.4.39.2/init index d53a9a1e5e..6436113d41 100644 --- a/recipes/asterisk/asterisk-1.4.23.1/init +++ b/recipes/asterisk/asterisk-1.4.39.2/init @@ -6,6 +6,7 @@ # asterisk=/usr/sbin/asterisk pidfile=/var/run/asterisk/asterisk.pid +logdir=/var/log/asterisk asterisk_args="-npqT -U asterisk -G asterisk" test -x "$asterisk" || exit 0 @@ -13,6 +14,8 @@ test -x "$asterisk" || exit 0 case "$1" in start) echo -n "Starting Asterisk" + mkdir -p $logdir + chown asterisk:asterisk $logdir start-stop-daemon --start --quiet --exec $asterisk -- $asterisk_args echo "." ;; diff --git a/recipes/asterisk/asterisk-1.4.23.1/logrotate b/recipes/asterisk/asterisk-1.4.39.2/logrotate similarity index 100% rename from recipes/asterisk/asterisk-1.4.23.1/logrotate rename to recipes/asterisk/asterisk-1.4.39.2/logrotate diff --git a/recipes/asterisk/asterisk-1.4.23.1/sounds.xml.patch b/recipes/asterisk/asterisk-1.4.39.2/sounds.xml.patch similarity index 100% rename from recipes/asterisk/asterisk-1.4.23.1/sounds.xml.patch rename to recipes/asterisk/asterisk-1.4.39.2/sounds.xml.patch diff --git a/recipes/asterisk/asterisk-1.4.23.1/volatiles b/recipes/asterisk/asterisk-1.4.39.2/volatiles similarity index 100% rename from recipes/asterisk/asterisk-1.4.23.1/volatiles rename to recipes/asterisk/asterisk-1.4.39.2/volatiles diff --git a/recipes/asterisk/asterisk_1.4.23.1.bb b/recipes/asterisk/asterisk_1.4.39.2.bb similarity index 87% rename from recipes/asterisk/asterisk_1.4.23.1.bb rename to recipes/asterisk/asterisk_1.4.39.2.bb index ed445089b4..41cb93f604 100644 --- a/recipes/asterisk/asterisk_1.4.23.1.bb +++ b/recipes/asterisk/asterisk_1.4.39.2.bb @@ -7,10 +7,12 @@ PRIORITY = "optional" SECTION = "console/telephony" DEPENDS = "speex readline zlib openssl curl popt gnutls sqlite libogg libvorbis" #RRECOMMENDS_${PN} = "logrotate" +PR = "r1" SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-${PV}.tar.gz \ # file://sounds.xml.patch \ file://Makefile.patch \ + file://asterisk-1.4-bugid18301.patch \ file://logrotate \ file://volatiles \ file://init" @@ -54,29 +56,33 @@ export ASTCFLAGS = "-fsigned-char -I${STAGING_INCDIR} -DPATH_MAX=4096" export ASTLDFLAGS="${LDFLAGS} -lpthread -ldl -lresolv " export PROC="${ARCH}" -do_configure_prepend () { +do_configure_prepend() { sed -i 's:/var:${localstatedir}:' ${WORKDIR}/logrotate sed -i 's:/etc/init.d:${sysconfdir}/init.d:' ${WORKDIR}/logrotate sed -i 's:/var:${localstatedir}:' ${WORKDIR}/volatiles -} -do_configure () { - # Looks like rebuilding configure doesn't work, so we are skipping - # that and are just using the shipped one - # gnu-configize - # libtoolize --force - oe_runconf + # Due to menuselect below we want to save off these configures + mv ${S}/menuselect/configure ${S}/menuselect/configure.SAVE + mv ${S}/menuselect/mxml/configure ${S}/menuselect/mxml/configure.SAVE + mv ${S}/main/editline/configure ${S}/main/editline/configure.SAVE } +do_configure_append() { + # Put this back + mv ${S}/menuselect/configure.SAVE ${S}/menuselect/configure + mv ${S}/menuselect/mxml/configure.SAVE ${S}/menuselect/mxml/configure + mv ${S}/main/editline/configure.SAVE ${S}/main/editline/configure +} do_compile() { ( - #make sure that menuselect gets build using host toolchain - unset CC LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS RANLIB + # Make sure that menuselect gets build using host toolchain + unset CC CPP LD CXX CCLD CFLAGS CPPFLAGS LDFLAGS CXXFLAGS RANLIB + unset CONFIG_SITE + export ac_cv_prog_PKGCONFIG=No cd menuselect ./configure oe_runmake - cd ../ ) || exit 1 oe_runmake } @@ -160,5 +166,5 @@ CONFFILES_${PN} += "${sysconfdir}/asterisk/voicemail.conf" CONFFILES_${PN} += "${sysconfdir}/asterisk/vpb.conf" CONFFILES_${PN} += "${sysconfdir}/logrotate.d/asterisk" -SRC_URI[md5sum] = "f5fdaa7e4a6d9b8dfc9e2bef8ee81681" -SRC_URI[sha256sum] = "e78e73de5d9b920070b778cbb2ab077119a86a71a59755d67aa2c3a82b4239c4" +SRC_URI[md5sum] = "b3c0102860cf8b5ca44660636d6eac87" +SRC_URI[sha256sum] = "b2eb49e2198a4f05e4254cf224e0f13755889ba421a70c772ffafb3a6775271e" diff --git a/recipes/autoconf/autoconf.inc b/recipes/autoconf/autoconf.inc index 7f22c2b0ec..31e51dffd8 100644 --- a/recipes/autoconf/autoconf.inc +++ b/recipes/autoconf/autoconf.inc @@ -8,7 +8,7 @@ RDEPENDS_${PN} = "m4 perl gnu-config" DEPENDS_virtclass-native = "m4-native gnu-config-native perl-native" RDEPENDS_${PN}_virtclass-native = "m4-native gnu-config-native perl-native" -INC_PR = "r13" +INC_PR = "r14" SRC_URI = "${GNU_MIRROR}/autoconf/autoconf-${PV}.tar.bz2;name=autoconf \ file://program_prefix.patch" @@ -34,5 +34,9 @@ do_configure_append() { sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${S}/bin/*.in } +do_install_append_pn-autoconf(){ + sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g ${D}${bindir}/* +} + PARALLEL_MAKE = "" BBCLASSEXTEND = "native" diff --git a/recipes/automake/automake.inc b/recipes/automake/automake.inc index de4df34d38..af0ba6ab55 100644 --- a/recipes/automake/automake.inc +++ b/recipes/automake/automake.inc @@ -29,7 +29,7 @@ RDEPENDS_automake += "\ perl-module-text-parsewords \ perl-module-vars " SRC_URI = "${GNU_MIRROR}/automake/automake-${PV}.tar.bz2;name=automake" -INC_PR = "r4" +INC_PR = "r5" AUTOMAKE_API = "${@".".join(bb.data.getVar("PV",d,1).split(".")[0:2])}" inherit autotools @@ -48,4 +48,8 @@ do_install_append () { install -d ${D}${datadir}/aclocal } +do_install_append_pn-automake(){ + sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g ${D}${bindir}/* +} + BBCLASSEXTEND = "native" diff --git a/recipes/autossh/autossh_1.4c.bb b/recipes/autossh/autossh_1.4c.bb new file mode 100644 index 0000000000..5f4c79e58f --- /dev/null +++ b/recipes/autossh/autossh_1.4c.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Automatically restart SSH sessions and tunnels" +HOMEPAGE = "http://www.harding.motd.ca/autossh/" +SECTION = "net" +PRIORITY = "optional" +LICENSE = "BSD" +PR = "r0" + +SRC_URI = "http://www.harding.motd.ca/autossh/autossh-${PV}.tgz" + +RDEPENDS = "openssh" + +EXTRA_OECONF = "--bindir=${D}/usr/bin --datadir=${D}/usr/share --mandir=${D}/usr/share/man --exec_prefix=${D}/usr --prefix=${D}/usr" +TARGET_CC_ARCH += "${LDFLAGS}" + +inherit autotools + +SRC_URI[md5sum] = "26520eea934f296be0783dabe7fcfd28" +SRC_URI[sha256sum] = "6fcaba6a409a46bdf832086736bb8f09d245ebce11027f41d39588a95dc7fd1d" diff --git a/recipes/avahi/avahi-0.6.25/fix-CVE-2011-1002.patch b/recipes/avahi/avahi-0.6.25/fix-CVE-2011-1002.patch new file mode 100644 index 0000000000..f45af44eb8 --- /dev/null +++ b/recipes/avahi/avahi-0.6.25/fix-CVE-2011-1002.patch @@ -0,0 +1,37 @@ +Based on the official fix (46109dfec75534fe270c0ab902576f685d5ab3a6) but +since we missed having 2b2844b10d7b7e5c97f9c667d664d9418bb7769a we are +two hunks smaller. + +Index: avahi-0.6.25/avahi-core/socket.c +=================================================================== +--- avahi-0.6.25.orig/avahi-core/socket.c ++++ avahi-0.6.25/avahi-core/socket.c +@@ -684,10 +684,14 @@ AvahiDnsPacket *avahi_recv_dns_packet_ip + goto fail; + } + +- if (sa.sin_addr.s_addr == INADDR_ANY) { ++ /* For corrupt packets FIONREAD returns zero size (See rhbz #607297). So ++ * fail after having read them. */ ++ if (!ms) ++ goto fail; ++ ++ if (sa.sin_addr.s_addr == INADDR_ANY) + /* Linux 2.4 behaves very strangely sometimes! */ + goto fail; +- } + + assert(!(msg.msg_flags & MSG_CTRUNC)); + assert(!(msg.msg_flags & MSG_TRUNC)); +@@ -839,6 +843,11 @@ AvahiDnsPacket *avahi_recv_dns_packet_ip + goto fail; + } + ++ /* For corrupt packets FIONREAD returns zero size (See rhbz #607297). So ++ * fail after having read them. */ ++ if (!ms) ++ goto fail; ++ + assert(!(msg.msg_flags & MSG_CTRUNC)); + assert(!(msg.msg_flags & MSG_TRUNC)); + diff --git a/recipes/avahi/files/configure-check-pymod.patch b/recipes/avahi/avahi-python/configure-check-pymod.patch similarity index 100% rename from recipes/avahi/files/configure-check-pymod.patch rename to recipes/avahi/avahi-python/configure-check-pymod.patch diff --git a/recipes/avahi/files/dbus-pre-1.1.1-support.patch b/recipes/avahi/avahi-python/dbus-pre-1.1.1-support.patch similarity index 100% rename from recipes/avahi/files/dbus-pre-1.1.1-support.patch rename to recipes/avahi/avahi-python/dbus-pre-1.1.1-support.patch diff --git a/recipes/avahi/avahi-python_0.6.21.bb b/recipes/avahi/avahi-python_0.6.21.bb index f9b2ce41bc..1d05e1f6d8 100644 --- a/recipes/avahi/avahi-python_0.6.21.bb +++ b/recipes/avahi/avahi-python_0.6.21.bb @@ -5,7 +5,7 @@ PR = "${INC_PR}.0" # FIXME: without --enable-gtk, avahi-discover (pygtk) won't be built FILES_avahi-discover = "" -PROVIDES = "avahi" +PROVIDES = "python-avahi" DEPENDS += "python-native" SRC_URI += "file://dbus-pre-1.1.1-support.patch \ diff --git a/recipes/avahi/avahi-ui_0.6.21.bb b/recipes/avahi/avahi-ui_0.6.21.bb deleted file mode 100644 index e3e5e5be99..0000000000 --- a/recipes/avahi/avahi-ui_0.6.21.bb +++ /dev/null @@ -1,23 +0,0 @@ -require avahi.inc -PR = "${INC_PR}.0" - -DEPENDS += "avahi gtk+" - -SRC_URI += "file://dbus-pre-1.1.1-support.patch" -AVAHI_GTK = "--enable-gtk" - -S = "${WORKDIR}/avahi-${PV}" - -do_stage() { - install -d ${STAGING_INCDIR}/avahi-ui - cp ${S}/avahi-ui/*.h ${STAGING_INCDIR}/avahi-ui/ - oe_libinstall -C avahi-ui -a -so libavahi-ui ${STAGING_LIBDIR} -} - -PACKAGES = "${PN} ${PN}-dbg" - -FILES_${PN} = "${libdir}/libavahi-ui*.so.*" -FILES_${PN}-dbg += "${libdir}/.debug/libavah-ui*" - -SRC_URI[md5sum] = "9cc68f79c50c9dd9e419990c3c9b05b9" -SRC_URI[sha256sum] = "d817c35f43011861476eab02eea14edd123b2bc58b4408d9d9b69b0c39252561" diff --git a/recipes/avahi/avahi.inc b/recipes/avahi/avahi.inc index f4dff0ac96..add1897bd1 100644 --- a/recipes/avahi/avahi.inc +++ b/recipes/avahi/avahi.inc @@ -19,8 +19,7 @@ inherit autotools pkgconfig update-rc.d python-dir # anything but avahi-daemon and avahi-autoipd # TODO: build and enable all the extra stuff avahi offers -EXTRA_OECONF = "--with-distro=debian --disable-stack-protector --disable-nls --disable-gdbm ${AVAHI_GTK} --disable-mono --disable-monodoc --disable-qt3 --disable-qt4 ${AVAHI_PYTHON}" -AVAHI_PYTHON ?= "--enable-python" +EXTRA_OECONF = "--with-distro=debian --disable-stack-protector --disable-nls --disable-gdbm ${AVAHI_GTK} --disable-mono --disable-monodoc --disable-qt3 --disable-qt4" AVAHI_GTK ?= "-disable-gtk" LDFLAGS_append_libc-uclibc = " -lintl" @@ -31,7 +30,7 @@ do_configure_prepend() { } -PACKAGES =+ "python-avahi avahi-daemon avahi-discover libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib libavahi-ui avahi-discover-standalone avahi-autoipd avahi-utils" +PACKAGES =+ "avahi-daemon avahi-discover libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-autoipd avahi-utils" FILES_libavahi-common = "${libdir}/libavahi-common.so.*" FILES_libavahi-core = "${libdir}/libavahi-core.so.*" @@ -45,7 +44,6 @@ FILES_avahi-daemon = "${sbindir}/avahi-daemon \ ${datadir}/avahi/avahi-service.dtd \ ${datadir}/avahi/service-types" FILES_libavahi-client = "${libdir}/libavahi-client.so.*" -FILES_libavahi-ui = "${libdir}/libavahi-ui.so.*" FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \ ${sysconfdir}/avahi/avahi-dnsconfd.action \ ${sysconfdir}/init.d/avahi-dnsconfd" @@ -55,17 +53,8 @@ FILES_avahi-utils = "${bindir}/avahi-*" FILES_avahi-autoipd = "${sbindir}/avahi-autoipd \ ${sysconfdir}/avahi/avahi-autoipd.action \ ${sysconfdir}/udhcpc.d/*avahi-autoipd" -FILES_python-avahi = "${PYTHON_SITEPACKAGES_DIR}/avahi/*" -FILES_avahi-discover = "${bindir}/avahi-discover \ - ${datadir}/applications/avahi-discover.desktop \ - ${datadir}/avahi/interfaces/avahi-discover.glade" -FILES_avahi-discover-standalone = "${bindir}/avahi-discover-standalone \ - ${datadir}/avahi/interfaces/avahi-discover.glade" CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf" -RDEPENDS_avahi-discover = "python-avahi python-pygtk" -RDEPENDS_python-avahi = "python-dbus" - INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd" INITSCRIPT_NAME_avahi-daemon = "avahi-daemon" INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19" diff --git a/recipes/avahi/avahi_0.6.19.bb b/recipes/avahi/avahi_0.6.19.bb deleted file mode 100644 index 6a6825c4e3..0000000000 --- a/recipes/avahi/avahi_0.6.19.bb +++ /dev/null @@ -1,5 +0,0 @@ -require avahi.inc - -PR = "${INC_PR}.0" -SRC_URI[md5sum] = "a06782435d1c994ecd00a66e95a5d9d4" -SRC_URI[sha256sum] = "a742dceda38f242f5eac72f2c3bc1bda76adf497d6913e88a9cbc624bf2dd68a" diff --git a/recipes/avahi/avahi_0.6.21.bb b/recipes/avahi/avahi_0.6.21.bb deleted file mode 100644 index 5372334336..0000000000 --- a/recipes/avahi/avahi_0.6.21.bb +++ /dev/null @@ -1,9 +0,0 @@ -require avahi.inc - -PR = "${INC_PR}.0" - -SRC_URI += "file://dbus-pre-1.1.1-support.patch" -SRC_URI += "file://avr32-ipv6-fix.patch" - -SRC_URI[md5sum] = "9cc68f79c50c9dd9e419990c3c9b05b9" -SRC_URI[sha256sum] = "d817c35f43011861476eab02eea14edd123b2bc58b4408d9d9b69b0c39252561" diff --git a/recipes/avahi/avahi_0.6.22.bb b/recipes/avahi/avahi_0.6.22.bb deleted file mode 100644 index 6e9608ae19..0000000000 --- a/recipes/avahi/avahi_0.6.22.bb +++ /dev/null @@ -1,9 +0,0 @@ -require avahi.inc - -DEPENDS += "intltool-native" -PR = "${INC_PR}.0" - -PACKAGES =+ "libavahi-gobject" - -SRC_URI[md5sum] = "c84b1a8a23126e188426728710414dc8" -SRC_URI[sha256sum] = "9dc6f870b6ce050059054a26bfc15d6e7a836fa299edd1b89c63c1089bfedd52" diff --git a/recipes/avahi/avahi_0.6.23.bb b/recipes/avahi/avahi_0.6.23.bb deleted file mode 100644 index abf0fbf3d9..0000000000 --- a/recipes/avahi/avahi_0.6.23.bb +++ /dev/null @@ -1,9 +0,0 @@ -require avahi.inc - -PR = "${INC_PR}.0" -DEPENDS += "intltool-native" - -PACKAGES =+ "libavahi-gobject" - -SRC_URI[md5sum] = "aab1a304851d8145ea5f6a85c10af9e9" -SRC_URI[sha256sum] = "dedf5325105f071e5d9f898fdb7337a7fe88a3a8a1f832a6056ba00477b8cc3d" diff --git a/recipes/avahi/avahi_0.6.24.bb b/recipes/avahi/avahi_0.6.24.bb deleted file mode 100644 index 786f58ffdc..0000000000 --- a/recipes/avahi/avahi_0.6.24.bb +++ /dev/null @@ -1,10 +0,0 @@ -require avahi.inc - -PR = "${INC_PR}.0" - -DEPENDS += "intltool-native" - -PACKAGES =+ "libavahi-gobject" - -SRC_URI[md5sum] = "068c1d220b07037e64caf87d4a7a0504" -SRC_URI[sha256sum] = "260070d46188ed58f5dc1174ce632c096679f6391a2b729366e7aba349d4b950" diff --git a/recipes/avahi/avahi_0.6.25.bb b/recipes/avahi/avahi_0.6.25.bb index 4b598a0313..f297946fbe 100644 --- a/recipes/avahi/avahi_0.6.25.bb +++ b/recipes/avahi/avahi_0.6.25.bb @@ -2,11 +2,13 @@ require avahi.inc PR = "${INC_PR}.0" +PROVIDES = "avahi" DEPENDS += "intltool-native" PACKAGES =+ "libavahi-gobject" -SRC_URI += "file://disable-ipv6.patch" +SRC_URI += "file://disable-ipv6.patch \ + file://fix-CVE-2011-1002.patch" noipv6 = "${@base_contains('DISTRO_FEATURES', 'ipv6', '', '-DDISABLE_IPV6', d)}" EXTRA_OEMAKE_append = " 'CFLAGS=${CFLAGS} ${noipv6}'" diff --git a/recipes/avahi/files/avr32-ipv6-fix.patch b/recipes/avahi/files/avr32-ipv6-fix.patch deleted file mode 100644 index f0710a1002..0000000000 --- a/recipes/avahi/files/avr32-ipv6-fix.patch +++ /dev/null @@ -1,42 +0,0 @@ ---- /tmp/socket.c 2007-09-14 14:03:01.395330465 +0200 -+++ avahi-0.6.21/avahi-core/socket.c 2007-09-14 14:08:42.081140297 +0200 -@@ -66,6 +66,39 @@ - #endif - #endif - -+#define IPV6_ADDRFORM 1 -+#define IPV6_2292PKTINFO 2 -+#define IPV6_2292HOPOPTS 3 -+#define IPV6_2292DSTOPTS 4 -+#define IPV6_2292RTHDR 5 -+#define IPV6_2292PKTOPTIONS 6 -+#define IPV6_CHECKSUM 7 -+#define IPV6_2292HOPLIMIT 8 -+#define IPV6_NEXTHOP 9 -+#define IPV6_AUTHHDR 10 /* obsolete */ -+#define IPV6_FLOWINFO 11 -+ -+#define IPV6_UNICAST_HOPS 16 -+#define IPV6_MULTICAST_IF 17 -+#define IPV6_MULTICAST_HOPS 18 -+#define IPV6_MULTICAST_LOOP 19 -+#define IPV6_ADD_MEMBERSHIP 20 -+#define IPV6_DROP_MEMBERSHIP 21 -+#define IPV6_ROUTER_ALERT 22 -+#define IPV6_MTU_DISCOVER 23 -+#define IPV6_MTU 24 -+#define IPV6_RECVERR 25 -+#define IPV6_V6ONLY 26 -+#define IPV6_JOIN_ANYCAST 27 -+#define IPV6_LEAVE_ANYCAST 28 -+ -+/* IPV6_MTU_DISCOVER values */ -+#define IPV6_PMTUDISC_DONT 0 -+#define IPV6_PMTUDISC_WANT 1 -+#define IPV6_PMTUDISC_DO 2 -+#define IPV6_PMTUDISC_PROBE 3 -+ -+ - static void mdns_mcast_group_ipv4(struct sockaddr_in *ret_sa) { - assert(ret_sa); - diff --git a/recipes/base-files/base-files/angstrom/issue b/recipes/base-files/base-files/angstrom/issue index 302ba10e3d..d1fa72a8a8 100644 --- a/recipes/base-files/base-files/angstrom/issue +++ b/recipes/base-files/base-files/angstrom/issue @@ -1,11 +1,2 @@ -.-------. -| | .-. -| | |-----.-----.-----.| | .----..-----.-----. -| | | __ | ---'| '--.| .-'| | | -| | | | | |--- || --'| | | ' | | | | -'---'---'--'--'--. |-----''----''--' '-----'-'-'-' - -' | - '---' - -The Angstrom Distribution \n \l - +Date: \d +Kernel release: \r diff --git a/recipes/base-files/base-files/angstrom/issue.net b/recipes/base-files/base-files/angstrom/issue.net index 182fc83759..7b0fac8f2c 100644 --- a/recipes/base-files/base-files/angstrom/issue.net +++ b/recipes/base-files/base-files/angstrom/issue.net @@ -1,12 +1,9 @@ -.-------. -| | .-. -| | |-----.-----.-----.| | .----..-----.-----. -| | | __ | ---'| '--.| .-'| | | -| | | | | |--- || --'| | | ' | | | | -'---'---'--'--'--. |-----''----''--' '-----'-'-'-' - -' | - '---' - -The Angstrom Distribution %h - +///////////////////////////////////////// +// // +// Rascal Micro // +// Small computers for art and science // +// // +///////////////////////////////////////// +date: \d +release: \r diff --git a/recipes/base-files/base-files/motd b/recipes/base-files/base-files/motd index e69de29bb2..dbd6e6d121 100644 --- a/recipes/base-files/base-files/motd +++ b/recipes/base-files/base-files/motd @@ -0,0 +1,8 @@ + +///////////////////////////////////////// +// // +// Rascal Micro // +// Small computers for art and science // +// // +///////////////////////////////////////// + diff --git a/recipes/base-files/base-files/profile b/recipes/base-files/base-files/profile index 8f7f6b5047..9316e61c66 100644 --- a/recipes/base-files/base-files/profile +++ b/recipes/base-files/base-files/profile @@ -2,21 +2,43 @@ # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). PATH="/usr/local/bin:/usr/bin:/bin" -EDITOR="/bin/vi" # needed for packages like cron -test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc. +EDITOR="/bin/vi" # needed for packages like cron +test -z "$TERM" && TERM="vt100" # Basic terminal capab. For screen etc. -if [ ! -e /etc/localtime -a ! -e /etc/TZ ]; then - TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html - # for an explanation of how to set this to your local timezone. - export TZ +if [ ! -e /etc/localtime ]; then + TZ="UTC" # Time Zone. Look at http://theory.uwinnipeg.ca/gnu/glibc/libc_303.html + # for an explanation of how to set this to your local timezone. + export TZ fi if [ "`id -u`" -eq 0 ]; then PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin fi + +# Codes for use in prompt + +local BOLD_GRAY="\[\033[1;30m\]" # AKA "bright black" +local LIGHT_GRAY="\[\033[0;37m\]" +local BOLD_RED="\[\033[1;31m\]" +local NO_COLOR="\[\033[0m\]" +local USER="\u" +local HOST="\h" +local CURRENT_DIR="\w" + + if [ "$PS1" ]; then # works for bash and ash (no other shells known to be in use here) - PS1='\u@\h:\w\$ ' + case "$TERM" in + xterm) # Default for Ubuntu Linux and others + PS1='$BOLD_GRAY[$USER@$BOLD_RED$HOST$BOLD_GRAY:$CURRENT_DIR]: $NO_COLOR' + ;; + xterm-color) # Default for OS X and others + PS1='$LIGHT_GRAY[$USER@$BOLD_RED$HOST$LIGHT_GRAY:$CURRENT_DIR]: $NO_COLOR' + ;; + *) + PS1='[$USER@$HOST$:$CURRENT_DIR]: ' + ;; + esac fi if [ -d /etc/profile.d ]; then @@ -28,7 +50,12 @@ if [ -d /etc/profile.d ]; then unset i fi -export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM +VIM="/usr/share/vim" -umask 022 +export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM VIM + +alias ls="ls --color=auto" +alias vi="vim" +alias w="who -a" +umask 022 diff --git a/recipes/base-files/base-files_3.0.14.bb b/recipes/base-files/base-files_3.0.14.bb index acd12a422a..ace513286d 100644 --- a/recipes/base-files/base-files_3.0.14.bb +++ b/recipes/base-files/base-files_3.0.14.bb @@ -41,7 +41,7 @@ dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \ /sys ${localstatedir}/lib/misc ${localstatedir}/spool \ ${localstatedir}/volatile ${localstatedir}/volatile/cache \ ${localstatedir}/volatile/lock/subsys \ - ${localstatedir}/volatile/log \ + ${localstatedir}/log \ ${localstatedir}/volatile/run \ /mnt /media /media/card /media/cf /media/net /media/ram \ /media/union /media/realroot /media/hdd \ @@ -54,7 +54,7 @@ dirs1777_micro = "/tmp" media = "card cf net ram" media_micro = "" -volatiles = "cache run log lock tmp" +volatiles = "cache run lock tmp" conffiles = "${sysconfdir}/debian_version ${sysconfdir}/host.conf \ ${sysconfdir}/inputrc ${sysconfdir}/issue /${sysconfdir}/issue.net \ ${sysconfdir}/nsswitch.conf ${sysconfdir}/profile \ @@ -89,7 +89,7 @@ do_install () { done if [ -n "${MACHINE}" -a "${hostname}" = "openembedded" ]; then - echo ${MACHINE} > ${D}${sysconfdir}/hostname + echo "rascal" > ${D}${sysconfdir}/hostname else echo ${hostname} > ${D}${sysconfdir}/hostname fi diff --git a/recipes/base-passwd/base-passwd_3.5.20.bb b/recipes/base-passwd/base-passwd_3.5.20.bb index 6e9c51b98f..4bdac233f1 100644 --- a/recipes/base-passwd/base-passwd_3.5.20.bb +++ b/recipes/base-passwd/base-passwd_3.5.20.bb @@ -4,7 +4,7 @@ LICENSE = "GPLv2" PR = "r1" SRC_URI = "\ - ${DEBIAN_MIRROR}/main/b/base-passwd/base-passwd_${PV}.tar.gz \ + http://rascalmicro.com/sources/base-passwd_${PV}.tar.gz \ file://nobash.patch \ file://root-home.patch \ file://mysql.patch \ diff --git a/recipes/beagleboard/beagleboard-test-scripts_git.bb b/recipes/beagleboard/beagleboard-test-scripts_git.bb index be0d059c98..bb0e6e4e5f 100644 --- a/recipes/beagleboard/beagleboard-test-scripts_git.bb +++ b/recipes/beagleboard/beagleboard-test-scripts_git.bb @@ -1,14 +1,22 @@ ## Reminder: The correct spacing for a variable is FOO = "BAR" in : PR="r1" DESCRIPTION = "BeagleBoard test scripts" HOMEPAGE = "http://beagleboad.org/support" -PR = "r2" +PR = "r4" -SRC_URI = "git://gitorious.org/beagleboard-validation/scripts.git;protocol=git \ +SRC_URI = "git://gitorious.org/~joelf/beagleboard-validation/validation-scripts.git;protocol=git \ " -SRCREV = "473dd2ab20d866be6168c9f992c2c9e74e485c9d" +SRCREV = "f7ba1b49190003af524f1a768ec887955a9994a0" S = "${WORKDIR}/git" +inherit update-rc.d +INITSCRIPT_NAME = "flash-nand-fs.sh" +INITSCRIPT_PARAMS = "start 99 2 3 4 5 ." + +do_compile() { + ${CC} -o userbutton-pressed ${CFLAGS} ${LDFLAGS} flashing/userbutton-pressed.c +} + do_install() { TEST_FILES=" \ testaudio \ @@ -28,4 +36,12 @@ do_install() { for i in ${TEST_FILES}; do install -m 0755 ${S}/${i} ${D}/${bindir} done + # A script to flash NAND if the board has it, and if there is valid image to flash on the SD Card. + # We also register it as an init script so that the SD Card auto-flashes to NAND during boot. + install -d ${D}/${sysconfdir}/init.d/ + install -m 0755 ${S}/flashing/flash-nand-fs.sh ${D}/${sysconfdir}/init.d/flash-nand-fs.sh + install -m 0755 userbutton-pressed ${D}/${bindir}/userbutton-pressed + install -d ${D}/boot/ + install -m 0755 ${S}/flashing/user.txt ${D}/boot/user.txt + install -m 0755 ${S}/flashing/uEnv.txt ${D}/boot/uEnv.txt } diff --git a/recipes/binutils/binutils-canadian-sdk_2.18.bb b/recipes/binutils/binutils-canadian-sdk_2.18.bb index 94cb61a6d3..28517ac6f4 100644 --- a/recipes/binutils/binutils-canadian-sdk_2.18.bb +++ b/recipes/binutils/binutils-canadian-sdk_2.18.bb @@ -22,6 +22,3 @@ do_install () { install -m 644 ${S}/include/ansidecl.h ${D}${includedir} install -m 644 ${S}/include/libiberty.h ${D}${includedir} } - -SRC_URI[md5sum] = "9d22ee4dafa3a194457caf4706f9cf01" -SRC_URI[sha256sum] = "487a33a452f0edcf1f8bb8fc23dff5c7a82edec3f3f8b65632b6c945e961ee9b" diff --git a/recipes/binutils/binutils-cross-sdk_2.18.bb b/recipes/binutils/binutils-cross-sdk_2.18.bb index 837ebbe5c8..2f13b264a1 100644 --- a/recipes/binutils/binutils-cross-sdk_2.18.bb +++ b/recipes/binutils/binutils-cross-sdk_2.18.bb @@ -1,6 +1,3 @@ require binutils_${PV}.bb require binutils-cross-sdk.inc PR = "${INC_PR}.1" - -SRC_URI[md5sum] = "9d22ee4dafa3a194457caf4706f9cf01" -SRC_URI[sha256sum] = "487a33a452f0edcf1f8bb8fc23dff5c7a82edec3f3f8b65632b6c945e961ee9b" diff --git a/recipes/binutils/binutils_2.18.bb b/recipes/binutils/binutils_2.18.bb index 6ba551ebf0..ea5fa93322 100644 --- a/recipes/binutils/binutils_2.18.bb +++ b/recipes/binutils/binutils_2.18.bb @@ -3,7 +3,7 @@ PR = "${INC_PR}.2" LICENSE = "GPLv3" SRC_URI = "\ - ${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \ + ${GNU_MIRROR}/binutils/binutils-${PV}a.tar.bz2 \ file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch \ file://binutils-configure-texinfo-version.patch \ file://binutils-uclibc-100-uclibc-conf.patch \ @@ -26,5 +26,5 @@ SRC_URI += "\ # ep93xx crunch patches SRC_URI_append_ep9312 = " file://binutils-crunch.patch" -SRC_URI[md5sum] = "9d22ee4dafa3a194457caf4706f9cf01" -SRC_URI[sha256sum] = "487a33a452f0edcf1f8bb8fc23dff5c7a82edec3f3f8b65632b6c945e961ee9b" +SRC_URI[md5sum] = "ccd264a5fa9ed992a21427c69cba91d3" +SRC_URI[sha256sum] = "4515254f55ec3d8c4d91e7633f3850ff28f60652b2d90dc88eef47c74c194bc9" diff --git a/recipes/blas/blas.bb b/recipes/blas/blas.bb new file mode 100644 index 0000000000..9ad3ed2509 --- /dev/null +++ b/recipes/blas/blas.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "The BLAS (Basic Linear Algebra Subprograms) are routines that provide standard building blocks for performing basic vector and matrix operations." +HOMEPAGE = "http://www.netlib.org/blas/" +SECTION = "libs" +PRIORITY = "optional" +LICENSE = "Attribution requested" +PR = "r0" + +SRC_URI = "http://www.netlib.org/blas/blas.tgz \ + " + +inherit autotools + +SRC_URI[md5sum] = "5e99e975f7a1e3ea6abcad7c6e7e42e6" +SRC_URI[sha256sum] = "ea87df6dc44829ee0a1733226d130c550b17a0bc51c8dbfcd662fb15520b23b5" diff --git a/recipes/blinkm/blinkm_0.1.bb b/recipes/blinkm/blinkm_0.1.bb new file mode 100644 index 0000000000..3cf5fcbc3d --- /dev/null +++ b/recipes/blinkm/blinkm_0.1.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Command-line tool for controlling blinkM leds over an I2C bus" +HOMEPAGE = "https://github.com/scottellis/overo-blinkm" +PRIORITY = "optional" +LICENSE = "BSD" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "71fbc4860b40548acd31008db33ff2a57d2a333a" +SRC_URI = "git://github.com/scottellis/overo-blinkm.git;protocol=git \ + file://rascal-use-i2c-bus-0.patch" + +do_compile () { + ${CC} ${LDFLAGS} -o blinkm *.c +} + +do_install () { + install -d ${D}${bindir}/ + install -m 0755 ${S}/blinkm ${D}${bindir}/ +} + +PACKAGES = "${PN}" +FILES_${PN}-dbg = "${bindir}/*" +FILES_${PN} = "${bindir}/*" +FILES_${PN} += "${sysconfdir}/*" diff --git a/recipes/blinkm/rascal-use-i2c-bus-0.patch b/recipes/blinkm/rascal-use-i2c-bus-0.patch new file mode 100644 index 0000000000..7db59c507b --- /dev/null +++ b/recipes/blinkm/rascal-use-i2c-bus-0.patch @@ -0,0 +1,13 @@ +diff --git a/i2c_functions.c b/i2c_functions.c +index 68ef17a..fe2ffff 100644 +--- a/i2c_functions.c ++++ b/i2c_functions.c +@@ -40,7 +40,7 @@ + #include + + +-static char _i2c_bus[] = "/dev/i2c-3"; ++static char _i2c_bus[] = "/dev/i2c-0"; + + + /* some local functions */ diff --git a/recipes/bluez/bluez4_4.75.bb b/recipes/bluez/bluez4_4.75.bb index 20b5a6ac81..269f7d75a0 100644 --- a/recipes/bluez/bluez4_4.75.bb +++ b/recipes/bluez/bluez4_4.75.bb @@ -4,7 +4,6 @@ SRC_URI[md5sum] = "ee95086aef5955b25f1226b9e45bd6be" SRC_URI[sha256sum] = "fd861de5c966dc563e6a1c34400bb0c0fe1277e37655ab3ce3f48356035f61b8" DEFAULT_PREFERENCE = "-1" -DEFAULT_PREFERENCE_angstrom = "1" DEPENDS += "libnl libsndfile1" diff --git a/recipes/bluez/bluez4_4.84.bb b/recipes/bluez/bluez4_4.84.bb index b964f2724e..729f38ce11 100644 --- a/recipes/bluez/bluez4_4.84.bb +++ b/recipes/bluez/bluez4_4.84.bb @@ -3,9 +3,6 @@ require bluez4.inc SRC_URI[md5sum] = "95e66f26f69aa425d27718f487b6bc74" SRC_URI[sha256sum] = "2913b0b09738295547c1bfdcca9e1da456c9ad6950cc499b1ee83b330bf8a5b6" -DEFAULT_PREFERENCE = "-1" -DEFAULT_PREFERENCE_shr = "1" - DEPENDS += "libsndfile1" PR = "${INC_PR}.0" diff --git a/recipes/boost/boost-1.45.0/no_rpath.patch b/recipes/boost/boost-1.45.0/no_rpath.patch new file mode 100644 index 0000000000..28dfcf1916 --- /dev/null +++ b/recipes/boost/boost-1.45.0/no_rpath.patch @@ -0,0 +1,42 @@ +Index: boost_1_45_0/tools/build/v2/tools/gcc.jam +=================================================================== +--- boost_1_45_0.orig/tools/build/v2/tools/gcc.jam 2011-03-01 12:58:14.260753119 +0100 ++++ boost_1_45_0/tools/build/v2/tools/gcc.jam 2011-03-01 12:59:19.683448119 +0100 +@@ -823,7 +823,7 @@ + + actions link bind LIBRARIES + { +- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) ++ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) + + } + +@@ -888,7 +888,7 @@ + # Differs from 'link' above only by -shared. + actions link.dll bind LIBRARIES + { +- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,$(RPATH) "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) ++ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" "$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" $(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) -shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) $(USER_OPTIONS) + } + + rule setup-threading ( targets * : sources * : properties * ) +Index: boost_1_45_0/tools/build/v2/tools/gcc.py +=================================================================== +--- boost_1_45_0.orig/tools/build/v2/tools/gcc.py 2011-03-01 12:59:22.784998119 +0100 ++++ boost_1_45_0/tools/build/v2/tools/gcc.py 2011-03-01 12:59:49.821843119 +0100 +@@ -586,7 +586,6 @@ + engine.register_action( + 'gcc.link', + '"$(CONFIG_COMMAND)" -L"$(LINKPATH)" ' + +- '-Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" ' + + '-Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" ' + + '$(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) ' + + '-l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) ' + +@@ -648,7 +647,6 @@ + 'gcc.link.dll', + # Differ from 'link' above only by -shared. + '"$(CONFIG_COMMAND)" -L"$(LINKPATH)" ' + +- '-Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" ' + + '"$(.IMPLIB-COMMAND)$(<[1])" -o "$(<[-1])" ' + + '$(HAVE_SONAME)-Wl,$(SONAME_OPTION)$(SPACE)-Wl,$(<[-1]:D=) ' + + '-shared $(START-GROUP) "$(>)" "$(LIBRARIES)" $(FINDLIBS-ST-PFX) ' + diff --git a/recipes/boost/boost-with-bjam.inc b/recipes/boost/boost-with-bjam.inc index ac6f485a10..68d9e748ed 100644 --- a/recipes/boost/boost-with-bjam.inc +++ b/recipes/boost/boost-with-bjam.inc @@ -10,10 +10,10 @@ DESCRIPTION = "Free peer-reviewed portable C++ source libraries" HOMEPAGE = "http://www.boost.org/" SECTION = "libs" -DEPENDS = "zlib icu" +DEPENDS = "zlib bzip2 icu" PRIORITY = "optional" LICENSE = "Boost Software License" -INC_PR = "r9" +INC_PR = "r10" BOOST_VER = "${@"_".join(bb.data.getVar("PV",d,1).split("."))}" BOOST_MAJ = "${@"_".join(bb.data.getVar("PV",d,1).split(".")[0:2])}" diff --git a/recipes/boost/boost_1.45.0.bb b/recipes/boost/boost_1.45.0.bb index 1d9373601d..fc9bcf6c4b 100644 --- a/recipes/boost/boost_1.45.0.bb +++ b/recipes/boost/boost_1.45.0.bb @@ -1,17 +1,16 @@ require boost-with-bjam.inc -PR = "${INC_PR}.2" +PR = "${INC_PR}.3" ARM_INSTRUCTION_SET = "arm" SRC_URI = " \ http://downloads.sourceforge.net/project/boost/boost/1.45.0/boost_1_45_0.tar.gz \ file://01-fix-default-python-config.patch \ + file://no_rpath.patch \ " + S = "${WORKDIR}/boost_1_45_0" SRC_URI[md5sum] = "739792c98fafb95e7a6b5da23a30062c" SRC_URI[sha256sum] = "7cd7a327ebe0f43db829eccce024b7f3b0d9d4d382422d59dc710793d55c6a12" - -DEPENDS += " icu " - diff --git a/recipes/busybox/busybox-1.13.2/udhcpc-new-nfsroot.patch b/recipes/busybox/busybox-1.13.2/udhcpc-new-nfsroot.patch new file mode 100644 index 0000000000..46aaab97be --- /dev/null +++ b/recipes/busybox/busybox-1.13.2/udhcpc-new-nfsroot.patch @@ -0,0 +1,16 @@ +diff -uNr busybox-1.13.2.orig/examples/udhcp/simple.script busybox-1.13.2/examples/udhcp/simple.script +--- busybox-1.13.2.orig/examples/udhcp/simple.script 2011-02-23 00:30:32.000000000 -0500 ++++ busybox-1.13.2/examples/udhcp/simple.script 2011-02-23 17:05:37.873381763 -0500 +@@ -10,7 +10,12 @@ + + # return 0 if root is mounted on a network filesystem + root_is_nfs() { ++ # old style mounts + grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts ++ if ! $? ; then ++ # new style mounts ++ grep -qe '^.*:.* / \(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts ++ fi + } + + case "$1" in diff --git a/recipes/busybox/busybox-1.18.3/udhcpc-new-nfsroot.patch b/recipes/busybox/busybox-1.18.3/udhcpc-new-nfsroot.patch new file mode 100644 index 0000000000..46aaab97be --- /dev/null +++ b/recipes/busybox/busybox-1.18.3/udhcpc-new-nfsroot.patch @@ -0,0 +1,16 @@ +diff -uNr busybox-1.13.2.orig/examples/udhcp/simple.script busybox-1.13.2/examples/udhcp/simple.script +--- busybox-1.13.2.orig/examples/udhcp/simple.script 2011-02-23 00:30:32.000000000 -0500 ++++ busybox-1.13.2/examples/udhcp/simple.script 2011-02-23 17:05:37.873381763 -0500 +@@ -10,7 +10,12 @@ + + # return 0 if root is mounted on a network filesystem + root_is_nfs() { ++ # old style mounts + grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts ++ if ! $? ; then ++ # new style mounts ++ grep -qe '^.*:.* / \(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts ++ fi + } + + case "$1" in diff --git a/recipes/busybox/busybox_1.13.2.bb b/recipes/busybox/busybox_1.13.2.bb index ef20c62d3b..fca3e938ae 100644 --- a/recipes/busybox/busybox_1.13.2.bb +++ b/recipes/busybox/busybox_1.13.2.bb @@ -1,5 +1,5 @@ require busybox_1.1x.inc -PR = "${INC_PR}.3" +PR = "${INC_PR}.4" SRC_URI += "\ file://busybox-1.13.2-awk.patch \ diff --git a/recipes/busybox/busybox_1.18.3.bb b/recipes/busybox/busybox_1.18.3.bb index 633b70bc73..f85de86c74 100644 --- a/recipes/busybox/busybox_1.18.3.bb +++ b/recipes/busybox/busybox_1.18.3.bb @@ -1,5 +1,5 @@ require busybox_1.1x.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" SRC_URI += " \ http://busybox.net/downloads/fixes-1.18.3/busybox-1.18.3-buildsys.patch;name=patch01 \ diff --git a/recipes/busybox/busybox_1.1x.inc b/recipes/busybox/busybox_1.1x.inc index 7623944403..aefa57fd2b 100644 --- a/recipes/busybox/busybox_1.1x.inc +++ b/recipes/busybox/busybox_1.1x.inc @@ -5,6 +5,7 @@ SRC_URI = "\ file://fdisk_nios2.patch \ file://udhcpscript.patch \ file://udhcpc-fix-nfsroot.patch \ + file://udhcpc-new-nfsroot.patch \ file://B921600.patch \ file://get_header_tar.patch \ file://busybox-appletlib-dependency.patch \ diff --git a/recipes/busybox/files/simple.script b/recipes/busybox/files/simple.script index 5cc21b9de2..92cee624fb 100644 --- a/recipes/busybox/files/simple.script +++ b/recipes/busybox/files/simple.script @@ -66,6 +66,9 @@ case "$1" in echo adding dns $i echo nameserver $i >> $RESOLV_CONF done + echo "# Google public DNS as backup" >> $RESOLV_CONF + echo nameserver 8.8.8.8 >> $RESOLV_CONF + echo nameserver 8.8.4.4 >> $RESOLV_CONF ;; esac diff --git a/recipes/busybox/files/syslog.conf b/recipes/busybox/files/syslog.conf index fc7ff8b37a..0e6bd1456e 100644 --- a/recipes/busybox/files/syslog.conf +++ b/recipes/busybox/files/syslog.conf @@ -1,8 +1,8 @@ -DESTINATION="buffer" # log destinations (buffer file remote) +DESTINATION="files" # log destinations (buffer file remote) MARKINT=20 # interval between --mark-- entries [min] REDUCE=no # reduced-size logging BUFFERSIZE=64 # buffer: size of circular buffer [kByte] -LOGFILE=/var/log/messages # file: where to log +LOGFILE=/var/log/syslog # file: where to log ROTATESIZE=32 # file: rotate log if grown beyond X [kByte] (busybox 1.2+) ROTATEGENS=1 # file: keep X generations of rotated logs (busybox 1.2+) REMOTE=loghost:514 # remote: where to log diff --git a/recipes/cacao/cacao-native_hg.bb b/recipes/cacao/cacao-native_hg.bb index 0f0df641ae..020dee39fe 100644 --- a/recipes/cacao/cacao-native_hg.bb +++ b/recipes/cacao/cacao-native_hg.bb @@ -1,9 +1,11 @@ require cacao-native.inc PV = "1.1.0+hgr${SRCPV}" -PR = "r2" +PR = "r5" -SRCREV = "1ac977fe271c" -SRC_URI = "hg://mips.complang.tuwien.ac.at/hg/;module=cacao;rev=${SRCREV}" +SRCREV = "c7bf150bfa46" +SRC_URI = "hg://mips.complang.tuwien.ac.at/hg/;module=cacao;rev=${SRCREV} \ + file://cacao-shutdownguard.patch \ + " S = "${WORKDIR}/cacao" diff --git a/recipes/cacao/files/cacao-shutdownguard.patch b/recipes/cacao/files/cacao-shutdownguard.patch new file mode 100644 index 0000000000..b0d9d9237e --- /dev/null +++ b/recipes/cacao/files/cacao-shutdownguard.patch @@ -0,0 +1,182 @@ +Index: cacao/src/threads/posix/mutex-posix.hpp +=================================================================== +--- cacao.orig/src/threads/posix/mutex-posix.hpp 2011-03-08 13:13:00.000000000 +0100 ++++ cacao/src/threads/posix/mutex-posix.hpp 2011-05-10 11:51:48.534869875 +0200 +@@ -53,6 +53,9 @@ + + inline void lock(); + inline void unlock(); ++ ++private: ++ void abort(int, const char*); + }; + + #else +@@ -66,7 +69,6 @@ + // Includes. + #include "vm/os.hpp" + +- + #ifdef __cplusplus + + /** +@@ -77,19 +79,19 @@ + int result = pthread_mutexattr_init(&_attr); + + if (result != 0) { +- os::abort_errnum(result, "Mutex::Mutex(): pthread_mutexattr_init failed"); ++ abort(result, "Mutex::Mutex(): pthread_mutexattr_init failed"); + } + + result = pthread_mutexattr_settype(&_attr, PTHREAD_MUTEX_RECURSIVE); + + if (result != 0) { +- os::abort_errnum(result, "Mutex::Mutex(): pthread_mutexattr_settype failed"); ++ abort(result, "Mutex::Mutex(): pthread_mutexattr_settype failed"); + } + + result = pthread_mutex_init(&_mutex, &_attr); + + if (result != 0) { +- os::abort_errnum(result, "Mutex::Mutex(): pthread_mutex_init failed"); ++ abort(result, "Mutex::Mutex(): pthread_mutex_init failed"); + } + } + +@@ -102,13 +104,13 @@ + int result = pthread_mutexattr_destroy(&_attr); + + if (result != 0) { +- os::abort_errnum(result, "Mutex::~Mutex(): pthread_mutexattr_destroy failed"); ++ abort(result, "Mutex::~Mutex(): pthread_mutexattr_destroy failed"); + } + + result = pthread_mutex_destroy(&_mutex); + + if (result != 0) { +- os::abort_errnum(result, "Mutex::~Mutex(): pthread_mutex_destroy failed"); ++ abort(result, "Mutex::~Mutex(): pthread_mutex_destroy failed"); + } + } + +@@ -127,7 +129,7 @@ + int result = pthread_mutex_lock(&_mutex); + + if (result != 0) { +- os::abort_errnum(result, "Mutex::lock(): pthread_mutex_lock failed"); ++ abort(result, "Mutex::lock(): pthread_mutex_lock failed"); + } + } + +@@ -141,10 +143,11 @@ + int result = pthread_mutex_unlock(&_mutex); + + if (result != 0) { +- os::abort_errnum(result, "Mutex::unlock: pthread_mutex_unlock failed"); ++ abort(result, "Mutex::unlock: pthread_mutex_unlock failed"); + } + } + ++ + #else + + // This structure must have the same layout as the class above. +Index: cacao/src/threads/posix/thread-posix.cpp +=================================================================== +--- cacao.orig/src/threads/posix/thread-posix.cpp 2011-03-17 10:41:29.000000000 +0100 ++++ cacao/src/threads/posix/thread-posix.cpp 2011-05-10 11:51:48.534869875 +0200 +@@ -74,6 +74,23 @@ + #include "vm/string.hpp" + #include "vm/vm.hpp" + ++/** ++ * Handle the case that a mutex related pthread function failed. ++ * ++ * During normal execution of the VM it will make it abort. However if the ++ * VM is in its last stages of shutting down (where nothing pthread related works ++ * anymore), it will silently end the calling thread. ++ */ ++void Mutex::abort(int errnum, const char* text) ++{ ++ if (VM::get_current()->is_shutdown()) ++ { ++ pthread_exit(NULL); ++ } ++ ++ os::abort_errnum(errnum, text); ++} ++ + #if defined(ENABLE_STATISTICS) + # include "vm/statistics.h" + #endif +Index: cacao/src/vm/vm.cpp +=================================================================== +--- cacao.orig/src/vm/vm.cpp 2011-03-17 10:41:29.000000000 +0100 ++++ cacao/src/vm/vm.cpp 2011-05-10 11:56:36.564882762 +0200 +@@ -52,6 +52,7 @@ + + #include "native/vm/nativevm.hpp" + ++#include "threads/atomic.hpp" + #include "threads/lock.hpp" + #include "threads/thread.hpp" + +@@ -1585,6 +1586,22 @@ + return true; + } + ++/** ++ * Checks whether a shutdown process has to be guarded. ++ * ++ * Returning true means the caller must not continue ++ * doing any shutdown operations. ++ */ ++bool VM::shutdown_guard() ++{ ++ return Atomic::generic_compare_and_swap(&_shuttingdown, 0, 1) == 1; ++} ++ ++bool VM::is_shutdown() ++{ ++ Atomic::generic_memory_barrier(); ++ return _shuttingdown == 1; ++} + + /* vm_run ********************************************************************** + +@@ -1865,6 +1882,13 @@ + + void vm_shutdown(s4 status) + { ++ if (VM::get_current()->shutdown_guard()) ++ { ++ /* Shutdown in progress by another thread already. ++ Silently not do it another time. */ ++ return; ++ } ++ + if (opt_verbose + #if defined(ENABLE_STATISTICS) + || opt_getcompilingtime || opt_stat +Index: cacao/src/vm/vm.hpp +=================================================================== +--- cacao.orig/src/vm/vm.hpp 2011-03-08 13:13:00.000000000 +0100 ++++ cacao/src/vm/vm.hpp 2011-05-10 11:51:48.554844342 +0200 +@@ -64,6 +64,7 @@ + bool _initializing; + bool _created; + bool _exiting; ++ uint32_t _shuttingdown; + int64_t _starttime; + int64_t _inittime; + +@@ -104,6 +105,9 @@ + int64_t get_starttime() { return _starttime; } + int64_t get_inittime() { return _inittime; } + ++ bool shutdown_guard(); ++ bool is_shutdown(); ++ + Properties& get_properties () { return _properties; } + Recompiler& get_recompiler () { return _recompiler; } // REMOVEME + #if defined(WITH_JAVA_RUNTIME_LIBRARY_OPENJDK) diff --git a/recipes/cairo/cairo.inc b/recipes/cairo/cairo.inc index c60d7d9c73..dbd970deda 100644 --- a/recipes/cairo/cairo.inc +++ b/recipes/cairo/cairo.inc @@ -6,7 +6,7 @@ LICENSE = "MPL LGPL" #check for TARGET_FPU=soft and inform configure of the result so it can disable some floating points require cairo-fpu.inc -EXTRA_OECONF += "${@get_cairo_fpu_setting(bb, d)}" +EXTRA_OECONF += "${@get_cairo_fpu_setting(bb, d)} --enable-tee" inherit autotools pkgconfig diff --git a/recipes/cairo/cairo_1.10.0.bb b/recipes/cairo/cairo_1.10.0.bb index 58e248190c..e6836a1b2a 100644 --- a/recipes/cairo/cairo_1.10.0.bb +++ b/recipes/cairo/cairo_1.10.0.bb @@ -1,6 +1,6 @@ require cairo.inc -PR = "r1" +PR = "r2" SRC_URI = "http://cairographics.org/releases/cairo-${PV}.tar.gz;name=cairo \ " diff --git a/recipes/classpath/inetlib-1.1.1/datadir_java.patch b/recipes/classpathx/inetlib-1.1.1/datadir_java.patch similarity index 100% rename from recipes/classpath/inetlib-1.1.1/datadir_java.patch rename to recipes/classpathx/inetlib-1.1.1/datadir_java.patch diff --git a/recipes/classpath/inetlib_1.1.1.bb b/recipes/classpathx/inetlib_1.1.1.bb similarity index 100% rename from recipes/classpath/inetlib_1.1.1.bb rename to recipes/classpathx/inetlib_1.1.1.bb diff --git a/recipes/clutter/clutter.inc b/recipes/clutter/clutter.inc index 7f3324bfde..b5f630e60b 100644 --- a/recipes/clutter/clutter.inc +++ b/recipes/clutter/clutter.inc @@ -41,6 +41,11 @@ EXTRA_OECONF_mx31ads = "${BASE_CONF} --with-flavour=eglnative" PACKAGE_ARCH_mx31ads = "${MACHINE_ARCH}" LDFLAGS_append_mx31ads = " -lpvrNULLWSEGL -lstdc++ " +DEPENDS_pcm043 = "${STDDEPENDS} libgles-mx31 tslib" +EXTRA_OECONF_pcm043 = "${BASE_CONF} --with-flavour=eglnative" +PACKAGE_ARCH_pcm043 = "${MACHINE_ARCH}" +LDFLAGS_append_pcm043 = " -lpvrNULLWSEGL -lstdc++ " + INC_PR = "r3" inherit autotools pkgconfig gtk-doc diff --git a/recipes/cmake/cmake_2.8.3.bb b/recipes/cmake/cmake_2.8.3.bb index cb5f7f71c9..0c8cb6de30 100644 --- a/recipes/cmake/cmake_2.8.3.bb +++ b/recipes/cmake/cmake_2.8.3.bb @@ -1,10 +1,10 @@ require cmake.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" inherit cmake -DEPENDS += "curl expat zlib" +DEPENDS += "curl expat zlib libarchive" SRC_URI[md5sum] = "a76a44b93acf5e3badda9de111385921" SRC_URI[sha256sum] = "689ed02786b5cefa5515c7716784ee82a82e8ece6be5a3d629ac3cc0c05fc288" diff --git a/recipes/connman/connman.inc b/recipes/connman/connman.inc index e25d64a98d..7306b1b805 100644 --- a/recipes/connman/connman.inc +++ b/recipes/connman/connman.inc @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.moblin.org/projects/projects_connman.php" SECTION = "libs/network" LICENSE = "GPL" # we need to define the depends here, the dynamic stuff is too late -DEPENDS = "libnl2 wpa-supplicant dbus glib-2.0 ppp busybox dhclient resolvconf bluez4" +DEPENDS = "libnl wpa-supplicant dbus glib-2.0 ppp busybox dhclient resolvconf bluez4" EXTRA_OECONF += "\ ac_cv_path_WPASUPPLICANT=/usr/sbin/wpa_supplicant \ diff --git a/recipes/connman/connman_0.46.bb b/recipes/connman/connman_0.46.bb index a7bf286720..1f1df9cba2 100644 --- a/recipes/connman/connman_0.46.bb +++ b/recipes/connman/connman_0.46.bb @@ -1,5 +1,5 @@ require connman.inc -PR = "r5" +PR = "r6" EXTRA_OECONF += "\ --disable-gtk-doc \ diff --git a/recipes/connman/connman_0.51.bb b/recipes/connman/connman_0.51.bb index f1c50038b8..036a710939 100644 --- a/recipes/connman/connman_0.51.bb +++ b/recipes/connman/connman_0.51.bb @@ -1,5 +1,5 @@ require connman.inc -PR = "r1" +PR = "r2" EXTRA_OECONF += "\ --disable-gtk-doc \ diff --git a/recipes/connman/connman_0.65.bb b/recipes/connman/connman_0.65.bb index 78e42875d8..880d775f3e 100644 --- a/recipes/connman/connman_0.65.bb +++ b/recipes/connman/connman_0.65.bb @@ -1,7 +1,7 @@ require connman.inc # connman requires libXtables now DEPENDS += "iptables" -PR = "r0" +PR = "r1" EXTRA_OECONF += "\ --disable-gtk-doc \ diff --git a/recipes/connman/connman_0.68.bb b/recipes/connman/connman_0.68.bb index ead215d315..093a5a5f5b 100644 --- a/recipes/connman/connman_0.68.bb +++ b/recipes/connman/connman_0.68.bb @@ -1,7 +1,7 @@ require connman.inc # connman requires libXtables now DEPENDS += "iptables" -PR = "r1" +PR = "r2" EXTRA_OECONF += "\ --disable-gtk-doc \ diff --git a/recipes/connman/connman_git.bb b/recipes/connman/connman_git.bb index 39ffac652b..283eb6befd 100644 --- a/recipes/connman/connman_git.bb +++ b/recipes/connman/connman_git.bb @@ -27,7 +27,7 @@ require connman.inc SRCREV = "1a94db417ecaba20a609ff4b4431a3f67c5dcbc6" PV = "0.42+git" -PR = "r2" +PR = "r3" PR_append = ".gitr${SRCREV}" DEFAULT_PREFERENCE = "-1" diff --git a/recipes/crda/crda_1.1.1.bb b/recipes/crda/crda_1.1.1.bb index cc19b908f8..9d33b5156b 100644 --- a/recipes/crda/crda_1.1.1.bb +++ b/recipes/crda/crda_1.1.1.bb @@ -3,15 +3,18 @@ HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA" SECTION = "base" PRIORITY = "optional" LICENSE = "ISC" -PR = "r1" +PR = "r3" DEPENDS = "libgcrypt libnl python-native python-m2crypto-native" RDEPENDS_${PN} = "udev" SRC_URI = "http://wireless.kernel.org/download/crda/${P}.tar.bz2;name=crda \ - http://wireless.kernel.org/download/wireless-regdb/regulatory.bins/2009.11.25-regulatory.bin;name=reg \ + http://wireless.kernel.org/download/wireless-regdb/regulatory.bins/2011.04.28-regulatory.bin;name=reg \ " +CFLAGS += " -DCONFIG_LIBNL20" + +EXTRA_OEMAKE = "MAKEFLAGS=" do_compile() { oe_runmake all_noverify } @@ -19,13 +22,13 @@ do_compile() { do_install() { oe_runmake DESTDIR=${D} install install -d ${D}/usr/lib/crda/ - install -m 0644 ${WORKDIR}/2009.11.25-regulatory.bin ${D}/usr/lib/crda/regulatory.bin + install -m 0644 ${WORKDIR}/2011.04.28-regulatory.bin ${D}/usr/lib/crda/regulatory.bin } SRC_URI[crda.md5sum] = "5fc77af68b3e21736b8ef2f8b061c810" SRC_URI[crda.sha256sum] = "59b4760da44a8f803caeaaa7fb97e0c6bd3f35f40445b28258e7f14c2fbe13b5" -SRC_URI[reg.md5sum] = "873b5c55a26c8ba7674e083f51cb10aa" -SRC_URI[reg.sha256sum] = "3ac77fa4d8034e4f5bc484adc4b073c3636dea26803e5e695cc54c15b629154a" +SRC_URI[reg.md5sum] = "1535e98bcaba732e2f8e8f62dac6f369" +SRC_URI[reg.sha256sum] = "bb6ba6f5dcdf7106a19c588b0e4d43ab7af26f6474fe01011a318b3dceaba33b" FILES_${PN} += "\ /lib/udev/rules.d/85-regulatory.rules \ diff --git a/recipes/curl/curl-common.inc b/recipes/curl/curl-common.inc index ddaebb8672..f18f23162c 100644 --- a/recipes/curl/curl-common.inc +++ b/recipes/curl/curl-common.inc @@ -6,7 +6,9 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2;name=tarball \ file://pkgconfig_fix.patch" S = "${WORKDIR}/curl-${PV}" -INC_PR = "r4" +INC_PR = "r5" + +BBCLASSEXTEND = "native nativesdk sdk" CURL_FEATURES = ${@['zlib,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp','zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp']["${BPN}" == "${PN}"]} # other allowed features: ipv6, ares, openssl @@ -19,6 +21,10 @@ EXTRA_OECONF = " \ --without-libidn \ " +EXTRA_OECONF_append_virtclass-native = " --disable-ldap --disable-ldaps" +EXTRA_OECONF_append_virtclass-nativesdk = " --disable-ldap --disable-ldaps" +EXTRA_OECONF_append_virtclass-sdk = " --disable-ldap --disable-ldaps" + python __anonymous() { f = bb.data.getVar("CURL_FEATURES", d, True).split(",") oeconf = bb.data.getVar("EXTRA_OECONF", d, False) diff --git a/recipes/curl/curl_7.21.1.bb b/recipes/curl/curl_7.21.1.bb index 5df4d6b9ac..0fac7723cf 100644 --- a/recipes/curl/curl_7.21.1.bb +++ b/recipes/curl/curl_7.21.1.bb @@ -6,6 +6,5 @@ PR = "${INC_PR}.1" SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ file://off_t_abi_fix.patch;striplevel=0" -BBCLASSEXTEND = "native nativesdk sdk" SRC_URI[md5sum] = "eafde5b933bce1c1dca82d1054c8d967" SRC_URI[sha256sum] = "653b3214005c778a8c642af4e5dea46c74f7bf51017a568bb8725ea9eda73643" diff --git a/recipes/curl/curl_7.21.2.bb b/recipes/curl/curl_7.21.2.bb index 8402e31fe5..d7d865dc80 100644 --- a/recipes/curl/curl_7.21.2.bb +++ b/recipes/curl/curl_7.21.2.bb @@ -6,6 +6,5 @@ PR = "${INC_PR}.0" SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \ file://off_t_abi_fix.patch;striplevel=0" -BBCLASSEXTEND = "native nativesdk sdk" SRC_URI[md5sum] = "ca96df88e044c7c25d19692ec8b250b2" SRC_URI[sha256sum] = "f4a632e704f28767e6bbffcc6112db0590b1c9d50d8226d706ad39632355bf21" diff --git a/recipes/db/db-5.1.19/arm-thumb-mutex_db5.patch b/recipes/db/db-5.1.19/arm-thumb-mutex_db5.patch index 37d0d93abd..51d485499e 100644 --- a/recipes/db/db-5.1.19/arm-thumb-mutex_db5.patch +++ b/recipes/db/db-5.1.19/arm-thumb-mutex_db5.patch @@ -1,5 +1,5 @@ ---- db-5.1.19/../src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600 -+++ db-5.1.19/../src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600 +--- db-5.1.19/src/dbinc/mutex_int.h.orig 2011-01-05 19:21:42.181805366 -0600 ++++ db-5.1.19/src/dbinc/mutex_int.h 2011-01-05 19:24:53.141853117 -0600 @@ -474,6 +474,25 @@ #ifdef LOAD_ACTUAL_MUTEX_CODE diff --git a/recipes/db/db_5.1.19.bb b/recipes/db/db_5.1.19.bb index c44b958f75..740db92271 100644 --- a/recipes/db/db_5.1.19.bb +++ b/recipes/db/db_5.1.19.bb @@ -14,10 +14,10 @@ HOMEPAGE = "http://www.oracle.com/technology/products/berkeley-db/db/index.html" LICENSE = "BSD Sleepycat" VIRTUAL_NAME ?= "virtual/db" CONFLICTS = "db3" -PR = "r1" +PR = "r2" SRC_URI = "http://download.oracle.com/berkeley-db/db-${PV}.tar.gz" -SRC_URI += "file://arm-thumb-mutex_db5.patch" +SRC_URI += "file://arm-thumb-mutex_db5.patch;patchdir=.." SRC_URI[md5sum] = "76fcbfeebfcd09ba0b4d96bfdf8d884d" SRC_URI[sha256sum] = "0194d4ca9266ba1a1c0bfbc233b18bfd05f63163453c81ebcdfdc7112d5ac850" diff --git a/recipes/dbus/dbus.inc b/recipes/dbus/dbus.inc index 86dc62b945..7360c37fcf 100644 --- a/recipes/dbus/dbus.inc +++ b/recipes/dbus/dbus.inc @@ -2,7 +2,7 @@ DESCRIPTION = "A message bus system for inter-process communication" HOMEPAGE = "http://dbus.freedesktop.org" SECTION = "base" LICENSE = "GPLv2+ AFLv2.1" -DEPENDS = "expat glib-2.0 virtual/libintl libsm libice virtual/libx11" +DEPENDS = "expat glib-2.0 virtual/libintl" INC_PR = "r20" @@ -19,7 +19,7 @@ S = "${WORKDIR}/dbus-${PV}" inherit autotools pkgconfig update-rc.d gettext -EXTRA_OECONF_X = "--with-x" +EXTRA_OECONF_X = "--without-x" EXTRA_OECONF = "\ --disable-qt \ diff --git a/recipes/detect-stylus/detect-stylus-0.13/correct-theme-name.patch b/recipes/detect-stylus/detect-stylus-0.13/correct-theme-name.patch index 7c8213da1f..6d8a918e2c 100644 --- a/recipes/detect-stylus/detect-stylus-0.13/correct-theme-name.patch +++ b/recipes/detect-stylus/detect-stylus-0.13/correct-theme-name.patch @@ -1,5 +1,5 @@ -diff -urNd ../detect-stylus-0.13-r1/detect-stylus-0.13/detect-stylus.c detect-stylus-0.13/detect-stylus.c ---- ../detect-stylus-0.13-r1/detect-stylus-0.13/detect-stylus.c 2004-09-08 16:56:58.000000000 +0100 +diff -urNd detect-stylus-0.13/detect-stylus.c detect-stylus-0.13/detect-stylus.c +--- detect-stylus-0.13/detect-stylus.c 2004-09-08 16:56:58.000000000 +0100 +++ detect-stylus-0.13/detect-stylus.c 2004-09-13 21:36:03.000000000 +0100 @@ -132,9 +132,9 @@ diff --git a/recipes/detect-stylus/detect-stylus-0.13/extra-device-check.patch b/recipes/detect-stylus/detect-stylus-0.13/extra-device-check.patch index 94542b11aa..06c0a1a5ee 100644 --- a/recipes/detect-stylus/detect-stylus-0.13/extra-device-check.patch +++ b/recipes/detect-stylus/detect-stylus-0.13/extra-device-check.patch @@ -1,5 +1,5 @@ -diff -urNd ../detect-stylus-0.13-r1/detect-stylus-0.13/detect-stylus.c detect-stylus-0.13/detect-stylus.c ---- ../detect-stylus-0.13-r1/detect-stylus-0.13/detect-stylus.c 2004-09-08 16:56:58.000000000 +0100 +diff -urNd detect-stylus-0.13/detect-stylus.c detect-stylus-0.13/detect-stylus.c +--- detect-stylus-0.13/detect-stylus.c 2004-09-08 16:56:58.000000000 +0100 +++ detect-stylus-0.13/detect-stylus.c 2004-09-18 23:43:12.000000000 +0100 @@ -62,6 +62,9 @@ if (fd < 0) diff --git a/recipes/dillo/dillo2-0.6.6/fix_about_syntax.patch b/recipes/dillo/dillo2-0.6.6/fix_about_syntax.patch index 06b4d09614..adabc4afdf 100644 --- a/recipes/dillo/dillo2-0.6.6/fix_about_syntax.patch +++ b/recipes/dillo/dillo2-0.6.6/fix_about_syntax.patch @@ -1,5 +1,5 @@ -diff -urNd ../dillo2-0.6.6-r0/dillo2-0.6.6/src/IO/about.c dillo2-0.6.6/src/IO/about.c ---- ../dillo2-0.6.6-r0/dillo2-0.6.6/src/IO/about.c 2003-04-21 19:36:31.000000000 +0100 +diff -urNd dillo2-0.6.6/src/IO/about.c dillo2-0.6.6/src/IO/about.c +--- dillo2-0.6.6/src/IO/about.c 2003-04-21 19:36:31.000000000 +0100 +++ dillo2-0.6.6/src/IO/about.c 2004-09-11 10:58:48.000000000 +0100 @@ -28,88 +28,88 @@ * HTML text for startup screen diff --git a/recipes/e17/elfe_svn.bb b/recipes/e17/elfe_svn.bb index 8588ec34b6..af0ed7c6d9 100644 --- a/recipes/e17/elfe_svn.bb +++ b/recipes/e17/elfe_svn.bb @@ -8,5 +8,5 @@ DEPENDS += "elementary" # Elfe is part of the enlightenment svn repository since this SRC_REV. As EFL_SRCREV is # currently much older we need to sync it when EFL_SRCREV will change. -SRCREV = "57260" +SRCREV = "57458" diff --git a/recipes/ecj/ecj-bootstrap-native.bb b/recipes/ecj/ecj-bootstrap-native.bb index 594b08cb9c..a11ba74baf 100644 --- a/recipes/ecj/ecj-bootstrap-native.bb +++ b/recipes/ecj/ecj-bootstrap-native.bb @@ -17,7 +17,7 @@ SRC_URI = "file://ecj.in" S = "${WORKDIR}" -PR = "r2" +PR = "r4" JAR = "ecj-bootstrap.jar" diff --git a/recipes/ecj/ecj-initial.bb b/recipes/ecj/ecj-initial.bb index 8ddbc7ccf6..1809cd6904 100644 --- a/recipes/ecj/ecj-initial.bb +++ b/recipes/ecj/ecj-initial.bb @@ -9,9 +9,9 @@ LICENSE = "EPL" DEPENDS = "libecj-bootstrap" -PR = "r1" +PR = "r2" -SRC_URI = "file://ecj.in" +SRC_URI = "file://ecj-initial.in" NATIVE_INSTALL_WORKS = "1" @@ -26,7 +26,7 @@ do_compile() { echo "#!/bin/sh" > ecj-initial echo "ECJ_JAR=${STAGING_DATADIR}/java/${JAR}" >> ecj-initial echo "RUNTIME=java-initial" >> ecj-initial - cat ecj.in >> ecj-initial + cat ecj-initial.in >> ecj-initial } do_install() { diff --git a/recipes/ecj/files/ecj-initial.in b/recipes/ecj/files/ecj-initial.in new file mode 100755 index 0000000000..2099991cef --- /dev/null +++ b/recipes/ecj/files/ecj-initial.in @@ -0,0 +1 @@ +${RUNTIME} -Xmx512m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"} diff --git a/recipes/ecj/files/ecj.in b/recipes/ecj/files/ecj.in index 2099991cef..f8d97ac124 100755 --- a/recipes/ecj/files/ecj.in +++ b/recipes/ecj/files/ecj.in @@ -1 +1,16 @@ -${RUNTIME} -Xmx512m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"} +COUNT=5 +END=0 +RETURNCODE=0 + +while test "${COUNT}" -gt "${END}" +do + ${RUNTIME} -Xmx1024m -cp ${ECJ_JAR} org.eclipse.jdt.internal.compiler.batch.Main ${1+"$@"} + RETURNCODE=${?} + if test "${?}" -eq "${END}" + then + break + fi + COUNT=$(($COUNT-1)) +done + +exit ${RETURNCODE} diff --git a/recipes/efl1/efreet/changeset_trunk_r57435.patch b/recipes/efl1/efreet/changeset_trunk_r57435.patch new file mode 100644 index 0000000000..58692758f9 --- /dev/null +++ b/recipes/efl1/efreet/changeset_trunk_r57435.patch @@ -0,0 +1,11 @@ +Index: efreet/src/lib/efreet_desktop.c +=================================================================== +--- efreet/src/lib/efreet_desktop.c (revision 57257) ++++ efreet/src/lib/efreet_desktop.c (revision 57435) +@@ -1206,5 +1206,5 @@ + case ECORE_FILE_EVENT_MODIFIED: + ext = strrchr(path, '.'); +- if (!strcmp(ext, ".desktop") || !strcmp(ext, ".directory")) ++ if (ext && (!strcmp(ext, ".desktop") || !strcmp(ext, ".directory"))) + efreet_cache_desktop_update(); + break; diff --git a/recipes/efl1/efreet_1.0.0.bb b/recipes/efl1/efreet_1.0.0.bb index dd50c62e23..d2d7f2fd86 100644 --- a/recipes/efl1/efreet_1.0.0.bb +++ b/recipes/efl1/efreet_1.0.0.bb @@ -1,9 +1,10 @@ require efreet.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" SRC_URI = "\ ${E_MIRROR}/${SRCNAME}-${PV}.tar.gz \ + file://changeset_trunk_r57435.patch \ " SRC_URI[md5sum] = "ce7dd05138335312c7eb9ac8e5e62467" diff --git a/recipes/eglibc/eglibc-options.inc b/recipes/eglibc/eglibc-options.inc index 0af0aab0a4..c3ba5e3a91 100644 --- a/recipes/eglibc/eglibc-options.inc +++ b/recipes/eglibc/eglibc-options.inc @@ -4,7 +4,11 @@ def eglibc_cfg(feature, features, tokens, cnf ): if type(features) == type([]) and feature in features: cnf.extend([token + ' = y' for token in tokens]) else: - cnf.extend([token + ' = n' for token in tokens]) + for token in tokens: + cnf.extend([token + ' = n']) + if token == 'OPTION_EGLIBC_NSSWITCH': + cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_CONFIG = ${S}/nss/nsswitch.conf"]) + cnf.extend(["OPTION_EGLIBC_NSSWITCH_FIXED_FUNCTIONS = ${S}/nss/fixed-nsswitch.functions"]) # Map distro features to eglibc options settings def features_to_eglibc_settings(d): diff --git a/recipes/eglibc/eglibc.inc b/recipes/eglibc/eglibc.inc index f0cfca8769..23c3763339 100644 --- a/recipes/eglibc/eglibc.inc +++ b/recipes/eglibc/eglibc.inc @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.eglibc.org/home" SECTION = "libs" PRIORITY = "required" LICENSE = "LGPL" -INC_PR = "r21" +INC_PR = "r22" # nptl needs unwind support in gcc, which can't be built without glibc. DEPENDS = "virtual/${TARGET_PREFIX}gcc-intermediate linux-libc-headers" #this leads to circular deps, so lets not add it yet @@ -42,7 +42,7 @@ do_move_ports() { mv ${WORKDIR}/${EGLIBC_BRANCH}/ports ${S}/ fi } -OE_FEATURES := "${@features_to_eglibc_settings(d)}" +OE_FEATURES = "${@features_to_eglibc_settings(d)}" do_configure_prepend() { echo '${OE_FEATURES}' > ${B}/option-groups.config } diff --git a/recipes/evopedia/evopedia_git.bb b/recipes/evopedia/evopedia_git.bb index e939c03b74..0d833e7c41 100644 --- a/recipes/evopedia/evopedia_git.bb +++ b/recipes/evopedia/evopedia_git.bb @@ -7,6 +7,7 @@ RRECOMMENDS_${PN} = "midori" RRECOMMENDS_${PN}_shr = "eve" PV = "0.4.2+gitr${SRCPV}" +PR = "r1" SRC_URI = "git://gitorious.org/evopedia/evopedia.git;protocol=git;branch=master" diff --git a/recipes/fakeroot/fakeroot.inc b/recipes/fakeroot/fakeroot.inc index af71e24e2f..86002b973b 100644 --- a/recipes/fakeroot/fakeroot.inc +++ b/recipes/fakeroot/fakeroot.inc @@ -14,3 +14,4 @@ SRC_URI = "\ # fakeroot needs getopt which is provided by the util-linux package RDEPENDS_${PN} = "util-linux" +RDEPENDS_${PN}_virtclass-native = "util-linux-native" diff --git a/recipes/fakeroot/fakeroot_1.14.5.bb b/recipes/fakeroot/fakeroot_1.14.5.bb index ff6844df6b..1d333d2580 100644 --- a/recipes/fakeroot/fakeroot_1.14.5.bb +++ b/recipes/fakeroot/fakeroot_1.14.5.bb @@ -1,8 +1,9 @@ require fakeroot.inc +PE = "1" PR = "${INC_PR}.0" SRC_URI =+ "\ - ${DEBIAN_MIRROR}/main/f/fakeroot/fakeroot_${PV}.orig.tar.bz2 \ + http://snapshot.debian.org/archive/debian/20110301/pool/main/f/fakeroot/fakeroot_1.14.5.orig.tar.bz2 \ file://quiet-getopt-check.patch \ " diff --git a/recipes/fbv/fbv-1.0b/cflags.patch b/recipes/fbv/fbv-1.0b/cflags.patch new file mode 100644 index 0000000000..1259c6b511 --- /dev/null +++ b/recipes/fbv/fbv-1.0b/cflags.patch @@ -0,0 +1,13 @@ +Index: fbv-1.0b/Makefile +=================================================================== +--- fbv-1.0b.orig/Makefile 2011-02-26 21:50:39.786273304 +0100 ++++ fbv-1.0b/Makefile 2011-02-26 21:53:44.051693304 +0100 +@@ -6,7 +6,7 @@ + include Make.conf + + CC = gcc +-CFLAGS = -O2 -Wall -D_GNU_SOURCE ++CFLAGS += -D_GNU_SOURCE + + SOURCES = main.c jpeg.c gif.c png.c bmp.c fb_display.c transforms.c + OBJECTS = ${SOURCES:.c=.o} diff --git a/recipes/fbv/fbv-1.0b/fbv-1.0b.patch b/recipes/fbv/fbv-1.0b/fbv-1.0b.patch deleted file mode 100644 index 2ca9d522b9..0000000000 --- a/recipes/fbv/fbv-1.0b/fbv-1.0b.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -urN fbv-1.0b-0rig/Makefile fbv-1.0b/Makefile ---- fbv-1.0b-0rig/Makefile 2009-08-20 00:33:58.000000000 +0200 -+++ fbv-1.0b/Makefile 2009-08-20 00:34:16.000000000 +0200 -@@ -12,7 +12,7 @@ - OBJECTS = ${SOURCES:.c=.o} - - OUT = fbv --#LIBS = -lungif -L/usr/X11R6/lib -ljpeg -lpng -+LIBS = -L/usr/lib -ljpeg -lpng #-lungif - - all: $(OUT) - @echo Build DONE. diff --git a/recipes/fbv/fbv-1.0b/libs.patch b/recipes/fbv/fbv-1.0b/libs.patch new file mode 100644 index 0000000000..47f5d918ed --- /dev/null +++ b/recipes/fbv/fbv-1.0b/libs.patch @@ -0,0 +1,13 @@ +Index: fbv-1.0b/Makefile +=================================================================== +--- fbv-1.0b.orig/Makefile 2004-09-07 14:34:29.000000000 +0200 ++++ fbv-1.0b/Makefile 2011-02-26 22:11:03.217683306 +0100 +@@ -12,7 +12,7 @@ + OBJECTS = ${SOURCES:.c=.o} + + OUT = fbv +-#LIBS = -lungif -L/usr/X11R6/lib -ljpeg -lpng ++#LIBS = -lungif -ljpeg -lpng + + all: $(OUT) + @echo Build DONE. diff --git a/recipes/fbv/fbv_1.0b.bb b/recipes/fbv/fbv_1.0b.bb index 3629fe4d93..d8ca180642 100644 --- a/recipes/fbv/fbv_1.0b.bb +++ b/recipes/fbv/fbv_1.0b.bb @@ -1,21 +1,23 @@ DESCRIPTION = "Frame Buffer Viewer" LICENSE = "GPL" -DEPENDS = "libpng jpeg" -PR = "r3" +DEPENDS = "libpng jpeg libungif" +PR = "r4" SRC_URI = "http://s-tech.elsat.net.pl/fbv/fbv-1.0b.tar.gz \ file://cross_compile.patch \ - file://fbv-1.0b.patch \ file://fbv-1.0b-BGR666.patch \ + file://libs.patch \ + file://cflags.patch \ " +CFLAGS += "-D_GNU_SOURCE -D__KERNEL_STRICT_NAMES" + do_configure() { - CC="${CC}" ./configure --without-libungif + CC="${CC}" ./configure } do_compile() { - oe_runmake CC="${CC}" \ - CFLAGS="-O2 -Wall -D_GNU_SOURCE -D__KERNEL_STRICT_NAMES" + oe_runmake CC="${CC}" } do_install() { diff --git a/recipes/ffmpeg/ffmpeg_0.5.bb b/recipes/ffmpeg/ffmpeg_0.5.bb index f3a6d219ca..623c369a6d 100644 --- a/recipes/ffmpeg/ffmpeg_0.5.bb +++ b/recipes/ffmpeg/ffmpeg_0.5.bb @@ -2,7 +2,7 @@ require ffmpeg.inc DEPENDS += "schroedinger libgsm" -PR = "${INC_PR}.1" +PR = "${INC_PR}.2" DEFAULT_PREFERENCE = "1" @@ -47,6 +47,7 @@ EXTRA_OECONF = " \ --enable-cross-compile \ --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ --extra-ldflags="${TARGET_LDFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ + --sysroot="${STAGING_DIR_TARGET}" \ --enable-hardcoded-tables \ ${EXTRA_FFCONF} \ " diff --git a/recipes/ffmpeg/ffmpeg_0.6.1.bb b/recipes/ffmpeg/ffmpeg_0.6.1.bb index fb941a5262..74a1161df4 100644 --- a/recipes/ffmpeg/ffmpeg_0.6.1.bb +++ b/recipes/ffmpeg/ffmpeg_0.6.1.bb @@ -2,7 +2,7 @@ require ffmpeg.inc LICENSE = "LGPLv2.1+" DEPENDS += "schroedinger libgsm" -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" SRC_URI = "http://ffmpeg.org/releases/ffmpeg-${PV}.tar.bz2" SRC_URI[md5sum] = "4f5d732d25eedfb072251b5314ba2093" @@ -26,6 +26,7 @@ EXTRA_OECONF = " \ --enable-swscale \ --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ --extra-ldflags="${TARGET_LDFLAGS}" \ + --sysroot="${STAGING_DIR_TARGET}" \ --prefix=${prefix}/ \ --target-os=linux \ ${EXTRA_FFCONF} \ diff --git a/recipes/ffmpeg/ffmpeg_git.bb b/recipes/ffmpeg/ffmpeg_git.bb index 27e88ea7b2..57b2c31fad 100644 --- a/recipes/ffmpeg/ffmpeg_git.bb +++ b/recipes/ffmpeg/ffmpeg_git.bb @@ -3,16 +3,16 @@ require ffmpeg.inc DEPENDS += "virtual/libsdl schroedinger libgsm libvpx" # When bumping SRCREV make sure you bump PR here and in dependant recipes (gst-ffmpeg, gnash, omxil, etc) to account for SOVERSION changes -SRCREV = "a4f5af13fb00d7f55946470bb0f52e1dbf5f3c6a" +SRCREV = "0b32da90f893b3e04ead18a546252e241a6a0988" PV = "0.6.1+${PR}+gitr${SRCPV}" -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" DEFAULT_PREFERENCE = "-1" DEFAULT_PREFERENCE_angstrom = "1" DEFAULT_PREFERENCE_shr = "1" -SRC_URI = "git://git.ffmpeg.org/ffmpeg.git;protocol=git" +SRC_URI = "git://git.libav.org/libav.git;protocol=git" S = "${WORKDIR}/git" B = "${S}/build.${HOST_SYS}.${TARGET_SYS}" @@ -47,6 +47,7 @@ EXTRA_OECONF = " \ --enable-cross-compile \ --extra-cflags="${TARGET_CFLAGS} ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" \ --extra-ldflags="${TARGET_LDFLAGS}" \ + --sysroot="${STAGING_DIR_TARGET}" \ --enable-hardcoded-tables \ ${EXTRA_FFCONF} \ " diff --git a/recipes/ffmpeg/files/omapfbplay-errorhandling.patch b/recipes/ffmpeg/files/omapfbplay-errorhandling.patch new file mode 100644 index 0000000000..46f2f90812 --- /dev/null +++ b/recipes/ffmpeg/files/omapfbplay-errorhandling.patch @@ -0,0 +1,34 @@ +From e321ae7df57ada9ecc8c155fa4e5511c96ef5db3 Mon Sep 17 00:00:00 2001 +From: Rob Clark +Date: Fri, 18 Mar 2011 12:40:51 -0500 +Subject: [PATCH] dce: differntiate between fatal and non-fatal errors + +For streams with errors, the codec will throw back an error.. but not +all errors are fatal. +--- + dce.c | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/dce.c b/dce.c +index ab7ad0a..88f175e 100644 +--- a/dce.c ++++ b/dce.c +@@ -270,8 +270,14 @@ static int dce_decode(AVPacket *p) + + err = VIDDEC3_process(codec, inbufs, outbufs, in_args, out_args); + if (err) { +- fprintf(stderr, "VIDDEC3_process() error %d\n", err); +- return -1; ++ fprintf(stderr, "VIDDEC3_process() error %d %08x\n", err, ++ out_args->extendedError); ++ /* for non-fatal errors, keep going.. a non-fatal error could ++ * just indicate an error in the input stream which the codec ++ * was able to conceal ++ */ ++ if (XDM_ISFATALERROR(out_args->extendedError)) ++ return -1; + } + + for (i = 0; i < out_args->outputID[i]; i++) { +-- +1.7.1 diff --git a/recipes/ffmpeg/omapfbplay.inc b/recipes/ffmpeg/omapfbplay.inc index c301d1dce3..de5b2a893e 100644 --- a/recipes/ffmpeg/omapfbplay.inc +++ b/recipes/ffmpeg/omapfbplay.inc @@ -2,16 +2,14 @@ DESCRIPTION = "Simple ffmpeg-based player that uses the omapfb overlays" DEPENDS = "bzip2 lame ffmpeg virtual/kernel" LICENSE = "MIT" -PR = "r28" +PR = "r30" PV = "0.0+${PR}+gitr${SRCREV}" -SRCREV = "1d217676ba71e8740524e9814c47da39880ed3bc" +SRCREV = "34293052c5a2ae328eac6903512e6b4ce19b5639" SRC_URI = "git://git.mansr.com/omapfbplay;protocol=git \ - file://0001-Remove-pointless-function-frame_format.patch \ - file://0002-avcodec-fix-frame-size-calculation.patch \ - file://0003-Print-allocated-and-displayed-frame-size.patch \ -" + file://omapfbplay-errorhandling.patch \ + " S = "${WORKDIR}/git" diff --git a/recipes/ffphonelog/ffphonelog_git.bb b/recipes/ffphonelog/ffphonelog_git.bb index 7978cc2f58..0aee94cbe8 100644 --- a/recipes/ffphonelog/ffphonelog_git.bb +++ b/recipes/ffphonelog/ffphonelog_git.bb @@ -11,13 +11,20 @@ PR = "r1" SRC_URI = "git://git.shr-project.org/repo/ffphonelog.git;protocol=http;branch=master" -SRCREV = "f257edad1b046d5efcc83f80c1bef314773c2bc2" +SRCREV = "9f7b682c4be9c0f23908dc888462399d939ffa11" S = "${WORKDIR}/git" FILES_${PN} += "${datadir}/applications ${datadir}/pixmaps" +EXTRA_OEMAKE = " \ + CC='${CC}' \ + CFLAGS_APPEND='${CFLAGS}' \ + LDFLAGS_APPEND='${LDFLAGS}' \ + DESTDIR='${D}' \ + PREFIX=/usr" + do_install() { - oe_runmake install DESTDIR=${D} + oe_runmake install } MAINTAINER = "Lukasz Pankowski " diff --git a/recipes/flex/flex.inc b/recipes/flex/flex.inc index e35d594a9b..7ca229fa3b 100644 --- a/recipes/flex/flex.inc +++ b/recipes/flex/flex.inc @@ -2,9 +2,7 @@ DESCRIPTION = "Flex is a tool for generating programs that recognize lexical pat SECTION = "devel" LICENSE = "BSD" -DEPENDS = "gettext perl" - -INC_PR = "r6" +INC_PR = "r7" BBCLASSEXTEND = "native" diff --git a/recipes/freerdp/freerdp.inc b/recipes/freerdp/freerdp.inc index 0b9c9ace64..0690d6e9ec 100644 --- a/recipes/freerdp/freerdp.inc +++ b/recipes/freerdp/freerdp.inc @@ -4,10 +4,11 @@ DESCRIPTION = "FreeRDP RDP client" HOMEPAGE = "http://freerdp.sourceforge.net" DEPENDS = "virtual/libx11 openssl libxcursor cups alsa-lib" +RDEPENDS_${PN} += "xprop" SECTION = "x11/network" -LICENSE = "GPL" +LICENSE = "Apache-2.0" -INC_PR = "r4" +INC_PR = "r6" inherit pkgconfig autotools diff --git a/recipes/freerdp/freerdp_git.bb b/recipes/freerdp/freerdp_git.bb index 37d0041f51..1ed2a19158 100644 --- a/recipes/freerdp/freerdp_git.bb +++ b/recipes/freerdp/freerdp_git.bb @@ -7,11 +7,9 @@ inherit gitpkgv PV = "gitr${SRCPV}" PKGV = "${GITPKGVTAG}" +PR = "${INC_PR}.0" -SRCREV = "aec5dd5807dbcd0989bb15124dcac157bb0412bc" -PR = "${INC_PR}.4" +SRCREV = "6f7eb2abb077d60a09eeb66a10ad97d102336d3c" +SRC_URI = "git://freerdp.git.sourceforge.net/gitroot/freerdp/freerdp.git;protocol=git" S = "${WORKDIR}/git" - - -SRC_URI = "git://freerdp.git.sourceforge.net/gitroot/freerdp/freerdp.git;protocol=git" diff --git a/recipes/freesmartphone/cornucopia.inc b/recipes/freesmartphone/cornucopia.inc index 2b6ba392ae..968ad85ab6 100644 --- a/recipes/freesmartphone/cornucopia.inc +++ b/recipes/freesmartphone/cornucopia.inc @@ -7,7 +7,7 @@ DEPENDS = "vala-native glib-2.0 libfso-glib libgee" DEPENDS += "${@['libfsoframework', ''][(bb.data.getVar('PN', d, 1) in 'libfsoframework libfsobasics'.split())]}" PV = "invalid, please override" -FSO_CORNUCOPIA_SRCREV ?= "8e66f7e5cecfb4bd6b655645770a2b87e12cd607" +FSO_CORNUCOPIA_SRCREV ?= "7f4aa75e6bc3ed8d39b69e9d529d0dce8280cd27" INC_PR = "r5" SRC_URI = "${FREESMARTPHONE_GIT}/cornucopia;protocol=git;branch=master" diff --git a/recipes/freesmartphone/frameworkd_git.bb b/recipes/freesmartphone/frameworkd_git.bb index f1543194d9..16d839c537 100644 --- a/recipes/freesmartphone/frameworkd_git.bb +++ b/recipes/freesmartphone/frameworkd_git.bb @@ -4,7 +4,7 @@ AUTHOR = "FreeSmartphone.Org Development Team" SECTION = "console/network" DEPENDS = "python-cython-native python-pyrex-native" LICENSE = "GPL" -SRCREV = "3d691db83a1f235679acbcf7837ba0af3d0164cb" +SRCREV = "f86660d2304a7215dfc6d6a516530267657a02b1" PV = "0.9.5.9+gitr${SRCPV}" PR = "r12" PE = "1" diff --git a/recipes/freesmartphone/libfsobasics_git.bb b/recipes/freesmartphone/libfsobasics_git.bb index c99bd8e20d..1d751ca1c3 100644 --- a/recipes/freesmartphone/libfsobasics_git.bb +++ b/recipes/freesmartphone/libfsobasics_git.bb @@ -1,8 +1,8 @@ require cornucopia.inc DESCRIPTION = "freesmartphone.org support library" -DEPENDS += "libnl2" +DEPENDS += "libnl" SRCREV = "${FSO_CORNUCOPIA_SRCREV}" PV = "0.9.10+gitr${SRCPV}" PE = "1" -PR = "${INC_PR}.1" +PR = "${INC_PR}.2" diff --git a/recipes/freesmartphone/libgisi_git.bb b/recipes/freesmartphone/libgisi_git.bb index 50abd4c37a..e0a4ea728a 100644 --- a/recipes/freesmartphone/libgisi_git.bb +++ b/recipes/freesmartphone/libgisi_git.bb @@ -6,7 +6,7 @@ DEPENDS = "glib-2.0" SRC_URI = "${FREESMARTPHONE_GIT}/libgisi.git;protocol=git;branch=master" S = "${WORKDIR}/git" -SRCREV = "06777c0db4abecb22a4fd5e515079675e6e1f2dd" +SRCREV = "aa9942e136976bfcf32f6f15ebcc28d24163fee6" PV = "0.0.0+gitr${SRCPV}" inherit vala autotools diff --git a/recipes/freesmartphone/msmcomm.inc b/recipes/freesmartphone/msmcomm.inc index 5b97375aeb..91c903aadc 100644 --- a/recipes/freesmartphone/msmcomm.inc +++ b/recipes/freesmartphone/msmcomm.inc @@ -6,6 +6,6 @@ LICENSE = "GPL" INC_PR = "r4" PV = "Please override!" -SRCREV = "cbc37c735f015e562bd8b36650fc19260e729fb4" +SRCREV = "aa49ff741f30df8e0360acef6798aa95856b20bc" SRC_URI = "${FREESMARTPHONE_GIT}/msmcomm.git;protocol=git;branch=master" diff --git a/recipes/freetype/freetype-2.4.3/fix-configure.patch b/recipes/freetype/freetype-2.4.3/fix-configure.patch deleted file mode 100644 index ecd96738d4..0000000000 --- a/recipes/freetype/freetype-2.4.3/fix-configure.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: freetype-2.3.6/builds/unix/configure.ac -=================================================================== ---- freetype-2.3.6.orig/builds/unix/configure.ac -+++ freetype-2.3.6/builds/unix/configure.ac -@@ -506,8 +506,6 @@ AC_SUBST([FT2_EXTRA_LIBS]) - AC_SUBST([SYSTEM_ZLIB]) - - --LT_INIT(win32-dll) -- - AC_SUBST([hardcode_libdir_flag_spec]) - AC_SUBST([wl]) - AC_SUBST([build_libtool_libs]) diff --git a/recipes/freetype/freetype/configure.patch b/recipes/freetype/freetype/configure.patch deleted file mode 100644 index f11cf96be0..0000000000 --- a/recipes/freetype/freetype/configure.patch +++ /dev/null @@ -1,47 +0,0 @@ - -# -# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher -# - -Index: freetype-2.1.8/builds/unix/configure.ac -=================================================================== ---- freetype-2.1.8.orig/builds/unix/configure.ac 2004-04-14 04:49:11.000000000 -0400 -+++ freetype-2.1.8/builds/unix/configure.ac 2005-03-12 03:14:23.000000000 -0500 -@@ -111,8 +111,8 @@ - # Check for system zlib - - AC_ARG_WITH([zlib], -- dnl don't quote AS_HELP_STRING! -- AS_HELP_STRING([--without-zlib], -+ dnl don't quote AC_HELP_STRING! -+ AC_HELP_STRING([--without-zlib], - [use internal zlib instead of system-wide])) - if test x$with_zlib != xno && test -z "$LIBZ"; then - AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])]) -@@ -127,7 +127,7 @@ - # Whether to use Mac OS resource-based fonts or not - - AC_ARG_WITH([old-mac-fonts], -- dnl don't quote AS_HELP_STRING! -- AS_HELP_STRING([--with-old-mac-fonts], -+ dnl don't quote AC_HELP_STRING! -+ AC_HELP_STRING([--with-old-mac-fonts], - [allow Mac resource-based fonts to be used])) - if test x$with_old_mac_fonts = xyes; then -Index: freetype-2.1.8/builds/unix/unix-cc.in -=================================================================== ---- freetype-2.1.8.orig/builds/unix/unix-cc.in 2003-11-09 03:37:13.000000000 -0500 -+++ freetype-2.1.8/builds/unix/unix-cc.in 2005-03-12 18:37:24.613693760 -0500 -@@ -14,9 +14,11 @@ - - CC := @CC@ - COMPILER_SEP := $(SEP) -+SHELL := @SHELL@ -+top_builddir := $(BUILD_DIR) - - ifndef LIBTOOL -- LIBTOOL := $(BUILD_DIR)/libtool -+ LIBTOOL := @LIBTOOL@ - endif - - diff --git a/recipes/freetype/freetype_2.4.3.bb b/recipes/freetype/freetype_2.4.3.bb index 90a0fe8c49..66d2e51fe2 100644 --- a/recipes/freetype/freetype_2.4.3.bb +++ b/recipes/freetype/freetype_2.4.3.bb @@ -1,13 +1,12 @@ DESCRIPTION = "Freetype font rendering library" SECTION = "libs" LICENSE = "freetype GPLv2" -PR = "r0" +PR = "r1" DEPENDS = "zlib" SRC_URI = "\ ${SOURCEFORGE_MIRROR}/freetype/freetype-${PV}.tar.bz2 \ file://no-hardcode.patch \ - file://fix-configure.patch \ file://libtool-tag.patch \ " S = "${WORKDIR}/freetype-${PV}" @@ -17,14 +16,16 @@ SRC_URI[sha256sum] = "b4e626db62fd1b4549ff5d57f5eca3a41631fd6066adf8a31c11879b51 inherit autotools pkgconfig binconfig -LIBTOOL = "${HOST_SYS}-libtool" +LIBTOOL = "${S}/builds/unix/${HOST_SYS}-libtool" EXTRA_OEMAKE = "'LIBTOOL=${LIBTOOL}'" +LDFLAGS_append = " -Wl,-rpath-link -Wl,${STAGING_DIR_TARGET}${libdir}" + do_configure() { cd builds/unix - libtoolize --force --copy gnu-configize --force aclocal -I . + libtoolize --force --copy autoconf cd ${S} oe_runconf diff --git a/recipes/fs/files/fontsproto.patch b/recipes/fs/files/fontsproto.patch new file mode 100644 index 0000000000..1032b486af --- /dev/null +++ b/recipes/fs/files/fontsproto.patch @@ -0,0 +1,27 @@ +Index: FS/FSlibint.h +=================================================================== +--- FS.orig/FSlibint.h 2011-02-25 22:34:43.884558121 +0100 ++++ FS/FSlibint.h 2011-02-25 22:35:15.230223119 +0100 +@@ -72,8 +72,8 @@ + #endif /* USG */ + + #include "FSlib.h" +-#include "FSproto.h" + #include "FSlibos.h" ++#include + #include + #include + +Index: FS/configure.ac +=================================================================== +--- FS.orig/configure.ac 2011-02-25 22:35:23.977928121 +0100 ++++ FS/configure.ac 2011-02-25 22:35:39.622413120 +0100 +@@ -19,7 +19,7 @@ + AC_PROG_CC + + # Checks for pkg-config packages +-PKG_CHECK_MODULES(FS, xfont xtrans) ++PKG_CHECK_MODULES(FS, xfont xtrans fontsproto) + + # Checks for libraries. + diff --git a/recipes/fs/files/xtrans.patch b/recipes/fs/files/xtrans.patch new file mode 100644 index 0000000000..e628a2604d --- /dev/null +++ b/recipes/fs/files/xtrans.patch @@ -0,0 +1,21 @@ +Index: FS/fs_trans.h +=================================================================== +--- FS.orig/fs_trans.h 2011-02-25 23:00:34.025908119 +0100 ++++ FS/fs_trans.h 2011-02-25 23:01:19.165133120 +0100 +@@ -24,4 +24,4 @@ + + #define FS_t + #define TRANS_CLIENT +-#include ++#include +Index: FS/fs_trans.c +=================================================================== +--- FS.orig/fs_trans.c 2011-02-25 23:08:51.177693119 +0100 ++++ FS/fs_trans.c 2011-02-25 23:09:00.378958118 +0100 +@@ -28,5 +28,5 @@ + + #define FS_t + #define TRANS_CLIENT +-#include ++#include + diff --git a/recipes/fs/fs_cvs.bb b/recipes/fs/fs_cvs.bb index 9dcba5708b..b4baee6fe5 100644 --- a/recipes/fs/fs_cvs.bb +++ b/recipes/fs/fs_cvs.bb @@ -4,7 +4,13 @@ SECTION = "libs" PRIORITY = "optional" DEPENDS = "libxfont xtrans" -SRC_URI = "${FREEDESKTOP_CVS}/xlibs;module=FS" +PR = "r1" + +SRC_URI = "${FREEDESKTOP_CVS}/xlibs;module=FS \ + file://fontsproto.patch \ + file://xtrans.patch \ + " + S = "${WORKDIR}/FS" inherit autotools pkgconfig diff --git a/recipes/ftpd-topfield/files/usb-header-name-2-6-23.patch b/recipes/ftpd-topfield/files/usb-header-name-2-6-23.patch index 2ab6c4c094..fd695d8508 100644 --- a/recipes/ftpd-topfield/files/usb-header-name-2-6-23.patch +++ b/recipes/ftpd-topfield/files/usb-header-name-2-6-23.patch @@ -1,5 +1,5 @@ ---- ../../libtopfield/usb_io.h.orig 2008-12-26 23:11:08.000000000 -0600 -+++ ../../libtopfield/usb_io.h 2008-12-26 23:24:02.000000000 -0600 +--- libtopfield/usb_io.h.orig 2008-12-26 23:11:08.000000000 -0600 ++++ libtopfield/usb_io.h 2008-12-26 23:24:02.000000000 -0600 @@ -36,7 +36,12 @@ /* linux/usb_ch9.h wasn't separated out until 2.4.23 */ diff --git a/recipes/ftpd-topfield/ftpd-topfield_0.7.5.bb b/recipes/ftpd-topfield/ftpd-topfield_0.7.5.bb index 504f652393..b1dee21d5a 100755 --- a/recipes/ftpd-topfield/ftpd-topfield_0.7.5.bb +++ b/recipes/ftpd-topfield/ftpd-topfield_0.7.5.bb @@ -8,7 +8,7 @@ PR = "r3" SRC_URI = "cvs://anonymous@puppy.cvs.sourceforge.net/cvsroot/puppy;method=pserver;module=ftpd-topfield;tag=FTPD_TOPFIELD_0_7_5 \ cvs://anonymous@puppy.cvs.sourceforge.net/cvsroot/puppy;method=pserver;module=libtopfield;tag=FTPD_TOPFIELD_0_7_5 \ file://syslog.patch \ - file://usb-header-name-2-6-23.patch \ + file://usb-header-name-2-6-23.patch;striplevel=0 \ file://init" # The source will end up in the subdirectory 'ftpd-topfield' - no release name @@ -19,9 +19,12 @@ inherit update-rc.d INITSCRIPT_NAME = "ftpd-topfield" INITSCRIPT_PARAMS = "defaults" -# Just the one package at present +do_unpack2() { + cd ${WORKDIR} + mv libtopfield ${S}/ +} -inherit autotools +addtask unpack2 after do_unpack before do_patch do_compile() { oe_runmake diff --git a/recipes/gcc/gcc-4.2.1/arm-crunch-eabi-ieee754.patch b/recipes/gcc/gcc-4.2.1/arm-crunch-eabi-ieee754.patch index e4929fa20e..07469e4725 100644 --- a/recipes/gcc/gcc-4.2.1/arm-crunch-eabi-ieee754.patch +++ b/recipes/gcc/gcc-4.2.1/arm-crunch-eabi-ieee754.patch @@ -1,4 +1,4 @@ ---- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000 +--- gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:15:49.000000000 +1000 @@ -42,8 +42,9 @@ @@ -54,7 +54,7 @@ RETLDM #endif ---- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:06:52.000000000 +1000 +--- gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:06:52.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:21:43.000000000 +1000 @@ -302,8 +302,13 @@ diff --git a/recipes/gcc/gcc-4.2.1/arm-crunch-predicates3.patch b/recipes/gcc/gcc-4.2.1/arm-crunch-predicates3.patch index 99e1e6c88c..c01fbd577a 100644 --- a/recipes/gcc/gcc-4.2.1/arm-crunch-predicates3.patch +++ b/recipes/gcc/gcc-4.2.1/arm-crunch-predicates3.patch @@ -1,5 +1,5 @@ -diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/config/arm/arm.md ---- ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:50:53.000000000 +1000 +diff -urN gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/config/arm/arm.md +--- gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:50:53.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:43:17.000000000 +1000 @@ -7488,6 +7488,22 @@ arm_compare_op1);" @@ -99,8 +99,8 @@ diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/co "" ) -diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/predicates.md gcc-4.1.2/gcc/config/arm/predicates.md ---- ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/predicates.md 2005-09-11 17:38:02.000000000 +1000 +diff -urN gcc-4.1.2/gcc/config/arm/predicates.md gcc-4.1.2/gcc/config/arm/predicates.md +--- gcc-4.1.2/gcc/config/arm/predicates.md 2005-09-11 17:38:02.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/predicates.md 2007-06-14 11:46:13.000000000 +1000 @@ -172,7 +172,11 @@ diff --git a/recipes/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754.patch b/recipes/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754.patch index e4929fa20e..07469e4725 100644 --- a/recipes/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754.patch +++ b/recipes/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754.patch @@ -1,4 +1,4 @@ ---- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000 +--- gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:15:49.000000000 +1000 @@ -42,8 +42,9 @@ @@ -54,7 +54,7 @@ RETLDM #endif ---- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:06:52.000000000 +1000 +--- gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:06:52.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:21:43.000000000 +1000 @@ -302,8 +302,13 @@ diff --git a/recipes/gcc/gcc-4.2.2/arm-crunch-predicates3.patch b/recipes/gcc/gcc-4.2.2/arm-crunch-predicates3.patch index 99e1e6c88c..c01fbd577a 100644 --- a/recipes/gcc/gcc-4.2.2/arm-crunch-predicates3.patch +++ b/recipes/gcc/gcc-4.2.2/arm-crunch-predicates3.patch @@ -1,5 +1,5 @@ -diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/config/arm/arm.md ---- ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:50:53.000000000 +1000 +diff -urN gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/config/arm/arm.md +--- gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:50:53.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:43:17.000000000 +1000 @@ -7488,6 +7488,22 @@ arm_compare_op1);" @@ -99,8 +99,8 @@ diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/co "" ) -diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/predicates.md gcc-4.1.2/gcc/config/arm/predicates.md ---- ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/predicates.md 2005-09-11 17:38:02.000000000 +1000 +diff -urN gcc-4.1.2/gcc/config/arm/predicates.md gcc-4.1.2/gcc/config/arm/predicates.md +--- gcc-4.1.2/gcc/config/arm/predicates.md 2005-09-11 17:38:02.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/predicates.md 2007-06-14 11:46:13.000000000 +1000 @@ -172,7 +172,11 @@ diff --git a/recipes/gcc/gcc-4.2.3/arm-crunch-eabi-ieee754.patch b/recipes/gcc/gcc-4.2.3/arm-crunch-eabi-ieee754.patch index e4929fa20e..07469e4725 100644 --- a/recipes/gcc/gcc-4.2.3/arm-crunch-eabi-ieee754.patch +++ b/recipes/gcc/gcc-4.2.3/arm-crunch-eabi-ieee754.patch @@ -1,4 +1,4 @@ ---- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000 +--- gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:15:49.000000000 +1000 @@ -42,8 +42,9 @@ @@ -54,7 +54,7 @@ RETLDM #endif ---- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:06:52.000000000 +1000 +--- gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:06:52.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:21:43.000000000 +1000 @@ -302,8 +302,13 @@ diff --git a/recipes/gcc/gcc-4.2.3/arm-crunch-predicates3.patch b/recipes/gcc/gcc-4.2.3/arm-crunch-predicates3.patch index 99e1e6c88c..c01fbd577a 100644 --- a/recipes/gcc/gcc-4.2.3/arm-crunch-predicates3.patch +++ b/recipes/gcc/gcc-4.2.3/arm-crunch-predicates3.patch @@ -1,5 +1,5 @@ -diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/config/arm/arm.md ---- ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:50:53.000000000 +1000 +diff -urN gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/config/arm/arm.md +--- gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:50:53.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:43:17.000000000 +1000 @@ -7488,6 +7488,22 @@ arm_compare_op1);" @@ -99,8 +99,8 @@ diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/co "" ) -diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/predicates.md gcc-4.1.2/gcc/config/arm/predicates.md ---- ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/predicates.md 2005-09-11 17:38:02.000000000 +1000 +diff -urN gcc-4.1.2/gcc/config/arm/predicates.md gcc-4.1.2/gcc/config/arm/predicates.md +--- gcc-4.1.2/gcc/config/arm/predicates.md 2005-09-11 17:38:02.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/predicates.md 2007-06-14 11:46:13.000000000 +1000 @@ -172,7 +172,11 @@ diff --git a/recipes/gcc/gcc-4.3.3.inc b/recipes/gcc/gcc-4.3.3.inc index 649fdfe24b..4fa3863df3 100644 --- a/recipes/gcc/gcc-4.3.3.inc +++ b/recipes/gcc/gcc-4.3.3.inc @@ -8,7 +8,7 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp" NATIVEDEPS = "mpfr-native gmp-native" -INC_PR = "r23" +INC_PR = "r25" SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2;name=archive \ file://fedora/gcc43-c++-builtin-redecl.patch;striplevel=0 \ diff --git a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch index f16336d05d..7dee2f4176 100644 --- a/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch +++ b/recipes/gcc/gcc-4.3.3/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch @@ -1,6 +1,6 @@ Define Maverick floating point word order in libgcc's assemble support routines ---- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000 +--- gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/ieee754-df.S 2008-04-07 13:15:49.000000000 +1000 @@ -42,8 +42,9 @@ diff --git a/recipes/gcc/gcc-4.3.4/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch b/recipes/gcc/gcc-4.3.4/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch index f16336d05d..7dee2f4176 100644 --- a/recipes/gcc/gcc-4.3.4/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch +++ b/recipes/gcc/gcc-4.3.4/ep93xx/arm-crunch-eabi-ieee754-endian-littleword-littlebyte.patch @@ -1,6 +1,6 @@ Define Maverick floating point word order in libgcc's assemble support routines ---- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000 +--- gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000 +++ gcc-4.1.2/gcc/config/arm/ieee754-df.S 2008-04-07 13:15:49.000000000 +1000 @@ -42,8 +42,9 @@ diff --git a/recipes/gcc/gcc-4.5.inc b/recipes/gcc/gcc-4.5.inc index 0239a29127..d7f6b4df0e 100644 --- a/recipes/gcc/gcc-4.5.inc +++ b/recipes/gcc/gcc-4.5.inc @@ -7,10 +7,9 @@ LICENSE = "GPLv3" DEPENDS = "mpfr gmp libmpc libelf" NATIVEDEPS = "mpfr-native gmp-native libmpc-native" +INC_PR = "r41" -INC_PR = "r32" - -SRCREV = "170123" +SRCREV = "170880" PV = "4.5" # BINV should be incremented after updating to a revision # after a minor gcc release (e.g. 4.5.1 or 4.5.2) has been made @@ -77,7 +76,6 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH} \ file://linaro/gcc-4.5-linaro-r99347.patch \ file://linaro/gcc-4.5-linaro-r99348.patch \ file://linaro/gcc-4.5-linaro-r99349.patch \ -# file://linaro/gcc-4.5-linaro-r99350.patch \ file://linaro/gcc-4.5-linaro-r99351.patch \ file://linaro/gcc-4.5-linaro-r99352.patch \ file://linaro/gcc-4.5-linaro-r99353.patch \ @@ -167,7 +165,18 @@ SRC_URI = "svn://gcc.gnu.org/svn/gcc/branches;module=${BRANCH} \ file://linaro/gcc-4.5-linaro-r99468.patch \ file://linaro/gcc-4.5-linaro-r99473.patch \ # file://linaro/gcc-4.5-linaro-r99474.patch \ -# file://linaro/gcc-4.5-linaro-r99475.patch \ + file://linaro/gcc-4.5-linaro-r99475.patch \ + file://linaro/gcc-4.5-linaro-r99478.patch \ + file://linaro/gcc-4.5-linaro-r99479.patch \ + file://linaro/gcc-4.5-linaro-r99480.patch \ + file://linaro/gcc-4.5-linaro-r99481.patch \ + file://linaro/gcc-4.5-linaro-r99482.patch \ + file://linaro/gcc-4.5-linaro-r99483.patch \ +# file://linaro/gcc-4.5-linaro-r99486.patch \ +# file://linaro/gcc-4.5-linaro-r99487.patch \ + file://linaro/gcc-4.5-linaro-r99488.patch \ + file://linaro/gcc-4.5-linaro-r99489.patch \ + file://more-epilogues.patch \ file://gcc-scalar-widening-pr45847.patch \ file://gcc-arm-volatile-bitfield-fix.patch \ " @@ -177,6 +186,7 @@ SRC_URI_append_mips64el = " file://mips64-nomultilib.patch " # Language Overrides FORTRAN = "" +FORTRAN_linux-gnueabi = ",fortran" JAVA = "" S = "${WORKDIR}/${BRANCH}" diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99350.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99350.patch deleted file mode 100644 index 3f66f9d157..0000000000 --- a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99350.patch +++ /dev/null @@ -1,184 +0,0 @@ - Jie Zhang - - Issue #7122 - - gcc/ - * config/arm/vfp.md (movdf_vfp): Add load double 0.0 case. - (thumb2_movdf_vfp): Likewise. Require that one of the operands be a - register. - * config/arm/constraints.md (D0): New constraint. - - gcc/testsuite/ - * gcc.target/arm/neon-load-df0.c: New test. - -2010-07-26 Julian Brown - - Merge from Sourcery G++ 4.4: - - 2010-02-23 Julian Brown - - gcc/ - -=== modified file 'gcc/config/arm/constraints.md' ---- old/gcc/config/arm/constraints.md 2010-08-12 16:47:21 +0000 -+++ new/gcc/config/arm/constraints.md 2010-08-13 10:59:06 +0000 -@@ -29,7 +29,7 @@ - ;; in Thumb-1 state: I, J, K, L, M, N, O - - ;; The following multi-letter normal constraints have been used: --;; in ARM/Thumb-2 state: Da, Db, Dc, Dn, Dl, DL, Dv, Dy, Di -+;; in ARM/Thumb-2 state: D0, Da, Db, Dc, Di, Dn, Dl, DL, Dv, Dy - ;; in Thumb-1 state: Pa, Pb - ;; in Thumb-2 state: Ps, Pt, Pv - -@@ -173,6 +173,13 @@ - (and (match_code "const_double") - (match_test "TARGET_32BIT && neg_const_double_rtx_ok_for_fpa (op)"))) - -+(define_constraint "D0" -+ "@internal -+ In ARM/Thumb-2 state a 0.0 floating point constant which can -+ be loaded with a Neon vmov immediate instruction." -+ (and (match_code "const_double") -+ (match_test "TARGET_NEON && op == CONST0_RTX (mode)"))) -+ - (define_constraint "Da" - "@internal - In ARM/Thumb-2 state a const_int, const_double or const_vector that can - -=== modified file 'gcc/config/arm/vfp.md' ---- old/gcc/config/arm/vfp.md 2010-08-12 11:29:02 +0000 -+++ new/gcc/config/arm/vfp.md 2010-08-13 10:59:06 +0000 -@@ -402,8 +402,8 @@ - ;; DFmode moves - - (define_insn "*movdf_vfp" -- [(set (match_operand:DF 0 "nonimmediate_soft_df_operand" "=w,?r,w ,r, m,w ,Uv,w,r") -- (match_operand:DF 1 "soft_df_operand" " ?r,w,Dy,mF,r,UvF,w, w,r"))] -+ [(set (match_operand:DF 0 "nonimmediate_soft_df_operand" "=w,?r,w ,w, r, m,w ,Uv,w,r") -+ (match_operand:DF 1 "soft_df_operand" " ?r,w,Dy,D0,mF,r,UvF,w, w,r"))] - "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_VFP - && ( register_operand (operands[0], DFmode) - || register_operand (operands[1], DFmode))" -@@ -418,16 +418,18 @@ - case 2: - gcc_assert (TARGET_VFP_DOUBLE); - return \"fconstd%?\\t%P0, #%G1\"; -- case 3: case 4: -+ case 3: -+ return \"vmov.i32\\t%P0, #0\"; -+ case 4: case 5: - return output_move_double (operands); -- case 5: case 6: -+ case 6: case 7: - return output_move_vfp (operands); -- case 7: -+ case 8: - if (TARGET_VFP_SINGLE) - return \"fcpys%?\\t%0, %1\;fcpys%?\\t%p0, %p1\"; - else - return \"fcpyd%?\\t%P0, %P1\"; -- case 8: -+ case 9: - return \"#\"; - default: - gcc_unreachable (); -@@ -435,10 +437,10 @@ - } - " - [(set_attr "type" -- "r_2_f,f_2_r,fconstd,f_loadd,f_stored,load2,store2,ffarithd,*") -- (set_attr "neon_type" "neon_mcr_2_mcrr,neon_mrrc,*,*,*,*,*,neon_vmov,*") -- (set (attr "length") (cond [(eq_attr "alternative" "3,4,8") (const_int 8) -- (eq_attr "alternative" "7") -+ "r_2_f,f_2_r,fconstd,*,f_loadd,f_stored,load2,store2,ffarithd,*") -+ (set_attr "neon_type" "neon_mcr_2_mcrr,neon_mrrc,*,neon_vmov,*,*,*,*,neon_vmov,*") -+ (set (attr "length") (cond [(eq_attr "alternative" "4,5,9") (const_int 8) -+ (eq_attr "alternative" "8") - (if_then_else - (eq (symbol_ref "TARGET_VFP_SINGLE") - (const_int 1)) -@@ -446,14 +448,16 @@ - (const_int 4))] - (const_int 4))) - (set_attr "predicable" "yes") -- (set_attr "pool_range" "*,*,*,1020,*,1020,*,*,*") -- (set_attr "neg_pool_range" "*,*,*,1008,*,1008,*,*,*")] -+ (set_attr "pool_range" "*,*,*,*,1020,*,1020,*,*,*") -+ (set_attr "neg_pool_range" "*,*,*,*,1008,*,1008,*,*,*")] - ) - - (define_insn "*thumb2_movdf_vfp" -- [(set (match_operand:DF 0 "nonimmediate_soft_df_operand" "=w,?r,w ,r, m,w ,Uv,w,r") -- (match_operand:DF 1 "soft_df_operand" " ?r,w,Dy,mF,r,UvF,w, w,r"))] -- "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP" -+ [(set (match_operand:DF 0 "nonimmediate_soft_df_operand" "=w,?r,w ,w,r, m,w ,Uv,w,r") -+ (match_operand:DF 1 "soft_df_operand" " ?r,w,Dy,D0,mF,r,UvF,w, w,r"))] -+ "TARGET_THUMB2 && TARGET_HARD_FLOAT && TARGET_VFP -+ && ( register_operand (operands[0], DFmode) -+ || register_operand (operands[1], DFmode))" - "* - { - switch (which_alternative) -@@ -465,11 +469,13 @@ - case 2: - gcc_assert (TARGET_VFP_DOUBLE); - return \"fconstd%?\\t%P0, #%G1\"; -- case 3: case 4: case 8: -+ case 3: -+ return \"vmov.i32\\t%P0, #0\"; -+ case 4: case 5: case 9: - return output_move_double (operands); -- case 5: case 6: -+ case 6: case 7: - return output_move_vfp (operands); -- case 7: -+ case 8: - if (TARGET_VFP_SINGLE) - return \"fcpys%?\\t%0, %1\;fcpys%?\\t%p0, %p1\"; - else -@@ -480,18 +486,18 @@ - } - " - [(set_attr "type" -- "r_2_f,f_2_r,fconstd,load2,store2,f_load,f_store,ffarithd,*") -- (set_attr "neon_type" "neon_mcr_2_mcrr,neon_mrrc,*,*,*,*,*,neon_vmov,*") -- (set (attr "length") (cond [(eq_attr "alternative" "3,4,8") (const_int 8) -- (eq_attr "alternative" "7") -+ "r_2_f,f_2_r,fconstd,*,load2,store2,f_load,f_store,ffarithd,*") -+ (set_attr "neon_type" "neon_mcr_2_mcrr,neon_mrrc,*,neon_vmov,*,*,*,*,neon_vmov,*") -+ (set (attr "length") (cond [(eq_attr "alternative" "4,5,9") (const_int 8) -+ (eq_attr "alternative" "8") - (if_then_else - (eq (symbol_ref "TARGET_VFP_SINGLE") - (const_int 1)) - (const_int 8) - (const_int 4))] - (const_int 4))) -- (set_attr "pool_range" "*,*,*,4096,*,1020,*,*,*") -- (set_attr "neg_pool_range" "*,*,*,0,*,1008,*,*,*")] -+ (set_attr "pool_range" "*,*,*,*,4096,*,1020,*,*,*") -+ (set_attr "neg_pool_range" "*,*,*,*,0,*,1008,*,*,*")] - ) - - - -=== added file 'gcc/testsuite/gcc.target/arm/neon-load-df0.c' ---- old/gcc/testsuite/gcc.target/arm/neon-load-df0.c 1970-01-01 00:00:00 +0000 -+++ new/gcc/testsuite/gcc.target/arm/neon-load-df0.c 2010-08-13 10:59:06 +0000 -@@ -0,0 +1,14 @@ -+/* Test the optimization of loading 0.0 for ARM Neon. */ -+ -+/* { dg-do compile } */ -+/* { dg-require-effective-target arm_neon_ok } */ -+/* { dg-options "-O2" } */ -+/* { dg-add-options arm_neon } */ -+ -+double x; -+void bar () -+{ -+ x = 0.0; -+} -+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[dD\]\[0-9\]+, #0\n" } } */ -+/* { dg-final { cleanup-saved-temps } } */ - diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99351.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99351.patch index a1a2c2ad81..aa3b3eb85f 100644 --- a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99351.patch +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99351.patch @@ -1,3 +1,11 @@ +2010-07-26 Julian Brown + + Merge from Sourcery G++ 4.4: + + Jie Zhang + Issue #7122 + + gcc/ * config/arm/arm.c (arm_rtx_costs_1): Adjust cost for CONST_VECTOR. (arm_size_rtx_costs): Likewise. @@ -25,18 +33,6 @@ * gcc.target/arm/neon-vdup-18.c: New test case. * gcc.target/arm/neon-vdup-19.c: New test case. -2010-07-26 Julian Brown - - Merge from Sourcery G++ 4.4: - - Jie Zhang - - Issue #7122 - - gcc/ - * config/arm/vfp.md (movdf_vfp): Add load double 0.0 case. - (thumb2_movdf_vfp): Likewise. Require that one of the operands be a - register. === modified file 'gcc/config/arm/arm.c' --- old/gcc/config/arm/arm.c 2010-08-13 10:55:28 +0000 diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99352.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99352.patch index 675c2f3ceb..8d48ada2fd 100644 --- a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99352.patch +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99352.patch @@ -1,3 +1,7 @@ +2010-07-26 Julian Brown + + Merge from Sourcery G++ 4.4: + 2010-04-07 Thomas Schwinge Daniel Jacobowitz @@ -13,13 +17,6 @@ * config/arm/arm.h (DWARF2_UNWIND_INFO): Remove definition. * config/arm/bpabi.h (DWARF2_UNWIND_INFO): Define to zero. -2010-07-26 Julian Brown - - Merge from Sourcery G++ 4.4: - - Jie Zhang - - Issue #7122 === modified file 'gcc/config/arm/arm.h' --- old/gcc/config/arm/arm.h 2010-08-13 10:30:35 +0000 diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99478.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99478.patch new file mode 100644 index 0000000000..38463a9b40 --- /dev/null +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99478.patch @@ -0,0 +1,74 @@ +2011-01-11 Ramana Radhakrishnan + + * config/arm/t-arm: Fix up last commit. + +2011-01-11 Ramana Radhakrishnan + + * config/arm/t-arm: Update MD_INCLUDES to include + all the files correctly. + * config/arm/arm.md: Update comments. + +=== modified file 'gcc/config/arm/arm.md' +--- old/gcc/config/arm/arm.md 2011-02-22 11:38:56 +0000 ++++ new/gcc/config/arm/arm.md 2011-03-01 14:32:39 +0000 +@@ -11246,6 +11246,7 @@ + " + ) + ++;; Make sure that the includes are reflected in MD_INCLUDES. + ;; Load the load/store multiple patterns + (include "ldmstm.md") + ;; Load the FPA co-processor patterns + +=== modified file 'gcc/config/arm/t-arm' +--- old/gcc/config/arm/t-arm 2010-08-16 09:41:58 +0000 ++++ new/gcc/config/arm/t-arm 2011-01-11 21:01:30 +0000 +@@ -18,20 +18,33 @@ + # along with GCC; see the file COPYING3. If not see + # . + +-MD_INCLUDES= $(srcdir)/config/arm/arm-tune.md \ +- $(srcdir)/config/arm/predicates.md \ +- $(srcdir)/config/arm/arm-generic.md \ +- $(srcdir)/config/arm/arm1020e.md \ +- $(srcdir)/config/arm/arm1026ejs.md \ +- $(srcdir)/config/arm/arm1136jfs.md \ +- $(srcdir)/config/arm/arm926ejs.md \ +- $(srcdir)/config/arm/cirrus.md \ +- $(srcdir)/config/arm/fpa.md \ +- $(srcdir)/config/arm/vec-common.md \ +- $(srcdir)/config/arm/iwmmxt.md \ +- $(srcdir)/config/arm/vfp.md \ +- $(srcdir)/config/arm/neon.md \ +- $(srcdir)/config/arm/thumb2.md ++MD_INCLUDES= $(srcdir)/config/arm/arm-tune.md \ ++ $(srcdir)/config/arm/predicates.md \ ++ $(srcdir)/config/arm/arm-generic.md \ ++ $(srcdir)/config/arm/arm1020e.md \ ++ $(srcdir)/config/arm/arm1026ejs.md \ ++ $(srcdir)/config/arm/arm1136jfs.md \ ++ $(srcdir)/config/arm/arm926ejs.md \ ++ $(srcdir)/config/arm/cirrus.md \ ++ $(srcdir)/config/arm/fpa.md \ ++ $(srcdir)/config/arm/vec-common.md \ ++ $(srcdir)/config/arm/iwmmxt.md \ ++ $(srcdir)/config/arm/vfp.md \ ++ $(srcdir)/config/arm/cortex-a5.md \ ++ $(srcdir)/config/arm/cortex-a8.md \ ++ $(srcdir)/config/arm/cortex-a9.md \ ++ $(srcdir)/config/arm/cortex-a9-neon.md \ ++ $(srcdir)/config/arm/cortex-r4.md \ ++ $(srcdir)/config/arm/cortex-r4f.md \ ++ $(srcdir)/config/arm/cortex-m4.md \ ++ $(srcdir)/config/arm/cortex-m4-fpu.md \ ++ $(srcdir)/config/arm/vfp11.md \ ++ $(srcdir)/config/arm/ldmstm.md \ ++ $(srcdir)/config/arm/thumb2.md \ ++ $(srcdir)/config/arm/neon.md \ ++ $(srcdir)/config/arm/sync.md \ ++ $(srcdir)/config/arm/cortex-a8-neon.md \ ++ $(srcdir)/config/arm/constraints.md + + LIB1ASMSRC = arm/lib1funcs.asm + LIB1ASMFUNCS = _thumb1_case_sqi _thumb1_case_uqi _thumb1_case_shi \ + diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99479.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99479.patch new file mode 100644 index 0000000000..2920466d8f --- /dev/null +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99479.patch @@ -0,0 +1,101 @@ +2011-02-24 Chung-Lin Tang + + Backport from FSF mainline: + + 2010-08-10 Bernd Schmidt + + PR bootstrap/45177 + * config/arm/arm.c (multiple_operation_profitable_p): Move xscale + test here from arm_gen_load_multiple_1. + (arm_gen_load_multiple_1, arm_gen_store_multiple_1): Use + multiple_operation_profitable_p. + +=== modified file 'gcc/config/arm/arm.c' +--- old/gcc/config/arm/arm.c 2011-02-22 11:38:56 +0000 ++++ new/gcc/config/arm/arm.c 2011-02-24 17:30:32 +0000 +@@ -9728,6 +9728,36 @@ + if (nops == 2 && arm_ld_sched && add_offset != 0) + return false; + ++ /* XScale has load-store double instructions, but they have stricter ++ alignment requirements than load-store multiple, so we cannot ++ use them. ++ ++ For XScale ldm requires 2 + NREGS cycles to complete and blocks ++ the pipeline until completion. ++ ++ NREGS CYCLES ++ 1 3 ++ 2 4 ++ 3 5 ++ 4 6 ++ ++ An ldr instruction takes 1-3 cycles, but does not block the ++ pipeline. ++ ++ NREGS CYCLES ++ 1 1-3 ++ 2 2-6 ++ 3 3-9 ++ 4 4-12 ++ ++ Best case ldr will always win. However, the more ldr instructions ++ we issue, the less likely we are to be able to schedule them well. ++ Using ldr instructions also increases code size. ++ ++ As a compromise, we use ldr for counts of 1 or 2 regs, and ldm ++ for counts of 3 or 4 regs. */ ++ if (nops <= 2 && arm_tune_xscale && !optimize_size) ++ return false; + return true; + } + +@@ -10086,35 +10116,7 @@ + int i = 0, j; + rtx result; + +- /* XScale has load-store double instructions, but they have stricter +- alignment requirements than load-store multiple, so we cannot +- use them. +- +- For XScale ldm requires 2 + NREGS cycles to complete and blocks +- the pipeline until completion. +- +- NREGS CYCLES +- 1 3 +- 2 4 +- 3 5 +- 4 6 +- +- An ldr instruction takes 1-3 cycles, but does not block the +- pipeline. +- +- NREGS CYCLES +- 1 1-3 +- 2 2-6 +- 3 3-9 +- 4 4-12 +- +- Best case ldr will always win. However, the more ldr instructions +- we issue, the less likely we are to be able to schedule them well. +- Using ldr instructions also increases code size. +- +- As a compromise, we use ldr for counts of 1 or 2 regs, and ldm +- for counts of 3 or 4 regs. */ +- if (low_irq_latency || (arm_tune_xscale && count <= 2 && ! optimize_size)) ++ if (low_irq_latency || !multiple_operation_profitable_p (false, count, 0)) + { + rtx seq; + +@@ -10166,9 +10168,7 @@ + if (GET_CODE (basereg) == PLUS) + basereg = XEXP (basereg, 0); + +- /* See arm_gen_load_multiple_1 for discussion of +- the pros/cons of ldm/stm usage for XScale. */ +- if (low_irq_latency || (arm_tune_xscale && count <= 2 && ! optimize_size)) ++ if (low_irq_latency || !multiple_operation_profitable_p (false, count, 0)) + { + rtx seq; + + diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99480.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99480.patch new file mode 100644 index 0000000000..76d3c9565c --- /dev/null +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99480.patch @@ -0,0 +1,64 @@ +2011-02-02 Richard Sandiford + + + gcc/ + PR target/47551 + * config/arm/arm.c (coproc_secondary_reload_class): Handle + structure modes. Don't check neon_vector_mem_operand for + vector or structure modes. + + gcc/testsuite/ + PR target/47551 + * gcc.target/arm/neon-modes-2.c: New test. + +=== modified file 'gcc/config/arm/arm.c' +--- old/gcc/config/arm/arm.c 2011-02-24 17:30:32 +0000 ++++ new/gcc/config/arm/arm.c 2011-03-02 11:29:06 +0000 +@@ -9303,11 +9303,14 @@ + return GENERAL_REGS; + } + ++ /* The neon move patterns handle all legitimate vector and struct ++ addresses. */ + if (TARGET_NEON ++ && MEM_P (x) + && (GET_MODE_CLASS (mode) == MODE_VECTOR_INT +- || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT) +- && neon_vector_mem_operand (x, 0)) +- return NO_REGS; ++ || GET_MODE_CLASS (mode) == MODE_VECTOR_FLOAT ++ || VALID_NEON_STRUCT_MODE (mode))) ++ return NO_REGS; + + if (arm_coproc_mem_operand (x, wb) || s_register_operand (x, mode)) + return NO_REGS; + +=== added file 'gcc/testsuite/gcc.target/arm/neon-modes-2.c' +--- old/gcc/testsuite/gcc.target/arm/neon-modes-2.c 1970-01-01 00:00:00 +0000 ++++ new/gcc/testsuite/gcc.target/arm/neon-modes-2.c 2011-02-02 13:48:10 +0000 +@@ -0,0 +1,24 @@ ++/* { dg-do compile } */ ++/* { dg-require-effective-target arm_neon_ok } */ ++/* { dg-options "-O1" } */ ++/* { dg-add-options arm_neon } */ ++ ++#include "arm_neon.h" ++ ++#define SETUP(A) x##A = vld3_u32 (ptr + A * 0x20) ++#define MODIFY(A) x##A = vld3_lane_u32 (ptr + A * 0x20 + 0x10, x##A, 1) ++#define STORE(A) vst3_u32 (ptr + A * 0x20, x##A) ++ ++#define MANY(A) A (0), A (1), A (2), A (3), A (4), A (5) ++ ++void ++bar (uint32_t *ptr, int y) ++{ ++ uint32x2x3_t MANY (SETUP); ++ int *x = __builtin_alloca (y); ++ int z[0x1000]; ++ foo (x, z); ++ MANY (MODIFY); ++ foo (x, z); ++ MANY (STORE); ++} + diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99481.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99481.patch new file mode 100644 index 0000000000..db53255de8 --- /dev/null +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99481.patch @@ -0,0 +1,40 @@ + 2011-02-02 Richard Sandiford + + gcc/testsuite/ + PR target/47553 + * gcc.target/arm/neon-vld-1.c: New test. + gcc/ + PR target/47553 + * config/arm/predicates.md (neon_lane_number): Accept 0..15. + +=== modified file 'gcc/config/arm/predicates.md' +--- old/gcc/config/arm/predicates.md 2011-02-08 12:07:29 +0000 ++++ new/gcc/config/arm/predicates.md 2011-03-02 12:28:41 +0000 +@@ -607,7 +607,7 @@ + ;; TODO: We could check lane numbers more precisely based on the mode. + (define_predicate "neon_lane_number" + (and (match_code "const_int") +- (match_test "INTVAL (op) >= 0 && INTVAL (op) <= 7"))) ++ (match_test "INTVAL (op) >= 0 && INTVAL (op) <= 15"))) + ;; Predicates for named expanders that overlap multiple ISAs. + + (define_predicate "cmpdi_operand" + +=== added file 'gcc/testsuite/gcc.target/arm/neon-vld-1.c' +--- old/gcc/testsuite/gcc.target/arm/neon-vld-1.c 1970-01-01 00:00:00 +0000 ++++ new/gcc/testsuite/gcc.target/arm/neon-vld-1.c 2011-02-02 13:57:54 +0000 +@@ -0,0 +1,13 @@ ++/* { dg-do compile } */ ++/* { dg-require-effective-target arm_neon_ok } */ ++/* { dg-options "-O1" } */ ++/* { dg-add-options arm_neon } */ ++ ++#include ++ ++uint8x16_t ++foo (uint8_t *a, uint8x16_t b) ++{ ++ vst1q_lane_u8 (a, b, 14); ++ return vld1q_lane_u8 (a + 0x100, b, 15); ++} + diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99482.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99482.patch new file mode 100644 index 0000000000..334ac4ec1a --- /dev/null +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99482.patch @@ -0,0 +1,84 @@ + 2011-02-02 Richard Sandiford + + gcc/ + Backport from mainline: + + 2011-01-23 Bernd Schmidt + Richard Sandiford + + PR rtl-optimization/47166 + * reload1.c (emit_reload_insns): Disable the spill_reg_store + mechanism for PRE_MODIFY and POST_MODIFY. + (inc_for_reload): For PRE_MODIFY, return the insn that sets the + reloadreg. + + gcc/testsuite/ + * gcc.c-torture/execute/postmod-1.c: New test. + +=== added file 'gcc/testsuite/gcc.c-torture/execute/postmod-1.c' +--- old/gcc/testsuite/gcc.c-torture/execute/postmod-1.c 1970-01-01 00:00:00 +0000 ++++ new/gcc/testsuite/gcc.c-torture/execute/postmod-1.c 2011-02-02 14:23:10 +0000 +@@ -0,0 +1,62 @@ ++#define DECLARE_ARRAY(A) array##A[0x10] ++#define DECLARE_COUNTER(A) counter##A = 0 ++#define DECLARE_POINTER(A) *pointer##A = array##A + x ++/* Create a loop that allows post-modification of pointerA, followed by ++ a use of the post-modified address. */ ++#define BEFORE(A) counter##A += *pointer##A, pointer##A += 3 ++#define AFTER(A) counter##A += pointer##A[x] ++ ++/* Set up the arrays so that one iteration of the loop sets the counter ++ to 3.0f. */ ++#define INIT_ARRAY(A) array##A[1] = 1.0f, array##A[5] = 2.0f ++ ++/* Check that the loop worked correctly for all values. */ ++#define CHECK_ARRAY(A) exit_code |= (counter##A != 3.0f) ++ ++/* Having 6 copies triggered the bug for ARM and Thumb. */ ++#define MANY(A) A (0), A (1), A (2), A (3), A (4), A (5) ++ ++/* Each addendA should be allocated a register. */ ++#define INIT_VOLATILE(A) addend##A = vol ++#define ADD_VOLATILE(A) vol += addend##A ++ ++/* Having 5 copies triggered the bug for ARM and Thumb. */ ++#define MANY2(A) A (0), A (1), A (2), A (3), A (4) ++ ++float MANY (DECLARE_ARRAY); ++float MANY (DECLARE_COUNTER); ++ ++volatile int stop = 1; ++volatile int vol; ++ ++void __attribute__((noinline)) ++foo (int x) ++{ ++ float MANY (DECLARE_POINTER); ++ int i; ++ ++ do ++ { ++ MANY (BEFORE); ++ MANY (AFTER); ++ /* Create an inner loop that should ensure the code above ++ has registers free for reload inheritance. */ ++ { ++ int MANY2 (INIT_VOLATILE); ++ for (i = 0; i < 10; i++) ++ MANY2 (ADD_VOLATILE); ++ } ++ } ++ while (!stop); ++} ++ ++int ++main (void) ++{ ++ int exit_code = 0; ++ ++ MANY (INIT_ARRAY); ++ foo (1); ++ MANY (CHECK_ARRAY); ++ return exit_code; ++} + diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99483.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99483.patch new file mode 100644 index 0000000000..c0be4a03b1 --- /dev/null +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99483.patch @@ -0,0 +1,63 @@ +2011-02-11 Richard Sandiford + + gcc/ + * cse.c (count_reg_usage): Check side_effects_p. Remove the + separate check for volatile asms. + + gcc/testsuite/ + * gcc.dg/torture/volatile-pic-1.c: New test. + +=== modified file 'gcc/cse.c' +--- old/gcc/cse.c 2010-11-26 12:03:32 +0000 ++++ new/gcc/cse.c 2011-02-11 09:27:19 +0000 +@@ -6634,9 +6634,10 @@ + case CALL_INSN: + case INSN: + case JUMP_INSN: +- /* We expect dest to be NULL_RTX here. If the insn may trap, mark +- this fact by setting DEST to pc_rtx. */ +- if (insn_could_throw_p (x)) ++ /* We expect dest to be NULL_RTX here. If the insn may trap, ++ or if it cannot be deleted due to side-effects, mark this fact ++ by setting DEST to pc_rtx. */ ++ if (insn_could_throw_p (x) || side_effects_p (PATTERN (x))) + dest = pc_rtx; + if (code == CALL_INSN) + count_reg_usage (CALL_INSN_FUNCTION_USAGE (x), counts, dest, incr); +@@ -6676,10 +6677,6 @@ + return; + + case ASM_OPERANDS: +- /* If the asm is volatile, then this insn cannot be deleted, +- and so the inputs *must* be live. */ +- if (MEM_VOLATILE_P (x)) +- dest = NULL_RTX; + /* Iterate over just the inputs, not the constraints as well. */ + for (i = ASM_OPERANDS_INPUT_LENGTH (x) - 1; i >= 0; i--) + count_reg_usage (ASM_OPERANDS_INPUT (x, i), counts, dest, incr); + +=== added file 'gcc/testsuite/gcc.dg/torture/volatile-pic-1.c' +--- old/gcc/testsuite/gcc.dg/torture/volatile-pic-1.c 1970-01-01 00:00:00 +0000 ++++ new/gcc/testsuite/gcc.dg/torture/volatile-pic-1.c 2011-02-11 09:27:19 +0000 +@@ -0,0 +1,20 @@ ++/* { dg-do run } */ ++/* { dg-require-visibility "" } */ ++/* { dg-require-effective-target fpic } */ ++/* { dg-options "-fPIC" } */ ++ ++volatile int x __attribute__((visibility("hidden"))); ++ ++void __attribute__((noinline)) bar (void) ++{ ++#if defined (__arm__) ++ asm volatile ("mov r3,%0" :: "r" (0xdeadbeef) : "r3"); ++#endif ++ (void) x; ++} ++ ++int main (void) ++{ ++ bar (); ++ return 0; ++} + diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99486.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99486.patch new file mode 100644 index 0000000000..e6b58ac872 --- /dev/null +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99486.patch @@ -0,0 +1,230 @@ +2011-03-09 Bernd Schmidt + + Issue #10649 + gcc/ + * dwarf2out.c (dwarf2out_begin_epilogue): Accept simplejumps + as well as returnjumps. + * cfganal.c (set_edge_can_fallthru_flag): Revert previous change + that tried to keep epilogue blocks adjacent. + +2011-02-03 Bernd Schmidt + + gcc/ + * function.c (prepare_shrink_wrap): New function. + (thread_prologue_and_epilogue_insns): Call it. + +=== modified file 'gcc/cfganal.c' +--- old/gcc/cfganal.c 2011-02-08 10:51:58 +0000 ++++ new/gcc/cfganal.c 2011-03-10 14:55:10 +0000 +@@ -271,37 +271,6 @@ + EDGE_SUCC (bb, 0)->flags |= EDGE_CAN_FALLTHRU; + EDGE_SUCC (bb, 1)->flags |= EDGE_CAN_FALLTHRU; + } +- /* dwarf2out expects that a NOTE_INSN_EPILOGUE_BEGIN is always paired +- with a return or a sibcall. Ensure that this remains the case if +- they are in different basic blocks. */ +- FOR_EACH_BB (bb) +- { +- edge e; +- edge_iterator ei; +- rtx insn, end; +- +- end = BB_END (bb); +- FOR_BB_INSNS (bb, insn) +- if (GET_CODE (insn) == NOTE +- && NOTE_KIND (insn) == NOTE_INSN_EPILOGUE_BEG +- && !(CALL_P (end) && SIBLING_CALL_P (end)) +- && !returnjump_p (end)) +- { +- basic_block other_bb = NULL; +- FOR_EACH_EDGE (e, ei, bb->succs) +- { +- if (e->flags & EDGE_FALLTHRU) +- other_bb = e->dest; +- else +- e->flags &= ~EDGE_CAN_FALLTHRU; +- } +- FOR_EACH_EDGE (e, ei, other_bb->preds) +- { +- if (!(e->flags & EDGE_FALLTHRU)) +- e->flags &= ~EDGE_CAN_FALLTHRU; +- } +- } +- } + } + + /* Find unreachable blocks. An unreachable block will have 0 in + +=== modified file 'gcc/dwarf2out.c' +--- old/gcc/dwarf2out.c 2011-02-08 10:51:58 +0000 ++++ new/gcc/dwarf2out.c 2011-03-10 14:55:10 +0000 +@@ -2782,10 +2782,10 @@ + dwarf2out_frame_debug_expr (insn, label); + } + +-/* Determine if we need to save and restore CFI information around this +- epilogue. If SIBCALL is true, then this is a sibcall epilogue. If +- we do need to save/restore, then emit the save now, and insert a +- NOTE_INSN_CFA_RESTORE_STATE at the appropriate place in the stream. */ ++/* Determine if we need to save and restore CFI information around ++ this epilogue. If we do need to save/restore, then emit the save ++ now, and insert a NOTE_INSN_CFA_RESTORE_STATE at the appropriate ++ place in the stream. */ + + void + dwarf2out_begin_epilogue (rtx insn) +@@ -2800,8 +2800,10 @@ + if (!INSN_P (i)) + continue; + +- /* Look for both regular and sibcalls to end the block. */ +- if (returnjump_p (i)) ++ /* Look for both regular and sibcalls to end the block. Various ++ optimization passes may cause us to jump to a common epilogue ++ tail, so we also accept simplejumps. */ ++ if (returnjump_p (i) || simplejump_p (i)) + break; + if (CALL_P (i) && SIBLING_CALL_P (i)) + break; + +=== modified file 'gcc/function.c' +--- old/gcc/function.c 2011-02-08 10:51:58 +0000 ++++ new/gcc/function.c 2011-03-10 14:55:10 +0000 +@@ -5038,6 +5038,127 @@ + return true; + return false; + } ++ ++/* Look for sets of call-saved registers in the first block of the ++ function, and move them down into successor blocks if the register ++ is used only on one path. This exposes more opportunities for ++ shrink-wrapping. ++ These kinds of sets often occur when incoming argument registers are ++ moved to call-saved registers because their values are live across ++ one or more calls during the function. */ ++ ++static void ++prepare_shrink_wrap (basic_block entry_block) ++{ ++ rtx insn, curr; ++ FOR_BB_INSNS_SAFE (entry_block, insn, curr) ++ { ++ basic_block next_bb; ++ edge e, live_edge; ++ edge_iterator ei; ++ rtx set, scan; ++ unsigned destreg, srcreg; ++ ++ if (!NONDEBUG_INSN_P (insn)) ++ continue; ++ set = single_set (insn); ++ if (!set) ++ continue; ++ ++ if (!REG_P (SET_SRC (set)) || !REG_P (SET_DEST (set))) ++ continue; ++ srcreg = REGNO (SET_SRC (set)); ++ destreg = REGNO (SET_DEST (set)); ++ if (hard_regno_nregs[srcreg][GET_MODE (SET_SRC (set))] > 1 ++ || hard_regno_nregs[destreg][GET_MODE (SET_DEST (set))] > 1) ++ continue; ++ ++ next_bb = entry_block; ++ scan = insn; ++ ++ for (;;) ++ { ++ live_edge = NULL; ++ FOR_EACH_EDGE (e, ei, next_bb->succs) ++ { ++ if (REGNO_REG_SET_P (df_get_live_in (e->dest), destreg)) ++ { ++ if (live_edge) ++ { ++ live_edge = NULL; ++ break; ++ } ++ live_edge = e; ++ } ++ } ++ if (!live_edge) ++ break; ++ /* We can sometimes encounter dead code. Don't try to move it ++ into the exit block. */ ++ if (live_edge->dest == EXIT_BLOCK_PTR) ++ break; ++ if (EDGE_COUNT (live_edge->dest->preds) > 1) ++ break; ++ while (scan != BB_END (next_bb)) ++ { ++ scan = NEXT_INSN (scan); ++ if (NONDEBUG_INSN_P (scan)) ++ { ++ rtx link; ++ HARD_REG_SET set_regs; ++ ++ CLEAR_HARD_REG_SET (set_regs); ++ note_stores (PATTERN (scan), record_hard_reg_sets, ++ &set_regs); ++ if (CALL_P (scan)) ++ IOR_HARD_REG_SET (set_regs, call_used_reg_set); ++ for (link = REG_NOTES (scan); link; link = XEXP (link, 1)) ++ if (REG_NOTE_KIND (link) == REG_INC) ++ record_hard_reg_sets (XEXP (link, 0), NULL, &set_regs); ++ ++ if (TEST_HARD_REG_BIT (set_regs, srcreg) ++ || reg_referenced_p (SET_DEST (set), ++ PATTERN (scan))) ++ { ++ scan = NULL_RTX; ++ break; ++ } ++ if (CALL_P (scan)) ++ { ++ rtx link = CALL_INSN_FUNCTION_USAGE (scan); ++ while (link) ++ { ++ rtx tmp = XEXP (link, 0); ++ if (GET_CODE (tmp) == USE ++ && reg_referenced_p (SET_DEST (set), tmp)) ++ break; ++ link = XEXP (link, 1); ++ } ++ if (link) ++ { ++ scan = NULL_RTX; ++ break; ++ } ++ } ++ } ++ } ++ if (!scan) ++ break; ++ next_bb = live_edge->dest; ++ } ++ ++ if (next_bb != entry_block) ++ { ++ rtx after = BB_HEAD (next_bb); ++ while (!NOTE_P (after) ++ || NOTE_KIND (after) != NOTE_INSN_BASIC_BLOCK) ++ after = NEXT_INSN (after); ++ emit_insn_after (PATTERN (insn), after); ++ delete_insn (insn); ++ } ++ } ++} ++ + #endif + + #ifdef HAVE_return +@@ -5215,6 +5336,8 @@ + bitmap_head bb_antic_flags; + bitmap_head bb_on_list; + ++ prepare_shrink_wrap (entry_edge->dest); ++ + bitmap_initialize (&bb_antic_flags, &bitmap_default_obstack); + bitmap_initialize (&bb_on_list, &bitmap_default_obstack); + + diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99487.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99487.patch new file mode 100644 index 0000000000..186c17717f --- /dev/null +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99487.patch @@ -0,0 +1,42 @@ +2011-03-11 Andrew Stubbs + Michael Hope + Matthias Klose + + gcc/ + * function. (thread_prologue_and_epilogue_insns): Initialize + prologue_seq. + * opts.c (decode_options): Move flag_shrink_wrap to -O1. + +=== modified file 'gcc/function.c' +--- old/gcc/function.c 2011-03-10 14:55:10 +0000 ++++ new/gcc/function.c 2011-03-11 10:35:05 +0000 +@@ -5252,6 +5252,8 @@ + edge_iterator ei; + bitmap_head bb_flags; + ++ prologue_seq = NULL_RTX; ++ + df_analyze (); + + rtl_profile_for_bb (ENTRY_BLOCK_PTR); + +=== modified file 'gcc/opts.c' +--- old/gcc/opts.c 2011-02-08 10:51:58 +0000 ++++ new/gcc/opts.c 2011-03-11 10:35:05 +0000 +@@ -877,6 +877,7 @@ + flag_tree_copy_prop = opt1; + flag_tree_sink = opt1; + flag_tree_ch = opt1; ++ flag_shrink_wrap = opt1; + + /* -O2 optimizations. */ + opt2 = (optimize >= 2); +@@ -909,7 +910,6 @@ + flag_ipa_cp = opt2; + flag_ipa_sra = opt2; + flag_ee = opt2; +- flag_shrink_wrap = opt2; + + /* Track fields in field-sensitive alias analysis. */ + set_param_value ("max-fields-for-field-sensitive", + diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99488.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99488.patch new file mode 100644 index 0000000000..2f41a0a73c --- /dev/null +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99488.patch @@ -0,0 +1,22 @@ +2011-03-03 Richard Sandiford + + gcc/ + * ee.c (reg_use_p): Handle subregs of promoted vars. + +=== modified file 'gcc/ee.c' +--- old/gcc/ee.c 2010-12-10 15:33:37 +0000 ++++ new/gcc/ee.c 2011-03-03 17:08:58 +0000 +@@ -209,7 +209,11 @@ + + *regno = REGNO (reg); + +- if (paradoxical_subreg_p (use)) ++ /* Non-paradoxical SUBREGs of promoted vars guarantee that the ++ upper (elided) bits of the inner register have a particular value. ++ For our purposes, such SUBREGs act as a full reference to the ++ inner register. */ ++ if (paradoxical_subreg_p (use) || SUBREG_PROMOTED_VAR_P (use)) + *size = GET_MODE_BITSIZE (GET_MODE (reg)); + else + *size = subreg_lsb (use) + GET_MODE_BITSIZE (GET_MODE (use)); + diff --git a/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99489.patch b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99489.patch new file mode 100644 index 0000000000..12fb56ad02 --- /dev/null +++ b/recipes/gcc/gcc-4.5/linaro/gcc-4.5-linaro-r99489.patch @@ -0,0 +1,61 @@ +2011-03-10 Ramana Radhakrishnan + + LP:730440 + PR target/47668 + gcc/ + * config/arm/arm.md (arm_movtas_ze): Use 'L' instead of 'c'. + gcc/testsuite/ + * gcc.target/arm/pr47688.c: New. + +=== modified file 'gcc/config/arm/arm.md' +--- old/gcc/config/arm/arm.md 2011-03-01 14:32:39 +0000 ++++ new/gcc/config/arm/arm.md 2011-03-11 14:26:34 +0000 +@@ -11133,13 +11133,15 @@ + [(set_attr "conds" "clob")] + ) + ++;; We only care about the lower 16 bits of the constant ++;; being inserted into the upper 16 bits of the register. + (define_insn "*arm_movtas_ze" + [(set (zero_extract:SI (match_operand:SI 0 "s_register_operand" "+r") + (const_int 16) + (const_int 16)) + (match_operand:SI 1 "const_int_operand" ""))] + "arm_arch_thumb2" +- "movt%?\t%0, %c1" ++ "movt%?\t%0, %L1" + [(set_attr "predicable" "yes") + (set_attr "length" "4")] + ) + +=== added file 'gcc/testsuite/gcc.target/arm/pr47688.c' +--- old/gcc/testsuite/gcc.target/arm/pr47688.c 1970-01-01 00:00:00 +0000 ++++ new/gcc/testsuite/gcc.target/arm/pr47688.c 2011-03-11 14:26:34 +0000 +@@ -0,0 +1,26 @@ ++/* { dg-options "-mthumb -O2" } */ ++/* { dg-require-effective-target arm_thumb2_ok } */ ++/* { dg-final { scan-assembler-not "-32768" } } */ ++ ++typedef union ++{ ++ unsigned long int u_32_value; ++ struct ++ { ++ unsigned short int u_16_value_0; ++ unsigned short int u_16_value_1; ++ } u_16_values; ++} my_union; ++ ++ ++unsigned long int Test(const unsigned short int wXe) ++{ ++ my_union dwCalcVal; ++ ++ dwCalcVal.u_16_values.u_16_value_0=wXe; ++ dwCalcVal.u_16_values.u_16_value_1=0x8000u; ++ ++ dwCalcVal.u_32_value /=3; ++ ++ return (dwCalcVal.u_32_value); ++} + diff --git a/recipes/gcc/gcc-4.5/more-epilogues.patch b/recipes/gcc/gcc-4.5/more-epilogues.patch new file mode 100644 index 0000000000..64f1cf3751 --- /dev/null +++ b/recipes/gcc/gcc-4.5/more-epilogues.patch @@ -0,0 +1,83 @@ +Index: a/gcc/cfgcleanup.c +=================================================================== +--- a/gcc/cfgcleanup.c (revision 315947) ++++ b/gcc/cfgcleanup.c (working copy) +@@ -1179,13 +1179,19 @@ flow_find_head_matching_sequence (basic_ + + while (true) + { +- +- /* Ignore notes. */ ++ /* Ignore notes, except NOTE_INSN_EPILOGUE_BEG. */ + while (!NONDEBUG_INSN_P (i1) && i1 != BB_END (bb1)) +- i1 = NEXT_INSN (i1); +- ++ { ++ if (NOTE_P (i1) && NOTE_KIND (i1) == NOTE_INSN_EPILOGUE_BEG) ++ break; ++ i1 = NEXT_INSN (i1); ++ } + while (!NONDEBUG_INSN_P (i2) && i2 != BB_END (bb2)) +- i2 = NEXT_INSN (i2); ++ { ++ if (NOTE_P (i2) && NOTE_KIND (i2) == NOTE_INSN_EPILOGUE_BEG) ++ break; ++ i2 = NEXT_INSN (i2); ++ } + + if (NOTE_P (i1) || NOTE_P (i2) + || JUMP_P (i1) || JUMP_P (i2)) +Index: a/gcc/cfglayout.c +=================================================================== +--- a/gcc/cfglayout.c (revision 315947) ++++ b/gcc/cfglayout.c (working copy) +@@ -1295,6 +1295,16 @@ cfg_layout_initialize (unsigned int flag + bb->flags |= BB_NON_LOCAL_GOTO_TARGET; + } + ++ FOR_EACH_BB (bb) ++ { ++ rtx insn; ++ FOR_BB_INSNS (bb, insn) ++ if (NOTE_P (insn) && NOTE_KIND (insn) == NOTE_INSN_EPILOGUE_BEG) ++ { ++ bb->flags |= BB_EPILOGUE_BEGIN; ++ break; ++ } ++ } + cleanup_cfg (CLEANUP_CFGLAYOUT | flags); + } + +Index: a/gcc/basic-block.h +=================================================================== +--- a/gcc/basic-block.h (revision 315947) ++++ b/gcc/basic-block.h (working copy) +@@ -332,7 +332,11 @@ enum bb_flags + + /* Set on blocks that cannot be threaded through. + Only used in cfgcleanup.c. */ +- BB_NONTHREADABLE_BLOCK = 1 << 11 ++ BB_NONTHREADABLE_BLOCK = 1 << 11, ++ ++ /* Set on blocks that have a NOTE_INSN_EPILOGUE_BEGIN. ++ Only used in cfglayout mode. */ ++ BB_EPILOGUE_BEGIN = 1 << 12 + }; + + /* Dummy flag for convenience in the hot/cold partitioning code. */ +Index: a/gcc/cfgrtl.c +=================================================================== +--- a/gcc/cfgrtl.c (revision 315947) ++++ b/gcc/cfgrtl.c (working copy) +@@ -2707,7 +2707,10 @@ cfg_layout_can_merge_blocks_p (basic_blo + not allow us to redirect an edge by replacing a table jump. */ + && (!JUMP_P (BB_END (a)) + || ((!optimize || reload_completed) +- ? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a))))); ++ ? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a)))) ++ /* Don't separate a NOTE_INSN_EPILOGUE_BEG from its returnjump. */ ++ && (!(b->flags & BB_EPILOGUE_BEGIN) ++ || returnjump_p (BB_END (b)))); + } + + /* Merge block A and B. The blocks must be mergeable. */ diff --git a/recipes/gcc/gcc-common.inc b/recipes/gcc/gcc-common.inc index 9fd433b74f..d32b2ba002 100644 --- a/recipes/gcc/gcc-common.inc +++ b/recipes/gcc/gcc-common.inc @@ -15,8 +15,16 @@ COMPATIBLE_TARGET_SYS ?= "(?!nios2)" # for building for the new host part. So only obey TARGET_FPU for the # real target. def get_gcc_fpu_setting(bb, d): - if bb.data.getVar('TARGET_FPU', d, 1) in [ 'soft' ] and bb.data.getVar('TARGET_OS', d, 1).find('linux') >= 0 : - return "--with-float=soft" + if bb.data.getVar('TARGET_FPU', d, True) in [ 'soft', 'hard'] and bb.data.getVar('TARGET_OS', d, True).find('linux') >= 0 : + # ARM_FP_ABI could be either 'hardfp' or 'softfp' + arm_fpabi = bb.data.getVar('ARM_FP_ABI', d, True) or "" + if arm_fpabi != "": + if arm_fpabi == "hardfp": + # reset it to whatever gcc --with-float configure expects which is either 'softfp' or 'hard' + arm_fpabi = "hard" + return "--with-float=" + arm_fpabi + else: + return "--with-float=" + bb.data.getVar('TARGET_FPU', d, True) return "" def get_gcc_mips_plt_setting(bb, d): diff --git a/recipes/gcc/gcc-package-cross.inc b/recipes/gcc/gcc-package-cross.inc index f9a7eebca0..8d52b6ff99 100644 --- a/recipes/gcc/gcc-package-cross.inc +++ b/recipes/gcc/gcc-package-cross.inc @@ -14,7 +14,6 @@ FILES_libssp = "${target_libdir}/libssp.so.*" FILES_libgfortran = "${target_libdir}/libgfortran.so.*" FILES_libgcc = "${target_base_libdir}/libgcc_s.so.1" -FILES_libgcc-dev = "${target_libdir}/libgcc_s.so" FILES_libstdc++ = "${target_libdir}/libstdc++.so.*" @@ -68,5 +67,10 @@ GROUP ( libgcc_s.so.1 libgcc.a )" > ${D}${target_libdir}/libgcc_s.so # We use libiberty from binutils or binutils-cross rm -f ${D}${libdir}/libiberty.a rm -f ${D}${target_libdir}/libiberty.a + if [ -f ${D}${target_libdir}/libstdc++.so.*-gdb.py ]; then + # move the gdb python helpers to gdb auto-load directory + install -d ${D}${target_datadir}/gdb/auto-load${target_libdir} + mv -f ${D}${target_libdir}/libstdc++.so.*-gdb.py* ${D}${target_datadir}/gdb/auto-load${target_libdir} + fi } diff --git a/recipes/gcc/gcc-package-target.inc b/recipes/gcc/gcc-package-target.inc index 438c314b6f..cc2b48b0d9 100644 --- a/recipes/gcc/gcc-package-target.inc +++ b/recipes/gcc/gcc-package-target.inc @@ -82,6 +82,7 @@ FILES_libstdc++-dev = "\ ${libdir}/libstdc++.a \ ${libdir}/libsupc++.la \ ${libdir}/libsupc++.a \ + ${datadir}/gdb/auto-load${libdir}/libstdc++.so.*-gdb.py* \ " FILES_libgfortran-dev = "${libdir}/libgfortran.a \ @@ -155,17 +156,20 @@ GROUP ( libgcc_s.so.1 libgcc.a )" > ${D}${libdir}/libgcc_s.so rm -f ${TARGET_ARCH}-*${TARGET_ARCH}-* # Symlinks so we can use these trivially on the target - ln -sf ${TARGET_SYS}-g77 g77 || true - ln -sf ${TARGET_SYS}-gfortran gfortran || true - ln -sf ${TARGET_SYS}-g++ g++ - ln -sf ${TARGET_SYS}-gcc gcc + ln -sf ${TARGET_PREFIX}gfortran g77 || true + ln -sf ${TARGET_PREFIX}gfortran gfortran || true + ln -sf ${TARGET_PREFIX}g++ g++ + ln -sf ${TARGET_PREFIX}gcc gcc ln -sf g77 f77 || true ln -sf gfortran f95 || true ln -sf g++ c++ ln -sf gcc cc - ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${base_libdir}/cpp - ln -sf ${bindir}/${TARGET_SYS}-cpp ${D}${bindir}/cpp + ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${base_libdir}/cpp + ln -sf ${bindir}/${TARGET_PREFIX}cpp ${D}${bindir}/cpp # Remove precompiled c++ headers as they are really big rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_SYS}/bits/*.gch + # move the gdb python helpers to gdb auto-load directory + install -d ${D}${datadir}/gdb/auto-load/${libdir} + mv ${D}${libdir}/libstdc++.so.*-gdb.py* ${D}${datadir}/gdb/auto-load${libdir} || true } diff --git a/recipes/gimp/gimp.inc b/recipes/gimp/gimp.inc index c3f2393243..c07d0dde00 100644 --- a/recipes/gimp/gimp.inc +++ b/recipes/gimp/gimp.inc @@ -3,7 +3,7 @@ HOMEPAGE = "http://www.gimp.org" SECTION = "x11/graphics" LICENSE = "GPL" -DEPENDS = "sed-native gdk-pixbuf-csource-native libart-lgpl gtk+ jpeg libpng libexif tiff" +DEPENDS = "gdk-pixbuf-csource-native libart-lgpl gtk+ jpeg libpng libexif tiff" SRC_URI = "ftp://ftp.gimp.org/pub/gimp/v2.3/gimp-${PV}.tar.bz2 \ file://configure-libwmf.patch" diff --git a/recipes/git/git-1.7.3.5/gitconfig b/recipes/git/git-1.7.3.5/gitconfig new file mode 100644 index 0000000000..61bcb1c5d0 --- /dev/null +++ b/recipes/git/git-1.7.3.5/gitconfig @@ -0,0 +1,7 @@ +[color] + diff = auto + status = auto + branch = auto + +[core] + pager = more diff --git a/recipes/git/git_1.7.3.5.bb b/recipes/git/git_1.7.3.5.bb index e17f5a9dac..0ecf15bd10 100644 --- a/recipes/git/git_1.7.3.5.bb +++ b/recipes/git/git_1.7.3.5.bb @@ -1,8 +1,10 @@ require git.inc -SRC_URI += "file://git-less-hardlinks.diff" +SRC_URI += "file://git-less-hardlinks.diff \ + file://gitconfig \ + " -EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no ac_cv_c_c99_format=yes" +EXTRA_OECONF += "ac_cv_snprintf_returns_bogus=no ac_cv_c_c99_format=yes --prefix=''" DEPENDS = "openssl curl zlib expat tcl-native" @@ -25,6 +27,8 @@ do_install_append() { ln -sf ${bindir}/$gitprog ${D}${libexecdir}/git-core/$gitprog done rm ${D}${libexecdir}/git-core/git && ln -sf ${bindir}/git ${D}${libexecdir}/git-core/git + install -m 0755 -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/gitconfig ${D}${sysconfdir} } FILES_${PN}-dbg += "${libexecdir}/git-core/.debug" @@ -72,13 +76,13 @@ FILES_${PN}-large += " \ RDEPENDS_${PN}-large = "${PN}" # git-tk package with gitk and git-gui -PACKAGES =+ "${PN}-tk" -RDEPENDS_${PN}-tk = "${PN} tk tcl" -EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh" -FILES_${PN}-tk = " \ - ${bindir}/gitk \ - ${datadir}/gitk \ -" +# PACKAGES =+ "${PN}-tk" +# RDEPENDS_${PN}-tk = "${PN} tk tcl" +# EXTRA_OEMAKE = "TCL_PATH=${STAGING_BINDIR_CROSS}/tclsh" +# FILES_${PN}-tk = " \ +# ${bindir}/gitk \ +# ${datadir}/gitk \ +#" # git gui does not start at all at this time #FILES_${PN}-tk += " \ # ${libexecdir}/git-core/git-gui \ diff --git a/recipes/glib-2.0/glib-2.0-2.28.5/60_wait-longer-for-threads-to-die.patch b/recipes/glib-2.0/glib-2.0-2.28.5/60_wait-longer-for-threads-to-die.patch new file mode 100644 index 0000000000..02fe9ff0ab --- /dev/null +++ b/recipes/glib-2.0/glib-2.0-2.28.5/60_wait-longer-for-threads-to-die.patch @@ -0,0 +1,26 @@ +--- glib/tests/threadpool-test.c.old 2008-02-12 06:11:21.000000000 +0100 ++++ glib/tests/threadpool-test.c 2008-02-12 06:11:52.000000000 +0100 +@@ -5,8 +5,8 @@ + + #include + +-#define DEBUG_MSG(x) +-/* #define DEBUG_MSG(args) g_printerr args ; g_printerr ("\n"); */ ++/* #define DEBUG_MSG(x) */ ++#define DEBUG_MSG(args) g_printerr args ; g_printerr ("\n"); + + #define WAIT 5 /* seconds */ + #define MAX_THREADS 10 +@@ -124,10 +124,10 @@ + DEBUG_MSG (("[unused] stopping unused threads")); + g_thread_pool_stop_unused_threads (); + +- DEBUG_MSG (("[unused] waiting ONE second for threads to die")); ++ DEBUG_MSG (("[unused] waiting FIVE second for threads to die")); + + /* Some time for threads to die. */ +- g_usleep (G_USEC_PER_SEC); ++ g_usleep (5 * G_USEC_PER_SEC); + + DEBUG_MSG (("[unused] stopped idle threads, %d remain, %d threads still exist", + g_thread_pool_get_num_unused_threads (), diff --git a/recipes/glib-2.0/glib-2.0-2.28.5/configure-ipv6.patch b/recipes/glib-2.0/glib-2.0-2.28.5/configure-ipv6.patch new file mode 100644 index 0000000000..548e0dc650 --- /dev/null +++ b/recipes/glib-2.0/glib-2.0-2.28.5/configure-ipv6.patch @@ -0,0 +1,92 @@ +From a619a217e3e5aa5345db631213aec5a3684a3001 Mon Sep 17 00:00:00 2001 +Subject: [PATCH] autodetect in6addr_{any,loopback} availability + +Fixes linking error on systems which choose not to support ipv6: +./.libs/libgio-2.0.so: undefined reference to `in6addr_loopback' +./.libs/libgio-2.0.so: undefined reference to `in6addr_any' + +Signed-off-by: Bernhard Reutner-Fischer +--- + configure.ac | 31 +++++++++++++++++++++++++++++++ + gio/ginetaddress.c | 16 ++++++++++++++-- + 2 files changed, 45 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 7114014..023db49 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1019,6 +1019,37 @@ if test $glib_native_win32 = no; then + AC_SUBST(LIBASYNCNS_LIBADD) + fi + ++dnl handle --disable-ipv6 ++AC_ARG_ENABLE(ipv6, AC_HELP_STRING([--disable-ipv6],[Disable IPv6 support])) ++if test "$ipv6" != "no"; then ++ AC_DEFINE(HAVE_IPV6, 1, [Define if IPv6 is available]) ++ ++ AC_MSG_CHECKING([for struct in6addr_any]) ++ AC_TRY_LINK( ++ [#define IN_AUTOCONF ++ #include ++ #include ++ #include ], ++ [struct in6_addr a = in6addr_any; ++ return a.s6_addr[0];], ++ [AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_IN6ADDR_ANY, 1, [Define if in6addr_any is available])], ++ [AC_MSG_RESULT(no)] ++ ) ++ AC_MSG_CHECKING([for struct in6addr_loopback]) ++ AC_TRY_LINK( ++ [#define IN_AUTOCONF ++ #include ++ #include ++ #include ], ++ [struct in6_addr a = in6addr_loopback; ++ return a.s6_addr[0];], ++ [AC_MSG_RESULT(yes) ++ AC_DEFINE(HAVE_IN6ADDR_LOOPBACK, 1, [Define if in6addr_loopback is available])], ++ [AC_MSG_RESULT(no)] ++ ) ++fi ++ + case $host in + *-*-solaris* ) + AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Needed to get declarations for msg_control and msg_controllen on Solaris) +diff --git a/gio/ginetaddress.c b/gio/ginetaddress.c +index 0f67e4f..ed29be2 100644 +--- a/gio/ginetaddress.c ++++ b/gio/ginetaddress.c +@@ -484,7 +484,13 @@ g_inet_address_new_loopback (GSocketFamily family) + return g_inet_address_new_from_bytes (addr, family); + } + else +- return g_inet_address_new_from_bytes (in6addr_loopback.s6_addr, family); ++ { ++#ifdef HAVE_IN6ADDR_LOOPBACK ++ return g_inet_address_new_from_bytes (in6addr_loopback.s6_addr, family); ++#else ++ return NULL; ++#endif ++ } + } + + /** +@@ -511,7 +517,13 @@ g_inet_address_new_any (GSocketFamily family) + return g_inet_address_new_from_bytes (addr, family); + } + else +- return g_inet_address_new_from_bytes (in6addr_any.s6_addr, family); ++ { ++#ifdef HAVE_IN6ADDR_ANY ++ return g_inet_address_new_from_bytes (in6addr_any.s6_addr, family); ++#else ++ return NULL; ++#endif ++ } + } + + +-- +1.7.2.3 + diff --git a/recipes/glib-2.0/glib-2.0-2.28.5/configure-libtool.patch b/recipes/glib-2.0/glib-2.0-2.28.5/configure-libtool.patch new file mode 100644 index 0000000000..e4e9d213bb --- /dev/null +++ b/recipes/glib-2.0/glib-2.0-2.28.5/configure-libtool.patch @@ -0,0 +1,30 @@ +diff -uNr glib-2.28.0.orig//configure.ac glib-2.28.0/configure.ac +--- glib-2.28.0.orig//configure.ac 2011-02-08 05:53:25.000000000 +0100 ++++ glib-2.28.0/configure.ac 2011-02-15 15:07:54.683976837 +0100 +@@ -1378,7 +1378,7 @@ + G_MODULE_LDFLAGS= + else + export SED +- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` ++ G_MODULE_LDFLAGS=`($host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` + fi + dnl G_MODULE_IMPL= don't reset, so cmd-line can override + G_MODULE_NEED_USCORE=0 +@@ -1443,7 +1443,7 @@ + LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS" + dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness + echo "void glib_plugin_test(void) { }" > plugin.c +- ${SHELL} ./libtool --mode=compile ${CC} -shared \ ++ ${SHELL} $host_alias-libtool --mode=compile ${CC} -shared \ + -export-dynamic -o plugin.o plugin.c 2>&1 >/dev/null + AC_CACHE_CHECK([for RTLD_GLOBAL brokenness], + glib_cv_rtldglobal_broken,[ +@@ -1517,7 +1517,7 @@ + + AC_MSG_CHECKING(for the suffix of module shared libraries) + export SED +-shrext_cmds=`./libtool --config | grep '^shrext_cmds='` ++shrext_cmds=`$host_alias-libtool --config | grep '^shrext_cmds='` + eval $shrext_cmds + module=yes eval std_shrext=$shrext_cmds + # chop the initial dot diff --git a/recipes/glib-2.0/glib-2.0-2.28.5/g_once_init_enter.patch b/recipes/glib-2.0/glib-2.0-2.28.5/g_once_init_enter.patch new file mode 100644 index 0000000000..58e410884f --- /dev/null +++ b/recipes/glib-2.0/glib-2.0-2.28.5/g_once_init_enter.patch @@ -0,0 +1,11 @@ +--- glib-2.22.1/glib/gthread.h.orig 2009-10-13 22:53:23.000000000 +0200 ++++ glib-2.22.1/glib/gthread.h 2009-10-13 23:34:59.000000000 +0200 +@@ -341,7 +341,7 @@ + G_INLINE_FUNC gboolean + g_once_init_enter (volatile gsize *value_location) + { +- if G_LIKELY ((gpointer) g_atomic_pointer_get (value_location) != NULL) ++ if G_LIKELY ((gpointer) g_atomic_pointer_get ((volatile gpointer *)value_location) != NULL) + return FALSE; + else + return g_once_init_enter_impl (value_location); diff --git a/recipes/glib-2.0/glib-2.0-2.28.5/gatomic-proper-pointer-get-cast.patch b/recipes/glib-2.0/glib-2.0-2.28.5/gatomic-proper-pointer-get-cast.patch new file mode 100644 index 0000000000..5a8e37d53b --- /dev/null +++ b/recipes/glib-2.0/glib-2.0-2.28.5/gatomic-proper-pointer-get-cast.patch @@ -0,0 +1,12 @@ +diff -uri glib-2.26.1.orig/glib/gatomic.h glib-2.26.1/glib/gatomic.h +--- glib-2.26.1.orig/glib/gatomic.h 2010-07-11 05:56:45.000000000 +0200 ++++ glib-2.26.1/glib/gatomic.h 2010-12-01 16:20:33.140009635 +0100 +@@ -70,7 +70,7 @@ + (g_atomic_int_set) ((volatile gint G_GNUC_MAY_ALIAS *) (volatile void *) (atomic), (newval))) + # define g_atomic_pointer_get(atomic) \ + ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \ +- (g_atomic_pointer_get) ((volatile gpointer G_GNUC_MAY_ALIAS *) (volatile void *) (atomic))) ++ (g_atomic_pointer_get) ((volatile gpointer G_GNUC_MAY_ALIAS *) (volatile void G_GNUC_MAY_ALIAS *) (atomic))) + # define g_atomic_pointer_set(atomic, newval) \ + ((void) sizeof (gchar [sizeof (*(atomic)) == sizeof (gpointer) ? 1 : -1]), \ + (g_atomic_pointer_set) ((volatile gpointer G_GNUC_MAY_ALIAS *) (volatile void *) (atomic), (newval))) diff --git a/recipes/glib-2.0/glib-2.0-2.28.5/glib-mkenums-interpreter.patch b/recipes/glib-2.0/glib-2.0-2.28.5/glib-mkenums-interpreter.patch new file mode 100644 index 0000000000..d8407b81f8 --- /dev/null +++ b/recipes/glib-2.0/glib-2.0-2.28.5/glib-mkenums-interpreter.patch @@ -0,0 +1,10 @@ +Index: glib-2.28.0/gobject/glib-mkenums.in +=================================================================== +--- glib-2.28.0.orig/gobject/glib-mkenums.in ++++ glib-2.28.0/gobject/glib-mkenums.in +@@ -1,4 +1,4 @@ +-#! @PERL_PATH@ ++#! /usr/bin/env perl + + use warnings; + use File::Basename; diff --git a/recipes/glib-2.0/glib-2.0-2.28.5/libglib2-fix-compilation-with-no-builtin-atomic.patch b/recipes/glib-2.0/glib-2.0-2.28.5/libglib2-fix-compilation-with-no-builtin-atomic.patch new file mode 100644 index 0000000000..39c0510781 --- /dev/null +++ b/recipes/glib-2.0/glib-2.0-2.28.5/libglib2-fix-compilation-with-no-builtin-atomic.patch @@ -0,0 +1,25 @@ +From 58096320ea0888c4fbbff318839017a4d2e82703 Mon Sep 17 00:00:00 2001 +From: Lionel Landwerlin +Date: Sat, 6 Nov 2010 14:56:15 +0100 +Subject: [PATCH] glib: fix compilation with no builtin atomic operations compilers + +Signed-off-by: Lionel Landwerlin +--- + glib/gatomic.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/glib/gatomic.c b/glib/gatomic.c +index 845c866..01468ce 100644 +--- a/glib/gatomic.c ++++ b/glib/gatomic.c +@@ -881,6 +881,7 @@ g_atomic_pointer_compare_and_exchange (volatile gpointer G_GNUC_MAY_ALIAS *atomi + #endif /* DEFINE_WITH_WIN32_INTERLOCKED */ + + #ifdef DEFINE_WITH_MUTEXES ++# include "gthread.h" + /* We have to use the slow, but safe locking method */ + static GMutex *g_atomic_mutex; + +-- +1.7.2.3 + diff --git a/recipes/glib-2.0/glib-2.0_2.28.5.bb b/recipes/glib-2.0/glib-2.0_2.28.5.bb new file mode 100644 index 0000000000..4aea8bfa46 --- /dev/null +++ b/recipes/glib-2.0/glib-2.0_2.28.5.bb @@ -0,0 +1,76 @@ +DESCRIPTION = "GLib is a general-purpose utility library, \ +which provides many useful data types, macros, \ +type conversions, string utilities, file utilities, a main \ +loop abstraction, and so on. It works on many \ +UNIX-like platforms, Windows, OS/2 and BeOS." +LICENSE = "LGPLv2+" +SECTION = "libs" +PRIORITY = "optional" +PR = "r2" +DEPENDS = "glib-2.0-native gtk-doc zlib" +DEPENDS_virtclass-native = "gettext-native gtk-doc-native \ + pkgconfig-native" + +SRC_URI = "\ + http://ftp.gnome.org/pub/GNOME/sources/glib/2.28/glib-${PV}.tar.bz2;name=archive \ + file://glibconfig-sysdefs.h \ + file://configure-libtool.patch \ + file://g_once_init_enter.patch \ + file://gatomic-proper-pointer-get-cast.patch \ + file://60_wait-longer-for-threads-to-die.patch \ + file://glib-mkenums-interpreter.patch \ + file://libglib2-fix-compilation-with-no-builtin-atomic.patch \ + file://configure-ipv6.patch \ +" + +SRC_URI[archive.md5sum] = "ddf80a060ec9039ad40452ba3ca2311b" +SRC_URI[archive.sha256sum] = "8eb4b56b228c6d0bf5021dd23db5b0084d80cc6d8d89d7863073c2da575ec22a" + +inherit autotools gettext + +S = "${WORKDIR}/glib-${PV}" + +EXTRA_OECONF = "--disable-debug " + +# Add and entry for your favourite arch if your (g)libc has a sane printf +EXTRA_OECONF_append_glibc_arm = " --enable-included-printf=no " + +do_configure_prepend () { + install -m 0644 ${WORKDIR}/glibconfig-sysdefs.h . + sed -i -e "s:TEST_PROGS += gdbus-serialization::g" ${S}/gio/tests/Makefile.am +} + +do_install_append() { + sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g ${D}${bindir}/glib-mkenums || true +} + +EXTRA_OECONF_virtclass-native = "--disable-dtrace --disable-systemtap" + +do_configure_prepend_virtclass-native() { + if [ -e ${S}/${TARGET_SYS}-libtool ] ; then + echo "${TARGET_SYS}-libtool already present" + else + cp ${STAGING_BINDIR}/${TARGET_SYS}-libtool ${S} + fi + +} + +BBCLASSEXTEND = "native" + +PACKAGES =+ "gobject-2.0 gmodule-2.0 gthread-2.0 gio-2.0 glib-2.0-utils " +LEAD_SONAME = "libglib-2.0.*" +FILES_glib-2.0-utils = "${bindir}/*" +FILES_${PN} = "${libdir}/lib*so.* ${libdir}/gio/modules/*.so" +FILES_${PN}-dev += "${libdir}/glib-2.0 ${datadir}/glib-2.0 ${libdir}/gio/modules/*.la" +FILES_${PN}-dbg += "${libdir}/gio/modules/.debug" +FILES_gmodule-2.0 = "${libdir}/libgmodule-2.0.so.*" +FILES_gobject-2.0 = "${libdir}/libgobject-2.0.so.*" +FILES_gio-2.0 = "${libdir}/libgio-2.0.so.*" +FILES_gthread-2.0 = "${libdir}/libgthread-2.0.so.*" + +# Let various glib components end up in glib package +# for compatibility (with binary packages from Maemo). +FILES_gthread-2.0_chinook-compat = "" +FILES_gmodule-2.0_chinook-compat = "" +FILES_gobject-2.0_chinook-compat = "" +FILES_gio-2.0_chinook-compat = "" diff --git a/recipes/glibc/glibc-2.10.1/powerpc-sqrt-hack.diff b/recipes/glibc/glibc-2.10.1/powerpc-sqrt-hack.diff index 1046efb2a1..b7e8948a62 100644 --- a/recipes/glibc/glibc-2.10.1/powerpc-sqrt-hack.diff +++ b/recipes/glibc/glibc-2.10.1/powerpc-sqrt-hack.diff @@ -1,5 +1,5 @@ -diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c ---- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 07:44:30.000000000 +0200 +diff -Nurd glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c +--- glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 07:44:30.000000000 +0200 +++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-12-08 12:53:32.202227000 +0100 @@ -25,6 +25,9 @@ #include @@ -11,8 +11,8 @@ diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc- static const double almost_half = 0.5000000000000001; /* 0.5 + 2^-53 */ static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c ---- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 07:44:30.000000000 +0200 +diff -Nurd glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c +--- glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 07:44:30.000000000 +0200 +++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-12-08 12:53:36.992227000 +0100 @@ -25,6 +25,8 @@ #include diff --git a/recipes/glibc/glibc-2.5/powerpc-sqrt-hack.diff b/recipes/glibc/glibc-2.5/powerpc-sqrt-hack.diff index 1046efb2a1..b7e8948a62 100644 --- a/recipes/glibc/glibc-2.5/powerpc-sqrt-hack.diff +++ b/recipes/glibc/glibc-2.5/powerpc-sqrt-hack.diff @@ -1,5 +1,5 @@ -diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c ---- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 07:44:30.000000000 +0200 +diff -Nurd glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c +--- glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 07:44:30.000000000 +0200 +++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-12-08 12:53:32.202227000 +0100 @@ -25,6 +25,9 @@ #include @@ -11,8 +11,8 @@ diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc- static const double almost_half = 0.5000000000000001; /* 0.5 + 2^-53 */ static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c ---- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 07:44:30.000000000 +0200 +diff -Nurd glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c +--- glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 07:44:30.000000000 +0200 +++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-12-08 12:53:36.992227000 +0100 @@ -25,6 +25,8 @@ #include diff --git a/recipes/glibc/glibc-2.6.1/powerpc-sqrt-hack.diff b/recipes/glibc/glibc-2.6.1/powerpc-sqrt-hack.diff index 1046efb2a1..b7e8948a62 100644 --- a/recipes/glibc/glibc-2.6.1/powerpc-sqrt-hack.diff +++ b/recipes/glibc/glibc-2.6.1/powerpc-sqrt-hack.diff @@ -1,5 +1,5 @@ -diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c ---- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 07:44:30.000000000 +0200 +diff -Nurd glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c +--- glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 07:44:30.000000000 +0200 +++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-12-08 12:53:32.202227000 +0100 @@ -25,6 +25,9 @@ #include @@ -11,8 +11,8 @@ diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc- static const double almost_half = 0.5000000000000001; /* 0.5 + 2^-53 */ static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c ---- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 07:44:30.000000000 +0200 +diff -Nurd glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c +--- glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 07:44:30.000000000 +0200 +++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-12-08 12:53:36.992227000 +0100 @@ -25,6 +25,8 @@ #include diff --git a/recipes/glibc/glibc-2.9/powerpc-sqrt-hack.diff b/recipes/glibc/glibc-2.9/powerpc-sqrt-hack.diff index 1046efb2a1..b7e8948a62 100644 --- a/recipes/glibc/glibc-2.9/powerpc-sqrt-hack.diff +++ b/recipes/glibc/glibc-2.9/powerpc-sqrt-hack.diff @@ -1,5 +1,5 @@ -diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c ---- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 07:44:30.000000000 +0200 +diff -Nurd glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c +--- glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-04-14 07:44:30.000000000 +0200 +++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c 2006-12-08 12:53:32.202227000 +0100 @@ -25,6 +25,9 @@ #include @@ -11,8 +11,8 @@ diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrt.c glibc- static const double almost_half = 0.5000000000000001; /* 0.5 + 2^-53 */ static const ieee_float_shape_type a_nan = {.word = 0x7fc00000 }; static const ieee_float_shape_type a_inf = {.word = 0x7f800000 }; -diff -Nurd ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c ---- ../glibc-initial-2.5-r4/glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 07:44:30.000000000 +0200 +diff -Nurd glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c +--- glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-04-14 07:44:30.000000000 +0200 +++ glibc-2.5/sysdeps/powerpc/fpu/e_sqrtf.c 2006-12-08 12:53:36.992227000 +0100 @@ -25,6 +25,8 @@ #include diff --git a/recipes/gnome/gnome-doc-utils.inc b/recipes/gnome/gnome-doc-utils.inc index b5bbae1529..a1ae11e4b0 100644 --- a/recipes/gnome/gnome-doc-utils.inc +++ b/recipes/gnome/gnome-doc-utils.inc @@ -2,7 +2,7 @@ LICENSE = "GPL LGPL" DEPENDS = "libxml2 libxslt libxslt-native libxml2-native gettext-native" DEPENDS_virtclass-native = "libxslt-native libxml2-native gettext-native" -INC_PR = "r5" +INC_PR = "r6" inherit gnomebase @@ -15,7 +15,7 @@ do_configure_prepend() { do_install_append() { mkdir -p ${D}${datadir}/xml/gnome/xslt/ cp -pPr ${S}/xslt/* ${D}${datadir}/xml/gnome/xslt/ - sed -i "1s:/.*/python:${bindir}/python:" ${D}${bindir}/xml2po + sed -i "1s:.*:#!/usr/bin/env python:" ${D}${bindir}/xml2po } FILES_${PN} += "${datadir}/xml*" diff --git a/recipes/gnome/system-tools-backends-2.10.1/dont-automake.patch b/recipes/gnome/system-tools-backends-2.10.1/dont-automake.patch new file mode 100644 index 0000000000..a9cea79a25 --- /dev/null +++ b/recipes/gnome/system-tools-backends-2.10.1/dont-automake.patch @@ -0,0 +1,21 @@ +Index: system-tools-backends-2.10.1/missing +=================================================================== +--- system-tools-backends-2.10.1.orig/missing ++++ system-tools-backends-2.10.1/missing +@@ -140,16 +140,6 @@ WARNING: \`$1' is missing on your system + ;; + + automake*) +- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then +- # We have it, but it failed. +- exit 1 +- fi +- +- echo 1>&2 "\ +-WARNING: \`$1' is missing on your system. You should only need it if +- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. +- You might want to install the \`Automake' and \`Perl' packages. +- Grab them from any GNU archive site." + find . -type f -name Makefile.am -print | + sed 's/\.am$/.in/' | + while read f; do touch "$f"; done diff --git a/recipes/gnome/system-tools-backends_2.10.1.bb b/recipes/gnome/system-tools-backends_2.10.1.bb index 75dfda968e..bac0a9cb16 100644 --- a/recipes/gnome/system-tools-backends_2.10.1.bb +++ b/recipes/gnome/system-tools-backends_2.10.1.bb @@ -16,6 +16,7 @@ SRC_URI[archive.sha256sum] = "0c1cfdf5f0550c0ccacbbc4f00ed059ab9ea483d48138132db SRC_URI += " \ file://system-tools-backends \ + file://dont-automake.patch \ " SRC_URI_append_angstrom = " \ diff --git a/recipes/gnuradio/gnuradio-git/0001-volk-Remove-all-traces-of-volk-from-configure-for-OE.patch b/recipes/gnuradio/gnuradio-git/0001-volk-Remove-all-traces-of-volk-from-configure-for-OE.patch new file mode 100644 index 0000000000..e2f674b752 --- /dev/null +++ b/recipes/gnuradio/gnuradio-git/0001-volk-Remove-all-traces-of-volk-from-configure-for-OE.patch @@ -0,0 +1,42 @@ +From 857c38eb8201e2a34b524fcabea21b1accbdb288 Mon Sep 17 00:00:00 2001 +From: Philip Balister +Date: Fri, 13 May 2011 12:26:14 -0400 +Subject: [PATCH] volk : Remove all traces of volk from configure for OE builds. + +Signed-off-by: Philip Balister +--- + Makefile.common | 4 ++-- + configure.ac | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/Makefile.common b/Makefile.common +index 20b8a78..aeda1dd 100644 +--- a/Makefile.common ++++ b/Makefile.common +@@ -92,8 +92,8 @@ GRUEL_INCLUDES = @gruel_INCLUDES@ + GRUEL_LA = @gruel_LA@ + + # How to link in the VOLK library from inside the tree +-VOLK_INCLUDES = @volk_INCLUDES@ +-VOLK_LA = @volk_LA@ ++#VOLK_INCLUDES = @volk_INCLUDES@ ++#VOLK_LA = @volk_LA@ + + # How to link in the USRP library from inside the tree + USRP_INCLUDES = @usrp_INCLUDES@ +diff --git a/configure.ac b/configure.ac +index 73ebbd6..e5cf7a2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -349,7 +349,7 @@ AC_ARG_ENABLE( + + build_dirs="config" + GRC_GRUEL dnl must come first +-GRC_VOLK ++dnl GRC_VOLK + GRC_GCELL + GRC_GNURADIO_CORE + GRC_USRP +-- +1.7.3.4 + diff --git a/recipes/gnuradio/gnuradio.inc b/recipes/gnuradio/gnuradio.inc index d114f89eac..bd091f666d 100644 --- a/recipes/gnuradio/gnuradio.inc +++ b/recipes/gnuradio/gnuradio.inc @@ -4,7 +4,7 @@ SECTION = "apps" PRIORITY = "optional" LICENSE = "GPLv3" DEPENDS = "uhd gsl guile-native fftwf python alsa-lib boost cppunit swig-native python-numpy" -INC_PR = "r8" +INC_PR = "r9" inherit distutils-base autotools pkgconfig @@ -39,6 +39,7 @@ FILES_${PN}-examples = "${datadir}/gnuradio/examples" FILES_${PN}-grc = "${datadir}/gnuradio/grc" FILES_${PN}-conf = "${sysconfdir}/gnuradio" +FILES_${PN} += "${datadir}/gnuradio" FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}/gnuradio/*" FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/gnuradio/.debug \ ${PYTHON_SITEPACKAGES_DIR}/gnuradio/*/.debug \ diff --git a/recipes/gnuradio/gnuradio_git.bb b/recipes/gnuradio/gnuradio_git.bb index bc18d9e765..250ba5da9b 100644 --- a/recipes/gnuradio/gnuradio_git.bb +++ b/recipes/gnuradio/gnuradio_git.bb @@ -1,15 +1,18 @@ require recipes/gnuradio/gnuradio.inc -PR = "${INC_PR}.1" -PV = "3.3.0-${PR}+gitr${SRCREV}" +PR = "${INC_PR}.2" +PV = "3.4.0-${PR}+gitr${SRCREV}" -SRCREV = "cdca1c917626f7c63f820da921a17187efc92cd5" +SRCREV = "62768eedf8f68680ef3a672a27025227e22ccbb0" # Make it easy to test against developer repos and branches GIT_REPO = "gnuradio.git" -GIT_BRANCH = "next" +GIT_BRANCH = "master" + +FILESPATHPKG_prepend = "gnuradio-git:" SRC_URI = "git://gnuradio.org/git/${GIT_REPO};branch=${GIT_BRANCH};protocol=http \ + file://0001-volk-Remove-all-traces-of-volk-from-configure-for-OE.patch \ " S="${WORKDIR}/git" diff --git a/recipes/gpe-aerial/files/fix_makefile.patch b/recipes/gpe-aerial/files/fix_makefile.patch index bbb08407e1..0224163257 100644 --- a/recipes/gpe-aerial/files/fix_makefile.patch +++ b/recipes/gpe-aerial/files/fix_makefile.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-aerial-0.2.11-r0/gpe-aerial-0.2.11/Makefile gpe-aerial-0.2.11/Makefile ---- ../gpe-aerial-0.2.11-r0/gpe-aerial-0.2.11/Makefile 2004-08-03 15:36:47.000000000 +0100 +diff -urNd gpe-aerial-0.2.11/Makefile gpe-aerial-0.2.11/Makefile +--- gpe-aerial-0.2.11/Makefile 2004-08-03 15:36:47.000000000 +0100 +++ gpe-aerial-0.2.11/Makefile 2004-08-03 15:49:42.000000000 +0100 @@ -3,7 +3,6 @@ CVSBUILD = no diff --git a/recipes/gpe-appmgr/files/no-render-h.patch b/recipes/gpe-appmgr/files/no-render-h.patch index 7bd08bb8c0..169d057437 100644 --- a/recipes/gpe-appmgr/files/no-render-h.patch +++ b/recipes/gpe-appmgr/files/no-render-h.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/main.c gpe-appmgr-2.8/main.c ---- ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/main.c 2005-03-04 07:00:40 +00:00 +diff -urNd gpe-appmgr-2.8/main.c gpe-appmgr-2.8/main.c +--- gpe-appmgr-2.8/main.c 2005-03-04 07:00:40 +00:00 +++ gpe-appmgr-2.8/main.c 2005-04-28 12:21:53 +01:00 @@ -50,7 +50,6 @@ /* GPE */ @@ -9,8 +9,8 @@ diff -urNd ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/main.c gpe-appmgr-2.8/main.c #include #include #include -diff -urNd ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/row_view.c gpe-appmgr-2.8/row_view.c ---- ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/row_view.c 2005-01-05 21:14:47 +00:00 +diff -urNd gpe-appmgr-2.8/row_view.c gpe-appmgr-2.8/row_view.c +--- gpe-appmgr-2.8/row_view.c 2005-01-05 21:14:47 +00:00 +++ gpe-appmgr-2.8/row_view.c 2005-04-28 12:22:07 +01:00 @@ -43,7 +43,6 @@ /* GPE */ @@ -20,8 +20,8 @@ diff -urNd ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/row_view.c gpe-appmgr-2.8/row_vie #include #include #include -diff -urNd ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/single_view.c gpe-appmgr-2.8/single_view.c ---- ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/single_view.c 2004-11-19 00:22:09 +00:00 +diff -urNd gpe-appmgr-2.8/single_view.c gpe-appmgr-2.8/single_view.c +--- gpe-appmgr-2.8/single_view.c 2004-11-19 00:22:09 +00:00 +++ gpe-appmgr-2.8/single_view.c 2005-04-28 12:22:15 +01:00 @@ -39,7 +39,6 @@ /* GPE */ @@ -31,8 +31,8 @@ diff -urNd ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/single_view.c gpe-appmgr-2.8/sing #include #include #include -diff -urNd ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/tab_view.c gpe-appmgr-2.8/tab_view.c ---- ../gpe-appmgr-2.8-r0/gpe-appmgr-2.8/tab_view.c 2005-03-04 07:14:43 +00:00 +diff -urNd gpe-appmgr-2.8/tab_view.c gpe-appmgr-2.8/tab_view.c +--- gpe-appmgr-2.8/tab_view.c 2005-03-04 07:14:43 +00:00 +++ gpe-appmgr-2.8/tab_view.c 2005-04-28 12:22:22 +01:00 @@ -46,7 +46,6 @@ /* GPE */ diff --git a/recipes/gpe-calculator/gpe-calculator-0.2/fix_makefile.patch b/recipes/gpe-calculator/gpe-calculator-0.2/fix_makefile.patch index 8b4ebf7141..59a86365a6 100644 --- a/recipes/gpe-calculator/gpe-calculator-0.2/fix_makefile.patch +++ b/recipes/gpe-calculator/gpe-calculator-0.2/fix_makefile.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-calculator-0.2-r0/gpe-calculator-0.2/Makefile gpe-calculator-0.2/Makefile ---- ../gpe-calculator-0.2-r0/gpe-calculator-0.2/Makefile 2004-08-03 04:24:09.000000000 +0100 +diff -urNd gpe-calculator-0.2/Makefile gpe-calculator-0.2/Makefile +--- gpe-calculator-0.2/Makefile 2004-08-03 04:24:09.000000000 +0100 +++ gpe-calculator-0.2/Makefile 2004-08-03 13:12:48.000000000 +0100 @@ -9,17 +9,17 @@ GTKCFLAGS = `pkg-config --cflags gtk+-2.0` -DGTK_ENABLE_BROKEN diff --git a/recipes/gpe-clock/gpe-clock-0.14/default-time-24hrs.patch b/recipes/gpe-clock/gpe-clock-0.14/default-time-24hrs.patch index 4583df8add..acb039967b 100644 --- a/recipes/gpe-clock/gpe-clock-0.14/default-time-24hrs.patch +++ b/recipes/gpe-clock/gpe-clock-0.14/default-time-24hrs.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-clock-0.14-r0/gpe-clock-0.14/clock.c gpe-clock-0.14/clock.c ---- ../gpe-clock-0.14-r0/gpe-clock-0.14/clock.c 2004-08-23 22:38:21.000000000 +0100 +diff -urNd gpe-clock-0.14/clock.c gpe-clock-0.14/clock.c +--- gpe-clock-0.14/clock.c 2004-08-23 22:38:21.000000000 +0100 +++ gpe-clock-0.14/clock.c 2004-09-16 11:32:43.000000000 +0100 @@ -42,7 +42,7 @@ #define FORMAT_ANALOGUE 2 diff --git a/recipes/gpe-clock/gpe-clock-0.20/default-time-24hrs.patch b/recipes/gpe-clock/gpe-clock-0.20/default-time-24hrs.patch index 4583df8add..acb039967b 100644 --- a/recipes/gpe-clock/gpe-clock-0.20/default-time-24hrs.patch +++ b/recipes/gpe-clock/gpe-clock-0.20/default-time-24hrs.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-clock-0.14-r0/gpe-clock-0.14/clock.c gpe-clock-0.14/clock.c ---- ../gpe-clock-0.14-r0/gpe-clock-0.14/clock.c 2004-08-23 22:38:21.000000000 +0100 +diff -urNd gpe-clock-0.14/clock.c gpe-clock-0.14/clock.c +--- gpe-clock-0.14/clock.c 2004-08-23 22:38:21.000000000 +0100 +++ gpe-clock-0.14/clock.c 2004-09-16 11:32:43.000000000 +0100 @@ -42,7 +42,7 @@ #define FORMAT_ANALOGUE 2 diff --git a/recipes/gpe-go/gpe-go-0.05/fix-make.patch b/recipes/gpe-go/gpe-go-0.05/fix-make.patch index 996c51e001..c3c558826d 100644 --- a/recipes/gpe-go/gpe-go-0.05/fix-make.patch +++ b/recipes/gpe-go/gpe-go-0.05/fix-make.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/build/Makefile.dpkg_ipkg gpe-go-0.05/build/Makefile.dpkg_ipkg ---- ../gpe-go-0.05-r0/gpe-go-0.05/build/Makefile.dpkg_ipkg 2003-11-09 20:28:40.000000000 +0000 +diff -urNd gpe-go-0.05/build/Makefile.dpkg_ipkg gpe-go-0.05/build/Makefile.dpkg_ipkg +--- gpe-go-0.05/build/Makefile.dpkg_ipkg 2003-11-09 20:28:40.000000000 +0000 +++ gpe-go-0.05/build/Makefile.dpkg_ipkg 2004-09-18 17:09:01.000000000 +0100 @@ -18,8 +18,10 @@ LIBGPEWIDGET_PC = libgpewidget @@ -66,8 +66,8 @@ diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/build/Makefile.dpkg_ipkg gpe-go-0.05/bu + +.c.o:; + $(CC) $(CFLAGS) $(CPPFLAGS) $(PACKAGE_CFLAGS) $(PACKAGE_CPPFLAGS) -c $< -o $@ -diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/build/Makefile.translation gpe-go-0.05/build/Makefile.translation ---- ../gpe-go-0.05-r0/gpe-go-0.05/build/Makefile.translation 2003-11-09 20:28:40.000000000 +0000 +diff -urNd gpe-go-0.05/build/Makefile.translation gpe-go-0.05/build/Makefile.translation +--- gpe-go-0.05/build/Makefile.translation 2003-11-09 20:28:40.000000000 +0000 +++ gpe-go-0.05/build/Makefile.translation 2004-09-18 17:09:01.000000000 +0100 @@ -5,7 +5,7 @@ # use ipkg-build or ipkg-deb-build @@ -116,8 +116,8 @@ diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/build/Makefile.translation gpe-go-0.05/ done translation-ipkg: -diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/gpe-go.c gpe-go-0.05/gpe-go.c ---- ../gpe-go-0.05-r0/gpe-go-0.05/gpe-go.c 2003-11-09 19:38:50.000000000 +0000 +diff -urNd gpe-go-0.05/gpe-go.c gpe-go-0.05/gpe-go.c +--- gpe-go-0.05/gpe-go.c 2003-11-09 19:38:50.000000000 +0000 +++ gpe-go-0.05/gpe-go.c 2004-09-18 17:04:24.000000000 +0100 @@ -16,12 +16,12 @@ #include "sgf.h" @@ -138,8 +138,8 @@ diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/gpe-go.c gpe-go-0.05/gpe-go.c //--i18n #include -diff -urNd ../gpe-go-0.05-r0/gpe-go-0.05/Makefile gpe-go-0.05/Makefile ---- ../gpe-go-0.05-r0/gpe-go-0.05/Makefile 2003-11-09 20:28:40.000000000 +0000 +diff -urNd gpe-go-0.05/Makefile gpe-go-0.05/Makefile +--- gpe-go-0.05/Makefile 2003-11-09 20:28:40.000000000 +0000 +++ gpe-go-0.05/Makefile 2004-09-18 17:11:06.000000000 +0100 @@ -1,19 +1,8 @@ VERSION = 0.05 diff --git a/recipes/gpe-lights/gpe-lights-0.12/fix-makefiles.patch b/recipes/gpe-lights/gpe-lights-0.12/fix-makefiles.patch index 4ec5b3a682..72e471366a 100644 --- a/recipes/gpe-lights/gpe-lights-0.12/fix-makefiles.patch +++ b/recipes/gpe-lights/gpe-lights-0.12/fix-makefiles.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.dpkg_ipkg gpe-lights-0.12/build/Makefile.dpkg_ipkg ---- ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.dpkg_ipkg 1970-01-01 01:00:00.000000000 +0100 +diff -urNd gpe-lights-0.12/build/Makefile.dpkg_ipkg gpe-lights-0.12/build/Makefile.dpkg_ipkg +--- gpe-lights-0.12/build/Makefile.dpkg_ipkg 1970-01-01 01:00:00.000000000 +0100 +++ gpe-lights-0.12/build/Makefile.dpkg_ipkg 2004-09-18 20:09:37.000000000 +0100 @@ -0,0 +1,114 @@ +## Please read the README in this directory to see how to use this @@ -116,8 +116,8 @@ diff -urNd ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.dpkg_ipkg gpe-li + +.c.o:; + $(CC) $(CFLAGS) $(CPPFLAGS) $(PACKAGE_CFLAGS) $(PACKAGE_CPPFLAGS) -c $< -o $@ -diff -urNd ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.translation gpe-lights-0.12/build/Makefile.translation ---- ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.translation 1970-01-01 01:00:00.000000000 +0100 +diff -urNd gpe-lights-0.12/build/Makefile.translation gpe-lights-0.12/build/Makefile.translation +--- gpe-lights-0.12/build/Makefile.translation 1970-01-01 01:00:00.000000000 +0100 +++ gpe-lights-0.12/build/Makefile.translation 2004-09-18 20:09:37.000000000 +0100 @@ -0,0 +1,103 @@ +.SUFFIXES: .mo .po .pot .po8 @@ -223,8 +223,8 @@ diff -urNd ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.translation gpe- + +translation-ipkg: + make PREFIX=/usr real-translation-package -diff -urNd ../gpe-lights-0.12-r0/gpe-lights-0.12/Makefile gpe-lights-0.12/Makefile ---- ../gpe-lights-0.12-r0/gpe-lights-0.12/Makefile 2004-09-17 23:32:53.000000000 +0100 +diff -urNd gpe-lights-0.12/Makefile gpe-lights-0.12/Makefile +--- gpe-lights-0.12/Makefile 2004-09-17 23:32:53.000000000 +0100 +++ gpe-lights-0.12/Makefile 2004-09-18 20:10:46.000000000 +0100 @@ -1,41 +1,37 @@ PACKAGE = gpe-lights diff --git a/recipes/gpe-lights/gpe-lights-0.13/fix-makefiles.patch b/recipes/gpe-lights/gpe-lights-0.13/fix-makefiles.patch index 3c4581eded..5d99b91dab 100644 --- a/recipes/gpe-lights/gpe-lights-0.13/fix-makefiles.patch +++ b/recipes/gpe-lights/gpe-lights-0.13/fix-makefiles.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.dpkg_ipkg gpe-lights-0.12/build/Makefile.dpkg_ipkg ---- ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.dpkg_ipkg 1970-01-01 01:00:00.000000000 +0100 +diff -urNd gpe-lights-0.12/build/Makefile.dpkg_ipkg gpe-lights-0.12/build/Makefile.dpkg_ipkg +--- gpe-lights-0.12/build/Makefile.dpkg_ipkg 1970-01-01 01:00:00.000000000 +0100 +++ gpe-lights-0.12/build/Makefile.dpkg_ipkg 2004-09-18 20:09:37.000000000 +0100 @@ -0,0 +1,114 @@ +## Please read the README in this directory to see how to use this @@ -116,8 +116,8 @@ diff -urNd ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.dpkg_ipkg gpe-li + +.c.o:; + $(CC) $(CFLAGS) $(CPPFLAGS) $(PACKAGE_CFLAGS) $(PACKAGE_CPPFLAGS) -c $< -o $@ -diff -urNd ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.translation gpe-lights-0.12/build/Makefile.translation ---- ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.translation 1970-01-01 01:00:00.000000000 +0100 +diff -urNd gpe-lights-0.12/build/Makefile.translation gpe-lights-0.12/build/Makefile.translation +--- gpe-lights-0.12/build/Makefile.translation 1970-01-01 01:00:00.000000000 +0100 +++ gpe-lights-0.12/build/Makefile.translation 2004-09-18 20:09:37.000000000 +0100 @@ -0,0 +1,103 @@ +.SUFFIXES: .mo .po .pot .po8 @@ -223,8 +223,8 @@ diff -urNd ../gpe-lights-0.12-r0/gpe-lights-0.12/build/Makefile.translation gpe- + +translation-ipkg: + make PREFIX=/usr real-translation-package -diff -urNd ../gpe-lights-0.12-r0/gpe-lights-0.12/Makefile gpe-lights-0.12/Makefile ---- ../gpe-lights-0.12-r0/gpe-lights-0.12/Makefile 2004-09-17 23:32:53.000000000 +0100 +diff -urNd gpe-lights-0.12/Makefile gpe-lights-0.12/Makefile +--- gpe-lights-0.12/Makefile 2004-09-17 23:32:53.000000000 +0100 +++ gpe-lights-0.12/Makefile 2004-09-18 20:10:46.000000000 +0100 @@ -1,41 +1,37 @@ PACKAGE = gpe-lights diff --git a/recipes/gpe-nmf/gpe-nmf-0.17/fix_makefiles.patch b/recipes/gpe-nmf/gpe-nmf-0.17/fix_makefiles.patch index b6dc568151..5965f031d3 100644 --- a/recipes/gpe-nmf/gpe-nmf-0.17/fix_makefiles.patch +++ b/recipes/gpe-nmf/gpe-nmf-0.17/fix_makefiles.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-nmf-0.17-r0/gpe-nmf-0.17/backend/Makefile gpe-nmf-0.17/backend/Makefile ---- ../gpe-nmf-0.17-r0/gpe-nmf-0.17/backend/Makefile 2004-07-06 22:02:57.000000000 +0100 +diff -urNd gpe-nmf-0.17/backend/Makefile gpe-nmf-0.17/backend/Makefile +--- gpe-nmf-0.17/backend/Makefile 2004-07-06 22:02:57.000000000 +0100 +++ gpe-nmf-0.17/backend/Makefile 2004-08-03 12:42:34.000000000 +0100 @@ -48,7 +48,7 @@ clean: @@ -10,8 +10,8 @@ diff -urNd ../gpe-nmf-0.17-r0/gpe-nmf-0.17/backend/Makefile gpe-nmf-0.17/backend mkdir -p $(DESTDIR)$(PREFIX)/lib install $(BACKEND) $(DESTDIR)$(PREFIX)/lib/$(BACKEND) for i in $(CODECS); do install $$i $(DESTDIR)$(PREFIX)/lib/gpe-nmf/decoders/$$i; done -diff -urNd ../gpe-nmf-0.17-r0/gpe-nmf-0.17/Makefile gpe-nmf-0.17/Makefile ---- ../gpe-nmf-0.17-r0/gpe-nmf-0.17/Makefile 2004-08-03 03:31:46.000000000 +0100 +diff -urNd gpe-nmf-0.17/Makefile gpe-nmf-0.17/Makefile +--- gpe-nmf-0.17/Makefile 2004-08-03 03:31:46.000000000 +0100 +++ gpe-nmf-0.17/Makefile 2004-08-03 12:37:33.000000000 +0100 @@ -43,7 +43,7 @@ make -C backend PREFIX=$(PREFIX) GST=$(GST) GST_VERSION=$(GST_VERSION) CVSBUILD=$(CVSBUILD) diff --git a/recipes/gpe-othello/gpe-othello-0.2-1/fix-makefiles.patch b/recipes/gpe-othello/gpe-othello-0.2-1/fix-makefiles.patch index def1915f2b..d17c826bb8 100644 --- a/recipes/gpe-othello/gpe-othello-0.2-1/fix-makefiles.patch +++ b/recipes/gpe-othello/gpe-othello-0.2-1/fix-makefiles.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-othello-0.2-1-r0/gpe-othello-0.2-1/build/Makefile.dpkg_ipkg gpe-othello-0.2-1/build/Makefile.dpkg_ipkg ---- ../gpe-othello-0.2-1-r0/gpe-othello-0.2-1/build/Makefile.dpkg_ipkg 1970-01-01 01:00:00.000000000 +0100 +diff -urNd gpe-othello-0.2-1/build/Makefile.dpkg_ipkg gpe-othello-0.2-1/build/Makefile.dpkg_ipkg +--- gpe-othello-0.2-1/build/Makefile.dpkg_ipkg 1970-01-01 01:00:00.000000000 +0100 +++ gpe-othello-0.2-1/build/Makefile.dpkg_ipkg 2004-09-18 20:23:29.000000000 +0100 @@ -0,0 +1,114 @@ +## Please read the README in this directory to see how to use this @@ -116,8 +116,8 @@ diff -urNd ../gpe-othello-0.2-1-r0/gpe-othello-0.2-1/build/Makefile.dpkg_ipkg gp + +.c.o:; + $(CC) $(CFLAGS) $(CPPFLAGS) $(PACKAGE_CFLAGS) $(PACKAGE_CPPFLAGS) -c $< -o $@ -diff -urNd ../gpe-othello-0.2-1-r0/gpe-othello-0.2-1/build/Makefile.translation gpe-othello-0.2-1/build/Makefile.translation ---- ../gpe-othello-0.2-1-r0/gpe-othello-0.2-1/build/Makefile.translation 1970-01-01 01:00:00.000000000 +0100 +diff -urNd gpe-othello-0.2-1/build/Makefile.translation gpe-othello-0.2-1/build/Makefile.translation +--- gpe-othello-0.2-1/build/Makefile.translation 1970-01-01 01:00:00.000000000 +0100 +++ gpe-othello-0.2-1/build/Makefile.translation 2004-09-18 20:23:29.000000000 +0100 @@ -0,0 +1,103 @@ +.SUFFIXES: .mo .po .pot .po8 @@ -223,8 +223,8 @@ diff -urNd ../gpe-othello-0.2-1-r0/gpe-othello-0.2-1/build/Makefile.translation + +translation-ipkg: + make PREFIX=/usr real-translation-package -diff -urNd ../gpe-othello-0.2-1-r0/gpe-othello-0.2-1/Makefile gpe-othello-0.2-1/Makefile ---- ../gpe-othello-0.2-1-r0/gpe-othello-0.2-1/Makefile 2004-09-18 00:16:02.000000000 +0100 +diff -urNd gpe-othello-0.2-1/Makefile gpe-othello-0.2-1/Makefile +--- gpe-othello-0.2-1/Makefile 2004-09-18 00:16:02.000000000 +0100 +++ gpe-othello-0.2-1/Makefile 2004-09-18 20:25:16.000000000 +0100 @@ -3,41 +3,37 @@ DEBUG = no diff --git a/recipes/gpe-tetris/gpe-tetris-0.6-2/fix-makefiles.patch b/recipes/gpe-tetris/gpe-tetris-0.6-2/fix-makefiles.patch index b1297732ff..d3a108dc2a 100644 --- a/recipes/gpe-tetris/gpe-tetris-0.6-2/fix-makefiles.patch +++ b/recipes/gpe-tetris/gpe-tetris-0.6-2/fix-makefiles.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-tetris-0.6-2-r0/gpe-tetris-0.6-2/build/Makefile.dpkg_ipkg gpe-tetris-0.6-2/build/Makefile.dpkg_ipkg ---- ../gpe-tetris-0.6-2-r0/gpe-tetris-0.6-2/build/Makefile.dpkg_ipkg 1970-01-01 01:00:00.000000000 +0100 +diff -urNd gpe-tetris-0.6-2/build/Makefile.dpkg_ipkg gpe-tetris-0.6-2/build/Makefile.dpkg_ipkg +--- gpe-tetris-0.6-2/build/Makefile.dpkg_ipkg 1970-01-01 01:00:00.000000000 +0100 +++ gpe-tetris-0.6-2/build/Makefile.dpkg_ipkg 2004-09-18 21:04:03.000000000 +0100 @@ -0,0 +1,114 @@ +## Please read the README in this directory to see how to use this @@ -116,8 +116,8 @@ diff -urNd ../gpe-tetris-0.6-2-r0/gpe-tetris-0.6-2/build/Makefile.dpkg_ipkg gpe- + +.c.o:; + $(CC) $(CFLAGS) $(CPPFLAGS) $(PACKAGE_CFLAGS) $(PACKAGE_CPPFLAGS) -c $< -o $@ -diff -urNd ../gpe-tetris-0.6-2-r0/gpe-tetris-0.6-2/build/Makefile.translation gpe-tetris-0.6-2/build/Makefile.translation ---- ../gpe-tetris-0.6-2-r0/gpe-tetris-0.6-2/build/Makefile.translation 1970-01-01 01:00:00.000000000 +0100 +diff -urNd gpe-tetris-0.6-2/build/Makefile.translation gpe-tetris-0.6-2/build/Makefile.translation +--- gpe-tetris-0.6-2/build/Makefile.translation 1970-01-01 01:00:00.000000000 +0100 +++ gpe-tetris-0.6-2/build/Makefile.translation 2004-09-18 21:04:03.000000000 +0100 @@ -0,0 +1,103 @@ +.SUFFIXES: .mo .po .pot .po8 @@ -223,8 +223,8 @@ diff -urNd ../gpe-tetris-0.6-2-r0/gpe-tetris-0.6-2/build/Makefile.translation gp + +translation-ipkg: + make PREFIX=/usr real-translation-package -diff -urNd ../gpe-tetris-0.6-2-r0/gpe-tetris-0.6-2/Makefile gpe-tetris-0.6-2/Makefile ---- ../gpe-tetris-0.6-2-r0/gpe-tetris-0.6-2/Makefile 2004-09-17 23:48:05.000000000 +0100 +diff -urNd gpe-tetris-0.6-2/Makefile gpe-tetris-0.6-2/Makefile +--- gpe-tetris-0.6-2/Makefile 2004-09-17 23:48:05.000000000 +0100 +++ gpe-tetris-0.6-2/Makefile 2004-09-18 21:09:31.000000000 +0100 @@ -9,30 +9,29 @@ CVSBUILD = no diff --git a/recipes/gpe-todo/gpe-todo-0.51/remove-render.patch b/recipes/gpe-todo/gpe-todo-0.51/remove-render.patch index 9369ce9f31..55325ad075 100644 --- a/recipes/gpe-todo/gpe-todo-0.51/remove-render.patch +++ b/recipes/gpe-todo/gpe-todo-0.51/remove-render.patch @@ -1,4 +1,4 @@ ---- ../gpe-todo-0.51-r1/gpe-todo-0.51/list-ui.c 2005-01-01 03:40:30.000000000 +0100 +--- gpe-todo-0.51/list-ui.c 2005-01-01 03:40:30.000000000 +0100 +++ gpe-todo-0.51/list-ui.c 2005-04-20 21:13:40.191069800 +0200 @@ -17,7 +17,6 @@ diff --git a/recipes/gpe-watch/gpe-watch-0.10/fix_makefile.patch b/recipes/gpe-watch/gpe-watch-0.10/fix_makefile.patch index ebea8d66e9..c5cf83ca1e 100644 --- a/recipes/gpe-watch/gpe-watch-0.10/fix_makefile.patch +++ b/recipes/gpe-watch/gpe-watch-0.10/fix_makefile.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-watch-0.10-r0/gpe-watch-0.10/Makefile gpe-watch-0.10/Makefile ---- ../gpe-watch-0.10-r0/gpe-watch-0.10/Makefile 2004-08-03 15:43:54.000000000 +0100 +diff -urNd gpe-watch-0.10/Makefile gpe-watch-0.10/Makefile +--- gpe-watch-0.10/Makefile 2004-08-03 15:43:54.000000000 +0100 +++ gpe-watch-0.10/Makefile 2004-08-03 16:08:52.000000000 +0100 @@ -8,26 +8,26 @@ MEMBERS = gpe-watch diff --git a/recipes/gpe-watch/gpe-watch-0.10/no-render-h.patch b/recipes/gpe-watch/gpe-watch-0.10/no-render-h.patch index b2fc236e7a..1b0b36a380 100644 --- a/recipes/gpe-watch/gpe-watch-0.10/no-render-h.patch +++ b/recipes/gpe-watch/gpe-watch-0.10/no-render-h.patch @@ -1,5 +1,5 @@ -diff -urNd ../gpe-watch-0.10-r0/gpe-watch-0.10/gpe-watch.c gpe-watch-0.10/gpe-watch.c ---- ../gpe-watch-0.10-r0/gpe-watch-0.10/gpe-watch.c 2004-06-30 12:12:20 +01:00 +diff -urNd gpe-watch-0.10/gpe-watch.c gpe-watch-0.10/gpe-watch.c +--- gpe-watch-0.10/gpe-watch.c 2004-06-30 12:12:20 +01:00 +++ gpe-watch-0.10/gpe-watch.c 2005-04-28 12:41:33 +01:00 @@ -24,7 +24,6 @@ #ifdef USE_GPE diff --git a/recipes/gsoko/gsoko-0.4.2-gpe5/fix_makefiles.patch b/recipes/gsoko/gsoko-0.4.2-gpe5/fix_makefiles.patch index 8c6ba2aad6..534103e232 100644 --- a/recipes/gsoko/gsoko-0.4.2-gpe5/fix_makefiles.patch +++ b/recipes/gsoko/gsoko-0.4.2-gpe5/fix_makefiles.patch @@ -1,5 +1,5 @@ -diff -urNd ../gsoko-0.4.2-gpe5-r0/gsoko-0.4.2-gpe5/Makefile gsoko-0.4.2-gpe5/Makefile ---- ../gsoko-0.4.2-gpe5-r0/gsoko-0.4.2-gpe5/Makefile 2004-09-18 00:03:00.000000000 +0100 +diff -urNd gsoko-0.4.2-gpe5/Makefile gsoko-0.4.2-gpe5/Makefile +--- gsoko-0.4.2-gpe5/Makefile 2004-09-18 00:03:00.000000000 +0100 +++ gsoko-0.4.2-gpe5/Makefile 2004-09-20 20:14:46.000000000 +0100 @@ -1,16 +1,21 @@ diff --git a/recipes/gsoko/gsoko-0.4.2-gpe6/fix_makefiles.patch b/recipes/gsoko/gsoko-0.4.2-gpe6/fix_makefiles.patch index f734be4961..28b65e0970 100644 --- a/recipes/gsoko/gsoko-0.4.2-gpe6/fix_makefiles.patch +++ b/recipes/gsoko/gsoko-0.4.2-gpe6/fix_makefiles.patch @@ -1,5 +1,5 @@ -diff -urNd ../gsoko-0.4.2-gpe5-r0/gsoko-0.4.2-gpe5/Makefile gsoko-0.4.2-gpe5/Makefile ---- ../gsoko-0.4.2-gpe5-r0/gsoko-0.4.2-gpe5/Makefile 2004-09-18 00:03:00.000000000 +0100 +diff -urNd gsoko-0.4.2-gpe5/Makefile gsoko-0.4.2-gpe5/Makefile +--- gsoko-0.4.2-gpe5/Makefile 2004-09-18 00:03:00.000000000 +0100 +++ gsoko-0.4.2-gpe5/Makefile 2004-09-20 20:14:46.000000000 +0100 @@ -1,16 +1,21 @@ diff --git a/recipes/gstreamer/gst-ffmpeg_0.10.11.bb b/recipes/gstreamer/gst-ffmpeg_0.10.11.bb index 3a6533a9dd..563521e7c4 100644 --- a/recipes/gstreamer/gst-ffmpeg_0.10.11.bb +++ b/recipes/gstreamer/gst-ffmpeg_0.10.11.bb @@ -5,6 +5,8 @@ LICENSE = "LGPL" HOMEPAGE = "http://www.gstreamer.net/" DEPENDS = "ffmpeg gstreamer gst-plugins-base zlib" +PR = "r1" + inherit autotools pkgconfig SRC_URI = "http://gstreamer.freedesktop.org/src/${PN}/${PN}-${PV}.tar.bz2 \ @@ -23,7 +25,3 @@ EXTRA_OECONF = " --with-system-ffmpeg " # We do this because the install program is called with -s which causes it to # call "strip" and it then mangles cross compiled stuff.. PATH_prepend := "${TOOLCHAIN_PATH}/${TARGET_SYS}/bin:" - -# Hack to get STAGING_LIBDIR into the linker path when building ffmpeg -CC = "${CCACHE} ${HOST_PREFIX}gcc ${TARGET_CC_ARCH} -L${STAGING_LIBDIR}" - diff --git a/recipes/gstreamer/gst-plugins-good_0.10.28.bb b/recipes/gstreamer/gst-plugins-good_0.10.28.bb new file mode 100644 index 0000000000..c13f2d9c47 --- /dev/null +++ b/recipes/gstreamer/gst-plugins-good_0.10.28.bb @@ -0,0 +1,15 @@ +require gst-plugins.inc + +PR = "${INC_PR}.1" + +SRC_URI[archive.md5sum] = "6ef1588921f59d85c44ee2e49a3c97a0" +SRC_URI[archive.sha256sum] = "adfbce68b9fbadb7a7aeda2227af6afe1928ef025af4158726617b9d6834b028" + +inherit gconf + +DEPENDS += "hal pulseaudio speex libsoup-2.4 flac gst-plugins-base openssl popt esound libv4l" + +PACKAGES =+ "gst-plugin-gconfelements" +FILES_gst-plugin-gconfelements += "${sysconfdir}/gconf" + +EXTRA_OECONF += " --with-libv4l2 " diff --git a/recipes/gthumb/gthumb_2.10.11.bb b/recipes/gthumb/gthumb_2.10.11.bb index 079e3bd477..e6a7c1ebc0 100644 --- a/recipes/gthumb/gthumb_2.10.11.bb +++ b/recipes/gthumb/gthumb_2.10.11.bb @@ -7,13 +7,15 @@ inherit gnome SRC_URI += "file://pkg-config-hack.patch" -PR = "r2" +PR = "r3" FILES_${PN} += "${libdir}/*.so ${datadir}/gnome* ${datadir}/application-registry/*" FILES_${PN}-dbg += "${libdir}/gthumb/modules/.debug" do_configure_prepend() { sed -i "s|HACK_STAGING_DIR_HOST|${STAGING_DIR_HOST}|" ${S}/add-include-prefix + # replace paths to STAGING_BINDIR_NATIVE/perl with ${bindir}/perl + sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${S}/intltool*.in } SRC_URI[archive.md5sum] = "498c583800a05593f7493e8f27991c7d" diff --git a/recipes/gthumb/gthumb_2.6.9.bb b/recipes/gthumb/gthumb_2.6.9.bb index 3eb0661395..2061fda96d 100644 --- a/recipes/gthumb/gthumb_2.6.9.bb +++ b/recipes/gthumb/gthumb_2.6.9.bb @@ -1,15 +1,17 @@ DESCRIPTION = "gThumb is an image viewer and browser for the GNOME Desktop." LICENSE = "GPL" - DEPENDS = "gtk+ libexif libgnome libgnomeui libgnomeprintui" +PR = "r1" SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz" inherit autotools pkgconfig FILES_${PN} += "${datadir}/gnome* ${datadir}/application-registry/*" - - +do_configure_prepend() { + # replace paths to STAGING_BINDIR_NATIVE/perl with ${bindir}/perl + sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${S}/intltool*.in +} SRC_URI[md5sum] = "2819ec911a7cc4f46b95240b65f2b3e2" SRC_URI[sha256sum] = "b02423f0dc9f82a3e1a56cfd470c1cee5d351654fdc55c1a3cd5cff150828b3c" diff --git a/recipes/gtk+/gtk+-2.10.14/no-xwc.patch b/recipes/gtk+/gtk+-2.10.14/no-xwc.patch index affb4a303e..8de54de9d8 100644 --- a/recipes/gtk+/gtk+-2.10.14/no-xwc.patch +++ b/recipes/gtk+/gtk+-2.10.14/no-xwc.patch @@ -1,5 +1,5 @@ -diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c ---- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00 +diff -urNd gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c +--- gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00 +++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00 @@ -576,12 +576,14 @@ GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2); @@ -32,8 +32,8 @@ diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/ else g_error("undefined font type\n"); } -diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c ---- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00 +diff -urNd gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c +--- gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00 +++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00 @@ -525,10 +525,12 @@ width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2); @@ -96,8 +96,8 @@ diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/ } } -diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c ---- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00 +diff -urNd gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c +--- gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00 +++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00 @@ -48,6 +48,7 @@ void diff --git a/recipes/gtk+/gtk+-2.10.14/small-gtkfilesel.patch b/recipes/gtk+/gtk+-2.10.14/small-gtkfilesel.patch index 20bf4cf366..d6efa1e612 100644 --- a/recipes/gtk+/gtk+-2.10.14/small-gtkfilesel.patch +++ b/recipes/gtk+/gtk+-2.10.14/small-gtkfilesel.patch @@ -1,5 +1,5 @@ -diff -urNd ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c ---- ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100 +diff -urNd gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c +--- gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100 +++ gtk+-2.4.4/gtk/gtkfilesel.c 2004-09-13 13:40:09.000000000 +0100 @@ -68,6 +68,7 @@ #include "gtkprivate.h" diff --git a/recipes/gtk+/gtk+-2.6.10/no-xwc.patch b/recipes/gtk+/gtk+-2.6.10/no-xwc.patch index affb4a303e..8de54de9d8 100644 --- a/recipes/gtk+/gtk+-2.6.10/no-xwc.patch +++ b/recipes/gtk+/gtk+-2.6.10/no-xwc.patch @@ -1,5 +1,5 @@ -diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c ---- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00 +diff -urNd gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c +--- gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2004-11-30 14:57:14 +00:00 +++ gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c 2005-01-02 15:38:06 +00:00 @@ -576,12 +576,14 @@ GDK_GC_GET_XGC (gc), x, y, (XChar2b *) text, text_length / 2); @@ -32,8 +32,8 @@ diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkdrawable-x11.c gtk+-2.6.0/gdk/ else g_error("undefined font type\n"); } -diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c ---- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00 +diff -urNd gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/gdkfont-x11.c +--- gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2004-08-26 01:23:46 +01:00 +++ gtk+-2.6.0/gdk/x11/gdkfont-x11.c 2005-01-02 15:45:39 +00:00 @@ -525,10 +525,12 @@ width = XTextWidth16 (xfont, (XChar2b *) text, text_length / 2); @@ -96,8 +96,8 @@ diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkfont-x11.c gtk+-2.6.0/gdk/x11/ } } -diff -urNd ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c ---- ../gtk+-2.6.0-r2/gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00 +diff -urNd gtk+-2.6.0/gdk/x11/gdkim-x11.c gtk+-2.6.0/gdk/x11/gdkim-x11.c +--- gtk+-2.6.0/gdk/x11/gdkim-x11.c 2004-11-17 00:55:10 +00:00 +++ gtk+-2.6.0/gdk/x11/gdkim-x11.c 2005-01-02 15:42:04 +00:00 @@ -48,6 +48,7 @@ void diff --git a/recipes/gtk+/gtk+-2.6.10/single-click.patch b/recipes/gtk+/gtk+-2.6.10/single-click.patch index 3bb208d4d6..41e70c8487 100644 --- a/recipes/gtk+/gtk+-2.6.10/single-click.patch +++ b/recipes/gtk+/gtk+-2.6.10/single-click.patch @@ -1,5 +1,5 @@ -diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c gtk+-2.6.3/gtk/gtkcalendar.c ---- ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 16:57:04 +01:00 +diff -urNd gtk+-2.6.3/gtk/gtkcalendar.c gtk+-2.6.3/gtk/gtkcalendar.c +--- gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 16:57:04 +01:00 +++ gtk+-2.6.3/gtk/gtkcalendar.c 2005-04-06 20:05:18 +01:00 @@ -1023,9 +1023,11 @@ } @@ -15,8 +15,8 @@ diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkcalendar.c gtk+-2.6.3/gtk/gtkc private_data->in_drag = 0; if (day_month == MONTH_CURRENT) g_signal_emit (calendar, -diff -urNd ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkfilesel.c gtk+-2.6.3/gtk/gtkfilesel.c ---- ../gtk+-2.6.3-r0.old/gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-06 16:57:07 +01:00 +diff -urNd gtk+-2.6.3/gtk/gtkfilesel.c gtk+-2.6.3/gtk/gtkfilesel.c +--- gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-06 16:57:07 +01:00 +++ gtk+-2.6.3/gtk/gtkfilesel.c 2005-04-07 13:40:32 +01:00 @@ -2468,6 +2468,33 @@ if (fs->last_selected != NULL) diff --git a/recipes/gtk+/gtk+-2.6.10/small-gtkfilesel.patch b/recipes/gtk+/gtk+-2.6.10/small-gtkfilesel.patch index 20bf4cf366..d6efa1e612 100644 --- a/recipes/gtk+/gtk+-2.6.10/small-gtkfilesel.patch +++ b/recipes/gtk+/gtk+-2.6.10/small-gtkfilesel.patch @@ -1,5 +1,5 @@ -diff -urNd ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c ---- ../gtk+-2.4.4-r5/gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100 +diff -urNd gtk+-2.4.4/gtk/gtkfilesel.c gtk+-2.4.4/gtk/gtkfilesel.c +--- gtk+-2.4.4/gtk/gtkfilesel.c 2004-07-10 05:02:10.000000000 +0100 +++ gtk+-2.4.4/gtk/gtkfilesel.c 2004-09-13 13:40:09.000000000 +0100 @@ -68,6 +68,7 @@ #include "gtkprivate.h" diff --git a/recipes/gweled/gweled-0.5/de-gnome.patch b/recipes/gweled/gweled-0.5/de-gnome.patch index 5117633031..a268e755c4 100644 --- a/recipes/gweled/gweled-0.5/de-gnome.patch +++ b/recipes/gweled/gweled-0.5/de-gnome.patch @@ -1,5 +1,5 @@ -diff -urNd ../gweled-0.5-r0/gweled-0.5/configure.in gweled-0.5/configure.in ---- ../gweled-0.5-r0/gweled-0.5/configure.in 2004-01-22 20:14:23.000000000 +0000 +diff -urNd gweled-0.5/configure.in gweled-0.5/configure.in +--- gweled-0.5/configure.in 2004-01-22 20:14:23.000000000 +0000 +++ gweled-0.5/configure.in 2004-09-28 12:32:39.000000000 +0100 @@ -10,7 +10,7 @@ AM_PROG_CC_STDC @@ -10,8 +10,8 @@ diff -urNd ../gweled-0.5-r0/gweled-0.5/configure.in gweled-0.5/configure.in PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) -diff -urNd ../gweled-0.5-r0/gweled-0.5/src/board_engine.c gweled-0.5/src/board_engine.c ---- ../gweled-0.5-r0/gweled-0.5/src/board_engine.c 2004-01-25 08:23:54.000000000 +0000 +diff -urNd gweled-0.5/src/board_engine.c gweled-0.5/src/board_engine.c +--- gweled-0.5/src/board_engine.c 2004-01-25 08:23:54.000000000 +0000 +++ gweled-0.5/src/board_engine.c 2004-09-28 15:56:32.000000000 +0100 @@ -1,4 +1,4 @@ -#include @@ -37,8 +37,8 @@ diff -urNd ../gweled-0.5-r0/gweled-0.5/src/board_engine.c gweled-0.5/src/board_e g_do_not_score = FALSE; gi_state = _IDLE; } -diff -urNd ../gweled-0.5-r0/gweled-0.5/src/callbacks.c gweled-0.5/src/callbacks.c ---- ../gweled-0.5-r0/gweled-0.5/src/callbacks.c 2004-01-21 17:25:34.000000000 +0000 +diff -urNd gweled-0.5/src/callbacks.c gweled-0.5/src/callbacks.c +--- gweled-0.5/src/callbacks.c 2004-01-21 17:25:34.000000000 +0000 +++ gweled-0.5/src/callbacks.c 2004-09-28 13:20:55.000000000 +0100 @@ -2,8 +2,7 @@ # include @@ -152,8 +152,8 @@ diff -urNd ../gweled-0.5-r0/gweled-0.5/src/callbacks.c gweled-0.5/src/callbacks. } } break; -diff -urNd ../gweled-0.5-r0/gweled-0.5/src/callbacks.h gweled-0.5/src/callbacks.h ---- ../gweled-0.5-r0/gweled-0.5/src/callbacks.h 2003-11-05 21:01:08.000000000 +0000 +diff -urNd gweled-0.5/src/callbacks.h gweled-0.5/src/callbacks.h +--- gweled-0.5/src/callbacks.h 2003-11-05 21:01:08.000000000 +0000 +++ gweled-0.5/src/callbacks.h 2004-09-28 11:26:44.000000000 +0100 @@ -1,8 +1,8 @@ -#include @@ -175,8 +175,8 @@ diff -urNd ../gweled-0.5-r0/gweled-0.5/src/callbacks.h gweled-0.5/src/callbacks. GdkEventButton *event, gpointer user_data); -diff -urNd ../gweled-0.5-r0/gweled-0.5/src/graphic_engine.c gweled-0.5/src/graphic_engine.c ---- ../gweled-0.5-r0/gweled-0.5/src/graphic_engine.c 2004-01-22 22:09:05.000000000 +0000 +diff -urNd gweled-0.5/src/graphic_engine.c gweled-0.5/src/graphic_engine.c +--- gweled-0.5/src/graphic_engine.c 2004-01-22 22:09:05.000000000 +0000 +++ gweled-0.5/src/graphic_engine.c 2004-09-28 15:56:00.000000000 +0100 @@ -1,9 +1,13 @@ -#include @@ -300,8 +300,8 @@ diff -urNd ../gweled-0.5-r0/gweled-0.5/src/graphic_engine.c gweled-0.5/src/graph } -diff -urNd ../gweled-0.5-r0/gweled-0.5/src/main.c gweled-0.5/src/main.c ---- ../gweled-0.5-r0/gweled-0.5/src/main.c 2004-01-22 20:16:10.000000000 +0000 +diff -urNd gweled-0.5/src/main.c gweled-0.5/src/main.c +--- gweled-0.5/src/main.c 2004-01-22 20:16:10.000000000 +0000 +++ gweled-0.5/src/main.c 2004-10-13 10:17:43.000000000 +0100 @@ -25,19 +25,22 @@ # include @@ -541,8 +541,8 @@ diff -urNd ../gweled-0.5-r0/gweled-0.5/src/main.c gweled-0.5/src/main.c return 0; } -diff -urNd ../gweled-0.5-r0/gweled-0.5/src/Makefile.am gweled-0.5/src/Makefile.am ---- ../gweled-0.5-r0/gweled-0.5/src/Makefile.am 2003-12-11 21:34:19.000000000 +0000 +diff -urNd gweled-0.5/src/Makefile.am gweled-0.5/src/Makefile.am +--- gweled-0.5/src/Makefile.am 2003-12-11 21:34:19.000000000 +0000 +++ gweled-0.5/src/Makefile.am 2004-09-28 12:30:51.000000000 +0100 @@ -3,6 +3,7 @@ INCLUDES = \ @@ -552,8 +552,8 @@ diff -urNd ../gweled-0.5-r0/gweled-0.5/src/Makefile.am gweled-0.5/src/Makefile.a @PACKAGE_CFLAGS@ bin_PROGRAMS = gweled -diff -urNd ../gweled-0.5-r0/gweled-0.5/src/sge_core.c gweled-0.5/src/sge_core.c ---- ../gweled-0.5-r0/gweled-0.5/src/sge_core.c 2004-01-22 22:10:40.000000000 +0000 +diff -urNd gweled-0.5/src/sge_core.c gweled-0.5/src/sge_core.c +--- gweled-0.5/src/sge_core.c 2004-01-22 22:10:40.000000000 +0000 +++ gweled-0.5/src/sge_core.c 2004-10-13 10:20:45.000000000 +0100 @@ -18,11 +18,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -587,8 +587,8 @@ diff -urNd ../gweled-0.5-r0/gweled-0.5/src/sge_core.c gweled-0.5/src/sge_core.c g_rand_free (g_rand_generator); for (i = 0; i < gi_nb_pixbufs; i++) gdk_pixbuf_unref (g_pixbufs[i]); -diff -urNd ../gweled-0.5-r0/gweled-0.5/src/sge_utils.c gweled-0.5/src/sge_utils.c ---- ../gweled-0.5-r0/gweled-0.5/src/sge_utils.c 2003-12-07 19:28:57.000000000 +0000 +diff -urNd gweled-0.5/src/sge_utils.c gweled-0.5/src/sge_utils.c +--- gweled-0.5/src/sge_utils.c 2003-12-07 19:28:57.000000000 +0000 +++ gweled-0.5/src/sge_utils.c 2004-09-28 11:20:54.000000000 +0100 @@ -1,47 +1,30 @@ -#include @@ -648,8 +648,8 @@ diff -urNd ../gweled-0.5-r0/gweled-0.5/src/sge_utils.c gweled-0.5/src/sge_utils. return pixbuf; } -diff -urNd ../gweled-0.5-r0/gweled-0.5/src/sge_utils.h gweled-0.5/src/sge_utils.h ---- ../gweled-0.5-r0/gweled-0.5/src/sge_utils.h 2003-11-05 20:31:27.000000000 +0000 +diff -urNd gweled-0.5/src/sge_utils.h gweled-0.5/src/sge_utils.h +--- gweled-0.5/src/sge_utils.h 2003-11-05 20:31:27.000000000 +0000 +++ gweled-0.5/src/sge_utils.h 2004-09-28 11:14:27.000000000 +0100 @@ -1,3 +1,3 @@ diff --git a/recipes/gxine/files/disable-browser-plugin.patch b/recipes/gxine/files/disable-browser-plugin.patch index 3be381fabf..41015096a7 100644 --- a/recipes/gxine/files/disable-browser-plugin.patch +++ b/recipes/gxine/files/disable-browser-plugin.patch @@ -1,5 +1,5 @@ -diff -urNd ../gxine-0.4.1-r0.old/gxine-0.4.1/Makefile.am gxine-0.4.1/Makefile.am ---- ../gxine-0.4.1-r0.old/gxine-0.4.1/Makefile.am 2004-12-14 21:48:24 +00:00 +diff -urNd gxine-0.4.1/Makefile.am gxine-0.4.1/Makefile.am +--- gxine-0.4.1/Makefile.am 2004-12-14 21:48:24 +00:00 +++ gxine-0.4.1/Makefile.am 2005-04-08 03:40:48 +01:00 @@ -1,4 +1,4 @@ -SUBDIRS = m4 pixmaps include src doc browser-plugin misc po @@ -7,8 +7,8 @@ diff -urNd ../gxine-0.4.1-r0.old/gxine-0.4.1/Makefile.am gxine-0.4.1/Makefile.am #DEB_FILES = debian/rules debian/changelog debian/control debian/copyright debian/README.Debian debian/menu EXTRA_DIST = config.rpath gxine.desktop autogen.sh @DEPCOMP@ -diff -urNd ../gxine-0.4.1-r0.old/gxine-0.4.1/configure.ac gxine-0.4.1/configure.ac ---- ../gxine-0.4.1-r0.old/gxine-0.4.1/configure.ac 2005-04-08 04:00:05 +01:00 +diff -urNd gxine-0.4.1/configure.ac gxine-0.4.1/configure.ac +--- gxine-0.4.1/configure.ac 2005-04-08 04:00:05 +01:00 +++ gxine-0.4.1/configure.ac 2005-04-08 03:47:22 +01:00 @@ -42,12 +42,6 @@ AC_PATH_XTRA diff --git a/recipes/gypsy/gypsy.inc b/recipes/gypsy/gypsy.inc index eab062c5d6..6c7c942292 100644 --- a/recipes/gypsy/gypsy.inc +++ b/recipes/gypsy/gypsy.inc @@ -3,6 +3,10 @@ LICENSE = "GPL" SECTION = "x11" DEPENDS = "glib-2.0 dbus-glib bluez4 libxslt-native" +INC_PR = "r1" + +SRC_URI = "http://gypsy.freedesktop.org/releases/${PN}-${PV}.tar.gz;name=gypsy" + inherit autotools pkgconfig do_configure_prepend () { @@ -14,6 +18,6 @@ PACKAGES += "libgypsy libgypsy-dev libgypsy-dbg" FILES_lib${PN} = "${libdir}/lib*.so*" FILES_lib${PN}-dev = "${includedir}/* ${libdir}/*.la ${libdir}/*.a ${libdir}/pkgconfig" FILES_lib${PN}-dbg = "${libdir}/.debug" -FILES_${PN} = "${datadir}/dbus-1/services/ ${libexecdir}/gypsy-daemon ${sysconfdir}/dbus-1/system.d/*" +FILES_${PN} = "${datadir}/dbus-1/system-services/* ${libexecdir}/gypsy-daemon ${sysconfdir}/dbus-1/system.d/*" FILES_${PN}-dbg ="${libexecdir}/.debug*" CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.d/Gypsy.conf" diff --git a/recipes/gypsy/gypsy_0.7.bb b/recipes/gypsy/gypsy_0.7.bb deleted file mode 100644 index 8cd8760a07..0000000000 --- a/recipes/gypsy/gypsy_0.7.bb +++ /dev/null @@ -1,10 +0,0 @@ -require gypsy.inc - -SRC_URI = "http://gypsy.freedesktop.org/releases/gypsy-0.7.tar.gz;name=gypsy \ - file://docs-reference-am.patch \ - file://remove-werror.patch \ -" - -SRC_URI[gypsy.md5sum] = "cde52c121693014efa75d9098fd7de22" -SRC_URI[gypsy.sha256sum] = "60d9f9ada77c832899df4a164718895addc5015fa48f45fd58dc4bc8a983f205" - diff --git a/recipes/gypsy/gypsy_0.8.bb b/recipes/gypsy/gypsy_0.8.bb new file mode 100644 index 0000000000..c5813db701 --- /dev/null +++ b/recipes/gypsy/gypsy_0.8.bb @@ -0,0 +1,6 @@ +require gypsy.inc + +PR = "${INC_PR}.0" + +SRC_URI[gypsy.md5sum] = "32b8db24db86d2dac87b391dd255f4bf" +SRC_URI[gypsy.sha256sum] = "1986a58189614a950725c3bc7d05faa3b84695f35cb696326f340ef87fc3acaa" diff --git a/recipes/hostap/hostap-daemon-0.7.inc b/recipes/hostap/hostap-daemon-0.7.inc new file mode 100644 index 0000000000..49f265082c --- /dev/null +++ b/recipes/hostap/hostap-daemon-0.7.inc @@ -0,0 +1,26 @@ +HOMEPAGE = "http://hostap.epitest.fi" +SECTION = "kernel/userland" +PRIORITY = "optional" +LICENSE = "GPL" +DEPENDS = "libnl openssl" + +inherit update-rc.d +INITSCRIPT_NAME=hostapd + +do_configure() { + install -m 0644 ${WORKDIR}/defconfig ${S}/.config +} + +do_compile() { + make +} + +do_install() { + install -d ${D}${sbindir} ${D}${sysconfdir}/init.d + install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir} + install -m 0755 ${S}/hostapd ${D}${sbindir} + install -m 0755 ${S}/hostapd_cli ${D}${sbindir} + install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd +} + +CONFFILES_${PN} += "${sysconfdir}/hostapd.conf" diff --git a/recipes/hostap/hostap-daemon-git/defconfig b/recipes/hostap/hostap-daemon-git/defconfig new file mode 100644 index 0000000000..4fd90616ca --- /dev/null +++ b/recipes/hostap/hostap-daemon-git/defconfig @@ -0,0 +1,187 @@ +# Example hostapd build time configuration +# +# This file lists the configuration options that are used when building the +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. +# +# This file is included in Makefile, so variables like CFLAGS and LIBS can also +# be modified from here. In most cass, these lines should use += in order not +# to override previous values of the variables. + +#CC=$(CROSS_COMPILE)gcc +#CFLAGS += -I$(NFSROOT)/include -DCONFIG_LIBNL20 +#CPPFLAGS += -DCONFIG_LIBNL20 +#LIBS += -L$(NFSROOT)/lib -lnl-genl +#LIBS_p += -L$(NFSROOT)/lib +#LIBDIR = $(NFSROOT)/lib +#BINDIR = $(NFSROOT)/usr/sbin + +# Driver interface for Host AP driver +CONFIG_DRIVER_HOSTAP=y + +# Driver interface for wired authenticator +#CONFIG_DRIVER_WIRED=y + +# Driver interface for madwifi driver +#CONFIG_DRIVER_MADWIFI=y +#CFLAGS += -I../../madwifi # change to the madwifi source directory + +# Driver interface for drivers using the nl80211 kernel interface +CONFIG_DRIVER_NL80211=y +CONFIG_LIBNL20=y +# driver_nl80211.c requires a rather new libnl (version 1.1) which may not be +# shipped with your distribution yet. If that is the case, you need to build +# newer libnl version and point the hostapd build to use it. +#LIBNL=$(LIBNL_PATH) +#CFLAGS += -I$(LIBNL)/include +#LIBS += -L$(LIBNL)/lib + +# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) +#CONFIG_DRIVER_BSD=y +#CFLAGS += -I/usr/local/include +#LIBS += -L/usr/local/lib +#LIBS_p += -L/usr/local/lib +#LIBS_c += -L/usr/local/lib + +# Driver interface for no driver (e.g., RADIUS server only) +#CONFIG_DRIVER_NONE=y + +# IEEE 802.11F/IAPP +CONFIG_IAPP=y + +# WPA2/IEEE 802.11i RSN pre-authentication +CONFIG_RSN_PREAUTH=y + +# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) +CONFIG_PEERKEY=y + +# IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. +# Driver support is also needed for IEEE 802.11w. +#CONFIG_IEEE80211W=y + +# Integrated EAP server +CONFIG_EAP=y + +# EAP-MD5 for the integrated EAP server +CONFIG_EAP_MD5=y + +# EAP-TLS for the integrated EAP server +CONFIG_EAP_TLS=y + +# EAP-MSCHAPv2 for the integrated EAP server +CONFIG_EAP_MSCHAPV2=y + +# EAP-PEAP for the integrated EAP server +CONFIG_EAP_PEAP=y + +# EAP-GTC for the integrated EAP server +CONFIG_EAP_GTC=y + +# EAP-TTLS for the integrated EAP server +CONFIG_EAP_TTLS=y + +# EAP-SIM for the integrated EAP server +#CONFIG_EAP_SIM=y + +# EAP-AKA for the integrated EAP server +#CONFIG_EAP_AKA=y + +# EAP-AKA' for the integrated EAP server +# This requires CONFIG_EAP_AKA to be enabled, too. +#CONFIG_EAP_AKA_PRIME=y + +# EAP-PAX for the integrated EAP server +#CONFIG_EAP_PAX=y + +# EAP-PSK for the integrated EAP server (this is _not_ needed for WPA-PSK) +#CONFIG_EAP_PSK=y + +# EAP-SAKE for the integrated EAP server +#CONFIG_EAP_SAKE=y + +# EAP-GPSK for the integrated EAP server +#CONFIG_EAP_GPSK=y +# Include support for optional SHA256 cipher suite in EAP-GPSK +#CONFIG_EAP_GPSK_SHA256=y + +# EAP-FAST for the integrated EAP server +# Note: Default OpenSSL package does not include support for all the +# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, +# the OpenSSL library must be patched (openssl-0.9.9-session-ticket.patch) +# to add the needed functions. +#CONFIG_EAP_FAST=y + +# Wi-Fi Protected Setup (WPS) +CONFIG_WPS=y +# Enable UPnP support for external WPS Registrars +#CONFIG_WPS_UPNP=y + +# EAP-IKEv2 +#CONFIG_EAP_IKEV2=y + +# Trusted Network Connect (EAP-TNC) +#CONFIG_EAP_TNC=y + +# PKCS#12 (PFX) support (used to read private key and certificate file from +# a file that usually has extension .p12 or .pfx) +CONFIG_PKCS12=y + +# RADIUS authentication server. This provides access to the integrated EAP +# server from external hosts using RADIUS. +#CONFIG_RADIUS_SERVER=y + +# Build IPv6 support for RADIUS operations +CONFIG_IPV6=y + +# IEEE Std 802.11r-2008 (Fast BSS Transition) +#CONFIG_IEEE80211R=y + +# Use the hostapd's IEEE 802.11 authentication (ACL), but without +# the IEEE 802.11 Management capability (e.g., madwifi or FreeBSD/net80211) +#CONFIG_DRIVER_RADIUS_ACL=y + +# IEEE 802.11n (High Throughput) support +#CONFIG_IEEE80211N=y + +# Remove debugging code that is printing out debug messages to stdout. +# This can be used to reduce the size of the hostapd considerably if debugging +# code is not needed. +#CONFIG_NO_STDOUT_DEBUG=y + +# Remove support for RADIUS accounting +#CONFIG_NO_ACCOUNTING=y + +# Remove support for RADIUS +#CONFIG_NO_RADIUS=y + +# Remove support for VLANs +#CONFIG_NO_VLAN=y + +# Remove support for dumping state into a file on SIGUSR1 signal +# This can be used to reduce binary size at the cost of disabling a debugging +# option. +#CONFIG_NO_DUMP_STATE=y + +# Enable tracing code for developer debugging +# This tracks use of memory allocations and other registrations and reports +# incorrect use with a backtrace of call (or allocation) location. +#CONFIG_WPA_TRACE=y +# For BSD, comment out these. +#LIBS += -lexecinfo +#LIBS_p += -lexecinfo +#LIBS_c += -lexecinfo + +# Use libbfd to get more details for developer debugging +# This enables use of libbfd to get more detailed symbols for the backtraces +# generated by CONFIG_WPA_TRACE=y. +#CONFIG_WPA_TRACE_BFD=y +# For BSD, comment out these. +#LIBS += -lbfd -liberty -lz +#LIBS_p += -lbfd -liberty -lz +#LIBS_c += -lbfd -liberty -lz + + + diff --git a/recipes/hostap/hostap-daemon_0.7.3.bb b/recipes/hostap/hostap-daemon_0.7.3.bb index 2dfec3537e..5a8aee7045 100644 --- a/recipes/hostap/hostap-daemon_0.7.3.bb +++ b/recipes/hostap/hostap-daemon_0.7.3.bb @@ -1,10 +1,8 @@ DESCRIPTION = "User space daemon for extended IEEE 802.11 management" -HOMEPAGE = "http://hostap.epitest.fi" -SECTION = "kernel/userland" -PRIORITY = "optional" -LICENSE = "GPL" -DEPENDS = "libnl2 openssl" -PR = "r1" + +require hostap-daemon-0.7.inc + +PR = "r3" DEFAULT_PREFERENCE = "-1" @@ -16,24 +14,4 @@ SRC_URI[sha256sum] = "31eb2781f37e1a4c27969d1594f8019c0ca87779349c099ab812833289 S = "${WORKDIR}/hostapd-${PV}/hostapd" -inherit update-rc.d -INITSCRIPT_NAME=hostapd - -do_configure() { - install -m 0644 ${WORKDIR}/defconfig ${S}/.config - echo 'CFLAGS += "-I${STAGING_INCDIR}/libnl2"' >> ${S}/.config -} - -do_compile() { - make -} - -do_install() { - install -d ${D}${sbindir} ${D}${sysconfdir}/init.d - install -m 0644 ${S}/hostapd.conf ${D}${sysconfdir} - install -m 0755 ${S}/hostapd ${D}${sbindir} - install -m 0755 ${S}/hostapd_cli ${D}${sbindir} - install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd -} -CONFFILES_${PN} += "${sysconfdir}/hostapd.conf" diff --git a/recipes/hostap/hostap-daemon_git.bb b/recipes/hostap/hostap-daemon_git.bb new file mode 100644 index 0000000000..b8aaa02b8d --- /dev/null +++ b/recipes/hostap/hostap-daemon_git.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "User space daemon for extended IEEE 802.11 management" + +require hostap-daemon-0.7.inc + +PR = "r1" +SRCREV = "83fa07226debc2f7082b6ccd62dbb1cd47c30472" +PV = "0.7.3+0.8.0-rc" +PR_append = "gitr${SRCPV}" +FILESPATHPKG =. "hostap-daemon-git:" + +DEFAULT_PREFERENCE = "-1" + +S = "${WORKDIR}/git/hostapd" + +SRC_URI = "git://w1.fi/srv/git/hostap.git;protocol=git \ + file://defconfig \ + file://init" + +S = "${WORKDIR}/git/hostapd" + +do_configure() { + install -m 0644 ${WORKDIR}/defconfig ${S}/.config + echo "CFLAGS += -I${STAGING_INCDIR}" >> .config + echo "LIBS += -L${STAGING_LIBDIR}" >> .config +} diff --git a/recipes/icedtea/icedtea6-native-1.7.6/build-hacks-native.patch b/recipes/icedtea/icedtea6-native-1.7.10/build-hacks-native.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/build-hacks-native.patch rename to recipes/icedtea/icedtea6-native-1.7.10/build-hacks-native.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/disable-library-checks.patch b/recipes/icedtea/icedtea6-native-1.7.10/disable-library-checks.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/disable-library-checks.patch rename to recipes/icedtea/icedtea6-native-1.7.10/disable-library-checks.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-ecj-disable-compilation.patch b/recipes/icedtea/icedtea6-native-1.7.10/icedtea-ecj-disable-compilation.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/icedtea-ecj-disable-compilation.patch rename to recipes/icedtea/icedtea6-native-1.7.10/icedtea-ecj-disable-compilation.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-ecj-fix-freetype.patch b/recipes/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-freetype.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/icedtea-ecj-fix-freetype.patch rename to recipes/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-freetype.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-ecj-fix-zlib.patch b/recipes/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-zlib.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/icedtea-ecj-fix-zlib.patch rename to recipes/icedtea/icedtea6-native-1.7.10/icedtea-ecj-fix-zlib.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-fix-jar-path.patch b/recipes/icedtea/icedtea6-native-1.7.10/icedtea-fix-jar-path.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/icedtea-fix-jar-path.patch rename to recipes/icedtea/icedtea6-native-1.7.10/icedtea-fix-jar-path.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-hotspot-make-arch-sane-for-x86.patch b/recipes/icedtea/icedtea6-native-1.7.10/icedtea-hotspot-make-arch-sane-for-x86.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/icedtea-hotspot-make-arch-sane-for-x86.patch rename to recipes/icedtea/icedtea6-native-1.7.10/icedtea-hotspot-make-arch-sane-for-x86.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-javac-in.patch b/recipes/icedtea/icedtea6-native-1.7.10/icedtea-javac-in.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/icedtea-javac-in.patch rename to recipes/icedtea/icedtea6-native-1.7.10/icedtea-javac-in.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-jdk-sane-x86-arch.patch b/recipes/icedtea/icedtea6-native-1.7.10/icedtea-jdk-sane-x86-arch.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/icedtea-jdk-sane-x86-arch.patch rename to recipes/icedtea/icedtea6-native-1.7.10/icedtea-jdk-sane-x86-arch.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-sane-x86-arch-name.patch b/recipes/icedtea/icedtea6-native-1.7.10/icedtea-sane-x86-arch-name.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/icedtea-sane-x86-arch-name.patch rename to recipes/icedtea/icedtea6-native-1.7.10/icedtea-sane-x86-arch-name.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-unbreak-float.patch b/recipes/icedtea/icedtea6-native-1.7.10/icedtea-unbreak-float.patch similarity index 100% rename from recipes/icedtea/icedtea6-native-1.7.6/icedtea-unbreak-float.patch rename to recipes/icedtea/icedtea6-native-1.7.10/icedtea-unbreak-float.patch diff --git a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-jdk-build-sizer-32-on-amd64.patch b/recipes/icedtea/icedtea6-native-1.7.6/icedtea-jdk-build-sizer-32-on-amd64.patch deleted file mode 100644 index 3baeb5d738..0000000000 --- a/recipes/icedtea/icedtea6-native-1.7.6/icedtea-jdk-build-sizer-32-on-amd64.patch +++ /dev/null @@ -1,36 +0,0 @@ -Build the xawt sizer.32 binary on Linux/x86_64 so we can use it when -compiling openjdk for 32-bit platforms. - ---- openjdk/jdk/make/sun/xawt/Makefile.orig 2011-01-08 01:53:22.000000000 -0500 -+++ openjdk/jdk/make/sun/xawt/Makefile 2011-01-11 15:12:17.000000000 -0500 -@@ -184,6 +184,22 @@ - - else # !solaris - -+ifeq ($(PLATFORM), linux) -+ -+ifeq ($(ARCH), amd64) -+# On amd64 we generate both 32 and 64-bit sizers in spite of ARCH_DATA_MODEL. -+SIZERS = $(SIZER).32 $(SIZER).64 -+SIZERS_C = $(SIZER_32_C) $(SIZER_64_C) -+SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 $(WRAPPER_GENERATOR_DIR)/sizes.64 -+CFLAGS_32 = $(CFLAGS) -m32 -+else # !amd64 -+SIZERS = $(SIZER).32 -+SIZERS_C = $(SIZER_32_C) -+SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.32 -+endif # amd64 -+ -+else # !linux -+ - ifeq ($(ARCH_DATA_MODEL), 32) - SIZERS = $(SIZER).32 - SIZERS_C = $(SIZER_32_C) -@@ -194,6 +210,7 @@ - SIZES = $(WRAPPER_GENERATOR_DIR)/sizes.64 - endif # 32 - -+endif # linux - endif # solaris - - # XXX Hack for 6185483 - use hard-coded sizes. diff --git a/recipes/icedtea/icedtea6-native.inc b/recipes/icedtea/icedtea6-native.inc index 39ecdad1bb..91d6075a88 100644 --- a/recipes/icedtea/icedtea6-native.inc +++ b/recipes/icedtea/icedtea6-native.inc @@ -1,12 +1,13 @@ DESCRIPTION = "Harness to build the source code from OpenJDK using Free Software build tools" HOMEPAGE = "http://icedtea.classpath.org" LICENSE = "GPL with Classpath Exception" -INC_PR = "r3" +INC_PR = "r5" DEPENDS = "virtual/javac-native classpath-tools-native \ virtual/java-native classpath-native \ xalan-j-native xerces-j-native rhino-native \ - ant-native libx11-native xproto-native libxt-native \ + ant-native \ + libx11-native xproto-native libxt-native libxext-native \ freetype-native zlib-native giflib-native jpeg-native \ zip-native \ " @@ -107,6 +108,13 @@ do_configure_append() { -e"s|g++\$(GCC_SUFFIX)|${CXX}|" \ $F done + + for F in openjdk/hotspot/make/linux/Makefile openjdk-ecj/hotspot/make/linux/Makefile ; + do + sed -i \ + -e"s|SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 2.7%|SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3%|" \ + $F + done } EXTRA_OEMAKE = ' \ diff --git a/recipes/icedtea/icedtea6-native_1.7.6.bb b/recipes/icedtea/icedtea6-native_1.7.10.bb similarity index 82% rename from recipes/icedtea/icedtea6-native_1.7.6.bb rename to recipes/icedtea/icedtea6-native_1.7.10.bb index 126f2f45a8..77c6232e04 100644 --- a/recipes/icedtea/icedtea6-native_1.7.6.bb +++ b/recipes/icedtea/icedtea6-native_1.7.10.bb @@ -14,8 +14,8 @@ SRC_URI = "\ " SRC_URI[ojdk.md5sum] = "078fe0ab744c98694decc77f2456c560" SRC_URI[ojdk.sha256sum] = "2019a4c3d2d14620caa78d7df49fd987a041066b4631bde4fd8424033f3c1785" -SRC_URI[iced.md5sum] = "0a865e883987665ffcb34db9dd9b35c2" -SRC_URI[iced.sha256sum] = "b28c8bd39d9bd8a28efaaa38280288a3faa6bec0d756323c0555ad3d8c5d77f5" +SRC_URI[iced.md5sum] = "0d61041e46253d089f1b30114716012d" +SRC_URI[iced.sha256sum] = "dbca9d7598352d178651c8cc28ff887c59a27f0125785a58e9f9723611137f78" ICEDTEA_PATCHES = "\ file://icedtea-ecj-disable-compilation.patch;apply=no \ @@ -24,7 +24,6 @@ ICEDTEA_PATCHES = "\ file://icedtea-hotspot-make-arch-sane-for-x86.patch;apply=no \ file://icedtea-jdk-sane-x86-arch.patch;apply=no \ file://icedtea-unbreak-float.patch;apply=no \ - file://icedtea-jdk-build-sizer-32-on-amd64.patch;apply=no \ " export DISTRIBUTION_PATCHES = "\ @@ -34,5 +33,4 @@ export DISTRIBUTION_PATCHES = "\ patches/icedtea-hotspot-make-arch-sane-for-x86.patch \ patches/icedtea-jdk-sane-x86-arch.patch \ patches/icedtea-unbreak-float.patch \ - patches/icedtea-jdk-build-sizer-32-on-amd64.patch \ " diff --git a/recipes/icon-naming-utils/icon-naming-utils-native_0.8.7.bb b/recipes/icon-naming-utils/icon-naming-utils-native_0.8.7.bb index eb12bb040f..d2405a998d 100644 --- a/recipes/icon-naming-utils/icon-naming-utils-native_0.8.7.bb +++ b/recipes/icon-naming-utils/icon-naming-utils-native_0.8.7.bb @@ -1,11 +1,16 @@ LICENSE = "GPLv2" DEPENDS = "libxml-simple-perl-native" - +PR = "r1" SRC_URI = "http://tango.freedesktop.org/releases/icon-naming-utils-${PV}.tar.gz" S = "${WORKDIR}/icon-naming-utils-${PV}" inherit autotools native +do_configure_append() { + # replace paths to STAGING_BINDIR_NATIVE/perl with ${bindir}/perl + sed -i -e "1s:#!.*:#! /usr/bin/env perl:" ${S}/icon-name-mapping.pl.in +} + SRC_URI[md5sum] = "4abe604721ce2ccb67f451aa7ceb44d6" SRC_URI[sha256sum] = "1cb49ce6a04626939893a447da696f20003903d61bd80c6d74d29dd79ca340d2" diff --git a/recipes/images/beagleboard-validation-base-image.bb b/recipes/images/beagleboard-validation-base-image.bb new file mode 100644 index 0000000000..d8eca157e7 --- /dev/null +++ b/recipes/images/beagleboard-validation-base-image.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Validation image" + +inherit image + +export IMAGE_BASENAME = "validation-base-image" + +IMAGE_LINGUAS = "de-de fr-fr en-gb en-us pt-br es-es kn-in ml-in ta-in" +ROOTFS_POSTPROCESS_COMMAND += 'install_linguas; ' +IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp" + +IMAGE_LOGIN_MANAGER = "shadow" +IMAGE_SPLASH = "psplash-angstrom" + +ANGSTROM_EXTRA_INSTALL ?= "" + +IMAGE_INSTALL += " \ + task-omap-drivers \ + task-base-extended \ + task-beagleboard-validation-base \ + ${ANGSTROM_EXTRA_INSTALL} \ + ${IMAGE_SPLASH} \ +" + diff --git a/recipes/images/beagleboard-validation-e17-image.bb b/recipes/images/beagleboard-validation-e17-image.bb new file mode 100644 index 0000000000..40db0ee939 --- /dev/null +++ b/recipes/images/beagleboard-validation-e17-image.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Validation image with e17 desktop" + +inherit image + +export IMAGE_BASENAME = "validation-e17-image" + +IMAGE_LINGUAS = "de-de fr-fr en-gb en-us pt-br es-es kn-in ml-in ta-in" +ROOTFS_POSTPROCESS_COMMAND += 'install_linguas; ' +IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp" + +IMAGE_LOGIN_MANAGER = "shadow" +IMAGE_SPLASH = "psplash-angstrom" + +ANGSTROM_EXTRA_INSTALL ?= "" + +IMAGE_INSTALL += " \ + task-omap-drivers \ + task-base-extended \ + task-beagleboard-validation-base \ + task-beagleboard-validation-gui \ + ${ANGSTROM_EXTRA_INSTALL} \ + ${IMAGE_SPLASH} \ +" + diff --git a/recipes/images/beagleboard-validation-gnome-image.bb b/recipes/images/beagleboard-validation-gnome-image.bb new file mode 100644 index 0000000000..f82c6ca346 --- /dev/null +++ b/recipes/images/beagleboard-validation-gnome-image.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "Validation image based on the GNOME desktop" + +inherit image + +XSERVER ?= "xserver-xorg \ + xf86-input-evdev \ + xf86-input-mouse \ + xf86-video-fbdev \ + xf86-video-sisusb \ + xf86-input-keyboard \ +" + +export IMAGE_BASENAME = "validation-GNOME-image" + +IMAGE_LINGUAS = "de-de fr-fr en-gb en-us pt-br es-es kn-in ml-in ta-in" +ROOTFS_POSTPROCESS_COMMAND += 'install_linguas; ' +IMAGE_PREPROCESS_COMMAND = "create_etc_timestamp" + +IMAGE_LOGIN_MANAGER = "shadow" +IMAGE_SPLASH = "psplash-angstrom" + +ANGSTROM_EXTRA_INSTALL ?= "" + +IMAGE_INSTALL += " \ + task-omap-drivers \ + task-base-extended \ + ${ANGSTROM_EXTRA_INSTALL} \ + ${IMAGE_SPLASH} \ + angstrom-task-gnome \ + angstrom-gdm-autologin-hack \ + bash-sh \ +" + diff --git a/recipes/images/illume-image.bb b/recipes/images/illume-image.bb index 7e16c937cd..e01ef276ee 100644 --- a/recipes/images/illume-image.bb +++ b/recipes/images/illume-image.bb @@ -122,6 +122,7 @@ GLES_INSTALL_append_omap3evm = "libgles-omap3" #GLES_INSTALL_append_overo = "libgles-omap3" GLES_INSTALL_append_mx31ads = "libgles-mx31" GLES_INSTALL_append_mx31litekit = "libgles-mx31" +GLES_INSTALL_append_pcm043 = "libgles-mx31" GLES_INSTALL_append_zylonite = "libgles-zylonite" # python diff --git a/recipes/images/rascal-image.bb b/recipes/images/rascal-image.bb new file mode 100644 index 0000000000..a36b5dea2a --- /dev/null +++ b/recipes/images/rascal-image.bb @@ -0,0 +1,70 @@ +require recipes/images/minimal-image.bb + +IMAGE_INSTALL += "\ + ack \ + avahi-autoipd \ + avahi-daemon \ + binutils \ + blinkm \ + cpp \ + cpp-symlinks \ + curl \ + ffmpeg \ + g++ \ + g++-symlinks \ + gcc \ + gcc-symlinks \ + gfortran \ + gfortran-symlinks \ + git \ + htop \ + i2c-tools \ + iotop \ + iperf \ + ipython \ + libevent \ + libgcc-dev \ + libxml2 \ + logrotate \ + lsof \ + make \ + mtr \ + nano \ + nginx \ + ntpdate \ + openssh \ + openssh-sftp-server \ + perl \ + perl-modules \ + python \ + python-daemon \ + python-dev \ + python-flask \ + python-flask-login \ + python-gevent \ + python-greenlet \ + python-imaging \ + python-jinja2 \ + python-matplotlib \ + python-misc \ + python-modules \ + python-numpy \ + python-pip \ + python-pyserial \ + python-pytronics \ + python-simplejson \ + python-sqlalchemy \ + python-werkzeug \ + red \ + ruby \ + sysstat \ + usbutils \ + usb-gadget-mode \ + uwsgi \ + vim \ + vim-syntax \ + vim-vimrc \ + wireless-tools \ + " + +export IMAGE_BASENAME = "rascal-image" diff --git a/recipes/initscripts/files/rascal-analogger.py b/recipes/initscripts/files/rascal-analogger.py new file mode 100644 index 0000000000..1eaa8bc316 --- /dev/null +++ b/recipes/initscripts/files/rascal-analogger.py @@ -0,0 +1,8 @@ +#!/usr/bin/env python + +import daemon + +from pytronics import analogger + +with daemon.DaemonContext(): + analogger() diff --git a/recipes/initscripts/files/rascal-gpio.sh b/recipes/initscripts/files/rascal-gpio.sh new file mode 100644 index 0000000000..4ebb3e9602 --- /dev/null +++ b/recipes/initscripts/files/rascal-gpio.sh @@ -0,0 +1,5 @@ +for pin in 68 69 70 71 72 73 74 75 96 97 98 107 +do + echo $pin > /sys/class/gpio/export + echo out > /sys/class/gpio/gpio$pin/direction +done diff --git a/recipes/initscripts/files/rascal-hostname.sh b/recipes/initscripts/files/rascal-hostname.sh new file mode 100644 index 0000000000..99c5ca343e --- /dev/null +++ b/recipes/initscripts/files/rascal-hostname.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +# Explanation of the sed command below +# +# sed -ne s/thing1/thing2/p /path/to/file means: +# "Search the file for thing1, replace it with thing2, +# and only print the lines that you changed." +# [^:]* means zero or more characters from the set "not colons" +# \(something\) means "save this for later" +# \1 means "retrieve the first thing you saved" +# +# Overall, the command means: +# "Search /proc/cmdline for 5 colons after ip=, +# and print what's between colons 4 and 5." + +HOSTNAME="`sed -ne 's/^.*ip=[^:]*:[^:]*:[^:]*:[^:]*:\([^:]*\):.*/\1/p' /proc/cmdline`" + +if [ -z "$HOSTNAME" ] +then + HOSTNAME="rascal" +fi + +echo "$HOSTNAME" > /etc/hostname diff --git a/recipes/initscripts/files/rascal-set-hash.sh b/recipes/initscripts/files/rascal-set-hash.sh new file mode 100644 index 0000000000..6c84445c9b --- /dev/null +++ b/recipes/initscripts/files/rascal-set-hash.sh @@ -0,0 +1,77 @@ +#!/bin/sh + +# void log_msg(char*) +log_msg() +{ + local MSG=$1 + /usr/bin/logger -s -- $MSG +} + +# +# Busybox's chpasswd applet should do this for us, but +# it fails on root so we use this function instead +# +# int change_pw(char* username, char* pw_hash) +change_pw() +{ + local USER_NAME=$1 + local NEW_PW_HASH=$2 + + local PASSWD_FILE=/etc/passwd + local TEMP_FILE=/etc/passwd.tmp + + rm -f $TEMP_FILE + while IFS=: read -r f1 f2 f3 f4 f5 f6 f7 + do + if [ $f1 = $USER_NAME ]; then + f2=$NEW_PW_HASH + fi + echo "$f1:$f2:$f3:$f4:$f5:$f6:$f7" >> $TEMP_FILE + done < $PASSWD_FILE + + # Comment this out for dry-run + mv $TEMP_FILE $PASSWD_FILE +} + +log_msg "Initializing Rascal" + +# +# If root's password is blank, set it to board-specific default +# +PASSWD_FILE=/etc/passwd +IS_BLANK=0 +BACKUP_PW_HASH=LosSvlkIAcGLk # "rascalmicro" +PW_HASH="`sed -ne 's/^.* pwhash=\(.\{13\}\)/\1/p' /proc/cmdline`" + +if [ -z "$PW_HASH" ]; then + PW_HASH=$BACKUP_PW_HASH +fi + +while IFS=: read -r f1 f2 f3 f4 f5 f6 f7 +do + if [ $f1 = "root" ]; then + if [ -z $f2 ]; then + IS_BLANK=1 + fi + break + fi +done < $PASSWD_FILE + +if [ $IS_BLANK != 0 ]; then + log_msg "Root's password was blank." + change_pw root $PW_HASH + if [ "$PW_HASH" == "$BACKUP_PW_HASH" ]; then + log_msg "The root hash was not found in kernel command line." + log_msg "A hardcoded default hash has been used instead." + log_msg "This is *bad*. You should reset the root password immediately." + else + log_msg "The root password is now set to the default for this board." + log_msg "Ask milo@rascalmicro.com for the password if you've lost it." + fi + log_msg "For reference, the hash used is $PW_HASH." +else + log_msg "Root's password is not blank; good job." + log_msg "You are part of the solution." +fi + +exit 0 diff --git a/recipes/initscripts/files/rascal-webserver.sh b/recipes/initscripts/files/rascal-webserver.sh new file mode 100644 index 0000000000..599e3e6737 --- /dev/null +++ b/recipes/initscripts/files/rascal-webserver.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +PATH=/sbin:/bin:/usr/bin:/usr/sbin +WEBSERVER="/usr/sbin/nginx" +WEBSERVER_CONFIG="/etc/nginx/nginx.conf" +APPSERVER="/usr/sbin/uwsgi" +APPSERVER_CONFIG_DIR="/etc/uwsgi/" + +test -f $WEBSERVER || exit 0 +test -f $WEBSERVER_CONFIG || exit 0 +test -f $APPSERVER || exit 0 +test -d $APPSERVER_CONFIG_DIR || exit 0 + +case "$1" in +start) + echo "Starting Rascal webserver..." + $WEBSERVER -c $WEBSERVER_CONFIG + $APPSERVER --emperor $APPSERVER_CONFIG_DIR --daemonize /var/log/uwsgi/emperor.log + echo "done" + ;; +reload|restart) + echo "Reloading Rascal webserver..." + $WEBSERVER -c $WEBSERVER_CONFIG -s reload + echo "done" + echo "Reloading Python appserver..." + for file in $APPSERVER_CONFIG_DIR* + do + echo "Reloading app from $file" + touch $file + done + echo "done" + ;; +stop) + echo "Stopping Rascal webserver..." + $WEBSERVER -s stop + ps | awk '/uwsgi/ && !/awk/ {print $1}'| xargs kill -9 + echo "done" + ;; +*) + echo "Bad command passed to Rascal webserver boot script." + echo "Correct usage: /etc/init.d/rascal-webserver.sh {start|stop|reload}" + exit 1 +esac + +exit 0 diff --git a/recipes/initscripts/initscripts_1.0.bb b/recipes/initscripts/initscripts_1.0.bb index fc0086e175..993a6ba8f7 100644 --- a/recipes/initscripts/initscripts_1.0.bb +++ b/recipes/initscripts/initscripts_1.0.bb @@ -32,7 +32,12 @@ SRC_URI = "file://functions \ file://populate-volatile.sh \ file://volatiles \ file://save-rtc.sh \ - file://save-rtc-uclibc.sh" + file://save-rtc-uclibc.sh \ + file://rascal-analogger.py \ + file://rascal-gpio.sh \ + file://rascal-hostname.sh \ + file://rascal-set-hash.sh \ + file://rascal-webserver.sh" SRC_URI_append_arm = " file://alignment.sh" @@ -56,27 +61,32 @@ do_install () { install -d ${D}${sysconfdir}/default install -d ${D}${sysconfdir}/default/volatiles - install -m 0755 ${WORKDIR}/functions ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/bootmisc.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/checkroot ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/finish.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/halt ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/hostname.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/mountall.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/mountnfs.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/ramdisk ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/reboot ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/rmnologin ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/sendsigs ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/single ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/umountnfs.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/urandom ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/devpts.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/devpts ${D}${sysconfdir}/default - install -m 0755 ${WORKDIR}/sysfs.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/functions ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/bootmisc.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/checkroot ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/finish.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/halt ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/hostname.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/mountall.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/mountnfs.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/ramdisk ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/reboot ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/rmnologin ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/sendsigs ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/single ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/umountnfs.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/urandom ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/devpts.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/devpts ${D}${sysconfdir}/default + install -m 0755 ${WORKDIR}/sysfs.sh ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d - install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core + install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/rascal-analogger.py ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/rascal-gpio.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/rascal-hostname.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/rascal-set-hash.sh ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/rascal-webserver.sh ${D}${sysconfdir}/init.d + install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core if [ "${TARGET_ARCH}" = "arm" ]; then install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d fi @@ -89,41 +99,46 @@ do_install () { # # Create runlevel links # - ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc2.d/S99rmnologin - ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc3.d/S99rmnologin - ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc4.d/S99rmnologin - ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc5.d/S99rmnologin - ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc6.d/S20sendsigs -# ln -sf ../init.d/urandom ${D}${sysconfdir}/rc6.d/S30urandom - ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc6.d/S31umountnfs.sh - ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc6.d/S40umountfs + ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc2.d/S99rmnologin + ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc3.d/S99rmnologin + ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc4.d/S99rmnologin + ln -sf ../init.d/rmnologin ${D}${sysconfdir}/rc5.d/S99rmnologin + ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc6.d/S20sendsigs +# ln -sf ../init.d/urandom ${D}${sysconfdir}/rc6.d/S30urandom + ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc6.d/S31umountnfs.sh + ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc6.d/S40umountfs # udev will run at S55 if installed - ln -sf ../init.d/ramdisk ${D}${sysconfdir}/rcS.d/S30ramdisk - ln -sf ../init.d/reboot ${D}${sysconfdir}/rc6.d/S90reboot - ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc0.d/S20sendsigs -# ln -sf ../init.d/urandom ${D}${sysconfdir}/rc0.d/S30urandom - ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc0.d/S31umountnfs.sh - ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc0.d/S40umountfs + ln -sf ../init.d/ramdisk ${D}${sysconfdir}/rcS.d/S30ramdisk + ln -sf ../init.d/reboot ${D}${sysconfdir}/rc6.d/S90reboot + ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc0.d/S20sendsigs +# ln -sf ../init.d/urandom ${D}${sysconfdir}/rc0.d/S30urandom + ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc0.d/S31umountnfs.sh + ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc0.d/S40umountfs # udev will run at S55 if installed - ln -sf ../init.d/halt ${D}${sysconfdir}/rc0.d/S90halt - ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc0.d/S25save-rtc.sh - ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc6.d/S25save-rtc.sh - ln -sf ../init.d/banner ${D}${sysconfdir}/rcS.d/S02banner - ln -sf ../init.d/checkroot ${D}${sysconfdir}/rcS.d/S10checkroot -# ln -sf ../init.d/checkfs.sh ${D}${sysconfdir}/rcS.d/S30checkfs.sh - ln -sf ../init.d/mountall.sh ${D}${sysconfdir}/rcS.d/S35mountall.sh - ln -sf ../init.d/hostname.sh ${D}${sysconfdir}/rcS.d/S39hostname.sh - ln -sf ../init.d/mountnfs.sh ${D}${sysconfdir}/rcS.d/S45mountnfs.sh - ln -sf ../init.d/bootmisc.sh ${D}${sysconfdir}/rcS.d/S55bootmisc.sh -# ln -sf ../init.d/urandom ${D}${sysconfdir}/rcS.d/S55urandom - ln -sf ../init.d/finish.sh ${D}${sysconfdir}/rcS.d/S99finish.sh - ln -sf ../init.d/devices ${D}${sysconfdir}/rcS.d/S05devices + ln -sf ../init.d/halt ${D}${sysconfdir}/rc0.d/S90halt + ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc0.d/S25save-rtc.sh + ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc6.d/S25save-rtc.sh + ln -sf ../init.d/banner ${D}${sysconfdir}/rcS.d/S02banner + ln -sf ../init.d/checkroot ${D}${sysconfdir}/rcS.d/S10checkroot +# ln -sf ../init.d/checkfs.sh ${D}${sysconfdir}/rcS.d/S30checkfs.sh + ln -sf ../init.d/mountall.sh ${D}${sysconfdir}/rcS.d/S35mountall.sh + ln -sf ../init.d/rascal-hostname.sh ${D}${sysconfdir}/rcS.d/S36rascal-hostname.sh + ln -sf ../init.d/hostname.sh ${D}${sysconfdir}/rcS.d/S39hostname.sh + ln -sf ../init.d/mountnfs.sh ${D}${sysconfdir}/rcS.d/S45mountnfs.sh + ln -sf ../init.d/bootmisc.sh ${D}${sysconfdir}/rcS.d/S55bootmisc.sh +# ln -sf ../init.d/urandom ${D}${sysconfdir}/rcS.d/S55urandom + # rascal-analogger.py not enabled by default + ln -sf ../init.d/rascal-gpio.sh ${D}${sysconfdir}/rc5.d/S60rascal-gpio.sh + ln -sf ../init.d/rascal-set-hash.sh ${D}${sysconfdir}/rc5.d/S65rascal-set-hash.sh + ln -sf ../init.d/rascal-webserver.sh ${D}${sysconfdir}/rc5.d/S70rascal-webserver.sh + ln -sf ../init.d/finish.sh ${D}${sysconfdir}/rcS.d/S99finish.sh + ln -sf ../init.d/devices ${D}${sysconfdir}/rcS.d/S05devices # udev will run at S04 if installed - ln -sf ../init.d/sysfs.sh ${D}${sysconfdir}/rcS.d/S03sysfs - ln -sf ../init.d/populate-volatile.sh ${D}${sysconfdir}/rcS.d/S37populate-volatile.sh - ln -sf ../init.d/devpts.sh ${D}${sysconfdir}/rcS.d/S38devpts.sh + ln -sf ../init.d/sysfs.sh ${D}${sysconfdir}/rcS.d/S03sysfs + ln -sf ../init.d/populate-volatile.sh ${D}${sysconfdir}/rcS.d/S37populate-volatile.sh + ln -sf ../init.d/devpts.sh ${D}${sysconfdir}/rcS.d/S38devpts.sh if [ "${TARGET_ARCH}" = "arm" ]; then - ln -sf ../init.d/alignment.sh ${D}${sysconfdir}/rcS.d/S06alignment + ln -sf ../init.d/alignment.sh ${D}${sysconfdir}/rcS.d/S06alignment fi install -m 0755 ${WORKDIR}/device_table.txt ${D}${sysconfdir}/device_table diff --git a/recipes/iotop/iotop_0.2.1.bb b/recipes/iotop/iotop_0.2.1.bb index 12ccc77708..0d3e3872ec 100644 --- a/recipes/iotop/iotop_0.2.1.bb +++ b/recipes/iotop/iotop_0.2.1.bb @@ -1,8 +1,8 @@ HOMEPAGE = "http://guichaz.free.fr/iotop/" LICENSE = "GPL" -PR = "r3" +PR = "r4" -RDEPENDS_${PN} = "python-distutils python-curses python-setuptools python-textutils" +RDEPENDS_${PN} = "python-distutils python-curses python-setuptools python-textutils python-codecs" SRC_URI = "http://guichaz.free.fr/iotop/files/${PN}-${PV}.tar.bz2" diff --git a/recipes/ipatience/files/fix-make.patch b/recipes/ipatience/files/fix-make.patch index 3e3ad80eef..42b028b003 100644 --- a/recipes/ipatience/files/fix-make.patch +++ b/recipes/ipatience/files/fix-make.patch @@ -1,5 +1,5 @@ -diff -urNd ../ipatience-0.1-r2/ipatience/build/Makefile.dpkg_ipkg ipatience/build/Makefile.dpkg_ipkg ---- ../ipatience-0.1-r2/ipatience/build/Makefile.dpkg_ipkg 1970-01-01 00:00:00.000000000 +0000 +diff -urNd ipatience/build/Makefile.dpkg_ipkg ipatience/build/Makefile.dpkg_ipkg +--- ipatience/build/Makefile.dpkg_ipkg 1970-01-01 00:00:00.000000000 +0000 +++ ipatience/build/Makefile.dpkg_ipkg 2006-11-08 16:41:55.000000000 +0000 @@ -0,0 +1,114 @@ +## Please read the README in this directory to see how to use this @@ -116,8 +116,8 @@ diff -urNd ../ipatience-0.1-r2/ipatience/build/Makefile.dpkg_ipkg ipatience/buil + +.c.o:; + $(CC) $(CFLAGS) $(CPPFLAGS) $(PACKAGE_CFLAGS) $(PACKAGE_CPPFLAGS) -c $< -o $@ -diff -urNd ../ipatience-0.1-r2/ipatience/build/Makefile.translation ipatience/build/Makefile.translation ---- ../ipatience-0.1-r2/ipatience/build/Makefile.translation 1970-01-01 00:00:00.000000000 +0000 +diff -urNd ipatience/build/Makefile.translation ipatience/build/Makefile.translation +--- ipatience/build/Makefile.translation 1970-01-01 00:00:00.000000000 +0000 +++ ipatience/build/Makefile.translation 2006-11-08 16:41:55.000000000 +0000 @@ -0,0 +1,107 @@ +.SUFFIXES: .mo .po .pot .po8 @@ -227,8 +227,8 @@ diff -urNd ../ipatience-0.1-r2/ipatience/build/Makefile.translation ipatience/bu + +translation-ipkg: + make PREFIX=/usr real-translation-package -diff -urNd ../ipatience-0.1-r2/ipatience/Imakefile ipatience/Imakefile ---- ../ipatience-0.1-r2/ipatience/Imakefile 2001-01-31 05:25:03.000000000 +0000 +diff -urNd ipatience/Imakefile ipatience/Imakefile +--- ipatience/Imakefile 2001-01-31 05:25:03.000000000 +0000 +++ ipatience/Imakefile 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -LOCAL_LIBRARIES=-lfltk $(XFTLIB) $(XLIB) -lm @@ -242,8 +242,8 @@ diff -urNd ../ipatience-0.1-r2/ipatience/Imakefile ipatience/Imakefile - tabby.o towers.o vegas.o wish.o yukon.o - -ComplexProgramTarget(ipatience) -diff -urNd ../ipatience-0.1-r2/ipatience/ipatience.desktop ipatience/ipatience.desktop ---- ../ipatience-0.1-r2/ipatience/ipatience.desktop 1970-01-01 00:00:00.000000000 +0000 +diff -urNd ipatience/ipatience.desktop ipatience/ipatience.desktop +--- ipatience/ipatience.desktop 1970-01-01 00:00:00.000000000 +0000 +++ ipatience/ipatience.desktop 2006-11-11 15:59:25.000000000 +0000 @@ -0,0 +1,9 @@ +[Desktop Entry] @@ -255,8 +255,8 @@ diff -urNd ../ipatience-0.1-r2/ipatience/ipatience.desktop ipatience/ipatience.d +Icon=ipatience.xpm +Categories=Games +StartupNotify=True -diff -urNd ../ipatience-0.1-r2/ipatience/ipatience.xpm ipatience/ipatience.xpm ---- ../ipatience-0.1-r2/ipatience/ipatience.xpm 1970-01-01 00:00:00.000000000 +0000 +diff -urNd ipatience/ipatience.xpm ipatience/ipatience.xpm +--- ipatience/ipatience.xpm 1970-01-01 00:00:00.000000000 +0000 +++ ipatience/ipatience.xpm 2006-11-11 15:58:52.000000000 +0000 @@ -0,0 +1,194 @@ +/* XPM */ @@ -453,8 +453,8 @@ diff -urNd ../ipatience-0.1-r2/ipatience/ipatience.xpm ipatience/ipatience.xpm +" . . . . . . . . . . . . . . . . . . . ", +" . . . . . . . . . . . . . . . . . . . ", +" "}; -diff -urNd ../ipatience-0.1-r2/ipatience/main.cc ipatience/main.cc ---- ../ipatience-0.1-r2/ipatience/main.cc 2001-02-09 08:15:27.000000000 +0000 +diff -urNd ipatience/main.cc ipatience/main.cc +--- ipatience/main.cc 2001-02-09 08:15:27.000000000 +0000 +++ ipatience/main.cc 2006-11-02 16:37:55.000000000 +0000 @@ -549,7 +549,7 @@ @@ -465,8 +465,8 @@ diff -urNd ../ipatience-0.1-r2/ipatience/main.cc ipatience/main.cc Fl::args(argc,argv,i,arg_cb); fl_open_display (); if (small == -1) -diff -urNd ../ipatience-0.1-r2/ipatience/Makefile ipatience/Makefile ---- ../ipatience-0.1-r2/ipatience/Makefile 1970-01-01 00:00:00.000000000 +0000 +diff -urNd ipatience/Makefile ipatience/Makefile +--- ipatience/Makefile 1970-01-01 00:00:00.000000000 +0000 +++ ipatience/Makefile 2006-11-10 18:03:49.000000000 +0000 @@ -0,0 +1,39 @@ +PREFIX = /usr @@ -508,8 +508,8 @@ diff -urNd ../ipatience-0.1-r2/ipatience/Makefile ipatience/Makefile + +include $(BUILD)/Makefile.dpkg_ipkg +-include $(DEPS) -diff -urNd ../ipatience-0.1-r2/ipatience/table.cc ipatience/table.cc ---- ../ipatience-0.1-r2/ipatience/table.cc 2001-06-22 00:32:12.000000000 +0000 +diff -urNd ipatience/table.cc ipatience/table.cc +--- ipatience/table.cc 2001-06-22 00:32:12.000000000 +0000 +++ ipatience/table.cc 2006-11-10 17:06:56.000000000 +0000 @@ -231,9 +231,9 @@ suit_bitmap = suit[Suit(card) >> 4]; diff --git a/recipes/iw/iw_0.9.20.bb b/recipes/iw/iw_0.9.20.bb index 0b6a768667..7048091c8f 100644 --- a/recipes/iw/iw_0.9.20.bb +++ b/recipes/iw/iw_0.9.20.bb @@ -3,18 +3,15 @@ HOMEPAGE = "http://linuxwireless.org/en/users/Documentation/iw" SECTION = "base" PRIORITY = "optional" LICENSE = "BSD" -PR = "r2" +PR = "r3" -DEPENDS = "libnl2 pkgconfig" +DEPENDS = "libnl pkgconfig" SRC_URI = " \ http://wireless.kernel.org/download/iw/${P}.tar.bz2 \ file://kill-git-version-check.patch \ " -# We stage libnl2 header files not directly as they clash with libnl files. Once -# we only use libnl2 and stage the headers at the normal place we can remove -# this. -CFLAGS += "-I${STAGING_INCDIR}/libnl2/ -DCONFIG_LIBNL20" +CFLAGS += "-DCONFIG_LIBNL20" do_compile() { oe_runmake diff --git a/recipes/iw/iw_git.bb b/recipes/iw/iw_git.bb new file mode 100644 index 0000000000..c98e1bc5f7 --- /dev/null +++ b/recipes/iw/iw_git.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "nl80211 based CLI configuration utility for wireless devices" +HOMEPAGE = "http://linuxwireless.org/en/users/Documentation/iw" +SECTION = "base" +PRIORITY = "optional" +LICENSE = "BSD" + +SRCREV = "0a236ef5f8e4ba7218aac7d0cdacf45673d5b35c" +PR = "r0" +PV = "0.9.22" +PR_append = "+gitr${SRCPV}" + +DEPENDS = "libnl pkgconfig" + +SRC_URI = " \ + git://git.sipsolutions.net/iw.git;protocol=git \ + " +CFLAGS += "-DCONFIG_LIBNL20" + +S = "${WORKDIR}/git/" + +do_compile() { + oe_runmake +} + +do_install() { + oe_runmake DESTDIR=${D} install +} diff --git a/recipes/jack/files/remove-wrong-host-test.patch b/recipes/jack/files/remove-wrong-host-test.patch new file mode 100644 index 0000000000..54c4a833f7 --- /dev/null +++ b/recipes/jack/files/remove-wrong-host-test.patch @@ -0,0 +1,66 @@ +| checking existing, conflicting JACK installs... +| +| !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +| You appear to have at least one existing installation of JACK. +| Complete or partial JACK installs exist in: /usr/lib + +[...] + +NOTE: package jack-0.118.0-r2: task do_configure: Failed + +Index: RELEASE_0_118_0/configure.ac +=================================================================== +--- RELEASE_0_118_0.orig/configure.ac 2011-02-26 06:54:25.711716288 +0100 ++++ RELEASE_0_118_0/configure.ac 2011-02-26 06:54:47.061718126 +0100 +@@ -3,51 +3,6 @@ + + AC_INIT(jackd/jackd.c) + +- +-dnl +-dnl Check for existing JACK installs +-dnl +- +-AC_MSG_CHECKING([existing, conflicting JACK installs]) +-not_overwriting=0 +-installs= +-for dir in /usr/lib /usr/local/lib /opt/lib ; do +- if test -d $dir ; then +- if test $(find $dir/ -name 'libjack.*' 2>/dev/null | wc -l) -gt 0 ; then +- if echo $prefix/lib | grep -vs $dir >/dev/null 2>&1 ; then +- not_overwriting=$(expr $not_overwriting + 1) +- fi +- installs="$installs $dir" +- fi +- fi +-done +- +-if test $not_overwriting -gt 0 ; then +- echo +- echo +- echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" +- echo "You appear to have at least one existing installation of JACK." +- echo +- echo "Complete or partial JACK installs exist in:$installs" +- echo +- echo "Installing this version will leave at least one of these" +- echo "existing installations installed and this will probably break" +- echo "JACK on your machine. " +- echo +- echo "Before building, you should first remove the existing JACK" +- echo "installation(s). " +- echo +- echo "Alternatively use ./configure --prefix=... to force overwriting" +- echo "the existing install." +- echo +- echo "WARNING: ON ANY DEBIAN-DERIVED DISTRIBUTION (Debian, Ubuntu etc)" +- echo "CHANGING THE INSTALLATION PREFIX WILL NOT PRODUCE A WORKING JACK" +- echo "INSTALL. Please contact the distribution packager for JACK and" +- echo "ask them to fix their packaging." +- echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" +- exit 1 +-fi +- + AC_CONFIG_AUX_DIR(config) + AC_CANONICAL_TARGET + diff --git a/recipes/jack/jack_0.103.0.bb b/recipes/jack/jack_0.103.0.bb deleted file mode 100644 index f7bd62ae1c..0000000000 --- a/recipes/jack/jack_0.103.0.bb +++ /dev/null @@ -1,30 +0,0 @@ -DESCRIPTION = "JACK is a low-latency audio server. It can \ -connect a number of different applications to an audio \ -device, as well as allowing them to share audio between \ -themselves." -SECTION = "libs/multimedia" -PRIORITY = "optional" -LICENSE = "GPL LGPL" -PR = "r0" - -DEPENDS = "alsa-lib" - -SRC_URI = "${SOURCEFORGE_MIRROR}/jackit/jack-audio-connection-kit-${PV}.tar.gz" -S = "${WORKDIR}/jack-audio-connection-kit-${PV}" - -inherit autotools pkgconfig - -EXTRA_OECONF = "--enable-timestamps --disable-capabilities --disable-oldtrans \ - --disable-portaudio --disable-coreaudio --enable-oss --enable-alsa" - -EXTRA_OEMAKE = 'transform="s,^,,"' -LDFLAGS_append = " -ldl -L${STAGING_LIBDIR}" - -PACKAGES =+ "libjack jack-server jack-examples" - -FILES_libjack = "${libdir}/*.so.* ${libdir}/jack/*.so" -FILES_jack-server = "${bindir}/jackd" -FILES_jack-examples = "${bindir}/*" - -SRC_URI[md5sum] = "03a0f63b997ce7b83a1eeaa6b80f4388" -SRC_URI[sha256sum] = "a5d9fd696d7ee4a1c7679b5a688155bc1e0abbdf5f144d6762dbbee874df235f" diff --git a/recipes/jack/jack_0.116.2.bb b/recipes/jack/jack_0.116.2.bb deleted file mode 100644 index d97043ab97..0000000000 --- a/recipes/jack/jack_0.116.2.bb +++ /dev/null @@ -1,32 +0,0 @@ -DESCRIPTION = "JACK is a low-latency audio server. It can \ -connect a number of different applications to an audio \ -device, as well as allowing them to share audio between \ -themselves." -SECTION = "libs/multimedia" -PRIORITY = "optional" -LICENSE = "GPL LGPL" -PR = "r1" - -DEPENDS = "alsa-lib" - -SRC_URI = "http://jackaudio.org/downloads/jack-audio-connection-kit-${PV}.tar.gz" -S = "${WORKDIR}/jack-audio-connection-kit-${PV}" - -inherit autotools - -EXTRA_OECONF = "--enable-timestamps --disable-capabilities --disable-oldtrans \ - --disable-portaudio --disable-coreaudio --enable-oss --enable-alsa" - -EXTRA_OEMAKE = 'transform="s,^,,"' -LDFLAGS_append = " -ldl -L${STAGING_LIBDIR}" - -PACKAGES =+ "libjack jack-server jack-examples" - -FILES_libjack = "${libdir}/*.so.* ${libdir}/jack/*.so" -FILES_jack-server = "${bindir}/jackd" -FILES_jack-examples = "${bindir}/*" -FILES_${PN}-doc += " ${datadir}/jack-audio-connection-kit/reference/html/* " - - -SRC_URI[md5sum] = "9c0ae9880e9b6e081f1a238fe6a28bd5" -SRC_URI[sha256sum] = "ce6e1f61a3b003137af56b749e5ed4274584167c0877ea9ef2d83f47b11c8d3d" diff --git a/recipes/jack/jack_0.118.0.bb b/recipes/jack/jack_0.118.0.bb index 5ca9d658c3..e979c7a57c 100644 --- a/recipes/jack/jack_0.118.0.bb +++ b/recipes/jack/jack_0.118.0.bb @@ -8,11 +8,13 @@ LICENSE = "GPLv2 LGPLv2.1" DEPENDS = "alsa-lib" -PR = "r2" +PR = "r3" SVNPV = "${@'${PV}'.replace('.', '_')}" SRCREV = "4084" -SRC_URI = "svn://subversion.jackaudio.org/jack/tags;module=RELEASE_${SVNPV};proto=http" +SRC_URI = "svn://subversion.jackaudio.org/jack/tags;module=RELEASE_${SVNPV};proto=http \ + file://remove-wrong-host-test.patch \ + " # This is not omap3 specific, but there is a strong correlation between using twl4030 and using omap3 SRC_URI_append_omap3 = " file://jack_fix_TWL4030_alsa_capture.patch" diff --git a/recipes/kexecboot/kexecboot-cfg_0.1.bb b/recipes/kexecboot/kexecboot-cfg_0.1.bb index f6dfbaca55..32e5881628 100644 --- a/recipes/kexecboot/kexecboot-cfg_0.1.bb +++ b/recipes/kexecboot/kexecboot-cfg_0.1.bb @@ -8,8 +8,10 @@ SRC_URI = "file://icon.xpm" CMDLINE_CON = "console=ttyS0,115200n8 console=tty1 noinitrd" CMDLINE_CON_collie = "console=ttySA0,115200n8 console=tty1 noinitrd rw" CMDLINE_CON_qemuarm = "console=ttyAMA0,115200n8 console=tty1 noinitrd" +CMDLINE_CON_ben-nanonote = "console=ttyS0,57600n8 console=tty0" CMDLINE_MEM = "" CMDLINE_MEM_collie = "mem=64M" +CMDLINE_MEM_ben-nanonote = "mem=32M" CMDLINE_ROTATE = "" CMDLINE_ROTATE_spitz = "fbcon=rotate:1" CMDLINE_ROTATE_akita = "fbcon=rotate:1" diff --git a/recipes/kexecboot/kexecboot.inc b/recipes/kexecboot/kexecboot.inc index 829df19a6f..4931e45b8e 100644 --- a/recipes/kexecboot/kexecboot.inc +++ b/recipes/kexecboot/kexecboot.inc @@ -40,7 +40,7 @@ EXTRA_OECONF_spitz = "--enable-zaurus --enable-delay=3" EXTRA_OECONF_poodle = "--enable-zaurus --enable-delay=2" EXTRA_OECONF_tosa = "--enable-zaurus --enable-delay=2" EXTRA_OECONF_collie = "--enable-delay=2" - +EXTRA_OECONF_ben-nanonote = "--enable-uimage" EXTRA_OECONF_omap3 = "--enable-uimage" do_configure_prepend () { diff --git a/recipes/kf/files/fix-configure.patch b/recipes/kf/files/fix-configure.patch index fc1ad9a418..dbd02925a5 100644 --- a/recipes/kf/files/fix-configure.patch +++ b/recipes/kf/files/fix-configure.patch @@ -1,5 +1,5 @@ -diff -urNd ../kf-0.5.4.1-r0/kf-0.5.4.1/configure.in kf-0.5.4.1/configure.in ---- ../kf-0.5.4.1-r0/kf-0.5.4.1/configure.in 2005-04-27 19:42:49.000000000 +0100 +diff -urNd kf-0.5.4.1/configure.in kf-0.5.4.1/configure.in +--- kf-0.5.4.1/configure.in 2005-04-27 19:42:49.000000000 +0100 +++ kf-0.5.4.1/configure.in 2005-09-29 14:12:32.000000000 +0100 @@ -27,7 +27,7 @@ dnl AC_ARG_ENABLE(debug,) diff --git a/recipes/klibc/klibc-1.5.21/fstype-sane-vfat-and-jffs2-for-1.5.patch b/recipes/klibc/klibc-1.5.21/fstype-sane-vfat-and-jffs2-for-1.5.patch index 041f67988c..4448fe26e9 100644 --- a/recipes/klibc/klibc-1.5.21/fstype-sane-vfat-and-jffs2-for-1.5.patch +++ b/recipes/klibc/klibc-1.5.21/fstype-sane-vfat-and-jffs2-for-1.5.patch @@ -1,7 +1,7 @@ -Index: klibc-1.5/usr/kinit/fstype/fstype.c +Index: klibc-1.5.21/usr/kinit/fstype/fstype.c =================================================================== ---- klibc-1.5.orig/usr/kinit/fstype/fstype.c 2008-02-28 00:48:35.319254938 +0100 -+++ klibc-1.5/usr/kinit/fstype/fstype.c 2008-02-28 00:52:20.583257793 +0100 +--- a/usr/kinit/fstype/fstype.c ++++ b/usr/kinit/fstype/fstype.c @@ -20,7 +20,7 @@ #include #include @@ -9,12 +9,12 @@ Index: klibc-1.5/usr/kinit/fstype/fstype.c - +#include #define cpu_to_be32(x) __cpu_to_be32(x) /* Needed by romfs_fs.h */ - - #include "romfs_fs.h" -@@ -37,6 +37,12 @@ - #include "ocfs2_fs.h" - #include "nilfs_fs.h" - + + #include "btrfs.h" +@@ -38,6 +38,12 @@ + #include "squashfs_fs.h" + #include "xfs_sb.h" + +#if __BYTE_ORDER == __BIG_ENDIAN +#include +#else @@ -24,40 +24,46 @@ Index: klibc-1.5/usr/kinit/fstype/fstype.c /* * Slightly cleaned up version of jfs_superblock to * avoid pulling in other kernel header files. -@@ -59,6 +65,27 @@ +@@ -60,6 +66,30 @@ /* Swap needs the definition of block size */ #include "swap_fs.h" - -+static int jffs2_image(const unsigned char *buf, unsigned long *blocks) + ++static int jffs2_image(const void *buf, unsigned long long *blocks) +{ -+ // Very sloppy! ;-E -+ if (*buf == 0x85 && buf[1] == 0x19) -+ return 1; ++ const unsigned char *p = buf; + -+ return 0; ++ if (p[0] == 0x85 && p[1] == 0x19) { ++ *blocks=0; ++ return 1; ++ } ++ return 0; +} + -+static int vfat_image(const unsigned char *buf, unsigned long *blocks) ++static int vfat_image(const void *buf, unsigned long long *blocks) +{ -+ const struct romfs_super_block *sb = -+ (const struct romfs_super_block *)buf; -+ if (!strncmp(buf + 54, "FAT12 ", 8) -+ || !strncmp(buf + 54, "FAT16 ", 8) -+ || !strncmp(buf + 82, "FAT32 ", 8)) -+ return 1; ++ const char *p = buf; + -+ return 0; ++ if (!strncmp(p + 54, "FAT12 ", 8) ++ || !strncmp(p + 54, "FAT16 ", 8) ++ || !strncmp(p + 82, "FAT32 ", 8)) { ++ *blocks=0; ++ return 1; ++ } ++ return 0; +} + static int gzip_image(const void *buf, unsigned long long *bytes) - {277 304 - const unsigned char *p = buf; -@@ -490,6 +517,8 @@ - {1, "ext3", ext3_image}, - {1, "ext2", ext2_image}, - {1, "minix", minix_image}, + { + const unsigned char *p = buf; +@@ -495,6 +525,8 @@ static struct imagetype images[] = { + {1, "ext3", ext3_image}, + {1, "ext2", ext2_image}, + {1, "minix", minix_image}, + {0, "jffs2", jffs2_image}, + {0, "vfat", vfat_image}, - {1, "nilfs2", nilfs2_image}, - {2, "ocfs2", ocfs2_image}, - {8, "reiserfs", reiserfs_image}, + {1, "nilfs2", nilfs2_image}, + {2, "ocfs2", ocfs2_image}, + {8, "reiserfs", reiserfs_image}, +-- +1.7.3.4 + diff --git a/recipes/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch b/recipes/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch new file mode 100644 index 0000000000..3b8607dfc5 --- /dev/null +++ b/recipes/libarchive/libarchive/0001-Patch-from-upstream-revision-1990.patch @@ -0,0 +1,45 @@ +From 76210f42f52bb3e08fcbc9d78a7f92217762839c Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Thu, 25 Feb 2010 22:29:49 +0100 +Subject: [PATCH 1/7] Patch from upstream (revision 1990) + +--- + libarchive/archive_read_disk_entry_from_file.c | 15 +++++++++++++-- + 1 files changed, 13 insertions(+), 2 deletions(-) + +diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c +index 7473c50..27671df 100644 +--- a/libarchive/archive_read_disk_entry_from_file.c ++++ b/libarchive/archive_read_disk_entry_from_file.c +@@ -163,15 +163,26 @@ archive_read_disk_entry_from_file(struct archive *_a, + + #ifdef HAVE_READLINK + if (S_ISLNK(st->st_mode)) { +- char linkbuffer[PATH_MAX + 1]; +- int lnklen = readlink(path, linkbuffer, PATH_MAX); ++ size_t linkbuffer_len = st->st_size + 1; ++ char *linkbuffer; ++ int lnklen; ++ ++ linkbuffer = malloc(linkbuffer_len); ++ if (linkbuffer == NULL) { ++ archive_set_error(&a->archive, ENOMEM, ++ "Couldn't read link data"); ++ return (ARCHIVE_FAILED); ++ } ++ lnklen = readlink(path, linkbuffer, linkbuffer_len); + if (lnklen < 0) { + archive_set_error(&a->archive, errno, + "Couldn't read link data"); ++ free(linkbuffer); + return (ARCHIVE_FAILED); + } + linkbuffer[lnklen] = 0; + archive_entry_set_symlink(entry, linkbuffer); ++ free(linkbuffer); + } + #endif + +-- +1.7.1 + diff --git a/recipes/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch b/recipes/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch new file mode 100644 index 0000000000..f3e4758378 --- /dev/null +++ b/recipes/libarchive/libarchive/0002-Patch-from-upstream-revision-1991.patch @@ -0,0 +1,34 @@ +From 2ec43cc0e6f7d39a1570a7daf02a23aec8015626 Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Thu, 25 Feb 2010 22:30:06 +0100 +Subject: [PATCH 2/7] Patch from upstream (revision 1991) + +--- + libarchive/archive_write_disk.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libarchive/archive_write_disk.c b/libarchive/archive_write_disk.c +index caf958e..60699e0 100644 +--- a/libarchive/archive_write_disk.c ++++ b/libarchive/archive_write_disk.c +@@ -434,7 +434,7 @@ _archive_write_header(struct archive *_a, struct archive_entry *entry) + if (ret != ARCHIVE_OK) + goto done; + } +-#ifdef HAVE_FCHDIR ++#if defined(HAVE_FCHDIR) && defined(PATH_MAX) + /* If path exceeds PATH_MAX, shorten the path. */ + edit_deep_directories(a); + #endif +@@ -866,7 +866,7 @@ archive_write_disk_new(void) + * object creation is likely to fail, but any error will get handled + * at that time. + */ +-#ifdef HAVE_FCHDIR ++#if defined(HAVE_FCHDIR) && defined(PATH_MAX) + static void + edit_deep_directories(struct archive_write_disk *a) + { +-- +1.7.1 + diff --git a/recipes/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch b/recipes/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch new file mode 100644 index 0000000000..efb6f06c6e --- /dev/null +++ b/recipes/libarchive/libarchive/0003-Patch-from-upstream-rev-2516.patch @@ -0,0 +1,65 @@ +From 07cefd4d6db82e53b7bcf096be1e5e29c09de3c6 Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Thu, 1 Jul 2010 15:28:25 +0200 +Subject: [PATCH 3/7] Patch from upstream (rev 2516) + +Fix Issue 100: Allow a zero for the Type M Path Table Location, since +WinISO (and probably other programs) set it this way. + +http://code.google.com/p/libarchive/source/detail?r=2516 +--- + libarchive/archive_read_support_format_iso9660.c | 20 +++++++++++++------- + 1 files changed, 13 insertions(+), 7 deletions(-) + +diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c +index 0c640c8..fdef3fb 100644 +--- a/libarchive/archive_read_support_format_iso9660.c ++++ b/libarchive/archive_read_support_format_iso9660.c +@@ -714,11 +714,13 @@ isSVD(struct iso9660 *iso9660, const unsigned char *h) + if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block) + return (0); + +- /* Location of Occurrence of Type M Path Table must be +- * available location, ++ /* The Type M Path Table must be at a valid location (WinISO ++ * and probably other programs omit this, so we allow zero) ++ * + * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */ + location = archive_be32dec(h+SVD_type_M_path_table_offset); +- if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block) ++ if ((location > 0 && location <= SYSTEM_AREA_BLOCK+2) ++ || location >= volume_block) + return (0); + + /* Read Root Directory Record in Volume Descriptor. */ +@@ -790,7 +792,8 @@ isEVD(struct iso9660 *iso9660, const unsigned char *h) + * available location, + * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */ + location = archive_be32dec(h+PVD_type_m_path_table_offset); +- if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block) ++ if ((location > 0 && location <= SYSTEM_AREA_BLOCK+2) ++ || location >= volume_block) + return (0); + + /* Reserved field must be 0. */ +@@ -865,11 +868,14 @@ isPVD(struct iso9660 *iso9660, const unsigned char *h) + if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block) + return (0); + +- /* Location of Occurrence of Type M Path Table must be +- * available location, ++ /* The Type M Path Table must also be at a valid location ++ * (although ECMA 119 requires a Type M Path Table, WinISO and ++ * probably other programs omit it, so we permit a zero here) ++ * + * > SYSTEM_AREA_BLOCK(16) + 2 and < Volume Space Size. */ + location = archive_be32dec(h+PVD_type_m_path_table_offset); +- if (location <= SYSTEM_AREA_BLOCK+2 || location >= volume_block) ++ if ((location > 0 && location <= SYSTEM_AREA_BLOCK+2) ++ || location >= volume_block) + return (0); + + /* Reserved field must be 0. */ +-- +1.7.1 + diff --git a/recipes/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch b/recipes/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch new file mode 100644 index 0000000000..b93396607f --- /dev/null +++ b/recipes/libarchive/libarchive/0004-Patch-from-upstream-rev-2514.patch @@ -0,0 +1,35 @@ +From 178c9df2941d0c01afc44ca1e6ae795716e3b9fd Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Thu, 1 Jul 2010 18:12:22 +0200 +Subject: [PATCH 4/7] Patch from upstream (rev 2514) + +Enable version stripping code in joliet extension support for iso9660. + +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=587316 +--- + libarchive/archive_read_support_format_iso9660.c | 2 -- + 1 files changed, 0 insertions(+), 2 deletions(-) + +diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c +index fdef3fb..8dcfeb4 100644 +--- a/libarchive/archive_read_support_format_iso9660.c ++++ b/libarchive/archive_read_support_format_iso9660.c +@@ -1755,7 +1755,6 @@ parse_file_info(struct archive_read *a, struct file_info *parent, + } + *wp = L'\0'; + +-#if 0 /* untested code, is it at all useful on Joliet? */ + /* trim trailing first version and dot from filename. + * + * Remember we where in UTF-16BE land! +@@ -1775,7 +1774,6 @@ parse_file_info(struct archive_read *a, struct file_info *parent, + /* Chop off trailing '.' from filenames. */ + if (*(wp-1) == '.') + *(--wp) = L'\0'; +-#endif + + /* store the result in the file name field. */ + archive_strappend_w_utf8(&file->name, wbuff); +-- +1.7.1 + diff --git a/recipes/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch b/recipes/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch new file mode 100644 index 0000000000..e9bd861a3d --- /dev/null +++ b/recipes/libarchive/libarchive/0005-Patch-from-upstream-rev-2520.patch @@ -0,0 +1,33 @@ +From bf4a8ba5a2f7a72d73765b95540acf56b0180990 Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Thu, 1 Jul 2010 18:13:46 +0200 +Subject: [PATCH 5/7] Patch from upstream (rev 2520) + +Fix version/dot stripping code in joliet extension of iso9660. +--- + libarchive/archive_read_support_format_iso9660.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c +index 8dcfeb4..2d3a855 100644 +--- a/libarchive/archive_read_support_format_iso9660.c ++++ b/libarchive/archive_read_support_format_iso9660.c +@@ -1766,13 +1766,13 @@ parse_file_info(struct archive_read *a, struct file_info *parent, + * *, /, :, ;, ? and \. + */ + /* Chop off trailing ';1' from files. */ +- if (*(wp-2) == ';' && *(wp-1) == '1') { ++ if (*(wp-2) == L';' && *(wp-1) == L'1') { + wp-=2; + *wp = L'\0'; + } + + /* Chop off trailing '.' from filenames. */ +- if (*(wp-1) == '.') ++ if (*(wp-1) == L'.') + *(--wp) = L'\0'; + + /* store the result in the file name field. */ +-- +1.7.1 + diff --git a/recipes/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch b/recipes/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch new file mode 100644 index 0000000000..412ee7973f --- /dev/null +++ b/recipes/libarchive/libarchive/0006-Patch-from-upstream-rev-2521.patch @@ -0,0 +1,30 @@ +From 911c241d6d0d569074ecf05136dfd5cb9694876e Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Fri, 2 Jul 2010 09:41:10 +0200 +Subject: [PATCH 6/7] Patch from upstream (rev 2521). + +Disable dot stripping code since it's still broken +and noone has been able to figure it out (yet). +--- + libarchive/archive_read_support_format_iso9660.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/libarchive/archive_read_support_format_iso9660.c b/libarchive/archive_read_support_format_iso9660.c +index 2d3a855..8661532 100644 +--- a/libarchive/archive_read_support_format_iso9660.c ++++ b/libarchive/archive_read_support_format_iso9660.c +@@ -1771,9 +1771,11 @@ parse_file_info(struct archive_read *a, struct file_info *parent, + *wp = L'\0'; + } + ++#if 0 /* XXX: this somehow manages to strip of single-character file extensions, like '.c'. */ + /* Chop off trailing '.' from filenames. */ + if (*(wp-1) == L'.') + *(--wp) = L'\0'; ++#endif + + /* store the result in the file name field. */ + archive_strappend_w_utf8(&file->name, wbuff); +-- +1.7.1 + diff --git a/recipes/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch b/recipes/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch new file mode 100644 index 0000000000..4a272fdb61 --- /dev/null +++ b/recipes/libarchive/libarchive/0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch @@ -0,0 +1,33 @@ +From 8ad947aea083aad383eed753390bd6bff71f0cb6 Mon Sep 17 00:00:00 2001 +From: Andreas Henriksson +Date: Thu, 15 Jul 2010 13:32:56 +0200 +Subject: [PATCH 7/7] Ignore ENOSYS error when setting up xattrs. (Closes: #588925) + +Modestas Vainius found out that HPPA returns errno ENOSYS +on listxattrs. Currently, ENOTSUP is ignored so we'll do the +same for ENOSYS as well. + +For full debug info about this see Modestas Vainius awesome +report at: + +http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=588925#10 +--- + libarchive/archive_read_disk_entry_from_file.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/libarchive/archive_read_disk_entry_from_file.c b/libarchive/archive_read_disk_entry_from_file.c +index 27671df..c49e755 100644 +--- a/libarchive/archive_read_disk_entry_from_file.c ++++ b/libarchive/archive_read_disk_entry_from_file.c +@@ -398,7 +398,7 @@ setup_xattrs(struct archive_read_disk *a, + list_size = listxattr(path, NULL, 0); + + if (list_size == -1) { +- if (errno == ENOTSUP) ++ if (errno == ENOTSUP || errno == ENOSYS) + return (ARCHIVE_OK); + archive_set_error(&a->archive, errno, + "Couldn't list extended attributes"); +-- +1.7.1 + diff --git a/recipes/libarchive/libarchive_2.8.4.bb b/recipes/libarchive/libarchive_2.8.4.bb new file mode 100644 index 0000000000..1139416c85 --- /dev/null +++ b/recipes/libarchive/libarchive_2.8.4.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "C library and command-line tools for reading and writing tar, cpio, zip, ISO, and other archive formats" +HOMEPAGE = "http://code.google.com/p/libarchive/" +SECTION = "devel" +LICENSE = "BSD" +PR = "r0" + +DEPENDS = "libxml2" + +SRC_URI = "http://libarchive.googlecode.com/files/${PN}-${PV}.tar.gz \ + file://0001-Patch-from-upstream-revision-1990.patch \ + file://0002-Patch-from-upstream-revision-1991.patch \ + file://0003-Patch-from-upstream-rev-2516.patch \ + file://0004-Patch-from-upstream-rev-2514.patch \ + file://0005-Patch-from-upstream-rev-2520.patch \ + file://0006-Patch-from-upstream-rev-2521.patch \ + file://0007-Ignore-ENOSYS-error-when-setting-up-xattrs.-Closes-5.patch \ + " + +inherit autotools lib_package + +SRC_URI[md5sum] = "83b237a542f27969a8d68ac217dc3796" +SRC_URI[sha256sum] = "86cffa3eaa28d3116f5d0b20284026c3762cf4a2b52b9844df2b494d4a89f688" diff --git a/recipes/libdca/libdca_0.0.5-3.bb b/recipes/libdca/libdca_0.0.5-3.bb index 5bc023a5b4..67b311e6d4 100644 --- a/recipes/libdca/libdca_0.0.5-3.bb +++ b/recipes/libdca/libdca_0.0.5-3.bb @@ -1,6 +1,7 @@ DESCRIPTION = "decoding library for DTS Coherent Acoustics streams" SECTION = "libs/multimedia" LICENSE = "GPLv2+" +PR = "r1" SRC_URI = "git://git.debian.org/pkg-multimedia/${PN}.git;protocol=git" @@ -12,7 +13,7 @@ inherit autotools lib_package pkgconfig do_unpackpost() { QUILT_PATCHES=debian/patches quilt push -a # single precision is enough and speeds up libdca by about 10-15% - sed -i -e 's/double/sample_t/g' ${S}/libdca/*.{ch} + sed -i -e 's/double/sample_t/g' ${S}/libdca/*.c ${S}/libdca/*.h } addtask unpackpost after do_unpack before do_patch diff --git a/recipes/libgpod/libimobiledevice_1.0.0.bb b/recipes/libgpod/libimobiledevice_1.0.0.bb index 8744874f19..5e988024e4 100644 --- a/recipes/libgpod/libimobiledevice_1.0.0.bb +++ b/recipes/libgpod/libimobiledevice_1.0.0.bb @@ -1,7 +1,7 @@ DESCRIPTION = "A protocol library to access an iPhone or iPod Touch in Linux" LICENSE = "GPLv2/LGPLv2.1" -DEPENDS = "libplist swig usbmuxd glib-2.0 gnutls libgcrypt" +DEPENDS = "libplist swig usbmuxd glib-2.0 gnutls libgcrypt libtasn1" inherit autotools diff --git a/recipes/libnl/files/fix-pc-file.patch b/recipes/libnl/files/fix-pc-file.patch deleted file mode 100644 index 77f3e88562..0000000000 --- a/recipes/libnl/files/fix-pc-file.patch +++ /dev/null @@ -1,11 +0,0 @@ -Index: git/libnl-2.0.pc.in -=================================================================== ---- git.orig/libnl-2.0.pc.in -+++ git/libnl-2.0.pc.in -@@ -6,5 +6,5 @@ - Name: libnl - Description: Convenience library for netlink sockets - Version: @PACKAGE_VERSION@ --Libs: -L${libdir} -lnl -+Libs: -L${libdir} -lnl -lnl-genl -lnl-nf -lnl-route - Cflags: -I${includedir} diff --git a/recipes/libnl/libnl.inc b/recipes/libnl/libnl.inc new file mode 100644 index 0000000000..6f502b1019 --- /dev/null +++ b/recipes/libnl/libnl.inc @@ -0,0 +1,9 @@ +DESCRIPTION = "libnl is a library for applications dealing with netlink sockets" +SECTION = "libs/network" +LICENSE = "LGPL" +HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" + +INC_PR = "r5" + +inherit autotools pkgconfig + diff --git a/recipes/libnl/libnl2/fix-pc-file.patch b/recipes/libnl/libnl/fix-pc-file.patch similarity index 100% rename from recipes/libnl/libnl2/fix-pc-file.patch rename to recipes/libnl/libnl/fix-pc-file.patch diff --git a/recipes/libnl/libnl2/fix-pktloc-dep-race.patch b/recipes/libnl/libnl/fix-pktloc-dep-race.patch similarity index 81% rename from recipes/libnl/libnl2/fix-pktloc-dep-race.patch rename to recipes/libnl/libnl/fix-pktloc-dep-race.patch index 50acee4d26..ee217441b6 100644 --- a/recipes/libnl/libnl2/fix-pktloc-dep-race.patch +++ b/recipes/libnl/libnl/fix-pktloc-dep-race.patch @@ -1,7 +1,3 @@ ---- - lib/Makefile.am | 3 +++ - 1 file changed, 3 insertions(+) - Index: libnl-2.0/lib/Makefile.am =================================================================== --- libnl-2.0.orig/lib/Makefile.am @@ -14,9 +10,8 @@ Index: libnl-2.0/lib/Makefile.am + # Hack to avoid using ylwrap. It does not function correctly in combination # with --header-file= --route/pktloc_grammar.c: route/pktloc_grammar.l +route/pktloc_grammar.h: route/pktloc_grammar.c -+route/pktloc_grammar.c: route/pktloc_grammar.y + route/pktloc_grammar.c: route/pktloc_grammar.l $(LEX) --header-file=route/pktloc_grammar.h $(LFLAGS) -o $@ $^ +route/pktloc_syntax.h: route/pktloc_syntax.c diff --git a/recipes/libnl/libnl1-1.1/build.only.static.lib.patch b/recipes/libnl/libnl1-1.1/build.only.static.lib.patch new file mode 100644 index 0000000000..770a3924f7 --- /dev/null +++ b/recipes/libnl/libnl1-1.1/build.only.static.lib.patch @@ -0,0 +1,79 @@ +diff -uNr libnl-1.1.orig//lib/Makefile libnl-1.1/lib/Makefile +--- libnl-1.1.orig//lib/Makefile 2011-03-23 15:50:32.310534329 +0100 ++++ libnl-1.1/lib/Makefile 2011-03-23 15:50:43.926534326 +0100 +@@ -33,18 +33,24 @@ + DEPS := $(CIN:%.c=%.d) + OBJ := $(CIN:%.c=%.o) + CFLAGS += -fPIC ++OUT_LIB := $(PACKAGE_NAME)1.a + OUT_SLIB := $(PACKAGE_NAME).so.$(PACKAGE_VERSION) + LN_SLIB := $(PACKAGE_NAME).so + LN1_SLIB := $(LN_SLIB).1 + + export + +-.PHONY: all clean install librtn.a $(OUT_SLIB) ++.PHONY: all clean install librtn.a $(OUT_SLIB) $(OUT_LIB) + + + all: +- @echo " MAKE $(OUT_SLIB)"; \ +- $(MAKE) $(OUT_SLIB) ++ @echo " MAKE $(OUT_LIB)"; \ ++ $(MAKE) $(OUT_LIB) ++ ++$(OUT_LIB): ../Makefile.opts $(OBJ) ++ @echo " LD $(OUT_LIB)"; \ ++ echo $(AR) rs $(OUT_LIB) $(OBJ) ++ $(AR) rs $(OUT_LIB) $(OBJ) + + $(OUT_SLIB): ../Makefile.opts $(OBJ) + @echo " LD $(OUT_SLIB)"; \ +@@ -56,8 +62,8 @@ + + clean: + @echo " CLEAN lib"; \ +- $(RM) -f $(OBJ) $(OUT_SLIB) $(LN_SLIB) $(LN1_SLIB); \ +- $(RM) -f $(DEPS) $(OUT_SLIB) $(LN_SLIB) $(LN1_SLIB) ++ $(RM) -f $(OBJ) $(OUT_SLIB) $(OUT_LIB) $(LN_SLIB) $(LN1_SLIB); \ ++ $(RM) -f $(DEPS) $(OUT_SLIB) $(OUT_LIB) $(LN_SLIB) $(LN1_SLIB) + + distclean: + @echo " DISTCLEAN lib"; \ +@@ -65,11 +71,7 @@ + + install: +- mkdir -p $(DESTDIR)$(libdir)/ +- install -m 0644 $(OUT_SLIB) $(DESTDIR)$(libdir) +- rm -f $(DESTDIR)$(libdir)/$(LN1_SLIB) +- $(LN) -s $(OUT_SLIB) $(DESTDIR)$(libdir)/$(LN1_SLIB) +- rm -f $(DESTDIR)$(libdir)/$(LN_SLIB) +- $(LN) -s $(LN1_SLIB) $(DESTDIR)$(libdir)/$(LN_SLIB) ++ mkdir -p $(DESTDIR)$(libdir)/libnl1 ++ install -m 0644 $(OUT_LIB) $(DESTDIR)$(libdir)/libnl1 + + $(DEPS): ../Makefile.opts + +diff -uNr libnl-1.1.orig//Makefile libnl-1.1/Makefile +--- libnl-1.1.orig//Makefile 2008-01-14 16:48:45.000000000 +0100 ++++ libnl-1.1/Makefile 2011-03-23 16:53:12.438533242 +0100 +@@ -13,7 +13,7 @@ + include Makefile.opts + endif + +-SUBDIRS := lib include doc src tests ++SUBDIRS := lib include doc + .PHONY: all clean distclean install gendoc $(SUBDIRS) + + all: Makefile.opts +diff -uNr libnl-1.1.orig//libnl-1.pc.in libnl-1.1/libnl-1.pc.in +--- libnl-1.1.orig//libnl-1.pc.in 2008-01-14 16:48:45.000000000 +0100 ++++ libnl-1.1/libnl-1.pc.in 2011-03-23 16:57:18.084533174 +0100 +@@ -6,5 +6,5 @@ + Name: libnl + Description: Convenience library for netlink sockets + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -lnl +-Cflags: ++Libs: -L${libdir}/libnl1 -lnl1 -lm ++Cflags: -I${includedir}/libnl1 diff --git a/recipes/libnl/files/dont-link-libnl-from-sysroot.patch b/recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch similarity index 100% rename from recipes/libnl/files/dont-link-libnl-from-sysroot.patch rename to recipes/libnl/libnl1-1.1/dont-link-libnl-from-sysroot.patch diff --git a/recipes/libnl/files/fix-includes.patch b/recipes/libnl/libnl1-1.1/fix-includes.patch similarity index 100% rename from recipes/libnl/files/fix-includes.patch rename to recipes/libnl/libnl1-1.1/fix-includes.patch diff --git a/recipes/libnl/files/local-includes.patch b/recipes/libnl/libnl1-1.1/local-includes.patch similarity index 100% rename from recipes/libnl/files/local-includes.patch rename to recipes/libnl/libnl1-1.1/local-includes.patch diff --git a/recipes/libnl/files/netlink-local-fix.patch b/recipes/libnl/libnl1-1.1/netlink-local-fix.patch similarity index 100% rename from recipes/libnl/files/netlink-local-fix.patch rename to recipes/libnl/libnl1-1.1/netlink-local-fix.patch diff --git a/recipes/libnl/files/respect-ldflags.patch b/recipes/libnl/libnl1-1.1/respect-ldflags.patch similarity index 100% rename from recipes/libnl/files/respect-ldflags.patch rename to recipes/libnl/libnl1-1.1/respect-ldflags.patch diff --git a/recipes/libnl/libnl_1.1.bb b/recipes/libnl/libnl1_1.1.bb similarity index 67% rename from recipes/libnl/libnl_1.1.bb rename to recipes/libnl/libnl1_1.1.bb index f1b2a9d485..3569867cc0 100644 --- a/recipes/libnl/libnl_1.1.bb +++ b/recipes/libnl/libnl1_1.1.bb @@ -1,11 +1,9 @@ -DESCRIPTION = "libnl is a library for applications dealing with netlink sockets" -SECTION = "libs/network" -LICENSE = "LGPL" -HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" +require libnl.inc -PR = "r4" +PR = "${INC_PR}.0" -inherit autotools pkgconfig +# move it to extra subdirectory +includedir = "${prefix}/include/libnl1" CFLAGS += '-DVLAN_FLAG_REORDER_HDR=1' @@ -16,8 +14,9 @@ SRC_URI = "\ file://respect-ldflags.patch \ file://netlink-local-fix.patch \ file://dont-link-libnl-from-sysroot.patch \ + file://build.only.static.lib.patch \ " - +S = "${WORKDIR}/libnl-${PV}" SRC_URI[md5sum] = "ae970ccd9144e132b68664f98e7ceeb1" SRC_URI[sha256sum] = "35cea4cfb6cd8af0cafa0f34fff81def5a1f193b8b8384299b4b21883e22edc3" diff --git a/recipes/libnl/libnl2_2.0.bb b/recipes/libnl/libnl_2.0.bb similarity index 66% rename from recipes/libnl/libnl2_2.0.bb rename to recipes/libnl/libnl_2.0.bb index 3484f24543..d1cbc0beeb 100644 --- a/recipes/libnl/libnl2_2.0.bb +++ b/recipes/libnl/libnl_2.0.bb @@ -1,20 +1,15 @@ -DESCRIPTION = "libnl2 is a library for applications dealing with netlink sockets" -SECTION = "libs/network" -LICENSE = "LGPL" -HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" +require libnl.inc PE = "1" -PR = "r1" +PR = "${INC_PR}.0" -inherit autotools pkgconfig +DEPENDS = "flex-native bison-native" -includedir = ${prefix}/include/libnl2 - -S = "${WORKDIR}/libnl-${PV}" SRC_URI = "\ http://www.infradead.org/~tgr/libnl/files/libnl-${PV}.tar.gz \ file://fix-pc-file.patch \ file://fix-pktloc-dep-race.patch \ " + SRC_URI[md5sum] = "6aaf1e9802a17a7d702bb0638044ffa7" SRC_URI[sha256sum] = "5a40dc903d3ca1074da7424b908bec8ff16936484798c7e46e53e9db8bc87a9c" diff --git a/recipes/libnl/libnl2_git.bb b/recipes/libnl/libnl_git.bb similarity index 62% rename from recipes/libnl/libnl2_git.bb rename to recipes/libnl/libnl_git.bb index 9c6ff42032..a4a37a8b12 100644 --- a/recipes/libnl/libnl2_git.bb +++ b/recipes/libnl/libnl_git.bb @@ -1,22 +1,17 @@ -DESCRIPTION = "libnl2 is a library for applications dealing with netlink sockets" -SECTION = "libs/network" -LICENSE = "LGPL" -HOMEPAGE = "http://www.infradead.org/~tgr/libnl/" -SRCREV = "d378220c96c3c8b6f27dca33e7d8ba03318f9c2d" -PV = "1.9+gitr${SRCPV}" -PE = "1" -PR = "r2" +require libnl.inc -inherit autotools +PE = "1" +PV = "1.9+gitr${SRCPV}" +PR = "${INC_PR}.0" -includedir = ${prefix}/include/libnl2 +DEPENDS = "flex-native bison-native" +S = "${WORKDIR}/git" +SRCREV = "d378220c96c3c8b6f27dca33e7d8ba03318f9c2d" SRC_URI = "\ git://git.kernel.org/pub/scm/libs/netlink/libnl.git;protocol=git \ file://fix-pc-file.patch \ - file://fix-pktloc-dep-race.patch \ " -S = "${WORKDIR}/git" PACKAGES =+ "${PN}-route ${PN}-nf ${PN}-genl ${PN}-cli" FILES_${PN}-route = "${libdir}/libnl-route.so.*" diff --git a/recipes/libosip2/libosip2_3.1.0.bb b/recipes/libosip2/libosip2_3.5.0.bb similarity index 60% rename from recipes/libosip2/libosip2_3.1.0.bb rename to recipes/libosip2/libosip2_3.5.0.bb index fa1321cf9f..0491c0e49e 100644 --- a/recipes/libosip2/libosip2_3.1.0.bb +++ b/recipes/libosip2/libosip2_3.5.0.bb @@ -7,5 +7,5 @@ SRC_URI = "${GNU_MIRROR}/osip/libosip2-${PV}.tar.gz" inherit autotools pkgconfig -SRC_URI[md5sum] = "7eb305608256ac2a7a27b66ce52627c8" -SRC_URI[sha256sum] = "245911a9a48bbe868c4518faf86191f6568fb99d9967d368164a17a83671e8fb" +SRC_URI[md5sum] = "7691546f6b3349d10007fc1aaff0f4e0" +SRC_URI[sha256sum] = "dd955daa24d9ce2de6709b8c13e7c04ebc3afa8ac094d6a15a02a075be719a91" diff --git a/recipes/libsndfile/libsndfile1_1.0.24.bb b/recipes/libsndfile/libsndfile1_1.0.24.bb new file mode 100644 index 0000000000..913c2837de --- /dev/null +++ b/recipes/libsndfile/libsndfile1_1.0.24.bb @@ -0,0 +1,36 @@ +DESCRIPTION = "An audio format Conversion library" +HOMEPAGE = "http://www.mega-nerd.com/libsndfile" +AUTHOR = "Erik de Castro Lopo" +SECTION = "libs/multimedia" +LICENSE = "LGPL" +DEPENDS = "sqlite3" +PR = "r0" + +SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz" + +S = "${WORKDIR}/libsndfile-${PV}" + +inherit autotools lib_package pkgconfig + +do_configure_prepend_arm() { + ac_cv_sizeof_off_t=8 + # they are not in one of site/ files because they are common with + # glib-2.0 if they are moved to common site files then they break + # glib-2.0 build if largefile support is not available (.e.g. uclibc + # can be tuned to not have it. + export ac_cv_sys_largefile_source=1 + export ac_cv_sys_file_offset_bits=64 +} + +do_configure_prepend_chinook-compat () { + for i in lt~obsolete.m4 ltsugar.m4 libtool.m4 ltoptions.m4 ltversion.m4 + do + rm ${S}/M4/${i} + done +} + +PACKAGES =+ "${PN}-octave" +FILES_${PN}-octave += "/usr/share/octave/site/m" + +SRC_URI[md5sum] = "8f823c30c1d8d44830db6ab845d6679e" +SRC_URI[sha256sum] = "b6050e6fbfbb72c8bfbc895104697a4af1d49077a64e4846e0be7af87c9e56a4" diff --git a/recipes/linux-libc-headers/linux-libc-headers-2.6.24/arm-hwcap-add-new-entries.patch b/recipes/linux-libc-headers/linux-libc-headers-2.6.24/arm-hwcap-add-new-entries.patch new file mode 100644 index 0000000000..80a7949607 --- /dev/null +++ b/recipes/linux-libc-headers/linux-libc-headers-2.6.24/arm-hwcap-add-new-entries.patch @@ -0,0 +1,31 @@ +linux-libc-headers 2.6.24: backport arm/asm/hwcap.h from linux 2.6.26 + +Enables building of OpenJDK which uses HWCAP_THUMBEE that is not present +in 2.6.24 headers and was introduced with + + commit d7f864be8323e5394040e2877594645b0e7da85d + Author: Catalin Marinas + Date: Fri Apr 18 22:43:06 2008 +0100 + + ARMv7: Add support for the ThumbEE state saving/restoring + + This patch adds the detection and handling of the ThumbEE extension on + ARMv7 CPUs. + + Signed-off-by: Catalin Marinas + +Upstream-Status: Backport [2.6.26] + +Signed-off-by: Steffen Sledz + +diff -Nurd linux-2.6.24.orig//include/asm-arm/hwcap.h linux-2.6.24/include/asm-arm/hwcap.h +--- linux-2.6.24.orig//include/asm-arm/hwcap.h 2011-09-15 08:42:58.467307245 +0200 ++++ linux-2.6.24/include/asm-arm/hwcap.h 2011-09-15 08:43:46.004693497 +0200 +@@ -15,6 +15,7 @@ + #define HWCAP_JAVA 256 + #define HWCAP_IWMMXT 512 + #define HWCAP_CRUNCH 1024 ++#define HWCAP_THUMBEE 2048 + + #if defined(__KERNEL__) && !defined(__ASSEMBLY__) + /* diff --git a/recipes/linux-libc-headers/linux-libc-headers-2.6.24/hipox/siocoutqsnd.patch b/recipes/linux-libc-headers/linux-libc-headers-2.6.24/hipox/siocoutqsnd.patch new file mode 100644 index 0000000000..616a860d62 --- /dev/null +++ b/recipes/linux-libc-headers/linux-libc-headers-2.6.24/hipox/siocoutqsnd.patch @@ -0,0 +1,54 @@ +tcp: ioctl type SIOCOUTQNSD returns amount of data not sent + +In contrast to SIOCOUTQ which returns the amount of data sent +but not yet acknowledged plus data not yet sent this patch only +returns the data not sent. + +For various methods of live streaming bitrate control it may +be helpful to know how much data are in the tcp outqueue are +not sent yet. + +Signed-off-by: Mario Schuknecht + +diff -Nurd linux-2.6.24.orig//include/asm-arm/ioctls.h linux-2.6.24/include/asm-arm/ioctls.h +--- linux-2.6.24.orig//include/asm-arm/ioctls.h 2010-10-08 09:03:02.000000000 +0200 ++++ linux-2.6.24/include/asm-arm/ioctls.h 2010-10-08 09:09:55.000000000 +0200 +@@ -53,6 +53,8 @@ + #define TIOCGPTN _IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ + #define TIOCSPTLCK _IOW('T',0x31, int) /* Lock/unlock Pty */ + ++#define TIOCOUTQNSD 0x5437 ++ + #define FIONCLEX 0x5450 /* these numbers need to be adjusted. */ + #define FIOCLEX 0x5451 + #define FIOASYNC 0x5452 +diff -Nurd linux-2.6.24.orig//include/linux/sockios.h linux-2.6.24/include/linux/sockios.h +--- linux-2.6.24.orig//include/linux/sockios.h 2010-10-08 09:03:02.000000000 +0200 ++++ linux-2.6.24/include/linux/sockios.h 2010-10-08 09:10:43.000000000 +0200 +@@ -23,6 +23,7 @@ + /* Linux-specific socket ioctls */ + #define SIOCINQ FIONREAD + #define SIOCOUTQ TIOCOUTQ ++#define SIOCOUTQNSD TIOCOUTQNSD + + /* Routing table calls. */ + #define SIOCADDRT 0x890B /* add routing table entry */ +diff -Nurd linux-2.6.24.orig//net/ipv4/tcp.c linux-2.6.24/net/ipv4/tcp.c +--- linux-2.6.24.orig//net/ipv4/tcp.c 2010-10-08 09:02:59.000000000 +0200 ++++ linux-2.6.24/net/ipv4/tcp.c 2010-10-08 09:10:43.000000000 +0200 +@@ -444,6 +444,15 @@ + else + answ = tp->write_seq - tp->snd_una; + break; ++ case SIOCOUTQNSD: ++ if (sk->sk_state == TCP_LISTEN) ++ return -EINVAL; ++ ++ if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV)) ++ answ = 0; ++ else ++ answ = tp->write_seq - tp->snd_nxt; ++ break; + default: + return -ENOIOCTLCMD; + } diff --git a/recipes/linux-libc-headers/linux-libc-headers-2.6.24/make-3.82.patch b/recipes/linux-libc-headers/linux-libc-headers-2.6.24/make-3.82.patch new file mode 100644 index 0000000000..99896d9f4c --- /dev/null +++ b/recipes/linux-libc-headers/linux-libc-headers-2.6.24/make-3.82.patch @@ -0,0 +1,29 @@ +diff -Nurd linux-2.6.24.orig//Makefile linux-2.6.24/Makefile +--- linux-2.6.24.orig//Makefile 2011-03-29 07:56:05.122449521 +0200 ++++ linux-2.6.24/Makefile 2011-03-29 07:57:48.726768621 +0200 +@@ -431,7 +431,11 @@ + include $(srctree)/arch/$(SRCARCH)/Makefile + export KBUILD_DEFCONFIG + +-config %config: scripts_basic outputmakefile FORCE ++config: scripts_basic outputmakefile FORCE ++ $(Q)mkdir -p include/linux include/config ++ $(Q)$(MAKE) $(build)=scripts/kconfig $@ ++ ++%config: scripts_basic outputmakefile FORCE + $(Q)mkdir -p include/linux include/config + $(Q)$(MAKE) $(build)=scripts/kconfig $@ + +@@ -1500,7 +1504,11 @@ + $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) + + # Modules +-/ %/: prepare scripts FORCE ++/: prepare scripts FORCE ++ $(cmd_crmodverdir) ++ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ ++ $(build)=$(build-dir) ++%/: prepare scripts FORCE + $(cmd_crmodverdir) + $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ + $(build)=$(build-dir) diff --git a/recipes/linux-libc-headers/linux-libc-headers_2.6.24.bb b/recipes/linux-libc-headers/linux-libc-headers_2.6.24.bb index e95299bc66..d7f67edc7e 100644 --- a/recipes/linux-libc-headers/linux-libc-headers_2.6.24.bb +++ b/recipes/linux-libc-headers/linux-libc-headers_2.6.24.bb @@ -2,12 +2,19 @@ require linux-libc-headers.inc INHIBIT_DEFAULT_DEPS = "1" DEPENDS += "unifdef-native" -PR = "r6" +PR = "r8" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \ file://procinfo.h \ file://export_falloc_h.patch \ - file://unifdef.patch" + file://make-3.82.patch \ + file://unifdef.patch \ + file://arm-hwcap-add-new-entries.patch \ +" + +SRC_URI_append_hipox = " \ + file://siocoutqsnd.patch \ + " S = "${WORKDIR}/linux-${PV}" diff --git a/recipes/linux/linux-2.6.24/cfi-amic.patch b/recipes/linux/linux-2.6.24/cfi-amic.patch new file mode 100644 index 0000000000..feb673f73f --- /dev/null +++ b/recipes/linux/linux-2.6.24/cfi-amic.patch @@ -0,0 +1,22 @@ +diff -Nurd linux-2.6.24.orig//drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.24/drivers/mtd/chips/cfi_cmdset_0002.c +--- linux-2.6.24.orig//drivers/mtd/chips/cfi_cmdset_0002.c 2011-03-10 17:05:22.868634509 +0100 ++++ linux-2.6.24/drivers/mtd/chips/cfi_cmdset_0002.c 2011-03-10 17:06:58.723636256 +0100 +@@ -219,6 +219,7 @@ + static struct cfi_fixup cfi_fixup_table[] = { + #ifdef AMD_BOOTLOC_BUG + { CFI_MFR_AMD, CFI_ID_ANY, fixup_amd_bootblock, NULL }, ++ { CFI_MFR_AMIC, CFI_ID_ANY, fixup_amd_bootblock, NULL }, + #endif + { CFI_MFR_AMD, 0x0050, fixup_use_secsi, NULL, }, + { CFI_MFR_AMD, 0x0053, fixup_use_secsi, NULL, }, +diff -Nurd linux-2.6.24.orig//include/linux/mtd/cfi.h linux-2.6.24/include/linux/mtd/cfi.h +--- linux-2.6.24.orig//include/linux/mtd/cfi.h 2011-03-10 17:05:19.584884614 +0100 ++++ linux-2.6.24/include/linux/mtd/cfi.h 2011-03-10 17:08:03.886636402 +0100 +@@ -485,6 +485,7 @@ + #define CFI_ID_ANY 0xffff + + #define CFI_MFR_AMD 0x0001 ++#define CFI_MFR_AMIC 0x0037 + #define CFI_MFR_ATMEL 0x001F + #define CFI_MFR_ST 0x0020 /* STMicroelectronics */ + diff --git a/recipes/linux/linux-2.6.24/ftdi-4n-galaxy.patch b/recipes/linux/linux-2.6.24/ftdi-4n-galaxy.patch new file mode 100644 index 0000000000..133aae856b --- /dev/null +++ b/recipes/linux/linux-2.6.24/ftdi-4n-galaxy.patch @@ -0,0 +1,22 @@ +diff -Nurd linux-2.6.24.orig/drivers/usb/serial/ftdi_sio.c linux-2.6.24/drivers/usb/serial/ftdi_sio.c +--- linux-2.6.24.orig/drivers/usb/serial/ftdi_sio.c 2011-06-07 12:15:01.418982729 +0200 ++++ linux-2.6.24/drivers/usb/serial/ftdi_sio.c 2011-06-07 12:16:20.107926616 +0200 +@@ -523,6 +523,7 @@ + { USB_DEVICE(FTDI_VID, EVER_ECO_PRO_CDS) }, + { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_1_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_2_PID) }, ++ { USB_DEVICE(FTDI_VID, FTDI_4N_GALAXY_DE_3_PID) }, + { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_0_PID) }, + { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_1_PID) }, + { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_2_PID) }, +diff -Nurd linux-2.6.24.orig/drivers/usb/serial/ftdi_sio.h linux-2.6.24/drivers/usb/serial/ftdi_sio.h +--- linux-2.6.24.orig/drivers/usb/serial/ftdi_sio.h 2011-06-07 12:15:01.413983114 +0200 ++++ linux-2.6.24/drivers/usb/serial/ftdi_sio.h 2011-06-07 12:16:11.652577907 +0200 +@@ -387,6 +387,7 @@ + */ + #define FTDI_4N_GALAXY_DE_1_PID 0xF3C0 + #define FTDI_4N_GALAXY_DE_2_PID 0xF3C1 ++#define FTDI_4N_GALAXY_DE_3_PID 0xF3C2 + + /* + * Mobility Electronics products. diff --git a/recipes/linux/linux-2.6.24/hipox/defconfig b/recipes/linux/linux-2.6.24/hipox/defconfig index 955423cab1..3b89dd4b8a 100644 --- a/recipes/linux/linux-2.6.24/hipox/defconfig +++ b/recipes/linux/linux-2.6.24/hipox/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.24.7 -# Thu Feb 3 15:28:12 2011 +# Thu Jun 16 14:04:00 2011 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -37,8 +37,12 @@ CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y CONFIG_POSIX_MQUEUE=y -# CONFIG_BSD_PROCESS_ACCT is not set -# CONFIG_TASKSTATS is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y # CONFIG_USER_NS is not set # CONFIG_PID_NS is not set # CONFIG_AUDIT is not set @@ -644,7 +648,7 @@ CONFIG_ATA=m # CONFIG_SATA_VITESSE is not set # CONFIG_SATA_INIC162X is not set CONFIG_SATA_OX810=m -# CONFIG_SATA_HIPOX_SINGLE_SATA is not set +CONFIG_SATA_HIPOX_SINGLE_SATA=y # CONFIG_SATA_HIPOX_DISK_LIGHT is not set # CONFIG_PATA_ALI is not set # CONFIG_PATA_AMD is not set @@ -715,7 +719,7 @@ CONFIG_NETDEVICES=y # CONFIG_BONDING is not set # CONFIG_MACVLAN is not set # CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set +CONFIG_TUN=y # CONFIG_VETH is not set # CONFIG_ARCNET is not set # CONFIG_NET_ETHERNET is not set @@ -1515,7 +1519,7 @@ CONFIG_OPROFILE=m # # Kernel hacking # -# CONFIG_PRINTK_TIME is not set +CONFIG_PRINTK_TIME=y CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y CONFIG_MAGIC_SYSRQ=y @@ -1525,8 +1529,8 @@ CONFIG_DEBUG_FS=y CONFIG_DEBUG_KERNEL=y # CONFIG_DEBUG_SHIRQ is not set CONFIG_DETECT_SOFTLOCKUP=y -CONFIG_SCHED_DEBUG=y -# CONFIG_SCHEDSTATS is not set +# CONFIG_SCHED_DEBUG is not set +CONFIG_SCHEDSTATS=y # CONFIG_TIMER_STATS is not set # CONFIG_DEBUG_SLAB is not set # CONFIG_DEBUG_RT_MUTEXES is not set @@ -1550,8 +1554,8 @@ CONFIG_FORCED_INLINING=y # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_FAULT_INJECTION is not set # CONFIG_SAMPLES is not set -# CONFIG_DEBUG_USER is not set -# CONFIG_DEBUG_ERRORS is not set +CONFIG_DEBUG_USER=y +CONFIG_DEBUG_ERRORS=y # CONFIG_DEBUG_LL is not set # diff --git a/recipes/linux/linux-2.6.24/hipox/hipox-gmac-deadlock.patch b/recipes/linux/linux-2.6.24/hipox/hipox-gmac-deadlock.patch new file mode 100644 index 0000000000..a566c5f9b7 --- /dev/null +++ b/recipes/linux/linux-2.6.24/hipox/hipox-gmac-deadlock.patch @@ -0,0 +1,36 @@ +diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/gmac-napi.c linux-2.6.24/arch/arm/mach-hipox/gmac-napi.c +--- linux-2.6.24.orig//arch/arm/mach-hipox/gmac-napi.c 2011-06-27 11:17:48.000000000 +0200 ++++ linux-2.6.24/arch/arm/mach-hipox/gmac-napi.c 2011-06-27 11:06:20.000000000 +0200 +@@ -551,6 +551,7 @@ + skb = dev_alloc_skb(priv->rx_buffer_size_ + NET_IP_ALIGN); + if (!skb) { + // Can't refill any more RX descriptor ring entries ++ printk("%s: refill_rx_ring() dev_alloc_skb failed\n", dev->name); + break; + } else { + // Despite what the comments in the original code from Synopsys +@@ -1476,14 +1477,18 @@ + } + + if (!continue_polling) { +- // No more received packets to process so return to interrupt mode +- netif_rx_complete(dev, napi); ++ if(priv->rx_gmac_desc_list_info.full_count) { ++ // No more received packets to process so return to interrupt mode ++ netif_rx_complete(dev, napi); + +- // Enable interrupts caused by received packets that may have been ++ // Enable interrupts caused by received packets that may have been + // disabled in the ISR before entering polled mode +- gmac_int_en_set(priv, (1UL << DMA_INT_ENABLE_RI_BIT) | +- (1UL << DMA_INT_ENABLE_RU_BIT) | +- (1UL << DMA_INT_ENABLE_OV_BIT)); ++ gmac_int_en_set(priv, (1UL << DMA_INT_ENABLE_RI_BIT) | ++ (1UL << DMA_INT_ENABLE_RU_BIT) | ++ (1UL << DMA_INT_ENABLE_OV_BIT)); ++ } else { ++ printk("%s: no input buffer, remain within poll mode\n", dev->name); ++ } + } + + return work_done; diff --git a/recipes/linux/linux-2.6.24/hipox/hipox-nand-timing.patch b/recipes/linux/linux-2.6.24/hipox/hipox-nand-timing.patch new file mode 100644 index 0000000000..be3f861fef --- /dev/null +++ b/recipes/linux/linux-2.6.24/hipox/hipox-nand-timing.patch @@ -0,0 +1,63 @@ +diff -Nurd linux-2.6.24.orig/drivers/mtd/maps/physmap.c linux-2.6.24/drivers/mtd/maps/physmap.c +--- linux-2.6.24.orig/drivers/mtd/maps/physmap.c 2011-05-03 15:40:51.000000000 +0200 ++++ linux-2.6.24/drivers/mtd/maps/physmap.c 2011-05-05 10:08:00.000000000 +0200 +@@ -156,7 +156,9 @@ + + #if defined (CONFIG_ARCH_HIPOX) + /* init timing for static memory controller */ ++ mutex_lock(&hipox_flash_mutex); + writel(STATIC_BUS_FLASH_CONFIG, STATIC_CONTROL_BANK0); ++ mutex_unlock(&hipox_flash_mutex); + #endif /* CONFIG_ARCH_HIPOX */ + + printk(KERN_NOTICE "physmap platform flash device: %.8llx at %.8llx\n", +diff -Nurd linux-2.6.24.orig/drivers/mtd/nand/hipox_nand.c linux-2.6.24/drivers/mtd/nand/hipox_nand.c +--- linux-2.6.24.orig/drivers/mtd/nand/hipox_nand.c 2011-05-03 15:40:51.000000000 +0200 ++++ linux-2.6.24/drivers/mtd/nand/hipox_nand.c 2011-05-05 10:07:52.000000000 +0200 +@@ -30,9 +30,10 @@ + + // the testboards ran down to a value of 4 + //#define STATIC_BUS_FLASH_CONFIG 0x4f1f3f3f /* slow settings, 345 ns */ +-//#define STATIC_BUS_FLASH_CONFIG 0x4f1f3f0d /* fast settings, 70 ns */ ++#define STATIC_BUS_FLASH_CONFIG 0x4f1f3f0d /* fast settings, 70 ns; use this as default, because it works for hipox board NOR flash also */ + //#define STATIC_BUS_FLASH_CONFIG 0x4f1f3f09 /* ultra fast settings, 50 ns */ +-#define STATIC_BUS_FLASH_CONFIG 0x4f1f3f04 /* warp settings, 27 ns */ ++//#define STATIC_BUS_FLASH_CONFIG 0x4f1f3f04 /* warp settings, 27 ns */ ++#define STATIC_BUS_FLASH_CONFIG_RW 0x41030304 /* read and write warp settings */ + + /* + * MTD structure for HydraIP board +@@ -65,6 +66,7 @@ + */ + static void hipox_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl) + { ++ static unsigned int bank0 = STATIC_BUS_FLASH_CONFIG; + struct nand_chip *this = mtd->priv; + + if (ctrl & NAND_CTRL_CHANGE) { +@@ -77,12 +79,15 @@ + // printk("%s:%d would wait for hipox_flash_mutex\n", __func__, __LINE__); + mutex_lock(&hipox_flash_mutex); + writel(0x20000000, GPIO_A_OUTPUT_CLEAR); /* assert CS-NAND */ ++ bank0 = readl(STATIC_CONTROL_BANK0); ++ writel(STATIC_BUS_FLASH_CONFIG_RW, STATIC_CONTROL_BANK0); + } + } + else + { + if (!(0x20000000 & readl(GPIO_A_OUTPUT_VALUE))) + { ++ writel(bank0, STATIC_CONTROL_BANK0); + writel(0x20000000, GPIO_A_OUTPUT_SET); /* deassert CS-NAND */ + mutex_unlock(&hipox_flash_mutex); + // printk("%s:%d hipox_flash_mutex unlocked\n", __func__, __LINE__); +@@ -234,7 +239,9 @@ + return -ENOMEM; + } + ++ mutex_lock(&hipox_flash_mutex); + writel(STATIC_BUS_FLASH_CONFIG, STATIC_CONTROL_BANK0); ++ mutex_unlock(&hipox_flash_mutex); + + /* Initialize structures */ + memset(hipox_nand_mtd, 0, sizeof(struct mtd_info)); diff --git a/recipes/linux/linux-2.6.24/hipox/hipox-nand-vs-nor.patch b/recipes/linux/linux-2.6.24/hipox/hipox-nand-vs-nor.patch index 22dcc1bd16..8b7bc36d1e 100644 --- a/recipes/linux/linux-2.6.24/hipox/hipox-nand-vs-nor.patch +++ b/recipes/linux/linux-2.6.24/hipox/hipox-nand-vs-nor.patch @@ -1,18 +1,6 @@ -diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/Makefile linux-2.6.24/arch/arm/mach-hipox/Makefile ---- linux-2.6.24.orig//arch/arm/mach-hipox/Makefile 2010-01-29 11:50:34.000000000 +0100 -+++ linux-2.6.24/arch/arm/mach-hipox/Makefile 2010-01-29 11:54:02.000000000 +0100 -@@ -4,7 +4,7 @@ - - # Object file lists. - --obj-y := hipox.o irq.o time.o dma.o pci.o ahb_mon.o leon.o samba_reserve.o -+obj-y := hipox.o irq.o time.o dma.o pci.o ahb_mon.o leon.o samba_reserve.o smc.o - - obj-$(CONFIG_SYNOPSYS_GMAC) += gmac.o - -diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/hipox.c linux-2.6.24/arch/arm/mach-hipox/hipox.c ---- linux-2.6.24.orig//arch/arm/mach-hipox/hipox.c 2010-01-29 11:50:34.000000000 +0100 -+++ linux-2.6.24/arch/arm/mach-hipox/hipox.c 2010-01-29 11:51:26.000000000 +0100 +diff -Nurd linux-2.6.24.orig/arch/arm/mach-hipox/hipox.c linux-2.6.24/arch/arm/mach-hipox/hipox.c +--- linux-2.6.24.orig/arch/arm/mach-hipox/hipox.c 2011-05-03 17:05:00.000000000 +0200 ++++ linux-2.6.24/arch/arm/mach-hipox/hipox.c 2011-05-03 17:05:40.000000000 +0200 @@ -25,6 +25,7 @@ #include #include @@ -32,10 +20,22 @@ diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/hipox.c linux-2.6.24/arch/arm/ // To hold LED inversion state int hipox_global_invert_leds = 0; #include -diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/smc.c linux-2.6.24/arch/arm/mach-hipox/smc.c ---- linux-2.6.24.orig//arch/arm/mach-hipox/smc.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.24/arch/arm/mach-hipox/smc.c 2010-01-29 11:51:26.000000000 +0100 -@@ -0,0 +1,73 @@ +diff -Nurd linux-2.6.24.orig/arch/arm/mach-hipox/Makefile linux-2.6.24/arch/arm/mach-hipox/Makefile +--- linux-2.6.24.orig/arch/arm/mach-hipox/Makefile 2011-05-03 17:05:00.000000000 +0200 ++++ linux-2.6.24/arch/arm/mach-hipox/Makefile 2011-05-03 17:05:40.000000000 +0200 +@@ -4,7 +4,7 @@ + + # Object file lists. + +-obj-y := hipox.o irq.o time.o dma.o pci.o ahb_mon.o leon.o samba_reserve.o ++obj-y := hipox.o irq.o time.o dma.o pci.o ahb_mon.o leon.o samba_reserve.o smc.o + + obj-$(CONFIG_SYNOPSYS_GMAC) += gmac.o + +diff -Nurd linux-2.6.24.orig/arch/arm/mach-hipox/smc.c linux-2.6.24/arch/arm/mach-hipox/smc.c +--- linux-2.6.24.orig/arch/arm/mach-hipox/smc.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.24/arch/arm/mach-hipox/smc.c 2011-05-04 09:28:41.000000000 +0200 +@@ -0,0 +1,74 @@ +/* + * linux/arch/arm/mach-hipox/smc.c + * @@ -62,8 +62,9 @@ diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/smc.c linux-2.6.24/arch/arm/ma +#include +#include +#include ++#include + -+static unsigned int request_pci_timestamp = 0; ++static ktime_t request_pci_timestamp = {0}; +/* + * Request PCI_ARB to grant access to the STATIC core. + */ @@ -87,7 +88,7 @@ diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/smc.c linux-2.6.24/arch/arm/ma + if (!(readl(SYS_CTRL_PCI_STAT) & (1UL << SYSCTL_PCI_STAT_SYSPCI_STATIC_GNT))) + printk(KERN_WARNING "%s: timeout requesting access to PCI bus for static memory interface\n", __func__); + -+ request_pci_timestamp = jiffies_to_msecs(get_jiffies_64()); ++ request_pci_timestamp = ktime_get(); +} + +/* @@ -95,23 +96,23 @@ diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/smc.c linux-2.6.24/arch/arm/ma + */ +void hipox_smc_release_pci_ad_31_0(void) +{ -+ const unsigned int timeout = 100; /* ms */ -+ unsigned int delta = jiffies_to_msecs(get_jiffies_64()) - request_pci_timestamp; ++ const s64 timeout = 400; /* us */ ++ s64 delta = ktime_us_delta(ktime_get(), request_pci_timestamp); + + /* set PCI_ARB request bit in Sysctrl_PCI_Ctrl1 */ + writel(readl(SYS_CTRL_PCI_CTRL1) & ~(1UL << SYSCTL_PCI_CTRL1_SYSPCI_STATIC_REQ), SYS_CTRL_PCI_CTRL1); + + if (delta > timeout) + { -+ printk(KERN_WARNING "%s: static memory interface blocked PCI bus for %u ms\n", __func__, delta); ++ printk(KERN_WARNING "%s: static memory interface blocked PCI bus for %llu us\n", __func__, delta); + } +} + +EXPORT_SYMBOL(hipox_smc_request_pci_ad_31_0); +EXPORT_SYMBOL(hipox_smc_release_pci_ad_31_0); -diff -Nurd linux-2.6.24.orig//drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.24/drivers/mtd/chips/cfi_cmdset_0002.c ---- linux-2.6.24.orig//drivers/mtd/chips/cfi_cmdset_0002.c 2010-01-29 11:50:32.000000000 +0100 -+++ linux-2.6.24/drivers/mtd/chips/cfi_cmdset_0002.c 2010-01-29 11:51:26.000000000 +0100 +diff -Nurd linux-2.6.24.orig/drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.24/drivers/mtd/chips/cfi_cmdset_0002.c +--- linux-2.6.24.orig/drivers/mtd/chips/cfi_cmdset_0002.c 2011-05-03 17:04:58.000000000 +0200 ++++ linux-2.6.24/drivers/mtd/chips/cfi_cmdset_0002.c 2011-05-03 17:05:40.000000000 +0200 @@ -46,11 +46,14 @@ #define MANUFACTURER_AMD 0x0001 @@ -152,9 +153,9 @@ diff -Nurd linux-2.6.24.orig//drivers/mtd/chips/cfi_cmdset_0002.c linux-2.6.24/d #if !FORCE_WORD_WRITE { CFI_MFR_ANY, CFI_ID_ANY, fixup_use_write_buffers, NULL, }, #endif -diff -Nurd linux-2.6.24.orig//drivers/mtd/maps/physmap.c linux-2.6.24/drivers/mtd/maps/physmap.c ---- linux-2.6.24.orig//drivers/mtd/maps/physmap.c 2010-01-29 11:50:32.000000000 +0100 -+++ linux-2.6.24/drivers/mtd/maps/physmap.c 2010-01-29 11:51:26.000000000 +0100 +diff -Nurd linux-2.6.24.orig/drivers/mtd/maps/physmap.c linux-2.6.24/drivers/mtd/maps/physmap.c +--- linux-2.6.24.orig/drivers/mtd/maps/physmap.c 2011-05-03 17:04:58.000000000 +0200 ++++ linux-2.6.24/drivers/mtd/maps/physmap.c 2011-05-03 17:05:40.000000000 +0200 @@ -18,11 +18,13 @@ #include #include @@ -258,9 +259,9 @@ diff -Nurd linux-2.6.24.orig//drivers/mtd/maps/physmap.c linux-2.6.24/drivers/mt probe_type = rom_probe_types; for (; info->mtd == NULL && *probe_type != NULL; probe_type++) -diff -Nurd linux-2.6.24.orig//drivers/mtd/nand/hipox_nand.c linux-2.6.24/drivers/mtd/nand/hipox_nand.c ---- linux-2.6.24.orig//drivers/mtd/nand/hipox_nand.c 2010-01-29 11:50:32.000000000 +0100 -+++ linux-2.6.24/drivers/mtd/nand/hipox_nand.c 2010-01-29 11:51:26.000000000 +0100 +diff -Nurd linux-2.6.24.orig/drivers/mtd/nand/hipox_nand.c linux-2.6.24/drivers/mtd/nand/hipox_nand.c +--- linux-2.6.24.orig/drivers/mtd/nand/hipox_nand.c 2011-05-03 17:04:58.000000000 +0200 ++++ linux-2.6.24/drivers/mtd/nand/hipox_nand.c 2011-05-03 17:05:40.000000000 +0200 @@ -21,9 +21,10 @@ #include #include @@ -455,9 +456,9 @@ diff -Nurd linux-2.6.24.orig//drivers/mtd/nand/hipox_nand.c linux-2.6.24/drivers writel(0x20000000, GPIO_A_OUTPUT_CLEAR); // reset NAND unit -diff -Nurd linux-2.6.24.orig//include/asm-arm/arch-hipox/smc.h linux-2.6.24/include/asm-arm/arch-hipox/smc.h ---- linux-2.6.24.orig//include/asm-arm/arch-hipox/smc.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.24/include/asm-arm/arch-hipox/smc.h 2010-01-29 11:51:26.000000000 +0100 +diff -Nurd linux-2.6.24.orig/include/asm-arm/arch-hipox/smc.h linux-2.6.24/include/asm-arm/arch-hipox/smc.h +--- linux-2.6.24.orig/include/asm-arm/arch-hipox/smc.h 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.24/include/asm-arm/arch-hipox/smc.h 2011-05-03 17:05:40.000000000 +0200 @@ -0,0 +1,28 @@ +/* linux/include/asm-arm/arch-hipox/smc.h + * @@ -487,19 +488,20 @@ diff -Nurd linux-2.6.24.orig//include/asm-arm/arch-hipox/smc.h linux-2.6.24/incl +void hipox_smc_release_pci_ad_31_0(void); + +#endif // __ASM_ARCH_SMC_H -diff -Nurd linux-2.6.24.orig//include/asm-arm/arch-hipox/system.h linux-2.6.24/include/asm-arm/arch-hipox/system.h ---- linux-2.6.24.orig//include/asm-arm/arch-hipox/system.h 2010-01-29 11:50:34.000000000 +0100 -+++ linux-2.6.24/include/asm-arm/arch-hipox/system.h 2010-01-29 11:51:26.000000000 +0100 -@@ -8,5 +8,6 @@ +diff -Nurd linux-2.6.24.orig/include/asm-arm/arch-hipox/system.h linux-2.6.24/include/asm-arm/arch-hipox/system.h +--- linux-2.6.24.orig/include/asm-arm/arch-hipox/system.h 2011-05-03 17:05:01.000000000 +0200 ++++ linux-2.6.24/include/asm-arm/arch-hipox/system.h 2011-05-03 17:05:40.000000000 +0200 +@@ -8,6 +8,7 @@ #ifndef __ASM_ARCH_SYSTEM_H #define __ASM_ARCH_SYSTEM_H +#include #include #include -diff -Nurd linux-2.6.24.orig//include/linux/mtd/cfi.h linux-2.6.24/include/linux/mtd/cfi.h ---- linux-2.6.24.orig//include/linux/mtd/cfi.h 2010-01-29 12:11:03.000000000 +0100 -+++ linux-2.6.24/include/linux/mtd/cfi.h 2010-01-29 12:11:24.000000000 +0100 + +diff -Nurd linux-2.6.24.orig/include/linux/mtd/cfi.h linux-2.6.24/include/linux/mtd/cfi.h +--- linux-2.6.24.orig/include/linux/mtd/cfi.h 2011-05-03 17:05:01.000000000 +0200 ++++ linux-2.6.24/include/linux/mtd/cfi.h 2011-05-03 17:05:40.000000000 +0200 @@ -486,6 +486,7 @@ #define CFI_MFR_AMD 0x0001 diff --git a/recipes/linux/linux-2.6.24/hipox/ox810-pci-abort-handler.patch b/recipes/linux/linux-2.6.24/hipox/ox810-pci-abort-handler.patch new file mode 100644 index 0000000000..321dfa9ca8 --- /dev/null +++ b/recipes/linux/linux-2.6.24/hipox/ox810-pci-abort-handler.patch @@ -0,0 +1,489 @@ +diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/pci.c linux-2.6.24/arch/arm/mach-hipox/pci.c +--- linux-2.6.24.orig//arch/arm/mach-hipox/pci.c 2011-06-15 08:54:13.869073667 +0200 ++++ linux-2.6.24/arch/arm/mach-hipox/pci.c 2011-06-15 08:56:11.275235253 +0200 +@@ -667,6 +667,44 @@ + .postinit = hipox_pci_postinit, + }; + ++static int abort_handler(unsigned long addr, unsigned int fsr, struct pt_regs *regs) ++{ ++ unsigned long pc = instruction_pointer(regs); ++ unsigned long instr = *(unsigned long *)pc; ++ ++ static unsigned int mod = 1; ++ ++ CheckAndClearBusError(); ++ ++ if ( 0 == (++mod % 100000) ) ++ printk(KERN_ERR "PCI: Bus error happened %u times; last is at address 0x%lX.\n", mod, addr); ++ ++ /* set return value to -1 if this was a read */ ++ if ((instr & 0x0c100000) == 0x04100000) { ++ int reg = (instr >> 12) & 15; ++ unsigned long val; ++ ++ if (instr & 0x00400000) ++ val = 255; /* byte read */ ++ else ++ val = -1; ++ ++ regs->uregs[reg] = val; ++ regs->ARM_pc += 4; ++ return 0; ++ } ++ ++ if ((instr & 0x0e100090) == 0x00100090) { ++ int reg = (instr >> 12) & 15; ++ ++ regs->uregs[reg] = -1; ++ regs->ARM_pc += 4; ++ return 0; ++ } ++ ++ return 0; ++} ++ + static int __init hipox_pci_init(void) + { + #ifdef CONFIG_HIPOX_PCI_RESET +@@ -679,6 +717,7 @@ + printk(KERN_DEBUG "PCI: hipox_pci_init now it's %lu, will wait till %lu to become ready for config\n", pci_trhfa_startwait, pci_trhfa_timeout); + #endif // CONFIG_HIPOX_PCI_RESET + ++ hook_fault_code(8, abort_handler, SIGBUS, "PCI external abort on non-linefetch"); + pci_common_init(&hipox_pci); + return 0; + } +diff -Nurd linux-2.6.24.orig//arch/arm/mach-hipox/smc.c linux-2.6.24/arch/arm/mach-hipox/smc.c +--- linux-2.6.24.orig//arch/arm/mach-hipox/smc.c 2011-06-15 08:54:13.869073667 +0200 ++++ linux-2.6.24/arch/arm/mach-hipox/smc.c 2011-06-15 08:58:49.038353811 +0200 +@@ -20,6 +20,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -30,7 +31,7 @@ + /* + * Request PCI_ARB to grant access to the STATIC core. + */ +-void hipox_smc_request_pci_ad_31_0(void) ++static int _hipox_smc_request_pci_ad_31_0(void) + { + unsigned maxtries = 10; /* wait for maxtries jiffies at maximum */ + +@@ -51,12 +52,14 @@ + printk(KERN_WARNING "%s: timeout requesting access to PCI bus for static memory interface\n", __func__); + + request_pci_timestamp = ktime_get(); ++ ++ return ( 0 != ( readl(SYS_CTRL_PCI_STAT) & (1UL << SYSCTL_PCI_STAT_SYSPCI_STATIC_GNT) ) ? 0 : 1 ); + } + + /* + * Release access to PCI bus. + */ +-void hipox_smc_release_pci_ad_31_0(void) ++static void _hipox_smc_release_pci_ad_31_0(void) + { + const s64 timeout = 400; /* us */ + s64 delta = ktime_us_delta(ktime_get(), request_pci_timestamp); +@@ -70,5 +73,163 @@ + } + } + +-EXPORT_SYMBOL(hipox_smc_request_pci_ad_31_0); +-EXPORT_SYMBOL(hipox_smc_release_pci_ad_31_0); ++/* ++ * PCI / PNX / Flash interlock handling ++ * ++ */ ++ ++enum pci_semaphore_id { ++ no_one = 0, ++ ox810_pci = 1, ++ ox810_flash = 2, ++ remote_pci = 3 ++}; ++ ++DECLARE_MUTEX(_pci_bus_linux_semaphore); // don't be fooled; this actually declares a _semaphore_ (see asm-arm/semaphore.h) ++struct pci_semaphore { ++ struct semaphore *linux_sem; /**< lock the bus for flash or pci accesses */ ++ enum pci_semaphore_id current_owner; ++ uint32_t current_count; ++}; ++ ++static struct pci_semaphore _pnx_pci_semaphore = { ++ &_pci_bus_linux_semaphore, ++ no_one, ++ 0 ++}; ++/* ---- */ ++ ++static int default_sem_acquire( void *ignored, uint32_t ignored2) ++{ ++ return 0; ++} ++/* ---- */ ++ ++static int default_sem_release ( void *ignored ) ++{ ++ return 0; ++} ++/* ---- */ ++ ++static int (*pci_sem_acquire)( void * ctx, uint32_t value ) = default_sem_acquire; ++static int (*pci_sem_release)( void * ctx ) = default_sem_release; ++static void * pci_sem_context = NULL; ++ ++void ox810_pci_register_semaphore_callbacks( int (*acquire)(void*, uint32_t), int (*release)(void*), void * ctx ) ++{ ++ pci_sem_acquire = acquire; ++ pci_sem_release = release; ++ pci_sem_context = ctx; ++} ++/* ---- */ ++ ++void ox810_pci_reset_semaphore_callbacks( void ) ++{ ++ pci_sem_acquire = default_sem_acquire; ++ pci_sem_release = default_sem_release; ++} ++/* ---- */ ++ ++static int sem_acquire( enum pci_semaphore_id caller_id ) ++{ ++ if ( 0 != down_trylock( _pnx_pci_semaphore.linux_sem ) ) { ++ if ( _pnx_pci_semaphore.current_owner == caller_id ) { ++ _pnx_pci_semaphore.current_count++; ++ return 0; ++ } ++ ++ down( _pnx_pci_semaphore.linux_sem ); ++ } ++ ++ if ( 0 == pci_sem_acquire( pci_sem_context, caller_id) ) { ++ ++ if ( ( caller_id == ox810_flash ) ++ && ( 0 != _hipox_smc_request_pci_ad_31_0() ) ) { ++ up( _pnx_pci_semaphore.linux_sem ); ++ return 1; ++ } ++ ++ _pnx_pci_semaphore.current_owner = caller_id; ++ _pnx_pci_semaphore.current_count = 1; ++ ++ return 0; ++ } ++ ++ up( _pnx_pci_semaphore.linux_sem ); ++ ++ return 1; ++} ++/* ---- */ ++ ++static int sem_release( enum pci_semaphore_id caller_id ) ++{ ++ if ( _pnx_pci_semaphore.current_owner != caller_id ) ++ return 1; ++ ++ _pnx_pci_semaphore.current_count--; ++ if ( 0 != _pnx_pci_semaphore.current_count ) ++ return 0; ++ ++ if ( caller_id == ox810_flash ) ++ _hipox_smc_release_pci_ad_31_0(); ++ ++ if ( 0 != pci_sem_release( pci_sem_context )) ++ return 1; ++ ++ _pnx_pci_semaphore.current_owner = no_one; ++ up( _pnx_pci_semaphore.linux_sem ); ++ ++ return 0; ++} ++/* ---- */ ++ ++int ox810_pci_acquire_bus( void ) ++{ ++ return sem_acquire ( ox810_pci ); ++} ++/* ---- */ ++ ++int ox810_pci_release_bus( void ) ++{ ++ return sem_release ( ox810_pci ); ++} ++/* ---- */ ++ ++int ox810_flash_acquire_bus( void ) ++{ ++ return sem_acquire( ox810_flash ); ++} ++/* ---- */ ++ ++int ox810_flash_release_bus( void ) ++{ ++ return sem_release( ox810_flash ); ++} ++/* ---- */ ++ ++void hipox_smc_request_pci_ad_31_0( void ) ++{ ++ static uint32_t warned = 0; ++ if ( 0 == (warned++ % 10000) ) ++ printk( KERN_ERR "ERROR in arch/arm/mach-hipox/smc.c: deprecated hipox_smc_request_pci_ad_31_0() called instead of ox810_flash_acquire_bus(). This interface will die soon. PLEASE UPDATE YOUR DRIVER.\n"); ++ ox810_flash_acquire_bus(); ++} ++void hipox_smc_release_pci_ad_31_0( void ) ++{ ++ static uint32_t warned = 0; ++ if ( 0 == (warned++ % 10000) ) ++ printk( KERN_ERR "ERROR in arch/arm/mach-hipox/smc.c: deprecated hipox_smc_release_pci_ad_31_0() called instead of ox810_flash_release_bus(). This interface will die soon. PLEASE UPDATE YOUR DRIVER.\n"); ++ ox810_flash_release_bus(); ++} ++/* ---- */ ++ ++EXPORT_SYMBOL( hipox_smc_request_pci_ad_31_0 ); ++EXPORT_SYMBOL( hipox_smc_release_pci_ad_31_0 ); ++ ++EXPORT_SYMBOL(ox810_pci_acquire_bus); ++EXPORT_SYMBOL(ox810_pci_release_bus); ++EXPORT_SYMBOL(ox810_flash_acquire_bus); ++EXPORT_SYMBOL(ox810_flash_release_bus); ++ ++EXPORT_SYMBOL(ox810_pci_register_semaphore_callbacks); ++EXPORT_SYMBOL(ox810_pci_reset_semaphore_callbacks); +diff -Nurd linux-2.6.24.orig//drivers/mtd/maps/physmap.c linux-2.6.24/drivers/mtd/maps/physmap.c +--- linux-2.6.24.orig//drivers/mtd/maps/physmap.c 2011-06-15 08:54:14.204048457 +0200 ++++ linux-2.6.24/drivers/mtd/maps/physmap.c 2011-06-15 09:12:40.775896237 +0200 +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #if defined (CONFIG_ARCH_HIPOX) + #include +@@ -87,11 +88,12 @@ + + // printk("%s:%d would wait for hipox_flash_mutex\n", __func__, __LINE__); + mutex_lock(&hipox_flash_mutex); +- hipox_smc_request_pci_ad_31_0(); ++ if ( 0 != ox810_flash_acquire_bus() ) ++ BUG(); + + ret = inline_map_read(map, ofs); + +- hipox_smc_release_pci_ad_31_0(); ++ ox810_flash_release_bus(); + mutex_unlock(&hipox_flash_mutex); + // printk("%s:%d hipox_flash_mutex unlocked\n", __func__, __LINE__); + +@@ -102,11 +104,12 @@ + { + // printk("%s:%d would wait for hipox_flash_mutex\n", __func__, __LINE__); + mutex_lock(&hipox_flash_mutex); +- hipox_smc_request_pci_ad_31_0(); ++ if ( 0 != ox810_flash_acquire_bus() ) ++ BUG(); + + inline_map_write(map, datum, ofs); + +- hipox_smc_release_pci_ad_31_0(); ++ ox810_flash_release_bus(); + mutex_unlock(&hipox_flash_mutex); + // printk("%s:%d hipox_flash_mutex unlocked\n", __func__, __LINE__); + } +@@ -115,11 +118,12 @@ + { + // printk("%s:%d would wait for hipox_flash_mutex\n", __func__, __LINE__); + mutex_lock(&hipox_flash_mutex); +- hipox_smc_request_pci_ad_31_0(); ++ if ( 0 != ox810_flash_acquire_bus() ) ++ BUG(); + + inline_map_copy_from(map, to, from, len); + +- hipox_smc_release_pci_ad_31_0(); ++ ox810_flash_release_bus(); + mutex_unlock(&hipox_flash_mutex); + // printk("%s:%d hipox_flash_mutex unlocked\n", __func__, __LINE__); + } +@@ -128,11 +132,12 @@ + { + // printk("%s:%d would wait for hipox_flash_mutex\n", __func__, __LINE__); + mutex_lock(&hipox_flash_mutex); +- hipox_smc_request_pci_ad_31_0(); ++ if ( 0 != ox810_flash_acquire_bus() ) ++ BUG(); + + inline_map_copy_to(map, to, from, len); + +- hipox_smc_release_pci_ad_31_0(); ++ ox810_flash_release_bus(); + mutex_unlock(&hipox_flash_mutex); + // printk("%s:%d hipox_flash_mutex unlocked\n", __func__, __LINE__); + } +diff -Nurd linux-2.6.24.orig//drivers/mtd/nand/hipox_nand.c linux-2.6.24/drivers/mtd/nand/hipox_nand.c +--- linux-2.6.24.orig//drivers/mtd/nand/hipox_nand.c 2011-06-15 08:54:14.197048982 +0200 ++++ linux-2.6.24/drivers/mtd/nand/hipox_nand.c 2011-06-15 09:07:11.675625433 +0200 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -104,9 +105,10 @@ + + if (cmd != NAND_CMD_NONE) + { +- hipox_smc_request_pci_ad_31_0(); ++ if ( ox810_flash_acquire_bus() ) ++ BUG(); + writeb(cmd, this->IO_ADDR_W); +- hipox_smc_release_pci_ad_31_0(); ++ ox810_flash_release_bus(); + } + } + +@@ -120,9 +122,13 @@ + { + struct nand_chip *chip = mtd->priv; + uint8_t res; +- hipox_smc_request_pci_ad_31_0(); ++ ++ if ( ox810_flash_acquire_bus() ) ++ BUG(); ++ + res = readb(chip->IO_ADDR_R); +- hipox_smc_release_pci_ad_31_0(); ++ ++ ox810_flash_release_bus(); + return res; + } + +@@ -137,9 +143,13 @@ + { + struct nand_chip *chip = mtd->priv; + u16 res; +- hipox_smc_request_pci_ad_31_0(); ++ ++ if ( ox810_flash_acquire_bus() ) ++ BUG(); ++ + res = readw(chip->IO_ADDR_R); +- hipox_smc_release_pci_ad_31_0(); ++ ++ ox810_flash_release_bus(); + return res; + } + +@@ -156,10 +166,13 @@ + int i; + struct nand_chip *chip = mtd->priv; + +- hipox_smc_request_pci_ad_31_0(); ++ if ( ox810_flash_acquire_bus() ) ++ BUG(); ++ + for (i = 0; i < len; i++) + buf[i] = readb(chip->IO_ADDR_R); +- hipox_smc_release_pci_ad_31_0(); ++ ++ ox810_flash_release_bus(); + } + + /** +@@ -175,10 +188,13 @@ + int i; + struct nand_chip *chip = mtd->priv; + +- hipox_smc_request_pci_ad_31_0(); ++ if ( ox810_flash_acquire_bus() ) ++ BUG(); ++ + for (i = 0; i < len; i++) + writeb(buf[i], chip->IO_ADDR_W); +- hipox_smc_release_pci_ad_31_0(); ++ ++ ox810_flash_release_bus(); + } + + /** +@@ -195,7 +211,9 @@ + int ret = 0; + struct nand_chip *chip = mtd->priv; + +- hipox_smc_request_pci_ad_31_0(); ++ if ( ox810_flash_acquire_bus() ) ++ BUG(); ++ + for (i = 0; i < len; i++) + { + if (buf[i] != readb(chip->IO_ADDR_R)) +@@ -204,7 +222,8 @@ + break; + } + } +- hipox_smc_release_pci_ad_31_0(); ++ ++ ox810_flash_release_bus(); + + return ret; + } +diff -Nurd linux-2.6.24.orig//include/asm-arm/arch-hipox/smc.h linux-2.6.24/include/asm-arm/arch-hipox/smc.h +--- linux-2.6.24.orig//include/asm-arm/arch-hipox/smc.h 2011-06-15 08:54:17.548796712 +0200 ++++ linux-2.6.24/include/asm-arm/arch-hipox/smc.h 2011-06-15 09:01:21.333880081 +0200 +@@ -15,14 +15,43 @@ + */ + extern struct mutex hipox_flash_mutex; + ++ ++/* Low level PCI BUS semaphore acquisition ++ * ++ * This handler will claim the linux semaphore and the PCI bus semaphore ++ * for the caller's ID. ++ * ++ * Returns 0 if the claim was successful and both semaphores are held; !=0 otherwise. ++ * */ ++int ox810_pci_acquire_bus( void ); ++int ox810_flash_acquire_bus( void ); ++ ++/* Low level PCI BUS semaphore release ++ * ++ * Returns 0 if release was successful, !=0 otherwise. ++ */ ++int ox810_pci_release_bus( void ); ++int ox810_flash_release_bus( void ); ++ + /* +- * Request PCI_ARB to grant access to the STATIC core. ++ * PCI Driver bus semaphore registration / deregistration. ++ * This is used by the PCI driver which implements the low level bus semaphore logic: ++ * - int acquire (void * context, uint32_t owner): ++ * acquire the semaphore for an owner ID. Returns 0 if successful, ++ * !=0 otherwise. ++ * - int release (void * context): ++ * release the bus semaphore. There will be no owner check of the ++ * semaphore. Returns 0 if successful, !=0 otherwise. ++ * ++ * Deregistration must be done by the PCI driver upon unloading. + */ +-void hipox_smc_request_pci_ad_31_0(void); ++void ox810_pci_register_semaphore_callbacks( int (*acquire)(void*, uint32_t), int (*release)(void*), void * ctx ); ++void ox810_pci_reset_semaphore_callbacks( void ); + + /* +- * Release access to PCI bus. ++ * LEGACY interface. Will print ugly error messages if used. Do not use. Use ox810_flash_[release|request]_bus() instead. + */ +-void hipox_smc_release_pci_ad_31_0(void); ++void hipox_smc_release_pci_ad_31_0( void ); ++void hipox_smc_request_pci_ad_31_0( void ); + + #endif // __ASM_ARCH_SMC_H diff --git a/recipes/linux/linux-2.6.24/hipox/ox810-pci-read-config-fix.patch b/recipes/linux/linux-2.6.24/hipox/ox810-pci-read-config-fix.patch new file mode 100644 index 0000000000..99042ef1ae --- /dev/null +++ b/recipes/linux/linux-2.6.24/hipox/ox810-pci-read-config-fix.patch @@ -0,0 +1,17 @@ +--- linux-2.6.24-orig/arch/arm/mach-hipox/pci.c 2011-03-31 16:56:17.968638003 +0200 ++++ linux-2.6.24/arch/arm/mach-hipox/pci.c 2011-03-31 17:06:21.198638000 +0200 +@@ -311,12 +311,12 @@ + switch (size) { + case 1: + // printk(KERN_DEBUG "PCI: readb( 0x%lx )\n", PCI_CONFIG_IO_READ_DATA ); +- *value>>=(where&3); ++ *value >>= ( (where & 3) * 8); + *value&=0x000000ff; + break; + case 2: + // printk(KERN_DEBUG "PCI: readw( 0x%lx )\n", PCI_CONFIG_IO_READ_DATA ); +- *value>>=(where&2); ++ *value >>= ( (where & 2) * 8); + *value&=0x0000ffff; + break; + case 4: diff --git a/recipes/linux/linux-2.6.24/make-3.82.patch b/recipes/linux/linux-2.6.24/make-3.82.patch new file mode 100644 index 0000000000..99896d9f4c --- /dev/null +++ b/recipes/linux/linux-2.6.24/make-3.82.patch @@ -0,0 +1,29 @@ +diff -Nurd linux-2.6.24.orig//Makefile linux-2.6.24/Makefile +--- linux-2.6.24.orig//Makefile 2011-03-29 07:56:05.122449521 +0200 ++++ linux-2.6.24/Makefile 2011-03-29 07:57:48.726768621 +0200 +@@ -431,7 +431,11 @@ + include $(srctree)/arch/$(SRCARCH)/Makefile + export KBUILD_DEFCONFIG + +-config %config: scripts_basic outputmakefile FORCE ++config: scripts_basic outputmakefile FORCE ++ $(Q)mkdir -p include/linux include/config ++ $(Q)$(MAKE) $(build)=scripts/kconfig $@ ++ ++%config: scripts_basic outputmakefile FORCE + $(Q)mkdir -p include/linux include/config + $(Q)$(MAKE) $(build)=scripts/kconfig $@ + +@@ -1500,7 +1504,11 @@ + $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) + + # Modules +-/ %/: prepare scripts FORCE ++/: prepare scripts FORCE ++ $(cmd_crmodverdir) ++ $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ ++ $(build)=$(build-dir) ++%/: prepare scripts FORCE + $(cmd_crmodverdir) + $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \ + $(build)=$(build-dir) diff --git a/recipes/linux/linux-2.6.31/pcm043/0001-mxcv2-nand-driver.patch b/recipes/linux/linux-2.6.31/pcm043/0001-mxcv2-nand-driver.patch new file mode 100644 index 0000000000..fbbf023fcb --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0001-mxcv2-nand-driver.patch @@ -0,0 +1,1130 @@ +From cd56a2552db22ae5464b68074ad35bf0700bb790 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 4 Jun 2009 11:26:22 +0200 +Subject: [PATCH 01/15] mxcv2 nand driver + +Signed-off-by: Sascha Hauer + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + drivers/mtd/nand/Kconfig | 7 + drivers/mtd/nand/Makefile | 1 + drivers/mtd/nand/mxc_nand_v2.c | 1079 +++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 1087 insertions(+) + create mode 100644 drivers/mtd/nand/mxc_nand_v2.c + +Index: drivers/mtd/nand/Kconfig +=================================================================== +--- drivers/mtd/nand/Kconfig.orig 2009-12-08 10:02:55.061888995 +0100 ++++ drivers/mtd/nand/Kconfig 2009-12-08 10:02:59.468654404 +0100 +@@ -426,6 +426,13 @@ + This enables the driver for the NAND flash controller on the + MXC processors. + ++config MTD_NAND_MXC_V2 ++ tristate "MXC NAND support" ++ depends on ARCH_MX25 ++ help ++ This enables the driver for the NAND flash controller on the ++ MXC processors. ++ + config MTD_NAND_SH_FLCTL + tristate "Support for NAND on Renesas SuperH FLCTL" + depends on MTD_NAND && SUPERH && CPU_SUBTYPE_SH7723 +Index: drivers/mtd/nand/Makefile +=================================================================== +--- drivers/mtd/nand/Makefile.orig 2009-12-08 10:02:55.079723657 +0100 ++++ drivers/mtd/nand/Makefile 2009-12-08 10:02:59.468654404 +0100 +@@ -38,6 +38,7 @@ + obj-$(CONFIG_MTD_NAND_FSL_UPM) += fsl_upm.o + obj-$(CONFIG_MTD_NAND_SH_FLCTL) += sh_flctl.o + obj-$(CONFIG_MTD_NAND_MXC) += mxc_nand.o ++obj-$(CONFIG_MTD_NAND_MXC_V2) += mxc_nand_v2.o + obj-$(CONFIG_MTD_NAND_SOCRATES) += socrates_nand.o + obj-$(CONFIG_MTD_NAND_TXX9NDFMC) += txx9ndfmc.o + +Index: drivers/mtd/nand/mxc_nand_v2.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ drivers/mtd/nand/mxc_nand_v2.c 2009-12-08 10:02:59.468654404 +0100 +@@ -0,0 +1,1079 @@ ++/* ++ * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved. ++ * Copyright 2009 Sascha Hauer, kernel@pengutronix.de ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, ++ * MA 02110-1301, USA. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#define NFC_SET_RBA 0xe04 ++#define NFC_FLASH_ADDR 0xe06 ++#define NFC_FLASH_CMD 0xe08 ++#define NFC_BLS 0xe0a ++#define NFC_ECC_STATUS_RESULT 0xe0c ++#define NFC_V21_SPAS 0xe10 ++#define NFC_WR_PROT 0xe12 ++ ++#define NFC_CONFIG1 0xe1a ++#define NFC_CONFIG2 0xe1c ++ ++#define NFC_V21_UNLOCKSTART_BLKADDR 0xe20 ++#define NFC_V21_UNLOCKEND_BLKADDR 0xe22 ++#define NFC_V1_UNLOCKSTART_BLKADDR 0xe14 ++#define NFC_V1_UNLOCKEND_BLKADDR 0xe16 ++ ++#define nfc_is_v21() cpu_is_mx25() ++#define nfc_is_v2x() cpu_is_mx31() ++ ++#define NFC_ECC_EN (1 << 3) ++ ++#define NFC_WPC_UNLOCK (1 << 2) ++ ++#define NFC_CMD (1 << 0) ++#define NFC_ADDR (1 << 1) ++#define NFC_INPUT (1 << 2) ++#define NFC_OUTPUT (1 << 3) ++#define NFC_ID (1 << 4) ++#define NFC_STATUS (1 << 5) ++ ++#define NFC_RBA_SHIFT 4 ++ ++#define NFC_INT (1 << 15) ++ ++#define NFC_BLS_RESET (3 << 16) ++#define NFC_V2_BLS_UNLOCKED 2 ++ ++#define NFC_V2_SP_EN (1 << 2) ++ ++#define NFC_INT_MSK (1 << 4) ++ ++#define NFMS_NF_DWIDTH 0 ++#define NFMS_NF_PG_SZ 1 ++#define NFC_SPAS_WIDTH 8 ++#define NFC_SPAS_SHIFT 16 ++ ++#define NFC_V21_SPAS_SHIFT (0) ++#define NFC_V21_SPAS_MASK (0xFF00) ++ ++struct mxc_nand_host { ++ struct mtd_info mtd; ++ struct nand_chip nand; ++ struct mtd_partition *parts; ++ struct device *dev; ++ ++ int version; ++ void *spare0; ++ int spare_len; ++ int spare_size; ++ void *main_area0; ++ void *main_area1; ++ void __iomem *base; ++ void __iomem *regs; ++ ++ int status_request; ++ ++ unsigned int buf_start; ++ ++ wait_queue_head_t irq_waitq; ++ int g_page_mask; ++ ++ struct clk *clk; ++ int clk_enabled; ++ ++ uint8_t *data_buf; ++ ++ int irq; ++}; ++ ++/* Define delays in microsec for NAND device operations */ ++#define TROP_US_DELAY 2000 ++ ++/* ++ * OOB placement block for use with hardware ecc generation ++ */ ++static struct nand_ecclayout nand_hw_eccoob_512 = { ++ .eccbytes = 9, ++ .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15}, ++ .oobavail = 4, ++ .oobfree = {{0, 4}} ++}; ++ ++static struct nand_ecclayout nand_hw_eccoob_2k = { ++ .eccbytes = 9, ++ .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15}, ++ .oobavail = 4, ++ .oobfree = {{2, 4}} ++}; ++ ++static struct nand_ecclayout nand_hw_eccoob_4k = { ++ .eccbytes = 9, ++ .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15}, ++ .oobavail = 4, ++ .oobfree = {{2, 4}} ++}; ++ ++#ifdef CONFIG_MTD_PARTITIONS ++static const char *part_probes[] = { "RedBoot", "cmdlinepart", NULL }; ++#endif ++ ++static irqreturn_t mxc_nfc_irq(int irq, void *dev_id) ++{ ++ struct mxc_nand_host *host = dev_id; ++ ++ uint16_t tmp; ++ ++ tmp = readw(host->regs + NFC_CONFIG1); ++ tmp |= NFC_INT_MSK; /* Disable interrupt */ ++ writew(tmp, host->regs + NFC_CONFIG1); ++ ++ wake_up(&host->irq_waitq); ++ ++ return IRQ_HANDLED; ++} ++ ++/* This function polls the NANDFC to wait for the basic operation to ++ * complete by checking the INT bit of config2 register. ++ */ ++static void wait_op_done(struct mxc_nand_host *host, int max_retries, ++ int useirq) ++{ ++ uint32_t tmp; ++ ++ if (useirq) { ++ if ((readw(host->regs + NFC_CONFIG2) & NFC_INT) == 0) { ++ ++ tmp = readw(host->regs + NFC_CONFIG1); ++ tmp &= ~NFC_INT_MSK; /* Enable interrupt */ ++ writew(tmp, host->regs + NFC_CONFIG1); ++ ++ wait_event(host->irq_waitq, ++ readw(host->regs + NFC_CONFIG2) & NFC_INT); ++ ++ tmp = readw(host->regs + NFC_CONFIG2); ++ tmp &= ~NFC_INT; ++ writew(tmp, host->regs + NFC_CONFIG2); ++ } ++ } else { ++ while (max_retries-- > 0) { ++ if (readw(host->regs + NFC_CONFIG2) & NFC_INT) { ++ tmp = readw(host->regs + NFC_CONFIG2); ++ tmp &= ~NFC_INT; ++ writew(tmp, host->regs + NFC_CONFIG2); ++ break; ++ } ++ udelay(1); ++ } ++ if (max_retries <= 0) { ++ printk("%s timed out: 0x%04x\n", __func__, readw(host->regs + NFC_CONFIG2)); ++ BUG(); ++ } ++ } ++} ++ ++/* This function issues the specified command to the NAND device and ++ * waits for completion. */ ++static void send_cmd(struct mxc_nand_host *host, uint16_t cmd, int useirq) ++{ ++ DEBUG(MTD_DEBUG_LEVEL3, "send_cmd(host, 0x%x, %d)\n", cmd, useirq); ++ ++ writew(cmd, host->regs + NFC_FLASH_CMD); ++ writew(NFC_CMD, host->regs + NFC_CONFIG2); ++ ++ /* Wait for operation to complete */ ++ wait_op_done(host, TROP_US_DELAY, useirq); ++} ++ ++/* ++ * This function sends an address (or partial address) to the ++ * NAND device. The address is used to select the source/destination for ++ * a NAND command. ++ */ ++static void send_addr(struct mxc_nand_host *host, u16 addr) ++{ ++ DEBUG(MTD_DEBUG_LEVEL3, "send_addr(0x%x)\n", addr); ++ ++ writew(addr, host->regs + NFC_FLASH_ADDR); ++ writew(NFC_ADDR, host->regs + NFC_CONFIG2); ++ ++ /* Wait for operation to complete */ ++ wait_op_done(host, TROP_US_DELAY, 0); ++} ++ ++/* ++ * This function requests the NFC to initate the transfer ++ * of data currently in the NFC RAM buffer to the NAND device. ++ * ++ */ ++static void send_page(struct mtd_info *mtd, unsigned int ops) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ int bufs, i; ++ ++ if (nfc_is_v2x() && mtd->writesize > 512) ++ bufs = 4; ++ else ++ bufs = 1; ++ ++ for (i = 0; i < bufs; i++) { ++ ++ /* set ram buffer id */ ++ writew(i, host->regs + NFC_SET_RBA); ++ ++ /* transfer data from NFC ram to nand */ ++ writew(ops, host->regs + NFC_CONFIG2); ++ ++ /* Wait for operation to complete */ ++ wait_op_done(host, TROP_US_DELAY, false); ++ } ++} ++ ++/* This function requests the NANDFC to perform a read of the ++ * NAND device status and returns the current status. */ ++static uint16_t get_dev_status(struct mxc_nand_host *host) ++{ ++ uint16_t ret; ++ ++ /* Set ram buffer id */ ++ writew(1, host->regs + NFC_SET_RBA); ++ ++ /* Read status into main buffer */ ++ writew(NFC_STATUS, host->regs + NFC_CONFIG2); ++ ++ /* Wait for operation to complete */ ++ wait_op_done(host, TROP_US_DELAY, true); ++ ++ /* Status is placed in first word of main buffer */ ++ /* get status, then recovery area 1 data */ ++ ret = readw(host->main_area1); ++ ++ return ret; ++} ++ ++static void mxc_nand_hwecc(struct mxc_nand_host *host, int on) ++{ ++ unsigned int tmp; ++ ++ tmp = readw(host->regs + NFC_CONFIG1); ++ ++ if (on) ++ tmp |= NFC_ECC_EN; ++ else ++ tmp &= ~NFC_ECC_EN; ++ ++ writew(tmp, host->regs + NFC_CONFIG1); ++} ++ ++static void mxc_nand_enable_hwecc(struct mtd_info *mtd, int mode) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ ++ mxc_nand_hwecc(host, 1); ++ return; ++} ++ ++/* ++ * Function to correct the detected errors. This NFC corrects all the errors ++ * detected. So this function just return 0. ++ */ ++static int mxc_nand_correct_data(struct mtd_info *mtd, u_char * dat, ++ u_char * read_ecc, u_char * calc_ecc) ++{ ++ return 0; ++} ++ ++/* ++ * Function to calculate the ECC for the data to be stored in the Nand device. ++ * This NFC has a hardware RS(511,503) ECC engine together with the RS ECC ++ * CONTROL blocks are responsible for detection and correction of up to ++ * 8 symbols of 9 bits each in 528 byte page. ++ * So this function is just return 0. ++ */ ++static int mxc_nand_calculate_ecc(struct mtd_info *mtd, const u_char *dat, ++ u_char *ecc_code) ++{ ++ return 0; ++} ++ ++static uint8_t mxc_nand_read_byte(struct mtd_info *mtd) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ uint8_t ret; ++ ++ /* Check for status request */ ++ if (host->status_request) ++ return get_dev_status(host) & 0xff; ++ ++ ret = *(uint8_t *)(host->data_buf + host->buf_start); ++ host->buf_start++; ++ ++ return ret; ++} ++ ++static uint16_t mxc_nand_read_word(struct mtd_info *mtd) ++{ ++ struct nand_chip *nand_chip = mtd->priv; ++ struct mxc_nand_host *host = nand_chip->priv; ++ uint16_t ret; ++ ++ ret = *(uint16_t *)(host->data_buf + host->buf_start); ++ host->buf_start += 2; ++ ++ return ret; ++} ++ ++/* Write data of length len to buffer buf. The data to be ++ * written on NAND Flash is first copied to RAMbuffer. After the Data Input ++ * Operation by the NFC, the data is written to NAND Flash */ ++static void mxc_nand_write_buf(struct mtd_info *mtd, ++ const u_char *buf, int len) ++{ ++ struct nand_chip *nand_chip = mtd->priv; ++ struct mxc_nand_host *host = nand_chip->priv; ++ u16 col = host->buf_start; ++ int n = mtd->oobsize + mtd->writesize - col; ++ ++ n = min(n, len); ++ ++ memcpy(host->data_buf + col, buf, n); ++ ++ host->buf_start += n; ++} ++ ++/* Read the data buffer from the NAND Flash. To read the data from NAND ++ * Flash first the data output cycle is initiated by the NFC, which copies ++ * the data to RAMbuffer. This data of length len is then copied to buffer buf. ++ */ ++static void mxc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) ++{ ++ struct nand_chip *nand_chip = mtd->priv; ++ struct mxc_nand_host *host = nand_chip->priv; ++ u16 col = host->buf_start; ++ int n = mtd->oobsize + mtd->writesize - col; ++ ++ n = min(n, len); ++ ++ memcpy(buf, host->data_buf + col, len); ++ ++ host->buf_start += len; ++} ++ ++/* Used by the upper layer to verify the data in NAND Flash ++ * with the data in the buf. */ ++static int mxc_nand_verify_buf(struct mtd_info *mtd, const uint8_t *buf, ++ int len) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ ++ return memcmp(buf, host->data_buf, len) ? -EFAULT : 0; ++} ++ ++/* This function is used by upper layer for select and ++ * deselect of the NAND chip */ ++static void mxc_nand_select_chip(struct mtd_info *mtd, int chip) ++{ ++ struct nand_chip *nand_chip = mtd->priv; ++ struct mxc_nand_host *host = nand_chip->priv; ++ ++ switch (chip) { ++ case -1: ++ if (host->clk_enabled) { ++ clk_disable(host->clk); ++ host->clk_enabled = 0; ++ } ++ break; ++ case 0 ... 7: ++ if (!host->clk_enabled) { ++ clk_enable(host->clk); ++ host->clk_enabled = 1; ++ } ++ break; ++ ++ default: ++ break; ++ } ++} ++ ++/* ++ * Function to transfer data to/from spare area. ++ */ ++static void copy_spare(struct mtd_info *mtd, bool bfrom) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ u16 i, j; ++ u16 n = mtd->writesize >> 9; ++ u8 *d = host->data_buf + mtd->writesize; ++ u8 *s = host->spare0; ++ u16 t = host->spare_len; ++ ++ j = (mtd->oobsize / n >> 1) << 1; ++ ++ if (bfrom) { ++ for (i = 0; i < n - 1; i++) ++ memcpy(d + i * j, s + i * t, j); ++ ++ /* the last section */ ++ memcpy(d + i * j, s + i * t, mtd->oobsize - i * j); ++ } else { ++ for (i = 0; i < n - 1; i++) ++ memcpy(&s[i * t], &d[i * j], j); ++ ++ /* the last section */ ++ memcpy(&s[i * t], &d[i * j], mtd->oobsize - i * j); ++ } ++} ++ ++#define NFC_V2_ECC_MODE_4 (1 << 0) ++ ++#define NFC_SPAS_16 8 ++#define NFC_SPAS_64 32 ++#define NFC_SPAS_128 64 ++#define NFC_SPAS_218 109 ++#define NFC_IPC_CREQ (1 << 0) ++#define NFC_IPC_ACK (1 << 1) ++ ++/* ++ * Function to perform the address cycles. ++ */ ++static void mxc_do_addr_cycle(struct mtd_info *mtd, int column, int page_addr) ++{ ++ struct nand_chip *nand_chip = mtd->priv; ++ struct mxc_nand_host *host = nand_chip->priv; ++ ++ u32 page_mask = host->g_page_mask; ++ ++ if (column != -1) { ++ send_addr(host, column & 0xFF); ++ if (mtd->writesize == 2048) { ++ /* another col addr cycle for 2k page */ ++ send_addr(host, (column >> 8) & 0xF); ++ } else if (mtd->writesize == 4096) { ++ /* another col addr cycle for 4k page */ ++ send_addr(host, (column >> 8) & 0x1F); ++ } ++ } ++ if (page_addr != -1) { ++ do { ++ send_addr(host, (page_addr & 0xff)); ++ page_mask >>= 8; ++ page_addr >>= 8; ++ } while (page_mask != 0); ++ } ++} ++ ++/* ++ * Function to record the ECC corrected/uncorrected errors resulted ++ * after a page read. This NFC detects and corrects upto to 4 symbols ++ * of 9-bits each. ++ */ ++ ++static int mxc_check_ecc_status(struct mtd_info *mtd) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ u32 ecc_stat, err; ++ int no_subpages = 1; ++ int ret = 0, is_4bit_ecc = 0; ++ u8 ecc_bit_mask, err_limit; ++ ++ if (nfc_is_v21()) { ++ is_4bit_ecc = readw(host->regs + NFC_CONFIG1) & NFC_V2_ECC_MODE_4; ++ ecc_stat = readw(host->regs + NFC_ECC_STATUS_RESULT); ++ } else if (nfc_is_v2x()) { ++ is_4bit_ecc = 1; ++ ecc_stat = readw(host->regs + NFC_ECC_STATUS_RESULT); ++ } else ++ BUG(); ++ ++ ecc_bit_mask = is_4bit_ecc ? 0x7 : 0xf; ++ err_limit = is_4bit_ecc ? 0x4 : 0x8; ++ ++ no_subpages = mtd->writesize >> 9; ++ ++ do { ++ err = ecc_stat & ecc_bit_mask; ++ if (err > err_limit) { ++ mtd->ecc_stats.failed++; ++ printk(KERN_WARNING "uncorrectable RS-ECC Error\n"); ++ return -1; ++ } else { ++ ret += err; ++ } ++ ecc_stat >>= 4; ++ } while (--no_subpages); ++ ++ mtd->ecc_stats.corrected += ret; ++ pr_debug("%d Symbol Correctable RS-ECC Error\n", ret); ++ ++ return ret; ++} ++ ++/* ++ * This function reads byte from the NAND Flash ++ * ++ * @param mtd MTD structure for the NAND Flash ++ * ++ * @return data read from the NAND Flash ++ */ ++static u_char mxc_nand_read_byte16(struct mtd_info *mtd) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ ++ if (host->status_request) ++ return get_dev_status(host) & 0xff; ++ ++ return mxc_nand_read_word(mtd) & 0xff; ++} ++ ++/* Used by the upper layer to write command to NAND Flash for ++ * different operations to be carried out on NAND Flash */ ++static void mxc_nand_command(struct mtd_info *mtd, unsigned command, ++ int column, int page_addr) ++{ ++ struct nand_chip *nand_chip = mtd->priv; ++ struct mxc_nand_host *host = nand_chip->priv; ++ ++ DEBUG(MTD_DEBUG_LEVEL3, ++ "mxc_nand_command (cmd = 0x%x, col = 0x%x, page = 0x%x)\n", ++ command, column, page_addr); ++ ++ /* ++ * Reset command state information ++ */ ++ host->status_request = false; ++ ++ switch (command) { ++ ++ case NAND_CMD_STATUS: ++ host->buf_start = 0; ++ host->status_request = true; ++ ++ send_cmd(host, command, true); ++ mxc_do_addr_cycle(mtd, column, page_addr); ++ break; ++ ++ case NAND_CMD_READOOB: ++ command = NAND_CMD_READ0; ++ /* Fallthrough */ ++ ++ case NAND_CMD_READ0: ++ host->buf_start = column; ++ ++ send_cmd(host, command, false); ++ mxc_do_addr_cycle(mtd, column, page_addr); ++ ++ if (mtd->writesize > 512) ++ /* send read confirm command */ ++ send_cmd(host, NAND_CMD_READSTART, true); ++ ++ send_page(mtd, NFC_OUTPUT); ++ ++ memcpy(host->data_buf, host->main_area0, mtd->writesize); ++ copy_spare(mtd, true); ++ ++ break; ++ ++ case NAND_CMD_SEQIN: ++ ++ /* FIXME: before send SEQIN command for ++ * partial write,We need read one page out. ++ * FSL NFC does not support partial write ++ * It always sends out 512 + ecc + 512 + ecc ... ++ * for large page nand flash. But for small ++ * page nand flash, it did support SPARE ++ * ONLY operation. But to make driver ++ * simple. We take the same as large page,read ++ * whole page out and update. As for MLC nand ++ * NOP(num of operation) = 1. Partial written ++ * on one programed page is not allowed! We ++ * can't limit it on the driver, it need the ++ * upper layer applicaiton take care it ++ */ ++ ++ if (column) ++ mxc_nand_command(mtd, NAND_CMD_READ0, 0, page_addr); ++ ++ host->buf_start = column; ++ send_cmd(host, command, false); ++ mxc_do_addr_cycle(mtd, column, page_addr); ++ break; ++ ++ case NAND_CMD_PAGEPROG: ++ memcpy(host->main_area0, host->data_buf, mtd->writesize); ++ copy_spare(mtd, false); ++ ++ send_page(mtd, NFC_INPUT); ++ ++ send_cmd(host, command, true); ++ mxc_do_addr_cycle(mtd, column, page_addr); ++ break; ++ ++ case NAND_CMD_ERASE1: ++ case NAND_CMD_ERASE2: ++ send_cmd(host, command, false); ++ mxc_do_addr_cycle(mtd, column, page_addr); ++ break; ++ ++ case NAND_CMD_READID: ++ send_cmd(host, command, true); ++ mxc_do_addr_cycle(mtd, column, page_addr); ++ /* Set RBA bits for BUFFER0 */ ++ writew(0, host->regs + NFC_SET_RBA); ++ ++ /* Read ID into main buffer */ ++ writew(NFC_ID, host->regs + NFC_CONFIG2); ++ ++ wait_op_done(host, TROP_US_DELAY, true); ++ host->buf_start = column; ++ memcpy(host->data_buf, host->main_area0, 2048); ++ break; ++ ++ case NAND_CMD_RESET: ++ send_cmd(host, command, true); ++ mxc_do_addr_cycle(mtd, column, page_addr); ++ break; ++ } ++} ++ ++static int mxc_nand_read_oob(struct mtd_info *mtd, ++ struct nand_chip *chip, int page, int sndcmd) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ ++ if (sndcmd) { ++ chip->cmdfunc(mtd, NAND_CMD_READOOB, 0x00, page); ++ sndcmd = 0; ++ } ++ ++ memcpy(chip->oob_poi, host->data_buf + mtd->writesize, mtd->oobsize); ++ ++ return sndcmd; ++} ++ ++static int mxc_nand_read_page(struct mtd_info *mtd, struct nand_chip *chip, ++ uint8_t *buf) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ ++ mxc_check_ecc_status(mtd); ++ ++ memcpy(buf, host->data_buf, mtd->writesize); ++ memcpy(chip->oob_poi, host->data_buf + mtd->writesize, mtd->oobsize); ++ ++ return 0; ++} ++ ++static void mxc_nand_write_page(struct mtd_info *mtd, struct nand_chip *chip, ++ const uint8_t *buf) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ ++ memcpy(host->data_buf, buf, mtd->writesize); ++ memcpy(host->data_buf + mtd->writesize, chip->oob_poi, mtd->oobsize); ++} ++ ++/* Define some generic bad / good block scan pattern which are used ++ * while scanning a device for factory marked good / bad blocks. */ ++static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; ++ ++static struct nand_bbt_descr smallpage_memorybased = { ++ .options = NAND_BBT_SCAN2NDPAGE, ++ .offs = 5, ++ .len = 1, ++ .pattern = scan_ff_pattern ++}; ++ ++static struct nand_bbt_descr largepage_memorybased = { ++ .options = 0, ++ .offs = 0, ++ .len = 2, ++ .pattern = scan_ff_pattern ++}; ++ ++/* Generic flash bbt decriptors ++*/ ++static uint8_t bbt_pattern[] = { 'B', 'b', 't', '0' }; ++static uint8_t mirror_pattern[] = { '1', 't', 'b', 'B' }; ++ ++static struct nand_bbt_descr bbt_main_descr = { ++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE ++ | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP, ++ .offs = 0, ++ .len = 4, ++ .veroffs = 4, ++ .maxblocks = 4, ++ .pattern = bbt_pattern ++}; ++ ++static struct nand_bbt_descr bbt_mirror_descr = { ++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE ++ | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP, ++ .offs = 0, ++ .len = 4, ++ .veroffs = 4, ++ .maxblocks = 4, ++ .pattern = mirror_pattern ++}; ++ ++static void mxc_set_nfms_v21(struct mtd_info *mtd, unsigned int val) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ unsigned int spas, tmp; ++ ++// NFMS |= val; /* FIXME */ ++ ++ if (val & (1 << NFMS_NF_PG_SZ)) { ++ if (mtd->writesize == 2048) ++ spas = NFC_SPAS_64; ++ else if (mtd->writesize == 4096) ++ spas = NFC_SPAS_128; ++ else ++ spas = NFC_SPAS_16; ++ ++ tmp = readw(host->regs + NFC_CONFIG1); ++ tmp |= NFC_V2_ECC_MODE_4; ++ writew(tmp, host->regs + NFC_CONFIG1); ++ ++ tmp = readw(host->regs + NFC_V21_SPAS); ++ tmp &= NFC_V21_SPAS_MASK; ++ tmp |= spas << NFC_V21_SPAS_SHIFT; ++ writew(tmp, host->regs + NFC_V21_SPAS); ++ } ++} ++ ++static void mxc_set_nfms(struct mtd_info *mtd, unsigned int val) ++{ ++ if (nfc_is_v21()) ++ mxc_set_nfms_v21(mtd, val); ++} ++ ++static int mxc_nand_scan_bbt(struct mtd_info *mtd) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ ++ host->g_page_mask = this->pagemask; ++ ++ if (mtd->writesize == 2048) { ++ mxc_set_nfms(mtd, 1 << NFMS_NF_PG_SZ); ++ this->ecc.layout = &nand_hw_eccoob_2k; ++ } else if (mtd->writesize == 4096) { ++ mxc_set_nfms(mtd, 1 << NFMS_NF_PG_SZ); ++ this->ecc.layout = &nand_hw_eccoob_4k; ++ } else { ++ this->ecc.layout = &nand_hw_eccoob_512; ++ } ++ ++ /* propagate ecc.layout to mtd_info */ ++ mtd->ecclayout = this->ecc.layout; ++ ++ /* use flash based bbt */ ++ this->bbt_td = &bbt_main_descr; ++ this->bbt_md = &bbt_mirror_descr; ++ ++ /* update flash based bbt */ ++ this->options |= NAND_USE_FLASH_BBT; ++ ++ if (!this->badblock_pattern) { ++ this->badblock_pattern = (mtd->writesize > 512) ? ++ &largepage_memorybased : &smallpage_memorybased; ++ } ++ ++ /* Build bad block table */ ++ return nand_scan_bbt(mtd, this->badblock_pattern); ++} ++ ++static void unlock_addr(struct mxc_nand_host *host, unsigned int start_addr, unsigned int end_addr) ++{ ++ if (nfc_is_v21()) { ++ writew(start_addr, host->regs + NFC_V21_UNLOCKSTART_BLKADDR); ++ writew(end_addr, host->regs + NFC_V21_UNLOCKEND_BLKADDR); ++ } else if (nfc_is_v2x()) { ++ writew(start_addr, host->regs + NFC_V1_UNLOCKSTART_BLKADDR); ++ writew(end_addr, host->regs + NFC_V1_UNLOCKEND_BLKADDR); ++ } else ++ BUG(); ++} ++ ++static int __init mxcnd_probe(struct platform_device *pdev) ++{ ++ struct nand_chip *this; ++ struct mtd_info *mtd; ++ struct mxc_nand_platform_data *pdata = pdev->dev.platform_data; ++ struct mxc_nand_host *host; ++ int nr_parts = 0, err = 0; ++ struct resource *res; ++ ++ /* Allocate memory for MTD device structure and private data */ ++ host = kzalloc(sizeof(*host) + NAND_MAX_PAGESIZE + NAND_MAX_OOBSIZE, GFP_KERNEL); ++ if (!host) ++ return -ENOMEM; ++ ++ host->data_buf = (uint8_t *)(host + 1); ++ ++ host->dev = &pdev->dev; ++ ++ this = &host->nand; ++ mtd = &host->mtd; ++ mtd->priv = this; ++ mtd->owner = THIS_MODULE; ++ mtd->name = "mxc_nand"; ++ ++ this->priv = host; ++ this->cmdfunc = mxc_nand_command; ++ this->select_chip = mxc_nand_select_chip; ++ this->read_byte = mxc_nand_read_byte; ++ this->read_word = mxc_nand_read_word; ++ this->write_buf = mxc_nand_write_buf; ++ this->read_buf = mxc_nand_read_buf; ++ this->verify_buf = mxc_nand_verify_buf; ++ this->scan_bbt = mxc_nand_scan_bbt; ++ ++ host->clk = clk_get(&pdev->dev, "nfc_clk"); ++ if (IS_ERR(host->clk)) { ++ err = PTR_ERR(host->clk); ++ goto eclk; ++ } ++ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!res) { ++ err = -ENODEV; ++ goto eres; ++ } ++ ++ host->base = ioremap(res->start, resource_size(res)); ++ if (!host->base) { ++ err = -EIO; ++ goto eres; ++ } ++ ++ host->main_area0 = host->base; ++ host->main_area1 = host->base + 0x200; ++ ++ if (nfc_is_v21()) { ++ host->regs = host->base + 0x1000; ++ host->spare0 = host->base + 0x1000; ++ host->spare_size = 64 * 8; ++ host->spare_len = 64; ++ } else if (nfc_is_v2x()) { ++ host->regs = host->base; ++ host->spare0 = host->base + 0x800; ++ host->spare_size = 16 * 4; ++ host->spare_len = 16; ++ } else ++ BUG(); ++ ++ /* NAND bus width determines access funtions used by upper layer */ ++ if (pdata->width == 2) { ++ this->read_byte = mxc_nand_read_byte16; ++ this->options |= NAND_BUSWIDTH_16; ++ mxc_set_nfms(mtd, 1 << NFMS_NF_DWIDTH); ++ } ++ ++ init_waitqueue_head(&host->irq_waitq); ++ ++ host->irq = platform_get_irq(pdev, 0); ++ ++ err = request_irq(host->irq, mxc_nfc_irq, 0, "mxc_nd", host); ++ if (err) ++ goto eirq; ++ ++ if (pdata->hw_ecc) { ++ this->ecc.read_page = mxc_nand_read_page; ++ this->ecc.write_page = mxc_nand_write_page; ++ this->ecc.read_oob = mxc_nand_read_oob; ++ this->ecc.layout = &nand_hw_eccoob_512; ++ this->ecc.calculate = mxc_nand_calculate_ecc; ++ this->ecc.hwctl = mxc_nand_enable_hwecc; ++ this->ecc.correct = mxc_nand_correct_data; ++ this->ecc.mode = NAND_ECC_HW; ++ this->ecc.size = 512; ++ this->ecc.bytes = 9; ++ mxc_nand_hwecc(host, 1); ++ } else { ++ this->ecc.mode = NAND_ECC_SOFT; ++ mxc_nand_hwecc(host, 0); ++ } ++ ++ clk_enable(host->clk); ++ ++ /* Disable interrupt */ ++ writew(readw(host->regs + NFC_CONFIG1) | NFC_INT_MSK, host->regs + NFC_CONFIG1); ++ ++ /* disable spare enable */ ++ writew(readw(host->regs + NFC_CONFIG1) & ~NFC_V2_SP_EN, host->regs + NFC_CONFIG1); ++ ++ /* Unlock the internal RAM Buffer */ ++ writew(NFC_V2_BLS_UNLOCKED, host->regs + NFC_BLS); ++ ++ /* Blocks to be unlocked */ ++ unlock_addr(host, 0x0, 0xFFFF); ++ ++ /* Unlock Block Command for given address range */ ++ writew(NFC_WPC_UNLOCK, host->regs + NFC_WR_PROT); ++ ++ clk_disable(host->clk); ++ ++ /* Scan to find existence of the device */ ++ if (nand_scan(mtd, 1)) { ++ DEBUG(MTD_DEBUG_LEVEL0, ++ "MXC_ND2: Unable to find any NAND device.\n"); ++ err = -ENXIO; ++ goto escan; ++ } ++ ++ /* Register the partitions */ ++#ifdef CONFIG_MTD_PARTITIONS ++ nr_parts = ++ parse_mtd_partitions(mtd, part_probes, &host->parts, 0); ++ if (nr_parts > 0) ++ add_mtd_partitions(mtd, host->parts, nr_parts); ++ else ++#endif ++ { ++ pr_info("Registering %s as whole device\n", mtd->name); ++ add_mtd_device(mtd); ++ } ++ ++ platform_set_drvdata(pdev, mtd); ++ ++ return 0; ++ ++escan: ++ free_irq(host->irq, NULL); ++eirq: ++ iounmap(host->regs); ++eres: ++ clk_put(host->clk); ++eclk: ++ kfree(host); ++ ++ return err; ++ ++} ++ ++static int __exit mxcnd_remove(struct platform_device *pdev) ++{ ++ struct mtd_info *mtd = platform_get_drvdata(pdev); ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ ++ clk_disable(host->clk); ++ clk_put(host->clk); ++ platform_set_drvdata(pdev, NULL); ++ ++ nand_release(mtd); ++ free_irq(host->irq, NULL); ++ kfree(host); ++ ++ return 0; ++} ++ ++#ifdef CONFIG_PM ++static int mxcnd_suspend(struct platform_device *pdev, pm_message_t state) ++{ ++ struct mtd_info *mtd = platform_get_drvdata(pdev); ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ int ret = 0; ++ ++ if (mtd) ++ ret = mtd->suspend(mtd); ++ ++ /* Disable the NFC clock */ ++ clk_disable(host->clk); ++ ++ return ret; ++} ++ ++static int mxcnd_resume(struct platform_device *pdev) ++{ ++ struct mtd_info *mtd = platform_get_drvdata(pdev); ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ ++ /* Enable the NFC clock */ ++ clk_enable(host->clk); ++ ++ if (mtd) ++ mtd->resume(mtd); ++ ++ return 0; ++} ++ ++#else ++#define mxcnd_suspend NULL ++#define mxcnd_resume NULL ++#endif /* CONFIG_PM */ ++ ++static struct platform_driver mxcnd_driver = { ++ .driver = { ++ .name = "mxc_nand", ++ }, ++ .probe = mxcnd_probe, ++ .remove = __exit_p(mxcnd_remove), ++ .suspend = mxcnd_suspend, ++ .resume = mxcnd_resume, ++}; ++ ++static int __init mxc_nd_init(void) ++{ ++ /* Register the device driver structure. */ ++ pr_info("MXC MTD nand Driver\n"); ++ if (platform_driver_register(&mxcnd_driver) != 0) { ++ printk(KERN_ERR "Driver register failed for mxcnd_driver\n"); ++ return -ENODEV; ++ } ++ return 0; ++} ++ ++static void __exit mxc_nd_cleanup(void) ++{ ++ /* Unregister the device structure */ ++ platform_driver_unregister(&mxcnd_driver); ++} ++ ++module_init(mxc_nd_init); ++module_exit(mxc_nd_cleanup); ++ ++MODULE_AUTHOR("Freescale Semiconductor, Inc."); ++MODULE_DESCRIPTION("MXC NAND MTD driver"); ++MODULE_LICENSE("GPL"); diff --git a/recipes/linux/linux-2.6.31/pcm043/0001-spi-add-SPI-driver-for-most-known-i.MX-SoCs.patch b/recipes/linux/linux-2.6.31/pcm043/0001-spi-add-SPI-driver-for-most-known-i.MX-SoCs.patch new file mode 100644 index 0000000000..19981d68e0 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0001-spi-add-SPI-driver-for-most-known-i.MX-SoCs.patch @@ -0,0 +1,2337 @@ +From 9cb993fcb56f4033b6336c88e3f45bdd990403cd Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Tue, 22 Sep 2009 16:45:56 -0700 +Subject: [PATCH 01/28] spi: add SPI driver for most known i.MX SoCs + +This driver has been tested on i.MX1/i.MX27/i.MX35 with an AT25 type +EEPROM and on i.MX27/i.MX31 with a Freescale MC13783 PMIC. + +Signed-off-by: Sascha Hauer +Tested-by: Guennadi Liakhovetski +Acked-by: David Brownell +Cc: Andrea Paterniani +Cc: Russell King +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + arch/arm/plat-mxc/include/mach/spi.h | 27 + + drivers/spi/Kconfig | 7 +- + drivers/spi/spi_imx.c | 2060 ++++++++-------------------------- + 3 files changed, 516 insertions(+), 1578 deletions(-) + create mode 100644 arch/arm/plat-mxc/include/mach/spi.h + +diff --git a/arch/arm/plat-mxc/include/mach/spi.h b/arch/arm/plat-mxc/include/mach/spi.h +new file mode 100644 +index 0000000..08be445 +--- /dev/null ++++ b/arch/arm/plat-mxc/include/mach/spi.h +@@ -0,0 +1,27 @@ ++ ++#ifndef __MACH_SPI_H_ ++#define __MACH_SPI_H_ ++ ++/* ++ * struct spi_imx_master - device.platform_data for SPI controller devices. ++ * @chipselect: Array of chipselects for this master. Numbers >= 0 mean gpio ++ * pins, numbers < 0 mean internal CSPI chipselects according ++ * to MXC_SPI_CS(). Normally you want to use gpio based chip ++ * selects as the CSPI module tries to be intelligent about ++ * when to assert the chipselect: The CSPI module deasserts the ++ * chipselect once it runs out of input data. The other problem ++ * is that it is not possible to mix between high active and low ++ * active chipselects on one single bus using the internal ++ * chipselects. Unfortunately Freescale decided to put some ++ * chipselects on dedicated pins which are not usable as gpios, ++ * so we have to support the internal chipselects. ++ * @num_chipselect: ARRAY_SIZE(chipselect) ++ */ ++struct spi_imx_master { ++ int *chipselect; ++ int num_chipselect; ++}; ++ ++#define MXC_SPI_CS(no) ((no) - 32) ++ ++#endif /* __MACH_SPI_H_*/ +diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig +index 2c733c2..885d6c4 100644 +--- a/drivers/spi/Kconfig ++++ b/drivers/spi/Kconfig +@@ -117,10 +117,11 @@ config SPI_GPIO + speed with a custom version of this driver; see the source code. + + config SPI_IMX +- tristate "Freescale iMX SPI controller" +- depends on ARCH_MX1 && EXPERIMENTAL ++ tristate "Freescale i.MX SPI controllers" ++ depends on ARCH_MXC ++ select SPI_BITBANG + help +- This enables using the Freescale iMX SPI controller in master ++ This enables using the Freescale i.MX SPI controllers in master + mode. + + config SPI_LM70_LLP +diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c +index c195e45..89c22ef 100644 +--- a/drivers/spi/spi_imx.c ++++ b/drivers/spi/spi_imx.c +@@ -1,1770 +1,680 @@ + /* +- * drivers/spi/spi_imx.c +- * +- * Copyright (C) 2006 SWAPP +- * Andrea Paterniani +- * +- * Initial version inspired by: +- * linux-2.6.17-rc3-mm1/drivers/spi/pxa2xx_spi.c +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License as published by +- * the Free Software Foundation; either version 2 of the License, or +- * (at your option) any later version. ++ * Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved. ++ * Copyright (C) 2008 Juergen Beisert + * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the ++ * Free Software Foundation ++ * 51 Franklin Street, Fifth Floor ++ * Boston, MA 02110-1301, USA. + */ + ++#include ++#include ++#include ++#include ++#include + #include +-#include +-#include +-#include +-#include + #include ++#include ++#include ++#include ++#include + #include +-#include + #include +-#include +-#include +-#include ++#include ++#include + +-#include +-#include +-#include +- +-#include +-#include +-#include +- +-/*-------------------------------------------------------------------------*/ +-/* SPI Registers offsets from peripheral base address */ +-#define SPI_RXDATA (0x00) +-#define SPI_TXDATA (0x04) +-#define SPI_CONTROL (0x08) +-#define SPI_INT_STATUS (0x0C) +-#define SPI_TEST (0x10) +-#define SPI_PERIOD (0x14) +-#define SPI_DMA (0x18) +-#define SPI_RESET (0x1C) +- +-/* SPI Control Register Bit Fields & Masks */ +-#define SPI_CONTROL_BITCOUNT_MASK (0xF) /* Bit Count Mask */ +-#define SPI_CONTROL_BITCOUNT(n) (((n) - 1) & SPI_CONTROL_BITCOUNT_MASK) +-#define SPI_CONTROL_POL (0x1 << 4) /* Clock Polarity Mask */ +-#define SPI_CONTROL_POL_ACT_HIGH (0x0 << 4) /* Active high pol. (0=idle) */ +-#define SPI_CONTROL_POL_ACT_LOW (0x1 << 4) /* Active low pol. (1=idle) */ +-#define SPI_CONTROL_PHA (0x1 << 5) /* Clock Phase Mask */ +-#define SPI_CONTROL_PHA_0 (0x0 << 5) /* Clock Phase 0 */ +-#define SPI_CONTROL_PHA_1 (0x1 << 5) /* Clock Phase 1 */ +-#define SPI_CONTROL_SSCTL (0x1 << 6) /* /SS Waveform Select Mask */ +-#define SPI_CONTROL_SSCTL_0 (0x0 << 6) /* Master: /SS stays low between SPI burst +- Slave: RXFIFO advanced by BIT_COUNT */ +-#define SPI_CONTROL_SSCTL_1 (0x1 << 6) /* Master: /SS insert pulse between SPI burst +- Slave: RXFIFO advanced by /SS rising edge */ +-#define SPI_CONTROL_SSPOL (0x1 << 7) /* /SS Polarity Select Mask */ +-#define SPI_CONTROL_SSPOL_ACT_LOW (0x0 << 7) /* /SS Active low */ +-#define SPI_CONTROL_SSPOL_ACT_HIGH (0x1 << 7) /* /SS Active high */ +-#define SPI_CONTROL_XCH (0x1 << 8) /* Exchange */ +-#define SPI_CONTROL_SPIEN (0x1 << 9) /* SPI Module Enable */ +-#define SPI_CONTROL_MODE (0x1 << 10) /* SPI Mode Select Mask */ +-#define SPI_CONTROL_MODE_SLAVE (0x0 << 10) /* SPI Mode Slave */ +-#define SPI_CONTROL_MODE_MASTER (0x1 << 10) /* SPI Mode Master */ +-#define SPI_CONTROL_DRCTL (0x3 << 11) /* /SPI_RDY Control Mask */ +-#define SPI_CONTROL_DRCTL_0 (0x0 << 11) /* Ignore /SPI_RDY */ +-#define SPI_CONTROL_DRCTL_1 (0x1 << 11) /* /SPI_RDY falling edge triggers input */ +-#define SPI_CONTROL_DRCTL_2 (0x2 << 11) /* /SPI_RDY active low level triggers input */ +-#define SPI_CONTROL_DATARATE (0x7 << 13) /* Data Rate Mask */ +-#define SPI_PERCLK2_DIV_MIN (0) /* PERCLK2:4 */ +-#define SPI_PERCLK2_DIV_MAX (7) /* PERCLK2:512 */ +-#define SPI_CONTROL_DATARATE_MIN (SPI_PERCLK2_DIV_MAX << 13) +-#define SPI_CONTROL_DATARATE_MAX (SPI_PERCLK2_DIV_MIN << 13) +-#define SPI_CONTROL_DATARATE_BAD (SPI_CONTROL_DATARATE_MIN + 1) +- +-/* SPI Interrupt/Status Register Bit Fields & Masks */ +-#define SPI_STATUS_TE (0x1 << 0) /* TXFIFO Empty Status */ +-#define SPI_STATUS_TH (0x1 << 1) /* TXFIFO Half Status */ +-#define SPI_STATUS_TF (0x1 << 2) /* TXFIFO Full Status */ +-#define SPI_STATUS_RR (0x1 << 3) /* RXFIFO Data Ready Status */ +-#define SPI_STATUS_RH (0x1 << 4) /* RXFIFO Half Status */ +-#define SPI_STATUS_RF (0x1 << 5) /* RXFIFO Full Status */ +-#define SPI_STATUS_RO (0x1 << 6) /* RXFIFO Overflow */ +-#define SPI_STATUS_BO (0x1 << 7) /* Bit Count Overflow */ +-#define SPI_STATUS (0xFF) /* SPI Status Mask */ +-#define SPI_INTEN_TE (0x1 << 8) /* TXFIFO Empty Interrupt Enable */ +-#define SPI_INTEN_TH (0x1 << 9) /* TXFIFO Half Interrupt Enable */ +-#define SPI_INTEN_TF (0x1 << 10) /* TXFIFO Full Interrupt Enable */ +-#define SPI_INTEN_RE (0x1 << 11) /* RXFIFO Data Ready Interrupt Enable */ +-#define SPI_INTEN_RH (0x1 << 12) /* RXFIFO Half Interrupt Enable */ +-#define SPI_INTEN_RF (0x1 << 13) /* RXFIFO Full Interrupt Enable */ +-#define SPI_INTEN_RO (0x1 << 14) /* RXFIFO Overflow Interrupt Enable */ +-#define SPI_INTEN_BO (0x1 << 15) /* Bit Count Overflow Interrupt Enable */ +-#define SPI_INTEN (0xFF << 8) /* SPI Interrupt Enable Mask */ +- +-/* SPI Test Register Bit Fields & Masks */ +-#define SPI_TEST_TXCNT (0xF << 0) /* TXFIFO Counter */ +-#define SPI_TEST_RXCNT_LSB (4) /* RXFIFO Counter LSB */ +-#define SPI_TEST_RXCNT (0xF << 4) /* RXFIFO Counter */ +-#define SPI_TEST_SSTATUS (0xF << 8) /* State Machine Status */ +-#define SPI_TEST_LBC (0x1 << 14) /* Loop Back Control */ +- +-/* SPI Period Register Bit Fields & Masks */ +-#define SPI_PERIOD_WAIT (0x7FFF << 0) /* Wait Between Transactions */ +-#define SPI_PERIOD_MAX_WAIT (0x7FFF) /* Max Wait Between +- Transactions */ +-#define SPI_PERIOD_CSRC (0x1 << 15) /* Period Clock Source Mask */ +-#define SPI_PERIOD_CSRC_BCLK (0x0 << 15) /* Period Clock Source is +- Bit Clock */ +-#define SPI_PERIOD_CSRC_32768 (0x1 << 15) /* Period Clock Source is +- 32.768 KHz Clock */ +- +-/* SPI DMA Register Bit Fields & Masks */ +-#define SPI_DMA_RHDMA (0x1 << 4) /* RXFIFO Half Status */ +-#define SPI_DMA_RFDMA (0x1 << 5) /* RXFIFO Full Status */ +-#define SPI_DMA_TEDMA (0x1 << 6) /* TXFIFO Empty Status */ +-#define SPI_DMA_THDMA (0x1 << 7) /* TXFIFO Half Status */ +-#define SPI_DMA_RHDEN (0x1 << 12) /* RXFIFO Half DMA Request Enable */ +-#define SPI_DMA_RFDEN (0x1 << 13) /* RXFIFO Full DMA Request Enable */ +-#define SPI_DMA_TEDEN (0x1 << 14) /* TXFIFO Empty DMA Request Enable */ +-#define SPI_DMA_THDEN (0x1 << 15) /* TXFIFO Half DMA Request Enable */ +- +-/* SPI Soft Reset Register Bit Fields & Masks */ +-#define SPI_RESET_START (0x1) /* Start */ +- +-/* Default SPI configuration values */ +-#define SPI_DEFAULT_CONTROL \ +-( \ +- SPI_CONTROL_BITCOUNT(16) | \ +- SPI_CONTROL_POL_ACT_HIGH | \ +- SPI_CONTROL_PHA_0 | \ +- SPI_CONTROL_SPIEN | \ +- SPI_CONTROL_SSCTL_1 | \ +- SPI_CONTROL_MODE_MASTER | \ +- SPI_CONTROL_DRCTL_0 | \ +- SPI_CONTROL_DATARATE_MIN \ +-) +-#define SPI_DEFAULT_ENABLE_LOOPBACK (0) +-#define SPI_DEFAULT_ENABLE_DMA (0) +-#define SPI_DEFAULT_PERIOD_WAIT (8) +-/*-------------------------------------------------------------------------*/ +- +- +-/*-------------------------------------------------------------------------*/ +-/* TX/RX SPI FIFO size */ +-#define SPI_FIFO_DEPTH (8) +-#define SPI_FIFO_BYTE_WIDTH (2) +-#define SPI_FIFO_OVERFLOW_MARGIN (2) +- +-/* DMA burst length for half full/empty request trigger */ +-#define SPI_DMA_BLR (SPI_FIFO_DEPTH * SPI_FIFO_BYTE_WIDTH / 2) +- +-/* Dummy char output to achieve reads. +- Choosing something different from all zeroes may help pattern recogition +- for oscilloscope analysis, but may break some drivers. */ +-#define SPI_DUMMY_u8 0 +-#define SPI_DUMMY_u16 ((SPI_DUMMY_u8 << 8) | SPI_DUMMY_u8) +-#define SPI_DUMMY_u32 ((SPI_DUMMY_u16 << 16) | SPI_DUMMY_u16) +- +-/** +- * Macro to change a u32 field: +- * @r : register to edit +- * @m : bit mask +- * @v : new value for the field correctly bit-alligned +-*/ +-#define u32_EDIT(r, m, v) r = (r & ~(m)) | (v) +- +-/* Message state */ +-#define START_STATE ((void*)0) +-#define RUNNING_STATE ((void*)1) +-#define DONE_STATE ((void*)2) +-#define ERROR_STATE ((void*)-1) +- +-/* Queue state */ +-#define QUEUE_RUNNING (0) +-#define QUEUE_STOPPED (1) +- +-#define IS_DMA_ALIGNED(x) (((u32)(x) & 0x03) == 0) +-#define DMA_ALIGNMENT 4 +-/*-------------------------------------------------------------------------*/ +- +- +-/*-------------------------------------------------------------------------*/ +-/* Driver data structs */ +- +-/* Context */ +-struct driver_data { +- /* Driver model hookup */ +- struct platform_device *pdev; +- +- /* SPI framework hookup */ +- struct spi_master *master; ++#include + +- /* IMX hookup */ +- struct spi_imx_master *master_info; +- +- /* Memory resources and SPI regs virtual address */ +- struct resource *ioarea; +- void __iomem *regs; +- +- /* SPI RX_DATA physical address */ +- dma_addr_t rd_data_phys; +- +- /* Driver message queue */ +- struct workqueue_struct *workqueue; +- struct work_struct work; +- spinlock_t lock; +- struct list_head queue; +- int busy; +- int run; +- +- /* Message Transfer pump */ +- struct tasklet_struct pump_transfers; +- +- /* Current message, transfer and state */ +- struct spi_message *cur_msg; +- struct spi_transfer *cur_transfer; +- struct chip_data *cur_chip; +- +- /* Rd / Wr buffers pointers */ +- size_t len; +- void *tx; +- void *tx_end; +- void *rx; +- void *rx_end; +- +- u8 rd_only; +- u8 n_bytes; +- int cs_change; +- +- /* Function pointers */ +- irqreturn_t (*transfer_handler)(struct driver_data *drv_data); +- void (*cs_control)(u32 command); +- +- /* DMA setup */ +- int rx_channel; +- int tx_channel; +- dma_addr_t rx_dma; +- dma_addr_t tx_dma; +- int rx_dma_needs_unmap; +- int tx_dma_needs_unmap; +- size_t tx_map_len; +- u32 dummy_dma_buf ____cacheline_aligned; ++#define DRIVER_NAME "spi_imx" + +- struct clk *clk; +-}; ++#define MXC_CSPIRXDATA 0x00 ++#define MXC_CSPITXDATA 0x04 ++#define MXC_CSPICTRL 0x08 ++#define MXC_CSPIINT 0x0c ++#define MXC_RESET 0x1c + +-/* Runtime state */ +-struct chip_data { +- u32 control; +- u32 period; +- u32 test; ++/* generic defines to abstract from the different register layouts */ ++#define MXC_INT_RR (1 << 0) /* Receive data ready interrupt */ ++#define MXC_INT_TE (1 << 1) /* Transmit FIFO empty interrupt */ + +- u8 enable_dma:1; +- u8 bits_per_word; +- u8 n_bytes; +- u32 max_speed_hz; +- +- void (*cs_control)(u32 command); ++struct spi_imx_config { ++ unsigned int speed_hz; ++ unsigned int bpw; ++ unsigned int mode; ++ int cs; + }; +-/*-------------------------------------------------------------------------*/ +- + +-static void pump_messages(struct work_struct *work); ++struct spi_imx_data { ++ struct spi_bitbang bitbang; + +-static void flush(struct driver_data *drv_data) +-{ +- void __iomem *regs = drv_data->regs; +- u32 control; ++ struct completion xfer_done; ++ void *base; ++ int irq; ++ struct clk *clk; ++ unsigned long spi_clk; ++ int *chipselect; ++ ++ unsigned int count; ++ void (*tx)(struct spi_imx_data *); ++ void (*rx)(struct spi_imx_data *); ++ void *rx_buf; ++ const void *tx_buf; ++ unsigned int txfifo; /* number of words pushed in tx FIFO */ ++ ++ /* SoC specific functions */ ++ void (*intctrl)(struct spi_imx_data *, int); ++ int (*config)(struct spi_imx_data *, struct spi_imx_config *); ++ void (*trigger)(struct spi_imx_data *); ++ int (*rx_available)(struct spi_imx_data *); ++}; + +- dev_dbg(&drv_data->pdev->dev, "flush\n"); ++#define MXC_SPI_BUF_RX(type) \ ++static void spi_imx_buf_rx_##type(struct spi_imx_data *spi_imx) \ ++{ \ ++ unsigned int val = readl(spi_imx->base + MXC_CSPIRXDATA); \ ++ \ ++ if (spi_imx->rx_buf) { \ ++ *(type *)spi_imx->rx_buf = val; \ ++ spi_imx->rx_buf += sizeof(type); \ ++ } \ ++} ++ ++#define MXC_SPI_BUF_TX(type) \ ++static void spi_imx_buf_tx_##type(struct spi_imx_data *spi_imx) \ ++{ \ ++ type val = 0; \ ++ \ ++ if (spi_imx->tx_buf) { \ ++ val = *(type *)spi_imx->tx_buf; \ ++ spi_imx->tx_buf += sizeof(type); \ ++ } \ ++ \ ++ spi_imx->count -= sizeof(type); \ ++ \ ++ writel(val, spi_imx->base + MXC_CSPITXDATA); \ ++} ++ ++MXC_SPI_BUF_RX(u8) ++MXC_SPI_BUF_TX(u8) ++MXC_SPI_BUF_RX(u16) ++MXC_SPI_BUF_TX(u16) ++MXC_SPI_BUF_RX(u32) ++MXC_SPI_BUF_TX(u32) ++ ++/* First entry is reserved, second entry is valid only if SDHC_SPIEN is set ++ * (which is currently not the case in this driver) ++ */ ++static int mxc_clkdivs[] = {0, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, ++ 256, 384, 512, 768, 1024}; + +- /* Wait for end of transaction */ +- do { +- control = readl(regs + SPI_CONTROL); +- } while (control & SPI_CONTROL_XCH); ++/* MX21, MX27 */ ++static unsigned int spi_imx_clkdiv_1(unsigned int fin, ++ unsigned int fspi) ++{ ++ int i, max; + +- /* Release chip select if requested, transfer delays are +- handled in pump_transfers */ +- if (drv_data->cs_change) +- drv_data->cs_control(SPI_CS_DEASSERT); ++ if (cpu_is_mx21()) ++ max = 18; ++ else ++ max = 16; + +- /* Disable SPI to flush FIFOs */ +- writel(control & ~SPI_CONTROL_SPIEN, regs + SPI_CONTROL); +- writel(control, regs + SPI_CONTROL); +-} ++ for (i = 2; i < max; i++) ++ if (fspi * mxc_clkdivs[i] >= fin) ++ return i; + +-static void restore_state(struct driver_data *drv_data) +-{ +- void __iomem *regs = drv_data->regs; +- struct chip_data *chip = drv_data->cur_chip; +- +- /* Load chip registers */ +- dev_dbg(&drv_data->pdev->dev, +- "restore_state\n" +- " test = 0x%08X\n" +- " control = 0x%08X\n", +- chip->test, +- chip->control); +- writel(chip->test, regs + SPI_TEST); +- writel(chip->period, regs + SPI_PERIOD); +- writel(0, regs + SPI_INT_STATUS); +- writel(chip->control, regs + SPI_CONTROL); ++ return max; + } + +-static void null_cs_control(u32 command) ++/* MX1, MX31, MX35 */ ++static unsigned int spi_imx_clkdiv_2(unsigned int fin, ++ unsigned int fspi) + { +-} ++ int i, div = 4; + +-static inline u32 data_to_write(struct driver_data *drv_data) +-{ +- return ((u32)(drv_data->tx_end - drv_data->tx)) / drv_data->n_bytes; +-} ++ for (i = 0; i < 7; i++) { ++ if (fspi * div >= fin) ++ return i; ++ div <<= 1; ++ } + +-static inline u32 data_to_read(struct driver_data *drv_data) +-{ +- return ((u32)(drv_data->rx_end - drv_data->rx)) / drv_data->n_bytes; ++ return 7; + } + +-static int write(struct driver_data *drv_data) +-{ +- void __iomem *regs = drv_data->regs; +- void *tx = drv_data->tx; +- void *tx_end = drv_data->tx_end; +- u8 n_bytes = drv_data->n_bytes; +- u32 remaining_writes; +- u32 fifo_avail_space; +- u32 n; +- u16 d; +- +- /* Compute how many fifo writes to do */ +- remaining_writes = (u32)(tx_end - tx) / n_bytes; +- fifo_avail_space = SPI_FIFO_DEPTH - +- (readl(regs + SPI_TEST) & SPI_TEST_TXCNT); +- if (drv_data->rx && (fifo_avail_space > SPI_FIFO_OVERFLOW_MARGIN)) +- /* Fix misunderstood receive overflow */ +- fifo_avail_space -= SPI_FIFO_OVERFLOW_MARGIN; +- n = min(remaining_writes, fifo_avail_space); +- +- dev_dbg(&drv_data->pdev->dev, +- "write type %s\n" +- " remaining writes = %d\n" +- " fifo avail space = %d\n" +- " fifo writes = %d\n", +- (n_bytes == 1) ? "u8" : "u16", +- remaining_writes, +- fifo_avail_space, +- n); +- +- if (n > 0) { +- /* Fill SPI TXFIFO */ +- if (drv_data->rd_only) { +- tx += n * n_bytes; +- while (n--) +- writel(SPI_DUMMY_u16, regs + SPI_TXDATA); +- } else { +- if (n_bytes == 1) { +- while (n--) { +- d = *(u8*)tx; +- writel(d, regs + SPI_TXDATA); +- tx += 1; +- } +- } else { +- while (n--) { +- d = *(u16*)tx; +- writel(d, regs + SPI_TXDATA); +- tx += 2; +- } +- } +- } +- +- /* Trigger transfer */ +- writel(readl(regs + SPI_CONTROL) | SPI_CONTROL_XCH, +- regs + SPI_CONTROL); ++#define MX31_INTREG_TEEN (1 << 0) ++#define MX31_INTREG_RREN (1 << 3) + +- /* Update tx pointer */ +- drv_data->tx = tx; +- } ++#define MX31_CSPICTRL_ENABLE (1 << 0) ++#define MX31_CSPICTRL_MASTER (1 << 1) ++#define MX31_CSPICTRL_XCH (1 << 2) ++#define MX31_CSPICTRL_POL (1 << 4) ++#define MX31_CSPICTRL_PHA (1 << 5) ++#define MX31_CSPICTRL_SSCTL (1 << 6) ++#define MX31_CSPICTRL_SSPOL (1 << 7) ++#define MX31_CSPICTRL_BC_SHIFT 8 ++#define MX35_CSPICTRL_BL_SHIFT 20 ++#define MX31_CSPICTRL_CS_SHIFT 24 ++#define MX35_CSPICTRL_CS_SHIFT 12 ++#define MX31_CSPICTRL_DR_SHIFT 16 + +- return (tx >= tx_end); +-} ++#define MX31_CSPISTATUS 0x14 ++#define MX31_STATUS_RR (1 << 3) + +-static int read(struct driver_data *drv_data) ++/* These functions also work for the i.MX35, but be aware that ++ * the i.MX35 has a slightly different register layout for bits ++ * we do not use here. ++ */ ++static void mx31_intctrl(struct spi_imx_data *spi_imx, int enable) + { +- void __iomem *regs = drv_data->regs; +- void *rx = drv_data->rx; +- void *rx_end = drv_data->rx_end; +- u8 n_bytes = drv_data->n_bytes; +- u32 remaining_reads; +- u32 fifo_rxcnt; +- u32 n; +- u16 d; +- +- /* Compute how many fifo reads to do */ +- remaining_reads = (u32)(rx_end - rx) / n_bytes; +- fifo_rxcnt = (readl(regs + SPI_TEST) & SPI_TEST_RXCNT) >> +- SPI_TEST_RXCNT_LSB; +- n = min(remaining_reads, fifo_rxcnt); +- +- dev_dbg(&drv_data->pdev->dev, +- "read type %s\n" +- " remaining reads = %d\n" +- " fifo rx count = %d\n" +- " fifo reads = %d\n", +- (n_bytes == 1) ? "u8" : "u16", +- remaining_reads, +- fifo_rxcnt, +- n); +- +- if (n > 0) { +- /* Read SPI RXFIFO */ +- if (n_bytes == 1) { +- while (n--) { +- d = readl(regs + SPI_RXDATA); +- *((u8*)rx) = d; +- rx += 1; +- } +- } else { +- while (n--) { +- d = readl(regs + SPI_RXDATA); +- *((u16*)rx) = d; +- rx += 2; +- } +- } ++ unsigned int val = 0; + +- /* Update rx pointer */ +- drv_data->rx = rx; +- } ++ if (enable & MXC_INT_TE) ++ val |= MX31_INTREG_TEEN; ++ if (enable & MXC_INT_RR) ++ val |= MX31_INTREG_RREN; + +- return (rx >= rx_end); ++ writel(val, spi_imx->base + MXC_CSPIINT); + } + +-static void *next_transfer(struct driver_data *drv_data) ++static void mx31_trigger(struct spi_imx_data *spi_imx) + { +- struct spi_message *msg = drv_data->cur_msg; +- struct spi_transfer *trans = drv_data->cur_transfer; +- +- /* Move to next transfer */ +- if (trans->transfer_list.next != &msg->transfers) { +- drv_data->cur_transfer = +- list_entry(trans->transfer_list.next, +- struct spi_transfer, +- transfer_list); +- return RUNNING_STATE; +- } ++ unsigned int reg; + +- return DONE_STATE; ++ reg = readl(spi_imx->base + MXC_CSPICTRL); ++ reg |= MX31_CSPICTRL_XCH; ++ writel(reg, spi_imx->base + MXC_CSPICTRL); + } + +-static int map_dma_buffers(struct driver_data *drv_data) ++static int mx31_config(struct spi_imx_data *spi_imx, ++ struct spi_imx_config *config) + { +- struct spi_message *msg; +- struct device *dev; +- void *buf; +- +- drv_data->rx_dma_needs_unmap = 0; +- drv_data->tx_dma_needs_unmap = 0; +- +- if (!drv_data->master_info->enable_dma || +- !drv_data->cur_chip->enable_dma) +- return -1; +- +- msg = drv_data->cur_msg; +- dev = &msg->spi->dev; +- if (msg->is_dma_mapped) { +- if (drv_data->tx_dma) +- /* The caller provided at least dma and cpu virtual +- address for write; pump_transfers() will consider the +- transfer as write only if cpu rx virtual address is +- NULL */ +- return 0; +- +- if (drv_data->rx_dma) { +- /* The caller provided dma and cpu virtual address to +- performe read only transfer --> +- use drv_data->dummy_dma_buf for dummy writes to +- achive reads */ +- buf = &drv_data->dummy_dma_buf; +- drv_data->tx_map_len = sizeof(drv_data->dummy_dma_buf); +- drv_data->tx_dma = dma_map_single(dev, +- buf, +- drv_data->tx_map_len, +- DMA_TO_DEVICE); +- if (dma_mapping_error(dev, drv_data->tx_dma)) +- return -1; +- +- drv_data->tx_dma_needs_unmap = 1; +- +- /* Flags transfer as rd_only for pump_transfers() DMA +- regs programming (should be redundant) */ +- drv_data->tx = NULL; +- +- return 0; +- } +- } ++ unsigned int reg = MX31_CSPICTRL_ENABLE | MX31_CSPICTRL_MASTER; + +- if (!IS_DMA_ALIGNED(drv_data->rx) || !IS_DMA_ALIGNED(drv_data->tx)) +- return -1; +- +- if (drv_data->tx == NULL) { +- /* Read only message --> use drv_data->dummy_dma_buf for dummy +- writes to achive reads */ +- buf = &drv_data->dummy_dma_buf; +- drv_data->tx_map_len = sizeof(drv_data->dummy_dma_buf); +- } else { +- buf = drv_data->tx; +- drv_data->tx_map_len = drv_data->len; ++ reg |= spi_imx_clkdiv_2(spi_imx->spi_clk, config->speed_hz) << ++ MX31_CSPICTRL_DR_SHIFT; ++ ++ if (cpu_is_mx31()) ++ reg |= (config->bpw - 1) << MX31_CSPICTRL_BC_SHIFT; ++ else if (cpu_is_mx35()) { ++ reg |= (config->bpw - 1) << MX35_CSPICTRL_BL_SHIFT; ++ reg |= MX31_CSPICTRL_SSCTL; + } +- drv_data->tx_dma = dma_map_single(dev, +- buf, +- drv_data->tx_map_len, +- DMA_TO_DEVICE); +- if (dma_mapping_error(dev, drv_data->tx_dma)) +- return -1; +- drv_data->tx_dma_needs_unmap = 1; +- +- /* NULL rx means write-only transfer and no map needed +- * since rx DMA will not be used */ +- if (drv_data->rx) { +- buf = drv_data->rx; +- drv_data->rx_dma = dma_map_single(dev, +- buf, +- drv_data->len, +- DMA_FROM_DEVICE); +- if (dma_mapping_error(dev, drv_data->rx_dma)) { +- if (drv_data->tx_dma) { +- dma_unmap_single(dev, +- drv_data->tx_dma, +- drv_data->tx_map_len, +- DMA_TO_DEVICE); +- drv_data->tx_dma_needs_unmap = 0; +- } +- return -1; +- } +- drv_data->rx_dma_needs_unmap = 1; ++ ++ if (config->mode & SPI_CPHA) ++ reg |= MX31_CSPICTRL_PHA; ++ if (config->mode & SPI_CPOL) ++ reg |= MX31_CSPICTRL_POL; ++ if (config->mode & SPI_CS_HIGH) ++ reg |= MX31_CSPICTRL_SSPOL; ++ if (config->cs < 0) { ++ if (cpu_is_mx31()) ++ reg |= (config->cs + 32) << MX31_CSPICTRL_CS_SHIFT; ++ else if (cpu_is_mx35()) ++ reg |= (config->cs + 32) << MX35_CSPICTRL_CS_SHIFT; + } + ++ writel(reg, spi_imx->base + MXC_CSPICTRL); ++ + return 0; + } + +-static void unmap_dma_buffers(struct driver_data *drv_data) ++static int mx31_rx_available(struct spi_imx_data *spi_imx) + { +- struct spi_message *msg = drv_data->cur_msg; +- struct device *dev = &msg->spi->dev; +- +- if (drv_data->rx_dma_needs_unmap) { +- dma_unmap_single(dev, +- drv_data->rx_dma, +- drv_data->len, +- DMA_FROM_DEVICE); +- drv_data->rx_dma_needs_unmap = 0; +- } +- if (drv_data->tx_dma_needs_unmap) { +- dma_unmap_single(dev, +- drv_data->tx_dma, +- drv_data->tx_map_len, +- DMA_TO_DEVICE); +- drv_data->tx_dma_needs_unmap = 0; +- } ++ return readl(spi_imx->base + MX31_CSPISTATUS) & MX31_STATUS_RR; + } + +-/* Caller already set message->status (dma is already blocked) */ +-static void giveback(struct spi_message *message, struct driver_data *drv_data) +-{ +- void __iomem *regs = drv_data->regs; +- +- /* Bring SPI to sleep; restore_state() and pump_transfer() +- will do new setup */ +- writel(0, regs + SPI_INT_STATUS); +- writel(0, regs + SPI_DMA); +- +- /* Unconditioned deselct */ +- drv_data->cs_control(SPI_CS_DEASSERT); ++#define MX27_INTREG_RR (1 << 4) ++#define MX27_INTREG_TEEN (1 << 9) ++#define MX27_INTREG_RREN (1 << 13) + +- message->state = NULL; +- if (message->complete) +- message->complete(message->context); ++#define MX27_CSPICTRL_POL (1 << 5) ++#define MX27_CSPICTRL_PHA (1 << 6) ++#define MX27_CSPICTRL_SSPOL (1 << 8) ++#define MX27_CSPICTRL_XCH (1 << 9) ++#define MX27_CSPICTRL_ENABLE (1 << 10) ++#define MX27_CSPICTRL_MASTER (1 << 11) ++#define MX27_CSPICTRL_DR_SHIFT 14 ++#define MX27_CSPICTRL_CS_SHIFT 19 + +- drv_data->cur_msg = NULL; +- drv_data->cur_transfer = NULL; +- drv_data->cur_chip = NULL; +- queue_work(drv_data->workqueue, &drv_data->work); +-} +- +-static void dma_err_handler(int channel, void *data, int errcode) ++static void mx27_intctrl(struct spi_imx_data *spi_imx, int enable) + { +- struct driver_data *drv_data = data; +- struct spi_message *msg = drv_data->cur_msg; +- +- dev_dbg(&drv_data->pdev->dev, "dma_err_handler\n"); +- +- /* Disable both rx and tx dma channels */ +- imx_dma_disable(drv_data->rx_channel); +- imx_dma_disable(drv_data->tx_channel); +- unmap_dma_buffers(drv_data); ++ unsigned int val = 0; + +- flush(drv_data); ++ if (enable & MXC_INT_TE) ++ val |= MX27_INTREG_TEEN; ++ if (enable & MXC_INT_RR) ++ val |= MX27_INTREG_RREN; + +- msg->state = ERROR_STATE; +- tasklet_schedule(&drv_data->pump_transfers); ++ writel(val, spi_imx->base + MXC_CSPIINT); + } + +-static void dma_tx_handler(int channel, void *data) ++static void mx27_trigger(struct spi_imx_data *spi_imx) + { +- struct driver_data *drv_data = data; ++ unsigned int reg; + +- dev_dbg(&drv_data->pdev->dev, "dma_tx_handler\n"); +- +- imx_dma_disable(channel); +- +- /* Now waits for TX FIFO empty */ +- writel(SPI_INTEN_TE, drv_data->regs + SPI_INT_STATUS); ++ reg = readl(spi_imx->base + MXC_CSPICTRL); ++ reg |= MX27_CSPICTRL_XCH; ++ writel(reg, spi_imx->base + MXC_CSPICTRL); + } + +-static irqreturn_t dma_transfer(struct driver_data *drv_data) ++static int mx27_config(struct spi_imx_data *spi_imx, ++ struct spi_imx_config *config) + { +- u32 status; +- struct spi_message *msg = drv_data->cur_msg; +- void __iomem *regs = drv_data->regs; +- +- status = readl(regs + SPI_INT_STATUS); ++ unsigned int reg = MX27_CSPICTRL_ENABLE | MX27_CSPICTRL_MASTER; + +- if ((status & (SPI_INTEN_RO | SPI_STATUS_RO)) +- == (SPI_INTEN_RO | SPI_STATUS_RO)) { +- writel(status & ~SPI_INTEN, regs + SPI_INT_STATUS); ++ reg |= spi_imx_clkdiv_1(spi_imx->spi_clk, config->speed_hz) << ++ MX27_CSPICTRL_DR_SHIFT; ++ reg |= config->bpw - 1; + +- imx_dma_disable(drv_data->tx_channel); +- imx_dma_disable(drv_data->rx_channel); +- unmap_dma_buffers(drv_data); ++ if (config->mode & SPI_CPHA) ++ reg |= MX27_CSPICTRL_PHA; ++ if (config->mode & SPI_CPOL) ++ reg |= MX27_CSPICTRL_POL; ++ if (config->mode & SPI_CS_HIGH) ++ reg |= MX27_CSPICTRL_SSPOL; ++ if (config->cs < 0) ++ reg |= (config->cs + 32) << MX27_CSPICTRL_CS_SHIFT; + +- flush(drv_data); ++ writel(reg, spi_imx->base + MXC_CSPICTRL); + +- dev_warn(&drv_data->pdev->dev, +- "dma_transfer - fifo overun\n"); +- +- msg->state = ERROR_STATE; +- tasklet_schedule(&drv_data->pump_transfers); +- +- return IRQ_HANDLED; +- } +- +- if (status & SPI_STATUS_TE) { +- writel(status & ~SPI_INTEN_TE, regs + SPI_INT_STATUS); +- +- if (drv_data->rx) { +- /* Wait end of transfer before read trailing data */ +- while (readl(regs + SPI_CONTROL) & SPI_CONTROL_XCH) +- cpu_relax(); +- +- imx_dma_disable(drv_data->rx_channel); +- unmap_dma_buffers(drv_data); +- +- /* Release chip select if requested, transfer delays are +- handled in pump_transfers() */ +- if (drv_data->cs_change) +- drv_data->cs_control(SPI_CS_DEASSERT); +- +- /* Calculate number of trailing data and read them */ +- dev_dbg(&drv_data->pdev->dev, +- "dma_transfer - test = 0x%08X\n", +- readl(regs + SPI_TEST)); +- drv_data->rx = drv_data->rx_end - +- ((readl(regs + SPI_TEST) & +- SPI_TEST_RXCNT) >> +- SPI_TEST_RXCNT_LSB)*drv_data->n_bytes; +- read(drv_data); +- } else { +- /* Write only transfer */ +- unmap_dma_buffers(drv_data); +- +- flush(drv_data); +- } +- +- /* End of transfer, update total byte transfered */ +- msg->actual_length += drv_data->len; +- +- /* Move to next transfer */ +- msg->state = next_transfer(drv_data); +- +- /* Schedule transfer tasklet */ +- tasklet_schedule(&drv_data->pump_transfers); +- +- return IRQ_HANDLED; +- } +- +- /* Opps problem detected */ +- return IRQ_NONE; ++ return 0; + } + +-static irqreturn_t interrupt_wronly_transfer(struct driver_data *drv_data) ++static int mx27_rx_available(struct spi_imx_data *spi_imx) + { +- struct spi_message *msg = drv_data->cur_msg; +- void __iomem *regs = drv_data->regs; +- u32 status; +- irqreturn_t handled = IRQ_NONE; +- +- status = readl(regs + SPI_INT_STATUS); +- +- if (status & SPI_INTEN_TE) { +- /* TXFIFO Empty Interrupt on the last transfered word */ +- writel(status & ~SPI_INTEN, regs + SPI_INT_STATUS); +- dev_dbg(&drv_data->pdev->dev, +- "interrupt_wronly_transfer - end of tx\n"); +- +- flush(drv_data); ++ return readl(spi_imx->base + MXC_CSPIINT) & MX27_INTREG_RR; ++} + +- /* Update total byte transfered */ +- msg->actual_length += drv_data->len; ++#define MX1_INTREG_RR (1 << 3) ++#define MX1_INTREG_TEEN (1 << 8) ++#define MX1_INTREG_RREN (1 << 11) + +- /* Move to next transfer */ +- msg->state = next_transfer(drv_data); ++#define MX1_CSPICTRL_POL (1 << 4) ++#define MX1_CSPICTRL_PHA (1 << 5) ++#define MX1_CSPICTRL_XCH (1 << 8) ++#define MX1_CSPICTRL_ENABLE (1 << 9) ++#define MX1_CSPICTRL_MASTER (1 << 10) ++#define MX1_CSPICTRL_DR_SHIFT 13 + +- /* Schedule transfer tasklet */ +- tasklet_schedule(&drv_data->pump_transfers); ++static void mx1_intctrl(struct spi_imx_data *spi_imx, int enable) ++{ ++ unsigned int val = 0; + +- return IRQ_HANDLED; +- } else { +- while (status & SPI_STATUS_TH) { +- dev_dbg(&drv_data->pdev->dev, +- "interrupt_wronly_transfer - status = 0x%08X\n", +- status); +- +- /* Pump data */ +- if (write(drv_data)) { +- /* End of TXFIFO writes, +- now wait until TXFIFO is empty */ +- writel(SPI_INTEN_TE, regs + SPI_INT_STATUS); +- return IRQ_HANDLED; +- } +- +- status = readl(regs + SPI_INT_STATUS); +- +- /* We did something */ +- handled = IRQ_HANDLED; +- } +- } ++ if (enable & MXC_INT_TE) ++ val |= MX1_INTREG_TEEN; ++ if (enable & MXC_INT_RR) ++ val |= MX1_INTREG_RREN; + +- return handled; ++ writel(val, spi_imx->base + MXC_CSPIINT); + } + +-static irqreturn_t interrupt_transfer(struct driver_data *drv_data) ++static void mx1_trigger(struct spi_imx_data *spi_imx) + { +- struct spi_message *msg = drv_data->cur_msg; +- void __iomem *regs = drv_data->regs; +- u32 status, control; +- irqreturn_t handled = IRQ_NONE; +- unsigned long limit; +- +- status = readl(regs + SPI_INT_STATUS); +- +- if (status & SPI_INTEN_TE) { +- /* TXFIFO Empty Interrupt on the last transfered word */ +- writel(status & ~SPI_INTEN, regs + SPI_INT_STATUS); +- dev_dbg(&drv_data->pdev->dev, +- "interrupt_transfer - end of tx\n"); +- +- if (msg->state == ERROR_STATE) { +- /* RXFIFO overrun was detected and message aborted */ +- flush(drv_data); +- } else { +- /* Wait for end of transaction */ +- do { +- control = readl(regs + SPI_CONTROL); +- } while (control & SPI_CONTROL_XCH); +- +- /* Release chip select if requested, transfer delays are +- handled in pump_transfers */ +- if (drv_data->cs_change) +- drv_data->cs_control(SPI_CS_DEASSERT); +- +- /* Read trailing bytes */ +- limit = loops_per_jiffy << 1; +- while ((read(drv_data) == 0) && --limit) +- cpu_relax(); +- +- if (limit == 0) +- dev_err(&drv_data->pdev->dev, +- "interrupt_transfer - " +- "trailing byte read failed\n"); +- else +- dev_dbg(&drv_data->pdev->dev, +- "interrupt_transfer - end of rx\n"); +- +- /* Update total byte transfered */ +- msg->actual_length += drv_data->len; +- +- /* Move to next transfer */ +- msg->state = next_transfer(drv_data); +- } +- +- /* Schedule transfer tasklet */ +- tasklet_schedule(&drv_data->pump_transfers); ++ unsigned int reg; + +- return IRQ_HANDLED; +- } else { +- while (status & (SPI_STATUS_TH | SPI_STATUS_RO)) { +- dev_dbg(&drv_data->pdev->dev, +- "interrupt_transfer - status = 0x%08X\n", +- status); +- +- if (status & SPI_STATUS_RO) { +- /* RXFIFO overrun, abort message end wait +- until TXFIFO is empty */ +- writel(SPI_INTEN_TE, regs + SPI_INT_STATUS); +- +- dev_warn(&drv_data->pdev->dev, +- "interrupt_transfer - fifo overun\n" +- " data not yet written = %d\n" +- " data not yet read = %d\n", +- data_to_write(drv_data), +- data_to_read(drv_data)); +- +- msg->state = ERROR_STATE; +- +- return IRQ_HANDLED; +- } +- +- /* Pump data */ +- read(drv_data); +- if (write(drv_data)) { +- /* End of TXFIFO writes, +- now wait until TXFIFO is empty */ +- writel(SPI_INTEN_TE, regs + SPI_INT_STATUS); +- return IRQ_HANDLED; +- } +- +- status = readl(regs + SPI_INT_STATUS); +- +- /* We did something */ +- handled = IRQ_HANDLED; +- } +- } +- +- return handled; ++ reg = readl(spi_imx->base + MXC_CSPICTRL); ++ reg |= MX1_CSPICTRL_XCH; ++ writel(reg, spi_imx->base + MXC_CSPICTRL); + } + +-static irqreturn_t spi_int(int irq, void *dev_id) ++static int mx1_config(struct spi_imx_data *spi_imx, ++ struct spi_imx_config *config) + { +- struct driver_data *drv_data = (struct driver_data *)dev_id; ++ unsigned int reg = MX1_CSPICTRL_ENABLE | MX1_CSPICTRL_MASTER; + +- if (!drv_data->cur_msg) { +- dev_err(&drv_data->pdev->dev, +- "spi_int - bad message state\n"); +- /* Never fail */ +- return IRQ_HANDLED; +- } ++ reg |= spi_imx_clkdiv_2(spi_imx->spi_clk, config->speed_hz) << ++ MX1_CSPICTRL_DR_SHIFT; ++ reg |= config->bpw - 1; + +- return drv_data->transfer_handler(drv_data); +-} ++ if (config->mode & SPI_CPHA) ++ reg |= MX1_CSPICTRL_PHA; ++ if (config->mode & SPI_CPOL) ++ reg |= MX1_CSPICTRL_POL; + +-static inline u32 spi_speed_hz(struct driver_data *drv_data, u32 data_rate) +-{ +- return clk_get_rate(drv_data->clk) / (4 << ((data_rate) >> 13)); ++ writel(reg, spi_imx->base + MXC_CSPICTRL); ++ ++ return 0; + } + +-static u32 spi_data_rate(struct driver_data *drv_data, u32 speed_hz) ++static int mx1_rx_available(struct spi_imx_data *spi_imx) + { +- u32 div; +- u32 quantized_hz = clk_get_rate(drv_data->clk) >> 2; +- +- for (div = SPI_PERCLK2_DIV_MIN; +- div <= SPI_PERCLK2_DIV_MAX; +- div++, quantized_hz >>= 1) { +- if (quantized_hz <= speed_hz) +- /* Max available speed LEQ required speed */ +- return div << 13; +- } +- return SPI_CONTROL_DATARATE_BAD; ++ return readl(spi_imx->base + MXC_CSPIINT) & MX1_INTREG_RR; + } + +-static void pump_transfers(unsigned long data) ++static void spi_imx_chipselect(struct spi_device *spi, int is_active) + { +- struct driver_data *drv_data = (struct driver_data *)data; +- struct spi_message *message; +- struct spi_transfer *transfer, *previous; +- struct chip_data *chip; +- void __iomem *regs; +- u32 tmp, control; +- +- dev_dbg(&drv_data->pdev->dev, "pump_transfer\n"); ++ struct spi_imx_data *spi_imx = spi_master_get_devdata(spi->master); ++ int gpio = spi_imx->chipselect[spi->chip_select]; ++ int active = is_active != BITBANG_CS_INACTIVE; ++ int dev_is_lowactive = !(spi->mode & SPI_CS_HIGH); + +- message = drv_data->cur_msg; +- +- /* Handle for abort */ +- if (message->state == ERROR_STATE) { +- message->status = -EIO; +- giveback(message, drv_data); +- return; +- } +- +- /* Handle end of message */ +- if (message->state == DONE_STATE) { +- message->status = 0; +- giveback(message, drv_data); ++ if (gpio < 0) + return; +- } +- +- chip = drv_data->cur_chip; +- +- /* Delay if requested at end of transfer*/ +- transfer = drv_data->cur_transfer; +- if (message->state == RUNNING_STATE) { +- previous = list_entry(transfer->transfer_list.prev, +- struct spi_transfer, +- transfer_list); +- if (previous->delay_usecs) +- udelay(previous->delay_usecs); +- } else { +- /* START_STATE */ +- message->state = RUNNING_STATE; +- drv_data->cs_control = chip->cs_control; +- } + +- transfer = drv_data->cur_transfer; +- drv_data->tx = (void *)transfer->tx_buf; +- drv_data->tx_end = drv_data->tx + transfer->len; +- drv_data->rx = transfer->rx_buf; +- drv_data->rx_end = drv_data->rx + transfer->len; +- drv_data->rx_dma = transfer->rx_dma; +- drv_data->tx_dma = transfer->tx_dma; +- drv_data->len = transfer->len; +- drv_data->cs_change = transfer->cs_change; +- drv_data->rd_only = (drv_data->tx == NULL); +- +- regs = drv_data->regs; +- control = readl(regs + SPI_CONTROL); +- +- /* Bits per word setup */ +- tmp = transfer->bits_per_word; +- if (tmp == 0) { +- /* Use device setup */ +- tmp = chip->bits_per_word; +- drv_data->n_bytes = chip->n_bytes; +- } else +- /* Use per-transfer setup */ +- drv_data->n_bytes = (tmp <= 8) ? 1 : 2; +- u32_EDIT(control, SPI_CONTROL_BITCOUNT_MASK, tmp - 1); +- +- /* Speed setup (surely valid because already checked) */ +- tmp = transfer->speed_hz; +- if (tmp == 0) +- tmp = chip->max_speed_hz; +- tmp = spi_data_rate(drv_data, tmp); +- u32_EDIT(control, SPI_CONTROL_DATARATE, tmp); +- +- writel(control, regs + SPI_CONTROL); +- +- /* Assert device chip-select */ +- drv_data->cs_control(SPI_CS_ASSERT); +- +- /* DMA cannot read/write SPI FIFOs other than 16 bits at a time; hence +- if bits_per_word is less or equal 8 PIO transfers are performed. +- Moreover DMA is convinient for transfer length bigger than FIFOs +- byte size. */ +- if ((drv_data->n_bytes == 2) && +- (drv_data->len > SPI_FIFO_DEPTH*SPI_FIFO_BYTE_WIDTH) && +- (map_dma_buffers(drv_data) == 0)) { +- dev_dbg(&drv_data->pdev->dev, +- "pump dma transfer\n" +- " tx = %p\n" +- " tx_dma = %08X\n" +- " rx = %p\n" +- " rx_dma = %08X\n" +- " len = %d\n", +- drv_data->tx, +- (unsigned int)drv_data->tx_dma, +- drv_data->rx, +- (unsigned int)drv_data->rx_dma, +- drv_data->len); +- +- /* Ensure we have the correct interrupt handler */ +- drv_data->transfer_handler = dma_transfer; +- +- /* Trigger transfer */ +- writel(readl(regs + SPI_CONTROL) | SPI_CONTROL_XCH, +- regs + SPI_CONTROL); +- +- /* Setup tx DMA */ +- if (drv_data->tx) +- /* Linear source address */ +- CCR(drv_data->tx_channel) = +- CCR_DMOD_FIFO | +- CCR_SMOD_LINEAR | +- CCR_SSIZ_32 | CCR_DSIZ_16 | +- CCR_REN; +- else +- /* Read only transfer -> fixed source address for +- dummy write to achive read */ +- CCR(drv_data->tx_channel) = +- CCR_DMOD_FIFO | +- CCR_SMOD_FIFO | +- CCR_SSIZ_32 | CCR_DSIZ_16 | +- CCR_REN; +- +- imx_dma_setup_single( +- drv_data->tx_channel, +- drv_data->tx_dma, +- drv_data->len, +- drv_data->rd_data_phys + 4, +- DMA_MODE_WRITE); +- +- if (drv_data->rx) { +- /* Setup rx DMA for linear destination address */ +- CCR(drv_data->rx_channel) = +- CCR_DMOD_LINEAR | +- CCR_SMOD_FIFO | +- CCR_DSIZ_32 | CCR_SSIZ_16 | +- CCR_REN; +- imx_dma_setup_single( +- drv_data->rx_channel, +- drv_data->rx_dma, +- drv_data->len, +- drv_data->rd_data_phys, +- DMA_MODE_READ); +- imx_dma_enable(drv_data->rx_channel); +- +- /* Enable SPI interrupt */ +- writel(SPI_INTEN_RO, regs + SPI_INT_STATUS); +- +- /* Set SPI to request DMA service on both +- Rx and Tx half fifo watermark */ +- writel(SPI_DMA_RHDEN | SPI_DMA_THDEN, regs + SPI_DMA); +- } else +- /* Write only access -> set SPI to request DMA +- service on Tx half fifo watermark */ +- writel(SPI_DMA_THDEN, regs + SPI_DMA); +- +- imx_dma_enable(drv_data->tx_channel); +- } else { +- dev_dbg(&drv_data->pdev->dev, +- "pump pio transfer\n" +- " tx = %p\n" +- " rx = %p\n" +- " len = %d\n", +- drv_data->tx, +- drv_data->rx, +- drv_data->len); +- +- /* Ensure we have the correct interrupt handler */ +- if (drv_data->rx) +- drv_data->transfer_handler = interrupt_transfer; +- else +- drv_data->transfer_handler = interrupt_wronly_transfer; +- +- /* Enable SPI interrupt */ +- if (drv_data->rx) +- writel(SPI_INTEN_TH | SPI_INTEN_RO, +- regs + SPI_INT_STATUS); +- else +- writel(SPI_INTEN_TH, regs + SPI_INT_STATUS); +- } ++ gpio_set_value(gpio, dev_is_lowactive ^ active); + } + +-static void pump_messages(struct work_struct *work) ++static void spi_imx_push(struct spi_imx_data *spi_imx) + { +- struct driver_data *drv_data = +- container_of(work, struct driver_data, work); +- unsigned long flags; +- +- /* Lock queue and check for queue work */ +- spin_lock_irqsave(&drv_data->lock, flags); +- if (list_empty(&drv_data->queue) || drv_data->run == QUEUE_STOPPED) { +- drv_data->busy = 0; +- spin_unlock_irqrestore(&drv_data->lock, flags); +- return; +- } +- +- /* Make sure we are not already running a message */ +- if (drv_data->cur_msg) { +- spin_unlock_irqrestore(&drv_data->lock, flags); +- return; ++ while (spi_imx->txfifo < 8) { ++ if (!spi_imx->count) ++ break; ++ spi_imx->tx(spi_imx); ++ spi_imx->txfifo++; + } + +- /* Extract head of queue */ +- drv_data->cur_msg = list_entry(drv_data->queue.next, +- struct spi_message, queue); +- list_del_init(&drv_data->cur_msg->queue); +- drv_data->busy = 1; +- spin_unlock_irqrestore(&drv_data->lock, flags); +- +- /* Initial message state */ +- drv_data->cur_msg->state = START_STATE; +- drv_data->cur_transfer = list_entry(drv_data->cur_msg->transfers.next, +- struct spi_transfer, +- transfer_list); +- +- /* Setup the SPI using the per chip configuration */ +- drv_data->cur_chip = spi_get_ctldata(drv_data->cur_msg->spi); +- restore_state(drv_data); +- +- /* Mark as busy and launch transfers */ +- tasklet_schedule(&drv_data->pump_transfers); ++ spi_imx->trigger(spi_imx); + } + +-static int transfer(struct spi_device *spi, struct spi_message *msg) ++static irqreturn_t spi_imx_isr(int irq, void *dev_id) + { +- struct driver_data *drv_data = spi_master_get_devdata(spi->master); +- u32 min_speed_hz, max_speed_hz, tmp; +- struct spi_transfer *trans; +- unsigned long flags; +- +- msg->actual_length = 0; +- +- /* Per transfer setup check */ +- min_speed_hz = spi_speed_hz(drv_data, SPI_CONTROL_DATARATE_MIN); +- max_speed_hz = spi->max_speed_hz; +- list_for_each_entry(trans, &msg->transfers, transfer_list) { +- tmp = trans->bits_per_word; +- if (tmp > 16) { +- dev_err(&drv_data->pdev->dev, +- "message rejected : " +- "invalid transfer bits_per_word (%d bits)\n", +- tmp); +- goto msg_rejected; +- } +- tmp = trans->speed_hz; +- if (tmp) { +- if (tmp < min_speed_hz) { +- dev_err(&drv_data->pdev->dev, +- "message rejected : " +- "device min speed (%d Hz) exceeds " +- "required transfer speed (%d Hz)\n", +- min_speed_hz, +- tmp); +- goto msg_rejected; +- } else if (tmp > max_speed_hz) { +- dev_err(&drv_data->pdev->dev, +- "message rejected : " +- "transfer speed (%d Hz) exceeds " +- "device max speed (%d Hz)\n", +- tmp, +- max_speed_hz); +- goto msg_rejected; +- } +- } +- } +- +- /* Message accepted */ +- msg->status = -EINPROGRESS; +- msg->state = START_STATE; ++ struct spi_imx_data *spi_imx = dev_id; + +- spin_lock_irqsave(&drv_data->lock, flags); +- if (drv_data->run == QUEUE_STOPPED) { +- spin_unlock_irqrestore(&drv_data->lock, flags); +- return -ESHUTDOWN; ++ while (spi_imx->rx_available(spi_imx)) { ++ spi_imx->rx(spi_imx); ++ spi_imx->txfifo--; + } + +- list_add_tail(&msg->queue, &drv_data->queue); +- if (drv_data->run == QUEUE_RUNNING && !drv_data->busy) +- queue_work(drv_data->workqueue, &drv_data->work); +- +- spin_unlock_irqrestore(&drv_data->lock, flags); +- return 0; +- +-msg_rejected: +- /* Message rejected and not queued */ +- msg->status = -EINVAL; +- msg->state = ERROR_STATE; +- if (msg->complete) +- msg->complete(msg->context); +- return -EINVAL; +-} +- +-/* On first setup bad values must free chip_data memory since will cause +- spi_new_device to fail. Bad value setup from protocol driver are simply not +- applied and notified to the calling driver. */ +-static int setup(struct spi_device *spi) +-{ +- struct driver_data *drv_data = spi_master_get_devdata(spi->master); +- struct spi_imx_chip *chip_info; +- struct chip_data *chip; +- int first_setup = 0; +- u32 tmp; +- int status = 0; +- +- /* Get controller data */ +- chip_info = spi->controller_data; +- +- /* Get controller_state */ +- chip = spi_get_ctldata(spi); +- if (chip == NULL) { +- first_setup = 1; +- +- chip = kzalloc(sizeof(struct chip_data), GFP_KERNEL); +- if (!chip) { +- dev_err(&spi->dev, +- "setup - cannot allocate controller state\n"); +- return -ENOMEM; +- } +- chip->control = SPI_DEFAULT_CONTROL; +- +- if (chip_info == NULL) { +- /* spi_board_info.controller_data not is supplied */ +- chip_info = kzalloc(sizeof(struct spi_imx_chip), +- GFP_KERNEL); +- if (!chip_info) { +- dev_err(&spi->dev, +- "setup - " +- "cannot allocate controller data\n"); +- status = -ENOMEM; +- goto err_first_setup; +- } +- /* Set controller data default value */ +- chip_info->enable_loopback = +- SPI_DEFAULT_ENABLE_LOOPBACK; +- chip_info->enable_dma = SPI_DEFAULT_ENABLE_DMA; +- chip_info->ins_ss_pulse = 1; +- chip_info->bclk_wait = SPI_DEFAULT_PERIOD_WAIT; +- chip_info->cs_control = null_cs_control; +- } ++ if (spi_imx->count) { ++ spi_imx_push(spi_imx); ++ return IRQ_HANDLED; + } + +- /* Now set controller state based on controller data */ +- +- if (first_setup) { +- /* SPI loopback */ +- if (chip_info->enable_loopback) +- chip->test = SPI_TEST_LBC; +- else +- chip->test = 0; +- +- /* SPI dma driven */ +- chip->enable_dma = chip_info->enable_dma; +- +- /* SPI /SS pulse between spi burst */ +- if (chip_info->ins_ss_pulse) +- u32_EDIT(chip->control, +- SPI_CONTROL_SSCTL, SPI_CONTROL_SSCTL_1); +- else +- u32_EDIT(chip->control, +- SPI_CONTROL_SSCTL, SPI_CONTROL_SSCTL_0); +- +- /* SPI bclk waits between each bits_per_word spi burst */ +- if (chip_info->bclk_wait > SPI_PERIOD_MAX_WAIT) { +- dev_err(&spi->dev, +- "setup - " +- "bclk_wait exceeds max allowed (%d)\n", +- SPI_PERIOD_MAX_WAIT); +- goto err_first_setup; +- } +- chip->period = SPI_PERIOD_CSRC_BCLK | +- (chip_info->bclk_wait & SPI_PERIOD_WAIT); ++ if (spi_imx->txfifo) { ++ /* No data left to push, but still waiting for rx data, ++ * enable receive data available interrupt. ++ */ ++ spi_imx->intctrl(spi_imx, MXC_INT_RR); ++ return IRQ_HANDLED; + } + +- /* SPI mode */ +- tmp = spi->mode; +- if (tmp & SPI_CS_HIGH) { +- u32_EDIT(chip->control, +- SPI_CONTROL_SSPOL, SPI_CONTROL_SSPOL_ACT_HIGH); +- } +- switch (tmp & SPI_MODE_3) { +- case SPI_MODE_0: +- tmp = 0; +- break; +- case SPI_MODE_1: +- tmp = SPI_CONTROL_PHA_1; +- break; +- case SPI_MODE_2: +- tmp = SPI_CONTROL_POL_ACT_LOW; +- break; +- default: +- /* SPI_MODE_3 */ +- tmp = SPI_CONTROL_PHA_1 | SPI_CONTROL_POL_ACT_LOW; +- break; +- } +- u32_EDIT(chip->control, SPI_CONTROL_POL | SPI_CONTROL_PHA, tmp); +- +- /* SPI word width */ +- tmp = spi->bits_per_word; +- if (tmp > 16) { +- status = -EINVAL; +- dev_err(&spi->dev, +- "setup - " +- "invalid bits_per_word (%d)\n", +- tmp); +- if (first_setup) +- goto err_first_setup; +- else { +- /* Undo setup using chip as backup copy */ +- tmp = chip->bits_per_word; +- spi->bits_per_word = tmp; +- } +- } +- chip->bits_per_word = tmp; +- u32_EDIT(chip->control, SPI_CONTROL_BITCOUNT_MASK, tmp - 1); +- chip->n_bytes = (tmp <= 8) ? 1 : 2; +- +- /* SPI datarate */ +- tmp = spi_data_rate(drv_data, spi->max_speed_hz); +- if (tmp == SPI_CONTROL_DATARATE_BAD) { +- status = -EINVAL; +- dev_err(&spi->dev, +- "setup - " +- "HW min speed (%d Hz) exceeds required " +- "max speed (%d Hz)\n", +- spi_speed_hz(drv_data, SPI_CONTROL_DATARATE_MIN), +- spi->max_speed_hz); +- if (first_setup) +- goto err_first_setup; +- else +- /* Undo setup using chip as backup copy */ +- spi->max_speed_hz = chip->max_speed_hz; +- } else { +- u32_EDIT(chip->control, SPI_CONTROL_DATARATE, tmp); +- /* Actual rounded max_speed_hz */ +- tmp = spi_speed_hz(drv_data, tmp); +- spi->max_speed_hz = tmp; +- chip->max_speed_hz = tmp; +- } ++ spi_imx->intctrl(spi_imx, 0); ++ complete(&spi_imx->xfer_done); + +- /* SPI chip-select management */ +- if (chip_info->cs_control) +- chip->cs_control = chip_info->cs_control; +- else +- chip->cs_control = null_cs_control; +- +- /* Save controller_state */ +- spi_set_ctldata(spi, chip); +- +- /* Summary */ +- dev_dbg(&spi->dev, +- "setup succeded\n" +- " loopback enable = %s\n" +- " dma enable = %s\n" +- " insert /ss pulse = %s\n" +- " period wait = %d\n" +- " mode = %d\n" +- " bits per word = %d\n" +- " min speed = %d Hz\n" +- " rounded max speed = %d Hz\n", +- chip->test & SPI_TEST_LBC ? "Yes" : "No", +- chip->enable_dma ? "Yes" : "No", +- chip->control & SPI_CONTROL_SSCTL ? "Yes" : "No", +- chip->period & SPI_PERIOD_WAIT, +- spi->mode, +- spi->bits_per_word, +- spi_speed_hz(drv_data, SPI_CONTROL_DATARATE_MIN), +- spi->max_speed_hz); +- return status; +- +-err_first_setup: +- kfree(chip); +- return status; ++ return IRQ_HANDLED; + } + +-static void cleanup(struct spi_device *spi) ++static int spi_imx_setupxfer(struct spi_device *spi, ++ struct spi_transfer *t) + { +- kfree(spi_get_ctldata(spi)); +-} ++ struct spi_imx_data *spi_imx = spi_master_get_devdata(spi->master); ++ struct spi_imx_config config; + +-static int __init init_queue(struct driver_data *drv_data) +-{ +- INIT_LIST_HEAD(&drv_data->queue); +- spin_lock_init(&drv_data->lock); ++ config.bpw = t ? t->bits_per_word : spi->bits_per_word; ++ config.speed_hz = t ? t->speed_hz : spi->max_speed_hz; ++ config.mode = spi->mode; ++ config.cs = spi_imx->chipselect[spi->chip_select]; + +- drv_data->run = QUEUE_STOPPED; +- drv_data->busy = 0; ++ if (!config.speed_hz) ++ config.speed_hz = spi->max_speed_hz; ++ if (!config.bpw) ++ config.bpw = spi->bits_per_word; ++ if (!config.speed_hz) ++ config.speed_hz = spi->max_speed_hz; + +- tasklet_init(&drv_data->pump_transfers, +- pump_transfers, (unsigned long)drv_data); ++ /* Initialize the functions for transfer */ ++ if (config.bpw <= 8) { ++ spi_imx->rx = spi_imx_buf_rx_u8; ++ spi_imx->tx = spi_imx_buf_tx_u8; ++ } else if (config.bpw <= 16) { ++ spi_imx->rx = spi_imx_buf_rx_u16; ++ spi_imx->tx = spi_imx_buf_tx_u16; ++ } else if (config.bpw <= 32) { ++ spi_imx->rx = spi_imx_buf_rx_u32; ++ spi_imx->tx = spi_imx_buf_tx_u32; ++ } else ++ BUG(); + +- INIT_WORK(&drv_data->work, pump_messages); +- drv_data->workqueue = create_singlethread_workqueue( +- dev_name(drv_data->master->dev.parent)); +- if (drv_data->workqueue == NULL) +- return -EBUSY; ++ spi_imx->config(spi_imx, &config); + + return 0; + } + +-static int start_queue(struct driver_data *drv_data) ++static int spi_imx_transfer(struct spi_device *spi, ++ struct spi_transfer *transfer) + { +- unsigned long flags; ++ struct spi_imx_data *spi_imx = spi_master_get_devdata(spi->master); + +- spin_lock_irqsave(&drv_data->lock, flags); ++ spi_imx->tx_buf = transfer->tx_buf; ++ spi_imx->rx_buf = transfer->rx_buf; ++ spi_imx->count = transfer->len; ++ spi_imx->txfifo = 0; + +- if (drv_data->run == QUEUE_RUNNING || drv_data->busy) { +- spin_unlock_irqrestore(&drv_data->lock, flags); +- return -EBUSY; +- } ++ init_completion(&spi_imx->xfer_done); + +- drv_data->run = QUEUE_RUNNING; +- drv_data->cur_msg = NULL; +- drv_data->cur_transfer = NULL; +- drv_data->cur_chip = NULL; +- spin_unlock_irqrestore(&drv_data->lock, flags); ++ spi_imx_push(spi_imx); + +- queue_work(drv_data->workqueue, &drv_data->work); ++ spi_imx->intctrl(spi_imx, MXC_INT_TE); + +- return 0; ++ wait_for_completion(&spi_imx->xfer_done); ++ ++ return transfer->len; + } + +-static int stop_queue(struct driver_data *drv_data) ++static int spi_imx_setup(struct spi_device *spi) + { +- unsigned long flags; +- unsigned limit = 500; +- int status = 0; +- +- spin_lock_irqsave(&drv_data->lock, flags); +- +- /* This is a bit lame, but is optimized for the common execution path. +- * A wait_queue on the drv_data->busy could be used, but then the common +- * execution path (pump_messages) would be required to call wake_up or +- * friends on every SPI message. Do this instead */ +- drv_data->run = QUEUE_STOPPED; +- while (!list_empty(&drv_data->queue) && drv_data->busy && limit--) { +- spin_unlock_irqrestore(&drv_data->lock, flags); +- msleep(10); +- spin_lock_irqsave(&drv_data->lock, flags); +- } ++ struct spi_imx_data *spi_imx = spi_master_get_devdata(spi->master); ++ int gpio = spi_imx->chipselect[spi->chip_select]; ++ ++ pr_debug("%s: mode %d, %u bpw, %d hz\n", __func__, ++ spi->mode, spi->bits_per_word, spi->max_speed_hz); + +- if (!list_empty(&drv_data->queue) || drv_data->busy) +- status = -EBUSY; ++ if (gpio >= 0) ++ gpio_direction_output(gpio, spi->mode & SPI_CS_HIGH ? 0 : 1); + +- spin_unlock_irqrestore(&drv_data->lock, flags); ++ spi_imx_chipselect(spi, BITBANG_CS_INACTIVE); + +- return status; ++ return 0; + } + +-static int destroy_queue(struct driver_data *drv_data) ++static void spi_imx_cleanup(struct spi_device *spi) + { +- int status; +- +- status = stop_queue(drv_data); +- if (status != 0) +- return status; +- +- if (drv_data->workqueue) +- destroy_workqueue(drv_data->workqueue); +- +- return 0; + } + + static int __init spi_imx_probe(struct platform_device *pdev) + { +- struct device *dev = &pdev->dev; +- struct spi_imx_master *platform_info; ++ struct spi_imx_master *mxc_platform_info; + struct spi_master *master; +- struct driver_data *drv_data; ++ struct spi_imx_data *spi_imx; + struct resource *res; +- int irq, status = 0; ++ int i, ret; + +- platform_info = dev->platform_data; +- if (platform_info == NULL) { +- dev_err(&pdev->dev, "probe - no platform data supplied\n"); +- status = -ENODEV; +- goto err_no_pdata; ++ mxc_platform_info = (struct spi_imx_master *)pdev->dev.platform_data; ++ if (!mxc_platform_info) { ++ dev_err(&pdev->dev, "can't get the platform data\n"); ++ return -EINVAL; + } + +- /* Allocate master with space for drv_data */ +- master = spi_alloc_master(dev, sizeof(struct driver_data)); +- if (!master) { +- dev_err(&pdev->dev, "probe - cannot alloc spi_master\n"); +- status = -ENOMEM; +- goto err_no_mem; +- } +- drv_data = spi_master_get_devdata(master); +- drv_data->master = master; +- drv_data->master_info = platform_info; +- drv_data->pdev = pdev; ++ master = spi_alloc_master(&pdev->dev, sizeof(struct spi_imx_data)); ++ if (!master) ++ return -ENOMEM; + +- /* the spi->mode bits understood by this driver: */ +- master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; ++ platform_set_drvdata(pdev, master); + + master->bus_num = pdev->id; +- master->num_chipselect = platform_info->num_chipselect; +- master->dma_alignment = DMA_ALIGNMENT; +- master->cleanup = cleanup; +- master->setup = setup; +- master->transfer = transfer; +- +- drv_data->dummy_dma_buf = SPI_DUMMY_u32; +- +- drv_data->clk = clk_get(&pdev->dev, "perclk2"); +- if (IS_ERR(drv_data->clk)) { +- dev_err(&pdev->dev, "probe - cannot get clock\n"); +- status = PTR_ERR(drv_data->clk); +- goto err_no_clk; +- } +- clk_enable(drv_data->clk); +- +- /* Find and map resources */ +- res = platform_get_resource(pdev, IORESOURCE_MEM, 0); +- if (!res) { +- dev_err(&pdev->dev, "probe - MEM resources not defined\n"); +- status = -ENODEV; +- goto err_no_iores; +- } +- drv_data->ioarea = request_mem_region(res->start, +- res->end - res->start + 1, +- pdev->name); +- if (drv_data->ioarea == NULL) { +- dev_err(&pdev->dev, "probe - cannot reserve region\n"); +- status = -ENXIO; +- goto err_no_iores; +- } +- drv_data->regs = ioremap(res->start, res->end - res->start + 1); +- if (drv_data->regs == NULL) { +- dev_err(&pdev->dev, "probe - cannot map IO\n"); +- status = -ENXIO; +- goto err_no_iomap; +- } +- drv_data->rd_data_phys = (dma_addr_t)res->start; +- +- /* Attach to IRQ */ +- irq = platform_get_irq(pdev, 0); +- if (irq < 0) { +- dev_err(&pdev->dev, "probe - IRQ resource not defined\n"); +- status = -ENODEV; +- goto err_no_irqres; +- } +- status = request_irq(irq, spi_int, IRQF_DISABLED, +- dev_name(dev), drv_data); +- if (status < 0) { +- dev_err(&pdev->dev, "probe - cannot get IRQ (%d)\n", status); +- goto err_no_irqres; +- } +- +- /* Setup DMA if requested */ +- drv_data->tx_channel = -1; +- drv_data->rx_channel = -1; +- if (platform_info->enable_dma) { +- /* Get rx DMA channel */ +- drv_data->rx_channel = imx_dma_request_by_prio("spi_imx_rx", +- DMA_PRIO_HIGH); +- if (drv_data->rx_channel < 0) { +- dev_err(dev, +- "probe - problem (%d) requesting rx channel\n", +- drv_data->rx_channel); +- goto err_no_rxdma; +- } else +- imx_dma_setup_handlers(drv_data->rx_channel, NULL, +- dma_err_handler, drv_data); +- +- /* Get tx DMA channel */ +- drv_data->tx_channel = imx_dma_request_by_prio("spi_imx_tx", +- DMA_PRIO_MEDIUM); +- if (drv_data->tx_channel < 0) { +- dev_err(dev, +- "probe - problem (%d) requesting tx channel\n", +- drv_data->tx_channel); +- imx_dma_free(drv_data->rx_channel); +- goto err_no_txdma; +- } else +- imx_dma_setup_handlers(drv_data->tx_channel, +- dma_tx_handler, dma_err_handler, +- drv_data); +- +- /* Set request source and burst length for allocated channels */ +- switch (drv_data->pdev->id) { +- case 1: +- /* Using SPI1 */ +- RSSR(drv_data->rx_channel) = DMA_REQ_SPI1_R; +- RSSR(drv_data->tx_channel) = DMA_REQ_SPI1_T; +- break; +- case 2: +- /* Using SPI2 */ +- RSSR(drv_data->rx_channel) = DMA_REQ_SPI2_R; +- RSSR(drv_data->tx_channel) = DMA_REQ_SPI2_T; +- break; +- default: +- dev_err(dev, "probe - bad SPI Id\n"); +- imx_dma_free(drv_data->rx_channel); +- imx_dma_free(drv_data->tx_channel); +- status = -ENODEV; +- goto err_no_devid; ++ master->num_chipselect = mxc_platform_info->num_chipselect; ++ ++ spi_imx = spi_master_get_devdata(master); ++ spi_imx->bitbang.master = spi_master_get(master); ++ spi_imx->chipselect = mxc_platform_info->chipselect; ++ ++ for (i = 0; i < master->num_chipselect; i++) { ++ if (spi_imx->chipselect[i] < 0) ++ continue; ++ ret = gpio_request(spi_imx->chipselect[i], DRIVER_NAME); ++ if (ret) { ++ i--; ++ while (i > 0) ++ if (spi_imx->chipselect[i] >= 0) ++ gpio_free(spi_imx->chipselect[i--]); ++ dev_err(&pdev->dev, "can't get cs gpios"); ++ goto out_master_put; + } +- BLR(drv_data->rx_channel) = SPI_DMA_BLR; +- BLR(drv_data->tx_channel) = SPI_DMA_BLR; + } + +- /* Load default SPI configuration */ +- writel(SPI_RESET_START, drv_data->regs + SPI_RESET); +- writel(0, drv_data->regs + SPI_RESET); +- writel(SPI_DEFAULT_CONTROL, drv_data->regs + SPI_CONTROL); ++ spi_imx->bitbang.chipselect = spi_imx_chipselect; ++ spi_imx->bitbang.setup_transfer = spi_imx_setupxfer; ++ spi_imx->bitbang.txrx_bufs = spi_imx_transfer; ++ spi_imx->bitbang.master->setup = spi_imx_setup; ++ spi_imx->bitbang.master->cleanup = spi_imx_cleanup; ++ spi_imx->bitbang.master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH; + +- /* Initial and start queue */ +- status = init_queue(drv_data); +- if (status != 0) { +- dev_err(&pdev->dev, "probe - problem initializing queue\n"); +- goto err_init_queue; +- } +- status = start_queue(drv_data); +- if (status != 0) { +- dev_err(&pdev->dev, "probe - problem starting queue\n"); +- goto err_start_queue; +- } ++ init_completion(&spi_imx->xfer_done); ++ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!res) { ++ dev_err(&pdev->dev, "can't get platform resource\n"); ++ ret = -ENOMEM; ++ goto out_gpio_free; ++ } ++ ++ if (!request_mem_region(res->start, resource_size(res), pdev->name)) { ++ dev_err(&pdev->dev, "request_mem_region failed\n"); ++ ret = -EBUSY; ++ goto out_gpio_free; ++ } ++ ++ spi_imx->base = ioremap(res->start, resource_size(res)); ++ if (!spi_imx->base) { ++ ret = -EINVAL; ++ goto out_release_mem; ++ } ++ ++ spi_imx->irq = platform_get_irq(pdev, 0); ++ if (!spi_imx->irq) { ++ ret = -EINVAL; ++ goto out_iounmap; ++ } ++ ++ ret = request_irq(spi_imx->irq, spi_imx_isr, 0, DRIVER_NAME, spi_imx); ++ if (ret) { ++ dev_err(&pdev->dev, "can't get irq%d: %d\n", spi_imx->irq, ret); ++ goto out_iounmap; ++ } ++ ++ if (cpu_is_mx31() || cpu_is_mx35()) { ++ spi_imx->intctrl = mx31_intctrl; ++ spi_imx->config = mx31_config; ++ spi_imx->trigger = mx31_trigger; ++ spi_imx->rx_available = mx31_rx_available; ++ } else if (cpu_is_mx27() || cpu_is_mx21()) { ++ spi_imx->intctrl = mx27_intctrl; ++ spi_imx->config = mx27_config; ++ spi_imx->trigger = mx27_trigger; ++ spi_imx->rx_available = mx27_rx_available; ++ } else if (cpu_is_mx1()) { ++ spi_imx->intctrl = mx1_intctrl; ++ spi_imx->config = mx1_config; ++ spi_imx->trigger = mx1_trigger; ++ spi_imx->rx_available = mx1_rx_available; ++ } else ++ BUG(); + +- /* Register with the SPI framework */ +- platform_set_drvdata(pdev, drv_data); +- status = spi_register_master(master); +- if (status != 0) { +- dev_err(&pdev->dev, "probe - problem registering spi master\n"); +- goto err_spi_register; ++ spi_imx->clk = clk_get(&pdev->dev, NULL); ++ if (IS_ERR(spi_imx->clk)) { ++ dev_err(&pdev->dev, "unable to get clock\n"); ++ ret = PTR_ERR(spi_imx->clk); ++ goto out_free_irq; + } + +- dev_dbg(dev, "probe succeded\n"); +- return 0; ++ clk_enable(spi_imx->clk); ++ spi_imx->spi_clk = clk_get_rate(spi_imx->clk); + +-err_init_queue: +-err_start_queue: +-err_spi_register: +- destroy_queue(drv_data); ++ if (!cpu_is_mx31() || !cpu_is_mx35()) ++ writel(1, spi_imx->base + MXC_RESET); + +-err_no_rxdma: +-err_no_txdma: +-err_no_devid: +- free_irq(irq, drv_data); ++ spi_imx->intctrl(spi_imx, 0); + +-err_no_irqres: +- iounmap(drv_data->regs); ++ ret = spi_bitbang_start(&spi_imx->bitbang); ++ if (ret) { ++ dev_err(&pdev->dev, "bitbang start failed with %d\n", ret); ++ goto out_clk_put; ++ } + +-err_no_iomap: +- release_resource(drv_data->ioarea); +- kfree(drv_data->ioarea); ++ dev_info(&pdev->dev, "probed\n"); + +-err_no_iores: +- clk_disable(drv_data->clk); +- clk_put(drv_data->clk); ++ return ret; + +-err_no_clk: ++out_clk_put: ++ clk_disable(spi_imx->clk); ++ clk_put(spi_imx->clk); ++out_free_irq: ++ free_irq(spi_imx->irq, spi_imx); ++out_iounmap: ++ iounmap(spi_imx->base); ++out_release_mem: ++ release_mem_region(res->start, resource_size(res)); ++out_gpio_free: ++ for (i = 0; i < master->num_chipselect; i++) ++ if (spi_imx->chipselect[i] >= 0) ++ gpio_free(spi_imx->chipselect[i]); ++out_master_put: + spi_master_put(master); +- +-err_no_pdata: +-err_no_mem: +- return status; ++ kfree(master); ++ platform_set_drvdata(pdev, NULL); ++ return ret; + } + + static int __exit spi_imx_remove(struct platform_device *pdev) + { +- struct driver_data *drv_data = platform_get_drvdata(pdev); +- int irq; +- int status = 0; +- +- if (!drv_data) +- return 0; +- +- tasklet_kill(&drv_data->pump_transfers); ++ struct spi_master *master = platform_get_drvdata(pdev); ++ struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ struct spi_imx_data *spi_imx = spi_master_get_devdata(master); ++ int i; + +- /* Remove the queue */ +- status = destroy_queue(drv_data); +- if (status != 0) { +- dev_err(&pdev->dev, "queue remove failed (%d)\n", status); +- return status; +- } +- +- /* Reset SPI */ +- writel(SPI_RESET_START, drv_data->regs + SPI_RESET); +- writel(0, drv_data->regs + SPI_RESET); +- +- /* Release DMA */ +- if (drv_data->master_info->enable_dma) { +- RSSR(drv_data->rx_channel) = 0; +- RSSR(drv_data->tx_channel) = 0; +- imx_dma_free(drv_data->tx_channel); +- imx_dma_free(drv_data->rx_channel); +- } ++ spi_bitbang_stop(&spi_imx->bitbang); + +- /* Release IRQ */ +- irq = platform_get_irq(pdev, 0); +- if (irq >= 0) +- free_irq(irq, drv_data); ++ writel(0, spi_imx->base + MXC_CSPICTRL); ++ clk_disable(spi_imx->clk); ++ clk_put(spi_imx->clk); ++ free_irq(spi_imx->irq, spi_imx); ++ iounmap(spi_imx->base); + +- clk_disable(drv_data->clk); +- clk_put(drv_data->clk); ++ for (i = 0; i < master->num_chipselect; i++) ++ if (spi_imx->chipselect[i] >= 0) ++ gpio_free(spi_imx->chipselect[i]); + +- /* Release map resources */ +- iounmap(drv_data->regs); +- release_resource(drv_data->ioarea); +- kfree(drv_data->ioarea); ++ spi_master_put(master); + +- /* Disconnect from the SPI framework */ +- spi_unregister_master(drv_data->master); +- spi_master_put(drv_data->master); ++ release_mem_region(res->start, resource_size(res)); + +- /* Prevent double remove */ + platform_set_drvdata(pdev, NULL); + +- dev_dbg(&pdev->dev, "remove succeded\n"); +- + return 0; + } + +-static void spi_imx_shutdown(struct platform_device *pdev) +-{ +- struct driver_data *drv_data = platform_get_drvdata(pdev); +- +- /* Reset SPI */ +- writel(SPI_RESET_START, drv_data->regs + SPI_RESET); +- writel(0, drv_data->regs + SPI_RESET); +- +- dev_dbg(&pdev->dev, "shutdown succeded\n"); +-} +- +-#ifdef CONFIG_PM +- +-static int spi_imx_suspend(struct platform_device *pdev, pm_message_t state) +-{ +- struct driver_data *drv_data = platform_get_drvdata(pdev); +- int status = 0; +- +- status = stop_queue(drv_data); +- if (status != 0) { +- dev_warn(&pdev->dev, "suspend cannot stop queue\n"); +- return status; +- } +- +- dev_dbg(&pdev->dev, "suspended\n"); +- +- return 0; +-} +- +-static int spi_imx_resume(struct platform_device *pdev) +-{ +- struct driver_data *drv_data = platform_get_drvdata(pdev); +- int status = 0; +- +- /* Start the queue running */ +- status = start_queue(drv_data); +- if (status != 0) +- dev_err(&pdev->dev, "problem starting queue (%d)\n", status); +- else +- dev_dbg(&pdev->dev, "resumed\n"); +- +- return status; +-} +-#else +-#define spi_imx_suspend NULL +-#define spi_imx_resume NULL +-#endif /* CONFIG_PM */ +- +-/* work with hotplug and coldplug */ +-MODULE_ALIAS("platform:spi_imx"); +- +-static struct platform_driver driver = { ++static struct platform_driver spi_imx_driver = { + .driver = { +- .name = "spi_imx", +- .owner = THIS_MODULE, +- }, ++ .name = DRIVER_NAME, ++ .owner = THIS_MODULE, ++ }, ++ .probe = spi_imx_probe, + .remove = __exit_p(spi_imx_remove), +- .shutdown = spi_imx_shutdown, +- .suspend = spi_imx_suspend, +- .resume = spi_imx_resume, + }; + + static int __init spi_imx_init(void) + { +- return platform_driver_probe(&driver, spi_imx_probe); ++ return platform_driver_register(&spi_imx_driver); + } +-module_init(spi_imx_init); + + static void __exit spi_imx_exit(void) + { +- platform_driver_unregister(&driver); ++ platform_driver_unregister(&spi_imx_driver); + } ++ ++module_init(spi_imx_init); + module_exit(spi_imx_exit); + +-MODULE_AUTHOR("Andrea Paterniani, "); +-MODULE_DESCRIPTION("iMX SPI Controller Driver"); ++MODULE_DESCRIPTION("SPI Master Controller driver"); ++MODULE_AUTHOR("Sascha Hauer, Pengutronix"); + MODULE_LICENSE("GPL"); +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0002-MXC-NFC-Remove-useless-structure-member.patch b/recipes/linux/linux-2.6.31/pcm043/0002-MXC-NFC-Remove-useless-structure-member.patch new file mode 100644 index 0000000000..1cad5b583f --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0002-MXC-NFC-Remove-useless-structure-member.patch @@ -0,0 +1,45 @@ +From ec0217a98d38662cc058dcc6124c5a1e7a6bc8db Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 13:51:19 +0200 +Subject: [PATCH 02/15] MXC NFC: Remove useless structure member + +Remove a local copy of a value always present in other structures. + +Signed-off-by: Juergen Beisert +--- + drivers/mtd/nand/mxc_nand_v2.c | 5 +---- + 1 files changed, 1 insertions(+), 4 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand_v2.c b/drivers/mtd/nand/mxc_nand_v2.c +index b7ae2e0..3483e7d 100644 +--- a/drivers/mtd/nand/mxc_nand_v2.c ++++ b/drivers/mtd/nand/mxc_nand_v2.c +@@ -104,7 +104,6 @@ struct mxc_nand_host { + unsigned int buf_start; + + wait_queue_head_t irq_waitq; +- int g_page_mask; + + struct clk *clk; + int clk_enabled; +@@ -473,7 +472,7 @@ static void mxc_do_addr_cycle(struct mtd_info *mtd, int column, int page_addr) + struct nand_chip *nand_chip = mtd->priv; + struct mxc_nand_host *host = nand_chip->priv; + +- u32 page_mask = host->g_page_mask; ++ u32 page_mask = nand_chip->pagemask; + + if (column != -1) { + send_addr(host, column & 0xFF); +@@ -790,8 +789,6 @@ static int mxc_nand_scan_bbt(struct mtd_info *mtd) + struct nand_chip *this = mtd->priv; + struct mxc_nand_host *host = this->priv; + +- host->g_page_mask = this->pagemask; +- + if (mtd->writesize == 2048) { + mxc_set_nfms(mtd, 1 << NFMS_NF_PG_SZ); + this->ecc.layout = &nand_hw_eccoob_2k; +-- +1.6.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0002-mfd-Add-Freescale-MC13783-driver.patch b/recipes/linux/linux-2.6.31/pcm043/0002-mfd-Add-Freescale-MC13783-driver.patch new file mode 100644 index 0000000000..c97566688c --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0002-mfd-Add-Freescale-MC13783-driver.patch @@ -0,0 +1,984 @@ +From b7f6a24d9c7f9715845cc910000618f2c658ea27 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 19 Aug 2009 01:40:28 +0200 +Subject: [PATCH 02/28] mfd: Add Freescale MC13783 driver + +This driver provides the core Freescale MC13783 support. It +registers the client platform_devices and provides access +to the A/D converter. + +Signed-off-by: Sascha Hauer +Signed-off-by: Samuel Ortiz +--- + drivers/mfd/Kconfig | 10 + + drivers/mfd/Makefile | 2 + + drivers/mfd/mc13783-core.c | 427 +++++++++++++++++++++++++++++++++++ + include/linux/mfd/mc13783-private.h | 396 ++++++++++++++++++++++++++++++++ + include/linux/mfd/mc13783.h | 84 +++++++ + 5 files changed, 919 insertions(+), 0 deletions(-) + create mode 100644 drivers/mfd/mc13783-core.c + create mode 100644 include/linux/mfd/mc13783-private.h + create mode 100644 include/linux/mfd/mc13783.h + +diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig +index 491ac0f..c9aa085 100644 +--- a/drivers/mfd/Kconfig ++++ b/drivers/mfd/Kconfig +@@ -228,6 +228,16 @@ config MFD_PCF50633 + facilities, and registers devices for the various functions + so that function-specific drivers can bind to them. + ++config MFD_MC13783 ++ tristate "Support Freescale MC13783" ++ depends on SPI_MASTER ++ select MFD_CORE ++ help ++ Support for the Freescale (Atlas) MC13783 PMIC and audio CODEC. ++ This driver provides common support for accessing the device, ++ additional drivers must be enabled in order to use the ++ functionality of the device. ++ + config PCF50633_ADC + tristate "Support for NXP PCF50633 ADC" + depends on MFD_PCF50633 +diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile +index 6f8a9a1..7262822 100644 +--- a/drivers/mfd/Makefile ++++ b/drivers/mfd/Makefile +@@ -24,6 +24,8 @@ obj-$(CONFIG_MENELAUS) += menelaus.o + + obj-$(CONFIG_TWL4030_CORE) += twl4030-core.o twl4030-irq.o + ++obj-$(CONFIG_MFD_MC13783) += mc13783-core.o ++ + obj-$(CONFIG_MFD_CORE) += mfd-core.o + + obj-$(CONFIG_EZX_PCAP) += ezx-pcap.o +diff --git a/drivers/mfd/mc13783-core.c b/drivers/mfd/mc13783-core.c +new file mode 100644 +index 0000000..e354d29 +--- /dev/null ++++ b/drivers/mfd/mc13783-core.c +@@ -0,0 +1,427 @@ ++/* ++ * Copyright 2009 Pengutronix, Sascha Hauer ++ * ++ * This code is in parts based on wm8350-core.c and pcf50633-core.c ++ * ++ * Initial development of this code was funded by ++ * Phytec Messtechnik GmbH, http://www.phytec.de ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#define MC13783_MAX_REG_NUM 0x3f ++#define MC13783_FRAME_MASK 0x00ffffff ++#define MC13783_MAX_REG_NUM 0x3f ++#define MC13783_REG_NUM_SHIFT 0x19 ++#define MC13783_WRITE_BIT_SHIFT 31 ++ ++static inline int spi_rw(struct spi_device *spi, u8 * buf, size_t len) ++{ ++ struct spi_transfer t = { ++ .tx_buf = (const void *)buf, ++ .rx_buf = buf, ++ .len = len, ++ .cs_change = 0, ++ .delay_usecs = 0, ++ }; ++ struct spi_message m; ++ ++ spi_message_init(&m); ++ spi_message_add_tail(&t, &m); ++ if (spi_sync(spi, &m) != 0 || m.status != 0) ++ return -EINVAL; ++ return len - m.actual_length; ++} ++ ++static int mc13783_read(struct mc13783 *mc13783, int reg_num, u32 *reg_val) ++{ ++ unsigned int frame = 0; ++ int ret = 0; ++ ++ if (reg_num > MC13783_MAX_REG_NUM) ++ return -EINVAL; ++ ++ frame |= reg_num << MC13783_REG_NUM_SHIFT; ++ ++ ret = spi_rw(mc13783->spi_device, (u8 *)&frame, 4); ++ ++ *reg_val = frame & MC13783_FRAME_MASK; ++ ++ return ret; ++} ++ ++static int mc13783_write(struct mc13783 *mc13783, int reg_num, u32 reg_val) ++{ ++ unsigned int frame = 0; ++ ++ if (reg_num > MC13783_MAX_REG_NUM) ++ return -EINVAL; ++ ++ frame |= (1 << MC13783_WRITE_BIT_SHIFT); ++ frame |= reg_num << MC13783_REG_NUM_SHIFT; ++ frame |= reg_val & MC13783_FRAME_MASK; ++ ++ return spi_rw(mc13783->spi_device, (u8 *)&frame, 4); ++} ++ ++int mc13783_reg_read(struct mc13783 *mc13783, int reg_num, u32 *reg_val) ++{ ++ int ret; ++ ++ mutex_lock(&mc13783->io_lock); ++ ret = mc13783_read(mc13783, reg_num, reg_val); ++ mutex_unlock(&mc13783->io_lock); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(mc13783_reg_read); ++ ++int mc13783_reg_write(struct mc13783 *mc13783, int reg_num, u32 reg_val) ++{ ++ int ret; ++ ++ mutex_lock(&mc13783->io_lock); ++ ret = mc13783_write(mc13783, reg_num, reg_val); ++ mutex_unlock(&mc13783->io_lock); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(mc13783_reg_write); ++ ++/** ++ * mc13783_set_bits - Bitmask write ++ * ++ * @mc13783: Pointer to mc13783 control structure ++ * @reg: Register to access ++ * @mask: Mask of bits to change ++ * @val: Value to set for masked bits ++ */ ++int mc13783_set_bits(struct mc13783 *mc13783, int reg, u32 mask, u32 val) ++{ ++ u32 tmp; ++ int ret; ++ ++ mutex_lock(&mc13783->io_lock); ++ ++ ret = mc13783_read(mc13783, reg, &tmp); ++ tmp = (tmp & ~mask) | val; ++ if (ret == 0) ++ ret = mc13783_write(mc13783, reg, tmp); ++ ++ mutex_unlock(&mc13783->io_lock); ++ ++ return ret; ++} ++EXPORT_SYMBOL_GPL(mc13783_set_bits); ++ ++int mc13783_register_irq(struct mc13783 *mc13783, int irq, ++ void (*handler) (int, void *), void *data) ++{ ++ if (irq < 0 || irq > MC13783_NUM_IRQ || !handler) ++ return -EINVAL; ++ ++ if (WARN_ON(mc13783->irq_handler[irq].handler)) ++ return -EBUSY; ++ ++ mutex_lock(&mc13783->io_lock); ++ mc13783->irq_handler[irq].handler = handler; ++ mc13783->irq_handler[irq].data = data; ++ mutex_unlock(&mc13783->io_lock); ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(mc13783_register_irq); ++ ++int mc13783_free_irq(struct mc13783 *mc13783, int irq) ++{ ++ if (irq < 0 || irq > MC13783_NUM_IRQ) ++ return -EINVAL; ++ ++ mutex_lock(&mc13783->io_lock); ++ mc13783->irq_handler[irq].handler = NULL; ++ mutex_unlock(&mc13783->io_lock); ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(mc13783_free_irq); ++ ++static void mc13783_irq_work(struct work_struct *work) ++{ ++ struct mc13783 *mc13783 = container_of(work, struct mc13783, work); ++ int i; ++ unsigned int adc_sts; ++ ++ /* check if the adc has finished any completion */ ++ mc13783_reg_read(mc13783, MC13783_REG_INTERRUPT_STATUS_0, &adc_sts); ++ mc13783_reg_write(mc13783, MC13783_REG_INTERRUPT_STATUS_0, ++ adc_sts & MC13783_INT_STAT_ADCDONEI); ++ ++ if (adc_sts & MC13783_INT_STAT_ADCDONEI) ++ complete_all(&mc13783->adc_done); ++ ++ for (i = 0; i < MC13783_NUM_IRQ; i++) ++ if (mc13783->irq_handler[i].handler) ++ mc13783->irq_handler[i].handler(i, ++ mc13783->irq_handler[i].data); ++ enable_irq(mc13783->irq); ++} ++ ++static irqreturn_t mc13783_interrupt(int irq, void *dev_id) ++{ ++ struct mc13783 *mc13783 = dev_id; ++ ++ disable_irq_nosync(irq); ++ ++ schedule_work(&mc13783->work); ++ return IRQ_HANDLED; ++} ++ ++/* set adc to ts interrupt mode, which generates touchscreen wakeup interrupt */ ++static inline void mc13783_adc_set_ts_irq_mode(struct mc13783 *mc13783) ++{ ++ unsigned int reg_adc0, reg_adc1; ++ ++ reg_adc0 = MC13783_ADC0_ADREFEN | MC13783_ADC0_ADREFMODE ++ | MC13783_ADC0_TSMOD0; ++ reg_adc1 = MC13783_ADC1_ADEN | MC13783_ADC1_ADTRIGIGN; ++ ++ mc13783_reg_write(mc13783, MC13783_REG_ADC_0, reg_adc0); ++ mc13783_reg_write(mc13783, MC13783_REG_ADC_1, reg_adc1); ++} ++ ++int mc13783_adc_do_conversion(struct mc13783 *mc13783, unsigned int mode, ++ unsigned int channel, unsigned int *sample) ++{ ++ unsigned int reg_adc0, reg_adc1; ++ int i; ++ ++ mutex_lock(&mc13783->adc_conv_lock); ++ ++ /* set up auto incrementing anyway to make quick read */ ++ reg_adc0 = MC13783_ADC0_ADINC1 | MC13783_ADC0_ADINC2; ++ /* enable the adc, ignore external triggering and set ASC to trigger ++ * conversion */ ++ reg_adc1 = MC13783_ADC1_ADEN | MC13783_ADC1_ADTRIGIGN ++ | MC13783_ADC1_ASC; ++ ++ /* setup channel number */ ++ if (channel > 7) ++ reg_adc1 |= MC13783_ADC1_ADSEL; ++ ++ switch (mode) { ++ case MC13783_ADC_MODE_TS: ++ /* enables touch screen reference mode and set touchscreen mode ++ * to position mode */ ++ reg_adc0 |= MC13783_ADC0_ADREFEN | MC13783_ADC0_ADREFMODE ++ | MC13783_ADC0_TSMOD0 | MC13783_ADC0_TSMOD1; ++ reg_adc1 |= 4 << MC13783_ADC1_CHAN1_SHIFT; ++ break; ++ case MC13783_ADC_MODE_SINGLE_CHAN: ++ reg_adc1 |= (channel & 0x7) << MC13783_ADC1_CHAN0_SHIFT; ++ reg_adc1 |= MC13783_ADC1_RAND; ++ break; ++ case MC13783_ADC_MODE_MULT_CHAN: ++ reg_adc1 |= 4 << MC13783_ADC1_CHAN1_SHIFT; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ mc13783_reg_write(mc13783, MC13783_REG_ADC_0, reg_adc0); ++ mc13783_reg_write(mc13783, MC13783_REG_ADC_1, reg_adc1); ++ ++ wait_for_completion_interruptible(&mc13783->adc_done); ++ ++ for (i = 0; i < 4; i++) ++ mc13783_reg_read(mc13783, MC13783_REG_ADC_2, &sample[i]); ++ ++ if (mc13783->ts_active) ++ mc13783_adc_set_ts_irq_mode(mc13783); ++ ++ mutex_unlock(&mc13783->adc_conv_lock); ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(mc13783_adc_do_conversion); ++ ++void mc13783_adc_set_ts_status(struct mc13783 *mc13783, unsigned int status) ++{ ++ mc13783->ts_active = status; ++} ++EXPORT_SYMBOL_GPL(mc13783_adc_set_ts_status); ++ ++static int mc13783_check_revision(struct mc13783 *mc13783) ++{ ++ u32 rev_id, rev1, rev2, finid, icid; ++ ++ mc13783_read(mc13783, MC13783_REG_REVISION, &rev_id); ++ ++ rev1 = (rev_id & 0x018) >> 3; ++ rev2 = (rev_id & 0x007); ++ icid = (rev_id & 0x01C0) >> 6; ++ finid = (rev_id & 0x01E00) >> 9; ++ ++ /* Ver 0.2 is actually 3.2a. Report as 3.2 */ ++ if ((rev1 == 0) && (rev2 == 2)) ++ rev1 = 3; ++ ++ if (rev1 == 0 || icid != 2) { ++ dev_err(mc13783->dev, "No MC13783 detected.\n"); ++ return -ENODEV; ++ } ++ ++ mc13783->revision = ((rev1 * 10) + rev2); ++ dev_info(mc13783->dev, "MC13783 Rev %d.%d FinVer %x detected\n", rev1, ++ rev2, finid); ++ ++ return 0; ++} ++ ++/* ++ * Register a client device. This is non-fatal since there is no need to ++ * fail the entire device init due to a single platform device failing. ++ */ ++static void mc13783_client_dev_register(struct mc13783 *mc13783, ++ const char *name) ++{ ++ struct mfd_cell cell = {}; ++ ++ cell.name = name; ++ ++ mfd_add_devices(mc13783->dev, -1, &cell, 1, NULL, 0); ++} ++ ++static int __devinit mc13783_probe(struct spi_device *spi) ++{ ++ struct mc13783 *mc13783; ++ struct mc13783_platform_data *pdata = spi->dev.platform_data; ++ int ret; ++ ++ mc13783 = kzalloc(sizeof(struct mc13783), GFP_KERNEL); ++ if (!mc13783) ++ return -ENOMEM; ++ ++ dev_set_drvdata(&spi->dev, mc13783); ++ spi->mode = SPI_MODE_0 | SPI_CS_HIGH; ++ spi->bits_per_word = 32; ++ spi_setup(spi); ++ ++ mc13783->spi_device = spi; ++ mc13783->dev = &spi->dev; ++ mc13783->irq = spi->irq; ++ ++ INIT_WORK(&mc13783->work, mc13783_irq_work); ++ mutex_init(&mc13783->io_lock); ++ mutex_init(&mc13783->adc_conv_lock); ++ init_completion(&mc13783->adc_done); ++ ++ if (pdata) { ++ mc13783->flags = pdata->flags; ++ mc13783->regulators = pdata->regulators; ++ mc13783->num_regulators = pdata->num_regulators; ++ } ++ ++ if (mc13783_check_revision(mc13783)) { ++ ret = -ENODEV; ++ goto err_out; ++ } ++ ++ /* clear and mask all interrupts */ ++ mc13783_reg_write(mc13783, MC13783_REG_INTERRUPT_STATUS_0, 0x00ffffff); ++ mc13783_reg_write(mc13783, MC13783_REG_INTERRUPT_MASK_0, 0x00ffffff); ++ mc13783_reg_write(mc13783, MC13783_REG_INTERRUPT_STATUS_1, 0x00ffffff); ++ mc13783_reg_write(mc13783, MC13783_REG_INTERRUPT_MASK_1, 0x00ffffff); ++ ++ /* unmask adcdone interrupts */ ++ mc13783_set_bits(mc13783, MC13783_REG_INTERRUPT_MASK_0, ++ MC13783_INT_MASK_ADCDONEM, 0); ++ ++ ret = request_irq(mc13783->irq, mc13783_interrupt, ++ IRQF_DISABLED | IRQF_TRIGGER_HIGH, "mc13783", ++ mc13783); ++ if (ret) ++ goto err_out; ++ ++ if (mc13783->flags & MC13783_USE_CODEC) ++ mc13783_client_dev_register(mc13783, "mc13783-codec"); ++ if (mc13783->flags & MC13783_USE_ADC) ++ mc13783_client_dev_register(mc13783, "mc13783-adc"); ++ if (mc13783->flags & MC13783_USE_RTC) ++ mc13783_client_dev_register(mc13783, "mc13783-rtc"); ++ if (mc13783->flags & MC13783_USE_REGULATOR) ++ mc13783_client_dev_register(mc13783, "mc13783-regulator"); ++ if (mc13783->flags & MC13783_USE_TOUCHSCREEN) ++ mc13783_client_dev_register(mc13783, "mc13783-ts"); ++ ++ return 0; ++ ++err_out: ++ kfree(mc13783); ++ return ret; ++} ++ ++static int __devexit mc13783_remove(struct spi_device *spi) ++{ ++ struct mc13783 *mc13783; ++ ++ mc13783 = dev_get_drvdata(&spi->dev); ++ ++ free_irq(mc13783->irq, mc13783); ++ ++ mfd_remove_devices(&spi->dev); ++ ++ return 0; ++} ++ ++static struct spi_driver pmic_driver = { ++ .driver = { ++ .name = "mc13783", ++ .bus = &spi_bus_type, ++ .owner = THIS_MODULE, ++ }, ++ .probe = mc13783_probe, ++ .remove = __devexit_p(mc13783_remove), ++}; ++ ++static int __init pmic_init(void) ++{ ++ return spi_register_driver(&pmic_driver); ++} ++subsys_initcall(pmic_init); ++ ++static void __exit pmic_exit(void) ++{ ++ spi_unregister_driver(&pmic_driver); ++} ++module_exit(pmic_exit); ++ ++MODULE_DESCRIPTION("Core/Protocol driver for Freescale MC13783 PMIC"); ++MODULE_AUTHOR("Sascha Hauer "); ++MODULE_LICENSE("GPL"); ++ +diff --git a/include/linux/mfd/mc13783-private.h b/include/linux/mfd/mc13783-private.h +new file mode 100644 +index 0000000..47e698c +--- /dev/null ++++ b/include/linux/mfd/mc13783-private.h +@@ -0,0 +1,396 @@ ++/* ++ * Copyright 2009 Pengutronix, Sascha Hauer ++ * ++ * Initial development of this code was funded by ++ * Phytec Messtechnik GmbH, http://www.phytec.de ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#ifndef __LINUX_MFD_MC13783_PRIV_H ++#define __LINUX_MFD_MC13783_PRIV_H ++ ++#include ++#include ++#include ++#include ++ ++struct mc13783_irq { ++ void (*handler)(int, void *); ++ void *data; ++}; ++ ++#define MC13783_NUM_IRQ 2 ++#define MC13783_IRQ_TS 0 ++#define MC13783_IRQ_REGULATOR 1 ++ ++#define MC13783_ADC_MODE_TS 1 ++#define MC13783_ADC_MODE_SINGLE_CHAN 2 ++#define MC13783_ADC_MODE_MULT_CHAN 3 ++ ++struct mc13783 { ++ int revision; ++ struct device *dev; ++ struct spi_device *spi_device; ++ ++ int (*read_dev)(void *data, char reg, int count, u32 *dst); ++ int (*write_dev)(void *data, char reg, int count, const u32 *src); ++ ++ struct mutex io_lock; ++ void *io_data; ++ int irq; ++ unsigned int flags; ++ ++ struct mc13783_irq irq_handler[MC13783_NUM_IRQ]; ++ struct work_struct work; ++ struct completion adc_done; ++ unsigned int ts_active; ++ struct mutex adc_conv_lock; ++ ++ struct mc13783_regulator_init_data *regulators; ++ int num_regulators; ++}; ++ ++int mc13783_reg_read(struct mc13783 *, int reg_num, u32 *); ++int mc13783_reg_write(struct mc13783 *, int, u32); ++int mc13783_set_bits(struct mc13783 *, int, u32, u32); ++int mc13783_free_irq(struct mc13783 *mc13783, int irq); ++int mc13783_register_irq(struct mc13783 *mc13783, int irq, ++ void (*handler) (int, void *), void *data); ++ ++#define MC13783_REG_INTERRUPT_STATUS_0 0 ++#define MC13783_REG_INTERRUPT_MASK_0 1 ++#define MC13783_REG_INTERRUPT_SENSE_0 2 ++#define MC13783_REG_INTERRUPT_STATUS_1 3 ++#define MC13783_REG_INTERRUPT_MASK_1 4 ++#define MC13783_REG_INTERRUPT_SENSE_1 5 ++#define MC13783_REG_POWER_UP_MODE_SENSE 6 ++#define MC13783_REG_REVISION 7 ++#define MC13783_REG_SEMAPHORE 8 ++#define MC13783_REG_ARBITRATION_PERIPHERAL_AUDIO 9 ++#define MC13783_REG_ARBITRATION_SWITCHERS 10 ++#define MC13783_REG_ARBITRATION_REGULATORS_0 11 ++#define MC13783_REG_ARBITRATION_REGULATORS_1 12 ++#define MC13783_REG_POWER_CONTROL_0 13 ++#define MC13783_REG_POWER_CONTROL_1 14 ++#define MC13783_REG_POWER_CONTROL_2 15 ++#define MC13783_REG_REGEN_ASSIGNMENT 16 ++#define MC13783_REG_CONTROL_SPARE 17 ++#define MC13783_REG_MEMORY_A 18 ++#define MC13783_REG_MEMORY_B 19 ++#define MC13783_REG_RTC_TIME 20 ++#define MC13783_REG_RTC_ALARM 21 ++#define MC13783_REG_RTC_DAY 22 ++#define MC13783_REG_RTC_DAY_ALARM 23 ++#define MC13783_REG_SWITCHERS_0 24 ++#define MC13783_REG_SWITCHERS_1 25 ++#define MC13783_REG_SWITCHERS_2 26 ++#define MC13783_REG_SWITCHERS_3 27 ++#define MC13783_REG_SWITCHERS_4 28 ++#define MC13783_REG_SWITCHERS_5 29 ++#define MC13783_REG_REGULATOR_SETTING_0 30 ++#define MC13783_REG_REGULATOR_SETTING_1 31 ++#define MC13783_REG_REGULATOR_MODE_0 32 ++#define MC13783_REG_REGULATOR_MODE_1 33 ++#define MC13783_REG_POWER_MISCELLANEOUS 34 ++#define MC13783_REG_POWER_SPARE 35 ++#define MC13783_REG_AUDIO_RX_0 36 ++#define MC13783_REG_AUDIO_RX_1 37 ++#define MC13783_REG_AUDIO_TX 38 ++#define MC13783_REG_AUDIO_SSI_NETWORK 39 ++#define MC13783_REG_AUDIO_CODEC 40 ++#define MC13783_REG_AUDIO_STEREO_DAC 41 ++#define MC13783_REG_AUDIO_SPARE 42 ++#define MC13783_REG_ADC_0 43 ++#define MC13783_REG_ADC_1 44 ++#define MC13783_REG_ADC_2 45 ++#define MC13783_REG_ADC_3 46 ++#define MC13783_REG_ADC_4 47 ++#define MC13783_REG_CHARGER 48 ++#define MC13783_REG_USB 49 ++#define MC13783_REG_CHARGE_USB_SPARE 50 ++#define MC13783_REG_LED_CONTROL_0 51 ++#define MC13783_REG_LED_CONTROL_1 52 ++#define MC13783_REG_LED_CONTROL_2 53 ++#define MC13783_REG_LED_CONTROL_3 54 ++#define MC13783_REG_LED_CONTROL_4 55 ++#define MC13783_REG_LED_CONTROL_5 56 ++#define MC13783_REG_SPARE 57 ++#define MC13783_REG_TRIM_0 58 ++#define MC13783_REG_TRIM_1 59 ++#define MC13783_REG_TEST_0 60 ++#define MC13783_REG_TEST_1 61 ++#define MC13783_REG_TEST_2 62 ++#define MC13783_REG_TEST_3 63 ++#define MC13783_REG_NB 64 ++ ++ ++/* ++ * Interrupt Status ++ */ ++#define MC13783_INT_STAT_ADCDONEI (1 << 0) ++#define MC13783_INT_STAT_ADCBISDONEI (1 << 1) ++#define MC13783_INT_STAT_TSI (1 << 2) ++#define MC13783_INT_STAT_WHIGHI (1 << 3) ++#define MC13783_INT_STAT_WLOWI (1 << 4) ++#define MC13783_INT_STAT_CHGDETI (1 << 6) ++#define MC13783_INT_STAT_CHGOVI (1 << 7) ++#define MC13783_INT_STAT_CHGREVI (1 << 8) ++#define MC13783_INT_STAT_CHGSHORTI (1 << 9) ++#define MC13783_INT_STAT_CCCVI (1 << 10) ++#define MC13783_INT_STAT_CHGCURRI (1 << 11) ++#define MC13783_INT_STAT_BPONI (1 << 12) ++#define MC13783_INT_STAT_LOBATLI (1 << 13) ++#define MC13783_INT_STAT_LOBATHI (1 << 14) ++#define MC13783_INT_STAT_UDPI (1 << 15) ++#define MC13783_INT_STAT_USBI (1 << 16) ++#define MC13783_INT_STAT_IDI (1 << 19) ++#define MC13783_INT_STAT_Unused (1 << 20) ++#define MC13783_INT_STAT_SE1I (1 << 21) ++#define MC13783_INT_STAT_CKDETI (1 << 22) ++#define MC13783_INT_STAT_UDMI (1 << 23) ++ ++/* ++ * Interrupt Mask ++ */ ++#define MC13783_INT_MASK_ADCDONEM (1 << 0) ++#define MC13783_INT_MASK_ADCBISDONEM (1 << 1) ++#define MC13783_INT_MASK_TSM (1 << 2) ++#define MC13783_INT_MASK_WHIGHM (1 << 3) ++#define MC13783_INT_MASK_WLOWM (1 << 4) ++#define MC13783_INT_MASK_CHGDETM (1 << 6) ++#define MC13783_INT_MASK_CHGOVM (1 << 7) ++#define MC13783_INT_MASK_CHGREVM (1 << 8) ++#define MC13783_INT_MASK_CHGSHORTM (1 << 9) ++#define MC13783_INT_MASK_CCCVM (1 << 10) ++#define MC13783_INT_MASK_CHGCURRM (1 << 11) ++#define MC13783_INT_MASK_BPONM (1 << 12) ++#define MC13783_INT_MASK_LOBATLM (1 << 13) ++#define MC13783_INT_MASK_LOBATHM (1 << 14) ++#define MC13783_INT_MASK_UDPM (1 << 15) ++#define MC13783_INT_MASK_USBM (1 << 16) ++#define MC13783_INT_MASK_IDM (1 << 19) ++#define MC13783_INT_MASK_SE1M (1 << 21) ++#define MC13783_INT_MASK_CKDETM (1 << 22) ++ ++/* ++ * Reg Regulator Mode 0 ++ */ ++#define MC13783_REGCTRL_VAUDIO_EN (1 << 0) ++#define MC13783_REGCTRL_VAUDIO_STBY (1 << 1) ++#define MC13783_REGCTRL_VAUDIO_MODE (1 << 2) ++#define MC13783_REGCTRL_VIOHI_EN (1 << 3) ++#define MC13783_REGCTRL_VIOHI_STBY (1 << 4) ++#define MC13783_REGCTRL_VIOHI_MODE (1 << 5) ++#define MC13783_REGCTRL_VIOLO_EN (1 << 6) ++#define MC13783_REGCTRL_VIOLO_STBY (1 << 7) ++#define MC13783_REGCTRL_VIOLO_MODE (1 << 8) ++#define MC13783_REGCTRL_VDIG_EN (1 << 9) ++#define MC13783_REGCTRL_VDIG_STBY (1 << 10) ++#define MC13783_REGCTRL_VDIG_MODE (1 << 11) ++#define MC13783_REGCTRL_VGEN_EN (1 << 12) ++#define MC13783_REGCTRL_VGEN_STBY (1 << 13) ++#define MC13783_REGCTRL_VGEN_MODE (1 << 14) ++#define MC13783_REGCTRL_VRFDIG_EN (1 << 15) ++#define MC13783_REGCTRL_VRFDIG_STBY (1 << 16) ++#define MC13783_REGCTRL_VRFDIG_MODE (1 << 17) ++#define MC13783_REGCTRL_VRFREF_EN (1 << 18) ++#define MC13783_REGCTRL_VRFREF_STBY (1 << 19) ++#define MC13783_REGCTRL_VRFREF_MODE (1 << 20) ++#define MC13783_REGCTRL_VRFCP_EN (1 << 21) ++#define MC13783_REGCTRL_VRFCP_STBY (1 << 22) ++#define MC13783_REGCTRL_VRFCP_MODE (1 << 23) ++ ++/* ++ * Reg Regulator Mode 1 ++ */ ++#define MC13783_REGCTRL_VSIM_EN (1 << 0) ++#define MC13783_REGCTRL_VSIM_STBY (1 << 1) ++#define MC13783_REGCTRL_VSIM_MODE (1 << 2) ++#define MC13783_REGCTRL_VESIM_EN (1 << 3) ++#define MC13783_REGCTRL_VESIM_STBY (1 << 4) ++#define MC13783_REGCTRL_VESIM_MODE (1 << 5) ++#define MC13783_REGCTRL_VCAM_EN (1 << 6) ++#define MC13783_REGCTRL_VCAM_STBY (1 << 7) ++#define MC13783_REGCTRL_VCAM_MODE (1 << 8) ++#define MC13783_REGCTRL_VRFBG_EN (1 << 9) ++#define MC13783_REGCTRL_VRFBG_STBY (1 << 10) ++#define MC13783_REGCTRL_VVIB_EN (1 << 11) ++#define MC13783_REGCTRL_VRF1_EN (1 << 12) ++#define MC13783_REGCTRL_VRF1_STBY (1 << 13) ++#define MC13783_REGCTRL_VRF1_MODE (1 << 14) ++#define MC13783_REGCTRL_VRF2_EN (1 << 15) ++#define MC13783_REGCTRL_VRF2_STBY (1 << 16) ++#define MC13783_REGCTRL_VRF2_MODE (1 << 17) ++#define MC13783_REGCTRL_VMMC1_EN (1 << 18) ++#define MC13783_REGCTRL_VMMC1_STBY (1 << 19) ++#define MC13783_REGCTRL_VMMC1_MODE (1 << 20) ++#define MC13783_REGCTRL_VMMC2_EN (1 << 21) ++#define MC13783_REGCTRL_VMMC2_STBY (1 << 22) ++#define MC13783_REGCTRL_VMMC2_MODE (1 << 23) ++ ++/* ++ * Reg Regulator Misc. ++ */ ++#define MC13783_REGCTRL_GPO1_EN (1 << 6) ++#define MC13783_REGCTRL_GPO2_EN (1 << 8) ++#define MC13783_REGCTRL_GPO3_EN (1 << 10) ++#define MC13783_REGCTRL_GPO4_EN (1 << 12) ++#define MC13783_REGCTRL_VIBPINCTRL (1 << 14) ++ ++/* ++ * Reg Switcher 4 ++ */ ++#define MC13783_SWCTRL_SW1A_MODE (1 << 0) ++#define MC13783_SWCTRL_SW1A_STBY_MODE (1 << 2) ++#define MC13783_SWCTRL_SW1A_DVS_SPEED (1 << 6) ++#define MC13783_SWCTRL_SW1A_PANIC_MODE (1 << 8) ++#define MC13783_SWCTRL_SW1A_SOFTSTART (1 << 9) ++#define MC13783_SWCTRL_SW1B_MODE (1 << 10) ++#define MC13783_SWCTRL_SW1B_STBY_MODE (1 << 12) ++#define MC13783_SWCTRL_SW1B_DVS_SPEED (1 << 14) ++#define MC13783_SWCTRL_SW1B_PANIC_MODE (1 << 16) ++#define MC13783_SWCTRL_SW1B_SOFTSTART (1 << 17) ++#define MC13783_SWCTRL_PLL_EN (1 << 18) ++#define MC13783_SWCTRL_PLL_FACTOR (1 << 19) ++ ++/* ++ * Reg Switcher 5 ++ */ ++#define MC13783_SWCTRL_SW2A_MODE (1 << 0) ++#define MC13783_SWCTRL_SW2A_STBY_MODE (1 << 2) ++#define MC13783_SWCTRL_SW2A_DVS_SPEED (1 << 6) ++#define MC13783_SWCTRL_SW2A_PANIC_MODE (1 << 8) ++#define MC13783_SWCTRL_SW2A_SOFTSTART (1 << 9) ++#define MC13783_SWCTRL_SW2B_MODE (1 << 10) ++#define MC13783_SWCTRL_SW2B_STBY_MODE (1 << 12) ++#define MC13783_SWCTRL_SW2B_DVS_SPEED (1 << 14) ++#define MC13783_SWCTRL_SW2B_PANIC_MODE (1 << 16) ++#define MC13783_SWCTRL_SW2B_SOFTSTART (1 << 17) ++#define MC13783_SWSET_SW3 (1 << 18) ++#define MC13783_SWCTRL_SW3_EN (1 << 20) ++#define MC13783_SWCTRL_SW3_STBY (1 << 21) ++#define MC13783_SWCTRL_SW3_MODE (1 << 22) ++ ++/* ++ * ADC/Touch ++ */ ++#define MC13783_ADC0_LICELLCON (1 << 0) ++#define MC13783_ADC0_CHRGICON (1 << 1) ++#define MC13783_ADC0_BATICON (1 << 2) ++#define MC13783_ADC0_RTHEN (1 << 3) ++#define MC13783_ADC0_DTHEN (1 << 4) ++#define MC13783_ADC0_UIDEN (1 << 5) ++#define MC13783_ADC0_ADOUTEN (1 << 6) ++#define MC13783_ADC0_ADOUTPER (1 << 7) ++#define MC13783_ADC0_ADREFEN (1 << 10) ++#define MC13783_ADC0_ADREFMODE (1 << 11) ++#define MC13783_ADC0_TSMOD0 (1 << 12) ++#define MC13783_ADC0_TSMOD1 (1 << 13) ++#define MC13783_ADC0_TSMOD2 (1 << 14) ++#define MC13783_ADC0_CHRGRAWDIV (1 << 15) ++#define MC13783_ADC0_ADINC1 (1 << 16) ++#define MC13783_ADC0_ADINC2 (1 << 17) ++#define MC13783_ADC0_WCOMP (1 << 18) ++#define MC13783_ADC0_ADCBIS0 (1 << 23) ++ ++#define MC13783_ADC1_ADEN (1 << 0) ++#define MC13783_ADC1_RAND (1 << 1) ++#define MC13783_ADC1_ADSEL (1 << 3) ++#define MC13783_ADC1_TRIGMASK (1 << 4) ++#define MC13783_ADC1_ADA10 (1 << 5) ++#define MC13783_ADC1_ADA11 (1 << 6) ++#define MC13783_ADC1_ADA12 (1 << 7) ++#define MC13783_ADC1_ADA20 (1 << 8) ++#define MC13783_ADC1_ADA21 (1 << 9) ++#define MC13783_ADC1_ADA22 (1 << 10) ++#define MC13783_ADC1_ATO0 (1 << 11) ++#define MC13783_ADC1_ATO1 (1 << 12) ++#define MC13783_ADC1_ATO2 (1 << 13) ++#define MC13783_ADC1_ATO3 (1 << 14) ++#define MC13783_ADC1_ATO4 (1 << 15) ++#define MC13783_ADC1_ATO5 (1 << 16) ++#define MC13783_ADC1_ATO6 (1 << 17) ++#define MC13783_ADC1_ATO7 (1 << 18) ++#define MC13783_ADC1_ATOX (1 << 19) ++#define MC13783_ADC1_ASC (1 << 20) ++#define MC13783_ADC1_ADTRIGIGN (1 << 21) ++#define MC13783_ADC1_ADONESHOT (1 << 22) ++#define MC13783_ADC1_ADCBIS1 (1 << 23) ++ ++#define MC13783_ADC1_CHAN0_SHIFT 5 ++#define MC13783_ADC1_CHAN1_SHIFT 8 ++ ++#define MC13783_ADC2_ADD10 (1 << 2) ++#define MC13783_ADC2_ADD11 (1 << 3) ++#define MC13783_ADC2_ADD12 (1 << 4) ++#define MC13783_ADC2_ADD13 (1 << 5) ++#define MC13783_ADC2_ADD14 (1 << 6) ++#define MC13783_ADC2_ADD15 (1 << 7) ++#define MC13783_ADC2_ADD16 (1 << 8) ++#define MC13783_ADC2_ADD17 (1 << 9) ++#define MC13783_ADC2_ADD18 (1 << 10) ++#define MC13783_ADC2_ADD19 (1 << 11) ++#define MC13783_ADC2_ADD20 (1 << 14) ++#define MC13783_ADC2_ADD21 (1 << 15) ++#define MC13783_ADC2_ADD22 (1 << 16) ++#define MC13783_ADC2_ADD23 (1 << 17) ++#define MC13783_ADC2_ADD24 (1 << 18) ++#define MC13783_ADC2_ADD25 (1 << 19) ++#define MC13783_ADC2_ADD26 (1 << 20) ++#define MC13783_ADC2_ADD27 (1 << 21) ++#define MC13783_ADC2_ADD28 (1 << 22) ++#define MC13783_ADC2_ADD29 (1 << 23) ++ ++#define MC13783_ADC3_WHIGH0 (1 << 0) ++#define MC13783_ADC3_WHIGH1 (1 << 1) ++#define MC13783_ADC3_WHIGH2 (1 << 2) ++#define MC13783_ADC3_WHIGH3 (1 << 3) ++#define MC13783_ADC3_WHIGH4 (1 << 4) ++#define MC13783_ADC3_WHIGH5 (1 << 5) ++#define MC13783_ADC3_ICID0 (1 << 6) ++#define MC13783_ADC3_ICID1 (1 << 7) ++#define MC13783_ADC3_ICID2 (1 << 8) ++#define MC13783_ADC3_WLOW0 (1 << 9) ++#define MC13783_ADC3_WLOW1 (1 << 10) ++#define MC13783_ADC3_WLOW2 (1 << 11) ++#define MC13783_ADC3_WLOW3 (1 << 12) ++#define MC13783_ADC3_WLOW4 (1 << 13) ++#define MC13783_ADC3_WLOW5 (1 << 14) ++#define MC13783_ADC3_ADCBIS2 (1 << 23) ++ ++#define MC13783_ADC4_ADDBIS10 (1 << 2) ++#define MC13783_ADC4_ADDBIS11 (1 << 3) ++#define MC13783_ADC4_ADDBIS12 (1 << 4) ++#define MC13783_ADC4_ADDBIS13 (1 << 5) ++#define MC13783_ADC4_ADDBIS14 (1 << 6) ++#define MC13783_ADC4_ADDBIS15 (1 << 7) ++#define MC13783_ADC4_ADDBIS16 (1 << 8) ++#define MC13783_ADC4_ADDBIS17 (1 << 9) ++#define MC13783_ADC4_ADDBIS18 (1 << 10) ++#define MC13783_ADC4_ADDBIS19 (1 << 11) ++#define MC13783_ADC4_ADDBIS20 (1 << 14) ++#define MC13783_ADC4_ADDBIS21 (1 << 15) ++#define MC13783_ADC4_ADDBIS22 (1 << 16) ++#define MC13783_ADC4_ADDBIS23 (1 << 17) ++#define MC13783_ADC4_ADDBIS24 (1 << 18) ++#define MC13783_ADC4_ADDBIS25 (1 << 19) ++#define MC13783_ADC4_ADDBIS26 (1 << 20) ++#define MC13783_ADC4_ADDBIS27 (1 << 21) ++#define MC13783_ADC4_ADDBIS28 (1 << 22) ++#define MC13783_ADC4_ADDBIS29 (1 << 23) ++ ++#endif /* __LINUX_MFD_MC13783_PRIV_H */ ++ +diff --git a/include/linux/mfd/mc13783.h b/include/linux/mfd/mc13783.h +new file mode 100644 +index 0000000..b3a2a72 +--- /dev/null ++++ b/include/linux/mfd/mc13783.h +@@ -0,0 +1,84 @@ ++/* ++ * Copyright 2009 Pengutronix, Sascha Hauer ++ * ++ * Initial development of this code was funded by ++ * Phytec Messtechnik GmbH, http://www.phytec.de ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#ifndef __INCLUDE_LINUX_MFD_MC13783_H ++#define __INCLUDE_LINUX_MFD_MC13783_H ++ ++struct mc13783; ++struct regulator_init_data; ++ ++struct mc13783_regulator_init_data { ++ int id; ++ struct regulator_init_data *init_data; ++}; ++ ++struct mc13783_platform_data { ++ struct mc13783_regulator_init_data *regulators; ++ int num_regulators; ++ unsigned int flags; ++}; ++ ++/* mc13783_platform_data flags */ ++#define MC13783_USE_TOUCHSCREEN (1 << 0) ++#define MC13783_USE_CODEC (1 << 1) ++#define MC13783_USE_ADC (1 << 2) ++#define MC13783_USE_RTC (1 << 3) ++#define MC13783_USE_REGULATOR (1 << 4) ++ ++int mc13783_adc_do_conversion(struct mc13783 *mc13783, unsigned int mode, ++ unsigned int channel, unsigned int *sample); ++ ++void mc13783_adc_set_ts_status(struct mc13783 *mc13783, unsigned int status); ++ ++#define MC13783_SW_SW1A 0 ++#define MC13783_SW_SW1B 1 ++#define MC13783_SW_SW2A 2 ++#define MC13783_SW_SW2B 3 ++#define MC13783_SW_SW3 4 ++#define MC13783_SW_PLL 5 ++#define MC13783_REGU_VAUDIO 6 ++#define MC13783_REGU_VIOHI 7 ++#define MC13783_REGU_VIOLO 8 ++#define MC13783_REGU_VDIG 9 ++#define MC13783_REGU_VGEN 10 ++#define MC13783_REGU_VRFDIG 11 ++#define MC13783_REGU_VRFREF 12 ++#define MC13783_REGU_VRFCP 13 ++#define MC13783_REGU_VSIM 14 ++#define MC13783_REGU_VESIM 15 ++#define MC13783_REGU_VCAM 16 ++#define MC13783_REGU_VRFBG 17 ++#define MC13783_REGU_VVIB 18 ++#define MC13783_REGU_VRF1 19 ++#define MC13783_REGU_VRF2 20 ++#define MC13783_REGU_VMMC1 21 ++#define MC13783_REGU_VMMC2 22 ++#define MC13783_REGU_GPO1 23 ++#define MC13783_REGU_GPO2 24 ++#define MC13783_REGU_GPO3 25 ++#define MC13783_REGU_GPO4 26 ++#define MC13783_REGU_V1 27 ++#define MC13783_REGU_V2 28 ++#define MC13783_REGU_V3 29 ++#define MC13783_REGU_V4 30 ++ ++#endif /* __INCLUDE_LINUX_MFD_MC13783_H */ ++ +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0002-mxc_nand-cleanup-eccoob-descriptions.patch b/recipes/linux/linux-2.6.31/pcm043/0002-mxc_nand-cleanup-eccoob-descriptions.patch new file mode 100644 index 0000000000..f8258ac2b1 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0002-mxc_nand-cleanup-eccoob-descriptions.patch @@ -0,0 +1,111 @@ +From 6092478fe41d7b58212bc20808dd94ce6170f35b Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 21 Oct 2009 10:22:01 +0200 +Subject: [PATCH] mxc_nand: cleanup eccoob descriptions + +The original Freescale driver used to have eccoob descriptions like +this: + +static struct nand_ecclayout nand_hw_eccoob_8 = { + .eccbytes = 5, + .eccpos = {6, 7, 8, 9, 10}, + .oobfree = {{0, 5}, {11, 5}} +}; + +static struct nand_ecclayout nand_hw_eccoob_16 = { + .eccbytes = 5, + .eccpos = {6, 7, 8, 9, 10}, + .oobfree = {{0, 6}, {12, 4}} +}; + +The former was used for 8bit flashes and the latter for 16bit flashes. +They honored the fact that the bad block marker on 8bit flashes is on byte 5 +while on 16bit flashes it is on byte 11. +In the Kernel driver this was copied wrong and we ended up with two identical +descriptions. + +Change it so that we have only one description which leaves byte 5 and byte +11 unspecified so that it won't be used by others. + +Also, rename the descriptions to nand_hw_eccoob_smallpage and +nand_hw_eccoob_largepage so that it can't be confused with Nand chip bus +widths (what actually happened in this driver) + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 24 +++++++++--------------- + 1 files changed, 9 insertions(+), 15 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 76beea4..7a34679 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -129,19 +129,13 @@ struct mxc_nand_host { + #define SPARE_SINGLEBIT_ERROR 0x1 + + /* OOB placement block for use with hardware ecc generation */ +-static struct nand_ecclayout nand_hw_eccoob_8 = { ++static struct nand_ecclayout nand_hw_eccoob_smallpage = { + .eccbytes = 5, + .eccpos = {6, 7, 8, 9, 10}, +- .oobfree = {{0, 5}, {11, 5}, } ++ .oobfree = {{0, 5}, {12, 4}, } + }; + +-static struct nand_ecclayout nand_hw_eccoob_16 = { +- .eccbytes = 5, +- .eccpos = {6, 7, 8, 9, 10}, +- .oobfree = {{0, 5}, {11, 5}, } +-}; +- +-static struct nand_ecclayout nand_hw_eccoob_64 = { ++static struct nand_ecclayout nand_hw_eccoob_largepage = { + .eccbytes = 20, + .eccpos = {6, 7, 8, 9, 10, 22, 23, 24, 25, 26, + 38, 39, 40, 41, 42, 54, 55, 56, 57, 58}, +@@ -940,7 +934,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) + } else { + this->ecc.size = 512; + this->ecc.bytes = 3; +- this->ecc.layout = &nand_hw_eccoob_8; ++ this->ecc.layout = &nand_hw_eccoob_smallpage; + this->ecc.mode = NAND_ECC_SOFT; + tmp = readw(host->regs + NFC_CONFIG1); + tmp &= ~NFC_ECC_EN; +@@ -964,7 +958,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) + /* NAND bus width determines access funtions used by upper layer */ + if (pdata->width == 2) { + this->options |= NAND_BUSWIDTH_16; +- this->ecc.layout = &nand_hw_eccoob_16; ++ this->ecc.layout = &nand_hw_eccoob_smallpage; + } + + /* first scan to find the device and get the page size */ +@@ -978,20 +972,20 @@ static int __init mxcnd_probe(struct platform_device *pdev) + if (this->ecc.mode == NAND_ECC_HW) { + switch (mtd->oobsize) { + case 8: +- this->ecc.layout = &nand_hw_eccoob_8; ++ this->ecc.layout = &nand_hw_eccoob_smallpage; + break; + case 16: +- this->ecc.layout = &nand_hw_eccoob_16; ++ this->ecc.layout = &nand_hw_eccoob_smallpage; + break; + case 64: +- this->ecc.layout = &nand_hw_eccoob_64; ++ this->ecc.layout = &nand_hw_eccoob_largepage; + break; + default: + /* page size not handled by HW ECC */ + /* switching back to soft ECC */ + this->ecc.size = 512; + this->ecc.bytes = 3; +- this->ecc.layout = &nand_hw_eccoob_8; ++ this->ecc.layout = &nand_hw_eccoob_smallpage; + this->ecc.mode = NAND_ECC_SOFT; + this->ecc.calculate = NULL; + this->ecc.correct = NULL; +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0003-MXC-NFC-Add-a-real-NAND-flash-data-width-setup-func.patch b/recipes/linux/linux-2.6.31/pcm043/0003-MXC-NFC-Add-a-real-NAND-flash-data-width-setup-func.patch new file mode 100644 index 0000000000..5a526fa865 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0003-MXC-NFC-Add-a-real-NAND-flash-data-width-setup-func.patch @@ -0,0 +1,51 @@ +From e31e8120d5552c200785a6e2f1958d7f7643a675 Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 14:55:47 +0200 +Subject: [PATCH 03/15] MXC NFC: Add a real NAND flash data width setup function + +Provide a real subfunction to setup the NAND flash data width. + +Signed-off-by: Juergen Beisert +--- + drivers/mtd/nand/mxc_nand_v2.c | 15 ++++++++++++--- + 1 files changed, 12 insertions(+), 3 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand_v2.c b/drivers/mtd/nand/mxc_nand_v2.c +index 3483e7d..03d1ba4 100644 +--- a/drivers/mtd/nand/mxc_nand_v2.c ++++ b/drivers/mtd/nand/mxc_nand_v2.c +@@ -830,6 +830,14 @@ static void unlock_addr(struct mxc_nand_host *host, unsigned int start_addr, uns + BUG(); + } + ++static void __init mxc_data_width(struct mxc_nand_host *host, unsigned width) ++{ ++ if ((width != 8) && (width != 16)) { ++ BUG(); ++ } ++ /* TODO */ ++} ++ + static int __init mxcnd_probe(struct platform_device *pdev) + { + struct nand_chip *this; +@@ -898,12 +906,13 @@ static int __init mxcnd_probe(struct platform_device *pdev) + } else + BUG(); + +- /* NAND bus width determines access funtions used by upper layer */ ++ /* NAND bus width determines access functions used by upper layer */ + if (pdata->width == 2) { + this->read_byte = mxc_nand_read_byte16; + this->options |= NAND_BUSWIDTH_16; +- mxc_set_nfms(mtd, 1 << NFMS_NF_DWIDTH); +- } ++ mxc_data_width(host, 16); ++ } else ++ mxc_data_width(host, 8); + + init_waitqueue_head(&host->irq_waitq); + +-- +1.6.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0003-mx3-Add-SSI-pins-to-iomux-table.patch b/recipes/linux/linux-2.6.31/pcm043/0003-mx3-Add-SSI-pins-to-iomux-table.patch new file mode 100644 index 0000000000..c1e9ab0c1d --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0003-mx3-Add-SSI-pins-to-iomux-table.patch @@ -0,0 +1,48 @@ +From f1f19d863e177c09ca93ee960aa615701649dc9b Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 12 Nov 2009 14:02:22 +0100 +Subject: [PATCH 03/28] mx3: Add SSI pins to iomux table + +Signed-off-by: Sascha Hauer +--- + arch/arm/plat-mxc/include/mach/iomux-mx3.h | 24 ++++++++++++++++++++++++ + 1 files changed, 24 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-mxc/include/mach/iomux-mx3.h b/arch/arm/plat-mxc/include/mach/iomux-mx3.h +index 2eb182f..0fb1ad5 100644 +--- a/arch/arm/plat-mxc/include/mach/iomux-mx3.h ++++ b/arch/arm/plat-mxc/include/mach/iomux-mx3.h +@@ -669,6 +669,30 @@ enum iomux_pins { + #define MX31_PIN_GPIO3_0__GPIO3_0 IOMUX_MODE(MX31_PIN_GPIO3_0, IOMUX_CONFIG_GPIO) + #define MX31_PIN_GPIO3_1__GPIO3_1 IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO) + #define MX31_PIN_TXD2__GPIO1_28 IOMUX_MODE(MX31_PIN_TXD2, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_GPIO1_0__GPIO1_0 IOMUX_MODE(MX31_PIN_GPIO1_0, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_SVEN0__GPIO2_0 IOMUX_MODE(MX31_PIN_SVEN0, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_STX0__GPIO2_1 IOMUX_MODE(MX31_PIN_STX0, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_SRX0__GPIO2_2 IOMUX_MODE(MX31_PIN_SRX0, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_SIMPD0__GPIO2_3 IOMUX_MODE(MX31_PIN_SIMPD0, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_DTR_DCE1__GPIO2_8 IOMUX_MODE(MX31_PIN_DTR_DCE1, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_DSR_DCE1__GPIO2_9 IOMUX_MODE(MX31_PIN_DSR_DCE1, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_RI_DCE1__GPIO2_10 IOMUX_MODE(MX31_PIN_RI_DCE1, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_DCD_DCE1__GPIO2_11 IOMUX_MODE(MX31_PIN_DCD_DCE1, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_STXD5__GPIO1_21 IOMUX_MODE(MX31_PIN_STXD5, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_SRXD5__GPIO1_22 IOMUX_MODE(MX31_PIN_SRXD5, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_GPIO1_3__GPIO1_3 IOMUX_MODE(MX31_PIN_GPIO1_3, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_CSPI2_SS1__CSPI3_SS1 IOMUX_MODE(MX31_PIN_CSPI2_SS1, IOMUX_CONFIG_ALT1) ++#define MX31_PIN_RTS1__GPIO2_6 IOMUX_MODE(MX31_PIN_RTS1, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_CTS1__GPIO2_7 IOMUX_MODE(MX31_PIN_CTS1, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_LCS0__GPIO3_23 IOMUX_MODE(MX31_PIN_LCS0, IOMUX_CONFIG_GPIO) ++#define MX31_PIN_STXD4__STXD4 IOMUX_MODE(MX31_PIN_STXD4, IOMUX_CONFIG_FUNC) ++#define MX31_PIN_SRXD4__SRXD4 IOMUX_MODE(MX31_PIN_SRXD4, IOMUX_CONFIG_FUNC) ++#define MX31_PIN_SCK4__SCK4 IOMUX_MODE(MX31_PIN_SCK4, IOMUX_CONFIG_FUNC) ++#define MX31_PIN_SFS4__SFS4 IOMUX_MODE(MX31_PIN_SFS4, IOMUX_CONFIG_FUNC) ++#define MX31_PIN_STXD5__STXD5 IOMUX_MODE(MX31_PIN_STXD5, IOMUX_CONFIG_FUNC) ++#define MX31_PIN_SRXD5__SRXD5 IOMUX_MODE(MX31_PIN_SRXD5, IOMUX_CONFIG_FUNC) ++#define MX31_PIN_SCK5__SCK5 IOMUX_MODE(MX31_PIN_SCK5, IOMUX_CONFIG_FUNC) ++#define MX31_PIN_SFS5__SFS5 IOMUX_MODE(MX31_PIN_SFS5, IOMUX_CONFIG_FUNC) + + /*XXX: The SS0, SS1, SS2, SS3 lines of spi3 are multiplexed by cspi2_ss0, cspi2_ss1, cspi1_ss0 + * cspi1_ss1*/ +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0003-mxc_nand-cleanup-initialization.patch b/recipes/linux/linux-2.6.31/pcm043/0003-mxc_nand-cleanup-initialization.patch new file mode 100644 index 0000000000..f437724622 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0003-mxc_nand-cleanup-initialization.patch @@ -0,0 +1,124 @@ +From 4521787dcf7e16910e5a0e0ac817283b14e5f11b Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 21 Oct 2009 10:39:05 +0200 +Subject: [PATCH] mxc_nand: cleanup initialization + +The oob layout was initialized several times. Instead, use +a smallpage layout by default and switch to a largepage +afterwards if necessary. + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 72 +++++++++++++----------------------------- + 1 files changed, 22 insertions(+), 50 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 7a34679..b28e5f9 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -921,45 +921,42 @@ static int __init mxcnd_probe(struct platform_device *pdev) + if (err) + goto eirq; + ++ /* Reset NAND */ ++ this->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); ++ ++ /* preset operation */ ++ /* Unlock the internal RAM Buffer */ ++ writew(0x2, host->regs + NFC_CONFIG); ++ ++ /* Blocks to be unlocked */ ++ writew(0x0, host->regs + NFC_UNLOCKSTART_BLKADDR); ++ writew(0x4000, host->regs + NFC_UNLOCKEND_BLKADDR); ++ ++ /* Unlock Block Command for given address range */ ++ writew(0x4, host->regs + NFC_WRPROT); ++ ++ this->ecc.size = 512; ++ this->ecc.bytes = 3; ++ this->ecc.layout = &nand_hw_eccoob_smallpage; ++ + if (pdata->hw_ecc) { + this->ecc.calculate = mxc_nand_calculate_ecc; + this->ecc.hwctl = mxc_nand_enable_hwecc; + this->ecc.correct = mxc_nand_correct_data; + this->ecc.mode = NAND_ECC_HW; +- this->ecc.size = 512; +- this->ecc.bytes = 3; + tmp = readw(host->regs + NFC_CONFIG1); + tmp |= NFC_ECC_EN; + writew(tmp, host->regs + NFC_CONFIG1); + } else { +- this->ecc.size = 512; +- this->ecc.bytes = 3; +- this->ecc.layout = &nand_hw_eccoob_smallpage; + this->ecc.mode = NAND_ECC_SOFT; + tmp = readw(host->regs + NFC_CONFIG1); + tmp &= ~NFC_ECC_EN; + writew(tmp, host->regs + NFC_CONFIG1); + } + +- /* Reset NAND */ +- this->cmdfunc(mtd, NAND_CMD_RESET, -1, -1); +- +- /* preset operation */ +- /* Unlock the internal RAM Buffer */ +- writew(0x2, host->regs + NFC_CONFIG); +- +- /* Blocks to be unlocked */ +- writew(0x0, host->regs + NFC_UNLOCKSTART_BLKADDR); +- writew(0x4000, host->regs + NFC_UNLOCKEND_BLKADDR); +- +- /* Unlock Block Command for given address range */ +- writew(0x4, host->regs + NFC_WRPROT); +- + /* NAND bus width determines access funtions used by upper layer */ +- if (pdata->width == 2) { ++ if (pdata->width == 2) + this->options |= NAND_BUSWIDTH_16; +- this->ecc.layout = &nand_hw_eccoob_smallpage; +- } + + /* first scan to find the device and get the page size */ + if (nand_scan_ident(mtd, 1)) { +@@ -967,34 +964,9 @@ static int __init mxcnd_probe(struct platform_device *pdev) + goto escan; + } + +- host->pagesize_2k = (mtd->writesize == 2048) ? 1 : 0; +- +- if (this->ecc.mode == NAND_ECC_HW) { +- switch (mtd->oobsize) { +- case 8: +- this->ecc.layout = &nand_hw_eccoob_smallpage; +- break; +- case 16: +- this->ecc.layout = &nand_hw_eccoob_smallpage; +- break; +- case 64: +- this->ecc.layout = &nand_hw_eccoob_largepage; +- break; +- default: +- /* page size not handled by HW ECC */ +- /* switching back to soft ECC */ +- this->ecc.size = 512; +- this->ecc.bytes = 3; +- this->ecc.layout = &nand_hw_eccoob_smallpage; +- this->ecc.mode = NAND_ECC_SOFT; +- this->ecc.calculate = NULL; +- this->ecc.correct = NULL; +- this->ecc.hwctl = NULL; +- tmp = readw(host->regs + NFC_CONFIG1); +- tmp &= ~NFC_ECC_EN; +- writew(tmp, host->regs + NFC_CONFIG1); +- break; +- } ++ if (mtd->writesize == 2048) { ++ host->pagesize_2k = 1; ++ this->ecc.layout = &nand_hw_eccoob_largepage; + } + + /* second phase scan */ +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0004-MXC-NFC-Use-generic-bad-block-detection.patch b/recipes/linux/linux-2.6.31/pcm043/0004-MXC-NFC-Use-generic-bad-block-detection.patch new file mode 100644 index 0000000000..2c5c37fd1c --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0004-MXC-NFC-Use-generic-bad-block-detection.patch @@ -0,0 +1,148 @@ +From 344bc7de5f142e95a524fe2019b51344d9aa3ea7 Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 15:04:11 +0200 +Subject: [PATCH 04/15] MXC NFC: Use generic bad block detection + +There is no need to provide a local bad block detection. The generic +one does a correct job. Due to hardware based ECC we must provide +a local nand_bbt_descr structure, because the generic one conflicts +with our ECC sum byte locations. + +Signed-off-by: Juergen Beisert +--- + drivers/mtd/nand/mxc_nand_v2.c | 98 ++++----------------------------------- + 1 files changed, 10 insertions(+), 88 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand_v2.c b/drivers/mtd/nand/mxc_nand_v2.c +index 03d1ba4..6b1eeb9 100644 +--- a/drivers/mtd/nand/mxc_nand_v2.c ++++ b/drivers/mtd/nand/mxc_nand_v2.c +@@ -708,26 +708,10 @@ static void mxc_nand_write_page(struct mtd_info *mtd, struct nand_chip *chip, + memcpy(host->data_buf + mtd->writesize, chip->oob_poi, mtd->oobsize); + } + +-/* Define some generic bad / good block scan pattern which are used +- * while scanning a device for factory marked good / bad blocks. */ +-static uint8_t scan_ff_pattern[] = { 0xff, 0xff }; +- +-static struct nand_bbt_descr smallpage_memorybased = { +- .options = NAND_BBT_SCAN2NDPAGE, +- .offs = 5, +- .len = 1, +- .pattern = scan_ff_pattern +-}; +- +-static struct nand_bbt_descr largepage_memorybased = { +- .options = 0, +- .offs = 0, +- .len = 2, +- .pattern = scan_ff_pattern +-}; +- +-/* Generic flash bbt decriptors +-*/ ++/* ++ * We must provide a private bbt decriptor, because the settings from ++ * the generic one collide with our ECC hardware. ++ */ + static uint8_t bbt_pattern[] = { 'B', 'b', 't', '0' }; + static uint8_t mirror_pattern[] = { '1', 't', 'b', 'B' }; + +@@ -751,73 +735,6 @@ static struct nand_bbt_descr bbt_mirror_descr = { + .pattern = mirror_pattern + }; + +-static void mxc_set_nfms_v21(struct mtd_info *mtd, unsigned int val) +-{ +- struct nand_chip *this = mtd->priv; +- struct mxc_nand_host *host = this->priv; +- unsigned int spas, tmp; +- +-// NFMS |= val; /* FIXME */ +- +- if (val & (1 << NFMS_NF_PG_SZ)) { +- if (mtd->writesize == 2048) +- spas = NFC_SPAS_64; +- else if (mtd->writesize == 4096) +- spas = NFC_SPAS_128; +- else +- spas = NFC_SPAS_16; +- +- tmp = readw(host->regs + NFC_CONFIG1); +- tmp |= NFC_V2_ECC_MODE_4; +- writew(tmp, host->regs + NFC_CONFIG1); +- +- tmp = readw(host->regs + NFC_V21_SPAS); +- tmp &= NFC_V21_SPAS_MASK; +- tmp |= spas << NFC_V21_SPAS_SHIFT; +- writew(tmp, host->regs + NFC_V21_SPAS); +- } +-} +- +-static void mxc_set_nfms(struct mtd_info *mtd, unsigned int val) +-{ +- if (nfc_is_v21()) +- mxc_set_nfms_v21(mtd, val); +-} +- +-static int mxc_nand_scan_bbt(struct mtd_info *mtd) +-{ +- struct nand_chip *this = mtd->priv; +- struct mxc_nand_host *host = this->priv; +- +- if (mtd->writesize == 2048) { +- mxc_set_nfms(mtd, 1 << NFMS_NF_PG_SZ); +- this->ecc.layout = &nand_hw_eccoob_2k; +- } else if (mtd->writesize == 4096) { +- mxc_set_nfms(mtd, 1 << NFMS_NF_PG_SZ); +- this->ecc.layout = &nand_hw_eccoob_4k; +- } else { +- this->ecc.layout = &nand_hw_eccoob_512; +- } +- +- /* propagate ecc.layout to mtd_info */ +- mtd->ecclayout = this->ecc.layout; +- +- /* use flash based bbt */ +- this->bbt_td = &bbt_main_descr; +- this->bbt_md = &bbt_mirror_descr; +- +- /* update flash based bbt */ +- this->options |= NAND_USE_FLASH_BBT; +- +- if (!this->badblock_pattern) { +- this->badblock_pattern = (mtd->writesize > 512) ? +- &largepage_memorybased : &smallpage_memorybased; +- } +- +- /* Build bad block table */ +- return nand_scan_bbt(mtd, this->badblock_pattern); +-} +- + static void unlock_addr(struct mxc_nand_host *host, unsigned int start_addr, unsigned int end_addr) + { + if (nfc_is_v21()) { +@@ -870,7 +787,6 @@ static int __init mxcnd_probe(struct platform_device *pdev) + this->write_buf = mxc_nand_write_buf; + this->read_buf = mxc_nand_read_buf; + this->verify_buf = mxc_nand_verify_buf; +- this->scan_bbt = mxc_nand_scan_bbt; + + host->clk = clk_get(&pdev->dev, "nfc_clk"); + if (IS_ERR(host->clk)) { +@@ -958,6 +874,12 @@ static int __init mxcnd_probe(struct platform_device *pdev) + + clk_disable(host->clk); + ++ /* use flash based bbt */ ++ this->bbt_td = &bbt_main_descr; ++ this->bbt_md = &bbt_mirror_descr; ++ /* update flash based bbt */ ++ this->options |= NAND_USE_FLASH_BBT; ++ + /* Scan to find existence of the device */ + if (nand_scan(mtd, 1)) { + DEBUG(MTD_DEBUG_LEVEL0, +-- +1.6.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0004-mxc-iomux-v3-remove-resource-handling.patch b/recipes/linux/linux-2.6.31/pcm043/0004-mxc-iomux-v3-remove-resource-handling.patch new file mode 100644 index 0000000000..5f04c346bb --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0004-mxc-iomux-v3-remove-resource-handling.patch @@ -0,0 +1,111 @@ +From 88a85f7b168d6ee042ea2634414f2ffd43a99cff Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 29 Oct 2009 17:18:02 +0100 +Subject: [PATCH 04/28] mxc: iomux v3: remove resource handling + +The current model does not allow to put a pad into different modes +once a pins is allocated. Remove the resource handling. + +Signed-off-by: Sascha Hauer +--- + arch/arm/plat-mxc/include/mach/iomux-v3.h | 17 +------------- + arch/arm/plat-mxc/iomux-v3.c | 35 +--------------------------- + 2 files changed, 3 insertions(+), 49 deletions(-) + +diff --git a/arch/arm/plat-mxc/include/mach/iomux-v3.h b/arch/arm/plat-mxc/include/mach/iomux-v3.h +index 7cd8454..f23e579 100644 +--- a/arch/arm/plat-mxc/include/mach/iomux-v3.h ++++ b/arch/arm/plat-mxc/include/mach/iomux-v3.h +@@ -92,9 +92,7 @@ struct pad_desc { + #define PAD_CTL_SLEW_RATE_FAST 1 + + /* +- * setups a single pad: +- * - reserves the pad so that it is not claimed by another driver +- * - setups the iomux according to the configuration ++ * setups a single pad in the iomuxer + */ + int mxc_iomux_v3_setup_pad(struct pad_desc *pad); + +@@ -104,18 +102,5 @@ int mxc_iomux_v3_setup_pad(struct pad_desc *pad); + */ + int mxc_iomux_v3_setup_multiple_pads(struct pad_desc *pad_list, unsigned count); + +-/* +- * releases a single pad: +- * - make it available for a future use by another driver +- * - DOES NOT reconfigure the IOMUX in its reset state +- */ +-void mxc_iomux_v3_release_pad(struct pad_desc *pad); +- +-/* +- * releases multiple pads +- * convenvient way to call the above function with tables +- */ +-void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count); +- + #endif /* __MACH_IOMUX_V3_H__*/ + +diff --git a/arch/arm/plat-mxc/iomux-v3.c b/arch/arm/plat-mxc/iomux-v3.c +index 77a078f..4f0e7fc 100644 +--- a/arch/arm/plat-mxc/iomux-v3.c ++++ b/arch/arm/plat-mxc/iomux-v3.c +@@ -31,19 +31,11 @@ + + #define IOMUX_BASE IO_ADDRESS(IOMUXC_BASE_ADDR) + +-static unsigned long iomux_v3_pad_alloc_map[0x200 / BITS_PER_LONG]; +- + /* +- * setups a single pin: +- * - reserves the pin so that it is not claimed by another driver +- * - setups the iomux according to the configuration ++ * setups a single pad in the iomuxer + */ + int mxc_iomux_v3_setup_pad(struct pad_desc *pad) + { +- unsigned int pad_ofs = pad->pad_ctrl_ofs; +- +- if (test_and_set_bit(pad_ofs >> 2, iomux_v3_pad_alloc_map)) +- return -EBUSY; + if (pad->mux_ctrl_ofs) + __raw_writel(pad->mux_mode, IOMUX_BASE + pad->mux_ctrl_ofs); + +@@ -66,33 +58,10 @@ int mxc_iomux_v3_setup_multiple_pads(struct pad_desc *pad_list, unsigned count) + for (i = 0; i < count; i++) { + ret = mxc_iomux_v3_setup_pad(p); + if (ret) +- goto setup_error; ++ return ret; + p++; + } + return 0; +- +-setup_error: +- mxc_iomux_v3_release_multiple_pads(pad_list, i); +- return ret; + } + EXPORT_SYMBOL(mxc_iomux_v3_setup_multiple_pads); + +-void mxc_iomux_v3_release_pad(struct pad_desc *pad) +-{ +- unsigned int pad_ofs = pad->pad_ctrl_ofs; +- +- clear_bit(pad_ofs >> 2, iomux_v3_pad_alloc_map); +-} +-EXPORT_SYMBOL(mxc_iomux_v3_release_pad); +- +-void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count) +-{ +- struct pad_desc *p = pad_list; +- int i; +- +- for (i = 0; i < count; i++) { +- mxc_iomux_v3_release_pad(p); +- p++; +- } +-} +-EXPORT_SYMBOL(mxc_iomux_v3_release_multiple_pads); +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0004-mxc_nand-merge-send_read_page-and-send_prog_page.patch b/recipes/linux/linux-2.6.31/pcm043/0004-mxc_nand-merge-send_read_page-and-send_prog_page.patch new file mode 100644 index 0000000000..656e680d20 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0004-mxc_nand-merge-send_read_page-and-send_prog_page.patch @@ -0,0 +1,104 @@ +From 9d8a47b34ec9f2a75aefa3ea6e6bc3fa70888cda Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Tue, 2 Jun 2009 11:37:53 +0200 +Subject: [PATCH] mxc_nand: merge send_read_page and send_prog_page + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 54 ++++++++++-------------------------------- + 1 files changed, 13 insertions(+), 41 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index b28e5f9..56db5ac 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -226,12 +226,10 @@ static void send_addr(struct mxc_nand_host *host, uint16_t addr, int islast) + wait_op_done(host, TROP_US_DELAY, addr, islast); + } + +-/* This function requests the NANDFC to initate the transfer +- * of data currently in the NANDFC RAM buffer to the NAND device. */ +-static void send_prog_page(struct mxc_nand_host *host, uint8_t buf_id, +- int spare_only) ++static void send_page(struct mxc_nand_host *host, uint8_t buf_id, ++ int spare_only, unsigned int ops) + { +- DEBUG(MTD_DEBUG_LEVEL3, "send_prog_page (%d)\n", spare_only); ++ DEBUG(MTD_DEBUG_LEVEL3, "send_page (%d)\n", spare_only); + + /* NANDFC buffer 0 is used for page read/write */ + writew(buf_id, host->regs + NFC_BUF_ADDR); +@@ -246,33 +244,7 @@ static void send_prog_page(struct mxc_nand_host *host, uint8_t buf_id, + writew(config1, host->regs + NFC_CONFIG1); + } + +- writew(NFC_INPUT, host->regs + NFC_CONFIG2); +- +- /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, spare_only, true); +-} +- +-/* Requests NANDFC to initated the transfer of data from the +- * NAND device into in the NANDFC ram buffer. */ +-static void send_read_page(struct mxc_nand_host *host, uint8_t buf_id, +- int spare_only) +-{ +- DEBUG(MTD_DEBUG_LEVEL3, "send_read_page (%d)\n", spare_only); +- +- /* NANDFC buffer 0 is used for page read/write */ +- writew(buf_id, host->regs + NFC_BUF_ADDR); +- +- /* Configure spare or page+spare access */ +- if (!host->pagesize_2k) { +- uint32_t config1 = readw(host->regs + NFC_CONFIG1); +- if (spare_only) +- config1 |= NFC_SP_EN; +- else +- config1 &= ~NFC_SP_EN; +- writew(config1, host->regs + NFC_CONFIG1); +- } +- +- writew(NFC_OUTPUT, host->regs + NFC_CONFIG2); ++ writew(ops, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ + wait_op_done(host, TROP_US_DELAY, spare_only, true); +@@ -756,13 +728,13 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + break; + + case NAND_CMD_PAGEPROG: +- send_prog_page(host, 0, host->spare_only); ++ send_page(host, 0, host->spare_only, NFC_INPUT); + + if (host->pagesize_2k) { + /* data in 4 areas datas */ +- send_prog_page(host, 1, host->spare_only); +- send_prog_page(host, 2, host->spare_only); +- send_prog_page(host, 3, host->spare_only); ++ send_page(host, 1, host->spare_only, NFC_INPUT); ++ send_page(host, 2, host->spare_only, NFC_INPUT); ++ send_page(host, 3, host->spare_only, NFC_INPUT); + } + + break; +@@ -827,12 +799,12 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + /* send read confirm command */ + send_cmd(host, NAND_CMD_READSTART, true); + /* read for each AREA */ +- send_read_page(host, 0, host->spare_only); +- send_read_page(host, 1, host->spare_only); +- send_read_page(host, 2, host->spare_only); +- send_read_page(host, 3, host->spare_only); ++ send_page(host, 0, host->spare_only, NFC_OUTPUT); ++ send_page(host, 1, host->spare_only, NFC_OUTPUT); ++ send_page(host, 2, host->spare_only, NFC_OUTPUT); ++ send_page(host, 3, host->spare_only, NFC_OUTPUT); + } else +- send_read_page(host, 0, host->spare_only); ++ send_page(host, 0, host->spare_only, NFC_OUTPUT); + break; + + case NAND_CMD_READID: +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0005-MXC-NFC-Divide-flash-device-detection-into-two-step.patch b/recipes/linux/linux-2.6.31/pcm043/0005-MXC-NFC-Divide-flash-device-detection-into-two-step.patch new file mode 100644 index 0000000000..2a6d1103b2 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0005-MXC-NFC-Divide-flash-device-detection-into-two-step.patch @@ -0,0 +1,48 @@ +From a3906c7f2019dbcb2aa6b9a356947ea91ade60b8 Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 15:10:03 +0200 +Subject: [PATCH 05/15] MXC NFC: Divide flash device detection into two steps + +To be able to setup the NFC hardware in accordance to the connected +NAND device, we must detect some information about the NAND first. +After that we are able to setup the NFC in a correct manner. The last +step is to continue NAND device handling by the framework. + +Signed-off-by: Juergen Beisert +--- + drivers/mtd/nand/mxc_nand_v2.c | 13 +++++++++---- + 1 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand_v2.c b/drivers/mtd/nand/mxc_nand_v2.c +index 6b1eeb9..2ddd6f5 100644 +--- a/drivers/mtd/nand/mxc_nand_v2.c ++++ b/drivers/mtd/nand/mxc_nand_v2.c +@@ -874,16 +874,21 @@ static int __init mxcnd_probe(struct platform_device *pdev) + + clk_disable(host->clk); + ++ /* detect the device data prio setting up the ECC hardware */ ++ if (nand_scan_ident(mtd, 1)) { ++ err = -ENXIO; ++ pr_err("Unable to find any NAND device\n"); ++ goto escan; ++ } ++ + /* use flash based bbt */ + this->bbt_td = &bbt_main_descr; + this->bbt_md = &bbt_mirror_descr; + /* update flash based bbt */ + this->options |= NAND_USE_FLASH_BBT; + +- /* Scan to find existence of the device */ +- if (nand_scan(mtd, 1)) { +- DEBUG(MTD_DEBUG_LEVEL0, +- "MXC_ND2: Unable to find any NAND device.\n"); ++ /* second phase scan */ ++ if (nand_scan_tail(mtd)) { + err = -ENXIO; + goto escan; + } +-- +1.6.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0005-i.MX31-clock-rename-SSI-clocks-to-driver-name.patch b/recipes/linux/linux-2.6.31/pcm043/0005-i.MX31-clock-rename-SSI-clocks-to-driver-name.patch new file mode 100644 index 0000000000..dce0282b1a --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0005-i.MX31-clock-rename-SSI-clocks-to-driver-name.patch @@ -0,0 +1,28 @@ +From 04683e53f18930db4f5a9e40a65fea91b949ce21 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 12 Nov 2009 14:09:39 +0100 +Subject: [PATCH 05/28] i.MX31 clock: rename SSI clocks to driver name + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx3/clock.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c +index 8b14239..f25e8be 100644 +--- a/arch/arm/mach-mx3/clock.c ++++ b/arch/arm/mach-mx3/clock.c +@@ -545,8 +545,8 @@ static struct clk_lookup lookups[] = { + _REGISTER_CLOCK("mxc_w1.0", NULL, owire_clk) + _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) + _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) +- _REGISTER_CLOCK(NULL, "ssi", ssi1_clk) +- _REGISTER_CLOCK(NULL, "ssi", ssi2_clk) ++ _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) ++ _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) + _REGISTER_CLOCK(NULL, "firi", firi_clk) + _REGISTER_CLOCK(NULL, "ata", ata_clk) + _REGISTER_CLOCK(NULL, "rtic", rtic_clk) +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0005-mxc_nand-introduce-mxc_do_addr_cycle.patch b/recipes/linux/linux-2.6.31/pcm043/0005-mxc_nand-introduce-mxc_do_addr_cycle.patch new file mode 100644 index 0000000000..539408ec90 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0005-mxc_nand-introduce-mxc_do_addr_cycle.patch @@ -0,0 +1,122 @@ +From ded30b9d4cee1890d2b76956102828c6fb009b6b Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Tue, 2 Jun 2009 11:47:59 +0200 +Subject: [PATCH] mxc_nand: introduce mxc_do_addr_cycle + +This factors the address cycle to a seperate function. This +becomes useful in a later patch where we can simplify the +command processing by making use of this function. + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 87 +++++++++++++++++++++++-------------------- + 1 files changed, 47 insertions(+), 40 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 56db5ac..325c5be 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -658,6 +658,52 @@ static void mxc_nand_select_chip(struct mtd_info *mtd, int chip) + } + } + ++static void mxc_do_addr_cycle(struct mtd_info *mtd, int column, int page_addr) ++{ ++ struct nand_chip *nand_chip = mtd->priv; ++ struct mxc_nand_host *host = nand_chip->priv; ++ ++ /* Write out column address, if necessary */ ++ if (column != -1) { ++ /* ++ * MXC NANDFC can only perform full page+spare or ++ * spare-only read/write. When the upper layers ++ * layers perform a read/write buf operation, ++ * we will used the saved column adress to index into ++ * the full page. ++ */ ++ send_addr(host, 0, page_addr == -1); ++ if (host->pagesize_2k) ++ /* another col addr cycle for 2k page */ ++ send_addr(host, 0, false); ++ } ++ ++ /* Write out page address, if necessary */ ++ if (page_addr != -1) { ++ /* paddr_0 - p_addr_7 */ ++ send_addr(host, (page_addr & 0xff), false); ++ ++ if (host->pagesize_2k) { ++ if (mtd->size >= 0x10000000) { ++ /* paddr_8 - paddr_15 */ ++ send_addr(host, (page_addr >> 8) & 0xff, false); ++ send_addr(host, (page_addr >> 16) & 0xff, true); ++ } else ++ /* paddr_8 - paddr_15 */ ++ send_addr(host, (page_addr >> 8) & 0xff, true); ++ } else { ++ /* One more address cycle for higher density devices */ ++ if (mtd->size >= 0x4000000) { ++ /* paddr_8 - paddr_15 */ ++ send_addr(host, (page_addr >> 8) & 0xff, false); ++ send_addr(host, (page_addr >> 16) & 0xff, true); ++ } else ++ /* paddr_8 - paddr_15 */ ++ send_addr(host, (page_addr >> 8) & 0xff, true); ++ } ++ } ++} ++ + /* Used by the upper layer to write command to NAND Flash for + * different operations to be carried out on NAND Flash */ + static void mxc_nand_command(struct mtd_info *mtd, unsigned command, +@@ -746,46 +792,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + + /* Write out the command to the device. */ + send_cmd(host, command, useirq); +- +- /* Write out column address, if necessary */ +- if (column != -1) { +- /* +- * MXC NANDFC can only perform full page+spare or +- * spare-only read/write. When the upper layers +- * layers perform a read/write buf operation, +- * we will used the saved column adress to index into +- * the full page. +- */ +- send_addr(host, 0, page_addr == -1); +- if (host->pagesize_2k) +- /* another col addr cycle for 2k page */ +- send_addr(host, 0, false); +- } +- +- /* Write out page address, if necessary */ +- if (page_addr != -1) { +- /* paddr_0 - p_addr_7 */ +- send_addr(host, (page_addr & 0xff), false); +- +- if (host->pagesize_2k) { +- if (mtd->size >= 0x10000000) { +- /* paddr_8 - paddr_15 */ +- send_addr(host, (page_addr >> 8) & 0xff, false); +- send_addr(host, (page_addr >> 16) & 0xff, true); +- } else +- /* paddr_8 - paddr_15 */ +- send_addr(host, (page_addr >> 8) & 0xff, true); +- } else { +- /* One more address cycle for higher density devices */ +- if (mtd->size >= 0x4000000) { +- /* paddr_8 - paddr_15 */ +- send_addr(host, (page_addr >> 8) & 0xff, false); +- send_addr(host, (page_addr >> 16) & 0xff, true); +- } else +- /* paddr_8 - paddr_15 */ +- send_addr(host, (page_addr >> 8) & 0xff, true); +- } +- } ++ mxc_do_addr_cycle(mtd, column, page_addr); + + /* Command post-processing step */ + switch (command) { +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0006-MXC-NFC-Reorder-structure-setup-to-use-NAND-informa.patch b/recipes/linux/linux-2.6.31/pcm043/0006-MXC-NFC-Reorder-structure-setup-to-use-NAND-informa.patch new file mode 100644 index 0000000000..ba7598694d --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0006-MXC-NFC-Reorder-structure-setup-to-use-NAND-informa.patch @@ -0,0 +1,129 @@ +From 91457e95796520ecf21937c3b2578ccfe21e054f Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 15:21:44 +0200 +Subject: [PATCH 06/15] MXC NFC: Reorder structure setup to use NAND information + +Reorder some structure and NFC setup to use detected NAND information. + +Signed-off-by: Juergen Beisert +--- + drivers/mtd/nand/mxc_nand_v2.c | 82 +++++++++++++++++++++++++++++++-------- + 1 files changed, 65 insertions(+), 17 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand_v2.c b/drivers/mtd/nand/mxc_nand_v2.c +index 2ddd6f5..3b1011c 100644 +--- a/drivers/mtd/nand/mxc_nand_v2.c ++++ b/drivers/mtd/nand/mxc_nand_v2.c +@@ -84,6 +84,10 @@ + #define NFC_V21_SPAS_SHIFT (0) + #define NFC_V21_SPAS_MASK (0xFF00) + ++/* some NFCs are able to handle different ECC sizes */ ++#define MXC_SMALL_ECC 0 ++#define MXC_BIG_ECC 1 ++ + struct mxc_nand_host { + struct mtd_info mtd; + struct nand_chip nand; +@@ -747,6 +751,30 @@ static void unlock_addr(struct mxc_nand_host *host, unsigned int start_addr, uns + BUG(); + } + ++static void __init mxc_spare_size(struct mxc_nand_host *host, unsigned size_code) ++{ ++ u16 tmp; ++ ++ if (nfc_is_v21()) { ++ tmp = readw(host->regs + NFC_V21_SPAS); ++ tmp &= NFC_V21_SPAS_MASK; ++ tmp |= size_code << NFC_V21_SPAS_SHIFT; ++ writew(tmp, host->regs + NFC_V21_SPAS); ++ } ++} ++ ++/* ignore mode in a first step */ ++static void __init mxc_ecc_mode(struct mxc_nand_host *host, int mode) ++{ ++ u16 tmp; ++ ++ if (nfc_is_v21()) { ++ tmp = readw(host->regs + NFC_CONFIG1); ++ tmp |= NFC_V2_ECC_MODE_4; ++ writew(tmp, host->regs + NFC_CONFIG1); ++ } ++} ++ + static void __init mxc_data_width(struct mxc_nand_host *host, unsigned width) + { + if ((width != 8) && (width != 16)) { +@@ -838,23 +866,6 @@ static int __init mxcnd_probe(struct platform_device *pdev) + if (err) + goto eirq; + +- if (pdata->hw_ecc) { +- this->ecc.read_page = mxc_nand_read_page; +- this->ecc.write_page = mxc_nand_write_page; +- this->ecc.read_oob = mxc_nand_read_oob; +- this->ecc.layout = &nand_hw_eccoob_512; +- this->ecc.calculate = mxc_nand_calculate_ecc; +- this->ecc.hwctl = mxc_nand_enable_hwecc; +- this->ecc.correct = mxc_nand_correct_data; +- this->ecc.mode = NAND_ECC_HW; +- this->ecc.size = 512; +- this->ecc.bytes = 9; +- mxc_nand_hwecc(host, 1); +- } else { +- this->ecc.mode = NAND_ECC_SOFT; +- mxc_nand_hwecc(host, 0); +- } +- + clk_enable(host->clk); + + /* Disable interrupt */ +@@ -887,6 +898,43 @@ static int __init mxcnd_probe(struct platform_device *pdev) + /* update flash based bbt */ + this->options |= NAND_USE_FLASH_BBT; + ++ this->ecc.mode = NAND_ECC_SOFT; /* start with a default */ ++ ++ /* Note: ECC needs at least 16 bytes oob per 512 bytes pagesize */ ++ if (pdata->hw_ecc && (mtd->oobsize >= 16)) { ++ if (mtd->writesize == 512) { ++ this->ecc.mode = NAND_ECC_HW; ++ this->ecc.layout = &nand_hw_eccoob_512; ++ mxc_spare_size(host, NFC_SPAS_16); ++ } ++ if ((mtd->writesize == 2048) && (mtd->oobsize >= 64)) { ++ this->ecc.mode = NAND_ECC_HW; ++ this->ecc.layout = &nand_hw_eccoob_2k; ++ mxc_spare_size(host, NFC_SPAS_64); ++ } ++ if ((mtd->writesize == 4096) && (mtd->oobsize >= 128)) { ++ this->ecc.mode = NAND_ECC_HW; ++ this->ecc.layout = &nand_hw_eccoob_4k; ++ mxc_spare_size(host, NFC_SPAS_128); ++ } ++ /* can we use hardware ECC? */ ++ if (this->ecc.mode == NAND_ECC_HW) { ++ this->ecc.read_page = mxc_nand_read_page; ++ this->ecc.write_page = mxc_nand_write_page; ++ this->ecc.read_oob = mxc_nand_read_oob; ++ this->ecc.calculate = mxc_nand_calculate_ecc; ++ this->ecc.hwctl = mxc_nand_enable_hwecc; ++ this->ecc.correct = mxc_nand_correct_data; ++ this->ecc.size = 512; ++ this->ecc.bytes = 9; ++ mxc_ecc_mode(host, MXC_SMALL_ECC); ++ mxc_nand_hwecc(host, 1); ++ } ++ } ++ ++ if (this->ecc.mode == NAND_ECC_SOFT) ++ mxc_nand_hwecc(host, 0); ++ + /* second phase scan */ + if (nand_scan_tail(mtd)) { + err = -ENXIO; +-- +1.6.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0006-i.MX2-Add-sound-ssi-resources.patch b/recipes/linux/linux-2.6.31/pcm043/0006-i.MX2-Add-sound-ssi-resources.patch new file mode 100644 index 0000000000..9de57cf9d9 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0006-i.MX2-Add-sound-ssi-resources.patch @@ -0,0 +1,132 @@ +From 4bdc922cba4f392af2adf57c9aa86c0d2241ac88 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 22 Oct 2009 14:50:33 +0200 +Subject: [PATCH 06/28] i.MX2: Add sound (ssi) resources + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx2/clock_imx27.c | 4 +- + arch/arm/mach-mx2/devices.c | 78 +++++++++++++++++++++++++++++++++++++++ + arch/arm/mach-mx2/devices.h | 5 ++ + 3 files changed, 85 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-mx2/clock_imx27.c b/arch/arm/mach-mx2/clock_imx27.c +index 2c97144..5abb763 100644 +--- a/arch/arm/mach-mx2/clock_imx27.c ++++ b/arch/arm/mach-mx2/clock_imx27.c +@@ -644,8 +644,8 @@ static struct clk_lookup lookups[] = { + _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) + _REGISTER_CLOCK(NULL, "csi", csi_clk) + _REGISTER_CLOCK(NULL, "usb", usb_clk) +- _REGISTER_CLOCK(NULL, "ssi1", ssi1_clk) +- _REGISTER_CLOCK(NULL, "ssi2", ssi2_clk) ++ _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) ++ _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) + _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) + _REGISTER_CLOCK(NULL, "vpu", vpu_clk) + _REGISTER_CLOCK(NULL, "dma", dma_clk) +diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c +index a0f1b36..f877baa 100644 +--- a/arch/arm/mach-mx2/devices.c ++++ b/arch/arm/mach-mx2/devices.c +@@ -407,6 +407,84 @@ struct platform_device mxc_sdhc_device1 = { + .resource = mxc_sdhc2_resources, + }; + ++static struct resource imx_ssi_resources0[] = { ++ { ++ .start = SSI1_BASE_ADDR, ++ .end = SSI1_BASE_ADDR + 0x6F, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MXC_INT_SSI1, ++ .end = MXC_INT_SSI1, ++ .flags = IORESOURCE_IRQ, ++ }, { ++ .name = "tx0", ++ .start = DMA_REQ_SSI1_TX0, ++ .end = DMA_REQ_SSI1_TX0, ++ .flags = IORESOURCE_DMA, ++ }, { ++ .name = "rx0", ++ .start = DMA_REQ_SSI1_RX0, ++ .end = DMA_REQ_SSI1_RX0, ++ .flags = IORESOURCE_DMA, ++ }, { ++ .name = "tx1", ++ .start = DMA_REQ_SSI1_TX1, ++ .end = DMA_REQ_SSI1_TX1, ++ .flags = IORESOURCE_DMA, ++ }, { ++ .name = "rx1", ++ .start = DMA_REQ_SSI1_RX1, ++ .end = DMA_REQ_SSI1_RX1, ++ .flags = IORESOURCE_DMA, ++ }, ++}; ++ ++static struct resource imx_ssi_resources1[] = { ++ { ++ .start = SSI2_BASE_ADDR, ++ .end = SSI2_BASE_ADDR + 0x6F, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MXC_INT_SSI2, ++ .end = MXC_INT_SSI2, ++ .flags = IORESOURCE_IRQ, ++ }, { ++ .name = "tx0", ++ .start = DMA_REQ_SSI2_TX0, ++ .end = DMA_REQ_SSI2_TX0, ++ .flags = IORESOURCE_DMA, ++ }, { ++ .name = "rx0", ++ .start = DMA_REQ_SSI2_RX0, ++ .end = DMA_REQ_SSI2_RX0, ++ .flags = IORESOURCE_DMA, ++ }, { ++ .name = "tx1", ++ .start = DMA_REQ_SSI2_TX1, ++ .end = DMA_REQ_SSI2_TX1, ++ .flags = IORESOURCE_DMA, ++ }, { ++ .name = "rx1", ++ .start = DMA_REQ_SSI2_RX1, ++ .end = DMA_REQ_SSI2_RX1, ++ .flags = IORESOURCE_DMA, ++ }, ++}; ++ ++struct platform_device imx_ssi_device0 = { ++ .name = "imx-ssi", ++ .id = 0, ++ .num_resources = ARRAY_SIZE(imx_ssi_resources0), ++ .resource = imx_ssi_resources0, ++}; ++ ++struct platform_device imx_ssi_device1 = { ++ .name = "imx-ssi", ++ .id = 1, ++ .num_resources = ARRAY_SIZE(imx_ssi_resources1), ++ .resource = imx_ssi_resources1, ++}; ++ + /* GPIO port description */ + static struct mxc_gpio_port imx_gpio_ports[] = { + [0] = { +diff --git a/arch/arm/mach-mx2/devices.h b/arch/arm/mach-mx2/devices.h +index 049005b..0c1f14d 100644 +--- a/arch/arm/mach-mx2/devices.h ++++ b/arch/arm/mach-mx2/devices.h +@@ -20,3 +20,8 @@ extern struct platform_device mxc_i2c_device0; + extern struct platform_device mxc_i2c_device1; + extern struct platform_device mxc_sdhc_device0; + extern struct platform_device mxc_sdhc_device1; ++extern struct platform_device mxc_spi_device0; ++extern struct platform_device mxc_spi_device1; ++extern struct platform_device mxc_spi_device2; ++extern struct platform_device imx_ssi_device0; ++extern struct platform_device imx_ssi_device1; +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0006-mxc-nand-remove-debug-param.patch b/recipes/linux/linux-2.6.31/pcm043/0006-mxc-nand-remove-debug-param.patch new file mode 100644 index 0000000000..0829ae0e09 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0006-mxc-nand-remove-debug-param.patch @@ -0,0 +1,82 @@ +From 74689944a8d49bcfd0acdaabe1952d368a889eae Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 4 Jun 2009 15:57:20 +0200 +Subject: [PATCH] mxc nand: remove debug param + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 16 ++++++++-------- + 1 files changed, 8 insertions(+), 8 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 325c5be..cd09196 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -165,7 +165,7 @@ static irqreturn_t mxc_nfc_irq(int irq, void *dev_id) + * complete by checking the INT bit of config2 register. + */ + static void wait_op_done(struct mxc_nand_host *host, int max_retries, +- uint16_t param, int useirq) ++ int useirq) + { + uint32_t tmp; + +@@ -194,8 +194,8 @@ static void wait_op_done(struct mxc_nand_host *host, int max_retries, + udelay(1); + } + if (max_retries < 0) +- DEBUG(MTD_DEBUG_LEVEL0, "%s(%d): INT not set\n", +- __func__, param); ++ DEBUG(MTD_DEBUG_LEVEL0, "%s: INT not set\n", ++ __func__); + } + } + +@@ -209,7 +209,7 @@ static void send_cmd(struct mxc_nand_host *host, uint16_t cmd, int useirq) + writew(NFC_CMD, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, cmd, useirq); ++ wait_op_done(host, TROP_US_DELAY, useirq); + } + + /* This function sends an address (or partial address) to the +@@ -223,7 +223,7 @@ static void send_addr(struct mxc_nand_host *host, uint16_t addr, int islast) + writew(NFC_ADDR, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, addr, islast); ++ wait_op_done(host, TROP_US_DELAY, islast); + } + + static void send_page(struct mxc_nand_host *host, uint8_t buf_id, +@@ -247,7 +247,7 @@ static void send_page(struct mxc_nand_host *host, uint8_t buf_id, + writew(ops, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, spare_only, true); ++ wait_op_done(host, TROP_US_DELAY, true); + } + + /* Request the NANDFC to perform a read of the NAND device ID. */ +@@ -267,7 +267,7 @@ static void send_read_id(struct mxc_nand_host *host) + writew(NFC_ID, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, 0, true); ++ wait_op_done(host, TROP_US_DELAY, true); + + if (this->options & NAND_BUSWIDTH_16) { + void __iomem *main_buf = host->regs + MAIN_AREA0; +@@ -303,7 +303,7 @@ static uint16_t get_dev_status(struct mxc_nand_host *host) + writew(NFC_STATUS, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, 0, true); ++ wait_op_done(host, TROP_US_DELAY, true); + + /* Status is placed in first word of main buffer */ + /* get status, then recovery area 1 data */ +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0007-MXC-NFC-Fix-OOB-layout.patch b/recipes/linux/linux-2.6.31/pcm043/0007-MXC-NFC-Fix-OOB-layout.patch new file mode 100644 index 0000000000..0aa5cc63dc --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0007-MXC-NFC-Fix-OOB-layout.patch @@ -0,0 +1,104 @@ +From 1b05f0fbf96df288d1ee6d0bf4175e99b7d04730 Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 15:28:21 +0200 +Subject: [PATCH 07/15] MXC NFC: Fix OOB layout + +This data is not from the datasheet because the datasheet conceals these +facts. Its collected from other sources and some hints from the datasheet. +Hope its documentation is useful. + +Signed-off-by: Juergen Beisert +--- + drivers/mtd/nand/mxc_nand_v2.c | 68 ++++++++++++++++++++++++++++++++------- + 1 files changed, 55 insertions(+), 13 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand_v2.c b/drivers/mtd/nand/mxc_nand_v2.c +index 3b1011c..c1cbb05 100644 +--- a/drivers/mtd/nand/mxc_nand_v2.c ++++ b/drivers/mtd/nand/mxc_nand_v2.c +@@ -121,27 +121,69 @@ struct mxc_nand_host { + #define TROP_US_DELAY 2000 + + /* +- * OOB placement block for use with hardware ecc generation ++ * ECC data seems organized in 16 byte planes in this hardware. ++ * 7 bytes can be used for user's purpose, and 9 bytes are used ++ * for the ECC sum. ++ * ++ * 0 1 2 3 4 5 6 7 8 9 A B C D E F ++ * |<----------->|<------------->| ++ * User ECC ++ * ++ * For pages larger than 512 bytes, n structures of this type will be used. + */ ++ ++/* OOB description for 512 byte pages with 16 byte OOB */ + static struct nand_ecclayout nand_hw_eccoob_512 = { +- .eccbytes = 9, +- .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15}, +- .oobavail = 4, +- .oobfree = {{0, 4}} ++ .eccbytes = 1 * 9, ++ .eccpos = { ++ 7, 8, 9, 10, 11, 12, 13, 14, 15 ++ }, ++ .oobfree = { ++ {.offset = 0, .length = 7} ++ } + }; + ++/* OOB description for 2048 byte pages with 64 byte OOB */ + static struct nand_ecclayout nand_hw_eccoob_2k = { +- .eccbytes = 9, +- .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15}, +- .oobavail = 4, +- .oobfree = {{2, 4}} ++ .eccbytes = 4 * 9, ++ .eccpos = { ++ 7, 8, 9, 10, 11, 12, 13, 14, 15, ++ 23, 24, 25, 26, 27, 28, 29, 30, 31, ++ 39, 40, 41, 42, 43, 44, 45, 46, 47, ++ 55, 56, 57, 58, 59, 60, 61, 62, 63 ++ }, ++ .oobfree = { ++ {.offset = 0, .length = 7}, ++ {.offset = 16, .length = 7}, ++ {.offset = 32, .length = 7}, ++ {.offset = 48, .length = 7} ++ } + }; + ++/* OOB description for 4096 byte pages with 128 byte OOB */ + static struct nand_ecclayout nand_hw_eccoob_4k = { +- .eccbytes = 9, +- .eccpos = {7, 8, 9, 10, 11, 12, 13, 14, 15}, +- .oobavail = 4, +- .oobfree = {{2, 4}} ++ .eccbytes = 8 * 9, ++ .eccpos = { ++ 7, 8, 9, 10, 11, 12, 13, 14, 15, ++ 23, 24, 25, 26, 27, 28, 29, 30, 31, ++ 39, 40, 41, 42, 43, 44, 45, 46, 47, ++ 55, 56, 57, 58, 59, 60, 61, 62, 63, ++ 71, 72, 73, 74, 75, 76, 77, 78, 79, ++ 87, 88, 89, 90, 91, 92, 93, 94, 95, ++ 103, 104, 105, 106, 107, 108, 109, 110, 111, ++/* ouch, only 64 entries allowed */ ++/* 119, 120, 121, 122, 123, 124, 125, 126, 127 */ ++ }, ++ .oobfree = { ++ {.offset = 0, .length = 7}, ++ {.offset = 16, .length = 7}, ++ {.offset = 32, .length = 7}, ++ {.offset = 48, .length = 7}, ++ {.offset = 64, .length = 7}, ++ {.offset = 80, .length = 7}, ++ {.offset = 96, .length = 7}, ++ {.offset = 112, .length = 7} ++ } + }; + + #ifdef CONFIG_MTD_PARTITIONS +-- +1.6.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0007-i.MX3-Add-sound-ssi-resources.patch b/recipes/linux/linux-2.6.31/pcm043/0007-i.MX3-Add-sound-ssi-resources.patch new file mode 100644 index 0000000000..10eb2dc574 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0007-i.MX3-Add-sound-ssi-resources.patch @@ -0,0 +1,101 @@ +From cd733f49a7e0fd82164138933157bbdbb9937f2c Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 29 Oct 2009 17:17:42 +0100 +Subject: [PATCH 07/28] i.MX3: Add sound (ssi) resources + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx3/clock-imx35.c | 4 +- + arch/arm/mach-mx3/devices.c | 42 +++++++++++++++++++++++++++++++++++++++ + arch/arm/mach-mx3/devices.h | 3 +- + 3 files changed, 46 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c +index 577ee83..02b2507 100644 +--- a/arch/arm/mach-mx3/clock-imx35.c ++++ b/arch/arm/mach-mx3/clock-imx35.c +@@ -421,8 +421,8 @@ static struct clk_lookup lookups[] = { + _REGISTER_CLOCK(NULL, "sdma", sdma_clk) + _REGISTER_CLOCK(NULL, "spba", spba_clk) + _REGISTER_CLOCK(NULL, "spdif", spdif_clk) +- _REGISTER_CLOCK(NULL, "ssi", ssi1_clk) +- _REGISTER_CLOCK(NULL, "ssi", ssi2_clk) ++ _REGISTER_CLOCK("imx-ssi.0", NULL, ssi1_clk) ++ _REGISTER_CLOCK("imx-ssi.1", NULL, ssi2_clk) + _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) + _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) + _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) +diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c +index 9e87e08..06dab5f 100644 +--- a/arch/arm/mach-mx3/devices.c ++++ b/arch/arm/mach-mx3/devices.c +@@ -416,6 +416,44 @@ struct platform_device mxc_fec_device = { + }; + #endif + ++static struct resource imx_ssi_resources0[] = { ++ { ++ .start = SSI1_BASE_ADDR, ++ .end = SSI1_BASE_ADDR + 0xfff, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MX31_INT_SSI1, ++ .end = MX31_INT_SSI1, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++static struct resource imx_ssi_resources1[] = { ++ { ++ .start = SSI2_BASE_ADDR, ++ .end = SSI2_BASE_ADDR + 0xfff, ++ .flags = IORESOURCE_MEM ++ }, { ++ .start = MX31_INT_SSI2, ++ .end = MX31_INT_SSI2, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++struct platform_device imx_ssi_device0 = { ++ .name = "imx-ssi", ++ .id = 0, ++ .num_resources = ARRAY_SIZE(imx_ssi_resources0), ++ .resource = imx_ssi_resources0, ++}; ++ ++struct platform_device imx_ssi_device1 = { ++ .name = "imx-ssi", ++ .id = 1, ++ .num_resources = ARRAY_SIZE(imx_ssi_resources1), ++ .resource = imx_ssi_resources1, ++}; ++ + static int mx3_devices_init(void) + { + if (cpu_is_mx31()) { +@@ -426,6 +464,10 @@ static int mx3_devices_init(void) + if (cpu_is_mx35()) { + mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; + mxc_nand_resources[0].end = MX35_NFC_BASE_ADDR + 0xfff; ++ imx_ssi_resources0[1].start = MX35_INT_SSI1; ++ imx_ssi_resources0[1].end = MX35_INT_SSI1; ++ imx_ssi_resources1[1].start = MX35_INT_SSI2; ++ imx_ssi_resources1[1].end = MX35_INT_SSI2; + } + + return 0; +diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h +index ffd494d..224c2eb 100644 +--- a/arch/arm/mach-mx3/devices.h ++++ b/arch/arm/mach-mx3/devices.h +@@ -17,4 +17,5 @@ extern struct platform_device mxcsdhc_device0; + extern struct platform_device mxcsdhc_device1; + extern struct platform_device mxc_otg_udc_device; + extern struct platform_device mxc_rnga_device; +- ++extern struct platform_device imx_ssi_device0; ++extern struct platform_device imx_ssi_device1; +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0007-mxc-nand-remove-dead-code.patch b/recipes/linux/linux-2.6.31/pcm043/0007-mxc-nand-remove-dead-code.patch new file mode 100644 index 0000000000..218b1033db --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0007-mxc-nand-remove-dead-code.patch @@ -0,0 +1,41 @@ +From 406ec8e7472d4435f6f862cd2e8179ee8dddb57e Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 4 Jun 2009 16:12:40 +0200 +Subject: [PATCH] mxc nand: remove dead code + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 17 ----------------- + 1 files changed, 0 insertions(+), 17 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index cd09196..74c5dbc 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -620,23 +620,6 @@ static void mxc_nand_select_chip(struct mtd_info *mtd, int chip) + struct nand_chip *nand_chip = mtd->priv; + struct mxc_nand_host *host = nand_chip->priv; + +-#ifdef CONFIG_MTD_NAND_MXC_FORCE_CE +- if (chip > 0) { +- DEBUG(MTD_DEBUG_LEVEL0, +- "ERROR: Illegal chip select (chip = %d)\n", chip); +- return; +- } +- +- if (chip == -1) { +- writew(readw(host->regs + NFC_CONFIG1) & ~NFC_CE, +- host->regs + NFC_CONFIG1); +- return; +- } +- +- writew(readw(host->regs + NFC_CONFIG1) | NFC_CE, +- host->regs + NFC_CONFIG1); +-#endif +- + switch (chip) { + case -1: + /* Disable the NFC clock */ +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0008-MXC-Add-a-digital-audio-multiplexer-driver.patch b/recipes/linux/linux-2.6.31/pcm043/0008-MXC-Add-a-digital-audio-multiplexer-driver.patch new file mode 100644 index 0000000000..65c7339847 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0008-MXC-Add-a-digital-audio-multiplexer-driver.patch @@ -0,0 +1,281 @@ +From 2ff993c8bed5670aab72ef1d7901fe87e753aa54 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 29 Oct 2009 17:12:39 +0100 +Subject: [PATCH 08/28] MXC: Add a digital audio multiplexer driver + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx2/Kconfig | 2 + + arch/arm/mach-mx3/Kconfig | 2 + + arch/arm/plat-mxc/Kconfig | 7 +++ + arch/arm/plat-mxc/Makefile | 2 + + arch/arm/plat-mxc/audmux-v1.c | 53 ++++++++++++++++++++++ + arch/arm/plat-mxc/audmux-v2.c | 74 +++++++++++++++++++++++++++++++ + arch/arm/plat-mxc/include/mach/audmux.h | 52 +++++++++++++++++++++ + 7 files changed, 192 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/plat-mxc/audmux-v1.c + create mode 100644 arch/arm/plat-mxc/audmux-v2.c + create mode 100644 arch/arm/plat-mxc/include/mach/audmux.h + +diff --git a/arch/arm/mach-mx2/Kconfig b/arch/arm/mach-mx2/Kconfig +index c77da58..0d08c34 100644 +--- a/arch/arm/mach-mx2/Kconfig ++++ b/arch/arm/mach-mx2/Kconfig +@@ -6,11 +6,13 @@ choice + + config MACH_MX21 + bool "i.MX21 support" ++ select ARCH_MXC_AUDMUX_V1 + help + This enables support for Freescale's MX2 based i.MX21 processor. + + config MACH_MX27 + bool "i.MX27 support" ++ select ARCH_MXC_AUDMUX_V1 + help + This enables support for Freescale's MX2 based i.MX27 processor. + +diff --git a/arch/arm/mach-mx3/Kconfig b/arch/arm/mach-mx3/Kconfig +index 851f245..ffdd211 100644 +--- a/arch/arm/mach-mx3/Kconfig ++++ b/arch/arm/mach-mx3/Kconfig +@@ -2,11 +2,13 @@ if ARCH_MX3 + + config ARCH_MX31 + select ARCH_HAS_RNGA ++ select ARCH_MXC_AUDMUX_V2 + bool + + config ARCH_MX35 + bool + select ARCH_MXC_IOMUX_V3 ++ select ARCH_MXC_AUDMUX_V2 + + comment "MX3 platforms:" + +diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig +index 8986b74..995c357 100644 +--- a/arch/arm/plat-mxc/Kconfig ++++ b/arch/arm/plat-mxc/Kconfig +@@ -58,4 +58,11 @@ config ARCH_HAS_RNGA + + config ARCH_MXC_IOMUX_V3 + bool ++ ++config ARCH_MXC_AUDMUX_V1 ++ bool ++ ++config ARCH_MXC_AUDMUX_V2 ++ bool ++ + endif +diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile +index e3212c8..92fc8b2 100644 +--- a/arch/arm/plat-mxc/Makefile ++++ b/arch/arm/plat-mxc/Makefile +@@ -9,3 +9,5 @@ obj-$(CONFIG_ARCH_MX1) += iomux-mx1-mx2.o dma-mx1-mx2.o + obj-$(CONFIG_ARCH_MX2) += iomux-mx1-mx2.o dma-mx1-mx2.o + obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o + obj-$(CONFIG_MXC_PWM) += pwm.o ++obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o ++obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o +diff --git a/arch/arm/plat-mxc/audmux-v1.c b/arch/arm/plat-mxc/audmux-v1.c +new file mode 100644 +index 0000000..70ab5af +--- /dev/null ++++ b/arch/arm/plat-mxc/audmux-v1.c +@@ -0,0 +1,53 @@ ++/* ++ * Copyright 2009 Pengutronix, Sascha Hauer ++ * ++ * Initial development of this code was funded by ++ * Phytec Messtechnik GmbH, http://www.phytec.de ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static void __iomem *audmux_base; ++ ++#define MXC_AUDMUX_V1_PCR(x) ((x) * 4) ++ ++int mxc_audmux_v1_configure_port(unsigned int port, unsigned int pcr) ++{ ++ if (!audmux_base) { ++ printk("%s: not configured\n", __func__); ++ return -ENOSYS; ++ } ++ ++ writel(pcr, audmux_base + MXC_AUDMUX_V1_PCR(port)); ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(mxc_audmux_v1_configure_port); ++ ++static int mxc_audmux_v1_init(void) ++{ ++ if (cpu_is_mx27() || cpu_is_mx21()) ++ audmux_base = IO_ADDRESS(AUDMUX_BASE_ADDR); ++ return 0; ++} ++ ++postcore_initcall(mxc_audmux_v1_init); +diff --git a/arch/arm/plat-mxc/audmux-v2.c b/arch/arm/plat-mxc/audmux-v2.c +new file mode 100644 +index 0000000..6f21096 +--- /dev/null ++++ b/arch/arm/plat-mxc/audmux-v2.c +@@ -0,0 +1,74 @@ ++/* ++ * Copyright 2009 Pengutronix, Sascha Hauer ++ * ++ * Initial development of this code was funded by ++ * Phytec Messtechnik GmbH, http://www.phytec.de ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++static struct clk *audmux_clk; ++static void __iomem *audmux_base; ++ ++#define MXC_AUDMUX_V2_PTCR(x) ((x) * 8) ++#define MXC_AUDMUX_V2_PDCR(x) ((x) * 8 + 4) ++ ++int mxc_audmux_v2_configure_port(unsigned int port, unsigned int ptcr, ++ unsigned int pdcr) ++{ ++ if (!audmux_base) ++ return -ENOSYS; ++ ++ if (audmux_clk) ++ clk_enable(audmux_clk); ++ ++ writel(ptcr, audmux_base + MXC_AUDMUX_V2_PTCR(port)); ++ writel(pdcr, audmux_base + MXC_AUDMUX_V2_PDCR(port)); ++ ++ if (audmux_clk) ++ clk_disable(audmux_clk); ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(mxc_audmux_v2_configure_port); ++ ++static int mxc_audmux_v2_init(void) ++{ ++ int ret; ++ ++ if (cpu_is_mx35()) { ++ audmux_clk = clk_get(NULL, "audmux"); ++ if (IS_ERR(audmux_clk)) { ++ ret = PTR_ERR(audmux_clk); ++ printk(KERN_ERR "%s: cannot get clock: %d\n", __func__, ++ ret); ++ return ret; ++ } ++ } ++ ++ if (cpu_is_mx31() || cpu_is_mx35()) ++ audmux_base = IO_ADDRESS(AUDMUX_BASE_ADDR); ++ ++ return 0; ++} ++ ++postcore_initcall(mxc_audmux_v2_init); +diff --git a/arch/arm/plat-mxc/include/mach/audmux.h b/arch/arm/plat-mxc/include/mach/audmux.h +new file mode 100644 +index 0000000..5cd6466 +--- /dev/null ++++ b/arch/arm/plat-mxc/include/mach/audmux.h +@@ -0,0 +1,52 @@ ++#ifndef __MACH_AUDMUX_H ++#define __MACH_AUDMUX_H ++ ++#define MX27_AUDMUX_HPCR1_SSI0 0 ++#define MX27_AUDMUX_HPCR2_SSI1 1 ++#define MX27_AUDMUX_HPCR3_SSI_PINS_4 2 ++#define MX27_AUDMUX_PPCR1_SSI_PINS_1 3 ++#define MX27_AUDMUX_PPCR2_SSI_PINS_2 4 ++#define MX27_AUDMUX_PPCR3_SSI_PINS_3 5 ++ ++#define MX31_AUDMUX_PORT1_SSI0 0 ++#define MX31_AUDMUX_PORT2_SSI1 1 ++#define MX31_AUDMUX_PORT3_SSI_PINS_3 2 ++#define MX31_AUDMUX_PORT4_SSI_PINS_4 3 ++#define MX31_AUDMUX_PORT5_SSI_PINS_5 4 ++#define MX31_AUDMUX_PORT6_SSI_PINS_6 5 ++ ++/* Register definitions for the i.MX21/27 Digital Audio Multiplexer */ ++#define MXC_AUDMUX_V1_PCR_INMMASK(x) ((x) & 0xff) ++#define MXC_AUDMUX_V1_PCR_INMEN (1 << 8) ++#define MXC_AUDMUX_V1_PCR_TXRXEN (1 << 10) ++#define MXC_AUDMUX_V1_PCR_SYN (1 << 12) ++#define MXC_AUDMUX_V1_PCR_RXDSEL(x) (((x) & 0x7) << 13) ++#define MXC_AUDMUX_V1_PCR_RFCSEL(x) (((x) & 0xf) << 20) ++#define MXC_AUDMUX_V1_PCR_RCLKDIR (1 << 24) ++#define MXC_AUDMUX_V1_PCR_RFSDIR (1 << 25) ++#define MXC_AUDMUX_V1_PCR_TFCSEL(x) (((x) & 0xf) << 26) ++#define MXC_AUDMUX_V1_PCR_TCLKDIR (1 << 30) ++#define MXC_AUDMUX_V1_PCR_TFSDIR (1 << 31) ++ ++/* Register definitions for the i.MX25/31/35 Digital Audio Multiplexer */ ++#define MXC_AUDMUX_V2_PTCR_TFSDIR (1 << 31) ++#define MXC_AUDMUX_V2_PTCR_TFSEL(x) (((x) & 0xf) << 27) ++#define MXC_AUDMUX_V2_PTCR_TCLKDIR (1 << 26) ++#define MXC_AUDMUX_V2_PTCR_TCSEL(x) (((x) & 0xf) << 22) ++#define MXC_AUDMUX_V2_PTCR_RFSDIR (1 << 21) ++#define MXC_AUDMUX_V2_PTCR_RFSEL(x) (((x) & 0xf) << 17) ++#define MXC_AUDMUX_V2_PTCR_RCLKDIR (1 << 16) ++#define MXC_AUDMUX_V2_PTCR_RCSEL(x) (((x) & 0xf) << 12) ++#define MXC_AUDMUX_V2_PTCR_SYN (1 << 11) ++ ++#define MXC_AUDMUX_V2_PDCR_RXDSEL(x) (((x) & 0x7) << 13) ++#define MXC_AUDMUX_V2_PDCR_TXRXEN (1 << 12) ++#define MXC_AUDMUX_V2_PDCR_MODE(x) (((x) & 0x3) << 8) ++#define MXC_AUDMUX_V2_PDCR_INMMASK(x) ((x) & 0xff) ++ ++int mxc_audmux_v1_configure_port(unsigned int port, unsigned int pcr); ++ ++int mxc_audmux_v2_configure_port(unsigned int port, unsigned int ptcr, ++ unsigned int pdcr); ++ ++#endif /* __MACH_AUDMUX_H */ +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0008-MXC-NFC-The-i.MX35-CPU-also-uses-a-V2.1-NFC.patch b/recipes/linux/linux-2.6.31/pcm043/0008-MXC-NFC-The-i.MX35-CPU-also-uses-a-V2.1-NFC.patch new file mode 100644 index 0000000000..8d2a3c7247 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0008-MXC-NFC-The-i.MX35-CPU-also-uses-a-V2.1-NFC.patch @@ -0,0 +1,26 @@ +From b319bc5f9a9733e534a57b6725b94f438a1e406e Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 15:31:18 +0200 +Subject: [PATCH 08/15] MXC NFC: The i.MX35 CPU also uses a V2.1 NFC + +Signed-off-by: Juergen Beisert +--- + drivers/mtd/nand/mxc_nand_v2.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand_v2.c b/drivers/mtd/nand/mxc_nand_v2.c +index c1cbb05..3891d9a 100644 +--- a/drivers/mtd/nand/mxc_nand_v2.c ++++ b/drivers/mtd/nand/mxc_nand_v2.c +@@ -51,7 +51,7 @@ + #define NFC_V1_UNLOCKSTART_BLKADDR 0xe14 + #define NFC_V1_UNLOCKEND_BLKADDR 0xe16 + +-#define nfc_is_v21() cpu_is_mx25() ++#define nfc_is_v21() (cpu_is_mx25() || cpu_is_mx35()) + #define nfc_is_v2x() cpu_is_mx31() + + #define NFC_ECC_EN (1 << 3) +-- +1.6.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0008-mxc-nand-use-resource_size.patch b/recipes/linux/linux-2.6.31/pcm043/0008-mxc-nand-use-resource_size.patch new file mode 100644 index 0000000000..ab3b1a30c3 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0008-mxc-nand-use-resource_size.patch @@ -0,0 +1,26 @@ +From de6d94479735ef944c1463f42ed6192b1b226395 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 4 Jun 2009 16:16:01 +0200 +Subject: [PATCH] mxc nand: use resource_size() + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 74c5dbc..127e0b7 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -865,7 +865,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) + goto eres; + } + +- host->regs = ioremap(res->start, res->end - res->start + 1); ++ host->regs = ioremap(res->start, resource_size(res)); + if (!host->regs) { + err = -ENOMEM; + goto eres; +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0009-MX31-Fix-spi-clock-names.patch b/recipes/linux/linux-2.6.31/pcm043/0009-MX31-Fix-spi-clock-names.patch new file mode 100644 index 0000000000..f59d12723d --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0009-MX31-Fix-spi-clock-names.patch @@ -0,0 +1,32 @@ +From 6e58f781f2d5bedae9ff6991ac378212a392b723 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 20 Mar 2009 19:25:01 +0100 +Subject: [PATCH 09/28] MX31 Fix spi clock names + +Fix the SPI clock names to match the device names. + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx3/clock.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c +index f25e8be..664148c 100644 +--- a/arch/arm/mach-mx3/clock.c ++++ b/arch/arm/mach-mx3/clock.c +@@ -518,9 +518,9 @@ DEFINE_CLOCK(ipg_clk, 0, NULL, 0, ipg_get_rate, NULL, &ahb_clk); + + static struct clk_lookup lookups[] = { + _REGISTER_CLOCK(NULL, "emi", emi_clk) +- _REGISTER_CLOCK(NULL, "cspi", cspi1_clk) +- _REGISTER_CLOCK(NULL, "cspi", cspi2_clk) +- _REGISTER_CLOCK(NULL, "cspi", cspi3_clk) ++ _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) ++ _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) ++ _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) + _REGISTER_CLOCK(NULL, "gpt", gpt_clk) + _REGISTER_CLOCK(NULL, "pwm", pwm_clk) + _REGISTER_CLOCK(NULL, "wdog", wdog_clk) +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0009-MXC-NFC-Fix-NFC-s-address-area-on-i.MX35.patch b/recipes/linux/linux-2.6.31/pcm043/0009-MXC-NFC-Fix-NFC-s-address-area-on-i.MX35.patch new file mode 100644 index 0000000000..18096a4c35 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0009-MXC-NFC-Fix-NFC-s-address-area-on-i.MX35.patch @@ -0,0 +1,28 @@ +From aa20693d5b25d2ed31a31265687a66b29d51737b Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 15:37:47 +0200 +Subject: [PATCH 09/15] MXC NFC: Fix NFC's address area on i.MX35 + +The address area of the NFS in the i.MX35 silicon is much larger than 4k. + +Signed-off-by: Juergen Beisert + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + arch/arm/mach-mx3/devices.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: arch/arm/mach-mx3/devices.c +=================================================================== +--- arch/arm/mach-mx3/devices.c.orig 2009-12-10 13:38:53.334702610 +0100 ++++ arch/arm/mach-mx3/devices.c 2009-12-10 13:39:18.186144277 +0100 +@@ -585,7 +585,7 @@ + } + if (cpu_is_mx35()) { + mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; +- mxc_nand_resources[0].end = MX35_NFC_BASE_ADDR + 0xfff; ++ mxc_nand_resources[0].end = MX35_NFC_BASE_ADDR + 0x1fff; + otg_resources[0].start = MX35_OTG_BASE_ADDR; + otg_resources[0].end = MX35_OTG_BASE_ADDR + 0x1ff; + otg_resources[1].start = MXC_INT_USBOTG; diff --git a/recipes/linux/linux-2.6.31/pcm043/0009-mxc-nand-use-buffers.patch b/recipes/linux/linux-2.6.31/pcm043/0009-mxc-nand-use-buffers.patch new file mode 100644 index 0000000000..e48ff64f56 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0009-mxc-nand-use-buffers.patch @@ -0,0 +1,473 @@ +From 714bcc0f142a1f44fb6e15ad7505b9d234e8f914 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 4 Jun 2009 17:12:26 +0200 +Subject: [PATCH] mxc nand: use buffers + +The NAND controller has some limitations how to access the +internal buffers. It only allows 32 bit accesses. The driver +used to work around this by having special alignment aware +copy routines. +We now copy the whole page to a buffer in memory and let the +access functions use this buffer. This simplifies the driver. +A bonnie++ test showed that this has no negative performance +impact on the driver. + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 310 +++++++++++-------------------------------- + 1 files changed, 77 insertions(+), 233 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 127e0b7..4c338ae 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -107,15 +107,17 @@ struct mxc_nand_host { + struct device *dev; + + void __iomem *regs; +- int spare_only; + int status_request; + int pagesize_2k; +- uint16_t col_addr; + struct clk *clk; + int clk_act; + int irq; + + wait_queue_head_t irq_waitq; ++ ++ uint8_t *data_buf; ++ unsigned int buf_start; ++ int spare_len; + }; + + /* Define delays in microsec for NAND device operations */ +@@ -227,23 +229,11 @@ static void send_addr(struct mxc_nand_host *host, uint16_t addr, int islast) + } + + static void send_page(struct mxc_nand_host *host, uint8_t buf_id, +- int spare_only, unsigned int ops) ++ unsigned int ops) + { +- DEBUG(MTD_DEBUG_LEVEL3, "send_page (%d)\n", spare_only); +- + /* NANDFC buffer 0 is used for page read/write */ + writew(buf_id, host->regs + NFC_BUF_ADDR); + +- /* Configure spare or page+spare access */ +- if (!host->pagesize_2k) { +- uint16_t config1 = readw(host->regs + NFC_CONFIG1); +- if (spare_only) +- config1 |= NFC_SP_EN; +- else +- config1 &= ~(NFC_SP_EN); +- writew(config1, host->regs + NFC_CONFIG1); +- } +- + writew(ops, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +@@ -278,6 +268,7 @@ static void send_read_id(struct mxc_nand_host *host) + writeb(readb(main_buf + 8), main_buf + 4); + writeb(readb(main_buf + 10), main_buf + 5); + } ++ memcpy(host->data_buf, host->regs + MAIN_AREA0, 16); + } + + /* This function requests the NANDFC to perform a read of the +@@ -363,32 +354,14 @@ static u_char mxc_nand_read_byte(struct mtd_info *mtd) + { + struct nand_chip *nand_chip = mtd->priv; + struct mxc_nand_host *host = nand_chip->priv; +- uint8_t ret = 0; +- uint16_t col, rd_word; +- uint16_t __iomem *main_buf = host->regs + MAIN_AREA0; +- uint16_t __iomem *spare_buf = host->regs + SPARE_AREA0; ++ uint8_t ret; + + /* Check for status request */ + if (host->status_request) + return get_dev_status(host) & 0xFF; + +- /* Get column for 16-bit access */ +- col = host->col_addr >> 1; +- +- /* If we are accessing the spare region */ +- if (host->spare_only) +- rd_word = readw(&spare_buf[col]); +- else +- rd_word = readw(&main_buf[col]); +- +- /* Pick upper/lower byte of word from RAM buffer */ +- if (host->col_addr & 0x1) +- ret = (rd_word >> 8) & 0xFF; +- else +- ret = rd_word & 0xFF; +- +- /* Update saved column address */ +- host->col_addr++; ++ ret = *(uint8_t *)(host->data_buf + host->buf_start); ++ host->buf_start++; + + return ret; + } +@@ -397,33 +370,10 @@ static uint16_t mxc_nand_read_word(struct mtd_info *mtd) + { + struct nand_chip *nand_chip = mtd->priv; + struct mxc_nand_host *host = nand_chip->priv; +- uint16_t col, rd_word, ret; +- uint16_t __iomem *p; ++ uint16_t ret; + +- DEBUG(MTD_DEBUG_LEVEL3, +- "mxc_nand_read_word(col = %d)\n", host->col_addr); +- +- col = host->col_addr; +- /* Adjust saved column address */ +- if (col < mtd->writesize && host->spare_only) +- col += mtd->writesize; +- +- if (col < mtd->writesize) +- p = (host->regs + MAIN_AREA0) + (col >> 1); +- else +- p = (host->regs + SPARE_AREA0) + ((col - mtd->writesize) >> 1); +- +- if (col & 1) { +- rd_word = readw(p); +- ret = (rd_word >> 8) & 0xff; +- rd_word = readw(&p[1]); +- ret |= (rd_word << 8) & 0xff00; +- +- } else +- ret = readw(p); +- +- /* Update saved column address */ +- host->col_addr = col + 2; ++ ret = *(uint16_t *)(host->data_buf + host->buf_start); ++ host->buf_start += 2; + + return ret; + } +@@ -436,94 +386,14 @@ static void mxc_nand_write_buf(struct mtd_info *mtd, + { + struct nand_chip *nand_chip = mtd->priv; + struct mxc_nand_host *host = nand_chip->priv; +- int n, col, i = 0; +- +- DEBUG(MTD_DEBUG_LEVEL3, +- "mxc_nand_write_buf(col = %d, len = %d)\n", host->col_addr, +- len); +- +- col = host->col_addr; +- +- /* Adjust saved column address */ +- if (col < mtd->writesize && host->spare_only) +- col += mtd->writesize; +- +- n = mtd->writesize + mtd->oobsize - col; +- n = min(len, n); +- +- DEBUG(MTD_DEBUG_LEVEL3, +- "%s:%d: col = %d, n = %d\n", __func__, __LINE__, col, n); +- +- while (n) { +- void __iomem *p; +- +- if (col < mtd->writesize) +- p = host->regs + MAIN_AREA0 + (col & ~3); +- else +- p = host->regs + SPARE_AREA0 - +- mtd->writesize + (col & ~3); +- +- DEBUG(MTD_DEBUG_LEVEL3, "%s:%d: p = %p\n", __func__, +- __LINE__, p); +- +- if (((col | (int)&buf[i]) & 3) || n < 16) { +- uint32_t data = 0; +- +- if (col & 3 || n < 4) +- data = readl(p); +- +- switch (col & 3) { +- case 0: +- if (n) { +- data = (data & 0xffffff00) | +- (buf[i++] << 0); +- n--; +- col++; +- } +- case 1: +- if (n) { +- data = (data & 0xffff00ff) | +- (buf[i++] << 8); +- n--; +- col++; +- } +- case 2: +- if (n) { +- data = (data & 0xff00ffff) | +- (buf[i++] << 16); +- n--; +- col++; +- } +- case 3: +- if (n) { +- data = (data & 0x00ffffff) | +- (buf[i++] << 24); +- n--; +- col++; +- } +- } +- +- writel(data, p); +- } else { +- int m = mtd->writesize - col; ++ u16 col = host->buf_start; ++ int n = mtd->oobsize + mtd->writesize - col; + +- if (col >= mtd->writesize) +- m += mtd->oobsize; ++ n = min(n, len); + +- m = min(n, m) & ~3; ++ memcpy(host->data_buf + col, buf, n); + +- DEBUG(MTD_DEBUG_LEVEL3, +- "%s:%d: n = %d, m = %d, i = %d, col = %d\n", +- __func__, __LINE__, n, m, i, col); +- +- memcpy(p, &buf[i], m); +- col += m; +- i += m; +- n -= m; +- } +- } +- /* Update saved column address */ +- host->col_addr = col; ++ host->buf_start += n; + } + + /* Read the data buffer from the NAND Flash. To read the data from NAND +@@ -534,75 +404,14 @@ static void mxc_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len) + { + struct nand_chip *nand_chip = mtd->priv; + struct mxc_nand_host *host = nand_chip->priv; +- int n, col, i = 0; ++ u16 col = host->buf_start; ++ int n = mtd->oobsize + mtd->writesize - col; + +- DEBUG(MTD_DEBUG_LEVEL3, +- "mxc_nand_read_buf(col = %d, len = %d)\n", host->col_addr, len); +- +- col = host->col_addr; +- +- /* Adjust saved column address */ +- if (col < mtd->writesize && host->spare_only) +- col += mtd->writesize; +- +- n = mtd->writesize + mtd->oobsize - col; +- n = min(len, n); +- +- while (n) { +- void __iomem *p; +- +- if (col < mtd->writesize) +- p = host->regs + MAIN_AREA0 + (col & ~3); +- else +- p = host->regs + SPARE_AREA0 - +- mtd->writesize + (col & ~3); +- +- if (((col | (int)&buf[i]) & 3) || n < 16) { +- uint32_t data; +- +- data = readl(p); +- switch (col & 3) { +- case 0: +- if (n) { +- buf[i++] = (uint8_t) (data); +- n--; +- col++; +- } +- case 1: +- if (n) { +- buf[i++] = (uint8_t) (data >> 8); +- n--; +- col++; +- } +- case 2: +- if (n) { +- buf[i++] = (uint8_t) (data >> 16); +- n--; +- col++; +- } +- case 3: +- if (n) { +- buf[i++] = (uint8_t) (data >> 24); +- n--; +- col++; +- } +- } +- } else { +- int m = mtd->writesize - col; ++ n = min(n, len); + +- if (col >= mtd->writesize) +- m += mtd->oobsize; +- +- m = min(n, m) & ~3; +- memcpy(&buf[i], p, m); +- col += m; +- i += m; +- n -= m; +- } +- } +- /* Update saved column address */ +- host->col_addr = col; ++ memcpy(buf, host->data_buf + col, len); + ++ host->buf_start += len; + } + + /* Used by the upper layer to verify the data in NAND Flash +@@ -641,6 +450,36 @@ static void mxc_nand_select_chip(struct mtd_info *mtd, int chip) + } + } + ++/* ++ * Function to transfer data to/from spare area. ++ */ ++static void copy_spare(struct mtd_info *mtd, bool bfrom) ++{ ++ struct nand_chip *this = mtd->priv; ++ struct mxc_nand_host *host = this->priv; ++ u16 i, j; ++ u16 n = mtd->writesize >> 9; ++ u8 *d = host->data_buf + mtd->writesize; ++ u8 *s = host->regs + SPARE_AREA0; ++ u16 t = host->spare_len; ++ ++ j = (mtd->oobsize / n >> 1) << 1; ++ ++ if (bfrom) { ++ for (i = 0; i < n - 1; i++) ++ memcpy(d + i * j, s + i * t, j); ++ ++ /* the last section */ ++ memcpy(d + i * j, s + i * t, mtd->oobsize - i * j); ++ } else { ++ for (i = 0; i < n - 1; i++) ++ memcpy(&s[i * t], &d[i * j], j); ++ ++ /* the last section */ ++ memcpy(&s[i * t], &d[i * j], mtd->oobsize - i * j); ++ } ++} ++ + static void mxc_do_addr_cycle(struct mtd_info *mtd, int column, int page_addr) + { + struct nand_chip *nand_chip = mtd->priv; +@@ -707,19 +546,18 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + switch (command) { + + case NAND_CMD_STATUS: +- host->col_addr = 0; ++ host->buf_start = 0; + host->status_request = true; + break; + + case NAND_CMD_READ0: +- host->col_addr = column; +- host->spare_only = false; ++ host->buf_start = column; + useirq = false; + break; + + case NAND_CMD_READOOB: +- host->col_addr = column; +- host->spare_only = true; ++ host->buf_start = column + mtd->writesize; ++ + useirq = false; + if (host->pagesize_2k) + command = NAND_CMD_READ0; /* only READ0 is valid */ +@@ -739,15 +577,13 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + mxc_nand_command(mtd, NAND_CMD_READ0, 0, + page_addr); + +- host->col_addr = column - mtd->writesize; +- host->spare_only = true; ++ host->buf_start = column; + + /* Set program pointer to spare region */ + if (!host->pagesize_2k) + send_cmd(host, NAND_CMD_READOOB, false); + } else { +- host->spare_only = false; +- host->col_addr = column; ++ host->buf_start = column; + + /* Set program pointer to page start */ + if (!host->pagesize_2k) +@@ -757,13 +593,15 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + break; + + case NAND_CMD_PAGEPROG: +- send_page(host, 0, host->spare_only, NFC_INPUT); ++ memcpy(host->regs + MAIN_AREA0, host->data_buf, mtd->writesize); ++ copy_spare(mtd, false); ++ send_page(host, 0, NFC_INPUT); + + if (host->pagesize_2k) { + /* data in 4 areas datas */ +- send_page(host, 1, host->spare_only, NFC_INPUT); +- send_page(host, 2, host->spare_only, NFC_INPUT); +- send_page(host, 3, host->spare_only, NFC_INPUT); ++ send_page(host, 1, NFC_INPUT); ++ send_page(host, 2, NFC_INPUT); ++ send_page(host, 3, NFC_INPUT); + } + + break; +@@ -789,16 +627,18 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + /* send read confirm command */ + send_cmd(host, NAND_CMD_READSTART, true); + /* read for each AREA */ +- send_page(host, 0, host->spare_only, NFC_OUTPUT); +- send_page(host, 1, host->spare_only, NFC_OUTPUT); +- send_page(host, 2, host->spare_only, NFC_OUTPUT); +- send_page(host, 3, host->spare_only, NFC_OUTPUT); ++ send_page(host, 0, NFC_OUTPUT); ++ send_page(host, 1, NFC_OUTPUT); ++ send_page(host, 2, NFC_OUTPUT); ++ send_page(host, 3, NFC_OUTPUT); + } else +- send_page(host, 0, host->spare_only, NFC_OUTPUT); ++ send_page(host, 0, NFC_OUTPUT); ++ ++ memcpy(host->data_buf, host->regs + MAIN_AREA0, mtd->writesize); ++ copy_spare(mtd, true); + break; + + case NAND_CMD_READID: +- host->col_addr = 0; + send_read_id(host); + break; + +@@ -824,10 +664,14 @@ static int __init mxcnd_probe(struct platform_device *pdev) + int err = 0, nr_parts = 0; + + /* Allocate memory for MTD device structure and private data */ +- host = kzalloc(sizeof(struct mxc_nand_host), GFP_KERNEL); ++ host = kzalloc(sizeof(struct mxc_nand_host) + NAND_MAX_PAGESIZE + ++ NAND_MAX_OOBSIZE, GFP_KERNEL); + if (!host) + return -ENOMEM; + ++ host->data_buf = (uint8_t *)(host + 1); ++ host->spare_len = 16; ++ + host->dev = &pdev->dev; + /* structures must be linked */ + this = &host->nand; +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0010-MXC-NFC-Add-the-clock-resource-to-support-NFC-in-i.patch b/recipes/linux/linux-2.6.31/pcm043/0010-MXC-NFC-Add-the-clock-resource-to-support-NFC-in-i.patch new file mode 100644 index 0000000000..294acbc5f3 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0010-MXC-NFC-Add-the-clock-resource-to-support-NFC-in-i.patch @@ -0,0 +1,61 @@ +From db1d93750d22c87b588ade0c8e083f8d94ddf88b Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 15:44:00 +0200 +Subject: [PATCH 10/15] MXC NFC: Add the clock resource to support NFC in i.MX35 + +Signed-off-by: Juergen Beisert + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + arch/arm/mach-mx3/clock-imx35.c | 30 ++++++++++++++++++++++++++++++ + 1 file changed, 30 insertions(+) + +Index: arch/arm/mach-mx3/clock-imx35.c +=================================================================== +--- arch/arm/mach-mx3/clock-imx35.c.orig 2009-12-08 11:03:44.248614597 +0100 ++++ arch/arm/mach-mx3/clock-imx35.c 2009-12-08 11:04:48.958686514 +0100 +@@ -387,6 +387,35 @@ + DEFINE_CLOCK(iim_clk, 0, CCM_CGR3, 2, NULL, NULL); + DEFINE_CLOCK(gpu2d_clk, 0, CCM_CGR3, 4, NULL, NULL); + ++static int clk_dummy_enable(struct clk *clk) ++{ ++ return 0; ++} ++ ++static void clk_dummy_disable(struct clk *clk) ++{ ++} ++ ++static unsigned long get_rate_nfc(struct clk *clk) ++{ ++ unsigned long div1; ++ ++ div1 = (__raw_readl(CCM_BASE + CCM_PDR4) >> 28) + 1; ++ ++ return get_rate_ahb(NULL) / div1; ++} ++ ++/* NAND Controller: It seems it can't be disabled */ ++static struct clk nfc_clk = { ++ .id = 0, ++ .enable_reg = 0, ++ .enable_shift = 0, ++ .get_rate = get_rate_nfc, ++ .set_rate = NULL, /* set_rate_nfc, */ ++ .enable = clk_dummy_enable, ++ .disable = clk_dummy_disable ++}; ++ + #define _REGISTER_CLOCK(d, n, c) \ + { \ + .dev_id = d, \ +@@ -448,6 +477,7 @@ + _REGISTER_CLOCK(NULL, "csi", csi_clk) + _REGISTER_CLOCK(NULL, "iim", iim_clk) + _REGISTER_CLOCK(NULL, "gpu2d", gpu2d_clk) ++ _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) + }; + + int __init mx35_clocks_init() diff --git a/recipes/linux/linux-2.6.31/pcm043/0010-i.MX35-Fix-audmux-clock.patch b/recipes/linux/linux-2.6.31/pcm043/0010-i.MX35-Fix-audmux-clock.patch new file mode 100644 index 0000000000..765c783442 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0010-i.MX35-Fix-audmux-clock.patch @@ -0,0 +1,52 @@ +From 4e3f4ad37028ae59f910cff4cf9ce2f1acc62d66 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Mon, 2 Nov 2009 09:49:41 +0100 +Subject: [PATCH 10/28] i.MX35: Fix audmux clock + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx3/clock-imx35.c | 7 +++---- + 1 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/mach-mx3/clock-imx35.c b/arch/arm/mach-mx3/clock-imx35.c +index 02b2507..9c0ec17 100644 +--- a/arch/arm/mach-mx3/clock-imx35.c ++++ b/arch/arm/mach-mx3/clock-imx35.c +@@ -322,7 +322,7 @@ static void clk_cgr_disable(struct clk *clk) + + DEFINE_CLOCK(asrc_clk, 0, CCM_CGR0, 0, NULL, NULL); + DEFINE_CLOCK(ata_clk, 0, CCM_CGR0, 2, get_rate_ipg, NULL); +-DEFINE_CLOCK(audmux_clk, 0, CCM_CGR0, 4, NULL, NULL); ++/* DEFINE_CLOCK(audmux_clk, 0, CCM_CGR0, 4, NULL, NULL); */ + DEFINE_CLOCK(can1_clk, 0, CCM_CGR0, 6, get_rate_ipg, NULL); + DEFINE_CLOCK(can2_clk, 1, CCM_CGR0, 8, get_rate_ipg, NULL); + DEFINE_CLOCK(cspi1_clk, 0, CCM_CGR0, 10, get_rate_ipg, NULL); +@@ -368,7 +368,7 @@ DEFINE_CLOCK(uart3_clk, 2, CCM_CGR2, 20, get_rate_uart, NULL); + DEFINE_CLOCK(usbotg_clk, 0, CCM_CGR2, 22, NULL, NULL); + DEFINE_CLOCK(wdog_clk, 0, CCM_CGR2, 24, NULL, NULL); + DEFINE_CLOCK(max_clk, 0, CCM_CGR2, 26, NULL, NULL); +-DEFINE_CLOCK(admux_clk, 0, CCM_CGR2, 30, NULL, NULL); ++DEFINE_CLOCK(audmux_clk, 0, CCM_CGR2, 30, NULL, NULL); + + DEFINE_CLOCK(csi_clk, 0, CCM_CGR3, 0, get_rate_csi, NULL); + DEFINE_CLOCK(iim_clk, 0, CCM_CGR3, 2, NULL, NULL); +@@ -384,7 +384,6 @@ DEFINE_CLOCK(gpu2d_clk, 0, CCM_CGR3, 4, NULL, NULL); + static struct clk_lookup lookups[] = { + _REGISTER_CLOCK(NULL, "asrc", asrc_clk) + _REGISTER_CLOCK(NULL, "ata", ata_clk) +- _REGISTER_CLOCK(NULL, "audmux", audmux_clk) + _REGISTER_CLOCK(NULL, "can", can1_clk) + _REGISTER_CLOCK(NULL, "can", can2_clk) + _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) +@@ -429,7 +428,7 @@ static struct clk_lookup lookups[] = { + _REGISTER_CLOCK(NULL, "usbotg", usbotg_clk) + _REGISTER_CLOCK("mxc_wdt.0", NULL, wdog_clk) + _REGISTER_CLOCK(NULL, "max", max_clk) +- _REGISTER_CLOCK(NULL, "admux", admux_clk) ++ _REGISTER_CLOCK(NULL, "audmux", audmux_clk) + _REGISTER_CLOCK(NULL, "csi", csi_clk) + _REGISTER_CLOCK(NULL, "iim", iim_clk) + _REGISTER_CLOCK(NULL, "gpu2d", gpu2d_clk) +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0010-mxc-nand-simplify-command-processing.patch b/recipes/linux/linux-2.6.31/pcm043/0010-mxc-nand-simplify-command-processing.patch new file mode 100644 index 0000000000..a7d5cda821 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0010-mxc-nand-simplify-command-processing.patch @@ -0,0 +1,143 @@ +From c1aef45fdb7e5281904ea25c035025d6cc19eff6 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 4 Jun 2009 17:18:01 +0200 +Subject: [PATCH] mxc nand: simplify command processing + +Instead of having two switch/case with other operations +in between, use only one switch/case + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 81 ++++++++++++++++++------------------------ + 1 files changed, 35 insertions(+), 46 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 4c338ae..e5de71a 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -533,7 +533,6 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + { + struct nand_chip *nand_chip = mtd->priv; + struct mxc_nand_host *host = nand_chip->priv; +- int useirq = true; + + DEBUG(MTD_DEBUG_LEVEL3, + "mxc_nand_command (cmd = 0x%x, col = 0x%x, page = 0x%x)\n", +@@ -548,19 +547,37 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + case NAND_CMD_STATUS: + host->buf_start = 0; + host->status_request = true; +- break; + +- case NAND_CMD_READ0: +- host->buf_start = column; +- useirq = false; ++ send_cmd(host, command, true); ++ mxc_do_addr_cycle(mtd, column, page_addr); + break; + ++ case NAND_CMD_READ0: + case NAND_CMD_READOOB: +- host->buf_start = column + mtd->writesize; ++ if (command == NAND_CMD_READ0) ++ host->buf_start = column; ++ else ++ host->buf_start = column + mtd->writesize; + +- useirq = false; + if (host->pagesize_2k) + command = NAND_CMD_READ0; /* only READ0 is valid */ ++ ++ send_cmd(host, command, false); ++ mxc_do_addr_cycle(mtd, column, page_addr); ++ ++ if (host->pagesize_2k) { ++ /* send read confirm command */ ++ send_cmd(host, NAND_CMD_READSTART, true); ++ /* read for each AREA */ ++ send_page(host, 0, NFC_OUTPUT); ++ send_page(host, 1, NFC_OUTPUT); ++ send_page(host, 2, NFC_OUTPUT); ++ send_page(host, 3, NFC_OUTPUT); ++ } else ++ send_page(host, 0, NFC_OUTPUT); ++ ++ memcpy(host->data_buf, host->regs + MAIN_AREA0, mtd->writesize); ++ copy_spare(mtd, true); + break; + + case NAND_CMD_SEQIN: +@@ -589,7 +606,9 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + if (!host->pagesize_2k) + send_cmd(host, NAND_CMD_READ0, false); + } +- useirq = false; ++ ++ send_cmd(host, command, false); ++ mxc_do_addr_cycle(mtd, column, page_addr); + break; + + case NAND_CMD_PAGEPROG: +@@ -604,51 +623,21 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + send_page(host, 3, NFC_INPUT); + } + +- break; +- +- case NAND_CMD_ERASE1: +- useirq = false; +- break; +- } +- +- /* Write out the command to the device. */ +- send_cmd(host, command, useirq); +- mxc_do_addr_cycle(mtd, column, page_addr); +- +- /* Command post-processing step */ +- switch (command) { +- +- case NAND_CMD_RESET: +- break; +- +- case NAND_CMD_READOOB: +- case NAND_CMD_READ0: +- if (host->pagesize_2k) { +- /* send read confirm command */ +- send_cmd(host, NAND_CMD_READSTART, true); +- /* read for each AREA */ +- send_page(host, 0, NFC_OUTPUT); +- send_page(host, 1, NFC_OUTPUT); +- send_page(host, 2, NFC_OUTPUT); +- send_page(host, 3, NFC_OUTPUT); +- } else +- send_page(host, 0, NFC_OUTPUT); +- +- memcpy(host->data_buf, host->regs + MAIN_AREA0, mtd->writesize); +- copy_spare(mtd, true); ++ send_cmd(host, command, true); ++ mxc_do_addr_cycle(mtd, column, page_addr); + break; + + case NAND_CMD_READID: ++ send_cmd(host, command, true); ++ mxc_do_addr_cycle(mtd, column, page_addr); + send_read_id(host); + break; + +- case NAND_CMD_PAGEPROG: +- break; +- +- case NAND_CMD_STATUS: +- break; +- ++ case NAND_CMD_ERASE1: + case NAND_CMD_ERASE2: ++ send_cmd(host, command, false); ++ mxc_do_addr_cycle(mtd, column, page_addr); ++ + break; + } + } +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0011-MX31-add-spi-controller-devices-resources.patch b/recipes/linux/linux-2.6.31/pcm043/0011-MX31-add-spi-controller-devices-resources.patch new file mode 100644 index 0000000000..66e425bac5 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0011-MX31-add-spi-controller-devices-resources.patch @@ -0,0 +1,97 @@ +From 5a3ba6a98a5822698ad4552a4af47b3230807952 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 19 Dec 2008 14:32:15 +0100 +Subject: [PATCH 11/28] MX31: add spi controller devices/resources + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx3/devices.c | 61 +++++++++++++++++++++++++++++++++++++++++++ + arch/arm/mach-mx3/devices.h | 3 ++ + 2 files changed, 64 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-mx3/devices.c b/arch/arm/mach-mx3/devices.c +index 06dab5f..c32049a 100644 +--- a/arch/arm/mach-mx3/devices.c ++++ b/arch/arm/mach-mx3/devices.c +@@ -454,6 +454,67 @@ struct platform_device imx_ssi_device1 = { + .resource = imx_ssi_resources1, + }; + ++/* ++ * SPI master controller ++ * 3 channels ++ */ ++static struct resource imx_spi_0_resources[] = { ++ { ++ .start = CSPI1_BASE_ADDR, ++ .end = CSPI1_BASE_ADDR + SZ_4K - 1, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MXC_INT_CSPI1, ++ .end = MXC_INT_CSPI1, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++static struct resource imx_spi_1_resources[] = { ++ { ++ .start = CSPI2_BASE_ADDR, ++ .end = CSPI2_BASE_ADDR + SZ_4K - 1, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MXC_INT_CSPI2, ++ .end = MXC_INT_CSPI2, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++static struct resource imx_spi_2_resources[] = { ++ { ++ .start = CSPI3_BASE_ADDR, ++ .end = CSPI3_BASE_ADDR + SZ_4K - 1, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MXC_INT_CSPI3, ++ .end = MXC_INT_CSPI3, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++struct platform_device imx_spi_device0 = { ++ .name = "spi_imx", ++ .id = 0, ++ .num_resources = ARRAY_SIZE(imx_spi_0_resources), ++ .resource = imx_spi_0_resources, ++}; ++ ++struct platform_device imx_spi_device1 = { ++ .name = "spi_imx", ++ .id = 1, ++ .num_resources = ARRAY_SIZE(imx_spi_1_resources), ++ .resource = imx_spi_1_resources, ++}; ++ ++struct platform_device imx_spi_device2 = { ++ .name = "spi_imx", ++ .id = 2, ++ .num_resources = ARRAY_SIZE(imx_spi_2_resources), ++ .resource = imx_spi_2_resources, ++}; ++ + static int mx3_devices_init(void) + { + if (cpu_is_mx31()) { +diff --git a/arch/arm/mach-mx3/devices.h b/arch/arm/mach-mx3/devices.h +index 224c2eb..402b60e 100644 +--- a/arch/arm/mach-mx3/devices.h ++++ b/arch/arm/mach-mx3/devices.h +@@ -19,3 +19,6 @@ extern struct platform_device mxc_otg_udc_device; + extern struct platform_device mxc_rnga_device; + extern struct platform_device imx_ssi_device0; + extern struct platform_device imx_ssi_device1; ++extern struct platform_device imx_spi_device0; ++extern struct platform_device imx_spi_device1; ++extern struct platform_device imx_spi_device2; +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0011-MXC-NFC-Fix-NFC-s-clock-name.patch b/recipes/linux/linux-2.6.31/pcm043/0011-MXC-NFC-Fix-NFC-s-clock-name.patch new file mode 100644 index 0000000000..a2e1d28e71 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0011-MXC-NFC-Fix-NFC-s-clock-name.patch @@ -0,0 +1,28 @@ +From 3a28735748fbdeb6c8036f8f64998a4d44ab9228 Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 15:47:34 +0200 +Subject: [PATCH 11/15] MXC NFC: Fix NFC's clock name + +Use a name in a style like all other clocks. + +Signed-off-by: Juergen Beisert +--- + drivers/mtd/nand/mxc_nand_v2.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand_v2.c b/drivers/mtd/nand/mxc_nand_v2.c +index 3891d9a..bab3712 100644 +--- a/drivers/mtd/nand/mxc_nand_v2.c ++++ b/drivers/mtd/nand/mxc_nand_v2.c +@@ -858,7 +858,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) + this->read_buf = mxc_nand_read_buf; + this->verify_buf = mxc_nand_verify_buf; + +- host->clk = clk_get(&pdev->dev, "nfc_clk"); ++ host->clk = clk_get(&pdev->dev, NULL); + if (IS_ERR(host->clk)) { + err = PTR_ERR(host->clk); + goto eclk; +-- +1.6.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0011-mxc-nand-modify-send_page-to-send-all-pages-not-on.patch b/recipes/linux/linux-2.6.31/pcm043/0011-mxc-nand-modify-send_page-to-send-all-pages-not-on.patch new file mode 100644 index 0000000000..80979a897e --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0011-mxc-nand-modify-send_page-to-send-all-pages-not-on.patch @@ -0,0 +1,87 @@ +From 19cd65a26dafcb725b0b3c99b0a0d79534c8c460 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 4 Jun 2009 17:25:53 +0200 +Subject: [PATCH] mxc nand: modify send_page to send all pages, not only one + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 45 +++++++++++++++++++----------------------- + 1 files changed, 20 insertions(+), 25 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index e5de71a..04b2bf2 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -228,16 +228,25 @@ static void send_addr(struct mxc_nand_host *host, uint16_t addr, int islast) + wait_op_done(host, TROP_US_DELAY, islast); + } + +-static void send_page(struct mxc_nand_host *host, uint8_t buf_id, +- unsigned int ops) ++static void send_page(struct mxc_nand_host *host, unsigned int ops) + { +- /* NANDFC buffer 0 is used for page read/write */ +- writew(buf_id, host->regs + NFC_BUF_ADDR); ++ int bufs, i; + +- writew(ops, host->regs + NFC_CONFIG2); ++ if (host->pagesize_2k) ++ bufs = 4; ++ else ++ bufs = 1; + +- /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, true); ++ for (i = 0; i < bufs; i++) { ++ ++ /* NANDFC buffer 0 is used for page read/write */ ++ writew(i, host->regs + NFC_BUF_ADDR); ++ ++ writew(ops, host->regs + NFC_CONFIG2); ++ ++ /* Wait for operation to complete */ ++ wait_op_done(host, TROP_US_DELAY, true); ++ } + } + + /* Request the NANDFC to perform a read of the NAND device ID. */ +@@ -565,16 +574,10 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + send_cmd(host, command, false); + mxc_do_addr_cycle(mtd, column, page_addr); + +- if (host->pagesize_2k) { +- /* send read confirm command */ ++ if (host->pagesize_2k) + send_cmd(host, NAND_CMD_READSTART, true); +- /* read for each AREA */ +- send_page(host, 0, NFC_OUTPUT); +- send_page(host, 1, NFC_OUTPUT); +- send_page(host, 2, NFC_OUTPUT); +- send_page(host, 3, NFC_OUTPUT); +- } else +- send_page(host, 0, NFC_OUTPUT); ++ ++ send_page(host, NFC_OUTPUT); + + memcpy(host->data_buf, host->regs + MAIN_AREA0, mtd->writesize); + copy_spare(mtd, true); +@@ -614,15 +617,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + case NAND_CMD_PAGEPROG: + memcpy(host->regs + MAIN_AREA0, host->data_buf, mtd->writesize); + copy_spare(mtd, false); +- send_page(host, 0, NFC_INPUT); +- +- if (host->pagesize_2k) { +- /* data in 4 areas datas */ +- send_page(host, 1, NFC_INPUT); +- send_page(host, 2, NFC_INPUT); +- send_page(host, 3, NFC_INPUT); +- } +- ++ send_page(host, NFC_INPUT); + send_cmd(host, command, true); + mxc_do_addr_cycle(mtd, column, page_addr); + break; +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0012-MXC-NFC-i.MX35-can-work-with-the-v2-not-with-v1-of.patch b/recipes/linux/linux-2.6.31/pcm043/0012-MXC-NFC-i.MX35-can-work-with-the-v2-not-with-v1-of.patch new file mode 100644 index 0000000000..9a88af093b --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0012-MXC-NFC-i.MX35-can-work-with-the-v2-not-with-v1-of.patch @@ -0,0 +1,34 @@ +From 0013249e16bc7527bf63b483486ead97ea59839e Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 15:49:52 +0200 +Subject: [PATCH 12/15] MXC NFC: i.MX35 can work with the v2, not with v1 of this driver + +Signed-off-by: Juergen Beisert + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + drivers/mtd/nand/Kconfig | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: drivers/mtd/nand/Kconfig +=================================================================== +--- drivers/mtd/nand/Kconfig.orig 2009-12-08 10:02:59.468654404 +0100 ++++ drivers/mtd/nand/Kconfig 2009-12-08 10:03:38.130073936 +0100 +@@ -421,14 +421,14 @@ + + config MTD_NAND_MXC + tristate "MXC NAND support" +- depends on ARCH_MX2 || ARCH_MX3 ++ depends on ARCH_MX2 || (ARCH_MX3 && !ARCH_MX35) + help + This enables the driver for the NAND flash controller on the + MXC processors. + + config MTD_NAND_MXC_V2 + tristate "MXC NAND support" +- depends on ARCH_MX25 ++ depends on ARCH_MX25 || ARCH_MX35 + help + This enables the driver for the NAND flash controller on the + MXC processors. diff --git a/recipes/linux/linux-2.6.31/pcm043/0012-i.MX27-clock-rename-spi-clocks-to-match-device.patch b/recipes/linux/linux-2.6.31/pcm043/0012-i.MX27-clock-rename-spi-clocks-to-match-device.patch new file mode 100644 index 0000000000..db2474ca72 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0012-i.MX27-clock-rename-spi-clocks-to-match-device.patch @@ -0,0 +1,30 @@ +From 3e3ef3c8c617d291bb674488cd2920ad9088451e Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 24 Sep 2009 09:58:52 +0200 +Subject: [PATCH 12/28] i.MX27 clock: rename spi clocks to match device + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx2/clock_imx27.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/mach-mx2/clock_imx27.c b/arch/arm/mach-mx2/clock_imx27.c +index 5abb763..1e9d608 100644 +--- a/arch/arm/mach-mx2/clock_imx27.c ++++ b/arch/arm/mach-mx2/clock_imx27.c +@@ -638,9 +638,9 @@ static struct clk_lookup lookups[] = { + _REGISTER_CLOCK("mxc-mmc.0", NULL, sdhc1_clk) + _REGISTER_CLOCK("mxc-mmc.1", NULL, sdhc2_clk) + _REGISTER_CLOCK("mxc-mmc.2", NULL, sdhc3_clk) +- _REGISTER_CLOCK(NULL, "cspi1", cspi1_clk) +- _REGISTER_CLOCK(NULL, "cspi2", cspi2_clk) +- _REGISTER_CLOCK(NULL, "cspi3", cspi3_clk) ++ _REGISTER_CLOCK("spi_imx.0", NULL, cspi1_clk) ++ _REGISTER_CLOCK("spi_imx.1", NULL, cspi2_clk) ++ _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) + _REGISTER_CLOCK("imx-fb.0", NULL, lcdc_clk) + _REGISTER_CLOCK(NULL, "csi", csi_clk) + _REGISTER_CLOCK(NULL, "usb", usb_clk) +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0012-mxc_nand-remove-unused-defines.patch b/recipes/linux/linux-2.6.31/pcm043/0012-mxc_nand-remove-unused-defines.patch new file mode 100644 index 0000000000..8b4a438111 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0012-mxc_nand-remove-unused-defines.patch @@ -0,0 +1,31 @@ +From cf903eff4c30f2eca4a67951f5b66e961f0ba542 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 5 Jun 2009 10:55:32 +0200 +Subject: [PATCH] mxc_nand: remove unused defines + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 7 ------- + 1 files changed, 0 insertions(+), 7 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 04b2bf2..2988f1d 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -122,13 +122,6 @@ struct mxc_nand_host { + + /* Define delays in microsec for NAND device operations */ + #define TROP_US_DELAY 2000 +-/* Macros to get byte and bit positions of ECC */ +-#define COLPOS(x) ((x) >> 3) +-#define BITPOS(x) ((x) & 0xf) +- +-/* Define single bit Error positions in Main & Spare area */ +-#define MAIN_SINGLEBIT_ERROR 0x4 +-#define SPARE_SINGLEBIT_ERROR 0x1 + + /* OOB placement block for use with hardware ecc generation */ + static struct nand_ecclayout nand_hw_eccoob_smallpage = { +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0013-MXC-NFC-Add-the-cpu_is_mx25-macro.patch b/recipes/linux/linux-2.6.31/pcm043/0013-MXC-NFC-Add-the-cpu_is_mx25-macro.patch new file mode 100644 index 0000000000..9fec47bf0b --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0013-MXC-NFC-Add-the-cpu_is_mx25-macro.patch @@ -0,0 +1,38 @@ +From 6b82a298e085e6bc47d1c241871578d66208ee0f Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 16:10:55 +0200 +Subject: [PATCH 13/15] MXC NFC: Add the cpu_is_mx25 macro + +To be able to compile this NFC driver we need all CPU macros to +distinguish the different revisions of the NFC. +Note: This macro is untested for the i.MX25 case. Tested for a +i.MX35 case only. + +Signed-off-by: Juergen Beisert +--- + arch/arm/plat-mxc/include/mach/mxc.h | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +Index: arch/arm/plat-mxc/include/mach/mxc.h +=================================================================== +--- arch/arm/plat-mxc/include/mach/mxc.h.orig ++++ arch/arm/plat-mxc/include/mach/mxc.h +@@ -58,6 +58,18 @@ extern unsigned int __mxc_cpu_type; + # define cpu_is_mx21() (0) + #endif + ++#ifdef CONFIG_MACH_MX25 ++# ifdef mxc_cpu_type ++# undef mxc_cpu_type ++# define mxc_cpu_type __mxc_cpu_type ++# else ++# define mxc_cpu_type MXC_CPU_MX25 ++# endif ++# define cpu_is_mx25() (mxc_cpu_type == MXC_CPU_MX25) ++#else ++# define cpu_is_mx25() (0) ++#endif ++ + #ifdef CONFIG_MACH_MX27 + # ifdef mxc_cpu_type + # undef mxc_cpu_type diff --git a/recipes/linux/linux-2.6.31/pcm043/0013-add-a-mc13783-codec-driver.patch b/recipes/linux/linux-2.6.31/pcm043/0013-add-a-mc13783-codec-driver.patch new file mode 100644 index 0000000000..c89b83d34b --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0013-add-a-mc13783-codec-driver.patch @@ -0,0 +1,834 @@ +From a0437114fe666815acb9f7573acdcdc36dc45203 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 22 Oct 2009 14:10:14 +0200 +Subject: [PATCH 13/28] add a mc13783 codec driver + +Signed-off-by: Sascha Hauer +--- + sound/soc/codecs/Kconfig | 4 + + sound/soc/codecs/Makefile | 2 + + sound/soc/codecs/mc13783.c | 730 ++++++++++++++++++++++++++++++++++++++++++++ + sound/soc/codecs/mc13783.h | 32 ++ + 4 files changed, 768 insertions(+), 0 deletions(-) + create mode 100644 sound/soc/codecs/mc13783.c + create mode 100644 sound/soc/codecs/mc13783.h + +diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig +index bbc97fd..34f5c94 100644 +--- a/sound/soc/codecs/Kconfig ++++ b/sound/soc/codecs/Kconfig +@@ -17,6 +17,7 @@ config SND_SOC_ALL_CODECS + select SND_SOC_AK4104 if SPI_MASTER + select SND_SOC_AK4535 if I2C + select SND_SOC_CS4270 if I2C ++ select SND_SOC_MC13783 if SPI + select SND_SOC_PCM3008 + select SND_SOC_SPDIF + select SND_SOC_SSM2602 if I2C +@@ -89,6 +90,9 @@ config SND_SOC_CS4270_VD33_ERRATA + config SND_SOC_L3 + tristate + ++config SND_SOC_MC13783 ++ tristate ++ + config SND_SOC_PCM3008 + tristate + +diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile +index 8b75305..0d3dbc7 100644 +--- a/sound/soc/codecs/Makefile ++++ b/sound/soc/codecs/Makefile +@@ -5,6 +5,7 @@ snd-soc-ak4104-objs := ak4104.o + snd-soc-ak4535-objs := ak4535.o + snd-soc-cs4270-objs := cs4270.o + snd-soc-l3-objs := l3.o ++snd-soc-mc13783-objs := mc13783.o + snd-soc-pcm3008-objs := pcm3008.o + snd-soc-spdif-objs := spdif_transciever.o + snd-soc-ssm2602-objs := ssm2602.o +@@ -42,6 +43,7 @@ obj-$(CONFIG_SND_SOC_AK4104) += snd-soc-ak4104.o + obj-$(CONFIG_SND_SOC_AK4535) += snd-soc-ak4535.o + obj-$(CONFIG_SND_SOC_CS4270) += snd-soc-cs4270.o + obj-$(CONFIG_SND_SOC_L3) += snd-soc-l3.o ++obj-$(CONFIG_SND_SOC_MC13783) += snd-soc-mc13783.o + obj-$(CONFIG_SND_SOC_PCM3008) += snd-soc-pcm3008.o + obj-$(CONFIG_SND_SOC_SPDIF) += snd-soc-spdif.o + obj-$(CONFIG_SND_SOC_SSM2602) += snd-soc-ssm2602.o +diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c +new file mode 100644 +index 0000000..5a7b4e9 +--- /dev/null ++++ b/sound/soc/codecs/mc13783.c +@@ -0,0 +1,730 @@ ++/* ++ * Copyright 2008 Juergen Beisert, kernel@pengutronix.de ++ * Copyright 2009 Sascha Hauer, s.hauer@pengutronix.de ++ * ++ * Initial development of this code was funded by ++ * Phytec Messtechnik GmbH, http://www.phytec.de ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, ++ * MA 02110-1301, USA. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "mc13783.h" ++ ++#define PMIC_AUDIO_RX_0 36 ++#define PMIC_AUDIO_RX_1 37 ++#define PMIC_AUDIO_TX 38 ++#define PMIC_SSI_NETWORK 39 ++#define PMIC_AUDIO_CODEC 40 ++#define PMIC_AUDIO_DAC 41 ++ ++#define SSI_NETWORK_CDCTXRXSLOT(x) (((x) & 0x3) << 2) ++#define SSI_NETWORK_CDCTXSECSLOT(x) (((x) & 0x3) << 4) ++#define SSI_NETWORK_CDCRXSECSLOT(x) (((x) & 0x3) << 6) ++#define SSI_NETWORK_CDCRXSECGAIN(x) (((x) & 0x3) << 8) ++#define SSI_NETWORK_CDCSUMGAIN(x) (1 << 10) ++#define SSI_NETWORK_CDCFSDLY(x) (1 << 11) ++#define SSI_NETWORK_STDCSLOT(x) (((x) & 0x3) << 12) ++#define SSI_NETWORK_STDCRXSLOT(x) (((x) & 0x3) << 14) ++#define SSI_NETWORK_STDCRXSECSLOT(x) (((x) & 0x3) << 16) ++#define SSI_NETWORK_STDCRXSECGAIN(x) (((x) & 0x3) << 18) ++#define SSI_NETWORK_STDCSUMGAIN (1 << 20) ++ ++#define STEREO_DAC_STD_SSI_SEL (1 << 0) ++#define STEREO_DAC_STD_CLK_SEL (1 << 1) ++#define STEREO_DAC_STD_CSM (1 << 2) ++#define STEREO_DAC_STD_BCL_INV (1 << 3) ++#define STEREO_DAC_STD_CFS_INV (1 << 4) ++#define STEREO_DAC_STD_CFS(x) (((x) & 0x3) << 5) ++#define STEREO_DAC_STD_CLK(x) (((x) & 0x7) << 7) ++#define STEREO_DAC_STD_CFS_DLY_B (1 << 10) ++#define STEREO_DAC_STD_C_EN (1 << 11) ++#define STEREO_DAC_STD_C_CLK_EN (1 << 12) ++#define STEREO_DAC_STD_C_RESET (1 << 15) ++#define STEREO_DAC_SPDIF (1 << 16) ++#define STEREO_DAC_SR(x) (((x) & 0xf) << 17) ++ ++static struct mc13783 *mc13783; ++ ++struct mc13783_priv { ++ struct snd_soc_codec codec; ++ ++ u32 reg_cache[42]; ++ ++ int mc13783_asp_val; ++ int mc13783_alsp_val; ++}; ++ ++static unsigned int mc13783_read(struct snd_soc_codec *codec, ++ unsigned int reg) ++{ ++ struct mc13783_priv *priv = codec->private_data; ++ ++ return priv->reg_cache[reg]; ++} ++ ++static int mc13783_write(struct snd_soc_codec *codec, ++ unsigned int reg, unsigned int value) ++{ ++ struct mc13783_priv *priv = codec->private_data; ++ ++ priv->reg_cache[reg] = value; ++ ++ return mc13783_reg_write(mc13783, reg, value); ++} ++ ++/* Mapping between sample rates and register value */ ++static unsigned int mc13783_rates[] = { ++ 8000, 11025, 12000, 16000, ++ 22050, 24000, 32000, 44100, ++ 48000, 64000, 96000 ++}; ++ ++static int mc13783_pcm_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params, ++ struct snd_soc_dai *dai) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_device *socdev = rtd->socdev; ++ struct snd_soc_codec *codec = socdev->card->codec; ++ unsigned int rate = params_rate(params); ++ int i; ++ unsigned int reg; ++ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ for (i = 0; i < ARRAY_SIZE(mc13783_rates); i++) { ++ if (rate == mc13783_rates[i]) { ++ snd_soc_update_bits(codec, PMIC_AUDIO_DAC, ++ 0xf << 17, i << 17); ++ return 0; ++ } ++ } ++ } else { ++ if (rate == 8000) ++ reg = 0; ++ else ++ reg = (1 << 10); ++ ++ snd_soc_update_bits(codec, PMIC_AUDIO_CODEC, ++ 0x1 << 10, reg); ++ ++ return 0; ++ } ++ ++ return -EINVAL; ++} ++ ++static int mc13783_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) ++{ ++ struct snd_soc_codec *codec = dai->codec; ++ unsigned int reg; ++ ++ if (dai->id == MC13783_ID_STEREO_DAC) ++ reg = mc13783_read(codec, PMIC_AUDIO_DAC); ++ else ++ reg = mc13783_read(codec, PMIC_AUDIO_CODEC); ++ ++ reg &= ~STEREO_DAC_STD_CFS(3); ++ reg &= ~STEREO_DAC_STD_BCL_INV; ++ reg &= ~STEREO_DAC_STD_CFS_INV; ++ reg &= ~STEREO_DAC_STD_CSM; ++ reg &= ~STEREO_DAC_STD_C_CLK_EN; ++ ++ /* DAI mode */ ++ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { ++ case SND_SOC_DAIFMT_I2S: ++ reg |= STEREO_DAC_STD_CFS(2); ++ break; ++ case SND_SOC_DAIFMT_DSP_A: ++ reg |= STEREO_DAC_STD_CFS(1); ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ /* DAI clock inversion */ ++ switch (fmt & SND_SOC_DAIFMT_INV_MASK) { ++ case SND_SOC_DAIFMT_NB_NF: ++ reg |= STEREO_DAC_STD_BCL_INV; ++ break; ++ case SND_SOC_DAIFMT_NB_IF: ++ reg |= STEREO_DAC_STD_BCL_INV; ++ reg |= STEREO_DAC_STD_CFS_INV; ++ break; ++ case SND_SOC_DAIFMT_IB_NF: ++ break; ++ case SND_SOC_DAIFMT_IB_IF: ++ reg |= STEREO_DAC_STD_CFS_INV; ++ break; ++ } ++ ++ /* DAI clock master masks */ ++ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { ++ case SND_SOC_DAIFMT_CBM_CFM: ++ reg |= STEREO_DAC_STD_C_CLK_EN; ++ break; ++ case SND_SOC_DAIFMT_CBS_CFS: ++ reg |= STEREO_DAC_STD_CSM; ++ case SND_SOC_DAIFMT_CBM_CFS: ++ case SND_SOC_DAIFMT_CBS_CFM: ++ return -EINVAL; ++ } ++ ++ reg |= STEREO_DAC_STD_C_EN; /* DAC power up */ ++ reg |= STEREO_DAC_STD_C_RESET; /* reset filter */ ++ ++ if (dai->id == MC13783_ID_STEREO_DAC) ++ mc13783_write(codec, PMIC_AUDIO_DAC, reg); ++ else ++ mc13783_write(codec, PMIC_AUDIO_CODEC, reg); ++ ++ return 0; ++} ++ ++static int mc13783_set_sysclk(struct snd_soc_dai *dai, ++ int clk_id, unsigned int freq, int dir) ++{ ++ struct snd_soc_codec *codec = dai->codec; ++ int clk; ++ unsigned int reg; ++ ++ if (dai->id == MC13783_ID_STEREO_DAC) ++ reg = mc13783_read(codec, PMIC_AUDIO_DAC); ++ else ++ reg = mc13783_read(codec, PMIC_AUDIO_CODEC); ++ ++ reg &= ~STEREO_DAC_STD_CLK(0x7); ++ reg &= ~STEREO_DAC_STD_CLK_SEL; ++ ++ switch (freq) { ++ case 13000000: ++ clk = 0; ++ break; ++ case 15360000: ++ clk = 1; ++ break; ++ case 16800000: ++ clk = 2; ++ break; ++ case 26000000: ++ clk = 4; ++ break; ++ case 12000000: ++ clk = 5; ++ break; ++ case 3686400: ++ clk = 6; ++ break; ++ case 33600000: ++ clk = 7; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ if (clk_id == MC13783_CLK_CLIB) ++ reg |= STEREO_DAC_STD_CLK_SEL; ++ ++ reg |= STEREO_DAC_STD_CLK(clk); ++ ++ if (dai->id == MC13783_ID_STEREO_DAC) ++ mc13783_write(codec, PMIC_AUDIO_DAC, reg); ++ else ++ mc13783_write(codec, PMIC_AUDIO_CODEC, reg); ++ ++ return 0; ++} ++ ++static int mc13783_set_tdm_slot_codec(struct snd_soc_dai *dai, ++ unsigned int mask, int slots) ++{ ++ struct snd_soc_codec *codec = dai->codec; ++ unsigned int reg; ++ ++ if (slots != 4) ++ return -EINVAL; ++ ++ reg = mc13783_read(codec, PMIC_SSI_NETWORK); ++ ++ reg &= ~(0xfff << 0); ++ reg |= (0x00 << 2); /* primary timeslot RX/TX(?) is 0 */ ++ reg |= (0x01 << 4); /* secondary timeslot TX is 1 */ ++ reg |= (0x01 << 6); /* secondary timeslot RX is 1 */ ++ ++ mc13783_write(codec, PMIC_SSI_NETWORK, reg); ++ ++ return 0; ++} ++ ++static int mc13783_get_alsp(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); ++ struct mc13783_priv *priv = codec->private_data; ++ ++ ucontrol->value.integer.value[0] = priv->mc13783_alsp_val; ++ ++ return 0; ++} ++ ++static int mc13783_put_alsp(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); ++ struct mc13783_priv *priv = codec->private_data; ++ unsigned int reg; ++ ++ priv->mc13783_alsp_val = ucontrol->value.integer.value[0]; ++ ++ reg = mc13783_read(codec, PMIC_AUDIO_RX_0); ++ ++ reg &= ~((1 << 5) | (1 << 7)); ++ ++ if (priv->mc13783_alsp_val) ++ reg |= 1 << 5; ++ ++ if (priv->mc13783_alsp_val == 2) ++ reg |= 1 << 7; ++ ++ mc13783_write(codec, PMIC_AUDIO_RX_0, reg); ++ ++ return 0; ++} ++ ++static int mc13783_pcm_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); ++ int val; ++ ++ val = mc13783_read(codec, PMIC_AUDIO_RX_0); ++ ucontrol->value.enumerated.item[0] = (val >> 22) & 1; ++ ++ return 0; ++} ++ ++static int mc13783_pcm_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); ++ unsigned int r36, r37; ++ ++ r36 = mc13783_read(codec, PMIC_AUDIO_RX_0); ++ r37 = mc13783_read(codec, PMIC_AUDIO_RX_1); ++ ++ r36 &= ~(1 << 22); ++ r37 &= ~(1 << 5); ++ ++ if (ucontrol->value.enumerated.item[0]) { ++ r36 |= (1 << 22); ++ r37 |= (1 << 5); ++ } else { ++ r36 &= ~(1 << 22); ++ r37 &= ~(1 << 5); ++ } ++ ++ mc13783_write(codec, PMIC_AUDIO_RX_0, r36); ++ mc13783_write(codec, PMIC_AUDIO_RX_1, r37); ++ ++ return 0; ++} ++ ++static int mc13783_linein_get(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); ++ int val; ++ ++ val = mc13783_read(codec, PMIC_AUDIO_RX_0); ++ ucontrol->value.enumerated.item[0] = (val >> 23) & 1; ++ ++ return 0; ++} ++ ++static int mc13783_linein_put(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); ++ unsigned int r36, r37; ++ ++ r36 = mc13783_read(codec, PMIC_AUDIO_RX_0); ++ r37 = mc13783_read(codec, PMIC_AUDIO_RX_1); ++ ++ r36 &= ~(1 << 23); ++ r37 &= ~(1 << 10); ++ ++ if (ucontrol->value.enumerated.item[0]) { ++ r36 |= (1 << 23); ++ r37 |= (1 << 10); ++ } else { ++ r36 &= ~(1 << 23); ++ r37 &= ~(1 << 10); ++ } ++ ++ mc13783_write(codec, PMIC_AUDIO_RX_0, r36); ++ mc13783_write(codec, PMIC_AUDIO_RX_1, r37); ++ ++ return 0; ++} ++ ++static int mc13783_capure_cache; ++ ++static int mc13783_get_capture(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ ucontrol->value.enumerated.item[0] = mc13783_capure_cache; ++ return 0; ++} ++ ++#define AMC1REN (1 << 5) ++#define AMC2EN (1 << 9) ++#define ATXINEN (1 << 11) ++#define RXINREC (1 << 13) ++#define AMC1LEN (1 << 7) ++ ++static int mc13783_put_capture(struct snd_kcontrol *kcontrol, ++ struct snd_ctl_elem_value *ucontrol) ++{ ++ struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); ++ unsigned int r38, change; ++ ++ r38 = mc13783_read(codec, PMIC_AUDIO_TX); ++ ++ change = (mc13783_capure_cache != ucontrol->value.enumerated.item[0]); ++ mc13783_capure_cache = ucontrol->value.enumerated.item[0]; ++ r38 &= ~(AMC1REN | AMC2EN | ATXINEN | RXINREC | AMC1LEN); ++ ++ switch (mc13783_capure_cache) { ++ case 0: ++ break; ++ case 1: ++ r38 |= RXINREC; ++ break; ++ case 2: ++ r38 |= AMC1REN | AMC1LEN; ++ break; ++ case 3: ++ r38 |= AMC1REN; ++ break; ++ case 4: ++ r38 |= AMC2EN; ++ break; ++ case 5: ++ r38 |= AMC1LEN | AMC2EN; ++ break; ++ case 6: ++ r38 |= ATXINEN; ++ break; ++ case 7: ++ r38 |= AMC1LEN | ATXINEN; ++ break; ++ case 8: ++ r38 |= AMC1LEN | RXINREC; ++ break; ++ case 9: ++ r38 |= AMC1LEN; ++ break; ++ default: ++ break; ++ } ++ ++ mc13783_write(codec, PMIC_AUDIO_TX, r38); ++ ++ return change; ++} ++ ++static const char *mc13783_asp[] = {"Off", "Codec", "Right"}; ++static const char *mc13783_alsp[] = {"Off", "Codec", "Right"}; ++ ++static const char *mc13783_ahs[] = {"Codec", "Mixer"}; ++ ++static const char *mc13783_arxout[] = {"Codec", "Mixer"}; ++ ++static const char *mc13783_capture[] = {"off/off", "rxinl/rxinr", ++ "mc1lin/mc1rin", "off/mc1rin", "off/mc2in", "mc1lin/mc2in", ++ "off/txin", "mc1lin/txin", "mc1lin/rxinr", "mc1lin/off"}; ++ ++static const char *mc13783_3d_mixer[] = {"Stereo", "Phase Mix", ++ "Mono", "Mono Mix"}; ++ ++static const struct soc_enum mc13783_enum_asp = ++ SOC_ENUM_SINGLE(PMIC_AUDIO_RX_0, 3, ARRAY_SIZE(mc13783_asp), mc13783_asp); ++ ++static const struct soc_enum mc13783_enum_alsp = ++ SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(mc13783_alsp), mc13783_alsp); ++ ++static const struct soc_enum mc13783_enum_ahs = ++ SOC_ENUM_SINGLE(PMIC_AUDIO_RX_0, 11, ARRAY_SIZE(mc13783_ahs), ++ mc13783_ahs); ++ ++static const struct soc_enum mc13783_enum_arxout = ++ SOC_ENUM_SINGLE(PMIC_AUDIO_RX_0, 17, ARRAY_SIZE(mc13783_arxout), ++ mc13783_arxout); ++ ++static const struct soc_enum mc13783_enum_capture = ++ SOC_ENUM_SINGLE_EXT(ARRAY_SIZE(mc13783_capture), mc13783_capture); ++ ++static const struct soc_enum mc13783_enum_3d_mixer = ++ SOC_ENUM_SINGLE(PMIC_AUDIO_RX_1, 16, ARRAY_SIZE(mc13783_3d_mixer), ++ mc13783_3d_mixer); ++ ++static struct snd_kcontrol_new mc13783_control_list[] = { ++ /* Output Routing */ ++ SOC_ENUM("Asp Source", mc13783_enum_asp), ++ SOC_ENUM_EXT("Alsp Source", mc13783_enum_alsp, mc13783_get_alsp, ++ mc13783_put_alsp), ++ SOC_ENUM("Ahs Source", mc13783_enum_ahs), ++ SOC_SINGLE("Ahsr enable", PMIC_AUDIO_RX_0, 9, 1, 0), ++ SOC_SINGLE("Ahsl enable", PMIC_AUDIO_RX_0, 10, 1, 0), ++ SOC_ENUM("Arxout Source", mc13783_enum_arxout), ++ SOC_SINGLE("ArxoutR enable", PMIC_AUDIO_RX_0, 16, 1, 0), ++ SOC_SINGLE("ArxoutL enable", PMIC_AUDIO_RX_0, 15, 1, 0), ++ SOC_SINGLE_EXT("PCM Playback Switch", 0, 0, 1, 0, mc13783_pcm_get, ++ mc13783_pcm_put), ++ SOC_SINGLE("PCM Playback Volume", PMIC_AUDIO_RX_1, 6, 15, 0), ++ SOC_SINGLE_EXT("Line in Switch", 0, 0, 1, 0, mc13783_linein_get, ++ mc13783_linein_put), ++ SOC_SINGLE("Line in Volume", PMIC_AUDIO_RX_1, 12, 15, 0), ++ SOC_ENUM_EXT("Capture Source", mc13783_enum_capture, mc13783_get_capture, ++ mc13783_put_capture), ++ SOC_DOUBLE("PCM Capture Volume", PMIC_AUDIO_TX, 19, 14, 31, 0), ++ SOC_ENUM("3D Control", mc13783_enum_3d_mixer), ++}; ++ ++static struct snd_soc_codec *mc13783_codec; ++ ++static int mc13783_probe(struct platform_device *pdev) ++{ ++ struct snd_soc_device *socdev = platform_get_drvdata(pdev); ++ struct snd_soc_codec *codec = mc13783_codec; ++ struct mc13783_priv *priv = codec->private_data; ++ int i, ret = 0; ++ ++ if (!mc13783_codec) { ++ dev_err(&pdev->dev, "Codec device not registered\n"); ++ return -ENODEV; ++ } ++ ++ /* these are the reset values */ ++ priv->reg_cache[PMIC_AUDIO_RX_0] = 0x001000; ++ priv->reg_cache[PMIC_AUDIO_RX_1] = 0x00d35A; ++ priv->reg_cache[PMIC_AUDIO_TX] = 0x420000; ++ priv->reg_cache[PMIC_SSI_NETWORK] = 0x013060; ++ priv->reg_cache[PMIC_AUDIO_CODEC] = 0x180027; ++ priv->reg_cache[PMIC_AUDIO_DAC] = 0x0e0004; ++ ++ /* VAUDIOON -> supply audio part, BIAS enable */ ++ priv->reg_cache[PMIC_AUDIO_RX_0] |= 0x3; ++ ++ for (i = 36; i < 42; i++) ++ mc13783_write(codec, i, priv->reg_cache[i]); ++ ++ socdev->card->codec = mc13783_codec; ++ ++ /* register pcms */ ++ ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1); ++ if (ret < 0) { ++ dev_err(codec->dev, "failed to create pcms: %d\n", ret); ++ goto pcm_err; ++ } ++ ++ snd_soc_add_controls(codec, mc13783_control_list, ++ ARRAY_SIZE(mc13783_control_list)); ++ ret = snd_soc_init_card(socdev); ++ if (ret < 0) { ++ dev_err(codec->dev, "failed to register card: %d\n", ret); ++ goto card_err; ++ } ++ ++ return ret; ++ ++card_err: ++ snd_soc_free_pcms(socdev); ++ snd_soc_dapm_free(socdev); ++pcm_err: ++ return ret; ++} ++ ++static int mc13783_remove(struct platform_device *pdev) ++{ ++ struct snd_soc_device *socdev = platform_get_drvdata(pdev); ++ struct snd_soc_codec *codec = mc13783_codec; ++ unsigned int reg; ++ ++ reg = mc13783_read(codec, PMIC_AUDIO_RX_0); ++ ++ /* VAUDIOON -> switch off audio part, BIAS disable */ ++ reg &= ~0x3; ++ ++ mc13783_write(codec, PMIC_AUDIO_RX_0, reg); ++ ++ snd_soc_free_pcms(socdev); ++ snd_soc_dapm_free(socdev); ++ ++ return 0; ++} ++ ++#define MC13783_RATES_RECORD (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000) ++ ++#define MC13783_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\ ++ SNDRV_PCM_FMTBIT_S24_LE) ++ ++static struct snd_soc_dai_ops mc13783_ops_dac = { ++ .hw_params = mc13783_pcm_hw_params, ++ .set_fmt = mc13783_set_fmt, ++ .set_sysclk = mc13783_set_sysclk, ++}; ++ ++static struct snd_soc_dai_ops mc13783_ops_voice_codec = { ++ .hw_params = mc13783_pcm_hw_params, ++ .set_fmt = mc13783_set_fmt, ++ .set_sysclk = mc13783_set_sysclk, ++ .set_tdm_slot = mc13783_set_tdm_slot_codec, ++}; ++ ++struct snd_soc_dai mc13783_dai[] = { ++ { ++ .name = "MC13783 Playback", ++ .id = MC13783_ID_STEREO_DAC, ++ .playback = { ++ .stream_name = "Playback", ++ .channels_min = 1, ++ .channels_max = 2, ++ .rates = SNDRV_PCM_RATE_8000_96000, ++ .formats = MC13783_FORMATS, ++ }, ++ .ops = &mc13783_ops_dac, ++ }, { ++ .name = "MC13783 Capture", ++ .id = MC13783_ID_STEREO_CODEC, ++ .capture = { ++ .stream_name = "Capture", ++ .channels_min = 1, ++ .channels_max = 2, ++ .rates = MC13783_RATES_RECORD, ++ .formats = MC13783_FORMATS, ++ }, ++ .ops = &mc13783_ops_voice_codec, ++ }, ++}; ++EXPORT_SYMBOL_GPL(mc13783_dai); ++ ++struct snd_soc_codec_device soc_codec_dev_mc13783 = { ++ .probe = mc13783_probe, ++ .remove = mc13783_remove, ++}; ++EXPORT_SYMBOL_GPL(soc_codec_dev_mc13783); ++ ++/* ++ * OK, this stinks. We currently only can support one MC13783. ++ * Lets take it as an intermediate to turn this stuff into SoC ++ * Audio. ++ */ ++static int mc13783_codec_probe(struct platform_device *pdev) ++{ ++ struct mc13783_priv *priv; ++ struct snd_soc_codec *codec; ++ int ret; ++ ++ if (mc13783) ++ return -EBUSY; ++ ++ mc13783 = dev_get_drvdata(pdev->dev.parent); ++ ++ priv = kzalloc(sizeof(struct mc13783_priv), GFP_KERNEL); ++ if (priv == NULL) ++ return -ENOMEM; ++ ++ codec = &priv->codec; ++ codec->private_data = priv; ++ mc13783_codec = codec; ++ ++ mutex_init(&codec->mutex); ++ INIT_LIST_HEAD(&codec->dapm_widgets); ++ INIT_LIST_HEAD(&codec->dapm_paths); ++ ++ codec->name = "mc13783"; ++ codec->owner = THIS_MODULE; ++ codec->read = mc13783_read; ++ codec->write = mc13783_write; ++ codec->dai = mc13783_dai; ++ codec->num_dai = ARRAY_SIZE(mc13783_dai); ++ codec->control_data = priv; ++ codec->dev = &pdev->dev; ++ ++ mc13783_dai[0].dev = codec->dev; ++ mc13783_dai[1].dev = codec->dev; ++ ++ ret = snd_soc_register_codec(codec); ++ if (ret) ++ goto err_register_codec; ++ ++ ret = snd_soc_register_dais(mc13783_dai, ARRAY_SIZE(mc13783_dai)); ++ if (ret) ++ goto err_register_dais; ++ ++ return 0; ++ ++err_register_dais: ++ snd_soc_unregister_codec(codec); ++err_register_codec: ++ dev_err(&pdev->dev, "register codec failed with %d\n", ret); ++ kfree(priv); ++ ++ return ret; ++} ++ ++static int mc13783_codec_remove(struct platform_device *pdev) ++{ ++ snd_soc_unregister_codec(mc13783_codec); ++ snd_soc_unregister_dais(mc13783_dai, ARRAY_SIZE(mc13783_dai)); ++ ++ mc13783 = NULL; ++ ++ return 0; ++} ++ ++static struct platform_driver mc13783_codec_driver = { ++ .driver = { ++ .name = "mc13783-codec", ++ .owner = THIS_MODULE, ++ }, ++ .probe = mc13783_codec_probe, ++ .remove = __devexit_p(mc13783_codec_remove), ++}; ++ ++static __init int mc13783_init(void) ++{ ++ return platform_driver_register(&mc13783_codec_driver); ++} ++ ++static __exit void mc13783_exit(void) ++{ ++ platform_driver_unregister(&mc13783_codec_driver); ++} ++ ++module_init(mc13783_init); ++module_exit(mc13783_exit); ++ ++MODULE_DESCRIPTION("ASoC MC13783 driver"); ++MODULE_AUTHOR("Sascha Hauer, Pengutronix "); ++MODULE_LICENSE("GPL"); +diff --git a/sound/soc/codecs/mc13783.h b/sound/soc/codecs/mc13783.h +new file mode 100644 +index 0000000..b28dbef +--- /dev/null ++++ b/sound/soc/codecs/mc13783.h +@@ -0,0 +1,32 @@ ++/* ++ * Copyright 2008 Juergen Beisert, kernel@pengutronix.de ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ++ */ ++ ++#ifndef MC13783_MIXER_H ++#define MC13783_MIXER_H ++ ++extern int mc13783_add_ctl(struct snd_card*, void *); ++ ++extern struct snd_soc_dai mc13783_dai[]; ++extern struct snd_soc_codec_device soc_codec_dev_mc13783; ++ ++#define MC13783_CLK_CLIA 1 ++#define MC13783_CLK_CLIB 2 ++ ++#define MC13783_ID_STEREO_DAC 1 ++#define MC13783_ID_STEREO_CODEC 2 ++ ++#endif /* MC13783_MIXER_H */ +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0013-mxc_nand-Make-main-spare-areas-runtime-configurable.patch b/recipes/linux/linux-2.6.31/pcm043/0013-mxc_nand-Make-main-spare-areas-runtime-configurable.patch new file mode 100644 index 0000000000..96d2586b07 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0013-mxc_nand-Make-main-spare-areas-runtime-configurable.patch @@ -0,0 +1,142 @@ +From cd3ee0eef0eba058bc5a7a6d42536bc35059ecf9 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Mon, 5 Oct 2009 11:14:35 +0200 +Subject: [PATCH] mxc_nand: Make main/spare areas runtime configurable + +The main/spare areas are on different addresses on later versions +of the controller, so make them configurable. + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 42 ++++++++++++++++++++---------------------- + 1 files changed, 20 insertions(+), 22 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 2988f1d..450db4e 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -52,18 +52,6 @@ + #define NFC_CONFIG1 0xE1A + #define NFC_CONFIG2 0xE1C + +-/* Addresses for NFC RAM BUFFER Main area 0 */ +-#define MAIN_AREA0 0x000 +-#define MAIN_AREA1 0x200 +-#define MAIN_AREA2 0x400 +-#define MAIN_AREA3 0x600 +- +-/* Addresses for NFC SPARE BUFFER Spare area 0 */ +-#define SPARE_AREA0 0x800 +-#define SPARE_AREA1 0x810 +-#define SPARE_AREA2 0x820 +-#define SPARE_AREA3 0x830 +- + /* Set INT to 0, FCMD to 1, rest to 0 in NFC_CONFIG2 Register + * for Command operation */ + #define NFC_CMD 0x1 +@@ -106,6 +94,11 @@ struct mxc_nand_host { + struct mtd_partition *parts; + struct device *dev; + ++ void *spare0; ++ void *main_area0; ++ void *main_area1; ++ ++ void __iomem *base; + void __iomem *regs; + int status_request; + int pagesize_2k; +@@ -262,7 +255,7 @@ static void send_read_id(struct mxc_nand_host *host) + wait_op_done(host, TROP_US_DELAY, true); + + if (this->options & NAND_BUSWIDTH_16) { +- void __iomem *main_buf = host->regs + MAIN_AREA0; ++ void __iomem *main_buf = host->main_area0; + /* compress the ID info */ + writeb(readb(main_buf + 2), main_buf + 1); + writeb(readb(main_buf + 4), main_buf + 2); +@@ -270,14 +263,14 @@ static void send_read_id(struct mxc_nand_host *host) + writeb(readb(main_buf + 8), main_buf + 4); + writeb(readb(main_buf + 10), main_buf + 5); + } +- memcpy(host->data_buf, host->regs + MAIN_AREA0, 16); ++ memcpy(host->data_buf, host->main_area0, 16); + } + + /* This function requests the NANDFC to perform a read of the + * NAND device status and returns the current status. */ + static uint16_t get_dev_status(struct mxc_nand_host *host) + { +- void __iomem *main_buf = host->regs + MAIN_AREA1; ++ void __iomem *main_buf = host->main_area1; + uint32_t store; + uint16_t ret, tmp; + /* Issue status request to NAND device */ +@@ -462,7 +455,7 @@ static void copy_spare(struct mtd_info *mtd, bool bfrom) + u16 i, j; + u16 n = mtd->writesize >> 9; + u8 *d = host->data_buf + mtd->writesize; +- u8 *s = host->regs + SPARE_AREA0; ++ u8 *s = host->spare0; + u16 t = host->spare_len; + + j = (mtd->oobsize / n >> 1) << 1; +@@ -572,7 +565,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + + send_page(host, NFC_OUTPUT); + +- memcpy(host->data_buf, host->regs + MAIN_AREA0, mtd->writesize); ++ memcpy(host->data_buf, host->main_area0, mtd->writesize); + copy_spare(mtd, true); + break; + +@@ -608,7 +601,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + break; + + case NAND_CMD_PAGEPROG: +- memcpy(host->regs + MAIN_AREA0, host->data_buf, mtd->writesize); ++ memcpy(host->main_area0, host->data_buf, mtd->writesize); + copy_spare(mtd, false); + send_page(host, NFC_INPUT); + send_cmd(host, command, true); +@@ -686,12 +679,17 @@ static int __init mxcnd_probe(struct platform_device *pdev) + goto eres; + } + +- host->regs = ioremap(res->start, resource_size(res)); +- if (!host->regs) { ++ host->base = ioremap(res->start, resource_size(res)); ++ if (!host->base) { + err = -ENOMEM; + goto eres; + } + ++ host->regs = host->base; ++ host->main_area0 = host->base; ++ host->main_area1 = host->base + 0x200; ++ host->spare0 = host->base + 0x800; ++ + tmp = readw(host->regs + NFC_CONFIG1); + tmp |= NFC_INT_MSK; + writew(tmp, host->regs + NFC_CONFIG1); +@@ -778,7 +776,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) + escan: + free_irq(host->irq, host); + eirq: +- iounmap(host->regs); ++ iounmap(host->base); + eres: + clk_put(host->clk); + eclk: +@@ -797,7 +795,7 @@ static int __devexit mxcnd_remove(struct platform_device *pdev) + + nand_release(&host->mtd); + free_irq(host->irq, host); +- iounmap(host->regs); ++ iounmap(host->base); + kfree(host); + + return 0; +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0014-MXC-NFC-Add-NAND-device-to-the-pcm043-platform.patch b/recipes/linux/linux-2.6.31/pcm043/0014-MXC-NFC-Add-NAND-device-to-the-pcm043-platform.patch new file mode 100644 index 0000000000..967b3ba8dd --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0014-MXC-NFC-Add-NAND-device-to-the-pcm043-platform.patch @@ -0,0 +1,47 @@ +From cb9f37d106e5ac9672291f0ce5df5dd955d61d5d Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Tue, 29 Sep 2009 17:00:18 +0200 +Subject: [PATCH 14/15] MXC NFC: Add NAND device to the pcm043 platform + +Phytec's PCM043 is equipped with a 1 GiB NAND. + +Signed-off-by: Juergen Beisert + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + arch/arm/mach-mx3/pcm043.c | 7 +++++++ + 1 file changed, 7 insertions(+) + +Index: arch/arm/mach-mx3/pcm043.c +=================================================================== +--- arch/arm/mach-mx3/pcm043.c.orig 2009-12-10 11:34:30.754671808 +0100 ++++ arch/arm/mach-mx3/pcm043.c 2009-12-10 11:34:35.157145682 +0100 +@@ -48,6 +48,7 @@ + #include + #include + #include ++#include + + #include "devices.h" + +@@ -359,6 +360,11 @@ + .flags = IMX_SSI_USE_AC97, + }; + ++static struct mxc_nand_platform_data pcm043_nand_board_info = { ++ .width = 1, ++ .hw_ecc = 1, ++}; ++ + /* + * Board specific initialization. + */ +@@ -394,6 +400,7 @@ + mxc_register_device(&mxc_i2c_device0, &pcm043_i2c_1_data); + #endif + ++ mxc_register_device(&mxc_nand_device, &pcm043_nand_board_info); + mxc_register_device(&mx3_ipu, &mx3_ipu_data); + mxc_register_device(&mx3_fb, &mx3fb_pdata); + diff --git a/recipes/linux/linux-2.6.31/pcm043/0014-imx-ssi-sound-driver.patch b/recipes/linux/linux-2.6.31/pcm043/0014-imx-ssi-sound-driver.patch new file mode 100644 index 0000000000..3b935c9615 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0014-imx-ssi-sound-driver.patch @@ -0,0 +1,1911 @@ +From 7947679ebf067e88b61b9185c19d625d975e315c Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 12 Nov 2009 15:00:08 +0100 +Subject: [PATCH 14/28] imx-ssi sound driver + +Signed-off-by: Sascha Hauer +--- + arch/arm/plat-mxc/Makefile | 4 + + arch/arm/plat-mxc/include/mach/ssi.h | 17 + + arch/arm/plat-mxc/ssi-fiq-ksym.c | 20 + + arch/arm/plat-mxc/ssi-fiq.S | 134 ++++++ + sound/soc/Kconfig | 1 + + sound/soc/Makefile | 1 + + sound/soc/imx/Kconfig | 13 + + sound/soc/imx/Makefile | 10 + + sound/soc/imx/imx-pcm-dma-mx2.c | 313 ++++++++++++++ + sound/soc/imx/imx-pcm-fiq.c | 277 ++++++++++++ + sound/soc/imx/imx-ssi.c | 766 ++++++++++++++++++++++++++++++++++ + sound/soc/imx/imx-ssi.h | 238 +++++++++++ + 12 files changed, 1794 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/plat-mxc/include/mach/ssi.h + create mode 100644 arch/arm/plat-mxc/ssi-fiq-ksym.c + create mode 100644 arch/arm/plat-mxc/ssi-fiq.S + create mode 100644 sound/soc/imx/Kconfig + create mode 100644 sound/soc/imx/Makefile + create mode 100644 sound/soc/imx/imx-pcm-dma-mx2.c + create mode 100644 sound/soc/imx/imx-pcm-fiq.c + create mode 100644 sound/soc/imx/imx-ssi.c + create mode 100644 sound/soc/imx/imx-ssi.h + +diff --git a/arch/arm/plat-mxc/Makefile b/arch/arm/plat-mxc/Makefile +index 92fc8b2..b0b9fc3 100644 +--- a/arch/arm/plat-mxc/Makefile ++++ b/arch/arm/plat-mxc/Makefile +@@ -11,3 +11,7 @@ obj-$(CONFIG_ARCH_MXC_IOMUX_V3) += iomux-v3.o + obj-$(CONFIG_MXC_PWM) += pwm.o + obj-$(CONFIG_ARCH_MXC_AUDMUX_V1) += audmux-v1.o + obj-$(CONFIG_ARCH_MXC_AUDMUX_V2) += audmux-v2.o ++ifdef CONFIG_SND_IMX_SOC ++obj-y += ssi-fiq.o ++obj-y += ssi-fiq-ksym.o ++endif +diff --git a/arch/arm/plat-mxc/include/mach/ssi.h b/arch/arm/plat-mxc/include/mach/ssi.h +new file mode 100644 +index 0000000..144a2ac +--- /dev/null ++++ b/arch/arm/plat-mxc/include/mach/ssi.h +@@ -0,0 +1,17 @@ ++#ifndef __MACH_SSI_H ++#define __MACH_SSI_H ++ ++struct snd_ac97; ++ ++extern unsigned char imx_ssi_fiq_start, imx_ssi_fiq_end; ++extern unsigned long imx_ssi_fiq_base, imx_ssi_fiq_tx_buffer, imx_ssi_fiq_rx_buffer; ++ ++struct imx_ssi_platform_data { ++ unsigned int flags; ++#define IMX_SSI_DMA (1 << 0) ++#define IMX_SSI_USE_AC97 (1 << 1) ++ void (*ac97_reset) (struct snd_ac97 *ac97); ++ void (*ac97_warm_reset)(struct snd_ac97 *ac97); ++}; ++ ++#endif /* __MACH_SSI_H */ +diff --git a/arch/arm/plat-mxc/ssi-fiq-ksym.c b/arch/arm/plat-mxc/ssi-fiq-ksym.c +new file mode 100644 +index 0000000..b5fad45 +--- /dev/null ++++ b/arch/arm/plat-mxc/ssi-fiq-ksym.c +@@ -0,0 +1,20 @@ ++/* ++ * Exported ksyms for the SSI FIQ handler ++ * ++ * Copyright (C) 2009, Sascha Hauer ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include ++ ++#include ++ ++EXPORT_SYMBOL(imx_ssi_fiq_tx_buffer); ++EXPORT_SYMBOL(imx_ssi_fiq_rx_buffer); ++EXPORT_SYMBOL(imx_ssi_fiq_start); ++EXPORT_SYMBOL(imx_ssi_fiq_end); ++EXPORT_SYMBOL(imx_ssi_fiq_base); ++ +diff --git a/arch/arm/plat-mxc/ssi-fiq.S b/arch/arm/plat-mxc/ssi-fiq.S +new file mode 100644 +index 0000000..4ddce56 +--- /dev/null ++++ b/arch/arm/plat-mxc/ssi-fiq.S +@@ -0,0 +1,134 @@ ++/* ++ * Copyright (C) 2009 Sascha Hauer ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include ++#include ++ ++/* ++ * r8 = bit 0-15: tx offset, bit 16-31: tx buffer size ++ * r9 = bit 0-15: rx offset, bit 16-31: rx buffer size ++ */ ++ ++#define SSI_STX0 0x00 ++#define SSI_SRX0 0x08 ++#define SSI_SISR 0x14 ++#define SSI_SIER 0x18 ++#define SSI_SACNT 0x38 ++ ++#define SSI_SACNT_AC97EN (1 << 0) ++ ++#define SSI_SIER_TFE0_EN (1 << 0) ++#define SSI_SISR_TFE0 (1 << 0) ++#define SSI_SISR_RFF0 (1 << 2) ++#define SSI_SIER_RFF0_EN (1 << 2) ++ ++ .text ++ .global imx_ssi_fiq_start ++ .global imx_ssi_fiq_end ++ .global imx_ssi_fiq_base ++ .global imx_ssi_fiq_rx_buffer ++ .global imx_ssi_fiq_tx_buffer ++ ++imx_ssi_fiq_start: ++ ldr r12, imx_ssi_fiq_base ++ ++ /* TX */ ++ ldr r11, imx_ssi_fiq_tx_buffer ++ ++ /* shall we send? */ ++ ldr r13, [r12, #SSI_SIER] ++ tst r13, #SSI_SIER_TFE0_EN ++ beq 1f ++ ++ /* TX FIFO empty? */ ++ ldr r13, [r12, #SSI_SISR] ++ tst r13, #SSI_SISR_TFE0 ++ beq 1f ++ ++ mov r10, #0x10000 ++ sub r10, #1 ++ and r10, r10, r8 /* r10: current buffer offset */ ++ ++ add r11, r11, r10 ++ ++ ldrh r13, [r11] ++ strh r13, [r12, #SSI_STX0] ++ ++ ldrh r13, [r11, #2] ++ strh r13, [r12, #SSI_STX0] ++ ++ ldrh r13, [r11, #4] ++ strh r13, [r12, #SSI_STX0] ++ ++ ldrh r13, [r11, #6] ++ strh r13, [r12, #SSI_STX0] ++ ++ add r10, #8 ++ lsr r13, r8, #16 /* r13: buffer size */ ++ cmp r10, r13 ++ lslgt r8, r13, #16 ++ addle r8, #8 ++1: ++ /* RX */ ++ ++ /* shall we receive? */ ++ ldr r13, [r12, #SSI_SIER] ++ tst r13, #SSI_SIER_RFF0_EN ++ beq 1f ++ ++ /* RX FIFO full? */ ++ ldr r13, [r12, #SSI_SISR] ++ tst r13, #SSI_SISR_RFF0 ++ beq 1f ++ ++ ldr r11, imx_ssi_fiq_rx_buffer ++ ++ mov r10, #0x10000 ++ sub r10, #1 ++ and r10, r10, r9 /* r10: current buffer offset */ ++ ++ add r11, r11, r10 ++ ++ ldr r13, [r12, #SSI_SACNT] ++ tst r13, #SSI_SACNT_AC97EN ++ ++ ldr r13, [r12, #SSI_SRX0] ++ strh r13, [r11] ++ ++ ldr r13, [r12, #SSI_SRX0] ++ strh r13, [r11, #2] ++ ++ /* dummy read to skip slot 12 */ ++ ldrne r13, [r12, #SSI_SRX0] ++ ++ ldr r13, [r12, #SSI_SRX0] ++ strh r13, [r11, #4] ++ ++ ldr r13, [r12, #SSI_SRX0] ++ strh r13, [r11, #6] ++ ++ /* dummy read to skip slot 12 */ ++ ldrne r13, [r12, #SSI_SRX0] ++ ++ add r10, #8 ++ lsr r13, r9, #16 /* r13: buffer size */ ++ cmp r10, r13 ++ lslgt r9, r13, #16 ++ addle r9, #8 ++ ++1: ++ @ return from FIQ ++ subs pc, lr, #4 ++imx_ssi_fiq_base: ++ .word 0x0 ++imx_ssi_fiq_rx_buffer: ++ .word 0x0 ++imx_ssi_fiq_tx_buffer: ++ .word 0x0 ++imx_ssi_fiq_end: ++ +diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig +index d3e786a..d57e571 100644 +--- a/sound/soc/Kconfig ++++ b/sound/soc/Kconfig +@@ -35,6 +35,7 @@ source "sound/soc/s3c24xx/Kconfig" + source "sound/soc/s6000/Kconfig" + source "sound/soc/sh/Kconfig" + source "sound/soc/txx9/Kconfig" ++source "sound/soc/imx/Kconfig" + + # Supported codecs + source "sound/soc/codecs/Kconfig" +diff --git a/sound/soc/Makefile b/sound/soc/Makefile +index 6f1e28d..6bcb7f7 100644 +--- a/sound/soc/Makefile ++++ b/sound/soc/Makefile +@@ -8,6 +8,7 @@ obj-$(CONFIG_SND_SOC) += blackfin/ + obj-$(CONFIG_SND_SOC) += davinci/ + obj-$(CONFIG_SND_SOC) += fsl/ + obj-$(CONFIG_SND_SOC) += omap/ ++obj-$(CONFIG_SND_SOC) += imx/ + obj-$(CONFIG_SND_SOC) += pxa/ + obj-$(CONFIG_SND_SOC) += s3c24xx/ + obj-$(CONFIG_SND_SOC) += s6000/ +diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig +new file mode 100644 +index 0000000..84a25e6 +--- /dev/null ++++ b/sound/soc/imx/Kconfig +@@ -0,0 +1,13 @@ ++config SND_IMX_SOC ++ tristate "SoC Audio for Freecale i.MX CPUs" ++ depends on ARCH_MXC ++ select SND_PCM ++ select FIQ ++ select SND_SOC_AC97_BUS ++ help ++ Say Y or M if you want to add support for codecs attached to ++ the i.MX SSI interface. ++ ++config SND_MXC_SOC_SSI ++ tristate ++ +diff --git a/sound/soc/imx/Makefile b/sound/soc/imx/Makefile +new file mode 100644 +index 0000000..d05cc95 +--- /dev/null ++++ b/sound/soc/imx/Makefile +@@ -0,0 +1,10 @@ ++# i.MX Platform Support ++snd-soc-imx-objs := imx-ssi.o imx-pcm-fiq.o ++ ++ifdef CONFIG_MACH_MX27 ++snd-soc-imx-objs += imx-pcm-dma-mx2.o ++endif ++ ++obj-$(CONFIG_SND_IMX_SOC) += snd-soc-imx.o ++ ++# i.MX Machine Support +diff --git a/sound/soc/imx/imx-pcm-dma-mx2.c b/sound/soc/imx/imx-pcm-dma-mx2.c +new file mode 100644 +index 0000000..19452e4 +--- /dev/null ++++ b/sound/soc/imx/imx-pcm-dma-mx2.c +@@ -0,0 +1,313 @@ ++/* ++ * imx-pcm-dma-mx2.c -- ALSA Soc Audio Layer ++ * ++ * Copyright 2009 Sascha Hauer ++ * ++ * This code is based on code copyrighted by Freescale, ++ * Liam Girdwood, Javier Martin and probably others. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include "imx-ssi.h" ++ ++struct imx_pcm_runtime_data { ++ int sg_count; ++ struct scatterlist *sg_list; ++ int period; ++ int periods; ++ unsigned long dma_addr; ++ int dma; ++ struct snd_pcm_substream *substream; ++ unsigned long offset; ++ unsigned long size; ++ unsigned long period_cnt; ++ void *buf; ++ int period_time; ++}; ++ ++/* Called by the DMA framework when a period has elapsed */ ++static void imx_ssi_dma_progression(int channel, void *data, ++ struct scatterlist *sg) ++{ ++ struct snd_pcm_substream *substream = data; ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ ++ if (!sg) ++ return; ++ ++ runtime = iprtd->substream->runtime; ++ ++ iprtd->offset = sg->dma_address - runtime->dma_addr; ++ ++ snd_pcm_period_elapsed(iprtd->substream); ++} ++ ++static void imx_ssi_dma_callback(int channel, void *data) ++{ ++ pr_err("%s shouldn't be called\n", __func__); ++} ++ ++static void snd_imx_dma_err_callback(int channel, void *data, int err) ++{ ++ pr_err("DMA error callback called\n"); ++ ++ pr_err("DMA timeout on channel %d -%s%s%s%s\n", ++ channel, ++ err & IMX_DMA_ERR_BURST ? " burst" : "", ++ err & IMX_DMA_ERR_REQUEST ? " request" : "", ++ err & IMX_DMA_ERR_TRANSFER ? " transfer" : "", ++ err & IMX_DMA_ERR_BUFFER ? " buffer" : ""); ++} ++ ++static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct imx_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ int ret; ++ ++ iprtd->dma = imx_dma_request_by_prio(DRV_NAME, DMA_PRIO_HIGH); ++ if (iprtd->dma < 0) { ++ pr_err("Failed to claim the audio DMA\n"); ++ return -ENODEV; ++ } ++ ++ ret = imx_dma_setup_handlers(iprtd->dma, ++ imx_ssi_dma_callback, ++ snd_imx_dma_err_callback, substream); ++ if (ret) ++ goto out; ++ ++ ret = imx_dma_setup_progression_handler(iprtd->dma, ++ imx_ssi_dma_progression); ++ if (ret) { ++ pr_err("Failed to setup the DMA handler\n"); ++ goto out; ++ } ++ ++ ret = imx_dma_config_channel(iprtd->dma, ++ IMX_DMA_MEMSIZE_16 | IMX_DMA_TYPE_FIFO, ++ IMX_DMA_MEMSIZE_32 | IMX_DMA_TYPE_LINEAR, ++ dma_params->dma, 1); ++ if (ret < 0) { ++ pr_err("Cannot configure DMA channel: %d\n", ret); ++ goto out; ++ } ++ ++ imx_dma_config_burstlen(iprtd->dma, dma_params->burstsize * 2); ++ ++ return 0; ++out: ++ imx_dma_free(iprtd->dma); ++ return ret; ++} ++ ++static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ int i; ++ unsigned long dma_addr; ++ ++ imx_ssi_dma_alloc(substream); ++ ++ iprtd->size = params_buffer_bytes(params); ++ iprtd->periods = params_periods(params); ++ iprtd->period = params_period_bytes(params); ++ iprtd->offset = 0; ++ iprtd->period_time = HZ / (params_rate(params) / ++ params_period_size(params)); ++ ++ snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); ++ ++ if (iprtd->sg_count != iprtd->periods) { ++ kfree(iprtd->sg_list); ++ ++ iprtd->sg_list = kcalloc(iprtd->periods + 1, ++ sizeof(struct scatterlist), GFP_KERNEL); ++ if (!iprtd->sg_list) ++ return -ENOMEM; ++ iprtd->sg_count = iprtd->periods + 1; ++ } ++ ++ sg_init_table(iprtd->sg_list, iprtd->sg_count); ++ dma_addr = runtime->dma_addr; ++ ++ for (i = 0; i < iprtd->periods; i++) { ++ iprtd->sg_list[i].page_link = 0; ++ iprtd->sg_list[i].offset = 0; ++ iprtd->sg_list[i].dma_address = dma_addr; ++ iprtd->sg_list[i].length = iprtd->period; ++ dma_addr += iprtd->period; ++ } ++ ++ /* close the loop */ ++ iprtd->sg_list[iprtd->sg_count - 1].offset = 0; ++ iprtd->sg_list[iprtd->sg_count - 1].length = 0; ++ iprtd->sg_list[iprtd->sg_count - 1].page_link = ++ ((unsigned long) iprtd->sg_list | 0x01) & ~0x02; ++ return 0; ++} ++ ++static int snd_imx_pcm_hw_free(struct snd_pcm_substream *substream) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ ++ if (iprtd->dma >= 0) { ++ imx_dma_free(iprtd->dma); ++ iprtd->dma = -EINVAL; ++ } ++ ++ kfree(iprtd->sg_list); ++ iprtd->sg_list = NULL; ++ ++ return 0; ++} ++ ++static int snd_imx_pcm_prepare(struct snd_pcm_substream *substream) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct imx_pcm_dma_params *dma_params = rtd->dai->cpu_dai->dma_data; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ int err; ++ ++ iprtd->substream = substream; ++ iprtd->buf = (unsigned int *)substream->dma_buffer.area; ++ iprtd->period_cnt = 0; ++ ++ pr_debug("%s: buf: %p period: %d periods: %d\n", ++ __func__, iprtd->buf, iprtd->period, iprtd->periods); ++ ++ err = imx_dma_setup_sg(iprtd->dma, iprtd->sg_list, iprtd->sg_count, ++ IMX_DMA_LENGTH_LOOP, dma_params->dma_addr, ++ substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? ++ DMA_MODE_WRITE : DMA_MODE_READ); ++ if (err) ++ return err; ++ ++ return 0; ++} ++ ++static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ ++ switch (cmd) { ++ case SNDRV_PCM_TRIGGER_START: ++ case SNDRV_PCM_TRIGGER_RESUME: ++ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ++ imx_dma_enable(iprtd->dma); ++ ++ break; ++ ++ case SNDRV_PCM_TRIGGER_STOP: ++ case SNDRV_PCM_TRIGGER_SUSPEND: ++ case SNDRV_PCM_TRIGGER_PAUSE_PUSH: ++ imx_dma_disable(iprtd->dma); ++ ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++static snd_pcm_uframes_t snd_imx_pcm_pointer(struct snd_pcm_substream *substream) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ ++ return bytes_to_frames(substream->runtime, iprtd->offset); ++} ++ ++static struct snd_pcm_hardware snd_imx_hardware = { ++ .info = SNDRV_PCM_INFO_INTERLEAVED | ++ SNDRV_PCM_INFO_BLOCK_TRANSFER | ++ SNDRV_PCM_INFO_MMAP | ++ SNDRV_PCM_INFO_MMAP_VALID | ++ SNDRV_PCM_INFO_PAUSE | ++ SNDRV_PCM_INFO_RESUME, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE, ++ .rate_min = 8000, ++ .channels_min = 2, ++ .channels_max = 2, ++ .buffer_bytes_max = IMX_SSI_DMABUF_SIZE, ++ .period_bytes_min = 128, ++ .period_bytes_max = 16 * 1024, ++ .periods_min = 2, ++ .periods_max = 255, ++ .fifo_size = 0, ++}; ++ ++static int snd_imx_open(struct snd_pcm_substream *substream) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd; ++ int ret; ++ ++ iprtd = kzalloc(sizeof(*iprtd), GFP_KERNEL); ++ runtime->private_data = iprtd; ++ ++ ret = snd_pcm_hw_constraint_integer(substream->runtime, ++ SNDRV_PCM_HW_PARAM_PERIODS); ++ if (ret < 0) ++ return ret; ++ ++ snd_soc_set_runtime_hwparams(substream, &snd_imx_hardware); ++ return 0; ++} ++ ++static struct snd_pcm_ops imx_pcm_ops = { ++ .open = snd_imx_open, ++ .ioctl = snd_pcm_lib_ioctl, ++ .hw_params = snd_imx_pcm_hw_params, ++ .hw_free = snd_imx_pcm_hw_free, ++ .prepare = snd_imx_pcm_prepare, ++ .trigger = snd_imx_pcm_trigger, ++ .pointer = snd_imx_pcm_pointer, ++ .mmap = snd_imx_pcm_mmap, ++}; ++ ++static struct snd_soc_platform imx_soc_platform_dma = { ++ .name = "imx-audio", ++ .pcm_ops = &imx_pcm_ops, ++ .pcm_new = imx_pcm_new, ++ .pcm_free = imx_pcm_free, ++}; ++ ++struct snd_soc_platform *imx_ssi_dma_mx2_init(struct platform_device *pdev, ++ struct imx_ssi *ssi) ++{ ++ ssi->dma_params_tx.burstsize = DMA_TXFIFO_BURST; ++ ssi->dma_params_rx.burstsize = DMA_RXFIFO_BURST; ++ ++ return &imx_soc_platform_dma; ++} ++ +diff --git a/sound/soc/imx/imx-pcm-fiq.c b/sound/soc/imx/imx-pcm-fiq.c +new file mode 100644 +index 0000000..5532579 +--- /dev/null ++++ b/sound/soc/imx/imx-pcm-fiq.c +@@ -0,0 +1,277 @@ ++/* ++ * imx-pcm-fiq.c -- ALSA Soc Audio Layer ++ * ++ * Copyright 2009 Sascha Hauer ++ * ++ * This code is based on code copyrighted by Freescale, ++ * Liam Girdwood, Javier Martin and probably others. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++#include "imx-ssi.h" ++ ++struct imx_pcm_runtime_data { ++ int period; ++ int periods; ++ unsigned long dma_addr; ++ int dma; ++ unsigned long offset; ++ unsigned long size; ++ unsigned long period_cnt; ++ void *buf; ++ struct timer_list timer; ++ int period_time; ++}; ++ ++static void imx_ssi_timer_callback(unsigned long data) ++{ ++ struct snd_pcm_substream *substream = (void *)data; ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ struct pt_regs regs; ++ ++ get_fiq_regs(®s); ++ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ iprtd->offset = regs.ARM_r8 & 0xffff; ++ else ++ iprtd->offset = regs.ARM_r9 & 0xffff; ++ ++ iprtd->timer.expires = jiffies + iprtd->period_time; ++ add_timer(&iprtd->timer); ++ snd_pcm_period_elapsed(substream); ++} ++ ++static struct fiq_handler fh = { ++ .name = DRV_NAME, ++}; ++ ++static int snd_imx_pcm_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ ++ iprtd->size = params_buffer_bytes(params); ++ iprtd->periods = params_periods(params); ++ iprtd->period = params_period_bytes(params); ++ iprtd->offset = 0; ++ iprtd->period_time = HZ / (params_rate(params) / params_period_size(params)); ++ ++ snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer); ++ ++ return 0; ++} ++ ++static int snd_imx_pcm_prepare(struct snd_pcm_substream *substream) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ struct pt_regs regs; ++ ++ get_fiq_regs(®s); ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ regs.ARM_r8 = (iprtd->period * iprtd->periods - 1) << 16; ++ else ++ regs.ARM_r9 = (iprtd->period * iprtd->periods - 1) << 16; ++ ++ set_fiq_regs(®s); ++ ++ return 0; ++} ++ ++static int fiq_enable; ++static int imx_pcm_fiq; ++ ++static int snd_imx_pcm_trigger(struct snd_pcm_substream *substream, int cmd) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ ++ switch (cmd) { ++ case SNDRV_PCM_TRIGGER_START: ++ case SNDRV_PCM_TRIGGER_RESUME: ++ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ++ iprtd->timer.expires = jiffies + iprtd->period_time; ++ add_timer(&iprtd->timer); ++ if (++fiq_enable == 1) ++ enable_fiq(imx_pcm_fiq); ++ ++ break; ++ ++ case SNDRV_PCM_TRIGGER_STOP: ++ case SNDRV_PCM_TRIGGER_SUSPEND: ++ case SNDRV_PCM_TRIGGER_PAUSE_PUSH: ++ del_timer(&iprtd->timer); ++ if (--fiq_enable == 0) ++ disable_fiq(imx_pcm_fiq); ++ ++ ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ return 0; ++} ++ ++static snd_pcm_uframes_t snd_imx_pcm_pointer(struct snd_pcm_substream *substream) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ ++ return bytes_to_frames(substream->runtime, iprtd->offset); ++} ++ ++static struct snd_pcm_hardware snd_imx_hardware = { ++ .info = SNDRV_PCM_INFO_INTERLEAVED | ++ SNDRV_PCM_INFO_BLOCK_TRANSFER | ++ SNDRV_PCM_INFO_MMAP | ++ SNDRV_PCM_INFO_MMAP_VALID | ++ SNDRV_PCM_INFO_PAUSE | ++ SNDRV_PCM_INFO_RESUME, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE, ++ .rate_min = 8000, ++ .channels_min = 2, ++ .channels_max = 2, ++ .buffer_bytes_max = IMX_SSI_DMABUF_SIZE, ++ .period_bytes_min = 128, ++ .period_bytes_max = 16 * 1024, ++ .periods_min = 2, ++ .periods_max = 255, ++ .fifo_size = 0, ++}; ++ ++static int snd_imx_open(struct snd_pcm_substream *substream) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd; ++ int ret; ++ ++ iprtd = kzalloc(sizeof(*iprtd), GFP_KERNEL); ++ runtime->private_data = iprtd; ++ ++ init_timer(&iprtd->timer); ++ iprtd->timer.data = (unsigned long)substream; ++ iprtd->timer.function = imx_ssi_timer_callback; ++ ++ ret = snd_pcm_hw_constraint_integer(substream->runtime, ++ SNDRV_PCM_HW_PARAM_PERIODS); ++ if (ret < 0) ++ return ret; ++ ++ snd_soc_set_runtime_hwparams(substream, &snd_imx_hardware); ++ return 0; ++} ++ ++static int snd_imx_close(struct snd_pcm_substream *substream) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ struct imx_pcm_runtime_data *iprtd = runtime->private_data; ++ ++ del_timer_sync(&iprtd->timer); ++ kfree(iprtd); ++ ++ return 0; ++} ++ ++static struct snd_pcm_ops imx_pcm_ops = { ++ .open = snd_imx_open, ++ .close = snd_imx_close, ++ .ioctl = snd_pcm_lib_ioctl, ++ .hw_params = snd_imx_pcm_hw_params, ++ .prepare = snd_imx_pcm_prepare, ++ .trigger = snd_imx_pcm_trigger, ++ .pointer = snd_imx_pcm_pointer, ++ .mmap = snd_imx_pcm_mmap, ++}; ++ ++static int imx_pcm_fiq_new(struct snd_card *card, struct snd_soc_dai *dai, ++ struct snd_pcm *pcm) ++{ ++ int ret; ++ ++ ret = imx_pcm_new(card, dai, pcm); ++ if (ret) ++ return ret; ++ ++ if (dai->playback.channels_min) { ++ struct snd_pcm_substream *substream = ++ pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; ++ struct snd_dma_buffer *buf = &substream->dma_buffer; ++ ++ imx_ssi_fiq_tx_buffer = (unsigned long)buf->area; ++ } ++ ++ if (dai->capture.channels_min) { ++ struct snd_pcm_substream *substream = ++ pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; ++ struct snd_dma_buffer *buf = &substream->dma_buffer; ++ ++ imx_ssi_fiq_rx_buffer = (unsigned long)buf->area; ++ } ++ ++ set_fiq_handler(&imx_ssi_fiq_start, ++ &imx_ssi_fiq_end - &imx_ssi_fiq_start); ++ ++ return 0; ++} ++ ++static struct snd_soc_platform imx_soc_platform_fiq = { ++ .pcm_ops = &imx_pcm_ops, ++ .pcm_new = imx_pcm_fiq_new, ++ .pcm_free = imx_pcm_free, ++}; ++ ++struct snd_soc_platform *imx_ssi_fiq_init(struct platform_device *pdev, ++ struct imx_ssi *ssi) ++{ ++ int ret = 0; ++ ++ ret = claim_fiq(&fh); ++ if (ret) { ++ dev_err(&pdev->dev, "failed to claim fiq: %d", ret); ++ return ERR_PTR(ret); ++ } ++ ++ mxc_set_irq_fiq(ssi->irq, 1); ++ ++ imx_pcm_fiq = ssi->irq; ++ ++ imx_ssi_fiq_base = (unsigned long)ssi->base; ++ ++ ssi->dma_params_tx.burstsize = 4; ++ ssi->dma_params_rx.burstsize = 6; ++ ++ return &imx_soc_platform_fiq; ++} ++ ++void imx_ssi_fiq_exit(struct platform_device *pdev, ++ struct imx_ssi *ssi) ++{ ++ mxc_set_irq_fiq(ssi->irq, 0); ++ release_fiq(&fh); ++} ++ +diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c +new file mode 100644 +index 0000000..9823425 +--- /dev/null ++++ b/sound/soc/imx/imx-ssi.c +@@ -0,0 +1,766 @@ ++/* ++ * imx-ssi.c -- ALSA Soc Audio Layer ++ * ++ * Copyright 2009 Sascha Hauer ++ * ++ * This code is based on code copyrighted by Freescale, ++ * Liam Girdwood, Javier Martin and probably others. ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * ++ * The i.MX SSI core has some nasty limitations in AC97 mode. While most ++ * sane processor vendors have a FIFO per AC97 slot, the i.MX has only ++ * one FIFO which combines all valid receive slots. We cannot even select ++ * which slots we want to receive. The WM9712 with which this driver ++ * was developped with always sends GPIO status data in slot 12 which ++ * we receive in our (PCM-) data stream. The only chance we have is to ++ * manually skip this data in the FIQ handler. With sampling rates different ++ * from 48000Hz not every frame has valid receive data, so the ratio ++ * between pcm data and GPIO status data changes. Our FIQ handler is not ++ * able to handle this, hence this driver only works with 48000Hz sampling ++ * rate. ++ * Reading and writing AC97 registers is another challange. The core ++ * provides us status bits when the read register is updated with *another* ++ * value. When we read the same register two times (and the register still ++ * contains the same value) these status bits are not set. We work ++ * around this by not polling these bits but only wait a fixed delay. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include "imx-ssi.h" ++ ++#define SSI_SACNT_DEFAULT (SSI_SACNT_AC97EN | SSI_SACNT_FV) ++ ++/* ++ * SSI Network Mode or TDM slots configuration. ++ * Should only be called when port is inactive (i.e. SSIEN = 0). ++ */ ++static int imx_ssi_set_dai_tdm_slot(struct snd_soc_dai *cpu_dai, ++ unsigned int mask, int slots) ++{ ++ struct imx_ssi *ssi = container_of(cpu_dai, struct imx_ssi, dai); ++ u32 sccr; ++ ++ sccr = readl(ssi->base + SSI_STCCR); ++ sccr &= ~SSI_STCCR_DC_MASK; ++ sccr |= SSI_STCCR_DC(slots - 1); ++ writel(sccr, ssi->base + SSI_STCCR); ++ ++ sccr = readl(ssi->base + SSI_SRCCR); ++ sccr &= ~SSI_STCCR_DC_MASK; ++ sccr |= SSI_STCCR_DC(slots - 1); ++ writel(sccr, ssi->base + SSI_SRCCR); ++ ++ writel(0, ssi->base + SSI_STMSK); ++ ++ writel(mask, ssi->base + SSI_SRMSK); ++ ++ return 0; ++} ++ ++/* ++ * SSI DAI format configuration. ++ * Should only be called when port is inactive (i.e. SSIEN = 0). ++ * Note: We don't use the I2S modes but instead manually configure the ++ * SSI for I2S because the I2S mode is only a register preset. ++ */ ++static int imx_ssi_set_dai_fmt(struct snd_soc_dai *cpu_dai, unsigned int fmt) ++{ ++ struct imx_ssi *ssi = container_of(cpu_dai, struct imx_ssi, dai); ++ u32 strcr = 0, scr; ++ ++ scr = readl(ssi->base + SSI_SCR) & ~(SSI_SCR_SYN | SSI_SCR_NET); ++ ++ /* DAI mode */ ++ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { ++ case SND_SOC_DAIFMT_I2S: ++ /* data on rising edge of bclk, frame low 1clk before data */ ++ strcr |= SSI_STCR_TFSI | SSI_STCR_TEFS | SSI_STCR_TXBIT0; ++ scr |= SSI_SCR_NET; ++ break; ++ case SND_SOC_DAIFMT_LEFT_J: ++ /* data on rising edge of bclk, frame high with data */ ++ strcr |= SSI_STCR_TXBIT0; ++ break; ++ case SND_SOC_DAIFMT_DSP_B: ++ /* data on rising edge of bclk, frame high with data */ ++ strcr |= SSI_STCR_TFSL; ++ break; ++ case SND_SOC_DAIFMT_DSP_A: ++ /* data on rising edge of bclk, frame high 1clk before data */ ++ strcr |= SSI_STCR_TFSL | SSI_STCR_TEFS; ++ break; ++ } ++ ++ /* DAI clock inversion */ ++ switch (fmt & SND_SOC_DAIFMT_INV_MASK) { ++ case SND_SOC_DAIFMT_IB_IF: ++ strcr &= ~(SSI_STCR_TSCKP | SSI_STCR_TFSI); ++ break; ++ case SND_SOC_DAIFMT_IB_NF: ++ strcr |= SSI_STCR_TFSI; ++ strcr &= ~SSI_STCR_TSCKP; ++ break; ++ case SND_SOC_DAIFMT_NB_IF: ++ strcr |= SSI_STCR_TSCKP; ++ strcr &= ~SSI_STCR_TFSI; ++ break; ++ case SND_SOC_DAIFMT_NB_NF: ++ strcr |= SSI_STCR_TFSI | SSI_STCR_TSCKP; ++ break; ++ } ++ ++ /* DAI clock master masks */ ++ switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { ++ case SND_SOC_DAIFMT_CBS_CFS: ++ strcr |= SSI_STCR_TFDIR | SSI_STCR_TXDIR; ++ break; ++ case SND_SOC_DAIFMT_CBM_CFS: ++ strcr |= SSI_STCR_TFDIR; ++ break; ++ case SND_SOC_DAIFMT_CBS_CFM: ++ strcr |= SSI_STCR_TXDIR; ++ break; ++ case SND_SOC_DAIFMT_CBM_CFM: ++ strcr &= ~(SSI_STCR_TFDIR | SSI_STCR_TXDIR); ++ break; ++ } ++ ++ strcr |= SSI_STCR_TFEN0; ++ ++ writel(strcr, ssi->base + SSI_STCR); ++ writel(strcr, ssi->base + SSI_SRCR); ++ writel(scr, ssi->base + SSI_SCR); ++ ++ return 0; ++} ++ ++/* ++ * SSI system clock configuration. ++ * Should only be called when port is inactive (i.e. SSIEN = 0). ++ */ ++static int imx_ssi_set_dai_sysclk(struct snd_soc_dai *cpu_dai, ++ int clk_id, unsigned int freq, int dir) ++{ ++ struct imx_ssi *ssi = container_of(cpu_dai, struct imx_ssi, dai); ++ u32 scr; ++ ++ scr = readl(ssi->base + SSI_SCR); ++ ++ switch (clk_id) { ++ case IMX_SSP_SYS_CLK: ++ if (dir == SND_SOC_CLOCK_OUT) ++ scr |= SSI_SCR_SYS_CLK_EN; ++ else ++ scr &= ~SSI_SCR_SYS_CLK_EN; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ writel(scr, ssi->base + SSI_SCR); ++ ++ return 0; ++} ++ ++/* ++ * SSI Clock dividers ++ * Should only be called when port is inactive (i.e. SSIEN = 0). ++ */ ++static int imx_ssi_set_dai_clkdiv(struct snd_soc_dai *cpu_dai, ++ int div_id, int div) ++{ ++ struct imx_ssi *ssi = container_of(cpu_dai, struct imx_ssi, dai); ++ u32 stccr, srccr; ++ ++ stccr = readl(ssi->base + SSI_STCCR); ++ srccr = readl(ssi->base + SSI_SRCCR); ++ ++ switch (div_id) { ++ case IMX_SSI_TX_DIV_2: ++ stccr &= ~SSI_STCCR_DIV2; ++ stccr |= div; ++ break; ++ case IMX_SSI_TX_DIV_PSR: ++ stccr &= ~SSI_STCCR_PSR; ++ stccr |= div; ++ break; ++ case IMX_SSI_TX_DIV_PM: ++ stccr &= ~0xff; ++ stccr |= SSI_STCCR_PM(div); ++ break; ++ case IMX_SSI_RX_DIV_2: ++ stccr &= ~SSI_STCCR_DIV2; ++ stccr |= div; ++ break; ++ case IMX_SSI_RX_DIV_PSR: ++ stccr &= ~SSI_STCCR_PSR; ++ stccr |= div; ++ break; ++ case IMX_SSI_RX_DIV_PM: ++ stccr &= ~0xff; ++ stccr |= SSI_STCCR_PM(div); ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ writel(stccr, ssi->base + SSI_STCCR); ++ writel(srccr, ssi->base + SSI_SRCCR); ++ ++ return 0; ++} ++ ++/* ++ * Should only be called when port is inactive (i.e. SSIEN = 0), ++ * although can be called multiple times by upper layers. ++ */ ++static int imx_ssi_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params, ++ struct snd_soc_dai *cpu_dai) ++{ ++ struct imx_ssi *ssi = container_of(cpu_dai, struct imx_ssi, dai); ++ u32 reg, sccr; ++ ++ /* Tx/Rx config */ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ reg = SSI_STCCR; ++ cpu_dai->dma_data = &ssi->dma_params_tx; ++ } else { ++ reg = SSI_SRCCR; ++ cpu_dai->dma_data = &ssi->dma_params_rx; ++ } ++ ++ sccr = readl(ssi->base + reg) & ~SSI_STCCR_WL_MASK; ++ ++ /* DAI data (word) size */ ++ switch (params_format(params)) { ++ case SNDRV_PCM_FORMAT_S16_LE: ++ sccr |= SSI_SRCCR_WL(16); ++ break; ++ case SNDRV_PCM_FORMAT_S20_3LE: ++ sccr |= SSI_SRCCR_WL(20); ++ break; ++ case SNDRV_PCM_FORMAT_S24_LE: ++ sccr |= SSI_SRCCR_WL(24); ++ break; ++ } ++ ++ writel(sccr, ssi->base + reg); ++ ++ return 0; ++} ++ ++static int imx_ssi_trigger(struct snd_pcm_substream *substream, int cmd, ++ struct snd_soc_dai *dai) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; ++ struct imx_ssi *ssi = container_of(cpu_dai, struct imx_ssi, dai); ++ unsigned int sier_bits, sier; ++ unsigned int scr; ++ ++ scr = readl(ssi->base + SSI_SCR); ++ sier = readl(ssi->base + SSI_SIER); ++ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ if (ssi->flags & IMX_SSI_DMA) ++ sier_bits = SSI_SIER_TDMAE; ++ else ++ sier_bits = SSI_SIER_TIE | SSI_SIER_TFE0_EN; ++ } else { ++ if (ssi->flags & IMX_SSI_DMA) ++ sier_bits = SSI_SIER_RDMAE; ++ else ++ sier_bits = SSI_SIER_RIE | SSI_SIER_RFF0_EN; ++ } ++ ++ switch (cmd) { ++ case SNDRV_PCM_TRIGGER_START: ++ case SNDRV_PCM_TRIGGER_RESUME: ++ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ scr |= SSI_SCR_TE; ++ else ++ scr |= SSI_SCR_RE; ++ sier |= sier_bits; ++ ++ if (++ssi->enabled == 1) ++ scr |= SSI_SCR_SSIEN; ++ ++ break; ++ ++ case SNDRV_PCM_TRIGGER_STOP: ++ case SNDRV_PCM_TRIGGER_SUSPEND: ++ case SNDRV_PCM_TRIGGER_PAUSE_PUSH: ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ scr &= ~SSI_SCR_TE; ++ else ++ scr &= ~SSI_SCR_RE; ++ sier &= ~sier_bits; ++ ++ if (--ssi->enabled == 0) ++ scr &= ~SSI_SCR_SSIEN; ++ ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ if (!(ssi->flags & IMX_SSI_USE_AC97)) ++ /* rx/tx are always enabled to access ac97 registers */ ++ writel(scr, ssi->base + SSI_SCR); ++ ++ writel(sier, ssi->base + SSI_SIER); ++ ++ return 0; ++} ++ ++static struct snd_soc_dai_ops imx_ssi_pcm_dai_ops = { ++ .hw_params = imx_ssi_hw_params, ++ .set_fmt = imx_ssi_set_dai_fmt, ++ .set_clkdiv = imx_ssi_set_dai_clkdiv, ++ .set_sysclk = imx_ssi_set_dai_sysclk, ++ .set_tdm_slot = imx_ssi_set_dai_tdm_slot, ++ .trigger = imx_ssi_trigger, ++}; ++ ++static struct snd_soc_dai imx_ssi_dai = { ++ .playback = { ++ .channels_min = 2, ++ .channels_max = 2, ++ .rates = SNDRV_PCM_RATE_8000_96000, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE, ++ }, ++ .capture = { ++ .channels_min = 2, ++ .channels_max = 2, ++ .rates = SNDRV_PCM_RATE_8000_96000, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE, ++ }, ++ .ops = &imx_ssi_pcm_dai_ops, ++}; ++ ++int snd_imx_pcm_mmap(struct snd_pcm_substream *substream, ++ struct vm_area_struct *vma) ++{ ++ struct snd_pcm_runtime *runtime = substream->runtime; ++ int ret; ++ ++ ret = dma_mmap_coherent(NULL, vma, runtime->dma_area, ++ runtime->dma_addr, runtime->dma_bytes); ++ ++ pr_debug("%s: ret: %d %p 0x%08x 0x%08x\n", __func__, ret, ++ runtime->dma_area, ++ runtime->dma_addr, ++ runtime->dma_bytes); ++ return ret; ++} ++ ++static int imx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream) ++{ ++ struct snd_pcm_substream *substream = pcm->streams[stream].substream; ++ struct snd_dma_buffer *buf = &substream->dma_buffer; ++ size_t size = IMX_SSI_DMABUF_SIZE; ++ ++ buf->dev.type = SNDRV_DMA_TYPE_DEV; ++ buf->dev.dev = pcm->card->dev; ++ buf->private_data = NULL; ++ buf->area = dma_alloc_writecombine(pcm->card->dev, size, ++ &buf->addr, GFP_KERNEL); ++ if (!buf->area) ++ return -ENOMEM; ++ buf->bytes = size; ++ ++ return 0; ++} ++ ++static u64 imx_pcm_dmamask = DMA_BIT_MASK(32); ++ ++int imx_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, ++ struct snd_pcm *pcm) ++{ ++ ++ int ret = 0; ++ ++ if (!card->dev->dma_mask) ++ card->dev->dma_mask = &imx_pcm_dmamask; ++ if (!card->dev->coherent_dma_mask) ++ card->dev->coherent_dma_mask = DMA_BIT_MASK(32); ++ if (dai->playback.channels_min) { ++ ret = imx_pcm_preallocate_dma_buffer(pcm, ++ SNDRV_PCM_STREAM_PLAYBACK); ++ if (ret) ++ goto out; ++ } ++ ++ if (dai->capture.channels_min) { ++ ret = imx_pcm_preallocate_dma_buffer(pcm, ++ SNDRV_PCM_STREAM_CAPTURE); ++ if (ret) ++ goto out; ++ } ++ ++out: ++ return ret; ++} ++ ++void imx_pcm_free(struct snd_pcm *pcm) ++{ ++ struct snd_pcm_substream *substream; ++ struct snd_dma_buffer *buf; ++ int stream; ++ ++ for (stream = 0; stream < 2; stream++) { ++ substream = pcm->streams[stream].substream; ++ if (!substream) ++ continue; ++ ++ buf = &substream->dma_buffer; ++ if (!buf->area) ++ continue; ++ ++ dma_free_writecombine(pcm->card->dev, buf->bytes, ++ buf->area, buf->addr); ++ buf->area = NULL; ++ } ++} ++ ++struct snd_soc_platform imx_soc_platform = { ++ .name = "imx-audio", ++}; ++EXPORT_SYMBOL_GPL(imx_soc_platform); ++ ++static struct snd_soc_dai imx_ac97_dai = { ++ .name = "AC97", ++ .ac97_control = 1, ++ .playback = { ++ .stream_name = "AC97 Playback", ++ .channels_min = 2, ++ .channels_max = 2, ++ .rates = SND_SOC_STD_AC97_FMTS, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE, ++ }, ++ .capture = { ++ .stream_name = "AC97 Capture", ++ .channels_min = 2, ++ .channels_max = 2, ++ .rates = SNDRV_PCM_RATE_48000, ++ .formats = SNDRV_PCM_FMTBIT_S16_LE, ++ }, ++ .ops = &imx_ssi_pcm_dai_ops, ++}; ++ ++static void setup_channel_to_ac97(struct imx_ssi *imx_ssi) ++{ ++ void __iomem *base = imx_ssi->base; ++ ++ writel(0x0, base + SSI_SCR); ++ writel(0x0, base + SSI_STCR); ++ writel(0x0, base + SSI_SRCR); ++ ++ writel(SSI_SCR_SYN | SSI_SCR_NET, base + SSI_SCR); ++ ++ writel(SSI_SFCSR_RFWM0(8) | ++ SSI_SFCSR_TFWM0(8) | ++ SSI_SFCSR_RFWM1(8) | ++ SSI_SFCSR_TFWM1(8), base + SSI_SFCSR); ++ ++ writel(SSI_STCCR_WL(16) | SSI_STCCR_DC(12), base + SSI_STCCR); ++ writel(SSI_STCCR_WL(16) | SSI_STCCR_DC(12), base + SSI_SRCCR); ++ ++ writel(SSI_SCR_SYN | SSI_SCR_NET | SSI_SCR_SSIEN, base + SSI_SCR); ++ writel(SSI_SOR_WAIT(3), base + SSI_SOR); ++ ++ writel(SSI_SCR_SYN | SSI_SCR_NET | SSI_SCR_SSIEN | ++ SSI_SCR_TE | SSI_SCR_RE, ++ base + SSI_SCR); ++ ++ writel(SSI_SACNT_DEFAULT, base + SSI_SACNT); ++ writel(0xff, base + SSI_SACCDIS); ++ writel(0x300, base + SSI_SACCEN); ++} ++ ++static struct imx_ssi *ac97_ssi; ++ ++static void imx_ssi_ac97_write(struct snd_ac97 *ac97, unsigned short reg, ++ unsigned short val) ++{ ++ struct imx_ssi *imx_ssi = ac97_ssi; ++ void __iomem *base = imx_ssi->base; ++ unsigned int lreg; ++ unsigned int lval; ++ ++ if (reg > 0x7f) ++ return; ++ ++ pr_debug("%s: 0x%02x 0x%04x\n", __func__, reg, val); ++ ++ lreg = reg << 12; ++ writel(lreg, base + SSI_SACADD); ++ ++ lval = val << 4; ++ writel(lval , base + SSI_SACDAT); ++ ++ writel(SSI_SACNT_DEFAULT | SSI_SACNT_WR, base + SSI_SACNT); ++ udelay(100); ++} ++ ++static unsigned short imx_ssi_ac97_read(struct snd_ac97 *ac97, ++ unsigned short reg) ++{ ++ struct imx_ssi *imx_ssi = ac97_ssi; ++ void __iomem *base = imx_ssi->base; ++ ++ unsigned short val = -1; ++ unsigned int lreg; ++ ++ lreg = (reg & 0x7f) << 12 ; ++ writel(lreg, base + SSI_SACADD); ++ writel(SSI_SACNT_DEFAULT | SSI_SACNT_RD, base + SSI_SACNT); ++ ++ udelay(100); ++ ++ val = (readl(base + SSI_SACDAT) >> 4) & 0xffff; ++ ++ pr_debug("%s: 0x%02x 0x%04x\n", __func__, reg, val); ++ ++ return val; ++} ++ ++static void imx_ssi_ac97_reset(struct snd_ac97 *ac97) ++{ ++ struct imx_ssi *imx_ssi = ac97_ssi; ++ ++ if (imx_ssi->ac97_reset) ++ imx_ssi->ac97_reset(ac97); ++} ++ ++static void imx_ssi_ac97_warm_reset(struct snd_ac97 *ac97) ++{ ++ struct imx_ssi *imx_ssi = ac97_ssi; ++ ++ if (imx_ssi->ac97_warm_reset) ++ imx_ssi->ac97_warm_reset(ac97); ++} ++ ++struct snd_ac97_bus_ops soc_ac97_ops = { ++ .read = imx_ssi_ac97_read, ++ .write = imx_ssi_ac97_write, ++ .reset = imx_ssi_ac97_reset, ++ .warm_reset = imx_ssi_ac97_warm_reset ++}; ++EXPORT_SYMBOL_GPL(soc_ac97_ops); ++ ++struct snd_soc_dai *imx_ssi_pcm_dai[2]; ++EXPORT_SYMBOL_GPL(imx_ssi_pcm_dai); ++ ++static int imx_ssi_probe(struct platform_device *pdev) ++{ ++ struct resource *res; ++ struct imx_ssi *ssi; ++ struct imx_ssi_platform_data *pdata = pdev->dev.platform_data; ++ struct snd_soc_platform *platform; ++ int ret = 0; ++ unsigned int val; ++ ++ ssi = kzalloc(sizeof(*ssi), GFP_KERNEL); ++ if (!ssi) ++ return -ENOMEM; ++ ++ if (pdata) { ++ ssi->ac97_reset = pdata->ac97_reset; ++ ssi->ac97_warm_reset = pdata->ac97_warm_reset; ++ ssi->flags = pdata->flags; ++ } ++ ++ imx_ssi_pcm_dai[pdev->id] = &ssi->dai; ++ ++ ssi->irq = platform_get_irq(pdev, 0); ++ ++ ssi->clk = clk_get(&pdev->dev, NULL); ++ if (IS_ERR(ssi->clk)) { ++ ret = PTR_ERR(ssi->clk); ++ dev_err(&pdev->dev, "Cannot get the clock: %d\n", ++ ret); ++ goto failed_clk; ++ } ++ clk_enable(ssi->clk); ++ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!res) { ++ ret = -ENODEV; ++ goto failed_get_resource; ++ } ++ ++ if (!request_mem_region(res->start, resource_size(res), DRV_NAME)) { ++ dev_err(&pdev->dev, "request_mem_region failed\n"); ++ ret = -EBUSY; ++ goto failed_get_resource; ++ } ++ ++ ssi->base = ioremap(res->start, resource_size(res)); ++ if (!ssi->base) { ++ dev_err(&pdev->dev, "ioremap failed\n"); ++ ret = -ENODEV; ++ goto failed_ioremap; ++ } ++ ++ if (ssi->flags & IMX_SSI_USE_AC97) { ++ if (ac97_ssi) { ++ ret = -EBUSY; ++ goto failed_ac97; ++ } ++ ac97_ssi = ssi; ++ setup_channel_to_ac97(ssi); ++ memcpy(&ssi->dai, &imx_ac97_dai, sizeof(imx_ac97_dai)); ++ } else ++ memcpy(&ssi->dai, &imx_ssi_dai, sizeof(imx_ssi_dai)); ++ ++ ssi->dai.id = pdev->id; ++ ssi->dai.dev = &pdev->dev; ++ ssi->dai.name = kasprintf(GFP_KERNEL, "imx-ssi.%d", pdev->id); ++ ++ writel(0x0, ssi->base + SSI_SIER); ++ ++ ssi->dma_params_rx.dma_addr = res->start + SSI_SRX0; ++ ssi->dma_params_tx.dma_addr = res->start + SSI_STX0; ++ ++ res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "tx0"); ++ if (res) ++ ssi->dma_params_tx.dma = res->start; ++ ++ res = platform_get_resource_byname(pdev, IORESOURCE_DMA, "rx0"); ++ if (res) ++ ssi->dma_params_rx.dma = res->start; ++ ++ ssi->dai.id = pdev->id; ++ ssi->dai.dev = &pdev->dev; ++ ssi->dai.name = kasprintf(GFP_KERNEL, "imx-ssi.%d", pdev->id); ++ ++ if ((cpu_is_mx27() || cpu_is_mx21()) && ++ !(ssi->flags & IMX_SSI_USE_AC97)) { ++ ssi->flags |= IMX_SSI_DMA; ++ platform = imx_ssi_dma_mx2_init(pdev, ssi); ++ } else ++ platform = imx_ssi_fiq_init(pdev, ssi); ++ ++ imx_soc_platform.pcm_ops = platform->pcm_ops; ++ imx_soc_platform.pcm_new = platform->pcm_new; ++ imx_soc_platform.pcm_free = platform->pcm_free; ++ ++ val = SSI_SFCSR_TFWM0(ssi->dma_params_tx.burstsize) | ++ SSI_SFCSR_RFWM0(ssi->dma_params_rx.burstsize); ++ writel(val, ssi->base + SSI_SFCSR); ++ ++ ret = snd_soc_register_dai(&ssi->dai); ++ if (ret) { ++ dev_err(&pdev->dev, "register DAI failed\n"); ++ goto failed_register; ++ } ++ ++ platform_set_drvdata(pdev, ssi); ++ ++ return 0; ++ ++failed_register: ++failed_ac97: ++ iounmap(ssi->base); ++failed_ioremap: ++ release_mem_region(res->start, resource_size(res)); ++failed_get_resource: ++ clk_disable(ssi->clk); ++ clk_put(ssi->clk); ++failed_clk: ++ kfree(ssi); ++ ++ return ret; ++} ++ ++static int __devexit imx_ssi_remove(struct platform_device *pdev) ++{ ++ struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ struct imx_ssi *ssi = platform_get_drvdata(pdev); ++ ++ snd_soc_unregister_dai(&ssi->dai); ++ ++ if (ssi->flags & IMX_SSI_USE_AC97) ++ ac97_ssi = NULL; ++ ++ if (!(ssi->flags & IMX_SSI_DMA)) ++ imx_ssi_fiq_exit(pdev, ssi); ++ ++ iounmap(ssi->base); ++ release_mem_region(res->start, resource_size(res)); ++ clk_disable(ssi->clk); ++ clk_put(ssi->clk); ++ kfree(ssi); ++ ++ return 0; ++} ++ ++static struct platform_driver imx_ssi_driver = { ++ .probe = imx_ssi_probe, ++ .remove = __devexit_p(imx_ssi_remove), ++ ++ .driver = { ++ .name = DRV_NAME, ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++static int __init imx_ssi_init(void) ++{ ++ int ret; ++ ++ ret = snd_soc_register_platform(&imx_soc_platform); ++ if (ret) { ++ pr_err("failed to register soc platform: %d\n", ret); ++ return ret; ++ } ++ ++ ret = platform_driver_register(&imx_ssi_driver); ++ if (ret) { ++ snd_soc_unregister_platform(&imx_soc_platform); ++ return ret; ++ } ++ ++ return 0; ++} ++ ++static void __exit imx_ssi_exit(void) ++{ ++ platform_driver_unregister(&imx_ssi_driver); ++ snd_soc_unregister_platform(&imx_soc_platform); ++} ++ ++module_init(imx_ssi_init); ++module_exit(imx_ssi_exit); ++ ++/* Module information */ ++MODULE_AUTHOR("Sascha Hauer, "); ++MODULE_DESCRIPTION("i.MX I2S/ac97 SoC Interface"); ++MODULE_LICENSE("GPL"); ++ +diff --git a/sound/soc/imx/imx-ssi.h b/sound/soc/imx/imx-ssi.h +new file mode 100644 +index 0000000..2823fd0 +--- /dev/null ++++ b/sound/soc/imx/imx-ssi.h +@@ -0,0 +1,238 @@ ++/* ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef _IMX_SSI_H ++#define _IMX_SSI_H ++ ++#define SSI_STX0 0x00 ++#define SSI_STX1 0x04 ++#define SSI_SRX0 0x08 ++#define SSI_SRX1 0x0c ++ ++#define SSI_SCR 0x10 ++#define SSI_SCR_CLK_IST (1 << 9) ++#define SSI_SCR_CLK_IST_SHIFT 9 ++#define SSI_SCR_TCH_EN (1 << 8) ++#define SSI_SCR_SYS_CLK_EN (1 << 7) ++#define SSI_SCR_I2S_MODE_NORM (0 << 5) ++#define SSI_SCR_I2S_MODE_MSTR (1 << 5) ++#define SSI_SCR_I2S_MODE_SLAVE (2 << 5) ++#define SSI_I2S_MODE_MASK (3 << 5) ++#define SSI_SCR_SYN (1 << 4) ++#define SSI_SCR_NET (1 << 3) ++#define SSI_SCR_RE (1 << 2) ++#define SSI_SCR_TE (1 << 1) ++#define SSI_SCR_SSIEN (1 << 0) ++ ++#define SSI_SISR 0x14 ++#define SSI_SISR_MASK ((1 << 19) - 1) ++#define SSI_SISR_CMDAU (1 << 18) ++#define SSI_SISR_CMDDU (1 << 17) ++#define SSI_SISR_RXT (1 << 16) ++#define SSI_SISR_RDR1 (1 << 15) ++#define SSI_SISR_RDR0 (1 << 14) ++#define SSI_SISR_TDE1 (1 << 13) ++#define SSI_SISR_TDE0 (1 << 12) ++#define SSI_SISR_ROE1 (1 << 11) ++#define SSI_SISR_ROE0 (1 << 10) ++#define SSI_SISR_TUE1 (1 << 9) ++#define SSI_SISR_TUE0 (1 << 8) ++#define SSI_SISR_TFS (1 << 7) ++#define SSI_SISR_RFS (1 << 6) ++#define SSI_SISR_TLS (1 << 5) ++#define SSI_SISR_RLS (1 << 4) ++#define SSI_SISR_RFF1 (1 << 3) ++#define SSI_SISR_RFF0 (1 << 2) ++#define SSI_SISR_TFE1 (1 << 1) ++#define SSI_SISR_TFE0 (1 << 0) ++ ++#define SSI_SIER 0x18 ++#define SSI_SIER_RDMAE (1 << 22) ++#define SSI_SIER_RIE (1 << 21) ++#define SSI_SIER_TDMAE (1 << 20) ++#define SSI_SIER_TIE (1 << 19) ++#define SSI_SIER_CMDAU_EN (1 << 18) ++#define SSI_SIER_CMDDU_EN (1 << 17) ++#define SSI_SIER_RXT_EN (1 << 16) ++#define SSI_SIER_RDR1_EN (1 << 15) ++#define SSI_SIER_RDR0_EN (1 << 14) ++#define SSI_SIER_TDE1_EN (1 << 13) ++#define SSI_SIER_TDE0_EN (1 << 12) ++#define SSI_SIER_ROE1_EN (1 << 11) ++#define SSI_SIER_ROE0_EN (1 << 10) ++#define SSI_SIER_TUE1_EN (1 << 9) ++#define SSI_SIER_TUE0_EN (1 << 8) ++#define SSI_SIER_TFS_EN (1 << 7) ++#define SSI_SIER_RFS_EN (1 << 6) ++#define SSI_SIER_TLS_EN (1 << 5) ++#define SSI_SIER_RLS_EN (1 << 4) ++#define SSI_SIER_RFF1_EN (1 << 3) ++#define SSI_SIER_RFF0_EN (1 << 2) ++#define SSI_SIER_TFE1_EN (1 << 1) ++#define SSI_SIER_TFE0_EN (1 << 0) ++ ++#define SSI_STCR 0x1c ++#define SSI_STCR_TXBIT0 (1 << 9) ++#define SSI_STCR_TFEN1 (1 << 8) ++#define SSI_STCR_TFEN0 (1 << 7) ++#define SSI_FIFO_ENABLE_0_SHIFT 7 ++#define SSI_STCR_TFDIR (1 << 6) ++#define SSI_STCR_TXDIR (1 << 5) ++#define SSI_STCR_TSHFD (1 << 4) ++#define SSI_STCR_TSCKP (1 << 3) ++#define SSI_STCR_TFSI (1 << 2) ++#define SSI_STCR_TFSL (1 << 1) ++#define SSI_STCR_TEFS (1 << 0) ++ ++#define SSI_SRCR 0x20 ++#define SSI_SRCR_RXBIT0 (1 << 9) ++#define SSI_SRCR_RFEN1 (1 << 8) ++#define SSI_SRCR_RFEN0 (1 << 7) ++#define SSI_FIFO_ENABLE_0_SHIFT 7 ++#define SSI_SRCR_RFDIR (1 << 6) ++#define SSI_SRCR_RXDIR (1 << 5) ++#define SSI_SRCR_RSHFD (1 << 4) ++#define SSI_SRCR_RSCKP (1 << 3) ++#define SSI_SRCR_RFSI (1 << 2) ++#define SSI_SRCR_RFSL (1 << 1) ++#define SSI_SRCR_REFS (1 << 0) ++ ++#define SSI_SRCCR 0x28 ++#define SSI_SRCCR_DIV2 (1 << 18) ++#define SSI_SRCCR_PSR (1 << 17) ++#define SSI_SRCCR_WL(x) ((((x) - 2) >> 1) << 13) ++#define SSI_SRCCR_DC(x) (((x) & 0x1f) << 8) ++#define SSI_SRCCR_PM(x) (((x) & 0xff) << 0) ++#define SSI_SRCCR_WL_MASK (0xf << 13) ++#define SSI_SRCCR_DC_MASK (0x1f << 8) ++#define SSI_SRCCR_PM_MASK (0xff << 0) ++ ++#define SSI_STCCR 0x24 ++#define SSI_STCCR_DIV2 (1 << 18) ++#define SSI_STCCR_PSR (1 << 17) ++#define SSI_STCCR_WL(x) ((((x) - 2) >> 1) << 13) ++#define SSI_STCCR_DC(x) (((x) & 0x1f) << 8) ++#define SSI_STCCR_PM(x) (((x) & 0xff) << 0) ++#define SSI_STCCR_WL_MASK (0xf << 13) ++#define SSI_STCCR_DC_MASK (0x1f << 8) ++#define SSI_STCCR_PM_MASK (0xff << 0) ++ ++#define SSI_SFCSR 0x2c ++#define SSI_SFCSR_RFCNT1(x) (((x) & 0xf) << 28) ++#define SSI_RX_FIFO_1_COUNT_SHIFT 28 ++#define SSI_SFCSR_TFCNT1(x) (((x) & 0xf) << 24) ++#define SSI_TX_FIFO_1_COUNT_SHIFT 24 ++#define SSI_SFCSR_RFWM1(x) (((x) & 0xf) << 20) ++#define SSI_SFCSR_TFWM1(x) (((x) & 0xf) << 16) ++#define SSI_SFCSR_RFCNT0(x) (((x) & 0xf) << 12) ++#define SSI_RX_FIFO_0_COUNT_SHIFT 12 ++#define SSI_SFCSR_TFCNT0(x) (((x) & 0xf) << 8) ++#define SSI_TX_FIFO_0_COUNT_SHIFT 8 ++#define SSI_SFCSR_RFWM0(x) (((x) & 0xf) << 4) ++#define SSI_SFCSR_TFWM0(x) (((x) & 0xf) << 0) ++#define SSI_SFCSR_RFWM0_MASK (0xf << 4) ++#define SSI_SFCSR_TFWM0_MASK (0xf << 0) ++ ++#define SSI_STR 0x30 ++#define SSI_STR_TEST (1 << 15) ++#define SSI_STR_RCK2TCK (1 << 14) ++#define SSI_STR_RFS2TFS (1 << 13) ++#define SSI_STR_RXSTATE(x) (((x) & 0xf) << 8) ++#define SSI_STR_TXD2RXD (1 << 7) ++#define SSI_STR_TCK2RCK (1 << 6) ++#define SSI_STR_TFS2RFS (1 << 5) ++#define SSI_STR_TXSTATE(x) (((x) & 0xf) << 0) ++ ++#define SSI_SOR 0x34 ++#define SSI_SOR_CLKOFF (1 << 6) ++#define SSI_SOR_RX_CLR (1 << 5) ++#define SSI_SOR_TX_CLR (1 << 4) ++#define SSI_SOR_INIT (1 << 3) ++#define SSI_SOR_WAIT(x) (((x) & 0x3) << 1) ++#define SSI_SOR_WAIT_MASK (0x3 << 1) ++#define SSI_SOR_SYNRST (1 << 0) ++ ++#define SSI_SACNT 0x38 ++#define SSI_SACNT_FRDIV(x) (((x) & 0x3f) << 5) ++#define SSI_SACNT_WR (1 << 4) ++#define SSI_SACNT_RD (1 << 3) ++#define SSI_SACNT_TIF (1 << 2) ++#define SSI_SACNT_FV (1 << 1) ++#define SSI_SACNT_AC97EN (1 << 0) ++ ++#define SSI_SACADD 0x3c ++#define SSI_SACDAT 0x40 ++#define SSI_SATAG 0x44 ++#define SSI_STMSK 0x48 ++#define SSI_SRMSK 0x4c ++#define SSI_SACCST 0x50 ++#define SSI_SACCEN 0x54 ++#define SSI_SACCDIS 0x58 ++ ++/* SSI clock sources */ ++#define IMX_SSP_SYS_CLK 0 ++ ++/* SSI audio dividers */ ++#define IMX_SSI_TX_DIV_2 0 ++#define IMX_SSI_TX_DIV_PSR 1 ++#define IMX_SSI_TX_DIV_PM 2 ++#define IMX_SSI_RX_DIV_2 3 ++#define IMX_SSI_RX_DIV_PSR 4 ++#define IMX_SSI_RX_DIV_PM 5 ++ ++extern struct snd_soc_dai *imx_ssi_pcm_dai[2]; ++extern struct snd_soc_platform imx_soc_platform; ++ ++#define DRV_NAME "imx-ssi" ++ ++struct imx_pcm_dma_params { ++ int dma; ++ unsigned long dma_addr; ++ int burstsize; ++}; ++ ++struct imx_ssi { ++ struct snd_soc_dai dai; ++ struct platform_device *ac97_dev; ++ ++ struct snd_soc_device imx_ac97; ++ struct clk *clk; ++ void __iomem *base; ++ int irq; ++ int fiq_enable; ++ unsigned int offset; ++ ++ unsigned int flags; ++ ++ void (*ac97_reset) (struct snd_ac97 *ac97); ++ void (*ac97_warm_reset)(struct snd_ac97 *ac97); ++ ++ struct imx_pcm_dma_params dma_params_rx; ++ struct imx_pcm_dma_params dma_params_tx; ++ ++ int enabled; ++}; ++ ++struct snd_soc_platform *imx_ssi_fiq_init(struct platform_device *pdev, ++ struct imx_ssi *ssi); ++void imx_ssi_fiq_exit(struct platform_device *pdev, struct imx_ssi *ssi); ++struct snd_soc_platform *imx_ssi_dma_mx2_init(struct platform_device *pdev, ++ struct imx_ssi *ssi); ++ ++int snd_imx_pcm_mmap(struct snd_pcm_substream *substream, struct vm_area_struct *vma); ++int imx_pcm_new(struct snd_card *card, struct snd_soc_dai *dai, ++ struct snd_pcm *pcm); ++void imx_pcm_free(struct snd_pcm *pcm); ++ ++/* ++ * Do not change this as the FIQ handler depends on this size ++ */ ++#define IMX_SSI_DMABUF_SIZE (64 * 1024) ++ ++#define DMA_RXFIFO_BURST 0x4 ++#define DMA_TXFIFO_BURST 0x2 ++ ++#endif /* _IMX_SSI_H */ +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0014-mxc_nand-Get-rid-of-pagesize_2k-flag.patch b/recipes/linux/linux-2.6.31/pcm043/0014-mxc_nand-Get-rid-of-pagesize_2k-flag.patch new file mode 100644 index 0000000000..e0c02260ca --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0014-mxc_nand-Get-rid-of-pagesize_2k-flag.patch @@ -0,0 +1,128 @@ +From 8b4c0d1da3ec208fa4c79f495f75fcf0a5b01de5 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Mon, 5 Oct 2009 11:24:02 +0200 +Subject: [PATCH] mxc_nand: Get rid of pagesize_2k flag + +Later versions of this controller also allow 4k pagesize, +so use mtd->writesize instead of a flag. + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 29 ++++++++++++++--------------- + 1 files changed, 14 insertions(+), 15 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 450db4e..6525d0f 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -101,7 +101,6 @@ struct mxc_nand_host { + void __iomem *base; + void __iomem *regs; + int status_request; +- int pagesize_2k; + struct clk *clk; + int clk_act; + int irq; +@@ -214,11 +213,13 @@ static void send_addr(struct mxc_nand_host *host, uint16_t addr, int islast) + wait_op_done(host, TROP_US_DELAY, islast); + } + +-static void send_page(struct mxc_nand_host *host, unsigned int ops) ++static void send_page(struct mtd_info *mtd, unsigned int ops) + { ++ struct nand_chip *nand_chip = mtd->priv; ++ struct mxc_nand_host *host = nand_chip->priv; + int bufs, i; + +- if (host->pagesize_2k) ++ if (mtd->writesize > 512) + bufs = 4; + else + bufs = 1; +@@ -490,7 +491,7 @@ static void mxc_do_addr_cycle(struct mtd_info *mtd, int column, int page_addr) + * the full page. + */ + send_addr(host, 0, page_addr == -1); +- if (host->pagesize_2k) ++ if (mtd->writesize > 512) + /* another col addr cycle for 2k page */ + send_addr(host, 0, false); + } +@@ -500,7 +501,7 @@ static void mxc_do_addr_cycle(struct mtd_info *mtd, int column, int page_addr) + /* paddr_0 - p_addr_7 */ + send_addr(host, (page_addr & 0xff), false); + +- if (host->pagesize_2k) { ++ if (mtd->writesize > 512) { + if (mtd->size >= 0x10000000) { + /* paddr_8 - paddr_15 */ + send_addr(host, (page_addr >> 8) & 0xff, false); +@@ -554,16 +555,16 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + else + host->buf_start = column + mtd->writesize; + +- if (host->pagesize_2k) ++ if (mtd->writesize > 512) + command = NAND_CMD_READ0; /* only READ0 is valid */ + + send_cmd(host, command, false); + mxc_do_addr_cycle(mtd, column, page_addr); + +- if (host->pagesize_2k) ++ if (mtd->writesize > 512) + send_cmd(host, NAND_CMD_READSTART, true); + +- send_page(host, NFC_OUTPUT); ++ send_page(mtd, NFC_OUTPUT); + + memcpy(host->data_buf, host->main_area0, mtd->writesize); + copy_spare(mtd, true); +@@ -578,7 +579,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + * pointer to spare area, we must write the whole page + * including OOB together. + */ +- if (host->pagesize_2k) ++ if (mtd->writesize > 512) + /* call ourself to read a page */ + mxc_nand_command(mtd, NAND_CMD_READ0, 0, + page_addr); +@@ -586,13 +587,13 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + host->buf_start = column; + + /* Set program pointer to spare region */ +- if (!host->pagesize_2k) ++ if (mtd->writesize == 512) + send_cmd(host, NAND_CMD_READOOB, false); + } else { + host->buf_start = column; + + /* Set program pointer to page start */ +- if (!host->pagesize_2k) ++ if (mtd->writesize == 512) + send_cmd(host, NAND_CMD_READ0, false); + } + +@@ -603,7 +604,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + case NAND_CMD_PAGEPROG: + memcpy(host->main_area0, host->data_buf, mtd->writesize); + copy_spare(mtd, false); +- send_page(host, NFC_INPUT); ++ send_page(mtd, NFC_INPUT); + send_cmd(host, command, true); + mxc_do_addr_cycle(mtd, column, page_addr); + break; +@@ -745,10 +746,8 @@ static int __init mxcnd_probe(struct platform_device *pdev) + goto escan; + } + +- if (mtd->writesize == 2048) { +- host->pagesize_2k = 1; ++ if (mtd->writesize == 2048) + this->ecc.layout = &nand_hw_eccoob_largepage; +- } + + /* second phase scan */ + if (nand_scan_tail(mtd)) { +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0015-MXC-NFC-unlock_addr-is-only-used-while-__init-pha.patch b/recipes/linux/linux-2.6.31/pcm043/0015-MXC-NFC-unlock_addr-is-only-used-while-__init-pha.patch new file mode 100644 index 0000000000..6c1b6a00d4 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0015-MXC-NFC-unlock_addr-is-only-used-while-__init-pha.patch @@ -0,0 +1,28 @@ +From 7c796b820f5aee73485636f5aafc13fcbb1cfacd Mon Sep 17 00:00:00 2001 +From: Juergen Beisert +Date: Wed, 30 Sep 2009 17:21:28 +0200 +Subject: [PATCH 15/15] MXC NFC: unlock_addr() is only used while __init phase + +unlock_addr() is only used while __init phase, so mark is as __init. + +Signed-off-by: Juergen Beisert +--- + drivers/mtd/nand/mxc_nand_v2.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand_v2.c b/drivers/mtd/nand/mxc_nand_v2.c +index bab3712..9dd124c 100644 +--- a/drivers/mtd/nand/mxc_nand_v2.c ++++ b/drivers/mtd/nand/mxc_nand_v2.c +@@ -781,7 +781,7 @@ static struct nand_bbt_descr bbt_mirror_descr = { + .pattern = mirror_pattern + }; + +-static void unlock_addr(struct mxc_nand_host *host, unsigned int start_addr, unsigned int end_addr) ++static void __init unlock_addr(struct mxc_nand_host *host, unsigned int start_addr, unsigned int end_addr) + { + if (nfc_is_v21()) { + writew(start_addr, host->regs + NFC_V21_UNLOCKSTART_BLKADDR); +-- +1.6.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0015-add-phycore-ac97-sound-support.patch b/recipes/linux/linux-2.6.31/pcm043/0015-add-phycore-ac97-sound-support.patch new file mode 100644 index 0000000000..2a588aa7c1 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0015-add-phycore-ac97-sound-support.patch @@ -0,0 +1,140 @@ +From cab3d12f55b4e89e6504a4fd9b1e950a3f2beae2 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 25 Nov 2009 16:18:28 +0100 +Subject: [PATCH 15/28] add phycore-ac97 sound support + +Signed-off-by: Sascha Hauer +--- + sound/soc/imx/Kconfig | 9 ++++ + sound/soc/imx/Makefile | 2 + + sound/soc/imx/phycore-ac97.c | 91 ++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 102 insertions(+), 0 deletions(-) + create mode 100644 sound/soc/imx/phycore-ac97.c + +diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig +index 84a25e6..2a8c990 100644 +--- a/sound/soc/imx/Kconfig ++++ b/sound/soc/imx/Kconfig +@@ -11,3 +11,12 @@ config SND_IMX_SOC + config SND_MXC_SOC_SSI + tristate + ++config SND_SOC_PHYCORE_AC97 ++ tristate "SoC Audio support for Phytec phyCORE (and phyCARD) boards" ++ depends on MACH_PCM043 || MACH_PCA100 ++ select SND_MXC_SOC_SSI ++ select SND_SOC_WM9712 ++ help ++ Say Y if you want to add support for SoC audio on Phytec phyCORE ++ and phyCARD boards in AC97 mode ++ +diff --git a/sound/soc/imx/Makefile b/sound/soc/imx/Makefile +index d05cc95..9f8bb92 100644 +--- a/sound/soc/imx/Makefile ++++ b/sound/soc/imx/Makefile +@@ -8,3 +8,5 @@ endif + obj-$(CONFIG_SND_IMX_SOC) += snd-soc-imx.o + + # i.MX Machine Support ++snd-soc-phycore-ac97-objs := phycore-ac97.o ++obj-$(CONFIG_SND_SOC_PHYCORE_AC97) += snd-soc-phycore-ac97.o +diff --git a/sound/soc/imx/phycore-ac97.c b/sound/soc/imx/phycore-ac97.c +new file mode 100644 +index 0000000..8e3474b +--- /dev/null ++++ b/sound/soc/imx/phycore-ac97.c +@@ -0,0 +1,91 @@ ++/* ++ * phycore.c -- SoC audio for imx_phycore ++ * ++ * Copyright 2009 Sascha Hauer, Pengutronix ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../codecs/mc13783.h" ++#include "../codecs/wm9712.h" ++#include "imx-ssi.h" ++ ++static struct snd_soc_card imx_phycore; ++ ++static struct snd_soc_ops imx_phycore_hifi_ops = { ++}; ++ ++static struct snd_soc_dai_link imx_phycore_dai_ac97[] = { ++ { ++ .name = "HiFi", ++ .stream_name = "HiFi", ++ .codec_dai = &wm9712_dai[WM9712_DAI_AC97_HIFI], ++ .ops = &imx_phycore_hifi_ops, ++ }, ++}; ++ ++static struct snd_soc_card imx_phycore = { ++ .name = "PhyCORE-audio", ++ .platform = &imx_soc_platform, ++ .dai_link = imx_phycore_dai_ac97, ++ .num_links = ARRAY_SIZE(imx_phycore_dai_ac97), ++}; ++ ++static struct snd_soc_device imx_phycore_snd_devdata = { ++ .card = &imx_phycore, ++ .codec_dev = &soc_codec_dev_wm9712, ++}; ++ ++static struct platform_device *imx_phycore_snd_device; ++ ++static int __init imx_phycore_init(void) ++{ ++ int ret; ++ ++ if (!machine_is_pcm043() && !machine_is_pca100()) ++ /* return happy. We might run on a totally different machine */ ++ return 0; ++ ++ imx_phycore_snd_device = platform_device_alloc("soc-audio", -1); ++ if (!imx_phycore_snd_device) ++ return -ENOMEM; ++ ++ imx_phycore_dai_ac97[0].cpu_dai = imx_ssi_pcm_dai[0]; ++ ++ platform_set_drvdata(imx_phycore_snd_device, &imx_phycore_snd_devdata); ++ imx_phycore_snd_devdata.dev = &imx_phycore_snd_device->dev; ++ ret = platform_device_add(imx_phycore_snd_device); ++ ++ if (ret) { ++ printk(KERN_ERR "ASoC: Platform device allocation failed\n"); ++ platform_device_put(imx_phycore_snd_device); ++ } ++ ++ return ret; ++} ++ ++static void __exit imx_phycore_exit(void) ++{ ++ platform_device_unregister(imx_phycore_snd_device); ++} ++ ++late_initcall(imx_phycore_init); ++module_exit(imx_phycore_exit); ++ ++MODULE_AUTHOR("Sascha Hauer "); ++MODULE_DESCRIPTION("PhyCORE ALSA SoC driver"); ++MODULE_LICENSE("GPL"); +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0015-mxc_nand-Add-NFC-V2-support.patch b/recipes/linux/linux-2.6.31/pcm043/0015-mxc_nand-Add-NFC-V2-support.patch new file mode 100644 index 0000000000..a600e7871c --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0015-mxc_nand-Add-NFC-V2-support.patch @@ -0,0 +1,191 @@ +From 7874c1c277ff88843747ccb2e1582c19cfb21986 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Mon, 5 Oct 2009 12:14:21 +0200 +Subject: [PATCH] mxc_nand: Add NFC V2 support + +The v2 version of this controller is used on i.MX35/25 SoCs. + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 81 ++++++++++++++++++++++++++++++++++++------- + 1 files changed, 68 insertions(+), 13 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 6525d0f..f2297eb 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -33,9 +33,13 @@ + + #include + #include ++#include + + #define DRIVER_NAME "mxc_nand" + ++#define nfc_is_v21() (cpu_is_mx25() || cpu_is_mx35()) ++#define nfc_is_v1() (cpu_is_mx31() || cpu_is_mx27()) ++ + /* Addresses for NFC registers */ + #define NFC_BUF_SIZE 0xE00 + #define NFC_BUF_ADDR 0xE04 +@@ -46,8 +50,10 @@ + #define NFC_RSLTMAIN_AREA 0xE0E + #define NFC_RSLTSPARE_AREA 0xE10 + #define NFC_WRPROT 0xE12 +-#define NFC_UNLOCKSTART_BLKADDR 0xE14 +-#define NFC_UNLOCKEND_BLKADDR 0xE16 ++#define NFC_V1_UNLOCKSTART_BLKADDR 0xe14 ++#define NFC_V1_UNLOCKEND_BLKADDR 0xe16 ++#define NFC_V21_UNLOCKSTART_BLKADDR 0xe20 ++#define NFC_V21_UNLOCKEND_BLKADDR 0xe22 + #define NFC_NF_WRPRST 0xE18 + #define NFC_CONFIG1 0xE1A + #define NFC_CONFIG2 0xE1C +@@ -116,19 +122,47 @@ struct mxc_nand_host { + #define TROP_US_DELAY 2000 + + /* OOB placement block for use with hardware ecc generation */ +-static struct nand_ecclayout nand_hw_eccoob_smallpage = { ++static struct nand_ecclayout nandv1_hw_eccoob_smallpage = { + .eccbytes = 5, + .eccpos = {6, 7, 8, 9, 10}, + .oobfree = {{0, 5}, {12, 4}, } + }; + +-static struct nand_ecclayout nand_hw_eccoob_largepage = { ++static struct nand_ecclayout nandv1_hw_eccoob_largepage = { + .eccbytes = 20, + .eccpos = {6, 7, 8, 9, 10, 22, 23, 24, 25, 26, + 38, 39, 40, 41, 42, 54, 55, 56, 57, 58}, + .oobfree = {{2, 4}, {11, 10}, {27, 10}, {43, 10}, {59, 5}, } + }; + ++/* OOB description for 512 byte pages with 16 byte OOB */ ++static struct nand_ecclayout nandv2_hw_eccoob_smallpage = { ++ .eccbytes = 1 * 9, ++ .eccpos = { ++ 7, 8, 9, 10, 11, 12, 13, 14, 15 ++ }, ++ .oobfree = { ++ {.offset = 0, .length = 5} ++ } ++}; ++ ++/* OOB description for 2048 byte pages with 64 byte OOB */ ++static struct nand_ecclayout nandv2_hw_eccoob_largepage = { ++ .eccbytes = 4 * 9, ++ .eccpos = { ++ 7, 8, 9, 10, 11, 12, 13, 14, 15, ++ 23, 24, 25, 26, 27, 28, 29, 30, 31, ++ 39, 40, 41, 42, 43, 44, 45, 46, 47, ++ 55, 56, 57, 58, 59, 60, 61, 62, 63 ++ }, ++ .oobfree = { ++ {.offset = 2, .length = 4}, ++ {.offset = 16, .length = 7}, ++ {.offset = 32, .length = 7}, ++ {.offset = 48, .length = 7} ++ } ++}; ++ + #ifdef CONFIG_MTD_PARTITIONS + static const char *part_probes[] = { "RedBoot", "cmdlinepart", NULL }; + #endif +@@ -219,7 +253,7 @@ static void send_page(struct mtd_info *mtd, unsigned int ops) + struct mxc_nand_host *host = nand_chip->priv; + int bufs, i; + +- if (mtd->writesize > 512) ++ if (nfc_is_v1() && mtd->writesize > 512) + bufs = 4; + else + bufs = 1; +@@ -613,6 +647,7 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + send_cmd(host, command, true); + mxc_do_addr_cycle(mtd, column, page_addr); + send_read_id(host); ++ host->buf_start = column; + break; + + case NAND_CMD_ERASE1: +@@ -633,6 +668,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) + struct resource *res; + uint16_t tmp; + int err = 0, nr_parts = 0; ++ struct nand_ecclayout *oob_smallpage, *oob_largepage; + + /* Allocate memory for MTD device structure and private data */ + host = kzalloc(sizeof(struct mxc_nand_host) + NAND_MAX_PAGESIZE + +@@ -641,7 +677,6 @@ static int __init mxcnd_probe(struct platform_device *pdev) + return -ENOMEM; + + host->data_buf = (uint8_t *)(host + 1); +- host->spare_len = 16; + + host->dev = &pdev->dev; + /* structures must be linked */ +@@ -686,10 +721,23 @@ static int __init mxcnd_probe(struct platform_device *pdev) + goto eres; + } + +- host->regs = host->base; + host->main_area0 = host->base; + host->main_area1 = host->base + 0x200; +- host->spare0 = host->base + 0x800; ++ ++ if (nfc_is_v21()) { ++ host->regs = host->base + 0x1000; ++ host->spare0 = host->base + 0x1000; ++ host->spare_len = 64; ++ oob_smallpage = &nandv2_hw_eccoob_smallpage; ++ oob_largepage = &nandv2_hw_eccoob_largepage; ++ } else if (nfc_is_v1()) { ++ host->regs = host->base; ++ host->spare0 = host->base + 0x800; ++ host->spare_len = 16; ++ oob_smallpage = &nandv1_hw_eccoob_smallpage; ++ oob_largepage = &nandv1_hw_eccoob_largepage; ++ } else ++ BUG(); + + tmp = readw(host->regs + NFC_CONFIG1); + tmp |= NFC_INT_MSK; +@@ -711,15 +759,22 @@ static int __init mxcnd_probe(struct platform_device *pdev) + writew(0x2, host->regs + NFC_CONFIG); + + /* Blocks to be unlocked */ +- writew(0x0, host->regs + NFC_UNLOCKSTART_BLKADDR); +- writew(0x4000, host->regs + NFC_UNLOCKEND_BLKADDR); ++ if (nfc_is_v21()) { ++ writew(0x0, host->regs + NFC_V21_UNLOCKSTART_BLKADDR); ++ writew(0xffff, host->regs + NFC_V21_UNLOCKEND_BLKADDR); ++ this->ecc.bytes = 9; ++ } else if (nfc_is_v1()) { ++ writew(0x0, host->regs + NFC_V1_UNLOCKSTART_BLKADDR); ++ writew(0x4000, host->regs + NFC_V1_UNLOCKEND_BLKADDR); ++ this->ecc.bytes = 3; ++ } else ++ BUG(); + + /* Unlock Block Command for given address range */ + writew(0x4, host->regs + NFC_WRPROT); + + this->ecc.size = 512; +- this->ecc.bytes = 3; +- this->ecc.layout = &nand_hw_eccoob_smallpage; ++ this->ecc.layout = oob_smallpage; + + if (pdata->hw_ecc) { + this->ecc.calculate = mxc_nand_calculate_ecc; +@@ -747,7 +802,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) + } + + if (mtd->writesize == 2048) +- this->ecc.layout = &nand_hw_eccoob_largepage; ++ this->ecc.layout = oob_largepage; + + /* second phase scan */ + if (nand_scan_tail(mtd)) { +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0016-add-phycore-mc13783-sound-support.patch b/recipes/linux/linux-2.6.31/pcm043/0016-add-phycore-mc13783-sound-support.patch new file mode 100644 index 0000000000..629f551bfa --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0016-add-phycore-mc13783-sound-support.patch @@ -0,0 +1,211 @@ +From 62b2363d03aa1d58d2ff23eff6c535d1e3715277 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 25 Nov 2009 16:18:38 +0100 +Subject: [PATCH 16/28] add phycore-mc13783 sound support + +Signed-off-by: Sascha Hauer +--- + sound/soc/imx/Kconfig | 10 +++ + sound/soc/imx/Makefile | 3 + + sound/soc/imx/phycore-mc13783.c | 160 +++++++++++++++++++++++++++++++++++++++ + 3 files changed, 173 insertions(+), 0 deletions(-) + create mode 100644 sound/soc/imx/phycore-mc13783.c + +diff --git a/sound/soc/imx/Kconfig b/sound/soc/imx/Kconfig +index 2a8c990..e145212 100644 +--- a/sound/soc/imx/Kconfig ++++ b/sound/soc/imx/Kconfig +@@ -20,3 +20,13 @@ config SND_SOC_PHYCORE_AC97 + Say Y if you want to add support for SoC audio on Phytec phyCORE + and phyCARD boards in AC97 mode + ++config SND_SOC_PHYCORE_MC13783 ++ tristate "SoC Audio support for Phytec phyCORE (and phyCARD) boards" ++ depends on MACH_PCM038 || MACH_PCM037 ++ select SND_MXC_SOC_SSI ++ select SND_SOC_MC13783 ++ select SND_SOC_WM9712 if MACH_PCM043 || MACH_PCA100 ++ help ++ Say Y if you want to add support for SoC audio on Phytec phyCORE ++ boards using a MC13783 Codec. ++ +diff --git a/sound/soc/imx/Makefile b/sound/soc/imx/Makefile +index 9f8bb92..425ffaf 100644 +--- a/sound/soc/imx/Makefile ++++ b/sound/soc/imx/Makefile +@@ -10,3 +10,6 @@ obj-$(CONFIG_SND_IMX_SOC) += snd-soc-imx.o + # i.MX Machine Support + snd-soc-phycore-ac97-objs := phycore-ac97.o + obj-$(CONFIG_SND_SOC_PHYCORE_AC97) += snd-soc-phycore-ac97.o ++ ++snd-soc-phycore-mc13783-objs := phycore-mc13783.o ++obj-$(CONFIG_SND_SOC_PHYCORE_MC13783) += snd-soc-phycore-mc13783.o +diff --git a/sound/soc/imx/phycore-mc13783.c b/sound/soc/imx/phycore-mc13783.c +new file mode 100644 +index 0000000..3743e0f +--- /dev/null ++++ b/sound/soc/imx/phycore-mc13783.c +@@ -0,0 +1,160 @@ ++/* ++ * phycore.c -- SoC audio for imx_phycore ++ * ++ * Copyright 2009 Sascha Hauer, Pengutronix ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../codecs/mc13783.h" ++#include "../codecs/wm9712.h" ++#include "imx-ssi.h" ++ ++static struct snd_soc_card imx_phycore; ++ ++#define FMT_PLAYBACK (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | \ ++ SND_SOC_DAIFMT_CBM_CFM) ++#define FMT_CAPTURE (SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_NB_NF | \ ++ SND_SOC_DAIFMT_CBM_CFM) ++ ++static int imx_phycore_hifi_hw_params(struct snd_pcm_substream *substream, ++ struct snd_pcm_hw_params *params) ++{ ++ struct snd_soc_pcm_runtime *rtd = substream->private_data; ++ struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; ++ struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; ++ int ret; ++ ++ /* set cpu DAI configuration */ ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { ++ ret = snd_soc_dai_set_fmt(codec_dai, FMT_PLAYBACK); ++ if (ret) ++ return ret; ++ ret = snd_soc_dai_set_fmt(cpu_dai, FMT_PLAYBACK); ++ if (ret) ++ return ret; ++ } else { ++ ret = snd_soc_dai_set_fmt(codec_dai, FMT_CAPTURE); ++ if (ret) ++ return ret; ++ ret = snd_soc_dai_set_fmt(cpu_dai, FMT_CAPTURE); ++ if (ret) ++ return ret; ++ ret = snd_soc_dai_set_tdm_slot(codec_dai, 0, 4); ++ if (ret) ++ return ret; ++ } ++ ++ ret = snd_soc_dai_set_sysclk(codec_dai, MC13783_CLK_CLIA, 26000000, 0); ++ if (ret) ++ return ret; ++ ++ ret = snd_soc_dai_set_tdm_slot(cpu_dai, 0xfffffffc, 4); ++ if (ret) ++ return ret; ++ ++ return 0; ++} ++ ++static int imx_phycore_hifi_hw_free(struct snd_pcm_substream *substream) ++{ ++ return 0; ++} ++ ++static struct snd_soc_ops imx_phycore_hifi_ops = { ++ .hw_params = imx_phycore_hifi_hw_params, ++ .hw_free = imx_phycore_hifi_hw_free, ++}; ++ ++static int imx_phycore_probe(struct platform_device *pdev) ++{ ++ return 0; ++} ++ ++static int imx_phycore_remove(struct platform_device *pdev) ++{ ++ return 0; ++} ++ ++static struct snd_soc_dai_link imx_phycore_dai_mc13783[] = { ++ { ++ .name = "MC13783 Playback", ++ .stream_name = "Playback", ++ .codec_dai = &mc13783_dai[0], ++ .ops = &imx_phycore_hifi_ops, ++ }, { ++ .name = "MC13783 Capture", ++ .stream_name = "Capture", ++ .codec_dai = &mc13783_dai[1], ++ .ops = &imx_phycore_hifi_ops, ++ }, ++}; ++ ++static struct snd_soc_card imx_phycore = { ++ .name = "PhyCORE-audio", ++ .platform = &imx_soc_platform, ++ .probe = imx_phycore_probe, ++ .remove = imx_phycore_remove, ++ .dai_link = imx_phycore_dai_mc13783, ++ .num_links = ARRAY_SIZE(imx_phycore_dai_mc13783), ++}; ++ ++static struct snd_soc_device imx_phycore_snd_devdata = { ++ .card = &imx_phycore, ++ .codec_dev = &soc_codec_dev_mc13783, ++}; ++ ++static struct platform_device *imx_phycore_snd_device; ++ ++static int __init imx_phycore_init(void) ++{ ++ int ret; ++ ++ if (!machine_is_pcm038() && !machine_is_pcm037()) ++ /* return happy. We might run on a totally different machine */ ++ return 0; ++ ++ imx_phycore_snd_device = platform_device_alloc("soc-audio", -1); ++ if (!imx_phycore_snd_device) ++ return -ENOMEM; ++ ++ imx_phycore_dai_mc13783[0].cpu_dai = imx_ssi_pcm_dai[0]; ++ imx_phycore_dai_mc13783[1].cpu_dai = imx_ssi_pcm_dai[0]; ++ ++ platform_set_drvdata(imx_phycore_snd_device, &imx_phycore_snd_devdata); ++ imx_phycore_snd_devdata.dev = &imx_phycore_snd_device->dev; ++ ret = platform_device_add(imx_phycore_snd_device); ++ ++ if (ret) { ++ printk(KERN_ERR "ASoC: Platform device allocation failed\n"); ++ platform_device_put(imx_phycore_snd_device); ++ } ++ ++ return ret; ++} ++ ++static void __exit imx_phycore_exit(void) ++{ ++ platform_device_unregister(imx_phycore_snd_device); ++} ++ ++late_initcall(imx_phycore_init); ++module_exit(imx_phycore_exit); ++ ++MODULE_AUTHOR("Sascha Hauer "); ++MODULE_DESCRIPTION("PhyCORE ALSA SoC driver"); ++MODULE_LICENSE("GPL"); +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0016-mxc_nand-disable-sp_en-bit-only-once.patch b/recipes/linux/linux-2.6.31/pcm043/0016-mxc_nand-disable-sp_en-bit-only-once.patch new file mode 100644 index 0000000000..f926c8fd0c --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0016-mxc_nand-disable-sp_en-bit-only-once.patch @@ -0,0 +1,66 @@ +From b21f4e602fec63eb29aea9dc9bc59d31f6e027c5 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Mon, 5 Oct 2009 17:18:42 +0200 +Subject: [PATCH] mxc_nand: disable sp_en bit only once + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 15 +++------------ + 1 files changed, 3 insertions(+), 12 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index f2297eb..199a5f2 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -274,16 +274,10 @@ static void send_page(struct mtd_info *mtd, unsigned int ops) + static void send_read_id(struct mxc_nand_host *host) + { + struct nand_chip *this = &host->nand; +- uint16_t tmp; + + /* NANDFC buffer 0 is used for device ID output */ + writew(0x0, host->regs + NFC_BUF_ADDR); + +- /* Read ID into main buffer */ +- tmp = readw(host->regs + NFC_CONFIG1); +- tmp &= ~NFC_SP_EN; +- writew(tmp, host->regs + NFC_CONFIG1); +- + writew(NFC_ID, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +@@ -307,7 +301,7 @@ static uint16_t get_dev_status(struct mxc_nand_host *host) + { + void __iomem *main_buf = host->main_area1; + uint32_t store; +- uint16_t ret, tmp; ++ uint16_t ret; + /* Issue status request to NAND device */ + + /* store the main area1 first word, later do recovery */ +@@ -316,11 +310,6 @@ static uint16_t get_dev_status(struct mxc_nand_host *host) + * corruption of read/write buffer on status requests. */ + writew(1, host->regs + NFC_BUF_ADDR); + +- /* Read status into main buffer */ +- tmp = readw(host->regs + NFC_CONFIG1); +- tmp &= ~NFC_SP_EN; +- writew(tmp, host->regs + NFC_CONFIG1); +- + writew(NFC_STATUS, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +@@ -739,8 +728,10 @@ static int __init mxcnd_probe(struct platform_device *pdev) + } else + BUG(); + ++ /* disable interrupt and spare enable */ + tmp = readw(host->regs + NFC_CONFIG1); + tmp |= NFC_INT_MSK; ++ tmp &= ~NFC_SP_EN; + writew(tmp, host->regs + NFC_CONFIG1); + + init_waitqueue_head(&host->irq_waitq); +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0017-mxc_nand-Allow-flash-based-bbt.patch b/recipes/linux/linux-2.6.31/pcm043/0017-mxc_nand-Allow-flash-based-bbt.patch new file mode 100644 index 0000000000..1f3f9eede4 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0017-mxc_nand-Allow-flash-based-bbt.patch @@ -0,0 +1,79 @@ +From b865b0240161ad328bb2fe69eea58111c8df6a29 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 21 Oct 2009 14:25:27 +0200 +Subject: [PATCH] mxc_nand: Allow flash based bbt + +Signed-off-by: Sascha Hauer +--- + arch/arm/plat-mxc/include/mach/mxc_nand.h | 3 +- + drivers/mtd/nand/mxc_nand.c | 34 +++++++++++++++++++++++++++++ + 2 files changed, 36 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/plat-mxc/include/mach/mxc_nand.h b/arch/arm/plat-mxc/include/mach/mxc_nand.h +index 2b972df..5d2d21d 100644 +--- a/arch/arm/plat-mxc/include/mach/mxc_nand.h ++++ b/arch/arm/plat-mxc/include/mach/mxc_nand.h +@@ -22,6 +22,7 @@ + + struct mxc_nand_platform_data { + int width; /* data bus width in bytes */ +- int hw_ecc; /* 0 if supress hardware ECC */ ++ int hw_ecc:1; /* 0 if supress hardware ECC */ ++ int flash_bbt:1; /* set to 1 to use a flash based bbt */ + }; + #endif /* __ASM_ARCH_NAND_H */ +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 199a5f2..3fdc172 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -648,6 +648,33 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, + } + } + ++/* ++ * The generic flash bbt decriptors overlap with our ecc ++ * hardware, so define some i.MX specific ones. ++ */ ++static uint8_t bbt_pattern[] = { 'B', 'b', 't', '0' }; ++static uint8_t mirror_pattern[] = { '1', 't', 'b', 'B' }; ++ ++static struct nand_bbt_descr bbt_main_descr = { ++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE ++ | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP, ++ .offs = 0, ++ .len = 4, ++ .veroffs = 4, ++ .maxblocks = 4, ++ .pattern = bbt_pattern, ++}; ++ ++static struct nand_bbt_descr bbt_mirror_descr = { ++ .options = NAND_BBT_LASTBLOCK | NAND_BBT_CREATE | NAND_BBT_WRITE ++ | NAND_BBT_2BIT | NAND_BBT_VERSION | NAND_BBT_PERCHIP, ++ .offs = 0, ++ .len = 4, ++ .veroffs = 4, ++ .maxblocks = 4, ++ .pattern = mirror_pattern, ++}; ++ + static int __init mxcnd_probe(struct platform_device *pdev) + { + struct nand_chip *this; +@@ -786,6 +813,13 @@ static int __init mxcnd_probe(struct platform_device *pdev) + if (pdata->width == 2) + this->options |= NAND_BUSWIDTH_16; + ++ if (pdata->flash_bbt) { ++ this->bbt_td = &bbt_main_descr; ++ this->bbt_md = &bbt_mirror_descr; ++ /* update flash based bbt */ ++ this->options |= NAND_USE_FLASH_BBT; ++ } ++ + /* first scan to find the device and get the page size */ + if (nand_scan_ident(mtd, 1)) { + err = -ENXIO; +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0017-pcm043-add-sound-support.patch b/recipes/linux/linux-2.6.31/pcm043/0017-pcm043-add-sound-support.patch new file mode 100644 index 0000000000..d4c1527ac2 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0017-pcm043-add-sound-support.patch @@ -0,0 +1,161 @@ +From 9ce0a3fb1764c093452db1f34dfecbca1ea41833 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 29 Oct 2009 17:17:31 +0100 +Subject: [PATCH 17/28] pcm043: add sound support + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx3/pcm043.c | 104 +++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 103 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-mx3/pcm043.c b/arch/arm/mach-mx3/pcm043.c +index 8d27c32..d1b6f53 100644 +--- a/arch/arm/mach-mx3/pcm043.c ++++ b/arch/arm/mach-mx3/pcm043.c +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -43,6 +44,8 @@ + #include + #include + #include ++#include ++#include + + #include "devices.h" + +@@ -203,7 +206,92 @@ static struct pad_desc pcm043_pads[] = { + MX35_PAD_D3_VSYNC__IPU_DISPB_D3_VSYNC, + MX35_PAD_D3_REV__IPU_DISPB_D3_REV, + MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS, +- MX35_PAD_D3_SPL__IPU_DISPB_D3_SPL ++ MX35_PAD_D3_SPL__IPU_DISPB_D3_SPL, ++ /* SSI */ ++ MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS, ++ MX35_PAD_STXD4__AUDMUX_AUD4_TXD, ++ MX35_PAD_SRXD4__AUDMUX_AUD4_RXD, ++ MX35_PAD_SCK4__AUDMUX_AUD4_TXC, ++}; ++ ++#define AC97_GPIO_TXFS (1 * 32 + 31) ++#define AC97_GPIO_TXD (1 * 32 + 28) ++#define AC97_GPIO_RESET (1 * 32 + 0) ++ ++static void pcm043_ac97_warm_reset(struct snd_ac97 *ac97) ++{ ++ struct pad_desc txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; ++ struct pad_desc txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; ++ int ret; ++ ++ ret = gpio_request(AC97_GPIO_TXFS, "SSI"); ++ if (ret) { ++ printk("failed to get GPIO_TXFS: %d\n", ret); ++ return; ++ } ++ ++ mxc_iomux_v3_setup_pad(&txfs_gpio); ++ ++ /* warm reset */ ++ gpio_direction_output(AC97_GPIO_TXFS, 1); ++ udelay(2); ++ gpio_set_value(AC97_GPIO_TXFS, 0); ++ ++ gpio_free(AC97_GPIO_TXFS); ++ mxc_iomux_v3_setup_pad(&txfs); ++} ++ ++static void pcm043_ac97_cold_reset(struct snd_ac97 *ac97) ++{ ++ struct pad_desc txfs_gpio = MX35_PAD_STXFS4__GPIO2_31; ++ struct pad_desc txfs = MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS; ++ struct pad_desc txd_gpio = MX35_PAD_STXD4__GPIO2_28; ++ struct pad_desc txd = MX35_PAD_STXD4__AUDMUX_AUD4_TXD; ++ struct pad_desc reset_gpio = MX35_PAD_SD2_CMD__GPIO2_0; ++ int ret; ++ ++ ret = gpio_request(AC97_GPIO_TXFS, "SSI"); ++ if (ret) ++ goto err1; ++ ++ ret = gpio_request(AC97_GPIO_TXD, "SSI"); ++ if (ret) ++ goto err2; ++ ++ ret = gpio_request(AC97_GPIO_RESET, "SSI"); ++ if (ret) ++ goto err3; ++ ++ mxc_iomux_v3_setup_pad(&txfs_gpio); ++ mxc_iomux_v3_setup_pad(&txd_gpio); ++ mxc_iomux_v3_setup_pad(&reset_gpio); ++ ++ gpio_direction_output(AC97_GPIO_TXFS, 0); ++ gpio_direction_output(AC97_GPIO_TXD, 0); ++ ++ /* cold reset */ ++ gpio_direction_output(AC97_GPIO_RESET, 0); ++ udelay(10); ++ gpio_direction_output(AC97_GPIO_RESET, 1); ++ ++ mxc_iomux_v3_setup_pad(&txd); ++ mxc_iomux_v3_setup_pad(&txfs); ++ ++ gpio_free(AC97_GPIO_RESET); ++err3: ++ gpio_free(AC97_GPIO_TXD); ++err2: ++ gpio_free(AC97_GPIO_TXFS); ++err1: ++ if (ret) ++ printk("%s failed with %d\n", __func__, ret); ++ mdelay(1); ++} ++ ++static struct imx_ssi_platform_data pcm043_ssi_pdata = { ++ .ac97_reset = pcm043_ac97_cold_reset, ++ .ac97_warm_reset = pcm043_ac97_warm_reset, ++ .flags = IMX_SSI_USE_AC97, + }; + + /* +@@ -213,11 +301,24 @@ static void __init mxc_board_init(void) + { + mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); + ++ mxc_audmux_v2_configure_port(3, ++ MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ ++ MXC_AUDMUX_V2_PTCR_TFSEL(0) | ++ MXC_AUDMUX_V2_PTCR_TFSDIR, ++ MXC_AUDMUX_V2_PDCR_RXDSEL(0)); ++ ++ mxc_audmux_v2_configure_port(0, ++ MXC_AUDMUX_V2_PTCR_SYN | /* 4wire mode */ ++ MXC_AUDMUX_V2_PTCR_TCSEL(3) | ++ MXC_AUDMUX_V2_PTCR_TCLKDIR, /* clock is output */ ++ MXC_AUDMUX_V2_PDCR_RXDSEL(3)); ++ + platform_add_devices(devices, ARRAY_SIZE(devices)); + + mxc_register_device(&mxc_uart_device0, &uart_pdata); + + mxc_register_device(&mxc_uart_device1, &uart_pdata); ++ mxc_register_device(&imx_ssi_device0, &pcm043_ssi_pdata); + + #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE + i2c_register_board_info(0, pcm043_i2c_devices, +@@ -232,6 +333,7 @@ static void __init mxc_board_init(void) + + static void __init pcm043_timer_init(void) + { ++ printk("mx35_clocks_init()\n"); + mx35_clocks_init(); + } + +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0018-mxc_nand-remove-TROP_US_DELAY.patch b/recipes/linux/linux-2.6.31/pcm043/0018-mxc_nand-remove-TROP_US_DELAY.patch new file mode 100644 index 0000000000..9d8d26654b --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0018-mxc_nand-remove-TROP_US_DELAY.patch @@ -0,0 +1,88 @@ +From 55f91a40d858b579960bb9d3e29d8339b7210be2 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 21 Oct 2009 16:01:02 +0200 +Subject: [PATCH] mxc_nand: remove TROP_US_DELAY + +wait_op_done is only called with the same timeout, so +code the timeout into the function itself. + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 17 +++++++---------- + 1 files changed, 7 insertions(+), 10 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index 3fdc172..dd80e88 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -118,9 +118,6 @@ struct mxc_nand_host { + int spare_len; + }; + +-/* Define delays in microsec for NAND device operations */ +-#define TROP_US_DELAY 2000 +- + /* OOB placement block for use with hardware ecc generation */ + static struct nand_ecclayout nandv1_hw_eccoob_smallpage = { + .eccbytes = 5, +@@ -185,10 +182,10 @@ static irqreturn_t mxc_nfc_irq(int irq, void *dev_id) + /* This function polls the NANDFC to wait for the basic operation to + * complete by checking the INT bit of config2 register. + */ +-static void wait_op_done(struct mxc_nand_host *host, int max_retries, +- int useirq) ++static void wait_op_done(struct mxc_nand_host *host, int useirq) + { + uint32_t tmp; ++ int max_retries = 2000; + + if (useirq) { + if ((readw(host->regs + NFC_CONFIG2) & NFC_INT) == 0) { +@@ -230,7 +227,7 @@ static void send_cmd(struct mxc_nand_host *host, uint16_t cmd, int useirq) + writew(NFC_CMD, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, useirq); ++ wait_op_done(host, useirq); + } + + /* This function sends an address (or partial address) to the +@@ -244,7 +241,7 @@ static void send_addr(struct mxc_nand_host *host, uint16_t addr, int islast) + writew(NFC_ADDR, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, islast); ++ wait_op_done(host, islast); + } + + static void send_page(struct mtd_info *mtd, unsigned int ops) +@@ -266,7 +263,7 @@ static void send_page(struct mtd_info *mtd, unsigned int ops) + writew(ops, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, true); ++ wait_op_done(host, true); + } + } + +@@ -281,7 +278,7 @@ static void send_read_id(struct mxc_nand_host *host) + writew(NFC_ID, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, true); ++ wait_op_done(host, true); + + if (this->options & NAND_BUSWIDTH_16) { + void __iomem *main_buf = host->main_area0; +@@ -313,7 +310,7 @@ static uint16_t get_dev_status(struct mxc_nand_host *host) + writew(NFC_STATUS, host->regs + NFC_CONFIG2); + + /* Wait for operation to complete */ +- wait_op_done(host, TROP_US_DELAY, true); ++ wait_op_done(host, true); + + /* Status is placed in first word of main buffer */ + /* get status, then recovery area 1 data */ +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0018-pcm038-Add-SPI-MC13783-support.patch b/recipes/linux/linux-2.6.31/pcm043/0018-pcm038-Add-SPI-MC13783-support.patch new file mode 100644 index 0000000000..447936a87a --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0018-pcm038-Add-SPI-MC13783-support.patch @@ -0,0 +1,146 @@ +From d29530587128ca197998d1b02a3e9e3286cf98e1 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 24 Sep 2009 10:01:53 +0200 +Subject: [PATCH 18/28] pcm038: Add SPI/MC13783 support + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx2/pcm038.c | 94 +++++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 92 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c +index a4628d0..b3a8ed8 100644 +--- a/arch/arm/mach-mx2/pcm038.c ++++ b/arch/arm/mach-mx2/pcm038.c +@@ -23,6 +23,10 @@ + #include + #include + #include ++#include ++#include ++#include ++#include + + #include + #include +@@ -35,6 +39,7 @@ + #include + #include + #include ++#include + + #include "devices.h" + +@@ -78,8 +83,6 @@ static int pcm038_pins[] = { + PC6_PF_I2C2_SCL, + /* SPI1 */ + PD25_PF_CSPI1_RDY, +- PD27_PF_CSPI1_SS1, +- PD28_PF_CSPI1_SS0, + PD29_PF_CSPI1_SCLK, + PD30_PF_CSPI1_MISO, + PD31_PF_CSPI1_MOSI, +@@ -200,6 +203,86 @@ static struct i2c_board_info pcm038_i2c_devices[] = { + } + }; + ++static int pcm038_spi_cs[] = {GPIO_PORTD + 28}; ++ ++static struct spi_imx_master pcm038_spi_0_data = { ++ .chipselect = pcm038_spi_cs, ++ .num_chipselect = ARRAY_SIZE(pcm038_spi_cs), ++}; ++ ++static struct regulator_consumer_supply sdhc1_consumers[] = { ++ { ++ .dev = &mxc_sdhc_device1.dev, ++ .supply = "sdhc_vcc", ++ }, ++}; ++ ++static struct regulator_init_data sdhc1_data = { ++ .constraints = { ++ .min_uV = 3000000, ++ .max_uV = 3400000, ++ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ++ REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL | ++ REGULATOR_MODE_FAST, ++ .always_on = 0, ++ .boot_on = 0, ++ }, ++ .num_consumer_supplies = ARRAY_SIZE(sdhc1_consumers), ++ .consumer_supplies = sdhc1_consumers, ++}; ++ ++static struct regulator_consumer_supply cam_consumers[] = { ++ { ++ .dev = NULL, ++ .supply = "imx_cam_vcc", ++ }, ++}; ++ ++static struct regulator_init_data cam_data = { ++ .constraints = { ++ .min_uV = 3000000, ++ .max_uV = 3400000, ++ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ++ REGULATOR_CHANGE_MODE | REGULATOR_CHANGE_STATUS, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL | ++ REGULATOR_MODE_FAST, ++ .always_on = 0, ++ .boot_on = 0, ++ }, ++ .num_consumer_supplies = ARRAY_SIZE(cam_consumers), ++ .consumer_supplies = cam_consumers, ++}; ++ ++struct mc13783_regulator_init_data pcm038_regulators[] = { ++ { ++ .id = MC13783_REGU_VCAM, ++ .init_data = &cam_data, ++ }, { ++ .id = MC13783_REGU_VMMC1, ++ .init_data = &sdhc1_data, ++ }, ++}; ++ ++static struct mc13783_platform_data pcm038_pmic = { ++ .regulators = pcm038_regulators, ++ .num_regulators = ARRAY_SIZE(pcm038_regulators), ++ .flags = MC13783_USE_ADC | MC13783_USE_REGULATOR | ++ MC13783_USE_TOUCHSCREEN, ++}; ++ ++static struct spi_board_info pcm038_spi_board_info[] __initdata = { ++ { ++ .modalias = "mc13783", ++ .irq = IRQ_GPIOB(23), ++ .max_speed_hz = 300000, ++ .bus_num = 0, ++ .chip_select = 0, ++ .platform_data = &pcm038_pmic, ++ .mode = SPI_CS_HIGH, ++ } ++}; ++ + static void __init pcm038_init(void) + { + mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), +@@ -220,6 +303,13 @@ static void __init pcm038_init(void) + + mxc_register_device(&mxc_i2c_device1, &pcm038_i2c_1_data); + ++ /* MC13783 IRQ */ ++ mxc_gpio_mode(GPIO_PORTB | 23 | GPIO_GPIO | GPIO_IN); ++ ++ mxc_register_device(&mxc_spi_device0, &pcm038_spi_0_data); ++ spi_register_board_info(pcm038_spi_board_info, ++ ARRAY_SIZE(pcm038_spi_board_info)); ++ + platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); + + #ifdef CONFIG_MACH_PCM970_BASEBOARD +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0019-mx27-add-support-for-phytec-pca100-phyCARD-s-board.patch b/recipes/linux/linux-2.6.31/pcm043/0019-mx27-add-support-for-phytec-pca100-phyCARD-s-board.patch new file mode 100644 index 0000000000..fbada0b075 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0019-mx27-add-support-for-phytec-pca100-phyCARD-s-board.patch @@ -0,0 +1,293 @@ +From 11082d5306315626cb67dc73b13c95baefd6bc9c Mon Sep 17 00:00:00 2001 +From: Luotao Fu +Date: Thu, 6 Aug 2009 11:19:39 +0200 +Subject: [PATCH 19/28] mx27: add support for phytec pca100 (phyCARD-s) board + +Signed-off-by: Luotao Fu +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx2/Kconfig | 7 ++ + arch/arm/mach-mx2/Makefile | 2 +- + arch/arm/mach-mx2/pca100.c | 244 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 252 insertions(+), 1 deletions(-) + create mode 100644 arch/arm/mach-mx2/pca100.c + +diff --git a/arch/arm/mach-mx2/Kconfig b/arch/arm/mach-mx2/Kconfig +index 0d08c34..69e2a9b 100644 +--- a/arch/arm/mach-mx2/Kconfig ++++ b/arch/arm/mach-mx2/Kconfig +@@ -69,4 +69,11 @@ config MACH_MX27LITE + Include support for MX27 LITEKIT platform. This includes specific + configurations for the board and its peripherals. + ++config MACH_PCA100 ++ bool "Phytec phyCARD-s (pca100)" ++ depends on MACH_MX27 ++ help ++ Include support for phyCARD-s (aka pca100) platform. This ++ includes specific configurations for the module and its peripherals. ++ + endif +diff --git a/arch/arm/mach-mx2/Makefile b/arch/arm/mach-mx2/Makefile +index b9b1cca..046c115 100644 +--- a/arch/arm/mach-mx2/Makefile ++++ b/arch/arm/mach-mx2/Makefile +@@ -17,4 +17,4 @@ obj-$(CONFIG_MACH_PCM038) += pcm038.o + obj-$(CONFIG_MACH_PCM970_BASEBOARD) += pcm970-baseboard.o + obj-$(CONFIG_MACH_MX27_3DS) += mx27pdk.o + obj-$(CONFIG_MACH_MX27LITE) += mx27lite.o +- ++obj-$(CONFIG_MACH_PCA100) += pca100.o +diff --git a/arch/arm/mach-mx2/pca100.c b/arch/arm/mach-mx2/pca100.c +new file mode 100644 +index 0000000..fe5b165 +--- /dev/null ++++ b/arch/arm/mach-mx2/pca100.c +@@ -0,0 +1,244 @@ ++/* ++ * Copyright 2007 Robert Schwebel , Pengutronix ++ * Copyright (C) 2009 Sascha Hauer (kernel@pengutronix.de) ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License ++ * as published by the Free Software Foundation; either version 2 ++ * of the License, or (at your option) any later version. ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, ++ * MA 02110-1301, USA. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) ++#include ++#endif ++#include ++#include ++#include ++#include ++ ++#include "devices.h" ++ ++static int pca100_pins[] = { ++ /* UART1 */ ++ PE12_PF_UART1_TXD, ++ PE13_PF_UART1_RXD, ++ PE14_PF_UART1_CTS, ++ PE15_PF_UART1_RTS, ++ /* SDHC */ ++ PB4_PF_SD2_D0, ++ PB5_PF_SD2_D1, ++ PB6_PF_SD2_D2, ++ PB7_PF_SD2_D3, ++ PB8_PF_SD2_CMD, ++ PB9_PF_SD2_CLK, ++ /* FEC */ ++ PD0_AIN_FEC_TXD0, ++ PD1_AIN_FEC_TXD1, ++ PD2_AIN_FEC_TXD2, ++ PD3_AIN_FEC_TXD3, ++ PD4_AOUT_FEC_RX_ER, ++ PD5_AOUT_FEC_RXD1, ++ PD6_AOUT_FEC_RXD2, ++ PD7_AOUT_FEC_RXD3, ++ PD8_AF_FEC_MDIO, ++ PD9_AIN_FEC_MDC, ++ PD10_AOUT_FEC_CRS, ++ PD11_AOUT_FEC_TX_CLK, ++ PD12_AOUT_FEC_RXD0, ++ PD13_AOUT_FEC_RX_DV, ++ PD14_AOUT_FEC_RX_CLK, ++ PD15_AOUT_FEC_COL, ++ PD16_AIN_FEC_TX_ER, ++ PF23_AIN_FEC_TX_EN, ++ /* SSI1 */ ++ PC20_PF_SSI1_FS, ++ PC21_PF_SSI1_RXD, ++ PC22_PF_SSI1_TXD, ++ PC23_PF_SSI1_CLK, ++ /* onboard I2C */ ++ PC5_PF_I2C2_SDA, ++ PC6_PF_I2C2_SCL, ++ /* external I2C */ ++ PD17_PF_I2C_DATA, ++ PD18_PF_I2C_CLK, ++ /* SPI1 */ ++ PD25_PF_CSPI1_RDY, ++ PD29_PF_CSPI1_SCLK, ++ PD30_PF_CSPI1_MISO, ++ PD31_PF_CSPI1_MOSI, ++}; ++ ++static struct imxuart_platform_data uart_pdata = { ++ .flags = IMXUART_HAVE_RTSCTS, ++}; ++ ++static struct mxc_nand_platform_data pca100_nand_board_info = { ++ .width = 1, ++ .hw_ecc = 1, ++}; ++ ++static struct platform_device *platform_devices[] __initdata = { ++ &mxc_w1_master_device, ++ &mxc_fec_device, ++}; ++ ++static struct imxi2c_platform_data pca100_i2c_1_data = { ++ .bitrate = 100000, ++}; ++ ++static struct at24_platform_data board_eeprom = { ++ .byte_len = 4096, ++ .page_size = 32, ++ .flags = AT24_FLAG_ADDR16, ++}; ++ ++static struct i2c_board_info pca100_i2c_devices[] = { ++ { ++ I2C_BOARD_INFO("at24", 0x52), /* E0=0, E1=1, E2=0 */ ++ .platform_data = &board_eeprom, ++ }, { ++ I2C_BOARD_INFO("rtc-pcf8563", 0x51), ++ .type = "pcf8563" ++ }, { ++ I2C_BOARD_INFO("lm75", 0x4a), ++ .type = "lm75" ++ } ++}; ++ ++#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) ++static struct spi_eeprom at25320 = { ++ .name = "at25320an", ++ .byte_len = 4096, ++ .page_size = 32, ++ .flags = EE_ADDR2, ++}; ++ ++static struct spi_board_info pca100_spi_board_info[] __initdata = { ++ { ++ .modalias = "at25", ++ .max_speed_hz = 30000, ++ .bus_num = 0, ++ .chip_select = 1, ++ .platform_data = &at25320, ++ }, ++}; ++ ++static int pca100_spi_cs[] = {GPIO_PORTD + 28, GPIO_PORTD + 27}; ++ ++static struct spi_imx_master pca100_spi_0_data = { ++ .chipselect = pca100_spi_cs, ++ .num_chipselect = ARRAY_SIZE(pca100_spi_cs), ++}; ++#endif ++ ++static int pca100_sdhc2_init(struct device *dev, irq_handler_t detect_irq, ++ void *data) ++{ ++ int ret; ++ ++ ret = request_irq(IRQ_GPIOC(29), detect_irq, ++ IRQF_DISABLED | IRQF_TRIGGER_FALLING, ++ "imx-mmc-detect", data); ++ if (ret) ++ printk(KERN_ERR ++ "pca100: Failed to reuest irq for sd/mmc detection\n"); ++ ++ return ret; ++} ++ ++static void pca100_sdhc2_exit(struct device *dev, void *data) ++{ ++ free_irq(IRQ_GPIOC(29), data); ++} ++ ++static struct imxmmc_platform_data sdhc_pdata = { ++ .init = pca100_sdhc2_init, ++ .exit = pca100_sdhc2_exit, ++}; ++ ++static void __init pca100_init(void) ++{ ++ int ret; ++ ++ ret = mxc_gpio_setup_multiple_pins(pca100_pins, ++ ARRAY_SIZE(pca100_pins), "PCA100"); ++ if (ret) ++ printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); ++ ++ mxc_register_device(&mxc_uart_device0, &uart_pdata); ++ ++ mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN); ++ mxc_register_device(&mxc_sdhc_device1, &sdhc_pdata); ++ ++ mxc_register_device(&mxc_nand_device, &pca100_nand_board_info); ++ ++ /* only the i2c master 1 is used on this CPU card */ ++ i2c_register_board_info(1, pca100_i2c_devices, ++ ARRAY_SIZE(pca100_i2c_devices)); ++ ++ mxc_register_device(&mxc_i2c_device1, &pca100_i2c_1_data); ++ ++ mxc_gpio_mode(GPIO_PORTD | 28 | GPIO_GPIO | GPIO_OUT); ++ mxc_gpio_mode(GPIO_PORTD | 27 | GPIO_GPIO | GPIO_OUT); ++ ++ /* GPIO0_IRQ */ ++ mxc_gpio_mode(GPIO_PORTC | 31 | GPIO_GPIO | GPIO_IN); ++ /* GPIO1_IRQ */ ++ mxc_gpio_mode(GPIO_PORTC | 25 | GPIO_GPIO | GPIO_IN); ++ /* GPIO2_IRQ */ ++ mxc_gpio_mode(GPIO_PORTE | 5 | GPIO_GPIO | GPIO_IN); ++ ++#if defined(CONFIG_SPI_IMX) || defined(CONFIG_SPI_IMX_MODULE) ++ spi_register_board_info(pca100_spi_board_info, ++ ARRAY_SIZE(pca100_spi_board_info)); ++ mxc_register_device(&mxc_spi_device0, &pca100_spi_0_data); ++#endif ++ ++ platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices)); ++} ++ ++static void __init pca100_timer_init(void) ++{ ++ mx27_clocks_init(26000000); ++} ++ ++static struct sys_timer pca100_timer = { ++ .init = pca100_timer_init, ++}; ++ ++MACHINE_START(PCA100, "phyCARD-i.MX27") ++ .phys_io = AIPI_BASE_ADDR, ++ .io_pg_offst = ((AIPI_BASE_ADDR_VIRT) >> 18) & 0xfffc, ++ .boot_params = PHYS_OFFSET + 0x100, ++ .map_io = mx27_map_io, ++ .init_irq = mxc_init_irq, ++ .init_machine = pca100_init, ++ .timer = &pca100_timer, ++MACHINE_END ++ +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0019-mxc_nand-use-DRIVER_NAME-where-appropriate.patch b/recipes/linux/linux-2.6.31/pcm043/0019-mxc_nand-use-DRIVER_NAME-where-appropriate.patch new file mode 100644 index 0000000000..919ea3c7c8 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0019-mxc_nand-use-DRIVER_NAME-where-appropriate.patch @@ -0,0 +1,35 @@ +From b3fc73608b3fee8aa3dbccf4826fe21ffa69850b Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 21 Oct 2009 16:06:27 +0200 +Subject: [PATCH] mxc_nand: use DRIVER_NAME where appropriate + +Signed-off-by: Sascha Hauer +--- + drivers/mtd/nand/mxc_nand.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c +index dd80e88..d5445cd 100644 +--- a/drivers/mtd/nand/mxc_nand.c ++++ b/drivers/mtd/nand/mxc_nand.c +@@ -698,7 +698,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) + mtd->priv = this; + mtd->owner = THIS_MODULE; + mtd->dev.parent = &pdev->dev; +- mtd->name = "mxc_nand"; ++ mtd->name = DRIVER_NAME; + + /* 50 us command delay time */ + this->chip_delay = 5; +@@ -762,7 +762,7 @@ static int __init mxcnd_probe(struct platform_device *pdev) + + host->irq = platform_get_irq(pdev, 0); + +- err = request_irq(host->irq, mxc_nfc_irq, 0, "mxc_nd", host); ++ err = request_irq(host->irq, mxc_nfc_irq, 0, DRIVER_NAME, host); + if (err) + goto eirq; + +-- +1.6.0.4 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0020-MX2-Add-SPI-devices-resources.patch b/recipes/linux/linux-2.6.31/pcm043/0020-MX2-Add-SPI-devices-resources.patch new file mode 100644 index 0000000000..45142f7131 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0020-MX2-Add-SPI-devices-resources.patch @@ -0,0 +1,92 @@ +From 0e60c1eae435eee1188d751f29802ce1cce61021 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 19 Dec 2008 14:32:14 +0100 +Subject: [PATCH 20/28] MX2: Add SPI devices/resources + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx2/devices.c | 68 +++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 68 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-mx2/devices.c b/arch/arm/mach-mx2/devices.c +index f877baa..39cd74f 100644 +--- a/arch/arm/mach-mx2/devices.c ++++ b/arch/arm/mach-mx2/devices.c +@@ -64,6 +64,74 @@ struct platform_device mxc_irda_device = { + }; + + /* ++ * SPI master controller ++ * ++ * - i.MX1: 2 channel (slighly different register setting) ++ * - i.MX21: 2 channel ++ * - i.MX27: 3 channel ++ */ ++static struct resource mxc_spi_resources0[] = { ++ { ++ .start = CSPI1_BASE_ADDR, ++ .end = CSPI1_BASE_ADDR + SZ_4K - 1, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MXC_INT_CSPI1, ++ .end = MXC_INT_CSPI1, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++static struct resource mxc_spi_resources1[] = { ++ { ++ .start = CSPI2_BASE_ADDR, ++ .end = CSPI2_BASE_ADDR + SZ_4K - 1, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MXC_INT_CSPI2, ++ .end = MXC_INT_CSPI2, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++#ifdef CONFIG_MACH_MX27 ++static struct resource mxc_spi_resources2[] = { ++ { ++ .start = CSPI3_BASE_ADDR, ++ .end = CSPI3_BASE_ADDR + SZ_4K - 1, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MXC_INT_CSPI3, ++ .end = MXC_INT_CSPI3, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++#endif ++ ++struct platform_device mxc_spi_device0 = { ++ .name = "spi_imx", ++ .id = 0, ++ .num_resources = ARRAY_SIZE(mxc_spi_resources0), ++ .resource = mxc_spi_resources0, ++}; ++ ++struct platform_device mxc_spi_device1 = { ++ .name = "spi_imx", ++ .id = 1, ++ .num_resources = ARRAY_SIZE(mxc_spi_resources1), ++ .resource = mxc_spi_resources1, ++}; ++ ++#ifdef CONFIG_MACH_MX27 ++struct platform_device mxc_spi_device2 = { ++ .name = "spi_imx", ++ .id = 2, ++ .num_resources = ARRAY_SIZE(mxc_spi_resources2), ++ .resource = mxc_spi_resources2, ++}; ++#endif ++ ++/* + * General Purpose Timer + * - i.MX1: 2 timer (slighly different register handling) + * - i.MX21: 3 timer +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0021-Early-printk.patch b/recipes/linux/linux-2.6.31/pcm043/0021-Early-printk.patch new file mode 100644 index 0000000000..24f2264588 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0021-Early-printk.patch @@ -0,0 +1,106 @@ +From 286132d92272ffb0ae06ec3ecbe0cb3cfbd611c3 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 29 Jan 2009 16:39:15 +0100 +Subject: [PATCH 021/101] Early printk + +Hi, + +Below is a patch which I have in my repository for some time now. It +adds an early console using the printch function. Unlike the printk +patch this one does not require patching the kernel and you do not get +duplicated kernel output lines. I don't know if this solution starts to +work at a later point than the printk patch, but it has proven useful in +several situations now. What do you think? + +Sascha + +commit 57242f4143c9ce48e3c49ddf3b206f780184991c +Author: Sascha Hauer +Date: Thu Jan 29 16:32:30 2009 +0100 + + [ARM] Add an early debug console + + Signed-off-by: Sascha Hauer + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + arch/arm/Kconfig.debug | 8 ++++++++ + arch/arm/kernel/Makefile | 1 + + arch/arm/kernel/early_printk.c | 38 ++++++++++++++++++++++++++++++++++++++ + 3 files changed, 47 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/kernel/early_printk.c + +Index: linux-2.6.31.6/arch/arm/Kconfig.debug +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/Kconfig.debug 2009-12-07 15:58:21.683889680 +0100 ++++ linux-2.6.31.6/arch/arm/Kconfig.debug 2009-12-07 16:00:33.757198435 +0100 +@@ -70,6 +70,14 @@ + in the kernel. This is helpful if you are debugging code that + executes before the console is initialized. + ++config DEBUG_LL_CONSOLE ++ bool "Kernel early console" ++ depends on DEBUG_LL ++ help ++ Say Y here if you want to have an early console using the Kernel ++ low-level debugging functions. Add earlyprintk to your kernel ++ parameters to enable this console. ++ + config DEBUG_ICEDCC + bool "Kernel low-level debugging via EmbeddedICE DCC channel" + depends on DEBUG_LL +Index: linux-2.6.31.6/arch/arm/kernel/Makefile +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/kernel/Makefile 2009-12-07 15:58:21.673849262 +0100 ++++ linux-2.6.31.6/arch/arm/kernel/Makefile 2009-12-07 16:00:33.757198435 +0100 +@@ -49,5 +49,6 @@ + + head-y := head$(MMUEXT).o + obj-$(CONFIG_DEBUG_LL) += debug.o ++obj-$(CONFIG_DEBUG_LL_CONSOLE) += early_printk.o + + extra-y := $(head-y) init_task.o vmlinux.lds +Index: linux-2.6.31.6/arch/arm/kernel/early_printk.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.31.6/arch/arm/kernel/early_printk.c 2009-12-07 16:00:33.757198435 +0100 +@@ -0,0 +1,38 @@ ++/* ++ * linux/arch/arm/kernel/early_printk.c ++ * ++ * Copyright (C) 2009 Sascha Hauer ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++#include ++#include ++ ++extern void printch(int); ++ ++static void early_serial_write(struct console *con, const char *s, unsigned n) ++{ ++ while (*s && n-- > 0) { ++ if (*s == '\n') ++ printch('\r'); ++ printch(*s); ++ s++; ++ } ++} ++ ++static struct console early_serial_console = { ++ .name = "earlyser", ++ .write = early_serial_write, ++ .flags = CON_PRINTBUFFER | CON_BOOT, ++ .index = -1, ++}; ++ ++static int __init setup_early_printk(char *buf) ++{ ++ register_console(&early_serial_console); ++ return 0; ++} ++ ++early_param("earlyprintk", setup_early_printk); diff --git a/recipes/linux/linux-2.6.31/pcm043/0021-mxc-mx1-mx2-DMA-add-a-possibility-to-create-an-endle.patch b/recipes/linux/linux-2.6.31/pcm043/0021-mxc-mx1-mx2-DMA-add-a-possibility-to-create-an-endle.patch new file mode 100644 index 0000000000..026d9d59bc --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0021-mxc-mx1-mx2-DMA-add-a-possibility-to-create-an-endle.patch @@ -0,0 +1,50 @@ +From 5e93e22102052940681b45b6e3ec5d037983e256 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 18 Nov 2009 15:21:44 +0100 +Subject: [PATCH 21/28] mxc: mx1/mx2 DMA: add a possibility to create an endless DMA transfer + +This is useful for audio where we do not want to setup a new scatterlist +after playing 4GB of audio data. This would cause skips in the playback. + +Signed-off-by: Sascha Hauer +--- + arch/arm/plat-mxc/dma-mx1-mx2.c | 3 ++- + arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h | 8 ++++++++ + 2 files changed, 10 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/plat-mxc/dma-mx1-mx2.c b/arch/arm/plat-mxc/dma-mx1-mx2.c +index 7764643..9c1b3f9 100644 +--- a/arch/arm/plat-mxc/dma-mx1-mx2.c ++++ b/arch/arm/plat-mxc/dma-mx1-mx2.c +@@ -156,7 +156,8 @@ static inline int imx_dma_sg_next(int channel, struct scatterlist *sg) + } + + now = min(imxdma->resbytes, sg->length); +- imxdma->resbytes -= now; ++ if (imxdma->resbytes != IMX_DMA_LENGTH_LOOP) ++ imxdma->resbytes -= now; + + if ((imxdma->dma_mode & DMA_MODE_MASK) == DMA_MODE_READ) + __raw_writel(sg->dma_address, DMA_BASE + DMA_DAR(channel)); +diff --git a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h +index b3876cc..07be8ad 100644 +--- a/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h ++++ b/arch/arm/plat-mxc/include/mach/dma-mx1-mx2.h +@@ -58,6 +58,14 @@ imx_dma_setup_single(int channel, dma_addr_t dma_address, + unsigned int dma_length, unsigned int dev_addr, + unsigned int dmamode); + ++ ++/* ++ * Use this flag as the dma_length argument to imx_dma_setup_sg() ++ * to create an endless running dma loop. The end of the scatterlist ++ * must be linked to the beginning for this to work. ++ */ ++#define IMX_DMA_LENGTH_LOOP ((unsigned int)-1) ++ + int + imx_dma_setup_sg(int channel, struct scatterlist *sg, + unsigned int sgcount, unsigned int dma_length, +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0022-ASoC-Allow-32-bit-registers-for-DAPM.patch b/recipes/linux/linux-2.6.31/pcm043/0022-ASoC-Allow-32-bit-registers-for-DAPM.patch new file mode 100644 index 0000000000..af342096e1 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0022-ASoC-Allow-32-bit-registers-for-DAPM.patch @@ -0,0 +1,203 @@ +From f3f4462475d2c86023f7d48c40359d925730ee1b Mon Sep 17 00:00:00 2001 +From: Daniel Ribeiro +Date: Sun, 7 Jun 2009 02:49:11 -0300 +Subject: [PATCH 22/28] ASoC: Allow 32 bit registers for DAPM + +Replace the remaining unsigned shorts with unsigned ints. +Tested with pcap2 codec (25 bits registers). + +Signed-off-by: Daniel Ribeiro +Signed-off-by: Mark Brown +--- + include/sound/soc.h | 4 ++-- + sound/soc/soc-core.c | 28 ++++++++++++++-------------- + sound/soc/soc-dapm.c | 16 ++++++++-------- + 3 files changed, 24 insertions(+), 24 deletions(-) + +diff --git a/include/sound/soc.h b/include/sound/soc.h +index cf6111d..a167b49 100644 +--- a/include/sound/soc.h ++++ b/include/sound/soc.h +@@ -216,9 +216,9 @@ void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count, + + /* codec register bit access */ + int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg, +- unsigned short mask, unsigned short value); ++ unsigned int mask, unsigned int value); + int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg, +- unsigned short mask, unsigned short value); ++ unsigned int mask, unsigned int value); + + int snd_soc_new_ac97_codec(struct snd_soc_codec *codec, + struct snd_ac97_bus_ops *ops, int num); +diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c +index 1d70829..9b88c74 100644 +--- a/sound/soc/soc-core.c ++++ b/sound/soc/soc-core.c +@@ -1264,10 +1264,10 @@ EXPORT_SYMBOL_GPL(snd_soc_free_ac97_codec); + * Returns 1 for change else 0. + */ + int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned short reg, +- unsigned short mask, unsigned short value) ++ unsigned int mask, unsigned int value) + { + int change; +- unsigned short old, new; ++ unsigned int old, new; + + mutex_lock(&io_mutex); + old = snd_soc_read(codec, reg); +@@ -1294,10 +1294,10 @@ EXPORT_SYMBOL_GPL(snd_soc_update_bits); + * Returns 1 for change else 0. + */ + int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned short reg, +- unsigned short mask, unsigned short value) ++ unsigned int mask, unsigned int value) + { + int change; +- unsigned short old, new; ++ unsigned int old, new; + + mutex_lock(&io_mutex); + old = snd_soc_read(codec, reg); +@@ -1586,7 +1586,7 @@ int snd_soc_get_enum_double(struct snd_kcontrol *kcontrol, + { + struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); + struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; +- unsigned short val, bitmask; ++ unsigned int val, bitmask; + + for (bitmask = 1; bitmask < e->max; bitmask <<= 1) + ; +@@ -1615,8 +1615,8 @@ int snd_soc_put_enum_double(struct snd_kcontrol *kcontrol, + { + struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); + struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; +- unsigned short val; +- unsigned short mask, bitmask; ++ unsigned int val; ++ unsigned int mask, bitmask; + + for (bitmask = 1; bitmask < e->max; bitmask <<= 1) + ; +@@ -1652,7 +1652,7 @@ int snd_soc_get_value_enum_double(struct snd_kcontrol *kcontrol, + { + struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); + struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; +- unsigned short reg_val, val, mux; ++ unsigned int reg_val, val, mux; + + reg_val = snd_soc_read(codec, e->reg); + val = (reg_val >> e->shift_l) & e->mask; +@@ -1691,8 +1691,8 @@ int snd_soc_put_value_enum_double(struct snd_kcontrol *kcontrol, + { + struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); + struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; +- unsigned short val; +- unsigned short mask; ++ unsigned int val; ++ unsigned int mask; + + if (ucontrol->value.enumerated.item[0] > e->max - 1) + return -EINVAL; +@@ -1852,7 +1852,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, + int max = mc->max; + unsigned int mask = (1 << fls(max)) - 1; + unsigned int invert = mc->invert; +- unsigned short val, val2, val_mask; ++ unsigned int val, val2, val_mask; + + val = (ucontrol->value.integer.value[0] & mask); + if (invert) +@@ -1918,7 +1918,7 @@ int snd_soc_get_volsw_2r(struct snd_kcontrol *kcontrol, + unsigned int reg2 = mc->rreg; + unsigned int shift = mc->shift; + int max = mc->max; +- unsigned int mask = (1<invert; + + ucontrol->value.integer.value[0] = +@@ -1958,7 +1958,7 @@ int snd_soc_put_volsw_2r(struct snd_kcontrol *kcontrol, + unsigned int mask = (1 << fls(max)) - 1; + unsigned int invert = mc->invert; + int err; +- unsigned short val, val2, val_mask; ++ unsigned int val, val2, val_mask; + + val_mask = mask << shift; + val = (ucontrol->value.integer.value[0] & mask); +@@ -2050,7 +2050,7 @@ int snd_soc_put_volsw_s8(struct snd_kcontrol *kcontrol, + struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); + unsigned int reg = mc->reg; + int min = mc->min; +- unsigned short val; ++ unsigned int val; + + val = (ucontrol->value.integer.value[0]+min) & 0xff; + val |= ((ucontrol->value.integer.value[1]+min) & 0xff) << 8; +diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c +index 21c6907..7ad8afa 100644 +--- a/sound/soc/soc-dapm.c ++++ b/sound/soc/soc-dapm.c +@@ -268,7 +268,7 @@ static int dapm_connect_mixer(struct snd_soc_codec *codec, + static int dapm_update_bits(struct snd_soc_dapm_widget *widget) + { + int change, power; +- unsigned short old, new; ++ unsigned int old, new; + struct snd_soc_codec *codec = widget->codec; + + /* check for valid widgets */ +@@ -1372,7 +1372,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol, + int max = mc->max; + unsigned int mask = (1 << fls(max)) - 1; + unsigned int invert = mc->invert; +- unsigned short val, val2, val_mask; ++ unsigned int val, val2, val_mask; + int ret; + + val = (ucontrol->value.integer.value[0] & mask); +@@ -1436,7 +1436,7 @@ int snd_soc_dapm_get_enum_double(struct snd_kcontrol *kcontrol, + { + struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); + struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; +- unsigned short val, bitmask; ++ unsigned int val, bitmask; + + for (bitmask = 1; bitmask < e->max; bitmask <<= 1) + ; +@@ -1464,8 +1464,8 @@ int snd_soc_dapm_put_enum_double(struct snd_kcontrol *kcontrol, + { + struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); + struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; +- unsigned short val, mux; +- unsigned short mask, bitmask; ++ unsigned int val, mux; ++ unsigned int mask, bitmask; + int ret = 0; + + for (bitmask = 1; bitmask < e->max; bitmask <<= 1) +@@ -1523,7 +1523,7 @@ int snd_soc_dapm_get_value_enum_double(struct snd_kcontrol *kcontrol, + { + struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); + struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; +- unsigned short reg_val, val, mux; ++ unsigned int reg_val, val, mux; + + reg_val = snd_soc_read(widget->codec, e->reg); + val = (reg_val >> e->shift_l) & e->mask; +@@ -1563,8 +1563,8 @@ int snd_soc_dapm_put_value_enum_double(struct snd_kcontrol *kcontrol, + { + struct snd_soc_dapm_widget *widget = snd_kcontrol_chip(kcontrol); + struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; +- unsigned short val, mux; +- unsigned short mask; ++ unsigned int val, mux; ++ unsigned int mask; + int ret = 0; + + if (ucontrol->value.enumerated.item[0] > e->max - 1) +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0023-pca100-add-sound-support.patch b/recipes/linux/linux-2.6.31/pcm043/0023-pca100-add-sound-support.patch new file mode 100644 index 0000000000..623d80ab31 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0023-pca100-add-sound-support.patch @@ -0,0 +1,99 @@ +From f58f54a10075e0ff2d952b9264ce880c1ecbf439 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 6 Nov 2009 15:29:58 +0100 +Subject: [PATCH 23/28] pca100: add sound support + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx2/pca100.c | 52 ++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 52 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-mx2/pca100.c b/arch/arm/mach-mx2/pca100.c +index fe5b165..e0a464d 100644 +--- a/arch/arm/mach-mx2/pca100.c ++++ b/arch/arm/mach-mx2/pca100.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -41,6 +42,8 @@ + #include + #include + #include ++#include ++#include + + #include "devices.h" + +@@ -182,15 +185,64 @@ static struct imxmmc_platform_data sdhc_pdata = { + .exit = pca100_sdhc2_exit, + }; + ++static void pca100_ac97_warm_reset(struct snd_ac97 *ac97) ++{ ++ printk("%s\n", __func__); ++ ++ mxc_gpio_mode(GPIO_PORTC | 20 | GPIO_GPIO | GPIO_OUT); ++ gpio_set_value(GPIO_PORTC + 20, 1); ++ udelay(2); ++ gpio_set_value(GPIO_PORTC + 20, 0); ++ mxc_gpio_mode(PC20_PF_SSI1_FS); ++ msleep(2); ++} ++ ++static void pca100_ac97_cold_reset(struct snd_ac97 *ac97) ++{ ++ printk("%s\n", __func__); ++ ++ mxc_gpio_mode(GPIO_PORTC | 20 | GPIO_GPIO | GPIO_OUT); /* FS */ ++ gpio_set_value(GPIO_PORTC + 20, 0); ++ mxc_gpio_mode(GPIO_PORTC | 22 | GPIO_GPIO | GPIO_OUT); /* TX */ ++ gpio_set_value(GPIO_PORTC + 22, 0); ++ mxc_gpio_mode(GPIO_PORTC | 28 | GPIO_GPIO | GPIO_OUT); /* reset */ ++ gpio_set_value(GPIO_PORTC + 28, 0); ++ udelay(10); ++ gpio_set_value(GPIO_PORTC + 28, 1); ++ mxc_gpio_mode(PC20_PF_SSI1_FS); ++ mxc_gpio_mode(PC22_PF_SSI1_TXD); ++ msleep(2); ++} ++ ++static struct imx_ssi_platform_data pca100_ssi_pdata = { ++ .ac97_reset = pca100_ac97_cold_reset, ++ .ac97_warm_reset = pca100_ac97_warm_reset, ++ .flags = IMX_SSI_USE_AC97, ++}; ++ + static void __init pca100_init(void) + { + int ret; + ++ /* SSI unit */ ++ mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, ++ MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ ++ MXC_AUDMUX_V1_PCR_TFCSEL(3) | ++ MXC_AUDMUX_V1_PCR_TCLKDIR | /* clock is output */ ++ MXC_AUDMUX_V1_PCR_RXDSEL(3)); ++ mxc_audmux_v1_configure_port(4, ++ MXC_AUDMUX_V1_PCR_SYN | /* 4wire mode */ ++ MXC_AUDMUX_V1_PCR_TFCSEL(0) | ++ MXC_AUDMUX_V1_PCR_TFSDIR | ++ MXC_AUDMUX_V1_PCR_RXDSEL(0)); ++ + ret = mxc_gpio_setup_multiple_pins(pca100_pins, + ARRAY_SIZE(pca100_pins), "PCA100"); + if (ret) + printk(KERN_ERR "pca100: Failed to setup pins (%d)\n", ret); + ++ mxc_register_device(&imx_ssi_device0, &pca100_ssi_pdata); ++ + mxc_register_device(&mxc_uart_device0, &uart_pdata); + + mxc_gpio_mode(GPIO_PORTC | 29 | GPIO_GPIO | GPIO_IN); +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0024-MX31-Clock-updates.patch b/recipes/linux/linux-2.6.31/pcm043/0024-MX31-Clock-updates.patch new file mode 100644 index 0000000000..9bb85dd53b --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0024-MX31-Clock-updates.patch @@ -0,0 +1,40 @@ +From f9a58060254e1c7d6d2bedf6044577aa61885ca3 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 20 Mar 2009 19:25:01 +0100 +Subject: [PATCH 024/101] MX31 Clock updates + +- register correct ehci clocks +- update spi clock names + +Signed-off-by: Sascha Hauer + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + arch/arm/mach-mx3/clock.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +Index: arch/arm/mach-mx3/clock.c +=================================================================== +--- arch/arm/mach-mx3/clock.c.orig 2009-12-07 15:20:31.943942228 +0100 ++++ arch/arm/mach-mx3/clock.c 2009-12-07 16:10:37.774566402 +0100 +@@ -523,7 +523,7 @@ + _REGISTER_CLOCK("spi_imx.2", NULL, cspi3_clk) + _REGISTER_CLOCK(NULL, "gpt", gpt_clk) + _REGISTER_CLOCK(NULL, "pwm", pwm_clk) +- _REGISTER_CLOCK(NULL, "wdog", wdog_clk) ++ _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) + _REGISTER_CLOCK(NULL, "rtc", rtc_clk) + _REGISTER_CLOCK(NULL, "epit", epit1_clk) + _REGISTER_CLOCK(NULL, "epit", epit2_clk) +@@ -531,6 +531,10 @@ + _REGISTER_CLOCK("ipu-core", NULL, ipu_clk) + _REGISTER_CLOCK("mx3_sdc_fb", NULL, ipu_clk) + _REGISTER_CLOCK(NULL, "kpp", kpp_clk) ++ /* FIXME: mxc-ehci now misses the secondary clock */ ++ _REGISTER_CLOCK("mxc-ehci.0", NULL, usb_clk1) ++ _REGISTER_CLOCK("mxc-ehci.1", NULL, usb_clk1) ++ _REGISTER_CLOCK("mxc-ehci.2", NULL, usb_clk1) + _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1) + _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2) + _REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk) diff --git a/recipes/linux/linux-2.6.31/pcm043/0024-pcm038-add-sound-support.patch b/recipes/linux/linux-2.6.31/pcm043/0024-pcm038-add-sound-support.patch new file mode 100644 index 0000000000..bebcb3af40 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0024-pcm038-add-sound-support.patch @@ -0,0 +1,72 @@ +From 76c72535c2ae04d10a52c1958add9a08b97a11be Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 6 Nov 2009 09:45:42 +0100 +Subject: [PATCH 24/28] pcm038: add sound support + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx2/pcm038.c | 23 ++++++++++++++++++++++- + 1 files changed, 22 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-mx2/pcm038.c b/arch/arm/mach-mx2/pcm038.c +index b3a8ed8..b0c38b9 100644 +--- a/arch/arm/mach-mx2/pcm038.c ++++ b/arch/arm/mach-mx2/pcm038.c +@@ -39,7 +39,9 @@ + #include + #include + #include ++#include + #include ++#include + + #include "devices.h" + +@@ -268,7 +270,7 @@ static struct mc13783_platform_data pcm038_pmic = { + .regulators = pcm038_regulators, + .num_regulators = ARRAY_SIZE(pcm038_regulators), + .flags = MC13783_USE_ADC | MC13783_USE_REGULATOR | +- MC13783_USE_TOUCHSCREEN, ++ MC13783_USE_TOUCHSCREEN | MC13783_USE_CODEC, + }; + + static struct spi_board_info pcm038_spi_board_info[] __initdata = { +@@ -283,16 +285,35 @@ static struct spi_board_info pcm038_spi_board_info[] __initdata = { + } + }; + ++struct imx_ssi_platform_data pcm038_ssi_pdata = { ++ .flags = IMX_SSI_DMA, ++}; ++ + static void __init pcm038_init(void) + { + mxc_gpio_setup_multiple_pins(pcm038_pins, ARRAY_SIZE(pcm038_pins), + "PCM038"); + ++ mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR1_SSI0, ++ MXC_AUDMUX_V1_PCR_TFSDIR | ++ MXC_AUDMUX_V1_PCR_TCLKDIR | ++ MXC_AUDMUX_V1_PCR_TFCSEL(MX27_AUDMUX_PPCR1_SSI_PINS_1) | ++ MXC_AUDMUX_V1_PCR_RFSDIR | ++ MXC_AUDMUX_V1_PCR_RCLKDIR | ++ MXC_AUDMUX_V1_PCR_RFCSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4) | ++ MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR3_SSI_PINS_4)); ++ mxc_audmux_v1_configure_port(MX27_AUDMUX_HPCR3_SSI_PINS_4, ++ MXC_AUDMUX_V1_PCR_RXDSEL(MX27_AUDMUX_HPCR1_SSI0)); ++ mxc_audmux_v1_configure_port(MX27_AUDMUX_PPCR1_SSI_PINS_1, ++ MXC_AUDMUX_V1_PCR_TFCSEL(MX27_AUDMUX_HPCR1_SSI0) | ++ MXC_AUDMUX_V1_PCR_RFCSEL(MX27_AUDMUX_HPCR1_SSI0)); ++ + pcm038_init_sram(); + + mxc_register_device(&mxc_uart_device0, &uart_pdata[0]); + mxc_register_device(&mxc_uart_device1, &uart_pdata[1]); + mxc_register_device(&mxc_uart_device2, &uart_pdata[2]); ++ mxc_register_device(&imx_ssi_device0, &pcm038_ssi_pdata); + + mxc_gpio_mode(PE16_AF_OWIRE); + mxc_register_device(&mxc_nand_device, &pcm038_nand_board_info); +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0025-pcm037-Add-sound-support.patch b/recipes/linux/linux-2.6.31/pcm043/0025-pcm037-Add-sound-support.patch new file mode 100644 index 0000000000..cba390ce85 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0025-pcm037-Add-sound-support.patch @@ -0,0 +1,144 @@ +From 8b4873639bb66d8269f0767ddfbb4c8a7f8082f7 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 12 Nov 2009 14:02:13 +0100 +Subject: [PATCH 25/28] pcm037: Add sound support + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx3/pcm037.c | 71 ++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 71 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-mx3/pcm037.c b/arch/arm/mach-mx3/pcm037.c +index 840cfda..8ef6c79 100644 +--- a/arch/arm/mach-mx3/pcm037.c ++++ b/arch/arm/mach-mx3/pcm037.c +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #include + +@@ -50,6 +51,9 @@ + #include + #include + #include ++#include ++#include ++#include + + #include "devices.h" + #include "pcm037.h" +@@ -123,6 +127,8 @@ static unsigned int pcm037_pins[] = { + MX31_PIN_CSPI3_SPI_RDY__CTS3, + /* LAN9217 irq pin */ + IOMUX_MODE(MX31_PIN_GPIO3_1, IOMUX_CONFIG_GPIO), ++ /* MC13783 IRQ pim */ ++ IOMUX_MODE(MX31_PIN_GPIO3_0, IOMUX_CONFIG_GPIO), + /* Onewire */ + MX31_PIN_BATT_LINE__OWIRE, + /* Framebuffer */ +@@ -169,6 +175,15 @@ static unsigned int pcm037_pins[] = { + MX31_PIN_CSI_MCLK__CSI_MCLK, + MX31_PIN_CSI_PIXCLK__CSI_PIXCLK, + MX31_PIN_CSI_VSYNC__CSI_VSYNC, ++ /* SSI */ ++ MX31_PIN_STXD4__STXD4, ++ MX31_PIN_SRXD4__SRXD4, ++ MX31_PIN_SCK4__SCK4, ++ MX31_PIN_SFS4__SFS4, ++ MX31_PIN_STXD5__STXD5, ++ MX31_PIN_SRXD5__SRXD5, ++ MX31_PIN_SCK5__SCK5, ++ MX31_PIN_SFS5__SFS5, + }; + + static struct physmap_flash_data pcm037_flash_data = { +@@ -406,6 +421,31 @@ static void pcm970_sdhc1_exit(struct device *dev, void *data) + gpio_free(SDHC1_GPIO_WP); + } + ++#ifdef CONFIG_SPI ++static struct mc13783_platform_data pcm037_pmic = { ++ .flags = MC13783_USE_ADC | MC13783_USE_TOUCHSCREEN | ++ MC13783_USE_CODEC, ++}; ++ ++static unsigned int pcm037_spi_cs[] = {MXC_SPI_CS(0), }; ++ ++static struct spi_imx_master pcm037_spi_0_data = { ++ .chipselect = pcm037_spi_cs, ++ .num_chipselect = ARRAY_SIZE(pcm037_spi_cs), ++}; ++ ++static struct spi_board_info pcm037_spi_board_info[] __initdata = { ++ { ++ .modalias = "mc13783", ++ .irq = IOMUX_TO_IRQ(MX31_PIN_GPIO3_0), ++ .max_speed_hz = 3000000, ++ .bus_num = 0, ++ .platform_data = &pcm037_pmic, ++ .chip_select = 0, ++ } ++}; ++#endif /* CONFIG_SPI */ ++ + static struct imxmmc_platform_data sdhc_pdata = { + #ifdef PCM970_SDHC_RW_SWITCH + .get_ro = pcm970_sdhc1_get_ro, +@@ -515,6 +555,9 @@ static struct mx3fb_platform_data mx3fb_pdata = { + .num_modes = ARRAY_SIZE(fb_modedb), + }; + ++struct imx_ssi_platform_data pcm037_ssi_pdata = { ++}; ++ + /* + * Board specific initialization. + */ +@@ -522,6 +565,26 @@ static void __init mxc_board_init(void) + { + int ret; + ++ mxc_audmux_v2_configure_port(MX31_AUDMUX_PORT1_SSI0, ++ MXC_AUDMUX_V2_PTCR_TFSDIR | ++ MXC_AUDMUX_V2_PTCR_TCLKDIR | ++ MXC_AUDMUX_V2_PTCR_TFSEL(MX31_AUDMUX_PORT4_SSI_PINS_4) | ++ MXC_AUDMUX_V2_PTCR_TCSEL(MX31_AUDMUX_PORT4_SSI_PINS_4) | ++ MXC_AUDMUX_V2_PTCR_RFSDIR | ++ MXC_AUDMUX_V2_PTCR_RCLKDIR | ++ MXC_AUDMUX_V2_PTCR_RFSEL(MX31_AUDMUX_PORT5_SSI_PINS_5) | ++ MXC_AUDMUX_V2_PTCR_RCSEL(MX31_AUDMUX_PORT5_SSI_PINS_5), ++ MXC_AUDMUX_V2_PDCR_RXDSEL(MX31_AUDMUX_PORT5_SSI_PINS_5)); ++ mxc_audmux_v2_configure_port(MX31_AUDMUX_PORT5_SSI_PINS_5, ++ 0, ++ MXC_AUDMUX_V2_PDCR_RXDSEL(MX31_AUDMUX_PORT1_SSI0)); ++ mxc_audmux_v2_configure_port(MX31_AUDMUX_PORT4_SSI_PINS_4, ++ MXC_AUDMUX_V2_PTCR_TFSEL(MX31_AUDMUX_PORT1_SSI0) | ++ MXC_AUDMUX_V2_PTCR_TCSEL(MX31_AUDMUX_PORT1_SSI0) | ++ MXC_AUDMUX_V2_PTCR_RFSEL(MX31_AUDMUX_PORT1_SSI0) | ++ MXC_AUDMUX_V2_PTCR_RCSEL(MX31_AUDMUX_PORT1_SSI0), ++ 0); ++ + mxc_iomux_setup_multiple_pins(pcm037_pins, ARRAY_SIZE(pcm037_pins), + "pcm037"); + +@@ -575,6 +638,14 @@ static void __init mxc_board_init(void) + + if (!pcm037_camera_alloc_dma(4 * 1024 * 1024)) + mxc_register_device(&mx3_camera, &camera_pdata); ++ ++#ifdef CONFIG_SPI ++ mxc_register_device(&imx_spi_device0, &pcm037_spi_0_data); ++ ++ spi_register_board_info(pcm037_spi_board_info, ++ ARRAY_SIZE(pcm037_spi_board_info)); ++#endif ++ mxc_register_device(&imx_ssi_device0, &pcm037_ssi_pdata); + } + + static void __init pcm037_timer_init(void) +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0026-imx-ssi-Fix-AC97-rates.patch b/recipes/linux/linux-2.6.31/pcm043/0026-imx-ssi-Fix-AC97-rates.patch new file mode 100644 index 0000000000..53b1a60131 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0026-imx-ssi-Fix-AC97-rates.patch @@ -0,0 +1,37 @@ +From da230ac4c6dce39cc85b95a08bceec2976288419 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 27 Nov 2009 16:28:59 +0100 +Subject: [PATCH 26/28] imx-ssi: Fix AC97 rates + +Signed-off-by: Sascha Hauer +--- + sound/soc/imx/imx-ssi.c | 6 +++++- + 1 files changed, 5 insertions(+), 1 deletions(-) + +diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c +index 9823425..6219df9 100644 +--- a/sound/soc/imx/imx-ssi.c ++++ b/sound/soc/imx/imx-ssi.c +@@ -453,6 +453,10 @@ struct snd_soc_platform imx_soc_platform = { + }; + EXPORT_SYMBOL_GPL(imx_soc_platform); + ++#define IMX_AC97_RATES (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_11025 |\ ++ SNDRV_PCM_RATE_16000 | SNDRV_PCM_RATE_22050 | \ ++ SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000) ++ + static struct snd_soc_dai imx_ac97_dai = { + .name = "AC97", + .ac97_control = 1, +@@ -460,7 +464,7 @@ static struct snd_soc_dai imx_ac97_dai = { + .stream_name = "AC97 Playback", + .channels_min = 2, + .channels_max = 2, +- .rates = SND_SOC_STD_AC97_FMTS, ++ .rates = IMX_AC97_RATES, + .formats = SNDRV_PCM_FMTBIT_S16_LE, + }, + .capture = { +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0027-Add-EHCI-support-for-MX27-and-MX31-based-boards.patch b/recipes/linux/linux-2.6.31/pcm043/0027-Add-EHCI-support-for-MX27-and-MX31-based-boards.patch new file mode 100644 index 0000000000..1c60690b89 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0027-Add-EHCI-support-for-MX27-and-MX31-based-boards.patch @@ -0,0 +1,347 @@ +From ce297d614ab56284823043e1743200388d9f466f Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Mon, 9 Mar 2009 12:29:23 +0100 +Subject: [PATCH 027/101] Add EHCI support for MX27 and MX31 based boards + +The Freescale MX27 and MX31 SoCs have a EHCI controller onboard. +The controller is capable of USB on the go. This patch adds +support for the host controller only. + +The USB OTG core used here is the ARC core, so the driver should +be renamed. + +Signed-off-by: Sascha Hauer + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + arch/arm/plat-mxc/include/mach/mxc_ehci.h | 9 + + drivers/usb/Kconfig | 1 + + drivers/usb/host/Kconfig | 7 + + drivers/usb/host/ehci-hcd.c | 5 + + drivers/usb/host/ehci-mxc.c | 256 +++++++++++++++++++++++++++++ + 5 files changed, 278 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/plat-mxc/include/mach/mxc_ehci.h + create mode 100644 drivers/usb/host/ehci-mxc.c + +Index: linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mxc_ehci.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mxc_ehci.h 2009-12-10 11:40:43.315272374 +0100 +@@ -0,0 +1,9 @@ ++#ifndef __INCLUDE_ASM_ARCH_MXC_EHCI_H ++#define __INCLUDE_ASM_ARCH_MXC_EHCI_H ++ ++struct mxc_usbh_platform_data { ++ int (*init)(struct platform_device *pdev); ++ int (*exit)(struct platform_device *pdev); ++}; ++#endif /* __INCLUDE_ASM_ARCH_MXC_EHCI_H */ ++ +Index: linux-2.6.31.6/drivers/usb/Kconfig +=================================================================== +--- linux-2.6.31.6.orig/drivers/usb/Kconfig 2009-11-10 01:32:31.000000000 +0100 ++++ linux-2.6.31.6/drivers/usb/Kconfig 2009-12-10 11:40:43.315272374 +0100 +@@ -58,6 +58,7 @@ + default y if PPC_83xx + default y if SOC_AU1200 + default y if ARCH_IXP4XX ++ default y if ARCH_MXC + default PCI + + # ARM SA1111 chips have a non-PCI based "OHCI-compatible" USB host interface. +Index: linux-2.6.31.6/drivers/usb/host/Kconfig +=================================================================== +--- linux-2.6.31.6.orig/drivers/usb/host/Kconfig 2009-11-10 01:32:31.000000000 +0100 ++++ linux-2.6.31.6/drivers/usb/host/Kconfig 2009-12-10 11:40:43.315272374 +0100 +@@ -105,6 +105,13 @@ + ---help--- + Variation of ARC USB block used in some Freescale chips. + ++config USB_EHCI_MXC ++ bool "Support for Freescale on-chip EHCI USB controller" ++ depends on USB_EHCI_HCD && ARCH_MXC ++ select USB_EHCI_ROOT_HUB_TT ++ ---help--- ++ Variation of ARC USB block used in some Freescale chips. ++ + config USB_EHCI_HCD_PPC_OF + bool "EHCI support for PPC USB controller on OF platform bus" + depends on USB_EHCI_HCD && PPC_OF +Index: linux-2.6.31.6/drivers/usb/host/ehci-hcd.c +=================================================================== +--- linux-2.6.31.6.orig/drivers/usb/host/ehci-hcd.c 2009-11-10 01:32:31.000000000 +0100 ++++ linux-2.6.31.6/drivers/usb/host/ehci-hcd.c 2009-12-10 11:40:43.315272374 +0100 +@@ -1092,6 +1092,11 @@ + #define PLATFORM_DRIVER ehci_fsl_driver + #endif + ++#ifdef CONFIG_USB_EHCI_MXC ++#include "ehci-mxc.c" ++#define PLATFORM_DRIVER ehci_mxc_driver ++#endif ++ + #ifdef CONFIG_SOC_AU1200 + #include "ehci-au1xxx.c" + #define PLATFORM_DRIVER ehci_hcd_au1xxx_driver +Index: linux-2.6.31.6/drivers/usb/host/ehci-mxc.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.31.6/drivers/usb/host/ehci-mxc.c 2009-12-10 11:40:43.315272374 +0100 +@@ -0,0 +1,256 @@ ++/* ++ * Copyright (c) 2008 Sascha Hauer , Pengutronix ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation; either version 2 of the License, or (at your ++ * option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software Foundation, ++ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ * ++ */ ++ ++#include ++#include ++#include ++ ++struct ehci_mxc_priv { ++ struct clk *usbclk, *ahbclk; ++ struct usb_hcd *hcd; ++}; ++ ++/* called during probe() after chip reset completes */ ++static int ehci_mxc_setup(struct usb_hcd *hcd) ++{ ++ struct ehci_hcd *ehci = hcd_to_ehci(hcd); ++ int retval; ++ ++ /* EHCI registers start at offset 0x100 */ ++ ehci->caps = hcd->regs + 0x100; ++ ehci->regs = hcd->regs + 0x100 + ++ HC_LENGTH(ehci_readl(ehci, &ehci->caps->hc_capbase)); ++ dbg_hcs_params(ehci, "reset"); ++ dbg_hcc_params(ehci, "reset"); ++ ++ /* cache this readonly data; minimize chip reads */ ++ ehci->hcs_params = ehci_readl(ehci, &ehci->caps->hcs_params); ++ ++ retval = ehci_halt(ehci); ++ if (retval) ++ return retval; ++ ++ /* data structure init */ ++ retval = ehci_init(hcd); ++ if (retval) ++ return retval; ++ ++ hcd->has_tt = 1; ++ ++ ehci->sbrn = 0x20; ++ ++ ehci_reset(ehci); ++ ++ ehci_port_power(ehci, 0); ++ return 0; ++} ++ ++static const struct hc_driver ehci_mxc_hc_driver = { ++ .description = hcd_name, ++ .product_desc = "Freescale On-Chip EHCI Host Controller", ++ .hcd_priv_size = sizeof(struct ehci_hcd), ++ ++ /* ++ * generic hardware linkage ++ */ ++ .irq = ehci_irq, ++ .flags = HCD_USB2 | HCD_MEMORY, ++ ++ /* ++ * basic lifecycle operations ++ */ ++ .reset = ehci_mxc_setup, ++ .start = ehci_run, ++ .stop = ehci_stop, ++ .shutdown = ehci_shutdown, ++ ++ /* ++ * managing i/o requests and associated device resources ++ */ ++ .urb_enqueue = ehci_urb_enqueue, ++ .urb_dequeue = ehci_urb_dequeue, ++ .endpoint_disable = ehci_endpoint_disable, ++ ++ /* ++ * scheduling support ++ */ ++ .get_frame_number = ehci_get_frame, ++ ++ /* ++ * root hub support ++ */ ++ .hub_status_data = ehci_hub_status_data, ++ .hub_control = ehci_hub_control, ++ .bus_suspend = ehci_bus_suspend, ++ .bus_resume = ehci_bus_resume, ++ .relinquish_port = ehci_relinquish_port, ++ .port_handed_over = ehci_port_handed_over, ++}; ++ ++static int ehci_mxc_drv_probe(struct platform_device *pdev) ++{ ++ struct mxc_usbh_platform_data *pdata; ++ struct usb_hcd *hcd; ++ struct resource *res; ++ int irq, ret, temp; ++ struct ehci_mxc_priv *priv; ++ ++ dev_info(&pdev->dev, "initializing i.MX USB Controller\n"); ++ ++ pdata = (struct mxc_usbh_platform_data *)pdev->dev.platform_data; ++ ++ irq = platform_get_irq(pdev, 0); ++ ++ hcd = usb_create_hcd(&ehci_mxc_hc_driver, &pdev->dev, dev_name(&pdev->dev)); ++ if (!hcd) ++ return -ENOMEM; ++ ++ priv = kzalloc(sizeof (*priv), GFP_KERNEL); ++ if (!priv) { ++ ret = -ENOMEM; ++ goto err_alloc; ++ } ++ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!res) { ++ dev_err(&pdev->dev, ++ "Found HC with no register addr. Check setup!\n"); ++ ret = -ENODEV; ++ goto err_get_resource; ++ } ++ ++ hcd->rsrc_start = res->start; ++ hcd->rsrc_len = resource_size(res); ++ ++ if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) { ++ dev_dbg(&pdev->dev, "controller already in use\n"); ++ ret = -EBUSY; ++ goto err_request_mem; ++ } ++ ++ hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len); ++ if (!hcd->regs) { ++ dev_err(&pdev->dev, "error mapping memory\n"); ++ ret = -EFAULT; ++ goto err_ioremap; ++ } ++ ++ priv->usbclk = clk_get(&pdev->dev, "usb"); ++ if (IS_ERR(priv->usbclk)) { ++ ret = PTR_ERR(priv->usbclk); ++ goto err_clk; ++ } ++ clk_enable(priv->usbclk); ++ ++ if (!cpu_is_mx35()) { ++ priv->ahbclk = clk_get(&pdev->dev, "usb_ahb"); ++ if (IS_ERR(priv->ahbclk)) { ++ ret = PTR_ERR(priv->ahbclk); ++ goto err_clk_ahb; ++ } ++ clk_enable(priv->ahbclk); ++ } ++ ++ if (pdata && pdata->init) { ++ ret = pdata->init(pdev); ++ if (ret) { ++ dev_err(&pdev->dev, "platform init failed\n"); ++ goto err_init; ++ } ++ } ++ ++ /* Set to Host mode */ ++ temp = readl(hcd->regs + 0x1a8); ++ writel(temp | 0x3, hcd->regs + 0x1a8); ++ ++ priv->hcd = hcd; ++ platform_set_drvdata(pdev, priv); ++ ++ ret = usb_add_hcd(hcd, irq, IRQF_DISABLED | IRQF_SHARED); ++ if (ret) ++ goto err_add; ++ ++ return 0; ++ ++err_add: ++ if (pdata && pdata->exit) ++ pdata->exit(pdev); ++err_init: ++ if (priv->ahbclk) { ++ clk_disable(priv->ahbclk); ++ clk_put(priv->ahbclk); ++ } ++err_clk_ahb: ++ clk_disable(priv->usbclk); ++ clk_put(priv->usbclk); ++err_clk: ++ iounmap(hcd->regs); ++err_ioremap: ++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ++err_request_mem: ++err_get_resource: ++ kfree(priv); ++err_alloc: ++ usb_put_hcd(hcd); ++ return ret; ++} ++ ++static int __exit ehci_mxc_drv_remove(struct platform_device *pdev) ++{ ++ struct ehci_mxc_priv *priv = platform_get_drvdata(pdev); ++ struct usb_hcd *hcd = priv->hcd; ++ ++ usb_remove_hcd(hcd); ++ iounmap(hcd->regs); ++ release_mem_region(hcd->rsrc_start, hcd->rsrc_len); ++ usb_put_hcd(hcd); ++ platform_set_drvdata(pdev, NULL); ++ ++ clk_disable(priv->usbclk); ++ clk_put(priv->usbclk); ++ if (priv->ahbclk) { ++ clk_disable(priv->ahbclk); ++ clk_put(priv->ahbclk); ++ } ++ ++ kfree(priv); ++ ++ return 0; ++} ++ ++static void ++ehci_mxc_shutdown(struct platform_device *pdev) ++{ ++ struct ehci_mxc_priv *priv = platform_get_drvdata(pdev); ++ struct usb_hcd *hcd = priv->hcd; ++ ++ if (hcd->driver->shutdown) ++ hcd->driver->shutdown(hcd); ++} ++ ++MODULE_ALIAS("platform:mxc-ehci"); ++ ++static struct platform_driver ehci_mxc_driver = { ++ .probe = ehci_mxc_drv_probe, ++ .remove = __exit_p(ehci_mxc_drv_remove), ++ .shutdown = ehci_mxc_shutdown, ++ .driver = { ++ .name = "mxc-ehci", ++ }, ++}; diff --git a/recipes/linux/linux-2.6.31/pcm043/0027-imx-ssi-flush-fifos.patch b/recipes/linux/linux-2.6.31/pcm043/0027-imx-ssi-flush-fifos.patch new file mode 100644 index 0000000000..56fcd9e6f1 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0027-imx-ssi-flush-fifos.patch @@ -0,0 +1,29 @@ +From 447b943dc48d3775e59be1800a3198f65265536d Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 2 Dec 2009 11:59:05 +0100 +Subject: [PATCH 27/28] imx-ssi: flush fifos + +Signed-off-by: Sascha Hauer +--- + sound/soc/imx/imx-ssi.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c +index 6219df9..d25ee2b 100644 +--- a/sound/soc/imx/imx-ssi.c ++++ b/sound/soc/imx/imx-ssi.c +@@ -333,6 +333,11 @@ static int imx_ssi_trigger(struct snd_pcm_substream *substream, int cmd, + /* rx/tx are always enabled to access ac97 registers */ + writel(scr, ssi->base + SSI_SCR); + ++ if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ++ writel(SSI_SOR_TX_CLR, ssi->base + SSI_SOR); ++ else ++ writel(SSI_SOR_RX_CLR, ssi->base + SSI_SOR); ++ + writel(sier, ssi->base + SSI_SIER); + + return 0; +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0028-imx-ssi-Fix-occasional-AC97-reset-failure.patch b/recipes/linux/linux-2.6.31/pcm043/0028-imx-ssi-Fix-occasional-AC97-reset-failure.patch new file mode 100644 index 0000000000..fcb26ac189 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0028-imx-ssi-Fix-occasional-AC97-reset-failure.patch @@ -0,0 +1,37 @@ +From fb79a42a2badc12714a50ad5cc360927a138e8a6 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Thu, 17 Dec 2009 11:19:38 +0100 +Subject: [PATCH 28/28] imx-ssi: Fix occasional AC97 reset failure + +Signed-off-by: Sascha Hauer +--- + sound/soc/imx/imx-ssi.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/sound/soc/imx/imx-ssi.c b/sound/soc/imx/imx-ssi.c +index d25ee2b..94ef361 100644 +--- a/sound/soc/imx/imx-ssi.c ++++ b/sound/soc/imx/imx-ssi.c +@@ -565,6 +565,9 @@ static void imx_ssi_ac97_reset(struct snd_ac97 *ac97) + + if (imx_ssi->ac97_reset) + imx_ssi->ac97_reset(ac97); ++ ++ /* First read sometimes fails, do a dummy read */ ++ imx_ssi_ac97_read(ac97, 0); + } + + static void imx_ssi_ac97_warm_reset(struct snd_ac97 *ac97) +@@ -573,6 +576,9 @@ static void imx_ssi_ac97_warm_reset(struct snd_ac97 *ac97) + + if (imx_ssi->ac97_warm_reset) + imx_ssi->ac97_warm_reset(ac97); ++ ++ /* First read sometimes fails, do a dummy read */ ++ imx_ssi_ac97_read(ac97, 0); + } + + struct snd_ac97_bus_ops soc_ac97_ops = { +-- +1.6.5.2 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0029-MX31-Add-USB-platform-devices-and-resources.patch b/recipes/linux/linux-2.6.31/pcm043/0029-MX31-Add-USB-platform-devices-and-resources.patch new file mode 100644 index 0000000000..63eef36c25 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0029-MX31-Add-USB-platform-devices-and-resources.patch @@ -0,0 +1,100 @@ +From f9a5d99348fb2c9cacdbbc0334f372ec6e5962de Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 19 Dec 2008 14:32:11 +0100 +Subject: [PATCH 029/101] MX31: Add USB platform devices and resources + +Signed-off-by: Sascha Hauer + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + arch/arm/mach-mx3/devices.c | 75 +++++++++++++++++++++++++++++++++++++++++++ + arch/arm/mach-mx3/devices.h | 3 ++ + 2 files changed, 78 insertions(+), 0 deletions(-) + +Index: linux-2.6.31.6/arch/arm/mach-mx3/devices.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/devices.c 2009-12-08 11:08:01.138690103 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/devices.c 2009-12-08 11:17:36.012748409 +0100 +@@ -395,6 +395,67 @@ + .num_resources = ARRAY_SIZE(otg_resources), + }; + ++struct platform_device mxc_otg = { ++ .name = "mxc-ehci", ++ .id = 0, ++ .dev = { ++ .coherent_dma_mask = 0xffffffff, ++ .dma_mask = &otg_dmamask, ++ }, ++ .resource = otg_resources, ++ .num_resources = ARRAY_SIZE(otg_resources), ++}; ++ ++static u64 usbh1_dmamask = ~(u32)0; ++ ++static struct resource mxc_usbh1_resources[] = { ++ { ++ .start = OTG_BASE_ADDR + 0x200, ++ .end = OTG_BASE_ADDR + 0x3ff, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MXC_INT_USB1, ++ .end = MXC_INT_USB1, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++struct platform_device mxc_usbh1 = { ++ .name = "mxc-ehci", ++ .id = 1, ++ .dev = { ++ .coherent_dma_mask = 0xffffffff, ++ .dma_mask = &usbh1_dmamask, ++ }, ++ .resource = mxc_usbh1_resources, ++ .num_resources = ARRAY_SIZE(mxc_usbh1_resources), ++}; ++ ++static u64 usbh2_dmamask = ~(u32)0; ++ ++static struct resource mxc_usbh2_resources[] = { ++ { ++ .start = OTG_BASE_ADDR + 0x400, ++ .end = OTG_BASE_ADDR + 0x5ff, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MXC_INT_USB2, ++ .end = MXC_INT_USB2, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++struct platform_device mxc_usbh2 = { ++ .name = "mxc-ehci", ++ .id = 2, ++ .dev = { ++ .coherent_dma_mask = 0xffffffff, ++ .dma_mask = &usbh2_dmamask, ++ }, ++ .resource = mxc_usbh2_resources, ++ .num_resources = ARRAY_SIZE(mxc_usbh2_resources), ++}; ++ + #ifdef CONFIG_ARCH_MX35 + static struct resource mxc_fec_resources[] = { + { +Index: linux-2.6.31.6/arch/arm/mach-mx3/devices.h +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/devices.h 2009-12-08 11:08:01.138690103 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/devices.h 2009-12-08 11:16:59.408625374 +0100 +@@ -16,6 +16,9 @@ + extern struct platform_device mxcsdhc_device0; + extern struct platform_device mxcsdhc_device1; + extern struct platform_device mxc_otg_udc_device; ++extern struct platform_device mxc_otg; ++extern struct platform_device mxc_usbh1; ++extern struct platform_device mxc_usbh2; + extern struct platform_device mxc_rnga_device; + extern struct platform_device imx_ssi_device0; + extern struct platform_device imx_ssi_device1; diff --git a/recipes/linux/linux-2.6.31/pcm043/0053-Watchdog-driver-for-IMX-MXC.patch b/recipes/linux/linux-2.6.31/pcm043/0053-Watchdog-driver-for-IMX-MXC.patch new file mode 100644 index 0000000000..2f19c1c6b7 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0053-Watchdog-driver-for-IMX-MXC.patch @@ -0,0 +1,490 @@ +From 384c73ff72ecf48d438ef54cb297b035c4060347 Mon Sep 17 00:00:00 2001 +From: Darius Augulis +Date: Mon, 9 Mar 2009 17:10:25 +0200 +Subject: [PATCH 053/101] Watchdog driver for IMX/MXC + +Driver for watchdog timer on Freesale IMX processors. + +Signed-off-by: Darius Augulis + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + drivers/watchdog/Kconfig | 12 ++ + drivers/watchdog/Makefile | 1 + + drivers/watchdog/imx-wdt.c | 432 ++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 445 insertions(+), 0 deletions(-) + create mode 100644 drivers/watchdog/imx-wdt.c + +Index: linux-2.6.31.6/drivers/watchdog/Kconfig +=================================================================== +--- linux-2.6.31.6.orig/drivers/watchdog/Kconfig 2009-11-10 01:32:31.000000000 +0100 ++++ linux-2.6.31.6/drivers/watchdog/Kconfig 2009-12-08 08:59:05.611195459 +0100 +@@ -66,6 +66,18 @@ + + # ARM Architecture + ++config IMX_WDT ++ tristate "IMX Watchdog" ++ depends on ARCH_MXC ++ help ++ This is the driver for the hardware watchdog ++ on the Freescale IMX processors. ++ If you have one of these processors and wish to have ++ watchdog support enabled, say Y, otherwise say N. ++ ++ To compile this driver as a module, choose M here: the ++ module will be called imx_wdt. ++ + config AT91RM9200_WATCHDOG + tristate "AT91RM9200 watchdog" + depends on ARCH_AT91RM9200 +Index: linux-2.6.31.6/drivers/watchdog/Makefile +=================================================================== +--- linux-2.6.31.6.orig/drivers/watchdog/Makefile 2009-11-10 01:32:31.000000000 +0100 ++++ linux-2.6.31.6/drivers/watchdog/Makefile 2009-12-08 09:00:06.603252242 +0100 +@@ -44,6 +44,7 @@ + obj-$(CONFIG_ORION_WATCHDOG) += orion_wdt.o + obj-$(CONFIG_COH901327_WATCHDOG) += coh901327_wdt.o + obj-$(CONFIG_STMP3XXX_WATCHDOG) += stmp3xxx_wdt.o ++obj-$(CONFIG_IMX_WDT) += imx-wdt.o + + # AVR32 Architecture + obj-$(CONFIG_AT32AP700X_WDT) += at32ap700x_wdt.o +Index: linux-2.6.31.6/drivers/watchdog/imx-wdt.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.31.6/drivers/watchdog/imx-wdt.c 2009-12-08 08:59:05.611195459 +0100 +@@ -0,0 +1,432 @@ ++/* ++ * Watchdog driver for IMX processors ++ * ++ * Copyright (C) 2008 Darius Augulis ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ */ ++ ++/* ++ * NOTE: MX1 arch has a bit different Watchdog than MX2 and MX3. ++ * It's not possible to turn off watchdog on MX2 or MX3 since it's enabled. ++ * Timeout changing with IOCTL command is possible only on MX1. ++ * WD timer halting during suspend is implemented in all archs but in ++ * different way. ++ * MX2 and MX3 has 16 bit watchdog registers compared to 32 bit on MX1. ++ * ++ */ ++ ++/*#define DEBUG*/ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#ifdef CONFIG_ARCH_MX1 ++# define WDT_MAX_TIME 63 /* seconds */ ++ ++# define IMX_WDT_WCR 0x00 /* Control reg */ ++# define IMX_WDT_WSR 0x04 /* Service reg */ ++# define IMX_WDT_WSTR 0x08 /* Status reg */ ++ ++# define WCR_WT (0x7F<<8) ++# define WCR_WDEC (1<<1) ++# define WCR_WDE (1<<0) ++# define WCR_WHALT (1<<15) ++#else ++# define WDT_MAX_TIME 127 /* seconds */ ++ ++# define IMX_WDT_WCR 0x00 /* Control reg */ ++# define IMX_WDT_WSR 0x02 /* Service reg */ ++# define IMX_WDT_WSTR 0x04 /* Status reg */ ++ ++# define WCR_WT (0xFF<<8) ++# define WCR_WDE (1<<2) ++# define WCR_WDZST (1<<0) ++#endif ++ ++#define WDT_DEFAULT_TIME 10 /* seconds */ ++#define WDT_SEQ1 0x5555 ++#define WDT_SEQ2 0xAAAA ++ ++static struct platform_device *imx_wdt_dev; ++ ++struct imx_wdt_struct { ++ struct resource *res; ++ struct device *dev; ++ struct clk *clk; ++ void __iomem *base; ++ int wdt_time; ++ int nowayout; ++ unsigned long status; ++}; ++ ++static unsigned int timeout = WDT_DEFAULT_TIME; ++ ++static struct watchdog_info imx_wdt_info = { ++ .identity = "imx watchdog", ++ .options = WDIOF_KEEPALIVEPING ++#ifdef CONFIG_ARCH_MX1 ++ | WDIOF_SETTIMEOUT ++#endif ++}; ++ ++/* Disable the watchdog. */ ++static inline void imx_wdt_stop(struct imx_wdt_struct *imx_wdt) ++{ ++ dev_dbg(imx_wdt->dev, "<%s>\n", __func__); ++ ++#ifdef CONFIG_ARCH_MX1 ++ __raw_writew(0, imx_wdt->base + IMX_WDT_WCR); ++#else ++ dev_info(imx_wdt->dev, "watchdog is unstoppable on i.MX2/3 !\n"); ++#endif ++} ++ ++/* Enable and reset the watchdog. */ ++static inline void imx_wdt_start(struct imx_wdt_struct *imx_wdt) ++{ ++ u16 temp; ++ ++ dev_dbg(imx_wdt->dev, "<%s>\n", __func__); ++ ++ temp = __raw_readw(imx_wdt->base + IMX_WDT_WCR); ++ temp |= imx_wdt->wdt_time << 8; ++ __raw_writew(temp, imx_wdt->base + IMX_WDT_WCR); ++ ++#ifdef CONFIG_ARCH_MX1 ++# ifndef CONFIG_WATCHDOG_NOWAYOUT ++ temp |= WCR_WDEC; ++ __raw_writew(temp, imx_wdt->base + IMX_WDT_WCR); ++# endif ++ temp |= WCR_WDE; ++ __raw_writew(temp, imx_wdt->base + IMX_WDT_WCR); ++#else ++ temp |= WCR_WDE | WCR_WDZST; ++ __raw_writew(temp, imx_wdt->base + IMX_WDT_WCR); ++#endif ++ ++#ifdef CONFIG_ARCH_MX1 ++ __raw_writew(WDT_SEQ1, imx_wdt->base + IMX_WDT_WSR); ++ __raw_writew(WDT_SEQ2, imx_wdt->base + IMX_WDT_WSR); ++#endif ++} ++ ++/* Service the watchdog */ ++static inline void imx_wdt_service(struct imx_wdt_struct *imx_wdt) ++{ ++ dev_dbg(imx_wdt->dev, "<%s>\n", __func__); ++ ++ __raw_writew(WDT_SEQ1, imx_wdt->base + IMX_WDT_WSR); ++ __raw_writew(WDT_SEQ2, imx_wdt->base + IMX_WDT_WSR); ++} ++ ++/* Watchdog device is opened, and watchdog starts running. */ ++static int imx_wdt_open(struct inode *inode, struct file *file) ++{ ++ struct imx_wdt_struct *imx_wdt = platform_get_drvdata(imx_wdt_dev); ++ ++ dev_dbg(imx_wdt->dev, "<%s>\n", __func__); ++ ++ if (test_and_set_bit(0, &imx_wdt->status)) ++ return -EBUSY; ++ ++ file->private_data = imx_wdt; ++ ++ imx_wdt_start(imx_wdt); ++ return nonseekable_open(inode, file); ++} ++ ++/* Close the watchdog device. */ ++static int imx_wdt_close(struct inode *inode, struct file *file) ++{ ++ struct imx_wdt_struct *imx_wdt = file->private_data; ++ ++ dev_dbg(imx_wdt->dev, "<%s>\n", __func__); ++ ++ /* Disable the watchdog if possible */ ++ if (!imx_wdt->nowayout) ++ imx_wdt_stop(imx_wdt); ++ ++ clear_bit(0, &imx_wdt->status); ++ return 0; ++} ++ ++#ifdef CONFIG_ARCH_MX1 ++/* Change the watchdog time interval. */ ++static int imx_wdt_settimeout(struct imx_wdt_struct *imx_wdt, int new_time) ++{ ++ dev_dbg(imx_wdt->dev, "<%s>\n", __func__); ++ ++ if ((new_time * 2 < 1) || (new_time * 2 > WDT_MAX_TIME)) ++ return -EINVAL; ++ ++ imx_wdt->wdt_time = new_time * 2; ++ return 0; ++} ++#endif ++ ++/* Handle commands from user-space. */ ++static int imx_wdt_ioctl(struct inode *inode, struct file *file, ++ unsigned int cmd, unsigned long arg) ++{ ++ struct imx_wdt_struct *imx_wdt = file->private_data; ++ ++ void __user *argp = (void __user *)arg; ++ int __user *p = argp; ++#ifdef CONFIG_ARCH_MX1 ++ int new_value; ++#endif ++ ++ dev_dbg(imx_wdt->dev, "<%s>\n", __func__); ++ ++ switch (cmd) { ++ case WDIOC_KEEPALIVE: ++ imx_wdt_service(imx_wdt); ++ return 0; ++ ++ case WDIOC_GETSUPPORT: ++ return copy_to_user(argp, &imx_wdt_info, ++ sizeof(imx_wdt_info)) ? -EFAULT : 0; ++#ifdef CONFIG_ARCH_MX1 ++ case WDIOC_SETTIMEOUT: ++ if (get_user(new_value, p)) ++ return -EFAULT; ++ ++ if (imx_wdt_settimeout(imx_wdt, new_value)) ++ return -EINVAL; ++ ++ /* Enable new time value */ ++ imx_wdt_start(imx_wdt); ++ ++ /* Return current value */ ++ return put_user(imx_wdt->wdt_time / 2, p); ++#endif ++ case WDIOC_GETTIMEOUT: ++ return put_user(imx_wdt->wdt_time / 2, p); ++ ++ default: ++ return -ENOTTY; ++ } ++} ++ ++/* Refresh the watchdog whenever device is written to. */ ++static ssize_t imx_wdt_write(struct file *file, const char *data, ++ size_t len, loff_t *ppos) ++{ ++ struct imx_wdt_struct *imx_wdt = file->private_data; ++ ++ dev_dbg(imx_wdt->dev, "<%s>\n", __func__); ++ ++ imx_wdt_service(imx_wdt); ++ return len; ++} ++ ++static const struct file_operations imx_wdt_fops = { ++ .owner = THIS_MODULE, ++ .llseek = no_llseek, ++ .ioctl = imx_wdt_ioctl, ++ .open = imx_wdt_open, ++ .release = imx_wdt_close, ++ .write = imx_wdt_write, ++}; ++ ++static struct miscdevice imx_wdt_miscdev = { ++ .minor = WATCHDOG_MINOR, ++ .name = "watchdog", ++ .fops = &imx_wdt_fops, ++}; ++ ++static void imx_wdt_shutdown(struct platform_device *pdev) ++{ ++ struct imx_wdt_struct *imx_wdt = platform_get_drvdata(pdev); ++ ++ dev_dbg(imx_wdt->dev, "<%s>\n", __func__); ++ ++ imx_wdt_stop(imx_wdt); ++} ++ ++static int __init imx_wdt_probe(struct platform_device *pdev) ++{ ++ int ret; ++ int res_size; ++ struct resource *res; ++ void __iomem *base; ++ struct imx_wdt_struct *imx_wdt; ++ ++ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!res) { ++ dev_err(&pdev->dev, "can't get device resources\n"); ++ return -ENODEV; ++ } ++ ++ res_size = res->end - res->start + 1; ++ if (!request_mem_region(res->start, res_size, res->name)) { ++ dev_err(&pdev->dev, "can't allocate %d bytes at %d address\n", ++ res_size, res->start); ++ return -ENOMEM; ++ } ++ ++ base = ioremap(res->start, res_size); ++ if (!base) { ++ dev_err(&pdev->dev, "ioremap failed\n"); ++ ret = -EIO; ++ goto fail0; ++ } ++ ++ imx_wdt = kzalloc(sizeof(struct imx_wdt_struct), GFP_KERNEL); ++ if (!imx_wdt) { ++ dev_err(&pdev->dev, "can't allocate interface\n"); ++ ret = -ENOMEM; ++ goto fail1; ++ } ++ ++ imx_wdt->clk = clk_get(&pdev->dev, NULL); ++ if (IS_ERR(imx_wdt->clk)) { ++ dev_err(&pdev->dev, "can't get Watchdog clock\n"); ++ ret = PTR_ERR(imx_wdt->clk); ++ goto fail2; ++ } ++ clk_enable(imx_wdt->clk); ++ ++ /* Setup imx_wdt driver structure */ ++ imx_wdt->dev = &pdev->dev; ++ imx_wdt->base = base; ++ imx_wdt->res = res; ++ imx_wdt->wdt_time = timeout * 2; ++#ifdef CONFIG_WATCHDOG_NOWAYOUT ++ imx_wdt->nowayout = 1; ++#else ++ imx_wdt->nowayout = 0; ++#endif ++ ++ /* Set up platform driver data */ ++ platform_set_drvdata(pdev, imx_wdt); ++ imx_wdt_dev = pdev; ++ ++ if (imx_wdt_miscdev.parent) { ++ ret = -EBUSY; ++ goto fail3; ++ } ++ imx_wdt_miscdev.parent = &pdev->dev; ++ ++ ret = misc_register(&imx_wdt_miscdev); ++ if (ret) ++ goto fail3; ++ ++ dev_dbg(&pdev->dev, "IMX Watchdog Timer enabled\n"); ++ return 0; ++ ++fail3: ++ clk_disable(imx_wdt->clk); ++ clk_put(imx_wdt->clk); ++fail2: ++ platform_set_drvdata(pdev, NULL); ++ kfree(imx_wdt); ++fail1: ++ iounmap(base); ++fail0: ++ release_mem_region(res->start, res_size); ++ ++ return ret; /* Return error number */ ++} ++ ++static int __exit imx_wdt_remove(struct platform_device *pdev) ++{ ++ struct imx_wdt_struct *imx_wdt = platform_get_drvdata(pdev); ++ ++ dev_dbg(&pdev->dev, "IMX Watchdog Timer disabled\n"); ++ ++ platform_set_drvdata(pdev, NULL); ++ misc_deregister(&imx_wdt_miscdev); ++ imx_wdt_dev = NULL; ++ iounmap(imx_wdt->base); ++ release_mem_region(imx_wdt->res->start, ++ imx_wdt->res->end - imx_wdt->res->start + 1); ++ ++ clk_disable(imx_wdt->clk); ++ clk_put(imx_wdt->clk); ++ ++ kfree(imx_wdt); ++ return 0; ++} ++ ++#ifdef CONFIG_PM ++ ++static int imx_wdt_suspend(struct platform_device *pdev, pm_message_t message) ++{ ++#ifdef CONFIG_ARCH_MX1 ++ struct imx_wdt_struct *imx_wdt = platform_get_drvdata(pdev); ++ ++ u32 temp = __raw_readw(imx_wdt->base + IMX_WDT_WCR); ++ __raw_writew(temp | WCR_WHALT, imx_wdt->base + IMX_WDT_WCR); ++#endif ++ return 0; ++} ++ ++static int imx_wdt_resume(struct platform_device *pdev) ++{ ++#ifdef CONFIG_ARCH_MX1 ++ struct imx_wdt_struct *imx_wdt = platform_get_drvdata(pdev); ++ u32 temp; ++ ++ if (imx_wdt->status) { ++ temp = __raw_readw(imx_wdt->base + IMX_WDT_WCR) & ~WCR_WHALT; ++ __raw_writew(temp, imx_wdt->base + IMX_WDT_WCR); ++ } ++#endif ++ return 0; ++} ++ ++#else ++#define imx_wdt_suspend NULL ++#define imx_wdt_resume NULL ++#endif ++ ++static struct platform_driver imx_wdt_driver = { ++ .probe = imx_wdt_probe, ++ .remove = __exit_p(imx_wdt_remove), ++ .shutdown = imx_wdt_shutdown, ++ .suspend = imx_wdt_suspend, ++ .resume = imx_wdt_resume, ++ .driver = { ++ .name = "imx-wdt", ++ .owner = THIS_MODULE, ++ }, ++}; ++ ++static int __init imx_wdt_init(void) ++{ ++ return platform_driver_probe(&imx_wdt_driver, imx_wdt_probe); ++} ++ ++static void __exit imx_wdt_exit(void) ++{ ++ platform_driver_unregister(&imx_wdt_driver); ++} ++module_init(imx_wdt_init); ++module_exit(imx_wdt_exit); ++ ++module_param(timeout, uint, 0); ++MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds"); ++ ++MODULE_AUTHOR("Darius Augulis"); ++MODULE_DESCRIPTION("Watchdog driver for IMX"); ++MODULE_LICENSE("GPL"); ++MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); ++MODULE_ALIAS("platform:imx-wdt"); diff --git a/recipes/linux/linux-2.6.31/pcm043/0066-HACK-increase-default-tx_queue_len-to-10000.patch b/recipes/linux/linux-2.6.31/pcm043/0066-HACK-increase-default-tx_queue_len-to-10000.patch new file mode 100644 index 0000000000..d0b9123576 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0066-HACK-increase-default-tx_queue_len-to-10000.patch @@ -0,0 +1,36 @@ +From c15a83d5d49ca36d827fd35faee8d9c0048e8053 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde +Date: Fri, 19 Dec 2008 14:32:42 +0100 +Subject: [PATCH 066/101] HACK: increase default tx_queue_len to 10000 + +HACK HACK HACK + +Without this patch sending CAN packages faster then they could be +send out on the wire results in -ENOBUF. This patch increases the +default tx_queue_len to 10000 so that in this case the sender blocks. +Thus the CAN socket just behaves like congested a TCP/IP socket. + +HACK HACK HACK + +Signed-off-by: Marc Kleine-Budde + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + + drivers/net/can/dev.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +Index: linux-2.6.31.6/drivers/net/can/dev.c +=================================================================== +--- linux-2.6.31.6.orig/drivers/net/can/dev.c 2009-11-10 01:32:31.000000000 +0100 ++++ linux-2.6.31.6/drivers/net/can/dev.c 2009-12-08 09:12:45.558976163 +0100 +@@ -420,7 +420,7 @@ + dev->mtu = sizeof(struct can_frame); + dev->hard_header_len = 0; + dev->addr_len = 0; +- dev->tx_queue_len = 10; ++ dev->tx_queue_len = 10000; + + /* New-style flags. */ + dev->flags = IFF_NOARP; diff --git a/recipes/linux/linux-2.6.31/pcm043/0084-i.MX35-clock-support-Add-USB-clocks.patch b/recipes/linux/linux-2.6.31/pcm043/0084-i.MX35-clock-support-Add-USB-clocks.patch new file mode 100644 index 0000000000..da33524b96 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0084-i.MX35-clock-support-Add-USB-clocks.patch @@ -0,0 +1,30 @@ +From f46cfd74faf9b1644e9eefc1e7fa5541f17d1d32 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Tue, 17 Mar 2009 15:43:54 +0100 +Subject: [PATCH 084/101] i.MX35 clock support: Add USB clocks + +Signed-off-by: Sascha Hauer + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + arch/arm/mach-mx3/clock-imx35.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +Index: linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/clock-imx35.c 2009-12-07 15:20:31.963944848 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c 2009-12-08 09:39:04.798706951 +0100 +@@ -425,8 +425,10 @@ + _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) + _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) + _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) +- _REGISTER_CLOCK(NULL, "usbotg", usbotg_clk) +- _REGISTER_CLOCK("mxc_wdt.0", NULL, wdog_clk) ++ _REGISTER_CLOCK("mxc-ehci.0", NULL, usbotg_clk) ++ _REGISTER_CLOCK("mxc-ehci.1", NULL, usbotg_clk) ++ _REGISTER_CLOCK("mxc-ehci.2", NULL, usbotg_clk) ++ _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) + _REGISTER_CLOCK(NULL, "max", max_clk) + _REGISTER_CLOCK(NULL, "audmux", audmux_clk) + _REGISTER_CLOCK(NULL, "csi", csi_clk) diff --git a/recipes/linux/linux-2.6.31/pcm043/0088-ehci-mxc-Fix-clocks.patch b/recipes/linux/linux-2.6.31/pcm043/0088-ehci-mxc-Fix-clocks.patch new file mode 100644 index 0000000000..25143cb0e9 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0088-ehci-mxc-Fix-clocks.patch @@ -0,0 +1,33 @@ +From f5d7944a7257ffcf2aa7ee0736962e9b564837fd Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Wed, 8 Apr 2009 16:39:47 +0200 +Subject: [PATCH 088/101] ehci mxc: Fix clocks + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx3/clock.c | 9 ++++++--- + 1 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c +index aee34ed..a08f2be 100644 +--- a/arch/arm/mach-mx3/clock.c ++++ b/arch/arm/mach-mx3/clock.c +@@ -532,9 +532,12 @@ static struct clk_lookup lookups[] __initdata = { + _REGISTER_CLOCK("mx3_sdc_fb", NULL, ipu_clk) + _REGISTER_CLOCK(NULL, "kpp", kpp_clk) + /* FIXME: mxc-ehci now misses the secondary clock */ +- _REGISTER_CLOCK("mxc-ehci.0", NULL, usb_clk1) +- _REGISTER_CLOCK("mxc-ehci.1", NULL, usb_clk1) +- _REGISTER_CLOCK("mxc-ehci.2", NULL, usb_clk1) ++ _REGISTER_CLOCK("mxc-ehci.0", "usb", usb_clk1) ++ _REGISTER_CLOCK("mxc-ehci.0", "usb_ahb", usb_clk2) ++ _REGISTER_CLOCK("mxc-ehci.1", "usb", usb_clk1) ++ _REGISTER_CLOCK("mxc-ehci.1", "usb_ahb", usb_clk2) ++ _REGISTER_CLOCK("mxc-ehci.2", "usb", usb_clk1) ++ _REGISTER_CLOCK("mxc-ehci.2", "usb_ahb", usb_clk2) + _REGISTER_CLOCK("fsl-usb2-udc", "usb", usb_clk1) + _REGISTER_CLOCK("fsl-usb2-udc", "usb_ahb", usb_clk2) + _REGISTER_CLOCK("mx3-camera.0", NULL, csi_clk) +-- +1.6.2.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0090-mx3x-Fixup-USB-base-addresses.patch b/recipes/linux/linux-2.6.31/pcm043/0090-mx3x-Fixup-USB-base-addresses.patch new file mode 100644 index 0000000000..61fe36c6ea --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0090-mx3x-Fixup-USB-base-addresses.patch @@ -0,0 +1,93 @@ +From c5ff90856d241112b588e091167e6fc69020d535 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 17 Apr 2009 16:52:25 +0200 +Subject: [PATCH 090/101] mx3x: Fixup USB base addresses + +Signed-off-by: Sascha Hauer + +rebased to 2.6.31.6, but without pcm037.c changes +Signed-off-by: Jan Weitzel +--- + arch/arm/mach-mx3/devices.c | 20 ++++++++++++++------ + arch/arm/mach-mx3/pcm037.c | 20 ++++++++++---------- + arch/arm/plat-mxc/include/mach/mx31.h | 2 +- + arch/arm/plat-mxc/include/mach/mx35.h | 1 + + 4 files changed, 26 insertions(+), 17 deletions(-) + +Index: linux-2.6.31.6/arch/arm/mach-mx3/devices.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/devices.c 2009-12-10 11:33:07.024614628 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/devices.c 2009-12-10 11:33:10.356276214 +0100 +@@ -371,8 +371,8 @@ + + static struct resource otg_resources[] = { + { +- .start = OTG_BASE_ADDR, +- .end = OTG_BASE_ADDR + 0x1ff, ++ .start = MX31_OTG_BASE_ADDR, ++ .end = MX31_OTG_BASE_ADDR + 0x1ff, + .flags = IORESOURCE_MEM, + }, { + .start = MXC_INT_USB3, +@@ -410,8 +410,8 @@ + + static struct resource mxc_usbh1_resources[] = { + { +- .start = OTG_BASE_ADDR + 0x200, +- .end = OTG_BASE_ADDR + 0x3ff, ++ .start = MX31_OTG_BASE_ADDR + 0x200, ++ .end = MX31_OTG_BASE_ADDR + 0x3ff, + .flags = IORESOURCE_MEM, + }, { + .start = MXC_INT_USB1, +@@ -435,8 +435,8 @@ + + static struct resource mxc_usbh2_resources[] = { + { +- .start = OTG_BASE_ADDR + 0x400, +- .end = OTG_BASE_ADDR + 0x5ff, ++ .start = MX31_OTG_BASE_ADDR + 0x400, ++ .end = MX31_OTG_BASE_ADDR + 0x5ff, + .flags = IORESOURCE_MEM, + }, { + .start = MXC_INT_USB2, +@@ -586,6 +586,14 @@ + if (cpu_is_mx35()) { + mxc_nand_resources[0].start = MX35_NFC_BASE_ADDR; + mxc_nand_resources[0].end = MX35_NFC_BASE_ADDR + 0xfff; ++ otg_resources[0].start = MX35_OTG_BASE_ADDR; ++ otg_resources[0].end = MX35_OTG_BASE_ADDR + 0x1ff; ++ otg_resources[1].start = MXC_INT_USBOTG; ++ otg_resources[1].end = MXC_INT_USBOTG; ++ mxc_usbh1_resources[0].start = MX35_OTG_BASE_ADDR + 0x400; ++ mxc_usbh1_resources[0].end = MX35_OTG_BASE_ADDR + 0x5ff; ++ mxc_usbh1_resources[1].start = MXC_INT_USBHS; ++ mxc_usbh1_resources[1].end = MXC_INT_USBHS; + imx_ssi_resources0[1].start = MX35_INT_SSI1; + imx_ssi_resources0[1].end = MX35_INT_SSI1; + imx_ssi_resources1[1].start = MX35_INT_SSI2; +Index: linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mx31.h +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/plat-mxc/include/mach/mx31.h 2009-12-10 11:33:07.004682613 +0100 ++++ linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mx31.h 2009-12-10 11:33:10.356276214 +0100 +@@ -4,7 +4,7 @@ + #define MX31_IRAM_BASE_ADDR 0x1FFC0000 /* internal ram */ + #define MX31_IRAM_SIZE SZ_16K + +-#define OTG_BASE_ADDR (AIPS1_BASE_ADDR + 0x00088000) ++#define MX31_OTG_BASE_ADDR (AIPS1_BASE_ADDR + 0x00088000) + #define ATA_BASE_ADDR (AIPS1_BASE_ADDR + 0x0008C000) + #define UART4_BASE_ADDR (AIPS1_BASE_ADDR + 0x000B0000) + #define UART5_BASE_ADDR (AIPS1_BASE_ADDR + 0x000B4000) +Index: linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mx35.h +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/plat-mxc/include/mach/mx35.h 2009-12-10 11:33:07.014617995 +0100 ++++ linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mx35.h 2009-12-10 11:33:10.356276214 +0100 +@@ -5,6 +5,7 @@ + #define MX35_IRAM_SIZE SZ_128K + + #define MXC_FEC_BASE_ADDR 0x50038000 ++#define MX35_OTG_BASE_ADDR 0x53ff4000 + #define MX35_NFC_BASE_ADDR 0xBB000000 + + /* diff --git a/recipes/linux/linux-2.6.31/pcm043/0091-mx31-clock-remove-obsolete-FIXME-comment.patch b/recipes/linux/linux-2.6.31/pcm043/0091-mx31-clock-remove-obsolete-FIXME-comment.patch new file mode 100644 index 0000000000..40c9c632d4 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0091-mx31-clock-remove-obsolete-FIXME-comment.patch @@ -0,0 +1,25 @@ +From 4ed32022da7583d8cf260809f41fb1bfcfb033a8 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 17 Apr 2009 16:52:55 +0200 +Subject: [PATCH 091/101] mx31 clock: remove obsolete FIXME comment + +Signed-off-by: Sascha Hauer +--- + arch/arm/mach-mx3/clock.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-mx3/clock.c b/arch/arm/mach-mx3/clock.c +index a08f2be..8ec45f6 100644 +--- a/arch/arm/mach-mx3/clock.c ++++ b/arch/arm/mach-mx3/clock.c +@@ -531,7 +531,6 @@ static struct clk_lookup lookups[] __initdata = { + _REGISTER_CLOCK("ipu-core", NULL, ipu_clk) + _REGISTER_CLOCK("mx3_sdc_fb", NULL, ipu_clk) + _REGISTER_CLOCK(NULL, "kpp", kpp_clk) +- /* FIXME: mxc-ehci now misses the secondary clock */ + _REGISTER_CLOCK("mxc-ehci.0", "usb", usb_clk1) + _REGISTER_CLOCK("mxc-ehci.0", "usb_ahb", usb_clk2) + _REGISTER_CLOCK("mxc-ehci.1", "usb", usb_clk1) +-- +1.6.2.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/0092-mx35-clock-give-ehci-clocks-names.patch b/recipes/linux/linux-2.6.31/pcm043/0092-mx35-clock-give-ehci-clocks-names.patch new file mode 100644 index 0000000000..91b27f9890 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0092-mx35-clock-give-ehci-clocks-names.patch @@ -0,0 +1,30 @@ +From 655b9879b22d1e2776c8df0a4fa77801a1b7fd97 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 17 Apr 2009 16:53:27 +0200 +Subject: [PATCH 092/101] mx35 clock: give ehci clocks names + +Signed-off-by: Sascha Hauer + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + arch/arm/mach-mx3/clock-imx35.c | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +Index: linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/clock-imx35.c 2009-12-08 09:39:04.798706951 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c 2009-12-08 09:49:47.949859691 +0100 +@@ -425,9 +425,9 @@ + _REGISTER_CLOCK("imx-uart.0", NULL, uart1_clk) + _REGISTER_CLOCK("imx-uart.1", NULL, uart2_clk) + _REGISTER_CLOCK("imx-uart.2", NULL, uart3_clk) +- _REGISTER_CLOCK("mxc-ehci.0", NULL, usbotg_clk) +- _REGISTER_CLOCK("mxc-ehci.1", NULL, usbotg_clk) +- _REGISTER_CLOCK("mxc-ehci.2", NULL, usbotg_clk) ++ _REGISTER_CLOCK("mxc-ehci.0", "usb", usbotg_clk) ++ _REGISTER_CLOCK("mxc-ehci.1", "usb", usbotg_clk) ++ _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) + _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) + _REGISTER_CLOCK(NULL, "max", max_clk) + _REGISTER_CLOCK(NULL, "audmux", audmux_clk) diff --git a/recipes/linux/linux-2.6.31/pcm043/0096-i.MX35-implement-get_rate-for-usb-otg-clock.patch b/recipes/linux/linux-2.6.31/pcm043/0096-i.MX35-implement-get_rate-for-usb-otg-clock.patch new file mode 100644 index 0000000000..0190641ce2 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0096-i.MX35-implement-get_rate-for-usb-otg-clock.patch @@ -0,0 +1,54 @@ +From d7463937b967203cee097b96593ef46cb9ea23a7 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Tue, 21 Apr 2009 14:50:53 +0200 +Subject: [PATCH 096/101] i.MX35: implement get_rate for usb otg clock + +Signed-off-by: Sascha Hauer + +rebased to 2.6.31.6 +Signed-off-by: Jan Weitzel +--- + arch/arm/mach-mx3/clock-imx35.c | 16 +++++++++++++++- + 1 files changed, 15 insertions(+), 1 deletions(-) + +Index: linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/clock-imx35.c 2009-12-08 09:49:47.949859691 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c 2009-12-08 09:56:24.498623255 +0100 +@@ -273,6 +273,19 @@ + return rate / get_3_3_div((pdr2 >> 16) & 0x3f); + } + ++static unsigned long get_rate_otg(struct clk *clk) ++{ ++ unsigned long pdr4 = __raw_readl(CCM_BASE + CCM_PDR4); ++ unsigned long rate; ++ ++ if (pdr4 & (1 << 9)) ++ rate = get_rate_arm(); ++ else ++ rate = get_rate_ppll(); ++ ++ return rate / get_3_3_div((pdr4 >> 22) & 0x3f); ++} ++ + static unsigned long get_rate_ipg_per(struct clk *clk) + { + unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); +@@ -365,7 +378,7 @@ + DEFINE_CLOCK(uart1_clk, 0, CCM_CGR2, 16, get_rate_uart, NULL); + DEFINE_CLOCK(uart2_clk, 1, CCM_CGR2, 18, get_rate_uart, NULL); + DEFINE_CLOCK(uart3_clk, 2, CCM_CGR2, 20, get_rate_uart, NULL); +-DEFINE_CLOCK(usbotg_clk, 0, CCM_CGR2, 22, NULL, NULL); ++DEFINE_CLOCK(usbotg_clk, 0, CCM_CGR2, 22, get_rate_otg, NULL); + DEFINE_CLOCK(wdog_clk, 0, CCM_CGR2, 24, NULL, NULL); + DEFINE_CLOCK(max_clk, 0, CCM_CGR2, 26, NULL, NULL); + DEFINE_CLOCK(audmux_clk, 0, CCM_CGR2, 30, NULL, NULL); +@@ -428,6 +441,7 @@ + _REGISTER_CLOCK("mxc-ehci.0", "usb", usbotg_clk) + _REGISTER_CLOCK("mxc-ehci.1", "usb", usbotg_clk) + _REGISTER_CLOCK("mxc-ehci.2", "usb", usbotg_clk) ++ _REGISTER_CLOCK("fsl-usb2-udc", "usb", usbotg_clk) + _REGISTER_CLOCK("imx-wdt.0", NULL, wdog_clk) + _REGISTER_CLOCK(NULL, "max", max_clk) + _REGISTER_CLOCK(NULL, "audmux", audmux_clk) diff --git a/recipes/linux/linux-2.6.31/pcm043/0097-fsl-udc-driver-add-mx35-support.patch b/recipes/linux/linux-2.6.31/pcm043/0097-fsl-udc-driver-add-mx35-support.patch new file mode 100644 index 0000000000..3467895ba8 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/0097-fsl-udc-driver-add-mx35-support.patch @@ -0,0 +1,83 @@ +From 56e08cdd4fde350a1e43c69b084fa618df1e2af7 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Tue, 21 Apr 2009 14:52:45 +0200 +Subject: [PATCH 097/101] fsl udc driver: add mx35 support + +Signed-off-by: Sascha Hauer +--- + drivers/usb/gadget/fsl_mx3_udc.c | 31 ++++++++++++++++++++----------- + 1 files changed, 20 insertions(+), 11 deletions(-) + +diff --git a/drivers/usb/gadget/fsl_mx3_udc.c b/drivers/usb/gadget/fsl_mx3_udc.c +index 4bc2bf3..20a802e 100644 +--- a/drivers/usb/gadget/fsl_mx3_udc.c ++++ b/drivers/usb/gadget/fsl_mx3_udc.c +@@ -17,6 +17,8 @@ + #include + #include + ++#include ++ + static struct clk *mxc_ahb_clk; + static struct clk *mxc_usb_clk; + +@@ -28,14 +30,16 @@ int fsl_udc_clk_init(struct platform_device *pdev) + + pdata = pdev->dev.platform_data; + +- mxc_ahb_clk = clk_get(&pdev->dev, "usb_ahb"); +- if (IS_ERR(mxc_ahb_clk)) +- return PTR_ERR(mxc_ahb_clk); ++ if (!cpu_is_mx35()) { ++ mxc_ahb_clk = clk_get(&pdev->dev, "usb_ahb"); ++ if (IS_ERR(mxc_ahb_clk)) ++ return PTR_ERR(mxc_ahb_clk); + +- ret = clk_enable(mxc_ahb_clk); +- if (ret < 0) { +- dev_err(&pdev->dev, "clk_enable(\"usb_ahb\") failed\n"); +- goto eenahb; ++ ret = clk_enable(mxc_ahb_clk); ++ if (ret < 0) { ++ dev_err(&pdev->dev, "clk_enable(\"usb_ahb\") failed\n"); ++ goto eenahb; ++ } + } + + /* make sure USB_CLK is running at 60 MHz +/- 1000 Hz */ +@@ -50,6 +54,7 @@ int fsl_udc_clk_init(struct platform_device *pdev) + if (pdata->phy_mode != FSL_USB2_PHY_ULPI && + (freq < 59999000 || freq > 60001000)) { + dev_err(&pdev->dev, "USB_CLK=%lu, should be 60MHz\n", freq); ++ ret = -EINVAL; + goto eclkrate; + } + +@@ -66,9 +71,11 @@ eclkrate: + clk_put(mxc_usb_clk); + mxc_usb_clk = NULL; + egusb: +- clk_disable(mxc_ahb_clk); ++ if (!cpu_is_mx35()) ++ clk_disable(mxc_ahb_clk); + eenahb: +- clk_put(mxc_ahb_clk); ++ if (!cpu_is_mx35()) ++ clk_put(mxc_ahb_clk); + return ret; + } + +@@ -90,6 +97,8 @@ void fsl_udc_clk_release(void) + clk_disable(mxc_usb_clk); + clk_put(mxc_usb_clk); + } +- clk_disable(mxc_ahb_clk); +- clk_put(mxc_ahb_clk); ++ if (!cpu_is_mx35()) { ++ clk_disable(mxc_ahb_clk); ++ clk_put(mxc_ahb_clk); ++ } + } +-- +1.6.2.1 + diff --git a/recipes/linux/linux-2.6.31/pcm043/Update-PCM043-board-support.patch b/recipes/linux/linux-2.6.31/pcm043/Update-PCM043-board-support.patch new file mode 100644 index 0000000000..117611e920 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/Update-PCM043-board-support.patch @@ -0,0 +1,134 @@ +Based on +From 0d4941a59648e16d99624cf16812d5ae83986187 Mon Sep 17 00:00:00 2001 +From: Sascha Hauer +Date: Fri, 6 Feb 2009 15:42:26 +0100 +Subject: [PATCH 026/101] [ARM] MX35: Add PCM043 board support + +add USB support + +Signed-off-by: Jan Weitzel +--- +Index: linux-2.6.31.6/arch/arm/mach-mx3/pcm043.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/pcm043.c 2009-12-10 11:59:35.364772725 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/pcm043.c 2009-12-10 13:45:21.484650731 +0100 +@@ -28,6 +28,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -44,6 +45,7 @@ + #include + #include + #include ++#include + #include + #include + +@@ -207,6 +209,9 @@ + MX35_PAD_D3_REV__IPU_DISPB_D3_REV, + MX35_PAD_D3_CLS__IPU_DISPB_D3_CLS, + MX35_PAD_D3_SPL__IPU_DISPB_D3_SPL, ++ /* USB host */ ++ MX35_PAD_I2C2_CLK__USB_TOP_USBH2_PWR, ++ MX35_PAD_I2C2_DAT__USB_TOP_USBH2_OC, + /* SSI */ + MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS, + MX35_PAD_STXD4__AUDMUX_AUD4_TXD, +@@ -214,6 +219,66 @@ + MX35_PAD_SCK4__AUDMUX_AUD4_TXC, + }; + ++static int pcm043_usbh1_init(struct platform_device *pdev) ++{ ++ unsigned int tmp; ++ ++ tmp = readl(IO_ADDRESS(MX35_OTG_BASE_ADDR) + 0x600); ++ tmp &= ~((3 << 21) | (1 << 2) | (1 << 16)); ++ tmp |= (1 << 4) | (2 << 21) | (1 << 19) | (1 << 12) | (1 << 6) | (1 << 5); ++ writel(tmp, IO_ADDRESS(MX35_OTG_BASE_ADDR) + 0x600); ++ ++ tmp = readl(IO_ADDRESS(MX35_OTG_BASE_ADDR) + 0x584); ++ tmp |= (3 << 30); ++ writel(tmp, IO_ADDRESS(MX35_OTG_BASE_ADDR) + 0x584); ++ ++ return 0; ++} ++ ++static struct mxc_usbh_platform_data usbh1_pdata = { ++ .init = pcm043_usbh1_init, ++}; ++ ++static int pcm043_otg_init(struct platform_device *pdev) ++{ ++ unsigned int tmp; ++ ++ tmp = readl(IO_ADDRESS(MX35_OTG_BASE_ADDR) + 0x600); ++ tmp &= ~(3 << 29); ++ tmp |= (2 << 29); ++ writel(tmp, IO_ADDRESS(MX35_OTG_BASE_ADDR) + 0x600); ++ ++ tmp = readl(IO_ADDRESS(MX35_OTG_BASE_ADDR) + 0x184); ++ tmp &= ~(3 << 30); ++ writel(tmp, IO_ADDRESS(MX35_OTG_BASE_ADDR) + 0x184); ++ ++ return 0; ++} ++ ++static struct mxc_usbh_platform_data otg_pdata = { ++ .init = pcm043_otg_init, ++}; ++ ++static struct fsl_usb2_platform_data usb_data = { ++ .operating_mode = FSL_USB2_DR_DEVICE, ++ .phy_mode = FSL_USB2_PHY_UTMI, ++}; ++ ++static int otg_mode_host; ++ ++static int __init pcm043_otg_mode(char *options) ++{ ++ if (!strcmp(options, "host")) ++ otg_mode_host = 1; ++ else if (!strcmp(options, "device")) ++ otg_mode_host = 0; ++ else ++ pr_info("pcm043_otg_mode neither \"host\" nor \"device\". " ++ "Defaulting to device\n"); ++ return 0; ++} ++__setup("pcm043_otg_mode=", pcm043_otg_mode); ++ + #define AC97_GPIO_TXFS (1 * 32 + 31) + #define AC97_GPIO_TXD (1 * 32 + 28) + #define AC97_GPIO_RESET (1 * 32 + 0) +@@ -299,6 +364,8 @@ + */ + static void __init mxc_board_init(void) + { ++ unsigned int tmp; ++ + mxc_iomux_v3_setup_multiple_pads(pcm043_pads, ARRAY_SIZE(pcm043_pads)); + + mxc_audmux_v2_configure_port(3, +@@ -329,6 +396,17 @@ + + mxc_register_device(&mx3_ipu, &mx3_ipu_data); + mxc_register_device(&mx3_fb, &mx3fb_pdata); ++ ++ tmp = readl(IO_ADDRESS(MX35_OTG_BASE_ADDR) + 0x600); ++ tmp &= ~(3 << 29); ++ tmp |= (2 << 29); ++ writel(tmp, IO_ADDRESS(MX35_OTG_BASE_ADDR) + 0x600); ++ ++ mxc_register_device(&mxc_usbh1, &usbh1_pdata); ++ if (otg_mode_host) ++ mxc_register_device(&mxc_otg, &otg_pdata); ++ else ++ mxc_register_device(&mxc_otg_udc_device, &usb_data); + } + + static void __init pcm043_timer_init(void) diff --git a/recipes/linux/linux-2.6.31/pcm043/add-led-gpio.patch b/recipes/linux/linux-2.6.31/pcm043/add-led-gpio.patch new file mode 100644 index 0000000000..cbd096b2e3 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/add-led-gpio.patch @@ -0,0 +1,17 @@ +Add support for the LED on baseboard + +Signed-off-by: Jan Weitzel +--- +Index: linux-2.6.31.6/arch/arm/mach-mx3/pcm043.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/pcm043.c 2009-12-11 13:56:03.526475695 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/pcm043.c 2009-12-11 13:58:49.894701069 +0100 +@@ -250,6 +250,8 @@ + MX35_PAD_SCK4__AUDMUX_AUD4_TXC, + /* 1-Wire*/ + MX35_PAD_GPIO1_0__OWIRE_LINE, ++ /* GPIO */ ++ MX35_PAD_ATA_CS0__GPIO2_6, + /* CAN */ + MX35_PAD_SD2_DATA2__CAN1_RXCAN, + MX35_PAD_SD2_DATA3__CAN1_TXCAN, diff --git a/recipes/linux/linux-2.6.31/pcm043/add_mmc.diff b/recipes/linux/linux-2.6.31/pcm043/add_mmc.diff new file mode 100644 index 0000000000..fb3a3c77f5 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/add_mmc.diff @@ -0,0 +1,1396 @@ +From: Wolfram Sang +Subject: add preliminary MMC support to MX35 + +WIP! + +This is the backported SDHCI-driver from top of tree with the modifications needed +to make the esdhc-version from FSL work with it. There are still some issues left, +especially stylewise, this is more a proof-of-concept for the approach. + +WIP! + +Not suitable for upstream (yet). + +Signed-off-by: Wolfram Sang +--- + arch/arm/mach-mx3/pcm043.c | 30 ++++ + drivers/mmc/host/Kconfig | 137 +++++++++++++++++++-- + drivers/mmc/host/Makefile | 14 +- + drivers/mmc/host/sdhci-esdhc.c | 215 +++++++++++++++++++++++++++++++++ + drivers/mmc/host/sdhci-of-core.c | 231 ++++++++++++++++++++++++++++++++++++ + drivers/mmc/host/sdhci-of-hlwd.c | 65 ++++++++++ + drivers/mmc/host/sdhci-of.h | 37 +++++ + drivers/mmc/host/sdhci-pltfm-core.c | 187 +++++++++++++++++++++++++++++ + drivers/mmc/host/sdhci.c | 56 ++++---- + drivers/mmc/host/sdhci.h | 51 ++++--- + 10 files changed, 964 insertions(+), 59 deletions(-) + +Index: drivers/mmc/host/Kconfig +=================================================================== +--- drivers/mmc/host/Kconfig.orig ++++ drivers/mmc/host/Kconfig +@@ -44,6 +44,19 @@ config MMC_SDHCI_IO_ACCESSORS + This is silent Kconfig symbol that is selected by the drivers that + need to overwrite SDHCI IO memory accessors. + ++config MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER ++ bool ++ select MMC_SDHCI_IO_ACCESSORS ++ help ++ This option is selected by drivers running on big endian hosts ++ and performing I/O to a SDHCI controller through a bus that ++ implements a hardware byte swapper using a 32-bit datum. ++ This endian mapping mode is called "data invariance" and ++ has the effect of scrambling the addresses and formats of data ++ accessed in sizes other than the datum size. ++ ++ This is the case for the Freescale eSDHC and Nintendo Wii SDHCI. ++ + config MMC_SDHCI_PCI + tristate "SDHCI support on PCI bus" + depends on MMC_SDHCI && PCI +@@ -72,14 +85,33 @@ config MMC_RICOH_MMC + + If unsure, say Y. + ++config MMC_SDHCI_ESDHC ++ bool "SDHCI support for the Freescale eSDHC controller" ++ depends on MMC_SDHCI_OF || MMC_SDHCI_PLTFM ++ select MMC_SDHCI_IO_ACCESSORS ++ select MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER if MMC_SDHCI_OF ++ help ++ This selects the Freescale eSDHC controller support. ++ ++ If unsure, say N. ++ + config MMC_SDHCI_OF + tristate "SDHCI support on OpenFirmware platforms" + depends on MMC_SDHCI && PPC_OF +- select MMC_SDHCI_IO_ACCESSORS + help + This selects the OF support for Secure Digital Host Controller +- Interfaces. So far, only the Freescale eSDHC controller is known +- to exist on OF platforms. ++ Interfaces. ++ ++ If unsure, say N. ++ ++config MMC_SDHCI_OF_HLWD ++ bool "SDHCI OF support for the Nintendo Wii SDHCI controllers" ++ depends on MMC_SDHCI_OF ++ select MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER ++ help ++ This selects the Secure Digital Host Controller Interface (SDHCI) ++ found in the "Hollywood" chipset of the Nintendo Wii video game ++ console. + + If unsure, say N. + +@@ -132,11 +164,11 @@ config MMC_OMAP + + config MMC_OMAP_HS + tristate "TI OMAP High Speed Multimedia Card Interface support" +- depends on ARCH_OMAP2430 || ARCH_OMAP3 ++ depends on ARCH_OMAP2430 || ARCH_OMAP3 || ARCH_OMAP4 + help + This selects the TI OMAP High Speed Multimedia card Interface. +- If you have an OMAP2430 or OMAP3 board with a Multimedia Card slot, +- say Y or M here. ++ If you have an OMAP2430 or OMAP3 board or OMAP4 board with a ++ Multimedia Card slot, say Y or M here. + + If unsure, say N. + +@@ -160,6 +192,12 @@ config MMC_AU1X + + If unsure, say N. + ++choice ++ prompt "Atmel SD/MMC Driver" ++ default MMC_ATMELMCI if AVR32 ++ help ++ Choose which driver to use for the Atmel MCI Silicon ++ + config MMC_AT91 + tristate "AT91 SD/MMC Card Interface support" + depends on ARCH_AT91 +@@ -170,17 +208,19 @@ config MMC_AT91 + + config MMC_ATMELMCI + tristate "Atmel Multimedia Card Interface support" +- depends on AVR32 ++ depends on AVR32 || ARCH_AT91 + help + This selects the Atmel Multimedia Card Interface driver. If +- you have an AT32 (AVR32) platform with a Multimedia Card +- slot, say Y or M here. ++ you have an AT32 (AVR32) or AT91 platform with a Multimedia ++ Card slot, say Y or M here. + + If unsure, say N. + ++endchoice ++ + config MMC_ATMELMCI_DMA + bool "Atmel MCI DMA support (EXPERIMENTAL)" +- depends on MMC_ATMELMCI && DMA_ENGINE && EXPERIMENTAL ++ depends on MMC_ATMELMCI && AVR32 && DMA_ENGINE && EXPERIMENTAL + help + Say Y here to have the Atmel MCI driver use a DMA engine to + do data transfers and thus increase the throughput and +@@ -199,6 +239,13 @@ config MMC_IMX + + If unsure, say N. + ++config MMC_MSM7X00A ++ tristate "Qualcomm MSM 7X00A SDCC Controller Support" ++ depends on MMC && ARCH_MSM ++ help ++ This provides support for the SD/MMC cell found in the ++ MSM 7X00A controllers from Qualcomm. ++ + config MMC_MXC + tristate "Freescale i.MX2/3 Multimedia Card Interface support" + depends on ARCH_MXC +@@ -236,6 +283,14 @@ config MMC_MVSDIO + To compile this driver as a module, choose M here: the + module will be called mvsdio. + ++config MMC_DAVINCI ++ tristate "TI DAVINCI Multimedia Card Interface support" ++ depends on ARCH_DAVINCI ++ help ++ This selects the TI DAVINCI Multimedia card Interface. ++ If you have an DAVINCI board with a Multimedia Card slot, ++ say Y or M here. If unsure, say N. ++ + config MMC_SPI + tristate "MMC/SD/SDIO over SPI" + depends on SPI_MASTER && !HIGHMEM && HAS_DMA +@@ -261,6 +316,47 @@ config MMC_S3C + + If unsure, say N. + ++config MMC_S3C_HW_SDIO_IRQ ++ bool "Hardware support for SDIO IRQ" ++ depends on MMC_S3C ++ help ++ Enable the hardware support for SDIO interrupts instead of using ++ the generic polling code. ++ ++choice ++ prompt "Samsung S3C SD/MMC transfer code" ++ depends on MMC_S3C ++ ++config MMC_S3C_PIO ++ bool "Use PIO transfers only" ++ help ++ Use PIO to transfer data between memory and the hardware. ++ ++ PIO is slower than DMA as it requires CPU instructions to ++ move the data. This has been the traditional default for ++ the S3C MCI driver. ++ ++config MMC_S3C_DMA ++ bool "Use DMA transfers only (EXPERIMENTAL)" ++ depends on EXPERIMENTAL ++ help ++ Use DMA to transfer data between memory and the hardare. ++ ++ Currently, the DMA support in this driver seems to not be ++ working properly and needs to be debugged before this ++ option is useful. ++ ++config MMC_S3C_PIODMA ++ bool "Support for both PIO and DMA (EXPERIMENTAL)" ++ help ++ Compile both the PIO and DMA transfer routines into the ++ driver and let the platform select at run-time which one ++ is best. ++ ++ See notes for the DMA option. ++ ++endchoice ++ + config MMC_SDRICOH_CS + tristate "MMC/SD driver for Ricoh Bay1Controllers (EXPERIMENTAL)" + depends on EXPERIMENTAL && PCI && PCMCIA +@@ -273,7 +369,7 @@ config MMC_SDRICOH_CS + + config MMC_TMIO + tristate "Toshiba Mobile IO Controller (TMIO) MMC/SD function support" +- depends on MFD_TMIO || MFD_ASIC3 ++ depends on MFD_TMIO || MFD_ASIC3 || SUPERH + help + This provides support for the SD/MMC cell found in TC6393XB, + T7L66XB and also HTC ASIC3 +@@ -301,3 +397,22 @@ config MMC_VIA_SDMMC + If you have a controller with this interface, say Y or M here. + + If unsure, say N. ++ ++config SDH_BFIN ++ tristate "Blackfin Secure Digital Host support" ++ depends on MMC && ((BF54x && !BF544) || (BF51x && !BF512)) ++ help ++ If you say yes here you will get support for the Blackfin on-chip ++ Secure Digital Host interface. This includes support for MMC and ++ SD cards. ++ ++ To compile this driver as a module, choose M here: the ++ module will be called bfin_sdh. ++ ++ If unsure, say N. ++ ++config SDH_BFIN_MISSING_CMD_PULLUP_WORKAROUND ++ bool "Blackfin EZkit Missing SDH_CMD Pull Up Resistor Workaround" ++ depends on SDH_BFIN ++ help ++ If you say yes here SD-Cards may work on the EZkit. +Index: drivers/mmc/host/Makefile +=================================================================== +--- drivers/mmc/host/Makefile.orig ++++ drivers/mmc/host/Makefile +@@ -13,8 +13,6 @@ obj-$(CONFIG_MMC_MXC) += mxcmmc.o + obj-$(CONFIG_MMC_SDHCI) += sdhci.o + obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o + obj-$(CONFIG_MMC_RICOH_MMC) += ricoh_mmc.o +-obj-$(CONFIG_MMC_SDHCI_OF) += sdhci-of.o +-obj-$(CONFIG_MMC_SDHCI_PLTFM) += sdhci-pltfm.o + obj-$(CONFIG_MMC_SDHCI_S3C) += sdhci-s3c.o + obj-$(CONFIG_MMC_WBSD) += wbsd.o + obj-$(CONFIG_MMC_AU1X) += au1xmmc.o +@@ -23,7 +21,9 @@ obj-$(CONFIG_MMC_OMAP_HS) += omap_hsmmc. + obj-$(CONFIG_MMC_AT91) += at91_mci.o + obj-$(CONFIG_MMC_ATMELMCI) += atmel-mci.o + obj-$(CONFIG_MMC_TIFM_SD) += tifm_sd.o ++obj-$(CONFIG_MMC_MSM7X00A) += msm_sdcc.o + obj-$(CONFIG_MMC_MVSDIO) += mvsdio.o ++obj-$(CONFIG_MMC_DAVINCI) += davinci_mmc.o + obj-$(CONFIG_MMC_SPI) += mmc_spi.o + ifeq ($(CONFIG_OF),y) + obj-$(CONFIG_MMC_SPI) += of_mmc_spi.o +@@ -33,6 +33,16 @@ obj-$(CONFIG_MMC_SDRICOH_CS) += sdricoh_ + obj-$(CONFIG_MMC_TMIO) += tmio_mmc.o + obj-$(CONFIG_MMC_CB710) += cb710-mmc.o + obj-$(CONFIG_MMC_VIA_SDMMC) += via-sdmmc.o ++obj-$(CONFIG_SDH_BFIN) += bfin_sdh.o ++ ++obj-$(CONFIG_MMC_SDHCI_OF) += sdhci-of.o ++sdhci-of-y := sdhci-of-core.o ++sdhci-of-$(CONFIG_MMC_SDHCI_ESDHC) += sdhci-esdhc.o ++sdhci-of-$(CONFIG_MMC_SDHCI_OF_HLWD) += sdhci-of-hlwd.o ++ ++obj-$(CONFIG_MMC_SDHCI_PLTFM) += sdhci-pltfm.o ++sdhci-pltfm-y := sdhci-pltfm-core.o ++sdhci-pltfm-$(CONFIG_MMC_SDHCI_ESDHC) += sdhci-esdhc.o + + ifeq ($(CONFIG_CB710_DEBUG),y) + CFLAGS-cb710-mmc += -DDEBUG +Index: drivers/mmc/host/sdhci-esdhc.c +=================================================================== +--- /dev/null ++++ drivers/mmc/host/sdhci-esdhc.c +@@ -0,0 +1,215 @@ ++/* ++ * Freescale eSDHC controller driver. ++ * ++ * Copyright (c) 2007 Freescale Semiconductor, Inc. ++ * Copyright (c) 2009 MontaVista Software, Inc. ++ * ++ * Authors: Xiaobo Xie ++ * Anton Vorontsov ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or (at ++ * your option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include "sdhci-of.h" ++#include "sdhci.h" ++ ++/* ++ * Ops and quirks for the Freescale eSDHC controller. ++ */ ++ ++#define ESDHC_DMA_SYSCTL 0x40c ++#define ESDHC_DMA_SNOOP 0x00000040 ++ ++#define ESDHC_SYSTEM_CONTROL 0x2c ++#define ESDHC_CLOCK_MASK 0x0000fff0 ++#define ESDHC_PREDIV_SHIFT 8 ++#define ESDHC_DIVIDER_SHIFT 4 ++#define ESDHC_CLOCK_PEREN 0x00000004 ++#define ESDHC_CLOCK_HCKEN 0x00000002 ++#define ESDHC_CLOCK_IPGEN 0x00000001 ++ ++#define ESDHC_HOST_CONTROL_RES 0x05 ++ ++#ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER ++ ++static u16 esdhc_readw_be(struct sdhci_host *host, int reg) ++{ ++ u16 ret; ++ ++ if (unlikely(reg == SDHCI_HOST_VERSION)) ++ ret = in_be16(host->ioaddr + reg); ++ else ++ ret = sdhci_be32bs_readw(host, reg); ++ return ret; ++} ++ ++static void esdhc_writew_be(struct sdhci_host *host, u16 val, int reg) ++{ ++ if (reg == SDHCI_BLOCK_SIZE) { ++ /* ++ * Two last DMA bits are reserved, and first one is used for ++ * non-standard blksz of 4096 bytes that we don't support ++ * yet. So clear the DMA boundary bits. ++ */ ++ val &= ~SDHCI_MAKE_BLKSZ(0x7, 0); ++ } ++ sdhci_be32bs_writew(host, val, reg); ++} ++ ++static void esdhc_writeb_be(struct sdhci_host *host, u8 val, int reg) ++{ ++ /* Prevent SDHCI core from writing reserved bits (e.g. HISPD). */ ++ if (reg == SDHCI_HOST_CONTROL) ++ val &= ~ESDHC_HOST_CONTROL_RES; ++ sdhci_be32bs_writeb(host, val, reg); ++} ++ ++static int esdhc_enable_dma(struct sdhci_host *host) ++{ ++ u32 temp = sdhci_readl(host, ESDHC_DMA_SYSCTL); ++ ++ temp |= ESDHC_DMA_SNOOP; ++ sdhci_writel(host, temp, ESDHC_DMA_SYSCTL); ++ return 0; ++} ++ ++#else ++ ++static inline void esdhc_clrset_le(struct sdhci_host *host, u32 mask, u32 val, int reg) ++{ ++ void __iomem *base = host->ioaddr + (reg & ~0x3); ++ u32 shift = (reg & 0x3) * 8; ++ ++ writel(((readl(base) & ~(mask << shift)) | (val << shift)), base); ++} ++ ++static u16 esdhc_readw_le(struct sdhci_host *host, int reg) ++{ ++ if (unlikely(reg == SDHCI_HOST_VERSION)) ++ reg ^= 2; ++ ++ return readw(host->ioaddr + reg); ++} ++ ++static void esdhc_writew_le(struct sdhci_host *host, u16 val, int reg) ++{ ++ static u16 ugh; ++ ++ switch (reg) { ++ case SDHCI_TRANSFER_MODE: ++ /* ++ * Postpone this write, we must do it together with a ++ * command write that is down below. ++ */ ++ //of_host->xfer_mode_shadow = val; ++ ugh = val; ++ return; ++ case SDHCI_COMMAND: ++ writel(val << 16 | ugh, host->ioaddr + SDHCI_TRANSFER_MODE); ++ return; ++ case SDHCI_BLOCK_SIZE: ++ val &= ~SDHCI_MAKE_BLKSZ(0x7, 0); ++ break; ++ } ++ esdhc_clrset_le(host, 0xffff, val, reg); ++} ++ ++static void esdhc_writeb_le(struct sdhci_host *host, u8 val, int reg) ++{ ++ switch (reg) { ++ case SDHCI_POWER_CONTROL: ++ /* FSL put the DMA bits there, so skip :( */ ++ return; ++ case SDHCI_HOST_CONTROL: ++ val &= 0x07; ++ val |= 0x20; ++ break; ++ } ++ esdhc_clrset_le(host, 0xff, val, reg); ++} ++ ++#endif /* CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER */ ++ ++static void esdhc_set_clock(struct sdhci_host *host, unsigned int clock) ++{ ++ int pre_div = 2; ++ int div = 1; ++ u32 temp; ++ ++ temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL); ++ temp &= ~(ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN | ESDHC_CLOCK_MASK); ++ sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL); ++ ++ if (clock == 0) ++ goto out; ++ ++ while (host->max_clk / pre_div / 16 > clock && pre_div < 256) ++ pre_div *= 2; ++ ++ while (host->max_clk / pre_div / div > clock && div < 16) ++ div++; ++ ++ dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d (%02x %02x)\n", ++ clock, host->max_clk / pre_div / div, pre_div, div); ++ ++ pre_div >>= 1; ++ div--; ++ ++ temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL); ++ temp |= (ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN | ++ div << ESDHC_DIVIDER_SHIFT | pre_div << ESDHC_PREDIV_SHIFT); ++ sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL); ++ mdelay(100); ++out: ++ host->clock = clock; ++} ++ ++static unsigned int esdhc_get_max_clock(struct sdhci_host *host) ++{ ++ struct sdhci_of_host *of_host = sdhci_priv(host); ++ ++ return of_host->clock; ++} ++ ++static unsigned int esdhc_get_min_clock(struct sdhci_host *host) ++{ ++ struct sdhci_of_host *of_host = sdhci_priv(host); ++ ++ return of_host->clock / 256 / 16; ++} ++ ++struct sdhci_quirk_data sdhci_esdhc = { ++ .quirks = SDHCI_QUIRK_FORCE_BLK_SZ_2048 | ++ SDHCI_QUIRK_BROKEN_CARD_DETECTION | ++ SDHCI_QUIRK_NO_BUSY_IRQ | ++ SDHCI_QUIRK_NONSTANDARD_CLOCK | ++ SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK | ++ SDHCI_QUIRK_PIO_NEEDS_DELAY | ++ SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET | ++ SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | ++ SDHCI_QUIRK_NO_CARD_NO_RESET, ++ .ops = { ++#ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER ++ .custom_readl = sdhci_be32bs_readl, ++ .custom_readw = esdhc_readw_be, ++ .custom_readb = sdhci_be32bs_readb, ++ .custom_writel = sdhci_be32bs_writel, ++ .custom_writew = esdhc_writew_be, ++ .custom_writeb = esdhc_writeb_be, ++ .enable_dma = esdhc_enable_dma, ++#else ++ .custom_readw = esdhc_readw_le, ++ .custom_writew = esdhc_writew_le, ++ .custom_writeb = esdhc_writeb_le, ++#endif ++ .set_clock = esdhc_set_clock, ++ .get_max_clock = esdhc_get_max_clock, ++ .get_min_clock = esdhc_get_min_clock, ++ }, ++}; +Index: drivers/mmc/host/sdhci-of-core.c +=================================================================== +--- /dev/null ++++ drivers/mmc/host/sdhci-of-core.c +@@ -0,0 +1,231 @@ ++/* ++ * OpenFirmware bindings for Secure Digital Host Controller Interface. ++ * ++ * Copyright (c) 2007 Freescale Semiconductor, Inc. ++ * Copyright (c) 2009 MontaVista Software, Inc. ++ * ++ * Authors: Xiaobo Xie ++ * Anton Vorontsov ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or (at ++ * your option) any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "sdhci-of.h" ++#include "sdhci.h" ++ ++#ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER ++ ++/* ++ * These accessors are designed for big endian hosts doing I/O to ++ * little endian controllers incorporating a 32-bit hardware byte swapper. ++ */ ++ ++u32 sdhci_be32bs_readl(struct sdhci_host *host, int reg) ++{ ++ return in_be32(host->ioaddr + reg); ++} ++ ++u16 sdhci_be32bs_readw(struct sdhci_host *host, int reg) ++{ ++ return in_be16(host->ioaddr + (reg ^ 0x2)); ++} ++ ++u8 sdhci_be32bs_readb(struct sdhci_host *host, int reg) ++{ ++ return in_8(host->ioaddr + (reg ^ 0x3)); ++} ++ ++void sdhci_be32bs_writel(struct sdhci_host *host, u32 val, int reg) ++{ ++ out_be32(host->ioaddr + reg, val); ++} ++ ++void sdhci_be32bs_writew(struct sdhci_host *host, u16 val, int reg) ++{ ++ struct sdhci_of_host *of_host = sdhci_priv(host); ++ int base = reg & ~0x3; ++ int shift = (reg & 0x2) * 8; ++ ++ switch (reg) { ++ case SDHCI_TRANSFER_MODE: ++ /* ++ * Postpone this write, we must do it together with a ++ * command write that is down below. ++ */ ++ of_host->xfer_mode_shadow = val; ++ return; ++ case SDHCI_COMMAND: ++ sdhci_be32bs_writel(host, val << 16 | of_host->xfer_mode_shadow, ++ SDHCI_TRANSFER_MODE); ++ return; ++ } ++ clrsetbits_be32(host->ioaddr + base, 0xffff << shift, val << shift); ++} ++ ++void sdhci_be32bs_writeb(struct sdhci_host *host, u8 val, int reg) ++{ ++ int base = reg & ~0x3; ++ int shift = (reg & 0x3) * 8; ++ ++ clrsetbits_be32(host->ioaddr + base , 0xff << shift, val << shift); ++} ++#endif /* CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER */ ++ ++#ifdef CONFIG_PM ++ ++static int sdhci_of_suspend(struct of_device *ofdev, pm_message_t state) ++{ ++ struct sdhci_host *host = dev_get_drvdata(&ofdev->dev); ++ ++ return mmc_suspend_host(host->mmc, state); ++} ++ ++static int sdhci_of_resume(struct of_device *ofdev) ++{ ++ struct sdhci_host *host = dev_get_drvdata(&ofdev->dev); ++ ++ return mmc_resume_host(host->mmc); ++} ++ ++#else ++ ++#define sdhci_of_suspend NULL ++#define sdhci_of_resume NULL ++ ++#endif ++ ++static bool __devinit sdhci_of_wp_inverted(struct device_node *np) ++{ ++ if (of_get_property(np, "sdhci,wp-inverted", NULL)) ++ return true; ++ ++ /* Old device trees don't have the wp-inverted property. */ ++ return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds); ++} ++ ++static int __devinit sdhci_of_probe(struct of_device *ofdev, ++ const struct of_device_id *match) ++{ ++ struct device_node *np = ofdev->node; ++ struct sdhci_quirk_data *sdhci_of_data = match->data; ++ struct sdhci_host *host; ++ struct sdhci_of_host *of_host; ++ const u32 *clk; ++ int size; ++ int ret; ++ ++ if (!of_device_is_available(np)) ++ return -ENODEV; ++ ++ host = sdhci_alloc_host(&ofdev->dev, sizeof(*of_host)); ++ if (IS_ERR(host)) ++ return -ENOMEM; ++ ++ of_host = sdhci_priv(host); ++ dev_set_drvdata(&ofdev->dev, host); ++ ++ host->ioaddr = of_iomap(np, 0); ++ if (!host->ioaddr) { ++ ret = -ENOMEM; ++ goto err_addr_map; ++ } ++ ++ host->irq = irq_of_parse_and_map(np, 0); ++ if (!host->irq) { ++ ret = -EINVAL; ++ goto err_no_irq; ++ } ++ ++ host->hw_name = dev_name(&ofdev->dev); ++ if (sdhci_of_data) { ++ host->quirks = sdhci_of_data->quirks; ++ host->ops = &sdhci_of_data->ops; ++ } ++ ++ if (of_get_property(np, "sdhci,1-bit-only", NULL)) ++ host->quirks |= SDHCI_QUIRK_FORCE_1_BIT_DATA; ++ ++ if (sdhci_of_wp_inverted(np)) ++ host->quirks |= SDHCI_QUIRK_INVERTED_WRITE_PROTECT; ++ ++ clk = of_get_property(np, "clock-frequency", &size); ++ if (clk && size == sizeof(*clk) && *clk) ++ of_host->clock = *clk; ++ ++ ret = sdhci_add_host(host); ++ if (ret) ++ goto err_add_host; ++ ++ return 0; ++ ++err_add_host: ++ irq_dispose_mapping(host->irq); ++err_no_irq: ++ iounmap(host->ioaddr); ++err_addr_map: ++ sdhci_free_host(host); ++ return ret; ++} ++ ++static int __devexit sdhci_of_remove(struct of_device *ofdev) ++{ ++ struct sdhci_host *host = dev_get_drvdata(&ofdev->dev); ++ ++ sdhci_remove_host(host, 0); ++ sdhci_free_host(host); ++ irq_dispose_mapping(host->irq); ++ iounmap(host->ioaddr); ++ return 0; ++} ++ ++static const struct of_device_id sdhci_of_match[] = { ++#ifdef CONFIG_MMC_SDHCI_OF_ESDHC ++ { .compatible = "fsl,mpc8379-esdhc", .data = &sdhci_esdhc, }, ++ { .compatible = "fsl,mpc8536-esdhc", .data = &sdhci_esdhc, }, ++ { .compatible = "fsl,esdhc", .data = &sdhci_esdhc, }, ++#endif ++#ifdef CONFIG_MMC_SDHCI_OF_HLWD ++ { .compatible = "nintendo,hollywood-sdhci", .data = &sdhci_hlwd, }, ++#endif ++ { .compatible = "generic-sdhci", }, ++ {}, ++}; ++MODULE_DEVICE_TABLE(of, sdhci_of_match); ++ ++static struct of_platform_driver sdhci_of_driver = { ++ .driver.name = "sdhci-of", ++ .match_table = sdhci_of_match, ++ .probe = sdhci_of_probe, ++ .remove = __devexit_p(sdhci_of_remove), ++ .suspend = sdhci_of_suspend, ++ .resume = sdhci_of_resume, ++}; ++ ++static int __init sdhci_of_init(void) ++{ ++ return of_register_platform_driver(&sdhci_of_driver); ++} ++module_init(sdhci_of_init); ++ ++static void __exit sdhci_of_exit(void) ++{ ++ of_unregister_platform_driver(&sdhci_of_driver); ++} ++module_exit(sdhci_of_exit); ++ ++MODULE_DESCRIPTION("Secure Digital Host Controller Interface OF driver"); ++MODULE_AUTHOR("Xiaobo Xie , " ++ "Anton Vorontsov "); ++MODULE_LICENSE("GPL"); +Index: drivers/mmc/host/sdhci-of-hlwd.c +=================================================================== +--- /dev/null ++++ drivers/mmc/host/sdhci-of-hlwd.c +@@ -0,0 +1,65 @@ ++/* ++ * drivers/mmc/host/sdhci-of-hlwd.c ++ * ++ * Nintendo Wii Secure Digital Host Controller Interface. ++ * Copyright (C) 2009 The GameCube Linux Team ++ * Copyright (C) 2009 Albert Herranz ++ * ++ * Based on sdhci-of-esdhc.c ++ * ++ * Copyright (c) 2007 Freescale Semiconductor, Inc. ++ * Copyright (c) 2009 MontaVista Software, Inc. ++ * ++ * Authors: Xiaobo Xie ++ * Anton Vorontsov ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or (at ++ * your option) any later version. ++ */ ++ ++#include ++#include ++#include "sdhci-of.h" ++#include "sdhci.h" ++ ++/* ++ * Ops and quirks for the Nintendo Wii SDHCI controllers. ++ */ ++ ++/* ++ * We need a small delay after each write, or things go horribly wrong. ++ */ ++#define SDHCI_HLWD_WRITE_DELAY 5 /* usecs */ ++ ++static void sdhci_hlwd_writel(struct sdhci_host *host, u32 val, int reg) ++{ ++ sdhci_be32bs_writel(host, val, reg); ++ udelay(SDHCI_HLWD_WRITE_DELAY); ++} ++ ++static void sdhci_hlwd_writew(struct sdhci_host *host, u16 val, int reg) ++{ ++ sdhci_be32bs_writew(host, val, reg); ++ udelay(SDHCI_HLWD_WRITE_DELAY); ++} ++ ++static void sdhci_hlwd_writeb(struct sdhci_host *host, u8 val, int reg) ++{ ++ sdhci_be32bs_writeb(host, val, reg); ++ udelay(SDHCI_HLWD_WRITE_DELAY); ++} ++ ++struct sdhci_quirk_data sdhci_hlwd = { ++ .quirks = SDHCI_QUIRK_32BIT_DMA_ADDR | ++ SDHCI_QUIRK_32BIT_DMA_SIZE, ++ .ops = { ++ .readl = sdhci_be32bs_readl, ++ .readw = sdhci_be32bs_readw, ++ .readb = sdhci_be32bs_readb, ++ .writel = sdhci_hlwd_writel, ++ .writew = sdhci_hlwd_writew, ++ .writeb = sdhci_hlwd_writeb, ++ }, ++}; +Index: drivers/mmc/host/sdhci-of.h +=================================================================== +--- /dev/null ++++ drivers/mmc/host/sdhci-of.h +@@ -0,0 +1,37 @@ ++/* ++ * OpenFirmware bindings for Secure Digital Host Controller Interface. ++ * ++ * Copyright (c) 2007 Freescale Semiconductor, Inc. ++ * Copyright (c) 2009 MontaVista Software, Inc. ++ * ++ * Authors: Xiaobo Xie ++ * Anton Vorontsov ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or (at ++ * your option) any later version. ++ */ ++ ++#ifndef __SDHCI_OF_H ++#define __SDHCI_OF_H ++ ++#include ++#include "sdhci.h" ++ ++struct sdhci_of_host { ++ unsigned int clock; ++ u16 xfer_mode_shadow; ++}; ++ ++extern u32 sdhci_be32bs_readl(struct sdhci_host *host, int reg); ++extern u16 sdhci_be32bs_readw(struct sdhci_host *host, int reg); ++extern u8 sdhci_be32bs_readb(struct sdhci_host *host, int reg); ++extern void sdhci_be32bs_writel(struct sdhci_host *host, u32 val, int reg); ++extern void sdhci_be32bs_writew(struct sdhci_host *host, u16 val, int reg); ++extern void sdhci_be32bs_writeb(struct sdhci_host *host, u8 val, int reg); ++ ++extern struct sdhci_quirk_data sdhci_esdhc; ++extern struct sdhci_quirk_data sdhci_hlwd; ++ ++#endif /* __SDHCI_OF_H */ +Index: drivers/mmc/host/sdhci-pltfm-core.c +=================================================================== +--- /dev/null ++++ drivers/mmc/host/sdhci-pltfm-core.c +@@ -0,0 +1,187 @@ ++/* ++ * sdhci-pltfm.c Support for SDHCI platform devices ++ * Copyright (c) 2009 Intel Corporation ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++/* Supports: ++ * SDHCI platform devices ++ * ++ * Inspired by sdhci-pci.c, by Pierre Ossman ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "sdhci.h" ++#include "sdhci-of.h" ++ ++/*****************************************************************************\ ++ * * ++ * Device probing/removal * ++ * * ++\*****************************************************************************/ ++ ++static int __devinit sdhci_pltfm_probe(struct platform_device *pdev) ++{ ++ struct sdhci_host *host; ++ struct resource *iomem; ++ struct sdhci_of_host *of_host; ++ struct clk *clk; ++ int ret; ++ struct sdhci_quirk_data *quirk = (struct sdhci_quirk_data *) ++ platform_get_device_id(pdev)->driver_data; ++ ++ BUG_ON(pdev == NULL); ++ ++ iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ if (!iomem) { ++ ret = -ENOMEM; ++ goto err; ++ } ++ ++ if (resource_size(iomem) != 0x100) ++ dev_err(&pdev->dev, "Invalid iomem size. You may " ++ "experience problems.\n"); ++ ++ if (pdev->dev.parent) ++ host = sdhci_alloc_host(pdev->dev.parent, sizeof(struct sdhci_of_host)); ++ else ++ host = sdhci_alloc_host(&pdev->dev, sizeof(struct sdhci_of_host)); ++ ++ if (IS_ERR(host)) { ++ ret = PTR_ERR(host); ++ goto err; ++ } ++ ++ of_host = sdhci_priv(host); ++ dev_set_drvdata(&pdev->dev, host); ++ ++ host->hw_name = "platform"; ++ host->irq = platform_get_irq(pdev, 0); ++ ++ if (!request_mem_region(iomem->start, resource_size(iomem), ++ mmc_hostname(host->mmc))) { ++ dev_err(&pdev->dev, "cannot request region\n"); ++ ret = -EBUSY; ++ goto err_request; ++ } ++ ++ host->ioaddr = ioremap(iomem->start, resource_size(iomem)); ++ if (!host->ioaddr) { ++ dev_err(&pdev->dev, "failed to remap registers\n"); ++ ret = -ENOMEM; ++ goto err_remap; ++ } ++ ++ if (quirk) { ++ host->quirks = quirk->quirks; ++ host->ops = &quirk->ops; ++ } ++ ++ clk = clk_get(NULL, "sdhc"); ++ if (IS_ERR(clk)) { ++ dev_err(&pdev->dev, "clk err\n"); ++ return -ENODEV; ++ } ++ clk_enable(clk); ++ of_host->clock = clk_get_rate(clk); ++ ++ ret = sdhci_add_host(host); ++ if (ret) ++ goto err_add_host; ++ ++ platform_set_drvdata(pdev, host); ++ dev_info(&pdev->dev, "registered as %s\n", platform_get_device_id(pdev)->name); ++ ++ return 0; ++ ++err_add_host: ++ iounmap(host->ioaddr); ++err_remap: ++ release_mem_region(iomem->start, resource_size(iomem)); ++err_request: ++ sdhci_free_host(host); ++err: ++ printk(KERN_ERR"Probing of sdhci-pltfm failed: %d\n", ret); ++ return ret; ++} ++ ++static int __devexit sdhci_pltfm_remove(struct platform_device *pdev) ++{ ++ struct sdhci_host *host = platform_get_drvdata(pdev); ++ struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ int dead; ++ u32 scratch; ++ ++ dead = 0; ++ scratch = readl(host->ioaddr + SDHCI_INT_STATUS); ++ if (scratch == (u32)-1) ++ dead = 1; ++ ++ sdhci_remove_host(host, dead); ++ iounmap(host->ioaddr); ++ release_mem_region(iomem->start, resource_size(iomem)); ++ sdhci_free_host(host); ++ platform_set_drvdata(pdev, NULL); ++ ++ return 0; ++} ++ ++static struct platform_device_id sdhci_id_table[] = { ++ { "sdhci", 0, }, ++#ifdef CONFIG_MMC_SDHCI_ESDHC ++ { "sdhci-esdhc", (kernel_ulong_t)&sdhci_esdhc, }, ++#endif ++ { }, ++}; ++MODULE_DEVICE_TABLE(platform, sdhci_id_table); ++ ++static struct platform_driver sdhci_pltfm_driver = { ++ .driver = { ++ .name = "sdhci", ++ .owner = THIS_MODULE, ++ }, ++ .probe = sdhci_pltfm_probe, ++ .remove = __devexit_p(sdhci_pltfm_remove), ++ .id_table = sdhci_id_table, ++}; ++ ++/*****************************************************************************\ ++ * * ++ * Driver init/exit * ++ * * ++\*****************************************************************************/ ++ ++static int __init sdhci_drv_init(void) ++{ ++ return platform_driver_register(&sdhci_pltfm_driver); ++} ++ ++static void __exit sdhci_drv_exit(void) ++{ ++ platform_driver_unregister(&sdhci_pltfm_driver); ++} ++ ++module_init(sdhci_drv_init); ++module_exit(sdhci_drv_exit); ++ ++MODULE_DESCRIPTION("Secure Digital Host Controller Interface platform driver"); ++MODULE_AUTHOR("Mocean Laboratories "); ++MODULE_LICENSE("GPL v2"); +Index: drivers/mmc/host/sdhci.c +=================================================================== +--- drivers/mmc/host/sdhci.c.orig ++++ drivers/mmc/host/sdhci.c +@@ -58,7 +58,7 @@ static void sdhci_dumpregs(struct sdhci_ + sdhci_readw(host, SDHCI_TRANSFER_MODE)); + printk(KERN_DEBUG DRIVER_NAME ": Present: 0x%08x | Host ctl: 0x%08x\n", + sdhci_readl(host, SDHCI_PRESENT_STATE), +- sdhci_readb(host, SDHCI_HOST_CONTROL)); ++ sdhci_readl(host, SDHCI_HOST_CONTROL)); + printk(KERN_DEBUG DRIVER_NAME ": Power: 0x%08x | Blk gap: 0x%08x\n", + sdhci_readb(host, SDHCI_POWER_CONTROL), + sdhci_readb(host, SDHCI_BLOCK_GAP_CONTROL)); +@@ -591,6 +591,9 @@ static u8 sdhci_calc_timeout(struct sdhc + target_timeout = data->timeout_ns / 1000 + + data->timeout_clks / host->clock; + ++ if (host->quirks & SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK) ++ host->timeout_clk = host->clock / 1000; ++ + /* + * Figure out needed cycles. + * We do this in steps in order to fit inside a 32 bit int. +@@ -652,7 +655,7 @@ static void sdhci_prepare_data(struct sd + count = sdhci_calc_timeout(host, data); + sdhci_writeb(host, count, SDHCI_TIMEOUT_CONTROL); + +- if (host->flags & SDHCI_USE_DMA) ++ if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) + host->flags |= SDHCI_REQ_USE_DMA; + + /* +@@ -991,8 +994,8 @@ static void sdhci_set_clock(struct sdhci + clk |= SDHCI_CLOCK_INT_EN; + sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); + +- /* Wait max 10 ms */ +- timeout = 10; ++ /* Wait max 20 ms */ ++ timeout = 20; + while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) + & SDHCI_CLOCK_INT_STABLE)) { + if (timeout == 0) { +@@ -1597,7 +1600,7 @@ int sdhci_resume_host(struct sdhci_host + { + int ret; + +- if (host->flags & SDHCI_USE_DMA) { ++ if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { + if (host->ops->enable_dma) + host->ops->enable_dma(host); + } +@@ -1678,23 +1681,20 @@ int sdhci_add_host(struct sdhci_host *ho + caps = sdhci_readl(host, SDHCI_CAPABILITIES); + + if (host->quirks & SDHCI_QUIRK_FORCE_DMA) +- host->flags |= SDHCI_USE_DMA; +- else if (!(caps & SDHCI_CAN_DO_DMA)) +- DBG("Controller doesn't have DMA capability\n"); ++ host->flags |= SDHCI_USE_SDMA; ++ else if (!(caps & SDHCI_CAN_DO_SDMA)) ++ DBG("Controller doesn't have SDMA capability\n"); + else +- host->flags |= SDHCI_USE_DMA; ++ host->flags |= SDHCI_USE_SDMA; + + if ((host->quirks & SDHCI_QUIRK_BROKEN_DMA) && +- (host->flags & SDHCI_USE_DMA)) { ++ (host->flags & SDHCI_USE_SDMA)) { + DBG("Disabling DMA as it is marked broken\n"); +- host->flags &= ~SDHCI_USE_DMA; ++ host->flags &= ~SDHCI_USE_SDMA; + } + +- if (host->flags & SDHCI_USE_DMA) { +- if ((host->version >= SDHCI_SPEC_200) && +- (caps & SDHCI_CAN_DO_ADMA2)) +- host->flags |= SDHCI_USE_ADMA; +- } ++ if ((host->version >= SDHCI_SPEC_200) && (caps & SDHCI_CAN_DO_ADMA2)) ++ host->flags |= SDHCI_USE_ADMA; + + if ((host->quirks & SDHCI_QUIRK_BROKEN_ADMA) && + (host->flags & SDHCI_USE_ADMA)) { +@@ -1702,13 +1702,14 @@ int sdhci_add_host(struct sdhci_host *ho + host->flags &= ~SDHCI_USE_ADMA; + } + +- if (host->flags & SDHCI_USE_DMA) { ++ if (host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA)) { + if (host->ops->enable_dma) { + if (host->ops->enable_dma(host)) { + printk(KERN_WARNING "%s: No suitable DMA " + "available. Falling back to PIO.\n", + mmc_hostname(mmc)); +- host->flags &= ~(SDHCI_USE_DMA | SDHCI_USE_ADMA); ++ host->flags &= ++ ~(SDHCI_USE_SDMA | SDHCI_USE_ADMA); + } + } + } +@@ -1736,7 +1737,7 @@ int sdhci_add_host(struct sdhci_host *ho + * mask, but PIO does not need the hw shim so we set a new + * mask here in that case. + */ +- if (!(host->flags & SDHCI_USE_DMA)) { ++ if (!(host->flags & (SDHCI_USE_SDMA | SDHCI_USE_ADMA))) { + host->dma_mask = DMA_BIT_MASK(64); + mmc_dev(host->mmc)->dma_mask = &host->dma_mask; + } +@@ -1757,13 +1758,15 @@ int sdhci_add_host(struct sdhci_host *ho + host->timeout_clk = + (caps & SDHCI_TIMEOUT_CLK_MASK) >> SDHCI_TIMEOUT_CLK_SHIFT; + if (host->timeout_clk == 0) { +- if (!host->ops->get_timeout_clock) { ++ if (host->ops->get_timeout_clock) { ++ host->timeout_clk = host->ops->get_timeout_clock(host); ++ } else if (!(host->quirks & ++ SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK)) { + printk(KERN_ERR + "%s: Hardware doesn't specify timeout clock " + "frequency.\n", mmc_hostname(mmc)); + return -ENODEV; + } +- host->timeout_clk = host->ops->get_timeout_clock(host); + } + if (caps & SDHCI_TIMEOUT_CLK_UNIT) + host->timeout_clk *= 1000; +@@ -1772,7 +1775,8 @@ int sdhci_add_host(struct sdhci_host *ho + * Set host parameters. + */ + mmc->ops = &sdhci_ops; +- if (host->ops->get_min_clock) ++ if (host->quirks & SDHCI_QUIRK_NONSTANDARD_CLOCK && ++ host->ops->set_clock && host->ops->get_min_clock) + mmc->f_min = host->ops->get_min_clock(host); + else + mmc->f_min = host->max_clk / 256; +@@ -1810,7 +1814,7 @@ int sdhci_add_host(struct sdhci_host *ho + */ + if (host->flags & SDHCI_USE_ADMA) + mmc->max_hw_segs = 128; +- else if (host->flags & SDHCI_USE_DMA) ++ else if (host->flags & SDHCI_USE_SDMA) + mmc->max_hw_segs = 1; + else /* PIO */ + mmc->max_hw_segs = 128; +@@ -1893,10 +1897,10 @@ int sdhci_add_host(struct sdhci_host *ho + + mmc_add_host(mmc); + +- printk(KERN_INFO "%s: SDHCI controller on %s [%s] using %s%s\n", ++ printk(KERN_INFO "%s: SDHCI controller on %s [%s] using %s\n", + mmc_hostname(mmc), host->hw_name, dev_name(mmc_dev(mmc)), +- (host->flags & SDHCI_USE_ADMA)?"A":"", +- (host->flags & SDHCI_USE_DMA)?"DMA":"PIO"); ++ (host->flags & SDHCI_USE_ADMA) ? "ADMA" : ++ (host->flags & SDHCI_USE_SDMA) ? "DMA" : "PIO"); + + sdhci_enable_card_detection(host); + +Index: drivers/mmc/host/sdhci.h +=================================================================== +--- drivers/mmc/host/sdhci.h.orig ++++ drivers/mmc/host/sdhci.h +@@ -8,6 +8,8 @@ + * the Free Software Foundation; either version 2 of the License, or (at + * your option) any later version. + */ ++#ifndef __SDHCI_H ++#define __SDHCI_H + + #include + #include +@@ -143,7 +145,7 @@ + #define SDHCI_CAN_DO_ADMA2 0x00080000 + #define SDHCI_CAN_DO_ADMA1 0x00100000 + #define SDHCI_CAN_DO_HISPD 0x00200000 +-#define SDHCI_CAN_DO_DMA 0x00400000 ++#define SDHCI_CAN_DO_SDMA 0x00400000 + #define SDHCI_CAN_VDD_330 0x01000000 + #define SDHCI_CAN_VDD_300 0x02000000 + #define SDHCI_CAN_VDD_180 0x04000000 +@@ -232,6 +234,8 @@ struct sdhci_host { + #define SDHCI_QUIRK_FORCE_1_BIT_DATA (1<<22) + /* Controller needs 10ms delay between applying power and clock */ + #define SDHCI_QUIRK_DELAY_AFTER_POWER (1<<23) ++/* Controller uses SDCLK instead of TMCLK for data timeouts */ ++#define SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK (1<<24) + + int irq; /* Device IRQ */ + void __iomem * ioaddr; /* Mapped address */ +@@ -250,7 +254,7 @@ struct sdhci_host { + spinlock_t lock; /* Mutex */ + + int flags; /* Host attributes */ +-#define SDHCI_USE_DMA (1<<0) /* Host is DMA capable */ ++#define SDHCI_USE_SDMA (1<<0) /* Host is SDMA capable */ + #define SDHCI_USE_ADMA (1<<1) /* Host is ADMA capable */ + #define SDHCI_REQ_USE_DMA (1<<2) /* Use DMA for this req. */ + #define SDHCI_DEVICE_DEAD (1<<3) /* Device unresponsive */ +@@ -290,12 +294,12 @@ struct sdhci_host { + + struct sdhci_ops { + #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS +- u32 (*readl)(struct sdhci_host *host, int reg); +- u16 (*readw)(struct sdhci_host *host, int reg); +- u8 (*readb)(struct sdhci_host *host, int reg); +- void (*writel)(struct sdhci_host *host, u32 val, int reg); +- void (*writew)(struct sdhci_host *host, u16 val, int reg); +- void (*writeb)(struct sdhci_host *host, u8 val, int reg); ++ u32 (*custom_readl)(struct sdhci_host *host, int reg); ++ u16 (*custom_readw)(struct sdhci_host *host, int reg); ++ u8 (*custom_readb)(struct sdhci_host *host, int reg); ++ void (*custom_writel)(struct sdhci_host *host, u32 val, int reg); ++ void (*custom_writew)(struct sdhci_host *host, u16 val, int reg); ++ void (*custom_writeb)(struct sdhci_host *host, u8 val, int reg); + #endif + + void (*set_clock)(struct sdhci_host *host, unsigned int clock); +@@ -310,48 +314,48 @@ struct sdhci_ops { + + static inline void sdhci_writel(struct sdhci_host *host, u32 val, int reg) + { +- if (unlikely(host->ops->writel)) +- host->ops->writel(host, val, reg); ++ if (unlikely(host->ops->custom_writel)) ++ host->ops->custom_writel(host, val, reg); + else + writel(val, host->ioaddr + reg); + } + + static inline void sdhci_writew(struct sdhci_host *host, u16 val, int reg) + { +- if (unlikely(host->ops->writew)) +- host->ops->writew(host, val, reg); ++ if (unlikely(host->ops->custom_writew)) ++ host->ops->custom_writew(host, val, reg); + else + writew(val, host->ioaddr + reg); + } + + static inline void sdhci_writeb(struct sdhci_host *host, u8 val, int reg) + { +- if (unlikely(host->ops->writeb)) +- host->ops->writeb(host, val, reg); ++ if (unlikely(host->ops->custom_writeb)) ++ host->ops->custom_writeb(host, val, reg); + else + writeb(val, host->ioaddr + reg); + } + + static inline u32 sdhci_readl(struct sdhci_host *host, int reg) + { +- if (unlikely(host->ops->readl)) +- return host->ops->readl(host, reg); ++ if (unlikely(host->ops->custom_readl)) ++ return host->ops->custom_readl(host, reg); + else + return readl(host->ioaddr + reg); + } + + static inline u16 sdhci_readw(struct sdhci_host *host, int reg) + { +- if (unlikely(host->ops->readw)) +- return host->ops->readw(host, reg); ++ if (unlikely(host->ops->custom_readw)) ++ return host->ops->custom_readw(host, reg); + else + return readw(host->ioaddr + reg); + } + + static inline u8 sdhci_readb(struct sdhci_host *host, int reg) + { +- if (unlikely(host->ops->readb)) +- return host->ops->readb(host, reg); ++ if (unlikely(host->ops->custom_readb)) ++ return host->ops->custom_readb(host, reg); + else + return readb(host->ioaddr + reg); + } +@@ -390,6 +394,11 @@ static inline u8 sdhci_readb(struct sdhc + + #endif /* CONFIG_MMC_SDHCI_IO_ACCESSORS */ + ++struct sdhci_quirk_data { ++ unsigned int quirks; ++ struct sdhci_ops ops; ++}; ++ + extern struct sdhci_host *sdhci_alloc_host(struct device *dev, + size_t priv_size); + extern void sdhci_free_host(struct sdhci_host *host); +@@ -406,3 +415,5 @@ extern void sdhci_remove_host(struct sdh + extern int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state); + extern int sdhci_resume_host(struct sdhci_host *host); + #endif ++ ++#endif /* __SDHCI_H */ +Index: arch/arm/mach-mx3/pcm043.c +=================================================================== +--- arch/arm/mach-mx3/pcm043.c.orig ++++ arch/arm/mach-mx3/pcm043.c +@@ -279,6 +279,34 @@ static struct pad_desc pcm043_pads[] = { + MX35_PAD_SD2_DATA1__GPIO2_3, + MX35_PAD_TX5_RX0__CAN2_TXCAN, + MX35_PAD_TX4_RX1__CAN2_RXCAN, ++ /* esdhc */ ++ MX35_PAD_SD1_CMD__ESDHC1_CMD, ++ MX35_PAD_SD1_CLK__ESDHC1_CLK, ++ MX35_PAD_SD1_DATA0__ESDHC1_DAT0, ++ MX35_PAD_SD1_DATA1__ESDHC1_DAT1, ++ MX35_PAD_SD1_DATA2__ESDHC1_DAT2, ++ MX35_PAD_SD1_DATA3__ESDHC1_DAT3, ++}; ++ ++#include ++ ++static struct resource sdhci_resources[] = { ++ { ++ .start = 0x53fb4000, ++ .end = 0x53fb4000 + 0xff, ++ .flags = IORESOURCE_MEM, ++ }, { ++ .start = MX35_INT_MMC_SDHC1, ++ .end = MX35_INT_MMC_SDHC1, ++ .flags = IORESOURCE_IRQ, ++ }, ++}; ++ ++static struct platform_device sdhci_device = { ++ .name = "sdhci-esdhc", ++ .id = 0, ++ .num_resources = ARRAY_SIZE(sdhci_resources), ++ .resource = sdhci_resources, + }; + + static int pcm043_usbh1_init(struct platform_device *pdev) +@@ -516,6 +544,8 @@ static void __init mxc_board_init(void) + gpio_request (32 + 3, "can"); + gpio_direction_output (32 + 3, 1); + gpio_set_value (32 + 3, 1); ++ ++ platform_device_register(&sdhci_device); + } + + static void __init pcm043_timer_init(void) diff --git a/recipes/linux/linux-2.6.31/pcm043/fix_can.patch b/recipes/linux/linux-2.6.31/pcm043/fix_can.patch new file mode 100644 index 0000000000..c8ca166f99 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/fix_can.patch @@ -0,0 +1,16 @@ +Fix problem with send and recive of can packets. + +Signed-off-by: Teresa Gámez +--- +Index: linux-2.6.31.6/drivers/net/can/flexcan/drv.c +=================================================================== +--- linux-2.6.31.6.orig/drivers/net/can/flexcan/drv.c 2010-09-16 14:35:16.596367462 +0200 ++++ linux-2.6.31.6/drivers/net/can/flexcan/drv.c 2010-09-16 14:36:07.946447792 +0200 +@@ -136,7 +136,6 @@ + reg &= ~__MCR_AEN; + + reg |= (flexcan->maxmb << __MCR_MAX_MB_OFFSET); +- reg |= __MCR_DOZE | __MCR_MAX_IDAM_C; + __raw_writel(reg, flexcan->io_base + CAN_HW_REG_MCR); + } + diff --git a/recipes/linux/linux-2.6.31/pcm043/fix_clock_calc.patch b/recipes/linux/linux-2.6.31/pcm043/fix_clock_calc.patch new file mode 100644 index 0000000000..244ab06565 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/fix_clock_calc.patch @@ -0,0 +1,27 @@ +Fix claculation, if "ARM sel" is set a 532Mhz PLL result to a 399MHz ARM clock +Also th AHB clock is based on this ARM clock + +Signed-off-by: Jan Weitzel +--- +Index: linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/clock-imx35.c 2009-12-15 13:15:35.335242329 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c 2009-12-15 13:17:59.496030198 +0100 +@@ -155,7 +155,7 @@ + + aad = &clk_consumer[(pdr0 >> 16) & 0xf]; + if (aad->sel) +- fref = fref * 2 / 3; ++ fref = fref * 3 / 4; + + return fref / aad->arm; + } +@@ -164,7 +164,7 @@ + { + unsigned long pdr0 = __raw_readl(CCM_BASE + CCM_PDR0); + struct arm_ahb_div *aad; +- unsigned long fref = get_rate_mpll(); ++ unsigned long fref = get_rate_arm(); + + aad = &clk_consumer[(pdr0 >> 16) & 0xf]; + diff --git a/recipes/linux/linux-2.6.31/pcm043/fix_max7301.patch b/recipes/linux/linux-2.6.31/pcm043/fix_max7301.patch new file mode 100644 index 0000000000..a6854e1feb --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/fix_max7301.patch @@ -0,0 +1,28 @@ +Fix wrong setting of portconfig register. +mask size is 2bits, so shift must be twice offset +direction input value is 2 + +Signed-off-by: Jan Weitzel +--- +Index: linux-2.6.28/drivers/gpio/max7301.c +=================================================================== +--- linux-2.6.28.orig/drivers/gpio/max7301.c ++++ linux-2.6.28/drivers/gpio/max7301.c +@@ -123,7 +123,7 @@ static int max7301_direction_input(struc + + /* Standard GPIO API doesn't support pull-ups, has to be extended. + * Hard-coding no pollup for now. */ +- *config = (*config & ~(3 << (offset & 3))) | (1 << (offset & 3)); ++ *config = (*config & ~(3 << (2*(offset & 3)))) | (2 << (2*(offset & 3))); + + ret = max7301_write(ts->spi, 0x08 + (offset >> 2), *config); + +@@ -157,7 +157,7 @@ static int max7301_direction_output(stru + + mutex_lock(&ts->lock); + +- *config = (*config & ~(3 << (offset & 3))) | (1 << (offset & 3)); ++ *config = (*config & ~(3 << (2*(offset & 3)))) | (1 << (2*(offset & 3))); + + ret = __max7301_set(ts, offset, value); + diff --git a/recipes/linux/linux-2.6.31/pcm043/fix_mmc_for_highspeed.diff b/recipes/linux/linux-2.6.31/pcm043/fix_mmc_for_highspeed.diff new file mode 100644 index 0000000000..2f1834b038 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/fix_mmc_for_highspeed.diff @@ -0,0 +1,63 @@ +From: Wolfram Sang +Subject: fix esdhc-WIP for highspeed-cards + +Freescale has really messed up the control register, so we have to take care +the SDHCI-core does not accidently set standard bits which have a different +meaning here :( Previously highspeed (not necessarily HC) cards caused +a wrong bus-width setting. + +Also, mark the ADMA-engine as broken because FSL themselves don't know yet if +it is really working. Shouldn't harm much as MX35 has just ADMA1 anyway. + +Furthermore, disable multi-block accesses. This might affect the throughput, +but this part seems to be broken, too, according to the errata. We better play +safe here, it really helps with some cards. + +Signed-off-by: Wolfram Sang +--- + drivers/mmc/host/sdhci-esdhc.c | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +Index: linux-2.6.31.6/drivers/mmc/host/sdhci-esdhc.c +=================================================================== +--- linux-2.6.31.6.orig/drivers/mmc/host/sdhci-esdhc.c 2010-09-13 11:13:43.476519017 +0200 ++++ linux-2.6.31.6/drivers/mmc/host/sdhci-esdhc.c 2010-09-13 11:13:43.496492387 +0200 +@@ -34,6 +34,7 @@ + #define ESDHC_CLOCK_HCKEN 0x00000002 + #define ESDHC_CLOCK_IPGEN 0x00000001 + ++#define ESDHC_HOST_CONTROL_LE 0x20 + #define ESDHC_HOST_CONTROL_RES 0x05 + + #ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER +@@ -127,8 +128,10 @@ + /* FSL put the DMA bits there, so skip :( */ + return; + case SDHCI_HOST_CONTROL: +- val &= 0x07; +- val |= 0x20; ++ /* FSL really messed up here, so we can just keep those */ ++ val &= SDHCI_CTRL_LED | SDHCI_CTRL_4BITBUS; ++ /* and ensure the endianess */ ++ val |= ESDHC_HOST_CONTROL_LE; + break; + } + esdhc_clrset_le(host, 0xff, val, reg); +@@ -163,7 +166,7 @@ + + temp = sdhci_readl(host, ESDHC_SYSTEM_CONTROL); + temp |= (ESDHC_CLOCK_IPGEN | ESDHC_CLOCK_HCKEN | ESDHC_CLOCK_PEREN | +- div << ESDHC_DIVIDER_SHIFT | pre_div << ESDHC_PREDIV_SHIFT); ++ (div << ESDHC_DIVIDER_SHIFT) | (pre_div << ESDHC_PREDIV_SHIFT)); + sdhci_writel(host, temp, ESDHC_SYSTEM_CONTROL); + mdelay(100); + out: +@@ -193,6 +196,8 @@ + SDHCI_QUIRK_PIO_NEEDS_DELAY | + SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET | + SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | ++ SDHCI_QUIRK_NO_MULTIBLOCK | ++ SDHCI_QUIRK_BROKEN_ADMA | + SDHCI_QUIRK_NO_CARD_NO_RESET, + .ops = { + #ifdef CONFIG_MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER diff --git a/recipes/linux/linux-2.6.31/pcm043/fix_oob_layout.diff b/recipes/linux/linux-2.6.31/pcm043/fix_oob_layout.diff new file mode 100644 index 0000000000..d8e1b1d22f --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/fix_oob_layout.diff @@ -0,0 +1,67 @@ +--- + drivers/mtd/nand/mxc_nand_v2.c | 24 +++++++++++++++++++++--- + 1 file changed, 21 insertions(+), 3 deletions(-) + +Index: drivers/mtd/nand/mxc_nand_v2.c +=================================================================== +--- drivers/mtd/nand/mxc_nand_v2.c.orig ++++ drivers/mtd/nand/mxc_nand_v2.c +@@ -1,6 +1,7 @@ + /* + * Copyright 2004-2008 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2009 Sascha Hauer, kernel@pengutronix.de ++ * Copyright 2009 Juergen Beisert, kernel@pengutronix.de + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License +@@ -130,6 +131,19 @@ struct mxc_nand_host { + * User ECC + * + * For pages larger than 512 bytes, n structures of this type will be used. ++ * ++ * Bad block detection: ++ * As long we do not overwrite the badblock_pattern structure member, the ++ * framework will use the description 'smallpage_flashbased' in file ++ * nand_bbt.c for page sizes with 512 bytes and description ++ * 'largepage_flashbased' in the same file for page sizes larger than ++ * 512 bytes. ++ * ++ * 'smallpage_flashbased' describes the bad block marker in the byte at offset ++ * five, 'largepage_flashbased' describes theses markers at offset 0 and 1 ++ * in the OOB. ++ * ++ * So, we must keep these bytes free for bad block marker usage. + */ + + /* OOB description for 512 byte pages with 16 byte OOB */ +@@ -139,7 +153,9 @@ static struct nand_ecclayout nand_hw_ecc + 7, 8, 9, 10, 11, 12, 13, 14, 15 + }, + .oobfree = { +- {.offset = 0, .length = 7} ++ {.offset = 0, .length = 5}, ++ /* keep offset 5 free for bad block marker usage */ ++ {.offset = 6, .length = 1} + } + }; + +@@ -153,7 +169,8 @@ static struct nand_ecclayout nand_hw_ecc + 55, 56, 57, 58, 59, 60, 61, 62, 63 + }, + .oobfree = { +- {.offset = 0, .length = 7}, ++ /* keep offset 0,1 free for bad block marker usage */ ++ {.offset = 2, .length = 5}, + {.offset = 16, .length = 7}, + {.offset = 32, .length = 7}, + {.offset = 48, .length = 7} +@@ -175,7 +192,8 @@ static struct nand_ecclayout nand_hw_ecc + /* 119, 120, 121, 122, 123, 124, 125, 126, 127 */ + }, + .oobfree = { +- {.offset = 0, .length = 7}, ++ /* keep offset 0,1 free for bad block marker usage */ ++ {.offset = 2, .length = 5}, + {.offset = 16, .length = 7}, + {.offset = 32, .length = 7}, + {.offset = 48, .length = 7}, diff --git a/recipes/linux/linux-2.6.31/pcm043/fix_owire_clk.patch b/recipes/linux/linux-2.6.31/pcm043/fix_owire_clk.patch new file mode 100644 index 0000000000..4d50ab4739 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/fix_owire_clk.patch @@ -0,0 +1,17 @@ +Fix the owire_clk dev_id + +Signed-off-by: Jan Weitzel +--- +Index: linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/clock-imx35.c 2009-12-14 16:50:18.915973719 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c 2009-12-14 16:51:06.835549332 +0100 +@@ -453,7 +453,7 @@ + _REGISTER_CLOCK(NULL, "kpp", kpp_clk) + _REGISTER_CLOCK(NULL, "mlb", mlb_clk) + _REGISTER_CLOCK(NULL, "mshc", mshc_clk) +- _REGISTER_CLOCK("mxc_w1", NULL, owire_clk) ++ _REGISTER_CLOCK("mxc_w1.0", NULL, owire_clk) + _REGISTER_CLOCK(NULL, "pwm", pwm_clk) + _REGISTER_CLOCK(NULL, "rngc", rngc_clk) + _REGISTER_CLOCK(NULL, "rtc", rtc_clk) diff --git a/recipes/linux/linux-2.6.31/pcm043/linux-2.6.31.6-flexcan.patch b/recipes/linux/linux-2.6.31/pcm043/linux-2.6.31.6-flexcan.patch new file mode 100644 index 0000000000..a3c37cb8e2 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/linux-2.6.31.6-flexcan.patch @@ -0,0 +1,2168 @@ +Add support for i.MX35 on-board CAN +Signed-off-by: Sven Dyroff +--- +Index: linux-2.6.31.6/drivers/net/can/flexcan/Makefile +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.31.6/drivers/net/can/flexcan/Makefile 2009-12-16 17:34:40.585687608 +0100 +@@ -0,0 +1,3 @@ ++obj-$(CONFIG_CAN_FLEXCAN) += flexcan.o ++ ++flexcan-y := dev.o drv.o mbm.o +Index: linux-2.6.31.6/drivers/net/can/flexcan/dev.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.31.6/drivers/net/can/flexcan/dev.c 2009-12-16 17:34:40.585687608 +0100 +@@ -0,0 +1,675 @@ ++/* ++ * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. ++ */ ++ ++/* ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/*! ++ * @file dev.c ++ * ++ * @brief Driver for Freescale CAN Controller FlexCAN. ++ * ++ * @ingroup can ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include "flexcan.h" ++ ++enum { ++// FLEXCAN_ATTR_STATE = 0, ++// FLEXCAN_ATTR_BITRATE, ++// FLEXCAN_ATTR_BR_PRESDIV, ++// FLEXCAN_ATTR_BR_RJW, ++// FLEXCAN_ATTR_BR_PROPSEG, ~~~~~sven~~~~~ ++// FLEXCAN_ATTR_BR_PSEG1, ++// FLEXCAN_ATTR_BR_PSEG2, ++ FLEXCAN_ATTR_BR_CLKSRC = 0, ++ FLEXCAN_ATTR_MAXMB, ++ FLEXCAN_ATTR_XMIT_MAXMB, ++ FLEXCAN_ATTR_FIFO, ++ FLEXCAN_ATTR_WAKEUP, ++ FLEXCAN_ATTR_SRX_DIS, ++ FLEXCAN_ATTR_WAK_SRC, ++ FLEXCAN_ATTR_BCC, ++ FLEXCAN_ATTR_LOCAL_PRIORITY, ++ FLEXCAN_ATTR_ABORT, ++ FLEXCAN_ATTR_LOOPBACK, ++ FLEXCAN_ATTR_SMP, ++ FLEXCAN_ATTR_BOFF_REC, ++ FLEXCAN_ATTR_TSYN, ++ FLEXCAN_ATTR_LISTEN, ++ FLEXCAN_ATTR_EXTEND_MSG, ++ FLEXCAN_ATTR_STANDARD_MSG, ++#ifdef CONFIG_CAN_DEBUG_DEVICES ++ FLEXCAN_ATTR_DUMP_REG, ++ FLEXCAN_ATTR_DUMP_XMIT_MB, ++ FLEXCAN_ATTR_DUMP_RX_MB, ++#endif ++ FLEXCAN_ATTR_MAX ++}; ++ ++static ssize_t flexcan_show_attr(struct device *dev, ++ struct device_attribute *attr, char *buf); ++static ssize_t flexcan_set_attr(struct device *dev, ++ struct device_attribute *attr, const char *buf, ++ size_t count); ++ ++static struct device_attribute flexcan_dev_attr[FLEXCAN_ATTR_MAX] = { ++/* ~~~~~sven~~~~~ ++ [FLEXCAN_ATTR_STATE] = __ATTR(state, 0444, flexcan_show_attr, NULL), ++ [FLEXCAN_ATTR_BITRATE] = ++ __ATTR(bitrate, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_BR_PRESDIV] = ++ __ATTR(br_presdiv, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_BR_RJW] = ++ __ATTR(br_rjw, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_BR_PROPSEG] = ++ __ATTR(br_propseg, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_BR_PSEG1] = ++ __ATTR(br_pseg1, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_BR_PSEG2] = ++ __ATTR(br_pseg2, 0644, flexcan_show_attr, flexcan_set_attr), ++*/ ++ [FLEXCAN_ATTR_BR_CLKSRC] = ++ __ATTR(br_clksrc, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_MAXMB] = ++ __ATTR(maxmb, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_XMIT_MAXMB] = ++ __ATTR(xmit_maxmb, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_FIFO] = ++ __ATTR(fifo, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_WAKEUP] = ++ __ATTR(wakeup, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_SRX_DIS] = ++ __ATTR(srx_dis, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_WAK_SRC] = ++ __ATTR(wak_src, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_BCC] = ++ __ATTR(bcc, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_LOCAL_PRIORITY] = ++ __ATTR(local_priority, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_ABORT] = ++ __ATTR(abort, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_LOOPBACK] = ++ __ATTR(loopback, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_SMP] = ++ __ATTR(smp, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_BOFF_REC] = ++ __ATTR(boff_rec, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_TSYN] = ++ __ATTR(tsyn, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_LISTEN] = ++ __ATTR(listen, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_EXTEND_MSG] = ++ __ATTR(ext_msg, 0644, flexcan_show_attr, flexcan_set_attr), ++ [FLEXCAN_ATTR_STANDARD_MSG] = ++ __ATTR(std_msg, 0644, flexcan_show_attr, flexcan_set_attr), ++#ifdef CONFIG_CAN_DEBUG_DEVICES ++ [FLEXCAN_ATTR_DUMP_REG] = ++ __ATTR(dump_reg, 0444, flexcan_show_attr, NULL), ++ [FLEXCAN_ATTR_DUMP_XMIT_MB] = ++ __ATTR(dump_xmit_mb, 0444, flexcan_show_attr, NULL), ++ [FLEXCAN_ATTR_DUMP_RX_MB] = ++ __ATTR(dump_rx_mb, 0444, flexcan_show_attr, NULL), ++#endif ++}; ++ ++//~~~~~~~~~~~~~~sven~~~~~~~~~~~~~~~~ ++// static void flexcan_set_bitrate (struct flexcan_device *flexcan, int bitrate) { ++ /* TODO:: implement in future ++ * based on the bitrate to get the timing of ++ * presdiv, pseg1, pseg2, propseg ++ */ ++//} ++/* ++static void flexcan_update_bitrate (struct flexcan_device *flexcan) { ++ struct can_priv *priv = (can_priv *) flexcan; ++ struct can_bittiming *bt = &priv -> bittiming; ++ ++ int rate, div; ++ ++ if (flexcan -> br_clksrc) ++ rate = clk_get_rate (flexcan -> clk); ++ else { ++ struct clk *clk; ++ clk = clk_get (NULL, "ckih"); ++ if (!clk) ++ return; ++ rate = clk_get_rate (clk); ++ clk_put (clk); ++ } ++ if (!rate) ++ return; ++ ++ div = (bt -> tq + 1); ++ div *= (bt -> prop_seg + bt -> phase_seg1 + bt -> phase_seg2 + 4); ++ bt -> bitrate = (rate + div - 1) / div; ++} ++*/ ++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++#ifdef CONFIG_CAN_DEBUG_DEVICES ++static int flexcan_dump_reg(struct flexcan_device *flexcan, char *buf) ++{ ++ int ret = 0; ++ unsigned int reg; ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR); ++ ret += sprintf(buf + ret, "MCR::0x%x\n", reg); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_CTRL); ++ ret += sprintf(buf + ret, "CTRL::0x%x\n", reg); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_RXGMASK); ++ ret += sprintf(buf + ret, "RXGMASK::0x%x\n", reg); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_RX14MASK); ++ ret += sprintf(buf + ret, "RX14MASK::0x%x\n", reg); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_RX15MASK); ++ ret += sprintf(buf + ret, "RX15MASK::0x%x\n", reg); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_ECR); ++ ret += sprintf(buf + ret, "ECR::0x%x\n", reg); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_ESR); ++ ret += sprintf(buf + ret, "ESR::0x%x\n", reg); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_IMASK2); ++ ret += sprintf(buf + ret, "IMASK2::0x%x\n", reg); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_IMASK1); ++ ret += sprintf(buf + ret, "IMASK1::0x%x\n", reg); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_IFLAG2); ++ ret += sprintf(buf + ret, "IFLAG2::0x%x\n", reg); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_IFLAG1); ++ ret += sprintf(buf + ret, "IFLAG1::0x%x\n", reg); ++ return ret; ++} ++ ++static int flexcan_dump_xmit_mb(struct flexcan_device *flexcan, char *buf) ++{ ++ int ret = 0, i; ++ i = flexcan->xmit_maxmb + 1; ++ for (; i <= flexcan->maxmb; i++) ++ ret += ++ sprintf(buf + ret, ++ "mb[%d]::CS:0x%x ID:0x%x DATA[1~2]:0x%02x,0x%02x\n", ++ i, flexcan->hwmb[i].mb_cs.data, ++ flexcan->hwmb[i].mb_id, flexcan->hwmb[i].mb_data[1], ++ flexcan->hwmb[i].mb_data[2]); ++ return ret; ++} ++ ++static int flexcan_dump_rx_mb(struct flexcan_device *flexcan, char *buf) ++{ ++ int ret = 0, i; ++ for (i = 0; i <= flexcan->xmit_maxmb; i++) ++ ret += ++ sprintf(buf + ret, ++ "mb[%d]::CS:0x%x ID:0x%x DATA[1~2]:0x%02x,0x%02x\n", ++ i, flexcan->hwmb[i].mb_cs.data, ++ flexcan->hwmb[i].mb_id, flexcan->hwmb[i].mb_data[1], ++ flexcan->hwmb[i].mb_data[2]); ++ return ret; ++} ++#endif ++ ++//~~~~~~~~~~sven~~~~~~~~~ ++static int flexcan_get_state (struct net_device *net, enum can_state *state) { ++ struct flexcan_device *flexcan = netdev_priv (net); ++ int esr; ++ ++ *state = (netif_running (net) ? CAN_STATE_ERROR_ACTIVE : CAN_STATE_STOPPED); ++ if (netif_carrier_ok (net)) { ++ esr = __raw_readl (flexcan -> io_base + CAN_HW_REG_ESR); ++ switch ((esr & __ESR_FLT_CONF_MASK) >> __ESR_FLT_CONF_OFF) { ++ case 0: break; ++ case 1: *state = CAN_STATE_ERROR_PASSIVE; break; ++ default: *state = CAN_STATE_BUS_OFF; ++ } ++ } else ++ *state = CAN_STATE_BUS_OFF; ++ ++ return 0; ++} ++//~~~~~~~~~~~~~~~~~~~~~~~ ++ ++static ssize_t flexcan_show_attr(struct device *dev, ++ struct device_attribute *attr, char *buf) ++{ ++ int attr_id; ++ struct net_device *net; ++ struct flexcan_device *flexcan; ++ ++ net = dev_get_drvdata(dev); ++ BUG_ON(!net); ++ flexcan = netdev_priv(net); ++ BUG_ON(!flexcan); ++ ++ attr_id = attr - flexcan_dev_attr; ++ switch (attr_id) { ++/* ~~~~~sven~~~~~ ++ case FLEXCAN_ATTR_STATE: ++ return flexcan_show_state(net, buf); ++ case FLEXCAN_ATTR_BITRATE: ++ return sprintf(buf, "%d\n", flexcan->bitrate); ++ case FLEXCAN_ATTR_BR_PRESDIV: ++ return sprintf(buf, "%d\n", flexcan->br_presdiv + 1); ++ case FLEXCAN_ATTR_BR_RJW: ++ return sprintf(buf, "%d\n", flexcan->br_rjw); ++ case FLEXCAN_ATTR_BR_PROPSEG: ++ return sprintf(buf, "%d\n", flexcan->br_propseg + 1); ++ case FLEXCAN_ATTR_BR_PSEG1: ++ return sprintf(buf, "%d\n", flexcan->br_pseg1 + 1); ++ case FLEXCAN_ATTR_BR_PSEG2: ++ return sprintf(buf, "%d\n", flexcan->br_pseg2 + 1); ++*/ ++ case FLEXCAN_ATTR_BR_CLKSRC: ++ return sprintf(buf, "%s\n", flexcan->br_clksrc ? "bus" : "osc"); ++ case FLEXCAN_ATTR_MAXMB: ++ return sprintf(buf, "%d\n", flexcan->maxmb + 1); ++ case FLEXCAN_ATTR_XMIT_MAXMB: ++ return sprintf(buf, "%d\n", flexcan->xmit_maxmb + 1); ++ case FLEXCAN_ATTR_FIFO: ++ return sprintf(buf, "%d\n", flexcan->fifo); ++ case FLEXCAN_ATTR_WAKEUP: ++ return sprintf(buf, "%d\n", flexcan->wakeup); ++ case FLEXCAN_ATTR_SRX_DIS: ++ return sprintf(buf, "%d\n", flexcan->srx_dis); ++ case FLEXCAN_ATTR_WAK_SRC: ++ return sprintf(buf, "%d\n", flexcan->wak_src); ++ case FLEXCAN_ATTR_BCC: ++ return sprintf(buf, "%d\n", flexcan->bcc); ++ case FLEXCAN_ATTR_LOCAL_PRIORITY: ++ return sprintf(buf, "%d\n", flexcan->lprio); ++ case FLEXCAN_ATTR_ABORT: ++ return sprintf(buf, "%d\n", flexcan->abort); ++ case FLEXCAN_ATTR_LOOPBACK: ++ return sprintf(buf, "%d\n", flexcan->loopback); ++ case FLEXCAN_ATTR_SMP: ++ return sprintf(buf, "%d\n", flexcan->smp); ++ case FLEXCAN_ATTR_BOFF_REC: ++ return sprintf(buf, "%d\n", flexcan->boff_rec); ++ case FLEXCAN_ATTR_TSYN: ++ return sprintf(buf, "%d\n", flexcan->tsyn); ++ case FLEXCAN_ATTR_LISTEN: ++ return sprintf(buf, "%d\n", flexcan->listen); ++ case FLEXCAN_ATTR_EXTEND_MSG: ++ return sprintf(buf, "%d\n", flexcan->ext_msg); ++ case FLEXCAN_ATTR_STANDARD_MSG: ++ return sprintf(buf, "%d\n", flexcan->std_msg); ++#ifdef CONFIG_CAN_DEBUG_DEVICES ++ case FLEXCAN_ATTR_DUMP_REG: ++ return flexcan_dump_reg(flexcan, buf); ++ case FLEXCAN_ATTR_DUMP_XMIT_MB: ++ return flexcan_dump_xmit_mb(flexcan, buf); ++ case FLEXCAN_ATTR_DUMP_RX_MB: ++ return flexcan_dump_rx_mb(flexcan, buf); ++#endif ++ default: ++ return sprintf(buf, "%s:%p->%p\n", __func__, flexcan_dev_attr, ++ attr); ++ } ++} ++ ++static ssize_t flexcan_set_attr(struct device *dev, ++ struct device_attribute *attr, const char *buf, ++ size_t count) ++{ ++ int attr_id, tmp; ++ struct net_device *net; ++ struct flexcan_device *flexcan; ++ ++ net = dev_get_drvdata(dev); ++ BUG_ON(!net); ++ flexcan = netdev_priv(net); ++ BUG_ON(!flexcan); ++ ++ attr_id = attr - flexcan_dev_attr; ++ ++ if (mutex_lock_interruptible(&flexcan->mutex)) ++ return count; ++ ++ if (netif_running(net)) ++ goto set_finish; ++ ++ if (attr_id == FLEXCAN_ATTR_BR_CLKSRC) { ++ if (!strcasecmp(buf, "bus")) ++ flexcan->br_clksrc = 1; ++ else if (!strcasecmp(buf, "osc")) ++ flexcan->br_clksrc = 0; ++ goto set_finish; ++ } ++ ++ tmp = simple_strtoul(buf, NULL, 0); ++ switch (attr_id) { ++/* ~~~~~sven~~~~~ ++ case FLEXCAN_ATTR_BITRATE: ++ flexcan_set_bitrate(flexcan, tmp); ++ break; ++ case FLEXCAN_ATTR_BR_PRESDIV: ++ if ((tmp > 0) && (tmp <= FLEXCAN_MAX_PRESDIV)) { ++ flexcan->br_presdiv = tmp - 1; ++ flexcan_update_bitrate(flexcan); ++ } ++ break; ++ case FLEXCAN_ATTR_BR_RJW: ++ if ((tmp > 0) && (tmp <= FLEXCAN_MAX_RJW)) ++ flexcan->br_rjw = tmp - 1; ++ break; ++ case FLEXCAN_ATTR_BR_PROPSEG: ++ if ((tmp > 0) && (tmp <= FLEXCAN_MAX_PROPSEG)) { ++ flexcan->br_propseg = tmp - 1; ++ flexcan_update_bitrate(flexcan); ++ } ++ break; ++ case FLEXCAN_ATTR_BR_PSEG1: ++ if ((tmp > 0) && (tmp <= FLEXCAN_MAX_PSEG1)) { ++ flexcan->br_pseg1 = tmp - 1; ++ flexcan_update_bitrate(flexcan); ++ } ++ break; ++ case FLEXCAN_ATTR_BR_PSEG2: ++ if ((tmp > 0) && (tmp <= FLEXCAN_MAX_PSEG2)) { ++ flexcan->br_pseg2 = tmp - 1; ++ flexcan_update_bitrate(flexcan); ++ } ++ break; ++*/ ++ case FLEXCAN_ATTR_MAXMB: ++ if ((tmp > 0) && (tmp <= FLEXCAN_MAX_MB)) { ++ if (flexcan->maxmb != (tmp - 1)) { ++ flexcan->maxmb = tmp - 1; ++ if (flexcan->xmit_maxmb < flexcan->maxmb) ++ flexcan->xmit_maxmb = flexcan->maxmb; ++ } ++ } ++ break; ++ case FLEXCAN_ATTR_XMIT_MAXMB: ++ if ((tmp > 0) && (tmp <= (flexcan->maxmb + 1))) { ++ if (flexcan->xmit_maxmb != (tmp - 1)) ++ flexcan->xmit_maxmb = tmp - 1; ++ } ++ break; ++ case FLEXCAN_ATTR_FIFO: ++ flexcan->fifo = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_WAKEUP: ++ flexcan->wakeup = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_SRX_DIS: ++ flexcan->srx_dis = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_WAK_SRC: ++ flexcan->wak_src = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_BCC: ++ flexcan->bcc = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_LOCAL_PRIORITY: ++ flexcan->lprio = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_ABORT: ++ flexcan->abort = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_LOOPBACK: ++ flexcan->loopback = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_SMP: ++ flexcan->smp = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_BOFF_REC: ++ flexcan->boff_rec = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_TSYN: ++ flexcan->tsyn = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_LISTEN: ++ flexcan->listen = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_EXTEND_MSG: ++ flexcan->ext_msg = tmp ? 1 : 0; ++ break; ++ case FLEXCAN_ATTR_STANDARD_MSG: ++ flexcan->std_msg = tmp ? 1 : 0; ++ break; ++ } ++ set_finish: ++ mutex_unlock(&flexcan->mutex); ++ return count; ++} ++ ++static void flexcan_device_default(struct flexcan_device *dev) ++{ ++ dev->br_clksrc = 1; ++// dev->br_rjw = 2; ~~~~~sven~~~~~ ++// dev->br_presdiv = 6; ~~~~~sven~~~~~ ++// dev->br_propseg = 4; ~~~~~sven~~~~~ ++// dev->br_pseg1 = 4; ~~~~~sven~~~~~ ++// dev->br_pseg2 = 7; ~~~~~sven~~~~~ ++ ++ dev->bcc = 1; ++ dev->srx_dis = 1; ++ dev->smp = 1; ++ dev->boff_rec = 1; ++ ++ dev->maxmb = FLEXCAN_MAX_MB - 1; ++ dev->xmit_maxmb = (FLEXCAN_MAX_MB >> 1) - 1; ++ dev->xmit_mb = dev->maxmb - dev->xmit_maxmb; ++ ++ dev->ext_msg = 1; ++ dev->std_msg = 1; ++} ++ ++static int flexcan_device_attach(struct flexcan_device *flexcan) ++{ ++ int ret; ++ struct resource *res; ++#ifdef REGULATOR ++ struct platform_device *pdev = flexcan->dev; ++ struct flexcan_platform_data *plat_data = (pdev->dev).platform_data; ++#endif ++ ++ res = platform_get_resource(flexcan->dev, IORESOURCE_MEM, 0); ++ if (!res) ++ return -ENODEV; ++ ++ flexcan->io_base = ioremap(res->start, res->end - res->start + 1); ++ if (!flexcan->io_base) ++ return -ENOMEM; ++ ++ flexcan->irq = platform_get_irq(flexcan->dev, 0); ++ if (!flexcan->irq) { ++ ret = -ENODEV; ++ goto no_irq_err; ++ } ++ ++ ret = -EINVAL; ++#ifdef REGULATOR ++ if (plat_data) { ++ if (plat_data->core_reg) { ++ flexcan->core_reg = regulator_get(&pdev->dev, ++ plat_data->core_reg); ++ if (!flexcan->core_reg) ++ goto plat_err; ++ } ++ ++ if (plat_data->io_reg) { ++ flexcan->io_reg = regulator_get(&pdev->dev, ++ plat_data->io_reg); ++ if (!flexcan->io_reg) ++ goto plat_err; ++ } ++ } ++#endif ++ flexcan->clk = clk_get(&(flexcan->dev)->dev, "can_clk"); ++ flexcan->hwmb = (struct can_hw_mb *)(flexcan->io_base + CAN_MB_BASE); ++ flexcan->rx_mask = (unsigned int *)(flexcan->io_base + CAN_RXMASK_BASE); ++ return 0; ++ ++#ifdef REGULATOR ++ plat_err: ++ if (flexcan->core_reg) { ++ regulator_put(flexcan->core_reg, &pdev->dev); ++ flexcan->core_reg = NULL; ++ } ++#endif ++ ++ no_irq_err: ++ if (flexcan->io_base) ++ iounmap(flexcan->io_base); ++ return ret; ++} ++ ++static void flexcan_device_detach(struct flexcan_device *flexcan) ++{ ++#ifdef REGULATOR ++ struct platform_device *pdev = flexcan->dev; ++#endif ++ if (flexcan->clk) { ++ clk_put(flexcan->clk); ++ flexcan->clk = NULL; ++ } ++#ifdef REGULATOR ++ if (flexcan->io_reg) { ++ regulator_put(flexcan->io_reg, &pdev->dev); ++ flexcan->io_reg = NULL; ++ } ++ ++ if (flexcan->core_reg) { ++ regulator_put(flexcan->core_reg, &pdev->dev); ++ flexcan->core_reg = NULL; ++ } ++#endif ++ ++ if (flexcan->io_base) ++ iounmap(flexcan->io_base); ++} ++ ++ ++//~~~~~~~~~~~~~~sven~~~~~~~~~~~~~~~~ ++static struct can_bittiming_const flexcan_bittiming_const = { ++ .tseg1_min = 4, ++ .tseg1_max = 16, ++ .tseg2_min = 2, ++ .tseg2_max = 8, ++ .sjw_max = 4, ++ .brp_min = 1, ++ .brp_max = 256, ++ .brp_inc = 1, ++}; ++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++ ++/*! ++ * @brief The function allocates can device. ++ * ++ * @param pdev the pointer of platform device. ++ * @param setup the initial function pointer of network device. ++ * ++ * @return none ++ */ ++struct net_device *flexcan_device_alloc(struct platform_device *pdev, ++ void (*setup) (struct net_device *dev)) ++{ ++ struct flexcan_device *flexcan; ++ struct net_device *net; ++ int i, num; ++ ++ net = alloc_netdev(sizeof(*flexcan), "can%d", setup); ++ if (net == NULL) { ++ printk(KERN_ERR "Allocate netdevice for FlexCAN fail!\n"); ++ return NULL; ++ } ++ flexcan = netdev_priv(net); ++ memset(flexcan, 0, sizeof(*flexcan)); ++ ++ mutex_init(&flexcan->mutex); ++ init_timer(&flexcan->timer); ++ ++ flexcan->dev = pdev; ++ if (flexcan_device_attach(flexcan)) { ++ printk(KERN_ERR "Attach FlexCAN fail!\n"); ++ free_netdev(net); ++ return NULL; ++ } ++ flexcan_device_default(flexcan); ++// flexcan_update_bitrate(flexcan); ~~~~~sven~~~~~ ++ ++ num = ARRAY_SIZE(flexcan_dev_attr); ++ ++ for (i = 0; i < num; i++) { ++ if (device_create_file(&pdev->dev, flexcan_dev_attr + i)) { ++ printk(KERN_ERR "Create attribute file fail!\n"); ++ break; ++ } ++ } ++ ++ if (i != num) { ++ for (; i >= 0; i--) ++ device_remove_file(&pdev->dev, flexcan_dev_attr + i); ++ free_netdev(net); ++ return NULL; ++ } ++ dev_set_drvdata(&pdev->dev, net); ++ ++//~~~~~~~~~~~~~~sven~~~~~~~~~~~~~~~~ ++ ++ SET_NETDEV_DEV (net, &pdev -> dev); ++ ++ flexcan -> can.bittiming_const = &flexcan_bittiming_const; ++ flexcan -> can.do_set_bittiming = flexcan_set_bittiming; ++ flexcan -> can.do_get_state = (void *) flexcan_get_state; ++ ++ if (flexcan -> br_clksrc) ++ flexcan -> can.clock.freq = clk_get_rate (flexcan -> clk); ++ else { ++ struct clk *clk; ++ clk = clk_get (NULL, "ckih"); ++ if (clk) { ++ flexcan -> can.clock.freq = clk_get_rate (clk); ++ clk_put (clk); ++ } ++ } ++ ++ flexcan -> can.state = CAN_STATE_STOPPED; // !!! Nur provisorisch !!! ++ ++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++ return net; ++} ++ ++/*! ++ * @brief The function frees can device. ++ * ++ * @param pdev the pointer of platform device. ++ * ++ * @return none ++ */ ++void flexcan_device_free(struct platform_device *pdev) ++{ ++ struct net_device *net; ++ struct flexcan_device *flexcan; ++ int i, num; ++ net = (struct net_device *)dev_get_drvdata(&pdev->dev); ++ ++ unregister_candev(net); // ~~~~~sven~~~~~ ++ flexcan = netdev_priv(net); ++ del_timer(&flexcan->timer); ++ ++ num = ARRAY_SIZE(flexcan_dev_attr); ++ ++ for (i = 0; i < num; i++) ++ device_remove_file(&pdev->dev, flexcan_dev_attr + i); ++ ++ flexcan_device_detach(netdev_priv(net)); ++ free_netdev(net); ++} +Index: linux-2.6.31.6/drivers/net/can/flexcan/drv.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.31.6/drivers/net/can/flexcan/drv.c 2009-12-16 17:34:40.585687608 +0100 +@@ -0,0 +1,657 @@ ++/* ++ * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. ++ */ ++ ++/* ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/*! ++ * @file drv.c ++ * ++ * @brief Driver for Freescale CAN Controller FlexCAN. ++ * ++ * @ingroup can ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#ifdef REGULATOR ++ #include ++#endif ++#include ++ ++#include ++#include ++//#include //TBD asm/hardware.h ++#include ++#include "flexcan.h" ++ ++static void flexcan_hw_start(struct flexcan_device *flexcan) ++{ ++ unsigned int reg; ++ if ((flexcan->maxmb + 1) > 32) { ++ __raw_writel(0xFFFFFFFF, flexcan->io_base + CAN_HW_REG_IMASK1); ++ reg = (1 << (flexcan->maxmb - 31)) - 1; ++ __raw_writel(reg, flexcan->io_base + CAN_HW_REG_IMASK2); ++ } else { ++ reg = (1 << (flexcan->maxmb + 1)) - 1; ++ __raw_writel(reg, flexcan->io_base + CAN_HW_REG_IMASK1); ++ __raw_writel(0, flexcan->io_base + CAN_HW_REG_IMASK2); ++ } ++ ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR) & (~__MCR_HALT); ++ __raw_writel(reg, flexcan->io_base + CAN_HW_REG_MCR); ++} ++ ++static void flexcan_hw_stop(struct flexcan_device *flexcan) ++{ ++ unsigned int reg; ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR); ++ __raw_writel(reg | __MCR_HALT, flexcan->io_base + CAN_HW_REG_MCR); ++} ++ ++static int flexcan_hw_reset(struct flexcan_device *flexcan) ++{ ++ unsigned int reg; ++ int timeout = 100000; ++ ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR); ++ __raw_writel(reg | __MCR_MDIS, flexcan->io_base + CAN_HW_REG_MCR); ++ ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_CTRL); ++ if (flexcan->br_clksrc) ++ reg |= __CTRL_CLK_SRC; ++ else ++ reg &= ~__CTRL_CLK_SRC; ++ __raw_writel(reg, flexcan->io_base + CAN_HW_REG_CTRL); ++ ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR) & (~__MCR_MDIS); ++ __raw_writel(reg, flexcan->io_base + CAN_HW_REG_MCR); ++ reg |= __MCR_SOFT_RST; ++ __raw_writel(reg, flexcan->io_base + CAN_HW_REG_MCR); ++ ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR); ++ while (reg & __MCR_SOFT_RST) { ++ if (--timeout <= 0) { ++ printk(KERN_ERR "Flexcan software Reset Timeouted\n"); ++ return -1; ++ } ++ udelay(10); ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR); ++ } ++ return 0; ++} ++ ++static inline void flexcan_mcr_setup(struct flexcan_device *flexcan) ++{ ++ unsigned int reg; ++ ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR); ++ reg &= ~(__MCR_MAX_MB_MASK | __MCR_WAK_MSK | __MCR_MAX_IDAM_MASK); ++ ++ if (flexcan->fifo) ++ reg |= __MCR_FEN; ++ else ++ reg &= ~__MCR_FEN; ++ ++ if (flexcan->wakeup) ++ reg |= __MCR_SLF_WAK | __MCR_WAK_MSK; ++ else ++ reg &= ~(__MCR_SLF_WAK | __MCR_WAK_MSK); ++ ++ if (flexcan->wak_src) ++ reg |= __MCR_WAK_SRC; ++ else ++ reg &= ~__MCR_WAK_SRC; ++ ++ if (flexcan->srx_dis) ++ reg |= __MCR_SRX_DIS; ++ else ++ reg &= ~__MCR_SRX_DIS; ++ ++ if (flexcan->bcc) ++ reg |= __MCR_BCC; ++ else ++ reg &= ~__MCR_BCC; ++ ++ if (flexcan->lprio) ++ reg |= __MCR_LPRIO_EN; ++ else ++ reg &= ~__MCR_LPRIO_EN; ++ ++ if (flexcan->abort) ++ reg |= __MCR_AEN; ++ else ++ reg &= ~__MCR_AEN; ++ ++ reg |= (flexcan->maxmb << __MCR_MAX_MB_OFFSET); ++ reg |= __MCR_DOZE | __MCR_MAX_IDAM_C; ++ __raw_writel(reg, flexcan->io_base + CAN_HW_REG_MCR); ++} ++ ++//~~~~~~~~~~~~~~sven~~~~~~~~~~~~~~~~ ++static inline void flexcan_ctrl_setup (struct flexcan_device *flexcan) { ++ struct can_priv *priv = (struct can_priv *) flexcan; ++ struct can_bittiming *bt = &priv -> bittiming; ++ ++ unsigned int reg; ++ ++ reg = __raw_readl (flexcan -> io_base + CAN_HW_REG_CTRL); ++ reg &= ~(__CTRL_PRESDIV_MASK | __CTRL_RJW_MASK | __CTRL_PSEG1_MASK | ++ __CTRL_PSEG2_MASK | __CTRL_PROPSEG_MASK); ++ ++ if (flexcan -> loopback) ++ reg |= __CTRL_LPB; ++ else ++ reg &= ~__CTRL_LPB; ++ ++ if (flexcan -> smp) ++ reg |= __CTRL_SMP; ++ else ++ reg &= ~__CTRL_SMP; ++ ++ if (flexcan -> boff_rec) ++ reg |= __CTRL_BOFF_REC; ++ else ++ reg &= ~__CTRL_BOFF_REC; ++ ++ if (flexcan -> tsyn) ++ reg |= __CTRL_TSYN; ++ else ++ reg &= ~__CTRL_TSYN; ++ ++ if (flexcan -> listen) ++ reg |= __CTRL_LOM; ++ else ++ reg &= ~__CTRL_LOM; ++ ++ reg |= ((bt -> brp - 1) << __CTRL_PRESDIV_OFFSET) | ++ ((bt -> sjw - 1) << __CTRL_RJW_OFFSET) | ++ ((bt -> phase_seg1 - 1) << __CTRL_PSEG1_OFFSET) | ++ ((bt -> phase_seg2 - 1) << __CTRL_PSEG2_OFFSET) | ++ ((bt -> prop_seg - 1) << __CTRL_PROPSEG_OFFSET); ++ ++ reg &= ~__CTRL_LBUF; ++ ++ reg |= __CTRL_TWRN_MSK | __CTRL_RWRN_MSK | __CTRL_BOFF_MSK | ++ __CTRL_ERR_MSK; ++ ++ __raw_writel (reg, flexcan -> io_base + CAN_HW_REG_CTRL); ++} ++ ++int flexcan_set_bittiming (struct net_device *dev) { ++ flexcan_ctrl_setup (netdev_priv (dev)); ++ return 0; ++} ++ ++EXPORT_SYMBOL (flexcan_set_bittiming); ++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++static int flexcan_hw_restart(struct net_device *dev) ++{ ++ unsigned int reg; ++ struct flexcan_device *flexcan = netdev_priv(dev); ++ ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR); ++ if (reg & __MCR_SOFT_RST) ++ return 1; ++ ++ flexcan_mcr_setup(flexcan); ++ ++ __raw_writel(0, flexcan->io_base + CAN_HW_REG_IMASK2); ++ __raw_writel(0, flexcan->io_base + CAN_HW_REG_IMASK1); ++ ++ __raw_writel(0xFFFFFFFF, flexcan->io_base + CAN_HW_REG_IFLAG2); ++ __raw_writel(0xFFFFFFFF, flexcan->io_base + CAN_HW_REG_IFLAG1); ++ ++ __raw_writel(0, flexcan->io_base + CAN_HW_REG_ECR); ++ ++ flexcan_mbm_init(flexcan); ++ netif_carrier_on(dev); ++ flexcan_hw_start(flexcan); ++ ++ if (netif_queue_stopped(dev)) ++ netif_start_queue(dev); ++ ++ return 0; ++} ++ ++static void flexcan_hw_watch(unsigned long data) ++{ ++ unsigned int reg, ecr; ++ struct net_device *dev = (struct net_device *)data; ++ struct flexcan_device *flexcan = dev ? netdev_priv(dev) : NULL; ++ ++ BUG_ON(!flexcan); ++ ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR); ++ if (reg & __MCR_MDIS) { ++ if (flexcan_hw_restart(dev)) ++ mod_timer(&flexcan->timer, HZ / 20); ++ return; ++ } ++ ecr = __raw_readl(flexcan->io_base + CAN_HW_REG_ECR); ++ if (flexcan->boff_rec) { ++ if (((reg & __ESR_FLT_CONF_MASK) >> __ESR_FLT_CONF_OFF) > 1) { ++ reg |= __MCR_SOFT_RST; ++ __raw_writel(reg, flexcan->io_base + CAN_HW_REG_MCR); ++ mod_timer(&flexcan->timer, HZ / 20); ++ return; ++ } ++ netif_carrier_on(dev); ++ } ++} ++ ++static void flexcan_hw_busoff(struct net_device *dev) ++{ ++ struct flexcan_device *flexcan = netdev_priv(dev); ++ unsigned int reg; ++ ++ netif_carrier_off(dev); ++ ++ flexcan->timer.function = flexcan_hw_watch; ++ flexcan->timer.data = (unsigned long)dev; ++ ++ if (flexcan->boff_rec) { ++ mod_timer(&flexcan->timer, HZ / 10); ++ return; ++ } ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_MCR); ++ __raw_writel(reg | __MCR_SOFT_RST, flexcan->io_base + CAN_HW_REG_MCR); ++ mod_timer(&flexcan->timer, HZ / 20); ++} ++ ++static int flexcan_hw_open (struct net_device *dev) { // ~~~~~sven~~~~~ ++ struct flexcan_device *flexcan = netdev_priv (dev); // ~~~~~sven~~~~~ ++ int err; // ~~~~~sven~~~~~ ++ ++ if (flexcan_hw_reset(flexcan)) ++ return -EFAULT; ++ ++ flexcan_mcr_setup(flexcan); ++ ++//~~~~~~~~~~~~~~sven~~~~~~~~~~~~~~~~ ++ ++ err = open_candev (dev); ++ if (err) ++ return err; ++ ++ flexcan_ctrl_setup (netdev_priv (dev)); // determine and set bittime ++ ++//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ++ ++ __raw_writel(0, flexcan->io_base + CAN_HW_REG_IMASK2); ++ __raw_writel(0, flexcan->io_base + CAN_HW_REG_IMASK1); ++ ++ __raw_writel(0xFFFFFFFF, flexcan->io_base + CAN_HW_REG_IFLAG2); ++ __raw_writel(0xFFFFFFFF, flexcan->io_base + CAN_HW_REG_IFLAG1); ++ ++ __raw_writel(0, flexcan->io_base + CAN_HW_REG_ECR); ++ return 0; ++} ++ ++static void flexcan_err_handler(struct net_device *dev) ++{ ++ struct flexcan_device *flexcan = netdev_priv(dev); ++ struct sk_buff *skb; ++ struct can_frame *frame; ++ unsigned int esr, ecr; ++ ++ esr = __raw_readl(flexcan->io_base + CAN_HW_REG_ESR); ++ __raw_writel(esr & __ESR_INTERRUPTS, flexcan->io_base + CAN_HW_REG_ESR); ++ ++ if (esr & __ESR_WAK_INT) ++ return; ++ ++ skb = dev_alloc_skb(sizeof(struct can_frame)); ++ if (!skb) { ++ printk(KERN_ERR "%s: allocates skb fail in\n", __func__); ++ return; ++ } ++ frame = (struct can_frame *)skb_put(skb, sizeof(*frame)); ++ memset(frame, 0, sizeof(*frame)); ++ frame->can_id = CAN_ERR_FLAG | CAN_ERR_CRTL; ++ frame->can_dlc = CAN_ERR_DLC; ++ ++ if (esr & __ESR_TWRN_INT) ++ frame->data[1] |= CAN_ERR_CRTL_TX_WARNING; ++ ++ if (esr & __ESR_RWRN_INT) ++ frame->data[1] |= CAN_ERR_CRTL_RX_WARNING; ++ ++ if (esr & __ESR_BOFF_INT) ++ frame->can_id |= CAN_ERR_BUSOFF; ++ ++ if (esr & __ESR_ERR_INT) { ++ if (esr & __ESR_BIT1_ERR) ++ frame->data[2] |= CAN_ERR_PROT_BIT1; ++ ++ if (esr & __ESR_BIT0_ERR) ++ frame->data[2] |= CAN_ERR_PROT_BIT0; ++ ++ if (esr & __ESR_ACK_ERR) ++ frame->can_id |= CAN_ERR_ACK; ++ ++ /*TODO:// if (esr & __ESR_CRC_ERR) */ ++ ++ if (esr & __ESR_FRM_ERR) ++ frame->data[2] |= CAN_ERR_PROT_FORM; ++ ++ if (esr & __ESR_STF_ERR) ++ frame->data[2] |= CAN_ERR_PROT_STUFF; ++ ++ ecr = __raw_readl(flexcan->io_base + CAN_HW_REG_ECR); ++ switch ((esr & __ESR_FLT_CONF_MASK) >> __ESR_FLT_CONF_OFF) { ++ case 0: ++ if (__ECR_TX_ERR_COUNTER(ecr) >= __ECR_ACTIVE_THRESHOLD) ++ frame->data[1] |= CAN_ERR_CRTL_TX_WARNING; ++ if (__ECR_RX_ERR_COUNTER(ecr) >= __ECR_ACTIVE_THRESHOLD) ++ frame->data[1] |= CAN_ERR_CRTL_RX_WARNING; ++ break; ++ case 1: ++ if (__ECR_TX_ERR_COUNTER(ecr) >= ++ __ECR_PASSIVE_THRESHOLD) ++ frame->data[1] |= CAN_ERR_CRTL_TX_PASSIVE; ++ ++ if (__ECR_RX_ERR_COUNTER(ecr) >= ++ __ECR_PASSIVE_THRESHOLD) ++ frame->data[1] |= CAN_ERR_CRTL_RX_PASSIVE; ++ break; ++ default: ++ frame->can_id |= CAN_ERR_BUSOFF; ++ } ++ } ++ ++ if (frame->can_id & CAN_ERR_BUSOFF) ++ flexcan_hw_busoff(dev); ++ ++ skb->dev = dev; ++ skb->ip_summed = CHECKSUM_UNNECESSARY; ++ netif_receive_skb(skb); ++} ++ ++static irqreturn_t flexcan_irq_handler(int irq, void *data) ++{ ++ struct net_device *dev = (struct net_device *)data; ++ struct flexcan_device *flexcan = dev ? netdev_priv(dev) : NULL; ++ unsigned int reg; ++ ++ BUG_ON(!flexcan); ++ ++ reg = __raw_readl(flexcan->io_base + CAN_HW_REG_ESR); ++ if (reg & __ESR_INTERRUPTS) { ++ flexcan_err_handler(dev); ++ return IRQ_HANDLED; ++ } ++ ++ flexcan_mbm_isr(dev); ++ return IRQ_HANDLED; ++} ++ ++static int flexcan_start_xmit(struct sk_buff *skb, struct net_device *dev) ++{ ++ struct can_frame *frame = (struct can_frame *) (skb -> data); ++ struct flexcan_device *flexcan = netdev_priv(dev); ++ struct net_device_stats *stats = (struct net_device_stats *) dev_get_stats (dev); // ~~~~~~~sven~~~~~~~~ ++ ++ BUG_ON(!flexcan); ++ ++ if (frame->can_dlc > 8) ++ return -EINVAL; ++ ++ if (!flexcan_mbm_xmit(flexcan, frame)) { ++ dev_kfree_skb(skb); ++ stats->tx_bytes += frame->can_dlc; ++ stats->tx_packets++; ++ dev->trans_start = jiffies; ++ return NETDEV_TX_OK; ++ } ++ netif_stop_queue(dev); ++ return NETDEV_TX_BUSY; ++} ++ ++static int flexcan_open(struct net_device *dev) ++{ ++ struct flexcan_device *flexcan; ++ struct platform_device *pdev; ++ struct flexcan_platform_data *plat_data; ++ ++ flexcan = netdev_priv(dev); ++ BUG_ON(!flexcan); ++ ++ pdev = flexcan->dev; ++ plat_data = (pdev->dev).platform_data; ++ if (plat_data && plat_data->active) ++ plat_data->active(pdev->id); ++ ++ if (flexcan->clk) ++ if (clk_enable(flexcan->clk)) ++ goto clk_err; ++#ifdef REGULATOR ++ if (flexcan->core_reg) ++ if (regulator_enable(flexcan->core_reg)) ++ goto core_reg_err; ++ ++ if (flexcan->io_reg) ++ if (regulator_enable(flexcan->io_reg)) ++ goto io_reg_err; ++#endif ++ if (plat_data && plat_data->xcvr_enable) ++ plat_data->xcvr_enable(pdev->id, 1); ++ ++ if (request_irq(flexcan->irq, flexcan_irq_handler, IRQF_SAMPLE_RANDOM, ++ dev->name, dev)) ++ goto irq_err; ++ ++ if (flexcan_hw_open (dev)) // ~~~~~sven~~~~~ ++ goto open_err; ++ ++ flexcan_mbm_init(flexcan); ++ netif_carrier_on(dev); ++ flexcan_hw_start(flexcan); ++ return 0; ++ open_err: ++ free_irq(flexcan->irq, dev); ++ irq_err: ++ if (plat_data && plat_data->xcvr_enable) ++ plat_data->xcvr_enable(pdev->id, 0); ++#ifdef REGULATOR ++ if (flexcan->io_reg) ++ regulator_disable(flexcan->io_reg); ++ io_reg_err: ++ if (flexcan->core_reg) ++ regulator_disable(flexcan->core_reg); ++ core_reg_err: ++#endif ++ if (flexcan->clk) ++ clk_disable(flexcan->clk); ++ clk_err: ++ if (plat_data && plat_data->inactive) ++ plat_data->inactive(pdev->id); ++ return -ENODEV; ++} ++ ++static int flexcan_stop(struct net_device *dev) ++{ ++ struct flexcan_device *flexcan; ++ struct platform_device *pdev; ++ struct flexcan_platform_data *plat_data; ++ ++ flexcan = netdev_priv(dev); ++ ++ BUG_ON(!flexcan); ++ ++ pdev = flexcan->dev; ++ plat_data = (pdev->dev).platform_data; ++ ++ flexcan_hw_stop(flexcan); ++ ++ free_irq(flexcan->irq, dev); ++ ++ if (plat_data && plat_data->xcvr_enable) ++ plat_data->xcvr_enable(pdev->id, 0); ++ ++#ifdef REGULATOR ++ if (flexcan->io_reg) ++ regulator_disable(flexcan->io_reg); ++ if (flexcan->core_reg) ++ regulator_disable(flexcan->core_reg); ++#endif ++ if (flexcan->clk) ++ clk_disable(flexcan->clk); ++ if (plat_data && plat_data->inactive) ++ plat_data->inactive(pdev->id); ++ return 0; ++} ++ ++static const struct net_device_ops flexcan_netdev_ops = { ++ .ndo_open = flexcan_open, ++ .ndo_stop = flexcan_stop, ++ .ndo_start_xmit = flexcan_start_xmit, ++}; ++ ++static void flexcan_setup(struct net_device *dev) ++{ ++ dev->type = ARPHRD_CAN; ++ dev->mtu = sizeof(struct can_frame); ++ dev->hard_header_len = 0; ++ dev->addr_len = 0; ++ dev->tx_queue_len = FLEXCAN_MAX_MB; ++ dev->flags = IFF_NOARP; ++ dev->features = NETIF_F_NO_CSUM; ++ ++ dev->netdev_ops = &flexcan_netdev_ops; ++} ++ ++static int flexcan_probe(struct platform_device *pdev) ++{ ++ struct net_device *net; ++ net = flexcan_device_alloc(pdev, flexcan_setup); ++ if (!net) ++ return -ENOMEM; ++ ++ if (register_candev(net)) { // ~~~~~sven~~~~~ ++ flexcan_device_free(pdev); ++ return -ENODEV; ++ } ++ return 0; ++} ++ ++static int flexcan_remove(struct platform_device *pdev) ++{ ++ flexcan_device_free(pdev); ++ return 0; ++} ++ ++static int flexcan_suspend(struct platform_device *pdev, pm_message_t state) ++{ ++ struct net_device *net; ++ struct flexcan_device *flexcan; ++ struct flexcan_platform_data *plat_data; ++ net = (struct net_device *)dev_get_drvdata(&pdev->dev); ++ flexcan = netdev_priv(net); ++ ++ BUG_ON(!flexcan); ++ ++ if (!(net->flags & IFF_UP)) ++ return 0; ++ if (flexcan->wakeup) ++ set_irq_wake(flexcan->irq, 1); ++ else { ++ plat_data = (pdev->dev).platform_data; ++ ++ if (plat_data && plat_data->xcvr_enable) ++ plat_data->xcvr_enable(pdev->id, 0); ++#ifdef REGULATOR ++ if (flexcan->io_reg) ++ regulator_disable(flexcan->io_reg); ++ if (flexcan->core_reg) ++ regulator_disable(flexcan->core_reg); ++#endif ++ if (flexcan->clk) ++ clk_disable(flexcan->clk); ++ if (plat_data && plat_data->inactive) ++ plat_data->inactive(pdev->id); ++ } ++ return 0; ++} ++ ++static int flexcan_resume(struct platform_device *pdev) ++{ ++ struct net_device *net; ++ struct flexcan_device *flexcan; ++ struct flexcan_platform_data *plat_data; ++ net = (struct net_device *)dev_get_drvdata(&pdev->dev); ++ flexcan = netdev_priv(net); ++ ++ BUG_ON(!flexcan); ++ ++ if (!(net->flags & IFF_UP)) ++ return 0; ++ ++ if (flexcan->wakeup) ++ set_irq_wake(flexcan->irq, 0); ++ else { ++ plat_data = (pdev->dev).platform_data; ++ if (plat_data && plat_data->active) ++ plat_data->active(pdev->id); ++ ++ if (flexcan->clk) { ++ if (clk_enable(flexcan->clk)) ++ printk(KERN_ERR "%s:enable clock fail\n", ++ __func__); ++ } ++#ifdef REGULATOR ++ if (flexcan->core_reg) { ++ if (regulator_enable(flexcan->core_reg)) ++ printk(KERN_ERR "%s:enable core voltage\n", ++ __func__); ++ } ++ if (flexcan->io_reg) { ++ if (regulator_enable(flexcan->io_reg)) ++ printk(KERN_ERR "%s:enable io voltage\n", ++ __func__); ++ } ++#endif ++ if (plat_data && plat_data->xcvr_enable) ++ plat_data->xcvr_enable(pdev->id, 1); ++ } ++ return 0; ++} ++ ++static struct platform_driver flexcan_driver = { ++ .driver = { ++ .name = FLEXCAN_DEVICE_NAME, ++ }, ++ .probe = flexcan_probe, ++ .remove = flexcan_remove, ++ .suspend = flexcan_suspend, ++ .resume = flexcan_resume, ++}; ++ ++static __init int flexcan_init(void) ++{ ++ pr_info("Freescale FlexCAN Driver \n"); ++ return platform_driver_register(&flexcan_driver); ++} ++ ++static __exit void flexcan_exit(void) ++{ ++ return platform_driver_unregister(&flexcan_driver); ++} ++ ++module_init(flexcan_init); ++module_exit(flexcan_exit); ++ ++MODULE_LICENSE("GPL"); +Index: linux-2.6.31.6/drivers/net/can/flexcan/flexcan.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.31.6/drivers/net/can/flexcan/flexcan.h 2009-12-16 17:34:40.585687608 +0100 +@@ -0,0 +1,230 @@ ++/* ++ * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. ++ */ ++ ++/* ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/*! ++ * @file flexcan.h ++ * ++ * @brief FlexCan definitions. ++ * ++ * @ingroup can ++ */ ++ ++#ifndef __CAN_FLEXCAN_H__ ++#define __CAN_FLEXCAN_H__ ++ ++#include ++#include ++#ifdef REGULATOR ++ #include ++#endif ++#include ++#include ++#include ++#include ++#include ++ ++#define FLEXCAN_DEVICE_NAME "FlexCAN" ++ ++struct can_mb_cs { ++ unsigned int time_stamp:16; ++ unsigned int length:4; ++ unsigned int rtr:1; ++ unsigned int ide:1; ++ unsigned int srr:1; ++ unsigned int nouse1:1; ++ unsigned int code:4; ++ unsigned int nouse2:4; ++}; ++ ++#define CAN_MB_RX_INACTIVE 0x0 ++#define CAN_MB_RX_EMPTY 0x4 ++#define CAN_MB_RX_FULL 0x2 ++#define CAN_MB_RX_OVERRUN 0x6 ++#define CAN_MB_RX_BUSY 0x1 ++ ++#define CAN_MB_TX_INACTIVE 0x8 ++#define CAN_MB_TX_ABORT 0x9 ++#define CAN_MB_TX_ONCE 0xC ++#define CAN_MB_TX_REMOTE 0xA ++ ++struct can_hw_mb { ++ union { ++ struct can_mb_cs cs; ++ unsigned int data; ++ } mb_cs; ++ unsigned int mb_id; ++ unsigned char mb_data[8]; ++}; ++ ++#define CAN_HW_REG_MCR 0x00 ++#define CAN_HW_REG_CTRL 0x04 ++#define CAN_HW_REG_TIMER 0x08 ++#define CAN_HW_REG_RXGMASK 0x10 ++#define CAN_HW_REG_RX14MASK 0x14 ++#define CAN_HW_REG_RX15MASK 0x18 ++#define CAN_HW_REG_ECR 0x1C ++#define CAN_HW_REG_ESR 0x20 ++#define CAN_HW_REG_IMASK2 0x24 ++#define CAN_HW_REG_IMASK1 0x28 ++#define CAN_HW_REG_IFLAG2 0x2C ++#define CAN_HW_REG_IFLAG1 0x30 ++ ++#define CAN_MB_BASE 0x0080 ++#define CAN_RXMASK_BASE 0x0880 ++#define CAN_FIFO_BASE 0xE0 ++ ++#define __MCR_MDIS (1 << 31) ++#define __MCR_FRZ (1 << 30) ++#define __MCR_FEN (1 << 29) ++#define __MCR_HALT (1 << 28) ++#define __MCR_NOTRDY (1 << 27) ++#define __MCR_WAK_MSK (1 << 26) ++#define __MCR_SOFT_RST (1 << 25) ++#define __MCR_FRZ_ACK (1 << 24) ++#define __MCR_SLF_WAK (1 << 22) ++#define __MCR_WRN_EN (1 << 21) ++#define __MCR_LPM_ACK (1 << 20) ++#define __MCR_WAK_SRC (1 << 19) ++#define __MCR_DOZE (1 << 18) ++#define __MCR_SRX_DIS (1 << 17) ++#define __MCR_BCC (1 << 16) ++#define __MCR_LPRIO_EN (1 << 13) ++#define __MCR_AEN (1 << 12) ++#define __MCR_MAX_IDAM_OFFSET 8 ++#define __MCR_MAX_IDAM_MASK (0x3 << __MCR_MAX_IDAM_OFFSET) ++#define __MCR_MAX_IDAM_A (0x0 << __MCR_MAX_IDAM_OFFSET) ++#define __MCR_MAX_IDAM_B (0x1 << __MCR_MAX_IDAM_OFFSET) ++#define __MCR_MAX_IDAM_C (0x2 << __MCR_MAX_IDAM_OFFSET) ++#define __MCR_MAX_IDAM_D (0x3 << __MCR_MAX_IDAM_OFFSET) ++#define __MCR_MAX_MB_OFFSET 0 ++#define __MCR_MAX_MB_MASK (0x3F) ++ ++#define __CTRL_PRESDIV_OFFSET 24 ++#define __CTRL_PRESDIV_MASK (0xFF << __CTRL_PRESDIV_OFFSET) ++#define __CTRL_RJW_OFFSET 22 ++#define __CTRL_RJW_MASK (0x3 << __CTRL_RJW_OFFSET) ++#define __CTRL_PSEG1_OFFSET 19 ++#define __CTRL_PSEG1_MASK (0x7 << __CTRL_PSEG1_OFFSET) ++#define __CTRL_PSEG2_OFFSET 16 ++#define __CTRL_PSEG2_MASK (0x7 << __CTRL_PSEG2_OFFSET) ++#define __CTRL_BOFF_MSK (0x1 << 15) ++#define __CTRL_ERR_MSK (0x1 << 14) ++#define __CTRL_CLK_SRC (0x1 << 13) ++#define __CTRL_LPB (0x1 << 12) ++#define __CTRL_TWRN_MSK (0x1 << 11) ++#define __CTRL_RWRN_MSK (0x1 << 10) ++#define __CTRL_SMP (0x1 << 7) ++#define __CTRL_BOFF_REC (0x1 << 6) ++#define __CTRL_TSYN (0x1 << 5) ++#define __CTRL_LBUF (0x1 << 4) ++#define __CTRL_LOM (0x1 << 3) ++#define __CTRL_PROPSEG_OFFSET 0 ++#define __CTRL_PROPSEG_MASK (0x7) ++ ++#define __ECR_TX_ERR_COUNTER(x) ((x) & 0xFF) ++#define __ECR_RX_ERR_COUNTER(x) (((x) >> 8) & 0xFF) ++#define __ECR_PASSIVE_THRESHOLD 128 ++#define __ECR_ACTIVE_THRESHOLD 96 ++ ++#define __ESR_TWRN_INT (0x1 << 17) ++#define __ESR_RWRN_INT (0x1 << 16) ++#define __ESR_BIT1_ERR (0x1 << 15) ++#define __ESR_BIT0_ERR (0x1 << 14) ++#define __ESR_ACK_ERR (0x1 << 13) ++#define __ESR_CRC_ERR (0x1 << 12) ++#define __ESR_FRM_ERR (0x1 << 11) ++#define __ESR_STF_ERR (0x1 << 10) ++#define __ESR_TX_WRN (0x1 << 9) ++#define __ESR_RX_WRN (0x1 << 8) ++#define __ESR_IDLE (0x1 << 7) ++#define __ESR_TXRX (0x1 << 6) ++#define __ESR_FLT_CONF_OFF 4 ++#define __ESR_FLT_CONF_MASK (0x3 << __ESR_FLT_CONF_OFF) ++#define __ESR_BOFF_INT (0x1 << 2) ++#define __ESR_ERR_INT (0x1 << 1) ++#define __ESR_WAK_INT (0x1) ++ ++#define __ESR_INTERRUPTS (__ESR_WAK_INT | __ESR_ERR_INT | \ ++ __ESR_BOFF_INT | __ESR_TWRN_INT | \ ++ __ESR_RWRN_INT) ++ ++#define __FIFO_OV_INT 0x0080 ++#define __FIFO_WARN_INT 0x0040 ++#define __FIFO_RDY_INT 0x0020 ++ ++struct flexcan_device { ++ struct can_priv can; /* FIXME:new must be the first member! */ ++ struct mutex mutex; ++ void *io_base; ++ struct can_hw_mb *hwmb; ++ unsigned int *rx_mask; ++ unsigned int xmit_mb; ++// unsigned int bitrate; ~~~~~sven~~~~~ ++ /* word 1 */ ++// unsigned int br_presdiv:8; ~~~~~sven~~~~~ ++// unsigned int br_rjw:2; ~~~~~sven~~~~~ ++// unsigned int br_propseg:3; ~~~~~sven~~~~~ ++// unsigned int br_pseg1:3; ~~~~~sven~~~~~ ++// unsigned int br_pseg2:3; ~~~~~sven~~~~~ ++ unsigned int maxmb:6; ++ unsigned int xmit_maxmb:6; ++ unsigned int wd1_resv:1; ++ ++ /* word 2 */ ++ unsigned int fifo:1; ++ unsigned int wakeup:1; ++ unsigned int srx_dis:1; ++ unsigned int wak_src:1; ++ unsigned int bcc:1; ++ unsigned int lprio:1; ++ unsigned int abort:1; ++ unsigned int br_clksrc:1; ++ unsigned int loopback:1; ++ unsigned int smp:1; ++ unsigned int boff_rec:1; ++ unsigned int tsyn:1; ++ unsigned int listen:1; ++ ++ unsigned int ext_msg:1; ++ unsigned int std_msg:1; ++ ++ struct timer_list timer; ++ struct platform_device *dev; ++ struct regulator *core_reg; ++ struct regulator *io_reg; ++ struct clk *clk; ++ int irq; ++}; ++ ++#define FLEXCAN_MAX_FIFO_MB 8 ++#define FLEXCAN_MAX_MB 64 ++#define FLEXCAN_MAX_PRESDIV 256 ++#define FLEXCAN_MAX_RJW 4 ++#define FLEXCAN_MAX_PSEG1 8 ++#define FLEXCAN_MAX_PSEG2 8 ++#define FLEXCAN_MAX_PROPSEG 8 ++#define FLEXCAN_MAX_BITRATE 1000000 ++ ++extern struct net_device *flexcan_device_alloc(struct platform_device *pdev, ++ void (*setup) (struct net_device ++ *dev)); ++extern void flexcan_device_free(struct platform_device *pdev); ++ ++extern void flexcan_mbm_init(struct flexcan_device *flexcan); ++extern void flexcan_mbm_isr(struct net_device *dev); ++extern int flexcan_mbm_xmit(struct flexcan_device *flexcan, ++ struct can_frame *frame); ++ ++extern int flexcan_set_bittiming (struct net_device *dev); // ~~~~~sven~~~~~ ++ ++#endif /* __CAN_FLEXCAN_H__ */ +Index: linux-2.6.31.6/drivers/net/can/flexcan/mbm.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.31.6/drivers/net/can/flexcan/mbm.c 2009-12-16 17:34:40.585687608 +0100 +@@ -0,0 +1,350 @@ ++/* ++ * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved. ++ */ ++ ++/* ++ * The code contained herein is licensed under the GNU General Public ++ * License. You may obtain a copy of the GNU General Public License ++ * Version 2 or later at the following locations: ++ * ++ * http://www.opensource.org/licenses/gpl-license.html ++ * http://www.gnu.org/copyleft/gpl.html ++ */ ++ ++/*! ++ * @file mbm.c ++ * ++ * @brief Driver for Freescale CAN Controller FlexCAN. ++ * ++ * @ingroup can ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include "flexcan.h" ++ ++#define flexcan_swab32(x) \ ++ (((x) << 24) | ((x) >> 24) |\ ++ (((x) & (__u32)0x0000ff00UL) << 8) |\ ++ (((x) & (__u32)0x00ff0000UL) >> 8)) ++ ++static inline void flexcan_memcpy(void *dst, void *src, int len) ++{ ++ int i; ++ unsigned int *d = (unsigned int *)dst, *s = (unsigned int *)src; ++ len = (len + 3) >> 2; ++ for (i = 0; i < len; i++, s++, d++) ++ *d = flexcan_swab32(*s); ++} ++ ++static void flexcan_mb_bottom(struct net_device *dev, int index) ++{ ++ struct flexcan_device *flexcan = netdev_priv(dev); ++ struct net_device_stats *stats = (struct net_device_stats *) dev_get_stats (dev); // ~~~~~sven~~~~~ ++ struct can_hw_mb *hwmb; ++ struct can_frame *frame; ++ struct sk_buff *skb; ++ unsigned int tmp; ++ ++ hwmb = flexcan->hwmb + index; ++ if (flexcan->fifo || (index >= (flexcan->maxmb - flexcan->xmit_maxmb))) { ++ if (hwmb->mb_cs.cs.code == CAN_MB_TX_ABORT) ++ hwmb->mb_cs.cs.code = CAN_MB_TX_INACTIVE; ++ ++ if (hwmb->mb_cs.cs.code & CAN_MB_TX_INACTIVE) { ++ if (netif_queue_stopped(dev)) ++ netif_start_queue(dev); ++ return; ++ } ++ } ++ skb = dev_alloc_skb(sizeof(struct can_frame)); ++ if (skb) { ++ frame = (struct can_frame *)skb_put(skb, sizeof(*frame)); ++ memset(frame, 0, sizeof(*frame)); ++ if (hwmb->mb_cs.cs.ide) ++ frame->can_id = ++ (hwmb->mb_id & CAN_EFF_MASK) | CAN_EFF_FLAG; ++ else ++ frame->can_id = (hwmb->mb_id >> 18) & CAN_SFF_MASK; ++ ++ if (hwmb->mb_cs.cs.rtr) ++ frame->can_id |= CAN_RTR_FLAG; ++ ++ frame->can_dlc = hwmb->mb_cs.cs.length; ++ ++ if (frame->can_dlc && frame->can_dlc) ++ flexcan_memcpy(frame->data, hwmb->mb_data, ++ frame->can_dlc); ++ ++ if (flexcan->fifo ++ || (index >= (flexcan->maxmb - flexcan->xmit_maxmb))) { ++ hwmb->mb_cs.cs.code = CAN_MB_TX_INACTIVE; ++ if (netif_queue_stopped(dev)) ++ netif_start_queue(dev); ++ } ++ ++ tmp = __raw_readl(flexcan->io_base + CAN_HW_REG_TIMER); ++ ++ dev->last_rx = jiffies; ++ stats->rx_packets++; ++ stats->rx_bytes += frame->can_dlc; ++ ++ skb->dev = dev; ++ skb->protocol = __constant_htons(ETH_P_CAN); ++ skb->ip_summed = CHECKSUM_UNNECESSARY; ++ // netif_receive_skb (skb); ~~~~~sven~~~~~ ++ netif_rx (skb); //~~~~~sven~~~~~ ++ } else { ++ tmp = hwmb->mb_cs.data; ++ tmp = hwmb->mb_id; ++ tmp = hwmb->mb_data[0]; ++ if (flexcan->fifo ++ || (index >= (flexcan->maxmb - flexcan->xmit_maxmb))) { ++ ++ hwmb->mb_cs.cs.code = CAN_MB_TX_INACTIVE; ++ if (netif_queue_stopped(dev)) ++ netif_start_queue(dev); ++ } ++ tmp = __raw_readl(flexcan->io_base + CAN_HW_REG_TIMER); ++ stats->rx_dropped++; ++ } ++} ++ ++static void flexcan_fifo_isr(struct net_device *dev, unsigned int iflag1) ++{ ++ struct flexcan_device *flexcan = dev ? netdev_priv(dev) : NULL; ++ struct net_device_stats *stats = (struct net_device_stats *) dev_get_stats (dev); // ~~~~~sven~~~~~ ++ struct sk_buff *skb; ++ struct can_hw_mb *hwmb = flexcan->hwmb; ++ struct can_frame *frame; ++ unsigned int tmp; ++ ++ if (iflag1 & __FIFO_RDY_INT) { ++ skb = dev_alloc_skb(sizeof(struct can_frame)); ++ if (skb) { ++ frame = ++ (struct can_frame *)skb_put(skb, sizeof(*frame)); ++ memset(frame, 0, sizeof(*frame)); ++ if (hwmb->mb_cs.cs.ide) ++ frame->can_id = ++ (hwmb->mb_id & CAN_EFF_MASK) | CAN_EFF_FLAG; ++ else ++ frame->can_id = ++ (hwmb->mb_id >> 18) & CAN_SFF_MASK; ++ ++ if (hwmb->mb_cs.cs.rtr) ++ frame->can_id |= CAN_RTR_FLAG; ++ ++ frame->can_dlc = hwmb->mb_cs.cs.length; ++ ++ if (frame->can_dlc && (frame->can_dlc <= 8)) ++ flexcan_memcpy(frame->data, hwmb->mb_data, ++ frame->can_dlc); ++ tmp = __raw_readl(flexcan->io_base + CAN_HW_REG_TIMER); ++ ++ dev->last_rx = jiffies; ++ ++ stats->rx_packets++; ++ stats->rx_bytes += frame->can_dlc; ++ ++ skb->dev = dev; ++ skb->protocol = __constant_htons(ETH_P_CAN); ++ skb->ip_summed = CHECKSUM_UNNECESSARY; ++ //netif_receive_skb (skb); ~~~~~sven~~~~~ ++ netif_rx (skb); //~~~~~sven~~~~~ ++ } else { ++ tmp = hwmb->mb_cs.data; ++ tmp = hwmb->mb_id; ++ tmp = hwmb->mb_data[0]; ++ tmp = __raw_readl(flexcan->io_base + CAN_HW_REG_TIMER); ++ } ++ } ++ ++ if (iflag1 & (__FIFO_OV_INT | __FIFO_WARN_INT)) { ++ skb = dev_alloc_skb(sizeof(struct can_frame)); ++ if (skb) { ++ frame = ++ (struct can_frame *)skb_put(skb, sizeof(*frame)); ++ memset(frame, 0, sizeof(*frame)); ++ frame->can_id = CAN_ERR_FLAG | CAN_ERR_CRTL; ++ frame->can_dlc = CAN_ERR_DLC; ++ if (iflag1 & __FIFO_WARN_INT) ++ frame->data[1] |= ++ CAN_ERR_CRTL_TX_WARNING | ++ CAN_ERR_CRTL_RX_WARNING; ++ if (iflag1 & __FIFO_OV_INT) ++ frame->data[1] |= CAN_ERR_CRTL_RX_OVERFLOW; ++ ++ skb->dev = dev; ++ skb->protocol = __constant_htons(ETH_P_CAN); ++ skb->ip_summed = CHECKSUM_UNNECESSARY; ++ //netif_receive_skb (skb); ~~~~~sven~~~~~ ++ netif_rx (skb); //~~~~~sven~~~~~ ++ } ++ } ++} ++ ++/*! ++ * @brief The function call by CAN ISR to handle mb events. ++ * ++ * @param dev the pointer of network device. ++ * ++ * @return none ++ */ ++void flexcan_mbm_isr(struct net_device *dev) ++{ ++ int i, iflag1, iflag2, maxmb; ++ struct flexcan_device *flexcan = dev ? netdev_priv(dev) : NULL; ++ ++ if (flexcan->maxmb > 31) { ++ maxmb = flexcan->maxmb + 1 - 32; ++ iflag1 = __raw_readl(flexcan->io_base + CAN_HW_REG_IFLAG1) & ++ __raw_readl(flexcan->io_base + CAN_HW_REG_IMASK1); ++ iflag2 = __raw_readl(flexcan->io_base + CAN_HW_REG_IFLAG2) & ++ __raw_readl(flexcan->io_base + CAN_HW_REG_IMASK2); ++ iflag2 &= (1 << maxmb) - 1; ++ maxmb = 32; ++ } else { ++ maxmb = flexcan->maxmb + 1; ++ iflag1 = __raw_readl(flexcan->io_base + CAN_HW_REG_IFLAG1) & ++ __raw_readl(flexcan->io_base + CAN_HW_REG_IMASK1); ++ iflag1 &= (1 << maxmb) - 1; ++ iflag2 = 0; ++ } ++ ++ __raw_writel(iflag1, flexcan->io_base + CAN_HW_REG_IFLAG1); ++ __raw_writel(iflag2, flexcan->io_base + CAN_HW_REG_IFLAG2); ++ ++ if (flexcan->fifo) { ++ flexcan_fifo_isr(dev, iflag1); ++ iflag1 &= 0xFFFFFF00; ++ } ++ for (i = 0; iflag1 && (i < maxmb); i++) { ++ if (iflag1 & (1 << i)) { ++ iflag1 &= ~(1 << i); ++ flexcan_mb_bottom(dev, i); ++ } ++ } ++ ++ for (i = maxmb; iflag2 && (i <= flexcan->maxmb); i++) { ++ if (iflag2 & (1 << (i - 32))) { ++ iflag2 &= ~(1 << (i - 32)); ++ flexcan_mb_bottom(dev, i); ++ } ++ } ++} ++ ++/*! ++ * @brief function to xmit message buffer ++ * ++ * @param flexcan the pointer of can hardware device. ++ * @param frame the pointer of can message frame. ++ * ++ * @return Returns 0 if xmit is success. otherwise returns non-zero. ++ */ ++int flexcan_mbm_xmit(struct flexcan_device *flexcan, struct can_frame *frame) ++{ ++ int i = flexcan->xmit_mb; ++ struct can_hw_mb *hwmb = flexcan->hwmb; ++ ++ do { ++ if (hwmb[i].mb_cs.cs.code == CAN_MB_TX_INACTIVE) ++ break; ++ if ((++i) > flexcan->maxmb) { ++ if (flexcan->fifo) ++ i = FLEXCAN_MAX_FIFO_MB; ++ else ++ i = flexcan->xmit_maxmb + 1; ++ } ++ if (i == flexcan->xmit_mb) ++ return -1; ++ } while (1); ++ ++ flexcan->xmit_mb = i + 1; ++ if (flexcan->xmit_mb > flexcan->maxmb) { ++ if (flexcan->fifo) ++ flexcan->xmit_mb = FLEXCAN_MAX_FIFO_MB; ++ else ++ flexcan->xmit_mb = flexcan->xmit_maxmb + 1; ++ } ++ ++ if (frame->can_id & CAN_RTR_FLAG) ++ hwmb[i].mb_cs.cs.rtr = 1; ++ else ++ hwmb[i].mb_cs.cs.rtr = 0; ++ ++ if (frame->can_id & CAN_EFF_FLAG) { ++ hwmb[i].mb_cs.cs.ide = 1; ++ hwmb[i].mb_cs.cs.srr = 1; ++ hwmb[i].mb_id = frame->can_id & CAN_EFF_MASK; ++ } else { ++ hwmb[i].mb_cs.cs.ide = 0; ++ hwmb[i].mb_id = (frame->can_id & CAN_SFF_MASK) << 18; ++ } ++ ++ hwmb[i].mb_cs.cs.length = frame->can_dlc; ++ flexcan_memcpy(hwmb[i].mb_data, frame->data, frame->can_dlc); ++ hwmb[i].mb_cs.cs.code = CAN_MB_TX_ONCE; ++ return 0; ++} ++ ++/*! ++ * @brief function to initial message buffer ++ * ++ * @param flexcan the pointer of can hardware device. ++ * ++ * @return none ++ */ ++void flexcan_mbm_init(struct flexcan_device *flexcan) ++{ ++ struct can_hw_mb *hwmb; ++ int rx_mb, i; ++ ++ /* Set global mask to receive all messages */ ++ __raw_writel(0, flexcan->io_base + CAN_HW_REG_RXGMASK); ++ __raw_writel(0, flexcan->io_base + CAN_HW_REG_RX14MASK); ++ __raw_writel(0, flexcan->io_base + CAN_HW_REG_RX15MASK); ++ ++ memset(flexcan->hwmb, 0, sizeof(*hwmb) * FLEXCAN_MAX_MB); ++ /* Set individual mask to receive all messages */ ++ memset(flexcan->rx_mask, 0, sizeof(unsigned int) * FLEXCAN_MAX_MB); ++ ++ if (flexcan->fifo) ++ rx_mb = FLEXCAN_MAX_FIFO_MB; ++ else ++ rx_mb = flexcan->maxmb - flexcan->xmit_maxmb; ++ ++ hwmb = flexcan->hwmb; ++ if (flexcan->fifo) { ++ unsigned long *id_table = flexcan->io_base + CAN_FIFO_BASE; ++ for (i = 0; i < rx_mb; i++) ++ id_table[i] = 0; ++ } else { ++ for (i = 0; i < rx_mb; i++) { ++ hwmb[i].mb_cs.cs.code = CAN_MB_RX_EMPTY; ++ /* ++ * IDE bit can not control by mask registers ++ * So set message buffer to receive extend ++ * or standard message. ++ */ ++ if (flexcan->ext_msg && flexcan->std_msg) ++ hwmb[i].mb_cs.cs.ide = i & 1; ++ else { ++ if (flexcan->ext_msg) ++ hwmb[i].mb_cs.cs.ide = 1; ++ } ++ } ++ } ++ ++ for (; i <= flexcan->maxmb; i++) ++ hwmb[i].mb_cs.cs.code = CAN_MB_TX_INACTIVE; ++ ++ flexcan->xmit_mb = rx_mb; ++} +Index: linux-2.6.31.6/drivers/net/can/Kconfig +=================================================================== +--- linux-2.6.31.6.orig/drivers/net/can/Kconfig 2009-11-10 01:32:31.000000000 +0100 ++++ linux-2.6.31.6/drivers/net/can/Kconfig 2009-12-16 17:34:40.585687608 +0100 +@@ -84,4 +84,13 @@ + a problem with CAN support and want to see more of what is going + on. + ++config CAN_FLEXCAN ++ tristate "Freescale FlexCAN" ++ depends on CAN && ARCH_MX35 ++ default m ++ ---help--- ++ This select the support of Freescale CAN(FlexCAN). ++ This driver can also be built as a module. ++ If unsure, say N. ++ + endmenu +Index: linux-2.6.31.6/drivers/net/can/Makefile +=================================================================== +--- linux-2.6.31.6.orig/drivers/net/can/Makefile 2009-11-10 01:32:31.000000000 +0100 ++++ linux-2.6.31.6/drivers/net/can/Makefile 2009-12-16 17:34:40.585687608 +0100 +@@ -9,4 +9,6 @@ + + obj-$(CONFIG_CAN_SJA1000) += sja1000/ + ++obj-$(CONFIG_CAN_FLEXCAN) += flexcan/ ++ + ccflags-$(CONFIG_CAN_DEBUG_DEVICES) := -DDEBUG +Index: linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mxc_flexcan.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mxc_flexcan.h 2009-12-16 17:34:40.585687608 +0100 +@@ -0,0 +1,29 @@ ++/* ++ * Copyright (C) 2009 Jan Weitzel ++ * Copyright 2004-2009 Freescale Semiconductor, Inc. All Rights Reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ */ ++ ++#ifndef __ASM_ARCH_MXC_FLEXCAN ++#define __ASM_ARCH_MXC_FLEXCAN ++ ++struct flexcan_platform_data { ++#ifdef REGULATOR ++ char *core_reg; ++ char *io_reg; ++#endif ++ void (*xcvr_enable) (int id, int en); ++ void (*active) (int id); ++ void (*inactive) (int id); ++}; ++ ++#endif /* __ASM_ARCH_MXC_FLEXCAN */ +Index: linux-2.6.31.6/arch/arm/mach-mx3/pcm043.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/pcm043.c 2009-12-16 17:34:40.295686175 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/pcm043.c 2009-12-17 12:45:43.254686159 +0100 +@@ -49,6 +49,7 @@ + #include + #include + #include ++#include + + #include "devices.h" + +@@ -150,6 +151,34 @@ + &mxc_fec_device, + }; + ++static void flexcan_xcvr_enable(int id, int en) ++{ ++ static int pwdn; ++ ++ if (id < 0 || id > 1) ++ return; ++ ++ if (en) { ++ if (!(pwdn++)) ++ ;//pmic_gpio_set_bit_val(MCU_GPIO_REG_GPIO_CONTROL_2, 1, 0); ++ } else { ++ if (!(--pwdn)) ++ ;//pmic_gpio_set_bit_val(MCU_GPIO_REG_GPIO_CONTROL_2, 1, 1); ++ } ++} ++ ++struct flexcan_platform_data flexcan_data0 = { ++ .xcvr_enable = flexcan_xcvr_enable, ++// .active = gpio_can_active, ++// .inactive = gpio_can_inactive, ++}; ++ ++struct flexcan_platform_data flexcan_data1 = { ++ .xcvr_enable = flexcan_xcvr_enable, ++// .active = gpio_can_active, ++// .inactive = gpio_can_inactive, ++}; ++ + static struct pad_desc pcm043_pads[] = { + /* UART1 */ + MX35_PAD_CTS1__UART1_CTS, +@@ -218,6 +247,12 @@ + MX35_PAD_STXD4__AUDMUX_AUD4_TXD, + MX35_PAD_SRXD4__AUDMUX_AUD4_RXD, + MX35_PAD_SCK4__AUDMUX_AUD4_TXC, ++ /* CAN */ ++ MX35_PAD_SD2_DATA2__CAN1_RXCAN, ++ MX35_PAD_SD2_DATA3__CAN1_TXCAN, ++ MX35_PAD_SD2_DATA1__GPIO2_3, ++ MX35_PAD_TX5_RX0__CAN2_TXCAN, ++ MX35_PAD_TX4_RX1__CAN2_RXCAN, + }; + + static int pcm043_usbh1_init(struct platform_device *pdev) +@@ -414,6 +449,14 @@ + mxc_register_device(&mxc_otg, &otg_pdata); + else + mxc_register_device(&mxc_otg_udc_device, &usb_data); ++ ++ mxc_register_device (&flexcan_device0, &flexcan_data0); ++ mxc_register_device (&flexcan_device1, &flexcan_data1); ++ ++ // Activate CAN-port on mapper ++ gpio_request (32 + 3, "can"); ++ gpio_direction_output (32 + 3, 1); ++ gpio_set_value (32 + 3, 1); + } + + static void __init pcm043_timer_init(void) +Index: linux-2.6.31.6/arch/arm/mach-mx3/devices.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/devices.c 2009-12-16 17:34:40.234637457 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/devices.c 2009-12-16 17:34:40.595627212 +0100 +@@ -475,6 +475,46 @@ + .num_resources = ARRAY_SIZE(mxc_fec_resources), + .resource = mxc_fec_resources, + }; ++ ++static struct resource flexcan0_resources[] = { ++ { ++ .start = MX35_CAN1_BASE_ADDR, ++ .end = MX35_CAN1_BASE_ADDR + 0x97F, ++ .flags = IORESOURCE_MEM ++ }, { ++ .start = MXC_INT_CAN1, ++ .end = MXC_INT_CAN1, ++ .flags = IORESOURCE_IRQ ++ } ++}; ++ ++static struct resource flexcan1_resources[] = { ++ { ++ .start = MX35_CAN2_BASE_ADDR, ++ .end = MX35_CAN2_BASE_ADDR + 0x97F, ++ .flags = IORESOURCE_MEM ++ }, { ++ .start = MXC_INT_CAN2, ++ .end = MXC_INT_CAN2, ++ .flags = IORESOURCE_IRQ ++ } ++}; ++ ++struct platform_device flexcan_device0 = { ++ .name = "FlexCAN", ++ .id = 0, ++ .num_resources = ARRAY_SIZE(flexcan0_resources), ++ .resource = flexcan0_resources, ++ //FIXME.dev = { .release = mxc_nop_release ++}; ++ ++struct platform_device flexcan_device1 = { ++ .name = "FlexCAN", ++ .id = 1, ++ .num_resources = ARRAY_SIZE(flexcan1_resources), ++ .resource = flexcan1_resources, ++}; ++ + #endif + + static struct resource imx_ssi_resources0[] = { +Index: linux-2.6.31.6/arch/arm/mach-mx3/devices.h +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/devices.h 2009-12-16 17:34:39.985630161 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/devices.h 2009-12-16 17:34:40.595627212 +0100 +@@ -25,3 +25,5 @@ + extern struct platform_device imx_spi_device0; + extern struct platform_device imx_spi_device1; + extern struct platform_device imx_spi_device2; ++extern struct platform_device flexcan_device0; ++extern struct platform_device flexcan_device1; +Index: linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mx35.h +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/plat-mxc/include/mach/mx35.h 2009-12-16 17:34:40.055669053 +0100 ++++ linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mx35.h 2009-12-16 17:34:40.595627212 +0100 +@@ -7,6 +7,8 @@ + #define MXC_FEC_BASE_ADDR 0x50038000 + #define MX35_OTG_BASE_ADDR 0x53ff4000 + #define MX35_NFC_BASE_ADDR 0xBB000000 ++#define MX35_CAN1_BASE_ADDR 0x53FE4000 ++#define MX35_CAN2_BASE_ADDR 0x53FE8000 + + /* + * Interrupt numbers +Index: linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/clock-imx35.c 2009-12-16 17:34:40.245728272 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/clock-imx35.c 2009-12-17 12:46:53.565502506 +0100 +@@ -478,6 +478,8 @@ + _REGISTER_CLOCK(NULL, "iim", iim_clk) + _REGISTER_CLOCK(NULL, "gpu2d", gpu2d_clk) + _REGISTER_CLOCK("mxc_nand.0", NULL, nfc_clk) ++ _REGISTER_CLOCK("FlexCAN.0", "can_clk", can1_clk) ++ _REGISTER_CLOCK("FlexCAN.1", "can_clk", can2_clk) + }; + + int __init mx35_clocks_init() diff --git a/recipes/linux/linux-2.6.31/pcm043/linux-2.6.31.6-spi.patch b/recipes/linux/linux-2.6.31/pcm043/linux-2.6.31.6-spi.patch new file mode 100644 index 0000000000..a49f05b2ec --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/linux-2.6.31.6-spi.patch @@ -0,0 +1,116 @@ +Add support for SPI and MAX7301 +Signed-off-by: Sven Dyroff + +rebased to 2.6.31.6 +Signed-off-by: Andreas Adam +--- +Index: linux-2.6.31.6/arch/arm/mach-mx3/pcm043.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/pcm043.c 2009-12-11 13:58:49.894701069 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/pcm043.c 2009-12-11 14:01:08.704700136 +0100 +@@ -30,6 +30,12 @@ + #include + #include + #include ++#ifdef CONFIG_SPI ++#include ++#endif ++#ifdef CONFIG_GPIO_MAX7301 ++#include ++#endif + + #include + #include +@@ -42,6 +48,9 @@ + #if defined CONFIG_I2C_IMX || defined CONFIG_I2C_IMX_MODULE + #include + #endif ++#ifdef CONFIG_SPI ++#include ++#endif + #include + #include + #include +@@ -243,6 +252,18 @@ + /* USB host */ + MX35_PAD_I2C2_CLK__USB_TOP_USBH2_PWR, + MX35_PAD_I2C2_DAT__USB_TOP_USBH2_OC, ++ /* SPI */ ++ MX35_PAD_CSPI1_SS0__CSPI1_SS0, ++ MX35_PAD_CSPI1_SS1__CSPI1_SS1, ++ MX35_PAD_CSPI1_MISO__CSPI1_MISO, ++ MX35_PAD_CSPI1_MOSI__CSPI1_MOSI, ++ MX35_PAD_CSPI1_SCLK__CSPI1_SCLK, ++ MX35_PAD_CSPI1_SPI_RDY__CSPI1_RDY, ++ MX35_PAD_STXD5__CSPI2_MOSI, ++ MX35_PAD_SRXD5__CSPI2_MISO, ++ MX35_PAD_SCK5__CSPI2_SCLK, ++ MX35_PAD_STXFS5__CSPI2_RDY, ++ MX35_PAD_HCKR__CSPI2_SS0, + /* SSI */ + MX35_PAD_STXFS4__AUDMUX_AUD4_TXFS, + MX35_PAD_STXD4__AUDMUX_AUD4_TXD, +@@ -305,6 +326,33 @@ + .phy_mode = FSL_USB2_PHY_UTMI, + }; + ++#ifdef CONFIG_SPI ++static unsigned int pcm043_spi_cs [] = {MXC_SPI_CS(0), }; ++ ++static struct spi_imx_master pcm043_spi_1_data = { ++ .chipselect = pcm043_spi_cs, ++ .num_chipselect = ARRAY_SIZE (pcm043_spi_cs), ++}; ++#endif /* CONFIG_SPI */ ++ ++#ifdef CONFIG_GPIO_MAX7301 ++static struct max7301_platform_data max7301_info = { ++ .base = -1, ++}; ++ ++// bus_num must match id in imx_spi_device struct ++static struct spi_board_info spi_board_info [] __initdata = { ++ { ++ .modalias = "max7301", ++ .platform_data = &max7301_info, ++ .max_speed_hz = 13000000, ++ .bus_num = 1, ++ .chip_select = 0, ++ .mode = SPI_MODE_0, ++ }, ++}; ++#endif /* CONFIG_GPIO_MAX7301 */ ++ + static int otg_mode_host; + + static int __init pcm043_otg_mode(char *options) +@@ -454,7 +502,13 @@ + mxc_register_device(&mxc_otg, &otg_pdata); + else + mxc_register_device(&mxc_otg_udc_device, &usb_data); +- ++#ifdef CONFIG_SPI ++ mxc_register_device (&imx_spi_device1, &pcm043_spi_1_data); ++#endif ++#ifdef CONFIG_GPIO_MAX7301 ++ spi_register_board_info (spi_board_info, ++ ARRAY_SIZE (spi_board_info)); ++#endif + mxc_register_device (&flexcan_device0, &flexcan_data0); + mxc_register_device (&flexcan_device1, &flexcan_data1); + +Index: linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mx3x.h +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/plat-mxc/include/mach/mx3x.h 2009-11-10 01:32:31.000000000 +0100 ++++ linux-2.6.31.6/arch/arm/plat-mxc/include/mach/mx3x.h 2009-12-11 13:59:13.976022108 +0100 +@@ -279,8 +279,8 @@ + + /* Mandatory defines used globally */ + +-/* this CPU supports up to 96 GPIOs */ +-#define ARCH_NR_GPIOS 96 ++/* this CPU supports up to 96 GPIOs (don't forget the gpio expander!) */ ++#define ARCH_NR_GPIOS (96 + 28) + + #if !defined(__ASSEMBLY__) && !defined(__MXC_BOOT_UNCOMPRESS) + diff --git a/recipes/linux/linux-2.6.31/pcm043/w1_master.patch b/recipes/linux/linux-2.6.31/pcm043/w1_master.patch new file mode 100644 index 0000000000..d16cc9c806 --- /dev/null +++ b/recipes/linux/linux-2.6.31/pcm043/w1_master.patch @@ -0,0 +1,26 @@ +Add 1-wire +Signed-off-by: Jan Weitzel +--- +Index: linux-2.6.31.6/arch/arm/mach-mx3/pcm043.c +=================================================================== +--- linux-2.6.31.6.orig/arch/arm/mach-mx3/pcm043.c 2009-12-11 13:52:55.964646780 +0100 ++++ linux-2.6.31.6/arch/arm/mach-mx3/pcm043.c 2009-12-11 13:55:28.858433047 +0100 +@@ -149,6 +149,7 @@ + static struct platform_device *devices[] __initdata = { + &pcm043_flash, + &mxc_fec_device, ++ &mxc_w1_master_device, + }; + + static void flexcan_xcvr_enable(int id, int en) +@@ -247,7 +248,9 @@ + MX35_PAD_STXD4__AUDMUX_AUD4_TXD, + MX35_PAD_SRXD4__AUDMUX_AUD4_RXD, + MX35_PAD_SCK4__AUDMUX_AUD4_TXC, +- /* CAN */ ++ /* 1-Wire*/ ++ MX35_PAD_GPIO1_0__OWIRE_LINE, ++ /* CAN */ + MX35_PAD_SD2_DATA2__CAN1_RXCAN, + MX35_PAD_SD2_DATA3__CAN1_TXCAN, + MX35_PAD_SD2_DATA1__GPIO2_3, diff --git a/recipes/linux/linux-davinci.inc b/recipes/linux/linux-davinci.inc index a1233d4fc0..6ee5752796 100644 --- a/recipes/linux/linux-davinci.inc +++ b/recipes/linux/linux-davinci.inc @@ -8,7 +8,7 @@ require multi-kernel.inc SRC_URI = "git://arago-project.org/git/projects/linux-davinci.git;protocol=git \ file://defconfig" -COMPATIBLE_MACHINE = "(dm6446-evm|dm6467-evm|dm6467t-evm|dm355-evm|dm365-evm)" +COMPATIBLE_MACHINE = "(dm6446-evm|dm6467-evm|dm6467t-evm|dm355-evm|dm365-evm|dm386-evm)" S = "${WORKDIR}/git" diff --git a/recipes/linux/linux-davinci/dm365-evm/defconfig b/recipes/linux/linux-davinci/dm365/defconfig similarity index 100% rename from recipes/linux/linux-davinci/dm365-evm/defconfig rename to recipes/linux/linux-davinci/dm365/defconfig diff --git a/recipes/linux/linux-davinci_git.bb b/recipes/linux/linux-davinci_git.bb index e25a15ab16..13e2f61b84 100644 --- a/recipes/linux/linux-davinci_git.bb +++ b/recipes/linux/linux-davinci_git.bb @@ -3,7 +3,7 @@ require multi-kernel.inc DESCRIPTION = "Linux kernel for DaVinci processors" KERNEL_IMAGETYPE = "uImage" -COMPATIBLE_MACHINE = "(dm355-evm|dm365-evm|dm6446-evm|dm6467-evm|dm6467t-evm|omapl137|omapl138|dm355-leopard|davinci-sffsdr|hawkboard)" +COMPATIBLE_MACHINE = "(dm355-evm|dm365-evm|dm6446-evm|dm6467-evm|dm6467t-evm|omapl137|omapl138|dm355-leopard|davinci-sffsdr|hawkboard|dm368-evm)" DEFAULT_PREFERENCE = "1" DEFAULT_PREFERENCE_dm365 = "-1" diff --git a/recipes/linux/linux-ea3250-2.6.27.8/lpc32xx-spwm.patch b/recipes/linux/linux-ea3250-2.6.27.8/lpc32xx-spwm.patch index 64e9fff1eb..fef3fb750c 100644 --- a/recipes/linux/linux-ea3250-2.6.27.8/lpc32xx-spwm.patch +++ b/recipes/linux/linux-ea3250-2.6.27.8/lpc32xx-spwm.patch @@ -1,6 +1,7 @@ -diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/arch-lpc32xx.c linux-2.6.27.8-new/arch/arm/mach-lpc32xx/arch-lpc32xx.c ---- linux-2.6.27.8/arch/arm/mach-lpc32xx/arch-lpc32xx.c 2009-11-24 15:42:39.000000000 +0100 -+++ linux-2.6.27.8-new/arch/arm/mach-lpc32xx/arch-lpc32xx.c 2009-11-24 15:52:40.000000000 +0100 +Index: linux-2.6.27.8/arch/arm/mach-lpc32xx/arch-lpc32xx.c +=================================================================== +--- linux-2.6.27.8.orig/arch/arm/mach-lpc32xx/arch-lpc32xx.c 2011-03-01 17:33:29.480903120 +0100 ++++ linux-2.6.27.8/arch/arm/mach-lpc32xx/arch-lpc32xx.c 2011-03-01 17:33:29.550938120 +0100 @@ -342,6 +342,9 @@ tmp |= UART_UART6_IRDAMOD_BYPASS; #endif @@ -11,9 +12,10 @@ diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/ } static struct map_desc lpc32xx_io_desc[] __initdata = { -diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/include/mach/lpc32xx_pwm.h linux-2.6.27.8-new/arch/arm/mach-lpc32xx/include/mach/lpc32xx_pwm.h ---- linux-2.6.27.8/arch/arm/mach-lpc32xx/include/mach/lpc32xx_pwm.h 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.27.8-new/arch/arm/mach-lpc32xx/include/mach/lpc32xx_pwm.h 2009-11-24 15:54:09.000000000 +0100 +Index: linux-2.6.27.8/arch/arm/mach-lpc32xx/include/mach/lpc32xx_pwm.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.27.8/arch/arm/mach-lpc32xx/include/mach/lpc32xx_pwm.h 2011-03-01 17:33:29.550938120 +0100 @@ -0,0 +1,31 @@ +/* + * linux/arch/arm/mach-lpc32xx/include/mach/lpc32xx_pwm.h @@ -46,9 +48,10 @@ diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/ +#define PERIPH_CLK 0x01 + +#endif -diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/Kconfig linux-2.6.27.8-new/arch/arm/mach-lpc32xx/Kconfig ---- linux-2.6.27.8/arch/arm/mach-lpc32xx/Kconfig 2009-11-24 15:42:39.000000000 +0100 -+++ linux-2.6.27.8-new/arch/arm/mach-lpc32xx/Kconfig 2009-11-24 16:01:16.000000000 +0100 +Index: linux-2.6.27.8/arch/arm/mach-lpc32xx/Kconfig +=================================================================== +--- linux-2.6.27.8.orig/arch/arm/mach-lpc32xx/Kconfig 2011-03-01 17:33:29.530928120 +0100 ++++ linux-2.6.27.8/arch/arm/mach-lpc32xx/Kconfig 2011-03-01 17:33:29.550938120 +0100 @@ -185,6 +185,12 @@ which support is selected, the ethernet interface driver needs to be selected in the device driver networking section. @@ -62,9 +65,10 @@ diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/ menu "Standard UARTS" config MACH_LPC32XX_UART5_ENABLE -diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/Makefile linux-2.6.27.8-new/arch/arm/mach-lpc32xx/Makefile ---- linux-2.6.27.8/arch/arm/mach-lpc32xx/Makefile 2009-11-24 15:42:39.000000000 +0100 -+++ linux-2.6.27.8-new/arch/arm/mach-lpc32xx/Makefile 2009-11-24 16:01:39.000000000 +0100 +Index: linux-2.6.27.8/arch/arm/mach-lpc32xx/Makefile +=================================================================== +--- linux-2.6.27.8.orig/arch/arm/mach-lpc32xx/Makefile 2011-03-01 17:33:29.530928120 +0100 ++++ linux-2.6.27.8/arch/arm/mach-lpc32xx/Makefile 2011-03-01 17:33:29.550938120 +0100 @@ -7,6 +7,7 @@ obj-y := timer-lpc32xx.o irq-lpc32xx.o arch-lpc32xx.o obj-y += serial-lpc32xx.o clocks-lpc32xx.o @@ -73,9 +77,10 @@ diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/ obj-m := obj-n := obj- := -diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/spwm-lpc32xx.c linux-2.6.27.8-new/arch/arm/mach-lpc32xx/spwm-lpc32xx.c ---- linux-2.6.27.8/arch/arm/mach-lpc32xx/spwm-lpc32xx.c 1970-01-01 01:00:00.000000000 +0100 -+++ linux-2.6.27.8-new/arch/arm/mach-lpc32xx/spwm-lpc32xx.c 2009-11-24 16:07:20.000000000 +0100 +Index: linux-2.6.27.8/arch/arm/mach-lpc32xx/spwm-lpc32xx.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ linux-2.6.27.8/arch/arm/mach-lpc32xx/spwm-lpc32xx.c 2011-03-01 17:33:29.550938120 +0100 @@ -0,0 +1,126 @@ +/* + * linux/arch/arm/mach-lpc32xx/spwm-lpc32xx.c @@ -203,9 +208,19 @@ diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/ + lpc32xx_spwm_set_clockdiv(PWM1, 1); + lpc32xx_spwm_set_clockdiv(PWM2, 1); +} -diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/sys-lpc32xx.h linux-2.6.27.8-new/arch/arm/mach-lpc32xx/sys-lpc32xx.h ---- linux-2.6.27.8/arch/arm/mach-lpc32xx/sys-lpc32xx.h 2009-11-24 15:42:39.000000000 +0100 -+++ linux-2.6.27.8-new/arch/arm/mach-lpc32xx/sys-lpc32xx.h 2009-11-24 16:08:24.000000000 +0100 +Index: linux-2.6.27.8/arch/arm/mach-lpc32xx/sys-lpc32xx.h +=================================================================== +--- linux-2.6.27.8.orig/arch/arm/mach-lpc32xx/sys-lpc32xx.h 2011-03-01 17:33:29.517588120 +0100 ++++ linux-2.6.27.8/arch/arm/mach-lpc32xx/sys-lpc32xx.h 2011-03-01 17:34:00.286298119 +0100 +@@ -30,7 +30,7 @@ + #include + + #define TIMER0_IOBASE io_p2v(TIMER0_BASE) +-#define TIMER1_IOBASE io_p2v(TIMER1_BASE) ++#define TIMER1_IOBASE io_p2v(TIMER1_BASE) + #define CLKPWR_IOBASE io_p2v(CLK_PM_BASE) + #define GPIO_IOBASE io_p2v(GPIO_BASE) + @@ -83,14 +83,17 @@ #endif @@ -225,3 +240,4 @@ diff -Naur -X linux/Documentation/dontdiff linux-2.6.27.8/arch/arm/mach-lpc32xx/ +#endif #endif + diff --git a/recipes/linux/linux-gta04/omap3_beaglehyb_defconfig b/recipes/linux/linux-gta04/omap3_beaglehyb_defconfig new file mode 100644 index 0000000000..e89a5b047b --- /dev/null +++ b/recipes/linux/linux-gta04/omap3_beaglehyb_defconfig @@ -0,0 +1,2850 @@ +# +# Automatically generated make config: don't edit +# Linux/arm 2.6.37-rc5 Kernel Configuration +# Mon Dec 13 20:44:23 2010 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +# CONFIG_ARCH_USES_GETTIMEOFFSET is not set +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_LZO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +# CONFIG_AUDIT is not set +# CONFIG_HAVE_GENERIC_HARDIRQS is not set +# CONFIG_SPARSE_IRQ is not set + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +# CONFIG_TINY_RCU is not set +# CONFIG_TINY_PREEMPT_RCU is not set +CONFIG_PREEMPT_RCU=y +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +CONFIG_SRCU_SYNCHRONIZE_DELAY=10 +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +# CONFIG_CGROUPS is not set +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_LZO is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +# CONFIG_ELF_CORE is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_PERF_COUNTERS is not set +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_HW_BREAKPOINT=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +# CONFIG_INLINE_WRITE_UNLOCK is not set +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +# CONFIG_MUTEX_SPIN_ON_OWNER is not set +CONFIG_FREEZER=y + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCMRING is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_STMP3XXX is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_NUC93X is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5P6442 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_S5PV310 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_TCC_926 is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_DAVINCI is not set +CONFIG_ARCH_OMAP=y +# CONFIG_PLAT_SPEAR is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_KEYBOARD_GPIO_POLLED is not set + +# +# TI OMAP Common Features +# +CONFIG_ARCH_OMAP_OTG=y +# CONFIG_ARCH_OMAP1 is not set +CONFIG_ARCH_OMAP2PLUS=y + +# +# OMAP Feature Selections +# +CONFIG_OMAP_RESET_CLOCKS=y +CONFIG_OMAP_MUX=y +# CONFIG_OMAP_MUX_DEBUG is not set +CONFIG_OMAP_MUX_WARNINGS=y +CONFIG_OMAP_MCBSP=y +CONFIG_OMAP_MBOX_FWK=m +CONFIG_OMAP_MBOX_KFIFO_SIZE=256 +# CONFIG_OMAP_MPU_TIMER is not set +CONFIG_OMAP_32K_TIMER=y +# CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set +CONFIG_OMAP_32K_TIMER_HZ=128 +CONFIG_OMAP_DM_TIMER=y +# CONFIG_OMAP_PM_NONE is not set +CONFIG_OMAP_PM_NOOP=y + +# +# TI OMAP2/3/4 Specific Features +# +CONFIG_ARCH_OMAP2PLUS_TYPICAL=y +# CONFIG_ARCH_OMAP2 is not set +CONFIG_ARCH_OMAP3=y +# CONFIG_ARCH_OMAP4 is not set +CONFIG_ARCH_OMAP3430=y +CONFIG_OMAP_PACKAGE_CBB=y + +# +# OMAP Board Type +# +CONFIG_MACH_OMAP3_BEAGLE=y +CONFIG_OMAP3_BEAGLE_OPENMOKO_HYBRID=y +# CONFIG_MACH_GTA04 is not set +# CONFIG_MACH_DEVKIT8000 is not set +# CONFIG_MACH_OMAP_LDP is not set +# CONFIG_MACH_OMAP3530_LV_SOM is not set +# CONFIG_MACH_OMAP3_TORPEDO is not set +# CONFIG_MACH_OVERO is not set +# CONFIG_MACH_OMAP3EVM is not set +# CONFIG_MACH_OMAP3517EVM is not set +# CONFIG_MACH_CRANEBOARD is not set +# CONFIG_MACH_OMAP3_PANDORA is not set +# CONFIG_MACH_OMAP3_TOUCHBOOK is not set +# CONFIG_MACH_OMAP_3430SDP is not set +CONFIG_MACH_NOKIA_RM680=y +# CONFIG_MACH_NOKIA_RX51 is not set +# CONFIG_MACH_OMAP_ZOOM2 is not set +# CONFIG_MACH_OMAP_ZOOM3 is not set +# CONFIG_MACH_CM_T35 is not set +# CONFIG_MACH_CM_T3517 is not set +# CONFIG_MACH_IGEP0020 is not set +# CONFIG_MACH_IGEP0030 is not set +# CONFIG_MACH_SBC3530 is not set +# CONFIG_MACH_OMAP_3630SDP is not set +# CONFIG_OMAP3_EMU is not set +# CONFIG_OMAP3_SDRC_AC_TIMING is not set + +# +# Processor Type +# +CONFIG_CPU_32v6K=y +CONFIG_CPU_V7=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +# CONFIG_SWP_EMULATE is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_743622 is not set + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_HZ=128 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_HIGHMEM is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_NEED_PER_CPU_KM=y +CONFIG_CLEANCACHE=y +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_LEDS=y +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_DEPRECATED_PARAM_STRUCT is not set + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE=" debug " +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +CONFIG_KEXEC=y +CONFIG_ATAGS_PROC=y +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +CONFIG_CPU_FREQ_DEBUG=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_STAT_DETAILS=y +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +# CONFIG_CPU_IDLE is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_HAVE_AOUT=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=y + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_DEBUG=y +# CONFIG_PM_ADVANCED_DEBUG is not set +# CONFIG_PM_VERBOSE is not set +CONFIG_CAN_PM_TRACE=y +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND_NVS=y +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +# CONFIG_APM_EMULATION is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM_OPS=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_IPCOMP=m +CONFIG_NET_KEY=y +# CONFIG_NET_KEY_MIGRATE is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=y +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_YEAH=m +CONFIG_TCP_CONG_ILLINOIS=m +CONFIG_DEFAULT_CUBIC=y +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_MIP6=m +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_IPV6_MROUTE=y +# CONFIG_IPV6_MROUTE_MULTIPLE_TABLES is not set +# CONFIG_IPV6_PIMSM_V2 is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +CONFIG_IP_DCCP=m +CONFIG_INET_DCCP_DIAG=m + +# +# DCCP CCIDs Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=y +# CONFIG_IP_DCCP_CCID3_DEBUG is not set +CONFIG_IP_DCCP_TFRC_LIB=y + +# +# DCCP Kernel Hacking +# +# CONFIG_IP_DCCP_DEBUG is not set +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_RDS is not set +CONFIG_TIPC=m +# CONFIG_TIPC_ADVANCED is not set +# CONFIG_TIPC_DEBUG is not set +CONFIG_ATM=m +CONFIG_ATM_CLIP=m +# CONFIG_ATM_CLIP_NO_ICMP is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +CONFIG_ATM_BR2684=m +# CONFIG_ATM_BR2684_IPFILTER is not set +# CONFIG_L2TP is not set +CONFIG_STP=m +CONFIG_GARP=m +CONFIG_BRIDGE=m +CONFIG_BRIDGE_IGMP_SNOOPING=y +# CONFIG_NET_DSA is not set +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +CONFIG_WAN_ROUTER=m +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_ROUTE=y +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_IND=y +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m + +# +# CAN Device Drivers +# +CONFIG_CAN_VCAN=m +# CONFIG_CAN_SLCAN is not set +# CONFIG_CAN_DEV is not set +# CONFIG_CAN_DEBUG_DEVICES is not set +CONFIG_IRDA=m + +# +# IrDA protocols +# +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y + +# +# IrDA options +# +CONFIG_IRDA_CACHE_LAST_LSAP=y +CONFIG_IRDA_FAST_RR=y +CONFIG_IRDA_DEBUG=y + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +CONFIG_IRTTY_SIR=m + +# +# Dongle support +# +CONFIG_DONGLE=y +CONFIG_ESI_DONGLE=m +CONFIG_ACTISYS_DONGLE=m +CONFIG_TEKRAM_DONGLE=m +CONFIG_TOIM3232_DONGLE=m +CONFIG_LITELINK_DONGLE=m +CONFIG_MA600_DONGLE=m +CONFIG_GIRBIL_DONGLE=m +CONFIG_MCP2120_DONGLE=m +CONFIG_OLD_BELKIN_DONGLE=m +# CONFIG_ACT200L_DONGLE is not set +CONFIG_KINGSUN_DONGLE=m +CONFIG_KSDAZZLE_DONGLE=m +CONFIG_KS959_DONGLE=m + +# +# FIR device drivers +# +CONFIG_USB_IRDA=m +CONFIG_SIGMATEL_FIR=m +CONFIG_MCS_FIR=m +CONFIG_BT=m +CONFIG_BT_L2CAP=m +CONFIG_BT_SCO=m +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +# CONFIG_BT_HCIUART_ATH3K is not set +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIVHCI is not set +# CONFIG_BT_MRVL is not set +# CONFIG_BT_ATH3K is not set +CONFIG_AF_RXRPC=m +# CONFIG_AF_RXRPC_DEBUG is not set +# CONFIG_RXKAD is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=m +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +CONFIG_CFG80211_DEFAULT_PS=y +# CONFIG_CFG80211_DEBUGFS is not set +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=y +CONFIG_LIB80211_CRYPT_WEP=m +CONFIG_LIB80211_CRYPT_CCMP=m +CONFIG_LIB80211_CRYPT_TKIP=m +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=m +CONFIG_MAC80211_HAS_RC=y +CONFIG_MAC80211_RC_PID=y +# CONFIG_MAC80211_RC_MINSTREL is not set +CONFIG_MAC80211_RC_DEFAULT_PID=y +CONFIG_MAC80211_RC_DEFAULT="pid" +# CONFIG_MAC80211_MESH is not set +# CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_DEBUG_MENU is not set +CONFIG_WIMAX=m +CONFIG_WIMAX_DEBUG_LEVEL=8 +CONFIG_RFKILL=m +CONFIG_RFKILL_INPUT=y +CONFIG_NET_9P=m +# CONFIG_NET_9P_DEBUG is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_TESTS is not set +CONFIG_MTD_CONCAT=y +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +# CONFIG_MTD_SST25L is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_OMAP2=y +CONFIG_MTD_NAND_OMAP_PREFETCH=y +# CONFIG_MTD_NAND_OMAP_PREFETCH_DMA is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +CONFIG_MTD_NAND_PLATFORM=y +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MTD_UBI_BEB_RESERVE=1 +# CONFIG_MTD_UBI_GLUEBI is not set + +# +# UBI debugging options +# +# CONFIG_MTD_UBI_DEBUG is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +# CONFIG_BLK_DEV_XIP is not set +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set +CONFIG_MISC_DEVICES=y +# CONFIG_AD525X_DPOT is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +CONFIG_BMP085=m +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=y +CONFIG_IWMC3200TOP=m +# CONFIG_IWMC3200TOP_DEBUG is not set +# CONFIG_IWMC3200TOP_DEBUGFS is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +CONFIG_RAID_ATTRS=m +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=m +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +CONFIG_SCSI_ISCSI_ATTRS=m +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +CONFIG_ISCSI_TCP=m +# CONFIG_ISCSI_BOOT_SYSFS is not set +# CONFIG_LIBFC is not set +# CONFIG_LIBFCOE is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID456=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +CONFIG_BLK_DEV_DM=m +# CONFIG_DM_DEBUG is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +# CONFIG_DM_LOG_USERSPACE is not set +CONFIG_DM_ZERO=m +CONFIG_DM_MULTIPATH=m +# CONFIG_DM_MULTIPATH_QL is not set +# CONFIG_DM_MULTIPATH_ST is not set +CONFIG_DM_DELAY=m +# CONFIG_DM_UEVENT is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_MACVLAN=m +# CONFIG_MACVTAP is not set +CONFIG_EQUALIZER=m +CONFIG_TUN=m +CONFIG_VETH=m +CONFIG_MII=y +# CONFIG_PHYLIB is not set +# CONFIG_NET_ETHERNET is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_WLAN=y +# CONFIG_LIBERTAS_THINFIRM is not set +CONFIG_AT76C50X_USB=m +CONFIG_USB_ZD1201=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_RTL8187=m +# CONFIG_MAC80211_HWSIM is not set +# CONFIG_ATH_COMMON is not set +CONFIG_B43=m +# CONFIG_B43_SDIO is not set +CONFIG_B43_PIO=y +# CONFIG_B43_PHY_N is not set +CONFIG_B43_PHY_LP=y +CONFIG_B43_HWRNG=y +# CONFIG_B43_DEBUG is not set +# CONFIG_B43LEGACY is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +# CONFIG_IWM is not set +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +# CONFIG_LIBERTAS_SDIO is not set +# CONFIG_LIBERTAS_SPI is not set +# CONFIG_LIBERTAS_DEBUG is not set +# CONFIG_LIBERTAS_MESH is not set +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +# CONFIG_P54_SPI is not set +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +# CONFIG_RT2800USB is not set +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y +# CONFIG_RT2X00_DEBUG is not set +CONFIG_WL1251=m +CONFIG_WL1251_SPI=m +CONFIG_WL1251_SDIO=m +# CONFIG_WL12XX_MENU is not set +CONFIG_WL12XX_PLATFORM_DATA=y +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set + +# +# WiMAX Wireless Broadband devices +# +CONFIG_WIMAX_I2400M=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_WIMAX_I2400M_SDIO=m +CONFIG_WIMAX_IWMC3200_SDIO=y +CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 + +# +# USB Network Adapters +# +CONFIG_USB_CATC=y +CONFIG_USB_KAWETH=y +CONFIG_USB_PEGASUS=y +CONFIG_USB_RTL8150=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +CONFIG_USB_NET_CDC_EEM=y +CONFIG_USB_NET_CDC_NCM=y +CONFIG_USB_NET_DM9601=y +# CONFIG_USB_NET_SMSC75XX is not set +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_GL620A=y +CONFIG_USB_NET_NET1080=y +CONFIG_USB_NET_PLUSB=y +CONFIG_USB_NET_MCS7830=y +CONFIG_USB_NET_RNDIS_HOST=y +CONFIG_USB_NET_CDC_SUBSET=y +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=y +# CONFIG_USB_NET_CX82310_ETH is not set +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +# CONFIG_USB_IPHETH is not set +# CONFIG_USB_SIERRA_NET is not set +# CONFIG_WAN is not set +CONFIG_ATM_DRIVERS=y +# CONFIG_ATM_DUMMY is not set +# CONFIG_ATM_TCP is not set + +# +# CAIF transport drivers +# +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +# CONFIG_PPPOATM is not set +# CONFIG_SLIP is not set +CONFIG_SLHC=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y +CONFIG_NETPOLL=y +CONFIG_NETPOLL_TRAP=y +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +CONFIG_INPUT_POLLDEV=y +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_MAX7359 is not set +# CONFIG_KEYBOARD_MCS is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_TWL4030 is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_ELANTECH is not set +# CONFIG_MOUSE_PS2_SENTELIC is not set +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_GPIO is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_AD7877 is not set +# CONFIG_TOUCHSCREEN_AD7879 is not set +# CONFIG_TOUCHSCREEN_BU21013 is not set +# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set +# CONFIG_TOUCHSCREEN_DYNAPRO is not set +# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set +# CONFIG_TOUCHSCREEN_EETI is not set +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set +# CONFIG_TOUCHSCREEN_MCS5000 is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_QT602240 is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set +# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set +CONFIG_TOUCHSCREEN_TSC2007=y +# CONFIG_TOUCHSCREEN_W90X900 is not set +# CONFIG_TOUCHSCREEN_TPS6507X is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_ATI_REMOTE is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_TWL4030_PWRBUTTON=y +# CONFIG_INPUT_TWL4030_VIBRA is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_CMA3000 is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_DEVKMEM=y +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=32 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX3107 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_OMAP=y +CONFIG_SERIAL_OMAP_CONSOLE=y +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_IFX6X60 is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_RAMOOPS is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_DESIGNWARE is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +CONFIG_I2C_OMAP=y +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_GPIO is not set +CONFIG_SPI_OMAP24XX=y +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=y +# CONFIG_SPI_TLE62X0 is not set + +# +# PPS support +# +# CONFIG_PPS is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y + +# +# Memory mapped GPIO expanders: +# +# CONFIG_GPIO_BASIC_MMIO is not set +# CONFIG_GPIO_IT8761E is not set +# CONFIG_GPIO_VX855 is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +CONFIG_GPIO_TWL4030=y +# CONFIG_GPIO_ADP5588 is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_74X164 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=m +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_BQ20Z75 is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_CHARGER_ISP1704 is not set +# CONFIG_CHARGER_TWL4030 is not set +# CONFIG_CHARGER_GPIO is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADCXX is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_GPIO_FAN is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM70 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_MAX1111 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SMM665 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_EMC2103 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_ADS7871 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_SENSORS_LIS3_SPI is not set +# CONFIG_SENSORS_LIS3_I2C is not set +CONFIG_THERMAL=y +CONFIG_THERMAL_HWMON=y +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_OMAP_WATCHDOG=y +# CONFIG_TWL4030_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=y +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_SDIOHOST_POSSIBLE=y +# CONFIG_SSB_SDIOHOST is not set +# CONFIG_SSB_SILENT is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_MFD_SUPPORT=y +CONFIG_MFD_CORE=y +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +CONFIG_TWL4030_CORE=y +CONFIG_TWL4030_POWER=y +CONFIG_TWL4030_CODEC=y +# CONFIG_TWL6030_PWM is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC35892 is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_MC13XXX is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_MFD_TPS6586X is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_DUMMY is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_BQ24022 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +CONFIG_REGULATOR_TWL4030=y +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_AD5398 is not set +# CONFIG_REGULATOR_TPS6524X is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_COMMON=y +CONFIG_VIDEO_ALLOW_V4L1=y +CONFIG_VIDEO_V4L1_COMPAT=y +# CONFIG_DVB_CORE is not set +CONFIG_VIDEO_MEDIA=y + +# +# Multimedia drivers +# +CONFIG_RC_CORE=y +CONFIG_LIRC=y +CONFIG_RC_MAP=y +CONFIG_IR_NEC_DECODER=y +CONFIG_IR_RC5_DECODER=y +CONFIG_IR_RC6_DECODER=y +CONFIG_IR_JVC_DECODER=y +CONFIG_IR_SONY_DECODER=y +CONFIG_IR_RC5_SZ_DECODER=y +CONFIG_IR_LIRC_CODEC=y +# CONFIG_IR_IMON is not set +# CONFIG_IR_MCEUSB is not set +# CONFIG_IR_STREAMZAP is not set +# CONFIG_RC_LOOPBACK is not set +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=y +CONFIG_MEDIA_TUNER_CUSTOMISE=y + +# +# Customize TV tuners +# +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA827X=m +CONFIG_MEDIA_TUNER_TDA18271=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_TEA5761=m +CONFIG_MEDIA_TUNER_TEA5767=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_MT2131=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=m +CONFIG_MEDIA_TUNER_MAX2165=m +CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L1=y +CONFIG_VIDEOBUF_GEN=y +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF_DMA_CONTIG=y +CONFIG_VIDEO_TVEEPROM=m +CONFIG_VIDEO_TUNER=m +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set +CONFIG_VIDEO_IR_I2C=m + +# +# Encoders/decoders and other helper chips +# + +# +# Audio decoders +# +# CONFIG_VIDEO_TVAUDIO is not set +# CONFIG_VIDEO_TDA7432 is not set +# CONFIG_VIDEO_TDA9840 is not set +# CONFIG_VIDEO_TDA9875 is not set +# CONFIG_VIDEO_TEA6415C is not set +# CONFIG_VIDEO_TEA6420 is not set +CONFIG_VIDEO_MSP3400=m +# CONFIG_VIDEO_CS5345 is not set +CONFIG_VIDEO_CS53L32A=m +# CONFIG_VIDEO_M52790 is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +CONFIG_VIDEO_WM8775=m +# CONFIG_VIDEO_WM8739 is not set +# CONFIG_VIDEO_VP27SMPX is not set + +# +# RDS decoders +# +# CONFIG_VIDEO_SAA6588 is not set + +# +# Video decoders +# +# CONFIG_VIDEO_ADV7180 is not set +# CONFIG_VIDEO_BT819 is not set +# CONFIG_VIDEO_BT856 is not set +# CONFIG_VIDEO_BT866 is not set +# CONFIG_VIDEO_KS0127 is not set +# CONFIG_VIDEO_OV7670 is not set +CONFIG_VIDEO_MT9V011=m +# CONFIG_VIDEO_TCM825X is not set +# CONFIG_VIDEO_SAA7110 is not set +CONFIG_VIDEO_SAA711X=m +# CONFIG_VIDEO_SAA717X is not set +# CONFIG_VIDEO_SAA7191 is not set +# CONFIG_VIDEO_TVP514X is not set +# CONFIG_VIDEO_TVP5150 is not set +# CONFIG_VIDEO_TVP7002 is not set +# CONFIG_VIDEO_VPX3220 is not set + +# +# Video and audio decoders +# +CONFIG_VIDEO_CX25840=m + +# +# MPEG video encoders +# +CONFIG_VIDEO_CX2341X=m + +# +# Video encoders +# +# CONFIG_VIDEO_SAA7127 is not set +# CONFIG_VIDEO_SAA7185 is not set +# CONFIG_VIDEO_ADV7170 is not set +# CONFIG_VIDEO_ADV7175 is not set +# CONFIG_VIDEO_THS7303 is not set +# CONFIG_VIDEO_ADV7343 is not set +# CONFIG_VIDEO_AK881X is not set + +# +# Video improvement chips +# +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set +CONFIG_VIDEO_VIVI=m +CONFIG_VIDEO_VPFE_CAPTURE=y +# CONFIG_VIDEO_DM6446_CCDC is not set +CONFIG_VIDEO_OMAP2_VOUT=y +# CONFIG_VIDEO_CPIA2 is not set +# CONFIG_VIDEO_TIMBERDALE is not set +# CONFIG_VIDEO_SR030PC30 is not set +# CONFIG_SOC_CAMERA is not set +CONFIG_V4L_USB_DRIVERS=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +# CONFIG_USB_GL860 is not set +# CONFIG_USB_GSPCA_BENQ is not set +CONFIG_USB_GSPCA_CONEX=m +# CONFIG_USB_GSPCA_CPIA1 is not set +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +# CONFIG_USB_GSPCA_JEILINJ is not set +# CONFIG_USB_GSPCA_KONICA is not set +CONFIG_USB_GSPCA_MARS=m +# CONFIG_USB_GSPCA_MR97310A is not set +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +# CONFIG_USB_GSPCA_OV534_9 is not set +CONFIG_USB_GSPCA_PAC207=m +# CONFIG_USB_GSPCA_PAC7302 is not set +CONFIG_USB_GSPCA_PAC7311=m +# CONFIG_USB_GSPCA_SN9C2028 is not set +# CONFIG_USB_GSPCA_SN9C20X is not set +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +# CONFIG_USB_GSPCA_SPCA1528 is not set +# CONFIG_USB_GSPCA_SQ905 is not set +# CONFIG_USB_GSPCA_SQ905C is not set +# CONFIG_USB_GSPCA_SQ930X is not set +CONFIG_USB_GSPCA_STK014=m +# CONFIG_USB_GSPCA_STV0680 is not set +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +# CONFIG_USB_GSPCA_XIRLINK_CIT is not set +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_HDPVR=m +# CONFIG_VIDEO_EM28XX is not set +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_RC=y +# CONFIG_VIDEO_CX231XX_ALSA is not set +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_USBVIDEO=m +CONFIG_USB_VICAM=m +CONFIG_USB_IBMCAM=m +CONFIG_USB_KONICAWC=m +CONFIG_USB_ET61X251=m +CONFIG_USB_SE401=m +CONFIG_USB_SN9C102=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +CONFIG_RADIO_ADAPTERS=y +CONFIG_I2C_SI4713=m +CONFIG_RADIO_SI4713=m +# CONFIG_USB_DSBR is not set +CONFIG_RADIO_SI470X=y +# CONFIG_USB_SI470X is not set +CONFIG_I2C_SI470X=m +# CONFIG_USB_MR800 is not set +# CONFIG_RADIO_TEA5764 is not set +# CONFIG_RADIO_SAA7706H is not set +# CONFIG_RADIO_TEF6862 is not set +# CONFIG_DAB is not set + +# +# Graphics support +# +# CONFIG_DRM is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_WMT_GE_ROPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_TMIO is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +CONFIG_FB_OMAP_BOOTLOADER_INIT=y +CONFIG_OMAP2_VRAM=y +CONFIG_OMAP2_VRFB=y +CONFIG_OMAP2_DSS=y +CONFIG_OMAP2_VRAM_SIZE=14 +CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y +# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set +CONFIG_OMAP2_DSS_DPI=y +# CONFIG_OMAP2_DSS_RFBI is not set +CONFIG_OMAP2_DSS_VENC=y +# CONFIG_OMAP2_DSS_SDI is not set +CONFIG_OMAP2_DSS_DSI=y +CONFIG_OMAP2_DSS_USE_DSI_PLL=y +# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set +CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 +CONFIG_FB_OMAP2=y +CONFIG_FB_OMAP2_DEBUG_SUPPORT=y +CONFIG_FB_OMAP2_NUM_FBS=3 + +# +# OMAP2/3 Display Device Drivers +# +CONFIG_PANEL_GENERIC=y +# CONFIG_PANEL_SHARP_LS037V7DW01 is not set +# CONFIG_PANEL_SHARP_LQ043T1DG01 is not set +# CONFIG_PANEL_TAAL is not set +# CONFIG_PANEL_TOPPOLY_TDO35S is not set +# CONFIG_PANEL_TPO_TD043MTEA1 is not set +CONFIG_PANEL_TPO_TD028TTEC1=y +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +CONFIG_DISPLAY_SUPPORT=y + +# +# Display hardware drivers +# + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_SOUND=y +CONFIG_SOUND_OSS_CORE=y +CONFIG_SOUND_OSS_CORE_PRECLAIM=y +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_JACK=y +CONFIG_SND_SEQUENCER=m +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +CONFIG_SND_HRTIMER=m +CONFIG_SND_SEQ_HRTIMER_DEFAULT=y +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_RAWMIDI_SEQ=m +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_ALOOP is not set +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_ARM is not set +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=y +# CONFIG_SND_USB_UA101 is not set +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_SOC=y +CONFIG_SND_OMAP_SOC=y +CONFIG_SND_OMAP_SOC_MCBSP=y +CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_TWL4030=y +# CONFIG_SOUND_PRIME is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +# CONFIG_USB_HIDDEV is not set + +# +# Special HID drivers +# +# CONFIG_HID_3M_PCT is not set +CONFIG_HID_A4TECH=y +# CONFIG_HID_ACRUX_FF is not set +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +# CONFIG_HID_CANDO is not set +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +# CONFIG_HID_PRODIKEYS is not set +CONFIG_HID_CYPRESS=y +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EMS_FF is not set +# CONFIG_HID_EGALAX is not set +# CONFIG_HID_ELECOM is not set +CONFIG_HID_EZKEY=y +# CONFIG_HID_KYE is not set +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +CONFIG_HID_GYRATION=y +# CONFIG_HID_TWINHAN is not set +# CONFIG_HID_KENSINGTON is not set +CONFIG_HID_LOGITECH=y +# CONFIG_LOGITECH_FF is not set +# CONFIG_LOGIRUMBLEPAD2_FF is not set +# CONFIG_LOGIG940_FF is not set +# CONFIG_LOGIWII_FF is not set +# CONFIG_HID_MAGICMOUSE is not set +CONFIG_HID_MICROSOFT=y +# CONFIG_HID_MOSART is not set +CONFIG_HID_MONTEREY=y +CONFIG_HID_NTRIG=y +# CONFIG_HID_ORTEK is not set +CONFIG_HID_PANTHERLORD=y +# CONFIG_PANTHERLORD_FF is not set +CONFIG_HID_PETALYNX=y +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_QUANTA is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_ROCCAT_KONE is not set +# CONFIG_HID_ROCCAT_KONEPLUS is not set +# CONFIG_HID_ROCCAT_PYRA is not set +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +# CONFIG_HID_STANTUM is not set +CONFIG_HID_SUNPLUS=y +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +CONFIG_HID_TOPSEED=y +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_WACOM is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +CONFIG_USB_DEVICE_CLASS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +CONFIG_USB_SUSPEND=y +CONFIG_USB_OTG=y +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +CONFIG_USB_MON=y +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_HCD_OMAP=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_U132_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HWA_HCD is not set +CONFIG_USB_MUSB_HDRC=y +CONFIG_USB_MUSB_SOC=y + +# +# OMAP 343x high speed USB support +# +# CONFIG_USB_MUSB_AM35X is not set +# CONFIG_USB_MUSB_HOST is not set +# CONFIG_USB_MUSB_PERIPHERAL is not set +CONFIG_USB_MUSB_OTG=y +CONFIG_USB_GADGET_MUSB_HDRC=y +CONFIG_USB_MUSB_HDRC_HCD=y +# CONFIG_MUSB_PIO_ONLY is not set +CONFIG_USB_INVENTRA_DMA=y +# CONFIG_USB_TI_CPPI_DMA is not set +# CONFIG_USB_MUSB_DEBUG is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_WDM=m +CONFIG_USB_TMC=m + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_UAS is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +CONFIG_USB_EZUSB=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=m +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +# CONFIG_USB_SERIAL_CP210X is not set +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_MOTOROLA=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +# CONFIG_USB_SERIAL_QCAUX is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_SAFE=m +# CONFIG_USB_SERIAL_SAFE_PADDED is not set +# CONFIG_USB_SERIAL_SAMBA is not set +CONFIG_USB_SERIAL_SIEMENS_MPI=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +# CONFIG_USB_SERIAL_SYMBOL is not set +CONFIG_USB_SERIAL_TI=m +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=m +CONFIG_USB_SERIAL_WWAN=m +CONFIG_USB_SERIAL_OPTION=m +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set +# CONFIG_USB_SERIAL_ZIO is not set +# CONFIG_USB_SERIAL_SSU100 is not set +CONFIG_USB_SERIAL_DEBUG=m + +# +# USB Miscellaneous drivers +# +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_LED=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +# CONFIG_USB_APPLEDISPLAY is not set +CONFIG_USB_SISUSBVGA=m +CONFIG_USB_SISUSBVGA_CON=y +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +# CONFIG_USB_IOWARRIOR is not set +CONFIG_USB_TEST=m +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_CXACRU=m +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_XUSBATM=m +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_GADGET_VBUS_DRAW=2 +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_R8A66597 is not set +# CONFIG_USB_GADGET_PXA_U2O is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +CONFIG_USB_GADGET_DUALSPEED=y +CONFIG_USB_ZERO=m +CONFIG_USB_ZERO_HNPTEST=y +# CONFIG_USB_AUDIO is not set +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_ETH_EEM is not set +# CONFIG_USB_G_NCM is not set +CONFIG_USB_GADGETFS=m +# CONFIG_USB_FUNCTIONFS is not set +CONFIG_USB_FILE_STORAGE=m +# CONFIG_USB_FILE_STORAGE_TEST is not set +# CONFIG_USB_MASS_STORAGE is not set +CONFIG_USB_G_SERIAL=m +CONFIG_USB_MIDI_GADGET=m +CONFIG_USB_G_PRINTER=m +CONFIG_USB_CDC_COMPOSITE=m +# CONFIG_USB_G_MULTI is not set +# CONFIG_USB_G_HID is not set +# CONFIG_USB_G_DBGP is not set +# CONFIG_USB_G_WEBCAM is not set + +# +# OTG and related infrastructure +# +CONFIG_USB_OTG_UTILS=y +CONFIG_USB_GPIO_VBUS=y +# CONFIG_ISP1301_OMAP is not set +# CONFIG_USB_ULPI is not set +CONFIG_TWL4030_USB=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_UNSAFE_RESUME=y +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_BLOCK_BOUNCE=y +CONFIG_SDIO_UART=y +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_OMAP is not set +CONFIG_MMC_OMAP_HS=y +CONFIG_MMC_SPI=m +# CONFIG_MMC_USHC is not set +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y + +# +# LED drivers +# + +# +# LED Triggers +# +# CONFIG_ACCESSIBILITY is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=m + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +CONFIG_RTC_DRV_TWL4030=m +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set +# CONFIG_RTC_DRV_PCF2123 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +CONFIG_UIO=m +CONFIG_UIO_PDRV=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_STAGING=y +CONFIG_STAGING_EXCLUDE_BUILD=y +CONFIG_CLKDEV_LOOKUP=y + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_XATTR=y +# CONFIG_EXT4_FS_POSIX_ACL is not set +# CONFIG_EXT4_FS_SECURITY is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_PROC_INFO=y +CONFIG_REISERFS_FS_XATTR=y +# CONFIG_REISERFS_FS_POSIX_ACL is not set +# CONFIG_REISERFS_FS_SECURITY is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_XFS_FS=m +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DEBUG is not set +CONFIG_GFS2_FS=m +# CONFIG_GFS2_FS_LOCKING_DLM is not set +CONFIG_OCFS2_FS=m +CONFIG_OCFS2_FS_O2CB=m +CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m +CONFIG_OCFS2_FS_STATS=y +CONFIG_OCFS2_DEBUG_MASKLOG=y +# CONFIG_OCFS2_DEBUG_FS is not set +CONFIG_BTRFS_FS=m +# CONFIG_BTRFS_FS_POSIX_ACL is not set +# CONFIG_NILFS2_FS is not set +CONFIG_EXPORTFS=m +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +CONFIG_QUOTA=y +# CONFIG_QUOTA_NETLINK_INTERFACE is not set +CONFIG_PRINT_QUOTA_WARNING=y +# CONFIG_QUOTA_DEBUG is not set +CONFIG_QUOTA_TREE=y +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTACTL=y +CONFIG_AUTOFS4_FS=m +CONFIG_FUSE_FS=m +# CONFIG_CUSE is not set +CONFIG_GENERIC_ACL=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_RW=y + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_CONFIGFS_FS=m +CONFIG_MISC_FILESYSTEMS=y +CONFIG_AFFS_FS=m +# CONFIG_ECRYPT_FS is not set +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +CONFIG_BEFS_FS=m +# CONFIG_BEFS_DEBUG is not set +CONFIG_BFS_FS=m +CONFIG_EFS_FS=m +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +CONFIG_JFFS2_SUMMARY=y +CONFIG_JFFS2_FS_XATTR=y +CONFIG_JFFS2_FS_POSIX_ACL=y +CONFIG_JFFS2_FS_SECURITY=y +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RTIME=y +CONFIG_JFFS2_RUBIN=y +# CONFIG_JFFS2_CMODE_NONE is not set +# CONFIG_JFFS2_CMODE_PRIORITY is not set +# CONFIG_JFFS2_CMODE_SIZE is not set +CONFIG_JFFS2_CMODE_FAVOURLZO=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_XATTR=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_ZLIB=y +# CONFIG_UBIFS_FS_DEBUG is not set +# CONFIG_LOGFS is not set +CONFIG_CRAMFS=m +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +# CONFIG_SQUASHFS_LZO is not set +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +CONFIG_VXFS_FS=m +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_ROMFS_FS=m +CONFIG_ROMFS_BACKED_BY_BLOCK=y +# CONFIG_ROMFS_BACKED_BY_MTD is not set +# CONFIG_ROMFS_BACKED_BY_BOTH is not set +CONFIG_ROMFS_ON_BLOCK=y +CONFIG_SYSV_FS=m +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_NEW_IDMAPPER is not set +CONFIG_NFSD=m +CONFIG_NFSD_DEPRECATED=y +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +CONFIG_CIFS_EXPERIMENTAL=y +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +CONFIG_AFS_FS=m +# CONFIG_AFS_DEBUG is not set +CONFIG_9P_FS=m +# CONFIG_9P_FS_POSIX_ACL is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +CONFIG_LDM_DEBUG=y +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=y +CONFIG_DLM=m +# CONFIG_DLM_DEBUG is not set + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +CONFIG_SCHED_DEBUG=y +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KMEMLEAK is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_LKDTM is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_PAGE_POISONING is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_ASYNC_RAID6_TEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_OC_ETM is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_XOR_BLOCKS=m +CONFIG_ASYNC_CORE=m +CONFIG_ASYNC_MEMCPY=m +CONFIG_ASYNC_XOR=m +CONFIG_ASYNC_PQ=m +CONFIG_ASYNC_RAID6_RECOV=m +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=m +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=m +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +CONFIG_CRYPTO_GF128MUL=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_CRYPTD=m +CONFIG_CRYPTO_AUTHENC=m +CONFIG_CRYPTO_TEST=m + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=m +CONFIG_CRYPTO_GCM=m +CONFIG_CRYPTO_SEQIV=m + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=m +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_PCBC=m +CONFIG_CRYPTO_XTS=m + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_XCBC=m +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_GHASH=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_FCRYPT=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_SALSA20=m +CONFIG_CRYPTO_SEED=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=y +# CONFIG_CRYPTO_ZLIB is not set +CONFIG_CRYPTO_LZO=y + +# +# Random Number Generation +# +CONFIG_CRYPTO_ANSI_CPRNG=m +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +CONFIG_CRYPTO_HW=y +# CONFIG_CRYPTO_DEV_OMAP_SHAM is not set +# CONFIG_CRYPTO_DEV_OMAP_AES is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_RAID6_PQ=m +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +CONFIG_CRC7=y +CONFIG_LIBCRC32C=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_DECOMPRESS_GZIP=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y +CONFIG_GENERIC_ATOMIC64=y +CONFIG_AVERAGE=y +# CONFIG_SHM_SIGNAL is not set +# CONFIG_IOQ is not set diff --git a/recipes/linux/linux-gta04_git.bb b/recipes/linux/linux-gta04_git.bb new file mode 100644 index 0000000000..22dbb16322 --- /dev/null +++ b/recipes/linux/linux-gta04_git.bb @@ -0,0 +1,16 @@ +SRCREV="${AUTOREV}" +PV = "2.6.37+${PR}+gitr${SRCREV}" +PR = "r1" + +inherit kernel + +COMPATIBLE_MACHINE = "beaglehyb" + +SRC_URI = "git://projects.goldelico.com/gta04-kernel.git;protocol=git " +SRC_URI_append_beaglehyb = "file://omap3_beaglehyb_defconfig" + +S = "${WORKDIR}/git" + +do_configure_prepend_beaglehyb() { + install -m 0644 ${WORKDIR}/omap3_beaglehyb_defconfig ${S}/.config +} diff --git a/recipes/linux/linux-kexecboot-2.6.24/poodle-bootparams.patch b/recipes/linux/linux-kexecboot-2.6.24/poodle-bootparams.patch index 4c22fb7960..c95b353e05 100644 --- a/recipes/linux/linux-kexecboot-2.6.24/poodle-bootparams.patch +++ b/recipes/linux/linux-kexecboot-2.6.24/poodle-bootparams.patch @@ -1,4 +1,4 @@ ---- ../ref/linux-2.6.21.6/arch/arm/mach-pxa/poodle.c 2007-07-06 23:47:55.000000000 -0500 +--- linux-2.6.21.6/arch/arm/mach-pxa/poodle.c 2007-07-06 23:47:55.000000000 -0500 +++ linux-2.6.21.6-armeb/arch/arm/mach-pxa/poodle.c 2007-08-06 23:02:50.000000000 -0500 @@ -409,6 +409,7 @@ diff --git a/recipes/linux/linux-kexecboot-2.6.24/poodle/defconfig b/recipes/linux/linux-kexecboot-2.6.24/poodle/defconfig index 6ad99c785d..db25ff11db 100644 --- a/recipes/linux/linux-kexecboot-2.6.24/poodle/defconfig +++ b/recipes/linux/linux-kexecboot-2.6.24/poodle/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.24 -# Sun Feb 1 20:09:19 2009 +# Sat Feb 26 01:12:42 2011 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -31,12 +31,15 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" # CONFIG_EXPERIMENTAL=y CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" -CONFIG_LOCALVERSION_AUTO=y -# CONFIG_SWAP is not set -# CONFIG_SYSVIPC is not set -# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y # CONFIG_USER_NS is not set # CONFIG_PID_NS is not set # CONFIG_IKCONFIG is not set @@ -52,25 +55,27 @@ CONFIG_INITRAMFS_ROOT_GID=0 CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_EMBEDDED=y -# CONFIG_UID16 is not set -# CONFIG_SYSCTL_SYSCALL is not set -# CONFIG_KALLSYMS is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_HOTPLUG=y CONFIG_PRINTK=y -# CONFIG_BUG is not set -# CONFIG_ELF_CORE is not set +CONFIG_BUG=y +CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y -# CONFIG_FUTEX is not set +CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y -# CONFIG_VM_EVENT_COUNTERS is not set +CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB is not set CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 # CONFIG_MODULES is not set @@ -84,14 +89,14 @@ CONFIG_BLOCK=y # IO Schedulers # CONFIG_IOSCHED_NOOP=y -# CONFIG_IOSCHED_AS is not set +CONFIG_IOSCHED_AS=y # CONFIG_IOSCHED_DEADLINE is not set # CONFIG_IOSCHED_CFQ is not set -# CONFIG_DEFAULT_AS is not set +CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_DEADLINE is not set # CONFIG_DEFAULT_CFQ is not set -CONFIG_DEFAULT_NOOP=y -CONFIG_DEFAULT_IOSCHED="noop" +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="anticipatory" # # System Type @@ -196,8 +201,8 @@ CONFIG_SHARP_SCOOP=y CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set CONFIG_PCMCIA=y -# CONFIG_PCMCIA_LOAD_CIS is not set -# CONFIG_PCMCIA_IOCTL is not set +CONFIG_PCMCIA_LOAD_CIS=y +CONFIG_PCMCIA_IOCTL=y # # PC-card bridges @@ -207,11 +212,11 @@ CONFIG_PCMCIA_PXA2XX=y # # Kernel Features # -# CONFIG_TICK_ONESHOT is not set -# CONFIG_NO_HZ is not set -# CONFIG_HIGH_RES_TIMERS is not set +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y CONFIG_GENERIC_CLOCKEVENTS_BUILD=y -# CONFIG_PREEMPT is not set +CONFIG_PREEMPT=y CONFIG_HZ=100 CONFIG_AEABI=y # CONFIG_OABI_COMPAT is not set @@ -236,7 +241,7 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 fbcon=rotate:1" +CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 fbcon=rotate:1" # CONFIG_XIP_KERNEL is not set CONFIG_KEXEC=y CONFIG_ATAGS_PROC=y @@ -245,6 +250,10 @@ CONFIG_ATAGS_PROC=y # CPU Frequency scaling # # CONFIG_CPU_FREQ is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set # # Floating point emulation @@ -267,8 +276,9 @@ CONFIG_BINFMT_ELF=y CONFIG_PM=y # CONFIG_PM_LEGACY is not set # CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP=y CONFIG_SUSPEND_UP_POSSIBLE=y -# CONFIG_SUSPEND is not set +CONFIG_SUSPEND=y CONFIG_APM_EMULATION=y # @@ -369,7 +379,8 @@ CONFIG_MTD_NAND_SHARPSL=y # CONFIG_PARPORT is not set CONFIG_BLK_DEV=y # CONFIG_BLK_DEV_COW_COMMON is not set -# CONFIG_BLK_DEV_LOOP is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_CDROM_PKTCDVD is not set # CONFIG_MISC_DEVICES is not set @@ -381,7 +392,7 @@ CONFIG_BLK_DEV_IDE=y # Please see Documentation/ide.txt for help/info on IDE drives # # CONFIG_BLK_DEV_IDE_SATA is not set -# CONFIG_BLK_DEV_IDEDISK is not set +CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set CONFIG_BLK_DEV_IDECS=y # CONFIG_BLK_DEV_IDECD is not set @@ -389,12 +400,12 @@ CONFIG_BLK_DEV_IDECS=y # CONFIG_BLK_DEV_IDEFLOPPY is not set # CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set -# CONFIG_IDE_PROC_FS is not set +CONFIG_IDE_PROC_FS=y # # IDE chipset support/bugfixes # -# CONFIG_IDE_GENERIC is not set +CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_PLATFORM is not set # CONFIG_IDE_ARM is not set # CONFIG_BLK_DEV_IDEDMA is not set @@ -437,10 +448,13 @@ CONFIG_SCSI_MULTI_LUN=y # CONFIG_SCSI_FC_ATTRS is not set # CONFIG_SCSI_SAS_LIBSAS is not set # CONFIG_SCSI_SRP_ATTRS is not set -# CONFIG_SCSI_LOWLEVEL is not set +CONFIG_SCSI_LOWLEVEL=y +# CONFIG_SCSI_DEBUG is not set # CONFIG_SCSI_LOWLEVEL_PCMCIA is not set # CONFIG_ATA is not set -# CONFIG_MD is not set +CONFIG_MD=y +# CONFIG_BLK_DEV_MD is not set +# CONFIG_BLK_DEV_DM is not set # # Input device support @@ -511,12 +525,7 @@ CONFIG_HW_CONSOLE=y # # Serial drivers # -CONFIG_SERIAL_8250=y -# CONFIG_SERIAL_8250_CONSOLE is not set -# CONFIG_SERIAL_8250_CS is not set -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support @@ -528,7 +537,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set # CONFIG_IPMI_HANDLER is not set -CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM is not set # CONFIG_NVRAM is not set # CONFIG_R3964 is not set @@ -605,20 +614,8 @@ CONFIG_SSB_POSSIBLE=y # # Multimedia devices # -CONFIG_VIDEO_DEV=y -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y -CONFIG_VIDEO_CAPTURE_DRIVERS=y -# CONFIG_VIDEO_ADV_DEBUG is not set -CONFIG_VIDEO_HELPER_CHIPS_AUTO=y -# CONFIG_VIDEO_VIVI is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -CONFIG_RADIO_ADAPTERS=y -CONFIG_DAB=y +# CONFIG_VIDEO_DEV is not set +# CONFIG_DAB is not set # # Graphics support @@ -711,9 +708,71 @@ CONFIG_MMC_BLOCK_BOUNCE=y # MMC/SD Host Controller Drivers # CONFIG_MMC_PXA=y -# CONFIG_NEW_LEDS is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +CONFIG_LEDS_LOCOMO=y +# CONFIG_LEDS_TOSA is not set +# CONFIG_LEDS_GPIO is not set + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_IDE_DISK=y +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set CONFIG_RTC_LIB=y -# CONFIG_RTC_CLASS is not set +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set + +# +# SPI RTC drivers +# + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +CONFIG_RTC_DRV_SA1100=y # # File systems @@ -721,8 +780,10 @@ CONFIG_RTC_LIB=y CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT2_FS_XIP is not set -# CONFIG_EXT3_FS is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_XATTR is not set # CONFIG_EXT4DEV_FS is not set +CONFIG_JBD=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set # CONFIG_FS_POSIX_ACL is not set @@ -747,8 +808,11 @@ CONFIG_DNOTIFY=y # # DOS/FAT/NT Filesystems # +CONFIG_FAT_FS=y # CONFIG_MSDOS_FS is not set -# CONFIG_VFAT_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" # CONFIG_NTFS_FS is not set # @@ -788,10 +852,8 @@ CONFIG_JFFS2_RUBIN=y CONFIG_JFFS2_CMODE_PRIORITY=y # CONFIG_JFFS2_CMODE_SIZE is not set # CONFIG_JFFS2_CMODE_FAVOURLZO is not set -CONFIG_CRAMFS=y -CONFIG_SQUASHFS=y -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_CRAMFS is not set +# CONFIG_SQUASHFS is not set # CONFIG_VXFS_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set @@ -845,7 +907,7 @@ CONFIG_NLS_CODEPAGE_437=y # CONFIG_NLS_CODEPAGE_1250 is not set # CONFIG_NLS_CODEPAGE_1251 is not set CONFIG_NLS_ASCII=y -# CONFIG_NLS_ISO8859_1 is not set +CONFIG_NLS_ISO8859_1=y # CONFIG_NLS_ISO8859_2 is not set # CONFIG_NLS_ISO8859_3 is not set # CONFIG_NLS_ISO8859_4 is not set @@ -872,6 +934,7 @@ CONFIG_MAGIC_SYSRQ=y # CONFIG_DEBUG_FS is not set # CONFIG_HEADERS_CHECK is not set # CONFIG_DEBUG_KERNEL is not set +# CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_FRAME_POINTER=y # CONFIG_SAMPLES is not set # CONFIG_DEBUG_USER is not set @@ -898,6 +961,7 @@ CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_LZO_COMPRESS=y CONFIG_LZO_DECOMPRESS=y +CONFIG_PLIST=y CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y diff --git a/recipes/linux/linux-kexecboot-2.6.26/poodle/defconfig b/recipes/linux/linux-kexecboot-2.6.26/poodle/defconfig index 4d40205111..079443c374 100644 --- a/recipes/linux/linux-kexecboot-2.6.26/poodle/defconfig +++ b/recipes/linux/linux-kexecboot-2.6.26/poodle/defconfig @@ -1,6 +1,7 @@ +# # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24-rc8 -# Fri Jan 25 22:13:14 2008 +# Linux kernel version: 2.6.26 +# Sun Feb 27 00:14:01 2011 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -20,6 +21,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y # CONFIG_ARCH_HAS_ILOG2_U64 is not set CONFIG_GENERIC_HWEIGHT=y CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ARCH_SUPPORTS_AOUT=y CONFIG_ZONE_DMA=y CONFIG_ARCH_MTD_XIP=y CONFIG_VECTORS_BASE=0xffff0000 @@ -33,77 +35,80 @@ CONFIG_BROKEN_ON_SMP=y CONFIG_LOCK_KERNEL=y CONFIG_INIT_ENV_ARG_LIMIT=32 CONFIG_LOCALVERSION="" -# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_LOCALVERSION_AUTO=y CONFIG_SWAP=y CONFIG_SYSVIPC=y CONFIG_SYSVIPC_SYSCTL=y -# CONFIG_POSIX_MQUEUE is not set CONFIG_BSD_PROCESS_ACCT=y CONFIG_BSD_PROCESS_ACCT_V3=y -# CONFIG_TASKSTATS is not set -# CONFIG_USER_NS is not set -# CONFIG_PID_NS is not set -# CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_CGROUPS is not set -CONFIG_FAIR_GROUP_SCHED=y -CONFIG_FAIR_USER_SCHED=y -# CONFIG_FAIR_CGROUP_SCHED is not set -CONFIG_SYSFS_DEPRECATED=y +# CONFIG_GROUP_SCHED is not set +# CONFIG_SYSFS_DEPRECATED_V2 is not set # CONFIG_RELAY is not set -# CONFIG_BLK_DEV_INITRD is not set +# CONFIG_NAMESPACES is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="initramfs.cpio.gz" +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 CONFIG_CC_OPTIMIZE_FOR_SIZE=y CONFIG_SYSCTL=y CONFIG_EMBEDDED=y CONFIG_UID16=y CONFIG_SYSCTL_SYSCALL=y +CONFIG_SYSCTL_SYSCALL_CHECK=y CONFIG_KALLSYMS=y -# CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y +CONFIG_COMPAT_BRK=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_ANON_INODES=y CONFIG_EPOLL=y CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y CONFIG_EVENTFD=y CONFIG_SHMEM=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_SLAB=y # CONFIG_SLUB is not set # CONFIG_SLOB is not set +CONFIG_PROFILING=y +# CONFIG_MARKERS is not set +# CONFIG_OPROFILE is not set +CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +# CONFIG_HAVE_DMA_ATTRS is not set +CONFIG_PROC_PAGE_MONITOR=y CONFIG_SLABINFO=y CONFIG_RT_MUTEXES=y # CONFIG_TINY_SHMEM is not set CONFIG_BASE_SMALL=0 -CONFIG_MODULES=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -# CONFIG_MODVERSIONS is not set -# CONFIG_MODULE_SRCVERSION_ALL is not set -CONFIG_KMOD=y +# CONFIG_MODULES is not set CONFIG_BLOCK=y # CONFIG_LBD is not set # CONFIG_BLK_DEV_IO_TRACE is not set # CONFIG_LSF is not set -# CONFIG_BLK_DEV_BSG is not set +CONFIG_BLK_DEV_BSG=y # # IO Schedulers # CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y -CONFIG_IOSCHED_DEADLINE=m -CONFIG_IOSCHED_CFQ=m +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y CONFIG_DEFAULT_AS=y # CONFIG_DEFAULT_DEADLINE is not set # CONFIG_DEFAULT_CFQ is not set # CONFIG_DEFAULT_NOOP is not set CONFIG_DEFAULT_IOSCHED="anticipatory" +CONFIG_CLASSIC_RCU=y # # System Type @@ -132,6 +137,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" # CONFIG_ARCH_KS8695 is not set # CONFIG_ARCH_NS9XXX is not set # CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_ORION5X is not set # CONFIG_ARCH_PNX4008 is not set CONFIG_ARCH_PXA=y # CONFIG_ARCH_RPC is not set @@ -141,23 +147,30 @@ CONFIG_ARCH_PXA=y # CONFIG_ARCH_LH7A40X is not set # CONFIG_ARCH_DAVINCI is not set # CONFIG_ARCH_OMAP is not set +# CONFIG_ARCH_MSM7X00A is not set # # Intel PXA2xx/PXA3xx Implementations # +# CONFIG_ARCH_GUMSTIX is not set # CONFIG_ARCH_LUBBOCK is not set # CONFIG_MACH_LOGICPD_PXA270 is not set # CONFIG_MACH_MAINSTONE is not set # CONFIG_ARCH_PXA_IDP is not set CONFIG_PXA_SHARPSL=y +# CONFIG_ARCH_PXA_ESERIES is not set # CONFIG_MACH_TRIZEPS4 is not set # CONFIG_MACH_HX2750 is not set # CONFIG_MACH_EM_X270 is not set +# CONFIG_MACH_COLIBRI is not set # CONFIG_MACH_ZYLONITE is not set +# CONFIG_MACH_LITTLETON is not set # CONFIG_MACH_ARMCORE is not set +# CONFIG_MACH_MAGICIAN is not set +# CONFIG_MACH_PCM027 is not set +# CONFIG_MACH_HTCUNIVERSAL is not set CONFIG_PXA_SHARPSL_25x=y # CONFIG_PXA_SHARPSL_27x is not set -# CONFIG_MACH_HTCUNIVERSAL is not set CONFIG_MACH_POODLE=y # CONFIG_MACH_CORGI is not set # CONFIG_MACH_SHEPHERD is not set @@ -182,6 +195,7 @@ CONFIG_CPU_32=y CONFIG_CPU_XSCALE=y CONFIG_CPU_32v5=y CONFIG_CPU_ABRT_EV5T=y +CONFIG_CPU_PABRT_NOIFAR=y CONFIG_CPU_CACHE_VIVT=y CONFIG_CPU_TLB_V4WBI=y CONFIG_CPU_CP15=y @@ -205,16 +219,16 @@ CONFIG_SHARP_SCOOP=y # # CONFIG_PCI_SYSCALL is not set # CONFIG_ARCH_SUPPORTS_MSI is not set -CONFIG_PCCARD=m +CONFIG_PCCARD=y # CONFIG_PCMCIA_DEBUG is not set -CONFIG_PCMCIA=m +CONFIG_PCMCIA=y CONFIG_PCMCIA_LOAD_CIS=y CONFIG_PCMCIA_IOCTL=y # # PC-card bridges # -CONFIG_PCMCIA_PXA2XX=m +CONFIG_PCMCIA_PXA2XX=y # # Kernel Features @@ -226,7 +240,7 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y CONFIG_PREEMPT=y CONFIG_HZ=100 CONFIG_AEABI=y -CONFIG_OABI_COMPAT=y +# CONFIG_OABI_COMPAT is not set # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set CONFIG_SELECT_MEMORY_MODEL=y CONFIG_FLATMEM_MANUAL=y @@ -236,6 +250,7 @@ CONFIG_FLATMEM=y CONFIG_FLAT_NODE_MEM_MAP=y # CONFIG_SPARSEMEM_STATIC is not set # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set +CONFIG_PAGEFLAGS_EXTENDED=y CONFIG_SPLIT_PTLOCK_CPUS=4096 # CONFIG_RESOURCES_64BIT is not set CONFIG_ZONE_DMA_FLAG=1 @@ -248,29 +263,15 @@ CONFIG_ALIGNMENT_TRAP=y # CONFIG_ZBOOT_ROM_TEXT=0x0 CONFIG_ZBOOT_ROM_BSS=0x0 -CONFIG_CMDLINE="console=ttyS0,115200n8 console=tty1 noinitrd root=/dev/mtdblock2 rootfstype=jffs2 fbcon=rotate:1 dyntick=enable debug" +CONFIG_CMDLINE="console=tty1 console=ttyS0,115200n8 fbcon=rotate:1" # CONFIG_XIP_KERNEL is not set CONFIG_KEXEC=y CONFIG_ATAGS_PROC=y -CONFIG_CPU_FREQ_PXA25x=y # # CPU Frequency scaling # -CONFIG_CPU_FREQ=y -CONFIG_CPU_FREQ_TABLE=y -CONFIG_CPU_FREQ_DEBUG=y -CONFIG_CPU_FREQ_STAT=y -# CONFIG_CPU_FREQ_STAT_DETAILS is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y -CONFIG_CPU_FREQ_GOV_POWERSAVE=y -CONFIG_CPU_FREQ_GOV_USERSPACE=y -CONFIG_CPU_FREQ_GOV_ONDEMAND=y -CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +# CONFIG_CPU_FREQ is not set # # Floating point emulation @@ -279,271 +280,29 @@ CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y # # At least one emulation must be selected # -CONFIG_FPE_NWFPE=y -# CONFIG_FPE_NWFPE_XP is not set -# CONFIG_FPE_FASTFPE is not set # # Userspace binary formats # CONFIG_BINFMT_ELF=y -CONFIG_BINFMT_AOUT=m -CONFIG_BINFMT_MISC=m +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set # # Power management options # CONFIG_PM=y -# CONFIG_PM_LEGACY is not set # CONFIG_PM_DEBUG is not set CONFIG_PM_SLEEP=y -CONFIG_SUSPEND_UP_POSSIBLE=y CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y CONFIG_APM_EMULATION=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y # # Networking # -CONFIG_NET=y - -# -# Networking options -# -CONFIG_PACKET=m -CONFIG_PACKET_MMAP=y -CONFIG_UNIX=y -CONFIG_XFRM=y -CONFIG_XFRM_USER=m -# CONFIG_XFRM_SUB_POLICY is not set -# CONFIG_XFRM_MIGRATE is not set -# CONFIG_NET_KEY is not set -CONFIG_INET=y -# CONFIG_IP_MULTICAST is not set -# CONFIG_IP_ADVANCED_ROUTER is not set -CONFIG_IP_FIB_HASH=y -# CONFIG_IP_PNP is not set -# CONFIG_NET_IPIP is not set -# CONFIG_NET_IPGRE is not set -# CONFIG_ARPD is not set -CONFIG_SYN_COOKIES=y -# CONFIG_INET_AH is not set -# CONFIG_INET_ESP is not set -# CONFIG_INET_IPCOMP is not set -# CONFIG_INET_XFRM_TUNNEL is not set -CONFIG_INET_TUNNEL=m -CONFIG_INET_XFRM_MODE_TRANSPORT=m -CONFIG_INET_XFRM_MODE_TUNNEL=m -CONFIG_INET_XFRM_MODE_BEET=m -# CONFIG_INET_LRO is not set -CONFIG_INET_DIAG=m -CONFIG_INET_TCP_DIAG=m -# CONFIG_TCP_CONG_ADVANCED is not set -CONFIG_TCP_CONG_CUBIC=y -CONFIG_DEFAULT_TCP_CONG="cubic" -# CONFIG_TCP_MD5SIG is not set -# CONFIG_IP_VS is not set -CONFIG_IPV6=m -# CONFIG_IPV6_PRIVACY is not set -# CONFIG_IPV6_ROUTER_PREF is not set -# CONFIG_IPV6_OPTIMISTIC_DAD is not set -CONFIG_INET6_AH=m -CONFIG_INET6_ESP=m -CONFIG_INET6_IPCOMP=m -# CONFIG_IPV6_MIP6 is not set -CONFIG_INET6_XFRM_TUNNEL=m -CONFIG_INET6_TUNNEL=m -CONFIG_INET6_XFRM_MODE_TRANSPORT=m -CONFIG_INET6_XFRM_MODE_TUNNEL=m -CONFIG_INET6_XFRM_MODE_BEET=m -# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set -CONFIG_IPV6_SIT=m -CONFIG_IPV6_TUNNEL=m -# CONFIG_IPV6_MULTIPLE_TABLES is not set -# CONFIG_NETWORK_SECMARK is not set -CONFIG_NETFILTER=y -# CONFIG_NETFILTER_DEBUG is not set - -# -# Core Netfilter Configuration -# -# CONFIG_NETFILTER_NETLINK is not set -# CONFIG_NF_CONNTRACK_ENABLED is not set -# CONFIG_NF_CONNTRACK is not set -CONFIG_NETFILTER_XTABLES=m -# CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set -# CONFIG_NETFILTER_XT_TARGET_DSCP is not set -# CONFIG_NETFILTER_XT_TARGET_MARK is not set -# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set -# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set -# CONFIG_NETFILTER_XT_TARGET_TRACE is not set -# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set -# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set -# CONFIG_NETFILTER_XT_MATCH_DCCP is not set -# CONFIG_NETFILTER_XT_MATCH_DSCP is not set -# CONFIG_NETFILTER_XT_MATCH_ESP is not set -# CONFIG_NETFILTER_XT_MATCH_LENGTH is not set -# CONFIG_NETFILTER_XT_MATCH_LIMIT is not set -# CONFIG_NETFILTER_XT_MATCH_MAC is not set -# CONFIG_NETFILTER_XT_MATCH_MARK is not set -# CONFIG_NETFILTER_XT_MATCH_POLICY is not set -# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set -# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set -# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set -# CONFIG_NETFILTER_XT_MATCH_REALM is not set -# CONFIG_NETFILTER_XT_MATCH_SCTP is not set -# CONFIG_NETFILTER_XT_MATCH_STATISTIC is not set -# CONFIG_NETFILTER_XT_MATCH_STRING is not set -# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set -# CONFIG_NETFILTER_XT_MATCH_TIME is not set -# CONFIG_NETFILTER_XT_MATCH_U32 is not set -# CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set - -# -# IP: Netfilter Configuration -# -CONFIG_IP_NF_QUEUE=m -CONFIG_IP_NF_IPTABLES=m -CONFIG_IP_NF_MATCH_IPRANGE=m -CONFIG_IP_NF_MATCH_TOS=m -CONFIG_IP_NF_MATCH_RECENT=m -CONFIG_IP_NF_MATCH_ECN=m -CONFIG_IP_NF_MATCH_AH=m -CONFIG_IP_NF_MATCH_TTL=m -CONFIG_IP_NF_MATCH_OWNER=m -CONFIG_IP_NF_MATCH_ADDRTYPE=m -CONFIG_IP_NF_FILTER=m -CONFIG_IP_NF_TARGET_REJECT=m -CONFIG_IP_NF_TARGET_LOG=m -CONFIG_IP_NF_TARGET_ULOG=m -CONFIG_IP_NF_MANGLE=m -CONFIG_IP_NF_TARGET_TOS=m -CONFIG_IP_NF_TARGET_ECN=m -CONFIG_IP_NF_TARGET_TTL=m -CONFIG_IP_NF_RAW=m -CONFIG_IP_NF_ARPTABLES=m -CONFIG_IP_NF_ARPFILTER=m -CONFIG_IP_NF_ARP_MANGLE=m - -# -# IPv6: Netfilter Configuration (EXPERIMENTAL) -# -# CONFIG_IP6_NF_QUEUE is not set -# CONFIG_IP6_NF_IPTABLES is not set -# CONFIG_IP_DCCP is not set -# CONFIG_IP_SCTP is not set -# CONFIG_TIPC is not set -# CONFIG_ATM is not set -# CONFIG_BRIDGE is not set -# CONFIG_VLAN_8021Q is not set -# CONFIG_DECNET is not set -# CONFIG_LLC2 is not set -# CONFIG_IPX is not set -# CONFIG_ATALK is not set -# CONFIG_X25 is not set -# CONFIG_LAPB is not set -# CONFIG_ECONET is not set -# CONFIG_WAN_ROUTER is not set -# CONFIG_NET_SCHED is not set - -# -# Network testing -# -# CONFIG_NET_PKTGEN is not set -# CONFIG_HAMRADIO is not set -CONFIG_IRDA=m - -# -# IrDA protocols -# -CONFIG_IRLAN=m -CONFIG_IRNET=m -CONFIG_IRCOMM=m -# CONFIG_IRDA_ULTRA is not set - -# -# IrDA options -# -# CONFIG_IRDA_CACHE_LAST_LSAP is not set -# CONFIG_IRDA_FAST_RR is not set -# CONFIG_IRDA_DEBUG is not set - -# -# Infrared-port device drivers -# - -# -# SIR device drivers -# -# CONFIG_IRTTY_SIR is not set - -# -# Dongle support -# -# CONFIG_KINGSUN_DONGLE is not set -# CONFIG_KSDAZZLE_DONGLE is not set -# CONFIG_KS959_DONGLE is not set - -# -# Old SIR device drivers -# -# CONFIG_IRPORT_SIR is not set - -# -# Old Serial dongle support -# - -# -# FIR device drivers -# -# CONFIG_USB_IRDA is not set -# CONFIG_SIGMATEL_FIR is not set -CONFIG_PXA_FICP=m -# CONFIG_MCS_FIR is not set -CONFIG_BT=m -CONFIG_BT_L2CAP=m -CONFIG_BT_SCO=m -CONFIG_BT_RFCOMM=m -CONFIG_BT_RFCOMM_TTY=y -CONFIG_BT_BNEP=m -CONFIG_BT_BNEP_MC_FILTER=y -CONFIG_BT_BNEP_PROTO_FILTER=y -CONFIG_BT_HIDP=m - -# -# Bluetooth device drivers -# -CONFIG_BT_HCIUSB=m -# CONFIG_BT_HCIUSB_SCO is not set -# CONFIG_BT_HCIBTSDIO is not set -CONFIG_BT_HCIUART=m -CONFIG_BT_HCIUART_H4=y -CONFIG_BT_HCIUART_BCSP=y -# CONFIG_BT_HCIUART_LL is not set -CONFIG_BT_HCIBCM203X=m -CONFIG_BT_HCIBPA10X=m -CONFIG_BT_HCIBFUSB=m -CONFIG_BT_HCIDTL1=m -CONFIG_BT_HCIBT3C=m -CONFIG_BT_HCIBLUECARD=m -CONFIG_BT_HCIBTUART=m -CONFIG_BT_HCIVHCI=m -# CONFIG_AF_RXRPC is not set - -# -# Wireless -# -# CONFIG_CFG80211 is not set -CONFIG_WIRELESS_EXT=y -# CONFIG_MAC80211 is not set -CONFIG_IEEE80211=m -# CONFIG_IEEE80211_DEBUG is not set -CONFIG_IEEE80211_CRYPT_WEP=m -CONFIG_IEEE80211_CRYPT_CCMP=m -CONFIG_IEEE80211_CRYPT_TKIP=m -CONFIG_IEEE80211_SOFTMAC=m -# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set -# CONFIG_RFKILL is not set -# CONFIG_NET_9P is not set +# CONFIG_NET is not set # # Device Drivers @@ -552,14 +311,11 @@ CONFIG_IEEE80211_SOFTMAC=m # # Generic Driver Options # -CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_UEVENT_HELPER_PATH="" CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y CONFIG_FW_LOADER=y -# CONFIG_DEBUG_DRIVER is not set -# CONFIG_DEBUG_DEVRES is not set # CONFIG_SYS_HYPERVISOR is not set -# CONFIG_CONNECTOR is not set CONFIG_MTD=y # CONFIG_MTD_DEBUG is not set # CONFIG_MTD_CONCAT is not set @@ -567,6 +323,7 @@ CONFIG_MTD_PARTITIONS=y # CONFIG_MTD_REDBOOT_PARTS is not set CONFIG_MTD_CMDLINE_PARTS=y # CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set # # User Modules And Translation Layers @@ -632,7 +389,6 @@ CONFIG_MTD_NAND_IDS=y CONFIG_MTD_NAND_SHARPSL=y # CONFIG_MTD_NAND_NANDSIM is not set # CONFIG_MTD_NAND_PLATFORM is not set -# CONFIG_MTD_ALAUDA is not set # CONFIG_MTD_ONENAND is not set # @@ -644,186 +400,47 @@ CONFIG_BLK_DEV=y # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set -# CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_UB is not set # CONFIG_BLK_DEV_RAM is not set # CONFIG_CDROM_PKTCDVD is not set -# CONFIG_ATA_OVER_ETH is not set CONFIG_MISC_DEVICES=y # CONFIG_EEPROM_93CX6 is not set -CONFIG_IDE=m +# CONFIG_ENCLOSURE_SERVICES is not set +CONFIG_HAVE_IDE=y +CONFIG_IDE=y CONFIG_IDE_MAX_HWIFS=4 -CONFIG_BLK_DEV_IDE=m +CONFIG_BLK_DEV_IDE=y # -# Please see Documentation/ide.txt for help/info on IDE drives +# Please see Documentation/ide/ide.txt for help/info on IDE drives # # CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=m +CONFIG_BLK_DEV_IDEDISK=y # CONFIG_IDEDISK_MULTI_MODE is not set -CONFIG_BLK_DEV_IDECS=m +CONFIG_BLK_DEV_IDECS=y # CONFIG_BLK_DEV_IDECD is not set # CONFIG_BLK_DEV_IDETAPE is not set # CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set # CONFIG_IDE_TASK_IOCTL is not set CONFIG_IDE_PROC_FS=y # # IDE chipset support/bugfixes # -CONFIG_IDE_GENERIC=m # CONFIG_BLK_DEV_PLATFORM is not set -# CONFIG_IDE_ARM is not set # CONFIG_BLK_DEV_IDEDMA is not set -CONFIG_IDE_ARCH_OBSOLETE_INIT=y # CONFIG_BLK_DEV_HD is not set # # SCSI device support # # CONFIG_RAID_ATTRS is not set -CONFIG_SCSI=m -CONFIG_SCSI_DMA=y -# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_DMA is not set # CONFIG_SCSI_NETLINK is not set -CONFIG_SCSI_PROC_FS=y - -# -# SCSI support type (disk, tape, CD-ROM) -# -CONFIG_BLK_DEV_SD=m -CONFIG_CHR_DEV_ST=m -CONFIG_CHR_DEV_OSST=m -CONFIG_BLK_DEV_SR=m -# CONFIG_BLK_DEV_SR_VENDOR is not set -CONFIG_CHR_DEV_SG=m -# CONFIG_CHR_DEV_SCH is not set - -# -# Some SCSI devices (e.g. CD jukebox) support multiple LUNs -# -CONFIG_SCSI_MULTI_LUN=y -# CONFIG_SCSI_CONSTANTS is not set -# CONFIG_SCSI_LOGGING is not set -# CONFIG_SCSI_SCAN_ASYNC is not set -CONFIG_SCSI_WAIT_SCAN=m - -# -# SCSI Transports -# -# CONFIG_SCSI_SPI_ATTRS is not set -# CONFIG_SCSI_FC_ATTRS is not set -# CONFIG_SCSI_ISCSI_ATTRS is not set -# CONFIG_SCSI_SAS_LIBSAS is not set -# CONFIG_SCSI_SRP_ATTRS is not set -CONFIG_SCSI_LOWLEVEL=y -# CONFIG_ISCSI_TCP is not set -# CONFIG_SCSI_DEBUG is not set -# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set # CONFIG_ATA is not set CONFIG_MD=y # CONFIG_BLK_DEV_MD is not set -CONFIG_BLK_DEV_DM=m -# CONFIG_DM_DEBUG is not set -CONFIG_DM_CRYPT=m -CONFIG_DM_SNAPSHOT=m -CONFIG_DM_MIRROR=m -CONFIG_DM_ZERO=m -CONFIG_DM_MULTIPATH=m -CONFIG_DM_MULTIPATH_EMC=m -# CONFIG_DM_MULTIPATH_RDAC is not set -# CONFIG_DM_MULTIPATH_HP is not set -# CONFIG_DM_DELAY is not set -# CONFIG_DM_UEVENT is not set -CONFIG_NETDEVICES=y -# CONFIG_NETDEVICES_MULTIQUEUE is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_MACVLAN is not set -# CONFIG_EQUALIZER is not set -CONFIG_TUN=m -# CONFIG_VETH is not set -# CONFIG_PHYLIB is not set -CONFIG_NET_ETHERNET=y -CONFIG_MII=m -# CONFIG_AX88796 is not set -# CONFIG_SMC91X is not set -# CONFIG_DM9000 is not set -# CONFIG_SMC911X is not set -# CONFIG_IBM_NEW_EMAC_ZMII is not set -# CONFIG_IBM_NEW_EMAC_RGMII is not set -# CONFIG_IBM_NEW_EMAC_TAH is not set -# CONFIG_IBM_NEW_EMAC_EMAC4 is not set -# CONFIG_B44 is not set -# CONFIG_NETDEV_1000 is not set -# CONFIG_NETDEV_10000 is not set - -# -# Wireless LAN -# -# CONFIG_WLAN_PRE80211 is not set -CONFIG_WLAN_80211=y -# CONFIG_PCMCIA_RAYCS is not set -# CONFIG_LIBERTAS is not set -CONFIG_HERMES=m -CONFIG_PCMCIA_HERMES=m -CONFIG_PCMCIA_SPECTRUM=m -# CONFIG_ATMEL is not set -CONFIG_AIRO_CS=m -# CONFIG_PCMCIA_WL3501 is not set -# CONFIG_USB_ZD1201 is not set -CONFIG_HOSTAP=m -CONFIG_HOSTAP_FIRMWARE=y -# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set -CONFIG_HOSTAP_CS=m -# CONFIG_ZD1211RW is not set - -# -# USB Network Adapters -# -CONFIG_USB_CATC=m -CONFIG_USB_KAWETH=m -CONFIG_USB_PEGASUS=m -CONFIG_USB_RTL8150=m -CONFIG_USB_USBNET=m -CONFIG_USB_NET_AX8817X=m -CONFIG_USB_NET_CDCETHER=m -# CONFIG_USB_NET_DM9601 is not set -# CONFIG_USB_NET_GL620A is not set -CONFIG_USB_NET_NET1080=m -# CONFIG_USB_NET_PLUSB is not set -# CONFIG_USB_NET_MCS7830 is not set -# CONFIG_USB_NET_RNDIS_HOST is not set -# CONFIG_USB_NET_CDC_SUBSET is not set -CONFIG_USB_NET_ZAURUS=m -CONFIG_NET_PCMCIA=y -# CONFIG_PCMCIA_3C589 is not set -# CONFIG_PCMCIA_3C574 is not set -# CONFIG_PCMCIA_FMVJ18X is not set -CONFIG_PCMCIA_PCNET=m -# CONFIG_PCMCIA_NMCLAN is not set -# CONFIG_PCMCIA_SMC91C92 is not set -# CONFIG_PCMCIA_XIRC2PS is not set -# CONFIG_PCMCIA_AXNET is not set -# CONFIG_WAN is not set -CONFIG_PPP=m -# CONFIG_PPP_MULTILINK is not set -# CONFIG_PPP_FILTER is not set -CONFIG_PPP_ASYNC=m -# CONFIG_PPP_SYNC_TTY is not set -CONFIG_PPP_DEFLATE=m -CONFIG_PPP_BSDCOMP=m -# CONFIG_PPP_MPPE is not set -# CONFIG_PPPOE is not set -# CONFIG_PPPOL2TP is not set -# CONFIG_SLIP is not set -CONFIG_SLHC=m -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set -# CONFIG_ISDN is not set +# CONFIG_BLK_DEV_DM is not set # # Input device support @@ -835,14 +452,14 @@ CONFIG_INPUT=y # # Userland interfaces # -CONFIG_INPUT_MOUSEDEV=m +CONFIG_INPUT_MOUSEDEV=y # CONFIG_INPUT_MOUSEDEV_PSAUX is not set CONFIG_INPUT_MOUSEDEV_SCREEN_X=240 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=320 # CONFIG_INPUT_JOYDEV is not set CONFIG_INPUT_EVDEV=y # CONFIG_INPUT_EVBUG is not set -CONFIG_INPUT_POWER=y +CONFIG_INPUT_APMPOWER=y # # Input Device Drivers @@ -857,6 +474,7 @@ CONFIG_KEYBOARD_LOCOMO=y # CONFIG_KEYBOARD_STOWAWAY is not set # CONFIG_KEYBOARD_CORGI is not set # CONFIG_KEYBOARD_SPITZ is not set +# CONFIG_SHARPSL_RC is not set # CONFIG_KEYBOARD_GPIO is not set # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set @@ -879,7 +497,7 @@ CONFIG_INPUT_MISC=y # CONFIG_INPUT_KEYSPAN_REMOTE is not set # CONFIG_INPUT_POWERMATE is not set # CONFIG_INPUT_YEALINK is not set -CONFIG_INPUT_UINPUT=m +# CONFIG_INPUT_UINPUT is not set # # Hardware I/O ports @@ -894,16 +512,13 @@ CONFIG_VT=y CONFIG_VT_CONSOLE=y CONFIG_HW_CONSOLE=y # CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_DEVKMEM=y # CONFIG_SERIAL_NONSTANDARD is not set # # Serial drivers # -CONFIG_SERIAL_8250=m -CONFIG_SERIAL_8250_CS=m -CONFIG_SERIAL_8250_NR_UARTS=4 -CONFIG_SERIAL_8250_RUNTIME_UARTS=4 -# CONFIG_SERIAL_8250_EXTENDED is not set +# CONFIG_SERIAL_8250 is not set # # Non-8250 serial port support @@ -915,7 +530,7 @@ CONFIG_SERIAL_CORE_CONSOLE=y CONFIG_UNIX98_PTYS=y # CONFIG_LEGACY_PTYS is not set # CONFIG_IPMI_HANDLER is not set -CONFIG_HW_RANDOM=m +CONFIG_HW_RANDOM=y # CONFIG_NVRAM is not set # CONFIG_R3964 is not set @@ -931,13 +546,6 @@ CONFIG_I2C=y CONFIG_I2C_BOARDINFO=y # CONFIG_I2C_CHARDEV is not set -# -# I2C Algorithms -# -CONFIG_I2C_ALGOBIT=y -# CONFIG_I2C_ALGOPCF is not set -# CONFIG_I2C_ALGOPCA is not set - # # I2C Hardware Bus support # @@ -948,31 +556,39 @@ CONFIG_I2C_PXA=y # CONFIG_I2C_PARPORT_LIGHT is not set # CONFIG_I2C_SIMTEC is not set # CONFIG_I2C_TAOS_EVM is not set -# CONFIG_I2C_STUB is not set -# CONFIG_I2C_TINY_USB is not set +# CONFIG_I2C_PCA_PLATFORM is not set # # Miscellaneous I2C Chip support # -# CONFIG_SENSORS_DS1337 is not set -# CONFIG_SENSORS_DS1374 is not set # CONFIG_DS1682 is not set # CONFIG_SENSORS_EEPROM is not set # CONFIG_SENSORS_PCF8574 is not set -# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_PCF8575 is not set # CONFIG_SENSORS_PCF8591 is not set +# CONFIG_TPS65010 is not set # CONFIG_SENSORS_MAX6875 is not set # CONFIG_SENSORS_TSL2550 is not set # CONFIG_I2C_DEBUG_CORE is not set # CONFIG_I2C_DEBUG_ALGO is not set # CONFIG_I2C_DEBUG_BUS is not set # CONFIG_I2C_DEBUG_CHIP is not set +# CONFIG_SPI is not set +CONFIG_HAVE_GPIO_LIB=y # -# SPI support +# GPIO Support +# + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_PCA953X is not set +# CONFIG_GPIO_PCF857X is not set + +# +# SPI GPIO expanders: # -# CONFIG_SPI is not set -# CONFIG_SPI_MASTER is not set # CONFIG_W1 is not set # CONFIG_POWER_SUPPLY is not set # CONFIG_HWMON is not set @@ -988,55 +604,32 @@ CONFIG_SSB_POSSIBLE=y # Multifunction device drivers # # CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set # CONFIG_HTC_ASIC3 is not set # CONFIG_HTC_ASIC3_DS1WM is not set # # Multimedia devices # -CONFIG_VIDEO_DEV=m -CONFIG_VIDEO_V4L1=y -CONFIG_VIDEO_V4L1_COMPAT=y -CONFIG_VIDEO_V4L2=y -CONFIG_VIDEO_CAPTURE_DRIVERS=y -# CONFIG_VIDEO_ADV_DEBUG is not set -CONFIG_VIDEO_HELPER_CHIPS_AUTO=y -# CONFIG_VIDEO_VIVI is not set -# CONFIG_VIDEO_CPIA is not set -# CONFIG_VIDEO_CPIA2 is not set -# CONFIG_VIDEO_SAA5246A is not set -# CONFIG_VIDEO_SAA5249 is not set -# CONFIG_TUNER_3036 is not set -CONFIG_V4L_USB_DRIVERS=y -# CONFIG_VIDEO_PVRUSB2 is not set -# CONFIG_VIDEO_EM28XX is not set -# CONFIG_VIDEO_USBVISION is not set -CONFIG_VIDEO_USBVIDEO=m -CONFIG_USB_VICAM=m -CONFIG_USB_IBMCAM=m -CONFIG_USB_KONICAWC=m -# CONFIG_USB_QUICKCAM_MESSENGER is not set -# CONFIG_USB_ET61X251 is not set -# CONFIG_VIDEO_OVCAMCHIP is not set -# CONFIG_USB_W9968CF is not set -CONFIG_USB_OV511=m -CONFIG_USB_SE401=m -CONFIG_USB_SN9C102=m -CONFIG_USB_STV680=m -# CONFIG_USB_ZC0301 is not set -# CONFIG_USB_PWC is not set -# CONFIG_USB_ZR364XX is not set -CONFIG_RADIO_ADAPTERS=y -CONFIG_USB_DSBR=m -# CONFIG_DVB_CORE is not set -CONFIG_DAB=y -CONFIG_USB_DABUSB=m + +# +# Multimedia core support +# +# CONFIG_VIDEO_DEV is not set +# CONFIG_VIDEO_MEDIA is not set + +# +# Multimedia drivers +# +# CONFIG_DAB is not set # # Graphics support # # CONFIG_VGASTATE is not set -CONFIG_VIDEO_OUTPUT_CONTROL=m +# CONFIG_VIDEO_OUTPUT_CONTROL is not set CONFIG_FB=y # CONFIG_FIRMWARE_EDID is not set # CONFIG_FB_DDC is not set @@ -1047,8 +640,8 @@ CONFIG_FB_CFB_IMAGEBLIT=y # CONFIG_FB_SYS_FILLRECT is not set # CONFIG_FB_SYS_COPYAREA is not set # CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set # CONFIG_FB_SYS_FOPS is not set -# CONFIG_FB_DEFERRED_IO is not set # CONFIG_FB_SVGALIB is not set # CONFIG_FB_MACMODES is not set # CONFIG_FB_BACKLIGHT is not set @@ -1060,12 +653,11 @@ CONFIG_FB_CFB_IMAGEBLIT=y # # CONFIG_FB_S1D13XXX is not set CONFIG_FB_PXA=y -CONFIG_FB_PXA_LCD_QVGA=y -# CONFIG_FB_PXA_LCD_VGA is not set -# CONFIG_FB_PXA_OVERLAY is not set +# CONFIG_FB_PXA_SMARTPANEL is not set # CONFIG_FB_PXA_PARAMETERS is not set # CONFIG_FB_MBX is not set # CONFIG_FB_W100 is not set +# CONFIG_FB_AM200EPD is not set # CONFIG_FB_VIRTUAL is not set CONFIG_BACKLIGHT_LCD_SUPPORT=y # CONFIG_LCD_CLASS_DEVICE is not set @@ -1097,260 +689,36 @@ CONFIG_FONT_MINI_4x6=y # CONFIG_FONT_SUN8x16 is not set # CONFIG_FONT_SUN12x22 is not set # CONFIG_FONT_10x18 is not set -# CONFIG_LOGO is not set +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y # # Sound # -CONFIG_SOUND=m - -# -# Advanced Linux Sound Architecture -# -CONFIG_SND=m -CONFIG_SND_TIMER=m -CONFIG_SND_PCM=m -CONFIG_SND_HWDEP=m -CONFIG_SND_RAWMIDI=m -CONFIG_SND_SEQUENCER=m -# CONFIG_SND_SEQ_DUMMY is not set -CONFIG_SND_OSSEMUL=y -CONFIG_SND_MIXER_OSS=m -CONFIG_SND_PCM_OSS=m -CONFIG_SND_PCM_OSS_PLUGINS=y -# CONFIG_SND_SEQUENCER_OSS is not set -# CONFIG_SND_DYNAMIC_MINORS is not set -CONFIG_SND_SUPPORT_OLD_API=y -CONFIG_SND_VERBOSE_PROCFS=y -# CONFIG_SND_VERBOSE_PRINTK is not set -# CONFIG_SND_DEBUG is not set - -# -# Generic devices -# -CONFIG_SND_AC97_CODEC=m -# CONFIG_SND_DUMMY is not set -# CONFIG_SND_VIRMIDI is not set -# CONFIG_SND_MTPAV is not set -# CONFIG_SND_SERIAL_U16550 is not set -# CONFIG_SND_MPU401 is not set - -# -# ALSA ARM devices -# -CONFIG_SND_PXA2XX_PCM=m -CONFIG_SND_PXA2XX_AC97=m - -# -# USB devices -# -CONFIG_SND_USB_AUDIO=m -# CONFIG_SND_USB_CAIAQ is not set - -# -# PCMCIA devices -# -# CONFIG_SND_VXPOCKET is not set -# CONFIG_SND_PDAUDIOCF is not set - -# -# System on Chip audio support -# -CONFIG_SND_SOC=m -CONFIG_SND_PXA2XX_SOC=m -CONFIG_SND_PXA2XX_SOC_I2S=m -CONFIG_SND_PXA2XX_SOC_POODLE=m - -# -# SoC Audio support for SuperH -# -CONFIG_SND_SOC_WM8731=m - -# -# Open Sound System -# -# CONFIG_SOUND_PRIME is not set -# CONFIG_AC97_BUS is not set +# CONFIG_SOUND is not set CONFIG_HID_SUPPORT=y -CONFIG_HID=m +CONFIG_HID=y # CONFIG_HID_DEBUG is not set # CONFIG_HIDRAW is not set - -# -# USB Input Devices -# -CONFIG_USB_HID=m -# CONFIG_USB_HIDINPUT_POWERBOOK is not set -# CONFIG_HID_FF is not set -# CONFIG_USB_HIDDEV is not set - -# -# USB HID Boot Protocol drivers -# -CONFIG_USB_KBD=m -CONFIG_USB_MOUSE=m CONFIG_USB_SUPPORT=y CONFIG_USB_ARCH_HAS_HCD=y # CONFIG_USB_ARCH_HAS_OHCI is not set # CONFIG_USB_ARCH_HAS_EHCI is not set -CONFIG_USB=m -# CONFIG_USB_DEBUG is not set - -# -# Miscellaneous USB options -# -CONFIG_USB_DEVICEFS=y -CONFIG_USB_DEVICE_CLASS=y -# CONFIG_USB_DYNAMIC_MINORS is not set -# CONFIG_USB_SUSPEND is not set -# CONFIG_USB_PERSIST is not set -# CONFIG_USB_OTG is not set - -# -# USB Host Controller Drivers -# -# CONFIG_USB_ISP116X_HCD is not set -CONFIG_USB_SL811_HCD=m -CONFIG_USB_SL811_CS=m -# CONFIG_USB_R8A66597_HCD is not set - -# -# USB Device Class drivers -# -CONFIG_USB_ACM=m -CONFIG_USB_PRINTER=m +# CONFIG_USB is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set # # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' # - -# -# may also be needed; see USB_STORAGE Help for more information -# -CONFIG_USB_STORAGE=m -# CONFIG_USB_STORAGE_DEBUG is not set -# CONFIG_USB_STORAGE_DATAFAB is not set -# CONFIG_USB_STORAGE_FREECOM is not set -# CONFIG_USB_STORAGE_ISD200 is not set -# CONFIG_USB_STORAGE_DPCM is not set -# CONFIG_USB_STORAGE_USBAT is not set -# CONFIG_USB_STORAGE_SDDR09 is not set -# CONFIG_USB_STORAGE_SDDR55 is not set -# CONFIG_USB_STORAGE_JUMPSHOT is not set -# CONFIG_USB_STORAGE_ALAUDA is not set -# CONFIG_USB_STORAGE_KARMA is not set -# CONFIG_USB_LIBUSUAL is not set - -# -# USB Imaging devices -# -CONFIG_USB_MDC800=m -CONFIG_USB_MICROTEK=m -CONFIG_USB_MON=y - -# -# USB port drivers -# - -# -# USB Serial Converter support -# -CONFIG_USB_SERIAL=m -CONFIG_USB_SERIAL_GENERIC=y -# CONFIG_USB_SERIAL_AIRCABLE is not set -# CONFIG_USB_SERIAL_AIRPRIME is not set -# CONFIG_USB_SERIAL_ARK3116 is not set -CONFIG_USB_SERIAL_BELKIN=m -# CONFIG_USB_SERIAL_CH341 is not set -# CONFIG_USB_SERIAL_WHITEHEAT is not set -CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m -CONFIG_USB_SERIAL_CP2101=m -CONFIG_USB_SERIAL_CYPRESS_M8=m -CONFIG_USB_SERIAL_EMPEG=m -CONFIG_USB_SERIAL_FTDI_SIO=m -# CONFIG_USB_SERIAL_FUNSOFT is not set -CONFIG_USB_SERIAL_VISOR=m -CONFIG_USB_SERIAL_IPAQ=m -CONFIG_USB_SERIAL_IR=m -CONFIG_USB_SERIAL_EDGEPORT=m -CONFIG_USB_SERIAL_EDGEPORT_TI=m -CONFIG_USB_SERIAL_GARMIN=m -CONFIG_USB_SERIAL_IPW=m -CONFIG_USB_SERIAL_KEYSPAN_PDA=m -CONFIG_USB_SERIAL_KEYSPAN=m -# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19 is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set -# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set -CONFIG_USB_SERIAL_KLSI=m -CONFIG_USB_SERIAL_KOBIL_SCT=m -CONFIG_USB_SERIAL_MCT_U232=m -# CONFIG_USB_SERIAL_MOS7720 is not set -# CONFIG_USB_SERIAL_MOS7840 is not set -# CONFIG_USB_SERIAL_NAVMAN is not set -CONFIG_USB_SERIAL_PL2303=m -# CONFIG_USB_SERIAL_OTI6858 is not set -# CONFIG_USB_SERIAL_HP4X is not set -CONFIG_USB_SERIAL_SAFE=m -# CONFIG_USB_SERIAL_SAFE_PADDED is not set -# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set -CONFIG_USB_SERIAL_TI=m -CONFIG_USB_SERIAL_CYBERJACK=m -CONFIG_USB_SERIAL_XIRCOM=m -# CONFIG_USB_SERIAL_OPTION is not set -CONFIG_USB_SERIAL_OMNINET=m -# CONFIG_USB_SERIAL_DEBUG is not set -CONFIG_USB_EZUSB=y - -# -# USB Miscellaneous drivers -# -CONFIG_USB_EMI62=m -CONFIG_USB_EMI26=m -# CONFIG_USB_ADUTUX is not set -CONFIG_USB_AUERSWALD=m -CONFIG_USB_RIO500=m -CONFIG_USB_LEGOTOWER=m -CONFIG_USB_LCD=m -# CONFIG_USB_BERRY_CHARGE is not set -CONFIG_USB_LED=m -# CONFIG_USB_CYPRESS_CY7C63 is not set -CONFIG_USB_CYTHERM=m -# CONFIG_USB_PHIDGET is not set -CONFIG_USB_IDMOUSE=m -# CONFIG_USB_FTDI_ELAN is not set -# CONFIG_USB_APPLEDISPLAY is not set -# CONFIG_USB_LD is not set -# CONFIG_USB_TRANCEVIBRATOR is not set -# CONFIG_USB_IOWARRIOR is not set -# CONFIG_USB_TEST is not set - -# -# USB DSL modem support -# - -# -# USB Gadget Support -# -CONFIG_USB_GADGET=y -# CONFIG_USB_GADGET_DEBUG is not set -# CONFIG_USB_GADGET_DEBUG_FILES is not set -CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET is not set # CONFIG_USB_GADGET_AMD5536UDC is not set # CONFIG_USB_GADGET_ATMEL_USBA is not set # CONFIG_USB_GADGET_FSL_USB2 is not set # CONFIG_USB_GADGET_NET2280 is not set -CONFIG_USB_GADGET_PXA2XX=y -CONFIG_USB_PXA2XX=y -# CONFIG_USB_PXA2XX_SMALL is not set +# CONFIG_USB_GADGET_PXA2XX is not set # CONFIG_USB_GADGET_M66592 is not set # CONFIG_USB_GADGET_PXA27X is not set # CONFIG_USB_GADGET_GOKU is not set @@ -1359,15 +727,13 @@ CONFIG_USB_PXA2XX=y # CONFIG_USB_GADGET_S3C2410 is not set # CONFIG_USB_GADGET_AT91 is not set # CONFIG_USB_GADGET_DUMMY_HCD is not set -# CONFIG_USB_GADGET_DUALSPEED is not set -CONFIG_USB_ZERO=m -CONFIG_USB_ETH=m -CONFIG_USB_ETH_RNDIS=y -CONFIG_USB_GADGETFS=m -CONFIG_USB_FILE_STORAGE=m -# CONFIG_USB_FILE_STORAGE_TEST is not set -CONFIG_USB_G_SERIAL=m +# CONFIG_USB_ZERO is not set +# CONFIG_USB_ETH is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set # CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set CONFIG_MMC=y # CONFIG_MMC_DEBUG is not set CONFIG_MMC_UNSAFE_RESUME=y @@ -1378,6 +744,7 @@ CONFIG_MMC_UNSAFE_RESUME=y CONFIG_MMC_BLOCK=y CONFIG_MMC_BLOCK_BOUNCE=y # CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set # # MMC/SD Host Controller Drivers @@ -1390,7 +757,6 @@ CONFIG_LEDS_CLASS=y # LED drivers # CONFIG_LEDS_LOCOMO=y -# CONFIG_LEDS_TOSA is not set # CONFIG_LEDS_GPIO is not set # @@ -1400,6 +766,7 @@ CONFIG_LEDS_TRIGGERS=y CONFIG_LEDS_TRIGGER_TIMER=y CONFIG_LEDS_TRIGGER_IDE_DISK=y # CONFIG_LEDS_TRIGGER_HEARTBEAT is not set +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set CONFIG_RTC_LIB=y CONFIG_RTC_CLASS=y CONFIG_RTC_HCTOSYS=y @@ -1428,6 +795,8 @@ CONFIG_RTC_INTF_DEV=y # CONFIG_RTC_DRV_PCF8563 is not set # CONFIG_RTC_DRV_PCF8583 is not set # CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set # # SPI RTC drivers @@ -1437,9 +806,10 @@ CONFIG_RTC_INTF_DEV=y # Platform RTC drivers # # CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1511 is not set # CONFIG_RTC_DRV_DS1553 is not set -# CONFIG_RTC_DRV_STK17TA8 is not set # CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set # CONFIG_RTC_DRV_M48T86 is not set # CONFIG_RTC_DRV_M48T59 is not set # CONFIG_RTC_DRV_V3020 is not set @@ -1448,6 +818,7 @@ CONFIG_RTC_INTF_DEV=y # on-CPU RTC drivers # CONFIG_RTC_DRV_SA1100=y +# CONFIG_UIO is not set # # File systems @@ -1455,22 +826,18 @@ CONFIG_RTC_DRV_SA1100=y CONFIG_EXT2_FS=y # CONFIG_EXT2_FS_XATTR is not set # CONFIG_EXT2_FS_XIP is not set -CONFIG_EXT3_FS=m +CONFIG_EXT3_FS=y # CONFIG_EXT3_FS_XATTR is not set # CONFIG_EXT4DEV_FS is not set -CONFIG_JBD=m +CONFIG_JBD=y # CONFIG_REISERFS_FS is not set # CONFIG_JFS_FS is not set -CONFIG_FS_POSIX_ACL=y +# CONFIG_FS_POSIX_ACL is not set # CONFIG_XFS_FS is not set -# CONFIG_GFS2_FS is not set -# CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set +CONFIG_DNOTIFY=y CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set @@ -1528,47 +895,14 @@ CONFIG_JFFS2_RUBIN=y CONFIG_JFFS2_CMODE_PRIORITY=y # CONFIG_JFFS2_CMODE_SIZE is not set # CONFIG_JFFS2_CMODE_FAVOURLZO is not set -CONFIG_CRAMFS=m -CONFIG_SQUASHFS=m -# CONFIG_SQUASHFS_EMBEDDED is not set -CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set -CONFIG_NETWORK_FILESYSTEMS=y -CONFIG_NFS_FS=m -CONFIG_NFS_V3=y -# CONFIG_NFS_V3_ACL is not set -CONFIG_NFS_V4=y -# CONFIG_NFS_DIRECTIO is not set -CONFIG_NFSD=m -CONFIG_NFSD_V3=y -# CONFIG_NFSD_V3_ACL is not set -CONFIG_NFSD_V4=y -CONFIG_NFSD_TCP=y -CONFIG_LOCKD=m -CONFIG_LOCKD_V4=y -CONFIG_EXPORTFS=m -CONFIG_NFS_COMMON=y -CONFIG_SUNRPC=m -CONFIG_SUNRPC_GSS=m -# CONFIG_SUNRPC_BIND34 is not set -CONFIG_RPCSEC_GSS_KRB5=m -# CONFIG_RPCSEC_GSS_SPKM3 is not set -CONFIG_SMB_FS=m -CONFIG_SMB_NLS_DEFAULT=y -CONFIG_SMB_NLS_REMOTE="cp437" -CONFIG_CIFS=m -# CONFIG_CIFS_STATS is not set -# CONFIG_CIFS_WEAK_PW_HASH is not set -# CONFIG_CIFS_XATTR is not set -# CONFIG_CIFS_DEBUG2 is not set -# CONFIG_CIFS_EXPERIMENTAL is not set -# CONFIG_NCP_FS is not set -# CONFIG_CODA_FS is not set -# CONFIG_AFS_FS is not set # # Partition Types @@ -1594,48 +928,43 @@ CONFIG_MSDOS_PARTITION=y CONFIG_NLS=y CONFIG_NLS_DEFAULT="cp437" CONFIG_NLS_CODEPAGE_437=y -CONFIG_NLS_CODEPAGE_737=m -CONFIG_NLS_CODEPAGE_775=m -CONFIG_NLS_CODEPAGE_850=m -CONFIG_NLS_CODEPAGE_852=m -CONFIG_NLS_CODEPAGE_855=m -CONFIG_NLS_CODEPAGE_857=m -CONFIG_NLS_CODEPAGE_860=m -CONFIG_NLS_CODEPAGE_861=m -CONFIG_NLS_CODEPAGE_862=m -CONFIG_NLS_CODEPAGE_863=m -CONFIG_NLS_CODEPAGE_864=m -CONFIG_NLS_CODEPAGE_865=m -CONFIG_NLS_CODEPAGE_866=m -CONFIG_NLS_CODEPAGE_869=m -CONFIG_NLS_CODEPAGE_936=m -CONFIG_NLS_CODEPAGE_950=m -CONFIG_NLS_CODEPAGE_932=m -CONFIG_NLS_CODEPAGE_949=m -CONFIG_NLS_CODEPAGE_874=m -CONFIG_NLS_ISO8859_8=m -CONFIG_NLS_CODEPAGE_1250=m -CONFIG_NLS_CODEPAGE_1251=m -CONFIG_NLS_ASCII=m +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set CONFIG_NLS_ISO8859_1=y -CONFIG_NLS_ISO8859_2=m -CONFIG_NLS_ISO8859_3=m -CONFIG_NLS_ISO8859_4=m -CONFIG_NLS_ISO8859_5=m -CONFIG_NLS_ISO8859_6=m -CONFIG_NLS_ISO8859_7=m -CONFIG_NLS_ISO8859_9=m -CONFIG_NLS_ISO8859_13=m -CONFIG_NLS_ISO8859_14=m -CONFIG_NLS_ISO8859_15=m -CONFIG_NLS_KOI8_R=m -CONFIG_NLS_KOI8_U=m +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set CONFIG_NLS_UTF8=y -# CONFIG_DLM is not set -CONFIG_INSTRUMENTATION=y -CONFIG_PROFILING=y -CONFIG_OPROFILE=m -# CONFIG_MARKERS is not set # # Kernel hacking @@ -1643,42 +972,16 @@ CONFIG_OPROFILE=m # CONFIG_PRINTK_TIME is not set CONFIG_ENABLE_WARN_DEPRECATED=y CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 CONFIG_MAGIC_SYSRQ=y # CONFIG_UNUSED_SYMBOLS is not set # CONFIG_DEBUG_FS is not set # CONFIG_HEADERS_CHECK is not set -CONFIG_DEBUG_KERNEL=y -# CONFIG_DEBUG_SHIRQ is not set -# CONFIG_DETECT_SOFTLOCKUP is not set -# CONFIG_SCHED_DEBUG is not set -# CONFIG_SCHEDSTATS is not set -CONFIG_TIMER_STATS=y -# CONFIG_DEBUG_SLAB is not set -# CONFIG_DEBUG_PREEMPT is not set -# CONFIG_DEBUG_RT_MUTEXES is not set -# CONFIG_RT_MUTEX_TESTER is not set -# CONFIG_DEBUG_SPINLOCK is not set -# CONFIG_DEBUG_MUTEXES is not set -# CONFIG_DEBUG_LOCK_ALLOC is not set -# CONFIG_PROVE_LOCKING is not set -# CONFIG_LOCK_STAT is not set -# CONFIG_DEBUG_SPINLOCK_SLEEP is not set -# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set -# CONFIG_DEBUG_KOBJECT is not set -CONFIG_DEBUG_BUGVERBOSE=y -# CONFIG_DEBUG_INFO is not set -# CONFIG_DEBUG_VM is not set -# CONFIG_DEBUG_LIST is not set -# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_FRAME_POINTER=y -# CONFIG_FORCED_INLINING is not set -# CONFIG_BOOT_PRINTK_DELAY is not set -# CONFIG_RCU_TORTURE_TEST is not set -# CONFIG_FAULT_INJECTION is not set # CONFIG_SAMPLES is not set # CONFIG_DEBUG_USER is not set -CONFIG_DEBUG_ERRORS=y -# CONFIG_DEBUG_LL is not set # # Security options @@ -1686,61 +989,20 @@ CONFIG_DEBUG_ERRORS=y # CONFIG_KEYS is not set # CONFIG_SECURITY is not set # CONFIG_SECURITY_FILE_CAPABILITIES is not set -CONFIG_CRYPTO=y -CONFIG_CRYPTO_ALGAPI=m -CONFIG_CRYPTO_BLKCIPHER=m -CONFIG_CRYPTO_HASH=m -CONFIG_CRYPTO_MANAGER=m -CONFIG_CRYPTO_HMAC=m -# CONFIG_CRYPTO_XCBC is not set -CONFIG_CRYPTO_NULL=m -CONFIG_CRYPTO_MD4=m -CONFIG_CRYPTO_MD5=m -CONFIG_CRYPTO_SHA1=m -CONFIG_CRYPTO_SHA256=m -CONFIG_CRYPTO_SHA512=m -CONFIG_CRYPTO_WP512=m -# CONFIG_CRYPTO_TGR192 is not set -# CONFIG_CRYPTO_GF128MUL is not set -CONFIG_CRYPTO_ECB=m -CONFIG_CRYPTO_CBC=m -CONFIG_CRYPTO_PCBC=m -# CONFIG_CRYPTO_LRW is not set -# CONFIG_CRYPTO_XTS is not set -# CONFIG_CRYPTO_CRYPTD is not set -CONFIG_CRYPTO_DES=m -# CONFIG_CRYPTO_FCRYPT is not set -CONFIG_CRYPTO_BLOWFISH=m -CONFIG_CRYPTO_TWOFISH=m -CONFIG_CRYPTO_TWOFISH_COMMON=m -CONFIG_CRYPTO_SERPENT=m -CONFIG_CRYPTO_AES=m -CONFIG_CRYPTO_CAST5=m -CONFIG_CRYPTO_CAST6=m -CONFIG_CRYPTO_TEA=m -CONFIG_CRYPTO_ARC4=m -CONFIG_CRYPTO_KHAZAD=m -CONFIG_CRYPTO_ANUBIS=m -# CONFIG_CRYPTO_SEED is not set -CONFIG_CRYPTO_DEFLATE=m -CONFIG_CRYPTO_LZO=m -CONFIG_CRYPTO_MICHAEL_MIC=m -CONFIG_CRYPTO_CRC32C=m -CONFIG_CRYPTO_CAMELLIA=m -CONFIG_CRYPTO_TEST=m -# CONFIG_CRYPTO_AUTHENC is not set -# CONFIG_CRYPTO_HW is not set +# CONFIG_CRYPTO is not set # # Library routines # CONFIG_BITREVERSE=y +# CONFIG_GENERIC_FIND_FIRST_BIT is not set +# CONFIG_GENERIC_FIND_NEXT_BIT is not set CONFIG_CRC_CCITT=y # CONFIG_CRC16 is not set # CONFIG_CRC_ITU_T is not set CONFIG_CRC32=y # CONFIG_CRC7 is not set -CONFIG_LIBCRC32C=m +# CONFIG_LIBCRC32C is not set CONFIG_ZLIB_INFLATE=y CONFIG_ZLIB_DEFLATE=y CONFIG_LZO_COMPRESS=y diff --git a/recipes/linux/linux-kexecboot-2.6.36/collie/collie-locomo-kb.patch b/recipes/linux/linux-kexecboot-2.6.36/collie/collie-locomo-kb.patch new file mode 100644 index 0000000000..8b783e7906 --- /dev/null +++ b/recipes/linux/linux-kexecboot-2.6.36/collie/collie-locomo-kb.patch @@ -0,0 +1,31 @@ +ARM: 6658/1: collie: do actually pass locomo_info to locomo driver + +locomo_info isn't actually used as a platform_data on collie platform: + arm/mach-sa1100/collie.c:237: warning: locomo_info defined but not used + +So locomo driver doesn't setup IRQs correctly. Pass locomo_info to the +driver. + +Signed-off-by: Dmitry Eremin-Solenikov +Signed-off-by: Russell King +--- + arch/arm/mach-sa1100/collie.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c +index d43c5ef..bd3e1bf 100644 +--- a/arch/arm/mach-sa1100/collie.c ++++ b/arch/arm/mach-sa1100/collie.c +@@ -241,6 +241,9 @@ static struct locomo_platform_data locomo_info = { + struct platform_device collie_locomo_device = { + .name = "locomo", + .id = 0, ++ .dev = { ++ .platform_data = &locomo_info, ++ }, + .num_resources = ARRAY_SIZE(locomo_resources), + .resource = locomo_resources, + }; +-- +1.7.4.1 + diff --git a/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/defconfig b/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/defconfig new file mode 100644 index 0000000000..361569e464 --- /dev/null +++ b/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/defconfig @@ -0,0 +1,1339 @@ +# +# Automatically generated make config: don't edit +# Linux/mips 2.6.37 Kernel Configuration +# Tue Mar 1 02:56:10 2011 +# +CONFIG_MIPS=y + +# +# Machine selection +# +# CONFIG_MIPS_ALCHEMY is not set +# CONFIG_AR7 is not set +# CONFIG_BCM47XX is not set +# CONFIG_BCM63XX is not set +# CONFIG_MIPS_COBALT is not set +# CONFIG_MACH_DECSTATION is not set +# CONFIG_MACH_JAZZ is not set +CONFIG_MACH_JZ4740=y +# CONFIG_LASAT is not set +# CONFIG_MACH_LOONGSON is not set +# CONFIG_MIPS_MALTA is not set +# CONFIG_MIPS_SIM is not set +# CONFIG_NEC_MARKEINS is not set +# CONFIG_MACH_VR41XX is not set +# CONFIG_NXP_STB220 is not set +# CONFIG_NXP_STB225 is not set +# CONFIG_PNX8550_JBS is not set +# CONFIG_PNX8550_STB810 is not set +# CONFIG_PMC_MSP is not set +# CONFIG_PMC_YOSEMITE is not set +# CONFIG_POWERTV is not set +# CONFIG_SGI_IP22 is not set +# CONFIG_SGI_IP27 is not set +# CONFIG_SGI_IP28 is not set +# CONFIG_SGI_IP32 is not set +# CONFIG_SIBYTE_CRHINE is not set +# CONFIG_SIBYTE_CARMEL is not set +# CONFIG_SIBYTE_CRHONE is not set +# CONFIG_SIBYTE_RHONE is not set +# CONFIG_SIBYTE_SWARM is not set +# CONFIG_SIBYTE_LITTLESUR is not set +# CONFIG_SIBYTE_SENTOSA is not set +# CONFIG_SIBYTE_BIGSUR is not set +# CONFIG_SNI_RM is not set +# CONFIG_MACH_TX39XX is not set +# CONFIG_MACH_TX49XX is not set +# CONFIG_MIKROTIK_RB532 is not set +# CONFIG_WR_PPMC is not set +# CONFIG_CAVIUM_OCTEON_SIMULATOR is not set +# CONFIG_CAVIUM_OCTEON_REFERENCE_BOARD is not set +# CONFIG_ALCHEMY_GPIO_INDIRECT is not set +CONFIG_JZ4740_QI_LB60=y +CONFIG_HAVE_PWM=y +CONFIG_LOONGSON_UART_BASE=y +# CONFIG_LOONGSON_MC146818 is not set +CONFIG_RWSEM_GENERIC_SPINLOCK=y +# CONFIG_ARCH_HAS_ILOG2_U32 is not set +# CONFIG_ARCH_HAS_ILOG2_U64 is not set +CONFIG_ARCH_SUPPORTS_OPROFILE=y +CONFIG_GENERIC_FIND_NEXT_BIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_SCHED_OMIT_FRAME_POINTER=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_DMA_NONCOHERENT=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_SYS_HAS_EARLY_PRINTK=y +# CONFIG_NO_IOPORT is not set +CONFIG_GENERIC_GPIO=y +CONFIG_CPU_LITTLE_ENDIAN=y +CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y +CONFIG_IRQ_CPU=y +CONFIG_MIPS_L1_CACHE_SHIFT=5 + +# +# CPU selection +# +CONFIG_CPU_MIPS32_R1=y +CONFIG_SYS_HAS_CPU_MIPS32_R1=y +CONFIG_CPU_MIPS32=y +CONFIG_CPU_MIPSR1=y +CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y +CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y +CONFIG_HARDWARE_WATCHPOINTS=y + +# +# Kernel type +# +CONFIG_32BIT=y +CONFIG_PAGE_SIZE_4KB=y +# CONFIG_PAGE_SIZE_16KB is not set +# CONFIG_PAGE_SIZE_64KB is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_CPU_HAS_PREFETCH=y +CONFIG_MIPS_MT_DISABLED=y +# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set +CONFIG_CPU_HAS_SYNC=y +CONFIG_CPU_SUPPORTS_HIGHMEM=y +CONFIG_ARCH_FLATMEM_ENABLE=y +CONFIG_ARCH_POPULATES_NODE_MAP=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_NEED_PER_CPU_KM=y +# CONFIG_NO_HZ is not set +# CONFIG_HIGH_RES_TIMERS is not set +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +# CONFIG_HZ_48 is not set +CONFIG_HZ_100=y +# CONFIG_HZ_128 is not set +# CONFIG_HZ_250 is not set +# CONFIG_HZ_256 is not set +# CONFIG_HZ_1000 is not set +# CONFIG_HZ_1024 is not set +CONFIG_SYS_SUPPORTS_ARBIT_HZ=y +CONFIG_HZ=100 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_KEXEC=y +# CONFIG_SECCOMP is not set +# CONFIG_USE_OF is not set +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +# CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED is not set +# CONFIG_HAVE_SPARSE_IRQ is not set +CONFIG_GENERIC_IRQ_PROBE=y +# CONFIG_GENERIC_PENDING_IRQ is not set +# CONFIG_AUTO_IRQ_AFFINITY is not set +# CONFIG_IRQ_PER_CPU is not set +# CONFIG_HARDIRQS_SW_RESEND is not set + +# +# RCU Subsystem +# +# CONFIG_TREE_PREEMPT_RCU is not set +CONFIG_TINY_RCU=y +# CONFIG_TINY_PREEMPT_RCU is not set +# CONFIG_PREEMPT_RCU is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CGROUPS is not set +# CONFIG_NAMESPACES is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="initramfs.cpio.lzma" +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_LZO is not set +# CONFIG_INITRAMFS_COMPRESSION_NONE is not set +CONFIG_INITRAMFS_COMPRESSION_GZIP=y +# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EMBEDDED=y +CONFIG_SYSCTL_SYSCALL=y +# CONFIG_KALLSYMS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +# CONFIG_PCSPKR_PLATFORM is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +# CONFIG_PERF_EVENTS is not set +# CONFIG_PERF_COUNTERS is not set +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_DMA_ATTRS=y +CONFIG_HAVE_DMA_API_DEBUG=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +# CONFIG_MODULES is not set +CONFIG_BLOCK=y +CONFIG_LBDAF=y +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +# CONFIG_IOSCHED_CFQ is not set +CONFIG_DEFAULT_DEADLINE=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="deadline" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +# CONFIG_INLINE_WRITE_UNLOCK is not set +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +# CONFIG_MUTEX_SPIN_ON_OWNER is not set +CONFIG_FREEZER=y + +# +# Bus options (PCI, PCMCIA, EISA, ISA, TC) +# +# CONFIG_ARCH_SUPPORTS_MSI is not set +CONFIG_MMU=y +# CONFIG_PCCARD is not set + +# +# Executable file formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +# CONFIG_HAVE_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_TRAD_SIGNALS=y + +# +# Power management options +# +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_PM=y +# CONFIG_PM_DEBUG is not set +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND_NVS=y +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +# CONFIG_HIBERNATION is not set +# CONFIG_PM_RUNTIME is not set +CONFIG_PM_OPS=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +# CONFIG_IP_PNP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +# CONFIG_IP_PIMSM_V1 is not set +# CONFIG_IP_PIMSM_V2 is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +CONFIG_TCP_CONG_ADVANCED=y +# CONFIG_TCP_CONG_BIC is not set +# CONFIG_TCP_CONG_CUBIC is not set +CONFIG_TCP_CONG_WESTWOOD=y +# CONFIG_TCP_CONG_HTCP is not set +# CONFIG_TCP_CONG_HSTCP is not set +# CONFIG_TCP_CONG_HYBLA is not set +# CONFIG_TCP_CONG_VEGAS is not set +# CONFIG_TCP_CONG_SCALABLE is not set +# CONFIG_TCP_CONG_LP is not set +# CONFIG_TCP_CONG_VENO is not set +# CONFIG_TCP_CONG_YEAH is not set +# CONFIG_TCP_CONG_ILLINOIS is not set +CONFIG_DEFAULT_WESTWOOD=y +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="westwood" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +# CONFIG_CFG80211 is not set +# CONFIG_LIB80211 is not set + +# +# CFG80211 needs to be enabled for MAC80211 +# + +# +# Some wireless drivers require a rate control algorithm +# +# CONFIG_WIMAX is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +# CONFIG_DEVTMPFS is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +# CONFIG_FIRMWARE_IN_KERNEL is not set +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +# CONFIG_MTD_SST25L is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +CONFIG_MTD_NAND_JZ4740=y +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MTD_UBI_BEB_RESERVE=1 +# CONFIG_MTD_UBI_GLUEBI is not set + +# +# UBI debugging options +# +# CONFIG_MTD_UBI_DEBUG is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +# CONFIG_BLK_DEV_LOOP is not set + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_RAM is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_BLK_DEV_HD is not set +# CONFIG_BLK_DEV_RBD is not set +CONFIG_MISC_DEVICES=y +# CONFIG_AD525X_DPOT is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_TI_DAC7512 is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_IWMC3200TOP is not set + +# +# Texas Instruments shared transport line discipline +# +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +# CONFIG_SCSI is not set +# CONFIG_SCSI_DMA is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +# CONFIG_MII is not set +# CONFIG_PHYLIB is not set +# CONFIG_NET_ETHERNET is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_WLAN=y +# CONFIG_HOSTAP is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set + +# +# CAIF transport drivers +# +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_ISDN=y +# CONFIG_ISDN_I4L is not set +# CONFIG_ISDN_CAPI is not set +# CONFIG_ISDN_DRV_GIGASET is not set +# CONFIG_MISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ATKBD is not set +# CONFIG_KEYBOARD_LKKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_KEYBOARD_GPIO_POLLED is not set +CONFIG_KEYBOARD_MATRIX=y +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_ATI_REMOTE is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +# CONFIG_INPUT_UINPUT is not set +CONFIG_INPUT_PWM_BEEPER=y +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +# CONFIG_DEVKMEM is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=2 +CONFIG_SERIAL_8250_RUNTIME_UARTS=2 +# CONFIG_SERIAL_8250_EXTENDED is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX3107 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +CONFIG_LEGACY_PTYS=y +CONFIG_LEGACY_PTY_COUNT=2 +# CONFIG_TTY_PRINTK is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_RAMOOPS is not set +# CONFIG_I2C is not set +CONFIG_SPI=y +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +CONFIG_SPI_BITBANG=y +CONFIG_SPI_GPIO=y +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +# CONFIG_SPI_SPIDEV is not set +# CONFIG_SPI_TLE62X0 is not set + +# +# PPS support +# +# CONFIG_PPS is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_GPIO_SYSFS is not set + +# +# Memory mapped GPIO expanders: +# +# CONFIG_GPIO_BASIC_MMIO is not set +# CONFIG_GPIO_IT8761E is not set +# CONFIG_GPIO_VX855 is not set + +# +# I2C GPIO expanders: +# + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_74X164 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_TEST_POWER is not set +CONFIG_BATTERY_JZ4740=y +# CONFIG_HWMON is not set +# CONFIG_THERMAL is not set +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_MFD_SUPPORT=y +CONFIG_MFD_CORE=y +# CONFIG_MFD_SM501 is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_MC13XXX is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_EZX_PCAP is not set +CONFIG_MFD_JZ4740_ADC=y +# CONFIG_REGULATOR is not set +# CONFIG_MEDIA_SUPPORT is not set + +# +# Graphics support +# +# CONFIG_DRM is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +# CONFIG_FB_CFB_FILLRECT is not set +# CONFIG_FB_CFB_COPYAREA is not set +# CONFIG_FB_CFB_IMAGEBLIT is not set +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_TMIO is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +CONFIG_FB_JZ4740=y +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +# CONFIG_LCD_L4F00242T03 is not set +# CONFIG_LCD_LMS283GF05 is not set +# CONFIG_LCD_LTV350QV is not set +# CONFIG_LCD_TDO24M is not set +# CONFIG_LCD_VGG2432A4 is not set +# CONFIG_LCD_PLATFORM is not set +# CONFIG_BACKLIGHT_CLASS_DEVICE is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +# CONFIG_FONT_8x16 is not set +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +CONFIG_FONT_ACORN_8x8=y +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_SOUND=y +CONFIG_SOUND_OSS_CORE=y +CONFIG_SOUND_OSS_CORE_PRECLAIM=y +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_JACK=y +# CONFIG_SND_SEQUENCER is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_PCM_OSS_PLUGINS=y +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +# CONFIG_SND_VERBOSE_PROCFS is not set +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_SPI is not set +# CONFIG_SND_MIPS is not set +CONFIG_SND_SOC=y +CONFIG_SND_JZ4740_SOC=y +CONFIG_SND_JZ4740_SOC_I2S=y +CONFIG_SND_JZ4740_SOC_QI_LB60=y +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_JZ4740_CODEC=y +# CONFIG_SOUND_PRIME is not set +# CONFIG_HID_SUPPORT is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +# CONFIG_USB is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_DEBUG_FS is not set +CONFIG_USB_GADGET_VBUS_DRAW=2 +CONFIG_USB_GADGET_SELECTED=y +CONFIG_USB_GADGET_R8A66597=y +CONFIG_USB_R8A66597=y +# CONFIG_USB_GADGET_M66592 is not set +CONFIG_USB_GADGET_DUALSPEED=y +# CONFIG_USB_ZERO is not set +# CONFIG_USB_AUDIO is not set +CONFIG_USB_ETH=y +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_ETH_EEM is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FUNCTIONFS is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_MASS_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set +# CONFIG_USB_CDC_COMPOSITE is not set +# CONFIG_USB_G_MULTI is not set +# CONFIG_USB_G_HID is not set +# CONFIG_USB_G_DBGP is not set + +# +# OTG and related infrastructure +# +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_NOP_USB_XCEIV is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_UNSAFE_RESUME=y + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=8 +# CONFIG_MMC_BLOCK_BOUNCE is not set +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_SPI is not set +CONFIG_MMC_JZ4740=y +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set +# CONFIG_RTC_DRV_PCF2123 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +CONFIG_RTC_DRV_JZ4740=y +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +# CONFIG_STAGING is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +# CONFIG_EXT3_FS_XATTR is not set +# CONFIG_EXT4_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_FS_POSIX_ACL is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_KCORE=y +CONFIG_PROC_SYSCTL=y +# CONFIG_PROC_PAGE_MONITOR is not set +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +CONFIG_JFFS2_SUMMARY=y +# CONFIG_JFFS2_FS_XATTR is not set +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +# CONFIG_JFFS2_ZLIB is not set +# CONFIG_JFFS2_LZO is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_JFFS2_CMODE_NONE is not set +CONFIG_JFFS2_CMODE_PRIORITY=y +# CONFIG_JFFS2_CMODE_SIZE is not set +# CONFIG_JFFS2_CMODE_FAVOURLZO is not set +CONFIG_UBIFS_FS=y +# CONFIG_UBIFS_FS_XATTR is not set +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_ZLIB=y +# CONFIG_UBIFS_FS_DEBUG is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +# CONFIG_SQUASHFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_NETWORK_FILESYSTEMS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=y +CONFIG_NLS_CODEPAGE_775=y +CONFIG_NLS_CODEPAGE_850=y +CONFIG_NLS_CODEPAGE_852=y +CONFIG_NLS_CODEPAGE_855=y +CONFIG_NLS_CODEPAGE_857=y +CONFIG_NLS_CODEPAGE_860=y +CONFIG_NLS_CODEPAGE_861=y +CONFIG_NLS_CODEPAGE_862=y +CONFIG_NLS_CODEPAGE_863=y +CONFIG_NLS_CODEPAGE_864=y +CONFIG_NLS_CODEPAGE_865=y +CONFIG_NLS_CODEPAGE_866=y +CONFIG_NLS_CODEPAGE_869=y +CONFIG_NLS_CODEPAGE_936=y +CONFIG_NLS_CODEPAGE_950=y +CONFIG_NLS_CODEPAGE_932=y +CONFIG_NLS_CODEPAGE_949=y +CONFIG_NLS_CODEPAGE_874=y +CONFIG_NLS_ISO8859_8=y +CONFIG_NLS_CODEPAGE_1250=y +CONFIG_NLS_CODEPAGE_1251=y +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=y +CONFIG_NLS_ISO8859_3=y +CONFIG_NLS_ISO8859_4=y +CONFIG_NLS_ISO8859_5=y +CONFIG_NLS_ISO8859_6=y +CONFIG_NLS_ISO8859_7=y +CONFIG_NLS_ISO8859_9=y +CONFIG_NLS_ISO8859_13=y +CONFIG_NLS_ISO8859_14=y +CONFIG_NLS_ISO8859_15=y +CONFIG_NLS_KOI8_R=y +CONFIG_NLS_KOI8_U=y +CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set + +# +# Kernel hacking +# +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_PRINTK_TIME=y +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +# CONFIG_MAGIC_SYSRQ is not set +CONFIG_STRIP_ASM_SYMS=y +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_KERNEL is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +CONFIG_BKL=y +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_LKDTM is not set +CONFIG_SYSCTL_SYSCALL_CHECK=y +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +CONFIG_EARLY_PRINTK=y +CONFIG_CMDLINE_BOOL=y +CONFIG_CMDLINE="" +# CONFIG_CMDLINE_OVERRIDE is not set +# CONFIG_SPINLOCK_TEST is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_PCOMP=y +CONFIG_CRYPTO_PCOMP2=y +# CONFIG_CRYPTO_MANAGER is not set +# CONFIG_CRYPTO_MANAGER2 is not set +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +# CONFIG_CRYPTO_CBC is not set +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +# CONFIG_CRYPTO_ECB is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_GHASH is not set +# CONFIG_CRYPTO_MD4 is not set +# CONFIG_CRYPTO_MD5 is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_DES is not set +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_ZLIB=y +CONFIG_CRYPTO_LZO=y + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_HW=y +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_LAST_BIT=y +# CONFIG_CRC_CCITT is not set +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_DECOMPRESS_GZIP=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y +CONFIG_GENERIC_ATOMIC64=y diff --git a/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/jz4740-udc.patch b/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/jz4740-udc.patch new file mode 100644 index 0000000000..67dca3381b --- /dev/null +++ b/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/jz4740-udc.patch @@ -0,0 +1,2561 @@ +diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig +index 607d0db..35d5fbc 100644 +--- a/drivers/usb/gadget/Kconfig ++++ b/drivers/usb/gadget/Kconfig +@@ -121,11 +121,25 @@ choice + # + # Integrated controllers + # ++config USB_GADGET_JZ4740 ++ boolean "JZ4740 UDC" ++ depends on MACH_JZ4740 ++ select USB_GADGET_SELECTED ++ select USB_GADGET_DUALSPEED ++ help ++ Select this to support the Ingenic JZ4740 processor ++ high speed USB device controller. ++ ++config USB_JZ4740 ++ tristate ++ depends on USB_GADGET_JZ4740 ++ default USB_GADGET + + config USB_GADGET_AT91 + boolean "Atmel AT91 USB Device Port" + depends on ARCH_AT91 && !ARCH_AT91SAM9RL && !ARCH_AT91CAP9 && !ARCH_AT91SAM9G45 + select USB_GADGET_SELECTED ++ + help + Many Atmel AT91 processors (such as the AT91RM2000) have a + full speed USB Device Port with support for five configurable +diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile +index 5780db4..c148025 100644 +--- a/drivers/usb/gadget/Makefile ++++ b/drivers/usb/gadget/Makefile +@@ -24,6 +24,7 @@ obj-$(CONFIG_USB_FSL_QE) += fsl_qe_udc.o + obj-$(CONFIG_USB_CI13XXX) += ci13xxx_udc.o + obj-$(CONFIG_USB_S3C_HSOTG) += s3c-hsotg.o + obj-$(CONFIG_USB_LANGWELL) += langwell_udc.o ++obj-$(CONFIG_USB_JZ4740) += jz4740_udc.o + + # + # USB gadget drivers +diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h +index e511fec..b2ec5fb 100644 +--- a/drivers/usb/gadget/gadget_chips.h ++++ b/drivers/usb/gadget/gadget_chips.h +@@ -15,6 +15,12 @@ + #ifndef __GADGET_CHIPS_H + #define __GADGET_CHIPS_H + ++#ifdef CONFIG_USB_GADGET_JZ4740 ++#define gadget_is_jz4740(g) !strcmp("ingenic_hsusb", (g)->name) ++#else ++#define gadget_is_jz4740(g) 0 ++#endif ++ + #ifdef CONFIG_USB_GADGET_NET2280 + #define gadget_is_net2280(g) !strcmp("net2280", (g)->name) + #else +@@ -200,6 +206,9 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) + return 0x25; + else if (gadget_is_s3c_hsotg(gadget)) + return 0x26; ++ else if (gadget_is_jz4740(gadget)) ++ return 0x27; ++ + return -ENOENT; + } + +diff --git a/drivers/usb/gadget/jz4740_udc.c b/drivers/usb/gadget/jz4740_udc.c +new file mode 100644 +index 0000000..68e511a +--- /dev/null ++++ b/drivers/usb/gadget/jz4740_udc.c +@@ -0,0 +1,2377 @@ ++/* ++ * linux/drivers/usb/gadget/jz4740_udc.c ++ * ++ * Ingenic JZ4740 on-chip high speed USB device controller ++ * ++ * Copyright (C) 2006 - 2008 Ingenic Semiconductor Inc. ++ * Author: ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ */ ++ ++/* ++ * This device has ep0, two bulk-in/interrupt-in endpoints, and one bulk-out endpoint. ++ * ++ * - Endpoint numbering is fixed: ep0, ep1in-int, ep2in-bulk, ep1out-bulk. ++ * - DMA works with bulk-in (channel 1) and bulk-out (channel 2) endpoints. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "jz4740_udc.h" ++ ++#define JZ_REG_UDC_FADDR 0x00 /* Function Address 8-bit */ ++#define JZ_REG_UDC_POWER 0x01 /* Power Management 8-bit */ ++#define JZ_REG_UDC_INTRIN 0x02 /* Interrupt IN 16-bit */ ++#define JZ_REG_UDC_INTROUT 0x04 /* Interrupt OUT 16-bit */ ++#define JZ_REG_UDC_INTRINE 0x06 /* Intr IN enable 16-bit */ ++#define JZ_REG_UDC_INTROUTE 0x08 /* Intr OUT enable 16-bit */ ++#define JZ_REG_UDC_INTRUSB 0x0a /* Interrupt USB 8-bit */ ++#define JZ_REG_UDC_INTRUSBE 0x0b /* Interrupt USB Enable 8-bit */ ++#define JZ_REG_UDC_FRAME 0x0c /* Frame number 16-bit */ ++#define JZ_REG_UDC_INDEX 0x0e /* Index register 8-bit */ ++#define JZ_REG_UDC_TESTMODE 0x0f /* USB test mode 8-bit */ ++ ++#define JZ_REG_UDC_CSR0 0x12 /* EP0 CSR 8-bit */ ++#define JZ_REG_UDC_INMAXP 0x10 /* EP1-2 IN Max Pkt Size 16-bit */ ++#define JZ_REG_UDC_INCSR 0x12 /* EP1-2 IN CSR LSB 8/16bit */ ++#define JZ_REG_UDC_INCSRH 0x13 /* EP1-2 IN CSR MSB 8-bit */ ++#define JZ_REG_UDC_OUTMAXP 0x14 /* EP1 OUT Max Pkt Size 16-bit */ ++#define JZ_REG_UDC_OUTCSR 0x16 /* EP1 OUT CSR LSB 8/16bit */ ++#define JZ_REG_UDC_OUTCSRH 0x17 /* EP1 OUT CSR MSB 8-bit */ ++#define JZ_REG_UDC_OUTCOUNT 0x18 /* bytes in EP0/1 OUT FIFO 16-bit */ ++ ++#define JZ_REG_UDC_EP_FIFO(x) (4 * (x) + 0x20) ++ ++#define JZ_REG_UDC_EPINFO 0x78 /* Endpoint information */ ++#define JZ_REG_UDC_RAMINFO 0x79 /* RAM information */ ++ ++#define JZ_REG_UDC_INTR 0x200 /* DMA pending interrupts */ ++#define JZ_REG_UDC_CNTL1 0x204 /* DMA channel 1 control */ ++#define JZ_REG_UDC_ADDR1 0x208 /* DMA channel 1 AHB memory addr */ ++#define JZ_REG_UDC_COUNT1 0x20c /* DMA channel 1 byte count */ ++#define JZ_REG_UDC_CNTL2 0x214 /* DMA channel 2 control */ ++#define JZ_REG_UDC_ADDR2 0x218 /* DMA channel 2 AHB memory addr */ ++#define JZ_REG_UDC_COUNT2 0x21c /* DMA channel 2 byte count */ ++ ++/* Power register bit masks */ ++#define USB_POWER_SUSPENDM 0x01 ++#define USB_POWER_RESUME 0x04 ++#define USB_POWER_HSMODE 0x10 ++#define USB_POWER_HSENAB 0x20 ++#define USB_POWER_SOFTCONN 0x40 ++ ++/* Interrupt register bit masks */ ++#define USB_INTR_SUSPEND 0x01 ++#define USB_INTR_RESUME 0x02 ++#define USB_INTR_RESET 0x04 ++ ++#define USB_INTR_EP0 0x0001 ++#define USB_INTR_INEP1 0x0002 ++#define USB_INTR_INEP2 0x0004 ++#define USB_INTR_OUTEP1 0x0002 ++ ++/* CSR0 bit masks */ ++#define USB_CSR0_OUTPKTRDY 0x01 ++#define USB_CSR0_INPKTRDY 0x02 ++#define USB_CSR0_SENTSTALL 0x04 ++#define USB_CSR0_DATAEND 0x08 ++#define USB_CSR0_SETUPEND 0x10 ++#define USB_CSR0_SENDSTALL 0x20 ++#define USB_CSR0_SVDOUTPKTRDY 0x40 ++#define USB_CSR0_SVDSETUPEND 0x80 ++ ++/* Endpoint CSR register bits */ ++#define USB_INCSRH_AUTOSET 0x80 ++#define USB_INCSRH_ISO 0x40 ++#define USB_INCSRH_MODE 0x20 ++#define USB_INCSRH_DMAREQENAB 0x10 ++#define USB_INCSRH_DMAREQMODE 0x04 ++#define USB_INCSR_CDT 0x40 ++#define USB_INCSR_SENTSTALL 0x20 ++#define USB_INCSR_SENDSTALL 0x10 ++#define USB_INCSR_FF 0x08 ++#define USB_INCSR_UNDERRUN 0x04 ++#define USB_INCSR_FFNOTEMPT 0x02 ++#define USB_INCSR_INPKTRDY 0x01 ++#define USB_OUTCSRH_AUTOCLR 0x80 ++#define USB_OUTCSRH_ISO 0x40 ++#define USB_OUTCSRH_DMAREQENAB 0x20 ++#define USB_OUTCSRH_DNYT 0x10 ++#define USB_OUTCSRH_DMAREQMODE 0x08 ++#define USB_OUTCSR_CDT 0x80 ++#define USB_OUTCSR_SENTSTALL 0x40 ++#define USB_OUTCSR_SENDSTALL 0x20 ++#define USB_OUTCSR_FF 0x10 ++#define USB_OUTCSR_DATAERR 0x08 ++#define USB_OUTCSR_OVERRUN 0x04 ++#define USB_OUTCSR_FFFULL 0x02 ++#define USB_OUTCSR_OUTPKTRDY 0x01 ++ ++/* DMA control bits */ ++#define USB_CNTL_ENA 0x01 ++#define USB_CNTL_DIR_IN 0x02 ++#define USB_CNTL_MODE_1 0x04 ++#define USB_CNTL_INTR_EN 0x08 ++#define USB_CNTL_EP(n) ((n) << 4) ++#define USB_CNTL_BURST_0 (0 << 9) ++#define USB_CNTL_BURST_4 (1 << 9) ++#define USB_CNTL_BURST_8 (2 << 9) ++#define USB_CNTL_BURST_16 (3 << 9) ++ ++ ++#ifndef DEBUG ++# define DEBUG(fmt,args...) do {} while(0) ++#endif ++#ifndef DEBUG_EP0 ++# define NO_STATES ++# define DEBUG_EP0(fmt,args...) do {} while(0) ++#endif ++#ifndef DEBUG_SETUP ++# define DEBUG_SETUP(fmt,args...) do {} while(0) ++#endif ++ ++static unsigned int use_dma = 0; /* 1: use DMA, 0: use PIO */ ++ ++module_param(use_dma, int, 0); ++MODULE_PARM_DESC(use_dma, "DMA mode enable flag"); ++ ++static struct jz4740_udc jz4740_udc_controller; ++ ++/* ++ * Local declarations. ++ */ ++static void jz4740_ep0_kick(struct jz4740_udc *dev, struct jz4740_ep *ep); ++static void jz4740_handle_ep0(struct jz4740_udc *dev, uint32_t intr); ++ ++static void done(struct jz4740_ep *ep, struct jz4740_request *req, ++ int status); ++static void pio_irq_enable(struct jz4740_ep *ep); ++static void pio_irq_disable(struct jz4740_ep *ep); ++static void stop_activity(struct jz4740_udc *dev, ++ struct usb_gadget_driver *driver); ++static void nuke(struct jz4740_ep *ep, int status); ++static void flush(struct jz4740_ep *ep); ++static void udc_set_address(struct jz4740_udc *dev, unsigned char address); ++ ++/*-------------------------------------------------------------------------*/ ++ ++/* inline functions of register read/write/set/clear */ ++ ++static inline uint8_t usb_readb(struct jz4740_udc *udc, size_t reg) ++{ ++ return readb(udc->base + reg); ++} ++ ++static inline uint16_t usb_readw(struct jz4740_udc *udc, size_t reg) ++{ ++ return readw(udc->base + reg); ++} ++ ++static inline uint32_t usb_readl(struct jz4740_udc *udc, size_t reg) ++{ ++ return readl(udc->base + reg); ++} ++ ++static inline void usb_writeb(struct jz4740_udc *udc, size_t reg, uint8_t val) ++{ ++ writeb(val, udc->base + reg); ++} ++ ++static inline void usb_writew(struct jz4740_udc *udc, size_t reg, uint16_t val) ++{ ++ writew(val, udc->base + reg); ++} ++ ++static inline void usb_writel(struct jz4740_udc *udc, size_t reg, uint32_t val) ++{ ++ writel(val, udc->base + reg); ++} ++ ++static inline void usb_setb(struct jz4740_udc *udc, size_t reg, uint8_t mask) ++{ ++ usb_writeb(udc, reg, usb_readb(udc, reg) | mask); ++} ++ ++static inline void usb_setw(struct jz4740_udc *udc, size_t reg, uint8_t mask) ++{ ++ usb_writew(udc, reg, usb_readw(udc, reg) | mask); ++} ++ ++static inline void usb_clearb(struct jz4740_udc *udc, size_t reg, uint8_t mask) ++{ ++ usb_writeb(udc, reg, usb_readb(udc, reg) & ~mask); ++} ++ ++static inline void usb_clearw(struct jz4740_udc *udc, size_t reg, uint16_t mask) ++{ ++ usb_writew(udc, reg, usb_readw(udc, reg) & ~mask); ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++static inline void jz_udc_set_index(struct jz4740_udc *udc, uint8_t index) ++{ ++ usb_writeb(udc, JZ_REG_UDC_INDEX, index); ++} ++ ++static inline void jz_udc_select_ep(struct jz4740_ep *ep) ++{ ++ jz_udc_set_index(ep->dev, ep_index(ep)); ++} ++ ++static inline int write_packet(struct jz4740_ep *ep, ++ struct jz4740_request *req, unsigned int count) ++{ ++ uint8_t *buf; ++ unsigned int length, nlong, nbyte; ++ void __iomem *fifo = ep->dev->base + ep->fifo; ++ ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ buf = req->req.buf + req->req.actual; ++ prefetch(buf); ++ ++ length = req->req.length - req->req.actual; ++ if (length > count) ++ length = count; ++ req->req.actual += length; ++ ++ DEBUG("Write %d (count %d), fifo %x\n", length, count, ep->fifo); ++ ++ nlong = length >> 2; ++ nbyte = length & 0x3; ++ while (nlong--) { ++ writel(*((uint32_t *)buf), fifo); ++ buf += 4; ++ } ++ while (nbyte--) ++ writeb(*buf++, fifo); ++ ++ return length; ++} ++ ++static int read_packet(struct jz4740_ep *ep, ++ struct jz4740_request *req, unsigned int count) ++{ ++ uint8_t *buf; ++ unsigned int length, nlong, nbyte; ++ void __iomem *fifo = ep->dev->base + ep->fifo; ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ buf = req->req.buf + req->req.actual; ++ prefetchw(buf); ++ ++ length = req->req.length - req->req.actual; ++ if (length > count) ++ length = count; ++ req->req.actual += length; ++ ++ DEBUG("Read %d, fifo %x\n", length, ep->fifo); ++ nlong = length >> 2; ++ nbyte = length & 0x3; ++ while (nlong--) { ++ *((uint32_t *)buf) = readl(fifo); ++ buf += 4; ++ } ++ while (nbyte--) ++ *buf++ = readb(fifo); ++ ++ return length; ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++/* ++ * udc_disable - disable USB device controller ++ */ ++static void udc_disable(struct jz4740_udc *dev) ++{ ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ udc_set_address(dev, 0); ++ ++ /* Disable interrupts */ ++ usb_writew(dev, JZ_REG_UDC_INTRINE, 0); ++ usb_writew(dev, JZ_REG_UDC_INTROUTE, 0); ++ usb_writeb(dev, JZ_REG_UDC_INTRUSBE, 0); ++ ++ /* Disable DMA */ ++ usb_writel(dev, JZ_REG_UDC_CNTL1, 0); ++ usb_writel(dev, JZ_REG_UDC_CNTL2, 0); ++ ++ /* Disconnect from usb */ ++ usb_clearb(dev, JZ_REG_UDC_POWER, USB_POWER_SOFTCONN); ++ ++ /* Disable the USB PHY */ ++ clk_disable(dev->clk); ++ ++ dev->ep0state = WAIT_FOR_SETUP; ++ dev->gadget.speed = USB_SPEED_UNKNOWN; ++ ++ return; ++} ++ ++/* ++ * udc_reinit - initialize software state ++ */ ++static void udc_reinit(struct jz4740_udc *dev) ++{ ++ int i; ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ /* device/ep0 records init */ ++ INIT_LIST_HEAD(&dev->gadget.ep_list); ++ INIT_LIST_HEAD(&dev->gadget.ep0->ep_list); ++ dev->ep0state = WAIT_FOR_SETUP; ++ ++ for (i = 0; i < UDC_MAX_ENDPOINTS; i++) { ++ struct jz4740_ep *ep = &dev->ep[i]; ++ ++ if (i != 0) ++ list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list); ++ ++ INIT_LIST_HEAD(&ep->queue); ++ ep->desc = 0; ++ ep->stopped = 0; ++ } ++} ++ ++/* until it's enabled, this UDC should be completely invisible ++ * to any USB host. ++ */ ++static void udc_enable(struct jz4740_udc *dev) ++{ ++ int i; ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ /* UDC state is incorrect - Added by River */ ++ if (dev->state != UDC_STATE_ENABLE) { ++ return; ++ } ++ ++ dev->gadget.speed = USB_SPEED_UNKNOWN; ++ ++ /* Flush FIFO for each */ ++ for (i = 0; i < UDC_MAX_ENDPOINTS; i++) { ++ struct jz4740_ep *ep = &dev->ep[i]; ++ ++ jz_udc_set_index(dev, ep_index(ep)); ++ flush(ep); ++ } ++ ++ /* Set this bit to allow the UDC entering low-power mode when ++ * there are no actions on the USB bus. ++ * UDC still works during this bit was set. ++ */ ++ jz4740_clock_udc_enable_auto_suspend(); ++ ++ /* Enable the USB PHY */ ++ clk_enable(dev->clk); ++ ++ /* Disable interrupts */ ++/* usb_writew(dev, JZ_REG_UDC_INTRINE, 0); ++ usb_writew(dev, JZ_REG_UDC_INTROUTE, 0); ++ usb_writeb(dev, JZ_REG_UDC_INTRUSBE, 0);*/ ++ ++ /* Enable interrupts */ ++ usb_setw(dev, JZ_REG_UDC_INTRINE, USB_INTR_EP0); ++ usb_setb(dev, JZ_REG_UDC_INTRUSBE, USB_INTR_RESET); ++ /* Don't enable rest of the interrupts */ ++ /* usb_setw(dev, JZ_REG_UDC_INTRINE, USB_INTR_INEP1 | USB_INTR_INEP2); ++ usb_setw(dev, JZ_REG_UDC_INTROUTE, USB_INTR_OUTEP1); */ ++ ++ /* Enable SUSPEND */ ++ /* usb_setb(dev, JZ_REG_UDC_POWER, USB_POWER_SUSPENDM); */ ++ ++ /* Enable HS Mode */ ++ usb_setb(dev, JZ_REG_UDC_POWER, USB_POWER_HSENAB); ++ ++ /* Let host detect UDC: ++ * Software must write a 1 to the PMR:USB_POWER_SOFTCONN bit to turn this ++ * transistor on and pull the USBDP pin HIGH. ++ */ ++ usb_setb(dev, JZ_REG_UDC_POWER, USB_POWER_SOFTCONN); ++ ++ return; ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++/* keeping it simple: ++ * - one bus driver, initted first; ++ * - one function driver, initted second ++ */ ++ ++/* ++ * Register entry point for the peripheral controller driver. ++ */ ++ ++int usb_gadget_register_driver(struct usb_gadget_driver *driver) ++{ ++ struct jz4740_udc *dev = &jz4740_udc_controller; ++ int retval; ++ ++ if (!driver || !driver->bind) ++ return -EINVAL; ++ ++ if (!dev) ++ return -ENODEV; ++ ++ if (dev->driver) ++ return -EBUSY; ++ ++ /* hook up the driver */ ++ dev->driver = driver; ++ dev->gadget.dev.driver = &driver->driver; ++ ++ retval = driver->bind(&dev->gadget); ++ if (retval) { ++ DEBUG("%s: bind to driver %s --> error %d\n", dev->gadget.name, ++ driver->driver.name, retval); ++ dev->driver = 0; ++ return retval; ++ } ++ ++ /* then enable host detection and ep0; and we're ready ++ * for set_configuration as well as eventual disconnect. ++ */ ++ udc_enable(dev); ++ ++ DEBUG("%s: registered gadget driver '%s'\n", dev->gadget.name, ++ driver->driver.name); ++ ++ return 0; ++} ++EXPORT_SYMBOL(usb_gadget_register_driver); ++ ++static void stop_activity(struct jz4740_udc *dev, ++ struct usb_gadget_driver *driver) ++{ ++ int i; ++ ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ /* don't disconnect drivers more than once */ ++ if (dev->gadget.speed == USB_SPEED_UNKNOWN) ++ driver = 0; ++ dev->gadget.speed = USB_SPEED_UNKNOWN; ++ ++ /* prevent new request submissions, kill any outstanding requests */ ++ for (i = 0; i < UDC_MAX_ENDPOINTS; i++) { ++ struct jz4740_ep *ep = &dev->ep[i]; ++ ++ ep->stopped = 1; ++ ++ jz_udc_set_index(dev, ep_index(ep)); ++ nuke(ep, -ESHUTDOWN); ++ } ++ ++ /* report disconnect; the driver is already quiesced */ ++ if (driver) { ++ spin_unlock(&dev->lock); ++ driver->disconnect(&dev->gadget); ++ spin_lock(&dev->lock); ++ } ++ ++ /* re-init driver-visible data structures */ ++ udc_reinit(dev); ++} ++ ++ ++/* ++ * Unregister entry point for the peripheral controller driver. ++ */ ++int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) ++{ ++ struct jz4740_udc *dev = &jz4740_udc_controller; ++ unsigned long flags; ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ if (!dev) ++ return -ENODEV; ++ if (!driver || driver != dev->driver) ++ return -EINVAL; ++ if (!driver->unbind) ++ return -EBUSY; ++ ++ spin_lock_irqsave(&dev->lock, flags); ++ dev->driver = 0; ++ stop_activity(dev, driver); ++ spin_unlock_irqrestore(&dev->lock, flags); ++ ++ driver->unbind(&dev->gadget); ++ ++ udc_disable(dev); ++ ++ DEBUG("unregistered driver '%s'\n", driver->driver.name); ++ ++ return 0; ++} ++ ++EXPORT_SYMBOL(usb_gadget_unregister_driver); ++ ++/*-------------------------------------------------------------------------*/ ++ ++/* ++ * Starting DMA using mode 1 ++ */ ++static void kick_dma(struct jz4740_ep *ep, struct jz4740_request *req) ++{ ++ struct jz4740_udc *dev = ep->dev; ++ uint32_t count = req->req.length; ++ uint32_t physaddr = virt_to_phys((void *)req->req.buf); ++ ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ jz_udc_select_ep(ep); ++ ++ if (ep_is_in(ep)) { /* Bulk-IN transfer using DMA channel 1 */ ++ ep->reg_addr = JZ_REG_UDC_ADDR1; ++ ++ dma_cache_wback_inv((unsigned long)req->req.buf, count); ++ ++ pio_irq_enable(ep); ++ ++ usb_writeb(dev, JZ_REG_UDC_INCSRH, ++ USB_INCSRH_DMAREQENAB | USB_INCSRH_AUTOSET | USB_INCSRH_DMAREQMODE); ++ ++ usb_writel(dev, JZ_REG_UDC_ADDR1, physaddr); ++ usb_writel(dev, JZ_REG_UDC_COUNT1, count); ++ usb_writel(dev, JZ_REG_UDC_CNTL1, USB_CNTL_ENA | USB_CNTL_DIR_IN | USB_CNTL_MODE_1 | ++ USB_CNTL_INTR_EN | USB_CNTL_BURST_16 | USB_CNTL_EP(ep_index(ep))); ++ } ++ else { /* Bulk-OUT transfer using DMA channel 2 */ ++ ep->reg_addr = JZ_REG_UDC_ADDR2; ++ ++ dma_cache_wback_inv((unsigned long)req->req.buf, count); ++ ++ pio_irq_enable(ep); ++ ++ usb_setb(dev, JZ_REG_UDC_OUTCSRH, ++ USB_OUTCSRH_DMAREQENAB | USB_OUTCSRH_AUTOCLR | USB_OUTCSRH_DMAREQMODE); ++ ++ usb_writel(dev, JZ_REG_UDC_ADDR2, physaddr); ++ usb_writel(dev, JZ_REG_UDC_COUNT2, count); ++ usb_writel(dev, JZ_REG_UDC_CNTL2, USB_CNTL_ENA | USB_CNTL_MODE_1 | ++ USB_CNTL_INTR_EN | USB_CNTL_BURST_16 | USB_CNTL_EP(ep_index(ep))); ++ } ++} ++ ++/*-------------------------------------------------------------------------*/ ++ ++/** Write request to FIFO (max write == maxp size) ++ * Return: 0 = still running, 1 = completed, negative = errno ++ * NOTE: INDEX register must be set for EP ++ */ ++static int write_fifo(struct jz4740_ep *ep, struct jz4740_request *req) ++{ ++ struct jz4740_udc *dev = ep->dev; ++ uint32_t max, csr; ++ uint32_t physaddr = virt_to_phys((void *)req->req.buf); ++ ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ max = le16_to_cpu(ep->desc->wMaxPacketSize); ++ ++ if (use_dma) { ++ uint32_t dma_count; ++ ++ /* DMA interrupt generated due to the last packet loaded into the FIFO */ ++ ++ dma_count = usb_readl(dev, ep->reg_addr) - physaddr; ++ req->req.actual += dma_count; ++ ++ if (dma_count % max) { ++ /* If the last packet is less than MAXP, set INPKTRDY manually */ ++ usb_setb(dev, ep->csr, USB_INCSR_INPKTRDY); ++ } ++ ++ done(ep, req, 0); ++ if (list_empty(&ep->queue)) { ++ pio_irq_disable(ep); ++ return 1; ++ } ++ else { ++ /* advance the request queue */ ++ req = list_entry(ep->queue.next, struct jz4740_request, queue); ++ kick_dma(ep, req); ++ return 0; ++ } ++ } ++ ++ /* ++ * PIO mode handling starts here ... ++ */ ++ ++ csr = usb_readb(dev, ep->csr); ++ ++ if (!(csr & USB_INCSR_FFNOTEMPT)) { ++ unsigned count; ++ int is_last, is_short; ++ ++ count = write_packet(ep, req, max); ++ usb_setb(dev, ep->csr, USB_INCSR_INPKTRDY); ++ ++ /* last packet is usually short (or a zlp) */ ++ if (unlikely(count != max)) ++ is_last = is_short = 1; ++ else { ++ if (likely(req->req.length != req->req.actual) ++ || req->req.zero) ++ is_last = 0; ++ else ++ is_last = 1; ++ /* interrupt/iso maxpacket may not fill the fifo */ ++ is_short = unlikely(max < ep_maxpacket(ep)); ++ } ++ ++ DEBUG("%s: wrote %s %d bytes%s%s %d left %p\n", __FUNCTION__, ++ ep->ep.name, count, ++ is_last ? "/L" : "", is_short ? "/S" : "", ++ req->req.length - req->req.actual, req); ++ ++ /* requests complete when all IN data is in the FIFO */ ++ if (is_last) { ++ done(ep, req, 0); ++ if (list_empty(&ep->queue)) { ++ pio_irq_disable(ep); ++ } ++ return 1; ++ } ++ } else { ++ DEBUG("Hmm.. %d ep FIFO is not empty!\n", ep_index(ep)); ++ } ++ ++ return 0; ++} ++ ++/** Read to request from FIFO (max read == bytes in fifo) ++ * Return: 0 = still running, 1 = completed, negative = errno ++ * NOTE: INDEX register must be set for EP ++ */ ++static int read_fifo(struct jz4740_ep *ep, struct jz4740_request *req) ++{ ++ struct jz4740_udc *dev = ep->dev; ++ uint32_t csr; ++ unsigned count, is_short; ++ ++#if 0 ++ uint32_t physaddr = virt_to_phys((void *)req->req.buf); ++ ++ if (use_dma) { ++ uint32_t dma_count; ++ ++ /* DMA interrupt generated due to a packet less than MAXP loaded into the FIFO */ ++ ++ dma_count = usb_readl(dev, ep->reg_addr) - physaddr; ++ req->req.actual += dma_count; ++ ++ /* Disable interrupt and DMA */ ++ pio_irq_disable(ep); ++ usb_writel(dev, JZ_REG_UDC_CNTL2, 0); ++ ++ /* Read all bytes from this packet */ ++ count = usb_readw(dev, JZ_REG_UDC_OUTCOUNT); ++ count = read_packet(ep, req, count); ++ ++ if (count) { ++ /* If the last packet is greater than zero, clear OUTPKTRDY manually */ ++ usb_clearb(dev, ep->csr, USB_OUTCSR_OUTPKTRDY); ++ } ++ done(ep, req, 0); ++ ++ if (!list_empty(&ep->queue)) { ++ /* advance the request queue */ ++ req = list_entry(ep->queue.next, struct jz4740_request, queue); ++ kick_dma(ep, req); ++ } ++ ++ return 1; ++ } ++#endif ++ /* ++ * PIO mode handling starts here ... ++ */ ++ ++ /* make sure there's a packet in the FIFO. */ ++ csr = usb_readb(dev, ep->csr); ++ if (!(csr & USB_OUTCSR_OUTPKTRDY)) { ++ DEBUG("%s: Packet NOT ready!\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ /* read all bytes from this packet */ ++ count = usb_readw(dev, JZ_REG_UDC_OUTCOUNT); ++ ++ is_short = (count < ep->ep.maxpacket); ++ ++ count = read_packet(ep, req, count); ++ ++ DEBUG("read %s %02x, %d bytes%s req %p %d/%d\n", ++ ep->ep.name, csr, count, ++ is_short ? "/S" : "", req, req->req.actual, req->req.length); ++ ++ /* Clear OutPktRdy */ ++ usb_clearb(dev, ep->csr, USB_OUTCSR_OUTPKTRDY); ++ ++ /* completion */ ++ if (is_short || req->req.actual == req->req.length) { ++ done(ep, req, 0); ++ ++ if (list_empty(&ep->queue)) ++ pio_irq_disable(ep); ++ return 1; ++ } ++ ++ /* finished that packet. the next one may be waiting... */ ++ return 0; ++} ++ ++/* ++ * done - retire a request; caller blocked irqs ++ * INDEX register is preserved to keep same ++ */ ++static void done(struct jz4740_ep *ep, struct jz4740_request *req, int status) ++{ ++ unsigned int stopped = ep->stopped; ++ uint32_t index; ++ ++ DEBUG("%s, %p\n", __FUNCTION__, ep); ++ list_del_init(&req->queue); ++ ++ if (likely(req->req.status == -EINPROGRESS)) ++ req->req.status = status; ++ else ++ status = req->req.status; ++ ++ if (status && status != -ESHUTDOWN) ++ DEBUG("complete %s req %p stat %d len %u/%u\n", ++ ep->ep.name, &req->req, status, ++ req->req.actual, req->req.length); ++ ++ /* don't modify queue heads during completion callback */ ++ ep->stopped = 1; ++ /* Read current index (completion may modify it) */ ++ index = usb_readb(ep->dev, JZ_REG_UDC_INDEX); ++ spin_unlock_irqrestore(&ep->dev->lock, ep->dev->lock_flags); ++ ++ req->req.complete(&ep->ep, &req->req); ++ ++ spin_lock_irqsave(&ep->dev->lock, ep->dev->lock_flags); ++ /* Restore index */ ++ jz_udc_set_index(ep->dev, index); ++ ep->stopped = stopped; ++} ++ ++/** Enable EP interrupt */ ++static void pio_irq_enable(struct jz4740_ep *ep) ++{ ++ uint8_t index = ep_index(ep); ++ struct jz4740_udc *dev = ep->dev; ++ DEBUG("%s: EP%d %s\n", __FUNCTION__, ep_index(ep), ep_is_in(ep) ? "IN": "OUT"); ++ ++ if (ep_is_in(ep)) { ++ switch (index) { ++ case 1: ++ case 2: ++ usb_setw(dev, JZ_REG_UDC_INTRINE, BIT(index)); ++ break; ++ default: ++ DEBUG("Unknown endpoint: %d\n", index); ++ break; ++ } ++ } ++ else { ++ switch (index) { ++ case 1: ++ usb_setw(dev, JZ_REG_UDC_INTROUTE, BIT(index)); ++ break; ++ default: ++ DEBUG("Unknown endpoint: %d\n", index); ++ break; ++ } ++ } ++} ++ ++/** Disable EP interrupt */ ++static void pio_irq_disable(struct jz4740_ep *ep) ++{ ++ uint8_t index = ep_index(ep); ++ ++ DEBUG("%s: EP%d %s\n", __FUNCTION__, ep_index(ep), ep_is_in(ep) ? "IN": "OUT"); ++ ++ if (ep_is_in(ep)) { ++ switch (ep_index(ep)) { ++ case 1: ++ case 2: ++ usb_clearw(ep->dev, JZ_REG_UDC_INTRINE, BIT(index)); ++ break; ++ default: ++ DEBUG("Unknown endpoint: %d\n", index); ++ break; ++ } ++ } ++ else { ++ switch (ep_index(ep)) { ++ case 1: ++ usb_clearw(ep->dev, JZ_REG_UDC_INTROUTE, BIT(index)); ++ break; ++ default: ++ DEBUG("Unknown endpoint: %d\n", index); ++ break; ++ } ++ } ++} ++ ++/* ++ * nuke - dequeue ALL requests ++ */ ++static void nuke(struct jz4740_ep *ep, int status) ++{ ++ struct jz4740_request *req; ++ ++ DEBUG("%s, %p\n", __FUNCTION__, ep); ++ ++ /* Flush FIFO */ ++ flush(ep); ++ ++ /* called with irqs blocked */ ++ while (!list_empty(&ep->queue)) { ++ req = list_entry(ep->queue.next, struct jz4740_request, queue); ++ done(ep, req, status); ++ } ++ ++ /* Disable IRQ if EP is enabled (has descriptor) */ ++ if (ep->desc) ++ pio_irq_disable(ep); ++} ++ ++/** Flush EP FIFO ++ * NOTE: INDEX register must be set before this call ++ */ ++static void flush(struct jz4740_ep *ep) ++{ ++ DEBUG("%s: %s\n", __FUNCTION__, ep->ep.name); ++ ++ switch (ep->type) { ++ case ep_bulk_in: ++ case ep_interrupt: ++ usb_setb(ep->dev, ep->csr, USB_INCSR_FF); ++ break; ++ case ep_bulk_out: ++ usb_setb(ep->dev, ep->csr, USB_OUTCSR_FF); ++ break; ++ case ep_control: ++ break; ++ } ++} ++ ++/** ++ * jz4740_in_epn - handle IN interrupt ++ */ ++static void jz4740_in_epn(struct jz4740_udc *dev, uint32_t ep_idx, uint32_t intr) ++{ ++ uint32_t csr; ++ struct jz4740_ep *ep = &dev->ep[ep_idx + 1]; ++ struct jz4740_request *req; ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ jz_udc_set_index(dev, ep_index(ep)); ++ ++ csr = usb_readb(dev, ep->csr); ++ DEBUG("%s: %d, csr %x\n", __FUNCTION__, ep_idx, csr); ++ ++ if (csr & USB_INCSR_SENTSTALL) { ++ DEBUG("USB_INCSR_SENTSTALL\n"); ++ usb_clearb(dev, ep->csr, USB_INCSR_SENTSTALL); ++ return; ++ } ++ ++ if (!ep->desc) { ++ DEBUG("%s: NO EP DESC\n", __FUNCTION__); ++ return; ++ } ++ ++ if (!list_empty(&ep->queue)) { ++ req = list_first_entry(&ep->queue, struct jz4740_request, queue); ++ write_fifo(ep, req); ++ } ++} ++ ++/* ++ * Bulk OUT (recv) ++ */ ++static void jz4740_out_epn(struct jz4740_udc *dev, uint32_t ep_idx, uint32_t intr) ++{ ++ struct jz4740_ep *ep = &dev->ep[ep_idx]; ++ struct jz4740_request *req; ++ ++ DEBUG("%s: %d\n", __FUNCTION__, ep_idx); ++ ++ jz_udc_select_ep(ep); ++ if (ep->desc) { ++ uint32_t csr; ++ ++ if (use_dma) { ++ /* DMA starts here ... */ ++ if (!list_empty(&ep->queue)) { ++ req = list_first_entry(&ep->queue, struct jz4740_request, queue); ++ read_fifo(ep, req); ++ } ++ return; ++ } ++ ++ /* ++ * PIO mode starts here ... ++ */ ++ ++ while ((csr = usb_readb(dev, ep->csr)) & ++ (USB_OUTCSR_OUTPKTRDY | USB_OUTCSR_SENTSTALL)) { ++ DEBUG("%s: %x\n", __FUNCTION__, csr); ++ ++ if (csr & USB_OUTCSR_SENTSTALL) { ++ DEBUG("%s: stall sent, flush fifo\n", ++ __FUNCTION__); ++ /* usb_set(USB_OUT_CSR1_FIFO_FLUSH, ep->csr1); */ ++ flush(ep); ++ } else if (csr & USB_OUTCSR_OUTPKTRDY) { ++ if (list_empty(&ep->queue)) ++ req = 0; ++ else ++ req = ++ list_entry(ep->queue.next, ++ struct jz4740_request, ++ queue); ++ ++ if (!req) { ++ DEBUG("%s: NULL REQ %d\n", ++ __FUNCTION__, ep_idx); ++ break; ++ } else { ++ read_fifo(ep, req); ++ } ++ } ++ } ++ } else { ++ /* Throw packet away.. */ ++ DEBUG("%s: ep %p ep_indx %d No descriptor?!?\n", __FUNCTION__, ep, ep_idx); ++ flush(ep); ++ } ++} ++ ++/** Halt specific EP ++ * Return 0 if success ++ * NOTE: Sets INDEX register to EP ! ++ */ ++static int jz4740_set_halt(struct usb_ep *_ep, int value) ++{ ++ struct jz4740_udc *dev; ++ struct jz4740_ep *ep; ++ unsigned long flags; ++ ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ ep = container_of(_ep, struct jz4740_ep, ep); ++ if (unlikely(!_ep || (!ep->desc && ep->type != ep_control))) { ++ DEBUG("%s, bad ep\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ dev = ep->dev; ++ ++ spin_lock_irqsave(&dev->lock, flags); ++ ++ jz_udc_select_ep(ep); ++ ++ DEBUG("%s, ep %d, val %d\n", __FUNCTION__, ep_index(ep), value); ++ ++ if (ep_index(ep) == 0) { ++ /* EP0 */ ++ usb_setb(dev, JZ_REG_UDC_CSR0, USB_CSR0_SENDSTALL); ++ } else if (ep_is_in(ep)) { ++ uint32_t csr = usb_readb(dev, ep->csr); ++ if (value && ((csr & USB_INCSR_FFNOTEMPT) ++ || !list_empty(&ep->queue))) { ++ /* ++ * Attempts to halt IN endpoints will fail (returning -EAGAIN) ++ * if any transfer requests are still queued, or if the controller ++ * FIFO still holds bytes that the host hasnÂ’t collected. ++ */ ++ spin_unlock_irqrestore(&dev->lock, flags); ++ DEBUG ++ ("Attempt to halt IN endpoint failed (returning -EAGAIN) %d %d\n", ++ (csr & USB_INCSR_FFNOTEMPT), ++ !list_empty(&ep->queue)); ++ return -EAGAIN; ++ } ++ flush(ep); ++ if (value) { ++ usb_setb(dev, ep->csr, USB_INCSR_SENDSTALL); ++ } else { ++ usb_clearb(dev, ep->csr, USB_INCSR_SENDSTALL); ++ usb_setb(dev, ep->csr, USB_INCSR_CDT); ++ } ++ } else { ++ ++ flush(ep); ++ if (value) { ++ usb_setb(dev, ep->csr, USB_OUTCSR_SENDSTALL); ++ } else { ++ usb_clearb(dev, ep->csr, USB_OUTCSR_SENDSTALL); ++ usb_setb(dev, ep->csr, USB_OUTCSR_CDT); ++ } ++ } ++ ++ ep->stopped = value; ++ ++ spin_unlock_irqrestore(&dev->lock, flags); ++ ++ DEBUG("%s %s halted\n", _ep->name, value == 0 ? "NOT" : "IS"); ++ ++ return 0; ++} ++ ++ ++static int jz4740_ep_enable(struct usb_ep *_ep, ++ const struct usb_endpoint_descriptor *desc) ++{ ++ struct jz4740_ep *ep; ++ struct jz4740_udc *dev; ++ unsigned long flags; ++ uint32_t max, csrh = 0; ++ ++ DEBUG("%s: trying to enable %s\n", __FUNCTION__, _ep->name); ++ ++ if (!_ep || !desc) ++ return -EINVAL; ++ ++ ep = container_of(_ep, struct jz4740_ep, ep); ++ if (ep->desc || ep->type == ep_control ++ || desc->bDescriptorType != USB_DT_ENDPOINT ++ || ep->bEndpointAddress != desc->bEndpointAddress) { ++ DEBUG("%s, bad ep or descriptor\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ /* xfer types must match, except that interrupt ~= bulk */ ++ if (ep->bmAttributes != desc->bmAttributes ++ && ep->bmAttributes != USB_ENDPOINT_XFER_BULK ++ && desc->bmAttributes != USB_ENDPOINT_XFER_INT) { ++ DEBUG("%s, %s type mismatch\n", __FUNCTION__, _ep->name); ++ return -EINVAL; ++ } ++ ++ dev = ep->dev; ++ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) { ++ DEBUG("%s, bogus device state\n", __FUNCTION__); ++ return -ESHUTDOWN; ++ } ++ ++ max = le16_to_cpu(desc->wMaxPacketSize); ++ ++ spin_lock_irqsave(&ep->dev->lock, flags); ++ ++ /* Configure the endpoint */ ++ jz_udc_select_ep(ep); ++ if (ep_is_in(ep)) { ++ usb_writew(dev, JZ_REG_UDC_INMAXP, max); ++ switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { ++ case USB_ENDPOINT_XFER_BULK: ++ case USB_ENDPOINT_XFER_INT: ++ csrh &= ~USB_INCSRH_ISO; ++ break; ++ case USB_ENDPOINT_XFER_ISOC: ++ csrh |= USB_INCSRH_ISO; ++ break; ++ } ++ usb_writeb(dev, JZ_REG_UDC_INCSRH, csrh); ++ } ++ else { ++ usb_writew(dev, JZ_REG_UDC_OUTMAXP, max); ++ switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) { ++ case USB_ENDPOINT_XFER_BULK: ++ csrh &= ~USB_OUTCSRH_ISO; ++ break; ++ case USB_ENDPOINT_XFER_INT: ++ csrh &= ~USB_OUTCSRH_ISO; ++ csrh |= USB_OUTCSRH_DNYT; ++ break; ++ case USB_ENDPOINT_XFER_ISOC: ++ csrh |= USB_OUTCSRH_ISO; ++ break; ++ } ++ usb_writeb(dev, JZ_REG_UDC_OUTCSRH, csrh); ++ } ++ ++ ++ ep->stopped = 0; ++ ep->desc = desc; ++ ep->ep.maxpacket = max; ++ ++ spin_unlock_irqrestore(&ep->dev->lock, flags); ++ ++ /* Reset halt state (does flush) */ ++ jz4740_set_halt(_ep, 0); ++ ++ DEBUG("%s: enabled %s\n", __FUNCTION__, _ep->name); ++ ++ return 0; ++} ++ ++/** Disable EP ++ * NOTE: Sets INDEX register ++ */ ++static int jz4740_ep_disable(struct usb_ep *_ep) ++{ ++ struct jz4740_ep *ep; ++ unsigned long flags; ++ ++ DEBUG("%s, %p\n", __FUNCTION__, _ep); ++ ++ ep = container_of(_ep, struct jz4740_ep, ep); ++ if (!_ep || !ep->desc) { ++ DEBUG("%s, %s not enabled\n", __FUNCTION__, ++ _ep ? ep->ep.name : NULL); ++ return -EINVAL; ++ } ++ ++ spin_lock_irqsave(&ep->dev->lock, flags); ++ ++ jz_udc_select_ep(ep); ++ ++ /* Nuke all pending requests (does flush) */ ++ nuke(ep, -ESHUTDOWN); ++ ++ /* Disable ep IRQ */ ++ pio_irq_disable(ep); ++ ++ ep->desc = 0; ++ ep->stopped = 1; ++ ++ spin_unlock_irqrestore(&ep->dev->lock, flags); ++ ++ DEBUG("%s: disabled %s\n", __FUNCTION__, _ep->name); ++ return 0; ++} ++ ++static struct usb_request *jz4740_alloc_request(struct usb_ep *ep, gfp_t gfp_flags) ++{ ++ struct jz4740_request *req; ++ ++ req = kzalloc(sizeof(*req), gfp_flags); ++ if (!req) ++ return NULL; ++ ++ INIT_LIST_HEAD(&req->queue); ++ ++ return &req->req; ++} ++ ++static void jz4740_free_request(struct usb_ep *ep, struct usb_request *_req) ++{ ++ struct jz4740_request *req; ++ ++ DEBUG("%s, %p\n", __FUNCTION__, ep); ++ ++ req = container_of(_req, struct jz4740_request, req); ++ WARN_ON(!list_empty(&req->queue)); ++ kfree(req); ++} ++ ++/*--------------------------------------------------------------------*/ ++ ++/** Queue one request ++ * Kickstart transfer if needed ++ * NOTE: Sets INDEX register ++ */ ++static int jz4740_queue(struct usb_ep *_ep, struct usb_request *_req, ++ gfp_t gfp_flags) ++{ ++ struct jz4740_request *req; ++ struct jz4740_ep *ep; ++ struct jz4740_udc *dev; ++ ++ DEBUG("%s, %p\n", __FUNCTION__, _ep); ++ ++ req = container_of(_req, struct jz4740_request, req); ++ if (unlikely ++ (!_req || !_req->complete || !_req->buf ++ || !list_empty(&req->queue))) { ++ DEBUG("%s, bad params\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ ep = container_of(_ep, struct jz4740_ep, ep); ++ if (unlikely(!_ep || (!ep->desc && ep->type != ep_control))) { ++ DEBUG("%s, bad ep\n", __FUNCTION__); ++ return -EINVAL; ++ } ++ ++ dev = ep->dev; ++ if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)) { ++ DEBUG("%s, bogus device state %p\n", __FUNCTION__, dev->driver); ++ return -ESHUTDOWN; ++ } ++ ++ DEBUG("%s queue req %p, len %d buf %p\n", _ep->name, _req, _req->length, ++ _req->buf); ++ ++ spin_lock_irqsave(&dev->lock, dev->lock_flags); ++ ++ _req->status = -EINPROGRESS; ++ _req->actual = 0; ++ ++ /* kickstart this i/o queue? */ ++ DEBUG("Add to %d Q %d %d\n", ep_index(ep), list_empty(&ep->queue), ++ ep->stopped); ++ if (list_empty(&ep->queue) && likely(!ep->stopped)) { ++ uint32_t csr; ++ ++ if (unlikely(ep_index(ep) == 0)) { ++ /* EP0 */ ++ list_add_tail(&req->queue, &ep->queue); ++ jz4740_ep0_kick(dev, ep); ++ req = 0; ++ } else if (use_dma) { ++ /* DMA */ ++ kick_dma(ep, req); ++ } ++ /* PIO */ ++ else if (ep_is_in(ep)) { ++ /* EP1 & EP2 */ ++ jz_udc_select_ep(ep); ++ csr = usb_readb(dev, ep->csr); ++ pio_irq_enable(ep); ++ if (!(csr & USB_INCSR_FFNOTEMPT)) { ++ if (write_fifo(ep, req) == 1) ++ req = 0; ++ } ++ } else { ++ /* EP1 */ ++ jz_udc_select_ep(ep); ++ csr = usb_readb(dev, ep->csr); ++ pio_irq_enable(ep); ++ if (csr & USB_OUTCSR_OUTPKTRDY) { ++ if (read_fifo(ep, req) == 1) ++ req = 0; ++ } ++ } ++ } ++ ++ /* pio or dma irq handler advances the queue. */ ++ if (likely(req != 0)) ++ list_add_tail(&req->queue, &ep->queue); ++ ++ spin_unlock_irqrestore(&dev->lock, dev->lock_flags); ++ ++ return 0; ++} ++ ++/* dequeue JUST ONE request */ ++static int jz4740_dequeue(struct usb_ep *_ep, struct usb_request *_req) ++{ ++ struct jz4740_ep *ep; ++ struct jz4740_request *req; ++ unsigned long flags; ++ ++ DEBUG("%s, %p\n", __FUNCTION__, _ep); ++ ++ ep = container_of(_ep, struct jz4740_ep, ep); ++ if (!_ep || ep->type == ep_control) ++ return -EINVAL; ++ ++ spin_lock_irqsave(&ep->dev->lock, flags); ++ ++ /* make sure it's actually queued on this endpoint */ ++ list_for_each_entry(req, &ep->queue, queue) { ++ if (&req->req == _req) ++ break; ++ } ++ if (&req->req != _req) { ++ spin_unlock_irqrestore(&ep->dev->lock, flags); ++ return -EINVAL; ++ } ++ done(ep, req, -ECONNRESET); ++ ++ spin_unlock_irqrestore(&ep->dev->lock, flags); ++ return 0; ++} ++ ++/** Return bytes in EP FIFO ++ * NOTE: Sets INDEX register to EP ++ */ ++static int jz4740_fifo_status(struct usb_ep *_ep) ++{ ++ uint32_t csr; ++ int count = 0; ++ struct jz4740_ep *ep; ++ unsigned long flags; ++ ++ ep = container_of(_ep, struct jz4740_ep, ep); ++ if (!_ep) { ++ DEBUG("%s, bad ep\n", __FUNCTION__); ++ return -ENODEV; ++ } ++ ++ DEBUG("%s, %d\n", __FUNCTION__, ep_index(ep)); ++ ++ /* LPD can't report unclaimed bytes from IN fifos */ ++ if (ep_is_in(ep)) ++ return -EOPNOTSUPP; ++ ++ spin_lock_irqsave(&ep->dev->lock, flags); ++ jz_udc_select_ep(ep); ++ ++ csr = usb_readb(ep->dev, ep->csr); ++ if (ep->dev->gadget.speed != USB_SPEED_UNKNOWN || ++ csr & 0x1) { ++ count = usb_readw(ep->dev, JZ_REG_UDC_OUTCOUNT); ++ } ++ ++ spin_unlock_irqrestore(&ep->dev->lock, flags); ++ ++ return count; ++} ++ ++/** Flush EP FIFO ++ * NOTE: Sets INDEX register to EP ++ */ ++static void jz4740_fifo_flush(struct usb_ep *_ep) ++{ ++ struct jz4740_ep *ep; ++ unsigned long flags; ++ ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ ep = container_of(_ep, struct jz4740_ep, ep); ++ if (unlikely(!_ep || (!ep->desc && ep->type == ep_control))) { ++ DEBUG("%s, bad ep\n", __FUNCTION__); ++ return; ++ } ++ ++ spin_lock_irqsave(&ep->dev->lock, flags); ++ ++ jz_udc_select_ep(ep); ++ flush(ep); ++ ++ spin_unlock_irqrestore(&ep->dev->lock, flags); ++} ++ ++/****************************************************************/ ++/* End Point 0 related functions */ ++/****************************************************************/ ++ ++/* return: 0 = still running, 1 = completed, negative = errno */ ++static int write_fifo_ep0(struct jz4740_ep *ep, struct jz4740_request *req) ++{ ++ uint32_t max; ++ unsigned count; ++ int is_last; ++ ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ max = ep_maxpacket(ep); ++ ++ count = write_packet(ep, req, max); ++ ++ /* last packet is usually short (or a zlp) */ ++ if (unlikely(count != max)) ++ is_last = 1; ++ else { ++ if (likely(req->req.length != req->req.actual) || req->req.zero) ++ is_last = 0; ++ else ++ is_last = 1; ++ } ++ ++ DEBUG_EP0("%s: wrote %s %d bytes%s %d left %p\n", __FUNCTION__, ++ ep->ep.name, count, ++ is_last ? "/L" : "", req->req.length - req->req.actual, req); ++ ++ /* requests complete when all IN data is in the FIFO */ ++ if (is_last) { ++ done(ep, req, 0); ++ return 1; ++ } ++ ++ return 0; ++} ++ ++static inline int jz4740_fifo_read(struct jz4740_ep *ep, ++ unsigned char *cp, int max) ++{ ++ int bytes; ++ int count = usb_readw(ep->dev, JZ_REG_UDC_OUTCOUNT); ++ ++ if (count > max) ++ count = max; ++ bytes = count; ++ while (count--) ++ *cp++ = usb_readb(ep->dev, ep->fifo); ++ ++ return bytes; ++} ++ ++static inline void jz4740_fifo_write(struct jz4740_ep *ep, ++ unsigned char *cp, int count) ++{ ++ DEBUG("fifo_write: %d %d\n", ep_index(ep), count); ++ while (count--) ++ usb_writeb(ep->dev, ep->fifo, *cp++); ++} ++ ++static int read_fifo_ep0(struct jz4740_ep *ep, struct jz4740_request *req) ++{ ++ struct jz4740_udc *dev = ep->dev; ++ uint32_t csr; ++ uint8_t *buf; ++ unsigned bufferspace, count, is_short; ++ ++ DEBUG_EP0("%s\n", __FUNCTION__); ++ ++ csr = usb_readb(dev, JZ_REG_UDC_CSR0); ++ if (!(csr & USB_CSR0_OUTPKTRDY)) ++ return 0; ++ ++ buf = req->req.buf + req->req.actual; ++ prefetchw(buf); ++ bufferspace = req->req.length - req->req.actual; ++ ++ /* read all bytes from this packet */ ++ if (likely(csr & USB_CSR0_OUTPKTRDY)) { ++ count = usb_readw(dev, JZ_REG_UDC_OUTCOUNT); ++ req->req.actual += min(count, bufferspace); ++ } else /* zlp */ ++ count = 0; ++ ++ is_short = (count < ep->ep.maxpacket); ++ DEBUG_EP0("read %s %02x, %d bytes%s req %p %d/%d\n", ++ ep->ep.name, csr, count, ++ is_short ? "/S" : "", req, req->req.actual, req->req.length); ++ ++ while (likely(count-- != 0)) { ++ uint8_t byte = (uint8_t)usb_readl(dev, ep->fifo); ++ ++ if (unlikely(bufferspace == 0)) { ++ /* this happens when the driver's buffer ++ * is smaller than what the host sent. ++ * discard the extra data. ++ */ ++ if (req->req.status != -EOVERFLOW) ++ DEBUG_EP0("%s overflow %d\n", ep->ep.name, ++ count); ++ req->req.status = -EOVERFLOW; ++ } else { ++ *buf++ = byte; ++ bufferspace--; ++ } ++ } ++ ++ /* completion */ ++ if (is_short || req->req.actual == req->req.length) { ++ done(ep, req, 0); ++ return 1; ++ } ++ ++ /* finished that packet. the next one may be waiting... */ ++ return 0; ++} ++ ++/** ++ * udc_set_address - set the USB address for this device ++ * @address: ++ * ++ * Called from control endpoint function after it decodes a set address setup packet. ++ */ ++static void udc_set_address(struct jz4740_udc *dev, unsigned char address) ++{ ++ DEBUG_EP0("%s: %d\n", __FUNCTION__, address); ++ ++ usb_writeb(dev, JZ_REG_UDC_FADDR, address); ++} ++ ++/* ++ * DATA_STATE_RECV (USB_CSR0_OUTPKTRDY) ++ * - if error ++ * set USB_CSR0_SVDOUTPKTRDY | USB_CSR0_DATAEND | USB_CSR0_SENDSTALL bits ++ * - else ++ * set USB_CSR0_SVDOUTPKTRDY bit ++ if last set USB_CSR0_DATAEND bit ++ */ ++static void jz4740_ep0_out(struct jz4740_udc *dev, uint32_t csr, int kickstart) ++{ ++ struct jz4740_request *req; ++ struct jz4740_ep *ep = &dev->ep[0]; ++ int ret; ++ ++ DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); ++ ++ if (list_empty(&ep->queue)) ++ req = 0; ++ else ++ req = list_entry(ep->queue.next, struct jz4740_request, queue); ++ ++ if (req) { ++ if (req->req.length == 0) { ++ DEBUG_EP0("ZERO LENGTH OUT!\n"); ++ usb_setb(dev, JZ_REG_UDC_CSR0, (USB_CSR0_SVDOUTPKTRDY | USB_CSR0_DATAEND)); ++ dev->ep0state = WAIT_FOR_SETUP; ++ return; ++ } else if (kickstart) { ++ usb_setb(dev, JZ_REG_UDC_CSR0, (USB_CSR0_SVDOUTPKTRDY)); ++ return; ++ } ++ ret = read_fifo_ep0(ep, req); ++ if (ret) { ++ /* Done! */ ++ DEBUG_EP0("%s: finished, waiting for status\n", ++ __FUNCTION__); ++ usb_setb(dev, JZ_REG_UDC_CSR0, (USB_CSR0_SVDOUTPKTRDY | USB_CSR0_DATAEND)); ++ dev->ep0state = WAIT_FOR_SETUP; ++ } else { ++ /* Not done yet.. */ ++ DEBUG_EP0("%s: not finished\n", __FUNCTION__); ++ usb_setb(dev, JZ_REG_UDC_CSR0, USB_CSR0_SVDOUTPKTRDY); ++ } ++ } else { ++ DEBUG_EP0("NO REQ??!\n"); ++ } ++} ++ ++/* ++ * DATA_STATE_XMIT ++ */ ++static int jz4740_ep0_in(struct jz4740_udc *dev, uint32_t csr) ++{ ++ struct jz4740_request *req; ++ struct jz4740_ep *ep = &dev->ep[0]; ++ int ret, need_zlp = 0; ++ ++ DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); ++ ++ if (list_empty(&ep->queue)) ++ req = 0; ++ else ++ req = list_entry(ep->queue.next, struct jz4740_request, queue); ++ ++ if (!req) { ++ DEBUG_EP0("%s: NULL REQ\n", __FUNCTION__); ++ return 0; ++ } ++ ++ if (req->req.length == 0) { ++ usb_setb(dev, JZ_REG_UDC_CSR0, (USB_CSR0_INPKTRDY | USB_CSR0_DATAEND)); ++ dev->ep0state = WAIT_FOR_SETUP; ++ return 1; ++ } ++ ++ if (req->req.length - req->req.actual == EP0_MAXPACKETSIZE) { ++ /* Next write will end with the packet size, */ ++ /* so we need zero-length-packet */ ++ need_zlp = 1; ++ } ++ ++ ret = write_fifo_ep0(ep, req); ++ ++ if (ret == 1 && !need_zlp) { ++ /* Last packet */ ++ DEBUG_EP0("%s: finished, waiting for status\n", __FUNCTION__); ++ ++ usb_setb(dev, JZ_REG_UDC_CSR0, (USB_CSR0_INPKTRDY | USB_CSR0_DATAEND)); ++ dev->ep0state = WAIT_FOR_SETUP; ++ } else { ++ DEBUG_EP0("%s: not finished\n", __FUNCTION__); ++ usb_setb(dev, JZ_REG_UDC_CSR0, USB_CSR0_INPKTRDY); ++ } ++ ++ if (need_zlp) { ++ DEBUG_EP0("%s: Need ZLP!\n", __FUNCTION__); ++ usb_setb(dev, JZ_REG_UDC_CSR0, USB_CSR0_INPKTRDY); ++ dev->ep0state = DATA_STATE_NEED_ZLP; ++ } ++ ++ return 1; ++} ++ ++static int jz4740_handle_get_status(struct jz4740_udc *dev, ++ struct usb_ctrlrequest *ctrl) ++{ ++ struct jz4740_ep *ep0 = &dev->ep[0]; ++ struct jz4740_ep *qep; ++ int reqtype = (ctrl->bRequestType & USB_RECIP_MASK); ++ uint16_t val = 0; ++ ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ ++ if (reqtype == USB_RECIP_INTERFACE) { ++ /* This is not supported. ++ * And according to the USB spec, this one does nothing.. ++ * Just return 0 ++ */ ++ DEBUG_SETUP("GET_STATUS: USB_RECIP_INTERFACE\n"); ++ } else if (reqtype == USB_RECIP_DEVICE) { ++ DEBUG_SETUP("GET_STATUS: USB_RECIP_DEVICE\n"); ++ val |= (1 << 0); /* Self powered */ ++ /*val |= (1<<1); *//* Remote wakeup */ ++ } else if (reqtype == USB_RECIP_ENDPOINT) { ++ int ep_num = (ctrl->wIndex & ~USB_DIR_IN); ++ ++ DEBUG_SETUP ++ ("GET_STATUS: USB_RECIP_ENDPOINT (%d), ctrl->wLength = %d\n", ++ ep_num, ctrl->wLength); ++ ++ if (ctrl->wLength > 2 || ep_num > 3) ++ return -EOPNOTSUPP; ++ ++ qep = &dev->ep[ep_num]; ++ if (ep_is_in(qep) != ((ctrl->wIndex & USB_DIR_IN) ? 1 : 0) ++ && ep_index(qep) != 0) { ++ return -EOPNOTSUPP; ++ } ++ ++ jz_udc_set_index(dev, ep_index(qep)); ++ ++ /* Return status on next IN token */ ++ switch (qep->type) { ++ case ep_control: ++ val = ++ (usb_readb(dev, qep->csr) & USB_CSR0_SENDSTALL) == ++ USB_CSR0_SENDSTALL; ++ break; ++ case ep_bulk_in: ++ case ep_interrupt: ++ val = ++ (usb_readb(dev, qep->csr) & USB_INCSR_SENDSTALL) == ++ USB_INCSR_SENDSTALL; ++ break; ++ case ep_bulk_out: ++ val = ++ (usb_readb(dev, qep->csr) & USB_OUTCSR_SENDSTALL) == ++ USB_OUTCSR_SENDSTALL; ++ break; ++ } ++ ++ /* Back to EP0 index */ ++ jz_udc_set_index(dev, 0); ++ ++ DEBUG_SETUP("GET_STATUS, ep: %d (%x), val = %d\n", ep_num, ++ ctrl->wIndex, val); ++ } else { ++ DEBUG_SETUP("Unknown REQ TYPE: %d\n", reqtype); ++ return -EOPNOTSUPP; ++ } ++ ++ /* Clear "out packet ready" */ ++ usb_setb(dev, JZ_REG_UDC_CSR0, USB_CSR0_SVDOUTPKTRDY); ++ /* Put status to FIFO */ ++ jz4740_fifo_write(ep0, (uint8_t *)&val, sizeof(val)); ++ /* Issue "In packet ready" */ ++ usb_setb(dev, JZ_REG_UDC_CSR0, (USB_CSR0_INPKTRDY | USB_CSR0_DATAEND)); ++ ++ return 0; ++} ++ ++/* ++ * WAIT_FOR_SETUP (OUTPKTRDY) ++ * - read data packet from EP0 FIFO ++ * - decode command ++ * - if error ++ * set USB_CSR0_SVDOUTPKTRDY | USB_CSR0_DATAEND | USB_CSR0_SENDSTALL bits ++ * - else ++ * set USB_CSR0_SVDOUTPKTRDY | USB_CSR0_DATAEND bits ++ */ ++static void jz4740_ep0_setup(struct jz4740_udc *dev, uint32_t csr) ++{ ++ struct jz4740_ep *ep = &dev->ep[0]; ++ struct usb_ctrlrequest ctrl; ++ int i; ++ ++ DEBUG_SETUP("%s: %x\n", __FUNCTION__, csr); ++ ++ /* Nuke all previous transfers */ ++ nuke(ep, -EPROTO); ++ ++ /* read control req from fifo (8 bytes) */ ++ jz4740_fifo_read(ep, (unsigned char *)&ctrl, 8); ++ ++ DEBUG_SETUP("SETUP %02x.%02x v%04x i%04x l%04x\n", ++ ctrl.bRequestType, ctrl.bRequest, ++ ctrl.wValue, ctrl.wIndex, ctrl.wLength); ++ ++ /* Set direction of EP0 */ ++ if (likely(ctrl.bRequestType & USB_DIR_IN)) { ++ ep->bEndpointAddress |= USB_DIR_IN; ++ } else { ++ ep->bEndpointAddress &= ~USB_DIR_IN; ++ } ++ ++ /* Handle some SETUP packets ourselves */ ++ switch (ctrl.bRequest) { ++ case USB_REQ_SET_ADDRESS: ++ if (ctrl.bRequestType != (USB_TYPE_STANDARD | USB_RECIP_DEVICE)) ++ break; ++ ++ DEBUG_SETUP("USB_REQ_SET_ADDRESS (%d)\n", ctrl.wValue); ++ udc_set_address(dev, ctrl.wValue); ++ usb_setb(dev, JZ_REG_UDC_CSR0, (USB_CSR0_SVDOUTPKTRDY | USB_CSR0_DATAEND)); ++ return; ++ ++ case USB_REQ_SET_CONFIGURATION: ++ if (ctrl.bRequestType != (USB_TYPE_STANDARD | USB_RECIP_DEVICE)) ++ break; ++ ++ DEBUG_SETUP("USB_REQ_SET_CONFIGURATION (%d)\n", ctrl.wValue); ++/* usb_setb(JZ_REG_UDC_CSR0, (USB_CSR0_SVDOUTPKTRDY | USB_CSR0_DATAEND));*/ ++ ++ /* Enable RESUME and SUSPEND interrupts */ ++ usb_setb(dev, JZ_REG_UDC_INTRUSBE, (USB_INTR_RESUME | USB_INTR_SUSPEND)); ++ break; ++ ++ case USB_REQ_SET_INTERFACE: ++ if (ctrl.bRequestType != (USB_TYPE_STANDARD | USB_RECIP_DEVICE)) ++ break; ++ ++ DEBUG_SETUP("USB_REQ_SET_INTERFACE (%d)\n", ctrl.wValue); ++/* usb_setb(JZ_REG_UDC_CSR0, (USB_CSR0_SVDOUTPKTRDY | USB_CSR0_DATAEND));*/ ++ break; ++ ++ case USB_REQ_GET_STATUS: ++ if (jz4740_handle_get_status(dev, &ctrl) == 0) ++ return; ++ ++ case USB_REQ_CLEAR_FEATURE: ++ case USB_REQ_SET_FEATURE: ++ if (ctrl.bRequestType == USB_RECIP_ENDPOINT) { ++ struct jz4740_ep *qep; ++ int ep_num = (ctrl.wIndex & 0x0f); ++ ++ /* Support only HALT feature */ ++ if (ctrl.wValue != 0 || ctrl.wLength != 0 ++ || ep_num > 3 || ep_num < 1) ++ break; ++ ++ qep = &dev->ep[ep_num]; ++ spin_unlock(&dev->lock); ++ if (ctrl.bRequest == USB_REQ_SET_FEATURE) { ++ DEBUG_SETUP("SET_FEATURE (%d)\n", ++ ep_num); ++ jz4740_set_halt(&qep->ep, 1); ++ } else { ++ DEBUG_SETUP("CLR_FEATURE (%d)\n", ++ ep_num); ++ jz4740_set_halt(&qep->ep, 0); ++ } ++ spin_lock(&dev->lock); ++ ++ jz_udc_set_index(dev, 0); ++ ++ /* Reply with a ZLP on next IN token */ ++ usb_setb(dev, JZ_REG_UDC_CSR0, ++ (USB_CSR0_SVDOUTPKTRDY | USB_CSR0_DATAEND)); ++ return; ++ } ++ break; ++ ++ default: ++ break; ++ } ++ ++ /* gadget drivers see class/vendor specific requests, ++ * {SET,GET}_{INTERFACE,DESCRIPTOR,CONFIGURATION}, ++ * and more. ++ */ ++ if (dev->driver) { ++ /* device-2-host (IN) or no data setup command, process immediately */ ++ spin_unlock(&dev->lock); ++ ++ i = dev->driver->setup(&dev->gadget, &ctrl); ++ spin_lock(&dev->lock); ++ ++ if (unlikely(i < 0)) { ++ /* setup processing failed, force stall */ ++ DEBUG_SETUP ++ (" --> ERROR: gadget setup FAILED (stalling), setup returned %d\n", ++ i); ++ jz_udc_set_index(dev, 0); ++ usb_setb(dev, JZ_REG_UDC_CSR0, (USB_CSR0_SVDOUTPKTRDY | USB_CSR0_DATAEND | USB_CSR0_SENDSTALL)); ++ ++ /* ep->stopped = 1; */ ++ dev->ep0state = WAIT_FOR_SETUP; ++ } ++ else { ++ DEBUG_SETUP("gadget driver setup ok (%d)\n", ctrl.wLength); ++/* if (!ctrl.wLength) { ++ usb_setb(JZ_REG_UDC_CSR0, USB_CSR0_SVDOUTPKTRDY); ++ }*/ ++ } ++ } ++} ++ ++/* ++ * DATA_STATE_NEED_ZLP ++ */ ++static void jz4740_ep0_in_zlp(struct jz4740_udc *dev, uint32_t csr) ++{ ++ DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); ++ ++ usb_setb(dev, JZ_REG_UDC_CSR0, (USB_CSR0_INPKTRDY | USB_CSR0_DATAEND)); ++ dev->ep0state = WAIT_FOR_SETUP; ++} ++ ++/* ++ * handle ep0 interrupt ++ */ ++static void jz4740_handle_ep0(struct jz4740_udc *dev, uint32_t intr) ++{ ++ struct jz4740_ep *ep = &dev->ep[0]; ++ uint32_t csr; ++ ++ DEBUG("%s:%s[%d]\n", __FILE__, __func__, __LINE__); ++ /* Set index 0 */ ++ jz_udc_set_index(dev, 0); ++ csr = usb_readb(dev, JZ_REG_UDC_CSR0); ++ ++ DEBUG_EP0("%s: csr = %x state = \n", __FUNCTION__, csr);//, state_names[dev->ep0state]); ++ ++ /* ++ * if SENT_STALL is set ++ * - clear the SENT_STALL bit ++ */ ++ if (csr & USB_CSR0_SENTSTALL) { ++ DEBUG_EP0("%s: USB_CSR0_SENTSTALL is set: %x\n", __FUNCTION__, csr); ++ usb_clearb(dev, JZ_REG_UDC_CSR0, USB_CSR0_SENDSTALL | USB_CSR0_SENTSTALL); ++ nuke(ep, -ECONNABORTED); ++ dev->ep0state = WAIT_FOR_SETUP; ++ return; ++ } ++ ++ /* ++ * if a transfer is in progress && INPKTRDY and OUTPKTRDY are clear ++ * - fill EP0 FIFO ++ * - if last packet ++ * - set IN_PKT_RDY | DATA_END ++ * - else ++ * set IN_PKT_RDY ++ */ ++ if (!(csr & (USB_CSR0_INPKTRDY | USB_CSR0_OUTPKTRDY))) { ++ DEBUG_EP0("%s: INPKTRDY and OUTPKTRDY are clear\n", ++ __FUNCTION__); ++ ++ switch (dev->ep0state) { ++ case DATA_STATE_XMIT: ++ DEBUG_EP0("continue with DATA_STATE_XMIT\n"); ++ jz4740_ep0_in(dev, csr); ++ return; ++ case DATA_STATE_NEED_ZLP: ++ DEBUG_EP0("continue with DATA_STATE_NEED_ZLP\n"); ++ jz4740_ep0_in_zlp(dev, csr); ++ return; ++ default: ++ /* Stall? */ ++// DEBUG_EP0("Odd state!! state = %s\n", ++// state_names[dev->ep0state]); ++ dev->ep0state = WAIT_FOR_SETUP; ++ /* nuke(ep, 0); */ ++ /* usb_setb(ep->csr, USB_CSR0_SENDSTALL); */ ++// break; ++ return; ++ } ++ } ++ ++ /* ++ * if SETUPEND is set ++ * - abort the last transfer ++ * - set SERVICED_SETUP_END_BIT ++ */ ++ if (csr & USB_CSR0_SETUPEND) { ++ DEBUG_EP0("%s: USB_CSR0_SETUPEND is set: %x\n", __FUNCTION__, csr); ++ ++ usb_setb(dev, JZ_REG_UDC_CSR0, USB_CSR0_SVDSETUPEND); ++ nuke(ep, 0); ++ dev->ep0state = WAIT_FOR_SETUP; ++ } ++ ++ /* ++ * if USB_CSR0_OUTPKTRDY is set ++ * - read data packet from EP0 FIFO ++ * - decode command ++ * - if error ++ * set SVDOUTPKTRDY | DATAEND | SENDSTALL bits ++ * - else ++ * set SVDOUTPKTRDY | DATAEND bits ++ */ ++ if (csr & USB_CSR0_OUTPKTRDY) { ++ ++ DEBUG_EP0("%s: EP0_OUT_PKT_RDY is set: %x\n", __FUNCTION__, ++ csr); ++ ++ switch (dev->ep0state) { ++ case WAIT_FOR_SETUP: ++ DEBUG_EP0("WAIT_FOR_SETUP\n"); ++ jz4740_ep0_setup(dev, csr); ++ break; ++ ++ case DATA_STATE_RECV: ++ DEBUG_EP0("DATA_STATE_RECV\n"); ++ jz4740_ep0_out(dev, csr, 0); ++ break; ++ ++ default: ++ /* send stall? */ ++ DEBUG_EP0("strange state!! 2. send stall? state = %d\n", ++ dev->ep0state); ++ break; ++ } ++ } ++} ++ ++static void jz4740_ep0_kick(struct jz4740_udc *dev, struct jz4740_ep *ep) ++{ ++ uint32_t csr; ++ ++ jz_udc_set_index(dev, 0); ++ ++ DEBUG_EP0("%s: %x\n", __FUNCTION__, csr); ++ ++ /* Clear "out packet ready" */ ++ ++ if (ep_is_in(ep)) { ++ usb_setb(dev, JZ_REG_UDC_CSR0, USB_CSR0_SVDOUTPKTRDY); ++ csr = usb_readb(dev, JZ_REG_UDC_CSR0); ++ dev->ep0state = DATA_STATE_XMIT; ++ jz4740_ep0_in(dev, csr); ++ } else { ++ csr = usb_readb(dev, JZ_REG_UDC_CSR0); ++ dev->ep0state = DATA_STATE_RECV; ++ jz4740_ep0_out(dev, csr, 1); ++ } ++} ++ ++/** Handle USB RESET interrupt ++ */ ++static void jz4740_reset_irq(struct jz4740_udc *dev) ++{ ++ dev->gadget.speed = (usb_readb(dev, JZ_REG_UDC_POWER) & USB_POWER_HSMODE) ? ++ USB_SPEED_HIGH : USB_SPEED_FULL; ++ ++ DEBUG_SETUP("%s: address = %d, speed = %s\n", __FUNCTION__, 0, ++ (dev->gadget.speed == USB_SPEED_HIGH) ? "HIGH":"FULL" ); ++} ++ ++/* ++ * jz4740 usb device interrupt handler. ++ */ ++static irqreturn_t jz4740_udc_irq(int irq, void *devid) ++{ ++ struct jz4740_udc *jz4740_udc = devid; ++ uint8_t index; ++ ++ uint32_t intr_usb = usb_readb(jz4740_udc, JZ_REG_UDC_INTRUSB) & 0x7; /* mask SOF */ ++ uint32_t intr_in = usb_readw(jz4740_udc, JZ_REG_UDC_INTRIN); ++ uint32_t intr_out = usb_readw(jz4740_udc, JZ_REG_UDC_INTROUT); ++ uint32_t intr_dma = usb_readb(jz4740_udc, JZ_REG_UDC_INTR); ++ ++ if (!intr_usb && !intr_in && !intr_out && !intr_dma) ++ return IRQ_HANDLED; ++ ++ ++ DEBUG("intr_out=%x intr_in=%x intr_usb=%x\n", ++ intr_out, intr_in, intr_usb); ++ ++ spin_lock(&jz4740_udc->lock); ++ index = usb_readb(jz4740_udc, JZ_REG_UDC_INDEX); ++ ++ /* Check for resume from suspend mode */ ++ if ((intr_usb & USB_INTR_RESUME) && ++ (usb_readb(jz4740_udc, JZ_REG_UDC_INTRUSBE) & USB_INTR_RESUME)) { ++ DEBUG("USB resume\n"); ++ jz4740_udc->driver->resume(&jz4740_udc->gadget); /* We have suspend(), so we must have resume() too. */ ++ } ++ ++ /* Check for system interrupts */ ++ if (intr_usb & USB_INTR_RESET) { ++ DEBUG("USB reset\n"); ++ jz4740_reset_irq(jz4740_udc); ++ } ++ ++ /* Check for endpoint 0 interrupt */ ++ if (intr_in & USB_INTR_EP0) { ++ DEBUG("USB_INTR_EP0 (control)\n"); ++ jz4740_handle_ep0(jz4740_udc, intr_in); ++ } ++ ++ /* Check for Bulk-IN DMA interrupt */ ++ if (intr_dma & 0x1) { ++ int ep_num; ++ struct jz4740_ep *ep; ++ ep_num = (usb_readl(jz4740_udc, JZ_REG_UDC_CNTL1) >> 4) & 0xf; ++ ep = &jz4740_udc->ep[ep_num + 1]; ++ jz_udc_set_index(jz4740_udc, ep_num); ++ usb_setb(jz4740_udc, ep->csr, USB_INCSR_INPKTRDY); ++/* jz4740_in_epn(jz4740_udc, ep_num, intr_in);*/ ++ } ++ ++ /* Check for Bulk-OUT DMA interrupt */ ++ if (intr_dma & 0x2) { ++ int ep_num; ++ ep_num = (usb_readl(jz4740_udc, JZ_REG_UDC_CNTL2) >> 4) & 0xf; ++ jz4740_out_epn(jz4740_udc, ep_num, intr_out); ++ } ++ ++ /* Check for each configured endpoint interrupt */ ++ if (intr_in & USB_INTR_INEP1) { ++ DEBUG("USB_INTR_INEP1\n"); ++ jz4740_in_epn(jz4740_udc, 1, intr_in); ++ } ++ ++ if (intr_in & USB_INTR_INEP2) { ++ DEBUG("USB_INTR_INEP2\n"); ++ jz4740_in_epn(jz4740_udc, 2, intr_in); ++ } ++ ++ if (intr_out & USB_INTR_OUTEP1) { ++ DEBUG("USB_INTR_OUTEP1\n"); ++ jz4740_out_epn(jz4740_udc, 1, intr_out); ++ } ++ ++ /* Check for suspend mode */ ++ if ((intr_usb & USB_INTR_SUSPEND) && ++ (usb_readb(jz4740_udc, JZ_REG_UDC_INTRUSBE) & USB_INTR_SUSPEND)) { ++ DEBUG("USB suspend\n"); ++ jz4740_udc->driver->suspend(&jz4740_udc->gadget); ++ /* Host unloaded from us, can do something, such as flushing ++ the NAND block cache etc. */ ++ } ++ ++ jz_udc_set_index(jz4740_udc, index); ++ ++ spin_unlock(&jz4740_udc->lock); ++ ++ return IRQ_HANDLED; ++} ++ ++ ++ ++/*-------------------------------------------------------------------------*/ ++ ++ ++static inline struct jz4740_udc *gadget_to_udc(struct usb_gadget *gadget) ++{ ++ return container_of(gadget, struct jz4740_udc, gadget); ++} ++ ++static int jz4740_udc_get_frame(struct usb_gadget *_gadget) ++{ ++ DEBUG("%s, %p\n", __FUNCTION__, _gadget); ++ return usb_readw(gadget_to_udc(_gadget), JZ_REG_UDC_FRAME); ++} ++ ++static int jz4740_udc_wakeup(struct usb_gadget *_gadget) ++{ ++ /* host may not have enabled remote wakeup */ ++ /*if ((UDCCS0 & UDCCS0_DRWF) == 0) ++ return -EHOSTUNREACH; ++ udc_set_mask_UDCCR(UDCCR_RSM); */ ++ return -ENOTSUPP; ++} ++ ++static int jz4740_udc_pullup(struct usb_gadget *_gadget, int on) ++{ ++ struct jz4740_udc *udc = gadget_to_udc(_gadget); ++ unsigned long flags; ++ ++ local_irq_save(flags); ++ ++ if (on) { ++ udc->state = UDC_STATE_ENABLE; ++ udc_enable(udc); ++ } else { ++ udc->state = UDC_STATE_DISABLE; ++ udc_disable(udc); ++ } ++ ++ local_irq_restore(flags); ++ ++ return 0; ++} ++ ++ ++static const struct usb_gadget_ops jz4740_udc_ops = { ++ .get_frame = jz4740_udc_get_frame, ++ .wakeup = jz4740_udc_wakeup, ++ .pullup = jz4740_udc_pullup, ++}; ++ ++static struct usb_ep_ops jz4740_ep_ops = { ++ .enable = jz4740_ep_enable, ++ .disable = jz4740_ep_disable, ++ ++ .alloc_request = jz4740_alloc_request, ++ .free_request = jz4740_free_request, ++ ++ .queue = jz4740_queue, ++ .dequeue = jz4740_dequeue, ++ ++ .set_halt = jz4740_set_halt, ++ .fifo_status = jz4740_fifo_status, ++ .fifo_flush = jz4740_fifo_flush, ++}; ++ ++ ++/*-------------------------------------------------------------------------*/ ++ ++static struct jz4740_udc jz4740_udc_controller = { ++ .gadget = { ++ .ops = &jz4740_udc_ops, ++ .ep0 = &jz4740_udc_controller.ep[0].ep, ++ .name = "jz4740-udc", ++ .dev = { ++ .init_name = "gadget", ++ }, ++ }, ++ ++ /* control endpoint */ ++ .ep[0] = { ++ .ep = { ++ .name = "ep0", ++ .ops = &jz4740_ep_ops, ++ .maxpacket = EP0_MAXPACKETSIZE, ++ }, ++ .dev = &jz4740_udc_controller, ++ ++ .bEndpointAddress = 0, ++ .bmAttributes = 0, ++ ++ .type = ep_control, ++ .fifo = JZ_REG_UDC_EP_FIFO(0), ++ .csr = JZ_REG_UDC_CSR0, ++ }, ++ ++ /* bulk out endpoint */ ++ .ep[1] = { ++ .ep = { ++ .name = "ep1out-bulk", ++ .ops = &jz4740_ep_ops, ++ .maxpacket = EPBULK_MAXPACKETSIZE, ++ }, ++ .dev = &jz4740_udc_controller, ++ ++ .bEndpointAddress = 1, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ ++ .type = ep_bulk_out, ++ .fifo = JZ_REG_UDC_EP_FIFO(1), ++ .csr = JZ_REG_UDC_OUTCSR, ++ }, ++ ++ /* bulk in endpoint */ ++ .ep[2] = { ++ .ep = { ++ .name = "ep1in-bulk", ++ .ops = &jz4740_ep_ops, ++ .maxpacket = EPBULK_MAXPACKETSIZE, ++ }, ++ .dev = &jz4740_udc_controller, ++ ++ .bEndpointAddress = 1 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_BULK, ++ ++ .type = ep_bulk_in, ++ .fifo = JZ_REG_UDC_EP_FIFO(1), ++ .csr = JZ_REG_UDC_INCSR, ++ }, ++ ++ /* interrupt in endpoint */ ++ .ep[3] = { ++ .ep = { ++ .name = "ep2in-int", ++ .ops = &jz4740_ep_ops, ++ .maxpacket = EPINTR_MAXPACKETSIZE, ++ }, ++ .dev = &jz4740_udc_controller, ++ ++ .bEndpointAddress = 2 | USB_DIR_IN, ++ .bmAttributes = USB_ENDPOINT_XFER_INT, ++ ++ .type = ep_interrupt, ++ .fifo = JZ_REG_UDC_EP_FIFO(2), ++ .csr = JZ_REG_UDC_INCSR, ++ }, ++}; ++ ++static int __devinit jz4740_udc_probe(struct platform_device *pdev) ++{ ++ struct jz4740_udc *jz4740_udc = &jz4740_udc_controller; ++ int ret; ++ ++ spin_lock_init(&jz4740_udc->lock); ++ ++ jz4740_udc->dev = &pdev->dev; ++ jz4740_udc->gadget.dev.parent = &pdev->dev; ++ jz4740_udc->gadget.dev.dma_mask = pdev->dev.dma_mask; ++ ++ ret = device_register(&jz4740_udc->gadget.dev); ++ if (ret) ++ return ret; ++ ++ jz4740_udc->clk = clk_get(&pdev->dev, "udc"); ++ if (IS_ERR(jz4740_udc->clk)) { ++ ret = PTR_ERR(jz4740_udc->clk); ++ dev_err(&pdev->dev, "Failed to get udc clock: %d\n", ret); ++ goto err_device_unregister; ++ } ++ ++ platform_set_drvdata(pdev, jz4740_udc); ++ ++ jz4740_udc->mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); ++ ++ if (!jz4740_udc->mem) { ++ ret = -ENOENT; ++ dev_err(&pdev->dev, "Failed to get mmio memory resource\n"); ++ goto err_clk_put; ++ } ++ ++ jz4740_udc->mem = request_mem_region(jz4740_udc->mem->start, ++ resource_size(jz4740_udc->mem), pdev->name); ++ ++ if (!jz4740_udc->mem) { ++ ret = -EBUSY; ++ dev_err(&pdev->dev, "Failed to request mmio memory region\n"); ++ goto err_device_unregister; ++ } ++ ++ jz4740_udc->base = ioremap(jz4740_udc->mem->start, resource_size(jz4740_udc->mem)); ++ ++ if (!jz4740_udc->base) { ++ ret = -EBUSY; ++ dev_err(&pdev->dev, "Failed to ioremap mmio memory\n"); ++ goto err_release_mem_region; ++ } ++ ++ jz4740_udc->irq = platform_get_irq(pdev, 0); ++ ret = request_irq(jz4740_udc->irq, jz4740_udc_irq, 0, pdev->name, ++ jz4740_udc); ++ if (ret) { ++ dev_err(&pdev->dev, "Failed to request irq: %d\n", ret); ++ goto err_iounmap; ++ } ++ ++ udc_disable(jz4740_udc); ++ udc_reinit(jz4740_udc); ++ ++ return 0; ++ ++err_iounmap: ++ iounmap(jz4740_udc->base); ++err_release_mem_region: ++ release_mem_region(jz4740_udc->mem->start, resource_size(jz4740_udc->mem)); ++err_clk_put: ++ clk_put(jz4740_udc->clk); ++err_device_unregister: ++ device_unregister(&jz4740_udc->gadget.dev); ++ platform_set_drvdata(pdev, NULL); ++ ++ return ret; ++} ++ ++static int __devexit jz4740_udc_remove(struct platform_device *pdev) ++{ ++ struct jz4740_udc *dev = platform_get_drvdata(pdev); ++ ++ if (dev->driver) ++ return -EBUSY; ++ ++ udc_disable(dev); ++ ++ free_irq(dev->irq, dev); ++ iounmap(dev->base); ++ release_mem_region(dev->mem->start, resource_size(dev->mem)); ++ clk_put(dev->clk); ++ ++ platform_set_drvdata(pdev, NULL); ++ device_unregister(&dev->gadget.dev); ++ ++ return 0; ++} ++ ++#ifdef CONFIG_PM ++ ++static int jz4740_udc_suspend(struct device *dev) ++{ ++ struct jz4740_udc *jz4740_udc = dev_get_drvdata(dev); ++ ++ if (jz4740_udc->state == UDC_STATE_ENABLE) ++ udc_disable(jz4740_udc); ++ ++ return 0; ++} ++ ++static int jz4740_udc_resume(struct device *dev) ++{ ++ struct jz4740_udc *jz4740_udc = dev_get_drvdata(dev); ++ ++ if (jz4740_udc->state == UDC_STATE_ENABLE) ++ udc_enable(jz4740_udc); ++ ++ return 0; ++} ++ ++static const struct dev_pm_ops jz4740_udc_pm_ops = { ++ .suspend = jz4740_udc_suspend, ++ .resume = jz4740_udc_resume, ++}; ++ ++#define JZ4740_UDC_PM_OPS (&jz4740_udc_pm_ops) ++ ++#else ++#define JZ4740_UDC_PM_OPS NULL ++#endif ++ ++static struct platform_driver udc_driver = { ++ .probe = jz4740_udc_probe, ++ .remove = __devexit_p(jz4740_udc_remove), ++ .driver = { ++ .name = "jz-udc", ++ .owner = THIS_MODULE, ++ .pm = JZ4740_UDC_PM_OPS, ++ }, ++}; ++ ++/*-------------------------------------------------------------------------*/ ++ ++static int __init udc_init (void) ++{ ++ return platform_driver_register(&udc_driver); ++} ++module_init(udc_init); ++ ++static void __exit udc_exit (void) ++{ ++ platform_driver_unregister(&udc_driver); ++} ++module_exit(udc_exit); ++ ++MODULE_DESCRIPTION("JZ4740 USB Device Controller"); ++MODULE_AUTHOR("Wei Jianli "); ++MODULE_LICENSE("GPL"); +diff --git a/drivers/usb/gadget/jz4740_udc.h b/drivers/usb/gadget/jz4740_udc.h +new file mode 100644 +index 0000000..53fd1da +--- /dev/null ++++ b/drivers/usb/gadget/jz4740_udc.h +@@ -0,0 +1,101 @@ ++/* ++ * linux/drivers/usb/gadget/jz4740_udc.h ++ * ++ * Ingenic JZ4740 on-chip high speed USB device controller ++ * ++ * Copyright (C) 2006 Ingenic Semiconductor Inc. ++ * Author: ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ */ ++ ++#ifndef __USB_GADGET_JZ4740_H__ ++#define __USB_GADGET_JZ4740_H__ ++ ++/*-------------------------------------------------------------------------*/ ++ ++// Max packet size ++#define EP0_MAXPACKETSIZE 64 ++#define EPBULK_MAXPACKETSIZE 512 ++#define EPINTR_MAXPACKETSIZE 64 ++ ++#define UDC_MAX_ENDPOINTS 4 ++ ++/*-------------------------------------------------------------------------*/ ++ ++enum ep_type { ++ ep_control, ep_bulk_in, ep_bulk_out, ep_interrupt ++}; ++ ++struct jz4740_ep { ++ struct usb_ep ep; ++ struct jz4740_udc *dev; ++ ++ const struct usb_endpoint_descriptor *desc; ++ ++ uint8_t stopped; ++ uint8_t bEndpointAddress; ++ uint8_t bmAttributes; ++ ++ enum ep_type type; ++ size_t fifo; ++ uint32_t csr; ++ ++ uint32_t reg_addr; ++ struct list_head queue; ++}; ++ ++struct jz4740_request { ++ struct usb_request req; ++ struct list_head queue; ++}; ++ ++enum ep0state { ++ WAIT_FOR_SETUP, /* between STATUS ack and SETUP report */ ++ DATA_STATE_XMIT, /* data tx stage */ ++ DATA_STATE_NEED_ZLP, /* data tx zlp stage */ ++ WAIT_FOR_OUT_STATUS, /* status stages */ ++ DATA_STATE_RECV, /* data rx stage */ ++}; ++ ++/* For function binding with UDC Disable - Added by River */ ++typedef enum { ++ UDC_STATE_ENABLE = 0, ++ UDC_STATE_DISABLE, ++}udc_state_t; ++ ++struct jz4740_udc { ++ struct usb_gadget gadget; ++ struct usb_gadget_driver *driver; ++ struct device *dev; ++ spinlock_t lock; ++ unsigned long lock_flags; ++ ++ enum ep0state ep0state; ++ struct jz4740_ep ep[UDC_MAX_ENDPOINTS]; ++ ++ udc_state_t state; ++ ++ struct resource *mem; ++ void __iomem *base; ++ int irq; ++ ++ struct clk *clk; ++}; ++ ++#define ep_maxpacket(EP) ((EP)->ep.maxpacket) ++ ++static inline bool ep_is_in(const struct jz4740_ep *ep) ++{ ++ return (ep->bEndpointAddress & USB_DIR_IN) == USB_DIR_IN; ++} ++ ++static inline uint8_t ep_index(const struct jz4740_ep *ep) ++{ ++ return ep->bEndpointAddress & 0xf; ++} ++ ++#endif /* __USB_GADGET_JZ4740_H__ */ + + diff --git a/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/logo_linux_clut224.tar.gz b/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/logo_linux_clut224.tar.gz new file mode 100644 index 0000000000..06de727a05 Binary files /dev/null and b/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/logo_linux_clut224.tar.gz differ diff --git a/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/modifier-keys.patch b/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/modifier-keys.patch new file mode 100644 index 0000000000..02841aaf6d --- /dev/null +++ b/recipes/linux/linux-kexecboot-2.6.37/ben-nanonote/modifier-keys.patch @@ -0,0 +1,604 @@ +From b6325b84e3ea906745900fec13ebd12e27eca762 Mon Sep 17 00:00:00 2001 +From: Lars-Peter Clausen +Date: Sat, 24 Apr 2010 12:22:25 +0200 +Subject: [PATCH] Modify keymap for ben nanonote + +--- + drivers/char/defkeymap.c_shipped | 308 +++++++++++++++++++++++++++++--------- + drivers/char/defkeymap.map | 74 +++++++--- + 2 files changed, 286 insertions(+), 96 deletions(-) + +--- a/drivers/tty/vt/defkeymap.c_shipped ++++ b/drivers/tty/vt/defkeymap.c_shipped +@@ -9,10 +9,10 @@ u_short plain_map[NR_KEYS] = { + 0xf200, 0xf01b, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, 0xf036, + 0xf037, 0xf038, 0xf039, 0xf030, 0xf02d, 0xf03d, 0xf07f, 0xf009, + 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69, +- 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf702, 0xfb61, 0xfb73, ++ 0xfb6f, 0xfb70, 0xf05b, 0xf05d, 0xf201, 0xf706, 0xfb61, 0xfb73, + 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf03b, + 0xf027, 0xf060, 0xf700, 0xf05c, 0xfb7a, 0xfb78, 0xfb63, 0xfb76, +- 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf700, 0xf30c, ++ 0xfb62, 0xfb6e, 0xfb6d, 0xf02c, 0xf02e, 0xf02f, 0xf701, 0xf30c, + 0xf703, 0xf020, 0xf207, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, + 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf209, 0xf307, + 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, +@@ -22,54 +22,102 @@ u_short plain_map[NR_KEYS] = { + 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + }; + +-u_short shift_map[NR_KEYS] = { ++static u_short shift_map[NR_KEYS] = { + 0xf200, 0xf01b, 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e, + 0xf026, 0xf02a, 0xf028, 0xf029, 0xf05f, 0xf02b, 0xf07f, 0xf009, + 0xfb51, 0xfb57, 0xfb45, 0xfb52, 0xfb54, 0xfb59, 0xfb55, 0xfb49, +- 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf702, 0xfb41, 0xfb53, ++ 0xfb4f, 0xfb50, 0xf07b, 0xf07d, 0xf201, 0xf706, 0xfb41, 0xfb53, + 0xfb44, 0xfb46, 0xfb47, 0xfb48, 0xfb4a, 0xfb4b, 0xfb4c, 0xf03a, + 0xf022, 0xf07e, 0xf700, 0xf07c, 0xfb5a, 0xfb58, 0xfb43, 0xfb56, +- 0xfb42, 0xfb4e, 0xfb4d, 0xf03c, 0xf03e, 0xf03f, 0xf700, 0xf30c, ++ 0xfb42, 0xfb4e, 0xfb4d, 0xf03b, 0xf03a, 0xf03f, 0xf701, 0xf30c, + 0xf703, 0xf020, 0xf207, 0xf10a, 0xf10b, 0xf10c, 0xf10d, 0xf10e, + 0xf10f, 0xf110, 0xf111, 0xf112, 0xf113, 0xf213, 0xf203, 0xf307, + 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, + 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf03e, 0xf10a, + 0xf10b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +- 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, ++ 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf20b, 0xf601, 0xf602, 0xf117, 0xf600, 0xf20a, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + }; + +-u_short altgr_map[NR_KEYS] = { ++static u_short altgr_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf040, 0xf200, 0xf024, 0xf200, 0xf200, +- 0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf200, 0xf200, 0xf200, +- 0xfb71, 0xfb77, 0xf918, 0xfb72, 0xfb74, 0xfb79, 0xfb75, 0xfb69, +- 0xfb6f, 0xfb70, 0xf200, 0xf07e, 0xf201, 0xf702, 0xf914, 0xfb73, +- 0xf917, 0xf919, 0xfb67, 0xfb68, 0xfb6a, 0xfb6b, 0xfb6c, 0xf200, +- 0xf200, 0xf200, 0xf700, 0xf200, 0xfb7a, 0xfb78, 0xf916, 0xfb76, +- 0xf915, 0xfb6e, 0xfb6d, 0xf200, 0xf200, 0xf200, 0xf700, 0xf30c, +- 0xf703, 0xf200, 0xf207, 0xf50c, 0xf50d, 0xf50e, 0xf50f, 0xf510, +- 0xf511, 0xf512, 0xf513, 0xf514, 0xf515, 0xf208, 0xf202, 0xf911, ++ 0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf05c, 0xf07e, 0xf008, 0xf200, ++ 0xf021, 0xf040, 0xf023, 0xf024, 0xf025, 0xf05e, 0xf026, 0xf02a, ++ 0xf028, 0xf029, 0xf200, 0xf07e, 0xf201, 0xf706, 0xf0b0, 0xf0a8, ++ 0xf0a4, 0xf02d, 0xf05f, 0xf07b, 0xf05b, 0xf05d, 0xf07d, 0xf200, ++ 0xf200, 0xf200, 0xf700, 0xf200, 0xf039, 0xf030, 0xf916, 0xfb76, ++ 0xf915, 0xf03c, 0xf03e, 0xf027, 0xf022, 0xf200, 0xf701, 0xf30c, ++ 0xf703, 0xf200, 0xf207, 0xf031, 0xf032, 0xf033, 0xf034, 0xf035, ++ 0xf036, 0xf037, 0xf038, 0xf514, 0xf515, 0xf208, 0xf202, 0xf911, + 0xf912, 0xf913, 0xf30b, 0xf90e, 0xf90f, 0xf910, 0xf30a, 0xf90b, + 0xf90c, 0xf90d, 0xf90a, 0xf310, 0xf206, 0xf200, 0xf07c, 0xf516, + 0xf517, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +- 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, ++ 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + }; + +-u_short ctrl_map[NR_KEYS] = { ++static u_short ctrl_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01d, 0xf01e, +- 0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf008, 0xf200, ++ 0xf01f, 0xf07f, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf200, 0xf200, + 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009, +- 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf201, 0xf702, 0xf001, 0xf013, ++ 0xf00f, 0xf010, 0xf01b, 0xf01d, 0xf201, 0xf706, 0xf001, 0xf013, + 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200, + 0xf007, 0xf000, 0xf700, 0xf01c, 0xf01a, 0xf018, 0xf003, 0xf016, +- 0xf002, 0xf00e, 0xf00d, 0xf200, 0xf20e, 0xf07f, 0xf700, 0xf30c, ++ 0xf002, 0xf00e, 0xf00d, 0xf200, 0xf20e, 0xf07f, 0xf701, 0xf30c, + 0xf703, 0xf000, 0xf207, 0xf100, 0xf101, 0xf102, 0xf103, 0xf104, + 0xf105, 0xf106, 0xf107, 0xf108, 0xf109, 0xf208, 0xf204, 0xf307, + 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, +@@ -79,35 +127,67 @@ u_short ctrl_map[NR_KEYS] = { + 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + }; + +-u_short shift_ctrl_map[NR_KEYS] = { ++static u_short shift_ctrl_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf200, 0xf200, + 0xf011, 0xf017, 0xf005, 0xf012, 0xf014, 0xf019, 0xf015, 0xf009, +- 0xf00f, 0xf010, 0xf200, 0xf200, 0xf201, 0xf702, 0xf001, 0xf013, ++ 0xf00f, 0xf010, 0xf200, 0xf200, 0xf201, 0xf706, 0xf001, 0xf013, + 0xf004, 0xf006, 0xf007, 0xf008, 0xf00a, 0xf00b, 0xf00c, 0xf200, + 0xf200, 0xf200, 0xf700, 0xf200, 0xf01a, 0xf018, 0xf003, 0xf016, +- 0xf002, 0xf00e, 0xf00d, 0xf200, 0xf200, 0xf200, 0xf700, 0xf30c, ++ 0xf002, 0xf00e, 0xf00d, 0xf200, 0xf200, 0xf200, 0xf701, 0xf30c, + 0xf703, 0xf200, 0xf207, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf208, 0xf200, 0xf307, + 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, + 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +- 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, ++ 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + }; + +-u_short alt_map[NR_KEYS] = { ++static u_short alt_map[NR_KEYS] = { + 0xf200, 0xf81b, 0xf831, 0xf832, 0xf833, 0xf834, 0xf835, 0xf836, + 0xf837, 0xf838, 0xf839, 0xf830, 0xf82d, 0xf83d, 0xf87f, 0xf809, + 0xf871, 0xf877, 0xf865, 0xf872, 0xf874, 0xf879, 0xf875, 0xf869, +- 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf702, 0xf861, 0xf873, ++ 0xf86f, 0xf870, 0xf85b, 0xf85d, 0xf80d, 0xf706, 0xf861, 0xf873, + 0xf864, 0xf866, 0xf867, 0xf868, 0xf86a, 0xf86b, 0xf86c, 0xf83b, + 0xf827, 0xf860, 0xf700, 0xf85c, 0xf87a, 0xf878, 0xf863, 0xf876, +- 0xf862, 0xf86e, 0xf86d, 0xf82c, 0xf82e, 0xf82f, 0xf700, 0xf30c, ++ 0xf862, 0xf86e, 0xf86d, 0xf200, 0xf200, 0xf82f, 0xf701, 0xf30c, + 0xf703, 0xf820, 0xf207, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504, + 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf209, 0xf907, + 0xf908, 0xf909, 0xf30b, 0xf904, 0xf905, 0xf906, 0xf30a, 0xf901, +@@ -117,35 +197,115 @@ u_short alt_map[NR_KEYS] = { + 0xf118, 0xf210, 0xf211, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + }; + +-u_short ctrl_alt_map[NR_KEYS] = { ++static u_short ctrl_alt_map[NR_KEYS] = { + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf811, 0xf817, 0xf805, 0xf812, 0xf814, 0xf819, 0xf815, 0xf809, +- 0xf80f, 0xf810, 0xf200, 0xf200, 0xf201, 0xf702, 0xf801, 0xf813, ++ 0xf80f, 0xf810, 0xf200, 0xf200, 0xf201, 0xf706, 0xf801, 0xf813, + 0xf804, 0xf806, 0xf807, 0xf808, 0xf80a, 0xf80b, 0xf80c, 0xf200, + 0xf200, 0xf200, 0xf700, 0xf200, 0xf81a, 0xf818, 0xf803, 0xf816, +- 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf200, 0xf200, 0xf700, 0xf30c, ++ 0xf802, 0xf80e, 0xf80d, 0xf200, 0xf200, 0xf200, 0xf701, 0xf30c, + 0xf703, 0xf200, 0xf207, 0xf500, 0xf501, 0xf502, 0xf503, 0xf504, + 0xf505, 0xf506, 0xf507, 0xf508, 0xf509, 0xf208, 0xf200, 0xf307, + 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, + 0xf302, 0xf303, 0xf300, 0xf20c, 0xf206, 0xf200, 0xf200, 0xf50a, + 0xf50b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, +- 0xf30e, 0xf702, 0xf30d, 0xf200, 0xf701, 0xf205, 0xf114, 0xf603, ++ 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, + 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf20c, + 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++}; ++ ++static u_short ctl_map[NR_KEYS] = { ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf033, 0xf200, 0xf200, ++ 0xfb71, 0xfb77, 0xfb65, 0xfb72, 0xfb74, 0xfb79, 0xf037, 0xf038, ++ 0xf039, 0xfb70, 0xf200, 0xf200, 0xf201, 0xf706, 0xfb61, 0xfb73, ++ 0xfb64, 0xfb66, 0xfb67, 0xfb68, 0xf034, 0xf035, 0xf036, 0xf200, ++ 0xf200, 0xf200, 0xf700, 0xf200, 0xfb7a, 0xfb78, 0xfb63, 0xfb76, ++ 0xfb62, 0xf031, 0xf032, 0xf200, 0xf200, 0xf030, 0xf701, 0xf30c, ++ 0xf703, 0xf200, 0xf207, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf208, 0xf200, 0xf307, ++ 0xf308, 0xf309, 0xf30b, 0xf304, 0xf305, 0xf306, 0xf30a, 0xf301, ++ 0xf302, 0xf303, 0xf300, 0xf310, 0xf206, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf30e, 0xf702, 0xf30d, 0xf01c, 0xf701, 0xf205, 0xf114, 0xf603, ++ 0xf118, 0xf601, 0xf602, 0xf117, 0xf600, 0xf119, 0xf115, 0xf116, ++ 0xf11a, 0xf10c, 0xf10d, 0xf11b, 0xf11c, 0xf110, 0xf311, 0xf11d, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, ++ 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + }; + + ushort *key_maps[MAX_NR_KEYMAPS] = { +- plain_map, shift_map, altgr_map, NULL, +- ctrl_map, shift_ctrl_map, NULL, NULL, +- alt_map, NULL, NULL, NULL, +- ctrl_alt_map, NULL ++ plain_map, shift_map, altgr_map, 0, ++ ctrl_map, shift_ctrl_map, 0, 0, ++ alt_map, 0, 0, 0, ++ ctrl_alt_map, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ 0, 0, 0, 0, ++ ctl_map, 0 + }; + +-unsigned int keymap_count = 7; ++unsigned int keymap_count = 8; + + /* + * Philosophy: most people do not define more strings, but they who do +@@ -216,47 +376,47 @@ char *func_table[MAX_NR_FUNC] = { + func_buf + 135, + func_buf + 140, + func_buf + 145, +- NULL, +- NULL, ++ 0, ++ 0, + func_buf + 149, +- NULL, ++ 0, + }; + +-struct kbdiacruc accent_table[MAX_DIACR] = { +- {'`', 'A', 0300}, {'`', 'a', 0340}, +- {'\'', 'A', 0301}, {'\'', 'a', 0341}, +- {'^', 'A', 0302}, {'^', 'a', 0342}, +- {'~', 'A', 0303}, {'~', 'a', 0343}, +- {'"', 'A', 0304}, {'"', 'a', 0344}, +- {'O', 'A', 0305}, {'o', 'a', 0345}, +- {'0', 'A', 0305}, {'0', 'a', 0345}, +- {'A', 'A', 0305}, {'a', 'a', 0345}, +- {'A', 'E', 0306}, {'a', 'e', 0346}, +- {',', 'C', 0307}, {',', 'c', 0347}, +- {'`', 'E', 0310}, {'`', 'e', 0350}, +- {'\'', 'E', 0311}, {'\'', 'e', 0351}, +- {'^', 'E', 0312}, {'^', 'e', 0352}, +- {'"', 'E', 0313}, {'"', 'e', 0353}, +- {'`', 'I', 0314}, {'`', 'i', 0354}, +- {'\'', 'I', 0315}, {'\'', 'i', 0355}, +- {'^', 'I', 0316}, {'^', 'i', 0356}, +- {'"', 'I', 0317}, {'"', 'i', 0357}, +- {'-', 'D', 0320}, {'-', 'd', 0360}, +- {'~', 'N', 0321}, {'~', 'n', 0361}, +- {'`', 'O', 0322}, {'`', 'o', 0362}, +- {'\'', 'O', 0323}, {'\'', 'o', 0363}, +- {'^', 'O', 0324}, {'^', 'o', 0364}, +- {'~', 'O', 0325}, {'~', 'o', 0365}, +- {'"', 'O', 0326}, {'"', 'o', 0366}, +- {'/', 'O', 0330}, {'/', 'o', 0370}, +- {'`', 'U', 0331}, {'`', 'u', 0371}, +- {'\'', 'U', 0332}, {'\'', 'u', 0372}, +- {'^', 'U', 0333}, {'^', 'u', 0373}, +- {'"', 'U', 0334}, {'"', 'u', 0374}, +- {'\'', 'Y', 0335}, {'\'', 'y', 0375}, +- {'T', 'H', 0336}, {'t', 'h', 0376}, +- {'s', 's', 0337}, {'"', 'y', 0377}, +- {'s', 'z', 0337}, {'i', 'j', 0377}, ++struct kbdiacr accent_table[MAX_DIACR] = { ++ {'`', 'A', '\300'}, {'`', 'a', '\340'}, ++ {'\'', 'A', '\301'}, {'\'', 'a', '\341'}, ++ {'^', 'A', '\302'}, {'^', 'a', '\342'}, ++ {'~', 'A', '\303'}, {'~', 'a', '\343'}, ++ {'"', 'A', '\304'}, {'"', 'a', '\344'}, ++ {'O', 'A', '\305'}, {'o', 'a', '\345'}, ++ {'0', 'A', '\305'}, {'0', 'a', '\345'}, ++ {'A', 'A', '\305'}, {'a', 'a', '\345'}, ++ {'A', 'E', '\306'}, {'a', 'e', '\346'}, ++ {',', 'C', '\307'}, {',', 'c', '\347'}, ++ {'`', 'E', '\310'}, {'`', 'e', '\350'}, ++ {'\'', 'E', '\311'}, {'\'', 'e', '\351'}, ++ {'^', 'E', '\312'}, {'^', 'e', '\352'}, ++ {'"', 'E', '\313'}, {'"', 'e', '\353'}, ++ {'`', 'I', '\314'}, {'`', 'i', '\354'}, ++ {'\'', 'I', '\315'}, {'\'', 'i', '\355'}, ++ {'^', 'I', '\316'}, {'^', 'i', '\356'}, ++ {'"', 'I', '\317'}, {'"', 'i', '\357'}, ++ {'-', 'D', '\320'}, {'-', 'd', '\360'}, ++ {'~', 'N', '\321'}, {'~', 'n', '\361'}, ++ {'`', 'O', '\322'}, {'`', 'o', '\362'}, ++ {'\'', 'O', '\323'}, {'\'', 'o', '\363'}, ++ {'^', 'O', '\324'}, {'^', 'o', '\364'}, ++ {'~', 'O', '\325'}, {'~', 'o', '\365'}, ++ {'"', 'O', '\326'}, {'"', 'o', '\366'}, ++ {'/', 'O', '\330'}, {'/', 'o', '\370'}, ++ {'`', 'U', '\331'}, {'`', 'u', '\371'}, ++ {'\'', 'U', '\332'}, {'\'', 'u', '\372'}, ++ {'^', 'U', '\333'}, {'^', 'u', '\373'}, ++ {'"', 'U', '\334'}, {'"', 'u', '\374'}, ++ {'\'', 'Y', '\335'}, {'\'', 'y', '\375'}, ++ {'T', 'H', '\336'}, {'t', 'h', '\376'}, ++ {'s', 's', '\337'}, {'"', 'y', '\377'}, ++ {'s', 'z', '\337'}, {'i', 'j', '\377'}, + }; + + unsigned int accent_table_size = 68; +--- a/drivers/tty/vt/defkeymap.map ++++ b/drivers/tty/vt/defkeymap.map +@@ -1,5 +1,5 @@ + # Default kernel keymap. This uses 7 modifier combinations. +-keymaps 0-2,4-5,8,12 ++keymaps 0-2,4-5,8,12,64 + # Change the above line into + # keymaps 0-2,4-6,8,12 + # in case you want the entries +@@ -45,24 +45,38 @@ keycode 12 = minus underscor + control keycode 12 = Control_underscore + shift control keycode 12 = Control_underscore + alt keycode 12 = Meta_minus +-keycode 13 = equal plus ++keycode 13 = equal plus + alt keycode 13 = Meta_equal ++ altgr keycode 13 = asciitilde ++ ctrll keycode 13 = three + keycode 14 = Delete Delete +- control keycode 14 = BackSpace ++ altgr keycode 14 = BackSpace + alt keycode 14 = Meta_Delete + keycode 15 = Tab Tab + alt keycode 15 = Meta_Tab + keycode 16 = q ++ altgr keycode 16 = exclam + keycode 17 = w ++ altgr keycode 17 = at + keycode 18 = e +- altgr keycode 18 = Hex_E ++ altgr keycode 18 = numbersign + keycode 19 = r ++ altgr keycode 19 = dollar + keycode 20 = t ++ altgr keycode 20 = percent + keycode 21 = y ++ altgr keycode 21 = asciicircum + keycode 22 = u ++ altgr keycode 22 = ampersand ++ ctrll keycode 22 = seven + keycode 23 = i ++ altgr keycode 23 = asterisk ++ ctrll keycode 23 = eight + keycode 24 = o ++ altgr keycode 24 = parenleft ++ ctrll keycode 24 = nine + keycode 25 = p ++ altgr keycode 25 = parenright + keycode 26 = bracketleft braceleft + control keycode 26 = Escape + alt keycode 26 = Meta_bracketleft +@@ -71,19 +85,28 @@ keycode 27 = bracketright bracerigh + alt keycode 27 = Meta_bracketright + keycode 28 = Return + alt keycode 28 = Meta_Control_m +-keycode 29 = Control ++keycode 29 = CtrlL + keycode 30 = a +- altgr keycode 30 = Hex_A ++ altgr keycode 30 = U+00B0 + keycode 31 = s ++ altgr keycode 31 = U+00A8 + keycode 32 = d +- altgr keycode 32 = Hex_D ++ altgr keycode 32 = U+20AC + keycode 33 = f +- altgr keycode 33 = Hex_F ++ altgr keycode 33 = minus + keycode 34 = g ++ altgr keycode 34 = underscore + keycode 35 = h ++ altgr keycode 35 = braceleft + keycode 36 = j ++ altgr keycode 36 = bracketleft ++ ctrll keycode 36 = four + keycode 37 = k ++ altgr keycode 37 = bracketright ++ ctrll keycode 37 = five + keycode 38 = l ++ altgr keycode 38 = braceright ++ ctrll keycode 38 = six + keycode 39 = semicolon colon + alt keycode 39 = Meta_semicolon + keycode 40 = apostrophe quotedbl +@@ -97,58 +120,65 @@ keycode 43 = backslash bar + control keycode 43 = Control_backslash + alt keycode 43 = Meta_backslash + keycode 44 = z ++ altgr keycode 44 = nine + keycode 45 = x ++ altgr keycode 45 = zero + keycode 46 = c + altgr keycode 46 = Hex_C + keycode 47 = v + keycode 48 = b + altgr keycode 48 = Hex_B + keycode 49 = n ++ altgr keycode 49 = less ++ ctrll keycode 49 = one + keycode 50 = m +-keycode 51 = comma less +- alt keycode 51 = Meta_comma +-keycode 52 = period greater ++ altgr keycode 50 = greater ++ ctrll keycode 50 = two ++keycode 51 = comma semicolon ++ altgr keycode 51 = apostrophe ++keycode 52 = period colon + control keycode 52 = Compose +- alt keycode 52 = Meta_period ++ altgr keycode 52 = quotedbl + keycode 53 = slash question + control keycode 53 = Delete + alt keycode 53 = Meta_slash +-keycode 54 = Shift ++ ctrll keycode 53 = zero ++keycode 54 = AltGr + keycode 55 = KP_Multiply + keycode 56 = Alt + keycode 57 = space space + control keycode 57 = nul + alt keycode 57 = Meta_space + keycode 58 = Caps_Lock +-keycode 59 = F1 F11 Console_13 ++keycode 59 = F1 F11 one + control keycode 59 = F1 + alt keycode 59 = Console_1 + control alt keycode 59 = Console_1 +-keycode 60 = F2 F12 Console_14 ++keycode 60 = F2 F12 two + control keycode 60 = F2 + alt keycode 60 = Console_2 + control alt keycode 60 = Console_2 +-keycode 61 = F3 F13 Console_15 ++keycode 61 = F3 F13 three + control keycode 61 = F3 + alt keycode 61 = Console_3 + control alt keycode 61 = Console_3 +-keycode 62 = F4 F14 Console_16 ++keycode 62 = F4 F14 four + control keycode 62 = F4 + alt keycode 62 = Console_4 + control alt keycode 62 = Console_4 +-keycode 63 = F5 F15 Console_17 ++keycode 63 = F5 F15 five + control keycode 63 = F5 + alt keycode 63 = Console_5 + control alt keycode 63 = Console_5 +-keycode 64 = F6 F16 Console_18 ++keycode 64 = F6 F16 six + control keycode 64 = F6 + alt keycode 64 = Console_6 + control alt keycode 64 = Console_6 +-keycode 65 = F7 F17 Console_19 ++keycode 65 = F7 F17 seven + control keycode 65 = F7 + alt keycode 65 = Console_7 + control alt keycode 65 = Console_7 +-keycode 66 = F8 F18 Console_20 ++keycode 66 = F8 F18 eight + control keycode 66 = F8 + alt keycode 66 = Console_8 + control alt keycode 66 = Console_8 +@@ -220,7 +250,7 @@ keycode 93 = + keycode 94 = + keycode 95 = + keycode 96 = KP_Enter +-keycode 97 = Control ++keycode 97 = Control + keycode 98 = KP_Divide + keycode 99 = Control_backslash + control keycode 99 = Control_backslash diff --git a/recipes/linux/linux-kexecboot-2.6.37/collie/collie-locomo-kb.patch b/recipes/linux/linux-kexecboot-2.6.37/collie/collie-locomo-kb.patch new file mode 100644 index 0000000000..8b783e7906 --- /dev/null +++ b/recipes/linux/linux-kexecboot-2.6.37/collie/collie-locomo-kb.patch @@ -0,0 +1,31 @@ +ARM: 6658/1: collie: do actually pass locomo_info to locomo driver + +locomo_info isn't actually used as a platform_data on collie platform: + arm/mach-sa1100/collie.c:237: warning: locomo_info defined but not used + +So locomo driver doesn't setup IRQs correctly. Pass locomo_info to the +driver. + +Signed-off-by: Dmitry Eremin-Solenikov +Signed-off-by: Russell King +--- + arch/arm/mach-sa1100/collie.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c +index d43c5ef..bd3e1bf 100644 +--- a/arch/arm/mach-sa1100/collie.c ++++ b/arch/arm/mach-sa1100/collie.c +@@ -241,6 +241,9 @@ static struct locomo_platform_data locomo_info = { + struct platform_device collie_locomo_device = { + .name = "locomo", + .id = 0, ++ .dev = { ++ .platform_data = &locomo_info, ++ }, + .num_resources = ARRAY_SIZE(locomo_resources), + .resource = locomo_resources, + }; +-- +1.7.4.1 + diff --git a/recipes/linux/linux-kexecboot.inc b/recipes/linux/linux-kexecboot.inc index 40f41d69ab..ec78848dbe 100644 --- a/recipes/linux/linux-kexecboot.inc +++ b/recipes/linux/linux-kexecboot.inc @@ -1,15 +1,22 @@ # We set INC_PR here, since a change in the kexecboot recipe will need to get picked up by *all* the kernels: -INC_PR = "r28" +INC_PR = "r31" +inherit kernel siteinfo + +# Additional Sources for 2.6.24 and 2.6.26 +RPSRC = "http://www.rpsys.net/openzaurus/patches/archive" +TKSRC = "http://www.informatik.hu-berlin.de/~tkunze/zaurus/patches" + +# Kernel bootlogo is distro-specific (default is OE logo). +# Logo resolution (qvga, vga, ...) is machine-specific. LOGO_SIZE ?= "." SRC_URI = "file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2" -require linux.inc - -# we want the smallest size -INITRAMFS_IMAGE = "initramfs-kexecboot-klibc-image" +# Set the verbosity of kernel messages during runtime +# You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour.. +CMDLINE_DEBUG ?= '${@base_conditional("DISTRO_TYPE", "release", "loglevel=3", "debug", d)}' -# here we set master console on serial +# Note how we set master console on serial to protect bootlogo. CMDLINE_c7x0 = "console=tty1 console=ttyS0,115200n8 ${CMDLINE_DEBUG}" CMDLINE_tosa = "console=tty1 console=ttyS0,115200n8 ${CMDLINE_DEBUG}" CMDLINE_poodle = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 ${CMDLINE_DEBUG}" @@ -17,16 +24,11 @@ CMDLINE_akita = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 ${CMDLINE_DE CMDLINE_collie = "console=tty1 console=ttySA0,115200n8 fbcon=rotate:1 mem=64M ${CMDLINE_DEBUG}" CMDLINE_spitz = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 ${CMDLINE_DEBUG}" CMDLINE_hx4700 = "console=tty1 console=ttyS0,115200n8 fbcon=rotate:1 ${CMDLINE_DEBUG}" +CMDLINE_ben-nanonote = "console=tty0 console=ttyS0,57600n8 mem=32M ${CMDLINE_DEBUG}" PACKAGES = "" PROVIDES = "" -DOSRC = "http://www.do13.de/openzaurus/patches" -JLSRC = "http://www.cs.wisc.edu/~lenz/zaurus/files" -BASRC = "http://www.orca.cx/zaurus/patches" -CHSRC = "http://oz.drigon.com/patches" -TKSRC = "http://www.informatik.hu-berlin.de/~tkunze/zaurus/patches" - # Zaurus machines need kernel size-check KERNEL_IMAGE_MAXSIZE_akita = "1294336" KERNEL_IMAGE_MAXSIZE_c7x0 = "1294336" @@ -38,6 +40,11 @@ KERNEL_IMAGE_MAXSIZE_spitz = "1294336" KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-kexecboot-${PV}-${PR}-${MACHINE}" KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-kexecboot-${MACHINE}" +LOCALVERSION ?= "" + +# we want the smallest size +INITRAMFS_IMAGE = "initramfs-kexecboot-klibc-image" + # use custom function until base_version_less_or_equal is fixed # def kernel_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d): @@ -50,6 +57,7 @@ def kernel_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d) # force lzma compression for kernel (linux-kexecboot >= 2.6.32) # force lzma compression for initramfs (linux-kexecboot >= 2.6.30) +DEPENDS += '${@kernel_version_less_or_equal("PV", "2.6.29", "", "lzma-native", d)}' KERNEL_COMPRESSION = '${@kernel_version_less_or_equal("PV", "2.6.31", "", "CONFIG_KERNEL_LZMA=y", d)}' @@ -57,31 +65,76 @@ INITRAMFS_COMPRESSION = '${@kernel_version_less_or_equal("PV", "2.6.29", "", "CO INITRAMFS_COMPRESSION_SUFFIX = '${@kernel_version_less_or_equal("PV", "2.6.29", "gz", "lzma", d)}' RD_COMPRESSION = '${@kernel_version_less_or_equal("PV", "2.6.29", "", "CONFIG_RD_LZMA=y", d)}' -do_configure_append() { -sed -i -e /CONFIG_BLK_DEV_INITRD/d \ - -e /CONFIG_KEXEC/d \ - -e /CONFIG_KERNEL/d \ - -e /CONFIG_INITRAMFS_SOURCE/d \ - -e /CONFIG_INITRAMFS_COMPRESSION/d \ - -e /CONFIG_RD/d \ - -e /=m/d \ - -e /CONFIG_MODULES/d \ - -e /CONFIG_DEBUG_ERRORS/d \ - -e /CONFIG_DEBUG_BUGVERBOSE/d \ - -e /CONFIG_DEBUG_KERNEL/d \ - ${S}/.config - -# Remove last tag appended by linux.inc (output messes screen) -sed -i -e /CONFIG_CMDLINE/s/quiet/loglevel=3/1 ${S}/.config -sed -i -e /CONFIG_CMDLINE/s/debug/loglevel=3/1 ${S}/.config - -echo 'CONFIG_BLK_DEV_INITRD=y -CONFIG_KEXEC=y -${KERNEL_COMPRESSION} -${INITRAMFS_COMPRESSION} -CONFIG_INITRAMFS_SOURCE="initramfs.cpio.${INITRAMFS_COMPRESSION_SUFFIX}" -${RD_COMPRESSION} -CONFIG_MODULES=n' >> ${S}/.config +do_configure_prepend() { + + # Rename getline in ./scripts/unifdef.c + # Kernels up to 2.6.29 are currently failing to build unifdef.c, + # clashing with exposed getline() from + # see https://patchwork.kernel.org/patch/11166/ + # committed in 2.6.29 (commit d15bd1067b1fcb2b7250d22bc0c7c7fea0b759f7) + + if [ -e ${S}/scripts/unifdef.c ]; then + sed -i -e 's/getline/parseline/g' ${S}/scripts/unifdef.c + fi + + echo "" > ${S}/.config + + echo "CONFIG_CMDLINE=\"${CMDLINE}\"" >> ${S}/.config + + # + # endian support + # + if [ "${SITEINFO_ENDIANNESS}" = "be" ]; then + echo "CONFIG_CPU_BIG_ENDIAN=y" >> ${S}/.config + fi + + # + # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it is going to be used + # + if [ -e ${WORKDIR}/${LOGO_SIZE}/logo_linux_clut224.ppm ]; then + install -m 0644 ${WORKDIR}/${LOGO_SIZE}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm + echo "CONFIG_LOGO=y" >> ${S}/.config + echo "CONFIG_LOGO_LINUX_CLUT224=y" >> ${S}/.config + fi + + # When enabling thumb for userspace we also need thumb support in the kernel + if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then + sed -i -e /CONFIG_ARM_THUMB/d ${WORKDIR}/defconfig + echo "CONFIG_ARM_THUMB=y" >> ${S}/.config + fi + + sed -e '/CONFIG_CMDLINE=/d' \ + -e '/CONFIG_CPU_BIG_ENDIAN/d' \ + -e '/CONFIG_LOGO=/d' \ + -e '/CONFIG_LOGO_LINUX_CLUT224=/d' \ + -e '/CONFIG_LOCALVERSION/d' \ + -e '/CONFIG_LOCALVERSION_AUTO/d' \ + < '${WORKDIR}/defconfig' >>'${S}/.config' + + echo 'CONFIG_LOCALVERSION="${LOCALVERSION}"' >>${S}/.config + echo '# CONFIG_LOCALVERSION_AUTO is not set' >>${S}/.config + + # Force sane defaults for kexec-enabled kernels and keep size small + sed -i -e /CONFIG_BLK_DEV_INITRD/d \ + -e /CONFIG_KEXEC/d \ + -e /CONFIG_KERNEL/d \ + -e /CONFIG_INITRAMFS_COMPRESSION/d \ + -e /CONFIG_INITRAMFS_SOURCE/d \ + -e /CONFIG_RD/d \ + -e /=m/d \ + -e /CONFIG_MODULES/d \ + -e /CONFIG_DEBUG_ERRORS/d \ + -e /CONFIG_DEBUG_BUGVERBOSE/d \ + -e /CONFIG_DEBUG_KERNEL/d \ + ${S}/.config + + echo 'CONFIG_BLK_DEV_INITRD=y' >>${S}/.config + echo 'CONFIG_KEXEC=y' >>${S}/.config + echo '${KERNEL_COMPRESSION}' >>${S}/.config + echo '"${INITRAMFS_COMPRESSION}"' >>${S}/.config + echo 'CONFIG_INITRAMFS_SOURCE="initramfs.cpio.${INITRAMFS_COMPRESSION_SUFFIX}"' >>${S}/.config + echo '"${RD_COMPRESSION}"' >>${S}/.config + echo 'CONFIG_MODULES=n' >> ${S}/.config yes '' | oe_runmake oldconfig } @@ -94,3 +147,22 @@ do_install() { python do_package() { } + + +# With 2.6.37 mips has no uImage target upstream. +# use custom task in the meantime + +do_uboot_mkimage_ben-nanonote() { + cd ${S} + kernel_entry=`nm vmlinux | grep " kernel_entry" | cut -d' ' -f1` + + cd ${S}/arch/mips/boot + rm -f vmlinux.bin.gz + gzip -c9 vmlinux.bin > vmlinux.bin.gz + + mkimage -A mips -O linux -T kernel -C gzip -a 0x80010000 -e 0x${kernel_entry} \ + -n 'MIPS' -d vmlinux.bin.gz uImage-kexecboot-${PV}-${PR}-${MACHINE}.bin + + install -d ${DEPLOY_DIR_IMAGE} + install -m 0644 uImage-kexecboot-${PV}-${PR}-${MACHINE}.bin ${DEPLOY_DIR_IMAGE} +} diff --git a/recipes/linux/linux-kexecboot_2.6.36.bb b/recipes/linux/linux-kexecboot_2.6.36.bb index 02b09ae00c..d36328faa7 100644 --- a/recipes/linux/linux-kexecboot_2.6.36.bb +++ b/recipes/linux/linux-kexecboot_2.6.36.bb @@ -1,6 +1,6 @@ require linux-kexecboot.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" S = "${WORKDIR}/linux-${PV}" @@ -10,5 +10,7 @@ DEFAULT_PREFERENCE = "-1" SRC_URI += "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \ file://defconfig" +SRC_URI_append_collie = " file://collie-locomo-kb.patch;status=upstream " + SRC_URI[kernel.md5sum] = "61f3739a73afb6914cb007f37fb09b62" SRC_URI[kernel.sha256sum] = "15a076d1a435a6bf8e92834eba4b390b4ec094ce06d47f89d071ca9e5788ce04" diff --git a/recipes/linux/linux-kexecboot_2.6.37.bb b/recipes/linux/linux-kexecboot_2.6.37.bb index c33ef19396..192548887f 100644 --- a/recipes/linux/linux-kexecboot_2.6.37.bb +++ b/recipes/linux/linux-kexecboot_2.6.37.bb @@ -1,14 +1,26 @@ require linux-kexecboot.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.3" S = "${WORKDIR}/linux-${PV}" # Mark archs/machines that this kernel supports DEFAULT_PREFERENCE = "-1" +DEFAULT_PREFERENCE_ben-nanonote = "1" + SRC_URI += "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \ - file://defconfig" + ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.2.bz2;name=stablepatch \ + file://defconfig " + +SRC_URI_append_collie = " file://collie-locomo-kb.patch;status=upstream " + +SRC_URI_append_ben-nanonote = "file://modifier-keys.patch \ + file://defconfig \ +# file://jz4740-udc.patch \ + " SRC_URI[kernel.md5sum] = "c8ee37b4fdccdb651e0603d35350b434" SRC_URI[kernel.sha256sum] = "edbf091805414739cf57a3bbfeba9e87f5e74f97e38f04d12060e9e0c71e383a" +SRC_URI[stablepatch.md5sum] = "bb5798f2a2a5af13219d1a250c4dad11" +SRC_URI[stablepatch.sha256sum] = "3d65f2fb5f0018e8dafda4abe68d947d2ab5e21c386062cb0d6e011244a16aef" diff --git a/recipes/linux/linux-omap-2.6.39/beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch b/recipes/linux/linux-omap-2.6.39/beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch new file mode 100644 index 0000000000..2bd76c3cec --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch @@ -0,0 +1,117 @@ +From 812ef26f4be80d12facd62adce971ec9fe64a144 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Fri, 20 May 2011 12:48:37 +0200 +Subject: [PATCH 1/5] OMAP3: beagle: add support for beagleboard xM revision C + +The USB enable GPIO has been inverted and the USER button moved. + +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle.c | 34 +++++++++++++++++++++++------- + 1 files changed, 26 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 2de4b02..77bafa8 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -62,7 +62,9 @@ + * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1 + * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0 + * C4 = GPIO173, GPIO172, GPIO171: 1 0 1 +- * XM = GPIO173, GPIO172, GPIO171: 0 0 0 ++ * XMA = GPIO173, GPIO172, GPIO171: 0 0 0 ++ * XMB = GPIO173, GPIO172, GPIO171: 0 0 1 ++ * XMC = GPIO173, GPIO172, GPIO171: 0 1 0 + */ + enum { + OMAP3BEAGLE_BOARD_UNKN = 0, +@@ -70,6 +72,7 @@ enum { + OMAP3BEAGLE_BOARD_C1_3, + OMAP3BEAGLE_BOARD_C4, + OMAP3BEAGLE_BOARD_XM, ++ OMAP3BEAGLE_BOARD_XMC, + }; + + static u8 omap3_beagle_version; +@@ -124,9 +127,18 @@ static void __init omap3_beagle_init_rev(void) + printk(KERN_INFO "OMAP3 Beagle Rev: xM\n"); + omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; + break; ++ case 1: ++ printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; ++ break; ++ case 2: ++ printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; ++ break; + default: +- printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev); +- omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN; ++ printk(KERN_INFO ++ "OMAP3 Beagle Rev: unknown %hd, assuming xM C or newer\n", beagle_rev); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; + } + + return; +@@ -278,7 +290,7 @@ static int beagle_twl_gpio_setup(struct device *dev, + { + int r; + +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ if (cpu_is_omap3630()) { + mmc[0].gpio_wp = -EINVAL; + } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || + (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) { +@@ -298,7 +310,8 @@ static int beagle_twl_gpio_setup(struct device *dev, + /* REVISIT: need ehci-omap hooks for external VBUS + * power switch and overcurrent detect + */ +- if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) { ++ if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM ++ && omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC) { + r = gpio_request(gpio + 1, "EHCI_nOC"); + if (!r) { + r = gpio_direction_input(gpio + 1); +@@ -320,7 +333,7 @@ static int beagle_twl_gpio_setup(struct device *dev, + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); + + /* DVI reset GPIO is different between beagle revisions */ +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ++ if (cpu_is_omap3630()) + beagle_dvi_device.reset_gpio = 129; + else + beagle_dvi_device.reset_gpio = 170; +@@ -334,7 +347,7 @@ static int beagle_twl_gpio_setup(struct device *dev, + * P7/P8 revisions(prototype): Camera EN + * A2+ revisions (production): LDO (supplies DVI, serial, led blocks) + */ +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ if (cpu_is_omap3630()) { + r = gpio_request(gpio + 1, "nDVI_PWR_EN"); + if (!r) { + r = gpio_direction_output(gpio + 1, 0); +@@ -625,7 +638,7 @@ static void __init beagle_opp_init(void) + } + + /* Custom OPP enabled for XM */ +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ if (cpu_is_omap3630()) { + struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); + struct omap_hwmod *dh = omap_hwmod_lookup("iva"); + struct device *dev; +@@ -665,6 +678,11 @@ static void __init omap3_beagle_init(void) + omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); + omap3_beagle_init_rev(); + omap3_beagle_i2c_init(); ++ ++ if (cpu_is_omap3630()) { ++ gpio_buttons[0].gpio = 4; ++ } ++ + platform_add_devices(omap3_beagle_devices, + ARRAY_SIZE(omap3_beagle_devices)); + omap_display_init(&beagle_dss_data); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/beagle/0002-OMAP3-beagle-add-support-for-expansionboards.patch b/recipes/linux/linux-omap-2.6.39/beagle/0002-OMAP3-beagle-add-support-for-expansionboards.patch new file mode 100644 index 0000000000..ab63acf561 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/beagle/0002-OMAP3-beagle-add-support-for-expansionboards.patch @@ -0,0 +1,359 @@ +From e87dd8c997e212b8c14468c869c83d6953da3c34 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Fri, 20 May 2011 13:06:24 +0200 +Subject: [PATCH 2/5] OMAP3: beagle: add support for expansionboards + +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle.c | 272 ++++++++++++++++++++++++++++++- + 1 files changed, 269 insertions(+), 3 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 77bafa8..db285e1 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -21,6 +21,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -154,6 +155,167 @@ fail0: + return; + } + ++char expansionboard_name[16]; ++ ++#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE) ++#include ++#include ++ ++#define OMAP_BEAGLE_WLAN_EN_GPIO (139) ++#define OMAP_BEAGLE_BT_EN_GPIO (138) ++#define OMAP_BEAGLE_WLAN_IRQ_GPIO (137) ++#define OMAP_BEAGLE_FM_EN_BT_WU (136) ++ ++struct wl12xx_platform_data omap_beagle_wlan_data __initdata = { ++ .irq = OMAP_GPIO_IRQ(OMAP_BEAGLE_WLAN_IRQ_GPIO), ++ .board_ref_clock = 2, /* 38.4 MHz */ ++}; ++ ++static int gpios[] = {OMAP_BEAGLE_BT_EN_GPIO, OMAP_BEAGLE_FM_EN_BT_WU, -1}; ++static struct platform_device wl12xx_device = { ++ .name = "kim", ++ .id = -1, ++ .dev.platform_data = &gpios, ++}; ++ ++static struct omap2_hsmmc_info mmcbbt[] = { ++ { ++ .mmc = 1, ++ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, ++ .gpio_wp = 29, ++ }, ++ { ++ .name = "wl1271", ++ .mmc = 2, ++ .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD, ++ .gpio_wp = -EINVAL, ++ .gpio_cd = -EINVAL, ++ .ocr_mask = MMC_VDD_165_195, ++ .nonremovable = true, ++ }, ++ {} /* Terminator */ ++ }; ++ ++static struct regulator_consumer_supply beagle_vmmc2_supply = ++ REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); ++ ++static struct regulator_init_data beagle_vmmc2 = { ++ .constraints = { ++ .min_uV = 1850000, ++ .max_uV = 1850000, ++ .apply_uV = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE ++ | REGULATOR_CHANGE_STATUS, ++ }, ++ .num_consumer_supplies = 1, ++ .consumer_supplies = &beagle_vmmc2_supply, ++}; ++ ++static struct fixed_voltage_config beagle_vwlan = { ++ .supply_name = "vwl1271", ++ .microvolts = 1800000, /* 1.8V */ ++ .gpio = OMAP_BEAGLE_WLAN_EN_GPIO, ++ .startup_delay = 70000, /* 70ms */ ++ .enable_high = 1, ++ .enabled_at_boot = 0, ++ .init_data = &beagle_vmmc2, ++}; ++ ++static struct platform_device omap_vwlan_device = { ++ .name = "reg-fixed-voltage", ++ .id = 1, ++ .dev = { ++ .platform_data = &beagle_vwlan, ++ }, ++}; ++#endif ++ ++#if defined(CONFIG_ENC28J60) || defined(CONFIG_ENC28J60_MODULE) ++ ++#include ++#include ++ ++#define OMAP3BEAGLE_GPIO_ENC28J60_IRQ 157 ++ ++static struct omap2_mcspi_device_config enc28j60_spi_chip_info = { ++ .turbo_mode = 0, ++ .single_channel = 1, /* 0: slave, 1: master */ ++}; ++ ++static struct spi_board_info omap3beagle_zippy_spi_board_info[] __initdata = { ++ { ++ .modalias = "enc28j60", ++ .bus_num = 4, ++ .chip_select = 0, ++ .max_speed_hz = 20000000, ++ .controller_data = &enc28j60_spi_chip_info, ++ }, ++}; ++ ++static void __init omap3beagle_enc28j60_init(void) ++{ ++ if ((gpio_request(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, "ENC28J60_IRQ") == 0) && ++ (gpio_direction_input(OMAP3BEAGLE_GPIO_ENC28J60_IRQ) == 0)) { ++ gpio_export(OMAP3BEAGLE_GPIO_ENC28J60_IRQ, 0); ++ omap3beagle_zippy_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_ENC28J60_IRQ); ++ irq_set_irq_type(omap3beagle_zippy_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING); ++ } else { ++ printk(KERN_ERR "could not obtain gpio for ENC28J60_IRQ\n"); ++ return; ++ } ++ ++ spi_register_board_info(omap3beagle_zippy_spi_board_info, ++ ARRAY_SIZE(omap3beagle_zippy_spi_board_info)); ++} ++ ++#else ++static inline void __init omap3beagle_enc28j60_init(void) { return; } ++#endif ++ ++#if defined(CONFIG_KS8851) || defined(CONFIG_KS8851_MODULE) ++ ++#include ++#include ++ ++#define OMAP3BEAGLE_GPIO_KS8851_IRQ 157 ++ ++static struct omap2_mcspi_device_config ks8851_spi_chip_info = { ++ .turbo_mode = 0, ++ .single_channel = 1, /* 0: slave, 1: master */ ++}; ++ ++static struct spi_board_info omap3beagle_zippy2_spi_board_info[] __initdata = { ++ { ++ .modalias = "ks8851", ++ .bus_num = 4, ++ .chip_select = 0, ++ .max_speed_hz = 36000000, ++ .controller_data = &ks8851_spi_chip_info, ++ }, ++}; ++ ++static void __init omap3beagle_ks8851_init(void) ++{ ++ if ((gpio_request(OMAP3BEAGLE_GPIO_KS8851_IRQ, "KS8851_IRQ") == 0) && ++ (gpio_direction_input(OMAP3BEAGLE_GPIO_KS8851_IRQ) == 0)) { ++ gpio_export(OMAP3BEAGLE_GPIO_KS8851_IRQ, 0); ++ omap3beagle_zippy2_spi_board_info[0].irq = OMAP_GPIO_IRQ(OMAP3BEAGLE_GPIO_KS8851_IRQ); ++ irq_set_irq_type(omap3beagle_zippy2_spi_board_info[0].irq, IRQ_TYPE_EDGE_FALLING); ++ } else { ++ printk(KERN_ERR "could not obtain gpio for KS8851_IRQ\n"); ++ return; ++ } ++ ++ spi_register_board_info(omap3beagle_zippy2_spi_board_info, ++ ARRAY_SIZE(omap3beagle_zippy2_spi_board_info)); ++} ++ ++#else ++static inline void __init omap3beagle_ks8851_init(void) { return; } ++#endif ++ + static struct mtd_partition omap3beagle_nand_partitions[] = { + /* All the partition sizes are listed in terms of NAND block size */ + { +@@ -272,6 +434,12 @@ static struct omap2_hsmmc_info mmc[] = { + .caps = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA, + .gpio_wp = 29, + }, ++ { ++ .mmc = 2, ++ .caps = MMC_CAP_4_BIT_DATA, ++ .transceiver = true, ++ .ocr_mask = 0x00100000, /* 3.3V */ ++ }, + {} /* Terminator */ + }; + +@@ -301,11 +469,25 @@ static int beagle_twl_gpio_setup(struct device *dev, + } + /* gpio + 0 is "mmc0_cd" (input/IRQ) */ + mmc[0].gpio_cd = gpio + 0; ++#if defined(CONFIG_WL12XX) || defined(CONFIG_WL12XX_MODULE) ++ if(!strcmp(expansionboard_name, "bbtoys-wifi")) { ++ omap2_hsmmc_init(mmcbbt); ++ /* link regulators to MMC adapters */ ++ beagle_vmmc1_supply.dev = mmcbbt[0].dev; ++ beagle_vsim_supply.dev = mmcbbt[0].dev; ++ } else { ++ omap2_hsmmc_init(mmc); ++ /* link regulators to MMC adapters */ ++ beagle_vmmc1_supply.dev = mmc[0].dev; ++ beagle_vsim_supply.dev = mmc[0].dev; ++ } ++#else + omap2_hsmmc_init(mmc); + + /* link regulators to MMC adapters */ + beagle_vmmc1_supply.dev = mmc[0].dev; + beagle_vsim_supply.dev = mmc[0].dev; ++#endif + + /* REVISIT: need ehci-omap hooks for external VBUS + * power switch and overcurrent detect +@@ -466,7 +648,7 @@ static struct twl4030_platform_data beagle_twldata = { + .vpll2 = &beagle_vpll2, + }; + +-static struct i2c_board_info __initdata beagle_i2c_boardinfo[] = { ++static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { + { + I2C_BOARD_INFO("twl4030", 0x48), + .flags = I2C_CLIENT_WAKE, +@@ -481,10 +663,24 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { + }, + }; + ++#if defined(CONFIG_RTC_DRV_DS1307) || \ ++ defined(CONFIG_RTC_DRV_DS1307_MODULE) ++ ++static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = { ++ { ++ I2C_BOARD_INFO("ds1307", 0x68), ++ }, ++}; ++#else ++static struct i2c_board_info __initdata beagle_i2c2_boardinfo[] = {}; ++#endif ++ + static int __init omap3_beagle_i2c_init(void) + { +- omap_register_i2c_bus(1, 2600, beagle_i2c_boardinfo, +- ARRAY_SIZE(beagle_i2c_boardinfo)); ++ omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, ++ ARRAY_SIZE(beagle_i2c1_boardinfo)); ++ omap_register_i2c_bus(2, 400, beagle_i2c2_boardinfo, ++ ARRAY_SIZE(beagle_i2c2_boardinfo)); + /* Bus 3 is attached to the DVI port where devices like the pico DLP + * projector don't work reliably with 400kHz */ + omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom)); +@@ -627,6 +823,15 @@ static struct omap_musb_board_data musb_board_data = { + .power = 100, + }; + ++static int __init expansionboard_setup(char *str) ++{ ++ if (!str) ++ return -EINVAL; ++ strncpy(expansionboard_name, str, 16); ++ printk(KERN_INFO "Beagle expansionboard: %s\n", expansionboard_name); ++ return 0; ++} ++ + static void __init beagle_opp_init(void) + { + int r = 0; +@@ -693,6 +898,65 @@ static void __init omap3_beagle_init(void) + /* REVISIT leave DVI powered down until it's needed ... */ + gpio_direction_output(170, true); + ++ if(!strcmp(expansionboard_name, "zippy")) ++ { ++ printk(KERN_INFO "Beagle expansionboard: initializing enc28j60\n"); ++ omap3beagle_enc28j60_init(); ++ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n"); ++ mmc[1].gpio_wp = 141; ++ mmc[1].gpio_cd = 162; ++ } ++ ++ if(!strcmp(expansionboard_name, "zippy2")) ++ { ++ printk(KERN_INFO "Beagle expansionboard: initializing ks_8851\n"); ++ omap3beagle_ks8851_init(); ++ printk(KERN_INFO "Beagle expansionboard: assigning GPIO 141 and 162 to MMC1\n"); ++ mmc[1].gpio_wp = 141; ++ mmc[1].gpio_cd = 162; ++ } ++ ++ if(!strcmp(expansionboard_name, "trainer")) ++ { ++ printk(KERN_INFO "Beagle expansionboard: exporting GPIOs 130-141,162 to userspace\n"); ++ gpio_request(130, "sysfs"); ++ gpio_export(130, 1); ++ gpio_request(131, "sysfs"); ++ gpio_export(131, 1); ++ gpio_request(132, "sysfs"); ++ gpio_export(132, 1); ++ gpio_request(133, "sysfs"); ++ gpio_export(133, 1); ++ gpio_request(134, "sysfs"); ++ gpio_export(134, 1); ++ gpio_request(135, "sysfs"); ++ gpio_export(135, 1); ++ gpio_request(136, "sysfs"); ++ gpio_export(136, 1); ++ gpio_request(137, "sysfs"); ++ gpio_export(137, 1); ++ gpio_request(138, "sysfs"); ++ gpio_export(138, 1); ++ gpio_request(139, "sysfs"); ++ gpio_export(139, 1); ++ gpio_request(140, "sysfs"); ++ gpio_export(140, 1); ++ gpio_request(141, "sysfs"); ++ gpio_export(141, 1); ++ gpio_request(162, "sysfs"); ++ gpio_export(162, 1); ++ } ++ ++ if(!strcmp(expansionboard_name, "bbtoys-wifi")) ++ { ++ if (wl12xx_set_platform_data(&omap_beagle_wlan_data)) ++ pr_err("error setting wl12xx data\n"); ++ printk(KERN_INFO "Beagle expansionboard: registering wl12xx bt platform device\n"); ++ platform_device_register(&wl12xx_device); ++ printk(KERN_INFO "Beagle expansionboard: registering wl12xx wifi platform device\n"); ++ platform_device_register(&omap_vwlan_device); ++ } ++ + usb_musb_init(&musb_board_data); + usbhs_init(&usbhs_bdata); + omap3beagle_flash_init(); +@@ -705,6 +969,8 @@ static void __init omap3_beagle_init(void) + beagle_opp_init(); + } + ++early_param("buddy", expansionboard_setup); ++ + MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") + /* Maintainer: Syed Mohammed Khasim - http://beagleboard.org */ + .boot_params = 0x80000100, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/beagle/0003-OMAP3-beagle-add-MADC-support.patch b/recipes/linux/linux-omap-2.6.39/beagle/0003-OMAP3-beagle-add-MADC-support.patch new file mode 100644 index 0000000000..7984a30ece --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/beagle/0003-OMAP3-beagle-add-MADC-support.patch @@ -0,0 +1,36 @@ +From 140a5cddce807e20e32a5ddcf7c00a758ff5016d Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Sat, 21 May 2011 16:18:30 +0200 +Subject: [PATCH 3/5] OMAP3: beagle: add MADC support + +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index db285e1..da4ba50 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -634,6 +634,10 @@ static struct twl4030_codec_data beagle_codec_data = { + .audio = &beagle_audio_data, + }; + ++static struct twl4030_madc_platform_data beagle_madc_data = { ++ .irq_line = 1, ++}; ++ + static struct twl4030_platform_data beagle_twldata = { + .irq_base = TWL4030_IRQ_BASE, + .irq_end = TWL4030_IRQ_END, +@@ -642,6 +646,7 @@ static struct twl4030_platform_data beagle_twldata = { + .usb = &beagle_usb_data, + .gpio = &beagle_gpio_data, + .codec = &beagle_codec_data, ++ .madc = &beagle_madc_data, + .vmmc1 = &beagle_vmmc1, + .vsim = &beagle_vsim, + .vdac = &beagle_vdac, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch b/recipes/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch new file mode 100644 index 0000000000..29ebb401cf --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch @@ -0,0 +1,88 @@ +From 482c65c01edad75e2b8a3fa07f0fc914e3c9b9d9 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 25 May 2011 08:56:06 +0200 +Subject: [PATCH 4/5] OMAP3: beagle: add regulators for camera interface + +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle.c | 50 +++++++++++++++++++++++++++++++ + 1 files changed, 50 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index da4ba50..211cbdf 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -453,6 +453,44 @@ static struct regulator_consumer_supply beagle_vsim_supply = { + + static struct gpio_led gpio_leds[]; + ++static struct regulator_consumer_supply beagle_vaux3_supply = { ++ .supply = "cam_1v8", ++}; ++ ++static struct regulator_consumer_supply beagle_vaux4_supply = { ++ .supply = "cam_2v8", ++}; ++ ++/* VAUX3 for CAM_1V8 */ ++static struct regulator_init_data beagle_vaux3 = { ++ .constraints = { ++ .min_uV = 1800000, ++ .max_uV = 1800000, ++ .apply_uV = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE ++ | REGULATOR_CHANGE_STATUS, ++ }, ++ .num_consumer_supplies = 1, ++ .consumer_supplies = &beagle_vaux3_supply, ++}; ++ ++/* VAUX4 for CAM_2V8 */ ++static struct regulator_init_data beagle_vaux4 = { ++ .constraints = { ++ .min_uV = 1800000, ++ .max_uV = 1800000, ++ .apply_uV = true, ++ .valid_modes_mask = REGULATOR_MODE_NORMAL ++ | REGULATOR_MODE_STANDBY, ++ .valid_ops_mask = REGULATOR_CHANGE_MODE ++ | REGULATOR_CHANGE_STATUS, ++ }, ++ .num_consumer_supplies = 1, ++ .consumer_supplies = &beagle_vaux4_supply, ++}; ++ + static int beagle_twl_gpio_setup(struct device *dev, + unsigned gpio, unsigned ngpio) + { +@@ -504,6 +542,16 @@ static int beagle_twl_gpio_setup(struct device *dev, + pr_err("%s: unable to configure EHCI_nOC\n", __func__); + } + ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ /* ++ * Power on camera interface - only on pre-production, not ++ * needed on production boards ++ */ ++ gpio_request(gpio + 2, "CAM_EN"); ++ gpio_direction_output(gpio + 2, 1); ++ } ++ ++ + /* + * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active + * high / others active low) +@@ -651,6 +699,8 @@ static struct twl4030_platform_data beagle_twldata = { + .vsim = &beagle_vsim, + .vdac = &beagle_vdac, + .vpll2 = &beagle_vpll2, ++ .vaux3 = &beagle_vaux3, ++ .vaux4 = &beagle_vaux4, + }; + + static struct i2c_board_info __initdata beagle_i2c1_boardinfo[] = { +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/beagle/0005-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch b/recipes/linux/linux-omap-2.6.39/beagle/0005-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch new file mode 100644 index 0000000000..c0e31042ae --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/beagle/0005-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch @@ -0,0 +1,31 @@ +From 6654672586808d22510d06d54464f4fe32ae6e80 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 25 May 2011 08:57:40 +0200 +Subject: [PATCH 5/5] OMAP3: beagle: HACK! add in 1GHz OPP + +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 211cbdf..221bfda 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -911,11 +911,13 @@ static void __init beagle_opp_init(void) + /* Enable MPU 1GHz and lower opps */ + dev = &mh->od->pdev.dev; + r = opp_enable(dev, 800000000); ++ r |= opp_enable(dev, 1000000000); + /* TODO: MPU 1GHz needs SR and ABB */ + + /* Enable IVA 800MHz and lower opps */ + dev = &dh->od->pdev.dev; + r |= opp_enable(dev, 660000000); ++ r |= opp_enable(dev, 800000000); + /* TODO: DSP 800MHz needs SR and ABB */ + if (r) { + pr_err("%s: failed to enable higher opp %d\n", +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/beagleboard/configs/stock b/recipes/linux/linux-omap-2.6.39/beagleboard/configs/stock new file mode 100644 index 0000000000..dd288e24d7 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/beagleboard/configs/stock @@ -0,0 +1,3490 @@ +# +# Automatically generated make config: don't edit +# Linux/arm 2.6.39 Kernel Configuration +# Fri May 20 13:11:13 2011 +# +CONFIG_ARM=y +CONFIG_HAVE_PWM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_SCHED_CLOCK=y +CONFIG_GENERIC_GPIO=y +# CONFIG_ARCH_USES_GETTIMEOFFSET is not set +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_KTIME_SCALAR=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_LZO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_FHANDLE=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_HAVE_SPARSE_IRQ=y +CONFIG_GENERIC_IRQ_SHOW=y +# CONFIG_SPARSE_IRQ is not set + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +# CONFIG_TINY_RCU is not set +# CONFIG_TINY_PREEMPT_RCU is not set +CONFIG_PREEMPT_RCU=y +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +CONFIG_CGROUP_NS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CPUSETS=y +CONFIG_PROC_PID_CPUSET=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_MEM_RES_CTLR=y +CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y +CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +# CONFIG_BLK_CGROUP is not set +# CONFIG_NAMESPACES is not set +CONFIG_SCHED_AUTOGROUP=y +CONFIG_MM_OWNER=y +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +CONFIG_RD_XZ=y +CONFIG_RD_LZO=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EXPERT=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_PERF_COUNTERS is not set +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +# CONFIG_INLINE_WRITE_UNLOCK is not set +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +# CONFIG_MUTEX_SPIN_ON_OWNER is not set +CONFIG_FREEZER=y + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCMRING is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_STMP3XXX is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_NUC93X is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5P6442 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS4 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_TCC_926 is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_DAVINCI is not set +CONFIG_ARCH_OMAP=y +# CONFIG_PLAT_SPEAR is not set +# CONFIG_ARCH_VT8500 is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_KEYBOARD_GPIO_POLLED is not set + +# +# TI OMAP Common Features +# +CONFIG_ARCH_OMAP_OTG=y +# CONFIG_ARCH_OMAP1 is not set +CONFIG_ARCH_OMAP2PLUS=y + +# +# OMAP Feature Selections +# +CONFIG_OMAP_SMARTREFLEX=y +CONFIG_OMAP_SMARTREFLEX_CLASS3=y +CONFIG_OMAP_RESET_CLOCKS=y +# CONFIG_OMAP_MUX is not set +CONFIG_OMAP_MCBSP=y +CONFIG_OMAP_MBOX_FWK=m +CONFIG_OMAP_MBOX_KFIFO_SIZE=256 +CONFIG_OMAP_IOMMU=y +CONFIG_OMAP_IOMMU_DEBUG=m +CONFIG_OMAP_32K_TIMER=y +# CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set +CONFIG_OMAP_32K_TIMER_HZ=128 +CONFIG_OMAP_DM_TIMER=y +# CONFIG_OMAP_PM_NONE is not set +CONFIG_OMAP_PM_NOOP=y + +# +# TI OMAP2/3/4 Specific Features +# +CONFIG_ARCH_OMAP2PLUS_TYPICAL=y +# CONFIG_ARCH_OMAP2 is not set +CONFIG_ARCH_OMAP3=y +# CONFIG_ARCH_OMAP4 is not set +CONFIG_SOC_OMAP3430=y +# CONFIG_SOC_OMAPTI816X is not set +CONFIG_OMAP_PACKAGE_CBB=y + +# +# OMAP Board Type +# +CONFIG_MACH_OMAP3_BEAGLE=y +# CONFIG_MACH_DEVKIT8000 is not set +# CONFIG_MACH_OMAP_LDP is not set +# CONFIG_MACH_OMAP3530_LV_SOM is not set +# CONFIG_MACH_OMAP3_TORPEDO is not set +CONFIG_MACH_OVERO=y +CONFIG_MACH_OMAP3EVM=y +# CONFIG_MACH_OMAP3517EVM is not set +# CONFIG_MACH_CRANEBOARD is not set +# CONFIG_MACH_OMAP3_PANDORA is not set +CONFIG_MACH_OMAP3_TOUCHBOOK=y +# CONFIG_MACH_OMAP_3430SDP is not set +# CONFIG_MACH_NOKIA_RM680 is not set +# CONFIG_MACH_NOKIA_RX51 is not set +CONFIG_MACH_OMAP_ZOOM2=y +# CONFIG_MACH_OMAP_ZOOM3 is not set +# CONFIG_MACH_CM_T35 is not set +# CONFIG_MACH_CM_T3517 is not set +# CONFIG_MACH_IGEP0020 is not set +# CONFIG_MACH_IGEP0030 is not set +# CONFIG_MACH_SBC3530 is not set +# CONFIG_MACH_OMAP_3630SDP is not set +# CONFIG_OMAP3_EMU is not set +# CONFIG_OMAP3_SDRC_AC_TIMING is not set + +# +# System MMU +# + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +# CONFIG_SWP_EMULATE is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_ERRATA_430973=y +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_754322 is not set + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_HZ=128 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_HIGHMEM is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_NEED_PER_CPU_KM=y +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_LEDS=y +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_DEPRECATED_PARAM_STRUCT is not set + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE=" debug " +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +CONFIG_KEXEC=y +CONFIG_ATAGS_PROC=y +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +CONFIG_CPU_FREQ_DEBUG=y +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_STAT_DETAILS=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=y + +# +# Power management options +# +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_PM_SLEEP=y +CONFIG_PM_RUNTIME=y +CONFIG_PM=y +CONFIG_PM_DEBUG=y +# CONFIG_PM_VERBOSE is not set +# CONFIG_PM_ADVANCED_DEBUG is not set +# CONFIG_PM_TEST_SUSPEND is not set +CONFIG_CAN_PM_TRACE=y +# CONFIG_APM_EMULATION is not set +CONFIG_ARCH_HAS_OPP=y +CONFIG_PM_OPP=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_IPCOMP=m +CONFIG_NET_KEY=y +# CONFIG_NET_KEY_MIGRATE is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_ROUTE_CLASSID=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=y +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_YEAH=m +CONFIG_TCP_CONG_ILLINOIS=m +CONFIG_DEFAULT_CUBIC=y +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_MIP6=m +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +# CONFIG_IPV6_PIMSM_V2 is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NETWORK_PHY_TIMESTAMPING=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_MARK=y +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CT_PROTO_DCCP=m +CONFIG_NF_CT_PROTO_GRE=m +CONFIG_NF_CT_PROTO_SCTP=m +CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_BROADCAST=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +# CONFIG_NETFILTER_TPROXY is not set +CONFIG_NETFILTER_XTABLES=m + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=m +CONFIG_NETFILTER_XT_CONNMARK=m +CONFIG_NETFILTER_XT_SET=m + +# +# Xtables targets +# +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_CT=m +# CONFIG_NETFILTER_XT_TARGET_DSCP is not set +CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +# CONFIG_NETFILTER_XT_TARGET_LED is not set +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +CONFIG_NETFILTER_XT_TARGET_RATEEST=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +# CONFIG_NETFILTER_XT_TARGET_TRACE is not set +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set + +# +# Xtables matches +# +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_HL=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +# CONFIG_NETFILTER_XT_MATCH_OSF is not set +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_MAX=256 +# CONFIG_IP_SET_BITMAP_IP is not set +# CONFIG_IP_SET_BITMAP_IPMAC is not set +# CONFIG_IP_SET_BITMAP_PORT is not set +# CONFIG_IP_SET_HASH_IP is not set +# CONFIG_IP_SET_HASH_IPPORT is not set +# CONFIG_IP_SET_HASH_IPPORTIP is not set +# CONFIG_IP_SET_HASH_IPPORTNET is not set +# CONFIG_IP_SET_HASH_NET is not set +# CONFIG_IP_SET_HASH_NETPORT is not set +# CONFIG_IP_SET_LIST_SET is not set +CONFIG_IP_VS=m +CONFIG_IP_VS_IPV6=y +CONFIG_IP_VS_DEBUG=y +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS transport protocol load balancing support +# +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_AH_ESP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +# CONFIG_IP_VS_PROTO_SCTP is not set + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_NFCT=y +CONFIG_IP_VS_PE_SIP=m + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_NF_NAT_SNMP_BASIC=m +CONFIG_NF_NAT_PROTO_DCCP=m +CONFIG_NF_NAT_PROTO_GRE=m +CONFIG_NF_NAT_PROTO_UDPLITE=m +CONFIG_NF_NAT_PROTO_SCTP=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +CONFIG_NF_NAT_TFTP=m +CONFIG_NF_NAT_AMANDA=m +CONFIG_NF_NAT_PPTP=m +CONFIG_NF_NAT_H323=m +CONFIG_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV6=m +CONFIG_NF_CONNTRACK_IPV6=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +# CONFIG_BRIDGE_NF_EBTABLES is not set +CONFIG_IP_DCCP=m +CONFIG_INET_DCCP_DIAG=m + +# +# DCCP CCIDs Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=y +# CONFIG_IP_DCCP_CCID3_DEBUG is not set +CONFIG_IP_DCCP_TFRC_LIB=y + +# +# DCCP Kernel Hacking +# +# CONFIG_IP_DCCP_DEBUG is not set +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_RDS is not set +CONFIG_TIPC=m +# CONFIG_TIPC_ADVANCED is not set +# CONFIG_TIPC_DEBUG is not set +CONFIG_ATM=m +CONFIG_ATM_CLIP=m +# CONFIG_ATM_CLIP_NO_ICMP is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +CONFIG_ATM_BR2684=m +# CONFIG_ATM_BR2684_IPFILTER is not set +CONFIG_L2TP=m +CONFIG_L2TP_DEBUGFS=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_STP=m +CONFIG_GARP=m +CONFIG_BRIDGE=m +CONFIG_BRIDGE_IGMP_SNOOPING=y +# CONFIG_NET_DSA is not set +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +CONFIG_WAN_ROUTER=m +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +# CONFIG_NET_SCH_SFB is not set +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_CHOKE=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_IND=y +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y +# CONFIG_BATMAN_ADV is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m + +# +# CAN Device Drivers +# +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +# CONFIG_CAN_DEV is not set +# CONFIG_CAN_DEBUG_DEVICES is not set +CONFIG_IRDA=m + +# +# IrDA protocols +# +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y + +# +# IrDA options +# +CONFIG_IRDA_CACHE_LAST_LSAP=y +CONFIG_IRDA_FAST_RR=y +CONFIG_IRDA_DEBUG=y + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +CONFIG_IRTTY_SIR=m + +# +# Dongle support +# +CONFIG_DONGLE=y +CONFIG_ESI_DONGLE=m +CONFIG_ACTISYS_DONGLE=m +CONFIG_TEKRAM_DONGLE=m +CONFIG_TOIM3232_DONGLE=m +CONFIG_LITELINK_DONGLE=m +CONFIG_MA600_DONGLE=m +CONFIG_GIRBIL_DONGLE=m +CONFIG_MCP2120_DONGLE=m +CONFIG_OLD_BELKIN_DONGLE=m +# CONFIG_ACT200L_DONGLE is not set +CONFIG_KINGSUN_DONGLE=m +CONFIG_KSDAZZLE_DONGLE=m +CONFIG_KS959_DONGLE=m + +# +# FIR device drivers +# +CONFIG_USB_IRDA=m +CONFIG_SIGMATEL_FIR=m +CONFIG_MCS_FIR=m +CONFIG_BT=m +CONFIG_BT_L2CAP=y +CONFIG_BT_SCO=y +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_ATH3K=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIVHCI is not set +# CONFIG_BT_MRVL is not set +CONFIG_BT_ATH3K=m +CONFIG_BT_WILINK=m +CONFIG_AF_RXRPC=m +# CONFIG_AF_RXRPC_DEBUG is not set +# CONFIG_RXKAD is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=m +CONFIG_NL80211_TESTMODE=y +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +CONFIG_CFG80211_DEFAULT_PS=y +# CONFIG_CFG80211_DEBUGFS is not set +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=y +CONFIG_LIB80211_CRYPT_WEP=m +CONFIG_LIB80211_CRYPT_CCMP=m +CONFIG_LIB80211_CRYPT_TKIP=m +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=m +CONFIG_MAC80211_HAS_RC=y +CONFIG_MAC80211_RC_PID=y +# CONFIG_MAC80211_RC_MINSTREL is not set +CONFIG_MAC80211_RC_DEFAULT_PID=y +CONFIG_MAC80211_RC_DEFAULT="pid" +# CONFIG_MAC80211_MESH is not set +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_DEBUG_MENU is not set +CONFIG_WIMAX=m +CONFIG_WIMAX_DEBUG_LEVEL=8 +CONFIG_RFKILL=m +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +CONFIG_NET_9P=m +# CONFIG_NET_9P_DEBUG is not set +# CONFIG_CAIF is not set +CONFIG_CEPH_LIB=m +# CONFIG_CEPH_LIB_PRETTYDEBUG is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_TESTS is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +CONFIG_SM_FTL=m +# CONFIG_MTD_OOPS is not set +CONFIG_MTD_SWAP=m + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +# CONFIG_MTD_SST25L is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_OMAP2=y +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +CONFIG_MTD_NAND_PLATFORM=y +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MTD_UBI_BEB_RESERVE=1 +# CONFIG_MTD_UBI_GLUEBI is not set +# CONFIG_MTD_UBI_DEBUG is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +# CONFIG_BLK_DEV_XIP is not set +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set +# CONFIG_SENSORS_LIS3LV02D is not set +CONFIG_MISC_DEVICES=y +# CONFIG_AD525X_DPOT is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +CONFIG_SENSORS_BH1780=m +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +CONFIG_HMC6352=m +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +CONFIG_BMP085=m +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +CONFIG_EEPROM_AT24=m +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=y +CONFIG_IWMC3200TOP=m +# CONFIG_IWMC3200TOP_DEBUG is not set +# CONFIG_IWMC3200TOP_DEBUGFS is not set + +# +# Texas Instruments shared transport line discipline +# +CONFIG_TI_ST=m +# CONFIG_SENSORS_LIS3_SPI is not set +# CONFIG_SENSORS_LIS3_I2C is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +CONFIG_RAID_ATTRS=m +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=m +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +CONFIG_SCSI_ISCSI_ATTRS=m +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m +# CONFIG_LIBFC is not set +# CONFIG_LIBFCOE is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID456=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +CONFIG_BLK_DEV_DM=m +# CONFIG_DM_DEBUG is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m +# CONFIG_DM_LOG_USERSPACE is not set +CONFIG_DM_ZERO=m +CONFIG_DM_MULTIPATH=m +# CONFIG_DM_MULTIPATH_QL is not set +# CONFIG_DM_MULTIPATH_ST is not set +CONFIG_DM_DELAY=m +# CONFIG_DM_UEVENT is not set +CONFIG_DM_FLAKEY=m +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m +CONFIG_LOOPBACK_TARGET=m +# CONFIG_LOOPBACK_TARGET_CDB_DEBUG is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_MACVLAN=m +CONFIG_MACVTAP=m +CONFIG_EQUALIZER=m +CONFIG_TUN=m +CONFIG_VETH=m +CONFIG_MII=y +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +CONFIG_BCM63XX_PHY=m +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +CONFIG_MICREL_PHY=m +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +CONFIG_NET_ETHERNET=y +# CONFIG_AX88796 is not set +CONFIG_SMC91X=y +# CONFIG_TI_DAVINCI_EMAC is not set +CONFIG_TI_DAVINCI_MDIO=m +CONFIG_TI_DAVINCI_CPDMA=m +# CONFIG_DM9000 is not set +CONFIG_ENC28J60=y +# CONFIG_ENC28J60_WRITEVERIFY is not set +# CONFIG_ETHOC is not set +CONFIG_SMC911X=y +CONFIG_SMSC911X=y +# CONFIG_SMSC911X_ARCH_HOOKS is not set +# CONFIG_DNET is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +# CONFIG_B44 is not set +CONFIG_KS8842=m +CONFIG_KS8851=y +# CONFIG_KS8851_MLL is not set +# CONFIG_FTMAC100 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_WLAN=y +# CONFIG_LIBERTAS_THINFIRM is not set +CONFIG_AT76C50X_USB=m +CONFIG_USB_ZD1201=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_RTL8187=m +CONFIG_RTL8187_LEDS=y +# CONFIG_MAC80211_HWSIM is not set +# CONFIG_ATH_COMMON is not set +CONFIG_B43=m +# CONFIG_B43_SDIO is not set +CONFIG_B43_PIO=y +CONFIG_B43_PHY_N=y +CONFIG_B43_PHY_LP=y +CONFIG_B43_LEDS=y +CONFIG_B43_HWRNG=y +# CONFIG_B43_DEBUG is not set +# CONFIG_B43LEGACY is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +# CONFIG_IWM is not set +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +# CONFIG_LIBERTAS_SDIO is not set +# CONFIG_LIBERTAS_SPI is not set +# CONFIG_LIBERTAS_DEBUG is not set +# CONFIG_LIBERTAS_MESH is not set +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +# CONFIG_P54_SPI is not set +CONFIG_P54_LEDS=y +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +# CONFIG_RT2800USB is not set +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y +CONFIG_RT2X00_LIB_LEDS=y +# CONFIG_RT2X00_DEBUG is not set +CONFIG_RTL8192CU=m +CONFIG_RTLWIFI=m +CONFIG_RTL8192C_COMMON=m +CONFIG_WL1251=m +CONFIG_WL1251_SPI=m +CONFIG_WL1251_SDIO=m +CONFIG_WL12XX_MENU=m +CONFIG_WL12XX=m +CONFIG_WL12XX_HT=y +CONFIG_WL12XX_SPI=m +CONFIG_WL12XX_SDIO=m +# CONFIG_WL12XX_SDIO_TEST is not set +CONFIG_WL12XX_PLATFORM_DATA=y +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set + +# +# WiMAX Wireless Broadband devices +# +CONFIG_WIMAX_I2400M=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_WIMAX_I2400M_SDIO=m +CONFIG_WIMAX_IWMC3200_SDIO=y +CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 + +# +# USB Network Adapters +# +CONFIG_USB_CATC=y +CONFIG_USB_KAWETH=y +CONFIG_USB_PEGASUS=y +CONFIG_USB_RTL8150=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +# CONFIG_USB_NET_CDC_EEM is not set +CONFIG_USB_NET_CDC_NCM=m +CONFIG_USB_NET_DM9601=y +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_GL620A=y +CONFIG_USB_NET_NET1080=y +CONFIG_USB_NET_PLUSB=y +CONFIG_USB_NET_MCS7830=y +CONFIG_USB_NET_RNDIS_HOST=y +CONFIG_USB_NET_CDC_SUBSET=y +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=y +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_VL600=m +# CONFIG_WAN is not set +CONFIG_ATM_DRIVERS=y +# CONFIG_ATM_DUMMY is not set +# CONFIG_ATM_TCP is not set + +# +# CAIF transport drivers +# +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +CONFIG_PPTP=m +# CONFIG_PPPOATM is not set +CONFIG_PPPOL2TP=m +# CONFIG_SLIP is not set +CONFIG_SLHC=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y +CONFIG_NETPOLL=y +CONFIG_NETPOLL_TRAP=y +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +CONFIG_INPUT_POLLDEV=y +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_QT1070=m +CONFIG_KEYBOARD_QT2160=m +# CONFIG_KEYBOARD_LKKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +CONFIG_KEYBOARD_MCS=m +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_TWL4030 is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_ELANTECH is not set +# CONFIG_MOUSE_PS2_SENTELIC is not set +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_GPIO is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_AD714X=m +CONFIG_INPUT_AD714X_I2C=m +CONFIG_INPUT_AD714X_SPI=m +# CONFIG_INPUT_ATI_REMOTE is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_TWL4030_PWRBUTTON=y +CONFIG_INPUT_TWL4030_VIBRA=m +CONFIG_INPUT_UINPUT=y +CONFIG_INPUT_PCF8574=m +CONFIG_INPUT_PWM_BEEPER=m +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +CONFIG_INPUT_ADXL34X=m +CONFIG_INPUT_ADXL34X_I2C=m +CONFIG_INPUT_ADXL34X_SPI=m +CONFIG_INPUT_CMA3000=m +CONFIG_INPUT_CMA3000_I2C=m + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_N_GSM=m +CONFIG_DEVKMEM=y + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=32 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX3107 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_OMAP=y +CONFIG_SERIAL_OMAP_CONSOLE=y +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +CONFIG_SERIAL_IFX6X60=m +CONFIG_TTY_PRINTK=y +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_RAMOOPS is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=m + +# +# Multiplexer I2C Chip support +# +CONFIG_I2C_MUX_GPIO=m +# CONFIG_I2C_MUX_PCA9541 is not set +# CONFIG_I2C_MUX_PCA954x is not set +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=m + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_DESIGNWARE is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +CONFIG_I2C_OMAP=y +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +CONFIG_I2C_DIOLAN_U2C=m +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_ALTERA is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_GPIO is not set +# CONFIG_SPI_OC_TINY is not set +CONFIG_SPI_OMAP24XX=y +# CONFIG_SPI_PXA2XX_PCI is not set +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=y +# CONFIG_SPI_TLE62X0 is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_MAX730X=m + +# +# Memory mapped GPIO expanders: +# +# CONFIG_GPIO_BASIC_MMIO is not set +# CONFIG_GPIO_IT8761E is not set + +# +# I2C GPIO expanders: +# +CONFIG_GPIO_MAX7300=m +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +CONFIG_GPIO_TWL4030=y +CONFIG_GPIO_ADP5588=m + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_74X164 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=m +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +CONFIG_TEST_POWER=m +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_BQ20Z75 is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +CONFIG_BATTERY_MAX17042=m +CONFIG_CHARGER_ISP1704=m +CONFIG_CHARGER_TWL4030=m +CONFIG_CHARGER_GPIO=m +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADCXX is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +CONFIG_SENSORS_ADT7411=m +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +CONFIG_SENSORS_ASC7621=m +# CONFIG_SENSORS_ATXP1 is not set +CONFIG_SENSORS_DS620=m +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +CONFIG_SENSORS_GPIO_FAN=m +# CONFIG_SENSORS_IT87 is not set +CONFIG_SENSORS_JC42=m +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM70 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_MAX1111 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SHT21 is not set +CONFIG_SENSORS_SMM665=m +# CONFIG_SENSORS_DME1737 is not set +CONFIG_SENSORS_EMC1403=m +CONFIG_SENSORS_EMC2103=m +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH5627 is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +CONFIG_SENSORS_ADS7871=m +CONFIG_SENSORS_AMC6821=m +# CONFIG_SENSORS_THMC50 is not set +CONFIG_SENSORS_TMP102=m +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +CONFIG_SENSORS_TWL4030_MADC=m +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +CONFIG_THERMAL=y +CONFIG_THERMAL_HWMON=y +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_OMAP_WATCHDOG=y +# CONFIG_TWL4030_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=y +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_SDIOHOST_POSSIBLE=y +# CONFIG_SSB_SDIOHOST is not set +# CONFIG_SSB_SILENT is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_MFD_SUPPORT=y +CONFIG_MFD_CORE=y +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +CONFIG_TPS6105X=m +# CONFIG_TPS65010 is not set +CONFIG_TPS6507X=m +CONFIG_TWL4030_CORE=y +CONFIG_TWL4030_MADC=m +CONFIG_TWL4030_POWER=y +CONFIG_TWL4030_CODEC=y +CONFIG_TWL4030_POWEROFF=y +CONFIG_TWL6030_PWM=m +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_MC13XXX is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_EZX_PCAP is not set +CONFIG_MFD_TPS6586X=y +CONFIG_MFD_WL1273_CORE=m +CONFIG_MFD_OMAP_USB_HOST=y +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +CONFIG_REGULATOR_DUMMY=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_BQ24022 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +CONFIG_REGULATOR_TWL4030=y +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +CONFIG_REGULATOR_TPS6105X=m +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_AD5398 is not set +CONFIG_REGULATOR_TPS6586X=m +CONFIG_REGULATOR_TPS6524X=m +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_COMMON=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m + +# +# Multimedia drivers +# +CONFIG_RC_CORE=m +CONFIG_LIRC=m +CONFIG_RC_MAP=m +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +CONFIG_IR_RC5_SZ_DECODER=m +CONFIG_IR_LIRC_CODEC=m +# CONFIG_IR_IMON is not set +# CONFIG_IR_MCEUSB is not set +# CONFIG_IR_STREAMZAP is not set +CONFIG_RC_LOOPBACK=m +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=m +CONFIG_MEDIA_TUNER_CUSTOMISE=y + +# +# Customize TV tuners +# +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA827X=m +CONFIG_MEDIA_TUNER_TDA18271=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_TEA5761=m +CONFIG_MEDIA_TUNER_TEA5767=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_MT2131=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=m +CONFIG_MEDIA_TUNER_MAX2165=m +CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_VIDEO_V4L2=y +CONFIG_VIDEOBUF_GEN=y +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF_DMA_CONTIG=y +CONFIG_VIDEOBUF_DVB=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_VIDEO_TUNER=m +CONFIG_V4L2_MEM2MEM_DEV=m +CONFIG_VIDEOBUF2_CORE=m +CONFIG_VIDEOBUF2_MEMOPS=m +CONFIG_VIDEOBUF2_VMALLOC=m +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set +CONFIG_VIDEO_IR_I2C=m + +# +# Encoders/decoders and other helper chips +# + +# +# Audio decoders +# +# CONFIG_VIDEO_TVAUDIO is not set +# CONFIG_VIDEO_TDA7432 is not set +# CONFIG_VIDEO_TDA9840 is not set +# CONFIG_VIDEO_TEA6415C is not set +# CONFIG_VIDEO_TEA6420 is not set +CONFIG_VIDEO_MSP3400=m +# CONFIG_VIDEO_CS5345 is not set +CONFIG_VIDEO_CS53L32A=m +# CONFIG_VIDEO_M52790 is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +CONFIG_VIDEO_WM8775=m +# CONFIG_VIDEO_WM8739 is not set +# CONFIG_VIDEO_VP27SMPX is not set + +# +# RDS decoders +# +# CONFIG_VIDEO_SAA6588 is not set + +# +# Video decoders +# +CONFIG_VIDEO_ADV7180=m +# CONFIG_VIDEO_BT819 is not set +# CONFIG_VIDEO_BT856 is not set +# CONFIG_VIDEO_BT866 is not set +# CONFIG_VIDEO_KS0127 is not set +# CONFIG_VIDEO_OV7670 is not set +CONFIG_VIDEO_MT9V011=m +# CONFIG_VIDEO_TCM825X is not set +# CONFIG_VIDEO_SAA7110 is not set +CONFIG_VIDEO_SAA711X=m +# CONFIG_VIDEO_SAA717X is not set +# CONFIG_VIDEO_SAA7191 is not set +# CONFIG_VIDEO_TVP514X is not set +# CONFIG_VIDEO_TVP5150 is not set +# CONFIG_VIDEO_TVP7002 is not set +# CONFIG_VIDEO_VPX3220 is not set + +# +# Video and audio decoders +# +CONFIG_VIDEO_CX25840=m + +# +# MPEG video encoders +# +CONFIG_VIDEO_CX2341X=m + +# +# Video encoders +# +# CONFIG_VIDEO_SAA7127 is not set +# CONFIG_VIDEO_SAA7185 is not set +# CONFIG_VIDEO_ADV7170 is not set +# CONFIG_VIDEO_ADV7175 is not set +# CONFIG_VIDEO_THS7303 is not set +# CONFIG_VIDEO_ADV7343 is not set +# CONFIG_VIDEO_AK881X is not set + +# +# Video improvement chips +# +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set +CONFIG_VIDEO_VIVI=m +CONFIG_VIDEO_VPFE_CAPTURE=y +# CONFIG_VIDEO_DM6446_CCDC is not set +CONFIG_VIDEO_OMAP2_VOUT=y +# CONFIG_VIDEO_CPIA2 is not set +CONFIG_VIDEO_TIMBERDALE=m +# CONFIG_VIDEO_AU0828 is not set +CONFIG_VIDEO_SR030PC30=m +CONFIG_VIDEO_NOON010PC30=m +CONFIG_VIDEO_OMAP3=y +# CONFIG_VIDEO_OMAP3_DEBUG is not set +# CONFIG_SOC_CAMERA is not set +CONFIG_V4L_USB_DRIVERS=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +# CONFIG_USB_GL860 is not set +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +# CONFIG_USB_GSPCA_JEILINJ is not set +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +# CONFIG_USB_GSPCA_MR97310A is not set +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +# CONFIG_USB_GSPCA_PAC7302 is not set +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SN9C2028=m +# CONFIG_USB_GSPCA_SN9C20X is not set +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +# CONFIG_USB_GSPCA_SQ905 is not set +# CONFIG_USB_GSPCA_SQ905C is not set +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +# CONFIG_USB_GSPCA_STV0680 is not set +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_TLG2300=m +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_RC=y +# CONFIG_VIDEO_CX231XX_ALSA is not set +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_USBVISION=m +CONFIG_USB_ET61X251=m +CONFIG_USB_SN9C102=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_MEM2MEM_TESTDEV=m +CONFIG_RADIO_ADAPTERS=y +# CONFIG_I2C_SI4713 is not set +# CONFIG_RADIO_SI4713 is not set +# CONFIG_USB_DSBR is not set +# CONFIG_RADIO_SI470X is not set +# CONFIG_USB_MR800 is not set +# CONFIG_RADIO_TEA5764 is not set +CONFIG_RADIO_SAA7706H=m +# CONFIG_RADIO_TEF6862 is not set +CONFIG_RADIO_WL1273=m + +# +# Texas Instruments WL128x FM driver (ST based) +# +CONFIG_RADIO_WL128X=m +CONFIG_DVB_MAX_ADAPTERS=8 +CONFIG_DVB_DYNAMIC_MINORS=y +CONFIG_DVB_CAPTURE_DRIVERS=y +# CONFIG_TTPCI_EEPROM is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_AF9015=m +# CONFIG_DVB_USB_CE6230 is not set +# CONFIG_DVB_USB_FRIIO is not set +# CONFIG_DVB_USB_EC168 is not set +CONFIG_DVB_USB_AZ6027=m +CONFIG_DVB_USB_LME2510=m +CONFIG_DVB_USB_TECHNISAT_USB2=m +# CONFIG_SMS_SIANO_MDTV is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set + +# +# Supported DVB Frontends +# +# CONFIG_DVB_FE_CUSTOMISE is not set + +# +# Multistandard (satellite) frontends +# +CONFIG_DVB_STB0899=m +CONFIG_DVB_STB6100=m +CONFIG_DVB_STV090x=m +CONFIG_DVB_STV6110x=m + +# +# DVB-S (satellite) frontends +# +CONFIG_DVB_CX24123=m +CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10039=m +CONFIG_DVB_S5H1420=m +CONFIG_DVB_STV0288=m +CONFIG_DVB_STB6000=m +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_TDA10086=m +CONFIG_DVB_TUNER_ITD1000=m +CONFIG_DVB_TUNER_CX24113=m +CONFIG_DVB_TDA826X=m +CONFIG_DVB_CX24116=m +CONFIG_DVB_SI21XX=m +CONFIG_DVB_DS3000=m + +# +# DVB-T (terrestrial) frontends +# +CONFIG_DVB_CX22702=m +CONFIG_DVB_TDA1004X=m +CONFIG_DVB_NXT6000=m +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +CONFIG_DVB_DIB3000MB=m +CONFIG_DVB_DIB3000MC=m +CONFIG_DVB_DIB7000M=m +CONFIG_DVB_DIB7000P=m +CONFIG_DVB_TDA10048=m +CONFIG_DVB_AF9013=m + +# +# DVB-C (cable) frontends +# +CONFIG_DVB_TDA10023=m +CONFIG_DVB_STV0297=m + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +CONFIG_DVB_NXT200X=m +CONFIG_DVB_BCM3510=m +CONFIG_DVB_LGDT330X=m +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_S5H1409=m +CONFIG_DVB_S5H1411=m + +# +# ISDB-T (terrestrial) frontends +# +CONFIG_DVB_S921=m +CONFIG_DVB_DIB8000=m +CONFIG_DVB_MB86A20S=m + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +CONFIG_DVB_TUNER_DIB0070=m +CONFIG_DVB_TUNER_DIB0090=m + +# +# SEC control devices for DVB-S +# +CONFIG_DVB_LNBP21=m +CONFIG_DVB_ISL6421=m +CONFIG_DVB_LGS8GXX=m +CONFIG_DVB_ATBM8830=m +CONFIG_DVB_IX2505V=m + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set + +# +# Graphics support +# +CONFIG_DRM=m +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +CONFIG_FB_SYS_FILLRECT=m +CONFIG_FB_SYS_COPYAREA=m +CONFIG_FB_SYS_IMAGEBLIT=m +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=m +# CONFIG_FB_WMT_GE_ROPS is not set +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_TMIO is not set +CONFIG_FB_UDL=m +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set +CONFIG_OMAP2_VRAM=y +CONFIG_OMAP2_VRFB=y +CONFIG_OMAP2_DSS=y +CONFIG_OMAP2_VRAM_SIZE=14 +CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y +# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set +CONFIG_OMAP2_DSS_DPI=y +# CONFIG_OMAP2_DSS_RFBI is not set +CONFIG_OMAP2_DSS_VENC=y +# CONFIG_OMAP2_DSS_SDI is not set +CONFIG_OMAP2_DSS_DSI=y +CONFIG_OMAP2_DSS_USE_DSI_PLL=y +# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set +CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 +CONFIG_FB_OMAP2=y +CONFIG_FB_OMAP2_DEBUG_SUPPORT=y +CONFIG_FB_OMAP2_NUM_FBS=2 + +# +# OMAP2/3 Display Device Drivers +# +CONFIG_PANEL_GENERIC_DPI=y +# CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set +CONFIG_PANEL_SHARP_LS037V7DW01=y +CONFIG_PANEL_NEC_NL8048HL11_01B=y +# CONFIG_PANEL_TAAL is not set +CONFIG_PANEL_TPO_TD043MTEA1=m +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y + +# +# Display device support +# +CONFIG_DISPLAY_SUPPORT=y + +# +# Display hardware drivers +# + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_SOUND=y +CONFIG_SOUND_OSS_CORE=y +CONFIG_SOUND_OSS_CORE_PRECLAIM=y +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_JACK=y +CONFIG_SND_SEQUENCER=m +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +CONFIG_SND_HRTIMER=m +CONFIG_SND_SEQ_HRTIMER_DEFAULT=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_RAWMIDI_SEQ=m +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +CONFIG_SND_ALOOP=m +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_ARM is not set +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=y +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_USB_6FIRE=m +CONFIG_SND_SOC=y +CONFIG_SND_SOC_CACHE_LZO=y +CONFIG_SND_OMAP_SOC=y +CONFIG_SND_OMAP_SOC_MCBSP=y +CONFIG_SND_OMAP_SOC_OVERO=y +CONFIG_SND_OMAP_SOC_OMAP3EVM=y +CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y +CONFIG_SND_OMAP_SOC_ZOOM2=y +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_TWL4030=y +# CONFIG_SOUND_PRIME is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +# CONFIG_USB_HIDDEV is not set + +# +# Special HID drivers +# +# CONFIG_HID_3M_PCT is not set +CONFIG_HID_A4TECH=y +CONFIG_HID_ACRUX=m +# CONFIG_HID_ACRUX_FF is not set +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +# CONFIG_HID_CANDO is not set +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +# CONFIG_HID_PRODIKEYS is not set +CONFIG_HID_CYPRESS=y +# CONFIG_HID_DRAGONRISE is not set +CONFIG_HID_EMS_FF=m +# CONFIG_HID_ELECOM is not set +CONFIG_HID_EZKEY=y +CONFIG_HID_KEYTOUCH=m +# CONFIG_HID_KYE is not set +CONFIG_HID_UCLOGIC=m +CONFIG_HID_WALTOP=m +CONFIG_HID_GYRATION=y +# CONFIG_HID_TWINHAN is not set +# CONFIG_HID_KENSINGTON is not set +CONFIG_HID_LCPOWER=m +CONFIG_HID_LOGITECH=y +# CONFIG_LOGITECH_FF is not set +# CONFIG_LOGIRUMBLEPAD2_FF is not set +# CONFIG_LOGIG940_FF is not set +# CONFIG_LOGIWII_FF is not set +CONFIG_HID_MAGICMOUSE=m +CONFIG_HID_MICROSOFT=y +# CONFIG_HID_MOSART is not set +CONFIG_HID_MONTEREY=y +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NTRIG=y +# CONFIG_HID_ORTEK is not set +CONFIG_HID_PANTHERLORD=y +# CONFIG_PANTHERLORD_FF is not set +CONFIG_HID_PETALYNX=y +CONFIG_HID_PICOLCD=m +CONFIG_HID_PICOLCD_FB=y +CONFIG_HID_PICOLCD_BACKLIGHT=y +CONFIG_HID_PICOLCD_LEDS=y +CONFIG_HID_QUANTA=m +CONFIG_HID_ROCCAT=m +CONFIG_HID_ROCCAT_COMMON=m +CONFIG_HID_ROCCAT_ARVO=m +CONFIG_HID_ROCCAT_KONE=m +CONFIG_HID_ROCCAT_KONEPLUS=m +CONFIG_HID_ROCCAT_KOVAPLUS=m +# CONFIG_HID_ROCCAT_PYRA is not set +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_HID_STANTUM=m +CONFIG_HID_SUNPLUS=y +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +CONFIG_HID_TOPSEED=y +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_WACOM is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +CONFIG_USB_DEVICE_CLASS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +CONFIG_USB_SUSPEND=y +CONFIG_USB_OTG=y +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +CONFIG_USB_MON=y +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_HCD_OMAP=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_U132_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HWA_HCD is not set +CONFIG_USB_MUSB_HDRC=y +# CONFIG_USB_MUSB_TUSB6010 is not set +CONFIG_USB_MUSB_OMAP2PLUS=y +# CONFIG_USB_MUSB_AM35X is not set +# CONFIG_USB_MUSB_HOST is not set +# CONFIG_USB_MUSB_PERIPHERAL is not set +CONFIG_USB_MUSB_OTG=y +CONFIG_USB_GADGET_MUSB_HDRC=y +CONFIG_USB_MUSB_HDRC_HCD=y +# CONFIG_MUSB_PIO_ONLY is not set +CONFIG_USB_INVENTRA_DMA=y +# CONFIG_USB_TI_CPPI_DMA is not set +# CONFIG_USB_MUSB_DEBUG is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_WDM=m +CONFIG_USB_TMC=m + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_REALTEK=m +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +CONFIG_USB_STORAGE_ENE_UB6250=m +CONFIG_USB_UAS=m +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +CONFIG_USB_EZUSB=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +CONFIG_USB_SERIAL_WHITEHEAT=n +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +# CONFIG_USB_SERIAL_CP210X is not set +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_MOTOROLA=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +# CONFIG_USB_SERIAL_QUALCOMM is not set +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_SAFE=m +# CONFIG_USB_SERIAL_SAFE_PADDED is not set +CONFIG_USB_SERIAL_SAMBA=m +CONFIG_USB_SERIAL_SIEMENS_MPI=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +# CONFIG_USB_SERIAL_SYMBOL is not set +CONFIG_USB_SERIAL_TI=n +CONFIG_USB_SERIAL_CYBERJACK=m +CONFIG_USB_SERIAL_XIRCOM=n +# CONFIG_USB_SERIAL_OPTION is not set +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m +CONFIG_USB_SERIAL_ZIO=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_DEBUG=m + +# +# USB Miscellaneous drivers +# +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_LED=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +# CONFIG_USB_APPLEDISPLAY is not set +CONFIG_USB_SISUSBVGA=m +CONFIG_USB_SISUSBVGA_CON=y +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +# CONFIG_USB_IOWARRIOR is not set +CONFIG_USB_TEST=m +# CONFIG_USB_ISIGHTFW is not set +CONFIG_USB_YUREX=m +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_CXACRU=m +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_XUSBATM=m +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_GADGET_VBUS_DRAW=480 +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_FUSB300 is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_R8A66597 is not set +# CONFIG_USB_GADGET_PXA_U2O is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +CONFIG_USB_GADGET_DUALSPEED=y +# CONFIG_USB_ZERO is not set +# CONFIG_USB_AUDIO is not set +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_ETH_EEM is not set +CONFIG_USB_G_NCM=m +# CONFIG_USB_GADGETFS is not set +CONFIG_USB_FUNCTIONFS=m +# CONFIG_USB_FUNCTIONFS_ETH is not set +CONFIG_USB_FUNCTIONFS_RNDIS=y +# CONFIG_USB_FUNCTIONFS_GENERIC is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_MASS_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set +# CONFIG_USB_CDC_COMPOSITE is not set +# CONFIG_USB_G_MULTI is not set +CONFIG_USB_G_HID=m +CONFIG_USB_G_DBGP=m +# CONFIG_USB_G_DBGP_PRINTK is not set +CONFIG_USB_G_DBGP_SERIAL=y +CONFIG_USB_G_WEBCAM=m + +# +# OTG and related infrastructure +# +CONFIG_USB_OTG_UTILS=y +CONFIG_USB_GPIO_VBUS=y +# CONFIG_ISP1301_OMAP is not set +# CONFIG_USB_ULPI is not set +CONFIG_TWL4030_USB=y +CONFIG_TWL6030_USB=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_UNSAFE_RESUME=y +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_BLOCK_BOUNCE=y +CONFIG_SDIO_UART=y +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_OMAP is not set +CONFIG_MMC_OMAP_HS=y +CONFIG_MMC_SPI=m +# CONFIG_MMC_DW is not set +CONFIG_MMC_USHC=m +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_LM3530 is not set +# CONFIG_LEDS_PCA9532 is not set +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_GPIO_PLATFORM=y +# CONFIG_LEDS_LP3944 is not set +CONFIG_LEDS_LP5521=m +CONFIG_LEDS_LP5523=m +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_DAC124S085 is not set +CONFIG_LEDS_PWM=m +CONFIG_LEDS_REGULATOR=m +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_LT3593 is not set +CONFIG_LEDS_TRIGGERS=y + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGER_TIMER=m +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=m +CONFIG_LEDS_TRIGGER_GPIO=m +CONFIG_LEDS_TRIGGER_DEFAULT_ON=m + +# +# iptables trigger is under Netfilter config (LED target) +# +CONFIG_NFC_DEVICES=y +CONFIG_PN544_NFC=m +# CONFIG_ACCESSIBILITY is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +CONFIG_RTC_DRV_DS1307=y +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +CONFIG_RTC_DRV_BQ32K=m +CONFIG_RTC_DRV_TWL4030=m +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set +# CONFIG_RTC_DRV_PCF2123 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_DMADEVICES is not set +CONFIG_TIMB_DMA=m +CONFIG_DMA_ENGINE=y +# CONFIG_AUXDISPLAY is not set +CONFIG_UIO=m +CONFIG_UIO_PDRV=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_STAGING=y +# CONFIG_STAGING_EXCLUDE_BUILD is not set +# CONFIG_VIDEO_TM6000 is not set +# CONFIG_USB_IP_COMMON is not set +CONFIG_W35UND=m +CONFIG_PRISM2_USB=m +CONFIG_ECHO=m +CONFIG_BRCM80211=m +CONFIG_BRCMFMAC=y +# CONFIG_BRCMDBG is not set +CONFIG_RT2870=m +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +CONFIG_R8712U=m +CONFIG_R8712_AP=y +# CONFIG_TRANZPORT is not set +# CONFIG_POHMELFS is not set +# CONFIG_LINE6_USB is not set +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_USB_SERIAL_QUATECH_USB2 is not set +# CONFIG_VT6656 is not set +# CONFIG_IIO is not set +CONFIG_XVMALLOC=y +CONFIG_ZRAM=m +# CONFIG_ZRAM_DEBUG is not set +# CONFIG_FB_SM7XX is not set +# CONFIG_LIRC_STAGING is not set +# CONFIG_EASYCAP is not set +# CONFIG_TIDSPBRIDGE is not set +# CONFIG_MACH_OMAP3_WESTBRIDGE_AST_PNAND_HAL is not set +CONFIG_MACH_NO_WESTBRIDGE=y +# CONFIG_ATH6K_LEGACY is not set +CONFIG_USB_ENESTORAGE=m +CONFIG_BCM_WIMAX=m +CONFIG_FT1000=m +CONFIG_FT1000_USB=m + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +CONFIG_TOUCHSCREEN_CLEARPAD_TM1217=m +CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=m + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set +CONFIG_CLKDEV_LOOKUP=y + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +# CONFIG_EXT3_FS_XATTR is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_XATTR=y +# CONFIG_EXT4_FS_POSIX_ACL is not set +# CONFIG_EXT4_FS_SECURITY is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_PROC_INFO=y +CONFIG_REISERFS_FS_XATTR=y +# CONFIG_REISERFS_FS_POSIX_ACL is not set +# CONFIG_REISERFS_FS_SECURITY is not set +CONFIG_JFS_FS=m +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_XFS_FS=m +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DEBUG is not set +CONFIG_GFS2_FS=m +# CONFIG_GFS2_FS_LOCKING_DLM is not set +CONFIG_OCFS2_FS=m +CONFIG_OCFS2_FS_O2CB=m +CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m +CONFIG_OCFS2_FS_STATS=y +CONFIG_OCFS2_DEBUG_MASKLOG=y +# CONFIG_OCFS2_DEBUG_FS is not set +CONFIG_BTRFS_FS=m +# CONFIG_BTRFS_FS_POSIX_ACL is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_EXPORTFS=y +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +CONFIG_FANOTIFY=y +CONFIG_QUOTA=y +# CONFIG_QUOTA_NETLINK_INTERFACE is not set +CONFIG_PRINT_QUOTA_WARNING=y +# CONFIG_QUOTA_DEBUG is not set +CONFIG_QUOTA_TREE=y +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTACTL=y +CONFIG_AUTOFS4_FS=m +CONFIG_FUSE_FS=m +# CONFIG_CUSE is not set +CONFIG_GENERIC_ACL=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_RW=y + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_CONFIGFS_FS=m +CONFIG_MISC_FILESYSTEMS=y +CONFIG_ADFS_FS=m +# CONFIG_ADFS_FS_RW is not set +CONFIG_AFFS_FS=m +# CONFIG_ECRYPT_FS is not set +CONFIG_UNION_FS=m +CONFIG_UNION_FS_XATTR=y +# CONFIG_UNION_FS_DEBUG is not set +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +CONFIG_BEFS_FS=m +# CONFIG_BEFS_DEBUG is not set +CONFIG_BFS_FS=m +CONFIG_EFS_FS=m +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +CONFIG_JFFS2_SUMMARY=y +CONFIG_JFFS2_FS_XATTR=y +CONFIG_JFFS2_FS_POSIX_ACL=y +CONFIG_JFFS2_FS_SECURITY=y +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RTIME=y +CONFIG_JFFS2_RUBIN=y +# CONFIG_JFFS2_CMODE_NONE is not set +# CONFIG_JFFS2_CMODE_PRIORITY is not set +# CONFIG_JFFS2_CMODE_SIZE is not set +CONFIG_JFFS2_CMODE_FAVOURLZO=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_XATTR=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_ZLIB=y +# CONFIG_UBIFS_FS_DEBUG is not set +CONFIG_LOGFS=m +CONFIG_CRAMFS=m +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +CONFIG_VXFS_FS=m +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m +CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_ROMFS_FS=m +CONFIG_ROMFS_BACKED_BY_BLOCK=y +# CONFIG_ROMFS_BACKED_BY_MTD is not set +# CONFIG_ROMFS_BACKED_BY_BOTH is not set +CONFIG_ROMFS_ON_BLOCK=y +CONFIG_PSTORE=y +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_UFS_DEBUG is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_NEW_IDMAPPER is not set +CONFIG_NFSD=m +CONFIG_NFSD_DEPRECATED=y +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=m +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_CEPH_FS=m +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +CONFIG_CIFS_EXPERIMENTAL=y +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +CONFIG_AFS_FS=m +# CONFIG_AFS_DEBUG is not set +CONFIG_9P_FS=m +# CONFIG_9P_FS_POSIX_ACL is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +CONFIG_LDM_DEBUG=y +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=y +CONFIG_DLM=m +# CONFIG_DLM_DEBUG is not set + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +CONFIG_SCHED_DEBUG=y +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KMEMLEAK is not set +CONFIG_DEBUG_PREEMPT=y +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_LKDTM is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING_SUPPORT=y +CONFIG_FTRACE=y +# CONFIG_FUNCTION_TRACER is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_PREEMPT_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_ENABLE_DEFAULT_TRACERS is not set +CONFIG_BRANCH_PROFILE_NONE=y +# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set +# CONFIG_PROFILE_ALL_BRANCHES is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_RING_BUFFER_BENCHMARK is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_ASYNC_RAID6_TEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +CONFIG_ARM_UNWIND=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_OC_ETM is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_XOR_BLOCKS=m +CONFIG_ASYNC_CORE=m +CONFIG_ASYNC_MEMCPY=m +CONFIG_ASYNC_XOR=m +CONFIG_ASYNC_PQ=m +CONFIG_ASYNC_RAID6_RECOV=m +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=m +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=m +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +CONFIG_CRYPTO_GF128MUL=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_CRYPTD=m +CONFIG_CRYPTO_AUTHENC=m +CONFIG_CRYPTO_TEST=m + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=m +CONFIG_CRYPTO_GCM=m +CONFIG_CRYPTO_SEQIV=m + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=m +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_PCBC=m +CONFIG_CRYPTO_XTS=m + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_XCBC=m +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_GHASH=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_FCRYPT=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_SALSA20=m +CONFIG_CRYPTO_SEED=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=y +# CONFIG_CRYPTO_ZLIB is not set +CONFIG_CRYPTO_LZO=y + +# +# Random Number Generation +# +CONFIG_CRYPTO_ANSI_CPRNG=m +CONFIG_CRYPTO_USER_API=m +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_DEV_OMAP_SHAM=m +CONFIG_CRYPTO_DEV_OMAP_AES=m +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_RAID6_PQ=m +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +CONFIG_CRC7=y +CONFIG_LIBCRC32C=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_BCJ=y +CONFIG_XZ_DEC_TEST=m +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_BTREE=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y +CONFIG_AVERAGE=y diff --git a/recipes/linux/linux-omap-2.6.39/beagleboard/defconfig b/recipes/linux/linux-omap-2.6.39/beagleboard/defconfig new file mode 100644 index 0000000000..21d9f85587 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/beagleboard/defconfig @@ -0,0 +1,3516 @@ +# +# Automatically generated make config: don't edit +# Linux/arm 2.6.39 Kernel Configuration +# Mon May 30 11:05:51 2011 +# +CONFIG_ARM=y +CONFIG_HAVE_PWM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_SCHED_CLOCK=y +CONFIG_GENERIC_GPIO=y +# CONFIG_ARCH_USES_GETTIMEOFFSET is not set +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_KTIME_SCALAR=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y +CONFIG_HAVE_IRQ_WORK=y +CONFIG_IRQ_WORK=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_LZO is not set +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +CONFIG_FHANDLE=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_HAVE_SPARSE_IRQ=y +CONFIG_GENERIC_IRQ_SHOW=y +# CONFIG_SPARSE_IRQ is not set + +# +# RCU Subsystem +# +CONFIG_TINY_RCU=y +# CONFIG_PREEMPT_RCU is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_TREE_RCU_TRACE is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=16 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +CONFIG_CGROUP_NS=y +CONFIG_CGROUP_FREEZER=y +CONFIG_CGROUP_DEVICE=y +CONFIG_CPUSETS=y +CONFIG_PROC_PID_CPUSET=y +CONFIG_CGROUP_CPUACCT=y +CONFIG_RESOURCE_COUNTERS=y +CONFIG_CGROUP_MEM_RES_CTLR=y +CONFIG_CGROUP_MEM_RES_CTLR_SWAP=y +CONFIG_CGROUP_MEM_RES_CTLR_SWAP_ENABLED=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +CONFIG_RT_GROUP_SCHED=y +CONFIG_BLK_CGROUP=y +# CONFIG_DEBUG_BLK_CGROUP is not set +CONFIG_NAMESPACES=y +CONFIG_UTS_NS=y +CONFIG_IPC_NS=y +CONFIG_USER_NS=y +CONFIG_PID_NS=y +CONFIG_NET_NS=y +CONFIG_SCHED_AUTOGROUP=y +CONFIG_MM_OWNER=y +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_XZ=y +CONFIG_RD_LZO=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EXPERT=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_PERF_COUNTERS is not set +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_COMPAT_BRK is not set +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +CONFIG_PROFILING=y +CONFIG_OPROFILE=y +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +CONFIG_BLK_DEV_INTEGRITY=y +CONFIG_BLK_DEV_THROTTLING=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +CONFIG_CFQ_GROUP_IOSCHED=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +CONFIG_INLINE_SPIN_UNLOCK=y +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +CONFIG_INLINE_READ_UNLOCK=y +# CONFIG_INLINE_READ_UNLOCK_BH is not set +CONFIG_INLINE_READ_UNLOCK_IRQ=y +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +CONFIG_INLINE_WRITE_UNLOCK=y +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +# CONFIG_MUTEX_SPIN_ON_OWNER is not set +CONFIG_FREEZER=y + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCMRING is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_STMP3XXX is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_NUC93X is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5P6442 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS4 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_TCC_926 is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_DAVINCI is not set +CONFIG_ARCH_OMAP=y +# CONFIG_PLAT_SPEAR is not set +# CONFIG_ARCH_VT8500 is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_KEYBOARD_GPIO_POLLED is not set + +# +# TI OMAP Common Features +# +CONFIG_ARCH_OMAP_OTG=y +# CONFIG_ARCH_OMAP1 is not set +CONFIG_ARCH_OMAP2PLUS=y + +# +# OMAP Feature Selections +# +CONFIG_OMAP_SMARTREFLEX=y +CONFIG_OMAP_SMARTREFLEX_CLASS3=y +CONFIG_OMAP_RESET_CLOCKS=y +# CONFIG_OMAP_MUX is not set +CONFIG_OMAP_MCBSP=y +CONFIG_OMAP_MBOX_FWK=m +CONFIG_OMAP_MBOX_KFIFO_SIZE=256 +CONFIG_OMAP_IOMMU=y +CONFIG_OMAP_IOMMU_DEBUG=m +CONFIG_OMAP_32K_TIMER=y +# CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set +CONFIG_OMAP_32K_TIMER_HZ=128 +CONFIG_OMAP_DM_TIMER=y +# CONFIG_OMAP_PM_NONE is not set +CONFIG_OMAP_PM_NOOP=y + +# +# TI OMAP2/3/4 Specific Features +# +CONFIG_ARCH_OMAP2PLUS_TYPICAL=y +# CONFIG_ARCH_OMAP2 is not set +CONFIG_ARCH_OMAP3=y +# CONFIG_ARCH_OMAP4 is not set +CONFIG_SOC_OMAP3430=y +# CONFIG_SOC_OMAPTI816X is not set +CONFIG_OMAP_PACKAGE_CBB=y + +# +# OMAP Board Type +# +CONFIG_MACH_OMAP3_BEAGLE=y +# CONFIG_MACH_DEVKIT8000 is not set +# CONFIG_MACH_OMAP_LDP is not set +# CONFIG_MACH_OMAP3530_LV_SOM is not set +# CONFIG_MACH_OMAP3_TORPEDO is not set +CONFIG_MACH_OVERO=y +CONFIG_MACH_OMAP3EVM=y +# CONFIG_MACH_OMAP3517EVM is not set +# CONFIG_MACH_CRANEBOARD is not set +# CONFIG_MACH_OMAP3_PANDORA is not set +CONFIG_MACH_OMAP3_TOUCHBOOK=y +# CONFIG_MACH_OMAP_3430SDP is not set +# CONFIG_MACH_NOKIA_RM680 is not set +# CONFIG_MACH_NOKIA_RX51 is not set +CONFIG_MACH_OMAP_ZOOM2=y +# CONFIG_MACH_OMAP_ZOOM3 is not set +# CONFIG_MACH_CM_T35 is not set +# CONFIG_MACH_CM_T3517 is not set +# CONFIG_MACH_IGEP0020 is not set +# CONFIG_MACH_IGEP0030 is not set +# CONFIG_MACH_SBC3530 is not set +# CONFIG_MACH_OMAP_3630SDP is not set +# CONFIG_OMAP3_EMU is not set +# CONFIG_OMAP3_SDRC_AC_TIMING is not set + +# +# System MMU +# + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +# CONFIG_SWP_EMULATE is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_ARM_ERRATA_430973=y +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_743622 is not set +# CONFIG_ARM_ERRATA_754322 is not set + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +# CONFIG_PREEMPT_NONE is not set +CONFIG_PREEMPT_VOLUNTARY=y +# CONFIG_PREEMPT is not set +CONFIG_HZ=128 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_HIGHMEM is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_NEED_PER_CPU_KM=y +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_LEDS=y +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_DEPRECATED_PARAM_STRUCT is not set + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE=" debug " +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +CONFIG_KEXEC=y +CONFIG_ATAGS_PROC=y +# CONFIG_CRASH_DUMP is not set +CONFIG_AUTO_ZRELADDR=y + +# +# CPU Power Management +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_STAT_DETAILS=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +CONFIG_BINFMT_AOUT=m +CONFIG_BINFMT_MISC=y + +# +# Power management options +# +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +CONFIG_PM_SLEEP=y +CONFIG_PM_RUNTIME=y +CONFIG_PM=y +CONFIG_PM_DEBUG=y +# CONFIG_PM_VERBOSE is not set +# CONFIG_PM_ADVANCED_DEBUG is not set +# CONFIG_PM_TEST_SUSPEND is not set +CONFIG_CAN_PM_TRACE=y +# CONFIG_APM_EMULATION is not set +CONFIG_ARCH_HAS_OPP=y +CONFIG_PM_OPP=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_IPCOMP=m +CONFIG_NET_KEY=y +# CONFIG_NET_KEY_MIGRATE is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_ROUTE_CLASSID=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE_DEMUX=m +CONFIG_NET_IPGRE=m +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=m +CONFIG_INET_TCP_DIAG=m +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=y +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_YEAH=m +CONFIG_TCP_CONG_ILLINOIS=m +CONFIG_DEFAULT_CUBIC=y +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_MIP6=m +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +# CONFIG_IPV6_PIMSM_V2 is not set +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NETWORK_PHY_TIMESTAMPING=y +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_MARK=y +CONFIG_NF_CONNTRACK_ZONES=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CONNTRACK_TIMESTAMP=y +CONFIG_NF_CT_PROTO_DCCP=m +CONFIG_NF_CT_PROTO_GRE=m +CONFIG_NF_CT_PROTO_SCTP=m +CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_BROADCAST=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_SNMP=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +# CONFIG_NETFILTER_TPROXY is not set +CONFIG_NETFILTER_XTABLES=m + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=m +CONFIG_NETFILTER_XT_CONNMARK=m +CONFIG_NETFILTER_XT_SET=m + +# +# Xtables targets +# +CONFIG_NETFILTER_XT_TARGET_CHECKSUM=m +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +CONFIG_NETFILTER_XT_TARGET_CT=m +# CONFIG_NETFILTER_XT_TARGET_DSCP is not set +CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=m +# CONFIG_NETFILTER_XT_TARGET_LED is not set +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +CONFIG_NETFILTER_XT_TARGET_RATEEST=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +# CONFIG_NETFILTER_XT_TARGET_TRACE is not set +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set + +# +# Xtables matches +# +CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=m +# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_CPU=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DEVGROUP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_HL=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +# CONFIG_NETFILTER_XT_MATCH_OSF is not set +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_SET=m +CONFIG_IP_SET_MAX=256 +# CONFIG_IP_SET_BITMAP_IP is not set +# CONFIG_IP_SET_BITMAP_IPMAC is not set +# CONFIG_IP_SET_BITMAP_PORT is not set +# CONFIG_IP_SET_HASH_IP is not set +# CONFIG_IP_SET_HASH_IPPORT is not set +# CONFIG_IP_SET_HASH_IPPORTIP is not set +# CONFIG_IP_SET_HASH_IPPORTNET is not set +# CONFIG_IP_SET_HASH_NET is not set +# CONFIG_IP_SET_HASH_NETPORT is not set +# CONFIG_IP_SET_LIST_SET is not set +CONFIG_IP_VS=m +CONFIG_IP_VS_IPV6=y +CONFIG_IP_VS_DEBUG=y +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS transport protocol load balancing support +# +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_AH_ESP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +# CONFIG_IP_VS_PROTO_SCTP is not set + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m +CONFIG_IP_VS_NFCT=y +CONFIG_IP_VS_PE_SIP=m + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_NF_NAT_SNMP_BASIC=m +CONFIG_NF_NAT_PROTO_DCCP=m +CONFIG_NF_NAT_PROTO_GRE=m +CONFIG_NF_NAT_PROTO_UDPLITE=m +CONFIG_NF_NAT_PROTO_SCTP=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +CONFIG_NF_NAT_TFTP=m +CONFIG_NF_NAT_AMANDA=m +CONFIG_NF_NAT_PPTP=m +CONFIG_NF_NAT_H323=m +CONFIG_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV6=m +CONFIG_NF_CONNTRACK_IPV6=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +# CONFIG_BRIDGE_NF_EBTABLES is not set +CONFIG_IP_DCCP=m +CONFIG_INET_DCCP_DIAG=m + +# +# DCCP CCIDs Configuration (EXPERIMENTAL) +# +# CONFIG_IP_DCCP_CCID2_DEBUG is not set +CONFIG_IP_DCCP_CCID3=y +# CONFIG_IP_DCCP_CCID3_DEBUG is not set +CONFIG_IP_DCCP_TFRC_LIB=y + +# +# DCCP Kernel Hacking +# +# CONFIG_IP_DCCP_DEBUG is not set +CONFIG_IP_SCTP=m +# CONFIG_SCTP_DBG_MSG is not set +# CONFIG_SCTP_DBG_OBJCNT is not set +# CONFIG_SCTP_HMAC_NONE is not set +# CONFIG_SCTP_HMAC_SHA1 is not set +CONFIG_SCTP_HMAC_MD5=y +# CONFIG_RDS is not set +CONFIG_TIPC=m +# CONFIG_TIPC_ADVANCED is not set +# CONFIG_TIPC_DEBUG is not set +CONFIG_ATM=m +CONFIG_ATM_CLIP=m +# CONFIG_ATM_CLIP_NO_ICMP is not set +CONFIG_ATM_LANE=m +CONFIG_ATM_MPOA=m +CONFIG_ATM_BR2684=m +# CONFIG_ATM_BR2684_IPFILTER is not set +CONFIG_L2TP=m +CONFIG_L2TP_DEBUGFS=m +CONFIG_L2TP_V3=y +CONFIG_L2TP_IP=m +CONFIG_L2TP_ETH=m +CONFIG_STP=m +CONFIG_GARP=m +CONFIG_BRIDGE=m +CONFIG_BRIDGE_IGMP_SNOOPING=y +# CONFIG_NET_DSA is not set +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +CONFIG_WAN_ROUTER=m +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +CONFIG_NET_SCH_CBQ=m +CONFIG_NET_SCH_HTB=m +CONFIG_NET_SCH_HFSC=m +CONFIG_NET_SCH_ATM=m +CONFIG_NET_SCH_PRIO=m +CONFIG_NET_SCH_MULTIQ=m +CONFIG_NET_SCH_RED=m +# CONFIG_NET_SCH_SFB is not set +CONFIG_NET_SCH_SFQ=m +CONFIG_NET_SCH_TEQL=m +CONFIG_NET_SCH_TBF=m +CONFIG_NET_SCH_GRED=m +CONFIG_NET_SCH_DSMARK=m +CONFIG_NET_SCH_NETEM=m +CONFIG_NET_SCH_DRR=m +CONFIG_NET_SCH_MQPRIO=m +CONFIG_NET_SCH_CHOKE=m + +# +# Classification +# +CONFIG_NET_CLS=y +CONFIG_NET_CLS_BASIC=m +CONFIG_NET_CLS_TCINDEX=m +CONFIG_NET_CLS_ROUTE4=m +CONFIG_NET_CLS_FW=m +CONFIG_NET_CLS_U32=m +CONFIG_CLS_U32_PERF=y +CONFIG_CLS_U32_MARK=y +CONFIG_NET_CLS_RSVP=m +CONFIG_NET_CLS_RSVP6=m +CONFIG_NET_CLS_FLOW=m +CONFIG_NET_CLS_CGROUP=m +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_CLS_IND=y +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y +# CONFIG_BATMAN_ADV is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +CONFIG_CAN=m +CONFIG_CAN_RAW=m +CONFIG_CAN_BCM=m + +# +# CAN Device Drivers +# +CONFIG_CAN_VCAN=m +CONFIG_CAN_SLCAN=m +# CONFIG_CAN_DEV is not set +# CONFIG_CAN_DEBUG_DEVICES is not set +CONFIG_IRDA=m + +# +# IrDA protocols +# +CONFIG_IRLAN=m +CONFIG_IRNET=m +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y + +# +# IrDA options +# +CONFIG_IRDA_CACHE_LAST_LSAP=y +CONFIG_IRDA_FAST_RR=y +CONFIG_IRDA_DEBUG=y + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +CONFIG_IRTTY_SIR=m + +# +# Dongle support +# +CONFIG_DONGLE=y +CONFIG_ESI_DONGLE=m +CONFIG_ACTISYS_DONGLE=m +CONFIG_TEKRAM_DONGLE=m +CONFIG_TOIM3232_DONGLE=m +CONFIG_LITELINK_DONGLE=m +CONFIG_MA600_DONGLE=m +CONFIG_GIRBIL_DONGLE=m +CONFIG_MCP2120_DONGLE=m +CONFIG_OLD_BELKIN_DONGLE=m +# CONFIG_ACT200L_DONGLE is not set +CONFIG_KINGSUN_DONGLE=m +CONFIG_KSDAZZLE_DONGLE=m +CONFIG_KS959_DONGLE=m + +# +# FIR device drivers +# +CONFIG_USB_IRDA=m +CONFIG_SIGMATEL_FIR=m +CONFIG_MCS_FIR=m +CONFIG_BT=y +CONFIG_BT_L2CAP=y +CONFIG_BT_SCO=y +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=y +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_ATH3K=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIVHCI is not set +CONFIG_BT_MRVL=m +# CONFIG_BT_MRVL_SDIO is not set +CONFIG_BT_ATH3K=m +CONFIG_BT_WILINK=m +CONFIG_AF_RXRPC=m +# CONFIG_AF_RXRPC_DEBUG is not set +# CONFIG_RXKAD is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=m +CONFIG_NL80211_TESTMODE=y +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +CONFIG_CFG80211_DEFAULT_PS=y +# CONFIG_CFG80211_DEBUGFS is not set +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=y +CONFIG_LIB80211_CRYPT_WEP=m +CONFIG_LIB80211_CRYPT_CCMP=m +CONFIG_LIB80211_CRYPT_TKIP=m +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=m +CONFIG_MAC80211_HAS_RC=y +CONFIG_MAC80211_RC_PID=y +# CONFIG_MAC80211_RC_MINSTREL is not set +CONFIG_MAC80211_RC_DEFAULT_PID=y +CONFIG_MAC80211_RC_DEFAULT="pid" +# CONFIG_MAC80211_MESH is not set +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_DEBUG_MENU is not set +CONFIG_WIMAX=m +CONFIG_WIMAX_DEBUG_LEVEL=8 +CONFIG_RFKILL=y +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +CONFIG_NET_9P=m +# CONFIG_NET_9P_DEBUG is not set +# CONFIG_CAIF is not set +CONFIG_CEPH_LIB=m +# CONFIG_CEPH_LIB_PRETTYDEBUG is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_TESTS is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +# CONFIG_MTD_CMDLINE_PARTS is not set +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +CONFIG_SM_FTL=m +# CONFIG_MTD_OOPS is not set +CONFIG_MTD_SWAP=m + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +# CONFIG_MTD_SST25L is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_NAND_ECC_BCH is not set +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_OMAP2=y +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +CONFIG_MTD_NAND_PLATFORM=y +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +CONFIG_MTD_UBI=y +CONFIG_MTD_UBI_WL_THRESHOLD=4096 +CONFIG_MTD_UBI_BEB_RESERVE=1 +# CONFIG_MTD_UBI_GLUEBI is not set +# CONFIG_MTD_UBI_DEBUG is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=m + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +# CONFIG_BLK_DEV_XIP is not set +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +# CONFIG_CDROM_PKTCDVD_WCACHE is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set +# CONFIG_SENSORS_LIS3LV02D is not set +CONFIG_MISC_DEVICES=y +# CONFIG_AD525X_DPOT is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +CONFIG_SENSORS_BH1780=m +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +CONFIG_HMC6352=m +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +CONFIG_BMP085=m +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +CONFIG_EEPROM_AT24=m +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=y +CONFIG_IWMC3200TOP=m +# CONFIG_IWMC3200TOP_DEBUG is not set +# CONFIG_IWMC3200TOP_DEBUGFS is not set + +# +# Texas Instruments shared transport line discipline +# +CONFIG_TI_ST=m +# CONFIG_SENSORS_LIS3_SPI is not set +# CONFIG_SENSORS_LIS3_I2C is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +CONFIG_RAID_ATTRS=m +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=y +CONFIG_CHR_DEV_SCH=m +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +CONFIG_SCSI_ISCSI_ATTRS=m +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +CONFIG_ISCSI_TCP=m +CONFIG_ISCSI_BOOT_SYSFS=m +# CONFIG_LIBFC is not set +# CONFIG_LIBFCOE is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +CONFIG_MD_RAID456=m +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +CONFIG_BLK_DEV_DM=m +# CONFIG_DM_DEBUG is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_RAID=m +# CONFIG_DM_LOG_USERSPACE is not set +CONFIG_DM_ZERO=m +CONFIG_DM_MULTIPATH=m +# CONFIG_DM_MULTIPATH_QL is not set +# CONFIG_DM_MULTIPATH_ST is not set +CONFIG_DM_DELAY=m +# CONFIG_DM_UEVENT is not set +CONFIG_DM_FLAKEY=m +CONFIG_TARGET_CORE=m +CONFIG_TCM_IBLOCK=m +CONFIG_TCM_FILEIO=m +CONFIG_TCM_PSCSI=m +CONFIG_LOOPBACK_TARGET=m +# CONFIG_LOOPBACK_TARGET_CDB_DEBUG is not set +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_MACVLAN=m +CONFIG_MACVTAP=m +CONFIG_EQUALIZER=m +CONFIG_TUN=m +CONFIG_VETH=m +CONFIG_MII=y +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +CONFIG_BCM63XX_PHY=m +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +CONFIG_MICREL_PHY=m +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +CONFIG_NET_ETHERNET=y +# CONFIG_AX88796 is not set +CONFIG_SMC91X=y +# CONFIG_TI_DAVINCI_EMAC is not set +CONFIG_TI_DAVINCI_MDIO=m +CONFIG_TI_DAVINCI_CPDMA=m +# CONFIG_DM9000 is not set +CONFIG_ENC28J60=y +# CONFIG_ENC28J60_WRITEVERIFY is not set +# CONFIG_ETHOC is not set +CONFIG_SMC911X=y +CONFIG_SMSC911X=y +# CONFIG_SMSC911X_ARCH_HOOKS is not set +# CONFIG_DNET is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +# CONFIG_B44 is not set +CONFIG_KS8842=m +CONFIG_KS8851=y +# CONFIG_KS8851_MLL is not set +# CONFIG_FTMAC100 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_WLAN=y +# CONFIG_LIBERTAS_THINFIRM is not set +CONFIG_AT76C50X_USB=m +CONFIG_USB_ZD1201=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_RTL8187=m +CONFIG_RTL8187_LEDS=y +# CONFIG_MAC80211_HWSIM is not set +# CONFIG_ATH_COMMON is not set +CONFIG_B43=m +# CONFIG_B43_SDIO is not set +CONFIG_B43_PIO=y +CONFIG_B43_PHY_N=y +CONFIG_B43_PHY_LP=y +CONFIG_B43_LEDS=y +CONFIG_B43_HWRNG=y +# CONFIG_B43_DEBUG is not set +# CONFIG_B43LEGACY is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +CONFIG_HOSTAP_FIRMWARE_NVRAM=y +# CONFIG_IWM is not set +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +# CONFIG_LIBERTAS_SDIO is not set +# CONFIG_LIBERTAS_SPI is not set +# CONFIG_LIBERTAS_DEBUG is not set +# CONFIG_LIBERTAS_MESH is not set +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +# CONFIG_P54_SPI is not set +CONFIG_P54_LEDS=y +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +# CONFIG_RT2800USB is not set +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y +CONFIG_RT2X00_LIB_LEDS=y +# CONFIG_RT2X00_DEBUG is not set +CONFIG_RTL8192CU=m +CONFIG_RTLWIFI=m +CONFIG_RTL8192C_COMMON=m +CONFIG_WL1251=m +CONFIG_WL1251_SPI=m +CONFIG_WL1251_SDIO=m +CONFIG_WL12XX_MENU=m +CONFIG_WL12XX=m +CONFIG_WL12XX_HT=y +CONFIG_WL12XX_SPI=m +CONFIG_WL12XX_SDIO=m +# CONFIG_WL12XX_SDIO_TEST is not set +CONFIG_WL12XX_PLATFORM_DATA=y +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set + +# +# WiMAX Wireless Broadband devices +# +CONFIG_WIMAX_I2400M=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_WIMAX_I2400M_SDIO=m +CONFIG_WIMAX_IWMC3200_SDIO=y +CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 + +# +# USB Network Adapters +# +CONFIG_USB_CATC=y +CONFIG_USB_KAWETH=y +CONFIG_USB_PEGASUS=y +CONFIG_USB_RTL8150=y +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +# CONFIG_USB_NET_CDC_EEM is not set +CONFIG_USB_NET_CDC_NCM=m +CONFIG_USB_NET_DM9601=y +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_GL620A=y +CONFIG_USB_NET_NET1080=y +CONFIG_USB_NET_PLUSB=y +CONFIG_USB_NET_MCS7830=y +CONFIG_USB_NET_RNDIS_HOST=y +CONFIG_USB_NET_CDC_SUBSET=y +CONFIG_USB_ALI_M5632=y +CONFIG_USB_AN2720=y +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +CONFIG_USB_EPSON2888=y +CONFIG_USB_KC2190=y +CONFIG_USB_NET_ZAURUS=y +CONFIG_USB_NET_CX82310_ETH=m +CONFIG_USB_HSO=m +CONFIG_USB_NET_INT51X1=m +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_USB_VL600=m +# CONFIG_WAN is not set +CONFIG_ATM_DRIVERS=y +# CONFIG_ATM_DUMMY is not set +# CONFIG_ATM_TCP is not set + +# +# CAIF transport drivers +# +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +CONFIG_PPTP=m +# CONFIG_PPPOATM is not set +CONFIG_PPPOL2TP=m +# CONFIG_SLIP is not set +CONFIG_SLHC=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y +CONFIG_NETPOLL=y +CONFIG_NETPOLL_TRAP=y +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +CONFIG_INPUT_POLLDEV=y +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +# CONFIG_KEYBOARD_ATKBD is not set +CONFIG_KEYBOARD_QT1070=m +CONFIG_KEYBOARD_QT2160=m +# CONFIG_KEYBOARD_LKKBD is not set +CONFIG_KEYBOARD_GPIO=y +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +CONFIG_KEYBOARD_MCS=m +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_TWL4030 is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_ELANTECH is not set +# CONFIG_MOUSE_PS2_SENTELIC is not set +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_GPIO is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +CONFIG_INPUT_AD714X=m +CONFIG_INPUT_AD714X_I2C=m +CONFIG_INPUT_AD714X_SPI=m +# CONFIG_INPUT_ATI_REMOTE is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_TWL4030_PWRBUTTON=y +CONFIG_INPUT_TWL4030_VIBRA=m +CONFIG_INPUT_UINPUT=y +CONFIG_INPUT_PCF8574=m +CONFIG_INPUT_PWM_BEEPER=m +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +CONFIG_INPUT_ADXL34X=m +CONFIG_INPUT_ADXL34X_I2C=m +CONFIG_INPUT_ADXL34X_SPI=m +CONFIG_INPUT_CMA3000=m +CONFIG_INPUT_CMA3000_I2C=m + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +CONFIG_N_GSM=m +CONFIG_DEVKMEM=y + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=32 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +CONFIG_SERIAL_8250_EXTENDED=y +CONFIG_SERIAL_8250_MANY_PORTS=y +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX3107 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_OMAP=y +CONFIG_SERIAL_OMAP_CONSOLE=y +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +CONFIG_SERIAL_IFX6X60=m +CONFIG_TTY_PRINTK=y +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_RAMOOPS is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=m + +# +# Multiplexer I2C Chip support +# +CONFIG_I2C_MUX_GPIO=m +# CONFIG_I2C_MUX_PCA9541 is not set +# CONFIG_I2C_MUX_PCA954x is not set +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=m + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_DESIGNWARE is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +CONFIG_I2C_OMAP=y +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +CONFIG_I2C_DIOLAN_U2C=m +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_ALTERA is not set +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_GPIO is not set +# CONFIG_SPI_OC_TINY is not set +CONFIG_SPI_OMAP24XX=y +# CONFIG_SPI_PXA2XX_PCI is not set +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=y +# CONFIG_SPI_TLE62X0 is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_MAX730X=m + +# +# Memory mapped GPIO expanders: +# +# CONFIG_GPIO_BASIC_MMIO is not set +# CONFIG_GPIO_IT8761E is not set + +# +# I2C GPIO expanders: +# +CONFIG_GPIO_MAX7300=m +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +CONFIG_GPIO_TWL4030=y +CONFIG_GPIO_ADP5588=m + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_74X164 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=m +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +CONFIG_TEST_POWER=m +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_BQ20Z75 is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +CONFIG_BATTERY_MAX17042=m +CONFIG_CHARGER_ISP1704=m +CONFIG_CHARGER_TWL4030=m +CONFIG_CHARGER_GPIO=m +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADCXX is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +CONFIG_SENSORS_ADT7411=m +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +CONFIG_SENSORS_ASC7621=m +# CONFIG_SENSORS_ATXP1 is not set +CONFIG_SENSORS_DS620=m +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +CONFIG_SENSORS_GPIO_FAN=m +# CONFIG_SENSORS_IT87 is not set +CONFIG_SENSORS_JC42=m +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM70 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_MAX1111 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SHT21 is not set +CONFIG_SENSORS_SMM665=m +# CONFIG_SENSORS_DME1737 is not set +CONFIG_SENSORS_EMC1403=m +CONFIG_SENSORS_EMC2103=m +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH5627 is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +CONFIG_SENSORS_ADS7871=m +CONFIG_SENSORS_AMC6821=m +# CONFIG_SENSORS_THMC50 is not set +CONFIG_SENSORS_TMP102=m +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +CONFIG_SENSORS_TWL4030_MADC=m +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +CONFIG_THERMAL=y +CONFIG_THERMAL_HWMON=y +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_OMAP_WATCHDOG=y +# CONFIG_TWL4030_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=y +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_SDIOHOST_POSSIBLE=y +# CONFIG_SSB_SDIOHOST is not set +# CONFIG_SSB_SILENT is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_MFD_SUPPORT=y +CONFIG_MFD_CORE=y +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +CONFIG_TPS6105X=m +# CONFIG_TPS65010 is not set +CONFIG_TPS6507X=m +CONFIG_TWL4030_CORE=y +CONFIG_TWL4030_MADC=m +CONFIG_TWL4030_POWER=y +CONFIG_TWL4030_CODEC=y +CONFIG_TWL4030_POWEROFF=y +CONFIG_TWL6030_PWM=m +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_MC13XXX is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_EZX_PCAP is not set +CONFIG_MFD_TPS6586X=y +CONFIG_MFD_WL1273_CORE=m +CONFIG_MFD_OMAP_USB_HOST=y +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +CONFIG_REGULATOR_DUMMY=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_BQ24022 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +CONFIG_REGULATOR_TWL4030=y +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +CONFIG_REGULATOR_TPS6105X=m +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_AD5398 is not set +CONFIG_REGULATOR_TPS6586X=m +CONFIG_REGULATOR_TPS6524X=m +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CONTROLLER=y +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_COMMON=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m + +# +# Multimedia drivers +# +CONFIG_RC_CORE=m +CONFIG_LIRC=m +CONFIG_RC_MAP=m +CONFIG_IR_NEC_DECODER=m +CONFIG_IR_RC5_DECODER=m +CONFIG_IR_RC6_DECODER=m +CONFIG_IR_JVC_DECODER=m +CONFIG_IR_SONY_DECODER=m +CONFIG_IR_RC5_SZ_DECODER=m +CONFIG_IR_LIRC_CODEC=m +# CONFIG_IR_IMON is not set +# CONFIG_IR_MCEUSB is not set +# CONFIG_IR_STREAMZAP is not set +CONFIG_RC_LOOPBACK=m +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=m +CONFIG_MEDIA_TUNER_CUSTOMISE=y + +# +# Customize TV tuners +# +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA827X=m +CONFIG_MEDIA_TUNER_TDA18271=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_TEA5761=m +CONFIG_MEDIA_TUNER_TEA5767=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_MT2131=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=m +CONFIG_MEDIA_TUNER_MAX2165=m +CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_VIDEO_V4L2=y +CONFIG_VIDEOBUF_GEN=y +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF_DMA_CONTIG=y +CONFIG_VIDEOBUF_DVB=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_VIDEO_TUNER=m +CONFIG_V4L2_MEM2MEM_DEV=m +CONFIG_VIDEOBUF2_CORE=m +CONFIG_VIDEOBUF2_MEMOPS=m +CONFIG_VIDEOBUF2_VMALLOC=m +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set +CONFIG_VIDEO_IR_I2C=m + +# +# Encoders/decoders and other helper chips +# + +# +# Audio decoders +# +# CONFIG_VIDEO_TVAUDIO is not set +# CONFIG_VIDEO_TDA7432 is not set +# CONFIG_VIDEO_TDA9840 is not set +# CONFIG_VIDEO_TEA6415C is not set +# CONFIG_VIDEO_TEA6420 is not set +CONFIG_VIDEO_MSP3400=m +# CONFIG_VIDEO_CS5345 is not set +CONFIG_VIDEO_CS53L32A=m +# CONFIG_VIDEO_M52790 is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +CONFIG_VIDEO_WM8775=m +# CONFIG_VIDEO_WM8739 is not set +# CONFIG_VIDEO_VP27SMPX is not set + +# +# RDS decoders +# +# CONFIG_VIDEO_SAA6588 is not set + +# +# Video decoders +# +CONFIG_VIDEO_ADV7180=m +# CONFIG_VIDEO_BT819 is not set +# CONFIG_VIDEO_BT856 is not set +# CONFIG_VIDEO_BT866 is not set +# CONFIG_VIDEO_KS0127 is not set +CONFIG_VIDEO_OV7670=m +CONFIG_VIDEO_MT9P031=y +CONFIG_VIDEO_MT9V011=m +CONFIG_VIDEO_MT9V032=y +# CONFIG_VIDEO_TCM825X is not set +# CONFIG_VIDEO_SAA7110 is not set +CONFIG_VIDEO_SAA711X=m +# CONFIG_VIDEO_SAA717X is not set +# CONFIG_VIDEO_SAA7191 is not set +CONFIG_VIDEO_TVP514X=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_TVP7002=m +# CONFIG_VIDEO_VPX3220 is not set + +# +# Video and audio decoders +# +CONFIG_VIDEO_CX25840=m + +# +# MPEG video encoders +# +CONFIG_VIDEO_CX2341X=m + +# +# Video encoders +# +# CONFIG_VIDEO_SAA7127 is not set +# CONFIG_VIDEO_SAA7185 is not set +# CONFIG_VIDEO_ADV7170 is not set +# CONFIG_VIDEO_ADV7175 is not set +# CONFIG_VIDEO_THS7303 is not set +# CONFIG_VIDEO_ADV7343 is not set +# CONFIG_VIDEO_AK881X is not set + +# +# Video improvement chips +# +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set +CONFIG_VIDEO_VIVI=m +CONFIG_VIDEO_VPSS_SYSTEM=m +CONFIG_VIDEO_VPFE_CAPTURE=y +CONFIG_VIDEO_DM6446_CCDC=m +CONFIG_VIDEO_OMAP2_VOUT=y +# CONFIG_VIDEO_CPIA2 is not set +CONFIG_VIDEO_TIMBERDALE=m +# CONFIG_VIDEO_AU0828 is not set +CONFIG_VIDEO_SR030PC30=m +CONFIG_VIDEO_NOON010PC30=m +CONFIG_VIDEO_OMAP3=y +CONFIG_VIDEO_OMAP3_DEBUG=y +# CONFIG_SOC_CAMERA is not set +CONFIG_V4L_USB_DRIVERS=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +CONFIG_USB_M5602=m +CONFIG_USB_STV06XX=m +# CONFIG_USB_GL860 is not set +CONFIG_USB_GSPCA_BENQ=m +CONFIG_USB_GSPCA_CONEX=m +CONFIG_USB_GSPCA_CPIA1=m +CONFIG_USB_GSPCA_ETOMS=m +CONFIG_USB_GSPCA_FINEPIX=m +# CONFIG_USB_GSPCA_JEILINJ is not set +CONFIG_USB_GSPCA_KONICA=m +CONFIG_USB_GSPCA_MARS=m +# CONFIG_USB_GSPCA_MR97310A is not set +CONFIG_USB_GSPCA_NW80X=m +CONFIG_USB_GSPCA_OV519=m +CONFIG_USB_GSPCA_OV534=m +CONFIG_USB_GSPCA_OV534_9=m +CONFIG_USB_GSPCA_PAC207=m +# CONFIG_USB_GSPCA_PAC7302 is not set +CONFIG_USB_GSPCA_PAC7311=m +CONFIG_USB_GSPCA_SN9C2028=m +# CONFIG_USB_GSPCA_SN9C20X is not set +CONFIG_USB_GSPCA_SONIXB=m +CONFIG_USB_GSPCA_SONIXJ=m +CONFIG_USB_GSPCA_SPCA500=m +CONFIG_USB_GSPCA_SPCA501=m +CONFIG_USB_GSPCA_SPCA505=m +CONFIG_USB_GSPCA_SPCA506=m +CONFIG_USB_GSPCA_SPCA508=m +CONFIG_USB_GSPCA_SPCA561=m +CONFIG_USB_GSPCA_SPCA1528=m +# CONFIG_USB_GSPCA_SQ905 is not set +# CONFIG_USB_GSPCA_SQ905C is not set +CONFIG_USB_GSPCA_SQ930X=m +CONFIG_USB_GSPCA_STK014=m +# CONFIG_USB_GSPCA_STV0680 is not set +CONFIG_USB_GSPCA_SUNPLUS=m +CONFIG_USB_GSPCA_T613=m +CONFIG_USB_GSPCA_TV8532=m +CONFIG_USB_GSPCA_VC032X=m +CONFIG_USB_GSPCA_VICAM=m +CONFIG_USB_GSPCA_XIRLINK_CIT=m +CONFIG_USB_GSPCA_ZC3XX=m +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_TLG2300=m +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_RC=y +# CONFIG_VIDEO_CX231XX_ALSA is not set +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_USBVISION=m +CONFIG_USB_ET61X251=m +CONFIG_USB_SN9C102=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +CONFIG_V4L_MEM2MEM_DRIVERS=y +CONFIG_VIDEO_MEM2MEM_TESTDEV=m +CONFIG_RADIO_ADAPTERS=y +# CONFIG_I2C_SI4713 is not set +# CONFIG_RADIO_SI4713 is not set +# CONFIG_USB_DSBR is not set +# CONFIG_RADIO_SI470X is not set +# CONFIG_USB_MR800 is not set +# CONFIG_RADIO_TEA5764 is not set +CONFIG_RADIO_SAA7706H=m +# CONFIG_RADIO_TEF6862 is not set +CONFIG_RADIO_WL1273=m + +# +# Texas Instruments WL128x FM driver (ST based) +# +CONFIG_RADIO_WL128X=m +CONFIG_DVB_MAX_ADAPTERS=8 +CONFIG_DVB_DYNAMIC_MINORS=y +CONFIG_DVB_CAPTURE_DRIVERS=y +# CONFIG_TTPCI_EEPROM is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_AF9015=m +# CONFIG_DVB_USB_CE6230 is not set +# CONFIG_DVB_USB_FRIIO is not set +# CONFIG_DVB_USB_EC168 is not set +CONFIG_DVB_USB_AZ6027=m +CONFIG_DVB_USB_LME2510=m +CONFIG_DVB_USB_TECHNISAT_USB2=m +# CONFIG_SMS_SIANO_MDTV is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set + +# +# Supported DVB Frontends +# +# CONFIG_DVB_FE_CUSTOMISE is not set + +# +# Multistandard (satellite) frontends +# +CONFIG_DVB_STB0899=m +CONFIG_DVB_STB6100=m +CONFIG_DVB_STV090x=m +CONFIG_DVB_STV6110x=m + +# +# DVB-S (satellite) frontends +# +CONFIG_DVB_CX24123=m +CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10039=m +CONFIG_DVB_S5H1420=m +CONFIG_DVB_STV0288=m +CONFIG_DVB_STB6000=m +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_TDA10086=m +CONFIG_DVB_TUNER_ITD1000=m +CONFIG_DVB_TUNER_CX24113=m +CONFIG_DVB_TDA826X=m +CONFIG_DVB_CX24116=m +CONFIG_DVB_SI21XX=m +CONFIG_DVB_DS3000=m + +# +# DVB-T (terrestrial) frontends +# +CONFIG_DVB_CX22702=m +CONFIG_DVB_TDA1004X=m +CONFIG_DVB_NXT6000=m +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +CONFIG_DVB_DIB3000MB=m +CONFIG_DVB_DIB3000MC=m +CONFIG_DVB_DIB7000M=m +CONFIG_DVB_DIB7000P=m +CONFIG_DVB_TDA10048=m +CONFIG_DVB_AF9013=m + +# +# DVB-C (cable) frontends +# +CONFIG_DVB_TDA10023=m +CONFIG_DVB_STV0297=m + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +CONFIG_DVB_NXT200X=m +CONFIG_DVB_BCM3510=m +CONFIG_DVB_LGDT330X=m +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_S5H1409=m +CONFIG_DVB_S5H1411=m + +# +# ISDB-T (terrestrial) frontends +# +CONFIG_DVB_S921=m +CONFIG_DVB_DIB8000=m +CONFIG_DVB_MB86A20S=m + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +CONFIG_DVB_TUNER_DIB0070=m +CONFIG_DVB_TUNER_DIB0090=m + +# +# SEC control devices for DVB-S +# +CONFIG_DVB_LNBP21=m +CONFIG_DVB_ISL6421=m +CONFIG_DVB_LGS8GXX=m +CONFIG_DVB_ATBM8830=m +CONFIG_DVB_IX2505V=m + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set + +# +# Graphics support +# +CONFIG_DRM=m +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +CONFIG_FB_SYS_FILLRECT=m +CONFIG_FB_SYS_COPYAREA=m +CONFIG_FB_SYS_IMAGEBLIT=m +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=m +# CONFIG_FB_WMT_GE_ROPS is not set +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_TMIO is not set +CONFIG_FB_UDL=m +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set +CONFIG_OMAP2_VRAM=y +CONFIG_OMAP2_VRFB=y +CONFIG_OMAP2_DSS=y +CONFIG_OMAP2_VRAM_SIZE=14 +CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y +# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set +CONFIG_OMAP2_DSS_DPI=y +# CONFIG_OMAP2_DSS_RFBI is not set +CONFIG_OMAP2_DSS_VENC=y +# CONFIG_OMAP2_DSS_SDI is not set +CONFIG_OMAP2_DSS_DSI=y +CONFIG_OMAP2_DSS_USE_DSI_PLL=y +# CONFIG_OMAP2_DSS_FAKE_VSYNC is not set +CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 +CONFIG_FB_OMAP2=y +CONFIG_FB_OMAP2_DEBUG_SUPPORT=y +CONFIG_FB_OMAP2_NUM_FBS=2 + +# +# OMAP2/3 Display Device Drivers +# +CONFIG_PANEL_GENERIC_DPI=y +# CONFIG_PANEL_LGPHILIPS_LB035Q02 is not set +CONFIG_PANEL_SHARP_LS037V7DW01=y +CONFIG_PANEL_NEC_NL8048HL11_01B=y +# CONFIG_PANEL_TAAL is not set +CONFIG_PANEL_TPO_TD043MTEA1=m +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y + +# +# Display device support +# +CONFIG_DISPLAY_SUPPORT=y + +# +# Display hardware drivers +# + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +# CONFIG_FONTS is not set +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +CONFIG_LOGO=y +# CONFIG_LOGO_LINUX_MONO is not set +# CONFIG_LOGO_LINUX_VGA16 is not set +CONFIG_LOGO_LINUX_CLUT224=y +CONFIG_SOUND=y +CONFIG_SOUND_OSS_CORE=y +CONFIG_SOUND_OSS_CORE_PRECLAIM=y +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_JACK=y +CONFIG_SND_SEQUENCER=m +# CONFIG_SND_SEQ_DUMMY is not set +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=y +CONFIG_SND_PCM_OSS=y +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +CONFIG_SND_HRTIMER=m +CONFIG_SND_SEQ_HRTIMER_DEFAULT=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_RAWMIDI_SEQ=m +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +CONFIG_SND_ALOOP=m +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +# CONFIG_SND_ARM is not set +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=y +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_USB_6FIRE=m +CONFIG_SND_SOC=y +CONFIG_SND_SOC_CACHE_LZO=y +CONFIG_SND_OMAP_SOC=y +CONFIG_SND_OMAP_SOC_MCBSP=y +CONFIG_SND_OMAP_SOC_OVERO=y +CONFIG_SND_OMAP_SOC_OMAP3EVM=y +CONFIG_SND_OMAP_SOC_OMAP3_BEAGLE=y +CONFIG_SND_OMAP_SOC_ZOOM2=y +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_TWL4030=y +# CONFIG_SOUND_PRIME is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +# CONFIG_USB_HIDDEV is not set + +# +# Special HID drivers +# +# CONFIG_HID_3M_PCT is not set +CONFIG_HID_A4TECH=y +CONFIG_HID_ACRUX=m +# CONFIG_HID_ACRUX_FF is not set +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +# CONFIG_HID_CANDO is not set +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +# CONFIG_HID_PRODIKEYS is not set +CONFIG_HID_CYPRESS=y +# CONFIG_HID_DRAGONRISE is not set +CONFIG_HID_EMS_FF=m +# CONFIG_HID_ELECOM is not set +CONFIG_HID_EZKEY=y +CONFIG_HID_KEYTOUCH=m +# CONFIG_HID_KYE is not set +CONFIG_HID_UCLOGIC=m +CONFIG_HID_WALTOP=m +CONFIG_HID_GYRATION=y +# CONFIG_HID_TWINHAN is not set +# CONFIG_HID_KENSINGTON is not set +CONFIG_HID_LCPOWER=m +CONFIG_HID_LOGITECH=y +# CONFIG_LOGITECH_FF is not set +# CONFIG_LOGIRUMBLEPAD2_FF is not set +# CONFIG_LOGIG940_FF is not set +# CONFIG_LOGIWII_FF is not set +CONFIG_HID_MAGICMOUSE=m +CONFIG_HID_MICROSOFT=y +# CONFIG_HID_MOSART is not set +CONFIG_HID_MONTEREY=y +CONFIG_HID_MULTITOUCH=m +CONFIG_HID_NTRIG=y +# CONFIG_HID_ORTEK is not set +CONFIG_HID_PANTHERLORD=y +# CONFIG_PANTHERLORD_FF is not set +CONFIG_HID_PETALYNX=y +CONFIG_HID_PICOLCD=m +CONFIG_HID_PICOLCD_FB=y +CONFIG_HID_PICOLCD_BACKLIGHT=y +CONFIG_HID_PICOLCD_LEDS=y +CONFIG_HID_QUANTA=m +CONFIG_HID_ROCCAT=m +CONFIG_HID_ROCCAT_COMMON=m +CONFIG_HID_ROCCAT_ARVO=m +CONFIG_HID_ROCCAT_KONE=m +CONFIG_HID_ROCCAT_KONEPLUS=m +CONFIG_HID_ROCCAT_KOVAPLUS=m +# CONFIG_HID_ROCCAT_PYRA is not set +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_HID_STANTUM=m +CONFIG_HID_SUNPLUS=y +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +CONFIG_HID_TOPSEED=y +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_WACOM is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +CONFIG_USB_DEVICE_CLASS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +CONFIG_USB_SUSPEND=y +CONFIG_USB_OTG=y +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +CONFIG_USB_MON=y +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_HCD_OMAP=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_U132_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HWA_HCD is not set +CONFIG_USB_MUSB_HDRC=y +# CONFIG_USB_MUSB_TUSB6010 is not set +CONFIG_USB_MUSB_OMAP2PLUS=y +# CONFIG_USB_MUSB_AM35X is not set +# CONFIG_USB_MUSB_HOST is not set +# CONFIG_USB_MUSB_PERIPHERAL is not set +CONFIG_USB_MUSB_OTG=y +CONFIG_USB_GADGET_MUSB_HDRC=y +CONFIG_USB_MUSB_HDRC_HCD=y +# CONFIG_MUSB_PIO_ONLY is not set +CONFIG_USB_INVENTRA_DMA=y +# CONFIG_USB_TI_CPPI_DMA is not set +# CONFIG_USB_MUSB_DEBUG is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_WDM=m +CONFIG_USB_TMC=m + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_REALTEK=m +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +CONFIG_USB_STORAGE_ENE_UB6250=m +CONFIG_USB_UAS=m +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +CONFIG_USB_EZUSB=y +CONFIG_USB_SERIAL_GENERIC=y +CONFIG_USB_SERIAL_AIRCABLE=m +CONFIG_USB_SERIAL_ARK3116=m +CONFIG_USB_SERIAL_BELKIN=m +CONFIG_USB_SERIAL_CH341=m +# CONFIG_USB_SERIAL_WHITEHEAT is not set +CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m +# CONFIG_USB_SERIAL_CP210X is not set +CONFIG_USB_SERIAL_CYPRESS_M8=m +CONFIG_USB_SERIAL_EMPEG=m +CONFIG_USB_SERIAL_FTDI_SIO=m +CONFIG_USB_SERIAL_FUNSOFT=m +CONFIG_USB_SERIAL_VISOR=m +CONFIG_USB_SERIAL_IPAQ=m +CONFIG_USB_SERIAL_IR=m +CONFIG_USB_SERIAL_EDGEPORT=m +CONFIG_USB_SERIAL_EDGEPORT_TI=m +CONFIG_USB_SERIAL_GARMIN=m +CONFIG_USB_SERIAL_IPW=m +CONFIG_USB_SERIAL_IUU=m +CONFIG_USB_SERIAL_KEYSPAN_PDA=m +CONFIG_USB_SERIAL_KEYSPAN=m +CONFIG_USB_SERIAL_KEYSPAN_MPR=y +CONFIG_USB_SERIAL_KEYSPAN_USA28=y +CONFIG_USB_SERIAL_KEYSPAN_USA28X=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y +CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y +CONFIG_USB_SERIAL_KEYSPAN_USA19=y +CONFIG_USB_SERIAL_KEYSPAN_USA18X=y +CONFIG_USB_SERIAL_KEYSPAN_USA19W=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y +CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y +CONFIG_USB_SERIAL_KEYSPAN_USA49W=y +CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y +CONFIG_USB_SERIAL_KLSI=m +CONFIG_USB_SERIAL_KOBIL_SCT=m +CONFIG_USB_SERIAL_MCT_U232=m +CONFIG_USB_SERIAL_MOS7720=m +CONFIG_USB_SERIAL_MOS7840=m +CONFIG_USB_SERIAL_MOTOROLA=m +CONFIG_USB_SERIAL_NAVMAN=m +CONFIG_USB_SERIAL_PL2303=m +CONFIG_USB_SERIAL_OTI6858=m +CONFIG_USB_SERIAL_QCAUX=m +# CONFIG_USB_SERIAL_QUALCOMM is not set +CONFIG_USB_SERIAL_SPCP8X5=m +CONFIG_USB_SERIAL_HP4X=m +CONFIG_USB_SERIAL_SAFE=m +# CONFIG_USB_SERIAL_SAFE_PADDED is not set +CONFIG_USB_SERIAL_SAMBA=m +CONFIG_USB_SERIAL_SIEMENS_MPI=m +CONFIG_USB_SERIAL_SIERRAWIRELESS=m +# CONFIG_USB_SERIAL_SYMBOL is not set +# CONFIG_USB_SERIAL_TI is not set +CONFIG_USB_SERIAL_CYBERJACK=m +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +CONFIG_USB_SERIAL_OMNINET=m +CONFIG_USB_SERIAL_OPTICON=m +CONFIG_USB_SERIAL_VIVOPAY_SERIAL=m +CONFIG_USB_SERIAL_ZIO=m +CONFIG_USB_SERIAL_SSU100=m +CONFIG_USB_SERIAL_DEBUG=m + +# +# USB Miscellaneous drivers +# +CONFIG_USB_EMI62=m +CONFIG_USB_EMI26=m +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +CONFIG_USB_LEGOTOWER=m +CONFIG_USB_LCD=m +CONFIG_USB_LED=m +CONFIG_USB_CYPRESS_CY7C63=m +CONFIG_USB_CYTHERM=m +CONFIG_USB_IDMOUSE=m +CONFIG_USB_FTDI_ELAN=m +# CONFIG_USB_APPLEDISPLAY is not set +CONFIG_USB_SISUSBVGA=m +CONFIG_USB_SISUSBVGA_CON=y +CONFIG_USB_LD=m +CONFIG_USB_TRANCEVIBRATOR=m +# CONFIG_USB_IOWARRIOR is not set +CONFIG_USB_TEST=m +# CONFIG_USB_ISIGHTFW is not set +CONFIG_USB_YUREX=m +CONFIG_USB_ATM=m +CONFIG_USB_SPEEDTOUCH=m +CONFIG_USB_CXACRU=m +CONFIG_USB_UEAGLEATM=m +CONFIG_USB_XUSBATM=m +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_DEBUG_FS=y +CONFIG_USB_GADGET_VBUS_DRAW=480 +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_FUSB300 is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_R8A66597 is not set +# CONFIG_USB_GADGET_PXA_U2O is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +CONFIG_USB_GADGET_DUALSPEED=y +# CONFIG_USB_ZERO is not set +# CONFIG_USB_AUDIO is not set +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_ETH_EEM is not set +CONFIG_USB_G_NCM=m +# CONFIG_USB_GADGETFS is not set +CONFIG_USB_FUNCTIONFS=m +# CONFIG_USB_FUNCTIONFS_ETH is not set +CONFIG_USB_FUNCTIONFS_RNDIS=y +# CONFIG_USB_FUNCTIONFS_GENERIC is not set +# CONFIG_USB_FILE_STORAGE is not set +# CONFIG_USB_MASS_STORAGE is not set +# CONFIG_USB_G_SERIAL is not set +# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set +# CONFIG_USB_CDC_COMPOSITE is not set +# CONFIG_USB_G_MULTI is not set +CONFIG_USB_G_HID=m +CONFIG_USB_G_DBGP=m +# CONFIG_USB_G_DBGP_PRINTK is not set +CONFIG_USB_G_DBGP_SERIAL=y +CONFIG_USB_G_WEBCAM=m + +# +# OTG and related infrastructure +# +CONFIG_USB_OTG_UTILS=y +CONFIG_USB_GPIO_VBUS=y +# CONFIG_ISP1301_OMAP is not set +# CONFIG_USB_ULPI is not set +CONFIG_TWL4030_USB=y +CONFIG_TWL6030_USB=m +CONFIG_NOP_USB_XCEIV=y +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_UNSAFE_RESUME=y +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_BLOCK_BOUNCE=y +CONFIG_SDIO_UART=y +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_OMAP is not set +CONFIG_MMC_OMAP_HS=y +CONFIG_MMC_SPI=m +# CONFIG_MMC_DW is not set +CONFIG_MMC_USHC=m +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_LM3530 is not set +# CONFIG_LEDS_PCA9532 is not set +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_GPIO_PLATFORM=y +# CONFIG_LEDS_LP3944 is not set +CONFIG_LEDS_LP5521=m +CONFIG_LEDS_LP5523=m +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_DAC124S085 is not set +CONFIG_LEDS_PWM=m +CONFIG_LEDS_REGULATOR=m +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_LT3593 is not set +CONFIG_LEDS_TRIGGERS=y + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGER_TIMER=m +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +CONFIG_LEDS_TRIGGER_BACKLIGHT=m +CONFIG_LEDS_TRIGGER_GPIO=m +CONFIG_LEDS_TRIGGER_DEFAULT_ON=m + +# +# iptables trigger is under Netfilter config (LED target) +# +CONFIG_NFC_DEVICES=y +CONFIG_PN544_NFC=m +# CONFIG_ACCESSIBILITY is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +CONFIG_RTC_DRV_DS1307=y +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +CONFIG_RTC_DRV_BQ32K=m +CONFIG_RTC_DRV_TWL4030=m +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set +# CONFIG_RTC_DRV_PCF2123 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_DMADEVICES is not set +CONFIG_TIMB_DMA=m +CONFIG_DMA_ENGINE=y +# CONFIG_AUXDISPLAY is not set +CONFIG_UIO=m +CONFIG_UIO_PDRV=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_STAGING=y +# CONFIG_STAGING_EXCLUDE_BUILD is not set +# CONFIG_VIDEO_TM6000 is not set +# CONFIG_USB_IP_COMMON is not set +CONFIG_W35UND=m +CONFIG_PRISM2_USB=m +CONFIG_ECHO=m +CONFIG_BRCM80211=m +CONFIG_BRCMFMAC=y +# CONFIG_BRCMDBG is not set +CONFIG_RT2870=m +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +CONFIG_R8712U=m +CONFIG_R8712_AP=y +# CONFIG_TRANZPORT is not set +# CONFIG_POHMELFS is not set +# CONFIG_LINE6_USB is not set +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_USB_SERIAL_QUATECH_USB2 is not set +# CONFIG_VT6656 is not set +# CONFIG_IIO is not set +CONFIG_XVMALLOC=y +CONFIG_ZRAM=m +# CONFIG_ZRAM_DEBUG is not set +# CONFIG_FB_SM7XX is not set +# CONFIG_LIRC_STAGING is not set +# CONFIG_EASYCAP is not set +# CONFIG_TIDSPBRIDGE is not set +# CONFIG_MACH_OMAP3_WESTBRIDGE_AST_PNAND_HAL is not set +CONFIG_MACH_NO_WESTBRIDGE=y +# CONFIG_ATH6K_LEGACY is not set +CONFIG_USB_ENESTORAGE=m +CONFIG_BCM_WIMAX=m +CONFIG_FT1000=m +CONFIG_FT1000_USB=m + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +CONFIG_TOUCHSCREEN_CLEARPAD_TM1217=m +CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4=m + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set +CONFIG_CLKDEV_LOOKUP=y + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_FS_XATTR=y +CONFIG_EXT4_FS_POSIX_ACL=y +CONFIG_EXT4_FS_SECURITY=y +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=y +CONFIG_REISERFS_FS=m +# CONFIG_REISERFS_CHECK is not set +CONFIG_REISERFS_PROC_INFO=y +CONFIG_REISERFS_FS_XATTR=y +# CONFIG_REISERFS_FS_POSIX_ACL is not set +# CONFIG_REISERFS_FS_SECURITY is not set +CONFIG_JFS_FS=m +CONFIG_JFS_POSIX_ACL=y +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_DEBUG is not set +CONFIG_JFS_STATISTICS=y +CONFIG_XFS_FS=m +CONFIG_XFS_QUOTA=y +CONFIG_XFS_POSIX_ACL=y +CONFIG_XFS_RT=y +# CONFIG_XFS_DEBUG is not set +CONFIG_GFS2_FS=m +CONFIG_GFS2_FS_LOCKING_DLM=y +CONFIG_OCFS2_FS=m +CONFIG_OCFS2_FS_O2CB=m +CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m +CONFIG_OCFS2_FS_STATS=y +CONFIG_OCFS2_DEBUG_MASKLOG=y +# CONFIG_OCFS2_DEBUG_FS is not set +CONFIG_BTRFS_FS=m +CONFIG_BTRFS_FS_POSIX_ACL=y +CONFIG_NILFS2_FS=m +CONFIG_FS_POSIX_ACL=y +CONFIG_EXPORTFS=y +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +CONFIG_FANOTIFY=y +CONFIG_QUOTA=y +# CONFIG_QUOTA_NETLINK_INTERFACE is not set +CONFIG_PRINT_QUOTA_WARNING=y +# CONFIG_QUOTA_DEBUG is not set +CONFIG_QUOTA_TREE=y +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTACTL=y +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m +CONFIG_CUSE=m +CONFIG_GENERIC_ACL=y + +# +# Caches +# +CONFIG_FSCACHE=m +CONFIG_FSCACHE_STATS=y +CONFIG_FSCACHE_HISTOGRAM=y +# CONFIG_FSCACHE_DEBUG is not set +# CONFIG_FSCACHE_OBJECT_LIST is not set +CONFIG_CACHEFILES=m +# CONFIG_CACHEFILES_DEBUG is not set +CONFIG_CACHEFILES_HISTOGRAM=y + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=m +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=m +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +CONFIG_NTFS_FS=m +# CONFIG_NTFS_DEBUG is not set +# CONFIG_NTFS_RW is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_CONFIGFS_FS=m +CONFIG_MISC_FILESYSTEMS=y +CONFIG_ADFS_FS=m +# CONFIG_ADFS_FS_RW is not set +CONFIG_AFFS_FS=m +# CONFIG_ECRYPT_FS is not set +CONFIG_UNION_FS=m +CONFIG_UNION_FS_XATTR=y +# CONFIG_UNION_FS_DEBUG is not set +CONFIG_HFS_FS=m +CONFIG_HFSPLUS_FS=m +CONFIG_BEFS_FS=m +# CONFIG_BEFS_DEBUG is not set +CONFIG_BFS_FS=m +CONFIG_EFS_FS=m +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +CONFIG_JFFS2_SUMMARY=y +CONFIG_JFFS2_FS_XATTR=y +CONFIG_JFFS2_FS_POSIX_ACL=y +CONFIG_JFFS2_FS_SECURITY=y +CONFIG_JFFS2_COMPRESSION_OPTIONS=y +CONFIG_JFFS2_ZLIB=y +CONFIG_JFFS2_LZO=y +CONFIG_JFFS2_RTIME=y +CONFIG_JFFS2_RUBIN=y +# CONFIG_JFFS2_CMODE_NONE is not set +# CONFIG_JFFS2_CMODE_PRIORITY is not set +# CONFIG_JFFS2_CMODE_SIZE is not set +CONFIG_JFFS2_CMODE_FAVOURLZO=y +CONFIG_UBIFS_FS=y +CONFIG_UBIFS_FS_XATTR=y +CONFIG_UBIFS_FS_ADVANCED_COMPR=y +CONFIG_UBIFS_FS_LZO=y +CONFIG_UBIFS_FS_ZLIB=y +# CONFIG_UBIFS_FS_DEBUG is not set +CONFIG_LOGFS=m +CONFIG_CRAMFS=m +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +CONFIG_VXFS_FS=m +CONFIG_MINIX_FS=m +CONFIG_OMFS_FS=m +CONFIG_HPFS_FS=m +CONFIG_QNX4FS_FS=m +CONFIG_ROMFS_FS=m +CONFIG_ROMFS_BACKED_BY_BLOCK=y +# CONFIG_ROMFS_BACKED_BY_MTD is not set +# CONFIG_ROMFS_BACKED_BY_BOTH is not set +CONFIG_ROMFS_ON_BLOCK=y +CONFIG_PSTORE=y +CONFIG_SYSV_FS=m +CONFIG_UFS_FS=m +# CONFIG_UFS_FS_WRITE is not set +# CONFIG_UFS_DEBUG is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_PNFS_FILE_LAYOUT=y +CONFIG_ROOT_NFS=y +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_NEW_IDMAPPER is not set +CONFIG_NFSD=m +CONFIG_NFSD_DEPRECATED=y +CONFIG_NFSD_V2_ACL=y +CONFIG_NFSD_V3=y +CONFIG_NFSD_V3_ACL=y +CONFIG_NFSD_V4=y +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=m +CONFIG_CEPH_FS=m +CONFIG_CIFS=m +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +CONFIG_CIFS_XATTR=y +CONFIG_CIFS_POSIX=y +# CONFIG_CIFS_DEBUG2 is not set +CONFIG_CIFS_DFS_UPCALL=y +CONFIG_CIFS_FSCACHE=y +CONFIG_CIFS_ACL=y +CONFIG_CIFS_EXPERIMENTAL=y +CONFIG_NCP_FS=m +# CONFIG_NCPFS_PACKET_SIGNING is not set +# CONFIG_NCPFS_IOCTL_LOCKING is not set +# CONFIG_NCPFS_STRONG is not set +# CONFIG_NCPFS_NFS_NS is not set +# CONFIG_NCPFS_OS2_NS is not set +# CONFIG_NCPFS_SMALLDOS is not set +# CONFIG_NCPFS_NLS is not set +# CONFIG_NCPFS_EXTRAS is not set +CONFIG_CODA_FS=m +CONFIG_AFS_FS=m +# CONFIG_AFS_DEBUG is not set +# CONFIG_AFS_FSCACHE is not set +CONFIG_9P_FS=m +CONFIG_9P_FSCACHE=y +CONFIG_9P_FS_POSIX_ACL=y + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +CONFIG_MAC_PARTITION=y +CONFIG_MSDOS_PARTITION=y +CONFIG_BSD_DISKLABEL=y +CONFIG_MINIX_SUBPARTITION=y +CONFIG_SOLARIS_X86_PARTITION=y +# CONFIG_UNIXWARE_DISKLABEL is not set +CONFIG_LDM_PARTITION=y +CONFIG_LDM_DEBUG=y +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +CONFIG_NLS_CODEPAGE_737=m +CONFIG_NLS_CODEPAGE_775=m +CONFIG_NLS_CODEPAGE_850=m +CONFIG_NLS_CODEPAGE_852=m +CONFIG_NLS_CODEPAGE_855=m +CONFIG_NLS_CODEPAGE_857=m +CONFIG_NLS_CODEPAGE_860=m +CONFIG_NLS_CODEPAGE_861=m +CONFIG_NLS_CODEPAGE_862=m +CONFIG_NLS_CODEPAGE_863=m +CONFIG_NLS_CODEPAGE_864=m +CONFIG_NLS_CODEPAGE_865=m +CONFIG_NLS_CODEPAGE_866=m +CONFIG_NLS_CODEPAGE_869=m +CONFIG_NLS_CODEPAGE_936=m +CONFIG_NLS_CODEPAGE_950=m +CONFIG_NLS_CODEPAGE_932=m +CONFIG_NLS_CODEPAGE_949=m +CONFIG_NLS_CODEPAGE_874=m +CONFIG_NLS_ISO8859_8=m +CONFIG_NLS_CODEPAGE_1250=m +CONFIG_NLS_CODEPAGE_1251=m +CONFIG_NLS_ASCII=m +CONFIG_NLS_ISO8859_1=y +CONFIG_NLS_ISO8859_2=m +CONFIG_NLS_ISO8859_3=m +CONFIG_NLS_ISO8859_4=m +CONFIG_NLS_ISO8859_5=m +CONFIG_NLS_ISO8859_6=m +CONFIG_NLS_ISO8859_7=m +CONFIG_NLS_ISO8859_9=m +CONFIG_NLS_ISO8859_13=m +CONFIG_NLS_ISO8859_14=m +CONFIG_NLS_ISO8859_15=m +CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m +CONFIG_NLS_UTF8=y +CONFIG_DLM=m +# CONFIG_DLM_DEBUG is not set + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +CONFIG_SCHED_DEBUG=y +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_LKDTM is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_RING_BUFFER=y +CONFIG_RING_BUFFER_ALLOW_SWAP=y +CONFIG_TRACING_SUPPORT=y +CONFIG_FTRACE=y +# CONFIG_FUNCTION_TRACER is not set +# CONFIG_IRQSOFF_TRACER is not set +# CONFIG_SCHED_TRACER is not set +# CONFIG_ENABLE_DEFAULT_TRACERS is not set +CONFIG_BRANCH_PROFILE_NONE=y +# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set +# CONFIG_PROFILE_ALL_BRANCHES is not set +# CONFIG_STACK_TRACER is not set +# CONFIG_BLK_DEV_IO_TRACE is not set +# CONFIG_RING_BUFFER_BENCHMARK is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_ASYNC_RAID6_TEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +CONFIG_ARM_UNWIND=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_OC_ETM is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_XOR_BLOCKS=m +CONFIG_ASYNC_CORE=m +CONFIG_ASYNC_MEMCPY=m +CONFIG_ASYNC_XOR=m +CONFIG_ASYNC_PQ=m +CONFIG_ASYNC_RAID6_RECOV=m +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=m +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=m +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +CONFIG_CRYPTO_GF128MUL=m +CONFIG_CRYPTO_NULL=m +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_CRYPTD=m +CONFIG_CRYPTO_AUTHENC=m +CONFIG_CRYPTO_TEST=m + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=m +CONFIG_CRYPTO_GCM=m +CONFIG_CRYPTO_SEQIV=m + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=m +CONFIG_CRYPTO_CTS=m +CONFIG_CRYPTO_ECB=y +CONFIG_CRYPTO_LRW=m +CONFIG_CRYPTO_PCBC=m +CONFIG_CRYPTO_XTS=m + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=m +CONFIG_CRYPTO_XCBC=m +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_GHASH=m +CONFIG_CRYPTO_MD4=m +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=y +CONFIG_CRYPTO_RMD128=m +CONFIG_CRYPTO_RMD160=m +CONFIG_CRYPTO_RMD256=m +CONFIG_CRYPTO_RMD320=m +CONFIG_CRYPTO_SHA1=m +CONFIG_CRYPTO_SHA256=m +CONFIG_CRYPTO_SHA512=m +CONFIG_CRYPTO_TGR192=m +CONFIG_CRYPTO_WP512=m + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +CONFIG_CRYPTO_ANUBIS=m +CONFIG_CRYPTO_ARC4=y +CONFIG_CRYPTO_BLOWFISH=m +CONFIG_CRYPTO_CAMELLIA=m +CONFIG_CRYPTO_CAST5=m +CONFIG_CRYPTO_CAST6=m +CONFIG_CRYPTO_DES=y +CONFIG_CRYPTO_FCRYPT=m +CONFIG_CRYPTO_KHAZAD=m +CONFIG_CRYPTO_SALSA20=m +CONFIG_CRYPTO_SEED=m +CONFIG_CRYPTO_SERPENT=m +CONFIG_CRYPTO_TEA=m +CONFIG_CRYPTO_TWOFISH=m +CONFIG_CRYPTO_TWOFISH_COMMON=m + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=y +# CONFIG_CRYPTO_ZLIB is not set +CONFIG_CRYPTO_LZO=y + +# +# Random Number Generation +# +CONFIG_CRYPTO_ANSI_CPRNG=m +CONFIG_CRYPTO_USER_API=m +CONFIG_CRYPTO_USER_API_HASH=m +CONFIG_CRYPTO_USER_API_SKCIPHER=m +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_DEV_OMAP_SHAM=m +CONFIG_CRYPTO_DEV_OMAP_AES=m +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_RAID6_PQ=m +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +CONFIG_CRC7=y +CONFIG_LIBCRC32C=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_BCJ=y +CONFIG_XZ_DEC_TEST=m +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_BTREE=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y +CONFIG_AVERAGE=y diff --git a/recipes/linux/linux-omap-2.6.39/camera/0001-Add-driver-for-Aptina-Micron-mt9p031-sensor.patch b/recipes/linux/linux-omap-2.6.39/camera/0001-Add-driver-for-Aptina-Micron-mt9p031-sensor.patch new file mode 100644 index 0000000000..b0d8736113 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/camera/0001-Add-driver-for-Aptina-Micron-mt9p031-sensor.patch @@ -0,0 +1,859 @@ +From bb84d2eef0f0487c4bcdf06e45dd64821de27b44 Mon Sep 17 00:00:00 2001 +From: Javier Martin +Date: Wed, 1 Jun 2011 17:36:48 +0200 +Subject: [PATCH 1/3] Add driver for Aptina (Micron) mt9p031 sensor. + +Clock frequency of 57MHz used in previous version was wrong since +when VDD_IO is 1.8V it can only support 48MHz. + +Two new platform flags have been added: + +- vdd_io: indicates whether the chip is powered with 1.8 or 2.8 VDD_IO. +So that it can use the maximum allowed frequency. +- version: monochrome and color versions of the chip have exactly +the same ID, so the only way to select one of them is through +platform data. + +Internal PLL is now used to generate PIXCLK depending on VDD_IO. + +Signed-off-by: Javier Martin +--- + drivers/media/video/Kconfig | 7 + + drivers/media/video/Makefile | 1 + + drivers/media/video/mt9p031.c | 763 +++++++++++++++++++++++++++++++++++++++++ + include/media/mt9p031.h | 23 ++ + 4 files changed, 794 insertions(+), 0 deletions(-) + create mode 100644 drivers/media/video/mt9p031.c + create mode 100644 include/media/mt9p031.h + +diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig +index 00f51dd..cb87e35 100644 +--- a/drivers/media/video/Kconfig ++++ b/drivers/media/video/Kconfig +@@ -329,6 +329,13 @@ config VIDEO_OV7670 + OV7670 VGA camera. It currently only works with the M88ALP01 + controller. + ++config VIDEO_MT9P031 ++ tristate "Aptina MT9P031 support" ++ depends on I2C && VIDEO_V4L2 ++ ---help--- ++ This is a Video4Linux2 sensor-level driver for the Aptina ++ (Micron) mt9p031 5 Mpixel camera. ++ + config VIDEO_MT9V011 + tristate "Micron mt9v011 sensor support" + depends on I2C && VIDEO_V4L2 +diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile +index ace5d8b..912b29b 100644 +--- a/drivers/media/video/Makefile ++++ b/drivers/media/video/Makefile +@@ -65,6 +65,7 @@ obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o + obj-$(CONFIG_VIDEO_OV7670) += ov7670.o + obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o + obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o ++obj-$(CONFIG_VIDEO_MT9P031) += mt9p031.o + obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o + obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o + obj-$(CONFIG_VIDEO_NOON010PC30) += noon010pc30.o +diff --git a/drivers/media/video/mt9p031.c b/drivers/media/video/mt9p031.c +new file mode 100644 +index 0000000..cd830b1 +--- /dev/null ++++ b/drivers/media/video/mt9p031.c +@@ -0,0 +1,763 @@ ++/* ++ * Driver for MT9P031 CMOS Image Sensor from Aptina ++ * ++ * Copyright (C) 2011, Javier Martin ++ * ++ * Copyright (C) 2011, Guennadi Liakhovetski ++ * ++ * Based on the MT9V032 driver and Bastian Hecht's code. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#define MT9P031_EXTCLK_FREQ 20000000 ++ ++#define MT9P031_CHIP_VERSION 0x00 ++#define MT9P031_CHIP_VERSION_VALUE 0x1801 ++#define MT9P031_ROW_START 0x01 ++#define MT9P031_ROW_START_MIN 1 ++#define MT9P031_ROW_START_MAX 2004 ++#define MT9P031_ROW_START_DEF 54 ++#define MT9P031_COLUMN_START 0x02 ++#define MT9P031_COLUMN_START_MIN 1 ++#define MT9P031_COLUMN_START_MAX 2750 ++#define MT9P031_COLUMN_START_DEF 16 ++#define MT9P031_WINDOW_HEIGHT 0x03 ++#define MT9P031_WINDOW_HEIGHT_MIN 2 ++#define MT9P031_WINDOW_HEIGHT_MAX 2003 ++#define MT9P031_WINDOW_HEIGHT_DEF 2003 ++#define MT9P031_WINDOW_WIDTH 0x04 ++#define MT9P031_WINDOW_WIDTH_MIN 18 ++#define MT9P031_WINDOW_WIDTH_MAX 2751 ++#define MT9P031_WINDOW_WIDTH_DEF 2751 ++#define MT9P031_H_BLANKING 0x05 ++#define MT9P031_H_BLANKING_VALUE 0 ++#define MT9P031_V_BLANKING 0x06 ++#define MT9P031_V_BLANKING_VALUE 25 ++#define MT9P031_OUTPUT_CONTROL 0x07 ++#define MT9P031_OUTPUT_CONTROL_CEN 2 ++#define MT9P031_OUTPUT_CONTROL_SYN 1 ++#define MT9P031_SHUTTER_WIDTH_UPPER 0x08 ++#define MT9P031_SHUTTER_WIDTH 0x09 ++#define MT9P031_PLL_CONTROL 0x10 ++#define MT9P031_PLL_CONTROL_PWROFF 0x0050 ++#define MT9P031_PLL_CONTROL_PWRON 0x0051 ++#define MT9P031_PLL_CONTROL_USEPLL 0x0052 ++#define MT9P031_PLL_CONFIG_1 0x11 ++#define MT9P031_PLL_CONFIG_1_M_48MHZ 0x5000 ++#define MT9P031_PLL_CONFIG_1_N_48MHZ 0x05 ++#define MT9P031_PLL_CONFIG_1_M_96MHZ 0x3600 ++#define MT9P031_PLL_CONFIG_1_N_96MHZ 0x05 ++#define MT9P031_PLL_CONFIG_2 0x12 ++#define MT9P031_PLL_CONFIG_2_P1_48MHZ 5 ++#define MT9P031_PLL_CONFIG_2_P1_96MHZ 2 ++#define MT9P031_PIXEL_CLOCK_CONTROL 0x0a ++#define MT9P031_FRAME_RESTART 0x0b ++#define MT9P031_SHUTTER_DELAY 0x0c ++#define MT9P031_RST 0x0d ++#define MT9P031_RST_ENABLE 1 ++#define MT9P031_RST_DISABLE 0 ++#define MT9P031_READ_MODE_1 0x1e ++#define MT9P031_READ_MODE_2 0x20 ++#define MT9P031_READ_MODE_2_ROW_MIR 0x8000 ++#define MT9P031_READ_MODE_2_COL_MIR 0x4000 ++#define MT9P031_ROW_ADDRESS_MODE 0x22 ++#define MT9P031_COLUMN_ADDRESS_MODE 0x23 ++#define MT9P031_GLOBAL_GAIN 0x35 ++ ++struct mt9p031 { ++ struct v4l2_subdev subdev; ++ struct media_pad pad; ++ struct v4l2_rect rect; /* Sensor window */ ++ struct v4l2_mbus_framefmt format; ++ struct mt9p031_platform_data *pdata; ++ struct mutex power_lock; /* lock to protect power_count */ ++ int power_count; ++ u16 xskip; ++ u16 yskip; ++ /* cache register values */ ++ u16 output_control; ++}; ++ ++static struct mt9p031 *to_mt9p031(const struct i2c_client *client) ++{ ++ return container_of(i2c_get_clientdata(client), struct mt9p031, subdev); ++} ++ ++static int reg_read(struct i2c_client *client, const u8 reg) ++{ ++ s32 data = i2c_smbus_read_word_data(client, reg); ++ return data < 0 ? data : swab16(data); ++} ++ ++static int reg_write(struct i2c_client *client, const u8 reg, ++ const u16 data) ++{ ++ return i2c_smbus_write_word_data(client, reg, swab16(data)); ++} ++ ++static int mt9p031_set_output_control(struct mt9p031 *mt9p031, u16 clear, ++ u16 set) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); ++ u16 value = (mt9p031->output_control & ~clear) | set; ++ int ret; ++ ++ ret = reg_write(client, MT9P031_OUTPUT_CONTROL, value); ++ if (ret < 0) ++ return ret; ++ mt9p031->output_control = value; ++ return 0; ++} ++ ++static int mt9p031_reset(struct i2c_client *client) ++{ ++ struct mt9p031 *mt9p031 = to_mt9p031(client); ++ int ret; ++ ++ /* Disable chip output, synchronous option update */ ++ ret = reg_write(client, MT9P031_RST, MT9P031_RST_ENABLE); ++ if (ret < 0) ++ return ret; ++ ret = reg_write(client, MT9P031_RST, MT9P031_RST_DISABLE); ++ if (ret < 0) ++ return ret; ++ return mt9p031_set_output_control(mt9p031, ++ MT9P031_OUTPUT_CONTROL_CEN, 0); ++} ++ ++static int mt9p031_power_on(struct mt9p031 *mt9p031) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); ++ int ret; ++ ++ /* Ensure RESET_BAR is low */ ++ if (mt9p031->pdata->reset) { ++ mt9p031->pdata->reset(&mt9p031->subdev, 1); ++ msleep(1); ++ } ++ /* Emable clock */ ++ if (mt9p031->pdata->set_xclk) ++ mt9p031->pdata->set_xclk(&mt9p031->subdev, MT9P031_EXTCLK_FREQ); ++ /* Now RESET_BAR must be high */ ++ if (mt9p031->pdata->reset) { ++ mt9p031->pdata->reset(&mt9p031->subdev, 0); ++ msleep(1); ++ } ++ /* soft reset */ ++ ret = mt9p031_reset(client); ++ if (ret < 0) { ++ dev_err(&client->dev, "Failed to reset the camera\n"); ++ return ret; ++ } ++ return 0; ++} ++ ++static void mt9p031_power_off(struct mt9p031 *mt9p031) ++{ ++ if (mt9p031->pdata->reset) { ++ mt9p031->pdata->reset(&mt9p031->subdev, 1); ++ msleep(1); ++ } ++ if (mt9p031->pdata->set_xclk) ++ mt9p031->pdata->set_xclk(&mt9p031->subdev, 0); ++} ++ ++static int mt9p031_enum_mbus_code(struct v4l2_subdev *sd, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev); ++ ++ if (code->pad || code->index) ++ return -EINVAL; ++ ++ code->code = mt9p031->format.code; ++ return 0; ++} ++ ++static struct v4l2_mbus_framefmt *mt9p031_get_pad_format( ++ struct mt9p031 *mt9p031, ++ struct v4l2_subdev_fh *fh, ++ unsigned int pad, u32 which) ++{ ++ switch (which) { ++ case V4L2_SUBDEV_FORMAT_TRY: ++ return v4l2_subdev_get_try_format(fh, pad); ++ case V4L2_SUBDEV_FORMAT_ACTIVE: ++ return &mt9p031->format; ++ default: ++ return NULL; ++ } ++} ++ ++static struct v4l2_rect *mt9p031_get_pad_crop(struct mt9p031 *mt9p031, ++ struct v4l2_subdev_fh *fh, unsigned int pad, u32 which) ++{ ++ switch (which) { ++ case V4L2_SUBDEV_FORMAT_TRY: ++ return v4l2_subdev_get_try_crop(fh, pad); ++ case V4L2_SUBDEV_FORMAT_ACTIVE: ++ return &mt9p031->rect; ++ default: ++ return NULL; ++ } ++} ++ ++static int mt9p031_get_crop(struct v4l2_subdev *sd, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_crop *crop) ++{ ++ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev); ++ struct v4l2_rect *rect = mt9p031_get_pad_crop(mt9p031, fh, crop->pad, ++ crop->which); ++ if (!rect) ++ return -EINVAL; ++ ++ crop->rect = *rect; ++ ++ return 0; ++} ++ ++static u16 mt9p031_skip_for_crop(s32 source, s32 *target, s32 max_skip) ++{ ++ unsigned int skip; ++ ++ if (source - source / 4 < *target) { ++ *target = source; ++ return 1; ++ } ++ ++ skip = DIV_ROUND_CLOSEST(source, *target); ++ if (skip > max_skip) ++ skip = max_skip; ++ *target = 2 * DIV_ROUND_UP(source, 2 * skip); ++ ++ return skip; ++} ++ ++static int mt9p031_set_params(struct i2c_client *client, ++ struct v4l2_rect *rect, u16 xskip, u16 yskip) ++{ ++ struct mt9p031 *mt9p031 = to_mt9p031(client); ++ int ret; ++ u16 xbin, ybin; ++ const u16 hblank = MT9P031_H_BLANKING_VALUE, ++ vblank = MT9P031_V_BLANKING_VALUE; ++ __s32 left; ++ ++ /* ++ * TODO: Attention! When implementing horizontal flipping, adjust ++ * alignment according to R2 "Column Start" description in the datasheet ++ */ ++ if (xskip & 1) { ++ xbin = 1; ++ left = rect->left & (~3); ++ } else if (xskip & 2) { ++ xbin = 2; ++ left = rect->left & (~7); ++ } else { ++ xbin = 4; ++ left = rect->left & (~15); ++ } ++ ybin = min(yskip, (u16)4); ++ ++ /* Disable register update, reconfigure atomically */ ++ ret = mt9p031_set_output_control(mt9p031, 0, ++ MT9P031_OUTPUT_CONTROL_SYN); ++ if (ret < 0) ++ return ret; ++ ++ dev_dbg(&client->dev, "skip %u:%u, rect %ux%u@%u:%u\n", ++ xskip, yskip, rect->width, rect->height, rect->left, rect->top); ++ ++ /* Blanking and start values - default... */ ++ ret = reg_write(client, MT9P031_H_BLANKING, hblank); ++ if (ret < 0) ++ return ret; ++ ret = reg_write(client, MT9P031_V_BLANKING, vblank); ++ if (ret < 0) ++ return ret; ++ ++ ret = reg_write(client, MT9P031_COLUMN_ADDRESS_MODE, ++ ((xbin - 1) << 4) | (xskip - 1)); ++ if (ret < 0) ++ return ret; ++ ret = reg_write(client, MT9P031_ROW_ADDRESS_MODE, ++ ((ybin - 1) << 4) | (yskip - 1)); ++ if (ret < 0) ++ return ret; ++ ++ dev_dbg(&client->dev, "new physical left %u, top %u\n", ++ rect->left, rect->top); ++ ++ ret = reg_write(client, MT9P031_COLUMN_START, ++ rect->left); ++ if (ret < 0) ++ return ret; ++ ret = reg_write(client, MT9P031_ROW_START, ++ rect->top); ++ if (ret < 0) ++ return ret; ++ ++ ret = reg_write(client, MT9P031_WINDOW_WIDTH, ++ rect->width - 1); ++ if (ret < 0) ++ return ret; ++ ret = reg_write(client, MT9P031_WINDOW_HEIGHT, ++ rect->height - 1); ++ if (ret < 0) ++ return ret; ++ ++ /* Re-enable register update, commit all changes */ ++ ret = mt9p031_set_output_control(mt9p031, ++ MT9P031_OUTPUT_CONTROL_SYN, 0); ++ if (ret < 0) ++ return ret; ++ ++ mt9p031->xskip = xskip; ++ mt9p031->yskip = yskip; ++ return ret; ++} ++ ++static int mt9p031_set_crop(struct v4l2_subdev *sd, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_crop *crop) ++{ ++ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev); ++ struct v4l2_mbus_framefmt *f; ++ struct v4l2_rect *c; ++ struct v4l2_rect rect; ++ u16 xskip, yskip; ++ s32 width, height; ++ ++ dev_dbg(mt9p031->subdev.v4l2_dev->dev, "%s(%ux%u@%u:%u : %u)\n", ++ __func__, crop->rect.width, crop->rect.height, ++ crop->rect.left, crop->rect.top, crop->which); ++ ++ /* ++ * Clamp the crop rectangle boundaries and align them to a multiple of 2 ++ * pixels. ++ */ ++ rect.width = ALIGN(clamp(crop->rect.width, ++ MT9P031_WINDOW_WIDTH_MIN, ++ MT9P031_WINDOW_WIDTH_MAX), 2); ++ rect.height = ALIGN(clamp(crop->rect.height, ++ MT9P031_WINDOW_HEIGHT_MIN, ++ MT9P031_WINDOW_HEIGHT_MAX), 2); ++ rect.left = ALIGN(clamp(crop->rect.left, ++ MT9P031_COLUMN_START_MIN, ++ MT9P031_COLUMN_START_MAX), 2); ++ rect.top = ALIGN(clamp(crop->rect.top, ++ MT9P031_ROW_START_MIN, ++ MT9P031_ROW_START_MAX), 2); ++ ++ c = mt9p031_get_pad_crop(mt9p031, fh, crop->pad, crop->which); ++ ++ if (rect.width != c->width || rect.height != c->height) { ++ /* ++ * Reset the output image size if the crop rectangle size has ++ * been modified. ++ */ ++ f = mt9p031_get_pad_format(mt9p031, fh, crop->pad, ++ crop->which); ++ width = f->width; ++ height = f->height; ++ ++ xskip = mt9p031_skip_for_crop(rect.width, &width, 7); ++ yskip = mt9p031_skip_for_crop(rect.height, &height, 8); ++ } else { ++ xskip = mt9p031->xskip; ++ yskip = mt9p031->yskip; ++ f = NULL; ++ } ++ if (f) { ++ f->width = width; ++ f->height = height; ++ } ++ ++ *c = rect; ++ crop->rect = rect; ++ ++ mt9p031->xskip = xskip; ++ mt9p031->yskip = yskip; ++ mt9p031->rect = *c; ++ return 0; ++} ++ ++static int mt9p031_get_format(struct v4l2_subdev *sd, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_format *fmt) ++{ ++ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev); ++ ++ fmt->format = ++ *mt9p031_get_pad_format(mt9p031, fh, fmt->pad, fmt->which); ++ return 0; ++} ++ ++static u16 mt9p031_skip_for_scale(s32 *source, s32 target, ++ s32 max_skip, s32 max) ++{ ++ unsigned int skip; ++ ++ if (*source - *source / 4 < target) { ++ *source = target; ++ return 1; ++ } ++ ++ skip = min(max, *source + target / 2) / target; ++ if (skip > max_skip) ++ skip = max_skip; ++ *source = target * skip; ++ ++ return skip; ++} ++ ++static int mt9p031_set_format(struct v4l2_subdev *sd, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_format *format) ++{ ++ struct v4l2_mbus_framefmt *__format; ++ struct v4l2_rect *__crop, rect; ++ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev); ++ unsigned int width; ++ unsigned int height; ++ u16 xskip, yskip; ++ ++ __crop = mt9p031_get_pad_crop(mt9p031, fh, format->pad, format->which); ++ ++ width = clamp_t(int, ALIGN(format->format.width, 2), 2, ++ MT9P031_WINDOW_WIDTH_MAX); ++ height = clamp_t(int, ALIGN(format->format.height, 2), 2, ++ MT9P031_WINDOW_HEIGHT_MAX); ++ ++ rect.width = __crop->width; ++ rect.height = __crop->height; ++ ++ xskip = mt9p031_skip_for_scale(&rect.width, width, 7, ++ MT9P031_WINDOW_WIDTH_MAX); ++ if (rect.width + __crop->left > MT9P031_WINDOW_WIDTH_MAX) ++ rect.left = (MT9P031_WINDOW_WIDTH_MAX - rect.width) / 2; ++ else ++ rect.left = __crop->left; ++ yskip = mt9p031_skip_for_scale(&rect.height, height, 8, ++ MT9P031_WINDOW_HEIGHT_MAX); ++ if (rect.height + __crop->top > MT9P031_WINDOW_HEIGHT_MAX) ++ rect.top = (MT9P031_WINDOW_HEIGHT_MAX - rect.height) / 2; ++ else ++ rect.top = __crop->top; ++ ++ dev_dbg(mt9p031->subdev.v4l2_dev->dev, "%s(%ux%u : %u)\n", __func__, ++ width, height, format->which); ++ if (__crop) ++ *__crop = rect; ++ ++ __format = mt9p031_get_pad_format(mt9p031, fh, format->pad, ++ format->which); ++ __format->width = width; ++ __format->height = height; ++ format->format = *__format; ++ ++ mt9p031->xskip = xskip; ++ mt9p031->yskip = yskip; ++ mt9p031->rect = *__crop; ++ return 0; ++} ++ ++static int mt9p031_pll_enable(struct i2c_client *client) ++{ ++ struct mt9p031 *mt9p031 = to_mt9p031(client); ++ int ret; ++ ++ ret = reg_write(client, MT9P031_PLL_CONTROL, MT9P031_PLL_CONTROL_PWRON); ++ if (ret < 0) ++ return ret; ++ ++ /* Always set the maximum frequency allowed by VDD_IO */ ++ if (mt9p031->pdata->vdd_io == MT9P031_VDD_IO_2V8) { ++ ret = reg_write(client, MT9P031_PLL_CONFIG_1, ++ MT9P031_PLL_CONFIG_1_M_96MHZ | ++ MT9P031_PLL_CONFIG_1_N_96MHZ); ++ if (ret < 0) ++ return ret; ++ ret = reg_write(client, MT9P031_PLL_CONFIG_2, ++ MT9P031_PLL_CONFIG_2_P1_96MHZ); ++ if (ret < 0) ++ return ret; ++ } else { ++ ret = reg_write(client, MT9P031_PLL_CONFIG_1, ++ MT9P031_PLL_CONFIG_1_M_48MHZ | ++ MT9P031_PLL_CONFIG_1_N_48MHZ); ++ if (ret < 0) ++ return ret; ++ ret = reg_write(client, MT9P031_PLL_CONFIG_2, ++ MT9P031_PLL_CONFIG_2_P1_48MHZ); ++ if (ret < 0) ++ return ret; ++ } ++ mdelay(1); ++ ret = reg_write(client, MT9P031_PLL_CONTROL, ++ MT9P031_PLL_CONTROL_PWRON | ++ MT9P031_PLL_CONTROL_USEPLL); ++ mdelay(1); ++ return ret; ++} ++ ++static inline int mt9p031_pll_disable(struct i2c_client *client) ++{ ++ return reg_write(client, MT9P031_PLL_CONTROL, ++ MT9P031_PLL_CONTROL_PWROFF); ++} ++ ++static int mt9p031_s_stream(struct v4l2_subdev *sd, int enable) ++{ ++ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev); ++ struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); ++ struct v4l2_rect rect = mt9p031->rect; ++ u16 xskip = mt9p031->xskip; ++ u16 yskip = mt9p031->yskip; ++ int ret; ++ ++ if (enable) { ++ ret = mt9p031_set_params(client, &rect, xskip, yskip); ++ if (ret < 0) ++ return ret; ++ /* Switch to master "normal" mode */ ++ ret = mt9p031_set_output_control(mt9p031, 0, ++ MT9P031_OUTPUT_CONTROL_CEN); ++ if (ret < 0) ++ return ret; ++ ret = mt9p031_pll_enable(client); ++ } else { ++ /* Stop sensor readout */ ++ ret = mt9p031_set_output_control(mt9p031, ++ MT9P031_OUTPUT_CONTROL_CEN, 0); ++ if (ret < 0) ++ return ret; ++ ret = mt9p031_pll_disable(client); ++ } ++ return ret; ++} ++ ++static int mt9p031_video_probe(struct i2c_client *client) ++{ ++ s32 data; ++ ++ /* Read out the chip version register */ ++ data = reg_read(client, MT9P031_CHIP_VERSION); ++ if (data != MT9P031_CHIP_VERSION_VALUE) { ++ dev_err(&client->dev, ++ "No MT9P031 chip detected, register read %x\n", data); ++ return -ENODEV; ++ } ++ ++ dev_info(&client->dev, "Detected a MT9P031 chip ID %x\n", data); ++ ++ return 0; ++} ++ ++static int mt9p031_set_power(struct v4l2_subdev *sd, int on) ++{ ++ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev); ++ int ret = 0; ++ ++ mutex_lock(&mt9p031->power_lock); ++ ++ /* ++ * If the power count is modified from 0 to != 0 or from != 0 to 0, ++ * update the power state. ++ */ ++ if (mt9p031->power_count == !on) { ++ if (on) { ++ ret = mt9p031_power_on(mt9p031); ++ if (ret) { ++ dev_err(mt9p031->subdev.v4l2_dev->dev, ++ "Failed to power on: %d\n", ret); ++ goto out; ++ } ++ } else { ++ mt9p031_power_off(mt9p031); ++ } ++ } ++ ++ /* Update the power count. */ ++ mt9p031->power_count += on ? 1 : -1; ++ WARN_ON(mt9p031->power_count < 0); ++ ++out: ++ mutex_unlock(&mt9p031->power_lock); ++ return ret; ++} ++ ++static int mt9p031_registered(struct v4l2_subdev *sd) ++{ ++ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev); ++ struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); ++ int ret; ++ ++ ret = mt9p031_set_power(&mt9p031->subdev, 1); ++ if (ret) { ++ dev_err(&client->dev, ++ "Failed to power on device: %d\n", ret); ++ return ret; ++ } ++ ++ ret = mt9p031_video_probe(client); ++ ++ mt9p031_set_power(&mt9p031->subdev, 0); ++ ++ return ret; ++} ++ ++static int mt9p031_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) ++{ ++ struct mt9p031 *mt9p031; ++ mt9p031 = container_of(sd, struct mt9p031, subdev); ++ ++ mt9p031->rect.width = MT9P031_WINDOW_WIDTH_DEF; ++ mt9p031->rect.height = MT9P031_WINDOW_HEIGHT_DEF; ++ mt9p031->rect.left = MT9P031_COLUMN_START_DEF; ++ mt9p031->rect.top = MT9P031_ROW_START_DEF; ++ ++ if (mt9p031->pdata->version == MT9P031_MONOCHROME_VERSION) ++ mt9p031->format.code = V4L2_MBUS_FMT_Y12_1X12; ++ else ++ mt9p031->format.code = V4L2_MBUS_FMT_SGRBG12_1X12; ++ ++ mt9p031->format.width = MT9P031_WINDOW_WIDTH_DEF; ++ mt9p031->format.height = MT9P031_WINDOW_HEIGHT_DEF; ++ mt9p031->format.field = V4L2_FIELD_NONE; ++ mt9p031->format.colorspace = V4L2_COLORSPACE_SRGB; ++ ++ mt9p031->xskip = 1; ++ mt9p031->yskip = 1; ++ return mt9p031_set_power(sd, 1); ++} ++ ++static int mt9p031_close(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) ++{ ++ return mt9p031_set_power(sd, 0); ++} ++ ++static struct v4l2_subdev_core_ops mt9p031_subdev_core_ops = { ++ .s_power = mt9p031_set_power, ++}; ++ ++static struct v4l2_subdev_video_ops mt9p031_subdev_video_ops = { ++ .s_stream = mt9p031_s_stream, ++}; ++ ++static struct v4l2_subdev_pad_ops mt9p031_subdev_pad_ops = { ++ .enum_mbus_code = mt9p031_enum_mbus_code, ++ .get_fmt = mt9p031_get_format, ++ .set_fmt = mt9p031_set_format, ++ .get_crop = mt9p031_get_crop, ++ .set_crop = mt9p031_set_crop, ++}; ++ ++static struct v4l2_subdev_ops mt9p031_subdev_ops = { ++ .core = &mt9p031_subdev_core_ops, ++ .video = &mt9p031_subdev_video_ops, ++ .pad = &mt9p031_subdev_pad_ops, ++}; ++ ++static const struct v4l2_subdev_internal_ops mt9p031_subdev_internal_ops = { ++ .registered = mt9p031_registered, ++ .open = mt9p031_open, ++ .close = mt9p031_close, ++}; ++ ++static int mt9p031_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ int ret; ++ struct mt9p031 *mt9p031; ++ struct mt9p031_platform_data *pdata = client->dev.platform_data; ++ struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); ++ ++ if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA)) { ++ dev_warn(&adapter->dev, ++ "I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n"); ++ return -EIO; ++ } ++ ++ mt9p031 = kzalloc(sizeof(struct mt9p031), GFP_KERNEL); ++ if (!mt9p031) ++ return -ENOMEM; ++ ++ mutex_init(&mt9p031->power_lock); ++ v4l2_i2c_subdev_init(&mt9p031->subdev, client, &mt9p031_subdev_ops); ++ mt9p031->subdev.internal_ops = &mt9p031_subdev_internal_ops; ++ ++ mt9p031->pdata = pdata; ++ ++ mt9p031->pad.flags = MEDIA_PAD_FL_SOURCE; ++ ret = media_entity_init(&mt9p031->subdev.entity, 1, &mt9p031->pad, 0); ++ if (ret) ++ return ret; ++ ++ mt9p031->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; ++ ++ return 0; ++} ++ ++static int mt9p031_remove(struct i2c_client *client) ++{ ++ struct v4l2_subdev *sd = i2c_get_clientdata(client); ++ struct mt9p031 *mt9p031 = container_of(sd, struct mt9p031, subdev); ++ ++ v4l2_device_unregister_subdev(sd); ++ media_entity_cleanup(&sd->entity); ++ kfree(mt9p031); ++ ++ return 0; ++} ++ ++static const struct i2c_device_id mt9p031_id[] = { ++ { "mt9p031", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, mt9p031_id); ++ ++static struct i2c_driver mt9p031_i2c_driver = { ++ .driver = { ++ .name = "mt9p031", ++ }, ++ .probe = mt9p031_probe, ++ .remove = mt9p031_remove, ++ .id_table = mt9p031_id, ++}; ++ ++static int __init mt9p031_mod_init(void) ++{ ++ return i2c_add_driver(&mt9p031_i2c_driver); ++} ++ ++static void __exit mt9p031_mod_exit(void) ++{ ++ i2c_del_driver(&mt9p031_i2c_driver); ++} ++ ++module_init(mt9p031_mod_init); ++module_exit(mt9p031_mod_exit); ++ ++MODULE_DESCRIPTION("Aptina MT9P031 Camera driver"); ++MODULE_AUTHOR("Bastian Hecht "); ++MODULE_LICENSE("GPL v2"); +diff --git a/include/media/mt9p031.h b/include/media/mt9p031.h +new file mode 100644 +index 0000000..27b4c75 +--- /dev/null ++++ b/include/media/mt9p031.h +@@ -0,0 +1,23 @@ ++#ifndef MT9P031_H ++#define MT9P031_H ++ ++struct v4l2_subdev; ++ ++enum { ++ MT9P031_COLOR_VERSION = 0, ++ MT9P031_MONOCHROME_VERSION = 1, ++}; ++ ++enum { ++ MT9P031_VDD_IO_1V8 = 0, ++ MT9P031_VDD_IO_2V8 = 1, ++}; ++ ++struct mt9p031_platform_data { ++ int (*set_xclk)(struct v4l2_subdev *subdev, int hz); ++ int (*reset)(struct v4l2_subdev *subdev, int active); ++ int vdd_io; /* MT9P031_VDD_IO_1V8 or MT9P031_VDD_IO_2V8 */ ++ int version; /* MT9P031_COLOR_VERSION or MT9P031_MONOCHROME_VERSION */ ++}; ++ ++#endif +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/camera/0002-v4l-Add-mt9v032-sensor-driver.patch b/recipes/linux/linux-omap-2.6.39/camera/0002-v4l-Add-mt9v032-sensor-driver.patch new file mode 100644 index 0000000000..66353eaabf --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/camera/0002-v4l-Add-mt9v032-sensor-driver.patch @@ -0,0 +1,853 @@ +From 55d8ca4b03eb04432adefa6fbf6e5f0197c7fb32 Mon Sep 17 00:00:00 2001 +From: Detlev Casanova +Date: Sun, 28 Nov 2010 19:07:20 +0100 +Subject: [PATCH 2/3] v4l: Add mt9v032 sensor driver + +The MT9V032 is a parallel wide VGA sensor from Aptina (formerly Micron) +controlled through I2C. + +The driver creates a V4L2 subdevice. It currently supports binning and +cropping, and the gain, auto gain, exposure, auto exposure and test +pattern controls. + +Signed-off-by: Detlev Casanova +Signed-off-by: Laurent Pinchart +--- + drivers/media/video/Kconfig | 7 + + drivers/media/video/Makefile | 1 + + drivers/media/video/mt9v032.c | 773 +++++++++++++++++++++++++++++++++++++++++ + include/media/mt9v032.h | 12 + + 4 files changed, 793 insertions(+), 0 deletions(-) + create mode 100644 drivers/media/video/mt9v032.c + create mode 100644 include/media/mt9v032.h + +diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig +index cb87e35..3a5bc57 100644 +--- a/drivers/media/video/Kconfig ++++ b/drivers/media/video/Kconfig +@@ -344,6 +344,13 @@ config VIDEO_MT9V011 + mt0v011 1.3 Mpixel camera. It currently only works with the + em28xx driver. + ++config VIDEO_MT9V032 ++ tristate "Micron MT9V032 sensor support" ++ depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API ++ ---help--- ++ This is a Video4Linux2 sensor-level driver for the Micron ++ MT9V032 752x480 CMOS sensor. ++ + config VIDEO_TCM825X + tristate "TCM825x camera sensor support" + depends on I2C && VIDEO_V4L2 +diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile +index 912b29b..6679c6a 100644 +--- a/drivers/media/video/Makefile ++++ b/drivers/media/video/Makefile +@@ -67,6 +67,7 @@ obj-$(CONFIG_VIDEO_TCM825X) += tcm825x.o + obj-$(CONFIG_VIDEO_TVEEPROM) += tveeprom.o + obj-$(CONFIG_VIDEO_MT9P031) += mt9p031.o + obj-$(CONFIG_VIDEO_MT9V011) += mt9v011.o ++obj-$(CONFIG_VIDEO_MT9V032) += mt9v032.o + obj-$(CONFIG_VIDEO_SR030PC30) += sr030pc30.o + obj-$(CONFIG_VIDEO_NOON010PC30) += noon010pc30.o + +diff --git a/drivers/media/video/mt9v032.c b/drivers/media/video/mt9v032.c +new file mode 100644 +index 0000000..c64e1dc +--- /dev/null ++++ b/drivers/media/video/mt9v032.c +@@ -0,0 +1,773 @@ ++/* ++ * Driver for MT9V032 CMOS Image Sensor from Micron ++ * ++ * Copyright (C) 2010, Laurent Pinchart ++ * ++ * Based on the MT9M001 driver, ++ * ++ * Copyright (C) 2008, Guennadi Liakhovetski ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++#include ++ ++#define MT9V032_PIXEL_ARRAY_HEIGHT 492 ++#define MT9V032_PIXEL_ARRAY_WIDTH 782 ++ ++#define MT9V032_CHIP_VERSION 0x00 ++#define MT9V032_CHIP_ID_REV1 0x1311 ++#define MT9V032_CHIP_ID_REV3 0x1313 ++#define MT9V032_COLUMN_START 0x01 ++#define MT9V032_COLUMN_START_MIN 1 ++#define MT9V032_COLUMN_START_DEF 1 ++#define MT9V032_COLUMN_START_MAX 752 ++#define MT9V032_ROW_START 0x02 ++#define MT9V032_ROW_START_MIN 4 ++#define MT9V032_ROW_START_DEF 5 ++#define MT9V032_ROW_START_MAX 482 ++#define MT9V032_WINDOW_HEIGHT 0x03 ++#define MT9V032_WINDOW_HEIGHT_MIN 1 ++#define MT9V032_WINDOW_HEIGHT_DEF 480 ++#define MT9V032_WINDOW_HEIGHT_MAX 480 ++#define MT9V032_WINDOW_WIDTH 0x04 ++#define MT9V032_WINDOW_WIDTH_MIN 1 ++#define MT9V032_WINDOW_WIDTH_DEF 752 ++#define MT9V032_WINDOW_WIDTH_MAX 752 ++#define MT9V032_HORIZONTAL_BLANKING 0x05 ++#define MT9V032_HORIZONTAL_BLANKING_MIN 43 ++#define MT9V032_HORIZONTAL_BLANKING_MAX 1023 ++#define MT9V032_VERTICAL_BLANKING 0x06 ++#define MT9V032_VERTICAL_BLANKING_MIN 4 ++#define MT9V032_VERTICAL_BLANKING_MAX 3000 ++#define MT9V032_CHIP_CONTROL 0x07 ++#define MT9V032_CHIP_CONTROL_MASTER_MODE (1 << 3) ++#define MT9V032_CHIP_CONTROL_DOUT_ENABLE (1 << 7) ++#define MT9V032_CHIP_CONTROL_SEQUENTIAL (1 << 8) ++#define MT9V032_SHUTTER_WIDTH1 0x08 ++#define MT9V032_SHUTTER_WIDTH2 0x09 ++#define MT9V032_SHUTTER_WIDTH_CONTROL 0x0a ++#define MT9V032_TOTAL_SHUTTER_WIDTH 0x0b ++#define MT9V032_TOTAL_SHUTTER_WIDTH_MIN 1 ++#define MT9V032_TOTAL_SHUTTER_WIDTH_DEF 480 ++#define MT9V032_TOTAL_SHUTTER_WIDTH_MAX 32767 ++#define MT9V032_RESET 0x0c ++#define MT9V032_READ_MODE 0x0d ++#define MT9V032_READ_MODE_ROW_BIN_MASK (3 << 0) ++#define MT9V032_READ_MODE_ROW_BIN_SHIFT 0 ++#define MT9V032_READ_MODE_COLUMN_BIN_MASK (3 << 2) ++#define MT9V032_READ_MODE_COLUMN_BIN_SHIFT 2 ++#define MT9V032_READ_MODE_ROW_FLIP (1 << 4) ++#define MT9V032_READ_MODE_COLUMN_FLIP (1 << 5) ++#define MT9V032_READ_MODE_DARK_COLUMNS (1 << 6) ++#define MT9V032_READ_MODE_DARK_ROWS (1 << 7) ++#define MT9V032_PIXEL_OPERATION_MODE 0x0f ++#define MT9V032_PIXEL_OPERATION_MODE_COLOR (1 << 2) ++#define MT9V032_PIXEL_OPERATION_MODE_HDR (1 << 6) ++#define MT9V032_ANALOG_GAIN 0x35 ++#define MT9V032_ANALOG_GAIN_MIN 16 ++#define MT9V032_ANALOG_GAIN_DEF 16 ++#define MT9V032_ANALOG_GAIN_MAX 64 ++#define MT9V032_MAX_ANALOG_GAIN 0x36 ++#define MT9V032_MAX_ANALOG_GAIN_MAX 127 ++#define MT9V032_FRAME_DARK_AVERAGE 0x42 ++#define MT9V032_DARK_AVG_THRESH 0x46 ++#define MT9V032_DARK_AVG_LOW_THRESH_MASK (255 << 0) ++#define MT9V032_DARK_AVG_LOW_THRESH_SHIFT 0 ++#define MT9V032_DARK_AVG_HIGH_THRESH_MASK (255 << 8) ++#define MT9V032_DARK_AVG_HIGH_THRESH_SHIFT 8 ++#define MT9V032_ROW_NOISE_CORR_CONTROL 0x70 ++#define MT9V032_ROW_NOISE_CORR_ENABLE (1 << 5) ++#define MT9V032_ROW_NOISE_CORR_USE_BLK_AVG (1 << 7) ++#define MT9V032_PIXEL_CLOCK 0x74 ++#define MT9V032_PIXEL_CLOCK_INV_LINE (1 << 0) ++#define MT9V032_PIXEL_CLOCK_INV_FRAME (1 << 1) ++#define MT9V032_PIXEL_CLOCK_XOR_LINE (1 << 2) ++#define MT9V032_PIXEL_CLOCK_CONT_LINE (1 << 3) ++#define MT9V032_PIXEL_CLOCK_INV_PXL_CLK (1 << 4) ++#define MT9V032_TEST_PATTERN 0x7f ++#define MT9V032_TEST_PATTERN_DATA_MASK (1023 << 0) ++#define MT9V032_TEST_PATTERN_DATA_SHIFT 0 ++#define MT9V032_TEST_PATTERN_USE_DATA (1 << 10) ++#define MT9V032_TEST_PATTERN_GRAY_MASK (3 << 11) ++#define MT9V032_TEST_PATTERN_GRAY_NONE (0 << 11) ++#define MT9V032_TEST_PATTERN_GRAY_VERTICAL (1 << 11) ++#define MT9V032_TEST_PATTERN_GRAY_HORIZONTAL (2 << 11) ++#define MT9V032_TEST_PATTERN_GRAY_DIAGONAL (3 << 11) ++#define MT9V032_TEST_PATTERN_ENABLE (1 << 13) ++#define MT9V032_TEST_PATTERN_FLIP (1 << 14) ++#define MT9V032_AEC_AGC_ENABLE 0xaf ++#define MT9V032_AEC_ENABLE (1 << 0) ++#define MT9V032_AGC_ENABLE (1 << 1) ++#define MT9V032_THERMAL_INFO 0xc1 ++ ++struct mt9v032 { ++ struct v4l2_subdev subdev; ++ struct media_pad pad; ++ ++ struct v4l2_mbus_framefmt format; ++ struct v4l2_rect crop; ++ ++ struct v4l2_ctrl_handler ctrls; ++ ++ struct mutex power_lock; ++ int power_count; ++ ++ struct mt9v032_platform_data *pdata; ++ u16 chip_control; ++ u16 aec_agc; ++}; ++ ++static struct mt9v032 *to_mt9v032(struct v4l2_subdev *sd) ++{ ++ return container_of(sd, struct mt9v032, subdev); ++} ++ ++static int mt9v032_read(struct i2c_client *client, const u8 reg) ++{ ++ s32 data = i2c_smbus_read_word_data(client, reg); ++ dev_dbg(&client->dev, "%s: read 0x%04x from 0x%02x\n", __func__, ++ swab16(data), reg); ++ return data < 0 ? data : swab16(data); ++} ++ ++static int mt9v032_write(struct i2c_client *client, const u8 reg, ++ const u16 data) ++{ ++ dev_dbg(&client->dev, "%s: writing 0x%04x to 0x%02x\n", __func__, ++ data, reg); ++ return i2c_smbus_write_word_data(client, reg, swab16(data)); ++} ++ ++static int mt9v032_set_chip_control(struct mt9v032 *mt9v032, u16 clear, u16 set) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev); ++ u16 value = (mt9v032->chip_control & ~clear) | set; ++ int ret; ++ ++ ret = mt9v032_write(client, MT9V032_CHIP_CONTROL, value); ++ if (ret < 0) ++ return ret; ++ ++ mt9v032->chip_control = value; ++ return 0; ++} ++ ++static int ++mt9v032_update_aec_agc(struct mt9v032 *mt9v032, u16 which, int enable) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev); ++ u16 value = mt9v032->aec_agc; ++ int ret; ++ ++ if (enable) ++ value |= which; ++ else ++ value &= ~which; ++ ++ ret = mt9v032_write(client, MT9V032_AEC_AGC_ENABLE, value); ++ if (ret < 0) ++ return ret; ++ ++ mt9v032->aec_agc = value; ++ return 0; ++} ++ ++static int mt9v032_power_on(struct mt9v032 *mt9v032) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev); ++ int ret; ++ ++ if (mt9v032->pdata->set_clock) { ++ mt9v032->pdata->set_clock(&mt9v032->subdev, 25000000); ++ udelay(1); ++ } ++ ++ /* Reset the chip and stop data read out */ ++ ret = mt9v032_write(client, MT9V032_RESET, 1); ++ if (ret < 0) ++ return ret; ++ ++ ret = mt9v032_write(client, MT9V032_RESET, 0); ++ if (ret < 0) ++ return ret; ++ ++ return mt9v032_write(client, MT9V032_CHIP_CONTROL, 0); ++} ++ ++static void mt9v032_power_off(struct mt9v032 *mt9v032) ++{ ++ if (mt9v032->pdata->set_clock) ++ mt9v032->pdata->set_clock(&mt9v032->subdev, 0); ++} ++ ++static int __mt9v032_set_power(struct mt9v032 *mt9v032, bool on) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev); ++ int ret; ++ ++ if (!on) { ++ mt9v032_power_off(mt9v032); ++ return 0; ++ } ++ ++ ret = mt9v032_power_on(mt9v032); ++ if (ret < 0) ++ return ret; ++ ++ /* Configure the pixel clock polarity */ ++ if (mt9v032->pdata && mt9v032->pdata->clk_pol) { ++ ret = mt9v032_write(client, MT9V032_PIXEL_CLOCK, ++ MT9V032_PIXEL_CLOCK_INV_PXL_CLK); ++ if (ret < 0) ++ return ret; ++ } ++ ++ /* Disable the noise correction algorithm and restore the controls. */ ++ ret = mt9v032_write(client, MT9V032_ROW_NOISE_CORR_CONTROL, 0); ++ if (ret < 0) ++ return ret; ++ ++ return v4l2_ctrl_handler_setup(&mt9v032->ctrls); ++} ++ ++/* ----------------------------------------------------------------------------- ++ * V4L2 subdev video operations ++ */ ++ ++static struct v4l2_mbus_framefmt * ++__mt9v032_get_pad_format(struct mt9v032 *mt9v032, struct v4l2_subdev_fh *fh, ++ unsigned int pad, enum v4l2_subdev_format_whence which) ++{ ++ switch (which) { ++ case V4L2_SUBDEV_FORMAT_TRY: ++ return v4l2_subdev_get_try_format(fh, pad); ++ case V4L2_SUBDEV_FORMAT_ACTIVE: ++ return &mt9v032->format; ++ default: ++ return NULL; ++ } ++} ++ ++static struct v4l2_rect * ++__mt9v032_get_pad_crop(struct mt9v032 *mt9v032, struct v4l2_subdev_fh *fh, ++ unsigned int pad, enum v4l2_subdev_format_whence which) ++{ ++ switch (which) { ++ case V4L2_SUBDEV_FORMAT_TRY: ++ return v4l2_subdev_get_try_crop(fh, pad); ++ case V4L2_SUBDEV_FORMAT_ACTIVE: ++ return &mt9v032->crop; ++ default: ++ return NULL; ++ } ++} ++ ++static int mt9v032_s_stream(struct v4l2_subdev *subdev, int enable) ++{ ++ const u16 mode = MT9V032_CHIP_CONTROL_MASTER_MODE ++ | MT9V032_CHIP_CONTROL_DOUT_ENABLE ++ | MT9V032_CHIP_CONTROL_SEQUENTIAL; ++ struct i2c_client *client = v4l2_get_subdevdata(subdev); ++ struct mt9v032 *mt9v032 = to_mt9v032(subdev); ++ struct v4l2_mbus_framefmt *format = &mt9v032->format; ++ struct v4l2_rect *crop = &mt9v032->crop; ++ unsigned int hratio; ++ unsigned int vratio; ++ int ret; ++ ++ if (!enable) ++ return mt9v032_set_chip_control(mt9v032, mode, 0); ++ ++ /* Configure the window size and row/column bin */ ++ hratio = DIV_ROUND_CLOSEST(crop->width, format->width); ++ vratio = DIV_ROUND_CLOSEST(crop->height, format->height); ++ ++ ret = mt9v032_write(client, MT9V032_READ_MODE, ++ (hratio - 1) << MT9V032_READ_MODE_ROW_BIN_SHIFT | ++ (vratio - 1) << MT9V032_READ_MODE_COLUMN_BIN_SHIFT); ++ if (ret < 0) ++ return ret; ++ ++ ret = mt9v032_write(client, MT9V032_COLUMN_START, crop->left); ++ if (ret < 0) ++ return ret; ++ ++ ret = mt9v032_write(client, MT9V032_ROW_START, crop->top); ++ if (ret < 0) ++ return ret; ++ ++ ret = mt9v032_write(client, MT9V032_WINDOW_WIDTH, crop->width); ++ if (ret < 0) ++ return ret; ++ ++ ret = mt9v032_write(client, MT9V032_WINDOW_HEIGHT, crop->height); ++ if (ret < 0) ++ return ret; ++ ++ ret = mt9v032_write(client, MT9V032_HORIZONTAL_BLANKING, ++ max(43, 660 - crop->width)); ++ if (ret < 0) ++ return ret; ++ ++ /* Switch to master "normal" mode */ ++ return mt9v032_set_chip_control(mt9v032, 0, mode); ++} ++ ++static int mt9v032_enum_mbus_code(struct v4l2_subdev *subdev, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_mbus_code_enum *code) ++{ ++ if (code->index > 0) ++ return -EINVAL; ++ ++ code->code = V4L2_MBUS_FMT_SGRBG10_1X10; ++ return 0; ++} ++ ++static int mt9v032_enum_frame_size(struct v4l2_subdev *subdev, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_frame_size_enum *fse) ++{ ++ if (fse->index >= 8 || fse->code != V4L2_MBUS_FMT_SGRBG10_1X10) ++ return -EINVAL; ++ ++ fse->min_width = MT9V032_WINDOW_WIDTH_DEF / fse->index; ++ fse->max_width = fse->min_width; ++ fse->min_height = MT9V032_WINDOW_HEIGHT_DEF / fse->index; ++ fse->max_height = fse->min_height; ++ ++ return 0; ++} ++ ++static int mt9v032_get_format(struct v4l2_subdev *subdev, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_format *format) ++{ ++ struct mt9v032 *mt9v032 = to_mt9v032(subdev); ++ ++ format->format = *__mt9v032_get_pad_format(mt9v032, fh, format->pad, ++ format->which); ++ return 0; ++} ++ ++static int mt9v032_set_format(struct v4l2_subdev *subdev, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_format *format) ++{ ++ struct mt9v032 *mt9v032 = to_mt9v032(subdev); ++ struct v4l2_mbus_framefmt *__format; ++ struct v4l2_rect *__crop; ++ unsigned int width; ++ unsigned int height; ++ unsigned int hratio; ++ unsigned int vratio; ++ ++ __crop = __mt9v032_get_pad_crop(mt9v032, fh, format->pad, ++ format->which); ++ ++ /* Clamp the width and height to avoid dividing by zero. */ ++ width = clamp_t(unsigned int, ALIGN(format->format.width, 2), ++ max(__crop->width / 8, MT9V032_WINDOW_WIDTH_MIN), ++ __crop->width); ++ height = clamp_t(unsigned int, ALIGN(format->format.height, 2), ++ max(__crop->height / 8, MT9V032_WINDOW_HEIGHT_MIN), ++ __crop->height); ++ ++ hratio = DIV_ROUND_CLOSEST(__crop->width, width); ++ vratio = DIV_ROUND_CLOSEST(__crop->height, height); ++ ++ __format = __mt9v032_get_pad_format(mt9v032, fh, format->pad, ++ format->which); ++ __format->width = __crop->width / hratio; ++ __format->height = __crop->height / vratio; ++ ++ format->format = *__format; ++ ++ return 0; ++} ++ ++static int mt9v032_get_crop(struct v4l2_subdev *subdev, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_crop *crop) ++{ ++ struct mt9v032 *mt9v032 = to_mt9v032(subdev); ++ ++ crop->rect = *__mt9v032_get_pad_crop(mt9v032, fh, crop->pad, ++ crop->which); ++ return 0; ++} ++ ++static int mt9v032_set_crop(struct v4l2_subdev *subdev, ++ struct v4l2_subdev_fh *fh, ++ struct v4l2_subdev_crop *crop) ++{ ++ struct mt9v032 *mt9v032 = to_mt9v032(subdev); ++ struct v4l2_mbus_framefmt *__format; ++ struct v4l2_rect *__crop; ++ struct v4l2_rect rect; ++ ++ /* Clamp the crop rectangle boundaries and align them to a non multiple ++ * of 2 pixels to ensure a GRBG Bayer pattern. ++ */ ++ rect.left = clamp(ALIGN(crop->rect.left + 1, 2) - 1, ++ MT9V032_COLUMN_START_MIN, ++ MT9V032_COLUMN_START_MAX); ++ rect.top = clamp(ALIGN(crop->rect.top + 1, 2) - 1, ++ MT9V032_ROW_START_MIN, ++ MT9V032_ROW_START_MAX); ++ rect.width = clamp(ALIGN(crop->rect.width, 2), ++ MT9V032_WINDOW_WIDTH_MIN, ++ MT9V032_WINDOW_WIDTH_MAX); ++ rect.height = clamp(ALIGN(crop->rect.height, 2), ++ MT9V032_WINDOW_HEIGHT_MIN, ++ MT9V032_WINDOW_HEIGHT_MAX); ++ ++ rect.width = min(rect.width, MT9V032_PIXEL_ARRAY_WIDTH - rect.left); ++ rect.height = min(rect.height, MT9V032_PIXEL_ARRAY_HEIGHT - rect.top); ++ ++ __crop = __mt9v032_get_pad_crop(mt9v032, fh, crop->pad, crop->which); ++ ++ if (rect.width != __crop->width || rect.height != __crop->height) { ++ /* Reset the output image size if the crop rectangle size has ++ * been modified. ++ */ ++ __format = __mt9v032_get_pad_format(mt9v032, fh, crop->pad, ++ crop->which); ++ __format->width = rect.width; ++ __format->height = rect.height; ++ } ++ ++ *__crop = rect; ++ crop->rect = rect; ++ ++ return 0; ++} ++ ++/* ----------------------------------------------------------------------------- ++ * V4L2 subdev control operations ++ */ ++ ++#define V4L2_CID_TEST_PATTERN (V4L2_CID_USER_BASE | 0x1001) ++ ++static int mt9v032_s_ctrl(struct v4l2_ctrl *ctrl) ++{ ++ struct mt9v032 *mt9v032 = ++ container_of(ctrl->handler, struct mt9v032, ctrls); ++ struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev); ++ u16 data; ++ ++ switch (ctrl->id) { ++ case V4L2_CID_AUTOGAIN: ++ return mt9v032_update_aec_agc(mt9v032, MT9V032_AGC_ENABLE, ++ ctrl->val); ++ ++ case V4L2_CID_GAIN: ++ return mt9v032_write(client, MT9V032_ANALOG_GAIN, ctrl->val); ++ ++ case V4L2_CID_EXPOSURE_AUTO: ++ return mt9v032_update_aec_agc(mt9v032, MT9V032_AEC_ENABLE, ++ ctrl->val); ++ ++ case V4L2_CID_EXPOSURE: ++ return mt9v032_write(client, MT9V032_TOTAL_SHUTTER_WIDTH, ++ ctrl->val); ++ ++ case V4L2_CID_TEST_PATTERN: ++ switch (ctrl->val) { ++ case 0: ++ data = 0; ++ break; ++ case 1: ++ data = MT9V032_TEST_PATTERN_GRAY_VERTICAL ++ | MT9V032_TEST_PATTERN_ENABLE; ++ break; ++ case 2: ++ data = MT9V032_TEST_PATTERN_GRAY_HORIZONTAL ++ | MT9V032_TEST_PATTERN_ENABLE; ++ break; ++ case 3: ++ data = MT9V032_TEST_PATTERN_GRAY_DIAGONAL ++ | MT9V032_TEST_PATTERN_ENABLE; ++ break; ++ default: ++ data = (ctrl->val << MT9V032_TEST_PATTERN_DATA_SHIFT) ++ | MT9V032_TEST_PATTERN_USE_DATA ++ | MT9V032_TEST_PATTERN_ENABLE ++ | MT9V032_TEST_PATTERN_FLIP; ++ break; ++ } ++ ++ return mt9v032_write(client, MT9V032_TEST_PATTERN, data); ++ } ++ ++ return 0; ++} ++ ++static struct v4l2_ctrl_ops mt9v032_ctrl_ops = { ++ .s_ctrl = mt9v032_s_ctrl, ++}; ++ ++static const struct v4l2_ctrl_config mt9v032_ctrls[] = { ++ { ++ .ops = &mt9v032_ctrl_ops, ++ .id = V4L2_CID_TEST_PATTERN, ++ .type = V4L2_CTRL_TYPE_INTEGER, ++ .name = "Test pattern", ++ .min = 0, ++ .max = 1023, ++ .step = 1, ++ .def = 0, ++ .flags = 0, ++ } ++}; ++ ++/* ----------------------------------------------------------------------------- ++ * V4L2 subdev core operations ++ */ ++ ++static int mt9v032_set_power(struct v4l2_subdev *subdev, int on) ++{ ++ struct mt9v032 *mt9v032 = to_mt9v032(subdev); ++ int ret = 0; ++ ++ mutex_lock(&mt9v032->power_lock); ++ ++ /* If the power count is modified from 0 to != 0 or from != 0 to 0, ++ * update the power state. ++ */ ++ if (mt9v032->power_count == !on) { ++ ret = __mt9v032_set_power(mt9v032, !!on); ++ if (ret < 0) ++ goto done; ++ } ++ ++ /* Update the power count. */ ++ mt9v032->power_count += on ? 1 : -1; ++ WARN_ON(mt9v032->power_count < 0); ++ ++done: ++ mutex_unlock(&mt9v032->power_lock); ++ return ret; ++} ++ ++/* ----------------------------------------------------------------------------- ++ * V4L2 subdev internal operations ++ */ ++ ++static int mt9v032_registered(struct v4l2_subdev *subdev) ++{ ++ struct i2c_client *client = v4l2_get_subdevdata(subdev); ++ struct mt9v032 *mt9v032 = to_mt9v032(subdev); ++ s32 data; ++ int ret; ++ ++ dev_info(&client->dev, "Probing MT9V032 at address 0x%02x\n", ++ client->addr); ++ ++ ret = mt9v032_power_on(mt9v032); ++ if (ret < 0) { ++ dev_err(&client->dev, "MT9V032 power up failed\n"); ++ return ret; ++ } ++ ++ /* Read and check the sensor version */ ++ data = mt9v032_read(client, MT9V032_CHIP_VERSION); ++ if (data != MT9V032_CHIP_ID_REV1 && data != MT9V032_CHIP_ID_REV3) { ++ dev_err(&client->dev, "MT9V032 not detected, wrong version " ++ "0x%04x\n", data); ++ return -ENODEV; ++ } ++ ++ mt9v032_power_off(mt9v032); ++ ++ dev_info(&client->dev, "MT9V032 detected at address 0x%02x\n", ++ client->addr); ++ ++ return ret; ++} ++ ++static int mt9v032_open(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) ++{ ++ struct v4l2_mbus_framefmt *format; ++ struct v4l2_rect *crop; ++ ++ crop = v4l2_subdev_get_try_crop(fh, 0); ++ crop->left = MT9V032_COLUMN_START_DEF; ++ crop->top = MT9V032_ROW_START_DEF; ++ crop->width = MT9V032_WINDOW_WIDTH_DEF; ++ crop->height = MT9V032_WINDOW_HEIGHT_DEF; ++ ++ format = v4l2_subdev_get_try_format(fh, 0); ++ format->code = V4L2_MBUS_FMT_SGRBG10_1X10; ++ format->width = MT9V032_WINDOW_WIDTH_DEF; ++ format->height = MT9V032_WINDOW_HEIGHT_DEF; ++ format->field = V4L2_FIELD_NONE; ++ format->colorspace = V4L2_COLORSPACE_SRGB; ++ ++ return mt9v032_set_power(subdev, 1); ++} ++ ++static int mt9v032_close(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) ++{ ++ return mt9v032_set_power(subdev, 0); ++} ++ ++static struct v4l2_subdev_core_ops mt9v032_subdev_core_ops = { ++ .s_power = mt9v032_set_power, ++}; ++ ++static struct v4l2_subdev_video_ops mt9v032_subdev_video_ops = { ++ .s_stream = mt9v032_s_stream, ++}; ++ ++static struct v4l2_subdev_pad_ops mt9v032_subdev_pad_ops = { ++ .enum_mbus_code = mt9v032_enum_mbus_code, ++ .enum_frame_size = mt9v032_enum_frame_size, ++ .get_fmt = mt9v032_get_format, ++ .set_fmt = mt9v032_set_format, ++ .get_crop = mt9v032_get_crop, ++ .set_crop = mt9v032_set_crop, ++}; ++ ++static struct v4l2_subdev_ops mt9v032_subdev_ops = { ++ .core = &mt9v032_subdev_core_ops, ++ .video = &mt9v032_subdev_video_ops, ++ .pad = &mt9v032_subdev_pad_ops, ++}; ++ ++static const struct v4l2_subdev_internal_ops mt9v032_subdev_internal_ops = { ++ .registered = mt9v032_registered, ++ .open = mt9v032_open, ++ .close = mt9v032_close, ++}; ++ ++/* ----------------------------------------------------------------------------- ++ * Driver initialization and probing ++ */ ++ ++static int mt9v032_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct mt9v032 *mt9v032; ++ unsigned int i; ++ int ret; ++ ++ if (!i2c_check_functionality(client->adapter, ++ I2C_FUNC_SMBUS_WORD_DATA)) { ++ dev_warn(&client->adapter->dev, ++ "I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n"); ++ return -EIO; ++ } ++ ++ mt9v032 = kzalloc(sizeof(*mt9v032), GFP_KERNEL); ++ if (!mt9v032) ++ return -ENOMEM; ++ ++ mutex_init(&mt9v032->power_lock); ++ mt9v032->pdata = client->dev.platform_data; ++ ++ v4l2_ctrl_handler_init(&mt9v032->ctrls, ARRAY_SIZE(mt9v032_ctrls) + 4); ++ ++ v4l2_ctrl_new_std(&mt9v032->ctrls, &mt9v032_ctrl_ops, ++ V4L2_CID_AUTOGAIN, 0, 1, 1, 1); ++ v4l2_ctrl_new_std(&mt9v032->ctrls, &mt9v032_ctrl_ops, ++ V4L2_CID_GAIN, MT9V032_ANALOG_GAIN_MIN, ++ MT9V032_ANALOG_GAIN_MAX, 1, MT9V032_ANALOG_GAIN_DEF); ++ v4l2_ctrl_new_std_menu(&mt9v032->ctrls, &mt9v032_ctrl_ops, ++ V4L2_CID_EXPOSURE_AUTO, V4L2_EXPOSURE_MANUAL, 0, ++ V4L2_EXPOSURE_AUTO); ++ v4l2_ctrl_new_std(&mt9v032->ctrls, &mt9v032_ctrl_ops, ++ V4L2_CID_EXPOSURE, MT9V032_TOTAL_SHUTTER_WIDTH_MIN, ++ MT9V032_TOTAL_SHUTTER_WIDTH_MAX, 1, ++ MT9V032_TOTAL_SHUTTER_WIDTH_DEF); ++ ++ for (i = 0; i < ARRAY_SIZE(mt9v032_ctrls); ++i) ++ v4l2_ctrl_new_custom(&mt9v032->ctrls, &mt9v032_ctrls[i], NULL); ++ ++ mt9v032->subdev.ctrl_handler = &mt9v032->ctrls; ++ ++ if (mt9v032->ctrls.error) ++ printk(KERN_INFO "%s: control initialization error %d\n", ++ __func__, mt9v032->ctrls.error); ++ ++ mt9v032->crop.left = MT9V032_COLUMN_START_DEF; ++ mt9v032->crop.top = MT9V032_ROW_START_DEF; ++ mt9v032->crop.width = MT9V032_WINDOW_WIDTH_DEF; ++ mt9v032->crop.height = MT9V032_WINDOW_HEIGHT_DEF; ++ ++ mt9v032->format.code = V4L2_MBUS_FMT_SGRBG10_1X10; ++ mt9v032->format.width = MT9V032_WINDOW_WIDTH_DEF; ++ mt9v032->format.height = MT9V032_WINDOW_HEIGHT_DEF; ++ mt9v032->format.field = V4L2_FIELD_NONE; ++ mt9v032->format.colorspace = V4L2_COLORSPACE_SRGB; ++ ++ mt9v032->aec_agc = MT9V032_AEC_ENABLE | MT9V032_AGC_ENABLE; ++ ++ v4l2_i2c_subdev_init(&mt9v032->subdev, client, &mt9v032_subdev_ops); ++ mt9v032->subdev.internal_ops = &mt9v032_subdev_internal_ops; ++ mt9v032->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; ++ ++ mt9v032->pad.flags = MEDIA_PAD_FL_SOURCE; ++ ret = media_entity_init(&mt9v032->subdev.entity, 1, &mt9v032->pad, 0); ++ if (ret < 0) ++ kfree(mt9v032); ++ ++ return ret; ++} ++ ++static int mt9v032_remove(struct i2c_client *client) ++{ ++ struct v4l2_subdev *subdev = i2c_get_clientdata(client); ++ struct mt9v032 *mt9v032 = to_mt9v032(subdev); ++ ++ v4l2_device_unregister_subdev(subdev); ++ media_entity_cleanup(&subdev->entity); ++ kfree(mt9v032); ++ return 0; ++} ++ ++static const struct i2c_device_id mt9v032_id[] = { ++ { "mt9v032", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, mt9v032_id); ++ ++static struct i2c_driver mt9v032_driver = { ++ .driver = { ++ .name = "mt9v032", ++ }, ++ .probe = mt9v032_probe, ++ .remove = mt9v032_remove, ++ .id_table = mt9v032_id, ++}; ++ ++static int __init mt9v032_init(void) ++{ ++ return i2c_add_driver(&mt9v032_driver); ++} ++ ++static void __exit mt9v032_exit(void) ++{ ++ i2c_del_driver(&mt9v032_driver); ++} ++ ++module_init(mt9v032_init); ++module_exit(mt9v032_exit); ++ ++MODULE_DESCRIPTION("Aptina MT9V032 Camera driver"); ++MODULE_AUTHOR("Laurent Pinchart "); ++MODULE_LICENSE("GPL"); +diff --git a/include/media/mt9v032.h b/include/media/mt9v032.h +new file mode 100644 +index 0000000..5e27f9b +--- /dev/null ++++ b/include/media/mt9v032.h +@@ -0,0 +1,12 @@ ++#ifndef _MEDIA_MT9V032_H ++#define _MEDIA_MT9V032_H ++ ++struct v4l2_subdev; ++ ++struct mt9v032_platform_data { ++ unsigned int clk_pol:1; ++ ++ void (*set_clock)(struct v4l2_subdev *subdev, unsigned int rate); ++}; ++ ++#endif +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/camera/0003-Add-support-for-mt9p031-LI-5M03-module-in-Beagleboar.patch b/recipes/linux/linux-omap-2.6.39/camera/0003-Add-support-for-mt9p031-LI-5M03-module-in-Beagleboar.patch new file mode 100644 index 0000000000..31c525e223 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/camera/0003-Add-support-for-mt9p031-LI-5M03-module-in-Beagleboar.patch @@ -0,0 +1,162 @@ +From c53e55e3d361eb79bc8fc27971428fc37d804ea9 Mon Sep 17 00:00:00 2001 +From: Javier Martin +Date: Mon, 30 May 2011 10:37:17 +0200 +Subject: [PATCH 3/3] Add support for mt9p031 (LI-5M03 module) in Beagleboard xM. + +Since isp clocks have not been exposed yet, this patch +includes a temporal solution for testing mt9p031 driver +in Beagleboard xM. + +Signed-off-by: Javier Martin +--- + arch/arm/mach-omap2/Makefile | 1 + + arch/arm/mach-omap2/board-omap3beagle-camera.c | 95 ++++++++++++++++++++++++ + arch/arm/mach-omap2/board-omap3beagle.c | 5 + + 3 files changed, 101 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/mach-omap2/board-omap3beagle-camera.c + +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index 512b152..05cd983 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -179,6 +179,7 @@ obj-$(CONFIG_MACH_OMAP_2430SDP) += board-2430sdp.o \ + hsmmc.o + obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o + obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \ ++ board-omap3beagle-camera.o \ + hsmmc.o + obj-$(CONFIG_MACH_DEVKIT8000) += board-devkit8000.o \ + hsmmc.o +diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c +new file mode 100644 +index 0000000..2632557 +--- /dev/null ++++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c +@@ -0,0 +1,95 @@ ++#include ++#include ++ ++#include ++ ++#include ++#include ++#include "devices.h" ++#include "../../../drivers/media/video/omap3isp/isp.h" ++ ++#define MT9P031_RESET_GPIO 98 ++#define MT9P031_XCLK ISP_XCLK_A ++ ++static struct regulator *reg_1v8, *reg_2v8; ++ ++static int beagle_cam_set_xclk(struct v4l2_subdev *subdev, int hz) ++{ ++ struct isp_device *isp = v4l2_dev_to_isp_device(subdev->v4l2_dev); ++ int ret; ++ ++ ret = isp->platform_cb.set_xclk(isp, hz, MT9P031_XCLK); ++ return 0; ++} ++ ++static int beagle_cam_reset(struct v4l2_subdev *subdev, int active) ++{ ++ /* Set RESET_BAR to !active */ ++ gpio_set_value(MT9P031_RESET_GPIO, !active); ++ ++ return 0; ++} ++ ++static struct mt9p031_platform_data beagle_mt9p031_platform_data = { ++ .set_xclk = beagle_cam_set_xclk, ++ .reset = beagle_cam_reset, ++ .vdd_io = MT9P031_VDD_IO_1V8, ++ .version = MT9P031_COLOR_VERSION, ++}; ++ ++static struct i2c_board_info mt9p031_camera_i2c_device = { ++ I2C_BOARD_INFO("mt9p031", 0x48), ++ .platform_data = &beagle_mt9p031_platform_data, ++}; ++ ++static struct isp_subdev_i2c_board_info mt9p031_camera_subdevs[] = { ++ { ++ .board_info = &mt9p031_camera_i2c_device, ++ .i2c_adapter_id = 2, ++ }, ++ { NULL, 0, }, ++}; ++ ++static struct isp_v4l2_subdevs_group beagle_camera_subdevs[] = { ++ { ++ .subdevs = mt9p031_camera_subdevs, ++ .interface = ISP_INTERFACE_PARALLEL, ++ .bus = { ++ .parallel = { ++ .data_lane_shift = 0, ++ .clk_pol = 1, ++ .bridge = ISPCTRL_PAR_BRIDGE_DISABLE, ++ } ++ }, ++ }, ++ { }, ++}; ++ ++static struct isp_platform_data beagle_isp_platform_data = { ++ .subdevs = beagle_camera_subdevs, ++}; ++ ++static int __init beagle_camera_init(void) ++{ ++ if (!machine_is_omap3_beagle() || !cpu_is_omap3630()) ++ return 0; ++ ++ reg_1v8 = regulator_get(NULL, "cam_1v8"); ++ if (IS_ERR(reg_1v8)) ++ pr_err("%s: cannot get cam_1v8 regulator\n", __func__); ++ else ++ regulator_enable(reg_1v8); ++ ++ reg_2v8 = regulator_get(NULL, "cam_2v8"); ++ if (IS_ERR(reg_2v8)) ++ pr_err("%s: cannot get cam_2v8 regulator\n", __func__); ++ else ++ regulator_enable(reg_2v8); ++ ++ omap_register_i2c_bus(2, 100, NULL, 0); ++ gpio_request(MT9P031_RESET_GPIO, "cam_rst"); ++ gpio_direction_output(MT9P031_RESET_GPIO, 0); ++ omap3_init_camera(&beagle_isp_platform_data); ++ return 0; ++} ++late_initcall(beagle_camera_init); +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 221bfda..dd6e31f 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -25,12 +25,16 @@ + #include + #include + #include ++#include ++#include ++#include + + #include + #include + #include + #include + ++#include + #include + #include + +@@ -48,6 +52,7 @@ + #include + #include + #include ++#include + + #include "mux.h" + #include "hsmmc.h" +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0001-OMAP2-cpufreq-free-up-table-on-exit.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0001-OMAP2-cpufreq-free-up-table-on-exit.patch new file mode 100644 index 0000000000..86eafe37e8 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0001-OMAP2-cpufreq-free-up-table-on-exit.patch @@ -0,0 +1,38 @@ +From 8812fba541092702d6a40ea23ff60bcb504365fd Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Thu, 12 May 2011 07:59:52 -0500 +Subject: [PATCH 1/6] OMAP2+: cpufreq: free up table on exit + +freq_table allocated by opp_init_cpufreq_table in omap_cpu_init +needs to be freed in omap_cpu_exit. + +Signed-off-by: Nishanth Menon +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/omap2plus-cpufreq.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c +index d53ce23..e38ebb8 100644 +--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c ++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + + #include +@@ -216,6 +217,8 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + static int omap_cpu_exit(struct cpufreq_policy *policy) + { + clk_exit_cpufreq_table(&freq_table); ++ kfree(freq_table); ++ freq_table = NULL; + clk_put(mpu_clk); + return 0; + } +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0002-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0002-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch new file mode 100644 index 0000000000..ee27578d04 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0002-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch @@ -0,0 +1,44 @@ +From 1dce7658788943a8085323ef87111cdcdb335d1d Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Thu, 12 May 2011 08:14:41 -0500 +Subject: [PATCH 2/6] OMAP2+: cpufreq: handle invalid cpufreq table + +Handle the case when cpufreq_frequency_table_cpuinfo fails. freq_table +that we passed failed the internal test of cpufreq generic driver, +so we should'nt be using the freq_table as such. Instead, warn and +fallback to clock functions for validation and operation. + +Signed-off-by: Nishanth Menon +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/omap2plus-cpufreq.c | 12 ++++++++++-- + 1 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c +index e38ebb8..6e3666a 100644 +--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c ++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c +@@ -182,10 +182,18 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + + if (freq_table) { + result = cpufreq_frequency_table_cpuinfo(policy, freq_table); +- if (!result) ++ if (!result) { + cpufreq_frequency_table_get_attr(freq_table, + policy->cpu); +- } else { ++ } else { ++ WARN(true, "%s: fallback to clk_round(freq_table=%d)\n", ++ __func__, result); ++ kfree(freq_table); ++ freq_table = NULL; ++ } ++ } ++ ++ if (!freq_table) { + policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; + policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, + VERY_HI_RATE) / 1000; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0003-OMAP2-cpufreq-minor-comment-cleanup.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0003-OMAP2-cpufreq-minor-comment-cleanup.patch new file mode 100644 index 0000000000..3064d5044d --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0003-OMAP2-cpufreq-minor-comment-cleanup.patch @@ -0,0 +1,33 @@ +From 61c5ce4da03eda42e69cf225fddac9c910506db5 Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Thu, 12 May 2011 16:27:45 -0700 +Subject: [PATCH 3/6] OMAP2+: cpufreq: minor comment cleanup + +this should probably get squashed in.. + +Signed-off-by: Nishanth Menon +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/omap2plus-cpufreq.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c +index 6e3666a..45f1e9e 100644 +--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c ++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c +@@ -84,8 +84,10 @@ static int omap_target(struct cpufreq_policy *policy, + if (is_smp() && (num_online_cpus() < NR_CPUS)) + return ret; + +- /* Ensure desired rate is within allowed range. Some govenors +- * (ondemand) will just pass target_freq=0 to get the minimum. */ ++ /* ++ * Ensure desired rate is within allowed range. Some govenors ++ * (ondemand) will just pass target_freq=0 to get the minimum. ++ */ + if (target_freq < policy->min) + target_freq = policy->min; + if (target_freq > policy->max) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0004-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0004-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch new file mode 100644 index 0000000000..24a721a011 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0004-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch @@ -0,0 +1,48 @@ +From 4910bff43db304f58fef625d54e573d554066a78 Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Fri, 13 May 2011 05:34:35 -0700 +Subject: [PATCH 4/6] OMAP2: cpufreq: use clk_init_cpufreq_table if OPPs not available + +OMAP2 does not use OPP tables at the moment for DVFS. Currently, +we depend on opp table initialization to give us the freq_table, +which makes sense for OMAP3+. for OMAP2, we should be using +clk_init_cpufreq_table - so if the opp based frequency table +initilization fails, fall back to clk_init_cpufreq_table to give +us the table. + +Signed-off-by: Nishanth Menon +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/omap2plus-cpufreq.c | 9 ++++++++- + 1 files changed, 8 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c +index 45f1e9e..854f4b3 100644 +--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c ++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c +@@ -180,7 +180,13 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + pr_warning("%s: unable to get the mpu device\n", __func__); + return -EINVAL; + } +- opp_init_cpufreq_table(mpu_dev, &freq_table); ++ ++ /* ++ * if we dont get cpufreq table using opp, use traditional omap2 lookup ++ * as a fallback ++ */ ++ if (opp_init_cpufreq_table(mpu_dev, &freq_table)) ++ clk_init_cpufreq_table(&freq_table); + + if (freq_table) { + result = cpufreq_frequency_table_cpuinfo(policy, freq_table); +@@ -188,6 +194,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + cpufreq_frequency_table_get_attr(freq_table, + policy->cpu); + } else { ++ clk_exit_cpufreq_table(&freq_table); + WARN(true, "%s: fallback to clk_round(freq_table=%d)\n", + __func__, result); + kfree(freq_table); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0005-OMAP2-cpufreq-use-cpufreq_frequency_table_target.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0005-OMAP2-cpufreq-use-cpufreq_frequency_table_target.patch new file mode 100644 index 0000000000..f5493b3bf9 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0005-OMAP2-cpufreq-use-cpufreq_frequency_table_target.patch @@ -0,0 +1,78 @@ +From e8d1f8ed3f2ed7c2e9ee51adfd322868d4195ecf Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Fri, 13 May 2011 05:43:49 -0700 +Subject: [PATCH 5/6] OMAP2+: cpufreq: use cpufreq_frequency_table_target + +Use cpufreq_frequency_table_target for finding the proper target +instead of seeing if the frequency requested is divisible alone. +if we have a frequency table, we should restrict ourselves to +selecting the "approved" frequencies alone and only in the case +where the frequency table is not available should we attempt at +closest roundable clock frequency. + +Signed-off-by: Nishanth Menon +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/omap2plus-cpufreq.c | 38 ++++++++++++++++++++++-------- + 1 files changed, 28 insertions(+), 10 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c +index 854f4b3..d0b4f97 100644 +--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c ++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c +@@ -77,24 +77,42 @@ static int omap_target(struct cpufreq_policy *policy, + unsigned int target_freq, + unsigned int relation) + { +- int i, ret = 0; ++ unsigned int i; ++ int ret = 0; + struct cpufreq_freqs freqs; + + /* Changes not allowed until all CPUs are online */ + if (is_smp() && (num_online_cpus() < NR_CPUS)) + return ret; + +- /* +- * Ensure desired rate is within allowed range. Some govenors +- * (ondemand) will just pass target_freq=0 to get the minimum. +- */ +- if (target_freq < policy->min) +- target_freq = policy->min; +- if (target_freq > policy->max) +- target_freq = policy->max; ++ if (freq_table) { ++ ret = cpufreq_frequency_table_target(policy, freq_table, ++ target_freq, relation, &i); ++ if (ret) { ++ pr_debug("%s: cpu%d: no freq match for %d(ret=%d)\n", ++ __func__, policy->cpu, target_freq, ret); ++ return ret; ++ } ++ freqs.new = freq_table[i].frequency; ++ } else { ++ /* ++ * Ensure desired rate is within allowed range. Some govenors ++ * (ondemand) will just pass target_freq=0 to get the minimum. ++ */ ++ if (target_freq < policy->min) ++ target_freq = policy->min; ++ if (target_freq > policy->max) ++ target_freq = policy->max; ++ ++ freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; ++ } ++ if (!freqs.new) { ++ pr_err("%s: cpu%d: no match for freq %d\n", __func__, ++ policy->cpu, target_freq); ++ return -EINVAL; ++ } + + freqs.old = omap_getspeed(policy->cpu); +- freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; + freqs.cpu = policy->cpu; + + if (freqs.old == freqs.new) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0006-OMAP2-cpufreq-fix-freq_table-leak.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0006-OMAP2-cpufreq-fix-freq_table-leak.patch new file mode 100644 index 0000000000..0727ebcdee --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0006-OMAP2-cpufreq-fix-freq_table-leak.patch @@ -0,0 +1,100 @@ +From 9303bae0e4acf8a8b3b0c682d6655a656fc776bf Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Wed, 18 May 2011 01:48:23 -0500 +Subject: [PATCH 6/6] OMAP2+: cpufreq: fix freq_table leak + +Since we have two cpus the cpuinit call for cpu1 causes +freq_table of cpu0 to be overwritten. instead, we maintain +a counter to keep track of cpus who use the cpufreq table +allocate it once(one freq table for all CPUs) and free them +once the last user is done with it. + +Signed-off-by: Nishanth Menon +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/omap2plus-cpufreq.c | 33 ++++++++++++++++++++++++------ + 1 files changed, 26 insertions(+), 7 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c +index d0b4f97..fc3d0fb 100644 +--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c ++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c +@@ -42,6 +42,9 @@ + #define VERY_HI_RATE 900000000 + + static struct cpufreq_frequency_table *freq_table; ++static int freq_table_users; ++static DEFINE_MUTEX(freq_table_lock); ++ + static struct clk *mpu_clk; + + static int omap_verify_speed(struct cpufreq_policy *policy) +@@ -172,6 +175,18 @@ skip_lpj: + return ret; + } + ++static void freq_table_free(void) ++{ ++ if (!freq_table_users) ++ return; ++ freq_table_users--; ++ if (freq_table_users) ++ return; ++ clk_exit_cpufreq_table(&freq_table); ++ kfree(freq_table); ++ freq_table = NULL; ++} ++ + static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + { + int result = 0; +@@ -199,14 +214,18 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + return -EINVAL; + } + ++ mutex_lock(&freq_table_lock); + /* + * if we dont get cpufreq table using opp, use traditional omap2 lookup + * as a fallback + */ +- if (opp_init_cpufreq_table(mpu_dev, &freq_table)) +- clk_init_cpufreq_table(&freq_table); ++ if (!freq_table) { ++ if (opp_init_cpufreq_table(mpu_dev, &freq_table)) ++ clk_init_cpufreq_table(&freq_table); ++ } + + if (freq_table) { ++ freq_table_users++; + result = cpufreq_frequency_table_cpuinfo(policy, freq_table); + if (!result) { + cpufreq_frequency_table_get_attr(freq_table, +@@ -215,10 +234,10 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + clk_exit_cpufreq_table(&freq_table); + WARN(true, "%s: fallback to clk_round(freq_table=%d)\n", + __func__, result); +- kfree(freq_table); +- freq_table = NULL; ++ freq_table_free(); + } + } ++ mutex_unlock(&freq_table_lock); + + if (!freq_table) { + policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; +@@ -251,9 +270,9 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + + static int omap_cpu_exit(struct cpufreq_policy *policy) + { +- clk_exit_cpufreq_table(&freq_table); +- kfree(freq_table); +- freq_table = NULL; ++ mutex_lock(&freq_table_lock); ++ freq_table_free(); ++ mutex_unlock(&freq_table_lock); + clk_put(mpu_clk); + return 0; + } +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0001-cpufreq-helpers-for-walking-the-frequency-table.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0001-cpufreq-helpers-for-walking-the-frequency-table.patch new file mode 100644 index 0000000000..03385720a0 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0001-cpufreq-helpers-for-walking-the-frequency-table.patch @@ -0,0 +1,134 @@ +From 078a7006a32248c98d40ef79bbeb85a0879de734 Mon Sep 17 00:00:00 2001 +From: Mike Turquette +Date: Tue, 17 May 2011 09:35:54 -0500 +Subject: [PATCH 1/2] cpufreq: helpers for walking the frequency table + +Two new functions for getting the next higher and next lower frequencies +in the cpufreq table, based upon a frequency supplied in kHz. + +This is useful for cpufreq governors that do not target frequencies +based upon a percentage or a pre-determined value, but instead access +the cpufreq table directly. + +Signed-off-by: Mike Turquette +Signed-off-by: Santosh Shilimkar +Signed-off-by: Koen Kooi +--- + drivers/cpufreq/freq_table.c | 73 ++++++++++++++++++++++++++++++++++++++++++ + include/linux/cpufreq.h | 9 +++++ + 2 files changed, 82 insertions(+), 0 deletions(-) + +diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c +index 0543221..11a307b 100644 +--- a/drivers/cpufreq/freq_table.c ++++ b/drivers/cpufreq/freq_table.c +@@ -13,6 +13,7 @@ + #include + #include + #include ++#include + + #define dprintk(msg...) \ + cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, "freq-table", msg) +@@ -174,6 +175,78 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy, + } + EXPORT_SYMBOL_GPL(cpufreq_frequency_table_target); + ++int cpufreq_frequency_table_next_lowest(struct cpufreq_policy *policy, ++ struct cpufreq_frequency_table *table, int *index) ++{ ++ unsigned int cur_freq; ++ unsigned int next_lowest_freq; ++ int optimal_index = -1; ++ int i = 0; ++ ++ if (!policy || IS_ERR(policy) || !table || IS_ERR(table) || ++ !index || IS_ERR(index)) ++ return -ENOMEM; ++ ++ cur_freq = policy->cur; ++ next_lowest_freq = policy->min; ++ ++ /* we're at the lowest frequency in the table already, bail out */ ++ if (cur_freq == policy->min) ++ return -EINVAL; ++ ++ /* walk the list, find closest freq to cur_freq that is below it */ ++ while(table[i].frequency != CPUFREQ_TABLE_END) { ++ if (table[i].frequency < cur_freq && ++ table[i].frequency >= next_lowest_freq) { ++ next_lowest_freq = table[i].frequency; ++ optimal_index = table[i].index; ++ } ++ ++ i++; ++ } ++ ++ *index = optimal_index; ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(cpufreq_frequency_table_next_lowest); ++ ++int cpufreq_frequency_table_next_highest(struct cpufreq_policy *policy, ++ struct cpufreq_frequency_table *table, int *index) ++{ ++ unsigned int cur_freq; ++ unsigned int next_higher_freq; ++ int optimal_index = -1; ++ int i = 0; ++ ++ if (!policy || IS_ERR(policy) || !table || IS_ERR(table) || ++ !index || IS_ERR(index)) ++ return -ENOMEM; ++ ++ cur_freq = policy->cur; ++ next_higher_freq = policy->max; ++ ++ /* we're at the highest frequency in the table already, bail out */ ++ if (cur_freq == policy->max) ++ return -EINVAL; ++ ++ /* walk the list, find closest freq to cur_freq that is above it */ ++ while(table[i].frequency != CPUFREQ_TABLE_END) { ++ if (table[i].frequency > cur_freq && ++ table[i].frequency <= next_higher_freq) { ++ next_higher_freq = table[i].frequency; ++ optimal_index = table[i].index; ++ } ++ ++ i++; ++ } ++ ++ *index = optimal_index; ++ ++ return 0; ++} ++EXPORT_SYMBOL_GPL(cpufreq_frequency_table_next_highest); ++ + static DEFINE_PER_CPU(struct cpufreq_frequency_table *, cpufreq_show_table); + /** + * show_available_freqs - show available frequencies for the specified CPU +diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h +index 9343dd3..a38fca8 100644 +--- a/include/linux/cpufreq.h ++++ b/include/linux/cpufreq.h +@@ -396,6 +396,15 @@ void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table, + + void cpufreq_frequency_table_put_attr(unsigned int cpu); + ++/* the following are for use in governors, or anywhere else */ ++extern int cpufreq_frequency_table_next_lowest(struct cpufreq_policy *policy, ++ struct cpufreq_frequency_table *table, ++ int *index); ++ ++extern int cpufreq_frequency_table_next_highest(struct cpufreq_policy *policy, ++ struct cpufreq_frequency_table *table, ++ int *index); ++ + + /********************************************************************* + * UNIFIED DEBUG HELPERS * +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0002-cpufreq-introduce-hotplug-governor.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0002-cpufreq-introduce-hotplug-governor.patch new file mode 100644 index 0000000000..70fa625e43 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0002-cpufreq-introduce-hotplug-governor.patch @@ -0,0 +1,879 @@ +From f31dabf5b6158584da56e7186ada6d2a80d5654e Mon Sep 17 00:00:00 2001 +From: Mike Turquette +Date: Tue, 17 May 2011 09:43:09 -0500 +Subject: [PATCH 2/2] cpufreq: introduce hotplug governor + +The "hotplug" governor scales CPU frequency based on load, similar to +"ondemand". It scales up to the highest frequency when "up_threshold" +is crossed and scales down one frequency at a time when "down_threshold" +is crossed. Unlike those governors, target frequencies are determined +by directly accessing the CPUfreq frequency table, instead of taking +some percentage of maximum available frequency. + +The key difference in the "hotplug" governor is that it will disable +auxillary CPUs when the system is very idle, and enable them again once +the system becomes busy. This is achieved by averaging load over +multiple sampling periods; if CPUs were online or offlined based on a +single sampling period then thrashing will occur. + +Sysfs entries exist for "hotplug_in_sampling_periods" and for +"hotplug_out_sampling_periods" which determine how many consecutive +periods get averaged to determine if auxillery CPUs should be onlined or +offlined. Defaults are 5 periods and 20 periods respectively. +Otherwise the standard sysfs entries you might find for "ondemand" and +"conservative" governors are there. + +To use this governor it is assumed that your CPUfreq driver has +populated the CPUfreq table, CONFIG_NO_HZ is enabled and +CONFIG_HOTPLUG_CPU is enabled. + +Changes in V2: + Corrected default sampling periods + Optimized load history array resizing + Maintain load history when resizing array + Add locking to dbs_check_cpu + Switch from enable_nonboot_cpus to cpu_up + Switch from disable_nonboot_cpus to down_cpu + Fix some printks + Coding style around for-loops + +Signed-off-by: Mike Turquette +Signed-off-by: Santosh Shilimkar +Signed-off-by: Koen Kooi +--- + Documentation/cpu-freq/governors.txt | 28 ++ + drivers/cpufreq/Kconfig | 33 ++ + drivers/cpufreq/Makefile | 1 + + drivers/cpufreq/cpufreq_hotplug.c | 705 ++++++++++++++++++++++++++++++++++ + include/linux/cpufreq.h | 3 + + 5 files changed, 770 insertions(+), 0 deletions(-) + create mode 100644 drivers/cpufreq/cpufreq_hotplug.c + +diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt +index e74d0a2..c2e3d3d 100644 +--- a/Documentation/cpu-freq/governors.txt ++++ b/Documentation/cpu-freq/governors.txt +@@ -193,6 +193,34 @@ governor but for the opposite direction. For example when set to its + default value of '20' it means that if the CPU usage needs to be below + 20% between samples to have the frequency decreased. + ++ ++2.6 Hotplug ++----------- ++ ++The CPUfreq governor "hotplug" operates similary to "ondemand" and ++"conservative". It's decisions are based primarily on CPU load. Like ++"ondemand" the "hotplug" governor will ramp up to the highest frequency ++once the run-time tunable "up_threshold" parameter is crossed. Like ++"conservative", the "hotplug" governor exports a "down_threshold" ++parameter that is also tunable at run-time. When the "down_threshold" ++is crossed the CPU transitions to the next lowest frequency in the ++CPUfreq frequency table instead of decrementing the frequency based on a ++percentage of maximum load. ++ ++The main reason "hotplug" governor exists is for architectures requiring ++that only the master CPU be online in order to hit low-power states ++(C-states). OMAP4 is one such example of this. The "hotplug" governor ++is also helpful in reducing thermal output in devices with tight thermal ++constraints. ++ ++Auxillary CPUs are onlined/offline based on CPU load, but the decision ++to do so is made after averaging several sampling windows. This is to ++reduce CPU hotplug "thrashing", which can be caused by normal system ++entropy and leads to lots of spurious plug-in and plug-out transitions. ++The number of sampling periods averaged together is tunable via the ++"hotplug_in_sampling_periods" and "hotplug_out_sampling_periods" ++run-time tunable parameters. ++ + 3. The Governor Interface in the CPUfreq Core + ============================================= + +diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig +index ca8ee80..c716a0e 100644 +--- a/drivers/cpufreq/Kconfig ++++ b/drivers/cpufreq/Kconfig +@@ -110,6 +110,19 @@ config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE + Be aware that not all cpufreq drivers support the conservative + governor. If unsure have a look at the help section of the + driver. Fallback governor will be the performance governor. ++ ++config CPU_FREQ_DEFAULT_GOV_HOTPLUG ++ bool "hotplug" ++ select CPU_FREQ_GOV_HOTPLUG ++ select CPU_FREQ_GOV_PERFORMANCE ++ help ++ Use the CPUFreq governor 'hotplug' as default. This allows you ++ to get a full dynamic frequency capable system with CPU ++ hotplug support by simply loading your cpufreq low-level ++ hardware driver. Be aware that not all cpufreq drivers ++ support the hotplug governor. If unsure have a look at ++ the help section of the driver. Fallback governor will be the ++ performance governor. + endchoice + + config CPU_FREQ_GOV_PERFORMANCE +@@ -190,4 +203,24 @@ config CPU_FREQ_GOV_CONSERVATIVE + + If in doubt, say N. + ++config CPU_FREQ_GOV_HOTPLUG ++ tristate "'hotplug' cpufreq governor" ++ depends on CPU_FREQ && NO_HZ && HOTPLUG_CPU ++ help ++ 'hotplug' - this driver mimics the frequency scaling behavior ++ in 'ondemand', but with several key differences. First is ++ that frequency transitions use the CPUFreq table directly, ++ instead of incrementing in a percentage of the maximum ++ available frequency. Second 'hotplug' will offline auxillary ++ CPUs when the system is idle, and online those CPUs once the ++ system becomes busy again. This last feature is needed for ++ architectures which transition to low power states when only ++ the "master" CPU is online, or for thermally constrained ++ devices. ++ ++ If you don't have one of these architectures or devices, use ++ 'ondemand' instead. ++ ++ If in doubt, say N. ++ + endif # CPU_FREQ +diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile +index 71fc3b4..05d564c 100644 +--- a/drivers/cpufreq/Makefile ++++ b/drivers/cpufreq/Makefile +@@ -9,6 +9,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_POWERSAVE) += cpufreq_powersave.o + obj-$(CONFIG_CPU_FREQ_GOV_USERSPACE) += cpufreq_userspace.o + obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND) += cpufreq_ondemand.o + obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o ++obj-$(CONFIG_CPU_FREQ_GOV_HOTPLUG) += cpufreq_hotplug.o + + # CPUfreq cross-arch helpers + obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o +diff --git a/drivers/cpufreq/cpufreq_hotplug.c b/drivers/cpufreq/cpufreq_hotplug.c +new file mode 100644 +index 0000000..85aa6d2 +--- /dev/null ++++ b/drivers/cpufreq/cpufreq_hotplug.c +@@ -0,0 +1,705 @@ ++/* ++ * CPUFreq hotplug governor ++ * ++ * Copyright (C) 2010 Texas Instruments, Inc. ++ * Mike Turquette ++ * Santosh Shilimkar ++ * ++ * Based on ondemand governor ++ * Copyright (C) 2001 Russell King ++ * (C) 2003 Venkatesh Pallipadi , ++ * Jun Nakajima ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/* greater than 80% avg load across online CPUs increases frequency */ ++#define DEFAULT_UP_FREQ_MIN_LOAD (80) ++ ++/* less than 20% avg load across online CPUs decreases frequency */ ++#define DEFAULT_DOWN_FREQ_MAX_LOAD (20) ++ ++/* default sampling period (uSec) is bogus; 10x ondemand's default for x86 */ ++#define DEFAULT_SAMPLING_PERIOD (100000) ++ ++/* default number of sampling periods to average before hotplug-in decision */ ++#define DEFAULT_HOTPLUG_IN_SAMPLING_PERIODS (5) ++ ++/* default number of sampling periods to average before hotplug-out decision */ ++#define DEFAULT_HOTPLUG_OUT_SAMPLING_PERIODS (20) ++ ++static void do_dbs_timer(struct work_struct *work); ++static int cpufreq_governor_dbs(struct cpufreq_policy *policy, ++ unsigned int event); ++ ++#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG ++static ++#endif ++struct cpufreq_governor cpufreq_gov_hotplug = { ++ .name = "hotplug", ++ .governor = cpufreq_governor_dbs, ++ .owner = THIS_MODULE, ++}; ++ ++struct cpu_dbs_info_s { ++ cputime64_t prev_cpu_idle; ++ cputime64_t prev_cpu_wall; ++ cputime64_t prev_cpu_nice; ++ struct cpufreq_policy *cur_policy; ++ struct delayed_work work; ++ struct cpufreq_frequency_table *freq_table; ++ int cpu; ++ /* ++ * percpu mutex that serializes governor limit change with ++ * do_dbs_timer invocation. We do not want do_dbs_timer to run ++ * when user is changing the governor or limits. ++ */ ++ struct mutex timer_mutex; ++}; ++static DEFINE_PER_CPU(struct cpu_dbs_info_s, hp_cpu_dbs_info); ++ ++static unsigned int dbs_enable; /* number of CPUs using this policy */ ++ ++/* ++ * dbs_mutex protects data in dbs_tuners_ins from concurrent changes on ++ * different CPUs. It protects dbs_enable in governor start/stop. ++ */ ++static DEFINE_MUTEX(dbs_mutex); ++ ++static struct workqueue_struct *khotplug_wq; ++ ++static struct dbs_tuners { ++ unsigned int sampling_rate; ++ unsigned int up_threshold; ++ unsigned int down_threshold; ++ unsigned int hotplug_in_sampling_periods; ++ unsigned int hotplug_out_sampling_periods; ++ unsigned int hotplug_load_index; ++ unsigned int *hotplug_load_history; ++ unsigned int ignore_nice; ++ unsigned int io_is_busy; ++} dbs_tuners_ins = { ++ .sampling_rate = DEFAULT_SAMPLING_PERIOD, ++ .up_threshold = DEFAULT_UP_FREQ_MIN_LOAD, ++ .down_threshold = DEFAULT_DOWN_FREQ_MAX_LOAD, ++ .hotplug_in_sampling_periods = DEFAULT_HOTPLUG_IN_SAMPLING_PERIODS, ++ .hotplug_out_sampling_periods = DEFAULT_HOTPLUG_OUT_SAMPLING_PERIODS, ++ .hotplug_load_index = 0, ++ .ignore_nice = 0, ++ .io_is_busy = 0, ++}; ++ ++/* ++ * A corner case exists when switching io_is_busy at run-time: comparing idle ++ * times from a non-io_is_busy period to an io_is_busy period (or vice-versa) ++ * will misrepresent the actual change in system idleness. We ignore this ++ * corner case: enabling io_is_busy might cause freq increase and disabling ++ * might cause freq decrease, which probably matches the original intent. ++ */ ++static inline cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall) ++{ ++ u64 idle_time; ++ u64 iowait_time; ++ ++ /* cpufreq-hotplug always assumes CONFIG_NO_HZ */ ++ idle_time = get_cpu_idle_time_us(cpu, wall); ++ ++ /* add time spent doing I/O to idle time */ ++ if (dbs_tuners_ins.io_is_busy) { ++ iowait_time = get_cpu_iowait_time_us(cpu, wall); ++ /* cpufreq-hotplug always assumes CONFIG_NO_HZ */ ++ if (iowait_time != -1ULL && idle_time >= iowait_time) ++ idle_time -= iowait_time; ++ } ++ ++ return idle_time; ++} ++ ++/************************** sysfs interface ************************/ ++ ++/* XXX look at global sysfs macros in cpufreq.h, can those be used here? */ ++ ++/* cpufreq_hotplug Governor Tunables */ ++#define show_one(file_name, object) \ ++static ssize_t show_##file_name \ ++(struct kobject *kobj, struct attribute *attr, char *buf) \ ++{ \ ++ return sprintf(buf, "%u\n", dbs_tuners_ins.object); \ ++} ++show_one(sampling_rate, sampling_rate); ++show_one(up_threshold, up_threshold); ++show_one(down_threshold, down_threshold); ++show_one(hotplug_in_sampling_periods, hotplug_in_sampling_periods); ++show_one(hotplug_out_sampling_periods, hotplug_out_sampling_periods); ++show_one(ignore_nice_load, ignore_nice); ++show_one(io_is_busy, io_is_busy); ++ ++static ssize_t store_sampling_rate(struct kobject *a, struct attribute *b, ++ const char *buf, size_t count) ++{ ++ unsigned int input; ++ int ret; ++ ret = sscanf(buf, "%u", &input); ++ if (ret != 1) ++ return -EINVAL; ++ ++ mutex_lock(&dbs_mutex); ++ dbs_tuners_ins.sampling_rate = input; ++ mutex_unlock(&dbs_mutex); ++ ++ return count; ++} ++ ++static ssize_t store_up_threshold(struct kobject *a, struct attribute *b, ++ const char *buf, size_t count) ++{ ++ unsigned int input; ++ int ret; ++ ret = sscanf(buf, "%u", &input); ++ ++ if (ret != 1 || input <= dbs_tuners_ins.down_threshold) { ++ return -EINVAL; ++ } ++ ++ mutex_lock(&dbs_mutex); ++ dbs_tuners_ins.up_threshold = input; ++ mutex_unlock(&dbs_mutex); ++ ++ return count; ++} ++ ++static ssize_t store_down_threshold(struct kobject *a, struct attribute *b, ++ const char *buf, size_t count) ++{ ++ unsigned int input; ++ int ret; ++ ret = sscanf(buf, "%u", &input); ++ ++ if (ret != 1 || input >= dbs_tuners_ins.up_threshold) { ++ return -EINVAL; ++ } ++ ++ mutex_lock(&dbs_mutex); ++ dbs_tuners_ins.down_threshold = input; ++ mutex_unlock(&dbs_mutex); ++ ++ return count; ++} ++ ++static ssize_t store_hotplug_in_sampling_periods(struct kobject *a, ++ struct attribute *b, const char *buf, size_t count) ++{ ++ unsigned int input; ++ unsigned int *temp; ++ unsigned int max_windows; ++ int ret; ++ ret = sscanf(buf, "%u", &input); ++ ++ if (ret != 1) ++ return -EINVAL; ++ ++ /* already using this value, bail out */ ++ if (input == dbs_tuners_ins.hotplug_in_sampling_periods) ++ return count; ++ ++ mutex_lock(&dbs_mutex); ++ ret = count; ++ max_windows = max(dbs_tuners_ins.hotplug_in_sampling_periods, ++ dbs_tuners_ins.hotplug_out_sampling_periods); ++ ++ /* no need to resize array */ ++ if (input <= max_windows) { ++ dbs_tuners_ins.hotplug_in_sampling_periods = input; ++ goto out; ++ } ++ ++ /* resize array */ ++ temp = kmalloc((sizeof(unsigned int) * input), GFP_KERNEL); ++ ++ if (!temp || IS_ERR(temp)) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ ++ memcpy(temp, dbs_tuners_ins.hotplug_load_history, ++ (max_windows * sizeof(unsigned int))); ++ kfree(dbs_tuners_ins.hotplug_load_history); ++ ++ /* replace old buffer, old number of sampling periods & old index */ ++ dbs_tuners_ins.hotplug_load_history = temp; ++ dbs_tuners_ins.hotplug_in_sampling_periods = input; ++ dbs_tuners_ins.hotplug_load_index = max_windows; ++out: ++ mutex_unlock(&dbs_mutex); ++ ++ return ret; ++} ++ ++static ssize_t store_hotplug_out_sampling_periods(struct kobject *a, ++ struct attribute *b, const char *buf, size_t count) ++{ ++ unsigned int input; ++ unsigned int *temp; ++ unsigned int max_windows; ++ int ret; ++ ret = sscanf(buf, "%u", &input); ++ ++ if (ret != 1) ++ return -EINVAL; ++ ++ /* already using this value, bail out */ ++ if (input == dbs_tuners_ins.hotplug_out_sampling_periods) ++ return count; ++ ++ mutex_lock(&dbs_mutex); ++ ret = count; ++ max_windows = max(dbs_tuners_ins.hotplug_in_sampling_periods, ++ dbs_tuners_ins.hotplug_out_sampling_periods); ++ ++ /* no need to resize array */ ++ if (input <= max_windows) { ++ dbs_tuners_ins.hotplug_out_sampling_periods = input; ++ goto out; ++ } ++ ++ /* resize array */ ++ temp = kmalloc((sizeof(unsigned int) * input), GFP_KERNEL); ++ ++ if (!temp || IS_ERR(temp)) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ ++ memcpy(temp, dbs_tuners_ins.hotplug_load_history, ++ (max_windows * sizeof(unsigned int))); ++ kfree(dbs_tuners_ins.hotplug_load_history); ++ ++ /* replace old buffer, old number of sampling periods & old index */ ++ dbs_tuners_ins.hotplug_load_history = temp; ++ dbs_tuners_ins.hotplug_out_sampling_periods = input; ++ dbs_tuners_ins.hotplug_load_index = max_windows; ++out: ++ mutex_unlock(&dbs_mutex); ++ ++ return ret; ++} ++ ++static ssize_t store_ignore_nice_load(struct kobject *a, struct attribute *b, ++ const char *buf, size_t count) ++{ ++ unsigned int input; ++ int ret; ++ ++ unsigned int j; ++ ++ ret = sscanf(buf, "%u", &input); ++ if (ret != 1) ++ return -EINVAL; ++ ++ if (input > 1) ++ input = 1; ++ ++ mutex_lock(&dbs_mutex); ++ if (input == dbs_tuners_ins.ignore_nice) { /* nothing to do */ ++ mutex_unlock(&dbs_mutex); ++ return count; ++ } ++ dbs_tuners_ins.ignore_nice = input; ++ ++ /* we need to re-evaluate prev_cpu_idle */ ++ for_each_online_cpu(j) { ++ struct cpu_dbs_info_s *dbs_info; ++ dbs_info = &per_cpu(hp_cpu_dbs_info, j); ++ dbs_info->prev_cpu_idle = get_cpu_idle_time(j, ++ &dbs_info->prev_cpu_wall); ++ if (dbs_tuners_ins.ignore_nice) ++ dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice; ++ ++ } ++ mutex_unlock(&dbs_mutex); ++ ++ return count; ++} ++ ++static ssize_t store_io_is_busy(struct kobject *a, struct attribute *b, ++ const char *buf, size_t count) ++{ ++ unsigned int input; ++ int ret; ++ ++ ret = sscanf(buf, "%u", &input); ++ if (ret != 1) ++ return -EINVAL; ++ ++ mutex_lock(&dbs_mutex); ++ dbs_tuners_ins.io_is_busy = !!input; ++ mutex_unlock(&dbs_mutex); ++ ++ return count; ++} ++ ++define_one_global_rw(sampling_rate); ++define_one_global_rw(up_threshold); ++define_one_global_rw(down_threshold); ++define_one_global_rw(hotplug_in_sampling_periods); ++define_one_global_rw(hotplug_out_sampling_periods); ++define_one_global_rw(ignore_nice_load); ++define_one_global_rw(io_is_busy); ++ ++static struct attribute *dbs_attributes[] = { ++ &sampling_rate.attr, ++ &up_threshold.attr, ++ &down_threshold.attr, ++ &hotplug_in_sampling_periods.attr, ++ &hotplug_out_sampling_periods.attr, ++ &ignore_nice_load.attr, ++ &io_is_busy.attr, ++ NULL ++}; ++ ++static struct attribute_group dbs_attr_group = { ++ .attrs = dbs_attributes, ++ .name = "hotplug", ++}; ++ ++/************************** sysfs end ************************/ ++ ++static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) ++{ ++ /* combined load of all enabled CPUs */ ++ unsigned int total_load = 0; ++ /* single largest CPU load */ ++ unsigned int max_load = 0; ++ /* average load across all enabled CPUs */ ++ unsigned int avg_load = 0; ++ /* average load across multiple sampling periods for hotplug events */ ++ unsigned int hotplug_in_avg_load = 0; ++ unsigned int hotplug_out_avg_load = 0; ++ /* number of sampling periods averaged for hotplug decisions */ ++ unsigned int periods; ++ ++ struct cpufreq_policy *policy; ++ unsigned int index = 0; ++ unsigned int i, j; ++ ++ policy = this_dbs_info->cur_policy; ++ ++ /* ++ * cpu load accounting ++ * get highest load, total load and average load across all CPUs ++ */ ++ for_each_cpu(j, policy->cpus) { ++ unsigned int load; ++ unsigned int idle_time, wall_time; ++ cputime64_t cur_wall_time, cur_idle_time; ++ struct cpu_dbs_info_s *j_dbs_info; ++ ++ j_dbs_info = &per_cpu(hp_cpu_dbs_info, j); ++ ++ /* update both cur_idle_time and cur_wall_time */ ++ cur_idle_time = get_cpu_idle_time(j, &cur_wall_time); ++ ++ /* how much wall time has passed since last iteration? */ ++ wall_time = (unsigned int) cputime64_sub(cur_wall_time, ++ j_dbs_info->prev_cpu_wall); ++ j_dbs_info->prev_cpu_wall = cur_wall_time; ++ ++ /* how much idle time has passed since last iteration? */ ++ idle_time = (unsigned int) cputime64_sub(cur_idle_time, ++ j_dbs_info->prev_cpu_idle); ++ j_dbs_info->prev_cpu_idle = cur_idle_time; ++ ++ if (unlikely(!wall_time || wall_time < idle_time)) ++ continue; ++ ++ /* load is the percentage of time not spent in idle */ ++ load = 100 * (wall_time - idle_time) / wall_time; ++ ++ /* keep track of combined load across all CPUs */ ++ total_load += load; ++ ++ /* keep track of highest single load across all CPUs */ ++ if (load > max_load) ++ max_load = load; ++ } ++ ++ /* calculate the average load across all related CPUs */ ++ avg_load = total_load / num_online_cpus(); ++ ++ ++ /* ++ * hotplug load accounting ++ * average load over multiple sampling periods ++ */ ++ ++ /* how many sampling periods do we use for hotplug decisions? */ ++ periods = max(dbs_tuners_ins.hotplug_in_sampling_periods, ++ dbs_tuners_ins.hotplug_out_sampling_periods); ++ ++ /* store avg_load in the circular buffer */ ++ dbs_tuners_ins.hotplug_load_history[dbs_tuners_ins.hotplug_load_index] ++ = avg_load; ++ ++ /* compute average load across in & out sampling periods */ ++ for (i = 0, j = dbs_tuners_ins.hotplug_load_index; ++ i < periods; i++, j--) { ++ if (i < dbs_tuners_ins.hotplug_in_sampling_periods) ++ hotplug_in_avg_load += ++ dbs_tuners_ins.hotplug_load_history[j]; ++ if (i < dbs_tuners_ins.hotplug_out_sampling_periods) ++ hotplug_out_avg_load += ++ dbs_tuners_ins.hotplug_load_history[j]; ++ ++ if (j == 0) ++ j = periods; ++ } ++ ++ hotplug_in_avg_load = hotplug_in_avg_load / ++ dbs_tuners_ins.hotplug_in_sampling_periods; ++ ++ hotplug_out_avg_load = hotplug_out_avg_load / ++ dbs_tuners_ins.hotplug_out_sampling_periods; ++ ++ /* return to first element if we're at the circular buffer's end */ ++ if (++dbs_tuners_ins.hotplug_load_index == periods) ++ dbs_tuners_ins.hotplug_load_index = 0; ++ ++ /* check for frequency increase */ ++ if (avg_load > dbs_tuners_ins.up_threshold) { ++ /* should we enable auxillary CPUs? */ ++ if (num_online_cpus() < 2 && hotplug_in_avg_load > ++ dbs_tuners_ins.up_threshold) { ++ /* hotplug with cpufreq is nasty ++ * a call to cpufreq_governor_dbs may cause a lockup. ++ * wq is not running here so its safe. ++ */ ++ mutex_unlock(&this_dbs_info->timer_mutex); ++ cpu_up(1); ++ mutex_lock(&this_dbs_info->timer_mutex); ++ goto out; ++ } ++ ++ /* increase to highest frequency supported */ ++ if (policy->cur < policy->max) ++ __cpufreq_driver_target(policy, policy->max, ++ CPUFREQ_RELATION_H); ++ ++ goto out; ++ } ++ ++ /* check for frequency decrease */ ++ if (avg_load < dbs_tuners_ins.down_threshold) { ++ /* are we at the minimum frequency already? */ ++ if (policy->cur == policy->min) { ++ /* should we disable auxillary CPUs? */ ++ if (num_online_cpus() > 1 && hotplug_out_avg_load < ++ dbs_tuners_ins.down_threshold) { ++ mutex_unlock(&this_dbs_info->timer_mutex); ++ cpu_down(1); ++ mutex_lock(&this_dbs_info->timer_mutex); ++ } ++ goto out; ++ } ++ ++ /* bump down to the next lowest frequency in the table */ ++ if (cpufreq_frequency_table_next_lowest(policy, ++ this_dbs_info->freq_table, &index)) { ++ pr_err("%s: failed to get next lowest frequency\n", ++ __func__); ++ goto out; ++ } ++ ++ __cpufreq_driver_target(policy, ++ this_dbs_info->freq_table[index].frequency, ++ CPUFREQ_RELATION_L); ++ } ++out: ++ return; ++} ++ ++static void do_dbs_timer(struct work_struct *work) ++{ ++ struct cpu_dbs_info_s *dbs_info = ++ container_of(work, struct cpu_dbs_info_s, work.work); ++ unsigned int cpu = dbs_info->cpu; ++ ++ /* We want all related CPUs to do sampling nearly on same jiffy */ ++ int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate); ++ ++ mutex_lock(&dbs_info->timer_mutex); ++ dbs_check_cpu(dbs_info); ++ queue_delayed_work_on(cpu, khotplug_wq, &dbs_info->work, delay); ++ mutex_unlock(&dbs_info->timer_mutex); ++} ++ ++static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info) ++{ ++ /* We want all related CPUs to do sampling nearly on same jiffy */ ++ int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate); ++ delay -= jiffies % delay; ++ ++ INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer); ++ queue_delayed_work_on(dbs_info->cpu, khotplug_wq, &dbs_info->work, ++ delay); ++} ++ ++static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info) ++{ ++ cancel_delayed_work_sync(&dbs_info->work); ++} ++ ++static int cpufreq_governor_dbs(struct cpufreq_policy *policy, ++ unsigned int event) ++{ ++ unsigned int cpu = policy->cpu; ++ struct cpu_dbs_info_s *this_dbs_info; ++ unsigned int i, j, max_periods; ++ int rc; ++ ++ this_dbs_info = &per_cpu(hp_cpu_dbs_info, cpu); ++ ++ switch (event) { ++ case CPUFREQ_GOV_START: ++ if ((!cpu_online(cpu)) || (!policy->cur)) ++ return -EINVAL; ++ ++ mutex_lock(&dbs_mutex); ++ dbs_enable++; ++ for_each_cpu(j, policy->cpus) { ++ struct cpu_dbs_info_s *j_dbs_info; ++ j_dbs_info = &per_cpu(hp_cpu_dbs_info, j); ++ j_dbs_info->cur_policy = policy; ++ ++ j_dbs_info->prev_cpu_idle = get_cpu_idle_time(j, ++ &j_dbs_info->prev_cpu_wall); ++ if (dbs_tuners_ins.ignore_nice) { ++ j_dbs_info->prev_cpu_nice = ++ kstat_cpu(j).cpustat.nice; ++ } ++ ++ max_periods = max(DEFAULT_HOTPLUG_IN_SAMPLING_PERIODS, ++ DEFAULT_HOTPLUG_OUT_SAMPLING_PERIODS); ++ dbs_tuners_ins.hotplug_load_history = kmalloc( ++ (sizeof(unsigned int) * max_periods), ++ GFP_KERNEL); ++ if (!dbs_tuners_ins.hotplug_load_history) { ++ WARN_ON(1); ++ return -ENOMEM; ++ } ++ for (i = 0; i < max_periods; i++) ++ dbs_tuners_ins.hotplug_load_history[i] = 50; ++ } ++ this_dbs_info->cpu = cpu; ++ this_dbs_info->freq_table = cpufreq_frequency_get_table(cpu); ++ /* ++ * Start the timerschedule work, when this governor ++ * is used for first time ++ */ ++ if (dbs_enable == 1) { ++ rc = sysfs_create_group(cpufreq_global_kobject, ++ &dbs_attr_group); ++ if (rc) { ++ mutex_unlock(&dbs_mutex); ++ return rc; ++ } ++ } ++ mutex_unlock(&dbs_mutex); ++ ++ mutex_init(&this_dbs_info->timer_mutex); ++ dbs_timer_init(this_dbs_info); ++ break; ++ ++ case CPUFREQ_GOV_STOP: ++ dbs_timer_exit(this_dbs_info); ++ ++ mutex_lock(&dbs_mutex); ++ mutex_destroy(&this_dbs_info->timer_mutex); ++ dbs_enable--; ++ mutex_unlock(&dbs_mutex); ++ if (!dbs_enable) ++ sysfs_remove_group(cpufreq_global_kobject, ++ &dbs_attr_group); ++ kfree(dbs_tuners_ins.hotplug_load_history); ++ /* ++ * XXX BIG CAVEAT: Stopping the governor with CPU1 offline ++ * will result in it remaining offline until the user onlines ++ * it again. It is up to the user to do this (for now). ++ */ ++ break; ++ ++ case CPUFREQ_GOV_LIMITS: ++ mutex_lock(&this_dbs_info->timer_mutex); ++ if (policy->max < this_dbs_info->cur_policy->cur) ++ __cpufreq_driver_target(this_dbs_info->cur_policy, ++ policy->max, CPUFREQ_RELATION_H); ++ else if (policy->min > this_dbs_info->cur_policy->cur) ++ __cpufreq_driver_target(this_dbs_info->cur_policy, ++ policy->min, CPUFREQ_RELATION_L); ++ mutex_unlock(&this_dbs_info->timer_mutex); ++ break; ++ } ++ return 0; ++} ++ ++static int __init cpufreq_gov_dbs_init(void) ++{ ++ int err; ++ cputime64_t wall; ++ u64 idle_time; ++ int cpu = get_cpu(); ++ ++ idle_time = get_cpu_idle_time_us(cpu, &wall); ++ put_cpu(); ++ if (idle_time != -1ULL) { ++ dbs_tuners_ins.up_threshold = DEFAULT_UP_FREQ_MIN_LOAD; ++ } else { ++ pr_err("cpufreq-hotplug: %s: assumes CONFIG_NO_HZ\n", ++ __func__); ++ return -EINVAL; ++ } ++ ++ khotplug_wq = create_workqueue("khotplug"); ++ if (!khotplug_wq) { ++ pr_err("Creation of khotplug failed\n"); ++ return -EFAULT; ++ } ++ err = cpufreq_register_governor(&cpufreq_gov_hotplug); ++ if (err) ++ destroy_workqueue(khotplug_wq); ++ ++ return err; ++} ++ ++static void __exit cpufreq_gov_dbs_exit(void) ++{ ++ cpufreq_unregister_governor(&cpufreq_gov_hotplug); ++ destroy_workqueue(khotplug_wq); ++} ++ ++MODULE_AUTHOR("Mike Turquette "); ++MODULE_DESCRIPTION("'cpufreq_hotplug' - cpufreq governor for dynamic frequency scaling and CPU hotplugging"); ++MODULE_LICENSE("GPL"); ++ ++#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG ++fs_initcall(cpufreq_gov_dbs_init); ++#else ++module_init(cpufreq_gov_dbs_init); ++#endif ++module_exit(cpufreq_gov_dbs_exit); +diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h +index a38fca8..6cbc3df 100644 +--- a/include/linux/cpufreq.h ++++ b/include/linux/cpufreq.h +@@ -355,6 +355,9 @@ extern struct cpufreq_governor cpufreq_gov_ondemand; + #elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE) + extern struct cpufreq_governor cpufreq_gov_conservative; + #define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_conservative) ++#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG) ++extern struct cpufreq_governor cpufreq_gov_hotplug; ++#define CPUFREQ_DEFAULT_GOVERNOR (&cpufreq_gov_hotplug) + #endif + + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0001-OMAP-CPUfreq-ensure-driver-initializes-after-cpufreq.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0001-OMAP-CPUfreq-ensure-driver-initializes-after-cpufreq.patch new file mode 100644 index 0000000000..5093df3d26 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0001-OMAP-CPUfreq-ensure-driver-initializes-after-cpufreq.patch @@ -0,0 +1,27 @@ +From 2a72620933492b6be114a287e7188c47ee1f6844 Mon Sep 17 00:00:00 2001 +From: Peter 'p2' De Schrijver +Date: Wed, 11 Aug 2010 17:02:43 -0700 +Subject: [PATCH 1/8] OMAP: CPUfreq: ensure driver initializes after cpufreq framework and governors + +Signed-off-by: Peter 'p2' De Schrijver +Signed-off-by: Kevin Hilman +--- + arch/arm/plat-omap/cpu-omap.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c +index da4f68d..cd09d4b 100644 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ b/arch/arm/plat-omap/cpu-omap.c +@@ -160,7 +160,7 @@ static int __init omap_cpufreq_init(void) + return cpufreq_register_driver(&omap_driver); + } + +-arch_initcall(omap_cpufreq_init); ++late_initcall(omap_cpufreq_init); + + /* + * if ever we want to remove this, upon cleanup call: +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0002-OMAP-CPUfreq-ensure-policy-is-fully-initialized.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0002-OMAP-CPUfreq-ensure-policy-is-fully-initialized.patch new file mode 100644 index 0000000000..5ef85b55b1 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0002-OMAP-CPUfreq-ensure-policy-is-fully-initialized.patch @@ -0,0 +1,31 @@ +From ec7b7d1f27887ec5d76a2d4175e54cedcfa379da Mon Sep 17 00:00:00 2001 +From: Kevin Hilman +Date: Wed, 11 Aug 2010 17:05:38 -0700 +Subject: [PATCH 2/8] OMAP: CPUfreq: ensure policy is fully initialized + +Ensure policy min/max/cur values are initialized when OMAP +CPUfreq driver starts. + +Signed-off-by: Kevin Hilman +--- + arch/arm/plat-omap/cpu-omap.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c +index cd09d4b..1b36664 100644 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ b/arch/arm/plat-omap/cpu-omap.c +@@ -126,6 +126,10 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + VERY_HI_RATE) / 1000; + } + ++ policy->min = policy->cpuinfo.min_freq; ++ policy->max = policy->cpuinfo.max_freq; ++ policy->cur = omap_getspeed(0); ++ + /* FIXME: what's the actual transition time? */ + policy->cpuinfo.transition_latency = 300 * 1000; + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0003-OMAP3-PM-CPUFreq-driver-for-OMAP3.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0003-OMAP3-PM-CPUFreq-driver-for-OMAP3.patch new file mode 100644 index 0000000000..8593ee4de1 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0003-OMAP3-PM-CPUFreq-driver-for-OMAP3.patch @@ -0,0 +1,263 @@ +From 5f6e9a6011a5eedc51fc8157fffcae5b7fdf87e7 Mon Sep 17 00:00:00 2001 +From: Rajendra Nayak +Date: Mon, 10 Nov 2008 17:00:25 +0530 +Subject: [PATCH 3/8] OMAP3 PM: CPUFreq driver for OMAP3 + +CPUFreq driver for OMAP3 + +With additional fixes and cleanups from Tero Kristo: +- Fix rate calculation bug in omap3_select_table_rate +- Refreshed DVFS VDD1 control against latest clock fw + +Signed-off-by: Tero Kristo +Signed-off-by: Rajendra Nayak + +OMAP3: PM: CPUFreq: Fix omap_getspeed. + +Signed-off-by: Peter 'p2' De Schrijver + +Make sure omap cpufreq driver initializes after cpufreq framework and governors + +Signed-off-by: Peter 'p2' De Schrijver + +merge: CPUFreq: remove obsolete funcs + +OMAP3 clock: Update cpufreq driver + +This patch removes all refrences to virtual clock +nodes in CPUFreq driver. + +Signed-off-by: Rajendra Nayak +Signed-off-by: Tero Kristo +Signed-off-by: Jean Pihet + +PM: Prevent direct cpufreq scaling during initialization + +It is seen that the OMAP specific cpufreq initialization code tries to +scale the MPU frequency to the highest possible without taking care of +the voltage level. On power on reset the power IC does not provide the +necessary voltage for the highest available MPU frequency (that would +satisfy all Si families). This potentially is an window of opportunity +for things to go wrong. + +Signed-off-by: Romit Dasgupta +Signed-off-by: Kevin Hilman + +OMAP3: PM: enable 600MHz (overdrive) OPP + +Signed-off-by: Kevin Hilman + +omap3: introduce cpufreq + +OMAP OPP layer functions now have dependencies of CONFIG_CPU_FREQ only. + +With this patch, omap opp layer now has its compilation flags +bound to CONFIG_CPU_FREQ. Also its code has been removed from pm34xx.c. + +A new file has been created to contain cpu freq code related to +OMAP3: cpufreq34xx.c + +OMAP34xx and OMAP36xx family OPPs are made available + +Signed-off-by: Eduardo Valentin +Signed-off-by: Paul Walmsley +Signed-off-by: Nishanth Menon +Signed-off-by: Vishwanath BS +Signed-off-by: Kevin Hilman +Signed-off-by: Romit Dasgupta +Signed-off-by: Rajendra Nayak + +omap3: cpufreq: allow default opp table init + +For board files which choose to override the defaults, the existing +mechanism will work, for boards that would like to work with defaults, +allow init_common_hw to call init_opp_table to initialize if not +already initialized. this will allow all omap boards which have opp +tables predefined for a silicon to use the same. + +Originally reported for overo: +http://marc.info/?t=127265269400004&r=1&w=2 + +Signed-off-by: Nishanth Menon +Reported-by: Peter Tseng +Cc: Cliff Brake +Cc: Kevin Hilman + +OMAP2: update OPP data to be device based + +Cc: Nishanth Menon +Signed-off-by: Kevin Hilman + +OMAP3: CPUfreq: update to device-based OPP API + +Update usage of OPP API to use new device-based API. This requires +getting the 'struct device' for the MPU and using that with the OPP +API. + +Signed-off-by: Kevin Hilman + +omap3: opp: make independent of cpufreq + +Make opp3xx data which is registered with the opp layer +dependent purely on CONFIG_PM as opp layer and pm.c users +are CONFIG_PM dependent not cpufreq dependent. +so we rename the data definition to opp3xxx_data.c (inline with what +we have for omap2), also move the build definition to be under +the existing CONFIG_PM build instead of CPUFREQ. + +Cc: Eduardo Valentin +Cc: Kevin Hilman +Cc: Paul Walmsley +Cc: Rajendra Nayak +Cc: Sanjeev Premi +Cc: Thara Gopinath +Cc: Tony Lindgren + +Signed-off-by: Nishanth Menon +--- + arch/arm/mach-omap2/clock.h | 14 +++++++++++++- + arch/arm/mach-omap2/clock34xx.c | 2 ++ + arch/arm/plat-omap/cpu-omap.c | 34 +++++++++++++++++++++++++++++++--- + 3 files changed, 46 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h +index e10ff2b..0a07e50 100644 +--- a/arch/arm/mach-omap2/clock.h ++++ b/arch/arm/mach-omap2/clock.h +@@ -141,7 +141,9 @@ extern const struct clksel_rate gpt_sys_rates[]; + extern const struct clksel_rate gfx_l3_rates[]; + extern const struct clksel_rate dsp_ick_rates[]; + +-#if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_CPU_FREQ) ++#ifdef CONFIG_CPU_FREQ ++ ++#ifdef CONFIG_ARCH_OMAP2 + extern void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table); + extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table); + #else +@@ -149,6 +151,16 @@ extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table) + #define omap2_clk_exit_cpufreq_table 0 + #endif + ++#ifdef CONFIG_ARCH_OMAP3 ++extern void omap3_clk_init_cpufreq_table(struct cpufreq_frequency_table **table); ++extern void omap3_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table); ++#else ++#define omap3_clk_init_cpufreq_table 0 ++#define omap3_clk_exit_cpufreq_table 0 ++#endif ++ ++#endif /* CONFIG_CPU_FREQ */ ++ + extern const struct clkops clkops_omap2_iclk_dflt_wait; + extern const struct clkops clkops_omap2_iclk_dflt; + extern const struct clkops clkops_omap2_iclk_idle_only; +diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c +index 1fc96b9..119e135 100644 +--- a/arch/arm/mach-omap2/clock34xx.c ++++ b/arch/arm/mach-omap2/clock34xx.c +@@ -20,6 +20,8 @@ + #include + #include + #include ++#include ++#include + + #include + +diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c +index 1b36664..f0f9430 100644 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ b/arch/arm/plat-omap/cpu-omap.c +@@ -8,6 +8,10 @@ + * + * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King + * ++ * Copyright (C) 2007-2008 Texas Instruments, Inc. ++ * Updated to support OMAP3 ++ * Rajendra Nayak ++ * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. +@@ -26,12 +30,19 @@ + #include + #include + ++#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) ++#include ++#include ++#endif ++ + #define VERY_HI_RATE 900000000 + + static struct cpufreq_frequency_table *freq_table; + + #ifdef CONFIG_ARCH_OMAP1 + #define MPU_CLK "mpu" ++#elif CONFIG_ARCH_OMAP3 ++#define MPU_CLK "arm_fck" + #else + #define MPU_CLK "virt_prcm_set" + #endif +@@ -73,7 +84,13 @@ static int omap_target(struct cpufreq_policy *policy, + unsigned int target_freq, + unsigned int relation) + { ++#ifdef CONFIG_ARCH_OMAP1 + struct cpufreq_freqs freqs; ++#endif ++#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) ++ unsigned long freq; ++ struct device *mpu_dev = omap2_get_mpuss_device(); ++#endif + int ret = 0; + + /* Ensure desired rate is within allowed range. Some govenors +@@ -83,13 +100,13 @@ static int omap_target(struct cpufreq_policy *policy, + if (target_freq > policy->max) + target_freq = policy->max; + ++#ifdef CONFIG_ARCH_OMAP1 + freqs.old = omap_getspeed(0); + freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; + freqs.cpu = 0; + + if (freqs.old == freqs.new) + return ret; +- + cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); + #ifdef CONFIG_CPU_FREQ_DEBUG + printk(KERN_DEBUG "cpufreq-omap: transition: %u --> %u\n", +@@ -97,7 +114,11 @@ static int omap_target(struct cpufreq_policy *policy, + #endif + ret = clk_set_rate(mpu_clk, freqs.new * 1000); + cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); +- ++#elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) ++ freq = target_freq * 1000; ++ if (opp_find_freq_ceil(mpu_dev, &freq)) ++ omap_pm_cpu_set_freq(freq); ++#endif + return ret; + } + +@@ -114,7 +135,14 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + + policy->cur = policy->min = policy->max = omap_getspeed(0); + +- clk_init_cpufreq_table(&freq_table); ++ if (!cpu_is_omap34xx()) { ++ clk_init_cpufreq_table(&freq_table); ++ } else { ++ struct device *mpu_dev = omap2_get_mpuss_device(); ++ ++ opp_init_cpufreq_table(mpu_dev, &freq_table); ++ } ++ + if (freq_table) { + result = cpufreq_frequency_table_cpuinfo(policy, freq_table); + if (!result) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0004-OMAP-PM-CPUFREQ-Fix-conditional-compilation.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0004-OMAP-PM-CPUFREQ-Fix-conditional-compilation.patch new file mode 100644 index 0000000000..aa9cd48515 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0004-OMAP-PM-CPUFREQ-Fix-conditional-compilation.patch @@ -0,0 +1,32 @@ +From 1f013ab3b839edb583a276b5591a744dc4308bf8 Mon Sep 17 00:00:00 2001 +From: Silesh C V +Date: Wed, 29 Sep 2010 14:52:54 +0530 +Subject: [PATCH 4/8] OMAP: PM: CPUFREQ: Fix conditional compilation + +Fix conditional compilation. A conditional expresiion +should follow "#elif", in this case #elif clause should +check whether CONFIG_ARCH_OMAP3 is defined or not +(ie. defined(CONFIG_ARCH_OMAP3)) rather than checking for +the value of the macro. + +Signed-off-by: Silesh C V +--- + arch/arm/plat-omap/cpu-omap.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c +index f0f9430..c3ac065 100644 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ b/arch/arm/plat-omap/cpu-omap.c +@@ -41,7 +41,7 @@ static struct cpufreq_frequency_table *freq_table; + + #ifdef CONFIG_ARCH_OMAP1 + #define MPU_CLK "mpu" +-#elif CONFIG_ARCH_OMAP3 ++#elif defined(CONFIG_ARCH_OMAP3) + #define MPU_CLK "arm_fck" + #else + #define MPU_CLK "virt_prcm_set" +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0005-cpufreq-fixup-after-new-OPP-layer-merged.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0005-cpufreq-fixup-after-new-OPP-layer-merged.patch new file mode 100644 index 0000000000..f3432a2c33 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0005-cpufreq-fixup-after-new-OPP-layer-merged.patch @@ -0,0 +1,33 @@ +From 43e22afa61f3624628c8344bcae9e95f0cc8525a Mon Sep 17 00:00:00 2001 +From: Kevin Hilman +Date: Tue, 16 Nov 2010 11:48:41 -0800 +Subject: [PATCH 5/8] cpufreq: fixup after new OPP layer merged + +--- + arch/arm/plat-omap/cpu-omap.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c +index c3ac065..9cd2709 100644 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ b/arch/arm/plat-omap/cpu-omap.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -32,7 +33,7 @@ + + #if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) + #include +-#include ++#include + #endif + + #define VERY_HI_RATE 900000000 +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0006-OMAP-cpufreq-Split-OMAP1-and-OMAP2PLUS-CPUfreq-drive.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0006-OMAP-cpufreq-Split-OMAP1-and-OMAP2PLUS-CPUfreq-drive.patch new file mode 100644 index 0000000000..cf80cb7928 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0006-OMAP-cpufreq-Split-OMAP1-and-OMAP2PLUS-CPUfreq-drive.patch @@ -0,0 +1,669 @@ +From 2a3ca1bc3f842bab22873e2d9d002e0a736d0f19 Mon Sep 17 00:00:00 2001 +From: Santosh Shilimkar +Date: Mon, 14 Mar 2011 17:08:48 +0530 +Subject: [PATCH 6/8] OMAP: cpufreq: Split OMAP1 and OMAP2PLUS CPUfreq drivers. + +This patch is an attempt to cleanup the #ifdeferry in the +omap CPUfreq drivers. + +The split betwenn OMAP1 and OMAP2PLUS is logical because + - OMAP1 doesn't support opp layer. + - OMAP1 build is seperate from omap2plus. + +Signed-off-by: Santosh Shilimkar +Cc: Kevin Hilman +Cc: Vishwanath BS +--- + arch/arm/mach-omap1/Makefile | 3 + + arch/arm/mach-omap1/omap1-cpufreq.c | 176 ++++++++++++++++++++++++++ + arch/arm/mach-omap2/Makefile | 3 + + arch/arm/mach-omap2/omap2plus-cpufreq.c | 201 ++++++++++++++++++++++++++++++ + arch/arm/plat-omap/Makefile | 1 - + arch/arm/plat-omap/cpu-omap.c | 204 ------------------------------- + 6 files changed, 383 insertions(+), 205 deletions(-) + create mode 100644 arch/arm/mach-omap1/omap1-cpufreq.c + create mode 100644 arch/arm/mach-omap2/omap2plus-cpufreq.c + delete mode 100644 arch/arm/plat-omap/cpu-omap.c + +diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile +index af98117..e5082b0 100644 +--- a/arch/arm/mach-omap1/Makefile ++++ b/arch/arm/mach-omap1/Makefile +@@ -10,6 +10,9 @@ obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o + + obj-$(CONFIG_OMAP_32K_TIMER) += timer32k.o + ++# CPUFREQ driver ++obj-$(CONFIG_CPU_FREQ) += omap1-cpufreq.o ++ + # Power Management + obj-$(CONFIG_PM) += pm.o sleep.o pm_bus.o + +diff --git a/arch/arm/mach-omap1/omap1-cpufreq.c b/arch/arm/mach-omap1/omap1-cpufreq.c +new file mode 100644 +index 0000000..682cdc8 +--- /dev/null ++++ b/arch/arm/mach-omap1/omap1-cpufreq.c +@@ -0,0 +1,176 @@ ++/* ++ * OMAP1 cpufreq driver ++ * ++ * CPU frequency scaling for OMAP ++ * ++ * Copyright (C) 2005 Nokia Corporation ++ * Written by Tony Lindgren ++ * ++ * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King ++ * ++ * Copyright (C) 2007-2008 Texas Instruments, Inc. ++ * Updated to support OMAP3 ++ * Rajendra Nayak ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++#include ++ ++#include ++ ++#define VERY_HI_RATE 900000000 ++ ++static struct cpufreq_frequency_table *freq_table; ++static struct clk *mpu_clk; ++ ++static int omap_verify_speed(struct cpufreq_policy *policy) ++{ ++ if (freq_table) ++ return cpufreq_frequency_table_verify(policy, freq_table); ++ ++ if (policy->cpu) ++ return -EINVAL; ++ ++ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, ++ policy->cpuinfo.max_freq); ++ ++ policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; ++ policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000; ++ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, ++ policy->cpuinfo.max_freq); ++ return 0; ++} ++ ++static unsigned int omap_getspeed(unsigned int cpu) ++{ ++ unsigned long rate; ++ ++ if (cpu) ++ return 0; ++ ++ rate = clk_get_rate(mpu_clk) / 1000; ++ return rate; ++} ++ ++static int omap_target(struct cpufreq_policy *policy, ++ unsigned int target_freq, ++ unsigned int relation) ++{ ++ struct cpufreq_freqs freqs; ++ int ret = 0; ++ ++ /* Ensure desired rate is within allowed range. Some govenors ++ * (ondemand) will just pass target_freq=0 to get the minimum. */ ++ if (target_freq < policy->min) ++ target_freq = policy->min; ++ if (target_freq > policy->max) ++ target_freq = policy->max; ++ ++ freqs.old = omap_getspeed(0); ++ freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; ++ freqs.cpu = 0; ++ ++ if (freqs.old == freqs.new) ++ return ret; ++ ++ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); ++ ++#ifdef CONFIG_CPU_FREQ_DEBUG ++ pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old, freqs.new); ++#endif ++ ret = clk_set_rate(mpu_clk, freqs.new * 1000); ++ ++ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); ++ ++ return ret; ++} ++ ++static int __init omap_cpu_init(struct cpufreq_policy *policy) ++{ ++ int result = 0; ++ ++ mpu_clk = clk_get(NULL, "mpu"); ++ if (IS_ERR(mpu_clk)) ++ return PTR_ERR(mpu_clk); ++ ++ if (policy->cpu != 0) ++ return -EINVAL; ++ ++ policy->cur = policy->min = policy->max = omap_getspeed(0); ++ ++ clk_init_cpufreq_table(&freq_table); ++ ++ if (freq_table) { ++ result = cpufreq_frequency_table_cpuinfo(policy, freq_table); ++ if (!result) ++ cpufreq_frequency_table_get_attr(freq_table, ++ policy->cpu); ++ } else { ++ policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; ++ policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, ++ VERY_HI_RATE) / 1000; ++ } ++ ++ policy->min = policy->cpuinfo.min_freq; ++ policy->max = policy->cpuinfo.max_freq; ++ policy->cur = omap_getspeed(0); ++ ++ /* FIXME: what's the actual transition time? */ ++ policy->cpuinfo.transition_latency = 300 * 1000; ++ ++ return 0; ++} ++ ++static int omap_cpu_exit(struct cpufreq_policy *policy) ++{ ++ clk_exit_cpufreq_table(&freq_table); ++ clk_put(mpu_clk); ++ return 0; ++} ++ ++static struct freq_attr *omap_cpufreq_attr[] = { ++ &cpufreq_freq_attr_scaling_available_freqs, ++ NULL, ++}; ++ ++static struct cpufreq_driver omap_driver = { ++ .flags = CPUFREQ_STICKY, ++ .verify = omap_verify_speed, ++ .target = omap_target, ++ .get = omap_getspeed, ++ .init = omap_cpu_init, ++ .exit = omap_cpu_exit, ++ .name = "omap1", ++ .attr = omap_cpufreq_attr, ++}; ++ ++static int __init omap_cpufreq_init(void) ++{ ++ return cpufreq_register_driver(&omap_driver); ++} ++ ++static void __exit omap_cpufreq_exit(void) ++{ ++ cpufreq_unregister_driver(&omap_driver); ++} ++ ++MODULE_DESCRIPTION("cpufreq driver for OMAP1 SOCs"); ++MODULE_LICENSE("GPL"); ++module_init(omap_cpufreq_init); ++module_exit(omap_cpufreq_exit); +diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile +index 512b152..42924f3 100644 +--- a/arch/arm/mach-omap2/Makefile ++++ b/arch/arm/mach-omap2/Makefile +@@ -56,6 +56,9 @@ obj-$(CONFIG_ARCH_OMAP3) += opp3xxx_data.o + obj-$(CONFIG_ARCH_OMAP4) += opp4xxx_data.o + endif + ++# CPUFREQ driver ++obj-$(CONFIG_CPU_FREQ) += omap2plus-cpufreq.o ++ + # Power Management + ifeq ($(CONFIG_PM),y) + obj-$(CONFIG_ARCH_OMAP2) += pm24xx.o +diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c +new file mode 100644 +index 0000000..14f84cc +--- /dev/null ++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c +@@ -0,0 +1,201 @@ ++/* ++ * OMAP2PLUS cpufreq driver ++ * ++ * CPU frequency scaling for OMAP ++ * ++ * Copyright (C) 2005 Nokia Corporation ++ * Written by Tony Lindgren ++ * ++ * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King ++ * ++ * Copyright (C) 2007-2008 Texas Instruments, Inc. ++ * Updated to support OMAP3 ++ * Rajendra Nayak ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++ ++#include ++#include ++#include ++ ++#include ++ ++#define VERY_HI_RATE 900000000 ++ ++static struct cpufreq_frequency_table *freq_table; ++static struct clk *mpu_clk; ++ ++static int omap_verify_speed(struct cpufreq_policy *policy) ++{ ++ if (freq_table) ++ return cpufreq_frequency_table_verify(policy, freq_table); ++ ++ if (policy->cpu) ++ return -EINVAL; ++ ++ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, ++ policy->cpuinfo.max_freq); ++ ++ policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; ++ policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000; ++ cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, ++ policy->cpuinfo.max_freq); ++ return 0; ++} ++ ++static unsigned int omap_getspeed(unsigned int cpu) ++{ ++ unsigned long rate; ++ ++ if (cpu) ++ return 0; ++ ++ rate = clk_get_rate(mpu_clk) / 1000; ++ return rate; ++} ++ ++static int omap_target(struct cpufreq_policy *policy, ++ unsigned int target_freq, ++ unsigned int relation) ++{ ++ int ret = 0; ++ struct cpufreq_freqs freqs; ++ ++ /* Ensure desired rate is within allowed range. Some govenors ++ * (ondemand) will just pass target_freq=0 to get the minimum. */ ++ if (target_freq < policy->min) ++ target_freq = policy->min; ++ if (target_freq > policy->max) ++ target_freq = policy->max; ++ ++ freqs.old = omap_getspeed(0); ++ freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; ++ freqs.cpu = 0; ++ ++ if (freqs.old == freqs.new) ++ return ret; ++ ++ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); ++ ++#ifdef CONFIG_CPU_FREQ_DEBUG ++ pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old, freqs.new); ++#endif ++ ++ ret = clk_set_rate(mpu_clk, freqs.new * 1000); ++ ++ /* ++ * Generic CPUFREQ driver jiffy update is under !SMP. So jiffies ++ * won't get updated when UP machine cpufreq build with ++ * CONFIG_SMP enabled. Below code is added only to manage that ++ * scenario ++ */ ++ if (!is_smp()) ++ loops_per_jiffy = ++ cpufreq_scale(loops_per_jiffy, freqs.old, freqs.new); ++ ++ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); ++ ++ return ret; ++} ++ ++static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) ++{ ++ int result = 0; ++ struct device *mpu_dev; ++ ++ if (cpu_is_omap24xx()) ++ mpu_clk = clk_get(NULL, "virt_prcm_set"); ++ else if (cpu_is_omap34xx()) ++ mpu_clk = clk_get(NULL, "dpll1_ck"); ++ else if (cpu_is_omap34xx()) ++ mpu_clk = clk_get(NULL, "dpll_mpu_ck"); ++ ++ if (IS_ERR(mpu_clk)) ++ return PTR_ERR(mpu_clk); ++ ++ if (policy->cpu != 0) ++ return -EINVAL; ++ ++ policy->cur = policy->min = policy->max = omap_getspeed(0); ++ ++ mpu_dev = omap2_get_mpuss_device(); ++ if (!mpu_dev) { ++ pr_warning("%s: unable to get the mpu device\n", __func__); ++ return -EINVAL; ++ } ++ opp_init_cpufreq_table(mpu_dev, &freq_table); ++ ++ if (freq_table) { ++ result = cpufreq_frequency_table_cpuinfo(policy, freq_table); ++ if (!result) ++ cpufreq_frequency_table_get_attr(freq_table, ++ policy->cpu); ++ } else { ++ policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; ++ policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, ++ VERY_HI_RATE) / 1000; ++ } ++ ++ policy->min = policy->cpuinfo.min_freq; ++ policy->max = policy->cpuinfo.max_freq; ++ policy->cur = omap_getspeed(0); ++ ++ /* FIXME: what's the actual transition time? */ ++ policy->cpuinfo.transition_latency = 300 * 1000; ++ ++ return 0; ++} ++ ++static int omap_cpu_exit(struct cpufreq_policy *policy) ++{ ++ clk_exit_cpufreq_table(&freq_table); ++ clk_put(mpu_clk); ++ return 0; ++} ++ ++static struct freq_attr *omap_cpufreq_attr[] = { ++ &cpufreq_freq_attr_scaling_available_freqs, ++ NULL, ++}; ++ ++static struct cpufreq_driver omap_driver = { ++ .flags = CPUFREQ_STICKY, ++ .verify = omap_verify_speed, ++ .target = omap_target, ++ .get = omap_getspeed, ++ .init = omap_cpu_init, ++ .exit = omap_cpu_exit, ++ .name = "omap2plus", ++ .attr = omap_cpufreq_attr, ++}; ++ ++static int __init omap_cpufreq_init(void) ++{ ++ return cpufreq_register_driver(&omap_driver); ++} ++ ++static void __exit omap_cpufreq_exit(void) ++{ ++ cpufreq_unregister_driver(&omap_driver); ++} ++ ++MODULE_DESCRIPTION("cpufreq driver for OMAP2PLUS SOCs"); ++MODULE_LICENSE("GPL"); ++module_init(omap_cpufreq_init); ++module_exit(omap_cpufreq_exit); +diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile +index a4a1285..ec7862e 100644 +--- a/arch/arm/plat-omap/Makefile ++++ b/arch/arm/plat-omap/Makefile +@@ -21,7 +21,6 @@ obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o + obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o + obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-debug.o + +-obj-$(CONFIG_CPU_FREQ) += cpu-omap.o + obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o + obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o + obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o +diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c +deleted file mode 100644 +index 9cd2709..0000000 +--- a/arch/arm/plat-omap/cpu-omap.c ++++ /dev/null +@@ -1,204 +0,0 @@ +-/* +- * linux/arch/arm/plat-omap/cpu-omap.c +- * +- * CPU frequency scaling for OMAP +- * +- * Copyright (C) 2005 Nokia Corporation +- * Written by Tony Lindgren +- * +- * Based on cpu-sa1110.c, Copyright (C) 2001 Russell King +- * +- * Copyright (C) 2007-2008 Texas Instruments, Inc. +- * Updated to support OMAP3 +- * Rajendra Nayak +- * +- * This program is free software; you can redistribute it and/or modify +- * it under the terms of the GNU General Public License version 2 as +- * published by the Free Software Foundation. +- */ +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +- +-#include +-#include +-#include +- +-#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) +-#include +-#include +-#endif +- +-#define VERY_HI_RATE 900000000 +- +-static struct cpufreq_frequency_table *freq_table; +- +-#ifdef CONFIG_ARCH_OMAP1 +-#define MPU_CLK "mpu" +-#elif defined(CONFIG_ARCH_OMAP3) +-#define MPU_CLK "arm_fck" +-#else +-#define MPU_CLK "virt_prcm_set" +-#endif +- +-static struct clk *mpu_clk; +- +-/* TODO: Add support for SDRAM timing changes */ +- +-static int omap_verify_speed(struct cpufreq_policy *policy) +-{ +- if (freq_table) +- return cpufreq_frequency_table_verify(policy, freq_table); +- +- if (policy->cpu) +- return -EINVAL; +- +- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, +- policy->cpuinfo.max_freq); +- +- policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; +- policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000; +- cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, +- policy->cpuinfo.max_freq); +- return 0; +-} +- +-static unsigned int omap_getspeed(unsigned int cpu) +-{ +- unsigned long rate; +- +- if (cpu) +- return 0; +- +- rate = clk_get_rate(mpu_clk) / 1000; +- return rate; +-} +- +-static int omap_target(struct cpufreq_policy *policy, +- unsigned int target_freq, +- unsigned int relation) +-{ +-#ifdef CONFIG_ARCH_OMAP1 +- struct cpufreq_freqs freqs; +-#endif +-#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) +- unsigned long freq; +- struct device *mpu_dev = omap2_get_mpuss_device(); +-#endif +- int ret = 0; +- +- /* Ensure desired rate is within allowed range. Some govenors +- * (ondemand) will just pass target_freq=0 to get the minimum. */ +- if (target_freq < policy->min) +- target_freq = policy->min; +- if (target_freq > policy->max) +- target_freq = policy->max; +- +-#ifdef CONFIG_ARCH_OMAP1 +- freqs.old = omap_getspeed(0); +- freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; +- freqs.cpu = 0; +- +- if (freqs.old == freqs.new) +- return ret; +- cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); +-#ifdef CONFIG_CPU_FREQ_DEBUG +- printk(KERN_DEBUG "cpufreq-omap: transition: %u --> %u\n", +- freqs.old, freqs.new); +-#endif +- ret = clk_set_rate(mpu_clk, freqs.new * 1000); +- cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); +-#elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE) +- freq = target_freq * 1000; +- if (opp_find_freq_ceil(mpu_dev, &freq)) +- omap_pm_cpu_set_freq(freq); +-#endif +- return ret; +-} +- +-static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) +-{ +- int result = 0; +- +- mpu_clk = clk_get(NULL, MPU_CLK); +- if (IS_ERR(mpu_clk)) +- return PTR_ERR(mpu_clk); +- +- if (policy->cpu != 0) +- return -EINVAL; +- +- policy->cur = policy->min = policy->max = omap_getspeed(0); +- +- if (!cpu_is_omap34xx()) { +- clk_init_cpufreq_table(&freq_table); +- } else { +- struct device *mpu_dev = omap2_get_mpuss_device(); +- +- opp_init_cpufreq_table(mpu_dev, &freq_table); +- } +- +- if (freq_table) { +- result = cpufreq_frequency_table_cpuinfo(policy, freq_table); +- if (!result) +- cpufreq_frequency_table_get_attr(freq_table, +- policy->cpu); +- } else { +- policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; +- policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, +- VERY_HI_RATE) / 1000; +- } +- +- policy->min = policy->cpuinfo.min_freq; +- policy->max = policy->cpuinfo.max_freq; +- policy->cur = omap_getspeed(0); +- +- /* FIXME: what's the actual transition time? */ +- policy->cpuinfo.transition_latency = 300 * 1000; +- +- return 0; +-} +- +-static int omap_cpu_exit(struct cpufreq_policy *policy) +-{ +- clk_exit_cpufreq_table(&freq_table); +- clk_put(mpu_clk); +- return 0; +-} +- +-static struct freq_attr *omap_cpufreq_attr[] = { +- &cpufreq_freq_attr_scaling_available_freqs, +- NULL, +-}; +- +-static struct cpufreq_driver omap_driver = { +- .flags = CPUFREQ_STICKY, +- .verify = omap_verify_speed, +- .target = omap_target, +- .get = omap_getspeed, +- .init = omap_cpu_init, +- .exit = omap_cpu_exit, +- .name = "omap", +- .attr = omap_cpufreq_attr, +-}; +- +-static int __init omap_cpufreq_init(void) +-{ +- return cpufreq_register_driver(&omap_driver); +-} +- +-late_initcall(omap_cpufreq_init); +- +-/* +- * if ever we want to remove this, upon cleanup call: +- * +- * cpufreq_unregister_driver() +- * cpufreq_frequency_table_put_attr() +- */ +- +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0007-OMAP2PLUS-cpufreq-Add-SMP-support-to-cater-OMAP4430.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0007-OMAP2PLUS-cpufreq-Add-SMP-support-to-cater-OMAP4430.patch new file mode 100644 index 0000000000..51c1b3ea20 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0007-OMAP2PLUS-cpufreq-Add-SMP-support-to-cater-OMAP4430.patch @@ -0,0 +1,170 @@ +From 7e421930c287f42bed624ad65250c16deaeae50f Mon Sep 17 00:00:00 2001 +From: Santosh Shilimkar +Date: Mon, 14 Mar 2011 17:08:49 +0530 +Subject: [PATCH 7/8] OMAP2PLUS: cpufreq: Add SMP support to cater OMAP4430 + +On OMAP SMP configuartion, both processors share the voltage +and clock. So both CPUs needs to be scaled together and hence +needs software co-ordination. + +Signed-off-by: Santosh Shilimkar +Cc: Kevin Hilman +cc: Vishwanath BS +--- + arch/arm/mach-omap2/omap2plus-cpufreq.c | 73 ++++++++++++++++++++++++++----- + 1 files changed, 62 insertions(+), 11 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c +index 14f84cc..8d472f6 100644 +--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c ++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c +@@ -26,9 +26,11 @@ + #include + #include + #include ++#include + + #include + #include ++#include + + #include + #include +@@ -63,7 +65,7 @@ static unsigned int omap_getspeed(unsigned int cpu) + { + unsigned long rate; + +- if (cpu) ++ if (cpu >= NR_CPUS) + return 0; + + rate = clk_get_rate(mpu_clk) / 1000; +@@ -74,9 +76,13 @@ static int omap_target(struct cpufreq_policy *policy, + unsigned int target_freq, + unsigned int relation) + { +- int ret = 0; ++ int i, ret = 0; + struct cpufreq_freqs freqs; + ++ /* Changes not allowed until all CPUs are online */ ++ if (is_smp() && (num_online_cpus() < NR_CPUS)) ++ return ret; ++ + /* Ensure desired rate is within allowed range. Some govenors + * (ondemand) will just pass target_freq=0 to get the minimum. */ + if (target_freq < policy->min) +@@ -84,15 +90,25 @@ static int omap_target(struct cpufreq_policy *policy, + if (target_freq > policy->max) + target_freq = policy->max; + +- freqs.old = omap_getspeed(0); ++ freqs.old = omap_getspeed(policy->cpu); + freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; +- freqs.cpu = 0; ++ freqs.cpu = policy->cpu; + + if (freqs.old == freqs.new) + return ret; + +- cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); ++ if (!is_smp()) { ++ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); ++ goto set_freq; ++ } ++ ++ /* notifiers */ ++ for_each_cpu(i, policy->cpus) { ++ freqs.cpu = i; ++ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); ++ } + ++set_freq: + #ifdef CONFIG_CPU_FREQ_DEBUG + pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old, freqs.new); + #endif +@@ -105,12 +121,33 @@ static int omap_target(struct cpufreq_policy *policy, + * CONFIG_SMP enabled. Below code is added only to manage that + * scenario + */ +- if (!is_smp()) ++ freqs.new = omap_getspeed(policy->cpu); ++ if (!is_smp()) { + loops_per_jiffy = + cpufreq_scale(loops_per_jiffy, freqs.old, freqs.new); ++ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); ++ goto skip_lpj; ++ } + +- cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); ++#ifdef CONFIG_SMP ++ /* ++ * Note that loops_per_jiffy is not updated on SMP systems in ++ * cpufreq driver. So, update the per-CPU loops_per_jiffy value ++ * on frequency transition. We need to update all dependent CPUs. ++ */ ++ for_each_cpu(i, policy->cpus) ++ per_cpu(cpu_data, i).loops_per_jiffy = ++ cpufreq_scale(per_cpu(cpu_data, i).loops_per_jiffy, ++ freqs.old, freqs.new); ++#endif + ++ /* notifiers */ ++ for_each_cpu(i, policy->cpus) { ++ freqs.cpu = i; ++ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); ++ } ++ ++skip_lpj: + return ret; + } + +@@ -118,6 +155,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + { + int result = 0; + struct device *mpu_dev; ++ static cpumask_var_t cpumask; + + if (cpu_is_omap24xx()) + mpu_clk = clk_get(NULL, "virt_prcm_set"); +@@ -129,12 +167,12 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + if (IS_ERR(mpu_clk)) + return PTR_ERR(mpu_clk); + +- if (policy->cpu != 0) ++ if (policy->cpu >= NR_CPUS) + return -EINVAL; + +- policy->cur = policy->min = policy->max = omap_getspeed(0); +- ++ policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu); + mpu_dev = omap2_get_mpuss_device(); ++ + if (!mpu_dev) { + pr_warning("%s: unable to get the mpu device\n", __func__); + return -EINVAL; +@@ -154,7 +192,20 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + + policy->min = policy->cpuinfo.min_freq; + policy->max = policy->cpuinfo.max_freq; +- policy->cur = omap_getspeed(0); ++ policy->cur = omap_getspeed(policy->cpu); ++ ++ /* ++ * On OMAP SMP configuartion, both processors share the voltage ++ * and clock. So both CPUs needs to be scaled together and hence ++ * needs software co-ordination. Use cpufreq affected_cpus ++ * interface to handle this scenario. Additional is_smp() check ++ * is to keep SMP_ON_UP build working. ++ */ ++ if (is_smp()) { ++ policy->shared_type = CPUFREQ_SHARED_TYPE_ANY; ++ cpumask_or(cpumask, cpumask_of(policy->cpu), cpumask); ++ cpumask_copy(policy->cpus, cpumask); ++ } + + /* FIXME: what's the actual transition time? */ + policy->cpuinfo.transition_latency = 300 * 1000; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0008-OMAP2PLUS-cpufreq-Fix-typo-when-attempting-to-set-mp.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0008-OMAP2PLUS-cpufreq-Fix-typo-when-attempting-to-set-mp.patch new file mode 100644 index 0000000000..a2480818b3 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0008-OMAP2PLUS-cpufreq-Fix-typo-when-attempting-to-set-mp.patch @@ -0,0 +1,29 @@ +From 92c6a90a264c5803fc239a7304e073cd1517658b Mon Sep 17 00:00:00 2001 +From: Jarkko Nikula +Date: Thu, 14 Apr 2011 16:21:58 +0300 +Subject: [PATCH 8/8] OMAP2PLUS: cpufreq: Fix typo when attempting to set mpu_clk for OMAP4 + +Fix this typo as there is no dpll_mpu_ck for OMAP3 and code flow is clearly +trying to set mpu_clk for OMAP4 for which this dpll_mpu_ck is available. + +Signed-off-by: Jarkko Nikula +--- + arch/arm/mach-omap2/omap2plus-cpufreq.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c +index 8d472f6..d53ce23 100644 +--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c ++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c +@@ -161,7 +161,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) + mpu_clk = clk_get(NULL, "virt_prcm_set"); + else if (cpu_is_omap34xx()) + mpu_clk = clk_get(NULL, "dpll1_ck"); +- else if (cpu_is_omap34xx()) ++ else if (cpu_is_omap44xx()) + mpu_clk = clk_get(NULL, "dpll_mpu_ck"); + + if (IS_ERR(mpu_clk)) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0001-OMAP2-clockdomain-Add-an-api-to-read-idle-mode.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0001-OMAP2-clockdomain-Add-an-api-to-read-idle-mode.patch new file mode 100644 index 0000000000..76ac4aba18 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0001-OMAP2-clockdomain-Add-an-api-to-read-idle-mode.patch @@ -0,0 +1,77 @@ +From ec3154869b4d2fb10e3d455ec8af1e248d9c972b Mon Sep 17 00:00:00 2001 +From: Rajendra Nayak +Date: Tue, 5 Apr 2011 15:22:31 +0530 +Subject: [PATCH 1/6] OMAP2+: clockdomain: Add an api to read idle mode + +Add a clockdomain api to check if hardware supervised +idle transitions are enabled on a clockdomain. + +Signed-off-by: Rajendra Nayak +--- + arch/arm/mach-omap2/clockdomain.c | 21 +++++++++++++++++++++ + arch/arm/mach-omap2/clockdomain.h | 3 +++ + 2 files changed, 24 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c +index 6cb6c03..2ab3686 100644 +--- a/arch/arm/mach-omap2/clockdomain.c ++++ b/arch/arm/mach-omap2/clockdomain.c +@@ -795,6 +795,27 @@ void clkdm_deny_idle(struct clockdomain *clkdm) + arch_clkdm->clkdm_deny_idle(clkdm); + } + ++/** ++ * clkdm_is_idle - Check if the clkdm hwsup/autoidle is enabled ++ * @clkdm: struct clockdomain * ++ * ++ * Returns true if the clockdomain is in hardware-supervised ++ * idle mode, or 0 otherwise. ++ * ++ */ ++int clkdm_is_idle(struct clockdomain *clkdm) ++{ ++ if (!clkdm) ++ return -EINVAL; ++ ++ if (!arch_clkdm || !arch_clkdm->clkdm_is_idle) ++ return -EINVAL; ++ ++ pr_debug("clockdomain: reading idle state for %s\n", clkdm->name); ++ ++ return arch_clkdm->clkdm_is_idle(clkdm); ++} ++ + + /* Clockdomain-to-clock framework interface code */ + +diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h +index 5823584..085ed82 100644 +--- a/arch/arm/mach-omap2/clockdomain.h ++++ b/arch/arm/mach-omap2/clockdomain.h +@@ -138,6 +138,7 @@ struct clockdomain { + * @clkdm_wakeup: Force a clockdomain to wakeup + * @clkdm_allow_idle: Enable hw supervised idle transitions for clock domain + * @clkdm_deny_idle: Disable hw supervised idle transitions for clock domain ++ * @clkdm_is_idle: Check if hw supervised idle transitions are enabled + * @clkdm_clk_enable: Put the clkdm in right state for a clock enable + * @clkdm_clk_disable: Put the clkdm in right state for a clock disable + */ +@@ -154,6 +155,7 @@ struct clkdm_ops { + int (*clkdm_wakeup)(struct clockdomain *clkdm); + void (*clkdm_allow_idle)(struct clockdomain *clkdm); + void (*clkdm_deny_idle)(struct clockdomain *clkdm); ++ int (*clkdm_is_idle)(struct clockdomain *clkdm); + int (*clkdm_clk_enable)(struct clockdomain *clkdm); + int (*clkdm_clk_disable)(struct clockdomain *clkdm); + }; +@@ -177,6 +179,7 @@ int clkdm_clear_all_sleepdeps(struct clockdomain *clkdm); + + void clkdm_allow_idle(struct clockdomain *clkdm); + void clkdm_deny_idle(struct clockdomain *clkdm); ++int clkdm_is_idle(struct clockdomain *clkdm); + + int clkdm_wakeup(struct clockdomain *clkdm); + int clkdm_sleep(struct clockdomain *clkdm); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0002-OMAP2-clockdomain-Add-SoC-support-for-clkdm_is_idle.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0002-OMAP2-clockdomain-Add-SoC-support-for-clkdm_is_idle.patch new file mode 100644 index 0000000000..a0471ef991 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0002-OMAP2-clockdomain-Add-SoC-support-for-clkdm_is_idle.patch @@ -0,0 +1,86 @@ +From 85b9e8fe08a8c85096be91cb8eb60d5450dac71d Mon Sep 17 00:00:00 2001 +From: Rajendra Nayak +Date: Tue, 5 Apr 2011 15:22:36 +0530 +Subject: [PATCH 2/6] OMAP2+: clockdomain: Add SoC support for clkdm_is_idle + +Add the SoC specific implemenation for clkdm_is_idle +for OMAP2/3 and OMAP4. + +Signed-off-by: Rajendra Nayak +--- + arch/arm/mach-omap2/clockdomain2xxx_3xxx.c | 12 ++++++++++++ + arch/arm/mach-omap2/clockdomain44xx.c | 7 +++++++ + 2 files changed, 19 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c +index 48d0db7..db49baa 100644 +--- a/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c ++++ b/arch/arm/mach-omap2/clockdomain2xxx_3xxx.c +@@ -13,6 +13,7 @@ + */ + + #include ++#include + #include + #include "prm.h" + #include "prm2xxx_3xxx.h" +@@ -146,6 +147,15 @@ static void omap2_clkdm_deny_idle(struct clockdomain *clkdm) + _clkdm_del_autodeps(clkdm); + } + ++static int omap2_clkdm_is_idle(struct clockdomain *clkdm) ++{ ++ if (!clkdm->clktrctrl_mask) ++ return -1; ++ ++ return omap2_cm_is_clkdm_in_hwsup(clkdm->pwrdm.ptr->prcm_offs, ++ clkdm->clktrctrl_mask); ++} ++ + static void _enable_hwsup(struct clockdomain *clkdm) + { + if (cpu_is_omap24xx()) +@@ -252,6 +262,7 @@ struct clkdm_ops omap2_clkdm_operations = { + .clkdm_wakeup = omap2_clkdm_wakeup, + .clkdm_allow_idle = omap2_clkdm_allow_idle, + .clkdm_deny_idle = omap2_clkdm_deny_idle, ++ .clkdm_is_idle = omap2_clkdm_is_idle, + .clkdm_clk_enable = omap2_clkdm_clk_enable, + .clkdm_clk_disable = omap2_clkdm_clk_disable, + }; +@@ -269,6 +280,7 @@ struct clkdm_ops omap3_clkdm_operations = { + .clkdm_wakeup = omap3_clkdm_wakeup, + .clkdm_allow_idle = omap3_clkdm_allow_idle, + .clkdm_deny_idle = omap3_clkdm_deny_idle, ++ .clkdm_is_idle = omap2_clkdm_is_idle, + .clkdm_clk_enable = omap2_clkdm_clk_enable, + .clkdm_clk_disable = omap2_clkdm_clk_disable, + }; +diff --git a/arch/arm/mach-omap2/clockdomain44xx.c b/arch/arm/mach-omap2/clockdomain44xx.c +index a1a4ecd..4b10727 100644 +--- a/arch/arm/mach-omap2/clockdomain44xx.c ++++ b/arch/arm/mach-omap2/clockdomain44xx.c +@@ -93,6 +93,12 @@ static void omap4_clkdm_deny_idle(struct clockdomain *clkdm) + clkdm->cm_inst, clkdm->clkdm_offs); + } + ++static int omap4_clkdm_is_idle(struct clockdomain *clkdm) ++{ ++ return omap4_cminst_is_clkdm_in_hwsup(clkdm->prcm_partition, ++ clkdm->cm_inst, clkdm->clkdm_offs); ++} ++ + static int omap4_clkdm_clk_enable(struct clockdomain *clkdm) + { + bool hwsup = false; +@@ -132,6 +138,7 @@ struct clkdm_ops omap4_clkdm_operations = { + .clkdm_wakeup = omap4_clkdm_wakeup, + .clkdm_allow_idle = omap4_clkdm_allow_idle, + .clkdm_deny_idle = omap4_clkdm_deny_idle, ++ .clkdm_is_idle = omap4_clkdm_is_idle, + .clkdm_clk_enable = omap4_clkdm_clk_enable, + .clkdm_clk_disable = omap4_clkdm_clk_disable, + }; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0003-OMAP2-PM-Initialise-sleep_switch-to-a-non-valid-valu.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0003-OMAP2-PM-Initialise-sleep_switch-to-a-non-valid-valu.patch new file mode 100644 index 0000000000..99c0b746f4 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0003-OMAP2-PM-Initialise-sleep_switch-to-a-non-valid-valu.patch @@ -0,0 +1,35 @@ +From 6dc3e54ade4c042c6e798fb6f17ff65b9357bc89 Mon Sep 17 00:00:00 2001 +From: Rajendra Nayak +Date: Tue, 5 Apr 2011 15:22:41 +0530 +Subject: [PATCH 3/6] OMAP2+: PM: Initialise sleep_switch to a non-valid value + +sleep_switch which is initialised to 0 in omap_set_pwrdm_state +happens to be a valid sleep_switch type (FORCEWAKEUP_SWITCH) +which are defined as +#define FORCEWAKEUP_SWITCH 0 +#define LOWPOWERSTATE_SWITCH 1 + +This causes the function to wrongly program some clock domains +even when the Powerdomain is in ON state. + +Signed-off-by: Rajendra Nayak +--- + arch/arm/mach-omap2/pm.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c +index 49486f5..d48813f 100644 +--- a/arch/arm/mach-omap2/pm.c ++++ b/arch/arm/mach-omap2/pm.c +@@ -106,7 +106,7 @@ static void omap2_init_processor_devices(void) + int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) + { + u32 cur_state; +- int sleep_switch = 0; ++ int sleep_switch = -1; + int ret = 0; + + if (pwrdm == NULL || IS_ERR(pwrdm)) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0004-OMAP2-PM-idle-clkdms-only-if-already-in-idle.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0004-OMAP2-PM-idle-clkdms-only-if-already-in-idle.patch new file mode 100644 index 0000000000..fe8a4966ee --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0004-OMAP2-PM-idle-clkdms-only-if-already-in-idle.patch @@ -0,0 +1,50 @@ +From 828597d32fc3926e2c9e6c57adcc50c7eac824de Mon Sep 17 00:00:00 2001 +From: Rajendra Nayak +Date: Tue, 5 Apr 2011 15:22:48 +0530 +Subject: [PATCH 4/6] OMAP2+: PM: idle clkdms only if already in idle + +The omap_set_pwrdm_state function forces clockdomains +to idle, without checking the existing idle state +programmed, instead based solely on the HW capability +of the clockdomain to support idle. +This is wrong and the clockdomains should be idled +post a state_switch *only* if idle transitions on the +clockdomain were already enabled. + +Signed-off-by: Rajendra Nayak +--- + arch/arm/mach-omap2/pm.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c +index d48813f..840b0e1 100644 +--- a/arch/arm/mach-omap2/pm.c ++++ b/arch/arm/mach-omap2/pm.c +@@ -108,6 +108,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) + u32 cur_state; + int sleep_switch = -1; + int ret = 0; ++ int hwsup = 0; + + if (pwrdm == NULL || IS_ERR(pwrdm)) + return -EINVAL; +@@ -127,6 +128,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) + (pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) { + sleep_switch = LOWPOWERSTATE_SWITCH; + } else { ++ hwsup = clkdm_is_idle(pwrdm->pwrdm_clkdms[0]); + clkdm_wakeup(pwrdm->pwrdm_clkdms[0]); + pwrdm_wait_transition(pwrdm); + sleep_switch = FORCEWAKEUP_SWITCH; +@@ -142,7 +144,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) + + switch (sleep_switch) { + case FORCEWAKEUP_SWITCH: +- if (pwrdm->pwrdm_clkdms[0]->flags & CLKDM_CAN_ENABLE_AUTO) ++ if (hwsup) + clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]); + else + clkdm_sleep(pwrdm->pwrdm_clkdms[0]); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0005-OMAP2-hwmod-Follow-the-recomended-PRCM-sequence.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0005-OMAP2-hwmod-Follow-the-recomended-PRCM-sequence.patch new file mode 100644 index 0000000000..aeeda5977f --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0005-OMAP2-hwmod-Follow-the-recomended-PRCM-sequence.patch @@ -0,0 +1,46 @@ +From 6ecf0ebe9d520748b217a016ef8a0b239805a42c Mon Sep 17 00:00:00 2001 +From: Rajendra Nayak +Date: Tue, 29 Mar 2011 22:37:43 +0530 +Subject: [PATCH 5/6] OMAP2+: hwmod: Follow the recomended PRCM sequence + +Follow the recomended PRCM sequence. +This still does not take care of Optional clocks. + +Signed-off-by: Rajendra Nayak +--- + arch/arm/mach-omap2/omap_hwmod.c | 9 ++++++++- + 1 files changed, 8 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c +index e034294..fc0db0c 100644 +--- a/arch/arm/mach-omap2/omap_hwmod.c ++++ b/arch/arm/mach-omap2/omap_hwmod.c +@@ -1223,6 +1223,7 @@ static int _reset(struct omap_hwmod *oh) + static int _enable(struct omap_hwmod *oh) + { + int r; ++ int hwsup = 0; + + if (oh->_state != _HWMOD_STATE_INITIALIZED && + oh->_state != _HWMOD_STATE_IDLE && +@@ -1250,10 +1251,16 @@ static int _enable(struct omap_hwmod *oh) + omap_hwmod_mux(oh->mux, _HWMOD_STATE_ENABLED); + + _add_initiator_dep(oh, mpu_oh); ++ if (oh->_clk && oh->_clk->clkdm) { ++ hwsup = clkdm_is_idle(oh->_clk->clkdm); ++ clkdm_wakeup(oh->_clk->clkdm); ++ } + _enable_clocks(oh); +- + r = _wait_target_ready(oh); + if (!r) { ++ if (oh->_clk && oh->_clk->clkdm && hwsup) ++ clkdm_allow_idle(oh->_clk->clkdm); ++ + oh->_state = _HWMOD_STATE_ENABLED; + + /* Access the sysconfig only if the target is ready */ +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0006-OMAP-Serial-Check-wk_st-only-if-present.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0006-OMAP-Serial-Check-wk_st-only-if-present.patch new file mode 100644 index 0000000000..e95c9f8308 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0006-OMAP-Serial-Check-wk_st-only-if-present.patch @@ -0,0 +1,33 @@ +From 0af36cc0dcf5a6654e25eb33509fe0bc44a1dd81 Mon Sep 17 00:00:00 2001 +From: Rajendra Nayak +Date: Tue, 2 Mar 2010 17:25:30 +0530 +Subject: [PATCH 6/6] OMAP: Serial: Check wk_st only if present + +Uart on the resume path tries to read wk_st registers, even +on architectures were its not present/populated. +This patch fixes the issue. + +Signed-off-by: Rajendra Nayak +--- + arch/arm/mach-omap2/serial.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c +index 1ac361b..a0046ce 100644 +--- a/arch/arm/mach-omap2/serial.c ++++ b/arch/arm/mach-omap2/serial.c +@@ -418,8 +418,9 @@ void omap_uart_resume_idle(int num) + } + + /* Check for normal UART wakeup */ +- if (__raw_readl(uart->wk_st) & uart->wk_mask) +- omap_uart_block_sleep(uart); ++ if (uart->wk_st && uart->wk_mask) ++ if (__raw_readl(uart->wk_st) & uart->wk_mask) ++ omap_uart_block_sleep(uart); + return; + } + } +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0001-OMAP3-voltage-remove-spurious-pr_notice-for-debugfs.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0001-OMAP3-voltage-remove-spurious-pr_notice-for-debugfs.patch new file mode 100644 index 0000000000..f80c07ec39 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0001-OMAP3-voltage-remove-spurious-pr_notice-for-debugfs.patch @@ -0,0 +1,30 @@ +From f505147f6352faaf3d70b00a757279d56e2ef78b Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Sat, 12 Feb 2011 17:27:14 +0530 +Subject: [PATCH 01/12] OMAP3+: voltage: remove spurious pr_notice for debugfs + +cat of debugfs entry for vp_volt provides voltage. The additional pr_notice +is just spam on console and provides no additional information. + +Signed-off-by: Nishanth Menon +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/voltage.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c +index 0c1552d..9ef3789 100644 +--- a/arch/arm/mach-omap2/voltage.c ++++ b/arch/arm/mach-omap2/voltage.c +@@ -148,7 +148,6 @@ static int vp_volt_debug_get(void *data, u64 *val) + } + + vsel = vdd->read_reg(prm_mod_offs, vdd->vp_data->voltage); +- pr_notice("curr_vsel = %x\n", vsel); + + if (!vdd->pmic_info->vsel_to_uv) { + pr_warning("PMIC function to convert vsel to voltage" +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0002-OMAP4-PM-remove-redundant-ifdef-CONFIG_PM.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0002-OMAP4-PM-remove-redundant-ifdef-CONFIG_PM.patch new file mode 100644 index 0000000000..dc800647e4 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0002-OMAP4-PM-remove-redundant-ifdef-CONFIG_PM.patch @@ -0,0 +1,41 @@ +From 79f5f1bb1c1a0f004e41660742a0bf736744ad0e Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Sun, 13 Mar 2011 09:07:23 +0530 +Subject: [PATCH 02/12] OMAP4: PM: remove redundant #ifdef CONFIG_PM + +pm44xx.c is built only when CONFIG_PM is setup, +remove redundant CONFIG_PM check. + +This also fixes: +https://bugzilla.kernel.org/show_bug.cgi?id=25022 + +Reported-by: Martin Etti + +Signed-off-by: Nishanth Menon +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/pm44xx.c | 2 -- + 1 files changed, 0 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c +index 76cfff2..59a870b 100644 +--- a/arch/arm/mach-omap2/pm44xx.c ++++ b/arch/arm/mach-omap2/pm44xx.c +@@ -105,13 +105,11 @@ static int __init omap4_pm_init(void) + + pr_err("Power Management for TI OMAP4.\n"); + +-#ifdef CONFIG_PM + ret = pwrdm_for_each(pwrdms_setup, NULL); + if (ret) { + pr_err("Failed to setup powerdomains\n"); + goto err2; + } +-#endif + + #ifdef CONFIG_SUSPEND + suspend_set_ops(&omap_pm_ops); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0003-OMAP3-smartreflex-fix-sr_late_init-error-path-in-pro.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0003-OMAP3-smartreflex-fix-sr_late_init-error-path-in-pro.patch new file mode 100644 index 0000000000..a17d2bb5a4 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0003-OMAP3-smartreflex-fix-sr_late_init-error-path-in-pro.patch @@ -0,0 +1,30 @@ +From b0ed051910c29c99e604ad4eb06d480199fcbd34 Mon Sep 17 00:00:00 2001 +From: Aaro Koskinen +Date: Thu, 24 Mar 2011 18:35:31 +0200 +Subject: [PATCH 03/12] OMAP3+: smartreflex: fix sr_late_init() error path in probe + +sr_late_init() will take care of freeing the resources. + +Signed-off-by: Aaro Koskinen +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/smartreflex.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +index 13e24f9..dbc4b6f 100644 +--- a/arch/arm/mach-omap2/smartreflex.c ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -883,7 +883,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) + ret = sr_late_init(sr_info); + if (ret) { + pr_warning("%s: Error in SR late init\n", __func__); +- goto err_release_region; ++ return ret; + } + } + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0004-OMAP3-smartreflex-request-the-memory-region.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0004-OMAP3-smartreflex-request-the-memory-region.patch new file mode 100644 index 0000000000..5ca9678ff0 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0004-OMAP3-smartreflex-request-the-memory-region.patch @@ -0,0 +1,36 @@ +From d494d209b9b3c1cb13981a9756818f2822379a13 Mon Sep 17 00:00:00 2001 +From: Aaro Koskinen +Date: Thu, 24 Mar 2011 18:35:32 +0200 +Subject: [PATCH 04/12] OMAP3+: smartreflex: request the memory region + +We are releasing the memory region, but never actually request it. + +Signed-off-by: Aaro Koskinen +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/smartreflex.c | 8 ++++++++ + 1 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +index dbc4b6f..703143a 100644 +--- a/arch/arm/mach-omap2/smartreflex.c ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -847,6 +847,14 @@ static int __init omap_sr_probe(struct platform_device *pdev) + goto err_free_devinfo; + } + ++ mem = request_mem_region(mem->start, resource_size(mem), ++ dev_name(&pdev->dev)); ++ if (!mem) { ++ dev_err(&pdev->dev, "%s: no mem region\n", __func__); ++ ret = -EBUSY; ++ goto err_free_devinfo; ++ } ++ + irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); + + pm_runtime_enable(&pdev->dev); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0005-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0005-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch new file mode 100644 index 0000000000..a9da969957 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0005-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch @@ -0,0 +1,66 @@ +From 7553d0119d9f62a809d21993deaac2a745251c3b Mon Sep 17 00:00:00 2001 +From: Aaro Koskinen +Date: Thu, 24 Mar 2011 18:35:33 +0200 +Subject: [PATCH 05/12] OMAP3+: smartreflex: fix ioremap leak on probe error + +Add missing iounmap() to error paths. + +Signed-off-by: Aaro Koskinen +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/smartreflex.c | 10 ++++++---- + 1 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +index 703143a..156807e 100644 +--- a/arch/arm/mach-omap2/smartreflex.c ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -904,7 +904,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) + vdd_dbg_dir = omap_voltage_get_dbgdir(sr_info->voltdm); + if (!vdd_dbg_dir) { + ret = -EINVAL; +- goto err_release_region; ++ goto err_iounmap; + } + + sr_info->dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir); +@@ -912,7 +912,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) + dev_err(&pdev->dev, "%s: Unable to create debugfs directory\n", + __func__); + ret = PTR_ERR(sr_info->dbg_dir); +- goto err_release_region; ++ goto err_iounmap; + } + + (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR, +@@ -929,7 +929,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) + dev_err(&pdev->dev, "%s: Unable to create debugfs directory" + "for n-values\n", __func__); + ret = PTR_ERR(nvalue_dir); +- goto err_release_region; ++ goto err_iounmap; + } + + omap_voltage_get_volttable(sr_info->voltdm, &volt_data); +@@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) + "entries for n-values\n", + __func__, sr_info->voltdm->name); + ret = -ENODATA; +- goto err_release_region; ++ goto err_iounmap; + } + + for (i = 0; i < sr_info->nvalue_count; i++) { +@@ -953,6 +953,8 @@ static int __init omap_sr_probe(struct platform_device *pdev) + + return ret; + ++err_iounmap: ++ iounmap(sr_info->base); + err_release_region: + release_mem_region(mem->start, resource_size(mem)); + err_free_devinfo: +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0006-OMAP3-smartreflex-delete-instance-from-sr_list-on-pr.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0006-OMAP3-smartreflex-delete-instance-from-sr_list-on-pr.patch new file mode 100644 index 0000000000..8f76fc376b --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0006-OMAP3-smartreflex-delete-instance-from-sr_list-on-pr.patch @@ -0,0 +1,29 @@ +From cdb1237e4829a7912fe4e78e73f20bda9ea22d6d Mon Sep 17 00:00:00 2001 +From: Aaro Koskinen +Date: Thu, 24 Mar 2011 18:35:34 +0200 +Subject: [PATCH 06/12] OMAP3+: smartreflex: delete instance from sr_list on probe error + +If the probe fails, the node should be deleted from sr_list. + +Signed-off-by: Aaro Koskinen +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/smartreflex.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +index 156807e..f0a488a 100644 +--- a/arch/arm/mach-omap2/smartreflex.c ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -954,6 +954,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) + return ret; + + err_iounmap: ++ list_del(&sr_info->node); + iounmap(sr_info->base); + err_release_region: + release_mem_region(mem->start, resource_size(mem)); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0007-OMAP3-smartreflex-delete-debugfs-entries-on-probe-er.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0007-OMAP3-smartreflex-delete-debugfs-entries-on-probe-er.patch new file mode 100644 index 0000000000..897ddb0dac --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0007-OMAP3-smartreflex-delete-debugfs-entries-on-probe-er.patch @@ -0,0 +1,48 @@ +From abfa4bd473f227d2d0b42367c5aeaf6e16214a95 Mon Sep 17 00:00:00 2001 +From: Aaro Koskinen +Date: Thu, 24 Mar 2011 18:35:35 +0200 +Subject: [PATCH 07/12] OMAP3+: smartreflex: delete debugfs entries on probe error + +Delete created debugfs entries if probe fails. + +Signed-off-by: Aaro Koskinen +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/smartreflex.c | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +index f0a488a..fb7dc52 100644 +--- a/arch/arm/mach-omap2/smartreflex.c ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -929,7 +929,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) + dev_err(&pdev->dev, "%s: Unable to create debugfs directory" + "for n-values\n", __func__); + ret = PTR_ERR(nvalue_dir); +- goto err_iounmap; ++ goto err_debugfs; + } + + omap_voltage_get_volttable(sr_info->voltdm, &volt_data); +@@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev) + "entries for n-values\n", + __func__, sr_info->voltdm->name); + ret = -ENODATA; +- goto err_iounmap; ++ goto err_debugfs; + } + + for (i = 0; i < sr_info->nvalue_count; i++) { +@@ -953,6 +953,8 @@ static int __init omap_sr_probe(struct platform_device *pdev) + + return ret; + ++err_debugfs: ++ debugfs_remove_recursive(sr_info->dbg_dir); + err_iounmap: + list_del(&sr_info->node); + iounmap(sr_info->base); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0008-OMAP3-cpuidle-remove-useless-SDP-specific-timings.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0008-OMAP3-cpuidle-remove-useless-SDP-specific-timings.patch new file mode 100644 index 0000000000..72183c44f8 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0008-OMAP3-cpuidle-remove-useless-SDP-specific-timings.patch @@ -0,0 +1,57 @@ +From f8a6387ba73da6c8fe4281449b85f1825f2403bb Mon Sep 17 00:00:00 2001 +From: Jean Pihet +Date: Fri, 29 Apr 2011 11:26:22 +0200 +Subject: [PATCH 08/12] OMAP3 cpuidle: remove useless SDP specific timings + +The cpuidle states settings can be overriden by some board- +specific settings, by calling omap3_pm_init_cpuidle. +Remove the 3430SDP specific states settings registration +since the figures are identical to the default ones (in cpuidle34xx.c). + +Signed-off-by: Jean Pihet +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-3430sdp.c | 19 ------------------- + 1 files changed, 0 insertions(+), 19 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c +index 9afd087..7ffad7b 100644 +--- a/arch/arm/mach-omap2/board-3430sdp.c ++++ b/arch/arm/mach-omap2/board-3430sdp.c +@@ -59,24 +59,6 @@ + + #define TWL4030_MSECURE_GPIO 22 + +-/* FIXME: These values need to be updated based on more profiling on 3430sdp*/ +-static struct cpuidle_params omap3_cpuidle_params_table[] = { +- /* C1 */ +- {1, 2, 2, 5}, +- /* C2 */ +- {1, 10, 10, 30}, +- /* C3 */ +- {1, 50, 50, 300}, +- /* C4 */ +- {1, 1500, 1800, 4000}, +- /* C5 */ +- {1, 2500, 7500, 12000}, +- /* C6 */ +- {1, 3000, 8500, 15000}, +- /* C7 */ +- {1, 10000, 30000, 300000}, +-}; +- + static uint32_t board_keymap[] = { + KEY(0, 0, KEY_LEFT), + KEY(0, 1, KEY_RIGHT), +@@ -883,7 +865,6 @@ static void __init omap_3430sdp_init(void) + omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); + omap_board_config = sdp3430_config; + omap_board_config_size = ARRAY_SIZE(sdp3430_config); +- omap3_pm_init_cpuidle(omap3_cpuidle_params_table); + omap3430_i2c_init(); + omap_display_init(&sdp3430_dss_data); + if (omap_rev() > OMAP3430_REV_ES1_0) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0009-OMAP3-SR-make-notify-independent-of-class.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0009-OMAP3-SR-make-notify-independent-of-class.patch new file mode 100644 index 0000000000..2e5414c76a --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0009-OMAP3-SR-make-notify-independent-of-class.patch @@ -0,0 +1,48 @@ +From d7992ea7da87a0802fa2b65819bf0e3adc5ba502 Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Mon, 14 Feb 2011 12:16:36 +0530 +Subject: [PATCH 09/12] OMAP3+: SR: make notify independent of class + +Interrupt notification mechanism of SmartReflex can be used by the +choice of implementation of the class driver. For example, Class 2 and +Class 1.5 of SmartReflex can both use the interrupt notification to +identify the transition of voltage or other events. + +Hence, the actual class does not matter for notifier. Let the class +driver's handling decide how it should be used. SmartReflex driver +should provide just the primitives. + +Signed-off-by: Nishanth Menon +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/smartreflex.c | 6 ++---- + 1 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +index fb7dc52..3ee7261 100644 +--- a/arch/arm/mach-omap2/smartreflex.c ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -143,7 +143,7 @@ static irqreturn_t sr_interrupt(int irq, void *data) + sr_write_reg(sr_info, IRQSTATUS, status); + } + +- if (sr_class->class_type == SR_CLASS2 && sr_class->notify) ++ if (sr_class->notify) + sr_class->notify(sr_info->voltdm, status); + + return IRQ_HANDLED; +@@ -258,9 +258,7 @@ static int sr_late_init(struct omap_sr *sr_info) + struct resource *mem; + int ret = 0; + +- if (sr_class->class_type == SR_CLASS2 && +- sr_class->notify_flags && sr_info->irq) { +- ++ if (sr_class->notify && sr_class->notify_flags && sr_info->irq) { + name = kasprintf(GFP_KERNEL, "sr_%s", sr_info->voltdm->name); + if (name == NULL) { + ret = -ENOMEM; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0010-OMAP3-SR-disable-interrupt-by-default.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0010-OMAP3-SR-disable-interrupt-by-default.patch new file mode 100644 index 0000000000..10ada9159a --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0010-OMAP3-SR-disable-interrupt-by-default.patch @@ -0,0 +1,37 @@ +From 1f8185e181d5b9c1f47ce5f858dad3bba2be240d Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Mon, 14 Feb 2011 12:41:10 +0530 +Subject: [PATCH 10/12] OMAP3+: SR: disable interrupt by default + +We will enable and disable interrupt on a need basis in the class +driver. We need to keep the IRQ disabled by default else the +forceupdate or vcbypass events could trigger events that we don't +need/expect to handle. + +This is a preparation for SmartReflex AVS class drivers such as +class 2 and class 1.5 which would need to use interrupts. Existing +SmartReflex AVS class 3 driver does not require to use interrupts +and is not impacted by this change. + +Signed-off-by: Nishanth Menon +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/smartreflex.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +index 3ee7261..616ef62 100644 +--- a/arch/arm/mach-omap2/smartreflex.c ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -268,6 +268,7 @@ static int sr_late_init(struct omap_sr *sr_info) + 0, name, (void *)sr_info); + if (ret) + goto error; ++ disable_irq(sr_info->irq); + } + + if (pdata && pdata->enable_on_init) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0011-OMAP3-SR-enable-disable-SR-only-on-need.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0011-OMAP3-SR-enable-disable-SR-only-on-need.patch new file mode 100644 index 0000000000..99176652dd --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0011-OMAP3-SR-enable-disable-SR-only-on-need.patch @@ -0,0 +1,41 @@ +From 488e6ec1262fd56c62b09874fcf8557709f30ef2 Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Mon, 14 Feb 2011 21:14:17 +0530 +Subject: [PATCH 11/12] OMAP3+: SR: enable/disable SR only on need + +Since we already know the state of the autocomp enablement, we can +see if the requested state is different from the current state and +enable/disable SR only on the need basis. + +Signed-off-by: Nishanth Menon +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/smartreflex.c | 11 +++++++---- + 1 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +index 616ef62..3bd9fac 100644 +--- a/arch/arm/mach-omap2/smartreflex.c ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -807,10 +807,13 @@ static int omap_sr_autocomp_store(void *data, u64 val) + return -EINVAL; + } + +- if (!val) +- sr_stop_vddautocomp(sr_info); +- else +- sr_start_vddautocomp(sr_info); ++ /* control enable/disable only if there is a delta in value */ ++ if (sr_info->autocomp_active != val) { ++ if (!val) ++ sr_stop_vddautocomp(sr_info); ++ else ++ sr_start_vddautocomp(sr_info); ++ } + + return 0; + } +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0012-OMAP3-SR-fix-cosmetic-indentation.patch b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0012-OMAP3-SR-fix-cosmetic-indentation.patch new file mode 100644 index 0000000000..e8dddc1c60 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0012-OMAP3-SR-fix-cosmetic-indentation.patch @@ -0,0 +1,49 @@ +From 5e50b744aeca31be1c93790e048fc69c2f77c6c9 Mon Sep 17 00:00:00 2001 +From: Nishanth Menon +Date: Mon, 14 Feb 2011 12:33:13 +0530 +Subject: [PATCH 12/12] OMAP3+: SR: fix cosmetic indentation + +Error label case seems to have a 2 tab indentation when just 1 is +necessary. + +Signed-off-by: Nishanth Menon +Signed-off-by: Kevin Hilman +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/smartreflex.c | 20 ++++++++++---------- + 1 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c +index 3bd9fac..2ce2fb7 100644 +--- a/arch/arm/mach-omap2/smartreflex.c ++++ b/arch/arm/mach-omap2/smartreflex.c +@@ -277,16 +277,16 @@ static int sr_late_init(struct omap_sr *sr_info) + return ret; + + error: +- iounmap(sr_info->base); +- mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0); +- release_mem_region(mem->start, resource_size(mem)); +- list_del(&sr_info->node); +- dev_err(&sr_info->pdev->dev, "%s: ERROR in registering" +- "interrupt handler. Smartreflex will" +- "not function as desired\n", __func__); +- kfree(name); +- kfree(sr_info); +- return ret; ++ iounmap(sr_info->base); ++ mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0); ++ release_mem_region(mem->start, resource_size(mem)); ++ list_del(&sr_info->node); ++ dev_err(&sr_info->pdev->dev, "%s: ERROR in registering" ++ "interrupt handler. Smartreflex will" ++ "not function as desired\n", __func__); ++ kfree(name); ++ kfree(sr_info); ++ return ret; + } + + static void sr_v1_disable(struct omap_sr *sr) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0001-OMAP-DSS2-DSI-fix-use_sys_clk-highfreq.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0001-OMAP-DSS2-DSI-fix-use_sys_clk-highfreq.patch new file mode 100644 index 0000000000..24700eede9 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0001-OMAP-DSS2-DSI-fix-use_sys_clk-highfreq.patch @@ -0,0 +1,33 @@ +From 19d9727973e7b0c5f8983a1a5ae3b0a02e062bab Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen +Date: Thu, 7 Apr 2011 15:28:47 +0300 +Subject: [PATCH 01/31] OMAP: DSS2: DSI: fix use_sys_clk & highfreq + +use_sys_clk and highfreq fields in dsi.current_cinfo were never set. +Luckily they weren't used anywhere so it didn't cause any problems. + +This patch fixes those fields and they are now set at the same time as +the rest of the fields. + +Signed-off-by: Tomi Valkeinen +--- + drivers/video/omap2/dss/dsi.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c +index 0a7f1a4..8604153 100644 +--- a/drivers/video/omap2/dss/dsi.c ++++ b/drivers/video/omap2/dss/dsi.c +@@ -1276,6 +1276,9 @@ int dsi_pll_set_clock_div(struct dsi_clock_info *cinfo) + + DSSDBGF(); + ++ dsi.current_cinfo.use_sys_clk = cinfo->use_sys_clk; ++ dsi.current_cinfo.highfreq = cinfo->highfreq; ++ + dsi.current_cinfo.fint = cinfo->fint; + dsi.current_cinfo.clkin4ddr = cinfo->clkin4ddr; + dsi.current_cinfo.dsi_pll_hsdiv_dispc_clk = +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0002-OMAP-DSS2-DSI-fix-dsi_dump_clocks.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0002-OMAP-DSS2-DSI-fix-dsi_dump_clocks.patch new file mode 100644 index 0000000000..7ab7f4d778 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0002-OMAP-DSS2-DSI-fix-dsi_dump_clocks.patch @@ -0,0 +1,49 @@ +From 2bc828d1b81d857238dc8b1f29e38e466469e352 Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen +Date: Mon, 4 Apr 2011 10:02:53 +0300 +Subject: [PATCH 02/31] OMAP: DSS2: DSI: fix dsi_dump_clocks() + +On OMAP4, reading DSI_PLL_CONFIGURATION2 register requires the L3 clock +(CIO_CLK_ICG) to PLL. Currently dsi_dump_clocks() tries to read that +register without enabling the L3 clock, leading to crash if DSI is not +in use. + +The status of the bit being read from DSI_PLL_CONFIGURATION2 is +available from dsi_clock_info->use_sys_clk, so we can avoid the whole +problem by just using that. + +Signed-off-by: Tomi Valkeinen +--- + drivers/video/omap2/dss/dsi.c | 6 +----- + 1 files changed, 1 insertions(+), 5 deletions(-) + +diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c +index 8604153..1464ac4 100644 +--- a/drivers/video/omap2/dss/dsi.c ++++ b/drivers/video/omap2/dss/dsi.c +@@ -1491,7 +1491,6 @@ void dsi_pll_uninit(void) + + void dsi_dump_clocks(struct seq_file *s) + { +- int clksel; + struct dsi_clock_info *cinfo = &dsi.current_cinfo; + enum dss_clk_source dispc_clk_src, dsi_clk_src; + +@@ -1500,13 +1499,10 @@ void dsi_dump_clocks(struct seq_file *s) + + enable_clocks(1); + +- clksel = REG_GET(DSI_PLL_CONFIGURATION2, 11, 11); +- + seq_printf(s, "- DSI PLL -\n"); + + seq_printf(s, "dsi pll source = %s\n", +- clksel == 0 ? +- "dss_sys_clk" : "pclkfree"); ++ cinfo->use_sys_clk ? "dss_sys_clk" : "pclkfree"); + + seq_printf(s, "Fint\t\t%-16luregn %u\n", cinfo->fint, cinfo->regn); + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0003-OMAP2PLUS-DSS2-Fix-Return-correct-lcd-clock-source-f.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0003-OMAP2PLUS-DSS2-Fix-Return-correct-lcd-clock-source-f.patch new file mode 100644 index 0000000000..0bef2d2f66 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0003-OMAP2PLUS-DSS2-Fix-Return-correct-lcd-clock-source-f.patch @@ -0,0 +1,43 @@ +From 29d6de29d3d0d2ac9fe0572cd4e0485757eca550 Mon Sep 17 00:00:00 2001 +From: Archit Taneja +Date: Thu, 31 Mar 2011 13:23:35 +0530 +Subject: [PATCH 03/31] OMAP2PLUS: DSS2: Fix: Return correct lcd clock source for OMAP2/3 + +dss.lcd_clk_source is set to the default value DSS_CLK_SRC_FCK at dss_init. +For OMAP2 and OMAP3, the dss.lcd_clk_source should always be the same as +dss.dispc_clk_source. The function dss_get_lcd_clk_source() always returns the +default value DSS_CLK_SRC_FCK for OMAP2/3. This leads to wrong clock dumps when +dispc_clk_source is not DSS_CLK_SRC_FCK. + +Correct this function to always return dss.dispc_clk_source for OMAP2/3. + +Signed-off-by: Archit Taneja +Signed-off-by: Tomi Valkeinen +--- + drivers/video/omap2/dss/dss.c | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/drivers/video/omap2/dss/dss.c b/drivers/video/omap2/dss/dss.c +index 3f1fee6..c3b48a0 100644 +--- a/drivers/video/omap2/dss/dss.c ++++ b/drivers/video/omap2/dss/dss.c +@@ -385,8 +385,14 @@ enum dss_clk_source dss_get_dsi_clk_source(void) + + enum dss_clk_source dss_get_lcd_clk_source(enum omap_channel channel) + { +- int ix = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 1; +- return dss.lcd_clk_source[ix]; ++ if (dss_has_feature(FEAT_LCD_CLK_SRC)) { ++ int ix = channel == OMAP_DSS_CHANNEL_LCD ? 0 : 1; ++ return dss.lcd_clk_source[ix]; ++ } else { ++ /* LCD_CLK source is the same as DISPC_FCLK source for ++ * OMAP2 and OMAP3 */ ++ return dss.dispc_clk_source; ++ } + } + + /* calculate clock rates using dividers in cinfo */ +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0004-OMAP-DSS-DSI-Fix-DSI-PLL-power-bug.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0004-OMAP-DSS-DSI-Fix-DSI-PLL-power-bug.patch new file mode 100644 index 0000000000..f204b87e42 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0004-OMAP-DSS-DSI-Fix-DSI-PLL-power-bug.patch @@ -0,0 +1,64 @@ +From e7665ffb72cbc890b8494c687b335e3e242231d9 Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen +Date: Fri, 15 Apr 2011 10:42:59 +0300 +Subject: [PATCH 04/31] OMAP: DSS: DSI: Fix DSI PLL power bug + +OMAP3630 has a HW bug causing DSI PLL power command POWER_ON_DIV (0x3) +to not work properly. The bug prevents us from enabling DSI PLL power +only to HS divider block. + +This patch adds a dss feature for the bug and converts POWER_ON_DIV +requests to POWER_ON_ALL (0x2). + +Signed-off-by: Tomi Valkeinen +--- + drivers/video/omap2/dss/dsi.c | 5 +++++ + drivers/video/omap2/dss/dss_features.c | 2 +- + drivers/video/omap2/dss/dss_features.h | 2 ++ + 3 files changed, 8 insertions(+), 1 deletions(-) + +diff --git a/drivers/video/omap2/dss/dsi.c b/drivers/video/omap2/dss/dsi.c +index 1464ac4..cbd9ca4 100644 +--- a/drivers/video/omap2/dss/dsi.c ++++ b/drivers/video/omap2/dss/dsi.c +@@ -1059,6 +1059,11 @@ static int dsi_pll_power(enum dsi_pll_power_state state) + { + int t = 0; + ++ /* DSI-PLL power command 0x3 is not working */ ++ if (dss_has_feature(FEAT_DSI_PLL_PWR_BUG) && ++ state == DSI_PLL_POWER_ON_DIV) ++ state = DSI_PLL_POWER_ON_ALL; ++ + REG_FLD_MOD(DSI_CLK_CTRL, state, 31, 30); /* PLL_PWR_CMD */ + + /* PLL_PWR_STATUS */ +diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c +index aa16222..8c50e18 100644 +--- a/drivers/video/omap2/dss/dss_features.c ++++ b/drivers/video/omap2/dss/dss_features.c +@@ -271,7 +271,7 @@ static struct omap_dss_features omap3630_dss_features = { + FEAT_LCDENABLESIGNAL | FEAT_PCKFREEENABLE | + FEAT_PRE_MULT_ALPHA | FEAT_FUNCGATED | + FEAT_ROWREPEATENABLE | FEAT_LINEBUFFERSPLIT | +- FEAT_RESIZECONF, ++ FEAT_RESIZECONF | FEAT_DSI_PLL_PWR_BUG, + + .num_mgrs = 2, + .num_ovls = 3, +diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h +index 12e9c4e..37922ce 100644 +--- a/drivers/video/omap2/dss/dss_features.h ++++ b/drivers/video/omap2/dss/dss_features.h +@@ -40,6 +40,8 @@ enum dss_feat_id { + /* Independent core clk divider */ + FEAT_CORE_CLK_DIV = 1 << 11, + FEAT_LCD_CLK_SRC = 1 << 12, ++ /* DSI-PLL power command 0x3 is not working */ ++ FEAT_DSI_PLL_PWR_BUG = 1 << 13, + }; + + /* DSS register field id */ +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0005-OMAP-DSS2-fix-panel-Kconfig-dependencies.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0005-OMAP-DSS2-fix-panel-Kconfig-dependencies.patch new file mode 100644 index 0000000000..8d4b175bcc --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0005-OMAP-DSS2-fix-panel-Kconfig-dependencies.patch @@ -0,0 +1,61 @@ +From c84fbf480062086f93f99c27817e4d2d91593511 Mon Sep 17 00:00:00 2001 +From: Tomi Valkeinen +Date: Fri, 8 Apr 2011 09:30:27 +0300 +Subject: [PATCH 05/31] OMAP: DSS2: fix panel Kconfig dependencies + +All DPI panels were missing dependency to OMAP2_DSS_DPI. Add the +dependency. + +Signed-off-by: Tomi Valkeinen +--- + drivers/video/omap2/displays/Kconfig | 9 +++++---- + 1 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/drivers/video/omap2/displays/Kconfig b/drivers/video/omap2/displays/Kconfig +index d18ad6b..609a280 100644 +--- a/drivers/video/omap2/displays/Kconfig ++++ b/drivers/video/omap2/displays/Kconfig +@@ -3,6 +3,7 @@ menu "OMAP2/3 Display Device Drivers" + + config PANEL_GENERIC_DPI + tristate "Generic DPI Panel" ++ depends on OMAP2_DSS_DPI + help + Generic DPI panel driver. + Supports DVI output for Beagle and OMAP3 SDP. +@@ -11,20 +12,20 @@ config PANEL_GENERIC_DPI + + config PANEL_LGPHILIPS_LB035Q02 + tristate "LG.Philips LB035Q02 LCD Panel" +- depends on OMAP2_DSS && SPI ++ depends on OMAP2_DSS_DPI && SPI + help + LCD Panel used on the Gumstix Overo Palo35 + + config PANEL_SHARP_LS037V7DW01 + tristate "Sharp LS037V7DW01 LCD Panel" +- depends on OMAP2_DSS ++ depends on OMAP2_DSS_DPI + select BACKLIGHT_CLASS_DEVICE + help + LCD Panel used in TI's SDP3430 and EVM boards + + config PANEL_NEC_NL8048HL11_01B + tristate "NEC NL8048HL11-01B Panel" +- depends on OMAP2_DSS ++ depends on OMAP2_DSS_DPI + help + This NEC NL8048HL11-01B panel is TFT LCD + used in the Zoom2/3/3630 sdp boards. +@@ -37,7 +38,7 @@ config PANEL_TAAL + + config PANEL_TPO_TD043MTEA1 + tristate "TPO TD043MTEA1 LCD Panel" +- depends on OMAP2_DSS && SPI ++ depends on OMAP2_DSS_DPI && SPI + help + LCD Panel used in OMAP3 Pandora + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0006-OMAP-DSS2-add-bootarg-for-selecting-svideo-or-compos.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0006-OMAP-DSS2-add-bootarg-for-selecting-svideo-or-compos.patch new file mode 100644 index 0000000000..e7751c58dc --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0006-OMAP-DSS2-add-bootarg-for-selecting-svideo-or-compos.patch @@ -0,0 +1,75 @@ +From 756700075d8ebd5979f3ea2d20f44356c417dfe4 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Tue, 19 Jan 2010 21:19:15 -0800 +Subject: [PATCH 06/31] OMAP: DSS2: add bootarg for selecting svideo or composite for tv output + +also add pal-16 and ntsc-16 omapfb.mode settings for 16bpp +--- + drivers/video/omap2/dss/venc.c | 22 ++++++++++++++++++++++ + drivers/video/omap2/omapfb/omapfb-main.c | 10 +++++++++- + 2 files changed, 31 insertions(+), 1 deletions(-) + +diff --git a/drivers/video/omap2/dss/venc.c b/drivers/video/omap2/dss/venc.c +index 8e35a5b..827723f 100644 +--- a/drivers/video/omap2/dss/venc.c ++++ b/drivers/video/omap2/dss/venc.c +@@ -85,6 +85,11 @@ + #define VENC_OUTPUT_TEST 0xC8 + #define VENC_DAC_B__DAC_C 0xC8 + ++static char *tv_connection; ++ ++module_param_named(tvcable, tv_connection, charp, 0); ++MODULE_PARM_DESC(tvcable, "TV connection type (svideo, composite)"); ++ + struct venc_config { + u32 f_control; + u32 vidout_ctrl; +@@ -458,6 +463,23 @@ static int venc_panel_probe(struct omap_dss_device *dssdev) + { + dssdev->panel.timings = omap_dss_pal_timings; + ++ /* Allow the TV output to be overriden */ ++ if (tv_connection) { ++ if (strcmp(tv_connection, "svideo") == 0) { ++ printk(KERN_INFO ++ "omapdss: tv output is svideo.\n"); ++ dssdev->phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO; ++ } else if (strcmp(tv_connection, "composite") == 0) { ++ printk(KERN_INFO ++ "omapdss: tv output is composite.\n"); ++ dssdev->phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE; ++ } else { ++ printk(KERN_INFO ++ "omapdss: unsupported output type'%s'.\n", ++ tv_connection); ++ } ++ } ++ + return 0; + } + +diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c +index 505ec66..eaeded5 100644 +--- a/drivers/video/omap2/omapfb/omapfb-main.c ++++ b/drivers/video/omap2/omapfb/omapfb-main.c +@@ -2036,7 +2036,15 @@ static int omapfb_mode_to_timings(const char *mode_str, + int r; + + #ifdef CONFIG_OMAP2_DSS_VENC +- if (strcmp(mode_str, "pal") == 0) { ++ if (strcmp(mode_str, "pal-16") == 0) { ++ *timings = omap_dss_pal_timings; ++ *bpp = 16; ++ return 0; ++ } else if (strcmp(mode_str, "ntsc-16") == 0) { ++ *timings = omap_dss_ntsc_timings; ++ *bpp = 16; ++ return 0; ++ } else if (strcmp(mode_str, "pal") == 0) { + *timings = omap_dss_pal_timings; + *bpp = 24; + return 0; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0007-video-add-timings-for-hd720.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0007-video-add-timings-for-hd720.patch new file mode 100644 index 0000000000..3cd3ff98fc --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0007-video-add-timings-for-hd720.patch @@ -0,0 +1,27 @@ +From bbfdb465c2970b1cd18fd0ae5adf99e61cfd530e Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Sat, 19 Dec 2009 06:52:43 -0800 +Subject: [PATCH 07/31] video: add timings for hd720 + +--- + drivers/video/modedb.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c +index 48c3ea8..b320a30 100644 +--- a/drivers/video/modedb.c ++++ b/drivers/video/modedb.c +@@ -103,6 +103,10 @@ static const struct fb_videomode modedb[] = { + { NULL, 70, 1024, 768, 13333, 144, 24, 29, 3, 136, 6, 0, + FB_VMODE_NONINTERLACED }, + ++ /* 1280x720 @ 60 Hz, 45 kHz hsync, CEA 681-E Format 4 */ ++ { "hd720", 60, 1280, 720, 13468, 220, 110, 20, 5, 40, 5, 0, ++ FB_VMODE_NONINTERLACED }, ++ + /* 1280x1024 @ 87 Hz interlaced, 51 kHz hsync */ + { NULL, 87, 1280, 1024, 12500, 56, 16, 128, 1, 216, 12, 0, + FB_VMODE_INTERLACED }, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0008-drivers-net-smsc911x-return-ENODEV-if-device-is-not-.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0008-drivers-net-smsc911x-return-ENODEV-if-device-is-not-.patch new file mode 100644 index 0000000000..b798199c7d --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0008-drivers-net-smsc911x-return-ENODEV-if-device-is-not-.patch @@ -0,0 +1,29 @@ +From 45b1b2aefac18adf9246b56f82355597b26e997b Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Tue, 15 Dec 2009 15:17:44 -0800 +Subject: [PATCH 08/31] drivers: net: smsc911x: return ENODEV if device is not found + +Signed-off-by: Steve Sakoman +--- + drivers/net/smsc911x.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/drivers/net/smsc911x.c b/drivers/net/smsc911x.c +index 4b42ecc..5c1202b 100644 +--- a/drivers/net/smsc911x.c ++++ b/drivers/net/smsc911x.c +@@ -2028,8 +2028,10 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) + } + + retval = smsc911x_init(dev); +- if (retval < 0) ++ if (retval < 0) { ++ retval = -ENODEV; + goto out_unmap_io_3; ++ } + + /* configure irq polarity and type before connecting isr */ + if (pdata->config.irq_polarity == SMSC911X_IRQ_POLARITY_ACTIVE_HIGH) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0009-drivers-input-touchscreen-ads7846-return-ENODEV-if-d.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0009-drivers-input-touchscreen-ads7846-return-ENODEV-if-d.patch new file mode 100644 index 0000000000..80b09dd535 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0009-drivers-input-touchscreen-ads7846-return-ENODEV-if-d.patch @@ -0,0 +1,47 @@ +From fda068cf87fc12f12aeaea2e428d78afac43c19b Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Tue, 15 Dec 2009 15:24:10 -0800 +Subject: [PATCH 09/31] drivers: input: touchscreen: ads7846: return ENODEV if device is not found + +Signed-off-by: Steve Sakoman +--- + drivers/input/touchscreen/ads7846.c | 13 ++++++++++--- + 1 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c +index 1de1c19..097db10 100644 +--- a/drivers/input/touchscreen/ads7846.c ++++ b/drivers/input/touchscreen/ads7846.c +@@ -1338,11 +1338,18 @@ static int __devinit ads7846_probe(struct spi_device *spi) + * the touchscreen, in case it's not connected. + */ + if (ts->model == 7845) +- ads7845_read12_ser(&spi->dev, PWRDOWN); ++ err = ads7845_read12_ser(&spi->dev, PWRDOWN); + else +- (void) ads7846_read12_ser(&spi->dev, ++ err = ads7846_read12_ser(&spi->dev, + READ_12BIT_SER(vaux) | ADS_PD10_ALL_ON); + ++ /* if sample is all 0's or all 1's then there is no device on spi */ ++ if ( (err == 0x000) || (err == 0xfff)) { ++ dev_info(&spi->dev, "no device detected, test read result was 0x%08X\n", err); ++ err = -ENODEV; ++ goto err_free_irq; ++ } ++ + err = sysfs_create_group(&spi->dev.kobj, &ads784x_attr_group); + if (err) + goto err_remove_hwmon; +@@ -1366,7 +1373,7 @@ static int __devinit ads7846_probe(struct spi_device *spi) + err_put_regulator: + regulator_put(ts->reg); + err_free_gpio: +- if (!ts->get_pendown_state) ++ if (!ts->get_pendown_state && ts->gpio_pendown != -1) + gpio_free(ts->gpio_pendown); + err_cleanup_filter: + if (ts->filter_cleanup) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0010-Revert-omap2_mcspi-Flush-posted-writes.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0010-Revert-omap2_mcspi-Flush-posted-writes.patch new file mode 100644 index 0000000000..ef74568fa4 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0010-Revert-omap2_mcspi-Flush-posted-writes.patch @@ -0,0 +1,25 @@ +From 44940d48b3d535072e6a4d225173c3115bacc75b Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Thu, 3 Mar 2011 13:29:30 -0800 +Subject: [PATCH 10/31] Revert "omap2_mcspi: Flush posted writes" + +This reverts commit a330ce2001b290c59fe98c37e981683ef0a75fdf. +--- + drivers/spi/omap2_mcspi.c | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/drivers/spi/omap2_mcspi.c b/drivers/spi/omap2_mcspi.c +index 6f86ba0..6094be7 100644 +--- a/drivers/spi/omap2_mcspi.c ++++ b/drivers/spi/omap2_mcspi.c +@@ -195,7 +195,6 @@ static inline void mcspi_write_chconf0(const struct spi_device *spi, u32 val) + + cs->chconf0 = val; + mcspi_write_cs_reg(spi, OMAP2_MCSPI_CHCONF0, val); +- mcspi_read_cs_reg(spi, OMAP2_MCSPI_CHCONF0); + } + + static void omap2_mcspi_set_dma_req(const struct spi_device *spi, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0011-Revert-omap_hsmmc-improve-interrupt-synchronisation.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0011-Revert-omap_hsmmc-improve-interrupt-synchronisation.patch new file mode 100644 index 0000000000..0f39a8a7e0 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0011-Revert-omap_hsmmc-improve-interrupt-synchronisation.patch @@ -0,0 +1,482 @@ +From b4a56c6ec6df1af55b75608ff7c7cbf91660eb91 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Fri, 19 Nov 2010 15:11:19 -0800 +Subject: [PATCH 11/31] Revert "omap_hsmmc: improve interrupt synchronisation" + +This reverts commit b417577d3b9bbb06a4ddc9aa955af9bd503f7242. + +Conflicts: + + drivers/mmc/host/omap_hsmmc.c +--- + drivers/mmc/host/omap_hsmmc.c | 267 ++++++++++++++++++++--------------------- + 1 files changed, 128 insertions(+), 139 deletions(-) + +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c +index 259ece0..15a023b 100644 +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -159,10 +159,12 @@ struct omap_hsmmc_host { + */ + struct regulator *vcc; + struct regulator *vcc_aux; ++ struct semaphore sem; + struct work_struct mmc_carddetect_work; + void __iomem *base; + resource_size_t mapbase; + spinlock_t irq_lock; /* Prevent races with irq handler */ ++ unsigned long flags; + unsigned int id; + unsigned int dma_len; + unsigned int dma_sg_idx; +@@ -183,7 +185,6 @@ struct omap_hsmmc_host { + int protect_card; + int reqs_blocked; + int use_reg; +- int req_in_progress; + + struct omap_mmc_platform_data *pdata; + }; +@@ -556,32 +557,6 @@ static void omap_hsmmc_stop_clock(struct omap_hsmmc_host *host) + dev_dbg(mmc_dev(host->mmc), "MMC Clock is not stoped\n"); + } + +-static void omap_hsmmc_enable_irq(struct omap_hsmmc_host *host, +- struct mmc_command *cmd) +-{ +- unsigned int irq_mask; +- +- if (host->use_dma) +- irq_mask = INT_EN_MASK & ~(BRR_ENABLE | BWR_ENABLE); +- else +- irq_mask = INT_EN_MASK; +- +- /* Disable timeout for erases */ +- if (cmd->opcode == MMC_ERASE) +- irq_mask &= ~DTO_ENABLE; +- +- OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR); +- OMAP_HSMMC_WRITE(host->base, ISE, irq_mask); +- OMAP_HSMMC_WRITE(host->base, IE, irq_mask); +-} +- +-static void omap_hsmmc_disable_irq(struct omap_hsmmc_host *host) +-{ +- OMAP_HSMMC_WRITE(host->base, ISE, 0); +- OMAP_HSMMC_WRITE(host->base, IE, 0); +- OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR); +-} +- + #ifdef CONFIG_PM + + /* +@@ -650,7 +625,9 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host) + && time_before(jiffies, timeout)) + ; + +- omap_hsmmc_disable_irq(host); ++ OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR); ++ OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK); ++ OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK); + + /* Do not initialize card-specific things if the power is off */ + if (host->power_mode == MMC_POWER_OFF) +@@ -753,8 +730,6 @@ static void send_init_stream(struct omap_hsmmc_host *host) + return; + + disable_irq(host->irq); +- +- OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK); + OMAP_HSMMC_WRITE(host->base, CON, + OMAP_HSMMC_READ(host->base, CON) | INIT_STREAM); + OMAP_HSMMC_WRITE(host->base, CMD, INIT_STREAM_CMD); +@@ -820,7 +795,17 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, + mmc_hostname(host->mmc), cmd->opcode, cmd->arg); + host->cmd = cmd; + +- omap_hsmmc_enable_irq(host, cmd); ++ /* ++ * Clear status bits and enable interrupts ++ */ ++ OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR); ++ OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK); ++ ++ if (host->use_dma) ++ OMAP_HSMMC_WRITE(host->base, IE, ++ INT_EN_MASK & ~(BRR_ENABLE | BWR_ENABLE)); ++ else ++ OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK); + + host->response_busy = 0; + if (cmd->flags & MMC_RSP_PRESENT) { +@@ -854,7 +839,13 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, + if (host->use_dma) + cmdreg |= DMA_EN; + +- host->req_in_progress = 1; ++ /* ++ * In an interrupt context (i.e. STOP command), the spinlock is unlocked ++ * by the interrupt handler, otherwise (i.e. for a new request) it is ++ * unlocked here. ++ */ ++ if (!in_interrupt()) ++ spin_unlock_irqrestore(&host->irq_lock, host->flags); + + OMAP_HSMMC_WRITE(host->base, ARG, cmd->arg); + OMAP_HSMMC_WRITE(host->base, CMD, cmdreg); +@@ -869,23 +860,6 @@ omap_hsmmc_get_dma_dir(struct omap_hsmmc_host *host, struct mmc_data *data) + return DMA_FROM_DEVICE; + } + +-static void omap_hsmmc_request_done(struct omap_hsmmc_host *host, struct mmc_request *mrq) +-{ +- int dma_ch; +- +- spin_lock(&host->irq_lock); +- host->req_in_progress = 0; +- dma_ch = host->dma_ch; +- spin_unlock(&host->irq_lock); +- +- omap_hsmmc_disable_irq(host); +- /* Do not complete the request if DMA is still in progress */ +- if (mrq->data && host->use_dma && dma_ch != -1) +- return; +- host->mrq = NULL; +- mmc_request_done(host->mmc, mrq); +-} +- + /* + * Notify the transfer complete to MMC core + */ +@@ -902,19 +876,25 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data) + return; + } + +- omap_hsmmc_request_done(host, mrq); ++ host->mrq = NULL; ++ mmc_request_done(host->mmc, mrq); + return; + } + + host->data = NULL; + ++ if (host->use_dma && host->dma_ch != -1) ++ dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, ++ omap_hsmmc_get_dma_dir(host, data)); ++ + if (!data->error) + data->bytes_xfered += data->blocks * (data->blksz); + else + data->bytes_xfered = 0; + + if (!data->stop) { +- omap_hsmmc_request_done(host, data->mrq); ++ host->mrq = NULL; ++ mmc_request_done(host->mmc, data->mrq); + return; + } + omap_hsmmc_start_command(host, data->stop, NULL); +@@ -940,8 +920,10 @@ omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) + cmd->resp[0] = OMAP_HSMMC_READ(host->base, RSP10); + } + } +- if ((host->data == NULL && !host->response_busy) || cmd->error) +- omap_hsmmc_request_done(host, cmd->mrq); ++ if ((host->data == NULL && !host->response_busy) || cmd->error) { ++ host->mrq = NULL; ++ mmc_request_done(host->mmc, cmd->mrq); ++ } + } + + /* +@@ -949,19 +931,14 @@ omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) + */ + static void omap_hsmmc_dma_cleanup(struct omap_hsmmc_host *host, int errno) + { +- int dma_ch; +- + host->data->error = errno; + +- spin_lock(&host->irq_lock); +- dma_ch = host->dma_ch; +- host->dma_ch = -1; +- spin_unlock(&host->irq_lock); +- +- if (host->use_dma && dma_ch != -1) { ++ if (host->use_dma && host->dma_ch != -1) { + dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, host->dma_len, + omap_hsmmc_get_dma_dir(host, host->data)); +- omap_free_dma(dma_ch); ++ omap_free_dma(host->dma_ch); ++ host->dma_ch = -1; ++ up(&host->sem); + } + host->data = NULL; + } +@@ -1034,21 +1011,28 @@ static inline void omap_hsmmc_reset_controller_fsm(struct omap_hsmmc_host *host, + __func__); + } + +-static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) ++/* ++ * MMC controller IRQ handler ++ */ ++static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id) + { ++ struct omap_hsmmc_host *host = dev_id; + struct mmc_data *data; +- int end_cmd = 0, end_trans = 0; +- +- if (!host->req_in_progress) { +- do { +- OMAP_HSMMC_WRITE(host->base, STAT, status); +- /* Flush posted write */ +- status = OMAP_HSMMC_READ(host->base, STAT); +- } while (status & INT_EN_MASK); +- return; ++ int end_cmd = 0, end_trans = 0, status; ++ ++ spin_lock(&host->irq_lock); ++ ++ if (host->mrq == NULL) { ++ OMAP_HSMMC_WRITE(host->base, STAT, ++ OMAP_HSMMC_READ(host->base, STAT)); ++ /* Flush posted write */ ++ OMAP_HSMMC_READ(host->base, STAT); ++ spin_unlock(&host->irq_lock); ++ return IRQ_HANDLED; + } + + data = host->data; ++ status = OMAP_HSMMC_READ(host->base, STAT); + dev_dbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status); + + if (status & ERR) { +@@ -1101,27 +1085,15 @@ static void omap_hsmmc_do_irq(struct omap_hsmmc_host *host, int status) + } + + OMAP_HSMMC_WRITE(host->base, STAT, status); ++ /* Flush posted write */ ++ OMAP_HSMMC_READ(host->base, STAT); + + if (end_cmd || ((status & CC) && host->cmd)) + omap_hsmmc_cmd_done(host, host->cmd); + if ((end_trans || (status & TC)) && host->mrq) + omap_hsmmc_xfer_done(host, data); +-} +- +-/* +- * MMC controller IRQ handler +- */ +-static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id) +-{ +- struct omap_hsmmc_host *host = dev_id; +- int status; + +- status = OMAP_HSMMC_READ(host->base, STAT); +- do { +- omap_hsmmc_do_irq(host, status); +- /* Flush posted write */ +- status = OMAP_HSMMC_READ(host->base, STAT); +- } while (status & INT_EN_MASK); ++ spin_unlock(&host->irq_lock); + + return IRQ_HANDLED; + } +@@ -1316,11 +1288,9 @@ static void omap_hsmmc_config_dma_params(struct omap_hsmmc_host *host, + /* + * DMA call back function + */ +-static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *cb_data) ++static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *data) + { +- struct omap_hsmmc_host *host = cb_data; +- struct mmc_data *data = host->mrq->data; +- int dma_ch, req_in_progress; ++ struct omap_hsmmc_host *host = data; + + if (!(ch_status & OMAP_DMA_BLOCK_IRQ)) { + dev_warn(mmc_dev(host->mmc), "unexpected dma status %x\n", +@@ -1328,38 +1298,24 @@ static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *cb_data) + return; + } + +- spin_lock(&host->irq_lock); +- if (host->dma_ch < 0) { +- spin_unlock(&host->irq_lock); ++ if (host->dma_ch < 0) + return; +- } + + host->dma_sg_idx++; + if (host->dma_sg_idx < host->dma_len) { + /* Fire up the next transfer. */ +- omap_hsmmc_config_dma_params(host, data, +- data->sg + host->dma_sg_idx); +- spin_unlock(&host->irq_lock); ++ omap_hsmmc_config_dma_params(host, host->data, ++ host->data->sg + host->dma_sg_idx); + return; + } + +- dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->dma_len, +- omap_hsmmc_get_dma_dir(host, data)); +- +- req_in_progress = host->req_in_progress; +- dma_ch = host->dma_ch; ++ omap_free_dma(host->dma_ch); + host->dma_ch = -1; +- spin_unlock(&host->irq_lock); +- +- omap_free_dma(dma_ch); +- +- /* If DMA has finished after TC, complete the request */ +- if (!req_in_progress) { +- struct mmc_request *mrq = host->mrq; +- +- host->mrq = NULL; +- mmc_request_done(host->mmc, mrq); +- } ++ /* ++ * DMA Callback: run in interrupt context. ++ * mutex_unlock will throw a kernel warning if used. ++ */ ++ up(&host->sem); + } + + /* +@@ -1368,7 +1324,7 @@ static void omap_hsmmc_dma_cb(int lch, u16 ch_status, void *cb_data) + static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host, + struct mmc_request *req) + { +- int dma_ch = 0, ret = 0, i; ++ int dma_ch = 0, ret = 0, err = 1, i; + struct mmc_data *data = req->data; + + /* Sanity check: all the SG entries must be aligned by block size. */ +@@ -1385,7 +1341,23 @@ static int omap_hsmmc_start_dma_transfer(struct omap_hsmmc_host *host, + */ + return -EINVAL; + +- BUG_ON(host->dma_ch != -1); ++ /* ++ * If for some reason the DMA transfer is still active, ++ * we wait for timeout period and free the dma ++ */ ++ if (host->dma_ch != -1) { ++ set_current_state(TASK_UNINTERRUPTIBLE); ++ schedule_timeout(100); ++ if (down_trylock(&host->sem)) { ++ omap_free_dma(host->dma_ch); ++ host->dma_ch = -1; ++ up(&host->sem); ++ return err; ++ } ++ } else { ++ if (down_trylock(&host->sem)) ++ return err; ++ } + + ret = omap_request_dma(omap_hsmmc_get_dma_sync_dev(host, data), + "MMC/SD", omap_hsmmc_dma_cb, host, &dma_ch); +@@ -1485,27 +1457,37 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) + struct omap_hsmmc_host *host = mmc_priv(mmc); + int err; + +- BUG_ON(host->req_in_progress); +- BUG_ON(host->dma_ch != -1); +- if (host->protect_card) { +- if (host->reqs_blocked < 3) { +- /* +- * Ensure the controller is left in a consistent +- * state by resetting the command and data state +- * machines. +- */ +- omap_hsmmc_reset_controller_fsm(host, SRD); +- omap_hsmmc_reset_controller_fsm(host, SRC); +- host->reqs_blocked += 1; +- } +- req->cmd->error = -EBADF; +- if (req->data) +- req->data->error = -EBADF; +- req->cmd->retries = 0; +- mmc_request_done(mmc, req); +- return; +- } else if (host->reqs_blocked) +- host->reqs_blocked = 0; ++ /* ++ * Prevent races with the interrupt handler because of unexpected ++ * interrupts, but not if we are already in interrupt context i.e. ++ * retries. ++ */ ++ if (!in_interrupt()) { ++ spin_lock_irqsave(&host->irq_lock, host->flags); ++ /* ++ * Protect the card from I/O if there is a possibility ++ * it can be removed. ++ */ ++ if (host->protect_card) { ++ if (host->reqs_blocked < 3) { ++ /* ++ * Ensure the controller is left in a consistent ++ * state by resetting the command and data state ++ * machines. ++ */ ++ omap_hsmmc_reset_controller_fsm(host, SRD); ++ omap_hsmmc_reset_controller_fsm(host, SRC); ++ host->reqs_blocked += 1; ++ } ++ req->cmd->error = -EBADF; ++ if (req->data) ++ req->data->error = -EBADF; ++ spin_unlock_irqrestore(&host->irq_lock, host->flags); ++ mmc_request_done(mmc, req); ++ return; ++ } else if (host->reqs_blocked) ++ host->reqs_blocked = 0; ++ } + WARN_ON(host->mrq != NULL); + host->mrq = req; + err = omap_hsmmc_prepare_data(host, req); +@@ -1514,6 +1496,8 @@ static void omap_hsmmc_request(struct mmc_host *mmc, struct mmc_request *req) + if (req->data) + req->data->error = err; + host->mrq = NULL; ++ if (!in_interrupt()) ++ spin_unlock_irqrestore(&host->irq_lock, host->flags); + mmc_request_done(mmc, req); + return; + } +@@ -2093,6 +2077,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) + mmc->f_min = 400000; + mmc->f_max = 52000000; + ++ sema_init(&host->sem, 1); + spin_lock_init(&host->irq_lock); + + host->iclk = clk_get(&pdev->dev, "ick"); +@@ -2235,7 +2220,8 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) + pdata->resume = omap_hsmmc_resume_cdirq; + } + +- omap_hsmmc_disable_irq(host); ++ OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK); ++ OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK); + + mmc_host_lazy_disable(host->mmc); + +@@ -2356,7 +2342,10 @@ static int omap_hsmmc_suspend(struct device *dev) + ret = mmc_suspend_host(host->mmc); + mmc_host_enable(host->mmc); + if (ret == 0) { +- omap_hsmmc_disable_irq(host); ++ OMAP_HSMMC_WRITE(host->base, ISE, 0); ++ OMAP_HSMMC_WRITE(host->base, IE, 0); ++ ++ + OMAP_HSMMC_WRITE(host->base, HCTL, + OMAP_HSMMC_READ(host->base, HCTL) & ~SDBP); + mmc_host_disable(host->mmc); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch new file mode 100644 index 0000000000..4c06145525 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch @@ -0,0 +1,51 @@ +From 796b0fc090132a5ea3849bd3177cb88c64ad2160 Mon Sep 17 00:00:00 2001 +From: David Vrabel +Date: Fri, 2 Apr 2010 08:41:47 -0700 +Subject: [PATCH 12/31] Don't turn SDIO cards off to save power. Doing so will lose all internal state in the card. + +Signed-off-by: David Vrabel +--- + drivers/mmc/host/omap_hsmmc.c | 12 ++++++++---- + 1 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c +index 15a023b..83f93ab 100644 +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -29,6 +29,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -1760,8 +1761,12 @@ static int omap_hsmmc_sleep_to_off(struct omap_hsmmc_host *host) + mmc_slot(host).card_detect || + (mmc_slot(host).get_cover_state && + mmc_slot(host).get_cover_state(host->dev, host->slot_id)))) { +- mmc_release_host(host->mmc); +- return 0; ++ goto out; ++ } ++ ++ /* Don't turn SDIO cards off. */ ++ if (host->mmc->card && mmc_card_sdio(host->mmc->card)) { ++ goto out; + } + + mmc_slot(host).set_power(host->dev, host->slot_id, 0, 0); +@@ -1772,9 +1777,8 @@ static int omap_hsmmc_sleep_to_off(struct omap_hsmmc_host *host) + host->dpm_state == CARDSLEEP ? "CARDSLEEP" : "REGSLEEP"); + + host->dpm_state = OFF; +- ++out: + mmc_release_host(host->mmc); +- + return 0; + } + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0013-Enable-the-use-of-SDIO-card-interrupts.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0013-Enable-the-use-of-SDIO-card-interrupts.patch new file mode 100644 index 0000000000..29f5e17227 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0013-Enable-the-use-of-SDIO-card-interrupts.patch @@ -0,0 +1,288 @@ +From 9231d1d9fac779c95809dedf95fde64738b4186f Mon Sep 17 00:00:00 2001 +From: David Vrabel +Date: Fri, 2 Apr 2010 08:42:22 -0700 +Subject: [PATCH 13/31] Enable the use of SDIO card interrupts. + +FCLK must be enabled while SDIO interrupts are enabled or the MMC +module won't wake-up (even though ENAWAKEUP in SYSCONFIG and IWE in +HTCL have been set). Enabling the MMC module to wake-up would require +configuring the MMC module (and the mmci_dat[1] GPIO when the CORE +power domain is OFF) as wake-up sources in the PRCM. + +The writes to STAT and ISE when starting a command are unnecessary and +have been removed. + +Signed-off-by: David Vrabel +--- + drivers/mmc/host/omap_hsmmc.c | 118 +++++++++++++++++++++++++++++------------ + 1 files changed, 83 insertions(+), 35 deletions(-) + +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c +index 83f93ab..d57686c 100644 +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -67,6 +67,7 @@ + #define SDVS_MASK 0x00000E00 + #define SDVSCLR 0xFFFFF1FF + #define SDVSDET 0x00000400 ++#define ENAWAKEUP (1 << 2) + #define AUTOIDLE 0x1 + #define SDBP (1 << 8) + #define DTO 0xe +@@ -77,10 +78,13 @@ + #define CLKD_SHIFT 6 + #define DTO_MASK 0x000F0000 + #define DTO_SHIFT 16 ++#define CIRQ_ENABLE (1 << 8) + #define INT_EN_MASK 0x307F0033 + #define BWR_ENABLE (1 << 4) + #define BRR_ENABLE (1 << 5) + #define DTO_ENABLE (1 << 20) ++#define CTPL (1 << 11) ++#define CLKEXTFREE (1 << 16) + #define INIT_STREAM (1 << 1) + #define DP_SELECT (1 << 21) + #define DDIR (1 << 4) +@@ -88,10 +92,12 @@ + #define MSBS (1 << 5) + #define BCE (1 << 1) + #define FOUR_BIT (1 << 1) ++#define IWE (1 << 24) + #define DW8 (1 << 5) + #define CC 0x1 + #define TC 0x02 + #define OD 0x1 ++#define CIRQ (1 << 8) + #define ERR (1 << 15) + #define CMD_TIMEOUT (1 << 16) + #define DATA_TIMEOUT (1 << 20) +@@ -186,6 +192,7 @@ struct omap_hsmmc_host { + int protect_card; + int reqs_blocked; + int use_reg; ++ int sdio_int; + + struct omap_mmc_platform_data *pdata; + }; +@@ -598,7 +605,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host) + ; + + OMAP_HSMMC_WRITE(host->base, SYSCONFIG, +- OMAP_HSMMC_READ(host->base, SYSCONFIG) | AUTOIDLE); ++ OMAP_HSMMC_READ(host->base, SYSCONFIG) | AUTOIDLE | ENAWAKEUP); + + if (host->id == OMAP_MMC1_DEVID) { + if (host->power_mode != MMC_POWER_OFF && +@@ -613,7 +620,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host) + } + + OMAP_HSMMC_WRITE(host->base, HCTL, +- OMAP_HSMMC_READ(host->base, HCTL) | hctl); ++ OMAP_HSMMC_READ(host->base, HCTL) | hctl | IWE); + + OMAP_HSMMC_WRITE(host->base, CAPA, + OMAP_HSMMC_READ(host->base, CAPA) | capa); +@@ -627,7 +634,7 @@ static int omap_hsmmc_context_restore(struct omap_hsmmc_host *host) + ; + + OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR); +- OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK); ++ OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK | CIRQ); + OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK); + + /* Do not initialize card-specific things if the power is off */ +@@ -791,22 +798,19 @@ omap_hsmmc_start_command(struct omap_hsmmc_host *host, struct mmc_command *cmd, + struct mmc_data *data) + { + int cmdreg = 0, resptype = 0, cmdtype = 0; ++ int int_en_mask = INT_EN_MASK; + + dev_dbg(mmc_dev(host->mmc), "%s: CMD%d, argument 0x%08x\n", + mmc_hostname(host->mmc), cmd->opcode, cmd->arg); + host->cmd = cmd; + +- /* +- * Clear status bits and enable interrupts +- */ +- OMAP_HSMMC_WRITE(host->base, STAT, STAT_CLEAR); +- OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK); +- + if (host->use_dma) +- OMAP_HSMMC_WRITE(host->base, IE, +- INT_EN_MASK & ~(BRR_ENABLE | BWR_ENABLE)); +- else +- OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK); ++ int_en_mask &= ~(BRR_ENABLE | BWR_ENABLE); ++ ++ if (host->sdio_int) ++ int_en_mask |= CIRQ; ++ ++ OMAP_HSMMC_WRITE(host->base, IE, int_en_mask); + + host->response_busy = 0; + if (cmd->flags & MMC_RSP_PRESENT) { +@@ -1019,23 +1023,26 @@ static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id) + { + struct omap_hsmmc_host *host = dev_id; + struct mmc_data *data; +- int end_cmd = 0, end_trans = 0, status; ++ u32 status; ++ int end_cmd = 0, end_trans = 0; ++ bool card_irq = false; + + spin_lock(&host->irq_lock); + +- if (host->mrq == NULL) { +- OMAP_HSMMC_WRITE(host->base, STAT, +- OMAP_HSMMC_READ(host->base, STAT)); +- /* Flush posted write */ +- OMAP_HSMMC_READ(host->base, STAT); +- spin_unlock(&host->irq_lock); +- return IRQ_HANDLED; +- } +- +- data = host->data; + status = OMAP_HSMMC_READ(host->base, STAT); ++ OMAP_HSMMC_WRITE(host->base, STAT, status); ++ OMAP_HSMMC_READ(host->base, STAT); /* Flush posted write. */ ++ + dev_dbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status); + ++ if (status & CIRQ) ++ card_irq = true; ++ ++ if (host->mrq == NULL) ++ goto out; ++ ++ data = host->data; ++ + if (status & ERR) { + #ifdef CONFIG_MMC_DEBUG + omap_hsmmc_report_irq(host, status); +@@ -1085,17 +1092,16 @@ static irqreturn_t omap_hsmmc_irq(int irq, void *dev_id) + } + } + +- OMAP_HSMMC_WRITE(host->base, STAT, status); +- /* Flush posted write */ +- OMAP_HSMMC_READ(host->base, STAT); +- + if (end_cmd || ((status & CC) && host->cmd)) + omap_hsmmc_cmd_done(host, host->cmd); + if ((end_trans || (status & TC)) && host->mrq) + omap_hsmmc_xfer_done(host, data); +- ++out: + spin_unlock(&host->irq_lock); + ++ if (card_irq) ++ mmc_signal_sdio_irq(host->mmc); ++ + return IRQ_HANDLED; + } + +@@ -1643,6 +1649,47 @@ static void omap_hsmmc_init_card(struct mmc_host *mmc, struct mmc_card *card) + mmc_slot(host).init_card(card); + } + ++static void omap_hsmmc_enable_sdio_irq(struct mmc_host *mmc, int enable) ++{ ++ struct omap_hsmmc_host *host = mmc_priv(mmc); ++ u32 ie, con; ++ unsigned long flags; ++ ++ spin_lock_irqsave(&host->irq_lock, flags); ++ ++ /* ++ * When interrupts are enabled, CTPL must be set to enable ++ * DAT1 input buffer (or the card interrupt is always ++ * asserted) and FCLK must be enabled as wake-up does not ++ * work. Take care to disable FCLK after all the register ++ * accesses as they might not complete if FCLK is off. ++ * ++ * FIXME: if the MMC module (and the mmci_dat[1] GPIO when the ++ * CORE power domain is OFF) are configured as a wake-up ++ * sources in the PRCM, then FCLK could be switched off. This ++ * might add too much latency. ++ */ ++ con = OMAP_HSMMC_READ(host->base, CON); ++ ie = OMAP_HSMMC_READ(host->base, IE); ++ if (enable) { ++ clk_enable(host->fclk); ++ ie |= CIRQ_ENABLE; ++ con |= CTPL | CLKEXTFREE; ++ host->sdio_int = 1; ++ } else { ++ ie &= ~CIRQ_ENABLE; ++ con &= ~(CTPL | CLKEXTFREE); ++ host->sdio_int = 0; ++ } ++ OMAP_HSMMC_WRITE(host->base, CON, con); ++ OMAP_HSMMC_WRITE(host->base, IE, ie); ++ OMAP_HSMMC_READ(host->base, IE); /* flush posted write */ ++ if (!enable) ++ clk_disable(host->fclk); ++ ++ spin_unlock_irqrestore(&host->irq_lock, flags); ++} ++ + static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host) + { + u32 hctl, capa, value; +@@ -1657,14 +1704,14 @@ static void omap_hsmmc_conf_bus_power(struct omap_hsmmc_host *host) + } + + value = OMAP_HSMMC_READ(host->base, HCTL) & ~SDVS_MASK; +- OMAP_HSMMC_WRITE(host->base, HCTL, value | hctl); ++ OMAP_HSMMC_WRITE(host->base, HCTL, value | hctl | IWE); + + value = OMAP_HSMMC_READ(host->base, CAPA); + OMAP_HSMMC_WRITE(host->base, CAPA, value | capa); + + /* Set the controller to AUTO IDLE mode */ + value = OMAP_HSMMC_READ(host->base, SYSCONFIG); +- OMAP_HSMMC_WRITE(host->base, SYSCONFIG, value | AUTOIDLE); ++ OMAP_HSMMC_WRITE(host->base, SYSCONFIG, value | AUTOIDLE | ENAWAKEUP); + + /* Set SD bus power bit */ + set_sd_bus_power(host); +@@ -1918,7 +1965,7 @@ static const struct mmc_host_ops omap_hsmmc_ops = { + .get_cd = omap_hsmmc_get_cd, + .get_ro = omap_hsmmc_get_ro, + .init_card = omap_hsmmc_init_card, +- /* NYET -- enable_sdio_irq */ ++ .enable_sdio_irq = omap_hsmmc_enable_sdio_irq, + }; + + static const struct mmc_host_ops omap_hsmmc_ps_ops = { +@@ -1929,7 +1976,7 @@ static const struct mmc_host_ops omap_hsmmc_ps_ops = { + .get_cd = omap_hsmmc_get_cd, + .get_ro = omap_hsmmc_get_ro, + .init_card = omap_hsmmc_init_card, +- /* NYET -- enable_sdio_irq */ ++ .enable_sdio_irq = omap_hsmmc_enable_sdio_irq, + }; + + #ifdef CONFIG_DEBUG_FS +@@ -2145,7 +2192,8 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) + mmc->max_seg_size = mmc->max_req_size; + + mmc->caps |= MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED | +- MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_ERASE; ++ MMC_CAP_WAIT_WHILE_BUSY | MMC_CAP_ERASE | ++ MMC_CAP_SDIO_IRQ; + + mmc->caps |= mmc_slot(host).caps; + if (mmc->caps & MMC_CAP_8_BIT_DATA) +@@ -2224,7 +2272,7 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev) + pdata->resume = omap_hsmmc_resume_cdirq; + } + +- OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK); ++ OMAP_HSMMC_WRITE(host->base, ISE, INT_EN_MASK | CIRQ); + OMAP_HSMMC_WRITE(host->base, IE, INT_EN_MASK); + + mmc_host_lazy_disable(host->mmc); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0014-soc-codecs-Enable-audio-capture-by-default-for-twl40.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0014-soc-codecs-Enable-audio-capture-by-default-for-twl40.patch new file mode 100644 index 0000000000..962e664b80 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0014-soc-codecs-Enable-audio-capture-by-default-for-twl40.patch @@ -0,0 +1,27 @@ +From e94f62ff96d19547c5a0d9e99691f19fe91c451a Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Thu, 17 Dec 2009 12:45:20 -0800 +Subject: [PATCH 14/31] soc: codecs: Enable audio capture by default for twl4030 + +--- + sound/soc/codecs/twl4030.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c +index 575238d..bd51f72 100644 +--- a/sound/soc/codecs/twl4030.c ++++ b/sound/soc/codecs/twl4030.c +@@ -56,8 +56,8 @@ static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = { + 0x00, /* REG_OPTION (0x2) */ + 0x00, /* REG_UNKNOWN (0x3) */ + 0x00, /* REG_MICBIAS_CTL (0x4) */ +- 0x00, /* REG_ANAMICL (0x5) */ +- 0x00, /* REG_ANAMICR (0x6) */ ++ 0x34, /* REG_ANAMICL (0x5) */ ++ 0x14, /* REG_ANAMICR (0x6) */ + 0x00, /* REG_AVADC_CTL (0x7) */ + 0x00, /* REG_ADCMICSEL (0x8) */ + 0x00, /* REG_DIGMIXING (0x9) */ +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0015-soc-codecs-twl4030-Turn-on-mic-bias-by-default.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0015-soc-codecs-twl4030-Turn-on-mic-bias-by-default.patch new file mode 100644 index 0000000000..60bf6e2efa --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0015-soc-codecs-twl4030-Turn-on-mic-bias-by-default.patch @@ -0,0 +1,25 @@ +From fadce249fe7562795ce9f8fc92f8aa7a586725dc Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Wed, 29 Dec 2010 11:39:16 -0800 +Subject: [PATCH 15/31] soc: codecs: twl4030: Turn on mic bias by default + +--- + sound/soc/codecs/twl4030.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c +index bd51f72..8949773 100644 +--- a/sound/soc/codecs/twl4030.c ++++ b/sound/soc/codecs/twl4030.c +@@ -55,7 +55,7 @@ static const u8 twl4030_reg[TWL4030_CACHEREGNUM] = { + 0x00, /* REG_CODEC_MODE (0x1) */ + 0x00, /* REG_OPTION (0x2) */ + 0x00, /* REG_UNKNOWN (0x3) */ +- 0x00, /* REG_MICBIAS_CTL (0x4) */ ++ 0x03, /* REG_MICBIAS_CTL (0x4) */ + 0x34, /* REG_ANAMICL (0x5) */ + 0x14, /* REG_ANAMICR (0x6) */ + 0x00, /* REG_AVADC_CTL (0x7) */ +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0016-RTC-add-support-for-backup-battery-recharge.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0016-RTC-add-support-for-backup-battery-recharge.patch new file mode 100644 index 0000000000..23447476d2 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0016-RTC-add-support-for-backup-battery-recharge.patch @@ -0,0 +1,55 @@ +From a49740bb7066dbbf1b7f6bda73cdc45169202ebf Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Thu, 4 Feb 2010 12:26:22 -0800 +Subject: [PATCH 16/31] RTC: add support for backup battery recharge + +--- + drivers/rtc/rtc-twl.c | 25 +++++++++++++++++++++++++ + 1 files changed, 25 insertions(+), 0 deletions(-) + +diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c +index f9a2799..713b8ea 100644 +--- a/drivers/rtc/rtc-twl.c ++++ b/drivers/rtc/rtc-twl.c +@@ -30,6 +30,23 @@ + + #include + ++/* ++ * PM_RECEIVER block register offsets (use TWL4030_MODULE_PM_RECEIVER) ++ */ ++#define REG_BB_CFG 0x12 ++ ++/* PM_RECEIVER BB_CFG bitfields */ ++#define BIT_PM_RECEIVER_BB_CFG_BBCHEN 0x10 ++#define BIT_PM_RECEIVER_BB_CFG_BBSEL 0x0C ++#define BIT_PM_RECEIVER_BB_CFG_BBSEL_2V5 0x00 ++#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3V0 0x04 ++#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3V1 0x08 ++#define BIT_PM_RECEIVER_BB_CFG_BBSEL_3v2 0x0c ++#define BIT_PM_RECEIVER_BB_CFG_BBISEL 0x03 ++#define BIT_PM_RECEIVER_BB_CFG_BBISEL_25UA 0x00 ++#define BIT_PM_RECEIVER_BB_CFG_BBISEL_150UA 0x01 ++#define BIT_PM_RECEIVER_BB_CFG_BBISEL_500UA 0x02 ++#define BIT_PM_RECEIVER_BB_CFG_BBISEL_1MA 0x03 + + /* + * RTC block register offsets (use TWL_MODULE_RTC) +@@ -495,6 +512,14 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev) + if (ret < 0) + goto out2; + ++ /* enable backup battery charging */ ++ /* use a conservative 25uA @ 3.1V */ ++ ret = twl_i2c_write_u8(TWL4030_MODULE_PM_RECEIVER, ++ BIT_PM_RECEIVER_BB_CFG_BBCHEN | ++ BIT_PM_RECEIVER_BB_CFG_BBSEL_3V1 | ++ BIT_PM_RECEIVER_BB_CFG_BBISEL_25UA, ++ REG_BB_CFG); ++ + return ret; + + out2: +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0017-ARM-OMAP2-mmc-twl4030-move-clock-input-selection-pri.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0017-ARM-OMAP2-mmc-twl4030-move-clock-input-selection-pri.patch new file mode 100644 index 0000000000..a95b313259 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0017-ARM-OMAP2-mmc-twl4030-move-clock-input-selection-pri.patch @@ -0,0 +1,39 @@ +From e4e17b2fa3aa84e14303d2270a49f1ac9bf25b5c Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Sun, 24 Jan 2010 09:33:56 -0800 +Subject: [PATCH 17/31] ARM: OMAP2: mmc-twl4030: move clock input selection prior to vcc test + +otherwise it is not executed on systems that use non-twl regulators +--- + arch/arm/mach-omap2/hsmmc.c | 14 ++++++-------- + 1 files changed, 6 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c +index b2f30be..84d5ef6 100644 +--- a/arch/arm/mach-omap2/hsmmc.c ++++ b/arch/arm/mach-omap2/hsmmc.c +@@ -185,15 +185,13 @@ static void hsmmc23_before_set_reg(struct device *dev, int slot, + if (mmc->slots[0].remux) + mmc->slots[0].remux(dev, slot, power_on); + +- if (power_on) { +- /* Only MMC2 supports a CLKIN */ +- if (mmc->slots[0].internal_clock) { +- u32 reg; ++ /* Only MMC2 supports a CLKIN */ ++ if (mmc->slots[0].internal_clock) { ++ u32 reg; + +- reg = omap_ctrl_readl(control_devconf1_offset); +- reg |= OMAP2_MMCSDIO2ADPCLKISEL; +- omap_ctrl_writel(reg, control_devconf1_offset); +- } ++ reg = omap_ctrl_readl(control_devconf1_offset); ++ reg |= OMAP2_MMCSDIO2ADPCLKISEL; ++ omap_ctrl_writel(reg, control_devconf1_offset); + } + } + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0018-Add-power-off-support-for-the-TWL4030-companion.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0018-Add-power-off-support-for-the-TWL4030-companion.patch new file mode 100644 index 0000000000..0083bde1f2 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0018-Add-power-off-support-for-the-TWL4030-companion.patch @@ -0,0 +1,103 @@ +From 80c2126f5bf63ea2d033310e030cac5229865a9a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bernhard=20W=C3=B6rndl-Aichriedler?= +Date: Sat, 15 May 2010 16:34:05 +0200 +Subject: [PATCH 18/31] Add power-off support for the TWL4030 companion + +This patch adds support for the power-off on shutdown feature of the TWL4030 +--- + drivers/mfd/Kconfig | 6 ++++++ + drivers/mfd/twl-core.c | 40 ++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 46 insertions(+), 0 deletions(-) + +diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig +index 3ed3ff0..fe2370a 100644 +--- a/drivers/mfd/Kconfig ++++ b/drivers/mfd/Kconfig +@@ -210,6 +210,12 @@ config TWL4030_CODEC + select MFD_CORE + default n + ++config TWL4030_POWEROFF ++ bool "TWL4030 Allow power-off on shutdown" ++ depends on TWL4030_CORE ++ help ++ Enables the CPU to power-off the system on shutdown ++ + config TWL6030_PWM + tristate "TWL6030 PWM (Pulse Width Modulator) Support" + depends on TWL4030_CORE +diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c +index 960b5be..8804550 100644 +--- a/drivers/mfd/twl-core.c ++++ b/drivers/mfd/twl-core.c +@@ -122,6 +122,12 @@ + #define twl_has_bci() false + #endif + ++#if defined (CONFIG_TWL4030_POWEROFF) ++#define twl_has_poweroff() true ++#else ++#define twl_has_poweroff() false ++#endif ++ + /* Triton Core internal information (BEGIN) */ + + /* Last - for index max*/ +@@ -224,6 +230,10 @@ + #define TWL5031 BIT(2) /* twl5031 has different registers */ + #define TWL6030_CLASS BIT(3) /* TWL6030 class */ + ++/* for pm_power_off */ ++#define PWR_P1_SW_EVENTS 0x10 ++#define PWR_DEVOFF (1 << 0) ++ + /*----------------------------------------------------------------------*/ + + /* is driver active, bound to a chip? */ +@@ -1006,6 +1016,30 @@ static int twl_remove(struct i2c_client *client) + return 0; + } + ++static void twl_poweroff(void) ++{ ++ int err; ++ u8 val; ++ ++ err = twl_i2c_read_u8(TWL4030_MODULE_PM_MASTER, &val, ++ PWR_P1_SW_EVENTS); ++ if (err) { ++ pr_err("%s: i2c error %d while reading TWL4030" ++ "PM_MASTER P1_SW_EVENTS\n", ++ DRIVER_NAME, err); ++ return; ++ } ++ ++ val |= PWR_DEVOFF; ++ ++ err = twl_i2c_write_u8(TWL4030_MODULE_PM_MASTER, val, ++ PWR_P1_SW_EVENTS); ++ if (err) ++ pr_err("%s: i2c error %d while writing TWL4030" ++ "PM_MASTER P1_SW_EVENTS\n", ++ DRIVER_NAME, err); ++} ++ + /* NOTE: this driver only handles a single twl4030/tps659x0 chip */ + static int __devinit + twl_probe(struct i2c_client *client, const struct i2c_device_id *id) +@@ -1093,6 +1127,12 @@ twl_probe(struct i2c_client *client, const struct i2c_device_id *id) + twl_i2c_write_u8(TWL4030_MODULE_INTBR, temp, REG_GPPUPDCTR1); + } + ++ if(twl_has_poweroff()) ++ { ++ /* initialize pm_power_off routine */ ++ pm_power_off = twl_poweroff; ++ } ++ + status = add_children(pdata, id->driver_data); + fail: + if (status < 0) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0019-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0019-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch new file mode 100644 index 0000000000..6643475947 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0019-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch @@ -0,0 +1,33 @@ +From d4f736154c4a873a12408d0d094e2152a4c4dc96 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Thu, 17 Dec 2009 14:27:15 -0800 +Subject: [PATCH 19/31] ARM: OMAP: Add twl4030 madc support to Overo + +Signed-off-by: Steve Sakoman +--- + arch/arm/mach-omap2/board-overo.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c +index 59ca333..86f76e9 100644 +--- a/arch/arm/mach-omap2/board-overo.c ++++ b/arch/arm/mach-omap2/board-overo.c +@@ -637,10 +637,15 @@ static struct twl4030_codec_data overo_codec_data = { + .audio = &overo_audio_data, + }; + ++static struct twl4030_madc_platform_data overo_madc_data = { ++ .irq_line = 1, ++}; ++ + static struct twl4030_platform_data overo_twldata = { + .irq_base = TWL4030_IRQ_BASE, + .irq_end = TWL4030_IRQ_END, + .gpio = &overo_gpio_data, ++ .madc = &overo_madc_data, + .usb = &overo_usb_data, + .codec = &overo_codec_data, + .vmmc1 = &overo_vmmc1, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch new file mode 100644 index 0000000000..7532150366 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch @@ -0,0 +1,46 @@ +From 4f5e04f8fcc6e6835aad7dde949c1cb82b5eaa45 Mon Sep 17 00:00:00 2001 +From: Keerthy +Date: Wed, 4 May 2011 01:14:50 +0530 +Subject: [PATCH 20/31] Enabling Hwmon driver for twl4030-madc + +Signed-off-by: Keerthy +--- + drivers/mfd/twl-core.c | 15 +++++++++++++++ + 1 files changed, 15 insertions(+), 0 deletions(-) + +diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c +index 8804550..d9435e4 100644 +--- a/drivers/mfd/twl-core.c ++++ b/drivers/mfd/twl-core.c +@@ -83,6 +83,13 @@ + #define twl_has_madc() false + #endif + ++#if defined(CONFIG_SENSORS_TWL4030_MADC) ||\ ++ defined(CONFIG_SENSORS_TWL4030_MADC_MODULE) ++#define twl_has_madc_hwmon() true ++#else ++#define twl_has_madc_hwmon() false ++#endif ++ + #ifdef CONFIG_TWL4030_POWER + #define twl_has_power() true + #else +@@ -619,6 +626,14 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) + return PTR_ERR(child); + } + ++if (twl_has_madc_hwmon()) { ++ child = add_child(2, "twl4030_madc_hwmon", ++ NULL, 0, ++ true, pdata->irq_base + MADC_INTR_OFFSET, 0); ++ if (IS_ERR(child)) ++ return PTR_ERR(child); ++ } ++ + if (twl_has_rtc()) { + /* + * REVISIT platform_data here currently might expose the +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0021-mfd-twl-core-enable-madc-clock.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0021-mfd-twl-core-enable-madc-clock.patch new file mode 100644 index 0000000000..65c2630802 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0021-mfd-twl-core-enable-madc-clock.patch @@ -0,0 +1,54 @@ +From faa15ccdcc5690ba83d4d09049222df35f40719d Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Sat, 23 Jan 2010 06:26:54 -0800 +Subject: [PATCH 21/31] mfd: twl-core: enable madc clock + +Now that the madc driver has been merged it is also necessary to enable the clock to the madc block + +Signed-off-by: Steve Sakoman +--- + drivers/mfd/twl-core.c | 8 ++++++++ + include/linux/i2c/twl.h | 1 + + 2 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c +index d9435e4..9096d7d 100644 +--- a/drivers/mfd/twl-core.c ++++ b/drivers/mfd/twl-core.c +@@ -222,6 +222,11 @@ + + /* Few power values */ + #define R_CFG_BOOT 0x05 ++#define R_GPBR1 0x0C ++ ++/* MADC clock values for R_GPBR1 */ ++#define MADC_HFCLK_EN 0x80 ++#define DEFAULT_MADC_CLK_EN 0x10 + + /* some fields in R_CFG_BOOT */ + #define HFCLK_FREQ_19p2_MHZ (1 << 0) +@@ -992,6 +997,9 @@ static void clocks_init(struct device *dev, + + e |= unprotect_pm_master(); + /* effect->MADC+USB ck en */ ++ if (twl_has_madc()) ++ e |= twl_i2c_write_u8(TWL_MODULE_INTBR, ++ MADC_HFCLK_EN | DEFAULT_MADC_CLK_EN, R_GPBR1); + e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, ctrl, R_CFG_BOOT); + e |= protect_pm_master(); + +diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h +index 0c0d1ae..cbbf3b3 100644 +--- a/include/linux/i2c/twl.h ++++ b/include/linux/i2c/twl.h +@@ -74,6 +74,7 @@ + + #define TWL_MODULE_USB TWL4030_MODULE_USB + #define TWL_MODULE_AUDIO_VOICE TWL4030_MODULE_AUDIO_VOICE ++#define TWL_MODULE_INTBR TWL4030_MODULE_INTBR + #define TWL_MODULE_PIH TWL4030_MODULE_PIH + #define TWL_MODULE_MADC TWL4030_MODULE_MADC + #define TWL_MODULE_MAIN_CHARGE TWL4030_MODULE_MAIN_CHARGE +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0022-rtc-twl-Switch-to-using-threaded-irq.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0022-rtc-twl-Switch-to-using-threaded-irq.patch new file mode 100644 index 0000000000..780012a13b --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0022-rtc-twl-Switch-to-using-threaded-irq.patch @@ -0,0 +1,25 @@ +From b94621613e7ece11e6408efe33ceb724892645d1 Mon Sep 17 00:00:00 2001 +From: Ilkka Koskinen +Date: Wed, 16 Mar 2011 16:07:14 +0000 +Subject: [PATCH 22/31] rtc-twl: Switch to using threaded irq + +--- + drivers/rtc/rtc-twl.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c +index 713b8ea..1fe1bc9 100644 +--- a/drivers/rtc/rtc-twl.c ++++ b/drivers/rtc/rtc-twl.c +@@ -479,7 +479,7 @@ static int __devinit twl_rtc_probe(struct platform_device *pdev) + if (ret < 0) + goto out1; + +- ret = request_irq(irq, twl_rtc_interrupt, ++ ret = request_threaded_irq(irq, NULL, twl_rtc_interrupt, + IRQF_TRIGGER_RISING, + dev_name(&rtc->dev), rtc); + if (ret < 0) { +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0023-ARM-OMAP-automatically-set-musb-mode-in-platform-dat.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0023-ARM-OMAP-automatically-set-musb-mode-in-platform-dat.patch new file mode 100644 index 0000000000..bb9408a842 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0023-ARM-OMAP-automatically-set-musb-mode-in-platform-dat.patch @@ -0,0 +1,49 @@ +From 9a400cd7d8af58a7ba9dadaf6208c3f6ec9bb8a5 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Wed, 24 Feb 2010 10:37:22 -0800 +Subject: [PATCH 23/31] ARM: OMAP: automatically set musb mode in platform data based on CONFIG options + +--- + arch/arm/mach-omap2/board-omap3beagle.c | 6 ++++++ + arch/arm/mach-omap2/board-overo.c | 6 ++++++ + 2 files changed, 12 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 33007fd..2de4b02 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -604,7 +604,13 @@ static struct omap_board_mux board_mux[] __initdata = { + + static struct omap_musb_board_data musb_board_data = { + .interface_type = MUSB_INTERFACE_ULPI, ++#if defined(CONFIG_USB_MUSB_OTG) + .mode = MUSB_OTG, ++#elif defined(CONFIG_USB_GADGET_MUSB_HDRC) ++ .mode = MUSB_PERIPHERAL, ++#else ++ .mode = MUSB_HOST, ++#endif + .power = 100, + }; + +diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c +index 86f76e9..61c59fc 100644 +--- a/arch/arm/mach-omap2/board-overo.c ++++ b/arch/arm/mach-omap2/board-overo.c +@@ -729,7 +729,13 @@ static struct omap_board_mux board_mux[] __initdata = { + + static struct omap_musb_board_data musb_board_data = { + .interface_type = MUSB_INTERFACE_ULPI, ++#if defined(CONFIG_USB_MUSB_OTG) + .mode = MUSB_OTG, ++#elif defined(CONFIG_USB_GADGET_MUSB_HDRC) ++ .mode = MUSB_PERIPHERAL, ++#else ++ .mode = MUSB_HOST, ++#endif + .power = 100, + }; + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0024-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0024-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch new file mode 100644 index 0000000000..ce27c93840 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0024-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch @@ -0,0 +1,28 @@ +From 26a79f408bd41ad7b4a47f2683909d3fc1575eab Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Wed, 12 Jan 2011 05:54:55 -0800 +Subject: [PATCH 24/31] omap: mmc: Adjust dto to eliminate timeout errors + +A number of SD card types were experiencing timeout errors. This +could also lead to data corruption in some cases. + +This fix proposed by Sukumar Ghoral of TI. +--- + drivers/mmc/host/omap_hsmmc.c | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c +index d57686c..7fb03e8 100644 +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -1400,6 +1400,7 @@ static void set_data_timeout(struct omap_hsmmc_host *host, + cycle_ns = 1000000000 / (clk_get_rate(host->fclk) / clkd); + timeout = timeout_ns / cycle_ns; + timeout += timeout_clks; ++ timeout *= 2; + if (timeout) { + while ((timeout & 0x80000000) == 0) { + dto += 1; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0025-omap-Fix-mtd-subpage-read-alignment.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0025-omap-Fix-mtd-subpage-read-alignment.patch new file mode 100644 index 0000000000..f16ee2f152 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0025-omap-Fix-mtd-subpage-read-alignment.patch @@ -0,0 +1,95 @@ +From a13b58ba9d6e0aa0fe0d2dc5b51de545cea2ee9e Mon Sep 17 00:00:00 2001 +From: Charles Manning +Date: Tue, 18 Jan 2011 11:25:25 +1300 +Subject: [PATCH 25/31] omap: Fix mtd subpage read alignment + +This allows the omap2 prefetch engine to work properly for subpage +reads. Without this ECC errors will stop UBIFS from working. + +Signed-off-by: Charles Manning +--- + drivers/mtd/nand/nand_base.c | 19 +++++++++++++++++++ + drivers/mtd/nand/omap2.c | 1 + + include/linux/mtd/nand.h | 3 +++ + 3 files changed, 23 insertions(+), 0 deletions(-) + +diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c +index c54a4cb..6ca7098 100644 +--- a/drivers/mtd/nand/nand_base.c ++++ b/drivers/mtd/nand/nand_base.c +@@ -1157,6 +1157,22 @@ static int nand_read_page_swecc(struct mtd_info *mtd, struct nand_chip *chip, + } + + /** ++ * nand_align_subpage32 - function to align subpage read to 32-bits ++ * @mtd: mtd info structure ++ * @buf: pointer to offset that needs to be aligned ++ * @len: pointer to length that needs to be aligned. ++ */ ++ ++void nand_align_subpage32(int *offs, int *len) ++{ ++ int diff = *offs & 3; ++ ++ *offs = *offs - diff; ++ *len = (*len + diff + 3) & ~3; ++} ++EXPORT_SYMBOL(nand_align_subpage32); ++ ++/** + * nand_read_subpage - [REPLACABLE] software ecc based sub-page read function + * @mtd: mtd info structure + * @chip: nand chip info structure +@@ -1221,6 +1237,9 @@ static int nand_read_subpage(struct mtd_info *mtd, struct nand_chip *chip, + if (eccpos[index + (num_steps * chip->ecc.bytes)] & (busw - 1)) + aligned_len++; + ++ if(chip->align_subpage) ++ chip->align_subpage(&aligned_pos, &aligned_len); ++ + chip->cmdfunc(mtd, NAND_CMD_RNDOUT, + mtd->writesize + aligned_pos, -1); + chip->read_buf(mtd, &chip->oob_poi[aligned_pos], aligned_len); +diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c +index da9a351..bb89c65 100644 +--- a/drivers/mtd/nand/omap2.c ++++ b/drivers/mtd/nand/omap2.c +@@ -1069,6 +1069,7 @@ static int __devinit omap_nand_probe(struct platform_device *pdev) + info->nand.ecc.correct = omap_correct_data; + info->nand.ecc.mode = NAND_ECC_HW; + } ++ info->nand.align_subpage = nand_align_subpage32; + + /* DIP switches on some boards change between 8 and 16 bit + * bus widths for flash. Try the other width if the first try fails. +diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h +index d441927..311f211 100644 +--- a/include/linux/mtd/nand.h ++++ b/include/linux/mtd/nand.h +@@ -479,6 +479,7 @@ struct nand_buffers { + * additional error status checks (determine if errors are + * correctable). + * @write_page: [REPLACEABLE] High-level page write function ++ * @align_subpage: [OPTIONAL] Aligns subpage read buffer. + */ + + struct nand_chip { +@@ -507,6 +508,7 @@ struct nand_chip { + int (*write_page)(struct mtd_info *mtd, struct nand_chip *chip, + const uint8_t *buf, int page, int cached, int raw); + ++ void (*align_subpage)(int *offs, int *len); + int chip_delay; + unsigned int options; + +@@ -602,6 +604,7 @@ extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr, + int allowbbt); + extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len, + size_t *retlen, uint8_t *buf); ++extern void nand_align_subpage32(int *offs, int *len); + + /** + * struct platform_nand_chip - chip level device structure +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0026-mtd-nand-omap2-Force-all-buffer-reads-to-u32-alignme.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0026-mtd-nand-omap2-Force-all-buffer-reads-to-u32-alignme.patch new file mode 100644 index 0000000000..4a424c9b8a --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0026-mtd-nand-omap2-Force-all-buffer-reads-to-u32-alignme.patch @@ -0,0 +1,35 @@ +From e0756b50ed72ebe28c768c9e17ee7811cc3cc53c Mon Sep 17 00:00:00 2001 +From: Charles Manning +Date: Thu, 16 Dec 2010 20:35:56 -0800 +Subject: [PATCH 26/31] mtd: nand: omap2: Force all buffer reads to u32 alignment + +--- + drivers/mtd/nand/omap2.c | 12 ++++++++++++ + 1 files changed, 12 insertions(+), 0 deletions(-) + +diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c +index bb89c65..832f111 100644 +--- a/drivers/mtd/nand/omap2.c ++++ b/drivers/mtd/nand/omap2.c +@@ -247,6 +247,18 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len) + int ret = 0; + u32 *p = (u32 *)buf; + ++ /* u32 align the buffer and read */ ++ /* NB: This assumes the buf ptr can be aligned *down* which is a valid. ++ * Assumption when dealing with ecc buffers etc. ++ */ ++ u32 addr = (u32)p; ++ ++ int diff = addr & 3; ++ addr -= diff; ++ len += diff; ++ len = (len + 3) & ~3; ++ p = (u32 *)addr; ++ + /* take care of subpage reads */ + if (len % 4) { + if (info->nand.options & NAND_BUSWIDTH_16) +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0027-omap-nand-fix-subpage-ecc-issue-with-prefetch.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0027-omap-nand-fix-subpage-ecc-issue-with-prefetch.patch new file mode 100644 index 0000000000..2427df5f72 --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0027-omap-nand-fix-subpage-ecc-issue-with-prefetch.patch @@ -0,0 +1,63 @@ +From 263890438c545107c50be16e628926531949c1fa Mon Sep 17 00:00:00 2001 +From: kishore kadiyala +Date: Mon, 2 May 2011 11:10:38 +0000 +Subject: [PATCH 27/31] omap : nand : fix subpage ecc issue with prefetch + +For prefetch engine, read and write got broken in commit '2c01946c'. +We never hit a scenario of not getting 'gpmc_prefetch_enable' +call success. +When reading/writing a subpage with a non divisible by 4 ecc number +of bytes, the mis-aligned bytes gets handled first before enabling +the Prefetch engine, then it reads/writes rest of the bytes. + +Signed-off-by: Kishore Kadiyala +Signed-off-by: Vimal Singh +Reported-by: Bryan DE FARIA +--- + drivers/mtd/nand/omap2.c | 12 +++++------- + 1 files changed, 5 insertions(+), 7 deletions(-) + +diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c +index 832f111..471a39b 100644 +--- a/drivers/mtd/nand/omap2.c ++++ b/drivers/mtd/nand/omap2.c +@@ -275,11 +275,10 @@ static void omap_read_buf_pref(struct mtd_info *mtd, u_char *buf, int len) + if (ret) { + /* PFPW engine is busy, use cpu copy method */ + if (info->nand.options & NAND_BUSWIDTH_16) +- omap_read_buf16(mtd, buf, len); ++ omap_read_buf16(mtd, (u_char *)p, len); + else +- omap_read_buf8(mtd, buf, len); ++ omap_read_buf8(mtd, (u_char *)p, len); + } else { +- p = (u32 *) buf; + do { + r_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT); + r_count = r_count >> 2; +@@ -305,7 +304,7 @@ static void omap_write_buf_pref(struct mtd_info *mtd, + struct omap_nand_info, mtd); + uint32_t w_count = 0; + int i = 0, ret = 0; +- u16 *p; ++ u16 *p = (u16 *)buf; + unsigned long tim, limit; + + /* take care of subpage writes */ +@@ -321,11 +320,10 @@ static void omap_write_buf_pref(struct mtd_info *mtd, + if (ret) { + /* PFPW engine is busy, use cpu copy method */ + if (info->nand.options & NAND_BUSWIDTH_16) +- omap_write_buf16(mtd, buf, len); ++ omap_write_buf16(mtd, (u_char *)p, len); + else +- omap_write_buf8(mtd, buf, len); ++ omap_write_buf8(mtd, (u_char *)p, len); + } else { +- p = (u16 *) buf; + while (len) { + w_count = gpmc_read_status(GPMC_PREFETCH_FIFO_CNT); + w_count = w_count >> 1; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0028-OMAP-Overo-Add-support-for-spidev.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0028-OMAP-Overo-Add-support-for-spidev.patch new file mode 100644 index 0000000000..bdbe1feaaa --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0028-OMAP-Overo-Add-support-for-spidev.patch @@ -0,0 +1,46 @@ +From d83a600cbe0cfca8c8fd9f5566dd45166cc9e142 Mon Sep 17 00:00:00 2001 +From: Scott Ellis +Date: Sun, 23 Jan 2011 20:39:35 -0800 +Subject: [PATCH 28/31] OMAP: Overo: Add support for spidev + +--- + arch/arm/mach-omap2/board-overo.c | 16 ++++++++++++++++ + 1 files changed, 16 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c +index 61c59fc..05dd3eb 100644 +--- a/arch/arm/mach-omap2/board-overo.c ++++ b/arch/arm/mach-omap2/board-overo.c +@@ -683,6 +683,14 @@ static struct spi_board_info overo_spi_board_info[] __initdata = { + .irq = OMAP_GPIO_IRQ(OVERO_GPIO_PENDOWN), + .platform_data = &ads7846_config, + }, ++#elif defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) ++ { ++ .modalias = "spidev", ++ .bus_num = 1, ++ .chip_select = 0, ++ .max_speed_hz = 48000000, ++ .mode = SPI_MODE_0, ++ }, + #endif + #if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \ + defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE) +@@ -693,6 +701,14 @@ static struct spi_board_info overo_spi_board_info[] __initdata = { + .max_speed_hz = 500000, + .mode = SPI_MODE_3, + }, ++#elif defined(CONFIG_SPI_SPIDEV) || defined(CONFIG_SPI_SPIDEV_MODULE) ++ { ++ .modalias = "spidev", ++ .bus_num = 1, ++ .chip_select = 1, ++ .max_speed_hz = 48000000, ++ .mode = SPI_MODE_0, ++ }, + #endif + }; + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0029-unionfs-Add-support-for-unionfs-2.5.9.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0029-unionfs-Add-support-for-unionfs-2.5.9.patch new file mode 100644 index 0000000000..236865dbec --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0029-unionfs-Add-support-for-unionfs-2.5.9.patch @@ -0,0 +1,11494 @@ +From 083250cd6541b75535707c1d416cfa3a45ad19a9 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Mon, 2 May 2011 16:14:34 -0700 +Subject: [PATCH 29/31] unionfs: Add support for unionfs 2.5.9 + +--- + Documentation/filesystems/00-INDEX | 2 + + Documentation/filesystems/unionfs/00-INDEX | 10 + + Documentation/filesystems/unionfs/concepts.txt | 287 ++++++ + Documentation/filesystems/unionfs/issues.txt | 28 + + Documentation/filesystems/unionfs/rename.txt | 31 + + Documentation/filesystems/unionfs/usage.txt | 134 +++ + MAINTAINERS | 8 + + fs/Kconfig | 1 + + fs/Makefile | 1 + + fs/namei.c | 38 + + fs/splice.c | 22 +- + fs/stack.c | 14 +- + fs/unionfs/Kconfig | 24 + + fs/unionfs/Makefile | 17 + + fs/unionfs/commonfops.c | 898 +++++++++++++++++++ + fs/unionfs/copyup.c | 896 +++++++++++++++++++ + fs/unionfs/debug.c | 548 ++++++++++++ + fs/unionfs/dentry.c | 406 +++++++++ + fs/unionfs/dirfops.c | 302 +++++++ + fs/unionfs/dirhelper.c | 158 ++++ + fs/unionfs/fanout.h | 407 +++++++++ + fs/unionfs/file.c | 382 ++++++++ + fs/unionfs/inode.c | 1099 ++++++++++++++++++++++++ + fs/unionfs/lookup.c | 569 ++++++++++++ + fs/unionfs/main.c | 763 ++++++++++++++++ + fs/unionfs/mmap.c | 89 ++ + fs/unionfs/rdstate.c | 285 ++++++ + fs/unionfs/rename.c | 522 +++++++++++ + fs/unionfs/sioq.c | 101 +++ + fs/unionfs/sioq.h | 91 ++ + fs/unionfs/subr.c | 95 ++ + fs/unionfs/super.c | 1030 ++++++++++++++++++++++ + fs/unionfs/union.h | 679 +++++++++++++++ + fs/unionfs/unlink.c | 278 ++++++ + fs/unionfs/whiteout.c | 601 +++++++++++++ + fs/unionfs/xattr.c | 173 ++++ + include/linux/fs_stack.h | 14 +- + include/linux/magic.h | 2 + + include/linux/namei.h | 3 + + include/linux/splice.h | 5 + + include/linux/union_fs.h | 22 + + security/security.c | 1 + + 42 files changed, 11024 insertions(+), 12 deletions(-) + create mode 100644 Documentation/filesystems/unionfs/00-INDEX + create mode 100644 Documentation/filesystems/unionfs/concepts.txt + create mode 100644 Documentation/filesystems/unionfs/issues.txt + create mode 100644 Documentation/filesystems/unionfs/rename.txt + create mode 100644 Documentation/filesystems/unionfs/usage.txt + create mode 100644 fs/unionfs/Kconfig + create mode 100644 fs/unionfs/Makefile + create mode 100644 fs/unionfs/commonfops.c + create mode 100644 fs/unionfs/copyup.c + create mode 100644 fs/unionfs/debug.c + create mode 100644 fs/unionfs/dentry.c + create mode 100644 fs/unionfs/dirfops.c + create mode 100644 fs/unionfs/dirhelper.c + create mode 100644 fs/unionfs/fanout.h + create mode 100644 fs/unionfs/file.c + create mode 100644 fs/unionfs/inode.c + create mode 100644 fs/unionfs/lookup.c + create mode 100644 fs/unionfs/main.c + create mode 100644 fs/unionfs/mmap.c + create mode 100644 fs/unionfs/rdstate.c + create mode 100644 fs/unionfs/rename.c + create mode 100644 fs/unionfs/sioq.c + create mode 100644 fs/unionfs/sioq.h + create mode 100644 fs/unionfs/subr.c + create mode 100644 fs/unionfs/super.c + create mode 100644 fs/unionfs/union.h + create mode 100644 fs/unionfs/unlink.c + create mode 100644 fs/unionfs/whiteout.c + create mode 100644 fs/unionfs/xattr.c + create mode 100644 include/linux/union_fs.h + +diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX +index 8c624a1..4aa288b 100644 +--- a/Documentation/filesystems/00-INDEX ++++ b/Documentation/filesystems/00-INDEX +@@ -110,6 +110,8 @@ udf.txt + - info and mount options for the UDF filesystem. + ufs.txt + - info on the ufs filesystem. ++unionfs/ ++ - info on the unionfs filesystem + vfat.txt + - info on using the VFAT filesystem used in Windows NT and Windows 95 + vfs.txt +diff --git a/Documentation/filesystems/unionfs/00-INDEX b/Documentation/filesystems/unionfs/00-INDEX +new file mode 100644 +index 0000000..96fdf67 +--- /dev/null ++++ b/Documentation/filesystems/unionfs/00-INDEX +@@ -0,0 +1,10 @@ ++00-INDEX ++ - this file. ++concepts.txt ++ - A brief introduction of concepts. ++issues.txt ++ - A summary of known issues with unionfs. ++rename.txt ++ - Information regarding rename operations. ++usage.txt ++ - Usage information and examples. +diff --git a/Documentation/filesystems/unionfs/concepts.txt b/Documentation/filesystems/unionfs/concepts.txt +new file mode 100644 +index 0000000..b853788 +--- /dev/null ++++ b/Documentation/filesystems/unionfs/concepts.txt +@@ -0,0 +1,287 @@ ++Unionfs 2.x CONCEPTS: ++===================== ++ ++This file describes the concepts needed by a namespace unification file ++system. ++ ++ ++Branch Priority: ++================ ++ ++Each branch is assigned a unique priority - starting from 0 (highest ++priority). No two branches can have the same priority. ++ ++ ++Branch Mode: ++============ ++ ++Each branch is assigned a mode - read-write or read-only. This allows ++directories on media mounted read-write to be used in a read-only manner. ++ ++ ++Whiteouts: ++========== ++ ++A whiteout removes a file name from the namespace. Whiteouts are needed when ++one attempts to remove a file on a read-only branch. ++ ++Suppose we have a two-branch union, where branch 0 is read-write and branch ++1 is read-only. And a file 'foo' on branch 1: ++ ++./b0/ ++./b1/ ++./b1/foo ++ ++The unified view would simply be: ++ ++./union/ ++./union/foo ++ ++Since 'foo' is stored on a read-only branch, it cannot be removed. A ++whiteout is used to remove the name 'foo' from the unified namespace. Again, ++since branch 1 is read-only, the whiteout cannot be created there. So, we ++try on a higher priority (lower numerically) branch and create the whiteout ++there. ++ ++./b0/ ++./b0/.wh.foo ++./b1/ ++./b1/foo ++ ++Later, when Unionfs traverses branches (due to lookup or readdir), it ++eliminate 'foo' from the namespace (as well as the whiteout itself.) ++ ++ ++Opaque Directories: ++=================== ++ ++Assume we have a unionfs mount comprising of two branches. Branch 0 is ++empty; branch 1 has the directory /a and file /a/f. Let's say we mount a ++union of branch 0 as read-write and branch 1 as read-only. Now, let's say ++we try to perform the following operation in the union: ++ ++ rm -fr a ++ ++Because branch 1 is not writable, we cannot physically remove the file /a/f ++or the directory /a. So instead, we will create a whiteout in branch 0 ++named /.wh.a, masking out the name "a" from branch 1. Next, let's say we ++try to create a directory named "a" as follows: ++ ++ mkdir a ++ ++Because we have a whiteout for "a" already, Unionfs behaves as if "a" ++doesn't exist, and thus will delete the whiteout and replace it with an ++actual directory named "a". ++ ++The problem now is that if you try to "ls" in the union, Unionfs will ++perform is normal directory name unification, for *all* directories named ++"a" in all branches. This will cause the file /a/f from branch 1 to ++re-appear in the union's namespace, which violates Unix semantics. ++ ++To avoid this problem, we have a different form of whiteouts for ++directories, called "opaque directories" (same as BSD Union Mount does). ++Whenever we replace a whiteout with a directory, that directory is marked as ++opaque. In Unionfs 2.x, it means that we create a file named ++/a/.wh.__dir_opaque in branch 0, after having created directory /a there. ++When unionfs notices that a directory is opaque, it stops all namespace ++operations (including merging readdir contents) at that opaque directory. ++This prevents re-exposing names from masked out directories. ++ ++ ++Duplicate Elimination: ++====================== ++ ++It is possible for files on different branches to have the same name. ++Unionfs then has to select which instance of the file to show to the user. ++Given the fact that each branch has a priority associated with it, the ++simplest solution is to take the instance from the highest priority ++(numerically lowest value) and "hide" the others. ++ ++ ++Unlinking: ++========= ++ ++Unlink operation on non-directory instances is optimized to remove the ++maximum possible objects in case multiple underlying branches have the same ++file name. The unlink operation will first try to delete file instances ++from highest priority branch and then move further to delete from remaining ++branches in order of their decreasing priority. Consider a case (F..D..F), ++where F is a file and D is a directory of the same name; here, some ++intermediate branch could have an empty directory instance with the same ++name, so this operation also tries to delete this directory instance and ++proceed further to delete from next possible lower priority branch. The ++unionfs unlink operation will smoothly delete the files with same name from ++all possible underlying branches. In case if some error occurs, it creates ++whiteout in highest priority branch that will hide file instance in rest of ++the branches. An error could occur either if an unlink operations in any of ++the underlying branch failed or if a branch has no write permission. ++ ++This unlinking policy is known as "delete all" and it has the benefit of ++overall reducing the number of inodes used by duplicate files, and further ++reducing the total number of inodes consumed by whiteouts. The cost is of ++extra processing, but testing shows this extra processing is well worth the ++savings. ++ ++ ++Copyup: ++======= ++ ++When a change is made to the contents of a file's data or meta-data, they ++have to be stored somewhere. The best way is to create a copy of the ++original file on a branch that is writable, and then redirect the write ++though to this copy. The copy must be made on a higher priority branch so ++that lookup and readdir return this newer "version" of the file rather than ++the original (see duplicate elimination). ++ ++An entire unionfs mount can be read-only or read-write. If it's read-only, ++then none of the branches will be written to, even if some of the branches ++are physically writeable. If the unionfs mount is read-write, then the ++leftmost (highest priority) branch must be writeable (for copyup to take ++place); the remaining branches can be any mix of read-write and read-only. ++ ++In a writeable mount, unionfs will create new files/dir in the leftmost ++branch. If one tries to modify a file in a read-only branch/media, unionfs ++will copyup the file to the leftmost branch and modify it there. If you try ++to modify a file from a writeable branch which is not the leftmost branch, ++then unionfs will modify it in that branch; this is useful if you, say, ++unify differnet packages (e.g., apache, sendmail, ftpd, etc.) and you want ++changes to specific package files to remain logically in the directory where ++they came from. ++ ++Cache Coherency: ++================ ++ ++Unionfs users often want to be able to modify files and directories directly ++on the lower branches, and have those changes be visible at the Unionfs ++level. This means that data (e.g., pages) and meta-data (dentries, inodes, ++open files, etc.) have to be synchronized between the upper and lower ++layers. In other words, the newest changes from a layer below have to be ++propagated to the Unionfs layer above. If the two layers are not in sync, a ++cache incoherency ensues, which could lead to application failures and even ++oopses. The Linux kernel, however, has a rather limited set of mechanisms ++to ensure this inter-layer cache coherency---so Unionfs has to do most of ++the hard work on its own. ++ ++Maintaining Invariants: ++ ++The way Unionfs ensures cache coherency is as follows. At each entry point ++to a Unionfs file system method, we call a utility function to validate the ++primary objects of this method. Generally, we call unionfs_file_revalidate ++on open files, and __unionfs_d_revalidate_chain on dentries (which also ++validates inodes). These utility functions check to see whether the upper ++Unionfs object is in sync with any of the lower objects that it represents. ++The checks we perform include whether the Unionfs superblock has a newer ++generation number, or if any of the lower objects mtime's or ctime's are ++newer. (Note: generation numbers change when branch-management commands are ++issued, so in a way, maintaining cache coherency is also very important for ++branch-management.) If indeed we determine that any Unionfs object is no ++longer in sync with its lower counterparts, then we rebuild that object ++similarly to how we do so for branch-management. ++ ++While rebuilding Unionfs's objects, we also purge any page mappings and ++truncate inode pages (see fs/unionfs/dentry.c:purge_inode_data). This is to ++ensure that Unionfs will re-get the newer data from the lower branches. We ++perform this purging only if the Unionfs operation in question is a reading ++operation; if Unionfs is performing a data writing operation (e.g., ->write, ++->commit_write, etc.) then we do NOT flush the lower mappings/pages: this is ++because (1) a self-deadlock could occur and (2) the upper Unionfs pages are ++considered more authoritative anyway, as they are newer and will overwrite ++any lower pages. ++ ++Unionfs maintains the following important invariant regarding mtime's, ++ctime's, and atime's: the upper inode object's times are the max() of all of ++the lower ones. For non-directory objects, there's only one object below, ++so the mapping is simple; for directory objects, there could me multiple ++lower objects and we have to sync up with the newest one of all the lower ++ones. This invariant is important to maintain, especially for directories ++(besides, we need this to be POSIX compliant). A union could comprise ++multiple writable branches, each of which could change. If we don't reflect ++the newest possible mtime/ctime, some applications could fail. For example, ++NFSv2/v3 exports check for newer directory mtimes on the server to determine ++if the client-side attribute cache should be purged. ++ ++To maintain these important invariants, of course, Unionfs carefully ++synchronizes upper and lower times in various places. For example, if we ++copy-up a file to a top-level branch, the parent directory where the file ++was copied up to will now have a new mtime: so after a successful copy-up, ++we sync up with the new top-level branch's parent directory mtime. ++ ++Implementation: ++ ++This cache-coherency implementation is efficient because it defers any ++synchronizing between the upper and lower layers until absolutely needed. ++Consider the example a common situation where users perform a lot of lower ++changes, such as untarring a whole package. While these take place, ++typically the user doesn't access the files via Unionfs; only after the ++lower changes are done, does the user try to access the lower files. With ++our cache-coherency implementation, the entirety of the changes to the lower ++branches will not result in a single CPU cycle spent at the Unionfs level ++until the user invokes a system call that goes through Unionfs. ++ ++We have considered two alternate cache-coherency designs. (1) Using the ++dentry/inode notify functionality to register interest in finding out about ++any lower changes. This is a somewhat limited and also a heavy-handed ++approach which could result in many notifications to the Unionfs layer upon ++each small change at the lower layer (imagine a file being modified multiple ++times in rapid succession). (2) Rewriting the VFS to support explicit ++callbacks from lower objects to upper objects. We began exploring such an ++implementation, but found it to be very complicated--it would have resulted ++in massive VFS/MM changes which are unlikely to be accepted by the LKML ++community. We therefore believe that our current cache-coherency design and ++implementation represent the best approach at this time. ++ ++Limitations: ++ ++Our implementation works in that as long as a user process will have caused ++Unionfs to be called, directly or indirectly, even to just do ++->d_revalidate; then we will have purged the current Unionfs data and the ++process will see the new data. For example, a process that continually ++re-reads the same file's data will see the NEW data as soon as the lower ++file had changed, upon the next read(2) syscall (even if the file is still ++open!) However, this doesn't work when the process re-reads the open file's ++data via mmap(2) (unless the user unmaps/closes the file and remaps/reopens ++it). Once we respond to ->readpage(s), then the kernel maps the page into ++the process's address space and there doesn't appear to be a way to force ++the kernel to invalidate those pages/mappings, and force the process to ++re-issue ->readpage. If there's a way to invalidate active mappings and ++force a ->readpage, let us know please (invalidate_inode_pages2 doesn't do ++the trick). ++ ++Our current Unionfs code has to perform many file-revalidation calls. It ++would be really nice if the VFS would export an optional file system hook ++->file_revalidate (similarly to dentry->d_revalidate) that will be called ++before each VFS op that has a "struct file" in it. ++ ++Certain file systems have micro-second granularity (or better) for inode ++times, and asynchronous actions could cause those times to change with some ++small delay. In such cases, Unionfs may see a changed inode time that only ++differs by a tiny fraction of a second: such a change may be a false ++positive indication that the lower object has changed, whereas if unionfs ++waits a little longer, that false indication will not be seen. (These false ++positives are harmless, because they would at most cause unionfs to ++re-validate an object that may need no revalidation, and print a debugging ++message that clutters the console/logs.) Therefore, to minimize the chances ++of these situations, we delay the detection of changed times by a small ++factor of a few seconds, called UNIONFS_MIN_CC_TIME (which defaults to 3 ++seconds, as does NFS). This means that we will detect the change, only a ++couple of seconds later, if indeed the time change persists in the lower ++file object. This delayed detection has an added performance benefit: we ++reduce the number of times that unionfs has to revalidate objects, in case ++there's a lot of concurrent activity on both the upper and lower objects, ++for the same file(s). Lastly, this delayed time attribute detection is ++similar to how NFS clients operate (e.g., acregmin). ++ ++Finally, there is no way currently in Linux to prevent lower directories ++from being moved around (i.e., topology changes); there's no way to prevent ++modifications to directory sub-trees of whole file systems which are mounted ++read-write. It is therefore possible for in-flight operations in unionfs to ++take place, while a lower directory is being moved around. Therefore, if ++you try to, say, create a new file in a directory through unionfs, while the ++directory is being moved around directly, then the new file may get created ++in the new location where that directory was moved to. This is a somewhat ++similar behaviour in NFS: an NFS client could be creating a new file while ++th NFS server is moving th directory around; the file will get successfully ++created in the new location. (The one exception in unionfs is that if the ++branch is marked read-only by unionfs, then a copyup will take place.) ++ ++For more information, see . +diff --git a/Documentation/filesystems/unionfs/issues.txt b/Documentation/filesystems/unionfs/issues.txt +new file mode 100644 +index 0000000..f4b7e7e +--- /dev/null ++++ b/Documentation/filesystems/unionfs/issues.txt +@@ -0,0 +1,28 @@ ++KNOWN Unionfs 2.x ISSUES: ++========================= ++ ++1. Unionfs should not use lookup_one_len() on the underlying f/s as it ++ confuses NFSv4. Currently, unionfs_lookup() passes lookup intents to the ++ lower file-system, this eliminates part of the problem. The remaining ++ calls to lookup_one_len may need to be changed to pass an intent. We are ++ currently introducing VFS changes to fs/namei.c's do_path_lookup() to ++ allow proper file lookup and opening in stackable file systems. ++ ++2. Lockdep (a debugging feature) isn't aware of stacking, and so it ++ incorrectly complains about locking problems. The problem boils down to ++ this: Lockdep considers all objects of a certain type to be in the same ++ class, for example, all inodes. Lockdep doesn't like to see a lock held ++ on two inodes within the same task, and warns that it could lead to a ++ deadlock. However, stackable file systems do precisely that: they lock ++ an upper object, and then a lower object, in a strict order to avoid ++ locking problems; in addition, Unionfs, as a fan-out file system, may ++ have to lock several lower inodes. We are currently looking into Lockdep ++ to see how to make it aware of stackable file systems. For now, we ++ temporarily disable lockdep when calling vfs methods on lower objects, ++ but only for those places where lockdep complained. While this solution ++ may seem unclean, it is not without precedent: other places in the kernel ++ also do similar temporary disabling, of course after carefully having ++ checked that it is the right thing to do. Anyway, you get any warnings ++ from Lockdep, please report them to the Unionfs maintainers. ++ ++For more information, see . +diff --git a/Documentation/filesystems/unionfs/rename.txt b/Documentation/filesystems/unionfs/rename.txt +new file mode 100644 +index 0000000..e20bb82 +--- /dev/null ++++ b/Documentation/filesystems/unionfs/rename.txt +@@ -0,0 +1,31 @@ ++Rename is a complex beast. The following table shows which rename(2) operations ++should succeed and which should fail. ++ ++o: success ++E: error (either unionfs or vfs) ++X: EXDEV ++ ++none = file does not exist ++file = file is a file ++dir = file is a empty directory ++child= file is a non-empty directory ++wh = file is a directory containing only whiteouts; this makes it logically ++ empty ++ ++ none file dir child wh ++file o o E E E ++dir o E o E o ++child X E X E X ++wh o E o E o ++ ++ ++Renaming directories: ++===================== ++ ++Whenever a empty (either physically or logically) directory is being renamed, ++the following sequence of events should take place: ++ ++1) Remove whiteouts from both source and destination directory ++2) Rename source to destination ++3) Make destination opaque to prevent anything under it from showing up ++ +diff --git a/Documentation/filesystems/unionfs/usage.txt b/Documentation/filesystems/unionfs/usage.txt +new file mode 100644 +index 0000000..1adde69 +--- /dev/null ++++ b/Documentation/filesystems/unionfs/usage.txt +@@ -0,0 +1,134 @@ ++Unionfs is a stackable unification file system, which can appear to merge ++the contents of several directories (branches), while keeping their physical ++content separate. Unionfs is useful for unified source tree management, ++merged contents of split CD-ROM, merged separate software package ++directories, data grids, and more. Unionfs allows any mix of read-only and ++read-write branches, as well as insertion and deletion of branches anywhere ++in the fan-out. To maintain Unix semantics, Unionfs handles elimination of ++duplicates, partial-error conditions, and more. ++ ++GENERAL SYNTAX ++============== ++ ++# mount -t unionfs -o , none MOUNTPOINT ++ ++OPTIONS can be any legal combination of: ++ ++- ro # mount file system read-only ++- rw # mount file system read-write ++- remount # remount the file system (see Branch Management below) ++- incgen # increment generation no. (see Cache Consistency below) ++ ++BRANCH-OPTIONS can be either (1) a list of branches given to the "dirs=" ++option, or (2) a list of individual branch manipulation commands, combined ++with the "remount" option, and is further described in the "Branch ++Management" section below. ++ ++The syntax for the "dirs=" mount option is: ++ ++ dirs=branch[=ro|=rw][:...] ++ ++The "dirs=" option takes a colon-delimited list of directories to compose ++the union, with an optional branch mode for each of those directories. ++Directories that come earlier (specified first, on the left) in the list ++have a higher precedence than those which come later. Additionally, ++read-only or read-write permissions of the branch can be specified by ++appending =ro or =rw (default) to each directory. See the Copyup section in ++concepts.txt, for a description of Unionfs's behavior when mixing read-only ++and read-write branches and mounts. ++ ++Syntax: ++ ++ dirs=/branch1[=ro|=rw]:/branch2[=ro|=rw]:...:/branchN[=ro|=rw] ++ ++Example: ++ ++ dirs=/writable_branch=rw:/read-only_branch=ro ++ ++ ++BRANCH MANAGEMENT ++================= ++ ++Once you mount your union for the first time, using the "dirs=" option, you ++can then change the union's overall mode or reconfigure the branches, using ++the remount option, as follows. ++ ++To downgrade a union from read-write to read-only: ++ ++# mount -t unionfs -o remount,ro none MOUNTPOINT ++ ++To upgrade a union from read-only to read-write: ++ ++# mount -t unionfs -o remount,rw none MOUNTPOINT ++ ++To delete a branch /foo, regardless where it is in the current union: ++ ++# mount -t unionfs -o remount,del=/foo none MOUNTPOINT ++ ++To insert (add) a branch /foo before /bar: ++ ++# mount -t unionfs -o remount,add=/bar:/foo none MOUNTPOINT ++ ++To insert (add) a branch /foo (with the "rw" mode flag) before /bar: ++ ++# mount -t unionfs -o remount,add=/bar:/foo=rw none MOUNTPOINT ++ ++To insert (add) a branch /foo (in "rw" mode) at the very beginning (i.e., a ++new highest-priority branch), you can use the above syntax, or use a short ++hand version as follows: ++ ++# mount -t unionfs -o remount,add=/foo none MOUNTPOINT ++ ++To append a branch to the very end (new lowest-priority branch): ++ ++# mount -t unionfs -o remount,add=:/foo none MOUNTPOINT ++ ++To append a branch to the very end (new lowest-priority branch), in ++read-only mode: ++ ++# mount -t unionfs -o remount,add=:/foo=ro none MOUNTPOINT ++ ++Finally, to change the mode of one existing branch, say /foo, from read-only ++to read-write, and change /bar from read-write to read-only: ++ ++# mount -t unionfs -o remount,mode=/foo=rw,mode=/bar=ro none MOUNTPOINT ++ ++Note: in Unionfs 2.x, you cannot set the leftmost branch to readonly because ++then Unionfs won't have any writable place for copyups to take place. ++Moreover, the VFS can get confused when it tries to modify something in a ++file system mounted read-write, but isn't permitted to write to it. ++Instead, you should set the whole union as readonly, as described above. ++If, however, you must set the leftmost branch as readonly, perhaps so you ++can get a snapshot of it at a point in time, then you should insert a new ++writable top-level branch, and mark the one you want as readonly. This can ++be accomplished as follows, assuming that /foo is your current leftmost ++branch: ++ ++# mount -t tmpfs -o size=NNN /new ++# mount -t unionfs -o remount,add=/new,mode=/foo=ro none MOUNTPOINT ++ ++# mount -t unionfs -o remount,del=/new,mode=/foo=rw none MOUNTPOINT ++ ++# umount /new ++ ++CACHE CONSISTENCY ++================= ++ ++If you modify any file on any of the lower branches directly, while there is ++a Unionfs 2.x mounted above any of those branches, you should tell Unionfs ++to purge its caches and re-get the objects. To do that, you have to ++increment the generation number of the superblock using the following ++command: ++ ++# mount -t unionfs -o remount,incgen none MOUNTPOINT ++ ++Note that the older way of incrementing the generation number using an ++ioctl, is no longer supported in Unionfs 2.0 and newer. Ioctls in general ++are not encouraged. Plus, an ioctl is per-file concept, whereas the ++generation number is a per-file-system concept. Worse, such an ioctl ++requires an open file, which then has to be invalidated by the very nature ++of the generation number increase (read: the old generation increase ioctl ++was pretty racy). ++ ++ ++For more information, see . +diff --git a/MAINTAINERS b/MAINTAINERS +index 69f19f1..fd88a30 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -6319,6 +6319,14 @@ F: Documentation/cdrom/ + F: drivers/cdrom/cdrom.c + F: include/linux/cdrom.h + ++UNIONFS ++P: Erez Zadok ++M: ezk@cs.sunysb.edu ++L: unionfs@filesystems.org ++W: http://unionfs.filesystems.org/ ++T: git git.kernel.org/pub/scm/linux/kernel/git/ezk/unionfs.git ++S: Maintained ++ + UNSORTED BLOCK IMAGES (UBI) + M: Artem Bityutskiy + W: http://www.linux-mtd.infradead.org/ +diff --git a/fs/Kconfig b/fs/Kconfig +index f3aa9b0..0e6182c 100644 +--- a/fs/Kconfig ++++ b/fs/Kconfig +@@ -170,6 +170,7 @@ if MISC_FILESYSTEMS + source "fs/adfs/Kconfig" + source "fs/affs/Kconfig" + source "fs/ecryptfs/Kconfig" ++source "fs/unionfs/Kconfig" + source "fs/hfs/Kconfig" + source "fs/hfsplus/Kconfig" + source "fs/befs/Kconfig" +diff --git a/fs/Makefile b/fs/Makefile +index fb68c2b..8ca9290 100644 +--- a/fs/Makefile ++++ b/fs/Makefile +@@ -83,6 +83,7 @@ obj-$(CONFIG_ISO9660_FS) += isofs/ + obj-$(CONFIG_HFSPLUS_FS) += hfsplus/ # Before hfs to find wrapped HFS+ + obj-$(CONFIG_HFS_FS) += hfs/ + obj-$(CONFIG_ECRYPT_FS) += ecryptfs/ ++obj-$(CONFIG_UNION_FS) += unionfs/ + obj-$(CONFIG_VXFS_FS) += freevxfs/ + obj-$(CONFIG_NFS_FS) += nfs/ + obj-$(CONFIG_EXPORTFS) += exportfs/ +diff --git a/fs/namei.c b/fs/namei.c +index e3c4f11..d9f99a4 100644 +--- a/fs/namei.c ++++ b/fs/namei.c +@@ -578,6 +578,7 @@ void release_open_intent(struct nameidata *nd) + fput(file); + } + } ++EXPORT_SYMBOL_GPL(release_open_intent); + + static inline int d_revalidate(struct dentry *dentry, struct nameidata *nd) + { +@@ -1819,6 +1820,42 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len) + return __lookup_hash(&this, base, NULL); + } + ++/* pass nameidata from caller (useful for NFS) */ ++struct dentry *lookup_one_len_nd(const char *name, struct dentry *base, ++ int len, struct nameidata *nd) ++{ ++ struct qstr this; ++ unsigned long hash; ++ unsigned int c; ++ ++ WARN_ON_ONCE(!mutex_is_locked(&base->d_inode->i_mutex)); ++ ++ this.name = name; ++ this.len = len; ++ if (!len) ++ return ERR_PTR(-EACCES); ++ ++ hash = init_name_hash(); ++ while (len--) { ++ c = *(const unsigned char *)name++; ++ if (c == '/' || c == '\0') ++ return ERR_PTR(-EACCES); ++ hash = partial_name_hash(c, hash); ++ } ++ this.hash = end_name_hash(hash); ++ /* ++ * See if the low-level filesystem might want ++ * to use its own hash.. ++ */ ++ if (base->d_flags & DCACHE_OP_HASH) { ++ int err = base->d_op->d_hash(base, base->d_inode, &this); ++ if (err < 0) ++ return ERR_PTR(err); ++ } ++ ++ return __lookup_hash(&this, base, nd); ++} ++ + int user_path_at(int dfd, const char __user *name, unsigned flags, + struct path *path) + { +@@ -3422,6 +3459,7 @@ EXPORT_SYMBOL(get_write_access); /* binfmt_aout */ + EXPORT_SYMBOL(getname); + EXPORT_SYMBOL(lock_rename); + EXPORT_SYMBOL(lookup_one_len); ++EXPORT_SYMBOL(lookup_one_len_nd); + EXPORT_SYMBOL(page_follow_link_light); + EXPORT_SYMBOL(page_put_link); + EXPORT_SYMBOL(page_readlink); +diff --git a/fs/splice.c b/fs/splice.c +index 50a5d97..a3af841 100644 +--- a/fs/splice.c ++++ b/fs/splice.c +@@ -1081,8 +1081,8 @@ EXPORT_SYMBOL(generic_splice_sendpage); + /* + * Attempt to initiate a splice from pipe to file. + */ +-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, +- loff_t *ppos, size_t len, unsigned int flags) ++long vfs_splice_from(struct pipe_inode_info *pipe, struct file *out, ++ loff_t *ppos, size_t len, unsigned int flags) + { + ssize_t (*splice_write)(struct pipe_inode_info *, struct file *, + loff_t *, size_t, unsigned int); +@@ -1105,13 +1105,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out, + + return splice_write(pipe, out, ppos, len, flags); + } ++EXPORT_SYMBOL_GPL(vfs_splice_from); + + /* + * Attempt to initiate a splice from a file to a pipe. + */ +-static long do_splice_to(struct file *in, loff_t *ppos, +- struct pipe_inode_info *pipe, size_t len, +- unsigned int flags) ++long vfs_splice_to(struct file *in, loff_t *ppos, ++ struct pipe_inode_info *pipe, size_t len, ++ unsigned int flags) + { + ssize_t (*splice_read)(struct file *, loff_t *, + struct pipe_inode_info *, size_t, unsigned int); +@@ -1131,6 +1132,7 @@ static long do_splice_to(struct file *in, loff_t *ppos, + + return splice_read(in, ppos, pipe, len, flags); + } ++EXPORT_SYMBOL_GPL(vfs_splice_to); + + /** + * splice_direct_to_actor - splices data directly between two non-pipes +@@ -1200,7 +1202,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd, + size_t read_len; + loff_t pos = sd->pos, prev_pos = pos; + +- ret = do_splice_to(in, &pos, pipe, len, flags); ++ ret = vfs_splice_to(in, &pos, pipe, len, flags); + if (unlikely(ret <= 0)) + goto out_release; + +@@ -1259,8 +1261,8 @@ static int direct_splice_actor(struct pipe_inode_info *pipe, + { + struct file *file = sd->u.file; + +- return do_splice_from(pipe, file, &file->f_pos, sd->total_len, +- sd->flags); ++ return vfs_splice_from(pipe, file, &file->f_pos, sd->total_len, ++ sd->flags); + } + + /** +@@ -1345,7 +1347,7 @@ static long do_splice(struct file *in, loff_t __user *off_in, + } else + off = &out->f_pos; + +- ret = do_splice_from(ipipe, out, off, len, flags); ++ ret = vfs_splice_from(ipipe, out, off, len, flags); + + if (off_out && copy_to_user(off_out, off, sizeof(loff_t))) + ret = -EFAULT; +@@ -1365,7 +1367,7 @@ static long do_splice(struct file *in, loff_t __user *off_in, + } else + off = &in->f_pos; + +- ret = do_splice_to(in, off, opipe, len, flags); ++ ret = vfs_splice_to(in, off, opipe, len, flags); + + if (off_in && copy_to_user(off_in, off, sizeof(loff_t))) + ret = -EFAULT; +diff --git a/fs/stack.c b/fs/stack.c +index 4a6f7f4..7eeef12 100644 +--- a/fs/stack.c ++++ b/fs/stack.c +@@ -1,8 +1,20 @@ ++/* ++ * Copyright (c) 2006-2009 Erez Zadok ++ * Copyright (c) 2006-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2006-2009 Stony Brook University ++ * Copyright (c) 2006-2009 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ + #include + #include + #include + +-/* does _NOT_ require i_mutex to be held. ++/* ++ * does _NOT_ require i_mutex to be held. + * + * This function cannot be inlined since i_size_{read,write} is rather + * heavy-weight on 32-bit systems +diff --git a/fs/unionfs/Kconfig b/fs/unionfs/Kconfig +new file mode 100644 +index 0000000..f3c1ac4 +--- /dev/null ++++ b/fs/unionfs/Kconfig +@@ -0,0 +1,24 @@ ++config UNION_FS ++ tristate "Union file system (EXPERIMENTAL)" ++ depends on EXPERIMENTAL ++ help ++ Unionfs is a stackable unification file system, which appears to ++ merge the contents of several directories (branches), while keeping ++ their physical content separate. ++ ++ See for details ++ ++config UNION_FS_XATTR ++ bool "Unionfs extended attributes" ++ depends on UNION_FS ++ help ++ Extended attributes are name:value pairs associated with inodes by ++ the kernel or by users (see the attr(5) manual page). ++ ++ If unsure, say N. ++ ++config UNION_FS_DEBUG ++ bool "Debug Unionfs" ++ depends on UNION_FS ++ help ++ If you say Y here, you can turn on debugging output from Unionfs. +diff --git a/fs/unionfs/Makefile b/fs/unionfs/Makefile +new file mode 100644 +index 0000000..3e31847 +--- /dev/null ++++ b/fs/unionfs/Makefile +@@ -0,0 +1,17 @@ ++UNIONFS_VERSION="2.5.9 (for 2.6.39-rc5)" ++ ++EXTRA_CFLAGS += -DUNIONFS_VERSION=\"$(UNIONFS_VERSION)\" ++ ++obj-$(CONFIG_UNION_FS) += unionfs.o ++ ++unionfs-y := subr.o dentry.o file.o inode.o main.o super.o \ ++ rdstate.o copyup.o dirhelper.o rename.o unlink.o \ ++ lookup.o commonfops.o dirfops.o sioq.o mmap.o whiteout.o ++ ++unionfs-$(CONFIG_UNION_FS_XATTR) += xattr.o ++ ++unionfs-$(CONFIG_UNION_FS_DEBUG) += debug.o ++ ++ifeq ($(CONFIG_UNION_FS_DEBUG),y) ++EXTRA_CFLAGS += -DDEBUG ++endif +diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c +new file mode 100644 +index 0000000..9f63b1c +--- /dev/null ++++ b/fs/unionfs/commonfops.c +@@ -0,0 +1,898 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * 1) Copyup the file ++ * 2) Rename the file to '.unionfs' - obviously ++ * stolen from NFS's silly rename ++ */ ++static int copyup_deleted_file(struct file *file, struct dentry *dentry, ++ struct dentry *parent, int bstart, int bindex) ++{ ++ static unsigned int counter; ++ const int i_inosize = sizeof(dentry->d_inode->i_ino) * 2; ++ const int countersize = sizeof(counter) * 2; ++ const int nlen = sizeof(".unionfs") + i_inosize + countersize - 1; ++ char name[nlen + 1]; ++ int err; ++ struct dentry *tmp_dentry = NULL; ++ struct dentry *lower_dentry; ++ struct dentry *lower_dir_dentry = NULL; ++ ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bstart); ++ ++ sprintf(name, ".unionfs%*.*lx", ++ i_inosize, i_inosize, lower_dentry->d_inode->i_ino); ++ ++ /* ++ * Loop, looking for an unused temp name to copyup to. ++ * ++ * It's somewhat silly that we look for a free temp tmp name in the ++ * source branch (bstart) instead of the dest branch (bindex), where ++ * the final name will be created. We _will_ catch it if somehow ++ * the name exists in the dest branch, but it'd be nice to catch it ++ * sooner than later. ++ */ ++retry: ++ tmp_dentry = NULL; ++ do { ++ char *suffix = name + nlen - countersize; ++ ++ dput(tmp_dentry); ++ counter++; ++ sprintf(suffix, "%*.*x", countersize, countersize, counter); ++ ++ pr_debug("unionfs: trying to rename %s to %s\n", ++ dentry->d_name.name, name); ++ ++ tmp_dentry = lookup_lck_len(name, lower_dentry->d_parent, ++ nlen); ++ if (IS_ERR(tmp_dentry)) { ++ err = PTR_ERR(tmp_dentry); ++ goto out; ++ } ++ } while (tmp_dentry->d_inode != NULL); /* need negative dentry */ ++ dput(tmp_dentry); ++ ++ err = copyup_named_file(parent->d_inode, file, name, bstart, bindex, ++ i_size_read(file->f_path.dentry->d_inode)); ++ if (err) { ++ if (unlikely(err == -EEXIST)) ++ goto retry; ++ goto out; ++ } ++ ++ /* bring it to the same state as an unlinked file */ ++ lower_dentry = unionfs_lower_dentry_idx(dentry, dbstart(dentry)); ++ if (!unionfs_lower_inode_idx(dentry->d_inode, bindex)) { ++ atomic_inc(&lower_dentry->d_inode->i_count); ++ unionfs_set_lower_inode_idx(dentry->d_inode, bindex, ++ lower_dentry->d_inode); ++ } ++ lower_dir_dentry = lock_parent(lower_dentry); ++ err = vfs_unlink(lower_dir_dentry->d_inode, lower_dentry); ++ unlock_dir(lower_dir_dentry); ++ ++out: ++ if (!err) ++ unionfs_check_dentry(dentry); ++ return err; ++} ++ ++/* ++ * put all references held by upper struct file and free lower file pointer ++ * array ++ */ ++static void cleanup_file(struct file *file) ++{ ++ int bindex, bstart, bend; ++ struct file **lower_files; ++ struct file *lower_file; ++ struct super_block *sb = file->f_path.dentry->d_sb; ++ ++ lower_files = UNIONFS_F(file)->lower_files; ++ bstart = fbstart(file); ++ bend = fbend(file); ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ int i; /* holds (possibly) updated branch index */ ++ int old_bid; ++ ++ lower_file = unionfs_lower_file_idx(file, bindex); ++ if (!lower_file) ++ continue; ++ ++ /* ++ * Find new index of matching branch with an open ++ * file, since branches could have been added or ++ * deleted causing the one with open files to shift. ++ */ ++ old_bid = UNIONFS_F(file)->saved_branch_ids[bindex]; ++ i = branch_id_to_idx(sb, old_bid); ++ if (unlikely(i < 0)) { ++ printk(KERN_ERR "unionfs: no superblock for " ++ "file %p\n", file); ++ continue; ++ } ++ ++ /* decrement count of open files */ ++ branchput(sb, i); ++ /* ++ * fput will perform an mntput for us on the correct branch. ++ * Although we're using the file's old branch configuration, ++ * bindex, which is the old index, correctly points to the ++ * right branch in the file's branch list. In other words, ++ * we're going to mntput the correct branch even if branches ++ * have been added/removed. ++ */ ++ fput(lower_file); ++ UNIONFS_F(file)->lower_files[bindex] = NULL; ++ UNIONFS_F(file)->saved_branch_ids[bindex] = -1; ++ } ++ ++ UNIONFS_F(file)->lower_files = NULL; ++ kfree(lower_files); ++ kfree(UNIONFS_F(file)->saved_branch_ids); ++ /* set to NULL because caller needs to know if to kfree on error */ ++ UNIONFS_F(file)->saved_branch_ids = NULL; ++} ++ ++/* open all lower files for a given file */ ++static int open_all_files(struct file *file) ++{ ++ int bindex, bstart, bend, err = 0; ++ struct file *lower_file; ++ struct dentry *lower_dentry; ++ struct dentry *dentry = file->f_path.dentry; ++ struct super_block *sb = dentry->d_sb; ++ ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry) ++ continue; ++ ++ dget(lower_dentry); ++ unionfs_mntget(dentry, bindex); ++ branchget(sb, bindex); ++ ++ lower_file = ++ dentry_open(lower_dentry, ++ unionfs_lower_mnt_idx(dentry, bindex), ++ file->f_flags, current_cred()); ++ if (IS_ERR(lower_file)) { ++ branchput(sb, bindex); ++ err = PTR_ERR(lower_file); ++ goto out; ++ } else { ++ unionfs_set_lower_file_idx(file, bindex, lower_file); ++ } ++ } ++out: ++ return err; ++} ++ ++/* open the highest priority file for a given upper file */ ++static int open_highest_file(struct file *file, bool willwrite) ++{ ++ int bindex, bstart, bend, err = 0; ++ struct file *lower_file; ++ struct dentry *lower_dentry; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent = dget_parent(dentry); ++ struct inode *parent_inode = parent->d_inode; ++ struct super_block *sb = dentry->d_sb; ++ ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ ++ lower_dentry = unionfs_lower_dentry(dentry); ++ if (willwrite && IS_WRITE_FLAG(file->f_flags) && is_robranch(dentry)) { ++ for (bindex = bstart - 1; bindex >= 0; bindex--) { ++ err = copyup_file(parent_inode, file, bstart, bindex, ++ i_size_read(dentry->d_inode)); ++ if (!err) ++ break; ++ } ++ atomic_set(&UNIONFS_F(file)->generation, ++ atomic_read(&UNIONFS_I(dentry->d_inode)-> ++ generation)); ++ goto out; ++ } ++ ++ dget(lower_dentry); ++ unionfs_mntget(dentry, bstart); ++ lower_file = dentry_open(lower_dentry, ++ unionfs_lower_mnt_idx(dentry, bstart), ++ file->f_flags, current_cred()); ++ if (IS_ERR(lower_file)) { ++ err = PTR_ERR(lower_file); ++ goto out; ++ } ++ branchget(sb, bstart); ++ unionfs_set_lower_file(file, lower_file); ++ /* Fix up the position. */ ++ lower_file->f_pos = file->f_pos; ++ ++ memcpy(&lower_file->f_ra, &file->f_ra, sizeof(struct file_ra_state)); ++out: ++ dput(parent); ++ return err; ++} ++ ++/* perform a delayed copyup of a read-write file on a read-only branch */ ++static int do_delayed_copyup(struct file *file, struct dentry *parent) ++{ ++ int bindex, bstart, bend, err = 0; ++ struct dentry *dentry = file->f_path.dentry; ++ struct inode *parent_inode = parent->d_inode; ++ ++ bstart = fbstart(file); ++ bend = fbend(file); ++ ++ BUG_ON(!S_ISREG(dentry->d_inode->i_mode)); ++ ++ unionfs_check_file(file); ++ for (bindex = bstart - 1; bindex >= 0; bindex--) { ++ if (!d_deleted(dentry)) ++ err = copyup_file(parent_inode, file, bstart, ++ bindex, ++ i_size_read(dentry->d_inode)); ++ else ++ err = copyup_deleted_file(file, dentry, parent, ++ bstart, bindex); ++ /* if succeeded, set lower open-file flags and break */ ++ if (!err) { ++ struct file *lower_file; ++ lower_file = unionfs_lower_file_idx(file, bindex); ++ lower_file->f_flags = file->f_flags; ++ break; ++ } ++ } ++ if (err || (bstart <= fbstart(file))) ++ goto out; ++ bend = fbend(file); ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ if (unionfs_lower_file_idx(file, bindex)) { ++ branchput(dentry->d_sb, bindex); ++ fput(unionfs_lower_file_idx(file, bindex)); ++ unionfs_set_lower_file_idx(file, bindex, NULL); ++ } ++ } ++ path_put_lowers(dentry, bstart, bend, false); ++ iput_lowers(dentry->d_inode, bstart, bend, false); ++ /* for reg file, we only open it "once" */ ++ fbend(file) = fbstart(file); ++ dbend(dentry) = dbstart(dentry); ++ ibend(dentry->d_inode) = ibstart(dentry->d_inode); ++ ++out: ++ unionfs_check_file(file); ++ return err; ++} ++ ++/* ++ * Helper function for unionfs_file_revalidate/locked. ++ * Expects dentry/parent to be locked already, and revalidated. ++ */ ++static int __unionfs_file_revalidate(struct file *file, struct dentry *dentry, ++ struct dentry *parent, ++ struct super_block *sb, int sbgen, ++ int dgen, bool willwrite) ++{ ++ int fgen; ++ int bstart, bend, orig_brid; ++ int size; ++ int err = 0; ++ ++ fgen = atomic_read(&UNIONFS_F(file)->generation); ++ ++ /* ++ * There are two cases we are interested in. The first is if the ++ * generation is lower than the super-block. The second is if ++ * someone has copied up this file from underneath us, we also need ++ * to refresh things. ++ */ ++ if ((d_deleted(dentry) && dbstart(dentry) >= fbstart(file)) || ++ (sbgen <= fgen && ++ dbstart(dentry) == fbstart(file) && ++ unionfs_lower_file(file))) ++ goto out_may_copyup; ++ ++ /* save orig branch ID */ ++ orig_brid = UNIONFS_F(file)->saved_branch_ids[fbstart(file)]; ++ ++ /* First we throw out the existing files. */ ++ cleanup_file(file); ++ ++ /* Now we reopen the file(s) as in unionfs_open. */ ++ bstart = fbstart(file) = dbstart(dentry); ++ bend = fbend(file) = dbend(dentry); ++ ++ size = sizeof(struct file *) * sbmax(sb); ++ UNIONFS_F(file)->lower_files = kzalloc(size, GFP_KERNEL); ++ if (unlikely(!UNIONFS_F(file)->lower_files)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ size = sizeof(int) * sbmax(sb); ++ UNIONFS_F(file)->saved_branch_ids = kzalloc(size, GFP_KERNEL); ++ if (unlikely(!UNIONFS_F(file)->saved_branch_ids)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ ++ if (S_ISDIR(dentry->d_inode->i_mode)) { ++ /* We need to open all the files. */ ++ err = open_all_files(file); ++ if (err) ++ goto out; ++ } else { ++ int new_brid; ++ /* We only open the highest priority branch. */ ++ err = open_highest_file(file, willwrite); ++ if (err) ++ goto out; ++ new_brid = UNIONFS_F(file)->saved_branch_ids[fbstart(file)]; ++ if (unlikely(new_brid != orig_brid && sbgen > fgen)) { ++ /* ++ * If we re-opened the file on a different branch ++ * than the original one, and this was due to a new ++ * branch inserted, then update the mnt counts of ++ * the old and new branches accordingly. ++ */ ++ unionfs_mntget(dentry, bstart); ++ unionfs_mntput(sb->s_root, ++ branch_id_to_idx(sb, orig_brid)); ++ } ++ /* regular files have only one open lower file */ ++ fbend(file) = fbstart(file); ++ } ++ atomic_set(&UNIONFS_F(file)->generation, ++ atomic_read(&UNIONFS_I(dentry->d_inode)->generation)); ++ ++out_may_copyup: ++ /* Copyup on the first write to a file on a readonly branch. */ ++ if (willwrite && IS_WRITE_FLAG(file->f_flags) && ++ !IS_WRITE_FLAG(unionfs_lower_file(file)->f_flags) && ++ is_robranch(dentry)) { ++ pr_debug("unionfs: do delay copyup of \"%s\"\n", ++ dentry->d_name.name); ++ err = do_delayed_copyup(file, parent); ++ /* regular files have only one open lower file */ ++ if (!err && !S_ISDIR(dentry->d_inode->i_mode)) ++ fbend(file) = fbstart(file); ++ } ++ ++out: ++ if (err) { ++ kfree(UNIONFS_F(file)->lower_files); ++ kfree(UNIONFS_F(file)->saved_branch_ids); ++ } ++ return err; ++} ++ ++/* ++ * Revalidate the struct file ++ * @file: file to revalidate ++ * @parent: parent dentry (locked by caller) ++ * @willwrite: true if caller may cause changes to the file; false otherwise. ++ * Caller must lock/unlock dentry's branch configuration. ++ */ ++int unionfs_file_revalidate(struct file *file, struct dentry *parent, ++ bool willwrite) ++{ ++ struct super_block *sb; ++ struct dentry *dentry; ++ int sbgen, dgen; ++ int err = 0; ++ ++ dentry = file->f_path.dentry; ++ sb = dentry->d_sb; ++ verify_locked(dentry); ++ verify_locked(parent); ++ ++ /* ++ * First revalidate the dentry inside struct file, ++ * but not unhashed dentries. ++ */ ++ if (!d_deleted(dentry) && ++ !__unionfs_d_revalidate(dentry, parent, willwrite)) { ++ err = -ESTALE; ++ goto out; ++ } ++ ++ sbgen = atomic_read(&UNIONFS_SB(sb)->generation); ++ dgen = atomic_read(&UNIONFS_D(dentry)->generation); ++ ++ if (unlikely(sbgen > dgen)) { /* XXX: should never happen */ ++ pr_debug("unionfs: failed to revalidate dentry (%s)\n", ++ dentry->d_name.name); ++ err = -ESTALE; ++ goto out; ++ } ++ ++ err = __unionfs_file_revalidate(file, dentry, parent, sb, ++ sbgen, dgen, willwrite); ++out: ++ return err; ++} ++ ++/* unionfs_open helper function: open a directory */ ++static int __open_dir(struct inode *inode, struct file *file) ++{ ++ struct dentry *lower_dentry; ++ struct file *lower_file; ++ int bindex, bstart, bend; ++ struct vfsmount *mnt; ++ ++ bstart = fbstart(file) = dbstart(file->f_path.dentry); ++ bend = fbend(file) = dbend(file->f_path.dentry); ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_dentry = ++ unionfs_lower_dentry_idx(file->f_path.dentry, bindex); ++ if (!lower_dentry) ++ continue; ++ ++ dget(lower_dentry); ++ unionfs_mntget(file->f_path.dentry, bindex); ++ mnt = unionfs_lower_mnt_idx(file->f_path.dentry, bindex); ++ lower_file = dentry_open(lower_dentry, mnt, file->f_flags, ++ current_cred()); ++ if (IS_ERR(lower_file)) ++ return PTR_ERR(lower_file); ++ ++ unionfs_set_lower_file_idx(file, bindex, lower_file); ++ ++ /* ++ * The branchget goes after the open, because otherwise ++ * we would miss the reference on release. ++ */ ++ branchget(inode->i_sb, bindex); ++ } ++ ++ return 0; ++} ++ ++/* unionfs_open helper function: open a file */ ++static int __open_file(struct inode *inode, struct file *file, ++ struct dentry *parent) ++{ ++ struct dentry *lower_dentry; ++ struct file *lower_file; ++ int lower_flags; ++ int bindex, bstart, bend; ++ ++ lower_dentry = unionfs_lower_dentry(file->f_path.dentry); ++ lower_flags = file->f_flags; ++ ++ bstart = fbstart(file) = dbstart(file->f_path.dentry); ++ bend = fbend(file) = dbend(file->f_path.dentry); ++ ++ /* ++ * check for the permission for lower file. If the error is ++ * COPYUP_ERR, copyup the file. ++ */ ++ if (lower_dentry->d_inode && is_robranch(file->f_path.dentry)) { ++ /* ++ * if the open will change the file, copy it up otherwise ++ * defer it. ++ */ ++ if (lower_flags & O_TRUNC) { ++ int size = 0; ++ int err = -EROFS; ++ ++ /* copyup the file */ ++ for (bindex = bstart - 1; bindex >= 0; bindex--) { ++ err = copyup_file(parent->d_inode, file, ++ bstart, bindex, size); ++ if (!err) { ++ /* only one regular file open */ ++ fbend(file) = fbstart(file); ++ break; ++ } ++ } ++ return err; ++ } else { ++ /* ++ * turn off writeable flags, to force delayed copyup ++ * by caller. ++ */ ++ lower_flags &= ~(OPEN_WRITE_FLAGS); ++ } ++ } ++ ++ dget(lower_dentry); ++ ++ /* ++ * dentry_open will decrement mnt refcnt if err. ++ * otherwise fput() will do an mntput() for us upon file close. ++ */ ++ unionfs_mntget(file->f_path.dentry, bstart); ++ lower_file = ++ dentry_open(lower_dentry, ++ unionfs_lower_mnt_idx(file->f_path.dentry, bstart), ++ lower_flags, current_cred()); ++ if (IS_ERR(lower_file)) ++ return PTR_ERR(lower_file); ++ ++ unionfs_set_lower_file(file, lower_file); ++ branchget(inode->i_sb, bstart); ++ ++ return 0; ++} ++ ++int unionfs_open(struct inode *inode, struct file *file) ++{ ++ int err = 0; ++ struct file *lower_file = NULL; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ int bindex = 0, bstart = 0, bend = 0; ++ int size; ++ int valid = 0; ++ ++ unionfs_read_lock(inode->i_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ /* don't open unhashed/deleted files */ ++ if (d_deleted(dentry)) { ++ err = -ENOENT; ++ goto out_nofree; ++ } ++ ++ /* XXX: should I change 'false' below to the 'willwrite' flag? */ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out_nofree; ++ } ++ ++ file->private_data = ++ kzalloc(sizeof(struct unionfs_file_info), GFP_KERNEL); ++ if (unlikely(!UNIONFS_F(file))) { ++ err = -ENOMEM; ++ goto out_nofree; ++ } ++ fbstart(file) = -1; ++ fbend(file) = -1; ++ atomic_set(&UNIONFS_F(file)->generation, ++ atomic_read(&UNIONFS_I(inode)->generation)); ++ ++ size = sizeof(struct file *) * sbmax(inode->i_sb); ++ UNIONFS_F(file)->lower_files = kzalloc(size, GFP_KERNEL); ++ if (unlikely(!UNIONFS_F(file)->lower_files)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ size = sizeof(int) * sbmax(inode->i_sb); ++ UNIONFS_F(file)->saved_branch_ids = kzalloc(size, GFP_KERNEL); ++ if (unlikely(!UNIONFS_F(file)->saved_branch_ids)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ ++ bstart = fbstart(file) = dbstart(dentry); ++ bend = fbend(file) = dbend(dentry); ++ ++ /* ++ * open all directories and make the unionfs file struct point to ++ * these lower file structs ++ */ ++ if (S_ISDIR(inode->i_mode)) ++ err = __open_dir(inode, file); /* open a dir */ ++ else ++ err = __open_file(inode, file, parent); /* open a file */ ++ ++ /* freeing the allocated resources, and fput the opened files */ ++ if (err) { ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_file = unionfs_lower_file_idx(file, bindex); ++ if (!lower_file) ++ continue; ++ ++ branchput(dentry->d_sb, bindex); ++ /* fput calls dput for lower_dentry */ ++ fput(lower_file); ++ } ++ } ++ ++out: ++ if (err) { ++ kfree(UNIONFS_F(file)->lower_files); ++ kfree(UNIONFS_F(file)->saved_branch_ids); ++ kfree(UNIONFS_F(file)); ++ } ++out_nofree: ++ if (!err) { ++ unionfs_postcopyup_setmnt(dentry); ++ unionfs_copy_attr_times(inode); ++ unionfs_check_file(file); ++ unionfs_check_inode(inode); ++ } ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(inode->i_sb); ++ return err; ++} ++ ++/* ++ * release all lower object references & free the file info structure ++ * ++ * No need to grab sb info's rwsem. ++ */ ++int unionfs_file_release(struct inode *inode, struct file *file) ++{ ++ struct file *lower_file = NULL; ++ struct unionfs_file_info *fileinfo; ++ struct unionfs_inode_info *inodeinfo; ++ struct super_block *sb = inode->i_sb; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ int bindex, bstart, bend; ++ int err = 0; ++ ++ /* ++ * Since mm/memory.c:might_fault() (under PROVE_LOCKING) was ++ * modified in 2.6.29-rc1 to call might_lock_read on mmap_sem, this ++ * has been causing false positives in file system stacking layers. ++ * In particular, our ->mmap is called after sys_mmap2 already holds ++ * mmap_sem, then we lock our own mutexes; but earlier, it's ++ * possible for lockdep to have locked our mutexes first, and then ++ * we call a lower ->readdir which could call might_fault. The ++ * different ordering of the locks is what lockdep complains about ++ * -- unnecessarily. Therefore, we have no choice but to tell ++ * lockdep to temporarily turn off lockdep here. Note: the comments ++ * inside might_sleep also suggest that it would have been ++ * nicer to only annotate paths that needs that might_lock_read. ++ */ ++ lockdep_off(); ++ unionfs_read_lock(sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ /* ++ * We try to revalidate, but the VFS ignores return return values ++ * from file->release, so we must always try to succeed here, ++ * including to do the kfree and dput below. So if revalidation ++ * failed, all we can do is print some message and keep going. ++ */ ++ err = unionfs_file_revalidate(file, parent, ++ UNIONFS_F(file)->wrote_to_file); ++ if (!err) ++ unionfs_check_file(file); ++ fileinfo = UNIONFS_F(file); ++ BUG_ON(file->f_path.dentry->d_inode != inode); ++ inodeinfo = UNIONFS_I(inode); ++ ++ /* fput all the lower files */ ++ bstart = fbstart(file); ++ bend = fbend(file); ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_file = unionfs_lower_file_idx(file, bindex); ++ ++ if (lower_file) { ++ unionfs_set_lower_file_idx(file, bindex, NULL); ++ fput(lower_file); ++ branchput(sb, bindex); ++ } ++ ++ /* if there are no more refs to the dentry, dput it */ ++ if (d_deleted(dentry)) { ++ dput(unionfs_lower_dentry_idx(dentry, bindex)); ++ unionfs_set_lower_dentry_idx(dentry, bindex, NULL); ++ } ++ } ++ ++ kfree(fileinfo->lower_files); ++ kfree(fileinfo->saved_branch_ids); ++ ++ if (fileinfo->rdstate) { ++ fileinfo->rdstate->access = jiffies; ++ spin_lock(&inodeinfo->rdlock); ++ inodeinfo->rdcount++; ++ list_add_tail(&fileinfo->rdstate->cache, ++ &inodeinfo->readdircache); ++ mark_inode_dirty(inode); ++ spin_unlock(&inodeinfo->rdlock); ++ fileinfo->rdstate = NULL; ++ } ++ kfree(fileinfo); ++ ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(sb); ++ lockdep_on(); ++ return err; ++} ++ ++/* pass the ioctl to the lower fs */ ++static long do_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ++{ ++ struct file *lower_file; ++ int err; ++ ++ lower_file = unionfs_lower_file(file); ++ ++ err = -ENOTTY; ++ if (!lower_file || !lower_file->f_op) ++ goto out; ++ if (lower_file->f_op->unlocked_ioctl) { ++ err = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg); ++#ifdef CONFIG_COMPAT ++ } else if (lower_file->f_op->ioctl) { ++ err = lower_file->f_op->compat_ioctl( ++ lower_file->f_path.dentry->d_inode, ++ lower_file, cmd, arg); ++#endif ++ } ++ ++out: ++ return err; ++} ++ ++/* ++ * return to user-space the branch indices containing the file in question ++ * ++ * We use fd_set and therefore we are limited to the number of the branches ++ * to FD_SETSIZE, which is currently 1024 - plenty for most people ++ */ ++static int unionfs_ioctl_queryfile(struct file *file, struct dentry *parent, ++ unsigned int cmd, unsigned long arg) ++{ ++ int err = 0; ++ fd_set branchlist; ++ int bstart = 0, bend = 0, bindex = 0; ++ int orig_bstart, orig_bend; ++ struct dentry *dentry, *lower_dentry; ++ struct vfsmount *mnt; ++ ++ dentry = file->f_path.dentry; ++ orig_bstart = dbstart(dentry); ++ orig_bend = dbend(dentry); ++ err = unionfs_partial_lookup(dentry, parent); ++ if (err) ++ goto out; ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ ++ FD_ZERO(&branchlist); ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry) ++ continue; ++ if (likely(lower_dentry->d_inode)) ++ FD_SET(bindex, &branchlist); ++ /* purge any lower objects after partial_lookup */ ++ if (bindex < orig_bstart || bindex > orig_bend) { ++ dput(lower_dentry); ++ unionfs_set_lower_dentry_idx(dentry, bindex, NULL); ++ iput(unionfs_lower_inode_idx(dentry->d_inode, bindex)); ++ unionfs_set_lower_inode_idx(dentry->d_inode, bindex, ++ NULL); ++ mnt = unionfs_lower_mnt_idx(dentry, bindex); ++ if (!mnt) ++ continue; ++ unionfs_mntput(dentry, bindex); ++ unionfs_set_lower_mnt_idx(dentry, bindex, NULL); ++ } ++ } ++ /* restore original dentry's offsets */ ++ dbstart(dentry) = orig_bstart; ++ dbend(dentry) = orig_bend; ++ ibstart(dentry->d_inode) = orig_bstart; ++ ibend(dentry->d_inode) = orig_bend; ++ ++ err = copy_to_user((void __user *)arg, &branchlist, sizeof(fd_set)); ++ if (unlikely(err)) ++ err = -EFAULT; ++ ++out: ++ return err < 0 ? err : bend; ++} ++ ++long unionfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ++{ ++ long err; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ err = unionfs_file_revalidate(file, parent, true); ++ if (unlikely(err)) ++ goto out; ++ ++ /* check if asked for local commands */ ++ switch (cmd) { ++ case UNIONFS_IOCTL_INCGEN: ++ /* Increment the superblock generation count */ ++ pr_info("unionfs: incgen ioctl deprecated; " ++ "use \"-o remount,incgen\"\n"); ++ err = -ENOSYS; ++ break; ++ ++ case UNIONFS_IOCTL_QUERYFILE: ++ /* Return list of branches containing the given file */ ++ err = unionfs_ioctl_queryfile(file, parent, cmd, arg); ++ break; ++ ++ default: ++ /* pass the ioctl down */ ++ err = do_ioctl(file, cmd, arg); ++ break; ++ } ++ ++out: ++ unionfs_check_file(file); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++int unionfs_flush(struct file *file, fl_owner_t id) ++{ ++ int err = 0; ++ struct file *lower_file = NULL; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ int bindex, bstart, bend; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ err = unionfs_file_revalidate(file, parent, ++ UNIONFS_F(file)->wrote_to_file); ++ if (unlikely(err)) ++ goto out; ++ unionfs_check_file(file); ++ ++ bstart = fbstart(file); ++ bend = fbend(file); ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_file = unionfs_lower_file_idx(file, bindex); ++ ++ if (lower_file && lower_file->f_op && ++ lower_file->f_op->flush) { ++ err = lower_file->f_op->flush(lower_file, id); ++ if (err) ++ goto out; ++ } ++ ++ } ++ ++out: ++ if (!err) ++ unionfs_check_file(file); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} +diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c +new file mode 100644 +index 0000000..37c2654 +--- /dev/null ++++ b/fs/unionfs/copyup.c +@@ -0,0 +1,896 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * For detailed explanation of copyup see: ++ * Documentation/filesystems/unionfs/concepts.txt ++ */ ++ ++#ifdef CONFIG_UNION_FS_XATTR ++/* copyup all extended attrs for a given dentry */ ++static int copyup_xattrs(struct dentry *old_lower_dentry, ++ struct dentry *new_lower_dentry) ++{ ++ int err = 0; ++ ssize_t list_size = -1; ++ char *name_list = NULL; ++ char *attr_value = NULL; ++ char *name_list_buf = NULL; ++ ++ /* query the actual size of the xattr list */ ++ list_size = vfs_listxattr(old_lower_dentry, NULL, 0); ++ if (list_size <= 0) { ++ err = list_size; ++ goto out; ++ } ++ ++ /* allocate space for the actual list */ ++ name_list = unionfs_xattr_alloc(list_size + 1, XATTR_LIST_MAX); ++ if (unlikely(!name_list || IS_ERR(name_list))) { ++ err = PTR_ERR(name_list); ++ goto out; ++ } ++ ++ name_list_buf = name_list; /* save for kfree at end */ ++ ++ /* now get the actual xattr list of the source file */ ++ list_size = vfs_listxattr(old_lower_dentry, name_list, list_size); ++ if (list_size <= 0) { ++ err = list_size; ++ goto out; ++ } ++ ++ /* allocate space to hold each xattr's value */ ++ attr_value = unionfs_xattr_alloc(XATTR_SIZE_MAX, XATTR_SIZE_MAX); ++ if (unlikely(!attr_value || IS_ERR(attr_value))) { ++ err = PTR_ERR(name_list); ++ goto out; ++ } ++ ++ /* in a loop, get and set each xattr from src to dst file */ ++ while (*name_list) { ++ ssize_t size; ++ ++ /* Lock here since vfs_getxattr doesn't lock for us */ ++ mutex_lock(&old_lower_dentry->d_inode->i_mutex); ++ size = vfs_getxattr(old_lower_dentry, name_list, ++ attr_value, XATTR_SIZE_MAX); ++ mutex_unlock(&old_lower_dentry->d_inode->i_mutex); ++ if (size < 0) { ++ err = size; ++ goto out; ++ } ++ if (size > XATTR_SIZE_MAX) { ++ err = -E2BIG; ++ goto out; ++ } ++ /* Don't lock here since vfs_setxattr does it for us. */ ++ err = vfs_setxattr(new_lower_dentry, name_list, attr_value, ++ size, 0); ++ /* ++ * Selinux depends on "security.*" xattrs, so to maintain ++ * the security of copied-up files, if Selinux is active, ++ * then we must copy these xattrs as well. So we need to ++ * temporarily get FOWNER privileges. ++ * XXX: move entire copyup code to SIOQ. ++ */ ++ if (err == -EPERM && !capable(CAP_FOWNER)) { ++ const struct cred *old_creds; ++ struct cred *new_creds; ++ ++ new_creds = prepare_creds(); ++ if (unlikely(!new_creds)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ cap_raise(new_creds->cap_effective, CAP_FOWNER); ++ old_creds = override_creds(new_creds); ++ err = vfs_setxattr(new_lower_dentry, name_list, ++ attr_value, size, 0); ++ revert_creds(old_creds); ++ } ++ if (err < 0) ++ goto out; ++ name_list += strlen(name_list) + 1; ++ } ++out: ++ unionfs_xattr_kfree(name_list_buf); ++ unionfs_xattr_kfree(attr_value); ++ /* Ignore if xattr isn't supported */ ++ if (err == -ENOTSUPP || err == -EOPNOTSUPP) ++ err = 0; ++ return err; ++} ++#endif /* CONFIG_UNION_FS_XATTR */ ++ ++/* ++ * Determine the mode based on the copyup flags, and the existing dentry. ++ * ++ * Handle file systems which may not support certain options. For example ++ * jffs2 doesn't allow one to chmod a symlink. So we ignore such harmless ++ * errors, rather than propagating them up, which results in copyup errors ++ * and errors returned back to users. ++ */ ++static int copyup_permissions(struct super_block *sb, ++ struct dentry *old_lower_dentry, ++ struct dentry *new_lower_dentry) ++{ ++ struct inode *i = old_lower_dentry->d_inode; ++ struct iattr newattrs; ++ int err; ++ ++ newattrs.ia_atime = i->i_atime; ++ newattrs.ia_mtime = i->i_mtime; ++ newattrs.ia_ctime = i->i_ctime; ++ newattrs.ia_gid = i->i_gid; ++ newattrs.ia_uid = i->i_uid; ++ newattrs.ia_valid = ATTR_CTIME | ATTR_ATIME | ATTR_MTIME | ++ ATTR_ATIME_SET | ATTR_MTIME_SET | ATTR_FORCE | ++ ATTR_GID | ATTR_UID; ++ mutex_lock(&new_lower_dentry->d_inode->i_mutex); ++ err = notify_change(new_lower_dentry, &newattrs); ++ if (err) ++ goto out; ++ ++ /* now try to change the mode and ignore EOPNOTSUPP on symlinks */ ++ newattrs.ia_mode = i->i_mode; ++ newattrs.ia_valid = ATTR_MODE | ATTR_FORCE; ++ err = notify_change(new_lower_dentry, &newattrs); ++ if (err == -EOPNOTSUPP && ++ S_ISLNK(new_lower_dentry->d_inode->i_mode)) { ++ printk(KERN_WARNING ++ "unionfs: changing \"%s\" symlink mode unsupported\n", ++ new_lower_dentry->d_name.name); ++ err = 0; ++ } ++ ++out: ++ mutex_unlock(&new_lower_dentry->d_inode->i_mutex); ++ return err; ++} ++ ++/* ++ * create the new device/file/directory - use copyup_permission to copyup ++ * times, and mode ++ * ++ * if the object being copied up is a regular file, the file is only created, ++ * the contents have to be copied up separately ++ */ ++static int __copyup_ndentry(struct dentry *old_lower_dentry, ++ struct dentry *new_lower_dentry, ++ struct dentry *new_lower_parent_dentry, ++ char *symbuf) ++{ ++ int err = 0; ++ umode_t old_mode = old_lower_dentry->d_inode->i_mode; ++ struct sioq_args args; ++ ++ if (S_ISDIR(old_mode)) { ++ args.mkdir.parent = new_lower_parent_dentry->d_inode; ++ args.mkdir.dentry = new_lower_dentry; ++ args.mkdir.mode = old_mode; ++ ++ run_sioq(__unionfs_mkdir, &args); ++ err = args.err; ++ } else if (S_ISLNK(old_mode)) { ++ args.symlink.parent = new_lower_parent_dentry->d_inode; ++ args.symlink.dentry = new_lower_dentry; ++ args.symlink.symbuf = symbuf; ++ ++ run_sioq(__unionfs_symlink, &args); ++ err = args.err; ++ } else if (S_ISBLK(old_mode) || S_ISCHR(old_mode) || ++ S_ISFIFO(old_mode) || S_ISSOCK(old_mode)) { ++ args.mknod.parent = new_lower_parent_dentry->d_inode; ++ args.mknod.dentry = new_lower_dentry; ++ args.mknod.mode = old_mode; ++ args.mknod.dev = old_lower_dentry->d_inode->i_rdev; ++ ++ run_sioq(__unionfs_mknod, &args); ++ err = args.err; ++ } else if (S_ISREG(old_mode)) { ++ struct nameidata nd; ++ err = init_lower_nd(&nd, LOOKUP_CREATE); ++ if (unlikely(err < 0)) ++ goto out; ++ args.create.nd = &nd; ++ args.create.parent = new_lower_parent_dentry->d_inode; ++ args.create.dentry = new_lower_dentry; ++ args.create.mode = old_mode; ++ ++ run_sioq(__unionfs_create, &args); ++ err = args.err; ++ release_lower_nd(&nd, err); ++ } else { ++ printk(KERN_CRIT "unionfs: unknown inode type %d\n", ++ old_mode); ++ BUG(); ++ } ++ ++out: ++ return err; ++} ++ ++static int __copyup_reg_data(struct dentry *dentry, ++ struct dentry *new_lower_dentry, int new_bindex, ++ struct dentry *old_lower_dentry, int old_bindex, ++ struct file **copyup_file, loff_t len) ++{ ++ struct super_block *sb = dentry->d_sb; ++ struct file *input_file; ++ struct file *output_file; ++ struct vfsmount *output_mnt; ++ mm_segment_t old_fs; ++ char *buf = NULL; ++ ssize_t read_bytes, write_bytes; ++ loff_t size; ++ int err = 0; ++ ++ /* open old file */ ++ unionfs_mntget(dentry, old_bindex); ++ branchget(sb, old_bindex); ++ /* dentry_open calls dput and mntput if it returns an error */ ++ input_file = dentry_open(old_lower_dentry, ++ unionfs_lower_mnt_idx(dentry, old_bindex), ++ O_RDONLY | O_LARGEFILE, current_cred()); ++ if (IS_ERR(input_file)) { ++ dput(old_lower_dentry); ++ err = PTR_ERR(input_file); ++ goto out; ++ } ++ if (unlikely(!input_file->f_op || !input_file->f_op->read)) { ++ err = -EINVAL; ++ goto out_close_in; ++ } ++ ++ /* open new file */ ++ dget(new_lower_dentry); ++ output_mnt = unionfs_mntget(sb->s_root, new_bindex); ++ branchget(sb, new_bindex); ++ output_file = dentry_open(new_lower_dentry, output_mnt, ++ O_RDWR | O_LARGEFILE, current_cred()); ++ if (IS_ERR(output_file)) { ++ err = PTR_ERR(output_file); ++ goto out_close_in2; ++ } ++ if (unlikely(!output_file->f_op || !output_file->f_op->write)) { ++ err = -EINVAL; ++ goto out_close_out; ++ } ++ ++ /* allocating a buffer */ ++ buf = kmalloc(PAGE_SIZE, GFP_KERNEL); ++ if (unlikely(!buf)) { ++ err = -ENOMEM; ++ goto out_close_out; ++ } ++ ++ input_file->f_pos = 0; ++ output_file->f_pos = 0; ++ ++ old_fs = get_fs(); ++ set_fs(KERNEL_DS); ++ ++ size = len; ++ err = 0; ++ do { ++ if (len >= PAGE_SIZE) ++ size = PAGE_SIZE; ++ else if ((len < PAGE_SIZE) && (len > 0)) ++ size = len; ++ ++ len -= PAGE_SIZE; ++ ++ read_bytes = ++ input_file->f_op->read(input_file, ++ (char __user *)buf, size, ++ &input_file->f_pos); ++ if (read_bytes <= 0) { ++ err = read_bytes; ++ break; ++ } ++ ++ /* see Documentation/filesystems/unionfs/issues.txt */ ++ lockdep_off(); ++ write_bytes = ++ output_file->f_op->write(output_file, ++ (char __user *)buf, ++ read_bytes, ++ &output_file->f_pos); ++ lockdep_on(); ++ if ((write_bytes < 0) || (write_bytes < read_bytes)) { ++ err = write_bytes; ++ break; ++ } ++ } while ((read_bytes > 0) && (len > 0)); ++ ++ set_fs(old_fs); ++ ++ kfree(buf); ++ ++ if (!err) ++ err = output_file->f_op->fsync(output_file, 0); ++ ++ if (err) ++ goto out_close_out; ++ ++ if (copyup_file) { ++ *copyup_file = output_file; ++ goto out_close_in; ++ } ++ ++out_close_out: ++ fput(output_file); ++ ++out_close_in2: ++ branchput(sb, new_bindex); ++ ++out_close_in: ++ fput(input_file); ++ ++out: ++ branchput(sb, old_bindex); ++ ++ return err; ++} ++ ++/* ++ * dput the lower references for old and new dentry & clear a lower dentry ++ * pointer ++ */ ++static void __clear(struct dentry *dentry, struct dentry *old_lower_dentry, ++ int old_bstart, int old_bend, ++ struct dentry *new_lower_dentry, int new_bindex) ++{ ++ /* get rid of the lower dentry and all its traces */ ++ unionfs_set_lower_dentry_idx(dentry, new_bindex, NULL); ++ dbstart(dentry) = old_bstart; ++ dbend(dentry) = old_bend; ++ ++ dput(new_lower_dentry); ++ dput(old_lower_dentry); ++} ++ ++/* ++ * Copy up a dentry to a file of specified name. ++ * ++ * @dir: used to pull the ->i_sb to access other branches ++ * @dentry: the non-negative dentry whose lower_inode we should copy ++ * @bstart: the branch of the lower_inode to copy from ++ * @new_bindex: the branch to create the new file in ++ * @name: the name of the file to create ++ * @namelen: length of @name ++ * @copyup_file: the "struct file" to return (optional) ++ * @len: how many bytes to copy-up? ++ */ ++int copyup_dentry(struct inode *dir, struct dentry *dentry, int bstart, ++ int new_bindex, const char *name, int namelen, ++ struct file **copyup_file, loff_t len) ++{ ++ struct dentry *new_lower_dentry; ++ struct dentry *old_lower_dentry = NULL; ++ struct super_block *sb; ++ int err = 0; ++ int old_bindex; ++ int old_bstart; ++ int old_bend; ++ struct dentry *new_lower_parent_dentry = NULL; ++ mm_segment_t oldfs; ++ char *symbuf = NULL; ++ ++ verify_locked(dentry); ++ ++ old_bindex = bstart; ++ old_bstart = dbstart(dentry); ++ old_bend = dbend(dentry); ++ ++ BUG_ON(new_bindex < 0); ++ BUG_ON(new_bindex >= old_bindex); ++ ++ sb = dir->i_sb; ++ ++ err = is_robranch_super(sb, new_bindex); ++ if (err) ++ goto out; ++ ++ /* Create the directory structure above this dentry. */ ++ new_lower_dentry = create_parents(dir, dentry, name, new_bindex); ++ if (IS_ERR(new_lower_dentry)) { ++ err = PTR_ERR(new_lower_dentry); ++ goto out; ++ } ++ ++ old_lower_dentry = unionfs_lower_dentry_idx(dentry, old_bindex); ++ /* we conditionally dput this old_lower_dentry at end of function */ ++ dget(old_lower_dentry); ++ ++ /* For symlinks, we must read the link before we lock the directory. */ ++ if (S_ISLNK(old_lower_dentry->d_inode->i_mode)) { ++ ++ symbuf = kmalloc(PATH_MAX, GFP_KERNEL); ++ if (unlikely(!symbuf)) { ++ __clear(dentry, old_lower_dentry, ++ old_bstart, old_bend, ++ new_lower_dentry, new_bindex); ++ err = -ENOMEM; ++ goto out_free; ++ } ++ ++ oldfs = get_fs(); ++ set_fs(KERNEL_DS); ++ err = old_lower_dentry->d_inode->i_op->readlink( ++ old_lower_dentry, ++ (char __user *)symbuf, ++ PATH_MAX); ++ set_fs(oldfs); ++ if (err < 0) { ++ __clear(dentry, old_lower_dentry, ++ old_bstart, old_bend, ++ new_lower_dentry, new_bindex); ++ goto out_free; ++ } ++ symbuf[err] = '\0'; ++ } ++ ++ /* Now we lock the parent, and create the object in the new branch. */ ++ new_lower_parent_dentry = lock_parent(new_lower_dentry); ++ ++ /* create the new inode */ ++ err = __copyup_ndentry(old_lower_dentry, new_lower_dentry, ++ new_lower_parent_dentry, symbuf); ++ ++ if (err) { ++ __clear(dentry, old_lower_dentry, ++ old_bstart, old_bend, ++ new_lower_dentry, new_bindex); ++ goto out_unlock; ++ } ++ ++ /* We actually copyup the file here. */ ++ if (S_ISREG(old_lower_dentry->d_inode->i_mode)) ++ err = __copyup_reg_data(dentry, new_lower_dentry, new_bindex, ++ old_lower_dentry, old_bindex, ++ copyup_file, len); ++ if (err) ++ goto out_unlink; ++ ++ /* Set permissions. */ ++ err = copyup_permissions(sb, old_lower_dentry, new_lower_dentry); ++ if (err) ++ goto out_unlink; ++ ++#ifdef CONFIG_UNION_FS_XATTR ++ /* Selinux uses extended attributes for permissions. */ ++ err = copyup_xattrs(old_lower_dentry, new_lower_dentry); ++ if (err) ++ goto out_unlink; ++#endif /* CONFIG_UNION_FS_XATTR */ ++ ++ /* do not allow files getting deleted to be re-interposed */ ++ if (!d_deleted(dentry)) ++ unionfs_reinterpose(dentry); ++ ++ goto out_unlock; ++ ++out_unlink: ++ /* ++ * copyup failed, because we possibly ran out of space or ++ * quota, or something else happened so let's unlink; we don't ++ * really care about the return value of vfs_unlink ++ */ ++ vfs_unlink(new_lower_parent_dentry->d_inode, new_lower_dentry); ++ ++ if (copyup_file) { ++ /* need to close the file */ ++ ++ fput(*copyup_file); ++ branchput(sb, new_bindex); ++ } ++ ++ /* ++ * TODO: should we reset the error to something like -EIO? ++ * ++ * If we don't reset, the user may get some nonsensical errors, but ++ * on the other hand, if we reset to EIO, we guarantee that the user ++ * will get a "confusing" error message. ++ */ ++ ++out_unlock: ++ unlock_dir(new_lower_parent_dentry); ++ ++out_free: ++ /* ++ * If old_lower_dentry was not a file, then we need to dput it. If ++ * it was a file, then it was already dput indirectly by other ++ * functions we call above which operate on regular files. ++ */ ++ if (old_lower_dentry && old_lower_dentry->d_inode && ++ !S_ISREG(old_lower_dentry->d_inode->i_mode)) ++ dput(old_lower_dentry); ++ kfree(symbuf); ++ ++ if (err) { ++ /* ++ * if directory creation succeeded, but inode copyup failed, ++ * then purge new dentries. ++ */ ++ if (dbstart(dentry) < old_bstart && ++ ibstart(dentry->d_inode) > dbstart(dentry)) ++ __clear(dentry, NULL, old_bstart, old_bend, ++ unionfs_lower_dentry(dentry), dbstart(dentry)); ++ goto out; ++ } ++ if (!S_ISDIR(dentry->d_inode->i_mode)) { ++ unionfs_postcopyup_release(dentry); ++ if (!unionfs_lower_inode(dentry->d_inode)) { ++ /* ++ * If we got here, then we copied up to an ++ * unlinked-open file, whose name is .unionfsXXXXX. ++ */ ++ struct inode *inode = new_lower_dentry->d_inode; ++ atomic_inc(&inode->i_count); ++ unionfs_set_lower_inode_idx(dentry->d_inode, ++ ibstart(dentry->d_inode), ++ inode); ++ } ++ } ++ unionfs_postcopyup_setmnt(dentry); ++ /* sync inode times from copied-up inode to our inode */ ++ unionfs_copy_attr_times(dentry->d_inode); ++ unionfs_check_inode(dir); ++ unionfs_check_dentry(dentry); ++out: ++ return err; ++} ++ ++/* ++ * This function creates a copy of a file represented by 'file' which ++ * currently resides in branch 'bstart' to branch 'new_bindex.' The copy ++ * will be named "name". ++ */ ++int copyup_named_file(struct inode *dir, struct file *file, char *name, ++ int bstart, int new_bindex, loff_t len) ++{ ++ int err = 0; ++ struct file *output_file = NULL; ++ ++ err = copyup_dentry(dir, file->f_path.dentry, bstart, new_bindex, ++ name, strlen(name), &output_file, len); ++ if (!err) { ++ fbstart(file) = new_bindex; ++ unionfs_set_lower_file_idx(file, new_bindex, output_file); ++ } ++ ++ return err; ++} ++ ++/* ++ * This function creates a copy of a file represented by 'file' which ++ * currently resides in branch 'bstart' to branch 'new_bindex'. ++ */ ++int copyup_file(struct inode *dir, struct file *file, int bstart, ++ int new_bindex, loff_t len) ++{ ++ int err = 0; ++ struct file *output_file = NULL; ++ struct dentry *dentry = file->f_path.dentry; ++ ++ err = copyup_dentry(dir, dentry, bstart, new_bindex, ++ dentry->d_name.name, dentry->d_name.len, ++ &output_file, len); ++ if (!err) { ++ fbstart(file) = new_bindex; ++ unionfs_set_lower_file_idx(file, new_bindex, output_file); ++ } ++ ++ return err; ++} ++ ++/* purge a dentry's lower-branch states (dput/mntput, etc.) */ ++static void __cleanup_dentry(struct dentry *dentry, int bindex, ++ int old_bstart, int old_bend) ++{ ++ int loop_start; ++ int loop_end; ++ int new_bstart = -1; ++ int new_bend = -1; ++ int i; ++ ++ loop_start = min(old_bstart, bindex); ++ loop_end = max(old_bend, bindex); ++ ++ /* ++ * This loop sets the bstart and bend for the new dentry by ++ * traversing from left to right. It also dputs all negative ++ * dentries except bindex ++ */ ++ for (i = loop_start; i <= loop_end; i++) { ++ if (!unionfs_lower_dentry_idx(dentry, i)) ++ continue; ++ ++ if (i == bindex) { ++ new_bend = i; ++ if (new_bstart < 0) ++ new_bstart = i; ++ continue; ++ } ++ ++ if (!unionfs_lower_dentry_idx(dentry, i)->d_inode) { ++ dput(unionfs_lower_dentry_idx(dentry, i)); ++ unionfs_set_lower_dentry_idx(dentry, i, NULL); ++ ++ unionfs_mntput(dentry, i); ++ unionfs_set_lower_mnt_idx(dentry, i, NULL); ++ } else { ++ if (new_bstart < 0) ++ new_bstart = i; ++ new_bend = i; ++ } ++ } ++ ++ if (new_bstart < 0) ++ new_bstart = bindex; ++ if (new_bend < 0) ++ new_bend = bindex; ++ dbstart(dentry) = new_bstart; ++ dbend(dentry) = new_bend; ++ ++} ++ ++/* set lower inode ptr and update bstart & bend if necessary */ ++static void __set_inode(struct dentry *upper, struct dentry *lower, ++ int bindex) ++{ ++ unionfs_set_lower_inode_idx(upper->d_inode, bindex, ++ igrab(lower->d_inode)); ++ if (likely(ibstart(upper->d_inode) > bindex)) ++ ibstart(upper->d_inode) = bindex; ++ if (likely(ibend(upper->d_inode) < bindex)) ++ ibend(upper->d_inode) = bindex; ++ ++} ++ ++/* set lower dentry ptr and update bstart & bend if necessary */ ++static void __set_dentry(struct dentry *upper, struct dentry *lower, ++ int bindex) ++{ ++ unionfs_set_lower_dentry_idx(upper, bindex, lower); ++ if (likely(dbstart(upper) > bindex)) ++ dbstart(upper) = bindex; ++ if (likely(dbend(upper) < bindex)) ++ dbend(upper) = bindex; ++} ++ ++/* ++ * This function replicates the directory structure up-to given dentry ++ * in the bindex branch. ++ */ ++struct dentry *create_parents(struct inode *dir, struct dentry *dentry, ++ const char *name, int bindex) ++{ ++ int err; ++ struct dentry *child_dentry; ++ struct dentry *parent_dentry; ++ struct dentry *lower_parent_dentry = NULL; ++ struct dentry *lower_dentry = NULL; ++ const char *childname; ++ unsigned int childnamelen; ++ int nr_dentry; ++ int count = 0; ++ int old_bstart; ++ int old_bend; ++ struct dentry **path = NULL; ++ struct super_block *sb; ++ ++ verify_locked(dentry); ++ ++ err = is_robranch_super(dir->i_sb, bindex); ++ if (err) { ++ lower_dentry = ERR_PTR(err); ++ goto out; ++ } ++ ++ old_bstart = dbstart(dentry); ++ old_bend = dbend(dentry); ++ ++ lower_dentry = ERR_PTR(-ENOMEM); ++ ++ /* There is no sense allocating any less than the minimum. */ ++ nr_dentry = 1; ++ path = kmalloc(nr_dentry * sizeof(struct dentry *), GFP_KERNEL); ++ if (unlikely(!path)) ++ goto out; ++ ++ /* assume the negative dentry of unionfs as the parent dentry */ ++ parent_dentry = dentry; ++ ++ /* ++ * This loop finds the first parent that exists in the given branch. ++ * We start building the directory structure from there. At the end ++ * of the loop, the following should hold: ++ * - child_dentry is the first nonexistent child ++ * - parent_dentry is the first existent parent ++ * - path[0] is the = deepest child ++ * - path[count] is the first child to create ++ */ ++ do { ++ child_dentry = parent_dentry; ++ ++ /* find the parent directory dentry in unionfs */ ++ parent_dentry = dget_parent(child_dentry); ++ ++ /* find out the lower_parent_dentry in the given branch */ ++ lower_parent_dentry = ++ unionfs_lower_dentry_idx(parent_dentry, bindex); ++ ++ /* grow path table */ ++ if (count == nr_dentry) { ++ void *p; ++ ++ nr_dentry *= 2; ++ p = krealloc(path, nr_dentry * sizeof(struct dentry *), ++ GFP_KERNEL); ++ if (unlikely(!p)) { ++ lower_dentry = ERR_PTR(-ENOMEM); ++ goto out; ++ } ++ path = p; ++ } ++ ++ /* store the child dentry */ ++ path[count++] = child_dentry; ++ } while (!lower_parent_dentry); ++ count--; ++ ++ sb = dentry->d_sb; ++ ++ /* ++ * This code goes between the begin/end labels and basically ++ * emulates a while(child_dentry != dentry), only cleaner and ++ * shorter than what would be a much longer while loop. ++ */ ++begin: ++ /* get lower parent dir in the current branch */ ++ lower_parent_dentry = unionfs_lower_dentry_idx(parent_dentry, bindex); ++ dput(parent_dentry); ++ ++ /* init the values to lookup */ ++ childname = child_dentry->d_name.name; ++ childnamelen = child_dentry->d_name.len; ++ ++ if (child_dentry != dentry) { ++ /* lookup child in the underlying file system */ ++ lower_dentry = lookup_lck_len(childname, lower_parent_dentry, ++ childnamelen); ++ if (IS_ERR(lower_dentry)) ++ goto out; ++ } else { ++ /* ++ * Is the name a whiteout of the child name ? lookup the ++ * whiteout child in the underlying file system ++ */ ++ lower_dentry = lookup_lck_len(name, lower_parent_dentry, ++ strlen(name)); ++ if (IS_ERR(lower_dentry)) ++ goto out; ++ ++ /* Replace the current dentry (if any) with the new one */ ++ dput(unionfs_lower_dentry_idx(dentry, bindex)); ++ unionfs_set_lower_dentry_idx(dentry, bindex, ++ lower_dentry); ++ ++ __cleanup_dentry(dentry, bindex, old_bstart, old_bend); ++ goto out; ++ } ++ ++ if (lower_dentry->d_inode) { ++ /* ++ * since this already exists we dput to avoid ++ * multiple references on the same dentry ++ */ ++ dput(lower_dentry); ++ } else { ++ struct sioq_args args; ++ ++ /* it's a negative dentry, create a new dir */ ++ lower_parent_dentry = lock_parent(lower_dentry); ++ ++ args.mkdir.parent = lower_parent_dentry->d_inode; ++ args.mkdir.dentry = lower_dentry; ++ args.mkdir.mode = child_dentry->d_inode->i_mode; ++ ++ run_sioq(__unionfs_mkdir, &args); ++ err = args.err; ++ ++ if (!err) ++ err = copyup_permissions(dir->i_sb, child_dentry, ++ lower_dentry); ++ unlock_dir(lower_parent_dentry); ++ if (err) { ++ dput(lower_dentry); ++ lower_dentry = ERR_PTR(err); ++ goto out; ++ } ++ ++ } ++ ++ __set_inode(child_dentry, lower_dentry, bindex); ++ __set_dentry(child_dentry, lower_dentry, bindex); ++ /* ++ * update times of this dentry, but also the parent, because if ++ * we changed, the parent may have changed too. ++ */ ++ fsstack_copy_attr_times(parent_dentry->d_inode, ++ lower_parent_dentry->d_inode); ++ unionfs_copy_attr_times(child_dentry->d_inode); ++ ++ parent_dentry = child_dentry; ++ child_dentry = path[--count]; ++ goto begin; ++out: ++ /* cleanup any leftover locks from the do/while loop above */ ++ if (IS_ERR(lower_dentry)) ++ while (count) ++ dput(path[count--]); ++ kfree(path); ++ return lower_dentry; ++} ++ ++/* ++ * Post-copyup helper to ensure we have valid mnts: set lower mnt of ++ * dentry+parents to the first parent node that has an mnt. ++ */ ++void unionfs_postcopyup_setmnt(struct dentry *dentry) ++{ ++ struct dentry *parent, *hasone; ++ int bindex = dbstart(dentry); ++ ++ if (unionfs_lower_mnt_idx(dentry, bindex)) ++ return; ++ hasone = dentry->d_parent; ++ /* this loop should stop at root dentry */ ++ while (!unionfs_lower_mnt_idx(hasone, bindex)) ++ hasone = hasone->d_parent; ++ parent = dentry; ++ while (!unionfs_lower_mnt_idx(parent, bindex)) { ++ unionfs_set_lower_mnt_idx(parent, bindex, ++ unionfs_mntget(hasone, bindex)); ++ parent = parent->d_parent; ++ } ++} ++ ++/* ++ * Post-copyup helper to release all non-directory source objects of a ++ * copied-up file. Regular files should have only one lower object. ++ */ ++void unionfs_postcopyup_release(struct dentry *dentry) ++{ ++ int bstart, bend; ++ ++ BUG_ON(S_ISDIR(dentry->d_inode->i_mode)); ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ ++ path_put_lowers(dentry, bstart + 1, bend, false); ++ iput_lowers(dentry->d_inode, bstart + 1, bend, false); ++ ++ dbend(dentry) = bstart; ++ ibend(dentry->d_inode) = ibstart(dentry->d_inode) = bstart; ++} +diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c +new file mode 100644 +index 0000000..6092e69 +--- /dev/null ++++ b/fs/unionfs/debug.c +@@ -0,0 +1,548 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * Helper debugging functions for maintainers (and for users to report back ++ * useful information back to maintainers) ++ */ ++ ++/* it's always useful to know what part of the code called us */ ++#define PRINT_CALLER(fname, fxn, line) \ ++ do { \ ++ if (!printed_caller) { \ ++ pr_debug("PC:%s:%s:%d\n", (fname), (fxn), (line)); \ ++ printed_caller = 1; \ ++ } \ ++ } while (0) ++ ++/* ++ * __unionfs_check_{inode,dentry,file} perform exhaustive sanity checking on ++ * the fan-out of various Unionfs objects. We check that no lower objects ++ * exist outside the start/end branch range; that all objects within are ++ * non-NULL (with some allowed exceptions); that for every lower file ++ * there's a lower dentry+inode; that the start/end ranges match for all ++ * corresponding lower objects; that open files/symlinks have only one lower ++ * objects, but directories can have several; and more. ++ */ ++void __unionfs_check_inode(const struct inode *inode, ++ const char *fname, const char *fxn, int line) ++{ ++ int bindex; ++ int istart, iend; ++ struct inode *lower_inode; ++ struct super_block *sb; ++ int printed_caller = 0; ++ void *poison_ptr; ++ ++ /* for inodes now */ ++ BUG_ON(!inode); ++ sb = inode->i_sb; ++ istart = ibstart(inode); ++ iend = ibend(inode); ++ /* don't check inode if no lower branches */ ++ if (istart < 0 && iend < 0) ++ return; ++ if (unlikely(istart > iend)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" Ci0: inode=%p istart/end=%d:%d\n", ++ inode, istart, iend); ++ } ++ if (unlikely((istart == -1 && iend != -1) || ++ (istart != -1 && iend == -1))) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" Ci1: inode=%p istart/end=%d:%d\n", ++ inode, istart, iend); ++ } ++ if (!S_ISDIR(inode->i_mode)) { ++ if (unlikely(iend != istart)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" Ci2: inode=%p istart=%d iend=%d\n", ++ inode, istart, iend); ++ } ++ } ++ ++ for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) { ++ if (unlikely(!UNIONFS_I(inode))) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" Ci3: no inode_info %p\n", inode); ++ return; ++ } ++ if (unlikely(!UNIONFS_I(inode)->lower_inodes)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" Ci4: no lower_inodes %p\n", inode); ++ return; ++ } ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (lower_inode) { ++ memset(&poison_ptr, POISON_INUSE, sizeof(void *)); ++ if (unlikely(bindex < istart || bindex > iend)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" Ci5: inode/linode=%p:%p bindex=%d " ++ "istart/end=%d:%d\n", inode, ++ lower_inode, bindex, istart, iend); ++ } else if (unlikely(lower_inode == poison_ptr)) { ++ /* freed inode! */ ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" Ci6: inode/linode=%p:%p bindex=%d " ++ "istart/end=%d:%d\n", inode, ++ lower_inode, bindex, istart, iend); ++ } ++ continue; ++ } ++ /* if we get here, then lower_inode == NULL */ ++ if (bindex < istart || bindex > iend) ++ continue; ++ /* ++ * directories can have NULL lower inodes in b/t start/end, ++ * but NOT if at the start/end range. ++ */ ++ if (unlikely(S_ISDIR(inode->i_mode) && ++ bindex > istart && bindex < iend)) ++ continue; ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" Ci7: inode/linode=%p:%p " ++ "bindex=%d istart/end=%d:%d\n", ++ inode, lower_inode, bindex, istart, iend); ++ } ++} ++ ++void __unionfs_check_dentry(const struct dentry *dentry, ++ const char *fname, const char *fxn, int line) ++{ ++ int bindex; ++ int dstart, dend, istart, iend; ++ struct dentry *lower_dentry; ++ struct inode *inode, *lower_inode; ++ struct super_block *sb; ++ struct vfsmount *lower_mnt; ++ int printed_caller = 0; ++ void *poison_ptr; ++ ++ BUG_ON(!dentry); ++ sb = dentry->d_sb; ++ inode = dentry->d_inode; ++ dstart = dbstart(dentry); ++ dend = dbend(dentry); ++ /* don't check dentry/mnt if no lower branches */ ++ if (dstart < 0 && dend < 0) ++ goto check_inode; ++ BUG_ON(dstart > dend); ++ ++ if (unlikely((dstart == -1 && dend != -1) || ++ (dstart != -1 && dend == -1))) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CD0: dentry=%p dstart/end=%d:%d\n", ++ dentry, dstart, dend); ++ } ++ /* ++ * check for NULL dentries inside the start/end range, or ++ * non-NULL dentries outside the start/end range. ++ */ ++ for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (lower_dentry) { ++ if (unlikely(bindex < dstart || bindex > dend)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CD1: dentry/lower=%p:%p(%p) " ++ "bindex=%d dstart/end=%d:%d\n", ++ dentry, lower_dentry, ++ (lower_dentry ? lower_dentry->d_inode : ++ (void *) -1L), ++ bindex, dstart, dend); ++ } ++ } else { /* lower_dentry == NULL */ ++ if (bindex < dstart || bindex > dend) ++ continue; ++ /* ++ * Directories can have NULL lower inodes in b/t ++ * start/end, but NOT if at the start/end range. ++ * Ignore this rule, however, if this is a NULL ++ * dentry or a deleted dentry. ++ */ ++ if (unlikely(!d_deleted((struct dentry *) dentry) && ++ inode && ++ !(inode && S_ISDIR(inode->i_mode) && ++ bindex > dstart && bindex < dend))) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CD2: dentry/lower=%p:%p(%p) " ++ "bindex=%d dstart/end=%d:%d\n", ++ dentry, lower_dentry, ++ (lower_dentry ? ++ lower_dentry->d_inode : ++ (void *) -1L), ++ bindex, dstart, dend); ++ } ++ } ++ } ++ ++ /* check for vfsmounts same as for dentries */ ++ for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) { ++ lower_mnt = unionfs_lower_mnt_idx(dentry, bindex); ++ if (lower_mnt) { ++ if (unlikely(bindex < dstart || bindex > dend)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CM0: dentry/lmnt=%p:%p bindex=%d " ++ "dstart/end=%d:%d\n", dentry, ++ lower_mnt, bindex, dstart, dend); ++ } ++ } else { /* lower_mnt == NULL */ ++ if (bindex < dstart || bindex > dend) ++ continue; ++ /* ++ * Directories can have NULL lower inodes in b/t ++ * start/end, but NOT if at the start/end range. ++ * Ignore this rule, however, if this is a NULL ++ * dentry. ++ */ ++ if (unlikely(inode && ++ !(inode && S_ISDIR(inode->i_mode) && ++ bindex > dstart && bindex < dend))) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CM1: dentry/lmnt=%p:%p " ++ "bindex=%d dstart/end=%d:%d\n", ++ dentry, lower_mnt, bindex, ++ dstart, dend); ++ } ++ } ++ } ++ ++check_inode: ++ /* for inodes now */ ++ if (!inode) ++ return; ++ istart = ibstart(inode); ++ iend = ibend(inode); ++ /* don't check inode if no lower branches */ ++ if (istart < 0 && iend < 0) ++ return; ++ BUG_ON(istart > iend); ++ if (unlikely((istart == -1 && iend != -1) || ++ (istart != -1 && iend == -1))) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CI0: dentry/inode=%p:%p istart/end=%d:%d\n", ++ dentry, inode, istart, iend); ++ } ++ if (unlikely(istart != dstart)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CI1: dentry/inode=%p:%p istart=%d dstart=%d\n", ++ dentry, inode, istart, dstart); ++ } ++ if (unlikely(iend != dend)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CI2: dentry/inode=%p:%p iend=%d dend=%d\n", ++ dentry, inode, iend, dend); ++ } ++ ++ if (!S_ISDIR(inode->i_mode)) { ++ if (unlikely(dend != dstart)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CI3: dentry/inode=%p:%p dstart=%d dend=%d\n", ++ dentry, inode, dstart, dend); ++ } ++ if (unlikely(iend != istart)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CI4: dentry/inode=%p:%p istart=%d iend=%d\n", ++ dentry, inode, istart, iend); ++ } ++ } ++ ++ for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (lower_inode) { ++ memset(&poison_ptr, POISON_INUSE, sizeof(void *)); ++ if (unlikely(bindex < istart || bindex > iend)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CI5: dentry/linode=%p:%p bindex=%d " ++ "istart/end=%d:%d\n", dentry, ++ lower_inode, bindex, istart, iend); ++ } else if (unlikely(lower_inode == poison_ptr)) { ++ /* freed inode! */ ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CI6: dentry/linode=%p:%p bindex=%d " ++ "istart/end=%d:%d\n", dentry, ++ lower_inode, bindex, istart, iend); ++ } ++ continue; ++ } ++ /* if we get here, then lower_inode == NULL */ ++ if (bindex < istart || bindex > iend) ++ continue; ++ /* ++ * directories can have NULL lower inodes in b/t start/end, ++ * but NOT if at the start/end range. ++ */ ++ if (unlikely(S_ISDIR(inode->i_mode) && ++ bindex > istart && bindex < iend)) ++ continue; ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CI7: dentry/linode=%p:%p " ++ "bindex=%d istart/end=%d:%d\n", ++ dentry, lower_inode, bindex, istart, iend); ++ } ++ ++ /* ++ * If it's a directory, then intermediate objects b/t start/end can ++ * be NULL. But, check that all three are NULL: lower dentry, mnt, ++ * and inode. ++ */ ++ if (dstart >= 0 && dend >= 0 && S_ISDIR(inode->i_mode)) ++ for (bindex = dstart+1; bindex < dend; bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ lower_dentry = unionfs_lower_dentry_idx(dentry, ++ bindex); ++ lower_mnt = unionfs_lower_mnt_idx(dentry, bindex); ++ if (unlikely(!((lower_inode && lower_dentry && ++ lower_mnt) || ++ (!lower_inode && ++ !lower_dentry && !lower_mnt)))) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" Cx: lmnt/ldentry/linode=%p:%p:%p " ++ "bindex=%d dstart/end=%d:%d\n", ++ lower_mnt, lower_dentry, lower_inode, ++ bindex, dstart, dend); ++ } ++ } ++ /* check if lower inode is newer than upper one (it shouldn't) */ ++ if (unlikely(is_newer_lower(dentry) && !is_negative_lower(dentry))) { ++ PRINT_CALLER(fname, fxn, line); ++ for (bindex = ibstart(inode); bindex <= ibend(inode); ++ bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (unlikely(!lower_inode)) ++ continue; ++ pr_debug(" CI8: bindex=%d mtime/lmtime=%lu.%lu/%lu.%lu " ++ "ctime/lctime=%lu.%lu/%lu.%lu\n", ++ bindex, ++ inode->i_mtime.tv_sec, ++ inode->i_mtime.tv_nsec, ++ lower_inode->i_mtime.tv_sec, ++ lower_inode->i_mtime.tv_nsec, ++ inode->i_ctime.tv_sec, ++ inode->i_ctime.tv_nsec, ++ lower_inode->i_ctime.tv_sec, ++ lower_inode->i_ctime.tv_nsec); ++ } ++ } ++} ++ ++void __unionfs_check_file(const struct file *file, ++ const char *fname, const char *fxn, int line) ++{ ++ int bindex; ++ int dstart, dend, fstart, fend; ++ struct dentry *dentry; ++ struct file *lower_file; ++ struct inode *inode; ++ struct super_block *sb; ++ int printed_caller = 0; ++ ++ BUG_ON(!file); ++ dentry = file->f_path.dentry; ++ sb = dentry->d_sb; ++ dstart = dbstart(dentry); ++ dend = dbend(dentry); ++ BUG_ON(dstart > dend); ++ fstart = fbstart(file); ++ fend = fbend(file); ++ BUG_ON(fstart > fend); ++ ++ if (unlikely((fstart == -1 && fend != -1) || ++ (fstart != -1 && fend == -1))) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CF0: file/dentry=%p:%p fstart/end=%d:%d\n", ++ file, dentry, fstart, fend); ++ } ++ if (unlikely(fstart != dstart)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CF1: file/dentry=%p:%p fstart=%d dstart=%d\n", ++ file, dentry, fstart, dstart); ++ } ++ if (unlikely(fend != dend)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CF2: file/dentry=%p:%p fend=%d dend=%d\n", ++ file, dentry, fend, dend); ++ } ++ inode = dentry->d_inode; ++ if (!S_ISDIR(inode->i_mode)) { ++ if (unlikely(fend != fstart)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CF3: file/inode=%p:%p fstart=%d fend=%d\n", ++ file, inode, fstart, fend); ++ } ++ if (unlikely(dend != dstart)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CF4: file/dentry=%p:%p dstart=%d dend=%d\n", ++ file, dentry, dstart, dend); ++ } ++ } ++ ++ /* ++ * check for NULL dentries inside the start/end range, or ++ * non-NULL dentries outside the start/end range. ++ */ ++ for (bindex = sbstart(sb); bindex < sbmax(sb); bindex++) { ++ lower_file = unionfs_lower_file_idx(file, bindex); ++ if (lower_file) { ++ if (unlikely(bindex < fstart || bindex > fend)) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CF5: file/lower=%p:%p bindex=%d " ++ "fstart/end=%d:%d\n", file, ++ lower_file, bindex, fstart, fend); ++ } ++ } else { /* lower_file == NULL */ ++ if (bindex >= fstart && bindex <= fend) { ++ /* ++ * directories can have NULL lower inodes in ++ * b/t start/end, but NOT if at the ++ * start/end range. ++ */ ++ if (unlikely(!(S_ISDIR(inode->i_mode) && ++ bindex > fstart && ++ bindex < fend))) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CF6: file/lower=%p:%p " ++ "bindex=%d fstart/end=%d:%d\n", ++ file, lower_file, bindex, ++ fstart, fend); ++ } ++ } ++ } ++ } ++ ++ __unionfs_check_dentry(dentry, fname, fxn, line); ++} ++ ++void __unionfs_check_nd(const struct nameidata *nd, ++ const char *fname, const char *fxn, int line) ++{ ++ struct file *file; ++ int printed_caller = 0; ++ ++ if (unlikely(!nd)) ++ return; ++ if (nd->flags & LOOKUP_OPEN) { ++ file = nd->intent.open.file; ++ if (unlikely(file->f_path.dentry && ++ strcmp(file->f_path.dentry->d_sb->s_type->name, ++ UNIONFS_NAME))) { ++ PRINT_CALLER(fname, fxn, line); ++ pr_debug(" CND1: lower_file of type %s\n", ++ file->f_path.dentry->d_sb->s_type->name); ++ } ++ } ++} ++ ++static unsigned int __mnt_get_count(struct vfsmount *mnt) ++{ ++#ifdef CONFIG_SMP ++ unsigned int count = 0; ++ int cpu; ++ ++ for_each_possible_cpu(cpu) { ++ count += per_cpu_ptr(mnt->mnt_pcp, cpu)->mnt_count; ++ } ++ ++ return count; ++#else ++ return mnt->mnt_count; ++#endif ++} ++ ++/* useful to track vfsmount leaks that could cause EBUSY on unmount */ ++void __show_branch_counts(const struct super_block *sb, ++ const char *file, const char *fxn, int line) ++{ ++ int i; ++ struct vfsmount *mnt; ++ ++ pr_debug("BC:"); ++ for (i = 0; i < sbmax(sb); i++) { ++ if (likely(sb->s_root)) ++ mnt = UNIONFS_D(sb->s_root)->lower_paths[i].mnt; ++ else ++ mnt = NULL; ++ printk(KERN_CONT "%d:", ++ (mnt ? __mnt_get_count(mnt) : -99)); ++ } ++ printk(KERN_CONT "%s:%s:%d\n", file, fxn, line); ++} ++ ++void __show_inode_times(const struct inode *inode, ++ const char *file, const char *fxn, int line) ++{ ++ struct inode *lower_inode; ++ int bindex; ++ ++ for (bindex = ibstart(inode); bindex <= ibend(inode); bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (unlikely(!lower_inode)) ++ continue; ++ pr_debug("IT(%lu:%d): %s:%s:%d " ++ "um=%lu/%lu lm=%lu/%lu uc=%lu/%lu lc=%lu/%lu\n", ++ inode->i_ino, bindex, ++ file, fxn, line, ++ inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, ++ lower_inode->i_mtime.tv_sec, ++ lower_inode->i_mtime.tv_nsec, ++ inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, ++ lower_inode->i_ctime.tv_sec, ++ lower_inode->i_ctime.tv_nsec); ++ } ++} ++ ++void __show_dinode_times(const struct dentry *dentry, ++ const char *file, const char *fxn, int line) ++{ ++ struct inode *inode = dentry->d_inode; ++ struct inode *lower_inode; ++ int bindex; ++ ++ for (bindex = ibstart(inode); bindex <= ibend(inode); bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (!lower_inode) ++ continue; ++ pr_debug("DT(%s:%lu:%d): %s:%s:%d " ++ "um=%lu/%lu lm=%lu/%lu uc=%lu/%lu lc=%lu/%lu\n", ++ dentry->d_name.name, inode->i_ino, bindex, ++ file, fxn, line, ++ inode->i_mtime.tv_sec, inode->i_mtime.tv_nsec, ++ lower_inode->i_mtime.tv_sec, ++ lower_inode->i_mtime.tv_nsec, ++ inode->i_ctime.tv_sec, inode->i_ctime.tv_nsec, ++ lower_inode->i_ctime.tv_sec, ++ lower_inode->i_ctime.tv_nsec); ++ } ++} ++ ++void __show_inode_counts(const struct inode *inode, ++ const char *file, const char *fxn, int line) ++{ ++ struct inode *lower_inode; ++ int bindex; ++ ++ if (unlikely(!inode)) { ++ pr_debug("SiC: Null inode\n"); ++ return; ++ } ++ for (bindex = sbstart(inode->i_sb); bindex <= sbend(inode->i_sb); ++ bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (unlikely(!lower_inode)) ++ continue; ++ pr_debug("SIC(%lu:%d:%d): lc=%d %s:%s:%d\n", ++ inode->i_ino, bindex, ++ atomic_read(&(inode)->i_count), ++ atomic_read(&(lower_inode)->i_count), ++ file, fxn, line); ++ } ++} +diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c +new file mode 100644 +index 0000000..c0205a4 +--- /dev/null ++++ b/fs/unionfs/dentry.c +@@ -0,0 +1,406 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++bool is_negative_lower(const struct dentry *dentry) ++{ ++ int bindex; ++ struct dentry *lower_dentry; ++ ++ BUG_ON(!dentry); ++ /* cache coherency: check if file was deleted on lower branch */ ++ if (dbstart(dentry) < 0) ++ return true; ++ for (bindex = dbstart(dentry); bindex <= dbend(dentry); bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ /* unhashed (i.e., unlinked) lower dentries don't count */ ++ if (lower_dentry && lower_dentry->d_inode && ++ !d_deleted(lower_dentry) && ++ !(lower_dentry->d_flags & DCACHE_NFSFS_RENAMED)) ++ return false; ++ } ++ return true; ++} ++ ++static inline void __dput_lowers(struct dentry *dentry, int start, int end) ++{ ++ struct dentry *lower_dentry; ++ int bindex; ++ ++ if (start < 0) ++ return; ++ for (bindex = start; bindex <= end; bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry) ++ continue; ++ unionfs_set_lower_dentry_idx(dentry, bindex, NULL); ++ dput(lower_dentry); ++ } ++} ++ ++/* ++ * Purge and invalidate as many data pages of a unionfs inode. This is ++ * called when the lower inode has changed, and we want to force processes ++ * to re-get the new data. ++ */ ++static inline void purge_inode_data(struct inode *inode) ++{ ++ /* remove all non-private mappings */ ++ unmap_mapping_range(inode->i_mapping, 0, 0, 0); ++ /* invalidate as many pages as possible */ ++ invalidate_mapping_pages(inode->i_mapping, 0, -1); ++ /* ++ * Don't try to truncate_inode_pages here, because this could lead ++ * to a deadlock between some of address_space ops and dentry ++ * revalidation: the address space op is invoked with a lock on our ++ * own page, and truncate_inode_pages will block on locked pages. ++ */ ++} ++ ++/* ++ * Revalidate a single file/symlink/special dentry. Assume that info nodes ++ * of the @dentry and its @parent are locked. Assume parent is valid, ++ * otherwise return false (and let's hope the VFS will try to re-lookup this ++ * dentry). Returns true if valid, false otherwise. ++ */ ++bool __unionfs_d_revalidate(struct dentry *dentry, struct dentry *parent, ++ bool willwrite) ++{ ++ bool valid = true; /* default is valid */ ++ struct dentry *lower_dentry; ++ struct dentry *result; ++ int bindex, bstart, bend; ++ int sbgen, dgen, pdgen; ++ int positive = 0; ++ int interpose_flag; ++ ++ verify_locked(dentry); ++ verify_locked(parent); ++ ++ /* if the dentry is unhashed, do NOT revalidate */ ++ if (d_deleted(dentry)) ++ goto out; ++ ++ dgen = atomic_read(&UNIONFS_D(dentry)->generation); ++ ++ if (is_newer_lower(dentry)) { ++ /* root dentry is always valid */ ++ if (IS_ROOT(dentry)) { ++ unionfs_copy_attr_times(dentry->d_inode); ++ } else { ++ /* ++ * reset generation number to zero, guaranteed to be ++ * "old" ++ */ ++ dgen = 0; ++ atomic_set(&UNIONFS_D(dentry)->generation, dgen); ++ } ++ if (!willwrite) ++ purge_inode_data(dentry->d_inode); ++ } ++ ++ sbgen = atomic_read(&UNIONFS_SB(dentry->d_sb)->generation); ++ ++ BUG_ON(dbstart(dentry) == -1); ++ if (dentry->d_inode) ++ positive = 1; ++ ++ /* if our dentry is valid, then validate all lower ones */ ++ if (sbgen == dgen) ++ goto validate_lowers; ++ ++ /* The root entry should always be valid */ ++ BUG_ON(IS_ROOT(dentry)); ++ ++ /* We can't work correctly if our parent isn't valid. */ ++ pdgen = atomic_read(&UNIONFS_D(parent)->generation); ++ ++ /* Free the pointers for our inodes and this dentry. */ ++ path_put_lowers_all(dentry, false); ++ ++ interpose_flag = INTERPOSE_REVAL_NEG; ++ if (positive) { ++ interpose_flag = INTERPOSE_REVAL; ++ iput_lowers_all(dentry->d_inode, true); ++ } ++ ++ if (realloc_dentry_private_data(dentry) != 0) { ++ valid = false; ++ goto out; ++ } ++ ++ result = unionfs_lookup_full(dentry, parent, interpose_flag); ++ if (result) { ++ if (IS_ERR(result)) { ++ valid = false; ++ goto out; ++ } ++ /* ++ * current unionfs_lookup_backend() doesn't return ++ * a valid dentry ++ */ ++ dput(dentry); ++ dentry = result; ++ } ++ ++ if (unlikely(positive && is_negative_lower(dentry))) { ++ /* call make_bad_inode here ? */ ++ d_drop(dentry); ++ valid = false; ++ goto out; ++ } ++ ++ /* ++ * if we got here then we have revalidated our dentry and all lower ++ * ones, so we can return safely. ++ */ ++ if (!valid) /* lower dentry revalidation failed */ ++ goto out; ++ ++ /* ++ * If the parent's gen no. matches the superblock's gen no., then ++ * we can update our denty's gen no. If they didn't match, then it ++ * was OK to revalidate this dentry with a stale parent, but we'll ++ * purposely not update our dentry's gen no. (so it can be redone); ++ * and, we'll mark our parent dentry as invalid so it'll force it ++ * (and our dentry) to be revalidated. ++ */ ++ if (pdgen == sbgen) ++ atomic_set(&UNIONFS_D(dentry)->generation, sbgen); ++ goto out; ++ ++validate_lowers: ++ ++ /* The revalidation must occur across all branches */ ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ BUG_ON(bstart == -1); ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ int err; ++ struct nameidata lower_nd; ++ ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry || !lower_dentry->d_op ++ || !lower_dentry->d_op->d_revalidate) ++ continue; ++ /* ++ * Don't pass nameidata to lower file system, because we ++ * don't want an arbitrary lower file being opened or ++ * returned to us: it may be useless to us because of the ++ * fanout nature of unionfs (cf. file/directory open-file ++ * invariants). We will open lower files as and when needed ++ * later on. ++ */ ++ err = init_lower_nd(&lower_nd, LOOKUP_OPEN); ++ if (unlikely(err < 0)) { ++ valid = false; ++ break; ++ } ++ if (!lower_dentry->d_op->d_revalidate(lower_dentry, &lower_nd)) ++ valid = false; ++ release_lower_nd(&lower_nd, err); ++ } ++ ++ if (!dentry->d_inode || ++ ibstart(dentry->d_inode) < 0 || ++ ibend(dentry->d_inode) < 0) { ++ valid = false; ++ goto out; ++ } ++ ++ if (valid) { ++ /* ++ * If we get here, and we copy the meta-data from the lower ++ * inode to our inode, then it is vital that we have already ++ * purged all unionfs-level file data. We do that in the ++ * caller (__unionfs_d_revalidate) by calling ++ * purge_inode_data. ++ */ ++ unionfs_copy_attr_all(dentry->d_inode, ++ unionfs_lower_inode(dentry->d_inode)); ++ fsstack_copy_inode_size(dentry->d_inode, ++ unionfs_lower_inode(dentry->d_inode)); ++ } ++ ++out: ++ return valid; ++} ++ ++/* ++ * Determine if the lower inode objects have changed from below the unionfs ++ * inode. Return true if changed, false otherwise. ++ * ++ * We check if the mtime or ctime have changed. However, the inode times ++ * can be changed by anyone without much protection, including ++ * asynchronously. This can sometimes cause unionfs to find that the lower ++ * file system doesn't change its inode times quick enough, resulting in a ++ * false positive indication (which is harmless, it just makes unionfs do ++ * extra work in re-validating the objects). To minimize the chances of ++ * these situations, we still consider such small time changes valid, but we ++ * don't print debugging messages unless the time changes are greater than ++ * UNIONFS_MIN_CC_TIME (which defaults to 3 seconds, as with NFS's acregmin) ++ * because significant changes are more likely due to users manually ++ * touching lower files. ++ */ ++bool is_newer_lower(const struct dentry *dentry) ++{ ++ int bindex; ++ struct inode *inode; ++ struct inode *lower_inode; ++ ++ /* ignore if we're called on semi-initialized dentries/inodes */ ++ if (!dentry || !UNIONFS_D(dentry)) ++ return false; ++ inode = dentry->d_inode; ++ if (!inode || !UNIONFS_I(inode)->lower_inodes || ++ ibstart(inode) < 0 || ibend(inode) < 0) ++ return false; ++ ++ for (bindex = ibstart(inode); bindex <= ibend(inode); bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (!lower_inode) ++ continue; ++ ++ /* check if mtime/ctime have changed */ ++ if (unlikely(timespec_compare(&inode->i_mtime, ++ &lower_inode->i_mtime) < 0)) { ++ if ((lower_inode->i_mtime.tv_sec - ++ inode->i_mtime.tv_sec) > UNIONFS_MIN_CC_TIME) { ++ pr_info("unionfs: new lower inode mtime " ++ "(bindex=%d, name=%s)\n", bindex, ++ dentry->d_name.name); ++ show_dinode_times(dentry); ++ } ++ return true; ++ } ++ if (unlikely(timespec_compare(&inode->i_ctime, ++ &lower_inode->i_ctime) < 0)) { ++ if ((lower_inode->i_ctime.tv_sec - ++ inode->i_ctime.tv_sec) > UNIONFS_MIN_CC_TIME) { ++ pr_info("unionfs: new lower inode ctime " ++ "(bindex=%d, name=%s)\n", bindex, ++ dentry->d_name.name); ++ show_dinode_times(dentry); ++ } ++ return true; ++ } ++ } ++ ++ /* ++ * Last check: if this is a positive dentry, but somehow all lower ++ * dentries are negative or unhashed, then this dentry needs to be ++ * revalidated, because someone probably deleted the objects from ++ * the lower branches directly. ++ */ ++ if (is_negative_lower(dentry)) ++ return true; ++ ++ return false; /* default: lower is not newer */ ++} ++ ++static int unionfs_d_revalidate(struct dentry *dentry, ++ struct nameidata *nd_unused) ++{ ++ bool valid = true; ++ int err = 1; /* 1 means valid for the VFS */ ++ struct dentry *parent; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (valid) { ++ unionfs_postcopyup_setmnt(dentry); ++ unionfs_check_dentry(dentry); ++ } else { ++ d_drop(dentry); ++ err = valid; ++ } ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ ++ return err; ++} ++ ++static void unionfs_d_release(struct dentry *dentry) ++{ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ if (unlikely(!UNIONFS_D(dentry))) ++ goto out; /* skip if no lower branches */ ++ /* must lock our branch configuration here */ ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ unionfs_check_dentry(dentry); ++ /* this could be a negative dentry, so check first */ ++ if (dbstart(dentry) < 0) { ++ unionfs_unlock_dentry(dentry); ++ goto out; /* due to a (normal) failed lookup */ ++ } ++ ++ /* Release all the lower dentries */ ++ path_put_lowers_all(dentry, true); ++ ++ unionfs_unlock_dentry(dentry); ++ ++out: ++ free_dentry_private_data(dentry); ++ unionfs_read_unlock(dentry->d_sb); ++ return; ++} ++ ++/* ++ * Called when we're removing the last reference to our dentry. So we ++ * should drop all lower references too. ++ */ ++static void unionfs_d_iput(struct dentry *dentry, struct inode *inode) ++{ ++ int rc; ++ ++ BUG_ON(!dentry); ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ if (!UNIONFS_D(dentry) || dbstart(dentry) < 0) ++ goto drop_lower_inodes; ++ path_put_lowers_all(dentry, false); ++ ++drop_lower_inodes: ++ rc = atomic_read(&inode->i_count); ++ if (rc == 1 && inode->i_nlink == 1 && ibstart(inode) >= 0) { ++ /* see Documentation/filesystems/unionfs/issues.txt */ ++ lockdep_off(); ++ iput(unionfs_lower_inode(inode)); ++ lockdep_on(); ++ unionfs_set_lower_inode(inode, NULL); ++ /* XXX: may need to set start/end to -1? */ ++ } ++ ++ iput(inode); ++ ++ unionfs_unlock_dentry(dentry); ++ unionfs_read_unlock(dentry->d_sb); ++} ++ ++struct dentry_operations unionfs_dops = { ++ .d_revalidate = unionfs_d_revalidate, ++ .d_release = unionfs_d_release, ++ .d_iput = unionfs_d_iput, ++}; +diff --git a/fs/unionfs/dirfops.c b/fs/unionfs/dirfops.c +new file mode 100644 +index 0000000..72a9c1a +--- /dev/null ++++ b/fs/unionfs/dirfops.c +@@ -0,0 +1,302 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* Make sure our rdstate is playing by the rules. */ ++static void verify_rdstate_offset(struct unionfs_dir_state *rdstate) ++{ ++ BUG_ON(rdstate->offset >= DIREOF); ++ BUG_ON(rdstate->cookie >= MAXRDCOOKIE); ++} ++ ++struct unionfs_getdents_callback { ++ struct unionfs_dir_state *rdstate; ++ void *dirent; ++ int entries_written; ++ int filldir_called; ++ int filldir_error; ++ filldir_t filldir; ++ struct super_block *sb; ++}; ++ ++/* based on generic filldir in fs/readir.c */ ++static int unionfs_filldir(void *dirent, const char *oname, int namelen, ++ loff_t offset, u64 ino, unsigned int d_type) ++{ ++ struct unionfs_getdents_callback *buf = dirent; ++ struct filldir_node *found = NULL; ++ int err = 0; ++ int is_whiteout; ++ char *name = (char *) oname; ++ ++ buf->filldir_called++; ++ ++ is_whiteout = is_whiteout_name(&name, &namelen); ++ ++ found = find_filldir_node(buf->rdstate, name, namelen, is_whiteout); ++ ++ if (found) { ++ /* ++ * If we had non-whiteout entry in dir cache, then mark it ++ * as a whiteout and but leave it in the dir cache. ++ */ ++ if (is_whiteout && !found->whiteout) ++ found->whiteout = is_whiteout; ++ goto out; ++ } ++ ++ /* if 'name' isn't a whiteout, filldir it. */ ++ if (!is_whiteout) { ++ off_t pos = rdstate2offset(buf->rdstate); ++ u64 unionfs_ino = ino; ++ ++ err = buf->filldir(buf->dirent, name, namelen, pos, ++ unionfs_ino, d_type); ++ buf->rdstate->offset++; ++ verify_rdstate_offset(buf->rdstate); ++ } ++ /* ++ * If we did fill it, stuff it in our hash, otherwise return an ++ * error. ++ */ ++ if (err) { ++ buf->filldir_error = err; ++ goto out; ++ } ++ buf->entries_written++; ++ err = add_filldir_node(buf->rdstate, name, namelen, ++ buf->rdstate->bindex, is_whiteout); ++ if (err) ++ buf->filldir_error = err; ++ ++out: ++ return err; ++} ++ ++static int unionfs_readdir(struct file *file, void *dirent, filldir_t filldir) ++{ ++ int err = 0; ++ struct file *lower_file = NULL; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ struct inode *inode = NULL; ++ struct unionfs_getdents_callback buf; ++ struct unionfs_dir_state *uds; ++ int bend; ++ loff_t offset; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ err = unionfs_file_revalidate(file, parent, false); ++ if (unlikely(err)) ++ goto out; ++ ++ inode = dentry->d_inode; ++ ++ uds = UNIONFS_F(file)->rdstate; ++ if (!uds) { ++ if (file->f_pos == DIREOF) { ++ goto out; ++ } else if (file->f_pos > 0) { ++ uds = find_rdstate(inode, file->f_pos); ++ if (unlikely(!uds)) { ++ err = -ESTALE; ++ goto out; ++ } ++ UNIONFS_F(file)->rdstate = uds; ++ } else { ++ init_rdstate(file); ++ uds = UNIONFS_F(file)->rdstate; ++ } ++ } ++ bend = fbend(file); ++ ++ while (uds->bindex <= bend) { ++ lower_file = unionfs_lower_file_idx(file, uds->bindex); ++ if (!lower_file) { ++ uds->bindex++; ++ uds->dirpos = 0; ++ continue; ++ } ++ ++ /* prepare callback buffer */ ++ buf.filldir_called = 0; ++ buf.filldir_error = 0; ++ buf.entries_written = 0; ++ buf.dirent = dirent; ++ buf.filldir = filldir; ++ buf.rdstate = uds; ++ buf.sb = inode->i_sb; ++ ++ /* Read starting from where we last left off. */ ++ offset = vfs_llseek(lower_file, uds->dirpos, SEEK_SET); ++ if (offset < 0) { ++ err = offset; ++ goto out; ++ } ++ err = vfs_readdir(lower_file, unionfs_filldir, &buf); ++ ++ /* Save the position for when we continue. */ ++ offset = vfs_llseek(lower_file, 0, SEEK_CUR); ++ if (offset < 0) { ++ err = offset; ++ goto out; ++ } ++ uds->dirpos = offset; ++ ++ /* Copy the atime. */ ++ fsstack_copy_attr_atime(inode, ++ lower_file->f_path.dentry->d_inode); ++ ++ if (err < 0) ++ goto out; ++ ++ if (buf.filldir_error) ++ break; ++ ++ if (!buf.entries_written) { ++ uds->bindex++; ++ uds->dirpos = 0; ++ } ++ } ++ ++ if (!buf.filldir_error && uds->bindex >= bend) { ++ /* Save the number of hash entries for next time. */ ++ UNIONFS_I(inode)->hashsize = uds->hashentries; ++ free_rdstate(uds); ++ UNIONFS_F(file)->rdstate = NULL; ++ file->f_pos = DIREOF; ++ } else { ++ file->f_pos = rdstate2offset(uds); ++ } ++ ++out: ++ if (!err) ++ unionfs_check_file(file); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++/* ++ * This is not meant to be a generic repositioning function. If you do ++ * things that aren't supported, then we return EINVAL. ++ * ++ * What is allowed: ++ * (1) seeking to the same position that you are currently at ++ * This really has no effect, but returns where you are. ++ * (2) seeking to the beginning of the file ++ * This throws out all state, and lets you begin again. ++ */ ++static loff_t unionfs_dir_llseek(struct file *file, loff_t offset, int origin) ++{ ++ struct unionfs_dir_state *rdstate; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ loff_t err; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ err = unionfs_file_revalidate(file, parent, false); ++ if (unlikely(err)) ++ goto out; ++ ++ rdstate = UNIONFS_F(file)->rdstate; ++ ++ /* ++ * we let users seek to their current position, but not anywhere ++ * else. ++ */ ++ if (!offset) { ++ switch (origin) { ++ case SEEK_SET: ++ if (rdstate) { ++ free_rdstate(rdstate); ++ UNIONFS_F(file)->rdstate = NULL; ++ } ++ init_rdstate(file); ++ err = 0; ++ break; ++ case SEEK_CUR: ++ err = file->f_pos; ++ break; ++ case SEEK_END: ++ /* Unsupported, because we would break everything. */ ++ err = -EINVAL; ++ break; ++ } ++ } else { ++ switch (origin) { ++ case SEEK_SET: ++ if (rdstate) { ++ if (offset == rdstate2offset(rdstate)) ++ err = offset; ++ else if (file->f_pos == DIREOF) ++ err = DIREOF; ++ else ++ err = -EINVAL; ++ } else { ++ struct inode *inode; ++ inode = dentry->d_inode; ++ rdstate = find_rdstate(inode, offset); ++ if (rdstate) { ++ UNIONFS_F(file)->rdstate = rdstate; ++ err = rdstate->offset; ++ } else { ++ err = -EINVAL; ++ } ++ } ++ break; ++ case SEEK_CUR: ++ case SEEK_END: ++ /* Unsupported, because we would break everything. */ ++ err = -EINVAL; ++ break; ++ } ++ } ++ ++out: ++ if (!err) ++ unionfs_check_file(file); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++/* ++ * Trimmed directory options, we shouldn't pass everything down since ++ * we don't want to operate on partial directories. ++ */ ++struct file_operations unionfs_dir_fops = { ++ .llseek = unionfs_dir_llseek, ++ .read = generic_read_dir, ++ .readdir = unionfs_readdir, ++ .unlocked_ioctl = unionfs_ioctl, ++ .open = unionfs_open, ++ .release = unionfs_file_release, ++ .flush = unionfs_flush, ++ .fsync = unionfs_fsync, ++ .fasync = unionfs_fasync, ++}; +diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c +new file mode 100644 +index 0000000..62ec9af +--- /dev/null ++++ b/fs/unionfs/dirhelper.c +@@ -0,0 +1,158 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++#define RD_NONE 0 ++#define RD_CHECK_EMPTY 1 ++/* The callback structure for check_empty. */ ++struct unionfs_rdutil_callback { ++ int err; ++ int filldir_called; ++ struct unionfs_dir_state *rdstate; ++ int mode; ++}; ++ ++/* This filldir function makes sure only whiteouts exist within a directory. */ ++static int readdir_util_callback(void *dirent, const char *oname, int namelen, ++ loff_t offset, u64 ino, unsigned int d_type) ++{ ++ int err = 0; ++ struct unionfs_rdutil_callback *buf = dirent; ++ int is_whiteout; ++ struct filldir_node *found; ++ char *name = (char *) oname; ++ ++ buf->filldir_called = 1; ++ ++ if (name[0] == '.' && (namelen == 1 || ++ (name[1] == '.' && namelen == 2))) ++ goto out; ++ ++ is_whiteout = is_whiteout_name(&name, &namelen); ++ ++ found = find_filldir_node(buf->rdstate, name, namelen, is_whiteout); ++ /* If it was found in the table there was a previous whiteout. */ ++ if (found) ++ goto out; ++ ++ /* ++ * if it wasn't found and isn't a whiteout, the directory isn't ++ * empty. ++ */ ++ err = -ENOTEMPTY; ++ if ((buf->mode == RD_CHECK_EMPTY) && !is_whiteout) ++ goto out; ++ ++ err = add_filldir_node(buf->rdstate, name, namelen, ++ buf->rdstate->bindex, is_whiteout); ++ ++out: ++ buf->err = err; ++ return err; ++} ++ ++/* Is a directory logically empty? */ ++int check_empty(struct dentry *dentry, struct dentry *parent, ++ struct unionfs_dir_state **namelist) ++{ ++ int err = 0; ++ struct dentry *lower_dentry = NULL; ++ struct vfsmount *mnt; ++ struct super_block *sb; ++ struct file *lower_file; ++ struct unionfs_rdutil_callback *buf = NULL; ++ int bindex, bstart, bend, bopaque; ++ ++ sb = dentry->d_sb; ++ ++ ++ BUG_ON(!S_ISDIR(dentry->d_inode->i_mode)); ++ ++ err = unionfs_partial_lookup(dentry, parent); ++ if (err) ++ goto out; ++ ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ bopaque = dbopaque(dentry); ++ if (0 <= bopaque && bopaque < bend) ++ bend = bopaque; ++ ++ buf = kmalloc(sizeof(struct unionfs_rdutil_callback), GFP_KERNEL); ++ if (unlikely(!buf)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ buf->err = 0; ++ buf->mode = RD_CHECK_EMPTY; ++ buf->rdstate = alloc_rdstate(dentry->d_inode, bstart); ++ if (unlikely(!buf->rdstate)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ ++ /* Process the lower directories with rdutil_callback as a filldir. */ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry) ++ continue; ++ if (!lower_dentry->d_inode) ++ continue; ++ if (!S_ISDIR(lower_dentry->d_inode->i_mode)) ++ continue; ++ ++ dget(lower_dentry); ++ mnt = unionfs_mntget(dentry, bindex); ++ branchget(sb, bindex); ++ lower_file = dentry_open(lower_dentry, mnt, O_RDONLY, current_cred()); ++ if (IS_ERR(lower_file)) { ++ err = PTR_ERR(lower_file); ++ branchput(sb, bindex); ++ goto out; ++ } ++ ++ do { ++ buf->filldir_called = 0; ++ buf->rdstate->bindex = bindex; ++ err = vfs_readdir(lower_file, ++ readdir_util_callback, buf); ++ if (buf->err) ++ err = buf->err; ++ } while ((err >= 0) && buf->filldir_called); ++ ++ /* fput calls dput for lower_dentry */ ++ fput(lower_file); ++ branchput(sb, bindex); ++ ++ if (err < 0) ++ goto out; ++ } ++ ++out: ++ if (buf) { ++ if (namelist && !err) ++ *namelist = buf->rdstate; ++ else if (buf->rdstate) ++ free_rdstate(buf->rdstate); ++ kfree(buf); ++ } ++ ++ ++ return err; ++} +diff --git a/fs/unionfs/fanout.h b/fs/unionfs/fanout.h +new file mode 100644 +index 0000000..ae1b86a +--- /dev/null ++++ b/fs/unionfs/fanout.h +@@ -0,0 +1,407 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef _FANOUT_H_ ++#define _FANOUT_H_ ++ ++/* ++ * Inode to private data ++ * ++ * Since we use containers and the struct inode is _inside_ the ++ * unionfs_inode_info structure, UNIONFS_I will always (given a non-NULL ++ * inode pointer), return a valid non-NULL pointer. ++ */ ++static inline struct unionfs_inode_info *UNIONFS_I(const struct inode *inode) ++{ ++ return container_of(inode, struct unionfs_inode_info, vfs_inode); ++} ++ ++#define ibstart(ino) (UNIONFS_I(ino)->bstart) ++#define ibend(ino) (UNIONFS_I(ino)->bend) ++ ++/* Dentry to private data */ ++#define UNIONFS_D(dent) ((struct unionfs_dentry_info *)(dent)->d_fsdata) ++#define dbstart(dent) (UNIONFS_D(dent)->bstart) ++#define dbend(dent) (UNIONFS_D(dent)->bend) ++#define dbopaque(dent) (UNIONFS_D(dent)->bopaque) ++ ++/* Superblock to private data */ ++#define UNIONFS_SB(super) ((struct unionfs_sb_info *)(super)->s_fs_info) ++#define sbstart(sb) 0 ++#define sbend(sb) (UNIONFS_SB(sb)->bend) ++#define sbmax(sb) (UNIONFS_SB(sb)->bend + 1) ++#define sbhbid(sb) (UNIONFS_SB(sb)->high_branch_id) ++ ++/* File to private Data */ ++#define UNIONFS_F(file) ((struct unionfs_file_info *)((file)->private_data)) ++#define fbstart(file) (UNIONFS_F(file)->bstart) ++#define fbend(file) (UNIONFS_F(file)->bend) ++ ++/* macros to manipulate branch IDs in stored in our superblock */ ++static inline int branch_id(struct super_block *sb, int index) ++{ ++ BUG_ON(!sb || index < 0); ++ return UNIONFS_SB(sb)->data[index].branch_id; ++} ++ ++static inline void set_branch_id(struct super_block *sb, int index, int val) ++{ ++ BUG_ON(!sb || index < 0); ++ UNIONFS_SB(sb)->data[index].branch_id = val; ++} ++ ++static inline void new_branch_id(struct super_block *sb, int index) ++{ ++ BUG_ON(!sb || index < 0); ++ set_branch_id(sb, index, ++UNIONFS_SB(sb)->high_branch_id); ++} ++ ++/* ++ * Find new index of matching branch with an existing superblock of a known ++ * (possibly old) id. This is needed because branches could have been ++ * added/deleted causing the branches of any open files to shift. ++ * ++ * @sb: the new superblock which may have new/different branch IDs ++ * @id: the old/existing id we're looking for ++ * Returns index of newly found branch (0 or greater), -1 otherwise. ++ */ ++static inline int branch_id_to_idx(struct super_block *sb, int id) ++{ ++ int i; ++ for (i = 0; i < sbmax(sb); i++) { ++ if (branch_id(sb, i) == id) ++ return i; ++ } ++ /* in the non-ODF code, this should really never happen */ ++ printk(KERN_WARNING "unionfs: cannot find branch with id %d\n", id); ++ return -1; ++} ++ ++/* File to lower file. */ ++static inline struct file *unionfs_lower_file(const struct file *f) ++{ ++ BUG_ON(!f); ++ return UNIONFS_F(f)->lower_files[fbstart(f)]; ++} ++ ++static inline struct file *unionfs_lower_file_idx(const struct file *f, ++ int index) ++{ ++ BUG_ON(!f || index < 0); ++ return UNIONFS_F(f)->lower_files[index]; ++} ++ ++static inline void unionfs_set_lower_file_idx(struct file *f, int index, ++ struct file *val) ++{ ++ BUG_ON(!f || index < 0); ++ UNIONFS_F(f)->lower_files[index] = val; ++ /* save branch ID (may be redundant?) */ ++ UNIONFS_F(f)->saved_branch_ids[index] = ++ branch_id((f)->f_path.dentry->d_sb, index); ++} ++ ++static inline void unionfs_set_lower_file(struct file *f, struct file *val) ++{ ++ BUG_ON(!f); ++ unionfs_set_lower_file_idx((f), fbstart(f), (val)); ++} ++ ++/* Inode to lower inode. */ ++static inline struct inode *unionfs_lower_inode(const struct inode *i) ++{ ++ BUG_ON(!i); ++ return UNIONFS_I(i)->lower_inodes[ibstart(i)]; ++} ++ ++static inline struct inode *unionfs_lower_inode_idx(const struct inode *i, ++ int index) ++{ ++ BUG_ON(!i || index < 0); ++ return UNIONFS_I(i)->lower_inodes[index]; ++} ++ ++static inline void unionfs_set_lower_inode_idx(struct inode *i, int index, ++ struct inode *val) ++{ ++ BUG_ON(!i || index < 0); ++ UNIONFS_I(i)->lower_inodes[index] = val; ++} ++ ++static inline void unionfs_set_lower_inode(struct inode *i, struct inode *val) ++{ ++ BUG_ON(!i); ++ UNIONFS_I(i)->lower_inodes[ibstart(i)] = val; ++} ++ ++/* Superblock to lower superblock. */ ++static inline struct super_block *unionfs_lower_super( ++ const struct super_block *sb) ++{ ++ BUG_ON(!sb); ++ return UNIONFS_SB(sb)->data[sbstart(sb)].sb; ++} ++ ++static inline struct super_block *unionfs_lower_super_idx( ++ const struct super_block *sb, ++ int index) ++{ ++ BUG_ON(!sb || index < 0); ++ return UNIONFS_SB(sb)->data[index].sb; ++} ++ ++static inline void unionfs_set_lower_super_idx(struct super_block *sb, ++ int index, ++ struct super_block *val) ++{ ++ BUG_ON(!sb || index < 0); ++ UNIONFS_SB(sb)->data[index].sb = val; ++} ++ ++static inline void unionfs_set_lower_super(struct super_block *sb, ++ struct super_block *val) ++{ ++ BUG_ON(!sb); ++ UNIONFS_SB(sb)->data[sbstart(sb)].sb = val; ++} ++ ++/* Branch count macros. */ ++static inline int branch_count(const struct super_block *sb, int index) ++{ ++ BUG_ON(!sb || index < 0); ++ return atomic_read(&UNIONFS_SB(sb)->data[index].open_files); ++} ++ ++static inline void set_branch_count(struct super_block *sb, int index, int val) ++{ ++ BUG_ON(!sb || index < 0); ++ atomic_set(&UNIONFS_SB(sb)->data[index].open_files, val); ++} ++ ++static inline void branchget(struct super_block *sb, int index) ++{ ++ BUG_ON(!sb || index < 0); ++ atomic_inc(&UNIONFS_SB(sb)->data[index].open_files); ++} ++ ++static inline void branchput(struct super_block *sb, int index) ++{ ++ BUG_ON(!sb || index < 0); ++ atomic_dec(&UNIONFS_SB(sb)->data[index].open_files); ++} ++ ++/* Dentry macros */ ++static inline void unionfs_set_lower_dentry_idx(struct dentry *dent, int index, ++ struct dentry *val) ++{ ++ BUG_ON(!dent || index < 0); ++ UNIONFS_D(dent)->lower_paths[index].dentry = val; ++} ++ ++static inline struct dentry *unionfs_lower_dentry_idx( ++ const struct dentry *dent, ++ int index) ++{ ++ BUG_ON(!dent || index < 0); ++ return UNIONFS_D(dent)->lower_paths[index].dentry; ++} ++ ++static inline struct dentry *unionfs_lower_dentry(const struct dentry *dent) ++{ ++ BUG_ON(!dent); ++ return unionfs_lower_dentry_idx(dent, dbstart(dent)); ++} ++ ++static inline void unionfs_set_lower_mnt_idx(struct dentry *dent, int index, ++ struct vfsmount *mnt) ++{ ++ BUG_ON(!dent || index < 0); ++ UNIONFS_D(dent)->lower_paths[index].mnt = mnt; ++} ++ ++static inline struct vfsmount *unionfs_lower_mnt_idx( ++ const struct dentry *dent, ++ int index) ++{ ++ BUG_ON(!dent || index < 0); ++ return UNIONFS_D(dent)->lower_paths[index].mnt; ++} ++ ++static inline struct vfsmount *unionfs_lower_mnt(const struct dentry *dent) ++{ ++ BUG_ON(!dent); ++ return unionfs_lower_mnt_idx(dent, dbstart(dent)); ++} ++ ++/* Macros for locking a dentry. */ ++enum unionfs_dentry_lock_class { ++ UNIONFS_DMUTEX_NORMAL, ++ UNIONFS_DMUTEX_ROOT, ++ UNIONFS_DMUTEX_PARENT, ++ UNIONFS_DMUTEX_CHILD, ++ UNIONFS_DMUTEX_WHITEOUT, ++ UNIONFS_DMUTEX_REVAL_PARENT, /* for file/dentry revalidate */ ++ UNIONFS_DMUTEX_REVAL_CHILD, /* for file/dentry revalidate */ ++}; ++ ++static inline void unionfs_lock_dentry(struct dentry *d, ++ unsigned int subclass) ++{ ++ BUG_ON(!d); ++ mutex_lock_nested(&UNIONFS_D(d)->lock, subclass); ++} ++ ++static inline void unionfs_unlock_dentry(struct dentry *d) ++{ ++ BUG_ON(!d); ++ mutex_unlock(&UNIONFS_D(d)->lock); ++} ++ ++static inline struct dentry *unionfs_lock_parent(struct dentry *d, ++ unsigned int subclass) ++{ ++ struct dentry *p; ++ ++ BUG_ON(!d); ++ p = dget_parent(d); ++ if (p != d) ++ mutex_lock_nested(&UNIONFS_D(p)->lock, subclass); ++ return p; ++} ++ ++static inline void unionfs_unlock_parent(struct dentry *d, struct dentry *p) ++{ ++ BUG_ON(!d); ++ BUG_ON(!p); ++ if (p != d) { ++ BUG_ON(!mutex_is_locked(&UNIONFS_D(p)->lock)); ++ mutex_unlock(&UNIONFS_D(p)->lock); ++ } ++ dput(p); ++} ++ ++static inline void verify_locked(struct dentry *d) ++{ ++ BUG_ON(!d); ++ BUG_ON(!mutex_is_locked(&UNIONFS_D(d)->lock)); ++} ++ ++/* macros to put lower objects */ ++ ++/* ++ * iput lower inodes of an unionfs dentry, from bstart to bend. If ++ * @free_lower is true, then also kfree the memory used to hold the lower ++ * object pointers. ++ */ ++static inline void iput_lowers(struct inode *inode, ++ int bstart, int bend, bool free_lower) ++{ ++ struct inode *lower_inode; ++ int bindex; ++ ++ BUG_ON(!inode); ++ BUG_ON(!UNIONFS_I(inode)); ++ BUG_ON(bstart < 0); ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (lower_inode) { ++ unionfs_set_lower_inode_idx(inode, bindex, NULL); ++ /* see Documentation/filesystems/unionfs/issues.txt */ ++ lockdep_off(); ++ iput(lower_inode); ++ lockdep_on(); ++ } ++ } ++ ++ if (free_lower) { ++ kfree(UNIONFS_I(inode)->lower_inodes); ++ UNIONFS_I(inode)->lower_inodes = NULL; ++ } ++} ++ ++/* iput all lower inodes, and reset start/end branch indices to -1 */ ++static inline void iput_lowers_all(struct inode *inode, bool free_lower) ++{ ++ int bstart, bend; ++ ++ BUG_ON(!inode); ++ BUG_ON(!UNIONFS_I(inode)); ++ bstart = ibstart(inode); ++ bend = ibend(inode); ++ BUG_ON(bstart < 0); ++ ++ iput_lowers(inode, bstart, bend, free_lower); ++ ibstart(inode) = ibend(inode) = -1; ++} ++ ++/* ++ * dput/mntput all lower dentries and vfsmounts of an unionfs dentry, from ++ * bstart to bend. If @free_lower is true, then also kfree the memory used ++ * to hold the lower object pointers. ++ * ++ * XXX: implement using path_put VFS macros ++ */ ++static inline void path_put_lowers(struct dentry *dentry, ++ int bstart, int bend, bool free_lower) ++{ ++ struct dentry *lower_dentry; ++ struct vfsmount *lower_mnt; ++ int bindex; ++ ++ BUG_ON(!dentry); ++ BUG_ON(!UNIONFS_D(dentry)); ++ BUG_ON(bstart < 0); ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (lower_dentry) { ++ unionfs_set_lower_dentry_idx(dentry, bindex, NULL); ++ dput(lower_dentry); ++ } ++ lower_mnt = unionfs_lower_mnt_idx(dentry, bindex); ++ if (lower_mnt) { ++ unionfs_set_lower_mnt_idx(dentry, bindex, NULL); ++ mntput(lower_mnt); ++ } ++ } ++ ++ if (free_lower) { ++ kfree(UNIONFS_D(dentry)->lower_paths); ++ UNIONFS_D(dentry)->lower_paths = NULL; ++ } ++} ++ ++/* ++ * dput/mntput all lower dentries and vfsmounts, and reset start/end branch ++ * indices to -1. ++ */ ++static inline void path_put_lowers_all(struct dentry *dentry, bool free_lower) ++{ ++ int bstart, bend; ++ ++ BUG_ON(!dentry); ++ BUG_ON(!UNIONFS_D(dentry)); ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ BUG_ON(bstart < 0); ++ ++ path_put_lowers(dentry, bstart, bend, free_lower); ++ dbstart(dentry) = dbend(dentry) = -1; ++} ++ ++#endif /* not _FANOUT_H */ +diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c +new file mode 100644 +index 0000000..416c52f +--- /dev/null ++++ b/fs/unionfs/file.c +@@ -0,0 +1,382 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++static ssize_t unionfs_read(struct file *file, char __user *buf, ++ size_t count, loff_t *ppos) ++{ ++ int err; ++ struct file *lower_file; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ err = unionfs_file_revalidate(file, parent, false); ++ if (unlikely(err)) ++ goto out; ++ ++ lower_file = unionfs_lower_file(file); ++ err = vfs_read(lower_file, buf, count, ppos); ++ /* update our inode atime upon a successful lower read */ ++ if (err >= 0) { ++ fsstack_copy_attr_atime(dentry->d_inode, ++ lower_file->f_path.dentry->d_inode); ++ unionfs_check_file(file); ++ } ++ ++out: ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++static ssize_t unionfs_write(struct file *file, const char __user *buf, ++ size_t count, loff_t *ppos) ++{ ++ int err = 0; ++ struct file *lower_file; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ err = unionfs_file_revalidate(file, parent, true); ++ if (unlikely(err)) ++ goto out; ++ ++ lower_file = unionfs_lower_file(file); ++ err = vfs_write(lower_file, buf, count, ppos); ++ /* update our inode times+sizes upon a successful lower write */ ++ if (err >= 0) { ++ fsstack_copy_inode_size(dentry->d_inode, ++ lower_file->f_path.dentry->d_inode); ++ fsstack_copy_attr_times(dentry->d_inode, ++ lower_file->f_path.dentry->d_inode); ++ UNIONFS_F(file)->wrote_to_file = true; /* for delayed copyup */ ++ unionfs_check_file(file); ++ } ++ ++out: ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++static int unionfs_file_readdir(struct file *file, void *dirent, ++ filldir_t filldir) ++{ ++ return -ENOTDIR; ++} ++ ++static int unionfs_mmap(struct file *file, struct vm_area_struct *vma) ++{ ++ int err = 0; ++ bool willwrite; ++ struct file *lower_file; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ const struct vm_operations_struct *saved_vm_ops = NULL; ++ ++ /* ++ * Since mm/memory.c:might_fault() (under PROVE_LOCKING) was ++ * modified in 2.6.29-rc1 to call might_lock_read on mmap_sem, this ++ * has been causing false positives in file system stacking layers. ++ * In particular, our ->mmap is called after sys_mmap2 already holds ++ * mmap_sem, then we lock our own mutexes; but earlier, it's ++ * possible for lockdep to have locked our mutexes first, and then ++ * we call a lower ->readdir which could call might_fault. The ++ * different ordering of the locks is what lockdep complains about ++ * -- unnecessarily. Therefore, we have no choice but to tell ++ * lockdep to temporarily turn off lockdep here. Note: the comments ++ * inside might_sleep also suggest that it would have been ++ * nicer to only annotate paths that needs that might_lock_read. ++ */ ++ lockdep_off(); ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ /* This might be deferred to mmap's writepage */ ++ willwrite = ((vma->vm_flags | VM_SHARED | VM_WRITE) == vma->vm_flags); ++ err = unionfs_file_revalidate(file, parent, willwrite); ++ if (unlikely(err)) ++ goto out; ++ unionfs_check_file(file); ++ ++ /* ++ * File systems which do not implement ->writepage may use ++ * generic_file_readonly_mmap as their ->mmap op. If you call ++ * generic_file_readonly_mmap with VM_WRITE, you'd get an -EINVAL. ++ * But we cannot call the lower ->mmap op, so we can't tell that ++ * writeable mappings won't work. Therefore, our only choice is to ++ * check if the lower file system supports the ->writepage, and if ++ * not, return EINVAL (the same error that ++ * generic_file_readonly_mmap returns in that case). ++ */ ++ lower_file = unionfs_lower_file(file); ++ if (willwrite && !lower_file->f_mapping->a_ops->writepage) { ++ err = -EINVAL; ++ printk(KERN_ERR "unionfs: branch %d file system does not " ++ "support writeable mmap\n", fbstart(file)); ++ goto out; ++ } ++ ++ /* ++ * find and save lower vm_ops. ++ * ++ * XXX: the VFS should have a cleaner way of finding the lower vm_ops ++ */ ++ if (!UNIONFS_F(file)->lower_vm_ops) { ++ err = lower_file->f_op->mmap(lower_file, vma); ++ if (err) { ++ printk(KERN_ERR "unionfs: lower mmap failed %d\n", err); ++ goto out; ++ } ++ saved_vm_ops = vma->vm_ops; ++ err = do_munmap(current->mm, vma->vm_start, ++ vma->vm_end - vma->vm_start); ++ if (err) { ++ printk(KERN_ERR "unionfs: do_munmap failed %d\n", err); ++ goto out; ++ } ++ } ++ ++ file->f_mapping->a_ops = &unionfs_dummy_aops; ++ err = generic_file_mmap(file, vma); ++ file->f_mapping->a_ops = &unionfs_aops; ++ if (err) { ++ printk(KERN_ERR "unionfs: generic_file_mmap failed %d\n", err); ++ goto out; ++ } ++ vma->vm_ops = &unionfs_vm_ops; ++ if (!UNIONFS_F(file)->lower_vm_ops) ++ UNIONFS_F(file)->lower_vm_ops = saved_vm_ops; ++ ++out: ++ if (!err) { ++ /* copyup could cause parent dir times to change */ ++ unionfs_copy_attr_times(parent->d_inode); ++ unionfs_check_file(file); ++ } ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ lockdep_on(); ++ return err; ++} ++ ++int unionfs_fsync(struct file *file, int datasync) ++{ ++ int bindex, bstart, bend; ++ struct file *lower_file; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *lower_dentry; ++ struct dentry *parent; ++ struct inode *lower_inode, *inode; ++ int err = -EINVAL; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ err = unionfs_file_revalidate(file, parent, true); ++ if (unlikely(err)) ++ goto out; ++ unionfs_check_file(file); ++ ++ bstart = fbstart(file); ++ bend = fbend(file); ++ if (bstart < 0 || bend < 0) ++ goto out; ++ ++ inode = dentry->d_inode; ++ if (unlikely(!inode)) { ++ printk(KERN_ERR ++ "unionfs: null lower inode in unionfs_fsync\n"); ++ goto out; ++ } ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (!lower_inode || !lower_inode->i_fop->fsync) ++ continue; ++ lower_file = unionfs_lower_file_idx(file, bindex); ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ mutex_lock(&lower_inode->i_mutex); ++ err = lower_inode->i_fop->fsync(lower_file, datasync); ++ if (!err && bindex == bstart) ++ fsstack_copy_attr_times(inode, lower_inode); ++ mutex_unlock(&lower_inode->i_mutex); ++ if (err) ++ goto out; ++ } ++ ++out: ++ if (!err) ++ unionfs_check_file(file); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++int unionfs_fasync(int fd, struct file *file, int flag) ++{ ++ int bindex, bstart, bend; ++ struct file *lower_file; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ struct inode *lower_inode, *inode; ++ int err = 0; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ err = unionfs_file_revalidate(file, parent, true); ++ if (unlikely(err)) ++ goto out; ++ unionfs_check_file(file); ++ ++ bstart = fbstart(file); ++ bend = fbend(file); ++ if (bstart < 0 || bend < 0) ++ goto out; ++ ++ inode = dentry->d_inode; ++ if (unlikely(!inode)) { ++ printk(KERN_ERR ++ "unionfs: null lower inode in unionfs_fasync\n"); ++ goto out; ++ } ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (!lower_inode || !lower_inode->i_fop->fasync) ++ continue; ++ lower_file = unionfs_lower_file_idx(file, bindex); ++ mutex_lock(&lower_inode->i_mutex); ++ err = lower_inode->i_fop->fasync(fd, lower_file, flag); ++ if (!err && bindex == bstart) ++ fsstack_copy_attr_times(inode, lower_inode); ++ mutex_unlock(&lower_inode->i_mutex); ++ if (err) ++ goto out; ++ } ++ ++out: ++ if (!err) ++ unionfs_check_file(file); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++static ssize_t unionfs_splice_read(struct file *file, loff_t *ppos, ++ struct pipe_inode_info *pipe, size_t len, ++ unsigned int flags) ++{ ++ ssize_t err; ++ struct file *lower_file; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ err = unionfs_file_revalidate(file, parent, false); ++ if (unlikely(err)) ++ goto out; ++ ++ lower_file = unionfs_lower_file(file); ++ err = vfs_splice_to(lower_file, ppos, pipe, len, flags); ++ /* update our inode atime upon a successful lower splice-read */ ++ if (err >= 0) { ++ fsstack_copy_attr_atime(dentry->d_inode, ++ lower_file->f_path.dentry->d_inode); ++ unionfs_check_file(file); ++ } ++ ++out: ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++static ssize_t unionfs_splice_write(struct pipe_inode_info *pipe, ++ struct file *file, loff_t *ppos, ++ size_t len, unsigned int flags) ++{ ++ ssize_t err = 0; ++ struct file *lower_file; ++ struct dentry *dentry = file->f_path.dentry; ++ struct dentry *parent; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_PARENT); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ err = unionfs_file_revalidate(file, parent, true); ++ if (unlikely(err)) ++ goto out; ++ ++ lower_file = unionfs_lower_file(file); ++ err = vfs_splice_from(pipe, lower_file, ppos, len, flags); ++ /* update our inode times+sizes upon a successful lower write */ ++ if (err >= 0) { ++ fsstack_copy_inode_size(dentry->d_inode, ++ lower_file->f_path.dentry->d_inode); ++ fsstack_copy_attr_times(dentry->d_inode, ++ lower_file->f_path.dentry->d_inode); ++ unionfs_check_file(file); ++ } ++ ++out: ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++struct file_operations unionfs_main_fops = { ++ .llseek = generic_file_llseek, ++ .read = unionfs_read, ++ .write = unionfs_write, ++ .readdir = unionfs_file_readdir, ++ .unlocked_ioctl = unionfs_ioctl, ++#ifdef CONFIG_COMPAT ++ .compat_ioctl = unionfs_ioctl, ++#endif ++ .mmap = unionfs_mmap, ++ .open = unionfs_open, ++ .flush = unionfs_flush, ++ .release = unionfs_file_release, ++ .fsync = unionfs_fsync, ++ .fasync = unionfs_fasync, ++ .splice_read = unionfs_splice_read, ++ .splice_write = unionfs_splice_write, ++}; +diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c +new file mode 100644 +index 0000000..b207c13 +--- /dev/null ++++ b/fs/unionfs/inode.c +@@ -0,0 +1,1099 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * Find a writeable branch to create new object in. Checks all writeble ++ * branches of the parent inode, from istart to iend order; if none are ++ * suitable, also tries branch 0 (which may require a copyup). ++ * ++ * Return a lower_dentry we can use to create object in, or ERR_PTR. ++ */ ++static struct dentry *find_writeable_branch(struct inode *parent, ++ struct dentry *dentry) ++{ ++ int err = -EINVAL; ++ int bindex, istart, iend; ++ struct dentry *lower_dentry = NULL; ++ ++ istart = ibstart(parent); ++ iend = ibend(parent); ++ if (istart < 0) ++ goto out; ++ ++begin: ++ for (bindex = istart; bindex <= iend; bindex++) { ++ /* skip non-writeable branches */ ++ err = is_robranch_super(dentry->d_sb, bindex); ++ if (err) { ++ err = -EROFS; ++ continue; ++ } ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry) ++ continue; ++ /* ++ * check for whiteouts in writeable branch, and remove them ++ * if necessary. ++ */ ++ err = check_unlink_whiteout(dentry, lower_dentry, bindex); ++ if (err > 0) /* ignore if whiteout found and removed */ ++ err = 0; ++ if (err) ++ continue; ++ /* if get here, we can write to the branch */ ++ break; ++ } ++ /* ++ * If istart wasn't already branch 0, and we got any error, then try ++ * branch 0 (which may require copyup) ++ */ ++ if (err && istart > 0) { ++ istart = iend = 0; ++ goto begin; ++ } ++ ++ /* ++ * If we tried even branch 0, and still got an error, abort. But if ++ * the error was an EROFS, then we should try to copyup. ++ */ ++ if (err && err != -EROFS) ++ goto out; ++ ++ /* ++ * If we get here, then check if copyup needed. If lower_dentry is ++ * NULL, create the entire dentry directory structure in branch 0. ++ */ ++ if (!lower_dentry) { ++ bindex = 0; ++ lower_dentry = create_parents(parent, dentry, ++ dentry->d_name.name, bindex); ++ if (IS_ERR(lower_dentry)) { ++ err = PTR_ERR(lower_dentry); ++ goto out; ++ } ++ } ++ err = 0; /* all's well */ ++out: ++ if (err) ++ return ERR_PTR(err); ++ return lower_dentry; ++} ++ ++static int unionfs_create(struct inode *dir, struct dentry *dentry, ++ int mode, struct nameidata *nd_unused) ++{ ++ int err = 0; ++ struct dentry *lower_dentry = NULL; ++ struct dentry *lower_parent_dentry = NULL; ++ struct dentry *parent; ++ int valid = 0; ++ struct nameidata lower_nd; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; /* same as what real_lookup does */ ++ goto out; ++ } ++ ++ lower_dentry = find_writeable_branch(dir, dentry); ++ if (IS_ERR(lower_dentry)) { ++ err = PTR_ERR(lower_dentry); ++ goto out; ++ } ++ ++ lower_parent_dentry = lock_parent(lower_dentry); ++ if (IS_ERR(lower_parent_dentry)) { ++ err = PTR_ERR(lower_parent_dentry); ++ goto out_unlock; ++ } ++ ++ err = init_lower_nd(&lower_nd, LOOKUP_CREATE); ++ if (unlikely(err < 0)) ++ goto out_unlock; ++ err = vfs_create(lower_parent_dentry->d_inode, lower_dentry, mode, ++ &lower_nd); ++ release_lower_nd(&lower_nd, err); ++ ++ if (!err) { ++ err = PTR_ERR(unionfs_interpose(dentry, dir->i_sb, 0)); ++ if (!err) { ++ unionfs_copy_attr_times(dir); ++ fsstack_copy_inode_size(dir, ++ lower_parent_dentry->d_inode); ++ /* update no. of links on parent directory */ ++ dir->i_nlink = unionfs_get_nlinks(dir); ++ } ++ } ++ ++out_unlock: ++ unlock_dir(lower_parent_dentry); ++out: ++ if (!err) { ++ unionfs_postcopyup_setmnt(dentry); ++ unionfs_check_inode(dir); ++ unionfs_check_dentry(dentry); ++ } ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++/* ++ * unionfs_lookup is the only special function which takes a dentry, yet we ++ * do NOT want to call __unionfs_d_revalidate_chain because by definition, ++ * we don't have a valid dentry here yet. ++ */ ++static struct dentry *unionfs_lookup(struct inode *dir, ++ struct dentry *dentry, ++ struct nameidata *nd_unused) ++{ ++ struct dentry *ret, *parent; ++ int err = 0; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ ++ /* ++ * As long as we lock/dget the parent, then can skip validating the ++ * parent now; we may have to rebuild this dentry on the next ++ * ->d_revalidate, however. ++ */ ++ ++ /* allocate dentry private data. We free it in ->d_release */ ++ err = new_dentry_private_data(dentry, UNIONFS_DMUTEX_CHILD); ++ if (unlikely(err)) { ++ ret = ERR_PTR(err); ++ goto out; ++ } ++ ++ ret = unionfs_lookup_full(dentry, parent, INTERPOSE_LOOKUP); ++ ++ if (!IS_ERR(ret)) { ++ if (ret) ++ dentry = ret; ++ /* lookup_full can return multiple positive dentries */ ++ if (dentry->d_inode && !S_ISDIR(dentry->d_inode->i_mode)) { ++ BUG_ON(dbstart(dentry) < 0); ++ unionfs_postcopyup_release(dentry); ++ } ++ unionfs_copy_attr_times(dentry->d_inode); ++ } ++ ++ unionfs_check_inode(dir); ++ if (!IS_ERR(ret)) ++ unionfs_check_dentry(dentry); ++ unionfs_check_dentry(parent); ++ unionfs_unlock_dentry(dentry); /* locked in new_dentry_private data */ ++ ++out: ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ ++ return ret; ++} ++ ++static int unionfs_link(struct dentry *old_dentry, struct inode *dir, ++ struct dentry *new_dentry) ++{ ++ int err = 0; ++ struct dentry *lower_old_dentry = NULL; ++ struct dentry *lower_new_dentry = NULL; ++ struct dentry *lower_dir_dentry = NULL; ++ struct dentry *old_parent, *new_parent; ++ char *name = NULL; ++ bool valid; ++ ++ unionfs_read_lock(old_dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ old_parent = dget_parent(old_dentry); ++ new_parent = dget_parent(new_dentry); ++ unionfs_double_lock_parents(old_parent, new_parent); ++ unionfs_double_lock_dentry(old_dentry, new_dentry); ++ ++ valid = __unionfs_d_revalidate(old_dentry, old_parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ if (new_dentry->d_inode) { ++ valid = __unionfs_d_revalidate(new_dentry, new_parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ } ++ ++ lower_new_dentry = unionfs_lower_dentry(new_dentry); ++ ++ /* check for a whiteout in new dentry branch, and delete it */ ++ err = check_unlink_whiteout(new_dentry, lower_new_dentry, ++ dbstart(new_dentry)); ++ if (err > 0) { /* whiteout found and removed successfully */ ++ lower_dir_dentry = dget_parent(lower_new_dentry); ++ fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode); ++ dput(lower_dir_dentry); ++ dir->i_nlink = unionfs_get_nlinks(dir); ++ err = 0; ++ } ++ if (err) ++ goto out; ++ ++ /* check if parent hierachy is needed, then link in same branch */ ++ if (dbstart(old_dentry) != dbstart(new_dentry)) { ++ lower_new_dentry = create_parents(dir, new_dentry, ++ new_dentry->d_name.name, ++ dbstart(old_dentry)); ++ err = PTR_ERR(lower_new_dentry); ++ if (IS_COPYUP_ERR(err)) ++ goto docopyup; ++ if (!lower_new_dentry || IS_ERR(lower_new_dentry)) ++ goto out; ++ } ++ lower_new_dentry = unionfs_lower_dentry(new_dentry); ++ lower_old_dentry = unionfs_lower_dentry(old_dentry); ++ ++ BUG_ON(dbstart(old_dentry) != dbstart(new_dentry)); ++ lower_dir_dentry = lock_parent(lower_new_dentry); ++ err = is_robranch(old_dentry); ++ if (!err) { ++ /* see Documentation/filesystems/unionfs/issues.txt */ ++ lockdep_off(); ++ err = vfs_link(lower_old_dentry, lower_dir_dentry->d_inode, ++ lower_new_dentry); ++ lockdep_on(); ++ } ++ unlock_dir(lower_dir_dentry); ++ ++docopyup: ++ if (IS_COPYUP_ERR(err)) { ++ int old_bstart = dbstart(old_dentry); ++ int bindex; ++ ++ for (bindex = old_bstart - 1; bindex >= 0; bindex--) { ++ err = copyup_dentry(old_parent->d_inode, ++ old_dentry, old_bstart, ++ bindex, old_dentry->d_name.name, ++ old_dentry->d_name.len, NULL, ++ i_size_read(old_dentry->d_inode)); ++ if (err) ++ continue; ++ lower_new_dentry = ++ create_parents(dir, new_dentry, ++ new_dentry->d_name.name, ++ bindex); ++ lower_old_dentry = unionfs_lower_dentry(old_dentry); ++ lower_dir_dentry = lock_parent(lower_new_dentry); ++ /* see Documentation/filesystems/unionfs/issues.txt */ ++ lockdep_off(); ++ /* do vfs_link */ ++ err = vfs_link(lower_old_dentry, ++ lower_dir_dentry->d_inode, ++ lower_new_dentry); ++ lockdep_on(); ++ unlock_dir(lower_dir_dentry); ++ goto check_link; ++ } ++ goto out; ++ } ++ ++check_link: ++ if (err || !lower_new_dentry->d_inode) ++ goto out; ++ ++ /* Its a hard link, so use the same inode */ ++ new_dentry->d_inode = igrab(old_dentry->d_inode); ++ d_add(new_dentry, new_dentry->d_inode); ++ unionfs_copy_attr_all(dir, lower_new_dentry->d_parent->d_inode); ++ fsstack_copy_inode_size(dir, lower_new_dentry->d_parent->d_inode); ++ ++ /* propagate number of hard-links */ ++ old_dentry->d_inode->i_nlink = unionfs_get_nlinks(old_dentry->d_inode); ++ /* new dentry's ctime may have changed due to hard-link counts */ ++ unionfs_copy_attr_times(new_dentry->d_inode); ++ ++out: ++ if (!new_dentry->d_inode) ++ d_drop(new_dentry); ++ ++ kfree(name); ++ if (!err) ++ unionfs_postcopyup_setmnt(new_dentry); ++ ++ unionfs_check_inode(dir); ++ unionfs_check_dentry(new_dentry); ++ unionfs_check_dentry(old_dentry); ++ ++ unionfs_double_unlock_dentry(old_dentry, new_dentry); ++ unionfs_double_unlock_parents(old_parent, new_parent); ++ dput(new_parent); ++ dput(old_parent); ++ unionfs_read_unlock(old_dentry->d_sb); ++ ++ return err; ++} ++ ++static int unionfs_symlink(struct inode *dir, struct dentry *dentry, ++ const char *symname) ++{ ++ int err = 0; ++ struct dentry *lower_dentry = NULL; ++ struct dentry *wh_dentry = NULL; ++ struct dentry *lower_parent_dentry = NULL; ++ struct dentry *parent; ++ char *name = NULL; ++ int valid = 0; ++ umode_t mode; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ ++ /* ++ * It's only a bug if this dentry was not negative and couldn't be ++ * revalidated (shouldn't happen). ++ */ ++ BUG_ON(!valid && dentry->d_inode); ++ ++ lower_dentry = find_writeable_branch(dir, dentry); ++ if (IS_ERR(lower_dentry)) { ++ err = PTR_ERR(lower_dentry); ++ goto out; ++ } ++ ++ lower_parent_dentry = lock_parent(lower_dentry); ++ if (IS_ERR(lower_parent_dentry)) { ++ err = PTR_ERR(lower_parent_dentry); ++ goto out_unlock; ++ } ++ ++ mode = S_IALLUGO; ++ err = vfs_symlink(lower_parent_dentry->d_inode, lower_dentry, symname); ++ if (!err) { ++ err = PTR_ERR(unionfs_interpose(dentry, dir->i_sb, 0)); ++ if (!err) { ++ unionfs_copy_attr_times(dir); ++ fsstack_copy_inode_size(dir, ++ lower_parent_dentry->d_inode); ++ /* update no. of links on parent directory */ ++ dir->i_nlink = unionfs_get_nlinks(dir); ++ } ++ } ++ ++out_unlock: ++ unlock_dir(lower_parent_dentry); ++out: ++ dput(wh_dentry); ++ kfree(name); ++ ++ if (!err) { ++ unionfs_postcopyup_setmnt(dentry); ++ unionfs_check_inode(dir); ++ unionfs_check_dentry(dentry); ++ } ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++static int unionfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) ++{ ++ int err = 0; ++ struct dentry *lower_dentry = NULL; ++ struct dentry *lower_parent_dentry = NULL; ++ struct dentry *parent; ++ int bindex = 0, bstart; ++ char *name = NULL; ++ int valid; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; /* same as what real_lookup does */ ++ goto out; ++ } ++ ++ bstart = dbstart(dentry); ++ ++ lower_dentry = unionfs_lower_dentry(dentry); ++ ++ /* check for a whiteout in new dentry branch, and delete it */ ++ err = check_unlink_whiteout(dentry, lower_dentry, bstart); ++ if (err > 0) /* whiteout found and removed successfully */ ++ err = 0; ++ if (err) { ++ /* exit if the error returned was NOT -EROFS */ ++ if (!IS_COPYUP_ERR(err)) ++ goto out; ++ bstart--; ++ } ++ ++ /* check if copyup's needed, and mkdir */ ++ for (bindex = bstart; bindex >= 0; bindex--) { ++ int i; ++ int bend = dbend(dentry); ++ ++ if (is_robranch_super(dentry->d_sb, bindex)) ++ continue; ++ ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry) { ++ lower_dentry = create_parents(dir, dentry, ++ dentry->d_name.name, ++ bindex); ++ if (!lower_dentry || IS_ERR(lower_dentry)) { ++ printk(KERN_ERR "unionfs: lower dentry " ++ " NULL for bindex = %d\n", bindex); ++ continue; ++ } ++ } ++ ++ lower_parent_dentry = lock_parent(lower_dentry); ++ ++ if (IS_ERR(lower_parent_dentry)) { ++ err = PTR_ERR(lower_parent_dentry); ++ goto out; ++ } ++ ++ err = vfs_mkdir(lower_parent_dentry->d_inode, lower_dentry, ++ mode); ++ ++ unlock_dir(lower_parent_dentry); ++ ++ /* did the mkdir succeed? */ ++ if (err) ++ break; ++ ++ for (i = bindex + 1; i <= bend; i++) { ++ /* XXX: use path_put_lowers? */ ++ if (unionfs_lower_dentry_idx(dentry, i)) { ++ dput(unionfs_lower_dentry_idx(dentry, i)); ++ unionfs_set_lower_dentry_idx(dentry, i, NULL); ++ } ++ } ++ dbend(dentry) = bindex; ++ ++ /* ++ * Only INTERPOSE_LOOKUP can return a value other than 0 on ++ * err. ++ */ ++ err = PTR_ERR(unionfs_interpose(dentry, dir->i_sb, 0)); ++ if (!err) { ++ unionfs_copy_attr_times(dir); ++ fsstack_copy_inode_size(dir, ++ lower_parent_dentry->d_inode); ++ ++ /* update number of links on parent directory */ ++ dir->i_nlink = unionfs_get_nlinks(dir); ++ } ++ ++ err = make_dir_opaque(dentry, dbstart(dentry)); ++ if (err) { ++ printk(KERN_ERR "unionfs: mkdir: error creating " ++ ".wh.__dir_opaque: %d\n", err); ++ goto out; ++ } ++ ++ /* we are done! */ ++ break; ++ } ++ ++out: ++ if (!dentry->d_inode) ++ d_drop(dentry); ++ ++ kfree(name); ++ ++ if (!err) { ++ unionfs_copy_attr_times(dentry->d_inode); ++ unionfs_postcopyup_setmnt(dentry); ++ } ++ unionfs_check_inode(dir); ++ unionfs_check_dentry(dentry); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ ++ return err; ++} ++ ++static int unionfs_mknod(struct inode *dir, struct dentry *dentry, int mode, ++ dev_t dev) ++{ ++ int err = 0; ++ struct dentry *lower_dentry = NULL; ++ struct dentry *wh_dentry = NULL; ++ struct dentry *lower_parent_dentry = NULL; ++ struct dentry *parent; ++ char *name = NULL; ++ int valid = 0; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ ++ /* ++ * It's only a bug if this dentry was not negative and couldn't be ++ * revalidated (shouldn't happen). ++ */ ++ BUG_ON(!valid && dentry->d_inode); ++ ++ lower_dentry = find_writeable_branch(dir, dentry); ++ if (IS_ERR(lower_dentry)) { ++ err = PTR_ERR(lower_dentry); ++ goto out; ++ } ++ ++ lower_parent_dentry = lock_parent(lower_dentry); ++ if (IS_ERR(lower_parent_dentry)) { ++ err = PTR_ERR(lower_parent_dentry); ++ goto out_unlock; ++ } ++ ++ err = vfs_mknod(lower_parent_dentry->d_inode, lower_dentry, mode, dev); ++ if (!err) { ++ err = PTR_ERR(unionfs_interpose(dentry, dir->i_sb, 0)); ++ if (!err) { ++ unionfs_copy_attr_times(dir); ++ fsstack_copy_inode_size(dir, ++ lower_parent_dentry->d_inode); ++ /* update no. of links on parent directory */ ++ dir->i_nlink = unionfs_get_nlinks(dir); ++ } ++ } ++ ++out_unlock: ++ unlock_dir(lower_parent_dentry); ++out: ++ dput(wh_dentry); ++ kfree(name); ++ ++ if (!err) { ++ unionfs_postcopyup_setmnt(dentry); ++ unionfs_check_inode(dir); ++ unionfs_check_dentry(dentry); ++ } ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++/* requires sb, dentry, and parent to already be locked */ ++static int __unionfs_readlink(struct dentry *dentry, char __user *buf, ++ int bufsiz) ++{ ++ int err; ++ struct dentry *lower_dentry; ++ ++ lower_dentry = unionfs_lower_dentry(dentry); ++ ++ if (!lower_dentry->d_inode->i_op || ++ !lower_dentry->d_inode->i_op->readlink) { ++ err = -EINVAL; ++ goto out; ++ } ++ ++ err = lower_dentry->d_inode->i_op->readlink(lower_dentry, ++ buf, bufsiz); ++ if (err >= 0) ++ fsstack_copy_attr_atime(dentry->d_inode, ++ lower_dentry->d_inode); ++ ++out: ++ return err; ++} ++ ++static int unionfs_readlink(struct dentry *dentry, char __user *buf, ++ int bufsiz) ++{ ++ int err; ++ struct dentry *parent; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ if (unlikely(!__unionfs_d_revalidate(dentry, parent, false))) { ++ err = -ESTALE; ++ goto out; ++ } ++ ++ err = __unionfs_readlink(dentry, buf, bufsiz); ++ ++out: ++ unionfs_check_dentry(dentry); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ ++ return err; ++} ++ ++static void *unionfs_follow_link(struct dentry *dentry, struct nameidata *nd) ++{ ++ char *buf; ++ int len = PAGE_SIZE, err; ++ mm_segment_t old_fs; ++ struct dentry *parent; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ /* This is freed by the put_link method assuming a successful call. */ ++ buf = kmalloc(len, GFP_KERNEL); ++ if (unlikely(!buf)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ ++ /* read the symlink, and then we will follow it */ ++ old_fs = get_fs(); ++ set_fs(KERNEL_DS); ++ err = __unionfs_readlink(dentry, buf, len); ++ set_fs(old_fs); ++ if (err < 0) { ++ kfree(buf); ++ buf = NULL; ++ goto out; ++ } ++ buf[err] = 0; ++ nd_set_link(nd, buf); ++ err = 0; ++ ++out: ++ if (err >= 0) { ++ unionfs_check_nd(nd); ++ unionfs_check_dentry(dentry); ++ } ++ ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ ++ return ERR_PTR(err); ++} ++ ++/* this @nd *IS* still used */ ++static void unionfs_put_link(struct dentry *dentry, struct nameidata *nd, ++ void *cookie) ++{ ++ struct dentry *parent; ++ char *buf; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ if (unlikely(!__unionfs_d_revalidate(dentry, parent, false))) ++ printk(KERN_ERR ++ "unionfs: put_link failed to revalidate dentry\n"); ++ ++ unionfs_check_dentry(dentry); ++#if 0 ++ /* XXX: can't run this check b/c this fxn can receive a poisoned 'nd' PTR */ ++ unionfs_check_nd(nd); ++#endif ++ buf = nd_get_link(nd); ++ if (!IS_ERR(buf)) ++ kfree(buf); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++} ++ ++/* ++ * This is a variant of fs/namei.c:permission() or inode_permission() which ++ * skips over EROFS tests (because we perform copyup on EROFS). ++ */ ++static int __inode_permission(struct inode *inode, int mask, unsigned int flags) ++{ ++ int retval; ++ ++ /* nobody gets write access to an immutable file */ ++ if ((mask & MAY_WRITE) && IS_IMMUTABLE(inode)) ++ return -EACCES; ++ ++ /* Ordinary permission routines do not understand MAY_APPEND. */ ++ if (inode->i_op && inode->i_op->permission) { ++ retval = inode->i_op->permission(inode, mask, flags); ++ if (!retval) { ++ /* ++ * Exec permission on a regular file is denied if none ++ * of the execute bits are set. ++ * ++ * This check should be done by the ->permission() ++ * method. ++ */ ++ if ((mask & MAY_EXEC) && S_ISREG(inode->i_mode) && ++ !(inode->i_mode & S_IXUGO)) ++ return -EACCES; ++ } ++ } else { ++ retval = generic_permission(inode, mask, flags, NULL); ++ } ++ if (retval) ++ return retval; ++ ++ return security_inode_permission(inode, ++ mask & (MAY_READ|MAY_WRITE|MAY_EXEC|MAY_APPEND)); ++} ++ ++/* ++ * Don't grab the superblock read-lock in unionfs_permission, which prevents ++ * a deadlock with the branch-management "add branch" code (which grabbed ++ * the write lock). It is safe to not grab the read lock here, because even ++ * with branch management taking place, there is no chance that ++ * unionfs_permission, or anything it calls, will use stale branch ++ * information. ++ */ ++static int unionfs_permission(struct inode *inode, int mask, unsigned int flags) ++{ ++ struct inode *lower_inode = NULL; ++ int err = 0; ++ int bindex, bstart, bend; ++ int is_file; ++ const int write_mask = (mask & MAY_WRITE) && !(mask & MAY_READ); ++ struct inode *inode_grabbed; ++ struct dentry *dentry; ++ ++ if (flags & IPERM_FLAG_RCU) { ++ err = -ECHILD; ++ goto out_nograb; ++ } ++ ++ dentry = d_find_alias(inode); ++ if (dentry) ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ inode_grabbed = igrab(inode); ++ is_file = !S_ISDIR(inode->i_mode); ++ ++ if (!UNIONFS_I(inode)->lower_inodes) { ++ if (is_file) /* dirs can be unlinked but chdir'ed to */ ++ err = -ESTALE; /* force revalidate */ ++ goto out; ++ } ++ bstart = ibstart(inode); ++ bend = ibend(inode); ++ if (unlikely(bstart < 0 || bend < 0)) { ++ /* ++ * With branch-management, we can get a stale inode here. ++ * If so, we return ESTALE back to link_path_walk, which ++ * would discard the dcache entry and re-lookup the ++ * dentry+inode. This should be equivalent to issuing ++ * __unionfs_d_revalidate_chain on nd.dentry here. ++ */ ++ if (is_file) /* dirs can be unlinked but chdir'ed to */ ++ err = -ESTALE; /* force revalidate */ ++ goto out; ++ } ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (!lower_inode) ++ continue; ++ ++ /* ++ * check the condition for D-F-D underlying files/directories, ++ * we don't have to check for files, if we are checking for ++ * directories. ++ */ ++ if (!is_file && !S_ISDIR(lower_inode->i_mode)) ++ continue; ++ ++ /* ++ * We check basic permissions, but we ignore any conditions ++ * such as readonly file systems or branches marked as ++ * readonly, because those conditions should lead to a ++ * copyup taking place later on. However, if user never had ++ * access to the file, then no copyup could ever take place. ++ */ ++ err = __inode_permission(lower_inode, mask, flags); ++ if (err && err != -EACCES && err != EPERM && bindex > 0) { ++ umode_t mode = lower_inode->i_mode; ++ if ((is_robranch_super(inode->i_sb, bindex) || ++ __is_rdonly(lower_inode)) && ++ (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))) ++ err = 0; ++ if (IS_COPYUP_ERR(err)) ++ err = 0; ++ } ++ ++ /* ++ * NFS HACK: NFSv2/3 return EACCES on readonly-exported, ++ * locally readonly-mounted file systems, instead of EROFS ++ * like other file systems do. So we have no choice here ++ * but to intercept this and ignore it for NFS branches ++ * marked readonly. Specifically, we avoid using NFS's own ++ * "broken" ->permission method, and rely on ++ * generic_permission() to do basic checking for us. ++ */ ++ if (err && err == -EACCES && ++ is_robranch_super(inode->i_sb, bindex) && ++ lower_inode->i_sb->s_magic == NFS_SUPER_MAGIC) ++ err = generic_permission(lower_inode, mask, flags, NULL); ++ ++ /* ++ * The permissions are an intersection of the overall directory ++ * permissions, so we fail if one fails. ++ */ ++ if (err) ++ goto out; ++ ++ /* only the leftmost file matters. */ ++ if (is_file || write_mask) { ++ if (is_file && write_mask) { ++ err = get_write_access(lower_inode); ++ if (!err) ++ put_write_access(lower_inode); ++ } ++ break; ++ } ++ } ++ /* sync times which may have changed (asynchronously) below */ ++ unionfs_copy_attr_times(inode); ++ ++out: ++ unionfs_check_inode(inode); ++ if (dentry) { ++ unionfs_unlock_dentry(dentry); ++ dput(dentry); ++ } ++ iput(inode_grabbed); ++out_nograb: ++ return err; ++} ++ ++static int unionfs_setattr(struct dentry *dentry, struct iattr *ia) ++{ ++ int err = 0; ++ struct dentry *lower_dentry; ++ struct dentry *parent; ++ struct inode *inode; ++ struct inode *lower_inode; ++ int bstart, bend, bindex; ++ loff_t size; ++ struct iattr lower_ia; ++ ++ /* check if user has permission to change inode */ ++ err = inode_change_ok(dentry->d_inode, ia); ++ if (err) ++ goto out_err; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ if (unlikely(!__unionfs_d_revalidate(dentry, parent, false))) { ++ err = -ESTALE; ++ goto out; ++ } ++ ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ inode = dentry->d_inode; ++ ++ /* ++ * mode change is for clearing setuid/setgid. Allow lower filesystem ++ * to reinterpret it in its own way. ++ */ ++ if (ia->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID)) ++ ia->ia_valid &= ~ATTR_MODE; ++ ++ lower_dentry = unionfs_lower_dentry(dentry); ++ if (!lower_dentry) { /* should never happen after above revalidate */ ++ err = -EINVAL; ++ goto out; ++ } ++ ++ /* ++ * Get the lower inode directly from lower dentry, in case ibstart ++ * is -1 (which happens when the file is open but unlinked. ++ */ ++ lower_inode = lower_dentry->d_inode; ++ ++ /* check if user has permission to change lower inode */ ++ err = inode_change_ok(lower_inode, ia); ++ if (err) ++ goto out; ++ ++ /* copyup if the file is on a read only branch */ ++ if (is_robranch_super(dentry->d_sb, bstart) ++ || __is_rdonly(lower_inode)) { ++ /* check if we have a branch to copy up to */ ++ if (bstart <= 0) { ++ err = -EACCES; ++ goto out; ++ } ++ ++ if (ia->ia_valid & ATTR_SIZE) ++ size = ia->ia_size; ++ else ++ size = i_size_read(inode); ++ /* copyup to next available branch */ ++ for (bindex = bstart - 1; bindex >= 0; bindex--) { ++ err = copyup_dentry(parent->d_inode, ++ dentry, bstart, bindex, ++ dentry->d_name.name, ++ dentry->d_name.len, ++ NULL, size); ++ if (!err) ++ break; ++ } ++ if (err) ++ goto out; ++ /* get updated lower_dentry/inode after copyup */ ++ lower_dentry = unionfs_lower_dentry(dentry); ++ lower_inode = unionfs_lower_inode(inode); ++ /* ++ * check for whiteouts in writeable branch, and remove them ++ * if necessary. ++ */ ++ if (lower_dentry) { ++ err = check_unlink_whiteout(dentry, lower_dentry, ++ bindex); ++ if (err > 0) /* ignore if whiteout found and removed */ ++ err = 0; ++ } ++ } ++ ++ /* ++ * If shrinking, first truncate upper level to cancel writing dirty ++ * pages beyond the new eof; and also if its' maxbytes is more ++ * limiting (fail with -EFBIG before making any change to the lower ++ * level). There is no need to vmtruncate the upper level ++ * afterwards in the other cases: we fsstack_copy_inode_size from ++ * the lower level. ++ */ ++ if (ia->ia_valid & ATTR_SIZE) { ++ size = i_size_read(inode); ++ if (ia->ia_size < size || (ia->ia_size > size && ++ inode->i_sb->s_maxbytes < lower_inode->i_sb->s_maxbytes)) { ++ err = vmtruncate(inode, ia->ia_size); ++ if (err) ++ goto out; ++ } ++ } ++ ++ /* notify the (possibly copied-up) lower inode */ ++ /* ++ * Note: we use lower_dentry->d_inode, because lower_inode may be ++ * unlinked (no inode->i_sb and i_ino==0. This happens if someone ++ * tries to open(), unlink(), then ftruncate() a file. ++ */ ++ /* prepare our own lower struct iattr (with our own lower file) */ ++ memcpy(&lower_ia, ia, sizeof(lower_ia)); ++ if (ia->ia_valid & ATTR_FILE) { ++ lower_ia.ia_file = unionfs_lower_file(ia->ia_file); ++ BUG_ON(!lower_ia.ia_file); // XXX? ++ } ++ ++ mutex_lock(&lower_dentry->d_inode->i_mutex); ++ err = notify_change(lower_dentry, &lower_ia); ++ mutex_unlock(&lower_dentry->d_inode->i_mutex); ++ if (err) ++ goto out; ++ ++ /* get attributes from the first lower inode */ ++ if (ibstart(inode) >= 0) ++ unionfs_copy_attr_all(inode, lower_inode); ++ /* ++ * unionfs_copy_attr_all will copy the lower times to our inode if ++ * the lower ones are newer (useful for cache coherency). However, ++ * ->setattr is the only place in which we may have to copy the ++ * lower inode times absolutely, to support utimes(2). ++ */ ++ if (ia->ia_valid & ATTR_MTIME_SET) ++ inode->i_mtime = lower_inode->i_mtime; ++ if (ia->ia_valid & ATTR_CTIME) ++ inode->i_ctime = lower_inode->i_ctime; ++ if (ia->ia_valid & ATTR_ATIME_SET) ++ inode->i_atime = lower_inode->i_atime; ++ fsstack_copy_inode_size(inode, lower_inode); ++ ++out: ++ if (!err) ++ unionfs_check_dentry(dentry); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++out_err: ++ return err; ++} ++ ++struct inode_operations unionfs_symlink_iops = { ++ .readlink = unionfs_readlink, ++ .permission = unionfs_permission, ++ .follow_link = unionfs_follow_link, ++ .setattr = unionfs_setattr, ++ .put_link = unionfs_put_link, ++}; ++ ++struct inode_operations unionfs_dir_iops = { ++ .create = unionfs_create, ++ .lookup = unionfs_lookup, ++ .link = unionfs_link, ++ .unlink = unionfs_unlink, ++ .symlink = unionfs_symlink, ++ .mkdir = unionfs_mkdir, ++ .rmdir = unionfs_rmdir, ++ .mknod = unionfs_mknod, ++ .rename = unionfs_rename, ++ .permission = unionfs_permission, ++ .setattr = unionfs_setattr, ++#ifdef CONFIG_UNION_FS_XATTR ++ .setxattr = unionfs_setxattr, ++ .getxattr = unionfs_getxattr, ++ .removexattr = unionfs_removexattr, ++ .listxattr = unionfs_listxattr, ++#endif /* CONFIG_UNION_FS_XATTR */ ++}; ++ ++struct inode_operations unionfs_main_iops = { ++ .permission = unionfs_permission, ++ .setattr = unionfs_setattr, ++#ifdef CONFIG_UNION_FS_XATTR ++ .setxattr = unionfs_setxattr, ++ .getxattr = unionfs_getxattr, ++ .removexattr = unionfs_removexattr, ++ .listxattr = unionfs_listxattr, ++#endif /* CONFIG_UNION_FS_XATTR */ ++}; +diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c +new file mode 100644 +index 0000000..3cbde56 +--- /dev/null ++++ b/fs/unionfs/lookup.c +@@ -0,0 +1,569 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * Lookup one path component @name relative to a path pair. ++ * Behaves nearly the same as lookup_one_len (i.e., return negative dentry ++ * on ENOENT), but uses the @mnt passed, so it can cross bind mounts and ++ * other lower mounts properly. If @new_mnt is non-null, will fill in the ++ * new mnt there. Caller is responsible to dput/mntput/path_put returned ++ * @dentry and @new_mnt. ++ */ ++struct dentry *__lookup_one(struct dentry *base, struct vfsmount *mnt, ++ const char *name, struct vfsmount **new_mnt) ++{ ++ struct dentry *dentry = NULL; ++ struct nameidata lower_nd; ++ int err; ++ ++ /* we use flags=0 to get basic lookup */ ++ err = vfs_path_lookup(base, mnt, name, 0, &lower_nd); ++ ++ switch (err) { ++ case 0: /* no error */ ++ dentry = lower_nd.path.dentry; ++ if (new_mnt) ++ *new_mnt = lower_nd.path.mnt; /* rc already inc'ed */ ++ break; ++ case -ENOENT: ++ /* ++ * We don't consider ENOENT an error, and we want to return ++ * a negative dentry (ala lookup_one_len). As we know ++ * there was no inode for this name before (-ENOENT), then ++ * it's safe to call lookup_one_len (which doesn't take a ++ * vfsmount). ++ */ ++ dentry = lookup_lck_len(name, base, strlen(name)); ++ if (new_mnt) ++ *new_mnt = mntget(lower_nd.path.mnt); ++ break; ++ default: /* all other real errors */ ++ dentry = ERR_PTR(err); ++ break; ++ } ++ ++ return dentry; ++} ++ ++/* ++ * This is a utility function that fills in a unionfs dentry. ++ * Caller must lock this dentry with unionfs_lock_dentry. ++ * ++ * Returns: 0 (ok), or -ERRNO if an error occurred. ++ * XXX: get rid of _partial_lookup and make callers call _lookup_full directly ++ */ ++int unionfs_partial_lookup(struct dentry *dentry, struct dentry *parent) ++{ ++ struct dentry *tmp; ++ int err = -ENOSYS; ++ ++ tmp = unionfs_lookup_full(dentry, parent, INTERPOSE_PARTIAL); ++ ++ if (!tmp) { ++ err = 0; ++ goto out; ++ } ++ if (IS_ERR(tmp)) { ++ err = PTR_ERR(tmp); ++ goto out; ++ } ++ /* XXX: need to change the interface */ ++ BUG_ON(tmp != dentry); ++out: ++ return err; ++} ++ ++/* The dentry cache is just so we have properly sized dentries. */ ++static struct kmem_cache *unionfs_dentry_cachep; ++int unionfs_init_dentry_cache(void) ++{ ++ unionfs_dentry_cachep = ++ kmem_cache_create("unionfs_dentry", ++ sizeof(struct unionfs_dentry_info), ++ 0, SLAB_RECLAIM_ACCOUNT, NULL); ++ ++ return (unionfs_dentry_cachep ? 0 : -ENOMEM); ++} ++ ++void unionfs_destroy_dentry_cache(void) ++{ ++ if (unionfs_dentry_cachep) ++ kmem_cache_destroy(unionfs_dentry_cachep); ++} ++ ++void free_dentry_private_data(struct dentry *dentry) ++{ ++ if (!dentry || !dentry->d_fsdata) ++ return; ++ kfree(UNIONFS_D(dentry)->lower_paths); ++ UNIONFS_D(dentry)->lower_paths = NULL; ++ kmem_cache_free(unionfs_dentry_cachep, dentry->d_fsdata); ++ dentry->d_fsdata = NULL; ++} ++ ++static inline int __realloc_dentry_private_data(struct dentry *dentry) ++{ ++ struct unionfs_dentry_info *info = UNIONFS_D(dentry); ++ void *p; ++ int size; ++ ++ BUG_ON(!info); ++ ++ size = sizeof(struct path) * sbmax(dentry->d_sb); ++ p = krealloc(info->lower_paths, size, GFP_ATOMIC); ++ if (unlikely(!p)) ++ return -ENOMEM; ++ ++ info->lower_paths = p; ++ ++ info->bstart = -1; ++ info->bend = -1; ++ info->bopaque = -1; ++ info->bcount = sbmax(dentry->d_sb); ++ atomic_set(&info->generation, ++ atomic_read(&UNIONFS_SB(dentry->d_sb)->generation)); ++ ++ memset(info->lower_paths, 0, size); ++ ++ return 0; ++} ++ ++/* UNIONFS_D(dentry)->lock must be locked */ ++int realloc_dentry_private_data(struct dentry *dentry) ++{ ++ if (!__realloc_dentry_private_data(dentry)) ++ return 0; ++ ++ kfree(UNIONFS_D(dentry)->lower_paths); ++ free_dentry_private_data(dentry); ++ return -ENOMEM; ++} ++ ++/* allocate new dentry private data */ ++int new_dentry_private_data(struct dentry *dentry, int subclass) ++{ ++ struct unionfs_dentry_info *info = UNIONFS_D(dentry); ++ ++ BUG_ON(info); ++ ++ info = kmem_cache_alloc(unionfs_dentry_cachep, GFP_ATOMIC); ++ if (unlikely(!info)) ++ return -ENOMEM; ++ ++ mutex_init(&info->lock); ++ mutex_lock_nested(&info->lock, subclass); ++ ++ info->lower_paths = NULL; ++ ++ dentry->d_fsdata = info; ++ ++ if (!__realloc_dentry_private_data(dentry)) ++ return 0; ++ ++ mutex_unlock(&info->lock); ++ free_dentry_private_data(dentry); ++ return -ENOMEM; ++} ++ ++/* ++ * scan through the lower dentry objects, and set bstart to reflect the ++ * starting branch ++ */ ++void update_bstart(struct dentry *dentry) ++{ ++ int bindex; ++ int bstart = dbstart(dentry); ++ int bend = dbend(dentry); ++ struct dentry *lower_dentry; ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry) ++ continue; ++ if (lower_dentry->d_inode) { ++ dbstart(dentry) = bindex; ++ break; ++ } ++ dput(lower_dentry); ++ unionfs_set_lower_dentry_idx(dentry, bindex, NULL); ++ } ++} ++ ++ ++/* ++ * Initialize a nameidata structure (the intent part) we can pass to a lower ++ * file system. Returns 0 on success or -error (only -ENOMEM possible). ++ * Inside that nd structure, this function may also return an allocated ++ * struct file (for open intents). The caller, when done with this nd, must ++ * kfree the intent file (using release_lower_nd). ++ * ++ * XXX: this code, and the callers of this code, should be redone using ++ * vfs_path_lookup() when (1) the nameidata structure is refactored into a ++ * separate intent-structure, and (2) open_namei() is broken into a VFS-only ++ * function and a method that other file systems can call. ++ */ ++int init_lower_nd(struct nameidata *nd, unsigned int flags) ++{ ++ int err = 0; ++#ifdef ALLOC_LOWER_ND_FILE ++ /* ++ * XXX: one day we may need to have the lower return an open file ++ * for us. It is not needed in 2.6.23-rc1 for nfs2/nfs3, but may ++ * very well be needed for nfs4. ++ */ ++ struct file *file; ++#endif /* ALLOC_LOWER_ND_FILE */ ++ ++ memset(nd, 0, sizeof(struct nameidata)); ++ if (!flags) ++ return err; ++ ++ switch (flags) { ++ case LOOKUP_CREATE: ++ nd->intent.open.flags |= O_CREAT; ++ /* fall through: shared code for create/open cases */ ++ case LOOKUP_OPEN: ++ nd->flags = flags; ++ nd->intent.open.flags |= (FMODE_READ | FMODE_WRITE); ++#ifdef ALLOC_LOWER_ND_FILE ++ file = kzalloc(sizeof(struct file), GFP_KERNEL); ++ if (unlikely(!file)) { ++ err = -ENOMEM; ++ break; /* exit switch statement and thus return */ ++ } ++ nd->intent.open.file = file; ++#endif /* ALLOC_LOWER_ND_FILE */ ++ break; ++ default: ++ /* ++ * We should never get here, for now. ++ * We can add new cases here later on. ++ */ ++ pr_debug("unionfs: unknown nameidata flag 0x%x\n", flags); ++ BUG(); ++ break; ++ } ++ ++ return err; ++} ++ ++void release_lower_nd(struct nameidata *nd, int err) ++{ ++ if (!nd->intent.open.file) ++ return; ++ else if (!err) ++ release_open_intent(nd); ++#ifdef ALLOC_LOWER_ND_FILE ++ kfree(nd->intent.open.file); ++#endif /* ALLOC_LOWER_ND_FILE */ ++} ++ ++/* ++ * Main (and complex) driver function for Unionfs's lookup ++ * ++ * Returns: NULL (ok), ERR_PTR if an error occurred, or a non-null non-error ++ * PTR if d_splice returned a different dentry. ++ * ++ * If lookupmode is INTERPOSE_PARTIAL/REVAL/REVAL_NEG, the passed dentry's ++ * inode info must be locked. If lookupmode is INTERPOSE_LOOKUP (i.e., a ++ * newly looked-up dentry), then unionfs_lookup_backend will return a locked ++ * dentry's info, which the caller must unlock. ++ */ ++struct dentry *unionfs_lookup_full(struct dentry *dentry, ++ struct dentry *parent, int lookupmode) ++{ ++ int err = 0; ++ struct dentry *lower_dentry = NULL; ++ struct vfsmount *lower_mnt; ++ struct vfsmount *lower_dir_mnt; ++ struct dentry *wh_lower_dentry = NULL; ++ struct dentry *lower_dir_dentry = NULL; ++ struct dentry *d_interposed = NULL; ++ int bindex, bstart, bend, bopaque; ++ int opaque, num_positive = 0; ++ const char *name; ++ int namelen; ++ int pos_start, pos_end; ++ ++ /* ++ * We should already have a lock on this dentry in the case of a ++ * partial lookup, or a revalidation. Otherwise it is returned from ++ * new_dentry_private_data already locked. ++ */ ++ verify_locked(dentry); ++ verify_locked(parent); ++ ++ /* must initialize dentry operations */ ++ dentry->d_op = &unionfs_dops; ++ ++ /* We never partial lookup the root directory. */ ++ if (IS_ROOT(dentry)) ++ goto out; ++ ++ name = dentry->d_name.name; ++ namelen = dentry->d_name.len; ++ ++ /* No dentries should get created for possible whiteout names. */ ++ if (!is_validname(name)) { ++ err = -EPERM; ++ goto out_free; ++ } ++ ++ /* Now start the actual lookup procedure. */ ++ bstart = dbstart(parent); ++ bend = dbend(parent); ++ bopaque = dbopaque(parent); ++ BUG_ON(bstart < 0); ++ ++ /* adjust bend to bopaque if needed */ ++ if ((bopaque >= 0) && (bopaque < bend)) ++ bend = bopaque; ++ ++ /* lookup all possible dentries */ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ lower_mnt = unionfs_lower_mnt_idx(dentry, bindex); ++ ++ /* skip if we already have a positive lower dentry */ ++ if (lower_dentry) { ++ if (dbstart(dentry) < 0) ++ dbstart(dentry) = bindex; ++ if (bindex > dbend(dentry)) ++ dbend(dentry) = bindex; ++ if (lower_dentry->d_inode) ++ num_positive++; ++ continue; ++ } ++ ++ lower_dir_dentry = ++ unionfs_lower_dentry_idx(parent, bindex); ++ /* if the lower dentry's parent does not exist, skip this */ ++ if (!lower_dir_dentry || !lower_dir_dentry->d_inode) ++ continue; ++ ++ /* also skip it if the parent isn't a directory. */ ++ if (!S_ISDIR(lower_dir_dentry->d_inode->i_mode)) ++ continue; /* XXX: should be BUG_ON */ ++ ++ /* check for whiteouts: stop lookup if found */ ++ wh_lower_dentry = lookup_whiteout(name, lower_dir_dentry); ++ if (IS_ERR(wh_lower_dentry)) { ++ err = PTR_ERR(wh_lower_dentry); ++ goto out_free; ++ } ++ if (wh_lower_dentry->d_inode) { ++ dbend(dentry) = dbopaque(dentry) = bindex; ++ if (dbstart(dentry) < 0) ++ dbstart(dentry) = bindex; ++ dput(wh_lower_dentry); ++ break; ++ } ++ dput(wh_lower_dentry); ++ ++ /* Now do regular lookup; lookup @name */ ++ lower_dir_mnt = unionfs_lower_mnt_idx(parent, bindex); ++ lower_mnt = NULL; /* XXX: needed? */ ++ ++ lower_dentry = __lookup_one(lower_dir_dentry, lower_dir_mnt, ++ name, &lower_mnt); ++ ++ if (IS_ERR(lower_dentry)) { ++ err = PTR_ERR(lower_dentry); ++ goto out_free; ++ } ++ unionfs_set_lower_dentry_idx(dentry, bindex, lower_dentry); ++ if (!lower_mnt) ++ lower_mnt = unionfs_mntget(dentry->d_sb->s_root, ++ bindex); ++ unionfs_set_lower_mnt_idx(dentry, bindex, lower_mnt); ++ ++ /* adjust dbstart/end */ ++ if (dbstart(dentry) < 0) ++ dbstart(dentry) = bindex; ++ if (bindex > dbend(dentry)) ++ dbend(dentry) = bindex; ++ /* ++ * We always store the lower dentries above, and update ++ * dbstart/dbend, even if the whole unionfs dentry is ++ * negative (i.e., no lower inodes). ++ */ ++ if (!lower_dentry->d_inode) ++ continue; ++ num_positive++; ++ ++ /* ++ * check if we just found an opaque directory, if so, stop ++ * lookups here. ++ */ ++ if (!S_ISDIR(lower_dentry->d_inode->i_mode)) ++ continue; ++ opaque = is_opaque_dir(dentry, bindex); ++ if (opaque < 0) { ++ err = opaque; ++ goto out_free; ++ } else if (opaque) { ++ dbend(dentry) = dbopaque(dentry) = bindex; ++ break; ++ } ++ dbend(dentry) = bindex; ++ ++ /* update parent directory's atime with the bindex */ ++ fsstack_copy_attr_atime(parent->d_inode, ++ lower_dir_dentry->d_inode); ++ } ++ ++ /* sanity checks, then decide if to process a negative dentry */ ++ BUG_ON(dbstart(dentry) < 0 && dbend(dentry) >= 0); ++ BUG_ON(dbstart(dentry) >= 0 && dbend(dentry) < 0); ++ ++ if (num_positive > 0) ++ goto out_positive; ++ ++ /*** handle NEGATIVE dentries ***/ ++ ++ /* ++ * If negative, keep only first lower negative dentry, to save on ++ * memory. ++ */ ++ if (dbstart(dentry) < dbend(dentry)) { ++ path_put_lowers(dentry, dbstart(dentry) + 1, ++ dbend(dentry), false); ++ dbend(dentry) = dbstart(dentry); ++ } ++ if (lookupmode == INTERPOSE_PARTIAL) ++ goto out; ++ if (lookupmode == INTERPOSE_LOOKUP) { ++ /* ++ * If all we found was a whiteout in the first available ++ * branch, then create a negative dentry for a possibly new ++ * file to be created. ++ */ ++ if (dbopaque(dentry) < 0) ++ goto out; ++ /* XXX: need to get mnt here */ ++ bindex = dbstart(dentry); ++ if (unionfs_lower_dentry_idx(dentry, bindex)) ++ goto out; ++ lower_dir_dentry = ++ unionfs_lower_dentry_idx(parent, bindex); ++ if (!lower_dir_dentry || !lower_dir_dentry->d_inode) ++ goto out; ++ if (!S_ISDIR(lower_dir_dentry->d_inode->i_mode)) ++ goto out; /* XXX: should be BUG_ON */ ++ /* XXX: do we need to cross bind mounts here? */ ++ lower_dentry = lookup_lck_len(name, lower_dir_dentry, namelen); ++ if (IS_ERR(lower_dentry)) { ++ err = PTR_ERR(lower_dentry); ++ goto out; ++ } ++ /* XXX: need to mntget/mntput as needed too! */ ++ unionfs_set_lower_dentry_idx(dentry, bindex, lower_dentry); ++ /* XXX: wrong mnt for crossing bind mounts! */ ++ lower_mnt = unionfs_mntget(dentry->d_sb->s_root, bindex); ++ unionfs_set_lower_mnt_idx(dentry, bindex, lower_mnt); ++ ++ goto out; ++ } ++ ++ /* if we're revalidating a positive dentry, don't make it negative */ ++ if (lookupmode != INTERPOSE_REVAL) ++ d_add(dentry, NULL); ++ ++ goto out; ++ ++out_positive: ++ /*** handle POSITIVE dentries ***/ ++ ++ /* ++ * This unionfs dentry is positive (at least one lower inode ++ * exists), so scan entire dentry from beginning to end, and remove ++ * any negative lower dentries, if any. Then, update dbstart/dbend ++ * to reflect the start/end of positive dentries. ++ */ ++ pos_start = pos_end = -1; ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, ++ bindex); ++ if (lower_dentry && lower_dentry->d_inode) { ++ if (pos_start < 0) ++ pos_start = bindex; ++ if (bindex > pos_end) ++ pos_end = bindex; ++ continue; ++ } ++ path_put_lowers(dentry, bindex, bindex, false); ++ } ++ if (pos_start >= 0) ++ dbstart(dentry) = pos_start; ++ if (pos_end >= 0) ++ dbend(dentry) = pos_end; ++ ++ /* Partial lookups need to re-interpose, or throw away older negs. */ ++ if (lookupmode == INTERPOSE_PARTIAL) { ++ if (dentry->d_inode) { ++ unionfs_reinterpose(dentry); ++ goto out; ++ } ++ ++ /* ++ * This dentry was positive, so it is as if we had a ++ * negative revalidation. ++ */ ++ lookupmode = INTERPOSE_REVAL_NEG; ++ update_bstart(dentry); ++ } ++ ++ /* ++ * Interpose can return a dentry if d_splice returned a different ++ * dentry. ++ */ ++ d_interposed = unionfs_interpose(dentry, dentry->d_sb, lookupmode); ++ if (IS_ERR(d_interposed)) ++ err = PTR_ERR(d_interposed); ++ else if (d_interposed) ++ dentry = d_interposed; ++ ++ if (!err) ++ goto out; ++ d_drop(dentry); ++ ++out_free: ++ /* should dput/mntput all the underlying dentries on error condition */ ++ if (dbstart(dentry) >= 0) ++ path_put_lowers_all(dentry, false); ++ /* free lower_paths unconditionally */ ++ kfree(UNIONFS_D(dentry)->lower_paths); ++ UNIONFS_D(dentry)->lower_paths = NULL; ++ ++out: ++ if (dentry && UNIONFS_D(dentry)) { ++ BUG_ON(dbstart(dentry) < 0 && dbend(dentry) >= 0); ++ BUG_ON(dbstart(dentry) >= 0 && dbend(dentry) < 0); ++ } ++ if (d_interposed && UNIONFS_D(d_interposed)) { ++ BUG_ON(dbstart(d_interposed) < 0 && dbend(d_interposed) >= 0); ++ BUG_ON(dbstart(d_interposed) >= 0 && dbend(d_interposed) < 0); ++ } ++ ++ if (!err && d_interposed) ++ return d_interposed; ++ return ERR_PTR(err); ++} +diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c +new file mode 100644 +index 0000000..fa52f61 +--- /dev/null ++++ b/fs/unionfs/main.c +@@ -0,0 +1,763 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++#include ++#include ++ ++static void unionfs_fill_inode(struct dentry *dentry, ++ struct inode *inode) ++{ ++ struct inode *lower_inode; ++ struct dentry *lower_dentry; ++ int bindex, bstart, bend; ++ ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry) { ++ unionfs_set_lower_inode_idx(inode, bindex, NULL); ++ continue; ++ } ++ ++ /* Initialize the lower inode to the new lower inode. */ ++ if (!lower_dentry->d_inode) ++ continue; ++ ++ unionfs_set_lower_inode_idx(inode, bindex, ++ igrab(lower_dentry->d_inode)); ++ } ++ ++ ibstart(inode) = dbstart(dentry); ++ ibend(inode) = dbend(dentry); ++ ++ /* Use attributes from the first branch. */ ++ lower_inode = unionfs_lower_inode(inode); ++ ++ /* Use different set of inode ops for symlinks & directories */ ++ if (S_ISLNK(lower_inode->i_mode)) ++ inode->i_op = &unionfs_symlink_iops; ++ else if (S_ISDIR(lower_inode->i_mode)) ++ inode->i_op = &unionfs_dir_iops; ++ ++ /* Use different set of file ops for directories */ ++ if (S_ISDIR(lower_inode->i_mode)) ++ inode->i_fop = &unionfs_dir_fops; ++ ++ /* properly initialize special inodes */ ++ if (S_ISBLK(lower_inode->i_mode) || S_ISCHR(lower_inode->i_mode) || ++ S_ISFIFO(lower_inode->i_mode) || S_ISSOCK(lower_inode->i_mode)) ++ init_special_inode(inode, lower_inode->i_mode, ++ lower_inode->i_rdev); ++ ++ /* all well, copy inode attributes */ ++ unionfs_copy_attr_all(inode, lower_inode); ++ fsstack_copy_inode_size(inode, lower_inode); ++} ++ ++/* ++ * Connect a unionfs inode dentry/inode with several lower ones. This is ++ * the classic stackable file system "vnode interposition" action. ++ * ++ * @sb: unionfs's super_block ++ */ ++struct dentry *unionfs_interpose(struct dentry *dentry, struct super_block *sb, ++ int flag) ++{ ++ int err = 0; ++ struct inode *inode; ++ int need_fill_inode = 1; ++ struct dentry *spliced = NULL; ++ ++ verify_locked(dentry); ++ ++ /* ++ * We allocate our new inode below by calling unionfs_iget, ++ * which will initialize some of the new inode's fields ++ */ ++ ++ /* ++ * On revalidate we've already got our own inode and just need ++ * to fix it up. ++ */ ++ if (flag == INTERPOSE_REVAL) { ++ inode = dentry->d_inode; ++ UNIONFS_I(inode)->bstart = -1; ++ UNIONFS_I(inode)->bend = -1; ++ atomic_set(&UNIONFS_I(inode)->generation, ++ atomic_read(&UNIONFS_SB(sb)->generation)); ++ ++ UNIONFS_I(inode)->lower_inodes = ++ kcalloc(sbmax(sb), sizeof(struct inode *), GFP_KERNEL); ++ if (unlikely(!UNIONFS_I(inode)->lower_inodes)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ } else { ++ /* get unique inode number for unionfs */ ++ inode = unionfs_iget(sb, iunique(sb, UNIONFS_ROOT_INO)); ++ if (IS_ERR(inode)) { ++ err = PTR_ERR(inode); ++ goto out; ++ } ++ if (atomic_read(&inode->i_count) > 1) ++ goto skip; ++ } ++ ++ need_fill_inode = 0; ++ unionfs_fill_inode(dentry, inode); ++ ++skip: ++ /* only (our) lookup wants to do a d_add */ ++ switch (flag) { ++ case INTERPOSE_DEFAULT: ++ /* for operations which create new inodes */ ++ d_add(dentry, inode); ++ break; ++ case INTERPOSE_REVAL_NEG: ++ d_instantiate(dentry, inode); ++ break; ++ case INTERPOSE_LOOKUP: ++ spliced = d_splice_alias(inode, dentry); ++ if (spliced && spliced != dentry) { ++ /* ++ * d_splice can return a dentry if it was ++ * disconnected and had to be moved. We must ensure ++ * that the private data of the new dentry is ++ * correct and that the inode info was filled ++ * properly. Finally we must return this new ++ * dentry. ++ */ ++ spliced->d_op = &unionfs_dops; ++ spliced->d_fsdata = dentry->d_fsdata; ++ dentry->d_fsdata = NULL; ++ dentry = spliced; ++ if (need_fill_inode) { ++ need_fill_inode = 0; ++ unionfs_fill_inode(dentry, inode); ++ } ++ goto out_spliced; ++ } else if (!spliced) { ++ if (need_fill_inode) { ++ need_fill_inode = 0; ++ unionfs_fill_inode(dentry, inode); ++ goto out_spliced; ++ } ++ } ++ break; ++ case INTERPOSE_REVAL: ++ /* Do nothing. */ ++ break; ++ default: ++ printk(KERN_CRIT "unionfs: invalid interpose flag passed!\n"); ++ BUG(); ++ } ++ goto out; ++ ++out_spliced: ++ if (!err) ++ return spliced; ++out: ++ return ERR_PTR(err); ++} ++ ++/* like interpose above, but for an already existing dentry */ ++void unionfs_reinterpose(struct dentry *dentry) ++{ ++ struct dentry *lower_dentry; ++ struct inode *inode; ++ int bindex, bstart, bend; ++ ++ verify_locked(dentry); ++ ++ /* This is pre-allocated inode */ ++ inode = dentry->d_inode; ++ ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry) ++ continue; ++ ++ if (!lower_dentry->d_inode) ++ continue; ++ if (unionfs_lower_inode_idx(inode, bindex)) ++ continue; ++ unionfs_set_lower_inode_idx(inode, bindex, ++ igrab(lower_dentry->d_inode)); ++ } ++ ibstart(inode) = dbstart(dentry); ++ ibend(inode) = dbend(dentry); ++} ++ ++/* ++ * make sure the branch we just looked up (nd) makes sense: ++ * ++ * 1) we're not trying to stack unionfs on top of unionfs ++ * 2) it exists ++ * 3) is a directory ++ */ ++int check_branch(const struct path *path) ++{ ++ /* XXX: remove in ODF code -- stacking unions allowed there */ ++ if (!strcmp(path->dentry->d_sb->s_type->name, UNIONFS_NAME)) ++ return -EINVAL; ++ if (!path->dentry->d_inode) ++ return -ENOENT; ++ if (!S_ISDIR(path->dentry->d_inode->i_mode)) ++ return -ENOTDIR; ++ return 0; ++} ++ ++/* checks if two lower_dentries have overlapping branches */ ++static int is_branch_overlap(struct dentry *dent1, struct dentry *dent2) ++{ ++ struct dentry *dent = NULL; ++ ++ dent = dent1; ++ while ((dent != dent2) && (dent->d_parent != dent)) ++ dent = dent->d_parent; ++ ++ if (dent == dent2) ++ return 1; ++ ++ dent = dent2; ++ while ((dent != dent1) && (dent->d_parent != dent)) ++ dent = dent->d_parent; ++ ++ return (dent == dent1); ++} ++ ++/* ++ * Parse "ro" or "rw" options, but default to "rw" if no mode options was ++ * specified. Fill the mode bits in @perms. If encounter an unknown ++ * string, return -EINVAL. Otherwise return 0. ++ */ ++int parse_branch_mode(const char *name, int *perms) ++{ ++ if (!name || !strcmp(name, "rw")) { ++ *perms = MAY_READ | MAY_WRITE; ++ return 0; ++ } ++ if (!strcmp(name, "ro")) { ++ *perms = MAY_READ; ++ return 0; ++ } ++ return -EINVAL; ++} ++ ++/* ++ * parse the dirs= mount argument ++ * ++ * We don't need to lock the superblock private data's rwsem, as we get ++ * called only by unionfs_read_super - it is still a long time before anyone ++ * can even get a reference to us. ++ */ ++static int parse_dirs_option(struct super_block *sb, struct unionfs_dentry_info ++ *lower_root_info, char *options) ++{ ++ struct path path; ++ char *name; ++ int err = 0; ++ int branches = 1; ++ int bindex = 0; ++ int i = 0; ++ int j = 0; ++ struct dentry *dent1; ++ struct dentry *dent2; ++ ++ if (options[0] == '\0') { ++ printk(KERN_ERR "unionfs: no branches specified\n"); ++ err = -EINVAL; ++ goto out_return; ++ } ++ ++ /* ++ * Each colon means we have a separator, this is really just a rough ++ * guess, since strsep will handle empty fields for us. ++ */ ++ for (i = 0; options[i]; i++) ++ if (options[i] == ':') ++ branches++; ++ ++ /* allocate space for underlying pointers to lower dentry */ ++ UNIONFS_SB(sb)->data = ++ kcalloc(branches, sizeof(struct unionfs_data), GFP_KERNEL); ++ if (unlikely(!UNIONFS_SB(sb)->data)) { ++ err = -ENOMEM; ++ goto out_return; ++ } ++ ++ lower_root_info->lower_paths = ++ kcalloc(branches, sizeof(struct path), GFP_KERNEL); ++ if (unlikely(!lower_root_info->lower_paths)) { ++ err = -ENOMEM; ++ /* free the underlying pointer array */ ++ kfree(UNIONFS_SB(sb)->data); ++ UNIONFS_SB(sb)->data = NULL; ++ goto out_return; ++ } ++ ++ /* now parsing a string such as "b1:b2=rw:b3=ro:b4" */ ++ branches = 0; ++ while ((name = strsep(&options, ":")) != NULL) { ++ int perms; ++ char *mode = strchr(name, '='); ++ ++ if (!name) ++ continue; ++ if (!*name) { /* bad use of ':' (extra colons) */ ++ err = -EINVAL; ++ goto out; ++ } ++ ++ branches++; ++ ++ /* strip off '=' if any */ ++ if (mode) ++ *mode++ = '\0'; ++ ++ err = parse_branch_mode(mode, &perms); ++ if (err) { ++ printk(KERN_ERR "unionfs: invalid mode \"%s\" for " ++ "branch %d\n", mode, bindex); ++ goto out; ++ } ++ /* ensure that leftmost branch is writeable */ ++ if (!bindex && !(perms & MAY_WRITE)) { ++ printk(KERN_ERR "unionfs: leftmost branch cannot be " ++ "read-only (use \"-o ro\" to create a " ++ "read-only union)\n"); ++ err = -EINVAL; ++ goto out; ++ } ++ ++ err = kern_path(name, LOOKUP_FOLLOW, &path); ++ if (err) { ++ printk(KERN_ERR "unionfs: error accessing " ++ "lower directory '%s' (error %d)\n", ++ name, err); ++ goto out; ++ } ++ ++ err = check_branch(&path); ++ if (err) { ++ printk(KERN_ERR "unionfs: lower directory " ++ "'%s' is not a valid branch\n", name); ++ path_put(&path); ++ goto out; ++ } ++ ++ lower_root_info->lower_paths[bindex].dentry = path.dentry; ++ lower_root_info->lower_paths[bindex].mnt = path.mnt; ++ ++ set_branchperms(sb, bindex, perms); ++ set_branch_count(sb, bindex, 0); ++ new_branch_id(sb, bindex); ++ ++ if (lower_root_info->bstart < 0) ++ lower_root_info->bstart = bindex; ++ lower_root_info->bend = bindex; ++ bindex++; ++ } ++ ++ if (branches == 0) { ++ printk(KERN_ERR "unionfs: no branches specified\n"); ++ err = -EINVAL; ++ goto out; ++ } ++ ++ BUG_ON(branches != (lower_root_info->bend + 1)); ++ ++ /* ++ * Ensure that no overlaps exist in the branches. ++ * ++ * This test is required because the Linux kernel has no support ++ * currently for ensuring coherency between stackable layers and ++ * branches. If we were to allow overlapping branches, it would be ++ * possible, for example, to delete a file via one branch, which ++ * would not be reflected in another branch. Such incoherency could ++ * lead to inconsistencies and even kernel oopses. Rather than ++ * implement hacks to work around some of these cache-coherency ++ * problems, we prevent branch overlapping, for now. A complete ++ * solution will involve proper kernel/VFS support for cache ++ * coherency, at which time we could safely remove this ++ * branch-overlapping test. ++ */ ++ for (i = 0; i < branches; i++) { ++ dent1 = lower_root_info->lower_paths[i].dentry; ++ for (j = i + 1; j < branches; j++) { ++ dent2 = lower_root_info->lower_paths[j].dentry; ++ if (is_branch_overlap(dent1, dent2)) { ++ printk(KERN_ERR "unionfs: branches %d and " ++ "%d overlap\n", i, j); ++ err = -EINVAL; ++ goto out; ++ } ++ } ++ } ++ ++out: ++ if (err) { ++ for (i = 0; i < branches; i++) ++ path_put(&lower_root_info->lower_paths[i]); ++ ++ kfree(lower_root_info->lower_paths); ++ kfree(UNIONFS_SB(sb)->data); ++ ++ /* ++ * MUST clear the pointers to prevent potential double free if ++ * the caller dies later on ++ */ ++ lower_root_info->lower_paths = NULL; ++ UNIONFS_SB(sb)->data = NULL; ++ } ++out_return: ++ return err; ++} ++ ++/* ++ * Parse mount options. See the manual page for usage instructions. ++ * ++ * Returns the dentry object of the lower-level (lower) directory; ++ * We want to mount our stackable file system on top of that lower directory. ++ */ ++static struct unionfs_dentry_info *unionfs_parse_options( ++ struct super_block *sb, ++ char *options) ++{ ++ struct unionfs_dentry_info *lower_root_info; ++ char *optname; ++ int err = 0; ++ int bindex; ++ int dirsfound = 0; ++ ++ /* allocate private data area */ ++ err = -ENOMEM; ++ lower_root_info = ++ kzalloc(sizeof(struct unionfs_dentry_info), GFP_KERNEL); ++ if (unlikely(!lower_root_info)) ++ goto out_error; ++ lower_root_info->bstart = -1; ++ lower_root_info->bend = -1; ++ lower_root_info->bopaque = -1; ++ ++ while ((optname = strsep(&options, ",")) != NULL) { ++ char *optarg; ++ ++ if (!optname || !*optname) ++ continue; ++ ++ optarg = strchr(optname, '='); ++ if (optarg) ++ *optarg++ = '\0'; ++ ++ /* ++ * All of our options take an argument now. Insert ones that ++ * don't, above this check. ++ */ ++ if (!optarg) { ++ printk(KERN_ERR "unionfs: %s requires an argument\n", ++ optname); ++ err = -EINVAL; ++ goto out_error; ++ } ++ ++ if (!strcmp("dirs", optname)) { ++ if (++dirsfound > 1) { ++ printk(KERN_ERR ++ "unionfs: multiple dirs specified\n"); ++ err = -EINVAL; ++ goto out_error; ++ } ++ err = parse_dirs_option(sb, lower_root_info, optarg); ++ if (err) ++ goto out_error; ++ continue; ++ } ++ ++ err = -EINVAL; ++ printk(KERN_ERR ++ "unionfs: unrecognized option '%s'\n", optname); ++ goto out_error; ++ } ++ if (dirsfound != 1) { ++ printk(KERN_ERR "unionfs: dirs option required\n"); ++ err = -EINVAL; ++ goto out_error; ++ } ++ goto out; ++ ++out_error: ++ if (lower_root_info && lower_root_info->lower_paths) { ++ for (bindex = lower_root_info->bstart; ++ bindex >= 0 && bindex <= lower_root_info->bend; ++ bindex++) ++ path_put(&lower_root_info->lower_paths[bindex]); ++ } ++ ++ kfree(lower_root_info->lower_paths); ++ kfree(lower_root_info); ++ ++ kfree(UNIONFS_SB(sb)->data); ++ UNIONFS_SB(sb)->data = NULL; ++ ++ lower_root_info = ERR_PTR(err); ++out: ++ return lower_root_info; ++} ++ ++/* ++ * our custom d_alloc_root work-alike ++ * ++ * we can't use d_alloc_root if we want to use our own interpose function ++ * unchanged, so we simply call our own "fake" d_alloc_root ++ */ ++static struct dentry *unionfs_d_alloc_root(struct super_block *sb) ++{ ++ struct dentry *ret = NULL; ++ ++ if (sb) { ++ static const struct qstr name = { ++ .name = "/", ++ .len = 1 ++ }; ++ ++ ret = d_alloc(NULL, &name); ++ if (likely(ret)) { ++ ret->d_op = &unionfs_dops; ++ ret->d_sb = sb; ++ ret->d_parent = ret; ++ } ++ } ++ return ret; ++} ++ ++/* ++ * There is no need to lock the unionfs_super_info's rwsem as there is no ++ * way anyone can have a reference to the superblock at this point in time. ++ */ ++static int unionfs_read_super(struct super_block *sb, void *raw_data, ++ int silent) ++{ ++ int err = 0; ++ struct unionfs_dentry_info *lower_root_info = NULL; ++ int bindex, bstart, bend; ++ ++ if (!raw_data) { ++ printk(KERN_ERR ++ "unionfs: read_super: missing data argument\n"); ++ err = -EINVAL; ++ goto out; ++ } ++ ++ /* Allocate superblock private data */ ++ sb->s_fs_info = kzalloc(sizeof(struct unionfs_sb_info), GFP_KERNEL); ++ if (unlikely(!UNIONFS_SB(sb))) { ++ printk(KERN_CRIT "unionfs: read_super: out of memory\n"); ++ err = -ENOMEM; ++ goto out; ++ } ++ ++ UNIONFS_SB(sb)->bend = -1; ++ atomic_set(&UNIONFS_SB(sb)->generation, 1); ++ init_rwsem(&UNIONFS_SB(sb)->rwsem); ++ UNIONFS_SB(sb)->high_branch_id = -1; /* -1 == invalid branch ID */ ++ ++ lower_root_info = unionfs_parse_options(sb, raw_data); ++ if (IS_ERR(lower_root_info)) { ++ printk(KERN_ERR ++ "unionfs: read_super: error while parsing options " ++ "(err = %ld)\n", PTR_ERR(lower_root_info)); ++ err = PTR_ERR(lower_root_info); ++ lower_root_info = NULL; ++ goto out_free; ++ } ++ if (lower_root_info->bstart == -1) { ++ err = -ENOENT; ++ goto out_free; ++ } ++ ++ /* set the lower superblock field of upper superblock */ ++ bstart = lower_root_info->bstart; ++ BUG_ON(bstart != 0); ++ sbend(sb) = bend = lower_root_info->bend; ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ struct dentry *d = lower_root_info->lower_paths[bindex].dentry; ++ atomic_inc(&d->d_sb->s_active); ++ unionfs_set_lower_super_idx(sb, bindex, d->d_sb); ++ } ++ ++ /* max Bytes is the maximum bytes from highest priority branch */ ++ sb->s_maxbytes = unionfs_lower_super_idx(sb, 0)->s_maxbytes; ++ ++ /* ++ * Our c/m/atime granularity is 1 ns because we may stack on file ++ * systems whose granularity is as good. This is important for our ++ * time-based cache coherency. ++ */ ++ sb->s_time_gran = 1; ++ ++ sb->s_op = &unionfs_sops; ++ ++ /* See comment next to the definition of unionfs_d_alloc_root */ ++ sb->s_root = unionfs_d_alloc_root(sb); ++ if (unlikely(!sb->s_root)) { ++ err = -ENOMEM; ++ goto out_dput; ++ } ++ ++ /* link the upper and lower dentries */ ++ sb->s_root->d_fsdata = NULL; ++ err = new_dentry_private_data(sb->s_root, UNIONFS_DMUTEX_ROOT); ++ if (unlikely(err)) ++ goto out_freedpd; ++ ++ /* Set the lower dentries for s_root */ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ struct dentry *d; ++ struct vfsmount *m; ++ ++ d = lower_root_info->lower_paths[bindex].dentry; ++ m = lower_root_info->lower_paths[bindex].mnt; ++ ++ unionfs_set_lower_dentry_idx(sb->s_root, bindex, d); ++ unionfs_set_lower_mnt_idx(sb->s_root, bindex, m); ++ } ++ dbstart(sb->s_root) = bstart; ++ dbend(sb->s_root) = bend; ++ ++ /* Set the generation number to one, since this is for the mount. */ ++ atomic_set(&UNIONFS_D(sb->s_root)->generation, 1); ++ ++ /* ++ * Call interpose to create the upper level inode. Only ++ * INTERPOSE_LOOKUP can return a value other than 0 on err. ++ */ ++ err = PTR_ERR(unionfs_interpose(sb->s_root, sb, 0)); ++ unionfs_unlock_dentry(sb->s_root); ++ if (!err) ++ goto out; ++ /* else fall through */ ++ ++out_freedpd: ++ if (UNIONFS_D(sb->s_root)) { ++ kfree(UNIONFS_D(sb->s_root)->lower_paths); ++ free_dentry_private_data(sb->s_root); ++ } ++ dput(sb->s_root); ++ ++out_dput: ++ if (lower_root_info && !IS_ERR(lower_root_info)) { ++ for (bindex = lower_root_info->bstart; ++ bindex <= lower_root_info->bend; bindex++) { ++ struct dentry *d; ++ d = lower_root_info->lower_paths[bindex].dentry; ++ /* drop refs we took earlier */ ++ atomic_dec(&d->d_sb->s_active); ++ path_put(&lower_root_info->lower_paths[bindex]); ++ } ++ kfree(lower_root_info->lower_paths); ++ kfree(lower_root_info); ++ lower_root_info = NULL; ++ } ++ ++out_free: ++ kfree(UNIONFS_SB(sb)->data); ++ kfree(UNIONFS_SB(sb)); ++ sb->s_fs_info = NULL; ++ ++out: ++ if (lower_root_info && !IS_ERR(lower_root_info)) { ++ kfree(lower_root_info->lower_paths); ++ kfree(lower_root_info); ++ } ++ return err; ++} ++ ++static struct dentry *unionfs_mount(struct file_system_type *fs_type, ++ int flags, const char *dev_name, ++ void *raw_data) ++{ ++ struct dentry *dentry; ++ ++ dentry = mount_nodev(fs_type, flags, raw_data, unionfs_read_super); ++ if (!PTR_ERR(dentry)) ++ UNIONFS_SB(dentry->d_sb)->dev_name = ++ kstrdup(dev_name, GFP_KERNEL); ++ return dentry; ++} ++ ++static struct file_system_type unionfs_fs_type = { ++ .owner = THIS_MODULE, ++ .name = UNIONFS_NAME, ++ .mount = unionfs_mount, ++ .kill_sb = generic_shutdown_super, ++ .fs_flags = FS_REVAL_DOT, ++}; ++ ++static int __init init_unionfs_fs(void) ++{ ++ int err; ++ ++ pr_info("Registering unionfs " UNIONFS_VERSION "\n"); ++ ++ err = unionfs_init_filldir_cache(); ++ if (unlikely(err)) ++ goto out; ++ err = unionfs_init_inode_cache(); ++ if (unlikely(err)) ++ goto out; ++ err = unionfs_init_dentry_cache(); ++ if (unlikely(err)) ++ goto out; ++ err = init_sioq(); ++ if (unlikely(err)) ++ goto out; ++ err = register_filesystem(&unionfs_fs_type); ++out: ++ if (unlikely(err)) { ++ stop_sioq(); ++ unionfs_destroy_filldir_cache(); ++ unionfs_destroy_inode_cache(); ++ unionfs_destroy_dentry_cache(); ++ } ++ return err; ++} ++ ++static void __exit exit_unionfs_fs(void) ++{ ++ stop_sioq(); ++ unionfs_destroy_filldir_cache(); ++ unionfs_destroy_inode_cache(); ++ unionfs_destroy_dentry_cache(); ++ unregister_filesystem(&unionfs_fs_type); ++ pr_info("Completed unionfs module unload\n"); ++} ++ ++MODULE_AUTHOR("Erez Zadok, Filesystems and Storage Lab, Stony Brook University" ++ " (http://www.fsl.cs.sunysb.edu)"); ++MODULE_DESCRIPTION("Unionfs " UNIONFS_VERSION ++ " (http://unionfs.filesystems.org)"); ++MODULE_LICENSE("GPL"); ++ ++module_init(init_unionfs_fs); ++module_exit(exit_unionfs_fs); +diff --git a/fs/unionfs/mmap.c b/fs/unionfs/mmap.c +new file mode 100644 +index 0000000..bcc5652 +--- /dev/null ++++ b/fs/unionfs/mmap.c +@@ -0,0 +1,89 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2006 Shaya Potter ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++ ++/* ++ * XXX: we need a dummy readpage handler because generic_file_mmap (which we ++ * use in unionfs_mmap) checks for the existence of ++ * mapping->a_ops->readpage, else it returns -ENOEXEC. The VFS will need to ++ * be fixed to allow a file system to define vm_ops->fault without any ++ * address_space_ops whatsoever. ++ * ++ * Otherwise, we don't want to use our readpage method at all. ++ */ ++static int unionfs_readpage(struct file *file, struct page *page) ++{ ++ BUG(); ++ return -EINVAL; ++} ++ ++static int unionfs_fault(struct vm_area_struct *vma, struct vm_fault *vmf) ++{ ++ int err; ++ struct file *file, *lower_file; ++ const struct vm_operations_struct *lower_vm_ops; ++ struct vm_area_struct lower_vma; ++ ++ BUG_ON(!vma); ++ memcpy(&lower_vma, vma, sizeof(struct vm_area_struct)); ++ file = lower_vma.vm_file; ++ lower_vm_ops = UNIONFS_F(file)->lower_vm_ops; ++ BUG_ON(!lower_vm_ops); ++ ++ lower_file = unionfs_lower_file(file); ++ BUG_ON(!lower_file); ++ /* ++ * XXX: vm_ops->fault may be called in parallel. Because we have to ++ * resort to temporarily changing the vma->vm_file to point to the ++ * lower file, a concurrent invocation of unionfs_fault could see a ++ * different value. In this workaround, we keep a different copy of ++ * the vma structure in our stack, so we never expose a different ++ * value of the vma->vm_file called to us, even temporarily. A ++ * better fix would be to change the calling semantics of ->fault to ++ * take an explicit file pointer. ++ */ ++ lower_vma.vm_file = lower_file; ++ err = lower_vm_ops->fault(&lower_vma, vmf); ++ return err; ++} ++ ++/* ++ * XXX: the default address_space_ops for unionfs is empty. We cannot set ++ * our inode->i_mapping->a_ops to NULL because too many code paths expect ++ * the a_ops vector to be non-NULL. ++ */ ++struct address_space_operations unionfs_aops = { ++ /* empty on purpose */ ++}; ++ ++/* ++ * XXX: we need a second, dummy address_space_ops vector, to be used ++ * temporarily during unionfs_mmap, because the latter calls ++ * generic_file_mmap, which checks if ->readpage exists, else returns ++ * -ENOEXEC. ++ */ ++struct address_space_operations unionfs_dummy_aops = { ++ .readpage = unionfs_readpage, ++}; ++ ++struct vm_operations_struct unionfs_vm_ops = { ++ .fault = unionfs_fault, ++}; +diff --git a/fs/unionfs/rdstate.c b/fs/unionfs/rdstate.c +new file mode 100644 +index 0000000..59b7333 +--- /dev/null ++++ b/fs/unionfs/rdstate.c +@@ -0,0 +1,285 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* This file contains the routines for maintaining readdir state. */ ++ ++/* ++ * There are two structures here, rdstate which is a hash table ++ * of the second structure which is a filldir_node. ++ */ ++ ++/* ++ * This is a struct kmem_cache for filldir nodes, because we allocate a lot ++ * of them and they shouldn't waste memory. If the node has a small name ++ * (as defined by the dentry structure), then we use an inline name to ++ * preserve kmalloc space. ++ */ ++static struct kmem_cache *unionfs_filldir_cachep; ++ ++int unionfs_init_filldir_cache(void) ++{ ++ unionfs_filldir_cachep = ++ kmem_cache_create("unionfs_filldir", ++ sizeof(struct filldir_node), 0, ++ SLAB_RECLAIM_ACCOUNT, NULL); ++ ++ return (unionfs_filldir_cachep ? 0 : -ENOMEM); ++} ++ ++void unionfs_destroy_filldir_cache(void) ++{ ++ if (unionfs_filldir_cachep) ++ kmem_cache_destroy(unionfs_filldir_cachep); ++} ++ ++/* ++ * This is a tuning parameter that tells us roughly how big to make the ++ * hash table in directory entries per page. This isn't perfect, but ++ * at least we get a hash table size that shouldn't be too overloaded. ++ * The following averages are based on my home directory. ++ * 14.44693 Overall ++ * 12.29 Single Page Directories ++ * 117.93 Multi-page directories ++ */ ++#define DENTPAGE 4096 ++#define DENTPERONEPAGE 12 ++#define DENTPERPAGE 118 ++#define MINHASHSIZE 1 ++static int guesstimate_hash_size(struct inode *inode) ++{ ++ struct inode *lower_inode; ++ int bindex; ++ int hashsize = MINHASHSIZE; ++ ++ if (UNIONFS_I(inode)->hashsize > 0) ++ return UNIONFS_I(inode)->hashsize; ++ ++ for (bindex = ibstart(inode); bindex <= ibend(inode); bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (!lower_inode) ++ continue; ++ ++ if (i_size_read(lower_inode) == DENTPAGE) ++ hashsize += DENTPERONEPAGE; ++ else ++ hashsize += (i_size_read(lower_inode) / DENTPAGE) * ++ DENTPERPAGE; ++ } ++ ++ return hashsize; ++} ++ ++int init_rdstate(struct file *file) ++{ ++ BUG_ON(sizeof(loff_t) != ++ (sizeof(unsigned int) + sizeof(unsigned int))); ++ BUG_ON(UNIONFS_F(file)->rdstate != NULL); ++ ++ UNIONFS_F(file)->rdstate = alloc_rdstate(file->f_path.dentry->d_inode, ++ fbstart(file)); ++ ++ return (UNIONFS_F(file)->rdstate ? 0 : -ENOMEM); ++} ++ ++struct unionfs_dir_state *find_rdstate(struct inode *inode, loff_t fpos) ++{ ++ struct unionfs_dir_state *rdstate = NULL; ++ struct list_head *pos; ++ ++ spin_lock(&UNIONFS_I(inode)->rdlock); ++ list_for_each(pos, &UNIONFS_I(inode)->readdircache) { ++ struct unionfs_dir_state *r = ++ list_entry(pos, struct unionfs_dir_state, cache); ++ if (fpos == rdstate2offset(r)) { ++ UNIONFS_I(inode)->rdcount--; ++ list_del(&r->cache); ++ rdstate = r; ++ break; ++ } ++ } ++ spin_unlock(&UNIONFS_I(inode)->rdlock); ++ return rdstate; ++} ++ ++struct unionfs_dir_state *alloc_rdstate(struct inode *inode, int bindex) ++{ ++ int i = 0; ++ int hashsize; ++ unsigned long mallocsize = sizeof(struct unionfs_dir_state); ++ struct unionfs_dir_state *rdstate; ++ ++ hashsize = guesstimate_hash_size(inode); ++ mallocsize += hashsize * sizeof(struct list_head); ++ mallocsize = __roundup_pow_of_two(mallocsize); ++ ++ /* This should give us about 500 entries anyway. */ ++ if (mallocsize > PAGE_SIZE) ++ mallocsize = PAGE_SIZE; ++ ++ hashsize = (mallocsize - sizeof(struct unionfs_dir_state)) / ++ sizeof(struct list_head); ++ ++ rdstate = kmalloc(mallocsize, GFP_KERNEL); ++ if (unlikely(!rdstate)) ++ return NULL; ++ ++ spin_lock(&UNIONFS_I(inode)->rdlock); ++ if (UNIONFS_I(inode)->cookie >= (MAXRDCOOKIE - 1)) ++ UNIONFS_I(inode)->cookie = 1; ++ else ++ UNIONFS_I(inode)->cookie++; ++ ++ rdstate->cookie = UNIONFS_I(inode)->cookie; ++ spin_unlock(&UNIONFS_I(inode)->rdlock); ++ rdstate->offset = 1; ++ rdstate->access = jiffies; ++ rdstate->bindex = bindex; ++ rdstate->dirpos = 0; ++ rdstate->hashentries = 0; ++ rdstate->size = hashsize; ++ for (i = 0; i < rdstate->size; i++) ++ INIT_LIST_HEAD(&rdstate->list[i]); ++ ++ return rdstate; ++} ++ ++static void free_filldir_node(struct filldir_node *node) ++{ ++ if (node->namelen >= DNAME_INLINE_LEN) ++ kfree(node->name); ++ kmem_cache_free(unionfs_filldir_cachep, node); ++} ++ ++void free_rdstate(struct unionfs_dir_state *state) ++{ ++ struct filldir_node *tmp; ++ int i; ++ ++ for (i = 0; i < state->size; i++) { ++ struct list_head *head = &(state->list[i]); ++ struct list_head *pos, *n; ++ ++ /* traverse the list and deallocate space */ ++ list_for_each_safe(pos, n, head) { ++ tmp = list_entry(pos, struct filldir_node, file_list); ++ list_del(&tmp->file_list); ++ free_filldir_node(tmp); ++ } ++ } ++ ++ kfree(state); ++} ++ ++struct filldir_node *find_filldir_node(struct unionfs_dir_state *rdstate, ++ const char *name, int namelen, ++ int is_whiteout) ++{ ++ int index; ++ unsigned int hash; ++ struct list_head *head; ++ struct list_head *pos; ++ struct filldir_node *cursor = NULL; ++ int found = 0; ++ ++ BUG_ON(namelen <= 0); ++ ++ hash = full_name_hash(name, namelen); ++ index = hash % rdstate->size; ++ ++ head = &(rdstate->list[index]); ++ list_for_each(pos, head) { ++ cursor = list_entry(pos, struct filldir_node, file_list); ++ ++ if (cursor->namelen == namelen && cursor->hash == hash && ++ !strncmp(cursor->name, name, namelen)) { ++ /* ++ * a duplicate exists, and hence no need to create ++ * entry to the list ++ */ ++ found = 1; ++ ++ /* ++ * if a duplicate is found in this branch, and is ++ * not due to the caller looking for an entry to ++ * whiteout, then the file system may be corrupted. ++ */ ++ if (unlikely(!is_whiteout && ++ cursor->bindex == rdstate->bindex)) ++ printk(KERN_ERR "unionfs: filldir: possible " ++ "I/O error: a file is duplicated " ++ "in the same branch %d: %s\n", ++ rdstate->bindex, cursor->name); ++ break; ++ } ++ } ++ ++ if (!found) ++ cursor = NULL; ++ ++ return cursor; ++} ++ ++int add_filldir_node(struct unionfs_dir_state *rdstate, const char *name, ++ int namelen, int bindex, int whiteout) ++{ ++ struct filldir_node *new; ++ unsigned int hash; ++ int index; ++ int err = 0; ++ struct list_head *head; ++ ++ BUG_ON(namelen <= 0); ++ ++ hash = full_name_hash(name, namelen); ++ index = hash % rdstate->size; ++ head = &(rdstate->list[index]); ++ ++ new = kmem_cache_alloc(unionfs_filldir_cachep, GFP_KERNEL); ++ if (unlikely(!new)) { ++ err = -ENOMEM; ++ goto out; ++ } ++ ++ INIT_LIST_HEAD(&new->file_list); ++ new->namelen = namelen; ++ new->hash = hash; ++ new->bindex = bindex; ++ new->whiteout = whiteout; ++ ++ if (namelen < DNAME_INLINE_LEN) { ++ new->name = new->iname; ++ } else { ++ new->name = kmalloc(namelen + 1, GFP_KERNEL); ++ if (unlikely(!new->name)) { ++ kmem_cache_free(unionfs_filldir_cachep, new); ++ new = NULL; ++ goto out; ++ } ++ } ++ ++ memcpy(new->name, name, namelen); ++ new->name[namelen] = '\0'; ++ ++ rdstate->hashentries++; ++ ++ list_add(&(new->file_list), head); ++out: ++ return err; ++} +diff --git a/fs/unionfs/rename.c b/fs/unionfs/rename.c +new file mode 100644 +index 0000000..c8ab910 +--- /dev/null ++++ b/fs/unionfs/rename.c +@@ -0,0 +1,522 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * This is a helper function for rename, used when rename ends up with hosed ++ * over dentries and we need to revert. ++ */ ++static int unionfs_refresh_lower_dentry(struct dentry *dentry, ++ struct dentry *parent, int bindex) ++{ ++ struct dentry *lower_dentry; ++ struct dentry *lower_parent; ++ int err = 0; ++ struct nameidata lower_nd; ++ ++ verify_locked(dentry); ++ ++ lower_parent = unionfs_lower_dentry_idx(parent, bindex); ++ ++ BUG_ON(!S_ISDIR(lower_parent->d_inode->i_mode)); ++ ++ err = init_lower_nd(&lower_nd, LOOKUP_OPEN); ++ if (unlikely(err < 0)) ++ goto out; ++ lower_dentry = lookup_one_len_nd(dentry->d_name.name, lower_parent, ++ dentry->d_name.len, &lower_nd); ++ release_lower_nd(&lower_nd, err); ++ if (IS_ERR(lower_dentry)) { ++ err = PTR_ERR(lower_dentry); ++ goto out; ++ } ++ ++ dput(unionfs_lower_dentry_idx(dentry, bindex)); ++ iput(unionfs_lower_inode_idx(dentry->d_inode, bindex)); ++ unionfs_set_lower_inode_idx(dentry->d_inode, bindex, NULL); ++ ++ if (!lower_dentry->d_inode) { ++ dput(lower_dentry); ++ unionfs_set_lower_dentry_idx(dentry, bindex, NULL); ++ } else { ++ unionfs_set_lower_dentry_idx(dentry, bindex, lower_dentry); ++ unionfs_set_lower_inode_idx(dentry->d_inode, bindex, ++ igrab(lower_dentry->d_inode)); ++ } ++ ++out: ++ return err; ++} ++ ++static int __unionfs_rename(struct inode *old_dir, struct dentry *old_dentry, ++ struct dentry *old_parent, ++ struct inode *new_dir, struct dentry *new_dentry, ++ struct dentry *new_parent, ++ int bindex) ++{ ++ int err = 0; ++ struct dentry *lower_old_dentry; ++ struct dentry *lower_new_dentry; ++ struct dentry *lower_old_dir_dentry; ++ struct dentry *lower_new_dir_dentry; ++ struct dentry *trap; ++ ++ lower_new_dentry = unionfs_lower_dentry_idx(new_dentry, bindex); ++ lower_old_dentry = unionfs_lower_dentry_idx(old_dentry, bindex); ++ ++ if (!lower_new_dentry) { ++ lower_new_dentry = ++ create_parents(new_parent->d_inode, ++ new_dentry, new_dentry->d_name.name, ++ bindex); ++ if (IS_ERR(lower_new_dentry)) { ++ err = PTR_ERR(lower_new_dentry); ++ if (IS_COPYUP_ERR(err)) ++ goto out; ++ printk(KERN_ERR "unionfs: error creating directory " ++ "tree for rename, bindex=%d err=%d\n", ++ bindex, err); ++ goto out; ++ } ++ } ++ ++ /* check for and remove whiteout, if any */ ++ err = check_unlink_whiteout(new_dentry, lower_new_dentry, bindex); ++ if (err > 0) /* ignore if whiteout found and successfully removed */ ++ err = 0; ++ if (err) ++ goto out; ++ ++ /* check of old_dentry branch is writable */ ++ err = is_robranch_super(old_dentry->d_sb, bindex); ++ if (err) ++ goto out; ++ ++ dget(lower_old_dentry); ++ dget(lower_new_dentry); ++ lower_old_dir_dentry = dget_parent(lower_old_dentry); ++ lower_new_dir_dentry = dget_parent(lower_new_dentry); ++ ++ trap = lock_rename(lower_old_dir_dentry, lower_new_dir_dentry); ++ /* source should not be ancenstor of target */ ++ if (trap == lower_old_dentry) { ++ err = -EINVAL; ++ goto out_err_unlock; ++ } ++ /* target should not be ancenstor of source */ ++ if (trap == lower_new_dentry) { ++ err = -ENOTEMPTY; ++ goto out_err_unlock; ++ } ++ err = vfs_rename(lower_old_dir_dentry->d_inode, lower_old_dentry, ++ lower_new_dir_dentry->d_inode, lower_new_dentry); ++out_err_unlock: ++ if (!err) { ++ /* update parent dir times */ ++ fsstack_copy_attr_times(old_dir, lower_old_dir_dentry->d_inode); ++ fsstack_copy_attr_times(new_dir, lower_new_dir_dentry->d_inode); ++ } ++ unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry); ++ ++ dput(lower_old_dir_dentry); ++ dput(lower_new_dir_dentry); ++ dput(lower_old_dentry); ++ dput(lower_new_dentry); ++ ++out: ++ if (!err) { ++ /* Fixup the new_dentry. */ ++ if (bindex < dbstart(new_dentry)) ++ dbstart(new_dentry) = bindex; ++ else if (bindex > dbend(new_dentry)) ++ dbend(new_dentry) = bindex; ++ } ++ ++ return err; ++} ++ ++/* ++ * Main rename code. This is sufficiently complex, that it's documented in ++ * Documentation/filesystems/unionfs/rename.txt. This routine calls ++ * __unionfs_rename() above to perform some of the work. ++ */ ++static int do_unionfs_rename(struct inode *old_dir, ++ struct dentry *old_dentry, ++ struct dentry *old_parent, ++ struct inode *new_dir, ++ struct dentry *new_dentry, ++ struct dentry *new_parent) ++{ ++ int err = 0; ++ int bindex; ++ int old_bstart, old_bend; ++ int new_bstart, new_bend; ++ int do_copyup = -1; ++ int local_err = 0; ++ int eio = 0; ++ int revert = 0; ++ ++ old_bstart = dbstart(old_dentry); ++ old_bend = dbend(old_dentry); ++ ++ new_bstart = dbstart(new_dentry); ++ new_bend = dbend(new_dentry); ++ ++ /* Rename source to destination. */ ++ err = __unionfs_rename(old_dir, old_dentry, old_parent, ++ new_dir, new_dentry, new_parent, ++ old_bstart); ++ if (err) { ++ if (!IS_COPYUP_ERR(err)) ++ goto out; ++ do_copyup = old_bstart - 1; ++ } else { ++ revert = 1; ++ } ++ ++ /* ++ * Unlink all instances of destination that exist to the left of ++ * bstart of source. On error, revert back, goto out. ++ */ ++ for (bindex = old_bstart - 1; bindex >= new_bstart; bindex--) { ++ struct dentry *unlink_dentry; ++ struct dentry *unlink_dir_dentry; ++ ++ BUG_ON(bindex < 0); ++ unlink_dentry = unionfs_lower_dentry_idx(new_dentry, bindex); ++ if (!unlink_dentry) ++ continue; ++ ++ unlink_dir_dentry = lock_parent(unlink_dentry); ++ err = is_robranch_super(old_dir->i_sb, bindex); ++ if (!err) ++ err = vfs_unlink(unlink_dir_dentry->d_inode, ++ unlink_dentry); ++ ++ fsstack_copy_attr_times(new_parent->d_inode, ++ unlink_dir_dentry->d_inode); ++ /* propagate number of hard-links */ ++ new_parent->d_inode->i_nlink = ++ unionfs_get_nlinks(new_parent->d_inode); ++ ++ unlock_dir(unlink_dir_dentry); ++ if (!err) { ++ if (bindex != new_bstart) { ++ dput(unlink_dentry); ++ unionfs_set_lower_dentry_idx(new_dentry, ++ bindex, NULL); ++ } ++ } else if (IS_COPYUP_ERR(err)) { ++ do_copyup = bindex - 1; ++ } else if (revert) { ++ goto revert; ++ } ++ } ++ ++ if (do_copyup != -1) { ++ for (bindex = do_copyup; bindex >= 0; bindex--) { ++ /* ++ * copyup the file into some left directory, so that ++ * you can rename it ++ */ ++ err = copyup_dentry(old_parent->d_inode, ++ old_dentry, old_bstart, bindex, ++ old_dentry->d_name.name, ++ old_dentry->d_name.len, NULL, ++ i_size_read(old_dentry->d_inode)); ++ /* if copyup failed, try next branch to the left */ ++ if (err) ++ continue; ++ /* ++ * create whiteout before calling __unionfs_rename ++ * because the latter will change the old_dentry's ++ * lower name and parent dir, resulting in the ++ * whiteout getting created in the wrong dir. ++ */ ++ err = create_whiteout(old_dentry, bindex); ++ if (err) { ++ printk(KERN_ERR "unionfs: can't create a " ++ "whiteout for %s in rename (err=%d)\n", ++ old_dentry->d_name.name, err); ++ continue; ++ } ++ err = __unionfs_rename(old_dir, old_dentry, old_parent, ++ new_dir, new_dentry, new_parent, ++ bindex); ++ break; ++ } ++ } ++ ++ /* make it opaque */ ++ if (S_ISDIR(old_dentry->d_inode->i_mode)) { ++ err = make_dir_opaque(old_dentry, dbstart(old_dentry)); ++ if (err) ++ goto revert; ++ } ++ ++ /* ++ * Create whiteout for source, only if: ++ * (1) There is more than one underlying instance of source. ++ * (We did a copy_up is taken care of above). ++ */ ++ if ((old_bstart != old_bend) && (do_copyup == -1)) { ++ err = create_whiteout(old_dentry, old_bstart); ++ if (err) { ++ /* can't fix anything now, so we exit with -EIO */ ++ printk(KERN_ERR "unionfs: can't create a whiteout for " ++ "%s in rename!\n", old_dentry->d_name.name); ++ err = -EIO; ++ } ++ } ++ ++out: ++ return err; ++ ++revert: ++ /* Do revert here. */ ++ local_err = unionfs_refresh_lower_dentry(new_dentry, new_parent, ++ old_bstart); ++ if (local_err) { ++ printk(KERN_ERR "unionfs: revert failed in rename: " ++ "the new refresh failed\n"); ++ eio = -EIO; ++ } ++ ++ local_err = unionfs_refresh_lower_dentry(old_dentry, old_parent, ++ old_bstart); ++ if (local_err) { ++ printk(KERN_ERR "unionfs: revert failed in rename: " ++ "the old refresh failed\n"); ++ eio = -EIO; ++ goto revert_out; ++ } ++ ++ if (!unionfs_lower_dentry_idx(new_dentry, bindex) || ++ !unionfs_lower_dentry_idx(new_dentry, bindex)->d_inode) { ++ printk(KERN_ERR "unionfs: revert failed in rename: " ++ "the object disappeared from under us!\n"); ++ eio = -EIO; ++ goto revert_out; ++ } ++ ++ if (unionfs_lower_dentry_idx(old_dentry, bindex) && ++ unionfs_lower_dentry_idx(old_dentry, bindex)->d_inode) { ++ printk(KERN_ERR "unionfs: revert failed in rename: " ++ "the object was created underneath us!\n"); ++ eio = -EIO; ++ goto revert_out; ++ } ++ ++ local_err = __unionfs_rename(new_dir, new_dentry, new_parent, ++ old_dir, old_dentry, old_parent, ++ old_bstart); ++ ++ /* If we can't fix it, then we cop-out with -EIO. */ ++ if (local_err) { ++ printk(KERN_ERR "unionfs: revert failed in rename!\n"); ++ eio = -EIO; ++ } ++ ++ local_err = unionfs_refresh_lower_dentry(new_dentry, new_parent, ++ bindex); ++ if (local_err) ++ eio = -EIO; ++ local_err = unionfs_refresh_lower_dentry(old_dentry, old_parent, ++ bindex); ++ if (local_err) ++ eio = -EIO; ++ ++revert_out: ++ if (eio) ++ err = eio; ++ return err; ++} ++ ++/* ++ * We can't copyup a directory, because it may involve huge numbers of ++ * children, etc. Doing that in the kernel would be bad, so instead we ++ * return EXDEV to the user-space utility that caused this, and let the ++ * user-space recurse and ask us to copy up each file separately. ++ */ ++static int may_rename_dir(struct dentry *dentry, struct dentry *parent) ++{ ++ int err, bstart; ++ ++ err = check_empty(dentry, parent, NULL); ++ if (err == -ENOTEMPTY) { ++ if (is_robranch(dentry)) ++ return -EXDEV; ++ } else if (err) { ++ return err; ++ } ++ ++ bstart = dbstart(dentry); ++ if (dbend(dentry) == bstart || dbopaque(dentry) == bstart) ++ return 0; ++ ++ dbstart(dentry) = bstart + 1; ++ err = check_empty(dentry, parent, NULL); ++ dbstart(dentry) = bstart; ++ if (err == -ENOTEMPTY) ++ err = -EXDEV; ++ return err; ++} ++ ++/* ++ * The locking rules in unionfs_rename are complex. We could use a simpler ++ * superblock-level name-space lock for renames and copy-ups. ++ */ ++int unionfs_rename(struct inode *old_dir, struct dentry *old_dentry, ++ struct inode *new_dir, struct dentry *new_dentry) ++{ ++ int err = 0; ++ struct dentry *wh_dentry; ++ struct dentry *old_parent, *new_parent; ++ int valid = true; ++ ++ unionfs_read_lock(old_dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ old_parent = dget_parent(old_dentry); ++ new_parent = dget_parent(new_dentry); ++ /* un/lock parent dentries only if they differ from old/new_dentry */ ++ if (old_parent != old_dentry && ++ old_parent != new_dentry) ++ unionfs_lock_dentry(old_parent, UNIONFS_DMUTEX_REVAL_PARENT); ++ if (new_parent != old_dentry && ++ new_parent != new_dentry && ++ new_parent != old_parent) ++ unionfs_lock_dentry(new_parent, UNIONFS_DMUTEX_REVAL_CHILD); ++ unionfs_double_lock_dentry(old_dentry, new_dentry); ++ ++ valid = __unionfs_d_revalidate(old_dentry, old_parent, false); ++ if (!valid) { ++ err = -ESTALE; ++ goto out; ++ } ++ if (!d_deleted(new_dentry) && new_dentry->d_inode) { ++ valid = __unionfs_d_revalidate(new_dentry, new_parent, false); ++ if (!valid) { ++ err = -ESTALE; ++ goto out; ++ } ++ } ++ ++ if (!S_ISDIR(old_dentry->d_inode->i_mode)) ++ err = unionfs_partial_lookup(old_dentry, old_parent); ++ else ++ err = may_rename_dir(old_dentry, old_parent); ++ ++ if (err) ++ goto out; ++ ++ err = unionfs_partial_lookup(new_dentry, new_parent); ++ if (err) ++ goto out; ++ ++ /* ++ * if new_dentry is already lower because of whiteout, ++ * simply override it even if the whited-out dir is not empty. ++ */ ++ wh_dentry = find_first_whiteout(new_dentry); ++ if (!IS_ERR(wh_dentry)) { ++ dput(wh_dentry); ++ } else if (new_dentry->d_inode) { ++ if (S_ISDIR(old_dentry->d_inode->i_mode) != ++ S_ISDIR(new_dentry->d_inode->i_mode)) { ++ err = S_ISDIR(old_dentry->d_inode->i_mode) ? ++ -ENOTDIR : -EISDIR; ++ goto out; ++ } ++ ++ if (S_ISDIR(new_dentry->d_inode->i_mode)) { ++ struct unionfs_dir_state *namelist = NULL; ++ /* check if this unionfs directory is empty or not */ ++ err = check_empty(new_dentry, new_parent, &namelist); ++ if (err) ++ goto out; ++ ++ if (!is_robranch(new_dentry)) ++ err = delete_whiteouts(new_dentry, ++ dbstart(new_dentry), ++ namelist); ++ ++ free_rdstate(namelist); ++ ++ if (err) ++ goto out; ++ } ++ } ++ ++ err = do_unionfs_rename(old_dir, old_dentry, old_parent, ++ new_dir, new_dentry, new_parent); ++ if (err) ++ goto out; ++ ++ /* ++ * force re-lookup since the dir on ro branch is not renamed, and ++ * lower dentries still indicate the un-renamed ones. ++ */ ++ if (S_ISDIR(old_dentry->d_inode->i_mode)) ++ atomic_dec(&UNIONFS_D(old_dentry)->generation); ++ else ++ unionfs_postcopyup_release(old_dentry); ++ if (new_dentry->d_inode && !S_ISDIR(new_dentry->d_inode->i_mode)) { ++ unionfs_postcopyup_release(new_dentry); ++ unionfs_postcopyup_setmnt(new_dentry); ++ if (!unionfs_lower_inode(new_dentry->d_inode)) { ++ /* ++ * If we get here, it means that no copyup was ++ * needed, and that a file by the old name already ++ * existing on the destination branch; that file got ++ * renamed earlier in this function, so all we need ++ * to do here is set the lower inode. ++ */ ++ struct inode *inode; ++ inode = unionfs_lower_inode(old_dentry->d_inode); ++ igrab(inode); ++ unionfs_set_lower_inode_idx(new_dentry->d_inode, ++ dbstart(new_dentry), ++ inode); ++ } ++ } ++ /* if all of this renaming succeeded, update our times */ ++ unionfs_copy_attr_times(old_dentry->d_inode); ++ unionfs_copy_attr_times(new_dentry->d_inode); ++ unionfs_check_inode(old_dir); ++ unionfs_check_inode(new_dir); ++ unionfs_check_dentry(old_dentry); ++ unionfs_check_dentry(new_dentry); ++ ++out: ++ if (err) /* clear the new_dentry stuff created */ ++ d_drop(new_dentry); ++ ++ unionfs_double_unlock_dentry(old_dentry, new_dentry); ++ if (new_parent != old_dentry && ++ new_parent != new_dentry && ++ new_parent != old_parent) ++ unionfs_unlock_dentry(new_parent); ++ if (old_parent != old_dentry && ++ old_parent != new_dentry) ++ unionfs_unlock_dentry(old_parent); ++ dput(new_parent); ++ dput(old_parent); ++ unionfs_read_unlock(old_dentry->d_sb); ++ ++ return err; ++} +diff --git a/fs/unionfs/sioq.c b/fs/unionfs/sioq.c +new file mode 100644 +index 0000000..b923742 +--- /dev/null ++++ b/fs/unionfs/sioq.c +@@ -0,0 +1,101 @@ ++/* ++ * Copyright (c) 2006-2011 Erez Zadok ++ * Copyright (c) 2006 Charles P. Wright ++ * Copyright (c) 2006-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2006 Junjiro Okajima ++ * Copyright (c) 2006 David P. Quigley ++ * Copyright (c) 2006-2011 Stony Brook University ++ * Copyright (c) 2006-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * Super-user IO work Queue - sometimes we need to perform actions which ++ * would fail due to the unix permissions on the parent directory (e.g., ++ * rmdir a directory which appears empty, but in reality contains ++ * whiteouts). ++ */ ++ ++static struct workqueue_struct *superio_workqueue; ++ ++int __init init_sioq(void) ++{ ++ int err; ++ ++ superio_workqueue = create_workqueue("unionfs_siod"); ++ if (!IS_ERR(superio_workqueue)) ++ return 0; ++ ++ err = PTR_ERR(superio_workqueue); ++ printk(KERN_ERR "unionfs: create_workqueue failed %d\n", err); ++ superio_workqueue = NULL; ++ return err; ++} ++ ++void stop_sioq(void) ++{ ++ if (superio_workqueue) ++ destroy_workqueue(superio_workqueue); ++} ++ ++void run_sioq(work_func_t func, struct sioq_args *args) ++{ ++ INIT_WORK(&args->work, func); ++ ++ init_completion(&args->comp); ++ while (!queue_work(superio_workqueue, &args->work)) { ++ /* TODO: do accounting if needed */ ++ schedule(); ++ } ++ wait_for_completion(&args->comp); ++} ++ ++void __unionfs_create(struct work_struct *work) ++{ ++ struct sioq_args *args = container_of(work, struct sioq_args, work); ++ struct create_args *c = &args->create; ++ ++ args->err = vfs_create(c->parent, c->dentry, c->mode, c->nd); ++ complete(&args->comp); ++} ++ ++void __unionfs_mkdir(struct work_struct *work) ++{ ++ struct sioq_args *args = container_of(work, struct sioq_args, work); ++ struct mkdir_args *m = &args->mkdir; ++ ++ args->err = vfs_mkdir(m->parent, m->dentry, m->mode); ++ complete(&args->comp); ++} ++ ++void __unionfs_mknod(struct work_struct *work) ++{ ++ struct sioq_args *args = container_of(work, struct sioq_args, work); ++ struct mknod_args *m = &args->mknod; ++ ++ args->err = vfs_mknod(m->parent, m->dentry, m->mode, m->dev); ++ complete(&args->comp); ++} ++ ++void __unionfs_symlink(struct work_struct *work) ++{ ++ struct sioq_args *args = container_of(work, struct sioq_args, work); ++ struct symlink_args *s = &args->symlink; ++ ++ args->err = vfs_symlink(s->parent, s->dentry, s->symbuf); ++ complete(&args->comp); ++} ++ ++void __unionfs_unlink(struct work_struct *work) ++{ ++ struct sioq_args *args = container_of(work, struct sioq_args, work); ++ struct unlink_args *u = &args->unlink; ++ ++ args->err = vfs_unlink(u->parent, u->dentry); ++ complete(&args->comp); ++} +diff --git a/fs/unionfs/sioq.h b/fs/unionfs/sioq.h +new file mode 100644 +index 0000000..c2dfb94 +--- /dev/null ++++ b/fs/unionfs/sioq.h +@@ -0,0 +1,91 @@ ++/* ++ * Copyright (c) 2006-2011 Erez Zadok ++ * Copyright (c) 2006 Charles P. Wright ++ * Copyright (c) 2006-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2006 Junjiro Okajima ++ * Copyright (c) 2006 David P. Quigley ++ * Copyright (c) 2006-2011 Stony Brook University ++ * Copyright (c) 2006-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef _SIOQ_H ++#define _SIOQ_H ++ ++struct deletewh_args { ++ struct unionfs_dir_state *namelist; ++ struct dentry *dentry; ++ int bindex; ++}; ++ ++struct is_opaque_args { ++ struct dentry *dentry; ++}; ++ ++struct create_args { ++ struct inode *parent; ++ struct dentry *dentry; ++ umode_t mode; ++ struct nameidata *nd; ++}; ++ ++struct mkdir_args { ++ struct inode *parent; ++ struct dentry *dentry; ++ umode_t mode; ++}; ++ ++struct mknod_args { ++ struct inode *parent; ++ struct dentry *dentry; ++ umode_t mode; ++ dev_t dev; ++}; ++ ++struct symlink_args { ++ struct inode *parent; ++ struct dentry *dentry; ++ char *symbuf; ++}; ++ ++struct unlink_args { ++ struct inode *parent; ++ struct dentry *dentry; ++}; ++ ++ ++struct sioq_args { ++ struct completion comp; ++ struct work_struct work; ++ int err; ++ void *ret; ++ ++ union { ++ struct deletewh_args deletewh; ++ struct is_opaque_args is_opaque; ++ struct create_args create; ++ struct mkdir_args mkdir; ++ struct mknod_args mknod; ++ struct symlink_args symlink; ++ struct unlink_args unlink; ++ }; ++}; ++ ++/* Extern definitions for SIOQ functions */ ++extern int __init init_sioq(void); ++extern void stop_sioq(void); ++extern void run_sioq(work_func_t func, struct sioq_args *args); ++ ++/* Extern definitions for our privilege escalation helpers */ ++extern void __unionfs_create(struct work_struct *work); ++extern void __unionfs_mkdir(struct work_struct *work); ++extern void __unionfs_mknod(struct work_struct *work); ++extern void __unionfs_symlink(struct work_struct *work); ++extern void __unionfs_unlink(struct work_struct *work); ++extern void __delete_whiteouts(struct work_struct *work); ++extern void __is_opaque_dir(struct work_struct *work); ++ ++#endif /* not _SIOQ_H */ +diff --git a/fs/unionfs/subr.c b/fs/unionfs/subr.c +new file mode 100644 +index 0000000..bdca2f7 +--- /dev/null ++++ b/fs/unionfs/subr.c +@@ -0,0 +1,95 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * returns the right n_link value based on the inode type ++ */ ++int unionfs_get_nlinks(const struct inode *inode) ++{ ++ /* don't bother to do all the work since we're unlinked */ ++ if (inode->i_nlink == 0) ++ return 0; ++ ++ if (!S_ISDIR(inode->i_mode)) ++ return unionfs_lower_inode(inode)->i_nlink; ++ ++ /* ++ * For directories, we return 1. The only place that could cares ++ * about links is readdir, and there's d_type there so even that ++ * doesn't matter. ++ */ ++ return 1; ++} ++ ++/* copy a/m/ctime from the lower branch with the newest times */ ++void unionfs_copy_attr_times(struct inode *upper) ++{ ++ int bindex; ++ struct inode *lower; ++ ++ if (!upper) ++ return; ++ if (ibstart(upper) < 0) { ++#ifdef CONFIG_UNION_FS_DEBUG ++ WARN_ON(ibstart(upper) < 0); ++#endif /* CONFIG_UNION_FS_DEBUG */ ++ return; ++ } ++ for (bindex = ibstart(upper); bindex <= ibend(upper); bindex++) { ++ lower = unionfs_lower_inode_idx(upper, bindex); ++ if (!lower) ++ continue; /* not all lower dir objects may exist */ ++ if (unlikely(timespec_compare(&upper->i_mtime, ++ &lower->i_mtime) < 0)) ++ upper->i_mtime = lower->i_mtime; ++ if (unlikely(timespec_compare(&upper->i_ctime, ++ &lower->i_ctime) < 0)) ++ upper->i_ctime = lower->i_ctime; ++ if (unlikely(timespec_compare(&upper->i_atime, ++ &lower->i_atime) < 0)) ++ upper->i_atime = lower->i_atime; ++ } ++} ++ ++/* ++ * A unionfs/fanout version of fsstack_copy_attr_all. Uses a ++ * unionfs_get_nlinks to properly calcluate the number of links to a file. ++ * Also, copies the max() of all a/m/ctimes for all lower inodes (which is ++ * important if the lower inode is a directory type) ++ */ ++void unionfs_copy_attr_all(struct inode *dest, ++ const struct inode *src) ++{ ++ dest->i_mode = src->i_mode; ++ dest->i_uid = src->i_uid; ++ dest->i_gid = src->i_gid; ++ dest->i_rdev = src->i_rdev; ++ ++ unionfs_copy_attr_times(dest); ++ ++ dest->i_blkbits = src->i_blkbits; ++ dest->i_flags = src->i_flags; ++ ++ /* ++ * Update the nlinks AFTER updating the above fields, because the ++ * get_links callback may depend on them. ++ */ ++ dest->i_nlink = unionfs_get_nlinks(dest); ++} +diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c +new file mode 100644 +index 0000000..c3ac814 +--- /dev/null ++++ b/fs/unionfs/super.c +@@ -0,0 +1,1030 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * The inode cache is used with alloc_inode for both our inode info and the ++ * vfs inode. ++ */ ++static struct kmem_cache *unionfs_inode_cachep; ++ ++struct inode *unionfs_iget(struct super_block *sb, unsigned long ino) ++{ ++ int size; ++ struct unionfs_inode_info *info; ++ struct inode *inode; ++ ++ inode = iget_locked(sb, ino); ++ if (!inode) ++ return ERR_PTR(-ENOMEM); ++ if (!(inode->i_state & I_NEW)) ++ return inode; ++ ++ info = UNIONFS_I(inode); ++ memset(info, 0, offsetof(struct unionfs_inode_info, vfs_inode)); ++ info->bstart = -1; ++ info->bend = -1; ++ atomic_set(&info->generation, ++ atomic_read(&UNIONFS_SB(inode->i_sb)->generation)); ++ spin_lock_init(&info->rdlock); ++ info->rdcount = 1; ++ info->hashsize = -1; ++ INIT_LIST_HEAD(&info->readdircache); ++ ++ size = sbmax(inode->i_sb) * sizeof(struct inode *); ++ info->lower_inodes = kzalloc(size, GFP_KERNEL); ++ if (unlikely(!info->lower_inodes)) { ++ printk(KERN_CRIT "unionfs: no kernel memory when allocating " ++ "lower-pointer array!\n"); ++ iget_failed(inode); ++ return ERR_PTR(-ENOMEM); ++ } ++ ++ inode->i_version++; ++ inode->i_op = &unionfs_main_iops; ++ inode->i_fop = &unionfs_main_fops; ++ ++ inode->i_mapping->a_ops = &unionfs_aops; ++ ++ /* ++ * reset times so unionfs_copy_attr_all can keep out time invariants ++ * right (upper inode time being the max of all lower ones). ++ */ ++ inode->i_atime.tv_sec = inode->i_atime.tv_nsec = 0; ++ inode->i_mtime.tv_sec = inode->i_mtime.tv_nsec = 0; ++ inode->i_ctime.tv_sec = inode->i_ctime.tv_nsec = 0; ++ unlock_new_inode(inode); ++ return inode; ++} ++ ++/* ++ * final actions when unmounting a file system ++ * ++ * No need to lock rwsem. ++ */ ++static void unionfs_put_super(struct super_block *sb) ++{ ++ int bindex, bstart, bend; ++ struct unionfs_sb_info *spd; ++ int leaks = 0; ++ ++ spd = UNIONFS_SB(sb); ++ if (!spd) ++ return; ++ ++ bstart = sbstart(sb); ++ bend = sbend(sb); ++ ++ /* Make sure we have no leaks of branchget/branchput. */ ++ for (bindex = bstart; bindex <= bend; bindex++) ++ if (unlikely(branch_count(sb, bindex) != 0)) { ++ printk(KERN_CRIT ++ "unionfs: branch %d has %d references left!\n", ++ bindex, branch_count(sb, bindex)); ++ leaks = 1; ++ } ++ WARN_ON(leaks != 0); ++ ++ /* decrement lower super references */ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ struct super_block *s; ++ s = unionfs_lower_super_idx(sb, bindex); ++ unionfs_set_lower_super_idx(sb, bindex, NULL); ++ atomic_dec(&s->s_active); ++ } ++ ++ kfree(spd->dev_name); ++ kfree(spd->data); ++ kfree(spd); ++ sb->s_fs_info = NULL; ++} ++ ++/* ++ * Since people use this to answer the "How big of a file can I write?" ++ * question, we report the size of the highest priority branch as the size of ++ * the union. ++ */ ++static int unionfs_statfs(struct dentry *dentry, struct kstatfs *buf) ++{ ++ int err = 0; ++ struct super_block *sb; ++ struct dentry *lower_dentry; ++ struct dentry *parent; ++ struct path lower_path; ++ bool valid; ++ ++ sb = dentry->d_sb; ++ ++ unionfs_read_lock(sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ unionfs_check_dentry(dentry); ++ ++ lower_dentry = unionfs_lower_dentry(sb->s_root); ++ lower_path.dentry = lower_dentry; ++ lower_path.mnt = unionfs_mntget(sb->s_root, 0); ++ err = vfs_statfs(&lower_path, buf); ++ mntput(lower_path.mnt); ++ ++ /* set return buf to our f/s to avoid confusing user-level utils */ ++ buf->f_type = UNIONFS_SUPER_MAGIC; ++ /* ++ * Our maximum file name can is shorter by a few bytes because every ++ * file name could potentially be whited-out. ++ * ++ * XXX: this restriction goes away with ODF. ++ */ ++ unionfs_set_max_namelen(&buf->f_namelen); ++ ++ /* ++ * reset two fields to avoid confusing user-land. ++ * XXX: is this still necessary? ++ */ ++ memset(&buf->f_fsid, 0, sizeof(__kernel_fsid_t)); ++ memset(&buf->f_spare, 0, sizeof(buf->f_spare)); ++ ++out: ++ unionfs_check_dentry(dentry); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(sb); ++ return err; ++} ++ ++/* handle mode changing during remount */ ++static noinline_for_stack int do_remount_mode_option( ++ char *optarg, ++ int cur_branches, ++ struct unionfs_data *new_data, ++ struct path *new_lower_paths) ++{ ++ int err = -EINVAL; ++ int perms, idx; ++ char *modename = strchr(optarg, '='); ++ struct path path; ++ ++ /* by now, optarg contains the branch name */ ++ if (!*optarg) { ++ printk(KERN_ERR ++ "unionfs: no branch specified for mode change\n"); ++ goto out; ++ } ++ if (!modename) { ++ printk(KERN_ERR "unionfs: branch \"%s\" requires a mode\n", ++ optarg); ++ goto out; ++ } ++ *modename++ = '\0'; ++ err = parse_branch_mode(modename, &perms); ++ if (err) { ++ printk(KERN_ERR "unionfs: invalid mode \"%s\" for \"%s\"\n", ++ modename, optarg); ++ goto out; ++ } ++ ++ /* ++ * Find matching branch index. For now, this assumes that nothing ++ * has been mounted on top of this Unionfs stack. Once we have /odf ++ * and cache-coherency resolved, we'll address the branch-path ++ * uniqueness. ++ */ ++ err = kern_path(optarg, LOOKUP_FOLLOW, &path); ++ if (err) { ++ printk(KERN_ERR "unionfs: error accessing " ++ "lower directory \"%s\" (error %d)\n", ++ optarg, err); ++ goto out; ++ } ++ for (idx = 0; idx < cur_branches; idx++) ++ if (path.mnt == new_lower_paths[idx].mnt && ++ path.dentry == new_lower_paths[idx].dentry) ++ break; ++ path_put(&path); /* no longer needed */ ++ if (idx == cur_branches) { ++ err = -ENOENT; /* err may have been reset above */ ++ printk(KERN_ERR "unionfs: branch \"%s\" " ++ "not found\n", optarg); ++ goto out; ++ } ++ /* check/change mode for existing branch */ ++ /* we don't warn if perms==branchperms */ ++ new_data[idx].branchperms = perms; ++ err = 0; ++out: ++ return err; ++} ++ ++/* handle branch deletion during remount */ ++static noinline_for_stack int do_remount_del_option( ++ char *optarg, int cur_branches, ++ struct unionfs_data *new_data, ++ struct path *new_lower_paths) ++{ ++ int err = -EINVAL; ++ int idx; ++ struct path path; ++ ++ /* optarg contains the branch name to delete */ ++ ++ /* ++ * Find matching branch index. For now, this assumes that nothing ++ * has been mounted on top of this Unionfs stack. Once we have /odf ++ * and cache-coherency resolved, we'll address the branch-path ++ * uniqueness. ++ */ ++ err = kern_path(optarg, LOOKUP_FOLLOW, &path); ++ if (err) { ++ printk(KERN_ERR "unionfs: error accessing " ++ "lower directory \"%s\" (error %d)\n", ++ optarg, err); ++ goto out; ++ } ++ for (idx = 0; idx < cur_branches; idx++) ++ if (path.mnt == new_lower_paths[idx].mnt && ++ path.dentry == new_lower_paths[idx].dentry) ++ break; ++ path_put(&path); /* no longer needed */ ++ if (idx == cur_branches) { ++ printk(KERN_ERR "unionfs: branch \"%s\" " ++ "not found\n", optarg); ++ err = -ENOENT; ++ goto out; ++ } ++ /* check if there are any open files on the branch to be deleted */ ++ if (atomic_read(&new_data[idx].open_files) > 0) { ++ err = -EBUSY; ++ goto out; ++ } ++ ++ /* ++ * Now we have to delete the branch. First, release any handles it ++ * has. Then, move the remaining array indexes past "idx" in ++ * new_data and new_lower_paths one to the left. Finally, adjust ++ * cur_branches. ++ */ ++ path_put(&new_lower_paths[idx]); ++ ++ if (idx < cur_branches - 1) { ++ /* if idx==cur_branches-1, we delete last branch: easy */ ++ memmove(&new_data[idx], &new_data[idx+1], ++ (cur_branches - 1 - idx) * ++ sizeof(struct unionfs_data)); ++ memmove(&new_lower_paths[idx], &new_lower_paths[idx+1], ++ (cur_branches - 1 - idx) * sizeof(struct path)); ++ } ++ ++ err = 0; ++out: ++ return err; ++} ++ ++/* handle branch insertion during remount */ ++static noinline_for_stack int do_remount_add_option( ++ char *optarg, int cur_branches, ++ struct unionfs_data *new_data, ++ struct path *new_lower_paths, ++ int *high_branch_id) ++{ ++ int err = -EINVAL; ++ int perms; ++ int idx = 0; /* default: insert at beginning */ ++ char *new_branch , *modename = NULL; ++ struct path path; ++ ++ /* ++ * optarg can be of several forms: ++ * ++ * /bar:/foo insert /foo before /bar ++ * /bar:/foo=ro insert /foo in ro mode before /bar ++ * /foo insert /foo in the beginning (prepend) ++ * :/foo insert /foo at the end (append) ++ */ ++ if (*optarg == ':') { /* append? */ ++ new_branch = optarg + 1; /* skip ':' */ ++ idx = cur_branches; ++ goto found_insertion_point; ++ } ++ new_branch = strchr(optarg, ':'); ++ if (!new_branch) { /* prepend? */ ++ new_branch = optarg; ++ goto found_insertion_point; ++ } ++ *new_branch++ = '\0'; /* holds path+mode of new branch */ ++ ++ /* ++ * Find matching branch index. For now, this assumes that nothing ++ * has been mounted on top of this Unionfs stack. Once we have /odf ++ * and cache-coherency resolved, we'll address the branch-path ++ * uniqueness. ++ */ ++ err = kern_path(optarg, LOOKUP_FOLLOW, &path); ++ if (err) { ++ printk(KERN_ERR "unionfs: error accessing " ++ "lower directory \"%s\" (error %d)\n", ++ optarg, err); ++ goto out; ++ } ++ for (idx = 0; idx < cur_branches; idx++) ++ if (path.mnt == new_lower_paths[idx].mnt && ++ path.dentry == new_lower_paths[idx].dentry) ++ break; ++ path_put(&path); /* no longer needed */ ++ if (idx == cur_branches) { ++ printk(KERN_ERR "unionfs: branch \"%s\" " ++ "not found\n", optarg); ++ err = -ENOENT; ++ goto out; ++ } ++ ++ /* ++ * At this point idx will hold the index where the new branch should ++ * be inserted before. ++ */ ++found_insertion_point: ++ /* find the mode for the new branch */ ++ if (new_branch) ++ modename = strchr(new_branch, '='); ++ if (modename) ++ *modename++ = '\0'; ++ if (!new_branch || !*new_branch) { ++ printk(KERN_ERR "unionfs: null new branch\n"); ++ err = -EINVAL; ++ goto out; ++ } ++ err = parse_branch_mode(modename, &perms); ++ if (err) { ++ printk(KERN_ERR "unionfs: invalid mode \"%s\" for " ++ "branch \"%s\"\n", modename, new_branch); ++ goto out; ++ } ++ err = kern_path(new_branch, LOOKUP_FOLLOW, &path); ++ if (err) { ++ printk(KERN_ERR "unionfs: error accessing " ++ "lower directory \"%s\" (error %d)\n", ++ new_branch, err); ++ goto out; ++ } ++ /* ++ * It's probably safe to check_mode the new branch to insert. Note: ++ * we don't allow inserting branches which are unionfs's by ++ * themselves (check_branch returns EINVAL in that case). This is ++ * because this code base doesn't support stacking unionfs: the ODF ++ * code base supports that correctly. ++ */ ++ err = check_branch(&path); ++ if (err) { ++ printk(KERN_ERR "unionfs: lower directory " ++ "\"%s\" is not a valid branch\n", optarg); ++ path_put(&path); ++ goto out; ++ } ++ ++ /* ++ * Now we have to insert the new branch. But first, move the bits ++ * to make space for the new branch, if needed. Finally, adjust ++ * cur_branches. ++ * We don't release nd here; it's kept until umount/remount. ++ */ ++ if (idx < cur_branches) { ++ /* if idx==cur_branches, we append: easy */ ++ memmove(&new_data[idx+1], &new_data[idx], ++ (cur_branches - idx) * sizeof(struct unionfs_data)); ++ memmove(&new_lower_paths[idx+1], &new_lower_paths[idx], ++ (cur_branches - idx) * sizeof(struct path)); ++ } ++ new_lower_paths[idx].dentry = path.dentry; ++ new_lower_paths[idx].mnt = path.mnt; ++ ++ new_data[idx].sb = path.dentry->d_sb; ++ atomic_set(&new_data[idx].open_files, 0); ++ new_data[idx].branchperms = perms; ++ new_data[idx].branch_id = ++*high_branch_id; /* assign new branch ID */ ++ ++ err = 0; ++out: ++ return err; ++} ++ ++ ++/* ++ * Support branch management options on remount. ++ * ++ * See Documentation/filesystems/unionfs/ for details. ++ * ++ * @flags: numeric mount options ++ * @options: mount options string ++ * ++ * This function can rearrange a mounted union dynamically, adding and ++ * removing branches, including changing branch modes. Clearly this has to ++ * be done safely and atomically. Luckily, the VFS already calls this ++ * function with lock_super(sb) and lock_kernel() held, preventing ++ * concurrent mixing of new mounts, remounts, and unmounts. Moreover, ++ * do_remount_sb(), our caller function, already called shrink_dcache_sb(sb) ++ * to purge dentries/inodes from our superblock, and also called ++ * fsync_super(sb) to purge any dirty pages. So we're good. ++ * ++ * XXX: however, our remount code may also need to invalidate mapped pages ++ * so as to force them to be re-gotten from the (newly reconfigured) lower ++ * branches. This has to wait for proper mmap and cache coherency support ++ * in the VFS. ++ * ++ */ ++static int unionfs_remount_fs(struct super_block *sb, int *flags, ++ char *options) ++{ ++ int err = 0; ++ int i; ++ char *optionstmp, *tmp_to_free; /* kstrdup'ed of "options" */ ++ char *optname; ++ int cur_branches = 0; /* no. of current branches */ ++ int new_branches = 0; /* no. of branches actually left in the end */ ++ int add_branches; /* est. no. of branches to add */ ++ int del_branches; /* est. no. of branches to del */ ++ int max_branches; /* max possible no. of branches */ ++ struct unionfs_data *new_data = NULL, *tmp_data = NULL; ++ struct path *new_lower_paths = NULL, *tmp_lower_paths = NULL; ++ struct inode **new_lower_inodes = NULL; ++ int new_high_branch_id; /* new high branch ID */ ++ int size; /* memory allocation size, temp var */ ++ int old_ibstart, old_ibend; ++ ++ unionfs_write_lock(sb); ++ ++ /* ++ * The VFS will take care of "ro" and "rw" flags, and we can safely ++ * ignore MS_SILENT, but anything else left over is an error. So we ++ * need to check if any other flags may have been passed (none are ++ * allowed/supported as of now). ++ */ ++ if ((*flags & ~(MS_RDONLY | MS_SILENT)) != 0) { ++ printk(KERN_ERR ++ "unionfs: remount flags 0x%x unsupported\n", *flags); ++ err = -EINVAL; ++ goto out_error; ++ } ++ ++ /* ++ * If 'options' is NULL, it's probably because the user just changed ++ * the union to a "ro" or "rw" and the VFS took care of it. So ++ * nothing to do and we're done. ++ */ ++ if (!options || options[0] == '\0') ++ goto out_error; ++ ++ /* ++ * Find out how many branches we will have in the end, counting ++ * "add" and "del" commands. Copy the "options" string because ++ * strsep modifies the string and we need it later. ++ */ ++ tmp_to_free = kstrdup(options, GFP_KERNEL); ++ optionstmp = tmp_to_free; ++ if (unlikely(!optionstmp)) { ++ err = -ENOMEM; ++ goto out_free; ++ } ++ cur_branches = sbmax(sb); /* current no. branches */ ++ new_branches = sbmax(sb); ++ del_branches = 0; ++ add_branches = 0; ++ new_high_branch_id = sbhbid(sb); /* save current high_branch_id */ ++ while ((optname = strsep(&optionstmp, ",")) != NULL) { ++ char *optarg; ++ ++ if (!optname || !*optname) ++ continue; ++ ++ optarg = strchr(optname, '='); ++ if (optarg) ++ *optarg++ = '\0'; ++ ++ if (!strcmp("add", optname)) ++ add_branches++; ++ else if (!strcmp("del", optname)) ++ del_branches++; ++ } ++ kfree(tmp_to_free); ++ /* after all changes, will we have at least one branch left? */ ++ if ((new_branches + add_branches - del_branches) < 1) { ++ printk(KERN_ERR ++ "unionfs: no branches left after remount\n"); ++ err = -EINVAL; ++ goto out_free; ++ } ++ ++ /* ++ * Since we haven't actually parsed all the add/del options, nor ++ * have we checked them for errors, we don't know for sure how many ++ * branches we will have after all changes have taken place. In ++ * fact, the total number of branches left could be less than what ++ * we have now. So we need to allocate space for a temporary ++ * placeholder that is at least as large as the maximum number of ++ * branches we *could* have, which is the current number plus all ++ * the additions. Once we're done with these temp placeholders, we ++ * may have to re-allocate the final size, copy over from the temp, ++ * and then free the temps (done near the end of this function). ++ */ ++ max_branches = cur_branches + add_branches; ++ /* allocate space for new pointers to lower dentry */ ++ tmp_data = kcalloc(max_branches, ++ sizeof(struct unionfs_data), GFP_KERNEL); ++ if (unlikely(!tmp_data)) { ++ err = -ENOMEM; ++ goto out_free; ++ } ++ /* allocate space for new pointers to lower paths */ ++ tmp_lower_paths = kcalloc(max_branches, ++ sizeof(struct path), GFP_KERNEL); ++ if (unlikely(!tmp_lower_paths)) { ++ err = -ENOMEM; ++ goto out_free; ++ } ++ /* copy current info into new placeholders, incrementing refcnts */ ++ memcpy(tmp_data, UNIONFS_SB(sb)->data, ++ cur_branches * sizeof(struct unionfs_data)); ++ memcpy(tmp_lower_paths, UNIONFS_D(sb->s_root)->lower_paths, ++ cur_branches * sizeof(struct path)); ++ for (i = 0; i < cur_branches; i++) ++ path_get(&tmp_lower_paths[i]); /* drop refs at end of fxn */ ++ ++ /******************************************************************* ++ * For each branch command, do kern_path on the requested branch, ++ * and apply the change to a temp branch list. To handle errors, we ++ * already dup'ed the old arrays (above), and increased the refcnts ++ * on various f/s objects. So now we can do all the kern_path'ss ++ * and branch-management commands on the new arrays. If it fail mid ++ * way, we free the tmp arrays and *put all objects. If we succeed, ++ * then we free old arrays and *put its objects, and then replace ++ * the arrays with the new tmp list (we may have to re-allocate the ++ * memory because the temp lists could have been larger than what we ++ * actually needed). ++ *******************************************************************/ ++ ++ while ((optname = strsep(&options, ",")) != NULL) { ++ char *optarg; ++ ++ if (!optname || !*optname) ++ continue; ++ /* ++ * At this stage optname holds a comma-delimited option, but ++ * without the commas. Next, we need to break the string on ++ * the '=' symbol to separate CMD=ARG, where ARG itself can ++ * be KEY=VAL. For example, in mode=/foo=rw, CMD is "mode", ++ * KEY is "/foo", and VAL is "rw". ++ */ ++ optarg = strchr(optname, '='); ++ if (optarg) ++ *optarg++ = '\0'; ++ /* incgen remount option (instead of old ioctl) */ ++ if (!strcmp("incgen", optname)) { ++ err = 0; ++ goto out_no_change; ++ } ++ ++ /* ++ * All of our options take an argument now. (Insert ones ++ * that don't above this check.) So at this stage optname ++ * contains the CMD part and optarg contains the ARG part. ++ */ ++ if (!optarg || !*optarg) { ++ printk(KERN_ERR "unionfs: all remount options require " ++ "an argument (%s)\n", optname); ++ err = -EINVAL; ++ goto out_release; ++ } ++ ++ if (!strcmp("add", optname)) { ++ err = do_remount_add_option(optarg, new_branches, ++ tmp_data, ++ tmp_lower_paths, ++ &new_high_branch_id); ++ if (err) ++ goto out_release; ++ new_branches++; ++ if (new_branches > UNIONFS_MAX_BRANCHES) { ++ printk(KERN_ERR "unionfs: command exceeds " ++ "%d branches\n", UNIONFS_MAX_BRANCHES); ++ err = -E2BIG; ++ goto out_release; ++ } ++ continue; ++ } ++ if (!strcmp("del", optname)) { ++ err = do_remount_del_option(optarg, new_branches, ++ tmp_data, ++ tmp_lower_paths); ++ if (err) ++ goto out_release; ++ new_branches--; ++ continue; ++ } ++ if (!strcmp("mode", optname)) { ++ err = do_remount_mode_option(optarg, new_branches, ++ tmp_data, ++ tmp_lower_paths); ++ if (err) ++ goto out_release; ++ continue; ++ } ++ ++ /* ++ * When you use "mount -o remount,ro", mount(8) will ++ * reportedly pass the original dirs= string from ++ * /proc/mounts. So for now, we have to ignore dirs= and ++ * not consider it an error, unless we want to allow users ++ * to pass dirs= in remount. Note that to allow the VFS to ++ * actually process the ro/rw remount options, we have to ++ * return 0 from this function. ++ */ ++ if (!strcmp("dirs", optname)) { ++ printk(KERN_WARNING ++ "unionfs: remount ignoring option \"%s\"\n", ++ optname); ++ continue; ++ } ++ ++ err = -EINVAL; ++ printk(KERN_ERR ++ "unionfs: unrecognized option \"%s\"\n", optname); ++ goto out_release; ++ } ++ ++out_no_change: ++ ++ /****************************************************************** ++ * WE'RE ALMOST DONE: check if leftmost branch might be read-only, ++ * see if we need to allocate a small-sized new vector, copy the ++ * vectors to their correct place, release the refcnt of the older ++ * ones, and return. Also handle invalidating any pages that will ++ * have to be re-read. ++ *******************************************************************/ ++ ++ if (!(tmp_data[0].branchperms & MAY_WRITE)) { ++ printk(KERN_ERR "unionfs: leftmost branch cannot be read-only " ++ "(use \"remount,ro\" to create a read-only union)\n"); ++ err = -EINVAL; ++ goto out_release; ++ } ++ ++ /* (re)allocate space for new pointers to lower dentry */ ++ size = new_branches * sizeof(struct unionfs_data); ++ new_data = krealloc(tmp_data, size, GFP_KERNEL); ++ if (unlikely(!new_data)) { ++ err = -ENOMEM; ++ goto out_release; ++ } ++ ++ /* allocate space for new pointers to lower paths */ ++ size = new_branches * sizeof(struct path); ++ new_lower_paths = krealloc(tmp_lower_paths, size, GFP_KERNEL); ++ if (unlikely(!new_lower_paths)) { ++ err = -ENOMEM; ++ goto out_release; ++ } ++ ++ /* allocate space for new pointers to lower inodes */ ++ new_lower_inodes = kcalloc(new_branches, ++ sizeof(struct inode *), GFP_KERNEL); ++ if (unlikely(!new_lower_inodes)) { ++ err = -ENOMEM; ++ goto out_release; ++ } ++ ++ /* ++ * OK, just before we actually put the new set of branches in place, ++ * we need to ensure that our own f/s has no dirty objects left. ++ * Luckily, do_remount_sb() already calls shrink_dcache_sb(sb) and ++ * fsync_super(sb), taking care of dentries, inodes, and dirty ++ * pages. So all that's left is for us to invalidate any leftover ++ * (non-dirty) pages to ensure that they will be re-read from the ++ * new lower branches (and to support mmap). ++ */ ++ ++ /* ++ * Once we finish the remounting successfully, our superblock ++ * generation number will have increased. This will be detected by ++ * our dentry-revalidation code upon subsequent f/s operations ++ * through unionfs. The revalidation code will rebuild the union of ++ * lower inodes for a given unionfs inode and invalidate any pages ++ * of such "stale" inodes (by calling our purge_inode_data ++ * function). This revalidation will happen lazily and ++ * incrementally, as users perform operations on cached inodes. We ++ * would like to encourage this revalidation to happen sooner if ++ * possible, so we like to try to invalidate as many other pages in ++ * our superblock as we can. We used to call drop_pagecache_sb() or ++ * a variant thereof, but either method was racy (drop_caches alone ++ * is known to be racy). So now we let the revalidation happen on a ++ * per file basis in ->d_revalidate. ++ */ ++ ++ /* grab new lower super references; release old ones */ ++ for (i = 0; i < new_branches; i++) ++ atomic_inc(&new_data[i].sb->s_active); ++ for (i = 0; i < sbmax(sb); i++) ++ atomic_dec(&UNIONFS_SB(sb)->data[i].sb->s_active); ++ ++ /* copy new vectors into their correct place */ ++ tmp_data = UNIONFS_SB(sb)->data; ++ UNIONFS_SB(sb)->data = new_data; ++ new_data = NULL; /* so don't free good pointers below */ ++ tmp_lower_paths = UNIONFS_D(sb->s_root)->lower_paths; ++ UNIONFS_D(sb->s_root)->lower_paths = new_lower_paths; ++ new_lower_paths = NULL; /* so don't free good pointers below */ ++ ++ /* update our unionfs_sb_info and root dentry index of last branch */ ++ i = sbmax(sb); /* save no. of branches to release at end */ ++ sbend(sb) = new_branches - 1; ++ dbend(sb->s_root) = new_branches - 1; ++ old_ibstart = ibstart(sb->s_root->d_inode); ++ old_ibend = ibend(sb->s_root->d_inode); ++ ibend(sb->s_root->d_inode) = new_branches - 1; ++ UNIONFS_D(sb->s_root)->bcount = new_branches; ++ new_branches = i; /* no. of branches to release below */ ++ ++ /* ++ * Update lower inodes: 3 steps ++ * 1. grab ref on all new lower inodes ++ */ ++ for (i = dbstart(sb->s_root); i <= dbend(sb->s_root); i++) { ++ struct dentry *lower_dentry = ++ unionfs_lower_dentry_idx(sb->s_root, i); ++ igrab(lower_dentry->d_inode); ++ new_lower_inodes[i] = lower_dentry->d_inode; ++ } ++ /* 2. release reference on all older lower inodes */ ++ iput_lowers(sb->s_root->d_inode, old_ibstart, old_ibend, true); ++ /* 3. update root dentry's inode to new lower_inodes array */ ++ UNIONFS_I(sb->s_root->d_inode)->lower_inodes = new_lower_inodes; ++ new_lower_inodes = NULL; ++ ++ /* maxbytes may have changed */ ++ sb->s_maxbytes = unionfs_lower_super_idx(sb, 0)->s_maxbytes; ++ /* update high branch ID */ ++ sbhbid(sb) = new_high_branch_id; ++ ++ /* update our sb->generation for revalidating objects */ ++ i = atomic_inc_return(&UNIONFS_SB(sb)->generation); ++ atomic_set(&UNIONFS_D(sb->s_root)->generation, i); ++ atomic_set(&UNIONFS_I(sb->s_root->d_inode)->generation, i); ++ if (!(*flags & MS_SILENT)) ++ pr_info("unionfs: %s: new generation number %d\n", ++ UNIONFS_SB(sb)->dev_name, i); ++ /* finally, update the root dentry's times */ ++ unionfs_copy_attr_times(sb->s_root->d_inode); ++ err = 0; /* reset to success */ ++ ++ /* ++ * The code above falls through to the next label, and releases the ++ * refcnts of the older ones (stored in tmp_*): if we fell through ++ * here, it means success. However, if we jump directly to this ++ * label from any error above, then an error occurred after we ++ * grabbed various refcnts, and so we have to release the ++ * temporarily constructed structures. ++ */ ++out_release: ++ /* no need to cleanup/release anything in tmp_data */ ++ if (tmp_lower_paths) ++ for (i = 0; i < new_branches; i++) ++ path_put(&tmp_lower_paths[i]); ++out_free: ++ kfree(tmp_lower_paths); ++ kfree(tmp_data); ++ kfree(new_lower_paths); ++ kfree(new_data); ++ kfree(new_lower_inodes); ++out_error: ++ unionfs_check_dentry(sb->s_root); ++ unionfs_write_unlock(sb); ++ return err; ++} ++ ++/* ++ * Called by iput() when the inode reference count reached zero ++ * and the inode is not hashed anywhere. Used to clear anything ++ * that needs to be, before the inode is completely destroyed and put ++ * on the inode free list. ++ * ++ * No need to lock sb info's rwsem. ++ */ ++static void unionfs_evict_inode(struct inode *inode) ++{ ++ int bindex, bstart, bend; ++ struct inode *lower_inode; ++ struct list_head *pos, *n; ++ struct unionfs_dir_state *rdstate; ++ ++ truncate_inode_pages(&inode->i_data, 0); ++ end_writeback(inode); ++ ++ list_for_each_safe(pos, n, &UNIONFS_I(inode)->readdircache) { ++ rdstate = list_entry(pos, struct unionfs_dir_state, cache); ++ list_del(&rdstate->cache); ++ free_rdstate(rdstate); ++ } ++ ++ /* ++ * Decrement a reference to a lower_inode, which was incremented ++ * by our read_inode when it was created initially. ++ */ ++ bstart = ibstart(inode); ++ bend = ibend(inode); ++ if (bstart >= 0) { ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_inode = unionfs_lower_inode_idx(inode, bindex); ++ if (!lower_inode) ++ continue; ++ unionfs_set_lower_inode_idx(inode, bindex, NULL); ++ /* see Documentation/filesystems/unionfs/issues.txt */ ++ lockdep_off(); ++ iput(lower_inode); ++ lockdep_on(); ++ } ++ } ++ ++ kfree(UNIONFS_I(inode)->lower_inodes); ++ UNIONFS_I(inode)->lower_inodes = NULL; ++} ++ ++static struct inode *unionfs_alloc_inode(struct super_block *sb) ++{ ++ struct unionfs_inode_info *i; ++ ++ i = kmem_cache_alloc(unionfs_inode_cachep, GFP_KERNEL); ++ if (unlikely(!i)) ++ return NULL; ++ ++ /* memset everything up to the inode to 0 */ ++ memset(i, 0, offsetof(struct unionfs_inode_info, vfs_inode)); ++ ++ i->vfs_inode.i_version = 1; ++ return &i->vfs_inode; ++} ++ ++static void unionfs_destroy_inode(struct inode *inode) ++{ ++ kmem_cache_free(unionfs_inode_cachep, UNIONFS_I(inode)); ++} ++ ++/* unionfs inode cache constructor */ ++static void init_once(void *obj) ++{ ++ struct unionfs_inode_info *i = obj; ++ ++ inode_init_once(&i->vfs_inode); ++} ++ ++int unionfs_init_inode_cache(void) ++{ ++ int err = 0; ++ ++ unionfs_inode_cachep = ++ kmem_cache_create("unionfs_inode_cache", ++ sizeof(struct unionfs_inode_info), 0, ++ SLAB_RECLAIM_ACCOUNT, init_once); ++ if (unlikely(!unionfs_inode_cachep)) ++ err = -ENOMEM; ++ return err; ++} ++ ++/* unionfs inode cache destructor */ ++void unionfs_destroy_inode_cache(void) ++{ ++ if (unionfs_inode_cachep) ++ kmem_cache_destroy(unionfs_inode_cachep); ++} ++ ++/* ++ * Called when we have a dirty inode, right here we only throw out ++ * parts of our readdir list that are too old. ++ * ++ * No need to grab sb info's rwsem. ++ */ ++static int unionfs_write_inode(struct inode *inode, ++ struct writeback_control *wbc) ++{ ++ struct list_head *pos, *n; ++ struct unionfs_dir_state *rdstate; ++ ++ spin_lock(&UNIONFS_I(inode)->rdlock); ++ list_for_each_safe(pos, n, &UNIONFS_I(inode)->readdircache) { ++ rdstate = list_entry(pos, struct unionfs_dir_state, cache); ++ /* We keep this list in LRU order. */ ++ if ((rdstate->access + RDCACHE_JIFFIES) > jiffies) ++ break; ++ UNIONFS_I(inode)->rdcount--; ++ list_del(&rdstate->cache); ++ free_rdstate(rdstate); ++ } ++ spin_unlock(&UNIONFS_I(inode)->rdlock); ++ ++ return 0; ++} ++ ++/* ++ * Used only in nfs, to kill any pending RPC tasks, so that subsequent ++ * code can actually succeed and won't leave tasks that need handling. ++ */ ++static void unionfs_umount_begin(struct super_block *sb) ++{ ++ struct super_block *lower_sb; ++ int bindex, bstart, bend; ++ ++ unionfs_read_lock(sb, UNIONFS_SMUTEX_CHILD); ++ ++ bstart = sbstart(sb); ++ bend = sbend(sb); ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_sb = unionfs_lower_super_idx(sb, bindex); ++ ++ if (lower_sb && lower_sb->s_op && ++ lower_sb->s_op->umount_begin) ++ lower_sb->s_op->umount_begin(lower_sb); ++ } ++ ++ unionfs_read_unlock(sb); ++} ++ ++static int unionfs_show_options(struct seq_file *m, struct vfsmount *mnt) ++{ ++ struct super_block *sb = mnt->mnt_sb; ++ int ret = 0; ++ char *tmp_page; ++ char *path; ++ int bindex, bstart, bend; ++ int perms; ++ ++ /* to prevent a silly lockdep warning with namespace_sem */ ++ lockdep_off(); ++ unionfs_read_lock(sb, UNIONFS_SMUTEX_CHILD); ++ unionfs_lock_dentry(sb->s_root, UNIONFS_DMUTEX_CHILD); ++ ++ tmp_page = (char *) __get_free_page(GFP_KERNEL); ++ if (unlikely(!tmp_page)) { ++ ret = -ENOMEM; ++ goto out; ++ } ++ ++ bstart = sbstart(sb); ++ bend = sbend(sb); ++ ++ seq_printf(m, ",dirs="); ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ struct path p; ++ p.dentry = unionfs_lower_dentry_idx(sb->s_root, bindex); ++ p.mnt = unionfs_lower_mnt_idx(sb->s_root, bindex); ++ path = d_path(&p, tmp_page, PAGE_SIZE); ++ if (IS_ERR(path)) { ++ ret = PTR_ERR(path); ++ goto out; ++ } ++ ++ perms = branchperms(sb, bindex); ++ ++ seq_printf(m, "%s=%s", path, ++ perms & MAY_WRITE ? "rw" : "ro"); ++ if (bindex != bend) ++ seq_printf(m, ":"); ++ } ++ ++out: ++ free_page((unsigned long) tmp_page); ++ ++ unionfs_unlock_dentry(sb->s_root); ++ unionfs_read_unlock(sb); ++ lockdep_on(); ++ ++ return ret; ++} ++ ++struct super_operations unionfs_sops = { ++ .put_super = unionfs_put_super, ++ .statfs = unionfs_statfs, ++ .remount_fs = unionfs_remount_fs, ++ .evict_inode = unionfs_evict_inode, ++ .umount_begin = unionfs_umount_begin, ++ .show_options = unionfs_show_options, ++ .write_inode = unionfs_write_inode, ++ .alloc_inode = unionfs_alloc_inode, ++ .destroy_inode = unionfs_destroy_inode, ++}; +diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h +new file mode 100644 +index 0000000..1821705 +--- /dev/null ++++ b/fs/unionfs/union.h +@@ -0,0 +1,679 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef _UNION_H_ ++#define _UNION_H_ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++ ++#include ++ ++/* the file system name */ ++#define UNIONFS_NAME "unionfs" ++ ++/* unionfs root inode number */ ++#define UNIONFS_ROOT_INO 1 ++ ++/* number of times we try to get a unique temporary file name */ ++#define GET_TMPNAM_MAX_RETRY 5 ++ ++/* maximum number of branches we support, to avoid memory blowup */ ++#define UNIONFS_MAX_BRANCHES 128 ++ ++/* minimum time (seconds) required for time-based cache-coherency */ ++#define UNIONFS_MIN_CC_TIME 3 ++ ++/* Operations vectors defined in specific files. */ ++extern struct file_operations unionfs_main_fops; ++extern struct file_operations unionfs_dir_fops; ++extern struct inode_operations unionfs_main_iops; ++extern struct inode_operations unionfs_dir_iops; ++extern struct inode_operations unionfs_symlink_iops; ++extern struct super_operations unionfs_sops; ++extern struct dentry_operations unionfs_dops; ++extern struct address_space_operations unionfs_aops, unionfs_dummy_aops; ++extern struct vm_operations_struct unionfs_vm_ops; ++ ++/* How long should an entry be allowed to persist */ ++#define RDCACHE_JIFFIES (5*HZ) ++ ++/* compatibility with Real-Time patches */ ++#ifdef CONFIG_PREEMPT_RT ++# define unionfs_rw_semaphore compat_rw_semaphore ++#else /* not CONFIG_PREEMPT_RT */ ++# define unionfs_rw_semaphore rw_semaphore ++#endif /* not CONFIG_PREEMPT_RT */ ++ ++/* file private data. */ ++struct unionfs_file_info { ++ int bstart; ++ int bend; ++ atomic_t generation; ++ ++ struct unionfs_dir_state *rdstate; ++ struct file **lower_files; ++ int *saved_branch_ids; /* IDs of branches when file was opened */ ++ const struct vm_operations_struct *lower_vm_ops; ++ bool wrote_to_file; /* for delayed copyup */ ++}; ++ ++/* unionfs inode data in memory */ ++struct unionfs_inode_info { ++ int bstart; ++ int bend; ++ atomic_t generation; ++ /* Stuff for readdir over NFS. */ ++ spinlock_t rdlock; ++ struct list_head readdircache; ++ int rdcount; ++ int hashsize; ++ int cookie; ++ ++ /* The lower inodes */ ++ struct inode **lower_inodes; ++ ++ struct inode vfs_inode; ++}; ++ ++/* unionfs dentry data in memory */ ++struct unionfs_dentry_info { ++ /* ++ * The semaphore is used to lock the dentry as soon as we get into a ++ * unionfs function from the VFS. Our lock ordering is that children ++ * go before their parents. ++ */ ++ struct mutex lock; ++ int bstart; ++ int bend; ++ int bopaque; ++ int bcount; ++ atomic_t generation; ++ struct path *lower_paths; ++}; ++ ++/* These are the pointers to our various objects. */ ++struct unionfs_data { ++ struct super_block *sb; /* lower super_block */ ++ atomic_t open_files; /* number of open files on branch */ ++ int branchperms; ++ int branch_id; /* unique branch ID at re/mount time */ ++}; ++ ++/* unionfs super-block data in memory */ ++struct unionfs_sb_info { ++ int bend; ++ ++ atomic_t generation; ++ ++ /* ++ * This rwsem is used to make sure that a branch management ++ * operation... ++ * 1) will not begin before all currently in-flight operations ++ * complete. ++ * 2) any new operations do not execute until the currently ++ * running branch management operation completes. ++ * ++ * The write_lock_owner records the PID of the task which grabbed ++ * the rw_sem for writing. If the same task also tries to grab the ++ * read lock, we allow it. This prevents a self-deadlock when ++ * branch-management is used on a pivot_root'ed union, because we ++ * have to ->lookup paths which belong to the same union. ++ */ ++ struct unionfs_rw_semaphore rwsem; ++ pid_t write_lock_owner; /* PID of rw_sem owner (write lock) */ ++ int high_branch_id; /* last unique branch ID given */ ++ char *dev_name; /* to identify different unions in pr_debug */ ++ struct unionfs_data *data; ++}; ++ ++/* ++ * structure for making the linked list of entries by readdir on left branch ++ * to compare with entries on right branch ++ */ ++struct filldir_node { ++ struct list_head file_list; /* list for directory entries */ ++ char *name; /* name entry */ ++ int hash; /* name hash */ ++ int namelen; /* name len since name is not 0 terminated */ ++ ++ /* ++ * we can check for duplicate whiteouts and files in the same branch ++ * in order to return -EIO. ++ */ ++ int bindex; ++ ++ /* is this a whiteout entry? */ ++ int whiteout; ++ ++ /* Inline name, so we don't need to separately kmalloc small ones */ ++ char iname[DNAME_INLINE_LEN]; ++}; ++ ++/* Directory hash table. */ ++struct unionfs_dir_state { ++ unsigned int cookie; /* the cookie, based off of rdversion */ ++ unsigned int offset; /* The entry we have returned. */ ++ int bindex; ++ loff_t dirpos; /* offset within the lower level directory */ ++ int size; /* How big is the hash table? */ ++ int hashentries; /* How many entries have been inserted? */ ++ unsigned long access; ++ ++ /* This cache list is used when the inode keeps us around. */ ++ struct list_head cache; ++ struct list_head list[0]; ++}; ++ ++/* externs needed for fanout.h or sioq.h */ ++extern int unionfs_get_nlinks(const struct inode *inode); ++extern void unionfs_copy_attr_times(struct inode *upper); ++extern void unionfs_copy_attr_all(struct inode *dest, const struct inode *src); ++ ++/* include miscellaneous macros */ ++#include "fanout.h" ++#include "sioq.h" ++ ++/* externs for cache creation/deletion routines */ ++extern void unionfs_destroy_filldir_cache(void); ++extern int unionfs_init_filldir_cache(void); ++extern int unionfs_init_inode_cache(void); ++extern void unionfs_destroy_inode_cache(void); ++extern int unionfs_init_dentry_cache(void); ++extern void unionfs_destroy_dentry_cache(void); ++ ++/* Initialize and free readdir-specific state. */ ++extern int init_rdstate(struct file *file); ++extern struct unionfs_dir_state *alloc_rdstate(struct inode *inode, ++ int bindex); ++extern struct unionfs_dir_state *find_rdstate(struct inode *inode, ++ loff_t fpos); ++extern void free_rdstate(struct unionfs_dir_state *state); ++extern int add_filldir_node(struct unionfs_dir_state *rdstate, ++ const char *name, int namelen, int bindex, ++ int whiteout); ++extern struct filldir_node *find_filldir_node(struct unionfs_dir_state *rdstate, ++ const char *name, int namelen, ++ int is_whiteout); ++ ++extern struct dentry **alloc_new_dentries(int objs); ++extern struct unionfs_data *alloc_new_data(int objs); ++ ++/* We can only use 32-bits of offset for rdstate --- blech! */ ++#define DIREOF (0xfffff) ++#define RDOFFBITS 20 /* This is the number of bits in DIREOF. */ ++#define MAXRDCOOKIE (0xfff) ++/* Turn an rdstate into an offset. */ ++static inline off_t rdstate2offset(struct unionfs_dir_state *buf) ++{ ++ off_t tmp; ++ ++ tmp = ((buf->cookie & MAXRDCOOKIE) << RDOFFBITS) ++ | (buf->offset & DIREOF); ++ return tmp; ++} ++ ++/* Macros for locking a super_block. */ ++enum unionfs_super_lock_class { ++ UNIONFS_SMUTEX_NORMAL, ++ UNIONFS_SMUTEX_PARENT, /* when locking on behalf of file */ ++ UNIONFS_SMUTEX_CHILD, /* when locking on behalf of dentry */ ++}; ++static inline void unionfs_read_lock(struct super_block *sb, int subclass) ++{ ++ if (UNIONFS_SB(sb)->write_lock_owner && ++ UNIONFS_SB(sb)->write_lock_owner == current->pid) ++ return; ++ down_read_nested(&UNIONFS_SB(sb)->rwsem, subclass); ++} ++static inline void unionfs_read_unlock(struct super_block *sb) ++{ ++ if (UNIONFS_SB(sb)->write_lock_owner && ++ UNIONFS_SB(sb)->write_lock_owner == current->pid) ++ return; ++ up_read(&UNIONFS_SB(sb)->rwsem); ++} ++static inline void unionfs_write_lock(struct super_block *sb) ++{ ++ down_write(&UNIONFS_SB(sb)->rwsem); ++ UNIONFS_SB(sb)->write_lock_owner = current->pid; ++} ++static inline void unionfs_write_unlock(struct super_block *sb) ++{ ++ up_write(&UNIONFS_SB(sb)->rwsem); ++ UNIONFS_SB(sb)->write_lock_owner = 0; ++} ++ ++static inline void unionfs_double_lock_dentry(struct dentry *d1, ++ struct dentry *d2) ++{ ++ BUG_ON(d1 == d2); ++ if (d1 < d2) { ++ unionfs_lock_dentry(d1, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(d2, UNIONFS_DMUTEX_CHILD); ++ } else { ++ unionfs_lock_dentry(d2, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(d1, UNIONFS_DMUTEX_CHILD); ++ } ++} ++ ++static inline void unionfs_double_unlock_dentry(struct dentry *d1, ++ struct dentry *d2) ++{ ++ BUG_ON(d1 == d2); ++ if (d1 < d2) { /* unlock in reverse order than double_lock_dentry */ ++ unionfs_unlock_dentry(d1); ++ unionfs_unlock_dentry(d2); ++ } else { ++ unionfs_unlock_dentry(d2); ++ unionfs_unlock_dentry(d1); ++ } ++} ++ ++static inline void unionfs_double_lock_parents(struct dentry *p1, ++ struct dentry *p2) ++{ ++ if (p1 == p2) { ++ unionfs_lock_dentry(p1, UNIONFS_DMUTEX_REVAL_PARENT); ++ return; ++ } ++ if (p1 < p2) { ++ unionfs_lock_dentry(p1, UNIONFS_DMUTEX_REVAL_PARENT); ++ unionfs_lock_dentry(p2, UNIONFS_DMUTEX_REVAL_CHILD); ++ } else { ++ unionfs_lock_dentry(p2, UNIONFS_DMUTEX_REVAL_PARENT); ++ unionfs_lock_dentry(p1, UNIONFS_DMUTEX_REVAL_CHILD); ++ } ++} ++ ++static inline void unionfs_double_unlock_parents(struct dentry *p1, ++ struct dentry *p2) ++{ ++ if (p1 == p2) { ++ unionfs_unlock_dentry(p1); ++ return; ++ } ++ if (p1 < p2) { /* unlock in reverse order of double_lock_parents */ ++ unionfs_unlock_dentry(p1); ++ unionfs_unlock_dentry(p2); ++ } else { ++ unionfs_unlock_dentry(p2); ++ unionfs_unlock_dentry(p1); ++ } ++} ++ ++extern int new_dentry_private_data(struct dentry *dentry, int subclass); ++extern int realloc_dentry_private_data(struct dentry *dentry); ++extern void free_dentry_private_data(struct dentry *dentry); ++extern void update_bstart(struct dentry *dentry); ++extern int init_lower_nd(struct nameidata *nd, unsigned int flags); ++extern void release_lower_nd(struct nameidata *nd, int err); ++ ++/* ++ * EXTERNALS: ++ */ ++ ++/* replicates the directory structure up to given dentry in given branch */ ++extern struct dentry *create_parents(struct inode *dir, struct dentry *dentry, ++ const char *name, int bindex); ++ ++/* partial lookup */ ++extern int unionfs_partial_lookup(struct dentry *dentry, ++ struct dentry *parent); ++extern struct dentry *unionfs_lookup_full(struct dentry *dentry, ++ struct dentry *parent, ++ int lookupmode); ++ ++/* copies a file from dbstart to newbindex branch */ ++extern int copyup_file(struct inode *dir, struct file *file, int bstart, ++ int newbindex, loff_t size); ++extern int copyup_named_file(struct inode *dir, struct file *file, ++ char *name, int bstart, int new_bindex, ++ loff_t len); ++/* copies a dentry from dbstart to newbindex branch */ ++extern int copyup_dentry(struct inode *dir, struct dentry *dentry, ++ int bstart, int new_bindex, const char *name, ++ int namelen, struct file **copyup_file, loff_t len); ++/* helper functions for post-copyup actions */ ++extern void unionfs_postcopyup_setmnt(struct dentry *dentry); ++extern void unionfs_postcopyup_release(struct dentry *dentry); ++ ++/* Is this directory empty: 0 if it is empty, -ENOTEMPTY if not. */ ++extern int check_empty(struct dentry *dentry, struct dentry *parent, ++ struct unionfs_dir_state **namelist); ++/* whiteout and opaque directory helpers */ ++extern char *alloc_whname(const char *name, int len); ++extern bool is_whiteout_name(char **namep, int *namelenp); ++extern bool is_validname(const char *name); ++extern struct dentry *lookup_whiteout(const char *name, ++ struct dentry *lower_parent); ++extern struct dentry *find_first_whiteout(struct dentry *dentry); ++extern int unlink_whiteout(struct dentry *wh_dentry); ++extern int check_unlink_whiteout(struct dentry *dentry, ++ struct dentry *lower_dentry, int bindex); ++extern int create_whiteout(struct dentry *dentry, int start); ++extern int delete_whiteouts(struct dentry *dentry, int bindex, ++ struct unionfs_dir_state *namelist); ++extern int is_opaque_dir(struct dentry *dentry, int bindex); ++extern int make_dir_opaque(struct dentry *dir, int bindex); ++extern void unionfs_set_max_namelen(long *namelen); ++ ++extern void unionfs_reinterpose(struct dentry *this_dentry); ++extern struct super_block *unionfs_duplicate_super(struct super_block *sb); ++ ++/* Locking functions. */ ++extern int unionfs_setlk(struct file *file, int cmd, struct file_lock *fl); ++extern int unionfs_getlk(struct file *file, struct file_lock *fl); ++ ++/* Common file operations. */ ++extern int unionfs_file_revalidate(struct file *file, struct dentry *parent, ++ bool willwrite); ++extern int unionfs_open(struct inode *inode, struct file *file); ++extern int unionfs_file_release(struct inode *inode, struct file *file); ++extern int unionfs_flush(struct file *file, fl_owner_t id); ++extern long unionfs_ioctl(struct file *file, unsigned int cmd, ++ unsigned long arg); ++extern int unionfs_fsync(struct file *file, int datasync); ++extern int unionfs_fasync(int fd, struct file *file, int flag); ++ ++/* Inode operations */ ++extern struct inode *unionfs_iget(struct super_block *sb, unsigned long ino); ++extern int unionfs_rename(struct inode *old_dir, struct dentry *old_dentry, ++ struct inode *new_dir, struct dentry *new_dentry); ++extern int unionfs_unlink(struct inode *dir, struct dentry *dentry); ++extern int unionfs_rmdir(struct inode *dir, struct dentry *dentry); ++ ++extern bool __unionfs_d_revalidate(struct dentry *dentry, ++ struct dentry *parent, bool willwrite); ++extern bool is_negative_lower(const struct dentry *dentry); ++extern bool is_newer_lower(const struct dentry *dentry); ++extern void purge_sb_data(struct super_block *sb); ++ ++/* The values for unionfs_interpose's flag. */ ++#define INTERPOSE_DEFAULT 0 ++#define INTERPOSE_LOOKUP 1 ++#define INTERPOSE_REVAL 2 ++#define INTERPOSE_REVAL_NEG 3 ++#define INTERPOSE_PARTIAL 4 ++ ++extern struct dentry *unionfs_interpose(struct dentry *this_dentry, ++ struct super_block *sb, int flag); ++ ++#ifdef CONFIG_UNION_FS_XATTR ++/* Extended attribute functions. */ ++extern void *unionfs_xattr_alloc(size_t size, size_t limit); ++static inline void unionfs_xattr_kfree(const void *p) ++{ ++ kfree(p); ++} ++extern ssize_t unionfs_getxattr(struct dentry *dentry, const char *name, ++ void *value, size_t size); ++extern int unionfs_removexattr(struct dentry *dentry, const char *name); ++extern ssize_t unionfs_listxattr(struct dentry *dentry, char *list, ++ size_t size); ++extern int unionfs_setxattr(struct dentry *dentry, const char *name, ++ const void *value, size_t size, int flags); ++#endif /* CONFIG_UNION_FS_XATTR */ ++ ++/* The root directory is unhashed, but isn't deleted. */ ++static inline int d_deleted(struct dentry *d) ++{ ++ return d_unhashed(d) && (d != d->d_sb->s_root); ++} ++ ++/* unionfs_permission, check if we should bypass error to facilitate copyup */ ++#define IS_COPYUP_ERR(err) ((err) == -EROFS) ++ ++/* unionfs_open, check if we need to copyup the file */ ++#define OPEN_WRITE_FLAGS (O_WRONLY | O_RDWR | O_APPEND) ++#define IS_WRITE_FLAG(flag) ((flag) & OPEN_WRITE_FLAGS) ++ ++static inline int branchperms(const struct super_block *sb, int index) ++{ ++ BUG_ON(index < 0); ++ return UNIONFS_SB(sb)->data[index].branchperms; ++} ++ ++static inline int set_branchperms(struct super_block *sb, int index, int perms) ++{ ++ BUG_ON(index < 0); ++ UNIONFS_SB(sb)->data[index].branchperms = perms; ++ return perms; ++} ++ ++/* check if readonly lower inode, but possibly unlinked (no inode->i_sb) */ ++static inline int __is_rdonly(const struct inode *inode) ++{ ++ /* if unlinked, can't be readonly (?) */ ++ if (!inode->i_sb) ++ return 0; ++ return IS_RDONLY(inode); ++ ++} ++/* Is this file on a read-only branch? */ ++static inline int is_robranch_super(const struct super_block *sb, int index) ++{ ++ int ret; ++ ++ ret = (!(branchperms(sb, index) & MAY_WRITE)) ? -EROFS : 0; ++ return ret; ++} ++ ++/* Is this file on a read-only branch? */ ++static inline int is_robranch_idx(const struct dentry *dentry, int index) ++{ ++ struct super_block *lower_sb; ++ ++ BUG_ON(index < 0); ++ ++ if (!(branchperms(dentry->d_sb, index) & MAY_WRITE)) ++ return -EROFS; ++ ++ lower_sb = unionfs_lower_super_idx(dentry->d_sb, index); ++ BUG_ON(lower_sb == NULL); ++ /* ++ * test sb flags directly, not IS_RDONLY(lower_inode) because the ++ * lower_dentry could be a negative. ++ */ ++ if (lower_sb->s_flags & MS_RDONLY) ++ return -EROFS; ++ ++ return 0; ++} ++ ++static inline int is_robranch(const struct dentry *dentry) ++{ ++ int index; ++ ++ index = UNIONFS_D(dentry)->bstart; ++ BUG_ON(index < 0); ++ ++ return is_robranch_idx(dentry, index); ++} ++ ++/* ++ * EXTERNALS: ++ */ ++extern int check_branch(const struct path *path); ++extern int parse_branch_mode(const char *name, int *perms); ++ ++/* locking helpers */ ++static inline struct dentry *lock_parent(struct dentry *dentry) ++{ ++ struct dentry *dir = dget_parent(dentry); ++ mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT); ++ return dir; ++} ++static inline struct dentry *lock_parent_wh(struct dentry *dentry) ++{ ++ struct dentry *dir = dget_parent(dentry); ++ ++ mutex_lock_nested(&dir->d_inode->i_mutex, UNIONFS_DMUTEX_WHITEOUT); ++ return dir; ++} ++ ++static inline void unlock_dir(struct dentry *dir) ++{ ++ mutex_unlock(&dir->d_inode->i_mutex); ++ dput(dir); ++} ++ ++/* lock base inode mutex before calling lookup_one_len */ ++static inline struct dentry *lookup_lck_len(const char *name, ++ struct dentry *base, int len) ++{ ++ struct dentry *d; ++ struct nameidata lower_nd; ++ int err; ++ ++ err = init_lower_nd(&lower_nd, LOOKUP_OPEN); ++ if (unlikely(err < 0)) { ++ d = ERR_PTR(err); ++ goto out; ++ } ++ mutex_lock(&base->d_inode->i_mutex); ++ d = lookup_one_len_nd(name, base, len, &lower_nd); ++ release_lower_nd(&lower_nd, err); ++ mutex_unlock(&base->d_inode->i_mutex); ++out: ++ return d; ++} ++ ++static inline struct vfsmount *unionfs_mntget(struct dentry *dentry, ++ int bindex) ++{ ++ struct vfsmount *mnt; ++ ++ BUG_ON(!dentry || bindex < 0); ++ ++ mnt = mntget(unionfs_lower_mnt_idx(dentry, bindex)); ++#ifdef CONFIG_UNION_FS_DEBUG ++ if (!mnt) ++ pr_debug("unionfs: mntget: mnt=%p bindex=%d\n", ++ mnt, bindex); ++#endif /* CONFIG_UNION_FS_DEBUG */ ++ ++ return mnt; ++} ++ ++static inline void unionfs_mntput(struct dentry *dentry, int bindex) ++{ ++ struct vfsmount *mnt; ++ ++ if (!dentry && bindex < 0) ++ return; ++ BUG_ON(!dentry || bindex < 0); ++ ++ mnt = unionfs_lower_mnt_idx(dentry, bindex); ++#ifdef CONFIG_UNION_FS_DEBUG ++ /* ++ * Directories can have NULL lower objects in between start/end, but ++ * NOT if at the start/end range. We cannot verify that this dentry ++ * is a type=DIR, because it may already be a negative dentry. But ++ * if dbstart is greater than dbend, we know that this couldn't have ++ * been a regular file: it had to have been a directory. ++ */ ++ if (!mnt && !(bindex > dbstart(dentry) && bindex < dbend(dentry))) ++ pr_debug("unionfs: mntput: mnt=%p bindex=%d\n", mnt, bindex); ++#endif /* CONFIG_UNION_FS_DEBUG */ ++ mntput(mnt); ++} ++ ++#ifdef CONFIG_UNION_FS_DEBUG ++ ++/* useful for tracking code reachability */ ++#define UDBG pr_debug("DBG:%s:%s:%d\n", __FILE__, __func__, __LINE__) ++ ++#define unionfs_check_inode(i) __unionfs_check_inode((i), \ ++ __FILE__, __func__, __LINE__) ++#define unionfs_check_dentry(d) __unionfs_check_dentry((d), \ ++ __FILE__, __func__, __LINE__) ++#define unionfs_check_file(f) __unionfs_check_file((f), \ ++ __FILE__, __func__, __LINE__) ++#define unionfs_check_nd(n) __unionfs_check_nd((n), \ ++ __FILE__, __func__, __LINE__) ++#define show_branch_counts(sb) __show_branch_counts((sb), \ ++ __FILE__, __func__, __LINE__) ++#define show_inode_times(i) __show_inode_times((i), \ ++ __FILE__, __func__, __LINE__) ++#define show_dinode_times(d) __show_dinode_times((d), \ ++ __FILE__, __func__, __LINE__) ++#define show_inode_counts(i) __show_inode_counts((i), \ ++ __FILE__, __func__, __LINE__) ++ ++extern void __unionfs_check_inode(const struct inode *inode, const char *fname, ++ const char *fxn, int line); ++extern void __unionfs_check_dentry(const struct dentry *dentry, ++ const char *fname, const char *fxn, ++ int line); ++extern void __unionfs_check_file(const struct file *file, ++ const char *fname, const char *fxn, int line); ++extern void __unionfs_check_nd(const struct nameidata *nd, ++ const char *fname, const char *fxn, int line); ++extern void __show_branch_counts(const struct super_block *sb, ++ const char *file, const char *fxn, int line); ++extern void __show_inode_times(const struct inode *inode, ++ const char *file, const char *fxn, int line); ++extern void __show_dinode_times(const struct dentry *dentry, ++ const char *file, const char *fxn, int line); ++extern void __show_inode_counts(const struct inode *inode, ++ const char *file, const char *fxn, int line); ++ ++#else /* not CONFIG_UNION_FS_DEBUG */ ++ ++/* we leave useful hooks for these check functions throughout the code */ ++#define unionfs_check_inode(i) do { } while (0) ++#define unionfs_check_dentry(d) do { } while (0) ++#define unionfs_check_file(f) do { } while (0) ++#define unionfs_check_nd(n) do { } while (0) ++#define show_branch_counts(sb) do { } while (0) ++#define show_inode_times(i) do { } while (0) ++#define show_dinode_times(d) do { } while (0) ++#define show_inode_counts(i) do { } while (0) ++ ++#endif /* not CONFIG_UNION_FS_DEBUG */ ++ ++#endif /* not _UNION_H_ */ +diff --git a/fs/unionfs/unlink.c b/fs/unionfs/unlink.c +new file mode 100644 +index 0000000..bf447bb +--- /dev/null ++++ b/fs/unionfs/unlink.c +@@ -0,0 +1,278 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * Helper function for Unionfs's unlink operation. ++ * ++ * The main goal of this function is to optimize the unlinking of non-dir ++ * objects in unionfs by deleting all possible lower inode objects from the ++ * underlying branches having same dentry name as the non-dir dentry on ++ * which this unlink operation is called. This way we delete as many lower ++ * inodes as possible, and save space. Whiteouts need to be created in ++ * branch0 only if unlinking fails on any of the lower branch other than ++ * branch0, or if a lower branch is marked read-only. ++ * ++ * Also, while unlinking a file, if we encounter any dir type entry in any ++ * intermediate branch, then we remove the directory by calling vfs_rmdir. ++ * The following special cases are also handled: ++ ++ * (1) If an error occurs in branch0 during vfs_unlink, then we return ++ * appropriate error. ++ * ++ * (2) If we get an error during unlink in any of other lower branch other ++ * than branch0, then we create a whiteout in branch0. ++ * ++ * (3) If a whiteout already exists in any intermediate branch, we delete ++ * all possible inodes only up to that branch (this is an "opaqueness" ++ * as as per Documentation/filesystems/unionfs/concepts.txt). ++ * ++ */ ++static int unionfs_unlink_whiteout(struct inode *dir, struct dentry *dentry, ++ struct dentry *parent) ++{ ++ struct dentry *lower_dentry; ++ struct dentry *lower_dir_dentry; ++ int bindex; ++ int err = 0; ++ ++ err = unionfs_partial_lookup(dentry, parent); ++ if (err) ++ goto out; ++ ++ /* trying to unlink all possible valid instances */ ++ for (bindex = dbstart(dentry); bindex <= dbend(dentry); bindex++) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ if (!lower_dentry || !lower_dentry->d_inode) ++ continue; ++ ++ lower_dir_dentry = lock_parent(lower_dentry); ++ ++ /* avoid destroying the lower inode if the object is in use */ ++ dget(lower_dentry); ++ err = is_robranch_super(dentry->d_sb, bindex); ++ if (!err) { ++ /* see Documentation/filesystems/unionfs/issues.txt */ ++ lockdep_off(); ++ if (!S_ISDIR(lower_dentry->d_inode->i_mode)) ++ err = vfs_unlink(lower_dir_dentry->d_inode, ++ lower_dentry); ++ else ++ err = vfs_rmdir(lower_dir_dentry->d_inode, ++ lower_dentry); ++ lockdep_on(); ++ } ++ ++ /* if lower object deletion succeeds, update inode's times */ ++ if (!err) ++ unionfs_copy_attr_times(dentry->d_inode); ++ dput(lower_dentry); ++ fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode); ++ unlock_dir(lower_dir_dentry); ++ ++ if (err) ++ break; ++ } ++ ++ /* ++ * Create the whiteout in branch 0 (highest priority) only if (a) ++ * there was an error in any intermediate branch other than branch 0 ++ * due to failure of vfs_unlink/vfs_rmdir or (b) a branch marked or ++ * mounted read-only. ++ */ ++ if (err) { ++ if ((bindex == 0) || ++ ((bindex == dbstart(dentry)) && ++ (!IS_COPYUP_ERR(err)))) ++ goto out; ++ else { ++ if (!IS_COPYUP_ERR(err)) ++ pr_debug("unionfs: lower object deletion " ++ "failed in branch:%d\n", bindex); ++ err = create_whiteout(dentry, sbstart(dentry->d_sb)); ++ } ++ } ++ ++out: ++ if (!err) ++ inode_dec_link_count(dentry->d_inode); ++ ++ /* We don't want to leave negative leftover dentries for revalidate. */ ++ if (!err && (dbopaque(dentry) != -1)) ++ update_bstart(dentry); ++ ++ return err; ++} ++ ++int unionfs_unlink(struct inode *dir, struct dentry *dentry) ++{ ++ int err = 0; ++ struct inode *inode = dentry->d_inode; ++ struct dentry *parent; ++ int valid; ++ ++ BUG_ON(S_ISDIR(inode->i_mode)); ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ unionfs_check_dentry(dentry); ++ ++ err = unionfs_unlink_whiteout(dir, dentry, parent); ++ /* call d_drop so the system "forgets" about us */ ++ if (!err) { ++ unionfs_postcopyup_release(dentry); ++ unionfs_postcopyup_setmnt(parent); ++ if (inode->i_nlink == 0) /* drop lower inodes */ ++ iput_lowers_all(inode, false); ++ d_drop(dentry); ++ /* ++ * if unlink/whiteout succeeded, parent dir mtime has ++ * changed ++ */ ++ unionfs_copy_attr_times(dir); ++ } ++ ++out: ++ if (!err) { ++ unionfs_check_dentry(dentry); ++ unionfs_check_inode(dir); ++ } ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++static int unionfs_rmdir_first(struct inode *dir, struct dentry *dentry, ++ struct unionfs_dir_state *namelist) ++{ ++ int err; ++ struct dentry *lower_dentry; ++ struct dentry *lower_dir_dentry = NULL; ++ ++ /* Here we need to remove whiteout entries. */ ++ err = delete_whiteouts(dentry, dbstart(dentry), namelist); ++ if (err) ++ goto out; ++ ++ lower_dentry = unionfs_lower_dentry(dentry); ++ ++ lower_dir_dentry = lock_parent(lower_dentry); ++ ++ /* avoid destroying the lower inode if the file is in use */ ++ dget(lower_dentry); ++ err = is_robranch(dentry); ++ if (!err) ++ err = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry); ++ dput(lower_dentry); ++ ++ fsstack_copy_attr_times(dir, lower_dir_dentry->d_inode); ++ /* propagate number of hard-links */ ++ dentry->d_inode->i_nlink = unionfs_get_nlinks(dentry->d_inode); ++ ++out: ++ if (lower_dir_dentry) ++ unlock_dir(lower_dir_dentry); ++ return err; ++} ++ ++int unionfs_rmdir(struct inode *dir, struct dentry *dentry) ++{ ++ int err = 0; ++ struct unionfs_dir_state *namelist = NULL; ++ struct dentry *parent; ++ int dstart, dend; ++ bool valid; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ unionfs_check_dentry(dentry); ++ ++ /* check if this unionfs directory is empty or not */ ++ err = check_empty(dentry, parent, &namelist); ++ if (err) ++ goto out; ++ ++ err = unionfs_rmdir_first(dir, dentry, namelist); ++ dstart = dbstart(dentry); ++ dend = dbend(dentry); ++ /* ++ * We create a whiteout for the directory if there was an error to ++ * rmdir the first directory entry in the union. Otherwise, we ++ * create a whiteout only if there is no chance that a lower ++ * priority branch might also have the same named directory. IOW, ++ * if there is not another same-named directory at a lower priority ++ * branch, then we don't need to create a whiteout for it. ++ */ ++ if (!err) { ++ if (dstart < dend) ++ err = create_whiteout(dentry, dstart); ++ } else { ++ int new_err; ++ ++ if (dstart == 0) ++ goto out; ++ ++ /* exit if the error returned was NOT -EROFS */ ++ if (!IS_COPYUP_ERR(err)) ++ goto out; ++ ++ new_err = create_whiteout(dentry, dstart - 1); ++ if (new_err != -EEXIST) ++ err = new_err; ++ } ++ ++out: ++ /* ++ * Drop references to lower dentry/inode so storage space for them ++ * can be reclaimed. Then, call d_drop so the system "forgets" ++ * about us. ++ */ ++ if (!err) { ++ iput_lowers_all(dentry->d_inode, false); ++ dput(unionfs_lower_dentry_idx(dentry, dstart)); ++ unionfs_set_lower_dentry_idx(dentry, dstart, NULL); ++ d_drop(dentry); ++ /* update our lower vfsmnts, in case a copyup took place */ ++ unionfs_postcopyup_setmnt(dentry); ++ unionfs_check_dentry(dentry); ++ unionfs_check_inode(dir); ++ } ++ ++ if (namelist) ++ free_rdstate(namelist); ++ ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} +diff --git a/fs/unionfs/whiteout.c b/fs/unionfs/whiteout.c +new file mode 100644 +index 0000000..582cef2 +--- /dev/null ++++ b/fs/unionfs/whiteout.c +@@ -0,0 +1,601 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* ++ * whiteout and opaque directory helpers ++ */ ++ ++/* What do we use for whiteouts. */ ++#define UNIONFS_WHPFX ".wh." ++#define UNIONFS_WHLEN 4 ++/* ++ * If a directory contains this file, then it is opaque. We start with the ++ * .wh. flag so that it is blocked by lookup. ++ */ ++#define UNIONFS_DIR_OPAQUE_NAME "__dir_opaque" ++#define UNIONFS_DIR_OPAQUE UNIONFS_WHPFX UNIONFS_DIR_OPAQUE_NAME ++ ++/* construct whiteout filename */ ++char *alloc_whname(const char *name, int len) ++{ ++ char *buf; ++ ++ buf = kmalloc(len + UNIONFS_WHLEN + 1, GFP_KERNEL); ++ if (unlikely(!buf)) ++ return ERR_PTR(-ENOMEM); ++ ++ strcpy(buf, UNIONFS_WHPFX); ++ strlcat(buf, name, len + UNIONFS_WHLEN + 1); ++ ++ return buf; ++} ++ ++/* ++ * XXX: this can be inline or CPP macro, but is here to keep all whiteout ++ * code in one place. ++ */ ++void unionfs_set_max_namelen(long *namelen) ++{ ++ *namelen -= UNIONFS_WHLEN; ++} ++ ++/* check if @namep is a whiteout, update @namep and @namelenp accordingly */ ++bool is_whiteout_name(char **namep, int *namelenp) ++{ ++ if (*namelenp > UNIONFS_WHLEN && ++ !strncmp(*namep, UNIONFS_WHPFX, UNIONFS_WHLEN)) { ++ *namep += UNIONFS_WHLEN; ++ *namelenp -= UNIONFS_WHLEN; ++ return true; ++ } ++ return false; ++} ++ ++/* is the filename valid == !(whiteout for a file or opaque dir marker) */ ++bool is_validname(const char *name) ++{ ++ if (!strncmp(name, UNIONFS_WHPFX, UNIONFS_WHLEN)) ++ return false; ++ if (!strncmp(name, UNIONFS_DIR_OPAQUE_NAME, ++ sizeof(UNIONFS_DIR_OPAQUE_NAME) - 1)) ++ return false; ++ return true; ++} ++ ++/* ++ * Look for a whiteout @name in @lower_parent directory. If error, return ++ * ERR_PTR. Caller must dput() the returned dentry if not an error. ++ * ++ * XXX: some callers can reuse the whname allocated buffer to avoid repeated ++ * free then re-malloc calls. Need to provide a different API for those ++ * callers. ++ */ ++struct dentry *lookup_whiteout(const char *name, struct dentry *lower_parent) ++{ ++ char *whname = NULL; ++ int err = 0, namelen; ++ struct dentry *wh_dentry = NULL; ++ ++ namelen = strlen(name); ++ whname = alloc_whname(name, namelen); ++ if (unlikely(IS_ERR(whname))) { ++ err = PTR_ERR(whname); ++ goto out; ++ } ++ ++ /* check if whiteout exists in this branch: lookup .wh.foo */ ++ wh_dentry = lookup_lck_len(whname, lower_parent, strlen(whname)); ++ if (IS_ERR(wh_dentry)) { ++ err = PTR_ERR(wh_dentry); ++ goto out; ++ } ++ ++ /* check if negative dentry (ENOENT) */ ++ if (!wh_dentry->d_inode) ++ goto out; ++ ++ /* whiteout found: check if valid type */ ++ if (!S_ISREG(wh_dentry->d_inode->i_mode)) { ++ printk(KERN_ERR "unionfs: invalid whiteout %s entry type %d\n", ++ whname, wh_dentry->d_inode->i_mode); ++ dput(wh_dentry); ++ err = -EIO; ++ goto out; ++ } ++ ++out: ++ kfree(whname); ++ if (err) ++ wh_dentry = ERR_PTR(err); ++ return wh_dentry; ++} ++ ++/* find and return first whiteout in parent directory, else ENOENT */ ++struct dentry *find_first_whiteout(struct dentry *dentry) ++{ ++ int bindex, bstart, bend; ++ struct dentry *parent, *lower_parent, *wh_dentry; ++ ++ parent = dget_parent(dentry); ++ ++ bstart = dbstart(parent); ++ bend = dbend(parent); ++ wh_dentry = ERR_PTR(-ENOENT); ++ ++ for (bindex = bstart; bindex <= bend; bindex++) { ++ lower_parent = unionfs_lower_dentry_idx(parent, bindex); ++ if (!lower_parent) ++ continue; ++ wh_dentry = lookup_whiteout(dentry->d_name.name, lower_parent); ++ if (IS_ERR(wh_dentry)) ++ continue; ++ if (wh_dentry->d_inode) ++ break; ++ dput(wh_dentry); ++ wh_dentry = ERR_PTR(-ENOENT); ++ } ++ ++ dput(parent); ++ ++ return wh_dentry; ++} ++ ++/* ++ * Unlink a whiteout dentry. Returns 0 or -errno. Caller must hold and ++ * release dentry reference. ++ */ ++int unlink_whiteout(struct dentry *wh_dentry) ++{ ++ int err; ++ struct dentry *lower_dir_dentry; ++ ++ /* dget and lock parent dentry */ ++ lower_dir_dentry = lock_parent_wh(wh_dentry); ++ ++ /* see Documentation/filesystems/unionfs/issues.txt */ ++ lockdep_off(); ++ err = vfs_unlink(lower_dir_dentry->d_inode, wh_dentry); ++ lockdep_on(); ++ unlock_dir(lower_dir_dentry); ++ ++ /* ++ * Whiteouts are special files and should be deleted no matter what ++ * (as if they never existed), in order to allow this create ++ * operation to succeed. This is especially important in sticky ++ * directories: a whiteout may have been created by one user, but ++ * the newly created file may be created by another user. ++ * Therefore, in order to maintain Unix semantics, if the vfs_unlink ++ * above failed, then we have to try to directly unlink the ++ * whiteout. Note: in the ODF version of unionfs, whiteout are ++ * handled much more cleanly. ++ */ ++ if (err == -EPERM) { ++ struct inode *inode = lower_dir_dentry->d_inode; ++ err = inode->i_op->unlink(inode, wh_dentry); ++ } ++ if (err) ++ printk(KERN_ERR "unionfs: could not unlink whiteout %s, " ++ "err = %d\n", wh_dentry->d_name.name, err); ++ ++ return err; ++ ++} ++ ++/* ++ * Helper function when creating new objects (create, symlink, mknod, etc.). ++ * Checks to see if there's a whiteout in @lower_dentry's parent directory, ++ * whose name is taken from @dentry. Then tries to remove that whiteout, if ++ * found. If is a branch marked readonly, return -EROFS. ++ * If it finds both a regular file and a whiteout, delete whiteout (this ++ * should never happen). ++ * ++ * Return 0 if no whiteout was found. Return 1 if one was found and ++ * successfully removed. Therefore a value >= 0 tells the caller that ++ * @lower_dentry belongs to a good branch to create the new object in). ++ * Return -ERRNO if an error occurred during whiteout lookup or in trying to ++ * unlink the whiteout. ++ */ ++int check_unlink_whiteout(struct dentry *dentry, struct dentry *lower_dentry, ++ int bindex) ++{ ++ int err; ++ struct dentry *wh_dentry = NULL; ++ struct dentry *lower_dir_dentry = NULL; ++ ++ /* look for whiteout dentry first */ ++ lower_dir_dentry = dget_parent(lower_dentry); ++ wh_dentry = lookup_whiteout(dentry->d_name.name, lower_dir_dentry); ++ dput(lower_dir_dentry); ++ if (IS_ERR(wh_dentry)) { ++ err = PTR_ERR(wh_dentry); ++ goto out; ++ } ++ ++ if (!wh_dentry->d_inode) { /* no whiteout exists*/ ++ err = 0; ++ goto out_dput; ++ } ++ ++ /* check if regular file and whiteout were both found */ ++ if (unlikely(lower_dentry->d_inode)) ++ printk(KERN_WARNING "unionfs: removing whiteout; regular " ++ "file exists in directory %s (branch %d)\n", ++ lower_dir_dentry->d_name.name, bindex); ++ ++ /* check if branch is writeable */ ++ err = is_robranch_super(dentry->d_sb, bindex); ++ if (err) ++ goto out_dput; ++ ++ /* .wh.foo has been found, so let's unlink it */ ++ err = unlink_whiteout(wh_dentry); ++ if (!err) ++ err = 1; /* a whiteout was found and successfully removed */ ++out_dput: ++ dput(wh_dentry); ++out: ++ return err; ++} ++ ++/* ++ * Pass an unionfs dentry and an index. It will try to create a whiteout ++ * for the filename in dentry, and will try in branch 'index'. On error, ++ * it will proceed to a branch to the left. ++ */ ++int create_whiteout(struct dentry *dentry, int start) ++{ ++ int bstart, bend, bindex; ++ struct dentry *lower_dir_dentry; ++ struct dentry *lower_dentry; ++ struct dentry *lower_wh_dentry; ++ struct nameidata nd; ++ char *name = NULL; ++ int err = -EINVAL; ++ ++ verify_locked(dentry); ++ ++ bstart = dbstart(dentry); ++ bend = dbend(dentry); ++ ++ /* create dentry's whiteout equivalent */ ++ name = alloc_whname(dentry->d_name.name, dentry->d_name.len); ++ if (unlikely(IS_ERR(name))) { ++ err = PTR_ERR(name); ++ goto out; ++ } ++ ++ for (bindex = start; bindex >= 0; bindex--) { ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ ++ if (!lower_dentry) { ++ /* ++ * if lower dentry is not present, create the ++ * entire lower dentry directory structure and go ++ * ahead. Since we want to just create whiteout, we ++ * only want the parent dentry, and hence get rid of ++ * this dentry. ++ */ ++ lower_dentry = create_parents(dentry->d_inode, ++ dentry, ++ dentry->d_name.name, ++ bindex); ++ if (!lower_dentry || IS_ERR(lower_dentry)) { ++ int ret = PTR_ERR(lower_dentry); ++ if (!IS_COPYUP_ERR(ret)) ++ printk(KERN_ERR ++ "unionfs: create_parents for " ++ "whiteout failed: bindex=%d " ++ "err=%d\n", bindex, ret); ++ continue; ++ } ++ } ++ ++ lower_wh_dentry = ++ lookup_lck_len(name, lower_dentry->d_parent, ++ dentry->d_name.len + UNIONFS_WHLEN); ++ if (IS_ERR(lower_wh_dentry)) ++ continue; ++ ++ /* ++ * The whiteout already exists. This used to be impossible, ++ * but now is possible because of opaqueness. ++ */ ++ if (lower_wh_dentry->d_inode) { ++ dput(lower_wh_dentry); ++ err = 0; ++ goto out; ++ } ++ ++ err = init_lower_nd(&nd, LOOKUP_CREATE); ++ if (unlikely(err < 0)) ++ goto out; ++ lower_dir_dentry = lock_parent_wh(lower_wh_dentry); ++ err = is_robranch_super(dentry->d_sb, bindex); ++ if (!err) ++ err = vfs_create(lower_dir_dentry->d_inode, ++ lower_wh_dentry, ++ current_umask() & S_IRUGO, ++ &nd); ++ unlock_dir(lower_dir_dentry); ++ dput(lower_wh_dentry); ++ release_lower_nd(&nd, err); ++ ++ if (!err || !IS_COPYUP_ERR(err)) ++ break; ++ } ++ ++ /* set dbopaque so that lookup will not proceed after this branch */ ++ if (!err) ++ dbopaque(dentry) = bindex; ++ ++out: ++ kfree(name); ++ return err; ++} ++ ++/* ++ * Delete all of the whiteouts in a given directory for rmdir. ++ * ++ * lower directory inode should be locked ++ */ ++static int do_delete_whiteouts(struct dentry *dentry, int bindex, ++ struct unionfs_dir_state *namelist) ++{ ++ int err = 0; ++ struct dentry *lower_dir_dentry = NULL; ++ struct dentry *lower_dentry; ++ char *name = NULL, *p; ++ struct inode *lower_dir; ++ int i; ++ struct list_head *pos; ++ struct filldir_node *cursor; ++ ++ /* Find out lower parent dentry */ ++ lower_dir_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ BUG_ON(!S_ISDIR(lower_dir_dentry->d_inode->i_mode)); ++ lower_dir = lower_dir_dentry->d_inode; ++ BUG_ON(!S_ISDIR(lower_dir->i_mode)); ++ ++ err = -ENOMEM; ++ name = __getname(); ++ if (unlikely(!name)) ++ goto out; ++ strcpy(name, UNIONFS_WHPFX); ++ p = name + UNIONFS_WHLEN; ++ ++ err = 0; ++ for (i = 0; !err && i < namelist->size; i++) { ++ list_for_each(pos, &namelist->list[i]) { ++ cursor = ++ list_entry(pos, struct filldir_node, ++ file_list); ++ /* Only operate on whiteouts in this branch. */ ++ if (cursor->bindex != bindex) ++ continue; ++ if (!cursor->whiteout) ++ continue; ++ ++ strlcpy(p, cursor->name, PATH_MAX - UNIONFS_WHLEN); ++ lower_dentry = ++ lookup_lck_len(name, lower_dir_dentry, ++ cursor->namelen + ++ UNIONFS_WHLEN); ++ if (IS_ERR(lower_dentry)) { ++ err = PTR_ERR(lower_dentry); ++ break; ++ } ++ if (lower_dentry->d_inode) ++ err = vfs_unlink(lower_dir, lower_dentry); ++ dput(lower_dentry); ++ if (err) ++ break; ++ } ++ } ++ ++ __putname(name); ++ ++ /* After all of the removals, we should copy the attributes once. */ ++ fsstack_copy_attr_times(dentry->d_inode, lower_dir_dentry->d_inode); ++ ++out: ++ return err; ++} ++ ++ ++void __delete_whiteouts(struct work_struct *work) ++{ ++ struct sioq_args *args = container_of(work, struct sioq_args, work); ++ struct deletewh_args *d = &args->deletewh; ++ ++ args->err = do_delete_whiteouts(d->dentry, d->bindex, d->namelist); ++ complete(&args->comp); ++} ++ ++/* delete whiteouts in a dir (for rmdir operation) using sioq if necessary */ ++int delete_whiteouts(struct dentry *dentry, int bindex, ++ struct unionfs_dir_state *namelist) ++{ ++ int err; ++ struct super_block *sb; ++ struct dentry *lower_dir_dentry; ++ struct inode *lower_dir; ++ struct sioq_args args; ++ ++ sb = dentry->d_sb; ++ ++ BUG_ON(!S_ISDIR(dentry->d_inode->i_mode)); ++ BUG_ON(bindex < dbstart(dentry)); ++ BUG_ON(bindex > dbend(dentry)); ++ err = is_robranch_super(sb, bindex); ++ if (err) ++ goto out; ++ ++ lower_dir_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ BUG_ON(!S_ISDIR(lower_dir_dentry->d_inode->i_mode)); ++ lower_dir = lower_dir_dentry->d_inode; ++ BUG_ON(!S_ISDIR(lower_dir->i_mode)); ++ ++ if (!inode_permission(lower_dir, MAY_WRITE | MAY_EXEC)) { ++ err = do_delete_whiteouts(dentry, bindex, namelist); ++ } else { ++ args.deletewh.namelist = namelist; ++ args.deletewh.dentry = dentry; ++ args.deletewh.bindex = bindex; ++ run_sioq(__delete_whiteouts, &args); ++ err = args.err; ++ } ++ ++out: ++ return err; ++} ++ ++/**************************************************************************** ++ * Opaque directory helpers * ++ ****************************************************************************/ ++ ++/* ++ * is_opaque_dir: returns 0 if it is NOT an opaque dir, 1 if it is, and ++ * -errno if an error occurred trying to figure this out. ++ */ ++int is_opaque_dir(struct dentry *dentry, int bindex) ++{ ++ int err = 0; ++ struct dentry *lower_dentry; ++ struct dentry *wh_lower_dentry; ++ struct inode *lower_inode; ++ struct sioq_args args; ++ struct nameidata lower_nd; ++ ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ lower_inode = lower_dentry->d_inode; ++ ++ BUG_ON(!S_ISDIR(lower_inode->i_mode)); ++ ++ mutex_lock(&lower_inode->i_mutex); ++ ++ if (!inode_permission(lower_inode, MAY_EXEC)) { ++ err = init_lower_nd(&lower_nd, LOOKUP_OPEN); ++ if (unlikely(err < 0)) { ++ mutex_unlock(&lower_inode->i_mutex); ++ goto out; ++ } ++ wh_lower_dentry = ++ lookup_one_len_nd(UNIONFS_DIR_OPAQUE, lower_dentry, ++ sizeof(UNIONFS_DIR_OPAQUE) - 1, ++ &lower_nd); ++ release_lower_nd(&lower_nd, err); ++ } else { ++ args.is_opaque.dentry = lower_dentry; ++ run_sioq(__is_opaque_dir, &args); ++ wh_lower_dentry = args.ret; ++ } ++ ++ mutex_unlock(&lower_inode->i_mutex); ++ ++ if (IS_ERR(wh_lower_dentry)) { ++ err = PTR_ERR(wh_lower_dentry); ++ goto out; ++ } ++ ++ /* This is an opaque dir iff wh_lower_dentry is positive */ ++ err = !!wh_lower_dentry->d_inode; ++ ++ dput(wh_lower_dentry); ++out: ++ return err; ++} ++ ++void __is_opaque_dir(struct work_struct *work) ++{ ++ struct sioq_args *args = container_of(work, struct sioq_args, work); ++ struct nameidata lower_nd; ++ int err; ++ ++ err = init_lower_nd(&lower_nd, LOOKUP_OPEN); ++ if (unlikely(err < 0)) ++ return; ++ args->ret = lookup_one_len_nd(UNIONFS_DIR_OPAQUE, ++ args->is_opaque.dentry, ++ sizeof(UNIONFS_DIR_OPAQUE) - 1, ++ &lower_nd); ++ release_lower_nd(&lower_nd, err); ++ complete(&args->comp); ++} ++ ++int make_dir_opaque(struct dentry *dentry, int bindex) ++{ ++ int err = 0; ++ struct dentry *lower_dentry, *diropq; ++ struct inode *lower_dir; ++ struct nameidata nd; ++ const struct cred *old_creds; ++ struct cred *new_creds; ++ ++ /* ++ * Opaque directory whiteout markers are special files (like regular ++ * whiteouts), and should appear to the users as if they don't ++ * exist. They should be created/deleted regardless of directory ++ * search/create permissions, but only for the duration of this ++ * creation of the .wh.__dir_opaque: file. Note, this does not ++ * circumvent normal ->permission). ++ */ ++ new_creds = prepare_creds(); ++ if (unlikely(!new_creds)) { ++ err = -ENOMEM; ++ goto out_err; ++ } ++ cap_raise(new_creds->cap_effective, CAP_DAC_READ_SEARCH); ++ cap_raise(new_creds->cap_effective, CAP_DAC_OVERRIDE); ++ old_creds = override_creds(new_creds); ++ ++ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex); ++ lower_dir = lower_dentry->d_inode; ++ BUG_ON(!S_ISDIR(dentry->d_inode->i_mode) || ++ !S_ISDIR(lower_dir->i_mode)); ++ ++ mutex_lock(&lower_dir->i_mutex); ++ err = init_lower_nd(&nd, LOOKUP_OPEN); ++ if (unlikely(err < 0)) ++ goto out; ++ diropq = lookup_one_len_nd(UNIONFS_DIR_OPAQUE, lower_dentry, ++ sizeof(UNIONFS_DIR_OPAQUE) - 1, &nd); ++ release_lower_nd(&nd, err); ++ if (IS_ERR(diropq)) { ++ err = PTR_ERR(diropq); ++ goto out; ++ } ++ ++ err = init_lower_nd(&nd, LOOKUP_CREATE); ++ if (unlikely(err < 0)) ++ goto out; ++ if (!diropq->d_inode) ++ err = vfs_create(lower_dir, diropq, S_IRUGO, &nd); ++ if (!err) ++ dbopaque(dentry) = bindex; ++ release_lower_nd(&nd, err); ++ ++ dput(diropq); ++ ++out: ++ mutex_unlock(&lower_dir->i_mutex); ++ revert_creds(old_creds); ++out_err: ++ return err; ++} +diff --git a/fs/unionfs/xattr.c b/fs/unionfs/xattr.c +new file mode 100644 +index 0000000..a93d803 +--- /dev/null ++++ b/fs/unionfs/xattr.c +@@ -0,0 +1,173 @@ ++/* ++ * Copyright (c) 2003-2011 Erez Zadok ++ * Copyright (c) 2003-2006 Charles P. Wright ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2005-2006 Junjiro Okajima ++ * Copyright (c) 2005 Arun M. Krishnakumar ++ * Copyright (c) 2004-2006 David P. Quigley ++ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair ++ * Copyright (c) 2003 Puja Gupta ++ * Copyright (c) 2003 Harikesavan Krishnan ++ * Copyright (c) 2003-2011 Stony Brook University ++ * Copyright (c) 2003-2011 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#include "union.h" ++ ++/* This is lifted from fs/xattr.c */ ++void *unionfs_xattr_alloc(size_t size, size_t limit) ++{ ++ void *ptr; ++ ++ if (size > limit) ++ return ERR_PTR(-E2BIG); ++ ++ if (!size) /* size request, no buffer is needed */ ++ return NULL; ++ ++ ptr = kmalloc(size, GFP_KERNEL); ++ if (unlikely(!ptr)) ++ return ERR_PTR(-ENOMEM); ++ return ptr; ++} ++ ++/* ++ * BKL held by caller. ++ * dentry->d_inode->i_mutex locked ++ */ ++ssize_t unionfs_getxattr(struct dentry *dentry, const char *name, void *value, ++ size_t size) ++{ ++ struct dentry *lower_dentry = NULL; ++ struct dentry *parent; ++ int err = -EOPNOTSUPP; ++ bool valid; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ ++ lower_dentry = unionfs_lower_dentry(dentry); ++ ++ err = vfs_getxattr(lower_dentry, (char *) name, value, size); ++ ++out: ++ unionfs_check_dentry(dentry); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++/* ++ * BKL held by caller. ++ * dentry->d_inode->i_mutex locked ++ */ ++int unionfs_setxattr(struct dentry *dentry, const char *name, ++ const void *value, size_t size, int flags) ++{ ++ struct dentry *lower_dentry = NULL; ++ struct dentry *parent; ++ int err = -EOPNOTSUPP; ++ bool valid; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ ++ lower_dentry = unionfs_lower_dentry(dentry); ++ ++ err = vfs_setxattr(lower_dentry, (char *) name, (void *) value, ++ size, flags); ++ ++out: ++ unionfs_check_dentry(dentry); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++/* ++ * BKL held by caller. ++ * dentry->d_inode->i_mutex locked ++ */ ++int unionfs_removexattr(struct dentry *dentry, const char *name) ++{ ++ struct dentry *lower_dentry = NULL; ++ struct dentry *parent; ++ int err = -EOPNOTSUPP; ++ bool valid; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ ++ lower_dentry = unionfs_lower_dentry(dentry); ++ ++ err = vfs_removexattr(lower_dentry, (char *) name); ++ ++out: ++ unionfs_check_dentry(dentry); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} ++ ++/* ++ * BKL held by caller. ++ * dentry->d_inode->i_mutex locked ++ */ ++ssize_t unionfs_listxattr(struct dentry *dentry, char *list, size_t size) ++{ ++ struct dentry *lower_dentry = NULL; ++ struct dentry *parent; ++ int err = -EOPNOTSUPP; ++ char *encoded_list = NULL; ++ bool valid; ++ ++ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD); ++ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT); ++ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD); ++ ++ valid = __unionfs_d_revalidate(dentry, parent, false); ++ if (unlikely(!valid)) { ++ err = -ESTALE; ++ goto out; ++ } ++ ++ lower_dentry = unionfs_lower_dentry(dentry); ++ ++ encoded_list = list; ++ err = vfs_listxattr(lower_dentry, encoded_list, size); ++ ++out: ++ unionfs_check_dentry(dentry); ++ unionfs_unlock_dentry(dentry); ++ unionfs_unlock_parent(dentry, parent); ++ unionfs_read_unlock(dentry->d_sb); ++ return err; ++} +diff --git a/include/linux/fs_stack.h b/include/linux/fs_stack.h +index da317c7..64f1ced 100644 +--- a/include/linux/fs_stack.h ++++ b/include/linux/fs_stack.h +@@ -1,7 +1,19 @@ ++/* ++ * Copyright (c) 2006-2009 Erez Zadok ++ * Copyright (c) 2006-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2006-2009 Stony Brook University ++ * Copyright (c) 2006-2009 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ + #ifndef _LINUX_FS_STACK_H + #define _LINUX_FS_STACK_H + +-/* This file defines generic functions used primarily by stackable ++/* ++ * This file defines generic functions used primarily by stackable + * filesystems; none of these functions require i_mutex to be held. + */ + +diff --git a/include/linux/magic.h b/include/linux/magic.h +index 1e5df2a..01ee54d 100644 +--- a/include/linux/magic.h ++++ b/include/linux/magic.h +@@ -50,6 +50,8 @@ + #define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs" + #define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs" + ++#define UNIONFS_SUPER_MAGIC 0xf15f083d ++ + #define SMB_SUPER_MAGIC 0x517B + #define USBDEVICE_SUPER_MAGIC 0x9fa2 + #define CGROUP_SUPER_MAGIC 0x27e0eb +diff --git a/include/linux/namei.h b/include/linux/namei.h +index eba45ea..8e19e9c 100644 +--- a/include/linux/namei.h ++++ b/include/linux/namei.h +@@ -81,8 +81,11 @@ extern int vfs_path_lookup(struct dentry *, struct vfsmount *, + + extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, + int (*open)(struct inode *, struct file *)); ++extern void release_open_intent(struct nameidata *); + + extern struct dentry *lookup_one_len(const char *, struct dentry *, int); ++extern struct dentry *lookup_one_len_nd(const char *, struct dentry *, int, ++ struct nameidata *nd); + + extern int follow_down_one(struct path *); + extern int follow_down(struct path *); +diff --git a/include/linux/splice.h b/include/linux/splice.h +index 997c3b4..54f5501 100644 +--- a/include/linux/splice.h ++++ b/include/linux/splice.h +@@ -81,6 +81,11 @@ extern ssize_t splice_to_pipe(struct pipe_inode_info *, + struct splice_pipe_desc *); + extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *, + splice_direct_actor *); ++extern long vfs_splice_from(struct pipe_inode_info *pipe, struct file *out, ++ loff_t *ppos, size_t len, unsigned int flags); ++extern long vfs_splice_to(struct file *in, loff_t *ppos, ++ struct pipe_inode_info *pipe, size_t len, ++ unsigned int flags); + + /* + * for dynamic pipe sizing +diff --git a/include/linux/union_fs.h b/include/linux/union_fs.h +new file mode 100644 +index 0000000..c84d97e +--- /dev/null ++++ b/include/linux/union_fs.h +@@ -0,0 +1,22 @@ ++/* ++ * Copyright (c) 2003-2009 Erez Zadok ++ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek ++ * Copyright (c) 2003-2009 Stony Brook University ++ * Copyright (c) 2003-2009 The Research Foundation of SUNY ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef _LINUX_UNION_FS_H ++#define _LINUX_UNION_FS_H ++ ++/* ++ * DEFINITIONS FOR USER AND KERNEL CODE: ++ */ ++# define UNIONFS_IOCTL_INCGEN _IOR(0x15, 11, int) ++# define UNIONFS_IOCTL_QUERYFILE _IOR(0x15, 15, int) ++ ++#endif /* _LINUX_UNIONFS_H */ ++ +diff --git a/security/security.c b/security/security.c +index 4ba6d4c..093d8b4 100644 +--- a/security/security.c ++++ b/security/security.c +@@ -520,6 +520,7 @@ int security_inode_permission(struct inode *inode, int mask) + return 0; + return security_ops->inode_permission(inode, mask, 0); + } ++EXPORT_SYMBOL(security_inode_permission); + + int security_inode_exec_permission(struct inode *inode, unsigned int flags) + { +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0030-omap-Change-omap_device-activate-latency-messages-fr.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0030-omap-Change-omap_device-activate-latency-messages-fr.patch new file mode 100644 index 0000000000..30010faa0c --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0030-omap-Change-omap_device-activate-latency-messages-fr.patch @@ -0,0 +1,34 @@ +From ab3ce8260342b568029c051c5e526526696a27f6 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Mon, 23 May 2011 12:16:50 -0700 +Subject: [PATCH 30/31] omap: Change omap_device activate latency messages from pr_warning to pr_debug + +Messages can be safely ignored, so reduce console noise + +Signed-off-by: Steve Sakoman +--- + arch/arm/plat-omap/omap_device.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c +index 9bbda9a..ca8a479 100644 +--- a/arch/arm/plat-omap/omap_device.c ++++ b/arch/arm/plat-omap/omap_device.c +@@ -145,12 +145,12 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat) + odpl->activate_lat_worst = act_lat; + if (odpl->flags & OMAP_DEVICE_LATENCY_AUTO_ADJUST) { + odpl->activate_lat = act_lat; +- pr_warning("omap_device: %s.%d: new worst case " ++ pr_debug("omap_device: %s.%d: new worst case " + "activate latency %d: %llu\n", + od->pdev.name, od->pdev.id, + od->pm_lat_level, act_lat); + } else +- pr_warning("omap_device: %s.%d: activate " ++ pr_debug("omap_device: %s.%d: activate " + "latency %d higher than exptected. " + "(%llu > %d)\n", + od->pdev.name, od->pdev.id, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-2.6.39/sakoman/0031-omap-overo-Add-opp-init.patch b/recipes/linux/linux-omap-2.6.39/sakoman/0031-omap-overo-Add-opp-init.patch new file mode 100644 index 0000000000..c50db1b33f --- /dev/null +++ b/recipes/linux/linux-omap-2.6.39/sakoman/0031-omap-overo-Add-opp-init.patch @@ -0,0 +1,105 @@ +From c79191ab97d2b006c59c7dce4bfcdce48d66ec03 Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Tue, 24 May 2011 20:36:07 -0700 +Subject: [PATCH 31/31] omap: overo: Add opp init + +omap: overo: Add opp init + +Work in progress + +Signed-off-by: Steve Sakoman +--- + arch/arm/mach-omap2/board-overo.c | 49 +++++++++++++++++++++++++++++++++++++ + 1 files changed, 49 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c +index 05dd3eb..8c2d21f 100644 +--- a/arch/arm/mach-omap2/board-overo.c ++++ b/arch/arm/mach-omap2/board-overo.c +@@ -25,6 +25,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -43,6 +44,7 @@ + + #include + #include ++#include + #include + #include + #include +@@ -54,6 +56,7 @@ + #include + + #include "mux.h" ++#include "pm.h" + #include "sdram-micron-mt46h32m32lf-6.h" + #include "hsmmc.h" + +@@ -755,6 +758,51 @@ static struct omap_musb_board_data musb_board_data = { + .power = 100, + }; + ++static void __init overo_opp_init(void) ++{ ++ int r = 0; ++ ++ /* Initialize the omap3 opp table */ ++ if (omap3_opp_init()) { ++ pr_err("%s: opp default init failed\n", __func__); ++ return; ++ } ++ ++ /* Custom OPP enabled for 36/3730 */ ++ if (cpu_is_omap3630()) { ++ struct omap_hwmod *mh = omap_hwmod_lookup("mpu"); ++ struct omap_hwmod *dh = omap_hwmod_lookup("iva"); ++ struct device *dev; ++ ++ if (!mh || !dh) { ++ pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", ++ __func__, mh, dh); ++ return; ++ } ++ /* Enable MPU 1GHz and lower opps */ ++ dev = &mh->od->pdev.dev; ++ r = opp_enable(dev, 1000000000); ++ ++ /* Enable IVA 800MHz and lower opps */ ++ dev = &dh->od->pdev.dev; ++ r |= opp_enable(dev, 800000000); ++ ++ if (r) { ++ pr_err("%s: failed to enable higher opp %d\n", ++ __func__, r); ++ /* ++ * Cleanup - disable the higher freqs - we dont care ++ * about the results ++ */ ++ dev = &mh->od->pdev.dev; ++ opp_disable(dev, 1000000000); ++ dev = &dh->od->pdev.dev; ++ opp_disable(dev, 800000000); ++ } ++ } ++ return; ++} ++ + static void __init overo_init(void) + { + omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); +@@ -770,6 +818,7 @@ static void __init overo_init(void) + overo_display_init(); + overo_init_led(); + overo_init_keys(); ++ overo_opp_init(); + + /* Ensure SDRC pins are mux'd for self-refresh */ + omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0001-ARM-6329-1-wire-up-sys_accept4-on-ARM.patch b/recipes/linux/linux-omap-psp-2.6.32/0001-ARM-6329-1-wire-up-sys_accept4-on-ARM.patch new file mode 100644 index 0000000000..b3ecd26bbc --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0001-ARM-6329-1-wire-up-sys_accept4-on-ARM.patch @@ -0,0 +1,52 @@ +From 830a10cfbddd372569288ad8287a143f90243607 Mon Sep 17 00:00:00 2001 +From: Mikael Pettersson +Date: Sun, 15 Aug 2010 10:47:23 +0100 +Subject: [PATCH] ARM: 6329/1: wire up sys_accept4() on ARM + +sys_accept4() was added in kernel 2.6.28, but ARM was not updated +to include it. The number and types of parameters is such that +no ARM-specific processing is needed, so wiring up sys_accept4() +just requires defining __NR_accept4 and adding a direct call in +the syscall entry table. + +Tested with an EABI 2.6.35 kernel and Ulrich Drepper's original +accept4() test program, modified to define __NR_accept4 for ARM. + +Using the updated unistd.h also eliminates a warning then building +glibc (2.10.2 and newer) about accept4() being unimplemented. + +Signed-off-by: Mikael Pettersson +Signed-off-by: Russell King +--- + arch/arm/include/asm/unistd.h | 2 ++ + arch/arm/kernel/calls.S | 1 + + 2 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/include/asm/unistd.h b/arch/arm/include/asm/unistd.h +index 4e506d0..8f32b6b 100644 +--- a/arch/arm/include/asm/unistd.h ++++ b/arch/arm/include/asm/unistd.h +@@ -391,6 +391,8 @@ + #define __NR_pwritev (__NR_SYSCALL_BASE+362) + #define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE+363) + #define __NR_perf_event_open (__NR_SYSCALL_BASE+364) ++#define __NR_recvmmsg (__NR_SYSCALL_BASE+365) ++#define __NR_accept4 (__NR_SYSCALL_BASE+366) + + /* + * The following SWIs are ARM private. +diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S +index 9314a2d..1dff6a0 100644 +--- a/arch/arm/kernel/calls.S ++++ b/arch/arm/kernel/calls.S +@@ -375,6 +375,7 @@ + CALL(sys_rt_tgsigqueueinfo) + CALL(sys_perf_event_open) + /* 365 */ CALL(sys_recvmmsg) ++ CALL(sys_accept4) + #ifndef syscalls_counted + .equ syscalls_padding, ((NR_syscalls + 3) & ~3) - NR_syscalls + #define syscalls_counted +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/0046-ARM-OMAP-beagle-disable-uart-timeout.patch b/recipes/linux/linux-omap-psp-2.6.32/0046-ARM-OMAP-beagle-disable-uart-timeout.patch new file mode 100644 index 0000000000..b0c0d0b891 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0046-ARM-OMAP-beagle-disable-uart-timeout.patch @@ -0,0 +1,21 @@ +commit 06a8d6478752403a617ed9fb9f6b78c31ad25020 +Author: Joel A Fernandes +Date: Tue Jun 21 17:31:13 2011 -0500 + + omap: Disable UART sleep timeout to avoid serial port problems on wakeup. + + Signed-off-by: Joel A Fernandes + +diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c +index 19805a7..35a24af 100644 +--- a/arch/arm/mach-omap2/serial.c ++++ b/arch/arm/mach-omap2/serial.c +@@ -36,7 +36,7 @@ + #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 + #define UART_OMAP_WER 0x17 /* Wake-up enable register */ + +-#define DEFAULT_TIMEOUT (5 * HZ) ++#define DEFAULT_TIMEOUT 0 + + struct omap_uart_state { + int num; diff --git a/recipes/linux/linux-omap-psp-2.6.32/0047-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch b/recipes/linux/linux-omap-psp-2.6.32/0047-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch new file mode 100644 index 0000000000..8cd314c6fb --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/0047-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch @@ -0,0 +1,33 @@ +From bd0b2f97c48aa6aac0c6a494f1c6ba5af5de486b Mon Sep 17 00:00:00 2001 +From: Steve Sakoman +Date: Mon, 18 Jul 2011 23:13:41 -0500 +Subject: [PATCH] omap_hsmmc: Set dto to max value of 14 to avoid SD Card timeouts + +This fixes MMC errors due to timeouts on certain SD Cards following suggestions +to set dto to 14 by Jason Kridner and Steven Kipisz + +Details of the issue: +http://talk.maemo.org/showthread.php?p=1000707#post1000707 + +This fix was originally proposed by Sukumar Ghoral of TI. +--- + drivers/mmc/host/omap_hsmmc.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c +index 9646a75..7443647 100644 +--- a/drivers/mmc/host/omap_hsmmc.c ++++ b/drivers/mmc/host/omap_hsmmc.c +@@ -1049,6 +1049,9 @@ static void set_data_timeout(struct omap_hsmmc_host *host, + dto = 14; + } + ++ /* Set dto to max value of 14 to avoid SD Card timeouts */ ++ dto = 14; ++ + reg &= ~DTO_MASK; + reg |= dto << DTO_SHIFT; + OMAP_HSMMC_WRITE(host->base, SYSCTL, reg); +-- +1.7.0.4 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0001-omap-Beagle-revision-detection.patch b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0001-omap-Beagle-revision-detection.patch new file mode 100644 index 0000000000..f29c9a6d1c --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0001-omap-Beagle-revision-detection.patch @@ -0,0 +1,135 @@ +From 325afc09116e11e28265b648ef33d8c0306c61f1 Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Thu, 23 Sep 2010 18:22:47 -0700 +Subject: [PATCH 01/10] omap: Beagle: revision detection + +Due to the omap3530 ES3.0 Silicon being used on both the +B5/B6 and C1/2/3 Beagle we can't use the cpu_is_omap34xx() +routines to differentiate the Beagle Boards. + +However gpio pins 171,172,173 where setup for this prupose, so +lets use them. + +Changes: +for older U-Boot's, use omap_mux_init_gpio() +keep Beagle Rev in board-omap3beagle.c +gpio_free on gpio request failure + +Tested on Beagle Revisions: B5, C2, C4, and xMA + +Signed-off-by: Robert Nelson +Acked-by: Jarkko Nikula +Signed-off-by: Tony Lindgren +--- + arch/arm/mach-omap2/board-omap3beagle.c | 88 +++++++++++++++++++++++++++++++ + 1 files changed, 88 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 2677b41..7ca2b3b 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -175,6 +175,93 @@ static void __init omap3beagle_ks8851_init(void) + static inline void __init omap3beagle_ks8851_init(void) { return; } + #endif + ++/* ++ * OMAP3 Beagle revision ++ * Run time detection of Beagle revision is done by reading GPIO. ++ * GPIO ID - ++ * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1 ++ * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0 ++ * C4 = GPIO173, GPIO172, GPIO171: 1 0 1 ++ * XM = GPIO173, GPIO172, GPIO171: 0 0 0 ++ */ ++enum { ++ OMAP3BEAGLE_BOARD_UNKN = 0, ++ OMAP3BEAGLE_BOARD_AXBX, ++ OMAP3BEAGLE_BOARD_C1_3, ++ OMAP3BEAGLE_BOARD_C4, ++ OMAP3BEAGLE_BOARD_XM, ++}; ++ ++static u8 omap3_beagle_version; ++ ++static u8 omap3_beagle_get_rev(void) ++{ ++ return omap3_beagle_version; ++} ++ ++static void __init omap3_beagle_init_rev(void) ++{ ++ int ret; ++ u16 beagle_rev = 0; ++ ++ omap_mux_init_gpio(171, OMAP_PIN_INPUT_PULLUP); ++ omap_mux_init_gpio(172, OMAP_PIN_INPUT_PULLUP); ++ omap_mux_init_gpio(173, OMAP_PIN_INPUT_PULLUP); ++ ++ ret = gpio_request(171, "rev_id_0"); ++ if (ret < 0) ++ goto fail0; ++ ++ ret = gpio_request(172, "rev_id_1"); ++ if (ret < 0) ++ goto fail1; ++ ++ ret = gpio_request(173, "rev_id_2"); ++ if (ret < 0) ++ goto fail2; ++ ++ gpio_direction_input(171); ++ gpio_direction_input(172); ++ gpio_direction_input(173); ++ ++ beagle_rev = gpio_get_value(171) | (gpio_get_value(172) << 1) ++ | (gpio_get_value(173) << 2); ++ ++ switch (beagle_rev) { ++ case 7: ++ printk(KERN_INFO "OMAP3 Beagle Rev: Ax/Bx\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_AXBX; ++ break; ++ case 6: ++ printk(KERN_INFO "OMAP3 Beagle Rev: C1/C2/C3\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_C1_3; ++ break; ++ case 5: ++ printk(KERN_INFO "OMAP3 Beagle Rev: C4\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_C4; ++ break; ++ case 0: ++ printk(KERN_INFO "OMAP3 Beagle Rev: xM\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; ++ break; ++ default: ++ printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN; ++ } ++ ++ return; ++ ++fail2: ++ gpio_free(172); ++fail1: ++ gpio_free(171); ++fail0: ++ printk(KERN_ERR "Unable to get revision detection GPIO pins\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN; ++ ++ return; ++} ++ + static struct mtd_partition omap3beagle_nand_partitions[] = { + /* All the partition sizes are listed in terms of NAND block size */ + { +@@ -853,6 +940,7 @@ static int __init cameraboard_setup(char *str) + static void __init omap3_beagle_init(void) + { + omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); ++ omap3_beagle_init_rev(); + omap3_beagle_i2c_init(); + + if (cpu_is_omap3630()) { +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0002-omap-Beagle-only-Cx-boards-use-pin-23-for-write-prot.patch b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0002-omap-Beagle-only-Cx-boards-use-pin-23-for-write-prot.patch new file mode 100644 index 0000000000..f8512867ee --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0002-omap-Beagle-only-Cx-boards-use-pin-23-for-write-prot.patch @@ -0,0 +1,35 @@ +From 34d88746a9aa4aedb67e32579e559cbeb91de20f Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Thu, 23 Sep 2010 18:22:48 -0700 +Subject: [PATCH 02/10] omap: Beagle: only Cx boards use pin 23 for write protect + +system_rev comes from u-boot and is a constant 0x20, so +Bx boards also fall in this 'if' and will get setup with the +wrong gpio_wp pin. Switch to using the Beagle revision routine +to correcly set pin 23 only for C1/2/3 and C4 Boards. Bx boards +will then use the correct default pin setting. + +Signed-off-by: Robert Nelson +Acked-by: Jarkko Nikula +Signed-off-by: Tony Lindgren +--- + arch/arm/mach-omap2/board-omap3beagle.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 7ca2b3b..beb877c 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -444,7 +444,8 @@ static struct gpio_led gpio_leds[]; + static int beagle_twl_gpio_setup(struct device *dev, + unsigned gpio, unsigned ngpio) + { +- if (system_rev >= 0x20 && system_rev <= 0x34301000) { ++ if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || ++ (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) { + omap_mux_init_gpio(23, OMAP_PIN_INPUT); + mmc[0].gpio_wp = 23; + } else { +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0003-omap-Beagle-no-gpio_wp-pin-connection-on-xM.patch b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0003-omap-Beagle-no-gpio_wp-pin-connection-on-xM.patch new file mode 100644 index 0000000000..d7d3fefed4 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0003-omap-Beagle-no-gpio_wp-pin-connection-on-xM.patch @@ -0,0 +1,33 @@ +From 037ef3add42d61dcd86438dc4b9378f154caa426 Mon Sep 17 00:00:00 2001 +From: Robert Nelson +Date: Thu, 23 Sep 2010 18:22:48 -0700 +Subject: [PATCH 03/10] omap: Beagle: no gpio_wp pin connection on xM + +The omap3630 based BeagleBoard xM uses a MicroSD card slot with +no write protection. + +Signed-off-by: Robert Nelson +Acked-by: Jarkko Nikula +Signed-off-by: Tony Lindgren +--- + arch/arm/mach-omap2/board-omap3beagle.c | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index beb877c..247a426 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -444,7 +444,9 @@ static struct gpio_led gpio_leds[]; + static int beagle_twl_gpio_setup(struct device *dev, + unsigned gpio, unsigned ngpio) + { +- if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ mmc[0].gpio_wp = -EINVAL; ++ } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || + (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) { + omap_mux_init_gpio(23, OMAP_PIN_INPUT); + mmc[0].gpio_wp = 23; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0004-omap3-beaglexm-fix-EHCI-power-up-GPIO-dir.patch b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0004-omap3-beaglexm-fix-EHCI-power-up-GPIO-dir.patch new file mode 100644 index 0000000000..e646d3ebae --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0004-omap3-beaglexm-fix-EHCI-power-up-GPIO-dir.patch @@ -0,0 +1,42 @@ +From 62db06de896c221cfa2231a53a933d6b3e81d66d Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Tue, 11 Jan 2011 17:13:35 +0000 +Subject: [PATCH 04/10] omap3: beaglexm: fix EHCI power up GPIO dir + +EHCI enable power pin is inverted (active high) in comparison +to vanilla beagle which is active low. Handle this case conditionally. + +Without this fix, Beagle XM 4 port EHCI will not function and no +networking will be available + +[nm@ti.com: split up, added descriptive changelogs] +Signed-off-by: Nishanth Menon +Signed-off-by: Koen Kooi +Signed-off-by: Tony Lindgren +--- + arch/arm/mach-omap2/board-omap3beagle.c | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 247a426..7cfa2c8 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -487,6 +487,15 @@ static int beagle_twl_gpio_setup(struct device *dev, + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); + } + ++ /* ++ * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active ++ * high / others active low) ++ */ ++ gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ++ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); ++ else ++ gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); + + /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ + gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0005-omap3-beaglexm-fix-DVI-reset-GPIO.patch b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0005-omap3-beaglexm-fix-DVI-reset-GPIO.patch new file mode 100644 index 0000000000..6e6ab41b36 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0005-omap3-beaglexm-fix-DVI-reset-GPIO.patch @@ -0,0 +1,48 @@ +From 3d93d0b8974c867db70cb4a8681615113ac6113d Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Tue, 11 Jan 2011 17:13:36 +0000 +Subject: [PATCH 05/10] omap3: beaglexm: fix DVI reset GPIO + +GPIO reset line for Beagle XM is different from vanilla beagle +so we populate it as part of gpio update routine. + +This in part fixes the issue of display not functioning on beagle XM +platform. + +[nm@ti.com: split up, added descriptive changelogs] +Signed-off-by: Nishanth Menon +Signed-off-by: Koen Kooi +Signed-off-by: Tony Lindgren +--- + arch/arm/mach-omap2/board-omap3beagle.c | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 7cfa2c8..939de5a 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -336,7 +336,7 @@ static struct omap_dss_device beagle_dvi_device = { + .name = "dvi", + .driver_name = "generic_panel", + .phy.dpi.data_lines = 24, +- .reset_gpio = 170, ++ .reset_gpio = -EINVAL, + .platform_enable = beagle_enable_dvi, + .platform_disable = beagle_disable_dvi, + }; +@@ -497,6 +497,12 @@ static int beagle_twl_gpio_setup(struct device *dev, + else + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); + ++ /* DVI reset GPIO is different between beagle revisions */ ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ++ beagle_dvi_device.reset_gpio = 129; ++ else ++ beagle_dvi_device.reset_gpio = 170; ++ + /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ + gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0006-omap3-beaglexm-fix-power-on-of-DVI.patch b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0006-omap3-beaglexm-fix-power-on-of-DVI.patch new file mode 100644 index 0000000000..ba74284b90 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0006-omap3-beaglexm-fix-power-on-of-DVI.patch @@ -0,0 +1,92 @@ +From 7ad849e3d54d897614a74ad225392bd243e07d2e Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 12 Jan 2011 00:23:29 +0000 +Subject: [PATCH 06/10] omap3: beaglexm: fix power on of DVI + +TFP410 DVI chip is used to provide display out. +This chip is controlled by 2 lines: +LDO which supplies the power is controlled over gpio + 2 +and the enable of the chip itself is done over gpio + 1 +NOTE: the LDO is necessary for LED, serial blocks as well. + +gpio + 1 was used to sense USB overcurrent in vanilla beagle. + +Without this fix, the display would not function as the LDO +remains shut down. + +[nm@ti.com: split up, added descriptive changelogs] +Signed-off-by: Nishanth Menon +Signed-off-by: Koen Kooi +Signed-off-by: Tony Lindgren +--- + arch/arm/mach-omap2/board-omap3beagle.c | 40 +++++++++++++++++++++++++++++++ + 1 files changed, 40 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 939de5a..9880c5c 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -444,6 +444,8 @@ static struct gpio_led gpio_leds[]; + static int beagle_twl_gpio_setup(struct device *dev, + unsigned gpio, unsigned ngpio) + { ++ int r; ++ + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { + mmc[0].gpio_wp = -EINVAL; + } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || +@@ -465,6 +467,17 @@ static int beagle_twl_gpio_setup(struct device *dev, + * power switch and overcurrent detect + */ + ++ if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) { ++ r = gpio_request(gpio + 1, "EHCI_nOC"); ++ if (!r) { ++ r = gpio_direction_input(gpio + 1); ++ if (r) ++ gpio_free(gpio + 1); ++ } ++ if (r) ++ pr_err("%s: unable to configure EHCI_nOC\n", __func__); ++ } ++ + if (cpu_is_omap3630()) { + /* Power on DVI, Serial and PWR led */ + gpio_request(gpio + 1, "nDVI_PWR_EN"); +@@ -506,6 +519,33 @@ static int beagle_twl_gpio_setup(struct device *dev, + /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ + gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; + ++ /* ++ * gpio + 1 on Xm controls the TFP410's enable line (active low) ++ * gpio + 2 control varies depending on the board rev as follows: ++ * P7/P8 revisions(prototype): Camera EN ++ * A2+ revisions (production): LDO (supplies DVI, serial, led blocks) ++ */ ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ r = gpio_request(gpio + 1, "nDVI_PWR_EN"); ++ if (!r) { ++ r = gpio_direction_output(gpio + 1, 0); ++ if (r) ++ gpio_free(gpio + 1); ++ } ++ if (r) ++ pr_err("%s: unable to configure nDVI_PWR_EN\n", ++ __func__); ++ r = gpio_request(gpio + 2, "DVI_LDO_EN"); ++ if (!r) { ++ r = gpio_direction_output(gpio + 2, 1); ++ if (r) ++ gpio_free(gpio + 2); ++ } ++ if (r) ++ pr_err("%s: unable to configure DVI_LDO_EN\n", ++ __func__); ++ } ++ + return 0; + } + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0007-beagleboard-hack-in-support-from-xM-rev-C.patch b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0007-beagleboard-hack-in-support-from-xM-rev-C.patch new file mode 100644 index 0000000000..0181f15208 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0007-beagleboard-hack-in-support-from-xM-rev-C.patch @@ -0,0 +1,61 @@ +From b241e679f550f38062923eb7800a5c57a41fe95d Mon Sep 17 00:00:00 2001 +From: Jason Kridner +Date: Thu, 10 Mar 2011 13:15:38 +0100 +Subject: [PATCH 07/10] beagleboard: hack in support from xM rev C + +Based on patch by Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle.c | 20 ++++++++++++++++---- + 1 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 9880c5c..4bde54b 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -182,7 +182,9 @@ static inline void __init omap3beagle_ks8851_init(void) { return; } + * AXBX = GPIO173, GPIO172, GPIO171: 1 1 1 + * C1_3 = GPIO173, GPIO172, GPIO171: 1 1 0 + * C4 = GPIO173, GPIO172, GPIO171: 1 0 1 +- * XM = GPIO173, GPIO172, GPIO171: 0 0 0 ++ * XMA = GPIO173, GPIO172, GPIO171: 0 0 0 ++ * XMB = GPIO173, GPIO172, GPIO171: 0 0 1 ++ * XMC = GPIO173, GPIO172, GPIO171: 0 1 0 + */ + enum { + OMAP3BEAGLE_BOARD_UNKN = 0, +@@ -190,6 +192,7 @@ enum { + OMAP3BEAGLE_BOARD_C1_3, + OMAP3BEAGLE_BOARD_C4, + OMAP3BEAGLE_BOARD_XM, ++ OMAP3BEAGLE_BOARD_XMC, + }; + + static u8 omap3_beagle_version; +@@ -241,12 +244,21 @@ static void __init omap3_beagle_init_rev(void) + omap3_beagle_version = OMAP3BEAGLE_BOARD_C4; + break; + case 0: +- printk(KERN_INFO "OMAP3 Beagle Rev: xM\n"); ++ printk(KERN_INFO "OMAP3 Beagle Rev: xM A\n"); + omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; + break; ++ case 1: ++ printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; ++ break; ++ case 2: ++ printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n"); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; ++ break; + default: +- printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd\n", beagle_rev); +- omap3_beagle_version = OMAP3BEAGLE_BOARD_UNKN; ++ printk(KERN_INFO "OMAP3 Beagle Rev: unknown %hd, " ++ "assuming xM C or newer\n", beagle_rev); ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMC; + } + + return; +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0008-omap3-beagle-cleaned-up-board-revision-conditions.patch b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0008-omap3-beagle-cleaned-up-board-revision-conditions.patch new file mode 100644 index 0000000000..fb91cb6f28 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard-xmc/0008-omap3-beagle-cleaned-up-board-revision-conditions.patch @@ -0,0 +1,153 @@ +From 8bd3ffb5755c49aaffecb20b9bd43f955ac26251 Mon Sep 17 00:00:00 2001 +From: Jason Kridner +Date: Wed, 16 Mar 2011 09:21:06 -0500 +Subject: [PATCH 08/10] omap3: beagle: cleaned up board revision conditions + +--- + arch/arm/mach-omap2/board-omap3beagle.c | 70 ++++++++++++++----------------- + 1 files changed, 32 insertions(+), 38 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 4bde54b..664a9c6 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -191,7 +191,7 @@ enum { + OMAP3BEAGLE_BOARD_AXBX, + OMAP3BEAGLE_BOARD_C1_3, + OMAP3BEAGLE_BOARD_C4, +- OMAP3BEAGLE_BOARD_XM, ++ OMAP3BEAGLE_BOARD_XMAB, + OMAP3BEAGLE_BOARD_XMC, + }; + +@@ -245,11 +245,11 @@ static void __init omap3_beagle_init_rev(void) + break; + case 0: + printk(KERN_INFO "OMAP3 Beagle Rev: xM A\n"); +- omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMAB; + break; + case 1: + printk(KERN_INFO "OMAP3 Beagle Rev: xM B\n"); +- omap3_beagle_version = OMAP3BEAGLE_BOARD_XM; ++ omap3_beagle_version = OMAP3BEAGLE_BOARD_XMAB; + break; + case 2: + printk(KERN_INFO "OMAP3 Beagle Rev: xM C\n"); +@@ -458,13 +458,18 @@ static int beagle_twl_gpio_setup(struct device *dev, + { + int r; + +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ switch(omap3_beagle_get_rev()) ++ { ++ case OMAP3BEAGLE_BOARD_XMAB: ++ case OMAP3BEAGLE_BOARD_XMC: + mmc[0].gpio_wp = -EINVAL; +- } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || +- (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C4)) { ++ break; ++ case OMAP3BEAGLE_BOARD_C1_3: ++ case OMAP3BEAGLE_BOARD_C4: + omap_mux_init_gpio(23, OMAP_PIN_INPUT); + mmc[0].gpio_wp = 23; +- } else { ++ break; ++ default: + omap_mux_init_gpio(29, OMAP_PIN_INPUT); + } + /* gpio + 0 is "mmc0_cd" (input/IRQ) */ +@@ -479,7 +484,8 @@ static int beagle_twl_gpio_setup(struct device *dev, + * power switch and overcurrent detect + */ + +- if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) { ++ if ((omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMAB) && ++ (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XMC)) { + r = gpio_request(gpio + 1, "EHCI_nOC"); + if (!r) { + r = gpio_direction_input(gpio + 1); +@@ -490,54 +496,41 @@ static int beagle_twl_gpio_setup(struct device *dev, + pr_err("%s: unable to configure EHCI_nOC\n", __func__); + } + +- if (cpu_is_omap3630()) { +- /* Power on DVI, Serial and PWR led */ +- gpio_request(gpio + 1, "nDVI_PWR_EN"); +- gpio_direction_output(gpio + 1, 0); +- +- /* Power on camera interface */ +- gpio_request(gpio + 2, "CAM_EN"); +- gpio_direction_output(gpio + 2, 1); +- +- /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ +- gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); +- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); +- } +- else { +- gpio_request(gpio + 1, "EHCI_nOC"); +- gpio_direction_input(gpio + 1); +- +- /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ +- gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); +- gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); +- } +- + /* +- * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active ++ * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, xM Ax/Bx active + * high / others active low) + */ + gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) ++ if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMAB) + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); + else + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); + + /* DVI reset GPIO is different between beagle revisions */ +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) +- beagle_dvi_device.reset_gpio = 129; +- else ++ switch(omap3_beagle_get_rev()) ++ { ++ case OMAP3BEAGLE_BOARD_AXBX: ++ case OMAP3BEAGLE_BOARD_C1_3: ++ case OMAP3BEAGLE_BOARD_C4: + beagle_dvi_device.reset_gpio = 170; ++ break; ++ case OMAP3BEAGLE_BOARD_XMAB: ++ case OMAP3BEAGLE_BOARD_XMC: ++ default: ++ beagle_dvi_device.reset_gpio = 129; ++ } + + /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ + gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; + + /* +- * gpio + 1 on Xm controls the TFP410's enable line (active low) ++ * gpio + 1 on xM controls the TFP410's enable line (active low) + * gpio + 2 control varies depending on the board rev as follows: + * P7/P8 revisions(prototype): Camera EN + * A2+ revisions (production): LDO (supplies DVI, serial, led blocks) + */ +- if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { ++ if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMAB) || ++ (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) { + r = gpio_request(gpio + 1, "nDVI_PWR_EN"); + if (!r) { + r = gpio_direction_output(gpio + 1, 0); +@@ -1013,7 +1006,8 @@ static void __init omap3_beagle_init(void) + omap3_beagle_init_rev(); + omap3_beagle_i2c_init(); + +- if (cpu_is_omap3630()) { ++ if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMAB) || ++ (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XMC)) { + gpio_buttons[0].gpio = 4; + } + +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig b/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig index eff98b4ac3..2abbd1a7cb 100644 --- a/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig +++ b/recipes/linux/linux-omap-psp-2.6.32/beagleboard/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.32 -# Wed Jul 21 12:01:38 2010 +# Sun May 1 17:33:44 2011 # CONFIG_ARM=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y @@ -85,7 +85,7 @@ CONFIG_KALLSYMS=y CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y -# CONFIG_ELF_CORE is not set +CONFIG_ELF_CORE=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y @@ -269,6 +269,7 @@ CONFIG_MACH_OMAP3_BEAGLE=y # CONFIG_MACH_OVERO is not set # CONFIG_MACH_OMAP3EVM is not set # CONFIG_MACH_OMAP3517EVM is not set +# CONFIG_MACH_CRANEBOARD is not set # CONFIG_MACH_OMAP3_PANDORA is not set # CONFIG_MACH_OMAP3_TOUCHBOOK is not set # CONFIG_MACH_OMAP_3430SDP is not set @@ -380,9 +381,9 @@ CONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_DEBUG=y CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_FREQ_STAT_DETAILS=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y @@ -390,7 +391,9 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y -# CONFIG_CPU_IDLE is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y # # Floating point emulation @@ -407,6 +410,7 @@ CONFIG_NEON=y # Userspace binary formats # CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_HAVE_AOUT=y CONFIG_BINFMT_AOUT=m CONFIG_BINFMT_MISC=y @@ -1617,6 +1621,7 @@ CONFIG_MFD_CORE=y # CONFIG_TPS65010 is not set CONFIG_TWL4030_CORE=y CONFIG_TWL4030_POWER=y +# CONFIG_TPS65910_CORE is not set CONFIG_TWL4030_CODEC=y # CONFIG_TWL4030_MADC is not set # CONFIG_MFD_TMIO is not set @@ -1791,7 +1796,18 @@ CONFIG_VIDEO_OMAP3=y CONFIG_VIDEO_OMAP3_ISP=y CONFIG_VIDEO_OMAP34XX_ISP_PREVIEWER=y CONFIG_VIDEO_OMAP34XX_ISP_RESIZER=y -# CONFIG_SOC_CAMERA is not set +CONFIG_SOC_CAMERA=y +# CONFIG_SOC_CAMERA_MT9M001 is not set +# CONFIG_SOC_CAMERA_MT9M111 is not set +CONFIG_SOC_CAMERA_MT9P031=m +# CONFIG_SOC_CAMERA_MT9T031 is not set +# CONFIG_SOC_CAMERA_MT9V022 is not set +# CONFIG_SOC_CAMERA_RJ54N1 is not set +# CONFIG_SOC_CAMERA_TW9910 is not set +# CONFIG_SOC_CAMERA_PLATFORM is not set +# CONFIG_SOC_CAMERA_OV772X is not set +# CONFIG_SOC_CAMERA_OV9640 is not set +# CONFIG_VIDEO_SH_MOBILE_CEU is not set CONFIG_V4L_USB_DRIVERS=y CONFIG_USB_VIDEO_CLASS=m CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y @@ -3021,6 +3037,11 @@ CONFIG_CRYPTO_LZO=y # CONFIG_CRYPTO_ANSI_CPRNG=m CONFIG_CRYPTO_HW=y + +# +# OCF Configuration +# +# CONFIG_OCF_OCF is not set CONFIG_BINARY_PRINTF=y # @@ -3048,6 +3069,3 @@ CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT=y CONFIG_HAS_DMA=y CONFIG_NLATTR=y -CONFIG_ELF_CORE=y -# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set - diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/5m03/0001-mt9p031-import-driver-from-https-github.com-Aptina-B.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/5m03/0001-mt9p031-import-driver-from-https-github.com-Aptina-B.patch new file mode 100644 index 0000000000..ee728b9d59 --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/5m03/0001-mt9p031-import-driver-from-https-github.com-Aptina-B.patch @@ -0,0 +1,1547 @@ +From eefcf5de4689fbd00119d7a7df75244ca6ca1187 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Sun, 1 May 2011 16:40:54 +0200 +Subject: [PATCH 1/2] mt9p031: import driver from https://github.com/Aptina/BeagleBoard-xM/tree/master/Angstrom/MT9P031 + +Signed-off-by: Koen Kooi +--- + drivers/media/video/Kconfig | 6 + + drivers/media/video/Makefile | 1 + + drivers/media/video/mt9p031.c | 1445 +++++++++++++++++++++++++++++++++++++++ + include/media/mt9p031.h | 30 + + include/media/v4l2-chip-ident.h | 1 + + 5 files changed, 1483 insertions(+), 0 deletions(-) + create mode 100644 drivers/media/video/mt9p031.c + create mode 100644 include/media/mt9p031.h + +diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig +index 4c1fb0f..59f1133 100644 +--- a/drivers/media/video/Kconfig ++++ b/drivers/media/video/Kconfig +@@ -832,6 +832,12 @@ config SOC_CAMERA_MT9M111 + help + This driver supports MT9M111 and MT9M112 cameras from Micron + ++config SOC_CAMERA_MT9P031 ++ tristate "mt9p031 support" ++ depends on SOC_CAMERA && I2C ++ help ++ This driver supports MT9P031 cameras from Micron. ++ + config SOC_CAMERA_MT9T031 + tristate "mt9t031 support" + depends on SOC_CAMERA && I2C +diff --git a/drivers/media/video/Makefile b/drivers/media/video/Makefile +index fb7e46c..f3110e7 100644 +--- a/drivers/media/video/Makefile ++++ b/drivers/media/video/Makefile +@@ -79,6 +79,7 @@ obj-$(CONFIG_VIDEO_MT9V113) += mt9v113.o + + obj-$(CONFIG_SOC_CAMERA_MT9M001) += mt9m001.o + obj-$(CONFIG_SOC_CAMERA_MT9M111) += mt9m111.o ++obj-$(CONFIG_SOC_CAMERA_MT9P031) += mt9p031.o + obj-$(CONFIG_SOC_CAMERA_MT9T031) += mt9t031.o + obj-$(CONFIG_SOC_CAMERA_MT9V022) += mt9v022.o + obj-$(CONFIG_SOC_CAMERA_OV772X) += ov772x.o +diff --git a/drivers/media/video/mt9p031.c b/drivers/media/video/mt9p031.c +new file mode 100644 +index 0000000..3047e43 +--- /dev/null ++++ b/drivers/media/video/mt9p031.c +@@ -0,0 +1,1445 @@ ++/* ++ * drivers/media/video/mt9p031.c ++ * ++ * Aptina mt9p031 sensor driver ++ * ++ * ++ * Copyright (C) 2010 Aptina Imaging ++ * ++ * ++ * Leverage mt9p012.c ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ * ++ */ ++ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include ++#include ++#include ++ ++#define MT9P031_DEBUG ++ ++#ifdef MT9P031_DEBUG ++#define DPRINTK_DRIVER(format, ...) \ ++ printk(KERN_INFO "_MT9P031_DRIVER: " format, ## __VA_ARGS__) ++#else ++#define DPRINTK_DRIVER(format, ...) ++#endif ++/************************************************************************ ++ macro ++************************************************************************/ ++// Macro to configure I2c level shifter. Use only for MT9P031 Headboards from Aptina; not required for Leopard Imaging or elsewise. ++#define MT9P031_HEADBOARD ++ ++#define MT9P031_CHIP_ID 0x1801 ++#define MT9P031_MAX_HEIGHT 1944 ++#define MT9P031_MAX_WIDTH 2592 ++#define MT9P031_MIN_HEIGHT 2 ++#define MT9P031_MIN_WIDTH 2 ++ ++#define VGA_HEIGHT 480 ++#define VGA_WIDTH 640 ++ ++#define MT9P031_NORMAL_OPERATION_MODE (0x1F82) //write ++#define MT9P031_OUTPUT_CTRL_CHIP_UNSELECT (0x1F80) ++#define MT9P031_OUTPUT_CTRL_HALT (0x1F83) ++ ++/* FPS Capabilities */ ++#define MT9P031_MIN_FPS 10 ++#define MT9P031_DEF_FPS 30 ++#define MT9P031_MAX_FPS 50 ++ ++#define MT9P031_XCLK_NOM_1 12000000 ++#define MT9P031_XCLK_NOM_2 24000000 ++ ++/* Analog gain values */ ++#define MT9P031_EV_MIN_GAIN 0 ++#define MT9P031_EV_MAX_GAIN 47 ++#define MT9P031_EV_DEF_GAIN 24 ++#define MT9P031_EV_GAIN_STEP 1 ++ ++/* Exposure time values */ ++#define MT9P031_MIN_EXPOSURE 15000 ++#define MT9P031_MAX_EXPOSURE 128000 ++#define MT9P031_DEF_EXPOSURE 33000 ++#define MT9P031_EXPOSURE_STEP 100 ++#define Q12 4096 ++/************************************************************************ ++ Register Address ++************************************************************************/ ++ ++#define REG_MT9P031_CHIP_VERSION 0x00 ++#define REG_MT9P031_ROWSTART 0x01 ++#define REG_MT9P031_COLSTART 0x02 ++#define REG_MT9P031_HEIGHT 0x03 ++#define REG_MT9P031_WIDTH 0x04 ++#define REG_MT9P031_HBLANK 0x05 ++#define REG_MT9P031_VBLANK 0x06 ++#define REG_MT9P031_OUT_CTRL 0x07 ++#define REG_MT9P031_SHUTTER_WIDTH_U 0x08 ++#define REG_MT9P031_SHUTTER_WIDTH_L 0x09 ++#define REG_MT9P031_PCLK_CTRL 0x0a ++#define REG_MT9P031_RESTART 0x0b ++#define REG_MT9P031_SHUTTER_DELAY 0x0c ++#define REG_MT9P031_RESET 0x0d ++ ++#define REG_MT9P031_PLL_CTRL 0x10 ++#define REG_MT9P031_PLL_CONF1 0x11 ++#define REG_MT9P031_PLL_CONF2 0x12 ++ ++#define REG_MT9P031_READ_MODE1 0x1e ++#define REG_MT9P031_READ_MODE2 0x20 ++#define REG_MT9P031_ROW_ADDR_MODE 0x22 ++#define REG_MT9P031_COL_ADDR_MODE 0x23 ++#define REG_MT9P031_GREEN_1_GAIN 0x2b ++#define REG_MT9P031_BLUE_GAIN 0x2c ++#define REG_MT9P031_RED_GAIN 0x2d ++#define REG_MT9P031_GREEN_2_GAIN 0x2e ++#define REG_MT9P031_GLOBAL_GAIN 0x35 ++#define REG_MT9P031_CHIP_VERSION_ALT 0x0FF ++ ++/************************************************************************ ++ struct ++************************************************************************/ ++struct mt9p031_frame_size { ++ u16 width; ++ u16 height; ++}; ++ ++struct mt9p031_priv { ++ struct mt9p031_platform_data *pdata; ++ struct v4l2_int_device *v4l2_int_device; ++ struct i2c_client *client; ++ struct v4l2_pix_format pix; ++ struct v4l2_fract timeperframe; ++ unsigned long xclk_current; ++ int fps; ++ int scaler; ++ int ver; ++ int model; ++ u32 flags; ++/* for flags */ ++#define INIT_DONE (1<<0) ++}; ++ ++struct mt9p031_priv sysPriv; ++ ++static const struct v4l2_fmtdesc mt9p031_formats[] = { ++ { ++ .description = "Bayer (sRGB) 10 bit", ++ .pixelformat = V4L2_PIX_FMT_SRGGB10, ++ }, ++}; ++ ++static const unsigned int mt9p031_num_formats = ARRAY_SIZE(mt9p031_formats); ++ ++/***********************Minimum Horizontal blanking*********************/ ++int hb_min[4][4] = { ++ { 450, 430, 0, 420 }, ++ { 796, 776, 0, 766 }, ++ { 0, 0, 0, 0 }, ++ { 1488, 1468, 0, 1458 }, ++}; ++ ++/**************************supported sizes******************************/ ++const static struct mt9p031_frame_size mt9p031_sizes[] = { ++ { 640, 480 }, ++ { 1280, 720 }, ++ { 1920, 1080 }, ++ { 2048, 1536 }, //3MP ++ { 2592, 1944 }, //5MP ++}; ++ ++ ++struct mt9p031_format_params { ++ int width; ++ int height; ++ int row_start; ++ int col_start; ++ int row_size; ++ int col_size; ++ int hblank; ++ int vblank; ++ int integ_time; ++ int row_addr_mode; ++ int col_addr_mode; ++ int read_mode_2_config; ++ int shutter_width_hi; ++ int shutter_delay; ++ int row_bin; ++ int col_bin; ++}; ++ ++enum mt9p031_image_size { ++ VGA_BIN_30FPS, ++ HDV_720P_30FPS, ++ //HDV_720P_60FPS, ++ //HDV_720P_60FPS_LVB, ++ HDV_1080P_30FPS, ++ MT9P031_THREE_MP, ++ MT9P031_FIVE_MP, ++}; ++ ++enum mt9p031_image_size mt9p031_current_format; ++ ++const struct mt9p031_format_params mt9p031_supported_formats[] = { ++ { 640, 480, 64, 24, 1919, 2559, 0, 0, 0x0296, 0x0033, 0x0033, 0x0060, 0, 0, 3, 3 }, // VGA_BIN_30FPS ++ { 1280, 720, 64, 24, 1439, 2559, 0, 0, 0x0296, 0x0011, 0x0011, 0x0060, 0, 0, 1, 1 }, // 720P_HD_30FPS ++ //{ 1280, 720, 0x0040, 0x0018, 0x059F, 0x09FF, 0, 0, 0x0296, 0x0011, 0x0011, 0x0060, 0, 0, 1, 1 }, // 720P_HD_60FPS ++ //{ 1280, 720, 0x0040, 0x0018, 0x059F, 0x09FF, 0, 0x02D0, 0x0296, 0x0011, 0x0011, 0x0060, 0, 0, 1, 1 }, // 720P_HD_60FPS_LVB ++ { 1920, 1080, 431, 335, 1079, 1919, 0, 0x0037, 0x01AC, 0, 0, 0x0040, 0, 0, 0, 0 }, // 1080P_30FPS ++ { 2048, 1536, 431, 335, 1535, 2047, 0, 0x0037, 0x01AC, 0, 0, 0x0040, 0, 0, 0, 0 }, // 3MP CAPTURE ++ { 2592, 1944, 431, 335, 1943, 2591, 0, 0x0037, 0x01AC, 0, 0, 0x0040, 0, 0, 0, 0 }, // 5MP CAPTURE ++}; ++ ++ ++const struct v4l2_fract mt9p031_frameintervals[] = { ++ { .numerator = 1, .denominator = 10 }, ++ { .numerator = 1, .denominator = 20 }, ++ { .numerator = 1, .denominator = 30 }, ++ { .numerator = 1, .denominator = 40 }, ++ { .numerator = 1, .denominator = 50 }, ++}; ++ ++ ++const u16 MT9P031_EV_GAIN_TBL[48] = { ++ /* Gain x1 */ ++ 8, 9, 10, 11, 12, 13, 14, 15, ++ /* Gain x2 */ ++ 16, 17, 18, 19, 20, 21, 22, 23, ++ /* Gain x3 */ ++ 24, 25, 26, 27, 28, 29, 30, 31, ++ /* Gain x4 */ ++ 32, 33, 34, 35, ++ /* Gain x5 */ ++ 81, 82, 83, ++ /* Gain x6 */ ++ 84, 85, 86, 87, 88, 89, 90, 91, ++ /* Gain x7 */ ++ 92, 93, 94, 95, 96, 97, 98, 99, ++ /* Gain x8 */ ++ 100, ++}; ++ ++#ifdef MT9P031_HEADBOARD ++/** ++ * mt9p031_config_PCA9543A - configure on-board I2c level-shifter PCA9543A of MT9P031 Headboards from Aptina ++ * @client: pointer to i2c client ++ * Configures the level shifter to enable channel 0 ++ */ ++static int mt9p031_config_PCA9543A(const struct i2c_client *client) ++{ ++ struct i2c_msg msg; ++ int ret; ++ u8 buf; ++ buf = 0x21; ++ ++ msg.addr = (0xE6 >> 1); //slave address of PCA9543A ++ msg.flags = 0; ++ msg.len = 1; ++ msg.buf = &buf; ++ ++ ret = i2c_transfer(client->adapter, &msg, 1); ++ ++ return 0; ++ ++} ++#endif //MT9P031_HEADBOARD ++ ++/** ++ * mt9p031_reg_read - read resgiter value ++ * @client: pointer to i2c client ++ * @command: register address ++ */ ++static int mt9p031_reg_read(const struct i2c_client *client, u16 command, u16 *val) ++{ ++ struct i2c_msg msg[2]; ++ u8 buf[2]; ++ int ret; ++ ++ // 8-bit/ byte addressable register ++ buf[0] = command & 0xff; ++ ++ msg[0].addr = client->addr; ++ msg[0].flags = 0; ++ msg[0].len = 1; ++ msg[0].buf = buf ; ++ ret = i2c_transfer(client->adapter, &msg[0], 1); ++ ++ if(ret >= 0) { ++ msg[1].addr = client->addr; ++ msg[1].flags = I2C_M_RD; //1 ++ msg[1].len = 2; ++ msg[1].buf = buf; ++ ret = i2c_transfer(client->adapter, &msg[1], 1); ++ } ++ /* ++ * if return value of this function is < 0, ++ * it mean error. ++ * else, under 16bit is valid data. ++ */ ++ if(ret >= 0) { ++ *val = 0; ++ *val = buf[1] + (buf[0] << 8); ++ return 0; ++ } ++ ++ v4l_err(client, "read from offset 0x%x error %d", command, ret); ++ return ret; ++} ++ ++/** ++ * mt9p031_reg_write - read resgiter value ++ * @client: pointer to i2c client ++ * @command: register address ++ * @data: value to be written ++ */ ++static int mt9p031_reg_write(const struct i2c_client *client, ++ u16 command, u16 data) ++{ ++ struct i2c_msg msg; ++ u8 buf[3]; ++ int ret; ++ ++ // 8-bit/ byte addressable register ++ ++ buf[0] = command & 0xff; ++ data = swab16(data); ++ memcpy(buf + 1, &data, 2); ++ ++ msg.addr = client->addr; ++ msg.flags = 0; ++ msg.len = 3; ++ msg.buf = buf; ++ ++ /* ++ * i2c_transfer return message length, ++ * but this function should return 0 if correct case ++ */ ++ ret = i2c_transfer(client->adapter, &msg, 1); ++ if (ret >= 0) ++ ret = 0; ++ ++ return ret; ++} ++ ++/** ++ * struct vcontrol - Video controls ++ * @v4l2_queryctrl: V4L2 VIDIOC_QUERYCTRL ioctl structure ++ * @current_value: current value of this control ++ */ ++static struct vcontrol { ++ struct v4l2_queryctrl qc; ++ int current_value; ++} mt9p031_video_control[] = { ++ { ++ { ++ .id = V4L2_CID_EXPOSURE, ++ .type = V4L2_CTRL_TYPE_INTEGER, ++ .name = "Exposure", ++ .minimum = MT9P031_MIN_EXPOSURE, ++ .maximum = MT9P031_MAX_EXPOSURE, ++ .step = MT9P031_EXPOSURE_STEP, ++ .default_value = MT9P031_DEF_EXPOSURE, ++ }, ++ .current_value = MT9P031_DEF_EXPOSURE, ++ }, ++ { ++ { ++ .id = V4L2_CID_GAIN, ++ .type = V4L2_CTRL_TYPE_INTEGER, ++ .name = "Analog Gain", ++ .minimum = MT9P031_EV_MIN_GAIN, ++ .maximum = MT9P031_EV_MAX_GAIN, ++ .step = MT9P031_EV_GAIN_STEP, ++ .default_value = MT9P031_EV_DEF_GAIN, ++ }, ++ .current_value = MT9P031_EV_DEF_GAIN, ++ }, ++}; ++ ++/** ++ * find_vctrl - Finds the requested ID in the video control structure array ++ * @id: ID of control to search the video control array for ++ * ++ * Returns the index of the requested ID from the control structure array ++ */ ++static int ++find_vctrl(int id) ++{ ++ int i; ++ ++ if (id < V4L2_CID_BASE) ++ return -EDOM; ++ ++ for (i = (ARRAY_SIZE(mt9p031_video_control) - 1); i >= 0; i--) ++ if (mt9p031_video_control[i].qc.id == id) ++ break; ++ if (i < 0) ++ i = -EINVAL; ++ return i; ++} ++ ++/** ++ * mt9p031_calc_size - Find the best match for a requested image capture size ++ * @width: requested image width in pixels ++ * @height: requested image height in pixels ++ * ++ * Find the best match for a requested image capture size. The best match ++ * is chosen as the nearest match that has the same number or fewer pixels ++ * as the requested size, or the smallest image size if the requested size ++ * has fewer pixels than the smallest image. ++ */ ++static enum mt9p031_image_size mt9p031_calc_size(unsigned int width, ++ unsigned int height) ++{ ++ enum mt9p031_image_size isize; ++ unsigned long pixels = width * height; ++ ++ for (isize = VGA_BIN_30FPS; isize <= MT9P031_FIVE_MP; isize++) { ++ if (mt9p031_sizes[isize].height * ++ mt9p031_sizes[isize].width >= pixels) { ++ ++ return isize; ++ } ++ } ++ ++ return MT9P031_FIVE_MP; ++} ++ ++/** ++ * mt9p031_find_isize - Find the best match for a requested image capture size ++ * @width: requested image width in pixels ++ * @height: requested image height in pixels ++ * ++ * Find the best match for a requested image capture size. The best match ++ * is chosen as the nearest match that has the same number or fewer pixels ++ * as the requested size, or the smallest image size if the requested size ++ * has fewer pixels than the smallest image. ++ */ ++static enum mt9p031_image_size mt9p031_find_isize(unsigned int width) ++{ ++ enum mt9p031_image_size isize; ++ ++ for (isize = VGA_BIN_30FPS; isize <= MT9P031_FIVE_MP; isize++) { ++ if (mt9p031_sizes[isize].width >= width) ++ break; ++ } ++ ++ return isize; ++} ++ ++/** ++ * mt9p031_calc_xclk - Calculate the required xclk frequency ++ * @c: i2c client driver structure ++ * ++ * Given the image capture format in pix, the nominal frame period in ++ * timeperframe, calculate and return the required xclk frequency ++ */ ++static unsigned long mt9p031_calc_xclk(struct i2c_client *c) ++{ ++ struct mt9p031_priv *priv = i2c_get_clientdata(c); ++ struct v4l2_fract *timeperframe = &priv->timeperframe; ++ ++ if (timeperframe->numerator == 0 || ++ timeperframe->denominator == 0) { ++ /* supply a default nominal_timeperframe */ ++ timeperframe->numerator = 1; ++ timeperframe->denominator = MT9P031_DEF_FPS; ++ } ++ ++ priv->fps = timeperframe->denominator / timeperframe->numerator; ++ if (priv->fps < MT9P031_MIN_FPS) ++ priv->fps = MT9P031_MIN_FPS; ++ else if (priv->fps > MT9P031_MAX_FPS) ++ priv->fps = MT9P031_MAX_FPS; ++ ++ timeperframe->numerator = 1; ++ timeperframe->denominator = priv->fps; ++ ++ return MT9P031_XCLK_NOM_1; ++} ++ ++/** ++ * mt9p031_set_params - sets register settings according to resolution ++ * @client: pointer to standard i2c client ++ * @width: width as queried by ioctl ++ * @height: height as queried by ioctl ++ */ ++static int mt9p031_set_params(struct i2c_client *client, u32 width, u32 height) ++{ ++ struct mt9p031_priv *priv = i2c_get_clientdata(client); ++ struct v4l2_pix_format *pix = &priv->pix; ++ int ret; ++ enum mt9p031_image_size i; ++ ++ i = mt9p031_find_isize(pix->width); ++ priv->pix.width = mt9p031_supported_formats[i].width; ++ priv->pix.height = mt9p031_supported_formats[i].height; ++ ++ ret = mt9p031_reg_write(client, REG_MT9P031_ROWSTART, mt9p031_supported_formats[i].row_start); //ROW_WINDOW_START_REG ++ ret |= mt9p031_reg_write(client, REG_MT9P031_COLSTART, mt9p031_supported_formats[i].col_start); //COL_WINDOW_START_REG ++ ret |= mt9p031_reg_write(client, REG_MT9P031_HEIGHT, mt9p031_supported_formats[i].row_size); //ROW_WINDOW_SIZE_REG=1439 ++ ret |= mt9p031_reg_write(client, REG_MT9P031_WIDTH, mt9p031_supported_formats[i].col_size); //COL_WINDOW_SIZE_REG=2559 ++ ret |= mt9p031_reg_write(client, REG_MT9P031_HBLANK, mt9p031_supported_formats[i].hblank); //HORZ_BLANK=0 ++ ret |= mt9p031_reg_write(client, REG_MT9P031_VBLANK, mt9p031_supported_formats[i].vblank); //VERT_BLANK_REG=720 ++ ret |= mt9p031_reg_write(client, REG_MT9P031_SHUTTER_WIDTH_L, 0x0400); //SHUTTER_WIDTH_LOW (INTEG_TIME_REG = 1024) ++ ret |= mt9p031_reg_write(client, REG_MT9P031_ROW_ADDR_MODE, mt9p031_supported_formats[i].row_addr_mode); //ROW_MODE, ROW_SKIP=1, ROW_BIN=1 ++ ret |= mt9p031_reg_write(client, REG_MT9P031_COL_ADDR_MODE, mt9p031_supported_formats[i].col_addr_mode); //COL_MODE, COL_SKIP=1, COL_BIN=1 ++ ret |= mt9p031_reg_write(client, REG_MT9P031_READ_MODE2, mt9p031_supported_formats[i].read_mode_2_config); //READ_MODE_2, COL_SUM ++ ret |= mt9p031_reg_write(client, REG_MT9P031_SHUTTER_WIDTH_U, mt9p031_supported_formats[i].shutter_width_hi); //SHUTTER_WIDTH_HI ++ ret |= mt9p031_reg_write(client, REG_MT9P031_SHUTTER_WIDTH_L, mt9p031_supported_formats[i].integ_time); //SHUTTER_WIDTH_LOW (INTEG_TIME_REG) ++ ret |= mt9p031_reg_write(client, REG_MT9P031_SHUTTER_DELAY, mt9p031_supported_formats[i].shutter_delay); //SHUTTER_DELAY_REG ++ ++ return ret; ++} ++ ++/** ++ * mt9p031_init_camera - initialize camera settings ++ * @client: pointer to i2c client ++ * Initialize camera settings ++ */ ++static int mt9p031_init_camera(const struct i2c_client *client) ++{ ++ int ret; ++ struct mt9p031_priv *priv = i2c_get_clientdata(client); ++ struct v4l2_pix_format *pix = &priv->pix; ++ ++ ret = mt9p031_reg_write(client, REG_MT9P031_PLL_CTRL, 0x0051); //PLL_CTRL; power up pll ++ ret |= mt9p031_reg_write(client, REG_MT9P031_PLL_CONF1, 0x1801); //PLL_CONFIG_1: m=24, n=1 ++ ret |= mt9p031_reg_write(client, REG_MT9P031_PLL_CONF2, 0x0002); //PLL_CONFIG_2: p1=2, p2=0 ++ mdelay(10); //wait 10 ms for VCO to lock ++ ret |= mt9p031_reg_write(client, REG_MT9P031_PLL_CTRL, 0x0053); //PLL_CONTROL; use PLL ++ mdelay(200); ++ ++ ret |= mt9p031_set_params(priv->client, pix->width, pix->height); ++ ++ ret |= mt9p031_reg_write(client, REG_MT9P031_RESET, 0x0001); //High ++ ret |= mt9p031_reg_write(client, REG_MT9P031_RESET, 0x0000); //Low ++ mdelay(100); ++ ++ ret |= mt9p031_reg_write(client, REG_MT9P031_GREEN_1_GAIN, 0x0051); //Green1_gain_reg ++ ret |= mt9p031_reg_write(client, REG_MT9P031_BLUE_GAIN, 0x0051); //Blue_gain_reg ++ ret |= mt9p031_reg_write(client, REG_MT9P031_RED_GAIN, 0x0051); //Red_gain_reg ++ ret |= mt9p031_reg_write(client, REG_MT9P031_GREEN_2_GAIN, 0x0051); //Green2_gain_reg ++ ret |= mt9p031_reg_write(client, REG_MT9P031_GLOBAL_GAIN, 0x0008); //Analog Gain ++ ret |= mt9p031_reg_write(client, REG_MT9P031_READ_MODE1, 0x0006); //Read_mode_1 //disable AB ++ ret |= mt9p031_reg_write(client, REG_MT9P031_OUT_CTRL, 0x1F8E); //Enable parll fifo data ++ ++ return ret>= 0 ? 0 : -EIO; ++} ++ ++/************************************************************************ ++ i2c driver ++************************************************************************/ ++/** ++ * mt9p031_detect - Detect if an mt9p031 is present, and if so which revision ++ * @client: pointer to the i2c client driver structure ++ * ++ * Returns a negative error number if no device is detected ++ */ ++static int mt9p031_detect(struct i2c_client *client) ++{ ++ struct mt9p031_priv *priv = i2c_get_clientdata(client); ++ const char *devname; ++ u16 chipid; ++ ++ if (!client) ++ return -ENODEV; ++ /* ++ * Set Normal Mode ++ */ ++ if(mt9p031_reg_write(client, REG_MT9P031_OUT_CTRL, MT9P031_NORMAL_OPERATION_MODE)) ++ return -ENODEV; ++ /* ++ * check and show chip ID ++ */ ++ if(mt9p031_reg_read(client, REG_MT9P031_CHIP_VERSION, &chipid)) ++ return -ENODEV; ++ ++ if(chipid == MT9P031_CHIP_ID) { ++ devname = "mt9p031"; ++ priv->model = V4L2_IDENT_MT9P031; ++ dev_info(&client->dev, "%s chip ID %04x\n", devname, chipid); ++ return 0; ++ } ++ ++ dev_err(&client->dev, "Product ID error %04x\n", chipid); ++ return -ENODEV; ++} ++ ++/** ++ * mt9p031_set_exposure_time - sets exposure time per input value ++ * @exp_time: exposure time to be set on device ++ * @client: pointer to standard i2c client ++ * @lvc: pointer to V4L2 exposure entry in video_controls array ++ * ++ * If the requested exposure time is within the allowed limits, the HW ++ * is configured to use the new exposure time, and the video_controls ++ * array is updated with the new current value. ++ * The function returns 0 upon success. Otherwise an error code is ++ * returned. ++ */ ++static int mt9p031_set_exposure_time(u32 exp_time, struct i2c_client *client, ++ struct vcontrol *lvc) ++{ ++ int ret = 0, i, shutter_width, so_p, t_pix_clk, sd_p, shutter_delay; ++ int sw_l ,sw_u ,W ,h_blanking, t_row; ++ ++ if(exp_time < MT9P031_MIN_EXPOSURE) ++ exp_time = MT9P031_MIN_EXPOSURE; ++ else if(exp_time > MT9P031_MAX_EXPOSURE) ++ exp_time = MT9P031_MAX_EXPOSURE; ++ ++ shutter_delay = mt9p031_supported_formats[mt9p031_current_format].shutter_delay; ++ sd_p = min(shutter_delay + 1, 1504); ++ so_p = 208 * (mt9p031_supported_formats[mt9p031_current_format].row_bin + 1) + 98 + sd_p - 94; ++ t_pix_clk = (Q12/96 ); ++ h_blanking = mt9p031_supported_formats[mt9p031_current_format].hblank + 1; ++ W = 2 * (int)((mt9p031_supported_formats[mt9p031_current_format].row_size + 1) / (2 * (mt9p031_supported_formats[mt9p031_current_format].row_bin + 1)) + 1); ++ t_row = 2 * t_pix_clk * max(W/2 + max(h_blanking, hb_min[mt9p031_supported_formats[mt9p031_current_format].row_bin][mt9p031_supported_formats[mt9p031_current_format].col_bin]), ++ (41 + 346 * (mt9p031_supported_formats[mt9p031_current_format].row_bin + 1) + 99))/Q12; ++ ++ shutter_width = (exp_time + 2*so_p*t_pix_clk) / t_row; ++ ++ if (shutter_width< 3) { ++ sd_p = 1232 > shutter_delay ? 1232 : shutter_delay; ++ so_p = 208 * (mt9p031_supported_formats[mt9p031_current_format].row_bin + 1) + 98 + sd_p - 94; ++ shutter_width = ((exp_time*Q12 + 2*so_p*t_pix_clk) / (t_row * Q12)); ++ } ++ ++ if (shutter_width < 1) ++ shutter_width = 1; ++ sw_l = shutter_width& 0xffff; ++ sw_u = (shutter_width)>> 16; ++ ret = mt9p031_reg_write(client, REG_MT9P031_SHUTTER_WIDTH_L,sw_l); ++ mdelay(1); ++ ret = mt9p031_reg_write(client, REG_MT9P031_SHUTTER_WIDTH_U,sw_u); ++ ++ if (ret) ++ dev_err(&client->dev, "Error setting exposure time %d\n", ++ ret); ++ else{ ++ i = find_vctrl(V4L2_CID_EXPOSURE); ++ if (i >= 0) { ++ lvc = &mt9p031_video_control[i]; ++ lvc->current_value = exp_time; ++ } ++ } ++ ++ return ret; ++} ++ ++/** ++ * mt9p031_set_gain - sets sensor analog gain per input value ++ * @lineargain: analog gain value index to be set on device ++ * @client: pointer to standard i2c client ++ * @lvc: pointer to V4L2 analog gain entry in video_controls array ++ * ++ * If the requested analog gain is within the allowed limits, the HW ++ * is configured to use the new gain value, and the video_controls ++ * array is updated with the new current value. ++ * The function returns 0 upon success. Otherwise an error code is ++ * returned. ++ */ ++int mt9p031_set_gain(u16 lineargain, struct i2c_client *client, ++ struct vcontrol *lvc) ++{ ++ int ret= 0, i; ++ u16 reg_gain = 0; ++ ++ if (lineargain < MT9P031_EV_MIN_GAIN) { ++ lineargain = MT9P031_EV_MIN_GAIN; ++ v4l_err(client, "Gain out of legal range."); ++ } ++ if (lineargain > MT9P031_EV_MAX_GAIN) { ++ lineargain = MT9P031_EV_MAX_GAIN; ++ v4l_err(client, "Gain out of legal range."); ++ } ++ ++ reg_gain = MT9P031_EV_GAIN_TBL[lineargain]; ++ ret = mt9p031_reg_write(client, REG_MT9P031_GLOBAL_GAIN, ++ reg_gain); ++ ++ if (ret) { ++ dev_err(&client->dev, "Error setting gain.%d", ret); ++ return ret; ++ } ++ else { ++ i = find_vctrl(V4L2_CID_GAIN); ++ if (i >= 0) { ++ lvc = &mt9p031_video_control[i]; ++ lvc->current_value = lineargain; ++ } ++ } ++ ++ return ret; ++} ++ ++/************************************************************************ ++ v4l2_ioctls ++************************************************************************/ ++ ++/** ++ * mt9p031_v4l2_int_s_power - V4L2 sensor interface handler for vidioc_int_s_power_num ++ * @s: pointer to standard V4L2 device structure ++ * @on: power state to which device is to be set ++ * ++ * Sets devices power state to requrested state, if possible. ++ */ ++static int mt9p031_v4l2_int_s_power(struct v4l2_int_device *s, ++ enum v4l2_power power) ++{ ++ struct mt9p031_priv *priv = s->priv; ++ struct i2c_client *client = priv->client; ++ ++ int ret; ++ ++ switch (power) { ++ case V4L2_POWER_STANDBY: ++ /* FALLTHROUGH */ ++ case V4L2_POWER_OFF: ++ ret = priv->pdata->power_set(s, power); ++ if (ret < 0) { ++ dev_err(&client->dev, "Unable to set target board power " ++ "state (OFF/STANDBY)\n"); ++ return ret; ++ } ++ break; ++ case V4L2_POWER_ON: ++ ret = priv->pdata->power_set(s, power); ++ ++ if (ret < 0) { ++ dev_err(&client->dev, "Unable to set target board power " ++ "state (ON)\n"); ++ return ret; ++ } ++ if (!(priv->flags & INIT_DONE)) { ++ ret = mt9p031_detect(client); ++ if (ret < 0) { ++ dev_err(&client->dev, "Unable to detect sensor\n"); ++ return ret; ++ } ++ priv->flags |= INIT_DONE; ++ } ++ ++ ret = mt9p031_init_camera(client); ++ if (ret < 0) { ++ dev_err(&client->dev, "Unable to initialize sensor\n"); ++ return ret; ++ } ++ } ++ ++ return 0; ++} ++ ++/** ++ * mt9p031_v4l2_s_ctrl - V4L2 sensor interface handler for VIDIOC_S_CTRL ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @vc: standard V4L2 VIDIOC_S_CTRL ioctl structure ++ * ++ * If the requested control is supported, sets the control's current ++ * value in HW (and updates the video_control[] array). Otherwise, ++ * returns -EINVAL if the control is not supported. ++ */ ++static int mt9p031_v4l2_s_ctrl(struct v4l2_int_device *s, ++ struct v4l2_control *vc) ++{ ++ int retval = -EINVAL; ++ int i; ++ struct vcontrol *lvc; ++ struct mt9p031_priv *priv = s->priv; ++ struct i2c_client *client = priv->client; ++ ++ i = find_vctrl(vc->id); ++ if (i < 0) ++ return -EINVAL; ++ lvc = &mt9p031_video_control[i]; ++ ++ switch (vc->id) { ++ case V4L2_CID_EXPOSURE: ++ retval = mt9p031_set_exposure_time(vc->value, client, lvc); ++ break; ++ case V4L2_CID_GAIN: ++ retval = mt9p031_set_gain(vc->value, client, lvc); ++ break; ++ } ++ ++ return retval; ++} ++ ++/** ++ * mt9p031_v4l2_g_ctrl - V4L2 sensor interface handler for VIDIOC_G_CTRL ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @vc: standard V4L2 VIDIOC_G_CTRL ioctl structure ++ * ++ * If the requested control is supported, returns the control's current ++ * value from the video_control[] array. Otherwise, returns -EINVAL ++ * if the control is not supported. ++ */ ++static int mt9p031_v4l2_g_ctrl(struct v4l2_int_device *s, ++ struct v4l2_control *vc) ++{ ++ struct vcontrol *lvc; ++ int i; ++ ++ i = find_vctrl(vc->id); ++ if (i < 0) ++ return -EINVAL; ++ lvc = &mt9p031_video_control[i]; ++ ++ switch (vc->id) { ++ case V4L2_CID_EXPOSURE: ++ vc->value = lvc->current_value; ++ break; ++ case V4L2_CID_GAIN: ++ vc->value = lvc->current_value; ++ break; ++ } ++ ++ return 0; ++} ++ ++/** ++ * mt9p031_v4l2_queryctrl - V4L2 sensor interface handler for VIDIOC_QUERYCTRL ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @qc: standard V4L2 VIDIOC_QUERYCTRL ioctl structure ++ * ++ * If the requested control is supported, returns the control information ++ * from the video_control[] array. Otherwise, returns -EINVAL if the ++ * control is not supported. ++ */ ++static int mt9p031_v4l2_queryctrl(struct v4l2_int_device *s, struct v4l2_queryctrl *qc) ++{ ++ int i; ++ ++ i = find_vctrl(qc->id); ++ if (i == -EINVAL) ++ qc->flags = V4L2_CTRL_FLAG_DISABLED; ++ ++ if (i < 0) ++ return -EINVAL; ++ ++ *qc = mt9p031_video_control[i].qc; ++ return 0; ++} ++ ++ ++/** ++ * mt9p031_v4l2_int_enum_fmt_cap - Implement the CAPTURE buffer VIDIOC_ENUM_FMT ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @fmt: standard V4L2 VIDIOC_ENUM_FMT ioctl structure ++ * ++ * Implement the VIDIOC_ENUM_FMT ioctl for the CAPTURE buffer type. ++ */ ++static int mt9p031_v4l2_int_enum_fmt_cap(struct v4l2_int_device *s, ++ struct v4l2_fmtdesc *fmt) ++{ ++ int index = fmt->index; ++ enum v4l2_buf_type type = fmt->type; ++ ++ memset(fmt, 0, sizeof(*fmt)); ++ fmt->index = index; ++ fmt->type = type; ++ ++ switch (fmt->type) { ++ case V4L2_BUF_TYPE_VIDEO_CAPTURE: ++ if (index >= ARRAY_SIZE(mt9p031_formats)) ++ return -EINVAL; ++ break; ++ default: ++ return -EINVAL; ++ } ++ ++ strlcpy(fmt->description, mt9p031_formats[index].description, ++ sizeof(fmt->description)); ++ fmt->pixelformat = mt9p031_formats[index].pixelformat; ++ ++ return 0; ++} ++ ++/** ++ * mt9p031_v4l2_int_try_fmt_cap - Implement the CAPTURE buffer VIDIOC_TRY_FMT ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @f: pointer to standard V4L2 VIDIOC_TRY_FMT ioctl structure ++ * ++ * Implement the VIDIOC_TRY_FMT ioctl for the CAPTURE buffer type. This ++ * ioctl is used to negotiate the image capture size and pixel format ++ * without actually making it take effect. ++ */ ++static int mt9p031_v4l2_int_try_fmt_cap(struct v4l2_int_device *s, ++ struct v4l2_format *f) ++{ ++ enum mt9p031_image_size isize; ++ int ifmt; ++ struct v4l2_pix_format *pix = &f->fmt.pix; ++ struct mt9p031_priv *priv = s->priv; ++ struct v4l2_pix_format *pix2 = &priv->pix; ++ ++ isize = mt9p031_calc_size(pix->width, pix->height); ++ mt9p031_current_format = isize; ++ ++ pix->width = mt9p031_sizes[isize].width; ++ pix->height = mt9p031_sizes[isize].height; ++ for (ifmt = 0; ifmt < mt9p031_num_formats; ifmt++) { ++ if (pix->pixelformat == mt9p031_formats[ifmt].pixelformat) ++ break; ++ } ++ if (ifmt == mt9p031_num_formats) ++ ifmt = 0; ++ pix->pixelformat = mt9p031_formats[ifmt].pixelformat; ++ pix->field = V4L2_FIELD_NONE; ++ pix->bytesperline = pix->width * 2; ++ pix->sizeimage = pix->bytesperline * pix->height; ++ pix->priv = 0; ++ pix->colorspace = V4L2_COLORSPACE_SRGB; ++ ++ *pix2 = *pix; ++ ++ return 0; ++} ++ ++/** ++ * mt9p031_v4l2_int_s_fmt_cap - V4L2 sensor interface handler for VIDIOC_S_FMT ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @f: pointer to standard V4L2 VIDIOC_S_FMT ioctl structure ++ * ++ * If the requested format is supported, configures the HW to use that ++ * format, returns error code if format not supported or HW can't be ++ * correctly configured. ++ */ ++static int mt9p031_v4l2_int_s_fmt_cap(struct v4l2_int_device *s, ++ struct v4l2_format *f) ++{ ++ struct mt9p031_priv *priv = s->priv; ++ struct v4l2_pix_format *pix = &f->fmt.pix; ++ int rval; ++ ++ rval = mt9p031_v4l2_int_try_fmt_cap(s, f); ++ if (!rval) ++ priv->pix = *pix; ++ ++ return rval; ++} ++ ++/** ++ * mt9p031_v4l2_int_g_fmt_cap - V4L2 sensor interface handler for ioctl_g_fmt_cap ++ * @s: pointer to standard V4L2 device structure ++ * @f: pointer to standard V4L2 v4l2_format structure ++ * ++ * Returns the sensor's current pixel format in the v4l2_format ++ * parameter. ++ */ ++static int mt9p031_v4l2_int_g_fmt_cap(struct v4l2_int_device *s, ++ struct v4l2_format *f) ++{ ++ struct mt9p031_priv *priv = s->priv; ++ ++ f->fmt.pix.width = priv->pix.width; ++ f->fmt.pix.height = priv->pix.height; ++ f->fmt.pix.pixelformat = V4L2_COLORSPACE_SRGB; ++ f->fmt.pix.pixelformat = priv->pix.pixelformat; ++ f->fmt.pix.field = V4L2_FIELD_NONE; ++ ++ return 0; ++} ++ ++/** ++ * mt9p031_v4l2_int_s_parm - V4L2 sensor interface handler for VIDIOC_S_PARM ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @a: pointer to standard V4L2 VIDIOC_S_PARM ioctl structure ++ * ++ * Configures the sensor to use the input parameters, if possible. If ++ * not possible, reverts to the old parameters and returns the ++ * appropriate error code. ++ */ ++ ++ ++static int mt9p031_v4l2_int_s_parm(struct v4l2_int_device *s, ++ struct v4l2_streamparm *a) ++{ ++ struct mt9p031_priv *priv = s->priv; ++ struct i2c_client *client = priv->client; ++ struct v4l2_fract *timeperframe = &a->parm.capture.timeperframe; ++ ++ priv->timeperframe = *timeperframe; ++ priv->xclk_current = mt9p031_calc_xclk(client); ++ *timeperframe = priv->timeperframe; ++ ++ return 0; ++} ++ ++/** ++ * mt9p031_v4l2_int_g_parm - V4L2 sensor interface handler for VIDIOC_G_PARM ioctl ++ * @s: pointer to standard V4L2 device structure ++ * @a: pointer to standard V4L2 VIDIOC_G_PARM ioctl structure ++ * ++ * Returns the sensor's video CAPTURE parameters. ++ */ ++static int mt9p031_v4l2_int_g_parm(struct v4l2_int_device *s, ++ struct v4l2_streamparm *a) ++{ ++ struct mt9p031_priv *priv = s->priv; ++ struct v4l2_captureparm *cparm = &a->parm.capture; ++ ++ if (a->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) ++ return -EINVAL; ++ ++ memset(a, 0, sizeof(*a)); ++ a->type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ ++ cparm->capability = V4L2_CAP_TIMEPERFRAME; ++ cparm->timeperframe.numerator = 1; ++ cparm->timeperframe = priv->timeperframe; ++ ++ return 0; ++} ++ ++/** ++ * mt9p031_v4l2_int_g_priv - V4L2 sensor interface handler for vidioc_int_g_priv_num ++ * @s: pointer to standard V4L2 device structure ++ * @p: void pointer to hold sensor's private data address ++ * ++ * Returns device's (sensor's) private data area address in p parameter ++ */ ++static int mt9p031_v4l2_int_g_priv(struct v4l2_int_device *s, void *p) ++{ ++ struct mt9p031_priv *priv = s->priv; ++ ++ return priv->pdata->priv_data_set(p); ++} ++ ++/** ++ * mt9p031_v4l2_int_g_ifparm - V4L2 sensor interface handler for vidioc_int_g_priv_num ++ * @s: pointer to standard V4L2 device structure ++ * @p: void pointer to hold sensor's ifparm ++ * ++ * Returns device's (sensor's) ifparm in p parameter ++ */ ++static int mt9p031_v4l2_int_g_ifparm(struct v4l2_int_device *s, ++ struct v4l2_ifparm *p) ++{ ++ struct mt9p031_priv *priv = s->priv; ++ int rval; ++ ++ if (p == NULL) ++ return -EINVAL; ++ ++ if (!priv->pdata->ifparm) ++ return -EINVAL; ++ ++ rval = priv->pdata->ifparm(p); ++ if (rval) { ++ v4l_err(priv->client, "g_ifparm.Err[%d]\n", rval); ++ return rval; ++ } ++ ++ return 0; ++} ++ ++/** ++ * mt9p031_v4l2_int_enum_framesizes - V4L2 sensor if handler for vidioc_int_enum_framesizes ++ * @s: pointer to standard V4L2 device structure ++ * @frms: pointer to standard V4L2 framesizes enumeration structure ++ * ++ * Returns possible framesizes depending on choosen pixel format ++ */ ++static int mt9p031_v4l2_int_enum_framesizes(struct v4l2_int_device *s, ++ struct v4l2_frmsizeenum *frms) ++{ ++ int ifmt; ++ ++ for (ifmt = 0; ifmt < ARRAY_SIZE(mt9p031_formats); ifmt++) ++ if (mt9p031_formats[ifmt].pixelformat == frms->pixel_format) ++ break; ++ ++ if (ifmt == ARRAY_SIZE(mt9p031_formats)) ++ return -EINVAL; ++ ++ /* Do we already reached all discrete framesizes? */ ++ if (frms->index >= ARRAY_SIZE(mt9p031_sizes)) ++ return -EINVAL; ++ ++ frms->type = V4L2_FRMSIZE_TYPE_DISCRETE; ++ frms->discrete.width = mt9p031_sizes[frms->index].width; ++ frms->discrete.height = mt9p031_sizes[frms->index].height; ++ ++ return 0; ++} ++ ++static int mt9p031_v4l2_int_enum_frameintervals(struct v4l2_int_device *s, ++ struct v4l2_frmivalenum *frmi) ++{ ++ int ifmt; ++ int max_size; ++ ++ for (ifmt = 0; ifmt < ARRAY_SIZE(mt9p031_formats); ifmt++) ++ if (mt9p031_formats[ifmt].pixelformat == frmi->pixel_format) ++ break; ++ ++ if (ifmt == ARRAY_SIZE(mt9p031_formats)) ++ return -EINVAL; ++ ++ max_size = ARRAY_SIZE(mt9p031_sizes); ++ ++ for(ifmt = 0; ifmt < max_size; ifmt++) { ++ if(frmi->width <= mt9p031_sizes[ifmt].width) { ++ frmi->type = V4L2_FRMSIZE_TYPE_DISCRETE; ++ frmi->discrete.numerator = ++ mt9p031_frameintervals[frmi->index].numerator; ++ frmi->discrete.denominator = ++ mt9p031_frameintervals[frmi->index].denominator; ++ ++ if(frmi->discrete.denominator <= mt9p031_frameintervals[max_size - ifmt - 1].denominator) ++ return 0; ++ else ++ return -EINVAL; ++ } ++ } ++ ++ return 0; ++} ++ ++static struct v4l2_int_ioctl_desc mt9p031_ioctl_desc[] = { ++ { .num = vidioc_int_enum_framesizes_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_enum_framesizes }, ++ { .num = vidioc_int_enum_frameintervals_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_enum_frameintervals }, ++ { .num = vidioc_int_s_power_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_s_power }, ++ { .num = vidioc_int_g_priv_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_g_priv }, ++ { .num = vidioc_int_g_ifparm_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_g_ifparm }, ++ { .num = vidioc_int_enum_fmt_cap_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_enum_fmt_cap }, ++ { .num = vidioc_int_try_fmt_cap_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_try_fmt_cap }, ++ { .num = vidioc_int_g_fmt_cap_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_g_fmt_cap }, ++ { .num = vidioc_int_s_fmt_cap_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_s_fmt_cap }, ++ { .num = vidioc_int_g_parm_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_g_parm }, ++ { .num = vidioc_int_s_parm_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_int_s_parm }, ++ { .num = vidioc_int_g_ctrl_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_g_ctrl }, ++ { .num = vidioc_int_s_ctrl_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_s_ctrl }, ++ { .num = vidioc_int_queryctrl_num, ++ .func = (v4l2_int_ioctl_func *)mt9p031_v4l2_queryctrl }, ++}; ++ ++#ifdef MT9P031_DEBUG ++/** ++ * --------------------------------------------------------------------------------- ++ * Sysfs ++ * --------------------------------------------------------------------------------- ++ */ ++ ++/* Basic register read write support */ ++static u16 mt9p031_attr_basic_addr = 0x0000; ++ ++static ssize_t ++mt9p031_basic_reg_addr_show( struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ return sprintf(buf, "0x%x\n", mt9p031_attr_basic_addr); ++} ++ ++static ssize_t ++mt9p031_basic_reg_addr_store( struct device *dev, struct device_attribute *attr, const char *buf, size_t n) ++{ ++ u16 val; ++ sscanf(buf, "%hx", &val); ++ mt9p031_attr_basic_addr = (u16) val; ++ return n; ++} ++ ++static DEVICE_ATTR( basic_reg_addr, S_IRUGO|S_IWUSR, mt9p031_basic_reg_addr_show, mt9p031_basic_reg_addr_store); ++ ++ ++static ssize_t ++mt9p031_basic_reg_val_show( struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ u16 val; ++ int ret; ++ ret = mt9p031_reg_read(sysPriv.client, mt9p031_attr_basic_addr, &val); ++ if(ret < 0){ ++ printk(KERN_INFO "mt9p031: Basic register read failed"); ++ return 1; // nothing processed ++ } else { ++ return sprintf(buf, "0x%x\n", val); ++ } ++} ++ ++static ssize_t ++mt9p031_basic_reg_val_store( struct device *dev, struct device_attribute *attr, const char *buf, size_t n) ++{ ++ u32 val; ++ sscanf(buf, "%x", &val); ++ ++ if (mt9p031_reg_write(sysPriv.client, mt9p031_attr_basic_addr, (u16)val)) { ++ printk(KERN_INFO "mt9p031: Basic regiser write failed"); ++ return n; // nothing processed ++ } else { ++ return n; ++ } ++} ++static DEVICE_ATTR( basic_reg_val, S_IRUGO|S_IWUSR, mt9p031_basic_reg_val_show, mt9p031_basic_reg_val_store); ++ ++ ++/* Exposure time access support */ ++static ssize_t ++mt9p031_exposure_val_show( struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ u32 val; ++ struct vcontrol *lvc; ++ int i = find_vctrl(V4L2_CID_EXPOSURE); ++ if (i < 0) ++ return -EINVAL; ++ lvc = &mt9p031_video_control[i]; ++ val = lvc->current_value; ++ ++ if(val < 0){ ++ printk(KERN_INFO "mt9p031: Exposure value read failed"); ++ return 1; // nothing processed ++ } else { ++ return sprintf(buf, "%d\n", val); ++ } ++} ++ ++ ++static ssize_t ++mt9p031_exposure_val_store( struct device *dev, struct device_attribute *attr, const char *buf, size_t n) ++{ ++ u32 val; ++ struct i2c_client *client; ++ struct vcontrol *lvc; ++ ++ sscanf(buf, "%d", &val); ++ client = sysPriv.client; ++ ++ lvc = &mt9p031_video_control[V4L2_CID_EXPOSURE]; ++ ++ if (mt9p031_set_exposure_time((u32)val, client, lvc)) { ++ printk(KERN_INFO "mt9p031: Exposure write failed"); ++ return n; // nothing processed ++ } else { ++ return n; ++ } ++} ++ ++static DEVICE_ATTR( exposure_val, S_IRUGO|S_IWUSR, mt9p031_exposure_val_show, mt9p031_exposure_val_store); ++ ++ ++/* Global Gain access support */ ++static ssize_t ++mt9p031_gain_val_show( struct device *dev, struct device_attribute *attr, char *buf) ++{ ++ u16 val; ++ struct vcontrol *lvc; ++ ++ int i = find_vctrl(V4L2_CID_GAIN); ++ if (i < 0) ++ return -EINVAL; ++ lvc = &mt9p031_video_control[i]; ++ val = lvc->current_value; ++ ++ if(val < 0){ ++ printk(KERN_INFO "mt9p031: Global Gain value read failed"); ++ return 1; // nothing processed ++ } else { ++ return sprintf(buf, "%d\n", val); ++ } ++} ++ ++static ssize_t ++mt9p031_gain_val_store( struct device *dev, struct device_attribute *attr, const char *buf, size_t n) ++{ ++ u16 val; ++ struct i2c_client *client; ++ struct vcontrol *lvc; ++ ++ sscanf(buf, "%hd", &val); ++ client = sysPriv.client; ++ ++ lvc = &mt9p031_video_control[V4L2_CID_GAIN]; ++ ++ if (mt9p031_set_gain(val, client, lvc)) { ++ printk(KERN_INFO "mt9p031: Global gain write failed"); ++ return n; // nothing processed ++ } else { ++ return n; ++ } ++} ++ ++static DEVICE_ATTR( gain_val, S_IRUGO|S_IWUSR, mt9p031_gain_val_show, mt9p031_gain_val_store); ++ ++ ++static struct attribute *mt9p031_sysfs_attr[] = { ++ &dev_attr_basic_reg_addr.attr, ++ &dev_attr_basic_reg_val.attr, ++ &dev_attr_exposure_val.attr, ++ &dev_attr_gain_val.attr, ++}; ++ ++static int mt9p031_sysfs_add(struct kobject *kobj) ++{ ++ int i = ARRAY_SIZE(mt9p031_sysfs_attr); ++ int rval = 0; ++ ++ do { ++ rval = sysfs_create_file(kobj, mt9p031_sysfs_attr[--i]); ++ } while((i > 0) && (rval == 0)); ++ return rval; ++} ++ ++static int mt9p031_sysfs_rm(struct kobject *kobj) ++{ ++ int i = ARRAY_SIZE(mt9p031_sysfs_attr); ++ int rval = 0; ++ ++ do { ++ sysfs_remove_file(kobj, mt9p031_sysfs_attr[--i]); ++ } while(i > 0); ++ return rval; ++} ++#endif //MT9P031_DEBUG ++ ++static struct v4l2_int_slave mt9p031_slave = { ++ .ioctls = mt9p031_ioctl_desc, ++ .num_ioctls = ARRAY_SIZE(mt9p031_ioctl_desc), ++}; ++ ++static int mt9p031_probe(struct i2c_client *client, ++ const struct i2c_device_id *did) ++{ ++ struct mt9p031_priv *priv; ++ struct v4l2_int_device *v4l2_int_device; ++ int ret; ++ if (!client->dev.platform_data) { ++ dev_err(&client->dev, "no platform data?\n"); ++ return -ENODEV; ++ } ++ ++ priv = kzalloc(sizeof(*priv), GFP_KERNEL); ++ if (!priv) ++ return -ENOMEM; ++ ++ v4l2_int_device = kzalloc(sizeof(*v4l2_int_device), GFP_KERNEL); ++ if (!v4l2_int_device) { ++ kfree(priv); ++ return -ENOMEM; ++ } ++ ++#ifdef MT9P031_HEADBOARD ++ mt9p031_config_PCA9543A(client); //configure i2c level shifter on mt9p031 head-board, no need for Leopard module ++ mdelay(10); ++#endif //MT9P031_HEADBOARD ++ ++ v4l2_int_device->module = THIS_MODULE; ++ strncpy(v4l2_int_device->name, "mt9p031", sizeof(v4l2_int_device->name)); ++ ++ v4l2_int_device->type = v4l2_int_type_slave; ++ v4l2_int_device->u.slave = &mt9p031_slave; ++ ++ v4l2_int_device->priv = priv; ++ ++ priv->v4l2_int_device = v4l2_int_device; ++ priv->client = client; ++ priv->pdata = client->dev.platform_data; ++ ++ priv->pdata->flags = MT9P031_FLAG_PCLK_RISING_EDGE; ++ ++ /* Setting Pixel Values */ ++ priv->pix.width = mt9p031_sizes[0].width; ++ priv->pix.height = mt9p031_sizes[0].height; ++ priv->pix.pixelformat = mt9p031_formats[0].pixelformat; ++ ++ i2c_set_clientdata(client, priv); ++ ++ sysPriv.client = priv->client; ++ ++ ret = v4l2_int_device_register(priv->v4l2_int_device); ++ if (ret) { ++ i2c_set_clientdata(client, NULL); ++ kfree(v4l2_int_device); ++ kfree(priv); ++ } ++ ++#ifdef MT9P031_DEBUG ++ mt9p031_sysfs_add(&client->dev.kobj); ++#endif //MT9P031_DEBUG ++ return ret; ++} ++ ++static int mt9p031_remove(struct i2c_client *client) ++{ ++ struct mt9p031_priv *priv = i2c_get_clientdata(client); ++ ++ v4l2_int_device_unregister(priv->v4l2_int_device); ++ i2c_set_clientdata(client, NULL); ++ mt9p031_sysfs_rm(&client->dev.kobj); ++ ++ kfree(priv->v4l2_int_device); ++ kfree(priv); ++ return 0; ++} ++ ++static const struct i2c_device_id mt9p031_id[] = { ++ { "mt9p031", 0 }, ++ { } ++}; ++MODULE_DEVICE_TABLE(i2c, mt9p031_id); ++ ++static struct i2c_driver mt9p031_i2c_driver = { ++ .driver = { ++ .name = "mt9p031", ++ }, ++ .probe = mt9p031_probe, ++ .remove = mt9p031_remove, ++ .id_table = mt9p031_id, ++}; ++ ++/************************************************************************ ++ module function ++************************************************************************/ ++static int __init mt9p031_module_init(void) ++{ ++ return i2c_add_driver(&mt9p031_i2c_driver); ++} ++ ++static void __exit mt9p031_module_exit(void) ++{ ++ i2c_del_driver(&mt9p031_i2c_driver); ++} ++ ++module_init(mt9p031_module_init); ++module_exit(mt9p031_module_exit); ++ ++MODULE_DESCRIPTION("mt9p031 sensor driver"); ++MODULE_AUTHOR("Aptina"); ++MODULE_LICENSE("GPL v2"); ++ +diff --git a/include/media/mt9p031.h b/include/media/mt9p031.h +new file mode 100644 +index 0000000..d119589 +--- /dev/null ++++ b/include/media/mt9p031.h +@@ -0,0 +1,30 @@ ++/* mt9p031 Camera ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License version 2 as ++ * published by the Free Software Foundation. ++ */ ++ ++#ifndef __MT9P031_H__ ++#define __MT9P031_H__ ++ ++#include ++ ++#define MT9P031_I2C_ADDR 0x48 //(0x90 >> 1) ++ ++#define MT9P031_CLK_MAX (27000000) /* 27MHz */ ++#define MT9P031_CLK_MIN (6000000) /* 6Mhz */ ++ ++#define MT9P031_FLAG_PCLK_RISING_EDGE (1 << 0) ++#define MT9P031_FLAG_DATAWIDTH_8 (1 << 1) /* default width is 10 */ ++ ++struct mt9p031_platform_data { ++ char *master; ++ int (*power_set) (struct v4l2_int_device *s, enum v4l2_power on); ++ int (*ifparm) (struct v4l2_ifparm *p); ++ int (*priv_data_set) (void *); ++ u32 (*set_xclk) (struct v4l2_int_device *s, u32 xclkfreq); ++ u32 flags; ++}; ++ ++#endif /* __MT9P031_H__ */ +diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h +index 6cc107d..7599bf1 100644 +--- a/include/media/v4l2-chip-ident.h ++++ b/include/media/v4l2-chip-ident.h +@@ -271,6 +271,7 @@ enum { + V4L2_IDENT_MT9T112 = 45022, + V4L2_IDENT_MT9V111 = 45031, + V4L2_IDENT_MT9V112 = 45032, ++ V4L2_IDENT_MT9P031 = 6145, + + /* HV7131R CMOS sensor: just ident 46000 */ + V4L2_IDENT_HV7131R = 46000, +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp-2.6.32/cam/5m03/0002-board-omap3beagle-import-li5m03-driver-from-https-gi.patch b/recipes/linux/linux-omap-psp-2.6.32/cam/5m03/0002-board-omap3beagle-import-li5m03-driver-from-https-gi.patch new file mode 100644 index 0000000000..2b45f1970b --- /dev/null +++ b/recipes/linux/linux-omap-psp-2.6.32/cam/5m03/0002-board-omap3beagle-import-li5m03-driver-from-https-gi.patch @@ -0,0 +1,294 @@ +From 675ad06f53fbb0c7f398aaff8c3508196dfeb9bc Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Sun, 1 May 2011 16:41:57 +0200 +Subject: [PATCH 2/2] board-omap3beagle: import li5m03 driver from https://github.com/Aptina/BeagleBoard-xM/tree/master/Angstrom/MT9P031 + +Properly hook it into the board file and some more updates + +Signed-off-by: Koen Kooi +--- + arch/arm/mach-omap2/board-omap3beagle-camera.c | 186 +++++++++++++++++++++++- + arch/arm/mach-omap2/board-omap3beagle.c | 20 +++ + 2 files changed, 198 insertions(+), 8 deletions(-) + +diff --git a/arch/arm/mach-omap2/board-omap3beagle-camera.c b/arch/arm/mach-omap2/board-omap3beagle-camera.c +index 110c2c9..97f0e7a 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle-camera.c ++++ b/arch/arm/mach-omap2/board-omap3beagle-camera.c +@@ -160,6 +160,8 @@ static int mt9v113_power_set(struct v4l2_int_device *s, enum v4l2_power power) + case V4L2_POWER_ON: + + isp_configure_interface(vdev->cam->isp, &mt9v113_if_config); ++ /* Set RESET_BAR to 0 */ ++ gpio_set_value(LEOPARD_RESET_GPIO, 0); + + /* turn on VDD */ + regulator_enable(cam_1v8_reg); +@@ -168,9 +170,6 @@ static int mt9v113_power_set(struct v4l2_int_device *s, enum v4l2_power power) + regulator_enable(cam_2v8_reg); + mdelay(50); + +- /* Set RESET_BAR to 0 */ +- gpio_set_value(LEOPARD_RESET_GPIO, 0); +- + /* Enable EXTCLK */ + isp_set_xclk(vdev->cam->isp, MT9V113_CLK_MIN*2, CAM_USE_XCLKA); + /* +@@ -294,7 +293,7 @@ static int mt9t112_set_prv_data(void *priv) + } + + /** +- * @brief mt9t112_power_set - Power-on or power-off TVP5146 device ++ * @brief mt9t112_power_set - Power-on or power-off MT9T112 device + * + * @param power - enum, Power on/off, resume/standby + * +@@ -320,6 +319,8 @@ static int mt9t112_power_set(struct v4l2_int_device *s, enum v4l2_power power) + isp_configure_interface(vdev->cam->isp, &mt9t112_if_config); + #endif + ++ /* Set RESET_BAR to 0 */ ++ gpio_set_value(LEOPARD_RESET_GPIO, 0); + + /* turn on VDD */ + regulator_enable(cam_1v8_reg); +@@ -331,11 +332,8 @@ static int mt9t112_power_set(struct v4l2_int_device *s, enum v4l2_power power) + + mdelay(50); + +- /* Set RESET_BAR to 0 */ +- gpio_set_value(LEOPARD_RESET_GPIO, 0); +- + /* Enable EXTCLK */ +- isp_set_xclk(vdev->cam->isp, 24000000, CAM_USE_XCLKA); ++ isp_set_xclk(vdev->cam->isp, 12000000, CAM_USE_XCLKA); + + /* + * Wait at least 70 CLK cycles (w/EXTCLK = 24MHz): +@@ -372,6 +370,178 @@ struct mt9t112_platform_data mt9t112_pdata = { + + #endif /* #ifdef CONFIG_VIDEO_MT9T112 */ + ++#if defined(CONFIG_SOC_CAMERA_MT9P031) || defined(CONFIG_SOC_CAMERA_MT9P031_MODULE) ++#include ++ ++#define ISP_MT9P031_MCLK 216000000 ++ ++/* Arbitrary memory handling limit */ ++#define MT9P031_BIGGEST_FRAME_BYTE_SIZE PAGE_ALIGN((2592 * 1944) * 2 * 4 ) ++ ++static struct isp_interface_config mt9p031_if_config = { ++ .ccdc_par_ser = ISP_PARLL, ++ .dataline_shift = 0x1, ++ .hsvs_syncdetect = ISPCTRL_SYNC_DETECT_VSRISE, ++ .strobe = 0x0, ++ .prestrobe = 0x0, ++ .shutter = 0x0, ++ .cam_mclk = ISP_MT9P031_MCLK, ++ .wenlog = ISPCCDC_CFG_WENLOG_AND, ++ .wait_hs_vs = 2, ++ .u.par.par_bridge = 0x0, ++ .u.par.par_clk_pol = 0x0, ++}; ++ ++static struct v4l2_ifparm mt9p031_ifparm_s = { ++ .if_type = V4L2_IF_TYPE_RAW, ++ .u = { ++ .raw = { ++ .frame_start_on_rising_vs = 1, ++ .bt_sync_correct = 0, ++ .swap = 0, ++ .latch_clk_inv = 0, ++ .nobt_hs_inv = 0, /* active high */ ++ .nobt_vs_inv = 0, /* active high */ ++ .clock_min = MT9P031_CLK_MIN, ++ .clock_max = MT9P031_CLK_MAX, ++ }, ++ }, ++}; ++ ++/** ++ * @brief mt9p031_ifparm - Returns the mt9p031 interface parameters ++ * ++ * @param p - pointer to v4l2_ifparm structure ++ * ++ * @return result of operation - 0 is success ++ */ ++static int mt9p031_ifparm(struct v4l2_ifparm *p) ++{ ++ if (p == NULL) ++ return -EINVAL; ++ ++ *p = mt9p031_ifparm_s; ++ return 0; ++} ++ ++#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) ++static struct omap34xxcam_hw_config mt9p031_hwc = { ++ .dev_index = 1, ++ .dev_minor = -1, ++ .dev_type = OMAP34XXCAM_SLAVE_SENSOR, ++ .u.sensor.sensor_isp = 0, ++ .u.sensor.capture_mem = MT9P031_BIGGEST_FRAME_BYTE_SIZE, ++ .u.sensor.ival_default = { 1, 30 }, ++}; ++#endif ++ ++/** ++ * @brief mt9p031_set_prv_data - Returns mt9p031 omap34xx driver private data ++ * ++ * @param priv - pointer to omap34xxcam_hw_config structure ++ * ++ * @return result of operation - 0 is success ++ */ ++static int mt9p031_set_prv_data(void *priv) ++{ ++#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) ++ struct omap34xxcam_hw_config *hwc = priv; ++ ++ if (priv == NULL) ++ return -EINVAL; ++ ++ *hwc = mt9p031_hwc; ++ return 0; ++#else ++ return -EINVAL; ++#endif ++} ++ ++/** ++ * @brief mt9p031_power_set - Power-on or power-off mt9p031 device ++ * ++ * @param power - enum, Power on/off, resume/standby ++ * ++ * @return result of operation - 0 is success ++ */ ++static int mt9p031_power_set(struct v4l2_int_device *s, enum v4l2_power power) ++{ ++ struct omap34xxcam_videodev *vdev = s->u.slave->master->priv; ++ switch (power) { ++ case V4L2_POWER_OFF: ++ case V4L2_POWER_STANDBY: ++ isp_set_xclk(vdev->cam->isp, 0, CAM_USE_XCLKA); ++ ++ if (regulator_is_enabled(cam_1v8_reg)) ++ regulator_disable(cam_1v8_reg); ++ if (regulator_is_enabled(cam_2v8_reg)) ++ regulator_disable(cam_2v8_reg); ++ break; ++ ++ case V4L2_POWER_ON: ++#if defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE) ++ isp_configure_interface(vdev->cam->isp, &mt9p031_if_config); ++#endif ++ ++ /* Set RESET_BAR to 0 */ ++ gpio_set_value(LEOPARD_RESET_GPIO, 0); ++ ++ /* turn on VDD */ ++ regulator_enable(cam_1v8_reg); ++ ++ mdelay(1); ++ ++ /* turn on VDD_IO */ ++ regulator_enable(cam_2v8_reg); ++ ++ mdelay(50); ++ ++ /* Enable EXTCLK */ ++ isp_set_xclk(vdev->cam->isp, 24000000, CAM_USE_XCLKA); //works for 36MHz too; try at lower freq ++ ++ /* ++ * Wait at least 70 CLK cycles (w/EXTCLK = 24MHz): ++ * ((1000000 * 70) / 24000000) = aprox 2.91 us. ++ */ ++ ++ udelay(3); ++ ++ /* Set RESET_BAR to 1 */ ++ gpio_set_value(LEOPARD_RESET_GPIO, 1); ++ ++ /* ++ * Wait at least 100 CLK cycles (w/EXTCLK = 24MHz): ++ * ((1000000 * 100) / 24000000) = aprox 4.16 us. ++ */ ++ ++ udelay(5); ++ ++ break; ++ ++ default: ++ return -ENODEV; ++ break; ++ } ++ return 0; ++} ++ ++static u32 mt9p031_set_xclk(struct v4l2_int_device *s, u32 xclkfreq) ++{ ++ struct omap34xxcam_videodev *vdev = s->u.slave->master->priv; ++ return isp_set_xclk(vdev->cam->isp, xclkfreq, 0); ++} ++ ++ ++struct mt9p031_platform_data mt9p031_pdata = { ++ .master = "omap34xxcam", ++ .power_set = mt9p031_power_set, ++ .set_xclk = mt9p031_set_xclk, ++ .priv_data_set = mt9p031_set_prv_data, ++ .ifparm = mt9p031_ifparm, ++}; ++ ++#endif /* #ifdef CONFIG_SOC_CAMERA_MT9P031 */ ++ + static int beagle_cam_probe(struct platform_device *pdev) + { + cam_1v8_reg = regulator_get(&pdev->dev, "cam_1v8"); +diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c +index 2677b41..e561431 100644 +--- a/arch/arm/mach-omap2/board-omap3beagle.c ++++ b/arch/arm/mach-omap2/board-omap3beagle.c +@@ -83,6 +83,12 @@ extern struct mt9v113_platform_data mt9v113_pdata; + extern struct mt9t112_platform_data mt9t112_pdata; + #endif + ++#if defined(CONFIG_SOC_CAMERA_MT9P031) || defined(CONFIG_SOC_CAMERA_MT9P031_MODULE) ++#include ++#include ++extern struct mt9p031_platform_data mt9p031_pdata; ++#endif ++ + #define GPMC_CS0_BASE 0x60 + #define GPMC_CS_SIZE 0x30 + +@@ -614,6 +620,15 @@ static struct i2c_board_info __initdata beagle_lbcm3m1_i2c2_boardinfo[] = { + #endif + }; + ++static struct i2c_board_info __initdata beagle_lbcm5m03_i2c2_boardinfo[] = { ++#if defined(CONFIG_SOC_CAMERA_MT9P031) || defined(CONFIG_SOC_CAMERA_MT9P031_MODULE) ++ { ++ I2C_BOARD_INFO("mt9p031", MT9P031_I2C_ADDR), ++ .platform_data = &mt9p031_pdata, ++ }, ++#endif ++}; ++ + static int __init omap3_beagle_i2c_init(void) + { + omap_register_i2c_bus(1, 2600, beagle_i2c1_boardinfo, +@@ -636,6 +651,11 @@ static int __init omap3_beagle_i2c_init(void) + " registering i2c2 bus for lbcm3m1\n"); + omap_register_i2c_bus(2, 400, beagle_lbcm3m1_i2c2_boardinfo, + ARRAY_SIZE(beagle_lbcm3m1_i2c2_boardinfo)); ++ } else if (!strcmp(cameraboard_name, "lbcm5m03")) { ++ printk(KERN_INFO "Beagle cameraboard:" ++ " registering i2c2 bus for lbcm5m03\n"); ++ omap_register_i2c_bus(2, 400, beagle_lbcm5m03_i2c2_boardinfo, ++ ARRAY_SIZE(beagle_lbcm5m03_i2c2_boardinfo)); + } else { + omap_register_i2c_bus(2, 400, NULL, 0); + } +-- +1.6.6.1 + diff --git a/recipes/linux/linux-omap-psp_2.6.32.bb b/recipes/linux/linux-omap-psp_2.6.32.bb index 78fb7c423b..06904a9fe3 100644 --- a/recipes/linux/linux-omap-psp_2.6.32.bb +++ b/recipes/linux/linux-omap-psp_2.6.32.bb @@ -9,7 +9,7 @@ COMPATIBLE_MACHINE = "am3517-crane|beagleboard|omap3evm|am3517-evm|dm37x-evm|am3 SRCREV = "5fc29e7b2a76a64a739f857858ef0b98294aa155" # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc -MACHINE_KERNEL_PR_append = "+gitr${SRCREV}" +MACHINE_KERNEL_PR_append = "g+gitr${SRCREV}" SRC_URI = "git://arago-project.org/git/projects/linux-omap3.git;protocol=http;branch=master \ file://0001-Added-Crane-Board-support.patch \ @@ -58,6 +58,8 @@ SRC_URI = "git://arago-project.org/git/projects/linux-omap3.git;protocol=http;br file://0043-MTD-silence-ecc-errors-on-mtdblock0.patch \ file://0044-ARM-OMAP-beagle-every-known-beagle-except-revB-uses-.patch \ file://0045-ARM-OMAP-beagle-add-support-for-beagleFPGA-expansion.patch \ + file://0046-ARM-OMAP-beagle-disable-uart-timeout.patch \ + file://0047-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch \ file://cam/0001-mt9t111-first-stab-at-merging-sensor-driver-based-on.patch \ file://cam/0002-mt9t111-Fix-all-checkpatch-errors.patch \ file://cam/0003-mt9t111-Pass-v4l2_int_device-data.patch \ @@ -133,14 +135,25 @@ SRC_URI = "git://arago-project.org/git/projects/linux-omap3.git;protocol=http;br file://cam/0073-mt9v113-Fix-State-variable-handling.patch \ file://cam/0074-Move-sensor-rest-to-after-applying-power.patch \ file://cam/0075-omap3beagle-Add-camera-bootarg.patch \ + file://cam/5m03/0001-mt9p031-import-driver-from-https-github.com-Aptina-B.patch \ file://0001-BeagleBoard-Adjust-USER-button-pin-for-xM.patch \ file://0001-PSP-3.0.1.6-kernel-source-patched-with-OCF-Linux.patch \ file://porches.patch \ file://0001-OMAP3-craneboard-print-expansionboard-name-detected-.patch \ file://0002-OMAP3-craneboard-add-support-for-TinCanTools-Trainer.patch \ + file://0001-ARM-6329-1-wire-up-sys_accept4-on-ARM.patch \ file://defconfig" SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \ + file://beagleboard-xmc/0001-omap-Beagle-revision-detection.patch \ + file://beagleboard-xmc/0002-omap-Beagle-only-Cx-boards-use-pin-23-for-write-prot.patch \ + file://beagleboard-xmc/0003-omap-Beagle-no-gpio_wp-pin-connection-on-xM.patch \ + file://beagleboard-xmc/0004-omap3-beaglexm-fix-EHCI-power-up-GPIO-dir.patch \ + file://beagleboard-xmc/0005-omap3-beaglexm-fix-DVI-reset-GPIO.patch \ + file://beagleboard-xmc/0006-omap3-beaglexm-fix-power-on-of-DVI.patch \ + file://beagleboard-xmc/0007-beagleboard-hack-in-support-from-xM-rev-C.patch \ + file://beagleboard-xmc/0008-omap3-beagle-cleaned-up-board-revision-conditions.patch \ + file://cam/5m03/0002-board-omap3beagle-import-li5m03-driver-from-https-gi.patch \ " SRC_URI_append_omap3-touchbook = " \ diff --git a/recipes/linux/linux-omap3-2.6.37-psp04.00.00.10/ti816x/defconfig b/recipes/linux/linux-omap3-2.6.37-psp04.00.00.10/ti816x/defconfig new file mode 100644 index 0000000000..b3b1a09d93 --- /dev/null +++ b/recipes/linux/linux-omap3-2.6.37-psp04.00.00.10/ti816x/defconfig @@ -0,0 +1,2142 @@ +# +# Automatically generated make config: don't edit +# Linux/arm 2.6.37 Kernel Configuration +# Mon Feb 14 12:41:09 2011 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +# CONFIG_ARCH_USES_GETTIMEOFFSET is not set +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y +CONFIG_HAVE_IRQ_WORK=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_LZO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set +# CONFIG_HAVE_GENERIC_HARDIRQS is not set +# CONFIG_SPARSE_IRQ is not set + +# +# RCU Subsystem +# +CONFIG_TINY_RCU=y +# CONFIG_PREEMPT_RCU is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_IKCONFIG is not set +CONFIG_LOG_BUF_SHIFT=17 +# CONFIG_CGROUPS is not set +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_LZO=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +# CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +# CONFIG_PERF_EVENTS is not set +# CONFIG_PERF_COUNTERS is not set +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_PCI_QUIRKS=y +CONFIG_SLUB_DEBUG=y +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +CONFIG_KPROBES=y +CONFIG_KRETPROBES=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_BLOCK=y +# CONFIG_LBDAF is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +CONFIG_INLINE_SPIN_UNLOCK=y +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +CONFIG_INLINE_READ_UNLOCK=y +# CONFIG_INLINE_READ_UNLOCK_BH is not set +CONFIG_INLINE_READ_UNLOCK_IRQ=y +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +CONFIG_INLINE_WRITE_UNLOCK=y +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +# CONFIG_MUTEX_SPIN_ON_OWNER is not set +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCMRING is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_STMP3XXX is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_NUC93X is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5P6442 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_S5PV310 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_TCC_926 is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_DAVINCI is not set +CONFIG_ARCH_OMAP=y +# CONFIG_PLAT_SPEAR is not set + +# +# TI OMAP Common Features +# +# CONFIG_ARCH_OMAP1 is not set +CONFIG_ARCH_OMAP2PLUS=y + +# +# OMAP Feature Selections +# +# CONFIG_OMAP_RESET_CLOCKS is not set +CONFIG_TI816X_SMARTREFLEX=y +CONFIG_SMARTREFLEX_CLASS2=y +# CONFIG_DEBUG_SR_CLASS2 is not set +CONFIG_OMAP_MUX=y +# CONFIG_OMAP_MUX_DEBUG is not set +CONFIG_OMAP_MUX_WARNINGS=y +# CONFIG_OMAP_MCBSP is not set +# CONFIG_OMAP_MBOX_FWK is not set +CONFIG_OMAP_IOMMU=y +# CONFIG_OMAP_IOMMU_DEBUG is not set +CONFIG_OMAP_MPU_TIMER=y +# CONFIG_OMAP_32K_TIMER is not set +CONFIG_OMAP_DM_TIMER=y +# CONFIG_OMAP_PM_NONE is not set +CONFIG_OMAP_PM_NOOP=y + +# +# TI OMAP2/3/4 Specific Features +# +CONFIG_ARCH_OMAP2PLUS_TYPICAL=y +# CONFIG_ARCH_OMAP2 is not set +# CONFIG_ARCH_OMAP3 is not set +# CONFIG_ARCH_OMAP4 is not set +CONFIG_ARCH_TI81XX=y +CONFIG_ARCH_TI816X=y +# CONFIG_ARCH_TI814X is not set + +# +# OMAP Board Type +# + +# +# TI81XX Board Type +# +CONFIG_MACH_TI8168EVM=y + +# +# Processor Type +# +CONFIG_CPU_32v6K=y +CONFIG_CPU_V7=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_ARM_THUMBEE is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_CPU_HAS_PMU=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_743622 is not set +CONFIG_COMMON_CLKDEV=y + +# +# Bus support +# +CONFIG_PCI=y +CONFIG_PCI_SYSCALL=y +CONFIG_ARCH_SUPPORTS_MSI=y +CONFIG_PCI_MSI=y +# CONFIG_PCI_DEBUG is not set +# CONFIG_PCI_STUB is not set +# CONFIG_PCI_IOV is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +CONFIG_HZ=100 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +CONFIG_OABI_COMPAT=y +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_HIGHMEM is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_NEED_PER_CPU_KM=y +CONFIG_FORCE_MAX_ZONEORDER=11 +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_DEPRECATED_PARAM_STRUCT is not set + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# +# CONFIG_CPU_FREQ is not set +# CONFIG_CPU_IDLE is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +CONFIG_BINFMT_MISC=y + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_DEBUG=y +# CONFIG_PM_ADVANCED_DEBUG is not set +CONFIG_PM_VERBOSE=y +# CONFIG_SUSPEND is not set +# CONFIG_APM_EMULATION is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM_OPS=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETLABEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +# CONFIG_DNS_RESOLVER is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NET_TCPPROBE is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +# CONFIG_CFG80211 is not set +# CONFIG_LIB80211 is not set + +# +# CFG80211 needs to be enabled for MAC80211 +# + +# +# Some wireless drivers require a rate control algorithm +# +# CONFIG_WIMAX is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_TESTS is not set +CONFIG_MTD_CONCAT=y +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_INTEL_VR_NOR is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_PMC551 is not set +# CONFIG_MTD_DATAFLASH is not set +CONFIG_MTD_M25P80=y +CONFIG_M25PXX_USE_FAST_READ=y +# CONFIG_MTD_SST25L is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_VERIFY_WRITE=y +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_DENALI is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_OMAP2=y +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_RICOH is not set +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_CAFE is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_UBI is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_CPQ_DA is not set +# CONFIG_BLK_CPQ_CISS_DA is not set +# CONFIG_BLK_DEV_DAC960 is not set +# CONFIG_BLK_DEV_UMEM is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_SX8 is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=32768 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set +CONFIG_MISC_DEVICES=y +# CONFIG_AD525X_DPOT is not set +# CONFIG_PHANTOM is not set +# CONFIG_SGI_IOC4 is not set +# CONFIG_TIFM_CORE is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_HP_ILO is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +# CONFIG_BMP085 is not set +# CONFIG_PCH_PHUB is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +CONFIG_EEPROM_AT24=y +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_CB710_CORE is not set +# CONFIG_IWMC3200TOP is not set + +# +# Texas Instruments shared transport line discipline +# +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +CONFIG_ATA=y +# CONFIG_ATA_NONSTANDARD is not set +CONFIG_ATA_VERBOSE_ERROR=y +CONFIG_SATA_PMP=y + +# +# Controllers with non-SFF native interface +# +CONFIG_SATA_AHCI=y +CONFIG_SATA_AHCI_PLATFORM=y +# CONFIG_SATA_INIC162X is not set +# CONFIG_SATA_SIL24 is not set +# CONFIG_ATA_SFF is not set +# CONFIG_MD is not set +# CONFIG_FUSION is not set + +# +# IEEE 1394 (FireWire) support +# +# CONFIG_FIREWIRE is not set +# CONFIG_FIREWIRE_NOSY is not set +# CONFIG_I2O is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +# CONFIG_ARCNET is not set +CONFIG_MII=y +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_BCM63XX_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +# CONFIG_NET_ETHERNET is not set +CONFIG_NETDEV_1000=y +# CONFIG_ACENIC is not set +# CONFIG_DL2K is not set +CONFIG_TI_DAVINCI_EMAC=y +CONFIG_TI_DAVINCI_MDIO=y +CONFIG_TI_DAVINCI_CPDMA=y +# CONFIG_E1000 is not set +# CONFIG_E1000E is not set +# CONFIG_IP1000 is not set +# CONFIG_IGB is not set +# CONFIG_IGBVF is not set +# CONFIG_NS83820 is not set +# CONFIG_HAMACHI is not set +# CONFIG_YELLOWFIN is not set +# CONFIG_R8169 is not set +# CONFIG_SIS190 is not set +# CONFIG_SKGE is not set +# CONFIG_SKY2 is not set +# CONFIG_VIA_VELOCITY is not set +# CONFIG_TIGON3 is not set +# CONFIG_BNX2 is not set +# CONFIG_CNIC is not set +# CONFIG_QLA3XXX is not set +# CONFIG_ATL1 is not set +# CONFIG_ATL1E is not set +# CONFIG_ATL1C is not set +# CONFIG_JME is not set +# CONFIG_STMMAC_ETH is not set +# CONFIG_PCH_GBE is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_TR is not set +# CONFIG_WLAN is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=y +# CONFIG_USB_NET_AX8817X is not set +CONFIG_USB_NET_CDCETHER=y +# CONFIG_USB_NET_CDC_EEM is not set +CONFIG_USB_NET_DM9601=y +# CONFIG_USB_NET_SMSC75XX is not set +# CONFIG_USB_NET_SMSC95XX is not set +# CONFIG_USB_NET_GL620A is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_PLUSB is not set +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +# CONFIG_USB_NET_CX82310_ETH is not set +# CONFIG_USB_NET_INT51X1 is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_USB_SIERRA_NET is not set +# CONFIG_WAN is not set + +# +# CAIF transport drivers +# +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NET_FC is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_VMXNET3 is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_PCIPS2 is not set +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_DEVKMEM=y +CONFIG_SERIAL_NONSTANDARD=y +# CONFIG_COMPUTONE is not set +# CONFIG_ROCKETPORT is not set +# CONFIG_CYCLADES is not set +# CONFIG_DIGIEPCA is not set +# CONFIG_MOXA_INTELLIO is not set +# CONFIG_MOXA_SMARTIO is not set +# CONFIG_ISI is not set +# CONFIG_SYNCLINKMP is not set +# CONFIG_SYNCLINK_GT is not set +# CONFIG_N_HDLC is not set +# CONFIG_N_GSM is not set +# CONFIG_RISCOM8 is not set +# CONFIG_SPECIALIX is not set +# CONFIG_STALDRV is not set +# CONFIG_NOZOMI is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_PCI=y +CONFIG_SERIAL_8250_NR_UARTS=64 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX3107 is not set +# CONFIG_SERIAL_MFD_HSU is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_JSM is not set +CONFIG_SERIAL_OMAP=y +CONFIG_SERIAL_OMAP_CONSOLE=y +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_APPLICOM is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +CONFIG_DEVPORT=y +# CONFIG_TI816X_PCIE_BOOTDRV is not set +# CONFIG_TI81XX_HDMI is not set +# CONFIG_RAMOOPS is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# PC SMBus host controller drivers +# +# CONFIG_I2C_ALI1535 is not set +# CONFIG_I2C_ALI1563 is not set +# CONFIG_I2C_ALI15X3 is not set +# CONFIG_I2C_AMD756 is not set +# CONFIG_I2C_AMD8111 is not set +# CONFIG_I2C_I801 is not set +# CONFIG_I2C_ISCH is not set +# CONFIG_I2C_PIIX4 is not set +# CONFIG_I2C_NFORCE2 is not set +# CONFIG_I2C_SIS5595 is not set +# CONFIG_I2C_SIS630 is not set +# CONFIG_I2C_SIS96X is not set +# CONFIG_I2C_VIA is not set +# CONFIG_I2C_VIAPRO is not set + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_DESIGNWARE is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_INTEL_MID is not set +# CONFIG_I2C_OCORES is not set +CONFIG_I2C_OMAP=y +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_GPIO is not set +CONFIG_SPI_OMAP24XX=y +# CONFIG_SPI_TOPCLIFF_PCH is not set +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +# CONFIG_SPI_SPIDEV is not set +# CONFIG_SPI_TLE62X0 is not set + +# +# PPS support +# +# CONFIG_PPS is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set +# CONFIG_GPIO_SYSFS is not set + +# +# Memory mapped GPIO expanders: +# +# CONFIG_GPIO_BASIC_MMIO is not set +# CONFIG_GPIO_IT8761E is not set +# CONFIG_GPIO_SCH is not set +# CONFIG_GPIO_VX855 is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_ADP5588 is not set + +# +# PCI GPIO expanders: +# +# CONFIG_GPIO_CS5535 is not set +# CONFIG_GPIO_BT8XX is not set +# CONFIG_GPIO_LANGWELL is not set +# CONFIG_GPIO_PCH is not set +# CONFIG_GPIO_RDC321X is not set + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_74X164 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set +# CONFIG_THERMAL is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_OMAP_WATCHDOG=y +# CONFIG_MAX63XX_WATCHDOG is not set +# CONFIG_ALIM7101_WDT is not set + +# +# PCI-based Watchdog Cards +# +# CONFIG_PCIPCWATCHDOG is not set +# CONFIG_WDTPCI is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_SPROM=y +CONFIG_SSB_PCIHOST_POSSIBLE=y +CONFIG_SSB_PCIHOST=y +# CONFIG_SSB_B43_PCI_BRIDGE is not set +CONFIG_SSB_SDIOHOST_POSSIBLE=y +# CONFIG_SSB_SDIOHOST is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y +# CONFIG_SSB_DRIVER_PCICORE is not set +CONFIG_MFD_SUPPORT=y +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC35892 is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_MC13XXX is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_MFD_TIMBERDALE is not set +# CONFIG_LPC_SCH is not set +# CONFIG_MFD_RDC321X is not set +# CONFIG_MFD_JANZ_CMODIO is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_VX855 is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +CONFIG_REGULATOR_DUMMY=y +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_BQ24022 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_AD5398 is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +# CONFIG_MEDIA_CONTROLLER is not set +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_COMMON=y +CONFIG_VIDEO_ALLOW_V4L1=y +CONFIG_VIDEO_V4L1_COMPAT=y +# CONFIG_DVB_CORE is not set +CONFIG_VIDEO_MEDIA=y + +# +# Multimedia drivers +# +# CONFIG_IR_CORE is not set +# CONFIG_MEDIA_ATTACH is not set +CONFIG_MEDIA_TUNER=y +# CONFIG_MEDIA_TUNER_CUSTOMISE is not set +CONFIG_MEDIA_TUNER_SIMPLE=y +CONFIG_MEDIA_TUNER_TDA8290=y +CONFIG_MEDIA_TUNER_TDA827X=y +CONFIG_MEDIA_TUNER_TDA18271=y +CONFIG_MEDIA_TUNER_TDA9887=y +CONFIG_MEDIA_TUNER_TEA5761=y +CONFIG_MEDIA_TUNER_TEA5767=y +CONFIG_MEDIA_TUNER_MT20XX=y +CONFIG_MEDIA_TUNER_XC2028=y +CONFIG_MEDIA_TUNER_XC5000=y +CONFIG_MEDIA_TUNER_MC44S803=y +CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L1=y +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set + +# +# Encoders/decoders and other helper chips +# + +# +# Audio decoders +# +# CONFIG_VIDEO_TVAUDIO is not set +# CONFIG_VIDEO_TDA7432 is not set +# CONFIG_VIDEO_TDA9840 is not set +# CONFIG_VIDEO_TDA9875 is not set +# CONFIG_VIDEO_TEA6415C is not set +# CONFIG_VIDEO_TEA6420 is not set +# CONFIG_VIDEO_MSP3400 is not set +# CONFIG_VIDEO_CS5345 is not set +# CONFIG_VIDEO_CS53L32A is not set +# CONFIG_VIDEO_M52790 is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_WM8775 is not set +# CONFIG_VIDEO_WM8739 is not set +# CONFIG_VIDEO_VP27SMPX is not set + +# +# RDS decoders +# +# CONFIG_VIDEO_SAA6588 is not set + +# +# Video decoders +# +# CONFIG_VIDEO_ADV7180 is not set +# CONFIG_VIDEO_BT819 is not set +# CONFIG_VIDEO_BT856 is not set +# CONFIG_VIDEO_BT866 is not set +# CONFIG_VIDEO_KS0127 is not set +# CONFIG_VIDEO_OV7670 is not set +# CONFIG_VIDEO_MT9T001 is not set +# CONFIG_VIDEO_MT9V011 is not set +# CONFIG_VIDEO_MT9V113 is not set +# CONFIG_VIDEO_TCM825X is not set +# CONFIG_VIDEO_SAA7110 is not set +# CONFIG_VIDEO_SAA711X is not set +# CONFIG_VIDEO_SAA717X is not set +# CONFIG_VIDEO_SAA7191 is not set +# CONFIG_VIDEO_TVP514X is not set +# CONFIG_VIDEO_TVP5150 is not set +# CONFIG_VIDEO_TVP7002 is not set +# CONFIG_VIDEO_VPX3220 is not set + +# +# Video and audio decoders +# +# CONFIG_VIDEO_CX25840 is not set + +# +# MPEG video encoders +# +# CONFIG_VIDEO_CX2341X is not set + +# +# Video encoders +# +# CONFIG_VIDEO_SAA7127 is not set +# CONFIG_VIDEO_SAA7185 is not set +# CONFIG_VIDEO_ADV7170 is not set +# CONFIG_VIDEO_ADV7175 is not set +# CONFIG_VIDEO_THS7303 is not set +# CONFIG_VIDEO_ADV7343 is not set +# CONFIG_VIDEO_AK881X is not set + +# +# Video improvement chips +# +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set +# CONFIG_VIDEO_CPIA2 is not set +# CONFIG_VIDEO_SAA7134 is not set +# CONFIG_VIDEO_MXB is not set +# CONFIG_VIDEO_HEXIUM_ORION is not set +# CONFIG_VIDEO_HEXIUM_GEMINI is not set +# CONFIG_VIDEO_CAFE_CCIC is not set +# CONFIG_VIDEO_SR030PC30 is not set +# CONFIG_SOC_CAMERA is not set +CONFIG_V4L_USB_DRIVERS=y +CONFIG_USB_VIDEO_CLASS=y +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +# CONFIG_USB_GSPCA is not set +# CONFIG_VIDEO_PVRUSB2 is not set +# CONFIG_VIDEO_HDPVR is not set +# CONFIG_VIDEO_USBVISION is not set +# CONFIG_USB_VICAM is not set +# CONFIG_USB_IBMCAM is not set +# CONFIG_USB_KONICAWC is not set +# CONFIG_USB_ET61X251 is not set +# CONFIG_USB_SE401 is not set +# CONFIG_USB_SN9C102 is not set +# CONFIG_USB_PWC is not set +# CONFIG_USB_ZR364XX is not set +# CONFIG_USB_STKWEBCAM is not set +# CONFIG_USB_S2255 is not set +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +# CONFIG_RADIO_ADAPTERS is not set +# CONFIG_DAB is not set +CONFIG_HAVE_TI_TILER=y +# CONFIG_TI_TILER is not set + +# +# Graphics support +# +CONFIG_VGA_ARB=y +CONFIG_VGA_ARB_MAX_GPUS=16 +# CONFIG_DRM is not set +# CONFIG_STUB_POULSBO is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_CIRRUS is not set +# CONFIG_FB_PM2 is not set +# CONFIG_FB_CYBER2000 is not set +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_NVIDIA is not set +# CONFIG_FB_RIVA is not set +# CONFIG_FB_MATROX is not set +# CONFIG_FB_RADEON is not set +# CONFIG_FB_ATY128 is not set +# CONFIG_FB_ATY is not set +# CONFIG_FB_S3 is not set +# CONFIG_FB_SAVAGE is not set +# CONFIG_FB_SIS is not set +# CONFIG_FB_NEOMAGIC is not set +# CONFIG_FB_KYRO is not set +# CONFIG_FB_3DFX is not set +# CONFIG_FB_VOODOO1 is not set +# CONFIG_FB_VT8623 is not set +# CONFIG_FB_TRIDENT is not set +# CONFIG_FB_ARK is not set +# CONFIG_FB_PM3 is not set +# CONFIG_FB_CARMINE is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_TI81XX_VPSS is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set +# CONFIG_LOGO is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_JACK=y +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_HRTIMER is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +# CONFIG_SND_DRIVERS is not set +CONFIG_SND_PCI=y +# CONFIG_SND_AD1889 is not set +# CONFIG_SND_ALS300 is not set +# CONFIG_SND_ALI5451 is not set +# CONFIG_SND_ATIIXP is not set +# CONFIG_SND_ATIIXP_MODEM is not set +# CONFIG_SND_AU8810 is not set +# CONFIG_SND_AU8820 is not set +# CONFIG_SND_AU8830 is not set +# CONFIG_SND_AW2 is not set +# CONFIG_SND_AZT3328 is not set +# CONFIG_SND_BT87X is not set +# CONFIG_SND_CA0106 is not set +# CONFIG_SND_CMIPCI is not set +# CONFIG_SND_OXYGEN is not set +# CONFIG_SND_CS4281 is not set +# CONFIG_SND_CS46XX is not set +# CONFIG_SND_CS5535AUDIO is not set +# CONFIG_SND_CTXFI is not set +# CONFIG_SND_DARLA20 is not set +# CONFIG_SND_GINA20 is not set +# CONFIG_SND_LAYLA20 is not set +# CONFIG_SND_DARLA24 is not set +# CONFIG_SND_GINA24 is not set +# CONFIG_SND_LAYLA24 is not set +# CONFIG_SND_MONA is not set +# CONFIG_SND_MIA is not set +# CONFIG_SND_ECHO3G is not set +# CONFIG_SND_INDIGO is not set +# CONFIG_SND_INDIGOIO is not set +# CONFIG_SND_INDIGODJ is not set +# CONFIG_SND_INDIGOIOX is not set +# CONFIG_SND_INDIGODJX is not set +# CONFIG_SND_EMU10K1 is not set +# CONFIG_SND_EMU10K1X is not set +# CONFIG_SND_ENS1370 is not set +# CONFIG_SND_ENS1371 is not set +# CONFIG_SND_ES1938 is not set +# CONFIG_SND_ES1968 is not set +# CONFIG_SND_FM801 is not set +# CONFIG_SND_HDA_INTEL is not set +# CONFIG_SND_HDSP is not set +# CONFIG_SND_HDSPM is not set +# CONFIG_SND_HIFIER is not set +# CONFIG_SND_ICE1712 is not set +# CONFIG_SND_ICE1724 is not set +# CONFIG_SND_INTEL8X0 is not set +# CONFIG_SND_INTEL8X0M is not set +# CONFIG_SND_KORG1212 is not set +# CONFIG_SND_LX6464ES is not set +# CONFIG_SND_MAESTRO3 is not set +# CONFIG_SND_MIXART is not set +# CONFIG_SND_NM256 is not set +# CONFIG_SND_PCXHR is not set +# CONFIG_SND_RIPTIDE is not set +# CONFIG_SND_RME32 is not set +# CONFIG_SND_RME96 is not set +# CONFIG_SND_RME9652 is not set +# CONFIG_SND_SONICVIBES is not set +# CONFIG_SND_TRIDENT is not set +# CONFIG_SND_VIA82XX is not set +# CONFIG_SND_VIA82XX_MODEM is not set +# CONFIG_SND_VIRTUOSO is not set +# CONFIG_SND_VX222 is not set +# CONFIG_SND_YMFPCI is not set +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=y +# CONFIG_SND_USB_UA101 is not set +# CONFIG_SND_USB_CAIAQ is not set +CONFIG_SND_SOC=y +CONFIG_SND_TI81XX_SOC=y +CONFIG_SND_DAVINCI_SOC_MCASP=y +CONFIG_SND_TI81XX_SOC_EVM=y +# CONFIG_SND_OMAP_SOC is not set +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_TLV320AIC3X=y +# CONFIG_SOUND_PRIME is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +# CONFIG_USB_HIDDEV is not set + +# +# Special HID drivers +# +# CONFIG_HID_3M_PCT is not set +CONFIG_HID_A4TECH=y +# CONFIG_HID_ACRUX_FF is not set +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +# CONFIG_HID_CANDO is not set +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +# CONFIG_HID_PRODIKEYS is not set +CONFIG_HID_CYPRESS=y +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EGALAX is not set +CONFIG_HID_EZKEY=y +CONFIG_HID_KYE=y +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +# CONFIG_HID_GYRATION is not set +# CONFIG_HID_TWINHAN is not set +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LOGITECH=y +# CONFIG_LOGITECH_FF is not set +# CONFIG_LOGIRUMBLEPAD2_FF is not set +# CONFIG_LOGIG940_FF is not set +# CONFIG_LOGIWII_FF is not set +CONFIG_HID_MICROSOFT=y +# CONFIG_HID_MOSART is not set +CONFIG_HID_MONTEREY=y +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_ORTEK is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_QUANTA is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_ROCCAT_KONE is not set +# CONFIG_HID_ROCCAT_PYRA is not set +# CONFIG_HID_SAMSUNG is not set +# CONFIG_HID_SONY is not set +# CONFIG_HID_STANTUM is not set +# CONFIG_HID_SUNPLUS is not set +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +# CONFIG_HID_TOPSEED is not set +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +CONFIG_USB_DEVICE_CLASS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +CONFIG_USB_SUSPEND=y +# CONFIG_USB_OTG is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +# CONFIG_USB_XHCI_HCD is not set +# CONFIG_USB_EHCI_HCD is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_UHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_WHCI_HCD is not set +# CONFIG_USB_HWA_HCD is not set +CONFIG_USB_MUSB_HDRC=y + +# +# Platform Glue Layer +# +# CONFIG_USB_MUSB_TUSB6010_GLUE is not set +# CONFIG_USB_MUSB_OMAP2PLUS_GLUE is not set +# CONFIG_USB_MUSB_AM35X_GLUE is not set +CONFIG_USB_MUSB_TI81XX_GLUE=y +# CONFIG_USB_MUSB_DAVINCI is not set +# CONFIG_USB_MUSB_DA8XX is not set +# CONFIG_USB_MUSB_TUSB6010 is not set +# CONFIG_USB_MUSB_OMAP2PLUS is not set +# CONFIG_USB_MUSB_AM35X is not set +CONFIG_USB_MUSB_TI81XX=y +# CONFIG_USB_MUSB_BLACKFIN is not set +# CONFIG_USB_MUSB_UX500 is not set +CONFIG_USB_MUSB_HOST=y +CONFIG_USB_MUSB_HDRC_HCD=y +# CONFIG_MUSB_PIO_ONLY is not set +# CONFIG_USB_INVENTRA_DMA_HW is not set +# CONFIG_USB_TI_CPPI_DMA_HW is not set +CONFIG_USB_TI_CPPI41_DMA_HW=y +# CONFIG_USB_INVENTRA_DMA is not set +# CONFIG_USB_TI_CPPI_DMA is not set +CONFIG_USB_TI_CPPI41_DMA=y +# CONFIG_USB_TUSB_OMAP_DMA is not set +CONFIG_USB_MUSB_DEBUG=y + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_UAS is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +CONFIG_USB_OTG_UTILS=y +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ULPI is not set +CONFIG_NOP_USB_XCEIV=y +# CONFIG_UWB is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_OMAP is not set +CONFIG_MMC_OMAP_HS=y +# CONFIG_MMC_TIFM_SD is not set +# CONFIG_MMC_SPI is not set +# CONFIG_MMC_CB710 is not set +# CONFIG_MMC_VIA_SDMMC is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_INFINIBAND is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +# CONFIG_STAGING is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +# CONFIG_EXT4_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FILE_LOCKING=y +# CONFIG_FSNOTIFY is not set +# CONFIG_DNOTIFY is not set +# CONFIG_INOTIFY_USER is not set +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +CONFIG_JFFS2_FS_WBUF_VERIFY=y +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS2_LZO is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +# CONFIG_SQUASHFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +# CONFIG_NFS_V4 is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +# CONFIG_RPCSEC_GSS_KRB5 is not set +# CONFIG_CEPH_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_DETECT_HUNG_TASK is not set +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +CONFIG_BKL=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +CONFIG_DEBUG_MEMORY_INIT=y +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_KPROBES_SANITY_TEST is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_LKDTM is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_PAGE_POISONING is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_DEBUG_LL=y +CONFIG_EARLY_PRINTK=y +# CONFIG_DEBUG_ICEDCC is not set +# CONFIG_OC_ETM is not set + +# +# Security options +# +CONFIG_KEYS=y +CONFIG_KEYS_DEBUG_PROC_KEYS=y +# CONFIG_SECURITY_DMESG_RESTRICT is not set +CONFIG_SECURITY=y +# CONFIG_SECURITYFS is not set +CONFIG_SECURITY_NETWORK=y +# CONFIG_SECURITY_NETWORK_XFRM is not set +# CONFIG_SECURITY_PATH is not set +# CONFIG_SECURITY_TOMOYO is not set +# CONFIG_SECURITY_APPARMOR is not set +# CONFIG_IMA is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +# CONFIG_CRYPTO_MANAGER is not set +# CONFIG_CRYPTO_MANAGER2 is not set +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +# CONFIG_CRYPTO_CBC is not set +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +# CONFIG_CRYPTO_ECB is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_GHASH is not set +# CONFIG_CRYPTO_MD4 is not set +# CONFIG_CRYPTO_MD5 is not set +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +# CONFIG_CRYPTO_DES is not set +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_LAST_BIT=y +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +# CONFIG_CRC_T10DIF is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y diff --git a/recipes/linux/linux-omap3-2.6.37-psp04.01.00.03/ti814x/defconfig b/recipes/linux/linux-omap3-2.6.37-psp04.01.00.03/ti814x/defconfig new file mode 100644 index 0000000000..445ea14f4a --- /dev/null +++ b/recipes/linux/linux-omap3-2.6.37-psp04.01.00.03/ti814x/defconfig @@ -0,0 +1,1927 @@ +# +# Automatically generated make config: don't edit +# Linux/arm 2.6.37 Kernel Configuration +# Sat Feb 12 22:31:08 2011 +# +CONFIG_ARM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +# CONFIG_ARCH_USES_GETTIMEOFFSET is not set +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_ARM_L1_CACHE_SHIFT_6=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y +CONFIG_HAVE_IRQ_WORK=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_LZO is not set +# CONFIG_SWAP is not set +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set +# CONFIG_HAVE_GENERIC_HARDIRQS is not set +# CONFIG_SPARSE_IRQ is not set + +# +# RCU Subsystem +# +CONFIG_TINY_RCU=y +# CONFIG_PREEMPT_RCU is not set +# CONFIG_TREE_RCU_TRACE is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=17 +# CONFIG_CGROUPS is not set +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +# CONFIG_NET_NS is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_LZO=y +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +# CONFIG_EMBEDDED is not set +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_KALLSYMS_EXTRA_PASS=y +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +# CONFIG_PERF_EVENTS is not set +# CONFIG_PERF_COUNTERS is not set +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLUB_DEBUG=y +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +CONFIG_KPROBES=y +CONFIG_KRETPROBES=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +CONFIG_MODVERSIONS=y +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_BLOCK=y +# CONFIG_LBDAF is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +CONFIG_INLINE_SPIN_UNLOCK=y +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +CONFIG_INLINE_SPIN_UNLOCK_IRQ=y +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +CONFIG_INLINE_READ_UNLOCK=y +# CONFIG_INLINE_READ_UNLOCK_BH is not set +CONFIG_INLINE_READ_UNLOCK_IRQ=y +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +CONFIG_INLINE_WRITE_UNLOCK=y +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +CONFIG_INLINE_WRITE_UNLOCK_IRQ=y +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +# CONFIG_MUTEX_SPIN_ON_OWNER is not set +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCMRING is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_STMP3XXX is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_NUC93X is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5P6442 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_S5PV310 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_TCC_926 is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_DAVINCI is not set +CONFIG_ARCH_OMAP=y +# CONFIG_PLAT_SPEAR is not set + +# +# TI OMAP Common Features +# +# CONFIG_ARCH_OMAP1 is not set +CONFIG_ARCH_OMAP2PLUS=y + +# +# OMAP Feature Selections +# +# CONFIG_OMAP_RESET_CLOCKS is not set +CONFIG_OMAP_MUX=y +# CONFIG_OMAP_MUX_DEBUG is not set +CONFIG_OMAP_MUX_WARNINGS=y +# CONFIG_OMAP_MCBSP is not set +# CONFIG_OMAP_MBOX_FWK is not set +CONFIG_OMAP_IOMMU=y +# CONFIG_OMAP_IOMMU_DEBUG is not set +CONFIG_OMAP_MPU_TIMER=y +# CONFIG_OMAP_32K_TIMER is not set +CONFIG_OMAP_DM_TIMER=y +# CONFIG_OMAP_PM_NONE is not set +CONFIG_OMAP_PM_NOOP=y + +# +# TI OMAP2/3/4 Specific Features +# +CONFIG_ARCH_OMAP2PLUS_TYPICAL=y +# CONFIG_ARCH_OMAP2 is not set +# CONFIG_ARCH_OMAP3 is not set +# CONFIG_ARCH_OMAP4 is not set +CONFIG_ARCH_TI81XX=y +# CONFIG_ARCH_TI816X is not set +CONFIG_ARCH_TI814X=y + +# +# OMAP Board Type +# + +# +# TI81XX Board Type +# +CONFIG_MACH_TI8148EVM=y + +# +# Processor Type +# +CONFIG_CPU_32v6K=y +CONFIG_CPU_V7=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_ARM_THUMBEE is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_ARM_L1_CACHE_SHIFT=6 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_CPU_HAS_PMU=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_743622 is not set +CONFIG_COMMON_CLKDEV=y + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +CONFIG_ARCH_SUPPORTS_MSI=y +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PREEMPT_NONE=y +# CONFIG_PREEMPT_VOLUNTARY is not set +# CONFIG_PREEMPT is not set +CONFIG_HZ=100 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +CONFIG_OABI_COMPAT=y +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_HIGHMEM is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_NEED_PER_CPU_KM=y +CONFIG_FORCE_MAX_ZONEORDER=11 +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_DEPRECATED_PARAM_STRUCT is not set + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0 +CONFIG_ZBOOT_ROM_BSS=0 +CONFIG_CMDLINE="" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# +# CONFIG_CPU_FREQ is not set +# CONFIG_CPU_IDLE is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_FPE_NWFPE=y +# CONFIG_FPE_NWFPE_XP is not set +# CONFIG_FPE_FASTFPE is not set +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +CONFIG_BINFMT_MISC=y + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_DEBUG=y +# CONFIG_PM_ADVANCED_DEBUG is not set +CONFIG_PM_VERBOSE=y +# CONFIG_SUSPEND is not set +# CONFIG_APM_EMULATION is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM_OPS=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=m +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETLABEL is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_NET_TCPPROBE is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +# CONFIG_CFG80211 is not set +# CONFIG_LIB80211 is not set + +# +# CFG80211 needs to be enabled for MAC80211 +# + +# +# Some wireless drivers require a rate control algorithm +# +# CONFIG_WIMAX is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_TESTS is not set +CONFIG_MTD_CONCAT=y +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_SM_FTL is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +# CONFIG_MTD_CFI is not set +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +# CONFIG_MTD_RAM is not set +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +# CONFIG_MTD_PLATRAM is not set + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +CONFIG_MTD_M25P80=y +CONFIG_M25PXX_USE_FAST_READ=y +# CONFIG_MTD_SST25L is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND_ECC=y +# CONFIG_MTD_NAND_ECC_SMC is not set +CONFIG_MTD_NAND=y +CONFIG_MTD_NAND_VERIFY_WRITE=y +# CONFIG_MTD_SM_COMMON is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_OMAP2=y +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set +# CONFIG_MTD_UBI is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +# CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=32768 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set +CONFIG_MISC_DEVICES=y +# CONFIG_AD525X_DPOT is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +# CONFIG_BMP085 is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +CONFIG_EEPROM_AT24=y +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +# CONFIG_EEPROM_93CX6 is not set +# CONFIG_IWMC3200TOP is not set + +# +# Texas Instruments shared transport line discipline +# +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=y +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +CONFIG_ATA=y +# CONFIG_ATA_NONSTANDARD is not set +CONFIG_ATA_VERBOSE_ERROR=y +CONFIG_SATA_PMP=y + +# +# Controllers with non-SFF native interface +# +CONFIG_SATA_AHCI_PLATFORM=y +# CONFIG_ATA_SFF is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +CONFIG_MII=y +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_BCM63XX_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +# CONFIG_NET_ETHERNET is not set +CONFIG_NETDEV_1000=y +CONFIG_TI_DAVINCI_MDIO=y +CONFIG_TI_DAVINCI_CPDMA=y +CONFIG_TI_CPSW=y +# CONFIG_STMMAC_ETH is not set +# CONFIG_NETDEV_10000 is not set +# CONFIG_WLAN is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=y +# CONFIG_USB_NET_AX8817X is not set +CONFIG_USB_NET_CDCETHER=y +# CONFIG_USB_NET_CDC_EEM is not set +CONFIG_USB_NET_DM9601=y +# CONFIG_USB_NET_SMSC75XX is not set +# CONFIG_USB_NET_SMSC95XX is not set +# CONFIG_USB_NET_GL620A is not set +# CONFIG_USB_NET_NET1080 is not set +# CONFIG_USB_NET_PLUSB is not set +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +# CONFIG_USB_NET_CDC_SUBSET is not set +# CONFIG_USB_NET_ZAURUS is not set +# CONFIG_USB_NET_CX82310_ETH is not set +# CONFIG_USB_NET_INT51X1 is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_USB_SIERRA_NET is not set +# CONFIG_WAN is not set + +# +# CAIF transport drivers +# +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV is not set +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_DEVKMEM=y +CONFIG_SERIAL_NONSTANDARD=y +# CONFIG_N_HDLC is not set +# CONFIG_N_GSM is not set +# CONFIG_RISCOM8 is not set +# CONFIG_SPECIALIX is not set +# CONFIG_STALDRV is not set + +# +# Serial drivers +# +CONFIG_SERIAL_8250=y +CONFIG_SERIAL_8250_CONSOLE=y +CONFIG_SERIAL_8250_NR_UARTS=64 +CONFIG_SERIAL_8250_RUNTIME_UARTS=4 +CONFIG_SERIAL_8250_EXTENDED=y +# CONFIG_SERIAL_8250_MANY_PORTS is not set +CONFIG_SERIAL_8250_SHARE_IRQ=y +CONFIG_SERIAL_8250_DETECT_IRQ=y +CONFIG_SERIAL_8250_RSA=y + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX3107 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_OMAP=y +CONFIG_SERIAL_OMAP_CONSOLE=y +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_TI81XX_HDMI is not set +# CONFIG_RAMOOPS is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_DESIGNWARE is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +CONFIG_I2C_OMAP=y +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_GPIO is not set +CONFIG_SPI_OMAP24XX=y +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +# CONFIG_SPI_SPIDEV is not set +# CONFIG_SPI_TLE62X0 is not set + +# +# PPS support +# +# CONFIG_PPS is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set +# CONFIG_GPIO_SYSFS is not set + +# +# Memory mapped GPIO expanders: +# +# CONFIG_GPIO_BASIC_MMIO is not set +# CONFIG_GPIO_IT8761E is not set +# CONFIG_GPIO_VX855 is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_ADP5588 is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_74X164 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# +# CONFIG_W1 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set +# CONFIG_THERMAL is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +CONFIG_OMAP_WATCHDOG=y +# CONFIG_MAX63XX_WATCHDOG is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_SDIOHOST_POSSIBLE=y +# CONFIG_SSB_SDIOHOST is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_MFD_SUPPORT=y +# CONFIG_MFD_CORE is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC35892 is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_MC13XXX is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_MFD_TPS6586X is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +CONFIG_REGULATOR_DUMMY=y +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_BQ24022 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_AD5398 is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +# CONFIG_MEDIA_CONTROLLER is not set +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_COMMON=y +CONFIG_VIDEO_ALLOW_V4L1=y +CONFIG_VIDEO_V4L1_COMPAT=y +# CONFIG_DVB_CORE is not set +CONFIG_VIDEO_MEDIA=y + +# +# Multimedia drivers +# +# CONFIG_IR_CORE is not set +# CONFIG_MEDIA_ATTACH is not set +CONFIG_MEDIA_TUNER=y +# CONFIG_MEDIA_TUNER_CUSTOMISE is not set +CONFIG_MEDIA_TUNER_SIMPLE=y +CONFIG_MEDIA_TUNER_TDA8290=y +CONFIG_MEDIA_TUNER_TDA827X=y +CONFIG_MEDIA_TUNER_TDA18271=y +CONFIG_MEDIA_TUNER_TDA9887=y +CONFIG_MEDIA_TUNER_TEA5761=y +CONFIG_MEDIA_TUNER_TEA5767=y +CONFIG_MEDIA_TUNER_MT20XX=y +CONFIG_MEDIA_TUNER_XC2028=y +CONFIG_MEDIA_TUNER_XC5000=y +CONFIG_MEDIA_TUNER_MC44S803=y +CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L1=y +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set + +# +# Encoders/decoders and other helper chips +# + +# +# Audio decoders +# +# CONFIG_VIDEO_TVAUDIO is not set +# CONFIG_VIDEO_TDA7432 is not set +# CONFIG_VIDEO_TDA9840 is not set +# CONFIG_VIDEO_TDA9875 is not set +# CONFIG_VIDEO_TEA6415C is not set +# CONFIG_VIDEO_TEA6420 is not set +# CONFIG_VIDEO_MSP3400 is not set +# CONFIG_VIDEO_CS5345 is not set +# CONFIG_VIDEO_CS53L32A is not set +# CONFIG_VIDEO_M52790 is not set +# CONFIG_VIDEO_TLV320AIC23B is not set +# CONFIG_VIDEO_WM8775 is not set +# CONFIG_VIDEO_WM8739 is not set +# CONFIG_VIDEO_VP27SMPX is not set + +# +# RDS decoders +# +# CONFIG_VIDEO_SAA6588 is not set + +# +# Video decoders +# +# CONFIG_VIDEO_ADV7180 is not set +# CONFIG_VIDEO_BT819 is not set +# CONFIG_VIDEO_BT856 is not set +# CONFIG_VIDEO_BT866 is not set +# CONFIG_VIDEO_KS0127 is not set +# CONFIG_VIDEO_OV7670 is not set +# CONFIG_VIDEO_MT9T001 is not set +# CONFIG_VIDEO_MT9V011 is not set +# CONFIG_VIDEO_MT9V113 is not set +# CONFIG_VIDEO_TCM825X is not set +# CONFIG_VIDEO_SAA7110 is not set +# CONFIG_VIDEO_SAA711X is not set +# CONFIG_VIDEO_SAA717X is not set +# CONFIG_VIDEO_SAA7191 is not set +# CONFIG_VIDEO_TVP514X is not set +# CONFIG_VIDEO_TVP5150 is not set +# CONFIG_VIDEO_TVP7002 is not set +# CONFIG_VIDEO_VPX3220 is not set + +# +# Video and audio decoders +# +# CONFIG_VIDEO_CX25840 is not set + +# +# MPEG video encoders +# +# CONFIG_VIDEO_CX2341X is not set + +# +# Video encoders +# +# CONFIG_VIDEO_SAA7127 is not set +# CONFIG_VIDEO_SAA7185 is not set +# CONFIG_VIDEO_ADV7170 is not set +# CONFIG_VIDEO_ADV7175 is not set +# CONFIG_VIDEO_THS7303 is not set +# CONFIG_VIDEO_ADV7343 is not set +# CONFIG_VIDEO_AK881X is not set + +# +# Video improvement chips +# +# CONFIG_VIDEO_UPD64031A is not set +# CONFIG_VIDEO_UPD64083 is not set +# CONFIG_VIDEO_CPIA2 is not set +# CONFIG_VIDEO_SR030PC30 is not set +# CONFIG_SOC_CAMERA is not set +CONFIG_V4L_USB_DRIVERS=y +CONFIG_USB_VIDEO_CLASS=y +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +# CONFIG_USB_GSPCA is not set +# CONFIG_VIDEO_PVRUSB2 is not set +# CONFIG_VIDEO_HDPVR is not set +# CONFIG_VIDEO_USBVISION is not set +# CONFIG_USB_VICAM is not set +# CONFIG_USB_IBMCAM is not set +# CONFIG_USB_KONICAWC is not set +# CONFIG_USB_ET61X251 is not set +# CONFIG_USB_SE401 is not set +# CONFIG_USB_SN9C102 is not set +# CONFIG_USB_PWC is not set +# CONFIG_USB_ZR364XX is not set +# CONFIG_USB_STKWEBCAM is not set +# CONFIG_USB_S2255 is not set +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +# CONFIG_RADIO_ADAPTERS is not set +# CONFIG_DAB is not set +CONFIG_HAVE_TI_TILER=y +# CONFIG_TI_TILER is not set + +# +# Graphics support +# +# CONFIG_DRM is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_TI81XX_VPSS is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set +# CONFIG_LOGO is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_JACK=y +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_HRTIMER is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=y +# CONFIG_SND_USB_UA101 is not set +# CONFIG_SND_USB_CAIAQ is not set +CONFIG_SND_SOC=y +CONFIG_SND_TI81XX_SOC=y +CONFIG_SND_DAVINCI_SOC_MCASP=y +CONFIG_SND_TI81XX_SOC_EVM=y +# CONFIG_SND_OMAP_SOC is not set +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_TLV320AIC3X=y +# CONFIG_SOUND_PRIME is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +# CONFIG_USB_HIDDEV is not set + +# +# Special HID drivers +# +# CONFIG_HID_3M_PCT is not set +CONFIG_HID_A4TECH=y +# CONFIG_HID_ACRUX_FF is not set +CONFIG_HID_APPLE=y +CONFIG_HID_BELKIN=y +# CONFIG_HID_CANDO is not set +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +# CONFIG_HID_PRODIKEYS is not set +CONFIG_HID_CYPRESS=y +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EGALAX is not set +CONFIG_HID_EZKEY=y +CONFIG_HID_KYE=y +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +# CONFIG_HID_GYRATION is not set +# CONFIG_HID_TWINHAN is not set +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LOGITECH=y +# CONFIG_LOGITECH_FF is not set +# CONFIG_LOGIRUMBLEPAD2_FF is not set +# CONFIG_LOGIG940_FF is not set +# CONFIG_LOGIWII_FF is not set +CONFIG_HID_MICROSOFT=y +# CONFIG_HID_MOSART is not set +CONFIG_HID_MONTEREY=y +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_ORTEK is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_QUANTA is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_ROCCAT_KONE is not set +# CONFIG_HID_ROCCAT_PYRA is not set +# CONFIG_HID_SAMSUNG is not set +# CONFIG_HID_SONY is not set +# CONFIG_HID_STANTUM is not set +# CONFIG_HID_SUNPLUS is not set +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +# CONFIG_HID_TOPSEED is not set +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +# CONFIG_USB_ARCH_HAS_EHCI is not set +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +CONFIG_USB_DEVICE_CLASS=y +# CONFIG_USB_DYNAMIC_MINORS is not set +CONFIG_USB_SUSPEND=y +# CONFIG_USB_OTG is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HWA_HCD is not set +CONFIG_USB_MUSB_HDRC=y + +# +# Platform Glue Layer +# +# CONFIG_USB_MUSB_TUSB6010_GLUE is not set +# CONFIG_USB_MUSB_OMAP2PLUS_GLUE is not set +# CONFIG_USB_MUSB_AM35X_GLUE is not set +CONFIG_USB_MUSB_TI81XX_GLUE=y +# CONFIG_USB_MUSB_DAVINCI is not set +# CONFIG_USB_MUSB_DA8XX is not set +# CONFIG_USB_MUSB_TUSB6010 is not set +# CONFIG_USB_MUSB_OMAP2PLUS is not set +# CONFIG_USB_MUSB_AM35X is not set +CONFIG_USB_MUSB_TI81XX=y +# CONFIG_USB_MUSB_BLACKFIN is not set +# CONFIG_USB_MUSB_UX500 is not set +CONFIG_USB_MUSB_HOST=y +CONFIG_USB_MUSB_HDRC_HCD=y +# CONFIG_MUSB_PIO_ONLY is not set +# CONFIG_USB_INVENTRA_DMA_HW is not set +# CONFIG_USB_TI_CPPI_DMA_HW is not set +CONFIG_USB_TI_CPPI41_DMA_HW=y +# CONFIG_USB_INVENTRA_DMA is not set +# CONFIG_USB_TI_CPPI_DMA is not set +CONFIG_USB_TI_CPPI41_DMA=y +# CONFIG_USB_TUSB_OMAP_DMA is not set +CONFIG_USB_MUSB_DEBUG=y + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_UAS is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +# CONFIG_USB_GADGET is not set + +# +# OTG and related infrastructure +# +CONFIG_USB_OTG_UTILS=y +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ULPI is not set +CONFIG_NOP_USB_XCEIV=y +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=8 +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_OMAP is not set +CONFIG_MMC_OMAP_HS=y +# CONFIG_MMC_SPI is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MEMSTICK is not set +# CONFIG_NEW_LEDS is not set +# CONFIG_ACCESSIBILITY is not set +CONFIG_RTC_LIB=y +# CONFIG_RTC_CLASS is not set +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +# CONFIG_STAGING is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +CONFIG_EXT2_FS_XATTR=y +CONFIG_EXT2_FS_POSIX_ACL=y +CONFIG_EXT2_FS_SECURITY=y +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_EXT3_FS_XATTR=y +CONFIG_EXT3_FS_POSIX_ACL=y +CONFIG_EXT3_FS_SECURITY=y +# CONFIG_EXT4_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FILE_LOCKING=y +# CONFIG_FSNOTIFY is not set +# CONFIG_DNOTIFY is not set +# CONFIG_INOTIFY_USER is not set +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +# CONFIG_JOLIET is not set +# CONFIG_ZISOFS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +CONFIG_JFFS2_FS_WBUF_VERIFY=y +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS2_LZO is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +# CONFIG_SQUASHFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_NEW_IDMAPPER is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_CEPH_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=1024 +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_DETECT_HUNG_TASK is not set +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +CONFIG_BKL=y +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +CONFIG_DEBUG_MEMORY_INIT=y +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_KPROBES_SANITY_TEST is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_LKDTM is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_PAGE_POISONING is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_DEBUG_LL=y +CONFIG_EARLY_PRINTK=y +# CONFIG_DEBUG_ICEDCC is not set +# CONFIG_OC_ETM is not set + +# +# Security options +# +CONFIG_KEYS=y +CONFIG_KEYS_DEBUG_PROC_KEYS=y +# CONFIG_SECURITY_DMESG_RESTRICT is not set +CONFIG_SECURITY=y +# CONFIG_SECURITYFS is not set +CONFIG_SECURITY_NETWORK=y +# CONFIG_SECURITY_NETWORK_XFRM is not set +# CONFIG_SECURITY_PATH is not set +# CONFIG_SECURITY_TOMOYO is not set +# CONFIG_SECURITY_APPARMOR is not set +# CONFIG_IMA is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +# CONFIG_CRYPTO_ECB is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_GHASH is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_LAST_BIT=y +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +# CONFIG_CRC_T10DIF is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y diff --git a/recipes/linux/linux-omap3_2.6.37-psp04.00.00.10.bb b/recipes/linux/linux-omap3_2.6.37-psp04.00.00.10.bb new file mode 100644 index 0000000000..fdf67eba74 --- /dev/null +++ b/recipes/linux/linux-omap3_2.6.37-psp04.00.00.10.bb @@ -0,0 +1,10 @@ +require linux-omap3.inc + +COMPATIBLE_MACHINE = "ti816x" + +KVER = "2.6.37" +PSPREL = "04.00.00.10" + +BRANCH = "ti81xx-master" +# Use literal tags in SRCREV, when available, instead of commit IDs +SRCREV = "v2.6.37_TI816XPSP_04.00.00.10" diff --git a/recipes/linux/linux-omap3_2.6.37-psp04.01.00.03.bb b/recipes/linux/linux-omap3_2.6.37-psp04.01.00.03.bb new file mode 100644 index 0000000000..418c7d508a --- /dev/null +++ b/recipes/linux/linux-omap3_2.6.37-psp04.01.00.03.bb @@ -0,0 +1,10 @@ +require linux-omap3.inc + +COMPATIBLE_MACHINE = "ti814x" + +KVER = "2.6.37" +PSPREL = "04.01.00.03" + +BRANCH = "ti81xx-master" +# Use literal tags in SRCREV, when available, instead of commit IDs +SRCREV = "v2.6.37_TI814XPSP_04.01.00.03" diff --git a/recipes/linux/linux-omap4/am45x-evm/defconfig b/recipes/linux/linux-omap4/am45x-evm/defconfig new file mode 100644 index 0000000000..ed706a6ce6 --- /dev/null +++ b/recipes/linux/linux-omap4/am45x-evm/defconfig @@ -0,0 +1,2950 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.35.3 +# Mon Jan 24 17:29:10 2011 +# +CONFIG_ARM=y +CONFIG_HAVE_PWM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +# CONFIG_ARCH_USES_GETTIMEOFFSET is not set +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_LOCKBREAK=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +# CONFIG_INIT_PASS_ALL_PARAMS is not set +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_BZIP2 is not set +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_LZO is not set +CONFIG_VERSION_SIGNATURE="" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +# CONFIG_POSIX_MQUEUE is not set +CONFIG_BSD_PROCESS_ACCT=y +# CONFIG_BSD_PROCESS_ACCT_V3 is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set + +# +# RCU Subsystem +# +CONFIG_TREE_RCU=y +# CONFIG_TREE_PREEMPT_RCU is not set +# CONFIG_TINY_RCU is not set +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_RCU_FAST_NO_HZ is not set +# CONFIG_TREE_RCU_TRACE is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +# CONFIG_CGROUPS is not set +# CONFIG_SYSFS_DEPRECATED_V2 is not set +# CONFIG_RELAY is not set +# CONFIG_NAMESPACES is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_LZO is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +# CONFIG_ELF_CORE is not set +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +# CONFIG_PERF_EVENTS is not set +# CONFIG_PERF_COUNTERS is not set +CONFIG_VM_EVENT_COUNTERS=y +CONFIG_SLUB_DEBUG=y +CONFIG_COMPAT_BRK=y +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_HAVE_CLK=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_SLOW_WORK=y +# CONFIG_SLOW_WORK_DEBUG is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +CONFIG_BLK_DEV_INTEGRITY=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +# CONFIG_INLINE_WRITE_UNLOCK is not set +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +CONFIG_MUTEX_SPIN_ON_OWNER=y +CONFIG_FREEZER=y + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCMRING is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +# CONFIG_ARCH_MXC is not set +# CONFIG_ARCH_STMP3XXX is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_NUC93X is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P6440 is not set +# CONFIG_ARCH_S5P6442 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_DAVINCI is not set +CONFIG_ARCH_OMAP=y +# CONFIG_PLAT_SPEAR is not set + +# +# TI OMAP Implementations +# +# CONFIG_ARCH_OMAP1 is not set +CONFIG_ARCH_OMAP2PLUS=y +# CONFIG_ARCH_OMAP2 is not set +# CONFIG_ARCH_OMAP3 is not set +CONFIG_ARCH_OMAP4=y + +# +# OMAP Feature Selections +# +CONFIG_OMAP_SMARTREFLEX=y +# CONFIG_OMAP_SMARTREFLEX_TESTING is not set +CONFIG_OMAP_SMARTREFLEX_CLASS3=y +CONFIG_OMAP_RESET_CLOCKS=y +# CONFIG_OMAP_MUX is not set +CONFIG_OMAP_MCBSP=y +CONFIG_OMAP_MBOX_FWK=y +CONFIG_OMAP_REMOTE_PROC=y +CONFIG_OMAP_IOMMU=y +CONFIG_OMAP_USER_DMM=y +# CONFIG_OMAP_IOMMU_DEBUG is not set +# CONFIG_OMAP_MPU_TIMER is not set +CONFIG_OMAP_32K_TIMER=y +CONFIG_OMAP_32K_TIMER_HZ=128 +CONFIG_OMAP_DM_TIMER=y +# CONFIG_OMAP_PM_NONE is not set +# CONFIG_OMAP_PM_NOOP is not set +CONFIG_OMAP_PM=y + +# +# OMAP Board Type +# +CONFIG_WIFI_CONTROL_FUNC=y +CONFIG_TIWLAN_SDIO=y +CONFIG_TIWLAN_MMC_CONTROLLER=5 +# CONFIG_OMAP4_ES1 is not set +CONFIG_MACH_OMAP_4430SDP=y +CONFIG_MACH_OMAP4_PANDA=y +# CONFIG_ERRATA_OMAP4_AXI2OCP is not set +# CONFIG_ENABLE_L3_ERRORS is not set + +# +# Processor Type +# +CONFIG_CPU_32v6K=y +CONFIG_CPU_V7=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +CONFIG_ARM_THUMBEE=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_HAS_TLS_REG=y +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_CACHE_L2X0=y +CONFIG_CACHE_PL310=y +CONFIG_ARM_L1_CACHE_SHIFT=5 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +# CONFIG_USER_L2_PLE is not set +CONFIG_USER_PMON=y +CONFIG_CPU_HAS_PMU=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_PL310_ERRATA_588369 is not set +CONFIG_ARM_ERRATA_720789=y +CONFIG_ARM_GIC=y +CONFIG_COMMON_CLKDEV=y + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_SMP=y +CONFIG_HAVE_ARM_SCU=y +CONFIG_HAVE_ARM_TWD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_NR_CPUS=2 +CONFIG_HOTPLUG_CPU=y +CONFIG_LOCAL_TIMERS=y +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_HZ=128 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HIGHMEM=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +# CONFIG_LEDS is not set +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_CC_STACKPROTECTOR is not set +CONFIG_CPU_V7_SYSFS=y + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE=" debug " +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +CONFIG_KEXEC=y +CONFIG_ATAGS_PROC=y + +# +# CPU Power Management +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_DEBUG is not set +CONFIG_CPU_FREQ_STAT=y +CONFIG_CPU_FREQ_STAT_DETAILS=y +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_GOV_LADDER=y +CONFIG_CPU_IDLE_GOV_MENU=y + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_HAVE_AOUT=y +CONFIG_BINFMT_AOUT=y +CONFIG_BINFMT_MISC=y + +# +# Power management options +# +CONFIG_PM=y +CONFIG_PM_DEBUG=y +# CONFIG_PM_ADVANCED_DEBUG is not set +# CONFIG_PM_VERBOSE is not set +CONFIG_CAN_PM_TRACE=y +CONFIG_PM_SLEEP_SMP=y +CONFIG_PM_SLEEP=y +CONFIG_SUSPEND_NVS=y +CONFIG_SUSPEND=y +# CONFIG_PM_TEST_SUSPEND is not set +CONFIG_SUSPEND_FREEZER=y +# CONFIG_APM_EMULATION is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM_OPS=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +CONFIG_XFRM=y +# CONFIG_XFRM_USER is not set +# CONFIG_XFRM_SUB_POLICY is not set +# CONFIG_XFRM_MIGRATE is not set +# CONFIG_XFRM_STATISTICS is not set +CONFIG_XFRM_IPCOMP=m +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_ASK_IP_FIB_HASH=y +# CONFIG_IP_FIB_TRIE is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=m +CONFIG_NET_IPGRE=m +# CONFIG_NET_IPGRE_BROADCAST is not set +CONFIG_IP_MROUTE=y +# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set +# CONFIG_IP_PIMSM_V1 is not set +# CONFIG_IP_PIMSM_V2 is not set +CONFIG_ARPD=y +CONFIG_SYN_COOKIES=y +CONFIG_INET_AH=m +CONFIG_INET_ESP=m +CONFIG_INET_IPCOMP=m +CONFIG_INET_XFRM_TUNNEL=m +CONFIG_INET_TUNNEL=m +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_LRO=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=m +CONFIG_TCP_CONG_CUBIC=y +CONFIG_TCP_CONG_WESTWOOD=m +CONFIG_TCP_CONG_HTCP=m +CONFIG_TCP_CONG_HSTCP=m +CONFIG_TCP_CONG_HYBLA=m +CONFIG_TCP_CONG_VEGAS=m +CONFIG_TCP_CONG_SCALABLE=m +CONFIG_TCP_CONG_LP=m +CONFIG_TCP_CONG_VENO=m +CONFIG_TCP_CONG_YEAH=m +CONFIG_TCP_CONG_ILLINOIS=m +# CONFIG_DEFAULT_BIC is not set +CONFIG_DEFAULT_CUBIC=y +# CONFIG_DEFAULT_HTCP is not set +# CONFIG_DEFAULT_HYBLA is not set +# CONFIG_DEFAULT_VEGAS is not set +# CONFIG_DEFAULT_VENO is not set +# CONFIG_DEFAULT_WESTWOOD is not set +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=m +CONFIG_IPV6_PRIVACY=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=m +CONFIG_INET6_ESP=m +CONFIG_INET6_IPCOMP=m +CONFIG_IPV6_MIP6=m +CONFIG_INET6_XFRM_TUNNEL=m +CONFIG_INET6_TUNNEL=m +CONFIG_INET6_XFRM_MODE_TRANSPORT=m +CONFIG_INET6_XFRM_MODE_TUNNEL=m +CONFIG_INET6_XFRM_MODE_BEET=m +CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m +CONFIG_IPV6_SIT=m +CONFIG_IPV6_SIT_6RD=y +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=m +CONFIG_IPV6_MULTIPLE_TABLES=y +CONFIG_IPV6_SUBTREES=y +CONFIG_IPV6_MROUTE=y +CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y +CONFIG_IPV6_PIMSM_V2=y +# CONFIG_NETWORK_SECMARK is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y +CONFIG_BRIDGE_NETFILTER=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_QUEUE=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CT_ACCT=y +CONFIG_NF_CONNTRACK_MARK=y +CONFIG_NF_CONNTRACK_EVENTS=y +CONFIG_NF_CT_PROTO_DCCP=m +CONFIG_NF_CT_PROTO_GRE=m +CONFIG_NF_CT_PROTO_SCTP=m +CONFIG_NF_CT_PROTO_UDPLITE=m +CONFIG_NF_CONNTRACK_AMANDA=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_H323=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_NETBIOS_NS=m +CONFIG_NF_CONNTRACK_PPTP=m +CONFIG_NF_CONNTRACK_SANE=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CONNTRACK_TFTP=m +CONFIG_NF_CT_NETLINK=m +# CONFIG_NETFILTER_TPROXY is not set +CONFIG_NETFILTER_XTABLES=m + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=m +CONFIG_NETFILTER_XT_CONNMARK=m + +# +# Xtables targets +# +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m +CONFIG_NETFILTER_XT_TARGET_CONNMARK=m +# CONFIG_NETFILTER_XT_TARGET_CT is not set +# CONFIG_NETFILTER_XT_TARGET_DSCP is not set +CONFIG_NETFILTER_XT_TARGET_HL=m +CONFIG_NETFILTER_XT_TARGET_LED=m +CONFIG_NETFILTER_XT_TARGET_MARK=m +CONFIG_NETFILTER_XT_TARGET_NFLOG=m +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +CONFIG_NETFILTER_XT_TARGET_RATEEST=m +CONFIG_NETFILTER_XT_TARGET_TEE=m +# CONFIG_NETFILTER_XT_TARGET_TRACE is not set +CONFIG_NETFILTER_XT_TARGET_TCPMSS=m +# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set + +# +# Xtables matches +# +CONFIG_NETFILTER_XT_MATCH_CLUSTER=m +CONFIG_NETFILTER_XT_MATCH_COMMENT=m +CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m +CONFIG_NETFILTER_XT_MATCH_CONNMARK=m +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m +CONFIG_NETFILTER_XT_MATCH_DCCP=m +CONFIG_NETFILTER_XT_MATCH_DSCP=m +CONFIG_NETFILTER_XT_MATCH_ESP=m +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m +CONFIG_NETFILTER_XT_MATCH_HELPER=m +CONFIG_NETFILTER_XT_MATCH_HL=m +CONFIG_NETFILTER_XT_MATCH_IPRANGE=m +CONFIG_NETFILTER_XT_MATCH_LENGTH=m +CONFIG_NETFILTER_XT_MATCH_LIMIT=m +CONFIG_NETFILTER_XT_MATCH_MAC=m +CONFIG_NETFILTER_XT_MATCH_MARK=m +CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m +CONFIG_NETFILTER_XT_MATCH_OSF=m +CONFIG_NETFILTER_XT_MATCH_OWNER=m +CONFIG_NETFILTER_XT_MATCH_POLICY=m +# CONFIG_NETFILTER_XT_MATCH_PHYSDEV is not set +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m +CONFIG_NETFILTER_XT_MATCH_QUOTA=m +CONFIG_NETFILTER_XT_MATCH_RATEEST=m +CONFIG_NETFILTER_XT_MATCH_REALM=m +CONFIG_NETFILTER_XT_MATCH_RECENT=m +CONFIG_NETFILTER_XT_MATCH_SCTP=m +CONFIG_NETFILTER_XT_MATCH_STATE=m +CONFIG_NETFILTER_XT_MATCH_STATISTIC=m +CONFIG_NETFILTER_XT_MATCH_STRING=m +CONFIG_NETFILTER_XT_MATCH_TCPMSS=m +CONFIG_NETFILTER_XT_MATCH_TIME=m +CONFIG_NETFILTER_XT_MATCH_U32=m +CONFIG_IP_VS=m +CONFIG_IP_VS_IPV6=y +CONFIG_IP_VS_DEBUG=y +CONFIG_IP_VS_TAB_BITS=12 + +# +# IPVS transport protocol load balancing support +# +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_PROTO_AH_ESP=y +CONFIG_IP_VS_PROTO_ESP=y +CONFIG_IP_VS_PROTO_AH=y +CONFIG_IP_VS_PROTO_SCTP=y + +# +# IPVS scheduler +# +CONFIG_IP_VS_RR=m +CONFIG_IP_VS_WRR=m +CONFIG_IP_VS_LC=m +CONFIG_IP_VS_WLC=m +CONFIG_IP_VS_LBLC=m +CONFIG_IP_VS_LBLCR=m +CONFIG_IP_VS_DH=m +CONFIG_IP_VS_SH=m +CONFIG_IP_VS_SED=m +CONFIG_IP_VS_NQ=m + +# +# IPVS application helper +# +CONFIG_IP_VS_FTP=m + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_CONNTRACK_IPV4=m +CONFIG_NF_CONNTRACK_PROC_COMPAT=y +CONFIG_IP_NF_QUEUE=m +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_MATCH_ADDRTYPE=m +CONFIG_IP_NF_MATCH_AH=m +CONFIG_IP_NF_MATCH_ECN=m +CONFIG_IP_NF_MATCH_TTL=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +CONFIG_IP_NF_TARGET_ULOG=m +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_IP_NF_TARGET_NETMAP=m +CONFIG_IP_NF_TARGET_REDIRECT=m +CONFIG_NF_NAT_SNMP_BASIC=m +CONFIG_NF_NAT_PROTO_DCCP=m +CONFIG_NF_NAT_PROTO_GRE=m +CONFIG_NF_NAT_PROTO_UDPLITE=m +CONFIG_NF_NAT_PROTO_SCTP=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +CONFIG_NF_NAT_TFTP=m +CONFIG_NF_NAT_AMANDA=m +CONFIG_NF_NAT_PPTP=m +CONFIG_NF_NAT_H323=m +CONFIG_NF_NAT_SIP=m +CONFIG_IP_NF_MANGLE=m +CONFIG_IP_NF_TARGET_CLUSTERIP=m +CONFIG_IP_NF_TARGET_ECN=m +CONFIG_IP_NF_TARGET_TTL=m +CONFIG_IP_NF_RAW=m +CONFIG_IP_NF_ARPTABLES=m +CONFIG_IP_NF_ARPFILTER=m +CONFIG_IP_NF_ARP_MANGLE=m + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_CONNTRACK_IPV6=m +CONFIG_IP6_NF_QUEUE=m +CONFIG_IP6_NF_IPTABLES=m +CONFIG_IP6_NF_MATCH_AH=m +CONFIG_IP6_NF_MATCH_EUI64=m +CONFIG_IP6_NF_MATCH_FRAG=m +CONFIG_IP6_NF_MATCH_OPTS=m +CONFIG_IP6_NF_MATCH_HL=m +CONFIG_IP6_NF_MATCH_IPV6HEADER=m +CONFIG_IP6_NF_MATCH_MH=m +CONFIG_IP6_NF_MATCH_RT=m +CONFIG_IP6_NF_TARGET_HL=m +CONFIG_IP6_NF_TARGET_LOG=m +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +CONFIG_IP6_NF_MANGLE=m +CONFIG_IP6_NF_RAW=m +# CONFIG_BRIDGE_NF_EBTABLES is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +CONFIG_STP=m +CONFIG_GARP=m +CONFIG_BRIDGE=m +CONFIG_BRIDGE_IGMP_SNOOPING=y +# CONFIG_NET_DSA is not set +CONFIG_VLAN_8021Q=m +CONFIG_VLAN_8021Q_GVRP=y +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +CONFIG_IEEE802154=m +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +# CONFIG_NET_SCH_CBQ is not set +# CONFIG_NET_SCH_HTB is not set +# CONFIG_NET_SCH_HFSC is not set +# CONFIG_NET_SCH_PRIO is not set +# CONFIG_NET_SCH_MULTIQ is not set +# CONFIG_NET_SCH_RED is not set +# CONFIG_NET_SCH_SFQ is not set +# CONFIG_NET_SCH_TEQL is not set +# CONFIG_NET_SCH_TBF is not set +# CONFIG_NET_SCH_GRED is not set +# CONFIG_NET_SCH_DSMARK is not set +# CONFIG_NET_SCH_NETEM is not set +# CONFIG_NET_SCH_DRR is not set + +# +# Classification +# +# CONFIG_NET_CLS_BASIC is not set +# CONFIG_NET_CLS_TCINDEX is not set +# CONFIG_NET_CLS_ROUTE4 is not set +CONFIG_NET_CLS_ROUTE=y +# CONFIG_NET_CLS_FW is not set +# CONFIG_NET_CLS_U32 is not set +# CONFIG_NET_CLS_RSVP is not set +# CONFIG_NET_CLS_RSVP6 is not set +# CONFIG_NET_CLS_FLOW is not set +# CONFIG_NET_EMATCH is not set +# CONFIG_NET_CLS_ACT is not set +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set +CONFIG_RPS=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +CONFIG_IRDA=m + +# +# IrDA protocols +# +CONFIG_IRLAN=m +# CONFIG_IRNET is not set +CONFIG_IRCOMM=m +CONFIG_IRDA_ULTRA=y + +# +# IrDA options +# +CONFIG_IRDA_CACHE_LAST_LSAP=y +CONFIG_IRDA_FAST_RR=y +CONFIG_IRDA_DEBUG=y + +# +# Infrared-port device drivers +# + +# +# SIR device drivers +# +CONFIG_IRTTY_SIR=m + +# +# Dongle support +# +# CONFIG_DONGLE is not set +# CONFIG_KINGSUN_DONGLE is not set +# CONFIG_KSDAZZLE_DONGLE is not set +# CONFIG_KS959_DONGLE is not set + +# +# FIR device drivers +# +CONFIG_USB_IRDA=m +# CONFIG_SIGMATEL_FIR is not set +# CONFIG_MCS_FIR is not set +CONFIG_BT=y +CONFIG_BT_L2CAP=y +CONFIG_BT_L2CAP_EXT_FEATURES=y +CONFIG_BT_SCO=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +CONFIG_BT_BNEP=m +CONFIG_BT_BNEP_MC_FILTER=y +CONFIG_BT_BNEP_PROTO_FILTER=y +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=m +CONFIG_BT_HCIBTSDIO=m +CONFIG_BT_HCIUART=m +CONFIG_BT_HCIUART_H4=y +CONFIG_BT_HCIUART_BCSP=y +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIVHCI is not set +CONFIG_BT_MRVL=m +CONFIG_BT_MRVL_SDIO=m +CONFIG_BT_ATH3K=m +# CONFIG_AF_RXRPC is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_SPY=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=m +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +CONFIG_CFG80211_DEFAULT_PS=y +# CONFIG_CFG80211_DEBUGFS is not set +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_WEXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=m +CONFIG_LIB80211_CRYPT_WEP=m +CONFIG_LIB80211_CRYPT_CCMP=m +CONFIG_LIB80211_CRYPT_TKIP=m +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=m +CONFIG_MAC80211_HAS_RC=y +CONFIG_MAC80211_RC_PID=y +CONFIG_MAC80211_RC_MINSTREL=y +# CONFIG_MAC80211_RC_DEFAULT_PID is not set +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel" +CONFIG_MAC80211_MESH=y +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_DEBUG_MENU is not set +CONFIG_WIMAX=m +CONFIG_WIMAX_DEBUG_LEVEL=8 +CONFIG_RFKILL=y +CONFIG_RFKILL_LEDS=y +CONFIG_RFKILL_INPUT=y +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +CONFIG_SR_REPORT_TIME_LIMIT=100 +CONFIG_CONNECTOR=m +# CONFIG_MTD is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_CRYPTOLOOP=y +# CONFIG_BLK_DEV_DRBD is not set +CONFIG_BLK_DEV_NBD=m +CONFIG_BLK_DEV_UB=m +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=16384 +# CONFIG_BLK_DEV_XIP is not set +CONFIG_CDROM_PKTCDVD=m +CONFIG_CDROM_PKTCDVD_BUFFERS=8 +CONFIG_CDROM_PKTCDVD_WCACHE=y +CONFIG_ATA_OVER_ETH=m +# CONFIG_MG_DISK is not set +CONFIG_MISC_DEVICES=y +# CONFIG_AD525X_DPOT is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_ISL29003 is not set +# CONFIG_SENSORS_TSL2550 is not set +CONFIG_SENSORS_BH1780=y +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +CONFIG_BMP085=y +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=m +CONFIG_IWMC3200TOP=m +# CONFIG_IWMC3200TOP_DEBUG is not set +# CONFIG_IWMC3200TOP_DEBUGFS is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +CONFIG_CHR_DEV_ST=m +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=m +CONFIG_BLK_DEV_SR_VENDOR=y +CONFIG_CHR_DEV_SG=m +CONFIG_CHR_DEV_SCH=m +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_LIBFC is not set +# CONFIG_LIBFCOE is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +CONFIG_ATA=m +# CONFIG_ATA_NONSTANDARD is not set +CONFIG_ATA_VERBOSE_ERROR=y +CONFIG_SATA_PMP=y + +# +# Controllers with non-SFF native interface +# +# CONFIG_SATA_AHCI_PLATFORM is not set +CONFIG_ATA_SFF=y + +# +# SFF controllers with custom DMA interface +# +CONFIG_ATA_BMDMA=y + +# +# SATA SFF controllers with BMDMA +# +# CONFIG_SATA_MV is not set + +# +# PATA SFF controllers with BMDMA +# + +# +# PIO-only SFF controllers +# +# CONFIG_PATA_PLATFORM is not set + +# +# Generic fallback / legacy drivers +# +CONFIG_MD=y +CONFIG_BLK_DEV_MD=m +CONFIG_MD_LINEAR=m +CONFIG_MD_RAID0=m +CONFIG_MD_RAID1=m +CONFIG_MD_RAID10=m +# CONFIG_MD_RAID456 is not set +CONFIG_MD_MULTIPATH=m +CONFIG_MD_FAULTY=m +CONFIG_BLK_DEV_DM=m +# CONFIG_DM_DEBUG is not set +CONFIG_DM_CRYPT=m +CONFIG_DM_SNAPSHOT=m +CONFIG_DM_MIRROR=m +CONFIG_DM_LOG_USERSPACE=m +CONFIG_DM_ZERO=m +CONFIG_DM_MULTIPATH=m +CONFIG_DM_MULTIPATH_QL=m +CONFIG_DM_MULTIPATH_ST=m +CONFIG_DM_DELAY=m +CONFIG_DM_UEVENT=y +CONFIG_NETDEVICES=y +CONFIG_DUMMY=m +CONFIG_BONDING=m +CONFIG_MACVLAN=m +CONFIG_MACVTAP=m +CONFIG_EQUALIZER=m +CONFIG_TUN=m +CONFIG_VETH=m +# CONFIG_PHYLIB is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_AX88796 is not set +# CONFIG_SMC91X is not set +# CONFIG_DM9000 is not set +# CONFIG_ENC28J60 is not set +# CONFIG_ETHOC is not set +# CONFIG_SMC911X is not set +# CONFIG_SMSC911X is not set +# CONFIG_DNET is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +# CONFIG_B44 is not set +# CONFIG_KS8842 is not set +CONFIG_KS8851=y +# CONFIG_KS8851_MLL is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_WLAN=y +CONFIG_LIBERTAS_THINFIRM=m +# CONFIG_LIBERTAS_THINFIRM_DEBUG is not set +CONFIG_LIBERTAS_THINFIRM_USB=m +CONFIG_AT76C50X_USB=m +CONFIG_USB_ZD1201=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_RTL8187=m +CONFIG_RTL8187_LEDS=y +# CONFIG_MAC80211_HWSIM is not set +CONFIG_ATH_COMMON=m +# CONFIG_ATH_DEBUG is not set +# CONFIG_ATH9K_HTC is not set +CONFIG_AR9170_USB=m +CONFIG_AR9170_LEDS=y +CONFIG_B43=m +# CONFIG_B43_SDIO is not set +CONFIG_B43_PIO=y +CONFIG_B43_PHY_LP=y +CONFIG_B43_LEDS=y +CONFIG_B43_HWRNG=y +# CONFIG_B43_DEBUG is not set +# CONFIG_B43LEGACY is not set +CONFIG_HOSTAP=m +CONFIG_HOSTAP_FIRMWARE=y +# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set +# CONFIG_IWM is not set +CONFIG_LIBERTAS=m +CONFIG_LIBERTAS_USB=m +CONFIG_LIBERTAS_SDIO=m +# CONFIG_LIBERTAS_SPI is not set +# CONFIG_LIBERTAS_DEBUG is not set +# CONFIG_LIBERTAS_MESH is not set +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +# CONFIG_P54_SPI is not set +CONFIG_P54_LEDS=y +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT30XX=y +CONFIG_RT2800USB_RT35XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RT2800_LIB=m +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_HT=y +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y +CONFIG_RT2X00_LIB_LEDS=y +# CONFIG_RT2X00_DEBUG is not set +CONFIG_WL12XX=m +CONFIG_WL1251=m +CONFIG_WL1251_SPI=m +CONFIG_WL1251_SDIO=m +CONFIG_WL1271=m +CONFIG_WL1271_SPI=m +CONFIG_WL1271_SDIO=m +CONFIG_WL12XX_PLATFORM_DATA=y +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set + +# +# WiMAX Wireless Broadband devices +# +CONFIG_WIMAX_I2400M=m +CONFIG_WIMAX_I2400M_USB=m +CONFIG_WIMAX_I2400M_SDIO=m +CONFIG_WIMAX_IWMC3200_SDIO=y +CONFIG_WIMAX_I2400M_DEBUG_LEVEL=8 + +# +# USB Network Adapters +# +CONFIG_USB_CATC=m +CONFIG_USB_KAWETH=m +CONFIG_USB_PEGASUS=m +CONFIG_USB_RTL8150=m +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +CONFIG_USB_NET_CDC_EEM=m +CONFIG_USB_NET_DM9601=m +CONFIG_USB_NET_SMSC75XX=m +CONFIG_USB_NET_SMSC95XX=y +CONFIG_USB_NET_GL620A=m +CONFIG_USB_NET_NET1080=y +CONFIG_USB_NET_PLUSB=m +CONFIG_USB_NET_MCS7830=m +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_CDC_SUBSET=y +# CONFIG_USB_ALI_M5632 is not set +# CONFIG_USB_AN2720 is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set +# CONFIG_USB_KC2190 is not set +CONFIG_USB_NET_ZAURUS=y +CONFIG_USB_HSO=m +# CONFIG_USB_NET_INT51X1 is not set +CONFIG_USB_IPHETH=m +CONFIG_USB_SIERRA_NET=m +CONFIG_WAN=y +# CONFIG_HDLC is not set +# CONFIG_DLCI is not set +CONFIG_IEEE802154_DRIVERS=m +# CONFIG_IEEE802154_FAKEHARD is not set +CONFIG_PPP=m +CONFIG_PPP_MULTILINK=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_ASYNC=m +CONFIG_PPP_SYNC_TTY=m +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +# CONFIG_SLIP is not set +CONFIG_SLHC=m +CONFIG_NETCONSOLE=m +CONFIG_NETCONSOLE_DYNAMIC=y +CONFIG_NETPOLL=y +# CONFIG_NETPOLL_TRAP is not set +CONFIG_NET_POLL_CONTROLLER=y +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=m +# CONFIG_INPUT_POLLDEV is not set +CONFIG_INPUT_SPARSEKMAP=m + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_GPIO is not set +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +CONFIG_KEYBOARD_OMAP4=y +# CONFIG_KEYBOARD_TWL4030 is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +# CONFIG_JOYSTICK_XPAD is not set +# CONFIG_INPUT_TABLET is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_AD7877 is not set +# CONFIG_TOUCHSCREEN_AD7879_I2C is not set +# CONFIG_TOUCHSCREEN_AD7879_SPI is not set +# CONFIG_TOUCHSCREEN_AD7879 is not set +# CONFIG_TOUCHSCREEN_DYNAPRO is not set +# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set +# CONFIG_TOUCHSCREEN_EETI is not set +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set +# CONFIG_TOUCHSCREEN_MCS5000 is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set +# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set +# CONFIG_TOUCHSCREEN_TSC2007 is not set +# CONFIG_TOUCHSCREEN_W90X900 is not set +CONFIG_TOUCHSCREEN_SYNTM12XX=y +# CONFIG_TOUCHSCREEN_TPS6507X is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +CONFIG_INPUT_ATI_REMOTE=m +CONFIG_INPUT_ATI_REMOTE2=m +CONFIG_INPUT_KEYSPAN_REMOTE=m +CONFIG_INPUT_POWERMATE=m +CONFIG_INPUT_YEALINK=m +CONFIG_INPUT_CM109=m +CONFIG_INPUT_TWL4030_PWRBUTTON=m +CONFIG_INPUT_TWL4030_VIBRA=m +CONFIG_INPUT_TWL6040_VIBRA=m +CONFIG_INPUT_UINPUT=y +CONFIG_INPUT_PCF8574=m +CONFIG_INPUT_GPIO_ROTARY_ENCODER=m +CONFIG_INPUT_SFH7741=y +CONFIG_INPUT_CMA3000_I2C=y + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_DEVKMEM=y +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MAX3100 is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_SERIAL_OMAP=y +CONFIG_SERIAL_OMAP_CONSOLE=y +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_R3964 is not set +CONFIG_RAW_DRIVER=m +CONFIG_MAX_RAW_DEVS=256 +# CONFIG_TCG_TPM is not set +# CONFIG_RAMOOPS is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_COMPAT=y +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_HELPER_AUTO=y +CONFIG_I2C_ALGOBIT=m + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_DESIGNWARE is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_OCORES is not set +CONFIG_I2C_OMAP=y +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_BITBANG is not set +# CONFIG_SPI_GPIO is not set +CONFIG_SPI_OMAP24XX=y +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=m +# CONFIG_SPI_TLE62X0 is not set + +# +# PPS support +# +# CONFIG_PPS is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set +# CONFIG_GPIO_SYSFS is not set + +# +# Memory mapped GPIO expanders: +# +# CONFIG_GPIO_IT8761E is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_TWL4030 is not set +# CONFIG_GPIO_ADP5588 is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2760 is not set +# CONFIG_BATTERY_DS2782 is not set +CONFIG_TWL6030_BCI_BATTERY=y +CONFIG_CHARGER_BQ2415x=y +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADCXX is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM70 is not set +# CONFIG_SENSORS_LM73 is not set +CONFIG_SENSORS_LM75=y +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_MAX1111 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_ADS7871 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +# CONFIG_SENSORS_TWL6030_HOTDIE is not set +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +# CONFIG_SENSORS_LIS3_SPI is not set +# CONFIG_SENSORS_LIS3_I2C is not set +# CONFIG_THERMAL is not set +CONFIG_WATCHDOG=y +# CONFIG_WATCHDOG_NOWAYOUT is not set + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_MPCORE_WATCHDOG is not set +CONFIG_OMAP_WATCHDOG=y +# CONFIG_TWL4030_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_SDIOHOST_POSSIBLE=y +# CONFIG_SSB_SDIOHOST is not set +# CONFIG_SSB_SILENT is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_MFD_SUPPORT=y +CONFIG_MFD_CORE=y +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +CONFIG_TWL4030_CORE=y +# CONFIG_TWL4030_POWER is not set +CONFIG_TWL4030_CODEC=y +# CONFIG_MFD_TC35892 is not set +CONFIG_TWL6030_PWM=y +CONFIG_TWL6030_GPADC=y +CONFIG_TWL6040_CODEC=y +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_MC13783 is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_AB8500_CORE is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_DUMMY is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_BQ24022 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +CONFIG_REGULATOR_TWL4030=y +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_COMMON=y +CONFIG_VIDEO_ALLOW_V4L1=y +CONFIG_VIDEO_V4L1_COMPAT=y +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m + +# +# Multimedia drivers +# +CONFIG_IR_CORE=y +CONFIG_VIDEO_IR=y +CONFIG_LIRC=y +CONFIG_RC_MAP=y +CONFIG_IR_NEC_DECODER=y +CONFIG_IR_RC5_DECODER=y +CONFIG_IR_RC6_DECODER=y +CONFIG_IR_JVC_DECODER=y +CONFIG_IR_SONY_DECODER=y +CONFIG_IR_RC5_SZ_DECODER=m +CONFIG_IR_LIRC_CODEC=m +# CONFIG_IR_IMON is not set +CONFIG_IR_MCEUSB=m +CONFIG_IR_STREAMZAP=m +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=m +# CONFIG_MEDIA_TUNER_CUSTOMISE is not set +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA827X=m +CONFIG_MEDIA_TUNER_TDA18271=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_TEA5761=m +CONFIG_MEDIA_TUNER_TEA5767=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=m +CONFIG_MEDIA_TUNER_MAX2165=m +CONFIG_VIDEO_V4L2=y +CONFIG_VIDEO_V4L1=y +CONFIG_VIDEOBUF_GEN=y +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF_DMA_CONTIG=y +CONFIG_VIDEOBUF_DVB=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_VIDEO_TUNER=m +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEO_HELPER_CHIPS_AUTO=y +CONFIG_VIDEO_IR_I2C=y +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_WM8775=m +CONFIG_VIDEO_MT9V011=m +CONFIG_VIDEO_SAA711X=m +CONFIG_VIDEO_TVP5150=m +CONFIG_VIDEO_CX25840=m +CONFIG_VIDEO_CX2341X=m +# CONFIG_VIDEO_VIVI is not set +CONFIG_VIDEO_OMAP2_VOUT=y +# CONFIG_VIDEO_CPIA is not set +# CONFIG_VIDEO_CPIA2 is not set +# CONFIG_VIDEO_SAA5246A is not set +# CONFIG_VIDEO_SAA5249 is not set +# CONFIG_VIDEO_AU0828 is not set +# CONFIG_SOC_CAMERA is not set +CONFIG_V4L_USB_DRIVERS=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +# CONFIG_USB_M5602 is not set +# CONFIG_USB_STV06XX is not set +# CONFIG_USB_GL860 is not set +# CONFIG_USB_GSPCA_BENQ is not set +# CONFIG_USB_GSPCA_CONEX is not set +# CONFIG_USB_GSPCA_CPIA1 is not set +# CONFIG_USB_GSPCA_ETOMS is not set +# CONFIG_USB_GSPCA_FINEPIX is not set +# CONFIG_USB_GSPCA_JEILINJ is not set +# CONFIG_USB_GSPCA_MARS is not set +# CONFIG_USB_GSPCA_MR97310A is not set +# CONFIG_USB_GSPCA_OV519 is not set +# CONFIG_USB_GSPCA_OV534 is not set +# CONFIG_USB_GSPCA_OV534_9 is not set +# CONFIG_USB_GSPCA_PAC207 is not set +# CONFIG_USB_GSPCA_PAC7302 is not set +# CONFIG_USB_GSPCA_PAC7311 is not set +# CONFIG_USB_GSPCA_SN9C2028 is not set +# CONFIG_USB_GSPCA_SN9C20X is not set +# CONFIG_USB_GSPCA_SONIXB is not set +# CONFIG_USB_GSPCA_SONIXJ is not set +# CONFIG_USB_GSPCA_SPCA500 is not set +# CONFIG_USB_GSPCA_SPCA501 is not set +# CONFIG_USB_GSPCA_SPCA505 is not set +# CONFIG_USB_GSPCA_SPCA506 is not set +# CONFIG_USB_GSPCA_SPCA508 is not set +# CONFIG_USB_GSPCA_SPCA561 is not set +# CONFIG_USB_GSPCA_SQ905 is not set +# CONFIG_USB_GSPCA_SQ905C is not set +# CONFIG_USB_GSPCA_STK014 is not set +# CONFIG_USB_GSPCA_STV0680 is not set +# CONFIG_USB_GSPCA_SUNPLUS is not set +# CONFIG_USB_GSPCA_T613 is not set +# CONFIG_USB_GSPCA_TV8532 is not set +# CONFIG_USB_GSPCA_VC032X is not set +# CONFIG_USB_GSPCA_ZC3XX is not set +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +CONFIG_VIDEO_HDPVR=m +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_TLG2300=m +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +CONFIG_VIDEO_USBVISION=m +CONFIG_VIDEO_USBVIDEO=m +CONFIG_USB_VICAM=m +CONFIG_USB_IBMCAM=m +CONFIG_USB_KONICAWC=m +CONFIG_USB_QUICKCAM_MESSENGER=m +CONFIG_USB_ET61X251=m +CONFIG_VIDEO_OVCAMCHIP=m +CONFIG_USB_W9968CF=m +CONFIG_USB_OV511=m +CONFIG_USB_SE401=m +CONFIG_USB_SN9C102=m +CONFIG_USB_STV680=m +CONFIG_USB_ZC0301=m +CONFIG_USB_PWC=m +# CONFIG_USB_PWC_DEBUG is not set +CONFIG_USB_PWC_INPUT_EVDEV=y +CONFIG_USB_ZR364XX=m +CONFIG_USB_STKWEBCAM=m +CONFIG_USB_S2255=m +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +CONFIG_RADIO_ADAPTERS=y +# CONFIG_I2C_SI4713 is not set +# CONFIG_RADIO_SI4713 is not set +# CONFIG_USB_DSBR is not set +# CONFIG_RADIO_SI470X is not set +# CONFIG_USB_MR800 is not set +# CONFIG_RADIO_TEA5764 is not set +# CONFIG_RADIO_SAA7706H is not set +# CONFIG_RADIO_TEF6862 is not set +CONFIG_DVB_MAX_ADAPTERS=8 +CONFIG_DVB_DYNAMIC_MINORS=y +CONFIG_DVB_CAPTURE_DRIVERS=y +# CONFIG_TTPCI_EEPROM is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +CONFIG_DVB_USB_A800=m +CONFIG_DVB_USB_DIBUSB_MB=m +# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +CONFIG_DVB_USB_UMT_010=m +CONFIG_DVB_USB_CXUSB=m +CONFIG_DVB_USB_M920X=m +CONFIG_DVB_USB_GL861=m +CONFIG_DVB_USB_AU6610=m +CONFIG_DVB_USB_DIGITV=m +CONFIG_DVB_USB_VP7045=m +CONFIG_DVB_USB_VP702X=m +CONFIG_DVB_USB_GP8PSK=m +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_CE6230=m +CONFIG_DVB_USB_FRIIO=m +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_AZ6027=m +CONFIG_SMS_SIANO_MDTV=m + +# +# Siano module components +# +# CONFIG_SMS_USB_DRV is not set +# CONFIG_SMS_SDIO_DRV is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set + +# +# Supported DVB Frontends +# +# CONFIG_DVB_FE_CUSTOMISE is not set +CONFIG_DVB_STB0899=m +CONFIG_DVB_STB6100=m +CONFIG_DVB_CX24123=m +CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10039=m +CONFIG_DVB_S5H1420=m +CONFIG_DVB_STV0288=m +CONFIG_DVB_STB6000=m +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_TDA10086=m +CONFIG_DVB_TUNER_ITD1000=m +CONFIG_DVB_TUNER_CX24113=m +CONFIG_DVB_TDA826X=m +CONFIG_DVB_CX24116=m +CONFIG_DVB_SI21XX=m +CONFIG_DVB_DS3000=m +CONFIG_DVB_CX22702=m +CONFIG_DVB_TDA1004X=m +CONFIG_DVB_NXT6000=m +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +CONFIG_DVB_DIB3000MB=m +CONFIG_DVB_DIB3000MC=m +CONFIG_DVB_DIB7000M=m +CONFIG_DVB_DIB7000P=m +CONFIG_DVB_TDA10048=m +CONFIG_DVB_AF9013=m +CONFIG_DVB_EC100=m +CONFIG_DVB_TDA10023=m +CONFIG_DVB_STV0297=m +CONFIG_DVB_NXT200X=m +CONFIG_DVB_BCM3510=m +CONFIG_DVB_LGDT330X=m +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_S5H1409=m +CONFIG_DVB_S5H1411=m +CONFIG_DVB_DIB8000=m +CONFIG_DVB_PLL=m +CONFIG_DVB_TUNER_DIB0070=m +CONFIG_DVB_TUNER_DIB0090=m +CONFIG_DVB_LNBP21=m +CONFIG_DVB_ISL6421=m +CONFIG_DVB_LGS8GXX=m +CONFIG_DVB_ATBM8830=m +# CONFIG_DAB is not set +CONFIG_DMM_OMAP=y +CONFIG_TILER_OMAP=y + +# +# Graphics support +# +CONFIG_DRM=m +# CONFIG_DRM_MGA is not set +# CONFIG_DRM_VIA is not set +# CONFIG_DRM_SAVAGE is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +CONFIG_FB_SYS_FILLRECT=m +CONFIG_FB_SYS_COPYAREA=m +CONFIG_FB_SYS_IMAGEBLIT=m +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=m +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_UVESA is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_TMIO is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_OMAP_BOOTLOADER_INIT is not set +CONFIG_OMAP2_VRAM=y +CONFIG_OMAP2_DSS=y +CONFIG_OMAP2_VRAM_SIZE=32 +CONFIG_OMAP2_DSS_DEBUG_SUPPORT=y +# CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS is not set +CONFIG_OMAP2_DSS_DPI=y +# CONFIG_OMAP2_DSS_RFBI is not set +# CONFIG_OMAP2_DSS_VENC is not set +CONFIG_OMAP2_DSS_HDMI=y +CONFIG_OMAP2_DSS_DSI=y +# CONFIG_OMAP2_DSS_USE_DSI_PLL is not set +CONFIG_OMAP2_DSS_FAKE_VSYNC=y +CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0 +CONFIG_FB_OMAP2=y +CONFIG_FB_OMAP2_DEBUG_SUPPORT=y +CONFIG_FB_OMAP2_NUM_FBS=2 + +# +# OMAP2/3 Display Device Drivers +# +CONFIG_PANEL_GENERIC=y +CONFIG_PANEL_SHARP_LS037V7DW01=y +# CONFIG_PANEL_SHARP_LQ043T1DG01 is not set +CONFIG_PANEL_PICO_DLP=y +CONFIG_PANEL_TAAL=y +CONFIG_PANEL_NEC_NL8048HL11_01B=y +# CONFIG_PANEL_TOPPOLY_TDO35S is not set +# CONFIG_PANEL_TPO_TD043MTEA1 is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=y +# CONFIG_LCD_L4F00242T03 is not set +# CONFIG_LCD_LMS283GF05 is not set +# CONFIG_LCD_LTV350QV is not set +# CONFIG_LCD_TDO24M is not set +# CONFIG_LCD_VGG2432A4 is not set +# CONFIG_LCD_PLATFORM is not set +# CONFIG_LCD_S6E63M0 is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_BACKLIGHT_GENERIC=y +# CONFIG_BACKLIGHT_PWM is not set +# CONFIG_BACKLIGHT_ADP8860 is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y +CONFIG_FONTS=y +CONFIG_FONT_8x8=y +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +# CONFIG_LOGO is not set +CONFIG_SOUND=y +CONFIG_SOUND_OSS_CORE=y +CONFIG_SOUND_OSS_CORE_PRECLAIM=y +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +CONFIG_SND_JACK=y +CONFIG_SND_SEQUENCER=m +CONFIG_SND_SEQ_DUMMY=m +CONFIG_SND_OSSEMUL=y +CONFIG_SND_MIXER_OSS=m +CONFIG_SND_PCM_OSS=m +CONFIG_SND_PCM_OSS_PLUGINS=y +CONFIG_SND_SEQUENCER_OSS=y +CONFIG_SND_HRTIMER=m +CONFIG_SND_SEQ_HRTIMER_DEFAULT=y +CONFIG_SND_DYNAMIC_MINORS=y +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_RAWMIDI_SEQ=m +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +CONFIG_SND_ARM=y +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_SOC=y +CONFIG_SND_OMAP_SOC=y +CONFIG_SND_OMAP_SOC_ABE_DSP=y +CONFIG_SND_OMAP_SOC_MCBSP=y +CONFIG_SND_OMAP_SOC_MCPDM=y +CONFIG_SND_OMAP_SOC_ABE=y +CONFIG_SND_OMAP_SOC_DMIC=y +CONFIG_SND_OMAP_SOC_SDP4430=y +CONFIG_SND_OMAP_SOC_HDMI=y +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_DMIC=y +CONFIG_SND_SOC_TWL6040=y +# CONFIG_SOUND_PRIME is not set +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +# CONFIG_USB_HIDDEV is not set + +# +# Special HID drivers +# +# CONFIG_HID_3M_PCT is not set +# CONFIG_HID_A4TECH is not set +# CONFIG_HID_APPLE is not set +# CONFIG_HID_BELKIN is not set +# CONFIG_HID_CANDO is not set +# CONFIG_HID_CHERRY is not set +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_PRODIKEYS is not set +# CONFIG_HID_CYPRESS is not set +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EGALAX is not set +# CONFIG_HID_EZKEY is not set +# CONFIG_HID_KYE is not set +# CONFIG_HID_GYRATION is not set +# CONFIG_HID_TWINHAN is not set +# CONFIG_HID_KENSINGTON is not set +# CONFIG_HID_LOGITECH is not set +# CONFIG_HID_MAGICMOUSE is not set +# CONFIG_HID_MICROSOFT is not set +# CONFIG_HID_MOSART is not set +# CONFIG_HID_MONTEREY is not set +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_ORTEK is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_QUANTA is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_ROCCAT_KONE is not set +# CONFIG_HID_SAMSUNG is not set +# CONFIG_HID_SONY is not set +# CONFIG_HID_STANTUM is not set +# CONFIG_HID_SUNPLUS is not set +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +# CONFIG_HID_TOPSEED is not set +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_WACOM is not set +# CONFIG_HID_ZEROPLUS is not set +# CONFIG_HID_ZYDACRON is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB_ARCH_HAS_OHCI=y +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +CONFIG_USB_DEBUG=y +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_DEVICE_CLASS is not set +CONFIG_USB_DYNAMIC_MINORS=y +CONFIG_USB_SUSPEND=y +# CONFIG_USB_OTG is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +CONFIG_USB_MON=m +CONFIG_USB_WUSB=m +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +CONFIG_USB_EHCI_TT_NEWSCHED=y +CONFIG_USB_EHCI_HCD_OMAP3=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_OHCI_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HWA_HCD is not set +CONFIG_USB_MUSB_HDRC=y +CONFIG_USB_MUSB_SOC=y + +# +# OMAP 44xx high speed USB support +# +# CONFIG_USB_MUSB_HOST is not set +CONFIG_USB_MUSB_PERIPHERAL=y +# CONFIG_USB_MUSB_OTG is not set +CONFIG_USB_GADGET_MUSB_HDRC=y +# CONFIG_MUSB_PIO_ONLY is not set +CONFIG_USB_INVENTRA_DMA=y +# CONFIG_USB_TI_CPPI_DMA is not set +CONFIG_USB_MUSB_DEBUG=y + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +CONFIG_USB_PRINTER=m +CONFIG_USB_WDM=m +CONFIG_USB_TMC=m + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +CONFIG_USB_TEST=m +# CONFIG_USB_ISIGHTFW is not set +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_DEBUG_FS is not set +CONFIG_USB_GADGET_VBUS_DRAW=2 +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_ATMEL_USBA is not set +# CONFIG_USB_GADGET_FSL_USB2 is not set +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_PXA25X is not set +# CONFIG_USB_GADGET_R8A66597 is not set +# CONFIG_USB_GADGET_PXA27X is not set +# CONFIG_USB_GADGET_S3C_HSOTG is not set +# CONFIG_USB_GADGET_IMX is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_AMD5536UDC is not set +# CONFIG_USB_GADGET_FSL_QE is not set +# CONFIG_USB_GADGET_CI13XXX is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LANGWELL is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +CONFIG_USB_GADGET_DUALSPEED=y +CONFIG_USB_ZERO=m +# CONFIG_USB_AUDIO is not set +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_ETH_EEM is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FUNCTIONFS is not set +CONFIG_USB_FILE_STORAGE=m +# CONFIG_USB_FILE_STORAGE_TEST is not set +# CONFIG_USB_MASS_STORAGE is not set +CONFIG_USB_G_SERIAL=m +# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set +CONFIG_USB_CDC_COMPOSITE=m +# CONFIG_USB_G_NOKIA is not set +CONFIG_USB_G_MULTI=m +CONFIG_USB_G_MULTI_RNDIS=y +CONFIG_USB_G_MULTI_CDC=y +# CONFIG_USB_G_HID is not set +# CONFIG_USB_G_DBGP is not set +# CONFIG_USB_G_WEBCAM is not set + +# +# OTG and related infrastructure +# +CONFIG_USB_OTG_UTILS=y +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ULPI is not set +# CONFIG_TWL4030_USB is not set +CONFIG_TWL6030_USB=y +CONFIG_NOP_USB_XCEIV=y +CONFIG_UWB=m +CONFIG_UWB_HWA=m +CONFIG_UWB_WLP=m +CONFIG_UWB_I1480U=m +CONFIG_UWB_I1480U_WLP=m +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_UNSAFE_RESUME=y + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_BOUNCE=y +CONFIG_SDIO_UART=m +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_OMAP is not set +CONFIG_MMC_OMAP_HS=y +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_PCA9532 is not set +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_GPIO_PLATFORM=y +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_DAC124S085 is not set +CONFIG_LEDS_PWM=y +# CONFIG_LEDS_REGULATOR is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_LT3593 is not set +CONFIG_LEDS_TRIGGERS=y + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGER_TIMER=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=y +# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y + +# +# iptables trigger is under Netfilter config (LED target) +# +# CONFIG_ACCESSIBILITY is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +CONFIG_RTC_DRV_TWL4030=y +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set +# CONFIG_RTC_DRV_PCF2123 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_DMADEVICES is not set +# CONFIG_AUXDISPLAY is not set +CONFIG_UIO=m +CONFIG_UIO_PDRV=m +CONFIG_UIO_PDRV_GENIRQ=m +CONFIG_STAGING=y +# CONFIG_STAGING_EXCLUDE_BUILD is not set +# CONFIG_VIDEO_TM6000 is not set +# CONFIG_USB_IP_COMMON is not set +# CONFIG_W35UND is not set +CONFIG_PRISM2_USB=m +# CONFIG_ECHO is not set +# CONFIG_OTUS is not set +# CONFIG_RT2870 is not set +# CONFIG_COMEDI is not set +# CONFIG_ASUS_OLED is not set +# CONFIG_TRANZPORT is not set +# CONFIG_POHMELFS is not set +# CONFIG_LINE6_USB is not set +# CONFIG_DRM_NOUVEAU is not set +# CONFIG_VT6656 is not set +CONFIG_FB_UDL=m + +# +# RAR Register Driver +# +CONFIG_IIO=y +# CONFIG_IIO_RING_BUFFER is not set +# CONFIG_IIO_TRIGGER is not set + +# +# Accelerometers +# +# CONFIG_ADIS16209 is not set +# CONFIG_ADIS16220 is not set +# CONFIG_ADIS16240 is not set +# CONFIG_KXSD9 is not set +# CONFIG_LIS3L02DQ is not set + +# +# Analog to digital convertors +# +# CONFIG_MAX1363 is not set + +# +# Digital gyroscope sensors +# +# CONFIG_ADIS16260 is not set + +# +# Inertial measurement units +# +# CONFIG_ADIS16300 is not set +# CONFIG_ADIS16350 is not set +# CONFIG_ADIS16400 is not set + +# +# Light sensors +# +# CONFIG_SENSORS_TSL2563 is not set + +# +# Magnetometer sensors +# +CONFIG_SENSORS_HMC5843=y + +# +# Triggers - standalone +# +CONFIG_RAMZSWAP=m +CONFIG_RAMZSWAP_STATS=y +# CONFIG_BATMAN_ADV is not set +# CONFIG_FB_SM7XX is not set + +# +# Texas Instruments shared transport line discipline +# +CONFIG_TI_ST=m +CONFIG_ST_BT=m +CONFIG_ST_FM=m +# CONFIG_ADIS16255 is not set +CONFIG_LIRC_STAGING=y +CONFIG_LIRC_I2C=m +CONFIG_LIRC_IGORPLUGUSB=m +CONFIG_LIRC_IMON=m +CONFIG_LIRC_SASEM=m +CONFIG_LIRC_SERIAL=m +CONFIG_LIRC_SERIAL_TRANSMITTER=y +CONFIG_LIRC_SIR=m +CONFIG_LIRC_TTUSBIR=m +CONFIG_LIRC_ZILOG=m +CONFIG_Sys_Link=y +CONFIG_SYSLINK_PROC=y +CONFIG_SYSLINK_PROC4430=y +CONFIG_DUCATI_BASEIMAGE_PHYS_ADDR=0x9CF00000 +# CONFIG_SYSLINK_DUCATI_PM is not set +CONFIG_OMAP_DEVICE_HANDLER=y +CONFIG_MPU_SYSLINK_PLATFORM=y +CONFIG_MPU_SYSLINK_IPC=y +CONFIG_SYSLINK_USE_SYSMGR=y +CONFIG_SYSLINK_IOMMU_ENABLE=y +CONFIG_SYSLINK_RECOVERY=y +# CONFIG_DMM_DMA_API is not set +# CONFIG_TILER_PID_KILL_NOTIFICATIONS is not set + +# +# Ubuntu Supplied Third-Party Device Drivers +# +CONFIG_AUFS_FS=m +CONFIG_AUFS_BRANCH_MAX_127=y +# CONFIG_AUFS_BRANCH_MAX_511 is not set +# CONFIG_AUFS_BRANCH_MAX_1023 is not set +# CONFIG_AUFS_BRANCH_MAX_32767 is not set +CONFIG_AUFS_HNOTIFY=y +CONFIG_AUFS_HFSNOTIFY=y +# CONFIG_AUFS_HINOTIFY is not set +# CONFIG_AUFS_RDU is not set +CONFIG_AUFS_SP_IATTR=y +# CONFIG_AUFS_SHWH is not set +# CONFIG_AUFS_BR_RAMFS is not set +CONFIG_AUFS_BDEV_LOOP=y +# CONFIG_AUFS_DEBUG is not set + +# +# Compcache options +# +CONFIG_BLK_DEV_COMPCACHE=m +# CONFIG_BLK_DEV_COMPCACHE_DEBUG is not set +CONFIG_BLK_DEV_COMPCACHE_STATS=y +CONFIG_SCSI_ISCSITARGET=m + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +# CONFIG_EXT3_FS_XATTR is not set +# CONFIG_EXT4_FS is not set +CONFIG_JBD=y +# CONFIG_JBD_DEBUG is not set +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +CONFIG_QUOTA=y +# CONFIG_QUOTA_NETLINK_INTERFACE is not set +CONFIG_PRINT_QUOTA_WARNING=y +# CONFIG_QUOTA_DEBUG is not set +CONFIG_QUOTA_TREE=y +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTACTL=y +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set +CONFIG_GENERIC_ACL=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +# CONFIG_HUGETLB_PAGE is not set +CONFIG_CONFIGFS_FS=m +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +# CONFIG_SQUASHFS is not set +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CEPH_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set +# CONFIG_DLM is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=1024 +CONFIG_MAGIC_SYSRQ=y +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_DETECT_SOFTLOCKUP is not set +CONFIG_DETECT_HUNG_TASK=y +# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set +CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0 +# CONFIG_SCHED_DEBUG is not set +CONFIG_SCHEDSTATS=y +CONFIG_TIMER_STATS=y +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_HIGHMEM is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_LKDTM is not set +# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_PAGE_POISONING is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_ARM_UNWIND is not set +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_LL is not set +# CONFIG_OC_ETM is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +# CONFIG_DEFAULT_SECURITY_SELINUX is not set +# CONFIG_DEFAULT_SECURITY_SMACK is not set +# CONFIG_DEFAULT_SECURITY_TOMOYO is not set +# CONFIG_DEFAULT_SECURITY_APPARMOR is not set +# CONFIG_DEFAULT_SECURITY_YAMA is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=m +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_TESTS=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +CONFIG_CRYPTO_AUTHENC=m +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=m +# CONFIG_CRYPTO_LRW is not set +CONFIG_CRYPTO_PCBC=m +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=m +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_GHASH is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=m +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +CONFIG_CRYPTO_SHA1=m +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=m +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=m +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=m +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_HW=y +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_GENERIC_FIND_LAST_BIT=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +CONFIG_CRC_T10DIF=y +CONFIG_CRC_ITU_T=m +CONFIG_CRC32=y +CONFIG_CRC7=m +CONFIG_LIBCRC32C=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=m +CONFIG_LZO_COMPRESS=m +CONFIG_LZO_DECOMPRESS=m +CONFIG_DECOMPRESS_GZIP=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=m +CONFIG_TEXTSEARCH_BM=m +CONFIG_TEXTSEARCH_FSM=m +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y diff --git a/recipes/linux/linux-omap4_2.6.35.3.bb b/recipes/linux/linux-omap4_2.6.35.3.bb index 050255443e..8c414411de 100644 --- a/recipes/linux/linux-omap4_2.6.35.3.bb +++ b/recipes/linux/linux-omap4_2.6.35.3.bb @@ -1,4 +1,4 @@ -COMPATIBLE_MACHINE = "omap4430-panda" +COMPATIBLE_MACHINE = "omap4430-panda|am45x-evm" require multi-kernel.inc diff --git a/recipes/linux/linux-omap_2.6.39.bb b/recipes/linux/linux-omap_2.6.39.bb new file mode 100644 index 0000000000..5b1c797532 --- /dev/null +++ b/recipes/linux/linux-omap_2.6.39.bb @@ -0,0 +1,104 @@ +require multi-kernel.inc + +DESCRIPTION = "Linux kernel for OMAP processors" +KERNEL_IMAGETYPE = "uImage" + +COMPATIBLE_MACHINE = "(beagleboard)" + +# The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc +SRCREV_pn-${PN} = "v2.6.39" +MACHINE_KERNEL_PR_append = "h" + +FILESPATHPKG_prepend = "linux-omap-2.6.39:" + +SRC_URI += "git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git;protocol=git \ + file://defconfig" + +SRC_URI_append = " \ + file://sakoman/0001-OMAP-DSS2-DSI-fix-use_sys_clk-highfreq.patch \ + file://sakoman/0002-OMAP-DSS2-DSI-fix-dsi_dump_clocks.patch \ + file://sakoman/0003-OMAP2PLUS-DSS2-Fix-Return-correct-lcd-clock-source-f.patch \ + file://sakoman/0004-OMAP-DSS-DSI-Fix-DSI-PLL-power-bug.patch \ + file://sakoman/0005-OMAP-DSS2-fix-panel-Kconfig-dependencies.patch \ + file://sakoman/0006-OMAP-DSS2-add-bootarg-for-selecting-svideo-or-compos.patch \ + file://sakoman/0007-video-add-timings-for-hd720.patch \ + file://sakoman/0008-drivers-net-smsc911x-return-ENODEV-if-device-is-not-.patch \ + file://sakoman/0009-drivers-input-touchscreen-ads7846-return-ENODEV-if-d.patch \ + file://sakoman/0010-Revert-omap2_mcspi-Flush-posted-writes.patch \ + file://sakoman/0011-Revert-omap_hsmmc-improve-interrupt-synchronisation.patch \ + file://sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch \ + file://sakoman/0013-Enable-the-use-of-SDIO-card-interrupts.patch \ + file://sakoman/0014-soc-codecs-Enable-audio-capture-by-default-for-twl40.patch \ + file://sakoman/0015-soc-codecs-twl4030-Turn-on-mic-bias-by-default.patch \ + file://sakoman/0016-RTC-add-support-for-backup-battery-recharge.patch \ + file://sakoman/0017-ARM-OMAP2-mmc-twl4030-move-clock-input-selection-pri.patch \ + file://sakoman/0018-Add-power-off-support-for-the-TWL4030-companion.patch \ + file://sakoman/0019-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch \ + file://sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch \ + file://sakoman/0021-mfd-twl-core-enable-madc-clock.patch \ + file://sakoman/0022-rtc-twl-Switch-to-using-threaded-irq.patch \ + file://sakoman/0023-ARM-OMAP-automatically-set-musb-mode-in-platform-dat.patch \ + file://sakoman/0024-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch \ + file://sakoman/0025-omap-Fix-mtd-subpage-read-alignment.patch \ + file://sakoman/0026-mtd-nand-omap2-Force-all-buffer-reads-to-u32-alignme.patch \ + file://sakoman/0027-omap-nand-fix-subpage-ecc-issue-with-prefetch.patch \ + file://sakoman/0028-OMAP-Overo-Add-support-for-spidev.patch \ + file://sakoman/0029-unionfs-Add-support-for-unionfs-2.5.9.patch \ + file://sakoman/0030-omap-Change-omap_device-activate-latency-messages-fr.patch \ + file://sakoman/0031-omap-overo-Add-opp-init.patch \ + \ + file://beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch \ + file://beagle/0002-OMAP3-beagle-add-support-for-expansionboards.patch \ + file://beagle/0003-OMAP3-beagle-add-MADC-support.patch \ + file://beagle/0004-OMAP3-beagle-add-regulators-for-camera-interface.patch \ + file://beagle/0005-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch \ + \ + file://camera/0001-Add-driver-for-Aptina-Micron-mt9p031-sensor.patch \ + file://camera/0002-v4l-Add-mt9v032-sensor-driver.patch \ + file://camera/0003-Add-support-for-mt9p031-LI-5M03-module-in-Beagleboar.patch \ + \ + file://pm/linux-omap-2.6.39-ti-pm/0001-OMAP3-voltage-remove-spurious-pr_notice-for-debugfs.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0002-OMAP4-PM-remove-redundant-ifdef-CONFIG_PM.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0003-OMAP3-smartreflex-fix-sr_late_init-error-path-in-pro.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0004-OMAP3-smartreflex-request-the-memory-region.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0005-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0006-OMAP3-smartreflex-delete-instance-from-sr_list-on-pr.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0007-OMAP3-smartreflex-delete-debugfs-entries-on-probe-er.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0008-OMAP3-cpuidle-remove-useless-SDP-specific-timings.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0009-OMAP3-SR-make-notify-independent-of-class.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0010-OMAP3-SR-disable-interrupt-by-default.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0011-OMAP3-SR-enable-disable-SR-only-on-need.patch \ + file://pm/linux-omap-2.6.39-ti-pm/0012-OMAP3-SR-fix-cosmetic-indentation.patch \ + \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0001-OMAP-CPUfreq-ensure-driver-initializes-after-cpufreq.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0002-OMAP-CPUfreq-ensure-policy-is-fully-initialized.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0003-OMAP3-PM-CPUFreq-driver-for-OMAP3.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0004-OMAP-PM-CPUFREQ-Fix-conditional-compilation.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0005-cpufreq-fixup-after-new-OPP-layer-merged.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0006-OMAP-cpufreq-Split-OMAP1-and-OMAP2PLUS-CPUfreq-drive.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0007-OMAP2PLUS-cpufreq-Add-SMP-support-to-cater-OMAP4430.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0008-OMAP2PLUS-cpufreq-Fix-typo-when-attempting-to-set-mp.patch \ + \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0001-cpufreq-helpers-for-walking-the-frequency-table.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0002-cpufreq-introduce-hotplug-governor.patch \ + \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0001-OMAP2-cpufreq-free-up-table-on-exit.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0002-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0003-OMAP2-cpufreq-minor-comment-cleanup.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0004-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0005-OMAP2-cpufreq-use-cpufreq_frequency_table_target.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0006-OMAP2-cpufreq-fix-freq_table-leak.patch \ + \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0001-OMAP2-clockdomain-Add-an-api-to-read-idle-mode.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0002-OMAP2-clockdomain-Add-SoC-support-for-clkdm_is_idle.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0003-OMAP2-PM-Initialise-sleep_switch-to-a-non-valid-valu.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0004-OMAP2-PM-idle-clkdms-only-if-already-in-idle.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0005-OMAP2-hwmod-Follow-the-recomended-PRCM-sequence.patch \ + file://pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0006-OMAP-Serial-Check-wk_st-only-if-present.patch \ + " + +SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \ +" + +S = "${WORKDIR}/git" + diff --git a/recipes/linux/linux-wrt-2.4.30/001-Makefile b/recipes/linux/linux-wrt-2.4.30/001-Makefile index d01051f844..b117e7f8eb 100644 --- a/recipes/linux/linux-wrt-2.4.30/001-Makefile +++ b/recipes/linux/linux-wrt-2.4.30/001-Makefile @@ -1,4 +1,4 @@ ---- ../../../kernel/linux-mips-cvs/Makefile 2005-01-20 03:19:21.000000000 +0100 +--- linux-mips-cvs/Makefile 2005-01-20 03:19:21.000000000 +0100 +++ linux-2.4.29.new/Makefile 2005-03-15 01:15:27.441095231 +0100 @@ -17,9 +17,9 @@ FINDHPATH = $(HPATH)/asm $(HPATH)/linux $(HPATH)/scsi $(HPATH)/net $(HPATH)/math-emu diff --git a/recipes/linux/linux-wrt-2.4.30/005-arch_mips_config-shared_in b/recipes/linux/linux-wrt-2.4.30/005-arch_mips_config-shared_in index 16c6766eec..87c8d3abe8 100644 --- a/recipes/linux/linux-wrt-2.4.30/005-arch_mips_config-shared_in +++ b/recipes/linux/linux-wrt-2.4.30/005-arch_mips_config-shared_in @@ -1,4 +1,4 @@ ---- ../../../kernel/linux-mips-cvs/arch/mips/config-shared.in 2005-01-31 12:59:28.000000000 +0100 +--- linux-mips-cvs/arch/mips/config-shared.in 2005-01-31 12:59:28.000000000 +0100 +++ linux-2.4.29/arch/mips/config-shared.in 2005-03-12 19:51:22.474214917 +0100 @@ -208,6 +208,14 @@ fi diff --git a/recipes/linux/linux-wrt-2.4.30/022-drivers_net_Makefile b/recipes/linux/linux-wrt-2.4.30/022-drivers_net_Makefile index 8340c9565b..f2fba96bae 100644 --- a/recipes/linux/linux-wrt-2.4.30/022-drivers_net_Makefile +++ b/recipes/linux/linux-wrt-2.4.30/022-drivers_net_Makefile @@ -1,4 +1,4 @@ ---- ../../../kernel/linux-mips-cvs/drivers/net/Makefile 2004-08-14 20:38:51.000000000 +0200 +--- linux-mips-cvs/drivers/net/Makefile 2004-08-14 20:38:51.000000000 +0200 +++ linux/drivers/net/Makefile 2005-03-16 12:45:24.523263597 +0100 @@ -21,6 +21,16 @@ list-multi := rcpci.o diff --git a/recipes/linux/linux-wrt-2.4.30/023-drivers_parport_Makefile b/recipes/linux/linux-wrt-2.4.30/023-drivers_parport_Makefile index 996e30a9b1..d45b88951a 100644 --- a/recipes/linux/linux-wrt-2.4.30/023-drivers_parport_Makefile +++ b/recipes/linux/linux-wrt-2.4.30/023-drivers_parport_Makefile @@ -1,4 +1,4 @@ ---- ../../../kernel/linux-mips-cvs/drivers/parport/Makefile 2004-08-14 20:38:53.000000000 +0200 +--- linux-mips-cvs/drivers/parport/Makefile 2004-08-14 20:38:53.000000000 +0200 +++ linux-2.4.29/drivers/parport/Makefile 2005-03-21 13:57:53.338746517 +0100 @@ -22,6 +22,7 @@ diff --git a/recipes/linux/linux-wrt-2.4.30/024-drivers_parport_Config_in b/recipes/linux/linux-wrt-2.4.30/024-drivers_parport_Config_in index 1b43798558..a8602a242e 100644 --- a/recipes/linux/linux-wrt-2.4.30/024-drivers_parport_Config_in +++ b/recipes/linux/linux-wrt-2.4.30/024-drivers_parport_Config_in @@ -1,4 +1,4 @@ ---- ../../../kernel/linux-mips-cvs/drivers/parport/Config.in 2004-02-20 02:22:18.000000000 +0100 +--- linux-mips-cvs/drivers/parport/Config.in 2004-02-20 02:22:18.000000000 +0100 +++ linux-2.4.29/drivers/parport/Config.in 2005-03-21 13:59:33.958193664 +0100 @@ -11,6 +11,7 @@ tristate 'Parallel port support' CONFIG_PARPORT diff --git a/recipes/linux/linux-wrt-2.4.30/310-netfilter-maxconn b/recipes/linux/linux-wrt-2.4.30/310-netfilter-maxconn index 87be89d72f..4438974218 100644 --- a/recipes/linux/linux-wrt-2.4.30/310-netfilter-maxconn +++ b/recipes/linux/linux-wrt-2.4.30/310-netfilter-maxconn @@ -1,4 +1,4 @@ ---- ../../buildroot-unpacked/build_mipsel/linux/net/ipv4/netfilter/ip_conntrack_core.c 2004-11-28 22:59:36.000000000 -0500 +--- linux/net/ipv4/netfilter/ip_conntrack_core.c 2004-11-28 22:59:36.000000000 -0500 +++ linux/net/ipv4/netfilter/ip_conntrack_core.c 2004-11-30 05:05:32.000000000 -0500 @@ -1386,7 +1386,7 @@ nf_unregister_sockopt(&so_getorigdst); diff --git a/recipes/linux/linux.inc b/recipes/linux/linux.inc index a0d16c24ac..bae0cb41b1 100644 --- a/recipes/linux/linux.inc +++ b/recipes/linux/linux.inc @@ -67,7 +67,7 @@ python __anonymous () { bb.data.setVar("DEPENDS", "%s dtc-native" % depends, d) packages = bb.data.getVar("PACKAGES", d, 1) bb.data.setVar("PACKAGES", "%s kernel-devicetree" % packages, d) - if 'nokia900' in machine: + if 'nokia900' in machine or 'om-gta0' in machine or 'eee701' in machine: depends = bb.data.getVar("DEPENDS", d, 1) bb.data.setVar("DEPENDS", "%s lzma-native" % depends, d) } diff --git a/recipes/linux/linux/pcm043/defconfig b/recipes/linux/linux/pcm043/defconfig new file mode 100644 index 0000000000..72334d3897 --- /dev/null +++ b/recipes/linux/linux/pcm043/defconfig @@ -0,0 +1,1659 @@ +# +# Automatically generated make config: don't edit +# Linux kernel version: 2.6.31.6 +# +CONFIG_ARM=y +CONFIG_HAVE_PWM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_GENERIC_GPIO=y +CONFIG_GENERIC_TIME=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_MMU=y +CONFIG_GENERIC_HARDIRQS=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_HAVE_LATENCYTOP_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_FIQ=y +CONFIG_ARCH_MTD_XIP=y +CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_VECTORS_BASE=0xffff0000 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_CONSTRUCTORS=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_BROKEN_ON_SMP=y +CONFIG_LOCK_KERNEL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_LOCALVERSION="" +CONFIG_LOCALVERSION_AUTO=y +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_BSD_PROCESS_ACCT is not set +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set + +# +# RCU Subsystem +# +# CONFIG_CLASSIC_RCU is not set +CONFIG_TREE_RCU=y +# CONFIG_PREEMPT_RCU is not set +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_PREEMPT_RCU_TRACE is not set +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_GROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_RT_GROUP_SCHED is not set +CONFIG_USER_SCHED=y +# CONFIG_CGROUP_SCHED is not set +# CONFIG_CGROUPS is not set +CONFIG_SYSFS_DEPRECATED=y +CONFIG_SYSFS_DEPRECATED_V2=y +# CONFIG_RELAY is not set +# CONFIG_NAMESPACES is not set +# CONFIG_BLK_DEV_INITRD is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EMBEDDED=y +CONFIG_UID16=y +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +# CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +CONFIG_AIO=y + +# +# Performance Counters +# +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_STRIP_ASM_SYMS is not set +CONFIG_COMPAT_BRK=y +CONFIG_SLAB=y +# CONFIG_SLUB is not set +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +# CONFIG_MARKERS is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_CLK=y + +# +# GCOV-based kernel profiling +# +# CONFIG_SLOW_WORK is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_SLABINFO=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_BLOCK=y +# CONFIG_LBDAF is not set +# CONFIG_BLK_DEV_BSG is not set +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +# CONFIG_IOSCHED_AS is not set +# CONFIG_IOSCHED_DEADLINE is not set +# CONFIG_IOSCHED_CFQ is not set +# CONFIG_DEFAULT_AS is not set +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +CONFIG_DEFAULT_NOOP=y +CONFIG_DEFAULT_IOSCHED="noop" +# CONFIG_FREEZER is not set + +# +# System Type +# +# CONFIG_ARCH_AAEC2000 is not set +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +CONFIG_ARCH_MXC=y +# CONFIG_ARCH_STMP3XXX is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_L7200 is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_NS9XXX is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_LH7A40X is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set + +# +# Freescale MXC Implementations +# +# CONFIG_ARCH_MX1 is not set +# CONFIG_ARCH_MX2 is not set +CONFIG_ARCH_MX3=y +CONFIG_ARCH_MX35=y + +# +# MX3 platforms: +# +# CONFIG_MACH_MX31ADS is not set +# CONFIG_MACH_PCM037 is not set +# CONFIG_MACH_MX31LITE is not set +# CONFIG_MACH_MX31_3DS is not set +# CONFIG_MACH_MX31MOBOARD is not set +# CONFIG_MACH_MX31LILLY is not set +# CONFIG_MACH_QONG is not set +CONFIG_MACH_PCM043=y +# CONFIG_MACH_ARMADILLO5X0 is not set +# CONFIG_MACH_MX35_3DS is not set +# CONFIG_MXC_IRQ_PRIOR is not set +CONFIG_MXC_PWM=y +CONFIG_ARCH_MXC_IOMUX_V3=y +CONFIG_ARCH_MXC_AUDMUX_V2=y + +# +# Processor Type +# +CONFIG_CPU_32=y +CONFIG_CPU_V6=y +# CONFIG_CPU_32v6K is not set +CONFIG_CPU_32v6=y +CONFIG_CPU_ABRT_EV6=y +CONFIG_CPU_PABRT_NOIFAR=y +CONFIG_CPU_CACHE_V6=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V6=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_OUTER_CACHE=y +CONFIG_CACHE_L2X0=y +# CONFIG_ARM_ERRATA_411920 is not set +CONFIG_COMMON_CLKDEV=y + +# +# Bus support +# +# CONFIG_PCI_SYSCALL is not set +# CONFIG_ARCH_SUPPORTS_MSI is not set +# CONFIG_PCCARD is not set + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_VMSPLIT_3G=y +# CONFIG_VMSPLIT_2G is not set +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0xC0000000 +CONFIG_PREEMPT=y +CONFIG_HZ=100 +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +# CONFIG_HIGHMEM is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +# CONFIG_DISCONTIGMEM_MANUAL is not set +# CONFIG_SPARSEMEM_MANUAL is not set +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=0 +CONFIG_VIRT_TO_BUS=y +CONFIG_HAVE_MLOCK=y +CONFIG_HAVE_MLOCKED_PAGE_BIT=y +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set + +# +# Boot options +# +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="noinitrd console=ttymxc0,115200 root=/dev/mtdblock2 rw ip=off" +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set + +# +# CPU Power Management +# +# CONFIG_CPU_IDLE is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Power management options +# +# CONFIG_PM is not set +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_MMAP is not set +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +# CONFIG_IP_MULTICAST is not set +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_FIB_HASH=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +# CONFIG_IP_PNP_BOOTP is not set +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +# CONFIG_INET_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +# CONFIG_INET_LRO is not set +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +# CONFIG_IPV6 is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETFILTER is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_BRIDGE is not set +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +CONFIG_CAN=y +CONFIG_CAN_RAW=y +# CONFIG_CAN_BCM is not set + +# +# CAN Device Drivers +# +# CONFIG_CAN_VCAN is not set +CONFIG_CAN_DEV=y +CONFIG_CAN_CALC_BITTIMING=y +CONFIG_CAN_SJA1000=y +CONFIG_CAN_SJA1000_PLATFORM=y +# CONFIG_CAN_DEBUG_DEVICES is not set +CONFIG_CAN_FLEXCAN=y +# CONFIG_IRDA is not set +# CONFIG_BT is not set +# CONFIG_AF_RXRPC is not set +# CONFIG_WIRELESS is not set +# CONFIG_WIMAX is not set +# CONFIG_RFKILL is not set +# CONFIG_NET_9P is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=m +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +CONFIG_MTD=y +# CONFIG_MTD_DEBUG is not set +# CONFIG_MTD_CONCAT is not set +CONFIG_MTD_PARTITIONS=y +# CONFIG_MTD_TESTS is not set +# CONFIG_MTD_REDBOOT_PARTS is not set +CONFIG_MTD_CMDLINE_PARTS=y +# CONFIG_MTD_AFS_PARTS is not set +# CONFIG_MTD_AR7_PARTS is not set + +# +# User Modules And Translation Layers +# +CONFIG_MTD_CHAR=y +CONFIG_MTD_BLKDEVS=y +CONFIG_MTD_BLOCK=y +# CONFIG_FTL is not set +# CONFIG_NFTL is not set +# CONFIG_INFTL is not set +# CONFIG_RFD_FTL is not set +# CONFIG_SSFDC is not set +# CONFIG_MTD_OOPS is not set + +# +# RAM/ROM/Flash chip drivers +# +CONFIG_MTD_CFI=y +# CONFIG_MTD_JEDECPROBE is not set +CONFIG_MTD_GEN_PROBE=y +# CONFIG_MTD_CFI_ADV_OPTIONS is not set +CONFIG_MTD_MAP_BANK_WIDTH_1=y +CONFIG_MTD_MAP_BANK_WIDTH_2=y +CONFIG_MTD_MAP_BANK_WIDTH_4=y +# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set +# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set +CONFIG_MTD_CFI_I1=y +CONFIG_MTD_CFI_I2=y +# CONFIG_MTD_CFI_I4 is not set +# CONFIG_MTD_CFI_I8 is not set +CONFIG_MTD_CFI_INTELEXT=y +CONFIG_MTD_CFI_AMDSTD=y +# CONFIG_MTD_CFI_STAA is not set +CONFIG_MTD_CFI_UTIL=y +CONFIG_MTD_RAM=y +# CONFIG_MTD_ROM is not set +# CONFIG_MTD_ABSENT is not set +# CONFIG_MTD_XIP is not set + +# +# Mapping drivers for chip access +# +# CONFIG_MTD_COMPLEX_MAPPINGS is not set +CONFIG_MTD_PHYSMAP=y +# CONFIG_MTD_PHYSMAP_COMPAT is not set +# CONFIG_MTD_ARM_INTEGRATOR is not set +CONFIG_MTD_PLATRAM=y + +# +# Self-contained MTD device drivers +# +# CONFIG_MTD_DATAFLASH is not set +# CONFIG_MTD_M25P80 is not set +# CONFIG_MTD_SLRAM is not set +# CONFIG_MTD_PHRAM is not set +# CONFIG_MTD_MTDRAM is not set +# CONFIG_MTD_BLOCK2MTD is not set + +# +# Disk-On-Chip Device Drivers +# +# CONFIG_MTD_DOC2000 is not set +# CONFIG_MTD_DOC2001 is not set +# CONFIG_MTD_DOC2001PLUS is not set +CONFIG_MTD_NAND=y +# CONFIG_MTD_NAND_VERIFY_WRITE is not set +# CONFIG_MTD_NAND_ECC_SMC is not set +# CONFIG_MTD_NAND_MUSEUM_IDS is not set +# CONFIG_MTD_NAND_GPIO is not set +CONFIG_MTD_NAND_IDS=y +# CONFIG_MTD_NAND_DISKONCHIP is not set +# CONFIG_MTD_NAND_NANDSIM is not set +# CONFIG_MTD_NAND_PLATFORM is not set +# CONFIG_MTD_ALAUDA is not set +CONFIG_MTD_NAND_MXC_V2=y +# CONFIG_MTD_ONENAND is not set + +# +# LPDDR flash memory drivers +# +# CONFIG_MTD_LPDDR is not set + +# +# UBI - Unsorted block images +# +# CONFIG_MTD_UBI is not set +# CONFIG_PARPORT is not set +# CONFIG_BLK_DEV is not set +CONFIG_MISC_DEVICES=y +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_ISL29003 is not set +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +CONFIG_EEPROM_AT24=y +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +# CONFIG_EEPROM_93CX6 is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_SCSI_MULTI_LUN is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +# CONFIG_SCSI_LOWLEVEL is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +# CONFIG_ATA is not set +# CONFIG_MD is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set +# CONFIG_VETH is not set +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +CONFIG_NET_ETHERNET=y +CONFIG_MII=y +# CONFIG_AX88796 is not set +# CONFIG_SMC91X is not set +# CONFIG_DM9000 is not set +# CONFIG_ENC28J60 is not set +# CONFIG_ETHOC is not set +# CONFIG_SMC911X is not set +# CONFIG_SMSC911X is not set +# CONFIG_DNET is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +# CONFIG_B44 is not set +# CONFIG_KS8842 is not set +# CONFIG_KS8851 is not set +CONFIG_FEC=y +# CONFIG_FEC2 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set + +# +# Wireless LAN +# +# CONFIG_WLAN_PRE80211 is not set +# CONFIG_WLAN_80211 is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_CDCETHER=y +# CONFIG_USB_NET_CDC_EEM is not set +# CONFIG_USB_NET_DM9601 is not set +# CONFIG_USB_NET_SMSC95XX is not set +# CONFIG_USB_NET_GL620A is not set +CONFIG_USB_NET_NET1080=y +# CONFIG_USB_NET_PLUSB is not set +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +CONFIG_USB_NET_CDC_SUBSET=y +# CONFIG_USB_ALI_M5632 is not set +# CONFIG_USB_AN2720 is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set +# CONFIG_USB_KC2190 is not set +CONFIG_USB_NET_ZAURUS=y +# CONFIG_USB_NET_INT51X1 is not set +# CONFIG_WAN is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set + +# +# Input device support +# +CONFIG_INPUT=y +# CONFIG_INPUT_FF_MEMLESS is not set +# CONFIG_INPUT_POLLDEV is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +CONFIG_INPUT_MOUSEDEV_PSAUX=y +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +# CONFIG_INPUT_JOYDEV is not set +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_GPIO is not set +# CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_XTKBD is not set +CONFIG_INPUT_MOUSE=y +CONFIG_MOUSE_PS2=y +CONFIG_MOUSE_PS2_ALPS=y +CONFIG_MOUSE_PS2_LOGIPS2PP=y +CONFIG_MOUSE_PS2_SYNAPTICS=y +CONFIG_MOUSE_PS2_TRACKPOINT=y +# CONFIG_MOUSE_PS2_ELANTECH is not set +# CONFIG_MOUSE_PS2_TOUCHKIT is not set +# CONFIG_MOUSE_SERIAL is not set +# CONFIG_MOUSE_APPLETOUCH is not set +# CONFIG_MOUSE_BCM5974 is not set +# CONFIG_MOUSE_VSXXXAA is not set +# CONFIG_MOUSE_GPIO is not set +# CONFIG_MOUSE_SYNAPTICS_I2C is not set +# CONFIG_INPUT_JOYSTICK is not set +# CONFIG_INPUT_TABLET is not set +CONFIG_INPUT_TOUCHSCREEN=y +# CONFIG_TOUCHSCREEN_ADS7846 is not set +# CONFIG_TOUCHSCREEN_AD7877 is not set +# CONFIG_TOUCHSCREEN_AD7879_I2C is not set +# CONFIG_TOUCHSCREEN_AD7879_SPI is not set +# CONFIG_TOUCHSCREEN_AD7879 is not set +# CONFIG_TOUCHSCREEN_EETI is not set +# CONFIG_TOUCHSCREEN_FUJITSU is not set +# CONFIG_TOUCHSCREEN_GUNZE is not set +# CONFIG_TOUCHSCREEN_ELO is not set +# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set +# CONFIG_TOUCHSCREEN_MTOUCH is not set +# CONFIG_TOUCHSCREEN_INEXIO is not set +# CONFIG_TOUCHSCREEN_MK712 is not set +# CONFIG_TOUCHSCREEN_PENMOUNT is not set +# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set +# CONFIG_TOUCHSCREEN_TOUCHWIN is not set +CONFIG_TOUCHSCREEN_WM97XX=y +# CONFIG_TOUCHSCREEN_WM9705 is not set +CONFIG_TOUCHSCREEN_WM9712=y +# CONFIG_TOUCHSCREEN_WM9713 is not set +# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set +# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set +# CONFIG_TOUCHSCREEN_TSC2007 is not set +# CONFIG_TOUCHSCREEN_W90X900 is not set +# CONFIG_INPUT_MISC is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +CONFIG_SERIO_SERPORT=y +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +# CONFIG_VT_HW_CONSOLE_BINDING is not set +CONFIG_DEVKMEM=y +# CONFIG_SERIAL_NONSTANDARD is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_MAX3100 is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +CONFIG_I2C_CHARDEV=m +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_DESIGNWARE is not set +# CONFIG_I2C_GPIO is not set +CONFIG_I2C_IMX=y +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_SIMTEC is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_STUB is not set + +# +# Miscellaneous I2C Chip support +# +# CONFIG_DS1682 is not set +# CONFIG_SENSORS_PCF8574 is not set +# CONFIG_PCF8575 is not set +# CONFIG_SENSORS_PCA9539 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_I2C_DEBUG_CHIP is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +CONFIG_SPI_BITBANG=y +# CONFIG_SPI_GPIO is not set +CONFIG_SPI_IMX=y + +# +# SPI Protocol Masters +# +# CONFIG_SPI_SPIDEV is not set +# CONFIG_SPI_TLE62X0 is not set +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y + +# +# Memory mapped GPIO expanders: +# + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_GPIO_PCF857X is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +CONFIG_W1=y + +# +# 1-wire Bus Masters +# +# CONFIG_W1_MASTER_DS2490 is not set +# CONFIG_W1_MASTER_DS2482 is not set +CONFIG_W1_MASTER_MXC=y +# CONFIG_W1_MASTER_DS1WM is not set +# CONFIG_W1_MASTER_GPIO is not set + +# +# 1-wire Slaves +# +CONFIG_W1_SLAVE_THERM=y +# CONFIG_W1_SLAVE_SMEM is not set +# CONFIG_W1_SLAVE_DS2431 is not set +CONFIG_W1_SLAVE_DS2433=y +# CONFIG_W1_SLAVE_DS2433_CRC is not set +# CONFIG_W1_SLAVE_DS2760 is not set +# CONFIG_W1_SLAVE_BQ27000 is not set +# CONFIG_POWER_SUPPLY is not set +# CONFIG_HWMON is not set +# CONFIG_THERMAL is not set +# CONFIG_THERMAL_HWMON is not set +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set + +# +# Multifunction device drivers +# +CONFIG_MFD_CORE=y +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_UCB1400_CORE is not set +# CONFIG_TPS65010 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_PCF50633 is not set +CONFIG_MFD_MC13783=y +# CONFIG_AB3100_CORE is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_MEDIA_SUPPORT is not set + +# +# Graphics support +# +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_TMIO is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_MB862XX is not set +CONFIG_FB_MX3=y +# CONFIG_FB_BROADSHEET is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set + +# +# Console display driver support +# +# CONFIG_VGA_CONSOLE is not set +CONFIG_DUMMY_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE is not set +# CONFIG_LOGO is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_JACK=y +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_HRTIMER is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +# CONFIG_SND_DRIVERS is not set +# CONFIG_SND_ARM is not set +# CONFIG_SND_SPI is not set +CONFIG_SND_USB=y +# CONFIG_SND_USB_AUDIO is not set +# CONFIG_SND_USB_CAIAQ is not set +CONFIG_SND_SOC=y +CONFIG_SND_SOC_AC97_BUS=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_MXC_SOC_SSI=y +CONFIG_SND_SOC_PHYCORE_AC97=y +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_WM9712=y +# CONFIG_SOUND_PRIME is not set +CONFIG_AC97_BUS=y +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +CONFIG_HID_DEBUG=y +# CONFIG_HIDRAW is not set + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +# CONFIG_USB_HIDDEV is not set + +# +# Special HID drivers +# +# CONFIG_HID_A4TECH is not set +# CONFIG_HID_APPLE is not set +# CONFIG_HID_BELKIN is not set +# CONFIG_HID_CHERRY is not set +# CONFIG_HID_CHICONY is not set +# CONFIG_HID_CYPRESS is not set +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EZKEY is not set +# CONFIG_HID_KYE is not set +# CONFIG_HID_GYRATION is not set +# CONFIG_HID_KENSINGTON is not set +# CONFIG_HID_LOGITECH is not set +# CONFIG_HID_MICROSOFT is not set +# CONFIG_HID_MONTEREY is not set +# CONFIG_HID_NTRIG is not set +# CONFIG_HID_PANTHERLORD is not set +# CONFIG_HID_PETALYNX is not set +# CONFIG_HID_SAMSUNG is not set +# CONFIG_HID_SONY is not set +# CONFIG_HID_SUNPLUS is not set +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +# CONFIG_HID_TOPSEED is not set +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_ZEROPLUS is not set +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEVICEFS=y +# CONFIG_USB_DEVICE_CLASS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +CONFIG_USB_MON=y +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_ROOT_HUB_TT=y +# CONFIG_USB_EHCI_TT_NEWSCHED is not set +CONFIG_USB_EHCI_MXC=y +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HWA_HCD is not set +# CONFIG_USB_MUSB_HDRC is not set +# CONFIG_USB_GADGET_MUSB_HDRC is not set + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_BERRY_CHARGE is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_VST is not set +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +CONFIG_USB_GADGET_VBUS_DRAW=2 +CONFIG_USB_GADGET_SELECTED=y +# CONFIG_USB_GADGET_AT91 is not set +# CONFIG_USB_GADGET_ATMEL_USBA is not set +CONFIG_USB_GADGET_FSL_USB2=y +CONFIG_USB_FSL_USB2=y +# CONFIG_USB_GADGET_LH7A40X is not set +# CONFIG_USB_GADGET_OMAP is not set +# CONFIG_USB_GADGET_PXA25X is not set +# CONFIG_USB_GADGET_PXA27X is not set +# CONFIG_USB_GADGET_S3C_HSOTG is not set +# CONFIG_USB_GADGET_IMX is not set +# CONFIG_USB_GADGET_S3C2410 is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_AMD5536UDC is not set +# CONFIG_USB_GADGET_FSL_QE is not set +# CONFIG_USB_GADGET_CI13XXX is not set +# CONFIG_USB_GADGET_NET2280 is not set +# CONFIG_USB_GADGET_GOKU is not set +# CONFIG_USB_GADGET_LANGWELL is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +CONFIG_USB_GADGET_DUALSPEED=y +# CONFIG_USB_ZERO is not set +# CONFIG_USB_AUDIO is not set +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_GADGETFS is not set +CONFIG_USB_FILE_STORAGE=m +# CONFIG_USB_FILE_STORAGE_TEST is not set +CONFIG_USB_G_SERIAL=m +# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set +# CONFIG_USB_CDC_COMPOSITE is not set + +# +# OTG and related infrastructure +# +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_NOP_USB_XCEIV is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +# CONFIG_MMC_UNSAFE_RESUME is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_ESDHC=y +CONFIG_MMC_SDHCI_PLTFM=y +# CONFIG_MMC_AT91 is not set +# CONFIG_MMC_ATMELMCI is not set +# CONFIG_MMC_MXC is not set +# CONFIG_MMC_SPI is not set +# CONFIG_MEMSTICK is not set +# CONFIG_ACCESSIBILITY is not set +# CONFIG_NEW_LEDS is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_X1205 is not set +CONFIG_RTC_DRV_PCF8563=y +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +CONFIG_DMADEVICES=y + +# +# DMA Devices +# +CONFIG_MX3_IPU=y +CONFIG_MX3_IPU_IRQS=4 +CONFIG_DMA_ENGINE=y + +# +# DMA Clients +# +# CONFIG_NET_DMA is not set +# CONFIG_ASYNC_TX_DMA is not set +# CONFIG_DMATEST is not set +# CONFIG_AUXDISPLAY is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_FIXED_VOLTAGE is not set +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_BQ24022 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_UIO is not set +# CONFIG_STAGING is not set + +# +# File systems +# +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +# CONFIG_EXT2_FS_XIP is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set +CONFIG_EXT3_FS_XATTR=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +# CONFIG_EXT4_FS is not set +CONFIG_JBD=y +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +CONFIG_FS_POSIX_ACL=y +# CONFIG_XFS_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +# CONFIG_DNOTIFY is not set +CONFIG_INOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_QUOTA is not set +# CONFIG_AUTOFS_FS is not set +# CONFIG_AUTOFS4_FS is not set +# CONFIG_FUSE_FS is not set + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +# CONFIG_ISO9660_FS is not set +# CONFIG_UDF_FS is not set + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +# CONFIG_TMPFS_POSIX_ACL is not set +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +CONFIG_JFFS2_FS=y +CONFIG_JFFS2_FS_DEBUG=0 +CONFIG_JFFS2_FS_WRITEBUFFER=y +# CONFIG_JFFS2_FS_WBUF_VERIFY is not set +# CONFIG_JFFS2_SUMMARY is not set +# CONFIG_JFFS2_FS_XATTR is not set +# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set +CONFIG_JFFS2_ZLIB=y +# CONFIG_JFFS2_LZO is not set +CONFIG_JFFS2_RTIME=y +# CONFIG_JFFS2_RUBIN is not set +# CONFIG_CRAMFS is not set +# CONFIG_SQUASHFS is not set +# CONFIG_VXFS_FS is not set +CONFIG_MINIX_FS=y +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +CONFIG_NFS_V3_ACL=y +CONFIG_NFS_V4=y +# CONFIG_NFS_V4_1 is not set +CONFIG_ROOT_NFS=y +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_ACL_SUPPORT=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +CONFIG_RPCSEC_GSS_KRB5=y +# CONFIG_RPCSEC_GSS_SPKM3 is not set +# CONFIG_SMB_FS is not set +# CONFIG_CIFS is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +CONFIG_NLS_CODEPAGE_850=y +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +# CONFIG_NLS_ASCII is not set +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +CONFIG_NLS_ISO8859_15=y +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_UTF8 is not set +# CONFIG_DLM is not set + +# +# Kernel hacking +# +# CONFIG_PRINTK_TIME is not set +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=1024 +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_HEADERS_CHECK is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_DETECT_SOFTLOCKUP is not set +# CONFIG_DETECT_HUNG_TASK is not set +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_DEBUG_SLAB is not set +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +# CONFIG_RCU_CPU_STALL_DETECTOR is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_PAGE_POISONING is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +CONFIG_ARM_UNWIND=y +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_ERRORS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_LL is not set + +# +# Security options +# +# CONFIG_KEYS is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +# CONFIG_SECURITY_FILE_CAPABILITIES is not set +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +# CONFIG_CRYPTO_FIPS is not set +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_GF128MUL is not set +# CONFIG_CRYPTO_NULL is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +# CONFIG_CRYPTO_AUTHENC is not set +# CONFIG_CRYPTO_TEST is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +# CONFIG_CRYPTO_ECB is not set +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +# CONFIG_CRYPTO_HMAC is not set +# CONFIG_CRYPTO_XCBC is not set + +# +# Digest +# +# CONFIG_CRYPTO_CRC32C is not set +# CONFIG_CRYPTO_MD4 is not set +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +# CONFIG_CRYPTO_SHA1 is not set +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +# CONFIG_CRYPTO_AES is not set +# CONFIG_CRYPTO_ANUBIS is not set +# CONFIG_CRYPTO_ARC4 is not set +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +# CONFIG_CRYPTO_LZO is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_HW is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_RATIONAL=y +CONFIG_GENERIC_FIND_LAST_BIT=y +# CONFIG_CRC_CCITT is not set +# CONFIG_CRC16 is not set +# CONFIG_CRC_T10DIF is not set +# CONFIG_CRC_ITU_T is not set +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +# CONFIG_LIBCRC32C is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_NLATTR=y diff --git a/recipes/linux/linux/sarge-at91/2.6.21-sarge-kernel.patch b/recipes/linux/linux/sarge-at91/2.6.21-sarge-kernel.patch index 7b5f408c37..76eaf3fcba 100644 --- a/recipes/linux/linux/sarge-at91/2.6.21-sarge-kernel.patch +++ b/recipes/linux/linux/sarge-at91/2.6.21-sarge-kernel.patch @@ -1,6 +1,6 @@ -diff -Nurp ../linux-2.6.21.4/arch/arm/boot/compressed/head-at91rm9200.S ./arch/arm/boot/compressed/head-at91rm9200.S ---- ../linux-2.6.21.4/arch/arm/boot/compressed/head-at91rm9200.S 2007-06-12 22:29:12.000000000 +0200 -+++ ./arch/arm/boot/compressed/head-at91rm9200.S 2007-06-12 02:57:07.000000000 +0200 +diff -Nurp linux-2.6.21.4/arch/arm/boot/compressed/head-at91rm9200.S b/arch/arm/boot/compressed/head-at91rm9200.S +--- linux-2.6.21.4/arch/arm/boot/compressed/head-at91rm9200.S 2007-06-12 22:29:12.000000000 +0200 ++++ b/arch/arm/boot/compressed/head-at91rm9200.S 2007-06-12 02:57:07.000000000 +0200 @@ -73,6 +73,12 @@ cmp r7, r3 beq 99f @@ -14,9 +14,9 @@ diff -Nurp ../linux-2.6.21.4/arch/arm/boot/compressed/head-at91rm9200.S ./arch/a @ Unknown board, use the AT91RM9200DK board @ mov r7, #MACH_TYPE_AT91RM9200 mov r7, #(MACH_TYPE_AT91RM9200DK & 0xff) -diff -Nurp ../linux-2.6.21.4/arch/arm/mach-at91/board-sarge.c ./arch/arm/mach-at91/board-sarge.c ---- ../linux-2.6.21.4/arch/arm/mach-at91/board-sarge.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./arch/arm/mach-at91/board-sarge.c 2007-06-12 02:57:07.000000000 +0200 +diff -Nurp linux-2.6.21.4/arch/arm/mach-at91/board-sarge.c b/arch/arm/mach-at91/board-sarge.c +--- linux-2.6.21.4/arch/arm/mach-at91/board-sarge.c 1970-01-01 01:00:00.000000000 +0100 ++++ b/arch/arm/mach-at91/board-sarge.c 2007-06-12 02:57:07.000000000 +0200 @@ -0,0 +1,190 @@ +/* + * linux/arch/arm/mach-at91/board-sarge.c @@ -208,9 +208,9 @@ diff -Nurp ../linux-2.6.21.4/arch/arm/mach-at91/board-sarge.c ./arch/arm/mach-at + .init_irq = sarge_init_irq, + .init_machine = sarge_board_init, +MACHINE_END -diff -Nurp ../linux-2.6.21.4/arch/arm/mach-at91/Kconfig ./arch/arm/mach-at91/Kconfig ---- ../linux-2.6.21.4/arch/arm/mach-at91/Kconfig 2007-06-12 22:29:12.000000000 +0200 -+++ ./arch/arm/mach-at91/Kconfig 2007-06-12 03:00:28.000000000 +0200 +diff -Nurp linux-2.6.21.4/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig +--- linux-2.6.21.4/arch/arm/mach-at91/Kconfig 2007-06-12 22:29:12.000000000 +0200 ++++ b/arch/arm/mach-at91/Kconfig 2007-06-12 03:00:28.000000000 +0200 @@ -90,6 +90,13 @@ config MACH_KAFA help Select this if you are using Sperry-Sun's KAFA board. @@ -225,9 +225,9 @@ diff -Nurp ../linux-2.6.21.4/arch/arm/mach-at91/Kconfig ./arch/arm/mach-at91/Kco config MACH_CHUB bool "Promwad Chub board" depends on ARCH_AT91RM9200 -diff -Nurp ../linux-2.6.21.4/arch/arm/mach-at91/Makefile ./arch/arm/mach-at91/Makefile ---- ../linux-2.6.21.4/arch/arm/mach-at91/Makefile 2007-06-12 22:29:12.000000000 +0200 -+++ ./arch/arm/mach-at91/Makefile 2007-06-12 03:00:47.000000000 +0200 +diff -Nurp linux-2.6.21.4/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile +--- linux-2.6.21.4/arch/arm/mach-at91/Makefile 2007-06-12 22:29:12.000000000 +0200 ++++ b/arch/arm/mach-at91/Makefile 2007-06-12 03:00:47.000000000 +0200 @@ -29,6 +29,7 @@ obj-$(CONFIG_MACH_KB9200) += board-kb920 obj-$(CONFIG_MACH_ATEB9200) += board-eb9200.o obj-$(CONFIG_MACH_KAFA) += board-kafa.o diff --git a/recipes/linux/linux/sarge-at91/2.6.21-sarge-mmc.patch b/recipes/linux/linux/sarge-at91/2.6.21-sarge-mmc.patch index 01bbaeb73e..08c3e735ff 100644 --- a/recipes/linux/linux/sarge-at91/2.6.21-sarge-mmc.patch +++ b/recipes/linux/linux/sarge-at91/2.6.21-sarge-mmc.patch @@ -1,6 +1,6 @@ -diff -Nurp ../linux-2.6.21.4/drivers/mmc/at91_mci.c ./drivers/mmc/at91_mci.c ---- ../linux-2.6.21.4/drivers/mmc/at91_mci.c 2007-06-12 22:29:12.000000000 +0200 -+++ ./drivers/mmc/at91_mci.c 2007-06-12 03:52:55.000000000 +0200 +diff -Nurp linux-2.6.21.4/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c +--- linux-2.6.21.4/drivers/mmc/at91_mci.c 2007-06-12 22:29:12.000000000 +0200 ++++ b/drivers/mmc/at91_mci.c 2007-06-12 03:52:55.000000000 +0200 @@ -421,8 +421,11 @@ static unsigned int at91_mci_send_comman if (cmd->opcode == MMC_STOP_TRANSMISSION) cmdr |= AT91_MCI_TRCMD_STOP; @@ -29,9 +29,9 @@ diff -Nurp ../linux-2.6.21.4/drivers/mmc/at91_mci.c ./drivers/mmc/at91_mci.c return IRQ_HANDLED; } -diff -Nurp ../linux-2.6.21.4/drivers/mmc/mmc_block.c ./drivers/mmc/mmc_block.c ---- ../linux-2.6.21.4/drivers/mmc/mmc_block.c 2007-06-07 23:27:31.000000000 +0200 -+++ ./drivers/mmc/mmc_block.c 2007-06-12 04:19:36.000000000 +0200 +diff -Nurp linux-2.6.21.4/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c +--- linux-2.6.21.4/drivers/mmc/mmc_block.c 2007-06-07 23:27:31.000000000 +0200 ++++ b/drivers/mmc/mmc_block.c 2007-06-12 04:19:36.000000000 +0200 @@ -256,10 +256,24 @@ static int mmc_blk_issue_rq(struct mmc_q * this rule as they support querying the number of * successfully written sectors. @@ -58,9 +58,9 @@ diff -Nurp ../linux-2.6.21.4/drivers/mmc/mmc_block.c ./drivers/mmc/mmc_block.c if (brq.data.blocks > 1) { brq.data.flags |= MMC_DATA_MULTI; -diff -Nurp ../linux-2.6.21.4/drivers/mmc/mmc.c ./drivers/mmc/mmc.c ---- ../linux-2.6.21.4/drivers/mmc/mmc.c 2007-06-07 23:27:31.000000000 +0200 -+++ ./drivers/mmc/mmc.c 2007-06-12 04:10:05.000000000 +0200 +diff -Nurp linux-2.6.21.4/drivers/mmc/mmc.c b/drivers/mmc/mmc.c +--- linux-2.6.21.4/drivers/mmc/mmc.c 2007-06-07 23:27:31.000000000 +0200 ++++ b/drivers/mmc/mmc.c 2007-06-12 04:10:05.000000000 +0200 @@ -1500,12 +1500,22 @@ static void mmc_setup(struct mmc_host *h mmc_set_ios(host); diff --git a/recipes/linux/linux/sarge-at91/2.6.21-sarge-phy.patch b/recipes/linux/linux/sarge-at91/2.6.21-sarge-phy.patch index 25ce15eb94..5cdc73b4dd 100644 --- a/recipes/linux/linux/sarge-at91/2.6.21-sarge-phy.patch +++ b/recipes/linux/linux/sarge-at91/2.6.21-sarge-phy.patch @@ -1,6 +1,6 @@ -diff -Nurp ../linux-2.6.21.4/drivers/net/arm/at91_ether.c ./drivers/net/arm/at91_ether.c ---- ../linux-2.6.21.4/drivers/net/arm/at91_ether.c 2007-06-12 22:29:12.000000000 +0200 -+++ ./drivers/net/arm/at91_ether.c 2007-06-12 03:11:16.000000000 +0200 +diff -Nurp linux-2.6.21.4/drivers/net/arm/at91_ether.c b/drivers/net/arm/at91_ether.c +--- linux-2.6.21.4/drivers/net/arm/at91_ether.c 2007-06-12 22:29:12.000000000 +0200 ++++ b/drivers/net/arm/at91_ether.c 2007-06-12 03:11:16.000000000 +0200 @@ -235,6 +235,11 @@ static irqreturn_t at91ether_phy_interru if (!(phy & (1 << 7))) goto done; @@ -54,9 +54,9 @@ diff -Nurp ../linux-2.6.21.4/drivers/net/arm/at91_ether.c ./drivers/net/arm/at91 detected = at91ether_setup(phy_id, phy_address, pdev, ether_clk); break; } -diff -Nurp ../linux-2.6.21.4/drivers/net/arm/at91_ether.h ./drivers/net/arm/at91_ether.h ---- ../linux-2.6.21.4/drivers/net/arm/at91_ether.h 2007-06-12 22:29:12.000000000 +0200 -+++ ./drivers/net/arm/at91_ether.h 2007-06-12 03:07:54.000000000 +0200 +diff -Nurp linux-2.6.21.4/drivers/net/arm/at91_ether.h b/drivers/net/arm/at91_ether.h +--- linux-2.6.21.4/drivers/net/arm/at91_ether.h 2007-06-12 22:29:12.000000000 +0200 ++++ b/drivers/net/arm/at91_ether.h 2007-06-12 03:07:54.000000000 +0200 @@ -29,6 +29,15 @@ #define MII_ISINTS_REG 19 #define MII_LEDCTRL_REG 20 @@ -73,9 +73,9 @@ diff -Nurp ../linux-2.6.21.4/drivers/net/arm/at91_ether.h ./drivers/net/arm/at91 /* Realtek RTL8201 PHY */ #define MII_RTL8201_ID 0x00008200 -diff -Nurp ../linux-2.6.21.4/drivers/net/phy/Kconfig ./drivers/net/phy/Kconfig ---- ../linux-2.6.21.4/drivers/net/phy/Kconfig 2007-06-07 23:27:31.000000000 +0200 -+++ ./drivers/net/phy/Kconfig 2007-06-12 03:12:16.000000000 +0200 +diff -Nurp linux-2.6.21.4/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig +--- linux-2.6.21.4/drivers/net/phy/Kconfig 2007-06-07 23:27:31.000000000 +0200 ++++ b/drivers/net/phy/Kconfig 2007-06-12 03:12:16.000000000 +0200 @@ -62,6 +62,12 @@ config BROADCOM_PHY ---help--- Currently supports the BCM5411, BCM5421 and BCM5461 PHYs. @@ -89,17 +89,17 @@ diff -Nurp ../linux-2.6.21.4/drivers/net/phy/Kconfig ./drivers/net/phy/Kconfig config FIXED_PHY tristate "Drivers for PHY emulation on fixed speed/link" depends on PHYLIB -diff -Nurp ../linux-2.6.21.4/drivers/net/phy/Makefile ./drivers/net/phy/Makefile ---- ../linux-2.6.21.4/drivers/net/phy/Makefile 2007-06-07 23:27:31.000000000 +0200 -+++ ./drivers/net/phy/Makefile 2007-06-12 03:12:29.000000000 +0200 +diff -Nurp linux-2.6.21.4/drivers/net/phy/Makefile b/drivers/net/phy/Makefile +--- linux-2.6.21.4/drivers/net/phy/Makefile 2007-06-07 23:27:31.000000000 +0200 ++++ b/drivers/net/phy/Makefile 2007-06-12 03:12:29.000000000 +0200 @@ -12,3 +12,4 @@ obj-$(CONFIG_SMSC_PHY) += smsc.o obj-$(CONFIG_VITESSE_PHY) += vitesse.o obj-$(CONFIG_BROADCOM_PHY) += broadcom.o obj-$(CONFIG_FIXED_PHY) += fixed.o +obj-$(CONFIG_STE100P_PHY) += ste100p.o -diff -Nurp ../linux-2.6.21.4/drivers/net/phy/ste100p.c ./drivers/net/phy/ste100p.c ---- ../linux-2.6.21.4/drivers/net/phy/ste100p.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./drivers/net/phy/ste100p.c 2007-06-12 02:52:31.000000000 +0200 +diff -Nurp linux-2.6.21.4/drivers/net/phy/ste100p.c b/drivers/net/phy/ste100p.c +--- linux-2.6.21.4/drivers/net/phy/ste100p.c 1970-01-01 01:00:00.000000000 +0100 ++++ b/drivers/net/phy/ste100p.c 2007-06-12 02:52:31.000000000 +0200 @@ -0,0 +1,297 @@ +/* + * drivers/net/phy/ste100p.c diff --git a/recipes/linux/linux_2.6.24.bb b/recipes/linux/linux_2.6.24.bb index d03d2b7613..edd67a6e35 100644 --- a/recipes/linux/linux_2.6.24.bb +++ b/recipes/linux/linux_2.6.24.bb @@ -11,13 +11,16 @@ DEFAULT_PREFERENCE_hipox = "1" DEFAULT_PREFERENCE_cs-e9302 = "1" DEFAULT_PREFERENCE_smartq5 = "1" -PR = "r35" +PR = "r46" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2;name=kernel \ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.7.bz2;apply=yes;name=stablepatch \ file://squashfs-lzma-2.6.24.patch \ file://ubifs-v2.6.24.patch \ file://ubifs-v2.6.24-silent-get-sb.patch \ + file://cfi-amic.patch \ + file://make-3.82.patch \ + file://ftdi-4n-galaxy.patch \ file://defconfig" # Moved away temporarely until committed properly (work in progress). @@ -104,6 +107,10 @@ SRC_URI_append_hipox = " \ file://hipox-poe-enable.patch \ file://siocoutqsnd.patch \ file://hipox-phy.patch \ + file://ox810-pci-read-config-fix.patch \ + file://hipox-nand-timing.patch \ + file://ox810-pci-abort-handler.patch \ + file://hipox-gmac-deadlock.patch \ " EXTRA_OEMAKE_smartq5 = " OBJCOPY=${OBJCOPY}" diff --git a/recipes/linux/linux_2.6.31.bb b/recipes/linux/linux_2.6.31.bb index 8dc0f4b866..c7448f4515 100644 --- a/recipes/linux/linux_2.6.31.bb +++ b/recipes/linux/linux_2.6.31.bb @@ -15,6 +15,7 @@ DEFAULT_PREFERENCE_iei-nanogx-466 = "1" DEFAULT_PREFERENCE_cm-x300 = "1" DEFAULT_PREFERENCE_babbage = "1" DEFAULT_PREFERENCE_mx25-3stack = "1" +DEFAULT_PREFERENCE_pcm043 = "1" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.12.bz2;apply=yes;name=stablepatch \ @@ -83,6 +84,94 @@ SRC_URI_append_mx25-3stack = " \ file://defconfig \ " +SRC_URI_append_pcm043 = " \ + file://0001-spi-add-SPI-driver-for-most-known-i.MX-SoCs.patch \ + file://0002-mfd-Add-Freescale-MC13783-driver.patch \ + file://0003-mx3-Add-SSI-pins-to-iomux-table.patch \ + file://0004-mxc-iomux-v3-remove-resource-handling.patch \ + file://0005-i.MX31-clock-rename-SSI-clocks-to-driver-name.patch \ + file://0006-i.MX2-Add-sound-ssi-resources.patch \ + file://0007-i.MX3-Add-sound-ssi-resources.patch \ + file://0008-MXC-Add-a-digital-audio-multiplexer-driver.patch \ + file://0009-MX31-Fix-spi-clock-names.patch \ + file://0010-i.MX35-Fix-audmux-clock.patch \ + file://0011-MX31-add-spi-controller-devices-resources.patch \ + file://0012-i.MX27-clock-rename-spi-clocks-to-match-device.patch \ + file://0013-add-a-mc13783-codec-driver.patch \ + file://0014-imx-ssi-sound-driver.patch \ + file://0015-add-phycore-ac97-sound-support.patch \ + file://0016-add-phycore-mc13783-sound-support.patch \ + file://0017-pcm043-add-sound-support.patch \ + file://0018-pcm038-Add-SPI-MC13783-support.patch \ + file://0019-mx27-add-support-for-phytec-pca100-phyCARD-s-board.patch \ + file://0020-MX2-Add-SPI-devices-resources.patch \ + file://0021-mxc-mx1-mx2-DMA-add-a-possibility-to-create-an-endle.patch \ + file://0022-ASoC-Allow-32-bit-registers-for-DAPM.patch \ + file://0023-pca100-add-sound-support.patch \ + file://0024-pcm038-add-sound-support.patch \ + file://0025-pcm037-Add-sound-support.patch \ + file://0026-imx-ssi-Fix-AC97-rates.patch \ + file://0027-imx-ssi-flush-fifos.patch \ + file://0028-imx-ssi-Fix-occasional-AC97-reset-failure.patch \ + file://0021-Early-printk.patch \ + file://0024-MX31-Clock-updates.patch;striplevel=0 \ + file://Update-PCM043-board-support.patch \ + file://0027-Add-EHCI-support-for-MX27-and-MX31-based-boards.patch \ + file://0029-MX31-Add-USB-platform-devices-and-resources.patch \ + file://0053-Watchdog-driver-for-IMX-MXC.patch \ + file://0066-HACK-increase-default-tx_queue_len-to-10000.patch \ + file://0084-i.MX35-clock-support-Add-USB-clocks.patch \ + file://0088-ehci-mxc-Fix-clocks.patch \ + file://0090-mx3x-Fixup-USB-base-addresses.patch \ + file://0091-mx31-clock-remove-obsolete-FIXME-comment.patch \ + file://0092-mx35-clock-give-ehci-clocks-names.patch \ + file://0096-i.MX35-implement-get_rate-for-usb-otg-clock.patch \ + file://0097-fsl-udc-driver-add-mx35-support.patch \ + file://0001-mxcv2-nand-driver.patch;striplevel=0 \ + file://0002-MXC-NFC-Remove-useless-structure-member.patch \ + file://0003-MXC-NFC-Add-a-real-NAND-flash-data-width-setup-func.patch \ + file://0004-MXC-NFC-Use-generic-bad-block-detection.patch \ + file://0005-MXC-NFC-Divide-flash-device-detection-into-two-step.patch \ + file://0006-MXC-NFC-Reorder-structure-setup-to-use-NAND-informa.patch \ + file://0007-MXC-NFC-Fix-OOB-layout.patch \ + file://0008-MXC-NFC-The-i.MX35-CPU-also-uses-a-V2.1-NFC.patch \ + file://0009-MXC-NFC-Fix-NFC-s-address-area-on-i.MX35.patch;striplevel=0 \ + file://0010-MXC-NFC-Add-the-clock-resource-to-support-NFC-in-i.patch;striplevel=0 \ + file://0011-MXC-NFC-Fix-NFC-s-clock-name.patch \ + file://0012-MXC-NFC-i.MX35-can-work-with-the-v2-not-with-v1-of.patch;striplevel=0 \ + file://0013-MXC-NFC-Add-the-cpu_is_mx25-macro.patch;striplevel=0 \ + file://0014-MXC-NFC-Add-NAND-device-to-the-pcm043-platform.patch;striplevel=0 \ + file://0015-MXC-NFC-unlock_addr-is-only-used-while-__init-pha.patch \ + file://fix_oob_layout.diff;striplevel=0 \ + file://0002-mxc_nand-cleanup-eccoob-descriptions.patch \ + file://0003-mxc_nand-cleanup-initialization.patch \ + file://0004-mxc_nand-merge-send_read_page-and-send_prog_page.patch \ + file://0005-mxc_nand-introduce-mxc_do_addr_cycle.patch \ + file://0006-mxc-nand-remove-debug-param.patch \ + file://0007-mxc-nand-remove-dead-code.patch \ + file://0008-mxc-nand-use-resource_size.patch \ + file://0009-mxc-nand-use-buffers.patch \ + file://0010-mxc-nand-simplify-command-processing.patch \ + file://0011-mxc-nand-modify-send_page-to-send-all-pages-not-on.patch \ + file://0012-mxc_nand-remove-unused-defines.patch \ + file://0013-mxc_nand-Make-main-spare-areas-runtime-configurable.patch \ + file://0014-mxc_nand-Get-rid-of-pagesize_2k-flag.patch \ + file://0015-mxc_nand-Add-NFC-V2-support.patch \ + file://0016-mxc_nand-disable-sp_en-bit-only-once.patch \ + file://0017-mxc_nand-Allow-flash-based-bbt.patch \ + file://0018-mxc_nand-remove-TROP_US_DELAY.patch \ + file://0019-mxc_nand-use-DRIVER_NAME-where-appropriate.patch \ + file://linux-2.6.31.6-flexcan.patch \ + file://fix_owire_clk.patch \ + file://w1_master.patch \ + file://add-led-gpio.patch \ + file://linux-2.6.31.6-spi.patch \ + file://fix_max7301.patch \ + file://fix_clock_calc.patch \ + file://add_mmc.diff;striplevel=0 \ + file://fix_mmc_for_highspeed.diff \ + file://fix_can.patch " + do_devicetree_image_append_boc01() { dtc -I dts -O dtb ${KERNEL_DEVICETREE_FLAGS} -o devicetree.v1 ${KERNEL_DEVICETREE}.v1 install -m 0644 devicetree.v1 ${D}/boot/devicetree-${KERNEL_VERSION}.v1 diff --git a/recipes/linux/linux_2.6.37.bb b/recipes/linux/linux_2.6.37.bb index e11af813c4..1cd40f433c 100644 --- a/recipes/linux/linux_2.6.37.bb +++ b/recipes/linux/linux_2.6.37.bb @@ -1,6 +1,6 @@ require linux.inc -PR = "r3" +PR = "r4" # Mark archs/machines that this kernel supports DEFAULT_PREFERENCE = "-1" @@ -20,7 +20,7 @@ DEFAULT_PREFERENCE_visstrim_m10 = "1" # DEFAULT_PREFERENCE_om-gta01 = "1" SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2;name=kernel \ - ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.1.bz2;apply=yes;name=stablepatch \ + ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.2.bz2;apply=yes;name=stablepatch \ file://defconfig " SRC_URI_append_om-gta02 = " \ @@ -34,5 +34,5 @@ SRC_URI_append_om-gta01 = " \ SRC_URI[kernel.md5sum] = "c8ee37b4fdccdb651e0603d35350b434" SRC_URI[kernel.sha256sum] = "edbf091805414739cf57a3bbfeba9e87f5e74f97e38f04d12060e9e0c71e383a" -SRC_URI[stablepatch.md5sum] = "7693d1d32ed39346cc988e0f027e5890" -SRC_URI[stablepatch.sha256sum] = "c33bfa59828a9ff6916993ec008967a8c1d71a18b743ee15f4280e773ef4baaf" +SRC_URI[stablepatch.md5sum] = "bb5798f2a2a5af13219d1a250c4dad11" +SRC_URI[stablepatch.sha256sum] = "3d65f2fb5f0018e8dafda4abe68d947d2ab5e21c386062cb0d6e011244a16aef" diff --git a/recipes/litephone/files/litephone.desktop b/recipes/litephone/litephone/litephone.desktop similarity index 83% rename from recipes/litephone/files/litephone.desktop rename to recipes/litephone/litephone/litephone.desktop index f58bc58da7..a21f20f61a 100644 --- a/recipes/litephone/files/litephone.desktop +++ b/recipes/litephone/litephone/litephone.desktop @@ -5,5 +5,5 @@ Exec=litephone Icon=litephone-mobile Terminal=false Type=Application -Categories=Applications; +Categories=Network;Telephony; StartupNotify=true diff --git a/recipes/litephone/litephone_git.bb b/recipes/litephone/litephone_git.bb index 4fc5441dc1..4e640a6006 100644 --- a/recipes/litephone/litephone_git.bb +++ b/recipes/litephone/litephone_git.bb @@ -2,10 +2,10 @@ require litephone.inc SRCREV = "4c9f16d9acc6cd18fc3f647b7e4f44a2d3bdd7b6" PV = "0.1+gitr${SRCPV}" -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" SRC_URI = "git://git.senfdax.de/git/litephone;protocol=http \ - file://files/litephone.desktop" + file://litephone.desktop" S = "${WORKDIR}/git/" @@ -19,7 +19,7 @@ do_install() { install -d ${D}/${datadir}/litephone/translations install ${S}/translations/*.qm ${D}/${datadir}/litephone/translations/ install -d ${D}/${datadir}/applications - install ${WORKDIR}/files/litephone.desktop ${D}/${datadir}/applications/ + install ${WORKDIR}/litephone.desktop ${D}/${datadir}/applications/ } FILES_${PN}-locale-pl-pl += "/usr/share/litephone/translations/litephone_pl.qm" diff --git a/recipes/live555/live555_20110110.bb b/recipes/live555/live555_20110110.bb deleted file mode 100644 index a034a2c685..0000000000 --- a/recipes/live555/live555_20110110.bb +++ /dev/null @@ -1,7 +0,0 @@ -require live555.inc - -PR = "${INC_PR}.0" - -SRC_URI[md5sum] = "978cd8443735d47b53ee624a985a047e" -SRC_URI[sha256sum] = "39f23d4c140f9a0bfd6fa11f38c75ae8c3b4fab1930ca1acb8ad66e70947dbc1" - diff --git a/recipes/live555/live555_20111120.bb b/recipes/live555/live555_20111120.bb new file mode 100644 index 0000000000..f6c4f63607 --- /dev/null +++ b/recipes/live555/live555_20111120.bb @@ -0,0 +1,7 @@ +require live555.inc + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "8e5ebefdf7d12ca9cfd7175ff3d7eef2" +SRC_URI[sha256sum] = "695cf22d43516f082e26ee9eb8373a0ae3b4ed472f1e224b51d881219f694f2e" + diff --git a/recipes/llvm/llvm-native.inc b/recipes/llvm/llvm-native.inc deleted file mode 100644 index b3cb7a64ec..0000000000 --- a/recipes/llvm/llvm-native.inc +++ /dev/null @@ -1,33 +0,0 @@ -require llvm.inc - -DEPENDS = "llvm-common-native cmake-native binutils-cross perl-native" - -inherit native - -# the difference to the non-native build is that we do not need -# to declare the location of the tblgen executable. -EXTRA_OECMAKE = "\ - -DLLVM_TARGETS_TO_BUILD=${LLVM_ARCH} \ - -DCMAKE_LINKER:FILEPATH=${LD} \ - -DCMAKE_AR:FILEPATH=${AR} \ - -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \ - -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \ - -DCMAKE_RANLIB:FILEPATH=${RANLIB} \ - -DCMAKE_STRIP:FILEPATH=${STRIP} \ - -DNM_PATH:FILEPATH=${NM} \ -" - -PACKAGES = "" - -PACKAGES_DYNAMIC = "" - -do_stage() { - cd ${OECMAKE_BUILDPATH} - - llvm_stage - - install -d ${STAGING_BINDIR} - install -m 0755 bin/llvm-config${LLVM_RELEASE} ${STAGING_BINDIR} -} - - diff --git a/recipes/llvm/llvm.inc b/recipes/llvm/llvm.inc index 03ff61da0e..8f85857dcc 100644 --- a/recipes/llvm/llvm.inc +++ b/recipes/llvm/llvm.inc @@ -20,12 +20,16 @@ DESCRIPTION = "The Low Level Virtual Machine" HOMEPAGE = "http://llvm.org" +BBCLASSEXTEND = "native" + DEPENDS = "llvm-common llvm${LLVM_RELEASE}-native" +DEPENDS_virtclass-native = "llvm-common-native cmake-native perl-native" + # 3-clause BSD-like LICENSE = "University of Illinois/NCSA Open Source License" -SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.tar.gz" +SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.tgz" S = "${WORKDIR}/llvm-${PV}" @@ -60,13 +64,33 @@ EXTRA_OECMAKE = "\ -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \ -DBUILD_SHARED_LIBS:BOOL=ON \ " +# We need to reset this to avoid breakage as we build out of tree +TOOLCHAIN_OPTIONS = "" -PACKAGES = "${PN} ${PN}-dev ${PN}-dbg ${PN}-doc" +PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-dev ${PN}" PACKAGES_DYNAMIC = "llvm-*" + +# the difference to the non-native build is that we do not need +# to declare the location of the tblgen executable. +EXTRA_OECMAKE_virtclass-native = "\ + -DLLVM_TARGETS_TO_BUILD=${LLVM_ARCH} \ + -DCMAKE_LINKER:FILEPATH=${LD} \ + -DCMAKE_AR:FILEPATH=${AR} \ + -DCMAKE_OBJCOPY:FILEPATH=${OBJCOPY} \ + -DCMAKE_OBJDUMP:FILEPATH=${OBJDUMP} \ + -DCMAKE_RANLIB:FILEPATH=${RANLIB} \ + -DCMAKE_STRIP:FILEPATH=${STRIP} \ + -DNM_PATH:FILEPATH=${NM} \ +" + +PACKAGES_virtclass-native = "" + +PACKAGES_DYNAMIC_virtclass-native = "" + python populate_packages_prepend () { - libllvm_libdir = bb.data.expand('${libdir}/', d) + libllvm_libdir = bb.data.expand('${libdir}/llvm${LLVM_RELEASE}', d) do_split_packages(d, libllvm_libdir, '^lib(.*)\.so$', 'libllvm-%s', 'Split package for %s', allow_dirs=True) } @@ -74,32 +98,37 @@ python populate_packages_prepend () { FILES_${PN} = "" ALLOW_EMPTY_${PN} = "1" -FILES_${PN}-dev = "${includedir} ${bindir}/* ${libdir}/LLVMHello.so" +FILES_${PN}-dbg += "${libdir}/llvm${LLVM_RELEASE}/.debug ${bindir}/llvm${LLVM_RELEASE}/.debug" + +FILES_${PN}-dev = "${includedir} ${bindir}/* ${libdir}/llvm${LLVM_RELEASE}/LLVMHello.so" -llvm_stage() { +do_install() { # Install into a private directory to be able to reorganize the files. - oe_runmake DESTDIR=${WORKDIR}/llvm-install install + + cd ${OECMAKE_BUILDPATH} + + oe_runmake DESTDIR=${WORKDIR}/llvm-install install # Create our custom target directories - install -d ${STAGING_BINDIR}/llvm${LLVM_RELEASE} - install -d ${STAGING_INCDIR}/llvm${LLVM_RELEASE} - install -d ${STAGING_LIBDIR}/llvm${LLVM_RELEASE} + install -d ${D}${bindir}/llvm${LLVM_RELEASE} + install -d ${D}${includedir}/llvm${LLVM_RELEASE} + install -d ${D}${libdir}/llvm${LLVM_RELEASE} # Move headers into their own directory cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm \ - ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/ + ${D}${includedir}/llvm${LLVM_RELEASE}/ cp -R ${WORKDIR}/llvm-install/${prefix}/include/llvm-c \ - ${STAGING_INCDIR}/llvm${LLVM_RELEASE}/ + ${D}${includedir}/llvm${LLVM_RELEASE}/ find ${WORKDIR}/llvm-install/${prefix}/lib -name "*" -maxdepth 1 -exec \ - install {} ${STAGING_LIBDIR}/llvm${LLVM_RELEASE} \; + install {} ${D}${libdir}/llvm${LLVM_RELEASE} \; # I dont know another way out. Binaries are installed into a special subdir find ${WORKDIR}/llvm-install/${prefix}/bin -name "*" -maxdepth 1 -exec \ - install {} ${STAGING_BINDIR}/llvm${LLVM_RELEASE} \; + install {} ${D}${bindir}/llvm${LLVM_RELEASE} \; # LLVM does not install this by default. - install bin/tblgen ${STAGING_BINDIR}/llvm${LLVM_RELEASE} + install bin/tblgen ${D}${bindir}/llvm${LLVM_RELEASE} # Fix the paths in the config script to make it find the binaries and # library files. Doing so allows 3rd party configure scripts working @@ -110,14 +139,15 @@ llvm_stage() { -e's!my.*BINDIR.*!my $BINDIR = "${STAGING_BINDIR}/llvm${LLVM_RELEASE}";!' \ bin/llvm-config > bin/llvm-config${LLVM_RELEASE} } + +do_install_append_virtclass-native() { + install -d ${D}${bindir} + install -m 0755 bin/llvm-config${LLVM_RELEASE} ${D}${bindir} +} -do_stage() { - cd ${OECMAKE_BUILDPATH} - - llvm_stage - - install -d ${STAGING_BINDIR_CROSS} - install -m 0755 bin/llvm-config${LLVM_RELEASE} ${STAGING_BINDIR_CROSS} +do_install_append() { + install -d ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS}/ + install -m 0755 bin/llvm-config${LLVM_RELEASE} ${SYSROOT_DESTDIR}${STAGING_BINDIR_CROSS} } # Retrieve the target in a way that is compatible to the arch diff --git a/recipes/llvm/llvm2.7-native_2.7.bb b/recipes/llvm/llvm2.7-native_2.7.bb deleted file mode 100644 index e438702d9a..0000000000 --- a/recipes/llvm/llvm2.7-native_2.7.bb +++ /dev/null @@ -1,12 +0,0 @@ -require llvm-native.inc - -PR = "r0" - -SRC_URI = "\ - http://llvm.org/releases/${PV}/llvm-${PV}.tgz \ -" - -LLVM_RELEASE = "2.7" - -SRC_URI[md5sum] = "ac322661f20e7d6c810b1869f886ad9b" -SRC_URI[sha256sum] = "99664bdc8503a306038166af33f28eb426d99e297575a59d74a1a0dcbddbbca5" diff --git a/recipes/llvm/llvm2.7/include-fixes.patch b/recipes/llvm/llvm2.7/include-fixes.patch new file mode 100644 index 0000000000..2783f4d5b6 --- /dev/null +++ b/recipes/llvm/llvm2.7/include-fixes.patch @@ -0,0 +1,55 @@ +Fixes stricter includes which result in failures like this: +error: 'ptrdiff_t' does not name a type + +Upstream-Status: Unknown, not submitted as 2.7 is very old + +Signed-off-by: Stefan Schmidt + +Index: llvm-2.7/include/llvm/ADT/SmallVector.h +=================================================================== +--- llvm-2.7.orig/include/llvm/ADT/SmallVector.h 2011-05-08 17:07:09.000000000 +0200 ++++ llvm-2.7/include/llvm/ADT/SmallVector.h 2011-05-08 17:07:25.000000000 +0200 +@@ -19,6 +19,7 @@ + #include + #include + #include ++#include + + #ifdef _MSC_VER + namespace std { +Index: llvm-2.7/include/llvm/ADT/ilist.h +=================================================================== +--- llvm-2.7.orig/include/llvm/ADT/ilist.h 2011-05-08 20:24:57.000000000 +0200 ++++ llvm-2.7/include/llvm/ADT/ilist.h 2011-05-08 20:25:12.000000000 +0200 +@@ -40,6 +40,7 @@ + + #include + #include ++#include + + namespace llvm { + +Index: llvm-2.7/include/llvm/Use.h +=================================================================== +--- llvm-2.7.orig/include/llvm/Use.h 2011-05-08 20:28:21.000000000 +0200 ++++ llvm-2.7/include/llvm/Use.h 2011-05-08 20:28:37.000000000 +0200 +@@ -28,6 +28,7 @@ + #include "llvm/Support/Casting.h" + #include "llvm/ADT/PointerIntPair.h" + #include ++#include + + namespace llvm { + +Index: llvm-2.7/include/llvm/ADT/DenseMap.h +=================================================================== +--- llvm-2.7.orig/include/llvm/ADT/DenseMap.h 2011-05-08 20:32:11.000000000 +0200 ++++ llvm-2.7/include/llvm/ADT/DenseMap.h 2011-05-08 20:32:21.000000000 +0200 +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + namespace llvm { + diff --git a/recipes/llvm/llvm2.7_2.7.bb b/recipes/llvm/llvm2.7_2.7.bb index ef2da43e07..7d56e7dd3a 100644 --- a/recipes/llvm/llvm2.7_2.7.bb +++ b/recipes/llvm/llvm2.7_2.7.bb @@ -1,14 +1,13 @@ require llvm.inc -PR = "r8" +PR = "r11" DEPENDS = "llvm-common llvm2.7-native" # Force arm mode for armv4t until http://llvm.org/bugs/show_bug.cgi?id=6065 is resolved somehow ARM_INSTRUCTION_SET_armv4t = "ARM" -SRC_URI = "\ - http://llvm.org/releases/${PV}/llvm-${PV}.tgz \ +SRC_URI += "\ file://arm_ppc.patch \ file://r97745-llvmPR6480.patch \ file://r104558-VFPmisc.patch \ @@ -16,6 +15,7 @@ SRC_URI = "\ file://r104652-VFPLoadStoreMultiple.patch \ file://r104653-BFC-BFI.patch \ file://rawMOVLRPC.patch \ + file://include-fixes.patch \ " LLVM_RELEASE = "2.7" diff --git a/recipes/lmbench/lmbench-3.0-a9/update-results-script.patch b/recipes/lmbench/lmbench-3.0-a9/update-results-script.patch new file mode 100644 index 0000000000..3feb657d1b --- /dev/null +++ b/recipes/lmbench/lmbench-3.0-a9/update-results-script.patch @@ -0,0 +1,155 @@ +Now that we have our binaries in /usr/bin rather than the normal +lmbench hierarchy we need to update the scripts as well to bave well here. +Index: lmbench-3.0-a9/scripts/results +=================================================================== +--- lmbench-3.0-a9.orig/scripts/results ++++ lmbench-3.0-a9/scripts/results +@@ -8,11 +8,11 @@ RESULTS=results/$OS + BASE=../$RESULTS/`uname -n` + EXT=0 + +-if [ ! -f "../bin/$OS/$CONFIG" ] ++if [ ! -f "$CONFIG" ] + then echo "No config file?" + exit 1 + fi +-. ../bin/$OS/$CONFIG ++. $CONFIG + + if [ ! -d ../$RESULTS ] + then mkdir -p ../$RESULTS +@@ -23,11 +23,9 @@ do EXT=`expr $EXT + 1` + RESULTS=$BASE.$EXT + done + +-cd ../bin/$OS +-PATH=.:${PATH}; export PATH + export SYNC_MAX + export OUTPUT +-lmbench $CONFIG 2>../${RESULTS} ++lmbench $CONFIG 2>${RESULTS} + + if [ X$MAIL = Xyes ] + then echo Mailing results +Index: lmbench-3.0-a9/scripts/config-run +=================================================================== +--- lmbench-3.0-a9.orig/scripts/config-run ++++ lmbench-3.0-a9/scripts/config-run +@@ -132,20 +132,20 @@ export LMBENCH_SCHED + ############################################################################ + echo $L; echo ""; + echo "Hang on, we are calculating your timing granularity." +-../bin/$OS/msleep 250 +-ENOUGH=`../bin/$OS/enough` ++msleep 250 ++ENOUGH=`enough` + export ENOUGH + echo "OK, it looks like you can time stuff down to $ENOUGH usec resolution." + echo "" + echo "Hang on, we are calculating your timing overhead." +-../bin/$OS/msleep 250 +-TIMING_O=`../bin/$OS/timing_o` ++msleep 250 ++TIMING_O=`timing_o` + export TIMING_O + echo "OK, it looks like your gettimeofday() costs $TIMING_O usecs." + echo "" + echo "Hang on, we are calculating your loop overhead." +-../bin/$OS/msleep 250 +-LOOP_O=`../bin/$OS/loop_o` ++msleep 250 ++LOOP_O=`loop_o` + export LOOP_O + echo "OK, it looks like your benchmark loop costs $LOOP_O usecs." + echo "" +@@ -177,7 +177,7 @@ then + fi + if [ X$MB = X ] + then $ECHON "Probing system for available memory: $ECHOC" +- MB=`../bin/$OS/memsize 4096` ++ MB=`memsize 4096` + fi + TOTAL_MEM=$MB + MB=`echo \( $MB \* 7 \) / 10 | bc 2>/dev/null` +@@ -205,9 +205,9 @@ fi + # Certain machines tend to barf when you try and bcopy 8MB. + # Figure out how much we can use. + echo "Checking to see if you have $MB MB; please wait for a moment..." +-MB=`../bin/$OS/memsize $MB` +-MB=`../bin/$OS/memsize $MB` +-MB=`../bin/$OS/memsize $MB` ++MB=`memsize $MB` ++MB=`memsize $MB` ++MB=`memsize $MB` + if [ `expr $SYNC_MAX \* $MB` -gt `expr $TOTAL_MEM` ] + then + MB=`expr $TOTAL_MEM / $SYNC_MAX` +@@ -223,8 +223,8 @@ then echo Warning: you have only ${MB}MB + fi + + echo "Hang on, we are calculating your cache line size." +-../bin/$OS/msleep 250 +-LINE_SIZE=`../bin/$OS/lm_line -M ${MB}M` ++msleep 250 ++LINE_SIZE=`lm_line -M ${MB}M` + export LINE_SIZE + echo "OK, it looks like your cache line is $LINE_SIZE bytes." + echo "" +@@ -479,7 +479,7 @@ EOF + then + for i in $disks + do if [ -r $i ] +- then ../bin/$OS/flushdisk $i ++ then flushdisk $i + if [ $? -eq 1 ] + then echo "Must be root to run disk benchmarks." + echo "Root is needed to flush the buffer cache" +@@ -584,7 +584,7 @@ fi + echo $L + echo "" + echo "Calculating mhz, please wait for a moment..." +-MHZ=`../bin/$OS/mhz` ++MHZ=`mhz` + cat< $C + echo DISK_DESC=\"$DISK_DESC\" >> $C + echo OUTPUT=$OUTPUT >> $C diff --git a/recipes/lmbench/lmbench/rename-line-binary.patch b/recipes/lmbench/lmbench/rename-line-binary.patch new file mode 100644 index 0000000000..997143b3b0 --- /dev/null +++ b/recipes/lmbench/lmbench/rename-line-binary.patch @@ -0,0 +1,11 @@ +--- patches/scripts/config-run 2006-11-26 15:11:04.000000000 -0500 ++++ patches/scripts/config-run 2011-04-01 09:35:50.000000000 -0400 +@@ -224,7 +224,7 @@ fi + + echo "Hang on, we are calculating your cache line size." + ../bin/$OS/msleep 250 +-LINE_SIZE=`../bin/$OS/line -M ${MB}M` ++LINE_SIZE=`../bin/$OS/lm_line -M ${MB}M` + export LINE_SIZE + echo "OK, it looks like your cache line is $LINE_SIZE bytes." + echo "" diff --git a/recipes/lmbench/lmbench_3.0-a9.bb b/recipes/lmbench/lmbench_3.0-a9.bb index 1e2598ac65..ce6d1a80c0 100644 --- a/recipes/lmbench/lmbench_3.0-a9.bb +++ b/recipes/lmbench/lmbench_3.0-a9.bb @@ -3,12 +3,14 @@ DESCRIPTION = "Tools for performance analysis." LICENSE = "GPL" RDEPENDS_${PN} = "debianutils" -PR = "r2" +PR = "r4" inherit autotools SRC_URI = "${SOURCEFORGE_MIRROR}/lmbench/lmbench-${PV}.tgz \ - file://lmbench-run" + file://lmbench-run \ + file://rename-line-binary.patch \ + file://update-results-script.patch" SRC_URI[md5sum] = "b3351a3294db66a72e2864a199d37cbf" SRC_URI[sha256sum] = "cbd5777d15f44eab7666dcac418054c3c09df99826961a397d9acf43d8a2a551" @@ -39,22 +41,22 @@ do_compile () { fi install -d ${S}/bin/${TARGET_SYS} oe_runmake -C src - sed -i -e 's,^SHAREDIR=.*$,SHAREDIR=${datadir}/${PN},;' \ - -e 's,^BINDIR=.*$,BINDIR=${libdir}/${PN},;' ${WORKDIR}/lmbench-run } do_install () { - mkdir -p ${D}${libdir}/lmbench + install -d ${D}${localstatedir}/run/lmbench \ + ${D}${bindir} ${D}${mandir} ${D}${libdir}/lmbench \ + ${D}${datadir}/lmbench/scripts oe_runmake 'BASE=${D}${prefix}' \ -C src install - install -d ${D}${localstatedir}/lib/lmbench/config \ - ${D}${localstatedir}/run/lmbench \ - ${D}${bindir} - install -m 0755 ${WORKDIR}/lmbench-run ${D}${bindir}/ - mkdir -p ${D}${mandir} + mv ${D}${bindir}/line ${D}${bindir}/lm_line mv ${D}${prefix}/man/* ${D}${mandir}/ + install -m 0755 ${WORKDIR}/lmbench-run ${D}${bindir}/ + sed -i -e 's,^SHAREDIR=.*$,SHAREDIR=${datadir}/${PN},;' \ + -e 's,^BINDIR=.*$,BINDIR=${libdir}/${PN},;' \ + -e 's,^CONFIG=.*$,CONFIG=$SHAREDIR/`$SCRIPTSDIR/config`,;' \ + ${D}${bindir}/lmbench-run install -m 0755 ${S}/scripts/lmbench ${D}${bindir} - install -d ${D}${datadir}/lmbench/scripts install -m 0755 ${S}/scripts/* ${D}${datadir}/lmbench/scripts } diff --git a/recipes/loudmouth/loudmouth_1.4.3.bb b/recipes/loudmouth/loudmouth_1.4.3.bb index 875183e577..b6b22676ef 100644 --- a/recipes/loudmouth/loudmouth_1.4.3.bb +++ b/recipes/loudmouth/loudmouth_1.4.3.bb @@ -1,12 +1,14 @@ DESCRIPTION = "Loudmouth is a lightweight and easy-to-use C library for programming with the Jabber protocol." HOMEPAGE = "http://www.loudmouth-project.org/" LICENSE = "LGPL" -DEPENDS = "glib-2.0 gnutls check" -PR = "r1" +DEPENDS = "glib-2.0 check openssl" +PR = "r2" SRC_URI += "file://04-use-pkg-config-for-gnutls.patch" inherit gnomebase +EXTRA_OECONF = "--with-ssl=openssl" + SRC_URI[archive.md5sum] = "55339ca42494690c3942ee1465a96937" SRC_URI[archive.sha256sum] = "95a93f5d009b71ea8193d994aa11f311bc330a3efe1b7cd74dc48f11c7f929e3" diff --git a/recipes/matchbox-desktop/matchbox-desktop-0.8.1/enable-file-manager.patch b/recipes/matchbox-desktop/matchbox-desktop-0.8.1/enable-file-manager.patch index 01c1a0e277..ba98e3afbe 100644 --- a/recipes/matchbox-desktop/matchbox-desktop-0.8.1/enable-file-manager.patch +++ b/recipes/matchbox-desktop/matchbox-desktop-0.8.1/enable-file-manager.patch @@ -1,5 +1,5 @@ -diff -urNd ../matchbox-desktop-0.8.1-r0/matchbox-desktop-0.8.1/data/mbdesktop_modules.in matchbox-desktop-0.8.1/data/mbdesktop_modules.in ---- ../matchbox-desktop-0.8.1-r0/matchbox-desktop-0.8.1/data/mbdesktop_modules.in 2004-07-22 12:51:25.000000000 +0100 +diff -urNd matchbox-desktop-0.8.1-r0/matchbox-desktop-0.8.1/data/mbdesktop_modules.in matchbox-desktop-0.8.1/data/mbdesktop_modules.in +--- matchbox-desktop-0.8.1-r0/matchbox-desktop-0.8.1/data/mbdesktop_modules.in 2004-07-22 12:51:25.000000000 +0100 +++ matchbox-desktop-0.8.1/data/mbdesktop_modules.in 2004-09-18 15:54:52.000000000 +0100 @@ -6,4 +6,4 @@ diff --git a/recipes/matchbox-panel/matchbox-panel-0.8.1/make-batteryapp-less-strict.patch b/recipes/matchbox-panel/matchbox-panel-0.8.1/make-batteryapp-less-strict.patch index 45bff32b9a..b60e263445 100644 --- a/recipes/matchbox-panel/matchbox-panel-0.8.1/make-batteryapp-less-strict.patch +++ b/recipes/matchbox-panel/matchbox-panel-0.8.1/make-batteryapp-less-strict.patch @@ -1,5 +1,5 @@ -diff -urNd ../matchbox-panel-0.8.1-r4/matchbox-panel-0.8.1/applets/mb-applet-battery.c matchbox-panel-0.8.1/applets/mb-applet-battery.c ---- ../matchbox-panel-0.8.1-r4/matchbox-panel-0.8.1/applets/mb-applet-battery.c 2004-02-25 22:58:09.000000000 +0000 +diff -urNd matchbox-panel-0.8.1/applets/mb-applet-battery.c matchbox-panel-0.8.1/applets/mb-applet-battery.c +--- matchbox-panel-0.8.1/applets/mb-applet-battery.c 2004-02-25 22:58:09.000000000 +0000 +++ matchbox-panel-0.8.1/applets/mb-applet-battery.c 2004-09-16 12:17:58.000000000 +0100 @@ -385,8 +385,7 @@ sprintf(tray_msg, _("AC Connected\nFully charged.\n")); diff --git a/recipes/matchbox-panel/matchbox-panel-0.8.3/make-batteryapp-less-strict.patch b/recipes/matchbox-panel/matchbox-panel-0.8.3/make-batteryapp-less-strict.patch index 45bff32b9a..b60e263445 100644 --- a/recipes/matchbox-panel/matchbox-panel-0.8.3/make-batteryapp-less-strict.patch +++ b/recipes/matchbox-panel/matchbox-panel-0.8.3/make-batteryapp-less-strict.patch @@ -1,5 +1,5 @@ -diff -urNd ../matchbox-panel-0.8.1-r4/matchbox-panel-0.8.1/applets/mb-applet-battery.c matchbox-panel-0.8.1/applets/mb-applet-battery.c ---- ../matchbox-panel-0.8.1-r4/matchbox-panel-0.8.1/applets/mb-applet-battery.c 2004-02-25 22:58:09.000000000 +0000 +diff -urNd matchbox-panel-0.8.1/applets/mb-applet-battery.c matchbox-panel-0.8.1/applets/mb-applet-battery.c +--- matchbox-panel-0.8.1/applets/mb-applet-battery.c 2004-02-25 22:58:09.000000000 +0000 +++ matchbox-panel-0.8.1/applets/mb-applet-battery.c 2004-09-16 12:17:58.000000000 +0100 @@ -385,8 +385,7 @@ sprintf(tray_msg, _("AC Connected\nFully charged.\n")); diff --git a/recipes/mbmerlin/mbmerlin-0.8.1-2/fix_makefile.patch b/recipes/mbmerlin/mbmerlin-0.8.1-2/fix_makefile.patch index 0f2dabd8a3..561b221441 100644 --- a/recipes/mbmerlin/mbmerlin-0.8.1-2/fix_makefile.patch +++ b/recipes/mbmerlin/mbmerlin-0.8.1-2/fix_makefile.patch @@ -1,5 +1,5 @@ -diff -urNd ../mbmerlin-0.8.1-2-r3/mbmerlin/Makefile mbmerlin/Makefile ---- ../mbmerlin-0.8.1-2-r3/mbmerlin/Makefile 2004-07-29 21:17:13.000000000 +0100 +diff -urNd mbmerlin/Makefile mbmerlin/Makefile +--- mbmerlin/Makefile 2004-07-29 21:17:13.000000000 +0100 +++ mbmerlin/Makefile 2004-08-01 11:32:09.000000000 +0100 @@ -106,6 +106,7 @@ install mbmerlin.desktop $(DESTDIR)/usr/share/applications/inputmethods diff --git a/recipes/mc/mc.inc b/recipes/mc/mc.inc index ef0ae94cda..8bad192c9a 100644 --- a/recipes/mc/mc.inc +++ b/recipes/mc/mc.inc @@ -6,7 +6,7 @@ SECTION = "console/utils" PRIORITY = "optional" DEPENDS = "ncurses glib-2.0 glib-2.0-native" RDEPENDS_${PN} = "ncurses-terminfo" -INC_PR = "r6" +INC_PR = "r7" SRC_URI = "http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-${PV}.tar.gz" @@ -20,12 +20,13 @@ ac_cv_path_UNZIP=${bindir}/unzip \ " EXTRA_OEMAKE = 'GLIB_CFLAGS_FOR_BUILD="$GLIB_CFLAGS_FOR_BUILD" GLIB_LIBS_FOR_BUILD="$GLIB_LIBS_FOR_BUILD" CC_FOR_BUILD="$CC_FOR_BUILD"' -PACKAGES += "${PN}-extfs ${PN}-hilite" -FILES_${PN} = "${bindir}/ ${libexecdir}/mc ${datadir}/mc/*.charsets ${datadir}/mc/*.ext ${datadir}/mc/*.hint ${datadir}/mc/*.hlp ${datadir}/mc/*.lib ${datadir}/mc/*.menu ${datadir}/mc/*.rc ${datadir}/mc/bin /etc/profile.d" +PACKAGES += "${PN}-extfs ${PN}-hilite ${PN}-skins" +FILES_${PN} = "${bindir}/ ${libexecdir}/mc ${datadir}/mc/*.charsets ${datadir}/mc/*.ext ${datadir}/mc/hints/ ${datadir}/mc/*.hint ${datadir}/mc/help/ ${datadir}/mc/*.hlp ${datadir}/mc/*.lib ${datadir}/mc/*.menu ${datadir}/mc/*.rc ${datadir}/mc/bin /etc/profile.d ${sysconfdir}/mc/" FILES_${PN}-extfs = "${datadir}/mc/extfs/" FILES_${PN}-hilite = "${datadir}/mc/syntax/" +FILES_${PN}-skins = "${datadir}/mc/skins/" FILES_${PN}-dbg += "${libexecdir}/mc/.debug" -RRECOMMENDS_${PN} += "${PN}-extfs ${PN}-hilite" +RRECOMMENDS_${PN} += "${PN}-extfs ${PN}-hilite ${PN}-skins" RDEPENDS_${PN}-extfs = "${PN}" RDEPENDS_${PN}-hilite = "${PN}" PACKAGE_ARCH_${PN}-extfs = "all" diff --git a/recipes/meta/external-toolchain-angstrom.bb b/recipes/meta/external-toolchain-angstrom.bb new file mode 100644 index 0000000000..720d1f4748 --- /dev/null +++ b/recipes/meta/external-toolchain-angstrom.bb @@ -0,0 +1,489 @@ +PR = "r3" + +INHIBIT_DEFAULT_DEPS = "1" + +PACKAGE_NO_GCONV = "1" +PACKAGE_NO_LOCALE = "1" + +INSANE_SKIP_libgcc = "True" +INSANE_SKIP_libstdc++ = "True" +INSANE_SKIP_glibc-utils = "True" +INSANE_SKIP_glibc-dev = "True" +#INSANE_SKIP_gdbserver = "True" + +SRC_URI = "file://SUPPORTED" + +PROVIDES = "\ + virtual/${TARGET_PREFIX}gcc \ + virtual/${TARGET_PREFIX}g++ \ + virtual/${TARGET_PREFIX}gcc-initial \ + virtual/${TARGET_PREFIX}gcc-intermediate \ + virtual/${TARGET_PREFIX}binutils \ + virtual/${TARGET_PREFIX}libc-for-gcc \ + virtual/${TARGET_PREFIX}libc-initial \ + virtual/libc \ + virtual/libintl \ + virtual/libiconv \ + glibc-thread-db \ + ${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-angstrom', 'linux-libc-headers', '', d)} \ + ${@base_conditional('PREFERRED_PROVIDER_gdbserver', 'external-toolchain-angstrom', 'gdbserver', '', d)} \ +" + +DEPENDS = "${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-angstrom', '', 'linux-libc-headers', d)}" +RPROVIDES_glibc-dev += "libc-dev libc6-dev virtual-libc-dev" +PACKAGES_DYNAMIC += "glibc-gconv-*" +PACKAGES_DYNAMIC += "glibc-locale-*" + +LEAD_SONAME = "libc.so.6" + +PACKAGES = "\ + libgcc \ + libgcc-dev \ + libstdc++ \ + libstdc++-dev \ + ${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-angstrom', 'linux-libc-headers', '', d)} \ + ${@base_conditional('PREFERRED_PROVIDER_gdbserver', 'external-toolchain-angstrom', 'gdbserver', '', d)} \ + glibc-dbg \ + glibc \ + catchsegv \ + sln \ + nscd \ + ldd \ + localedef \ + glibc-utils \ + glibc-dev \ + glibc-locale \ + libsegfault \ + glibc-extra-nss \ + glibc-thread-db \ + glibc-pcprofile \ +" + +FILES_glibc = "\ + ${sysconfdir} \ + ${libexecdir}/* \ + ${datadir}/zoneinfo \ + /lib/libc* \ + /lib/libm* \ + /lib/ld* \ + /lib/libpthread* \ + /lib/libresolv* \ + /lib/librt* \ + /lib/libutil* \ + /lib/libnsl* \ + /lib/libnss_files* \ + /lib/libnss_compat* \ + /lib/libnss_dns* \ + /lib/libdl* \ + /lib/libanl* \ + /lib/libBrokenLocale* \ + /sbin/ldconfig \ +" + +FILES_glibc-dev = "\ + ${includedir} \ + ${libdir}/*.o \ + ${bindir}/rpcgen \ + ${libdir}/*.so \ + ${libdir}/*.a \ +" + +FILES_glibc-dbg += " ${libdir}/gconv/.debug ${libexecdir}/*/.debug ${base_libdir}/.debug ${libdir}/.debug" +FILES_glibc-utils = "${bindir}/* ${sbindir}/*" +FILES_glibc-extra-nss = "/lib/libnss*" +FILES_glibc-gconv = "${libdir}/gconv/*" +FILES_glibc-pcprofile = "/lib/libpcprofile.so" +FILES_glibc-thread-db = "/lib/libthread_db*" + +FILES_libgcc = "${base_libdir}/libgcc_s.so.1" +FILES_libgcc-dev = "${base_libdir}/libgcc_s.so" + +FILES_libstdc++ = "${libdir}/libstdc++.so.*" +FILES_libstdc++-dev = "\ + ${includedir}/c++/* \ + ${libdir}/libstdc++.so \ + ${libdir}/libstdc++.la \ + ${libdir}/libstdc++.a \ + ${libdir}/libsupc++.la \ + ${libdir}/libsupc++.a \ +" + +FILES_linux-libc-headers = "\ + ${includedir}/asm* \ + ${includedir}/linux \ + ${includedir}/mtd \ + ${includedir}/rdma \ + ${includedir}/scsi \ + ${includedir}/sound \ + ${includedir}/video \ +" + +FILES_libsegfault = "/lib/libSegFault*" +FILES_catchsegv = "${bindir}/catchsegv" +RDEPENDS_catchsegv = "libsegfault" + +FILES_ldd = "${bindir}/ldd" +FILES_nscd = "${sbindir}/nscd*" +FILES_sln = "${base_sbindir}/sln" +FILES_localedef = "${bindir}/localedef" +FILES_gdbserver = "${bindir}/gdbserver" + +DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..." +DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services" +DESCRIPTION_ldd = "glibc: print shared library dependencies" +DESCRIPTION_nscd = "glibc: name service cache daemon for passwd, group, and hosts" +DESCRIPTION_sln = "glibc: create symbolic links between files" +DESCRIPTION_localedef = "glibc: compile locale definition files" +DESCRIPTION_gdbserver = "gdb - GNU debugger" + +def ang_get_main_version(d): + import os,bb + if os.path.exists(bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/version'): + f = open(bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/version', 'r') + l = f.readlines(); + f.close(); + for s in l: + if s.find('Version') > 0: + ver = s.split()[2] + return ver + return None + +def ang_get_gcc_version(d): + import subprocess,os,bb + if os.path.exists(bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gcc'): + return subprocess.Popen([bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gcc', '-v'], stderr=subprocess.PIPE).communicate()[1].splitlines()[-1].split()[2] + +def ang_get_libc_version(d): + import os,bb + if os.path.exists(bb.data.getVar('TOOLCHAIN_SYSPATH', d, 1)+'/lib/'): + for file in os.listdir(bb.data.getVar('TOOLCHAIN_SYSPATH', d, 1)+'/lib/'): + if file.find('libc-') == 0: + return file[5:-3] + return None + +def ang_get_kernel_version(d): + import os,bb + if os.path.exists(bb.data.getVar('TOOLCHAIN_SYSPATH', d, 1)+'/usr/include/linux/'): + f = open(bb.data.getVar('TOOLCHAIN_SYSPATH', d, 1)+'/usr/include/linux/version.h', 'r') + l = f.readlines(); + f.close(); + for s in l: + if s.find('LINUX_VERSION_CODE') > 0: + ver = int(s.split()[2]) + maj = ver / 65536 + ver = ver % 65536 + min = ver / 256 + ver = ver % 256 + return str(maj)+'.'+str(min)+'.'+str(ver) + return None + +def ang_get_gdb_version(d): + import subprocess,os,bb + if os.path.exists(bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gdb'): + return subprocess.Popen([bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gdb', '-v'],stdout=subprocess.PIPE).communicate()[0].splitlines()[0].split()[-1] + +ANG_VER_MAIN := "${@ang_get_main_version(d)}" +ANG_VER_GCC := "${@ang_get_gcc_version(d)}" +ANG_VER_LIBC := "${@ang_get_libc_version(d)}" +ANG_VER_KERNEL := "${@ang_get_kernel_version(d)}" +ANG_VER_GDBSERVER := "${@ang_get_gdb_version(d)}" + +# Licenses set for main components of the toolchain: +# (g)libc is always LGPL version 2 (or later) +# gcc has switched from GPL version 2 (or later) to version 3 (or later) after 4.2.1, +# see this announcement - http://gcc.gnu.org/ml/gcc-announce/2007/msg00003.html +# libgcc and libstdc++ always had exceptions to GPL called Runtime Library Exception, but +# it was based on GPL version 2 (or later), until new GPL version 3 (or later) exception +# was introduced on 27 Jan 2009 - http://gcc.gnu.org/ml/gcc-announce/2009/msg00000.html +# and http://www.gnu.org/licenses/gcc-exception.html, which was several days after +# gcc 4.3.3 was released - http://gcc.gnu.org/releases.html +# gdb/gdbserver version 6.6 was the last one under GPL version 2 (or later), according +# to the release schedule - http://www.gnu.org/software/gdb/schedule/ +ANG_LIC_LIBC := "LGPLv2.1+" +ANG_LIC_GCC := "${@["GPLv3+", "GPLv2+"][ang_get_gcc_version(d) <= "4.2.1"]}" +ANG_LIC_RLE := "${@["GPLv3+ with GCC RLE", "GPLv2+ with GCC RLE"][ang_get_gcc_version(d) <= "4.3.3"]}" +ANG_LIC_GDB := "${@["GPLv3+", "GPLv2+"][ang_get_gdb_version(d) <= "6.6"]}" + +LICENSE = "${ANG_LIC_LIBC}" +LICENSE_ldd = "${ANG_LIC_LIBC}" +LICENSE_glibc = "${ANG_LIC_LIBC}" +LICENSE_glibc-thread-db = "${ANG_LIC_LIBC}" +LICENSE_libgcc = "${ANG_LIC_RLE}" +LICENSE_libgcc-dev = "${ANG_LIC_RLE}" +LICENSE_libstdc++ = "${ANG_LIC_RLE}" +LICENSE_libstdc++-dev = "${ANG_LIC_RLE}" +LICENSE_gdbserver = "${ANG_LIC_GDB}" + +PKGV = "${ANG_VER_MAIN}" +PKGV_libgcc = "${ANG_VER_GCC}" +PKGV_libgcc-dev = "${ANG_VER_GCC}" +PKGV_libstdc++ = "${ANG_VER_GCC}" +PKGV_libstdc++-dev = "${ANG_VER_GCC}" +PKGV_libc = "${ANG_VER_LIBC}" +PKGV_glibc = "${ANG_VER_LIBC}" +PKGV_glibc-dev = "${ANG_VER_LIBC}" +PKGV_glibc-dbg = "${ANG_VER_LIBC}" +PKGV_glibc-utils = "${ANG_VER_LIBC}" +PKGV_glibc-gconv = "${ANG_VER_LIBC}" +PKGV_glibc-extra-nss = "${ANG_VER_LIBC}" +PKGV_glibc-thread-db = "${ANG_VER_LIBC}" +PKGV_glibc-pcprofile = "${ANG_VER_LIBC}" +PKGV_catchsegv = "${ANG_VER_LIBC}" +PKGV_sln = "${ANG_VER_LIBC}" +PKGV_nscd = "${ANG_VER_LIBC}" +PKGV_ldd = "${ANG_VER_LIBC}" +PKGV_localedef = "${ANG_VER_LIBC}" +PKGV_libsegfault = "${ANG_VER_LIBC}" +PKGV_linux-libc-headers = "${ANG_VER_KERNEL}" +PKGV_gdbserver = "${ANG_VER_GDBSERVER}" + +do_install() { + install -d ${D}${sysconfdir} + install -d ${D}${bindir} + install -d ${D}${sbindir} + install -d ${D}${base_bindir} + install -d ${D}${libdir} + install -d ${D}${base_libdir} + install -d ${D}${base_sbindir} + install -d ${D}${datadir} + install -d ${D}${includedir} + + cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}${base_libdir}/{lib*,ld*} ${D}${base_libdir} + cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}${base_sbindir}/ldconfig ${D}${base_sbindir} + cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}${bindir}/{gencat,getconf,getent,iconv,locale,mtrace,pcprofiledump,rpcgen,sprof,tzselect,xtrace} ${D}${bindir} + cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}${sbindir}/{iconvconfig,rpcinfo,zdump,zic} ${D}${sbindir} + cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}${includedir}/{arpa,asm*,bits,drm,gnu,linux,mtd,net*,nfs,protocols,rdma,rpc*,scsi,sound,sys*,video,*.h} ${D}${includedir} + cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}${libdir}/{?crt1.o,crt?.o,libBrokenLocale*,libanl*,libc.*,libc_*,libcrypt.*,libcidn.*,libdl.*,libg.*,libieee.*,libm.*,libmcheck.*,libnsl*,libnss*,libpthread*,libresolv*,librt*,libstdc*,libthread*,libutil*} ${D}${libdir} + rm -rf ${D}${base_libdir}/*.la + rm -rf ${D}${libdir}/*.la + + ${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-angstrom', '', 'rm -rf ${D}/usr/include/linux', d)} + + cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/include/* ${D}${includedir} + ${@base_conditional('PREFERRED_PROVIDER_gdbserver', 'external-toolchain-angstrom', '', 'rm -rf ${D}/usr/bin/gdbserver', d)} + + sed -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so > ${D}${libdir}/temp + mv ${D}${libdir}/temp ${D}${libdir}/libc.so + + sed -e "s# /lib# ../../lib#" -e "s# /usr/lib# .#g" ${D}${libdir}/libpthread.so > ${D}${libdir}/temp + mv ${D}${libdir}/temp ${D}${libdir}/libpthread.so +} + +TMP_LOCALE="/tmp/locale${libdir}/locale" + +locale_base_postinst() { +#!/bin/sh + +if [ "x$D" != "x" ]; then + exit 1 +fi + +rm -rf ${TMP_LOCALE} +mkdir -p ${TMP_LOCALE} +if [ -f ${libdir}/locale/locale-archive ]; then + cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ +fi +localedef --inputfile=${datadir}/i18n/locales/%s --charmap=%s --prefix=/tmp/locale %s +mkdir -p ${libdir}/locale/ +mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ +rm -rf ${TMP_LOCALE} +} + +locale_base_postrm() { +#!/bin/sh + +rm -rf ${TMP_LOCALE} +mkdir -p ${TMP_LOCALE} +if [ -f ${libdir}/locale/locale-archive ]; then + cp ${libdir}/locale/locale-archive ${TMP_LOCALE}/ +fi +localedef --delete-from-archive --inputfile=${datadir}/locales/%s --charmap=%s --prefix=/tmp/locale %s +mv ${TMP_LOCALE}/locale-archive ${libdir}/locale/ +rm -rf ${TMP_LOCALE} +} + +python package_do_split_gconvs () { + import os, re + if (bb.data.getVar('PACKAGE_NO_GCONV', d, 1) == '1'): + bb.note("package requested not splitting gconvs") + return + + if not bb.data.getVar('PACKAGES', d, 1): + return + + libdir = bb.data.getVar('libdir', d, 1) + if not libdir: + bb.error("libdir not defined") + return + datadir = bb.data.getVar('datadir', d, 1) + if not datadir: + bb.error("datadir not defined") + return + + libcver = bb.data.getVar('ANG_VER_LIBC', d, 1) + if not libcver: + bb.error("ANG_VER_LIBC not defined") + return + + gconv_libdir = os.path.join(libdir, "gconv") + charmap_dir = os.path.join(datadir, "i18n", "charmaps") + locales_dir = os.path.join(datadir, "i18n", "locales") + binary_locales_dir = os.path.join(libdir, "locale") + + def set_pkg_ver(fn, pkg, file_regex, output_pattern, group): + bb.data.setVar('PKGV_' + pkg, libcver, d) + + do_split_packages(d, gconv_libdir, file_regex='^(.*)\.so$', output_pattern='glibc-gconv-%s', description='gconv module for character set %s', hook=set_pkg_ver, extra_depends='glibc-gconv') + + do_split_packages(d, charmap_dir, file_regex='^(.*)\.gz$', output_pattern='glibc-charmap-%s', description='character map for %s encoding', hook=set_pkg_ver, extra_depends='') + + def calc_locale_deps(fn, pkg, file_regex, output_pattern, group): + deps = [] + f = open(fn, "r") + c_re = re.compile('^copy "(.*)"') + i_re = re.compile('^include "(\w+)".*') + for l in f.readlines(): + m = c_re.match(l) or i_re.match(l) + if m: + dp = legitimize_package_name('glibc-localedata-%s' % m.group(1)) + if not dp in deps: + deps.append(dp) + f.close() + if deps != []: + bb.data.setVar('RDEPENDS_%s' % pkg, " ".join(deps), d) + bb.data.setVar('PKGV_' + pkg, libcver, d) + + do_split_packages(d, locales_dir, file_regex='(.*)', output_pattern='glibc-localedata-%s', description='locale definition for %s', hook=calc_locale_deps, extra_depends='') + bb.data.setVar('PACKAGES', bb.data.getVar('PACKAGES', d) + ' glibc-gconv', d) + + f = open(os.path.join(bb.data.getVar('WORKDIR', d, 1), "SUPPORTED"), "r") + supported = f.readlines() + f.close() + + dot_re = re.compile("(.*)\.(.*)") + + # Collate the locales by base and encoding + encodings = {} + for l in supported: + l = l[:-1] + (locale, charset) = l.split(" ") + m = dot_re.match(locale) + if m: + locale = m.group(1) + if not encodings.has_key(locale): + encodings[locale] = [] + encodings[locale].append(charset) + + def output_locale_source(name, locale, encoding): + pkgname = 'locale-base-' + legitimize_package_name(name) + + bb.data.setVar('RDEPENDS_%s' % pkgname, 'localedef glibc-localedata-%s glibc-charmap-%s' % (legitimize_package_name(locale), legitimize_package_name(encoding)), d) + rprovides = 'virtual-locale-%s' % legitimize_package_name(name) + m = re.match("(.*)_(.*)", name) + if m: + rprovides += ' virtual-locale-%s' % m.group(1) + bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) + bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d) + bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) + bb.data.setVar('pkg_postinst_%s' % pkgname, bb.data.getVar('locale_base_postinst', d, 1) % (locale, encoding, locale), d) + bb.data.setVar('pkg_postrm_%s' % pkgname, bb.data.getVar('locale_base_postrm', d, 1) % (locale, encoding, locale), d) + bb.data.setVar('PKGV_' + pkgname, libcver, d) + + def output_locale_binary(name, locale, encoding): + target_arch = bb.data.getVar("TARGET_ARCH", d, 1) + qemu = "qemu-%s" % target_arch + pkgname = 'locale-base-' + legitimize_package_name(name) + m = re.match("(.*)\.(.*)", name) + if m: + glibc_name = "%s.%s" % (m.group(1), m.group(2).lower().replace("-","")) + else: + glibc_name = name + bb.data.setVar('RDEPENDS_%s' % pkgname, legitimize_package_name('glibc-binary-localedata-%s' % glibc_name), d) + rprovides = 'virtual-locale-%s' % legitimize_package_name(name) + m = re.match("(.*)_(.*)", name) + if m: + rprovides += ' virtual-locale-%s' % m.group(1) + bb.data.setVar('RPROVIDES_%s' % pkgname, rprovides, d) + bb.data.setVar('ALLOW_EMPTY_%s' % pkgname, '1', d) + bb.data.setVar('PACKAGES', '%s %s' % (pkgname, bb.data.getVar('PACKAGES', d, 1)), d) + bb.data.setVar('PKGV_' + pkgname, libcver, d) + + treedir = os.path.join(bb.data.getVar("WORKDIR", d, 1), "locale-tree") + path = bb.data.getVar("PATH", d, 1) + i18npath = os.path.join(treedir, datadir, "i18n") + + localedef_opts = "--force --old-style --no-archive --prefix=%s --inputfile=%s/i18n/locales/%s --charmap=%s %s" % (treedir, datadir, locale, encoding, name) + cmd = "PATH=\"%s\" I18NPATH=\"%s\" %s -L %s %s/bin/localedef %s" % (path, i18npath, qemu, treedir, treedir, localedef_opts) + bb.note("generating locale %s (%s)" % (locale, encoding)) + if os.system(cmd): + raise bb.build.FuncFailed("localedef returned an error (command was %s)." % cmd) + + def output_locale(name, locale, encoding): + output_locale_source(name, locale, encoding) + + # Reshuffle names so that UTF-8 is preferred over other encodings + non_utf8 = [] + for l in encodings.keys(): + if len(encodings[l]) == 1: + output_locale(l, l, encodings[l][0]) + if encodings[l][0] != "UTF-8": + non_utf8.append(l) + else: + if "UTF-8" in encodings[l]: + output_locale(l, l, "UTF-8") + encodings[l].remove("UTF-8") + else: + non_utf8.append(l) + for e in encodings[l]: + output_locale('%s.%s' % (l, e), l, e) + + if non_utf8 != []: + bb.note("the following locales are supported only in legacy encodings:") + bb.note(" " + " ".join(non_utf8)) +} + +python package_do_split_locales() { + if (bb.data.getVar('PACKAGE_NO_LOCALE', d, True) == '1'): + bb.debug(1, "package requested not splitting locales") + return + + packages = (bb.data.getVar('PACKAGES', d, True) or "").split() + + datadir = bb.data.getVar('datadir', d, True) + if not datadir: + bb.note("datadir not defined") + return + + if 'glibc-locale' in packages: + packages.remove('glibc-locale') + + localedir = os.path.join(datadir, 'locale') + + if not os.path.isdir(localedir): + bb.debug(1, "No locale files in this package") + return + + locales = os.listdir(localedir) + for l in locales: + ln = legitimize_package_name(l) + pkg = 'glibc-locale-' + ln + packages.append(pkg) + bb.data.setVar('FILES_' + pkg, os.path.join(datadir, 'locale', l), d) + bb.data.setVar('RDEPENDS_' + pkg, 'glibc virtual-locale-%s' % ln, d) + bb.data.setVar('RPROVIDES_' + pkg, 'glibc-locale %s-translation' % ln, d) + bb.data.setVar('DESCRIPTION_' + pkg, '%s translation for glibc' % l, d) + bb.data.setVar('PKGV_' + pkg, bb.data.getVar('ANG_VER_LIBC', d, 1), d) + + bb.data.setVar('PACKAGES', ' '.join(packages), d) +} + +python populate_packages_prepend () { + if bb.data.getVar('DEBIAN_NAMES', d, 1): + bb.data.setVar('PKG_glibc', 'libc6', d) + bb.data.setVar('PKG_glibc-dev', 'libc6-dev', d) + bb.data.setVar('PKG_libgcc', 'libgcc1', d) + bb.data.setVar('PKG_libgcc-dev', 'libgcc1-dev', d) + bb.build.exec_func('package_do_split_gconvs', d) +} + +NATIVE_INSTALL_WORKS = "1" diff --git a/recipes/meta/external-toolchain-angstrom/SUPPORTED b/recipes/meta/external-toolchain-angstrom/SUPPORTED new file mode 100644 index 0000000000..fe9406acd1 --- /dev/null +++ b/recipes/meta/external-toolchain-angstrom/SUPPORTED @@ -0,0 +1,4 @@ +en_GB.UTF-8 UTF-8 +en_GB ISO-8859-1 +en_US.UTF-8 UTF-8 +en_US ISO-8859-1 diff --git a/recipes/meta/external-toolchain-csl.bb b/recipes/meta/external-toolchain-csl.bb index 2e109c8caa..f7bcbf22bd 100644 --- a/recipes/meta/external-toolchain-csl.bb +++ b/recipes/meta/external-toolchain-csl.bb @@ -1,4 +1,4 @@ -PR = "r7" +PR = "r11" INHIBIT_DEFAULT_DEPS = "1" @@ -6,6 +6,7 @@ INSANE_SKIP_libgcc = "True" INSANE_SKIP_libstdc++ = "True" INSANE_SKIP_nscd = "True" INSANE_SKIP_glibc-utils = "True" +INSANE_SKIP_gdbserver = "True" SRC_URI = "file://SUPPORTED" @@ -21,9 +22,11 @@ PROVIDES = "\ virtual/libintl \ virtual/libiconv \ glibc-thread-db \ - linux-libc-headers \ + ${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-csl', 'linux-libc-headers', '', d)} \ + ${@base_conditional('PREFERRED_PROVIDER_gdbserver', 'external-toolchain-csl', 'gdbserver', '', d)} \ " +DEPENDS = "${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-csl', '', 'linux-libc-headers', d)}" RPROVIDES_glibc-dev += "libc-dev libc6-dev virtual-libc-dev" PACKAGES_DYNAMIC += "glibc-gconv-*" PACKAGES_DYNAMIC += "glibc-locale-*" @@ -35,7 +38,8 @@ PACKAGES = "\ libgcc-dev \ libstdc++ \ libstdc++-dev \ - linux-libc-headers \ + ${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-csl', 'linux-libc-headers', '', d)} \ + ${@base_conditional('PREFERRED_PROVIDER_gdbserver', 'external-toolchain-csl', 'gdbserver', '', d)} \ glibc-dbg \ glibc \ catchsegv \ @@ -119,6 +123,7 @@ FILES_ldd = "${bindir}/ldd" FILES_nscd = "${sbindir}/nscd*" FILES_sln = "${base_sbindir}/sln" FILES_localedef = "${bindir}/localedef" +FILES_gdbserver = "${bindir}/gdbserver" DESCRIPTION_glibc-utils = "glibc: misc utilities like iconf, local, gencat, tzselect, rpcinfo, ..." DESCRIPTION_glibc-extra-nss = "glibc: nis, nisplus and hesiod search services" @@ -126,6 +131,7 @@ DESCRIPTION_ldd = "glibc: print shared library dependencies" DESCRIPTION_nscd = "glibc: name service cache daemon for passwd, group, and hosts" DESCRIPTION_sln = "glibc: create symbolic links between files" DESCRIPTION_localedef = "glibc: compile locale definition files" +DESCRIPTION_gdbserver = "gdb - GNU debugger" def csl_get_main_version(d): import subprocess,os,bb @@ -161,12 +167,42 @@ def csl_get_kernel_version(d): return str(maj)+'.'+str(min)+'.'+str(ver) return None +def csl_get_gdb_version(d): + import subprocess,os,bb + if os.path.exists(bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gdb'): + return subprocess.Popen([bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gdb', '-v'],stdout=subprocess.PIPE).communicate()[0].splitlines()[0].split()[-1] + CSL_VER_MAIN := "${@csl_get_main_version(d)}" CSL_VER_GCC := "${@csl_get_gcc_version(d)}" CSL_VER_LIBC := "${@csl_get_libc_version(d)}" CSL_VER_KERNEL := "${@csl_get_kernel_version(d)}" +CSL_VER_GDBSERVER := "${@csl_get_gdb_version(d)}" + +# Licenses set for main components of the toolchain: +# (g)libc is always LGPL version 2 (or later) +# gcc has switched from GPL version 2 (or later) to version 3 (or later) after 4.2.1, +# see this announcement - http://gcc.gnu.org/ml/gcc-announce/2007/msg00003.html +# libgcc and libstdc++ always had exceptions to GPL called Runtime Library Exception, but +# it was based on GPL version 2 (or later), until new GPL version 3 (or later) exception +# was introduced on 27 Jan 2009 - http://gcc.gnu.org/ml/gcc-announce/2009/msg00000.html +# and http://www.gnu.org/licenses/gcc-exception.html, which was several days after +# gcc 4.3.3 was released - http://gcc.gnu.org/releases.html +# gdb/gdbserver version 6.6 was the last one under GPL version 2 (or later), according +# to the release schedule - http://www.gnu.org/software/gdb/schedule/ CSL_LIC_LIBC := "LGPLv2.1+" -CSL_LIC_RLE := "${@["GPLv3 with GCC RLE", "GPLv2 with GCC RLE"][csl_get_main_version(d) <= "2007q3-51"]}" +CSL_LIC_GCC := "${@["GPLv3+", "GPLv2+"][csl_get_gcc_version(d) <= "4.2.1"]}" +CSL_LIC_RLE := "${@["GPLv3+ with GCC RLE", "GPLv2+ with GCC RLE"][csl_get_gcc_version(d) <= "4.3.3"]}" +CSL_LIC_GDB := "${@["GPLv3+", "GPLv2+"][csl_get_gdb_version(d) <= "6.6"]}" + +LICENSE = "${CSL_LIC_LIBC}" +LICENSE_ldd = "${CSL_LIC_LIBC}" +LICENSE_glibc = "${CSL_LIC_LIBC}" +LICENSE_glibc-thread-db = "${CSL_LIC_LIBC}" +LICENSE_libgcc = "${CSL_LIC_RLE}" +LICENSE_libgcc-dev = "${CSL_LIC_RLE}" +LICENSE_libstdc++ = "${CSL_LIC_RLE}" +LICENSE_libstdc++-dev = "${CSL_LIC_RLE}" +LICENSE_gdbserver = "${CSL_LIC_GDB}" PKGV = "${CSL_VER_MAIN}" PKGV_libgcc = "${CSL_VER_GCC}" @@ -189,15 +225,7 @@ PKGV_ldd = "${CSL_VER_LIBC}" PKGV_localedef = "${CSL_VER_LIBC}" PKGV_libsegfault = "${CSL_VER_LIBC}" PKGV_linux-libc-headers = "${CSL_VER_KERNEL}" - -LICENSE = "${CSL_LIC_LIBC}" -LICENSE_ldd = "${CSL_LIC_LIBC}" -LICENSE_glibc = "${CSL_LIC_LIBC}" -LICENSE_glibc-thread-db = "${CSL_LIC_LIBC}" -LICENSE_libgcc = "${CSL_LIC_RLE}" -LICENSE_libgcc-dev = "${CSL_LIC_RLE}" -LICENSE_libstdc++ = "${CSL_LIC_RLE}" -LICENSE_libstdc++-dev = "${CSL_LIC_RLE}" +PKGV_gdbserver = "${CSL_VER_GDBSERVER}" do_install() { install -d ${D}${sysconfdir} @@ -214,28 +242,18 @@ do_install() { cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/libc/sbin/* ${D}${base_sbindir} \ || true cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/libc/usr/* ${D}/usr + ${@base_conditional('PREFERRED_PROVIDER_linux-libc-headers', 'external-toolchain-csl', '', 'rm -rf ${D}/usr/include/linux', d)} cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/include/* ${D}/usr/include + ${@base_conditional('PREFERRED_PROVIDER_gdbserver', 'external-toolchain-csl', '', 'rm -rf ${D}/usr/bin/gdbserver', d)} - rm -rf ${D}${bindir}/gdbserver rm -rf ${D}${sysconfdir}/rpc rm -rf ${D}${datadir}/zoneinfo -} -do_stage() { - install -d ${STAGING_INCDIR} - install -d ${STAGING_LIBDIR} - install -d ${STAGING_DIR_TARGET}${base_libdir} + sed -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so > ${D}${libdir}/temp + mv ${D}${libdir}/temp ${D}${libdir}/libc.so - cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/libc/usr/include/* ${STAGING_INCDIR} - cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/include/* ${STAGING_INCDIR} - cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/libc/usr/lib/* ${STAGING_LIBDIR} - cp -a ${TOOLCHAIN_PATH}/${TARGET_SYS}/libc/lib/* ${STAGING_DIR_TARGET}${base_libdir} - - sed -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${STAGING_LIBDIR}/libc.so > ${STAGING_LIBDIR}/temp - mv ${STAGING_LIBDIR}/temp ${STAGING_LIBDIR}/libc.so - - sed -e "s# /lib# ../../lib#" -e "s# /usr/lib# .#g" ${STAGING_LIBDIR}/libpthread.so > ${STAGING_LIBDIR}/temp - mv ${STAGING_LIBDIR}/temp ${STAGING_LIBDIR}/libpthread.so + sed -e "s# /lib# ../../lib#" -e "s# /usr/lib# .#g" ${D}${libdir}/libpthread.so > ${D}${libdir}/temp + mv ${D}${libdir}/temp ${D}${libdir}/libpthread.so } TMP_LOCALE="/tmp/locale${libdir}/locale" @@ -454,3 +472,5 @@ python populate_packages_prepend () { bb.data.setVar('PKG_libgcc-dev', 'libgcc1-dev', d) bb.build.exec_func('package_do_split_gconvs', d) } + +NATIVE_INSTALL_WORKS = "1" diff --git a/recipes/minipredict/minipredict/fix-include.patch b/recipes/minipredict/minipredict/fix-include.patch index ac544704d4..97a4f046f7 100644 --- a/recipes/minipredict/minipredict/fix-include.patch +++ b/recipes/minipredict/minipredict/fix-include.patch @@ -1,4 +1,4 @@ ---- ../minipredict-1.0-r0/minipredict/minipredict.c 2003-02-16 00:18:02 +00:00 +--- minipredict/minipredict.c 2003-02-16 00:18:02 +00:00 +++ minipredict/minipredict.c 2005-03-04 04:54:13 +00:00 @@ -16,7 +16,7 @@ #include diff --git a/recipes/minipredict/minipredict/fix-makefile.patch b/recipes/minipredict/minipredict/fix-makefile.patch index b46d816f46..638a15cfa8 100644 --- a/recipes/minipredict/minipredict/fix-makefile.patch +++ b/recipes/minipredict/minipredict/fix-makefile.patch @@ -1,5 +1,5 @@ -diff -urNd ../minipredict-1.0-r0/minipredict/Makefile minipredict/Makefile ---- ../minipredict-1.0-r0/minipredict/Makefile 2003-02-15 23:14:40 +00:00 +diff -urNd minipredict/Makefile minipredict/Makefile +--- minipredict/Makefile 2003-02-15 23:14:40 +00:00 +++ minipredict/Makefile 2005-03-04 05:23:24 +00:00 @@ -1,18 +1,16 @@ @@ -30,8 +30,8 @@ diff -urNd ../minipredict-1.0-r0/minipredict/Makefile minipredict/Makefile + rm -f *.o minipredict + +include Makefile.dpkg_ipkg -diff -urNd ../minipredict-1.0-r0/minipredict/Makefile.dpkg_ipkg minipredict/Makefile.dpkg_ipkg ---- ../minipredict-1.0-r0/minipredict/Makefile.dpkg_ipkg 1970-01-01 01:00:00 +01:00 +diff -urNd minipredict/Makefile.dpkg_ipkg minipredict/Makefile.dpkg_ipkg +--- minipredict/Makefile.dpkg_ipkg 1970-01-01 01:00:00 +01:00 +++ minipredict/Makefile.dpkg_ipkg 2005-03-04 04:24:46 +00:00 @@ -0,0 +1,114 @@ +## Please read the README in this directory to see how to use this diff --git a/recipes/module-init-tools/module-init-tools-cross_3.12.bb b/recipes/module-init-tools/module-init-tools-cross_3.12.bb index 5c4f917733..6868d527ac 100644 --- a/recipes/module-init-tools/module-init-tools-cross_3.12.bb +++ b/recipes/module-init-tools/module-init-tools-cross_3.12.bb @@ -5,7 +5,7 @@ EXTRA_OECONF += "--disable-builddir" #DEPENDS += "docbook-utils-native" DEFAULT_PREFERENCE = "0" -PROVIDES += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}depmod-2.6" +PROVIDES += "virtual/${TARGET_PREFIX}depmod virtual/${TARGET_PREFIX}depmod-2.6 virtual/${TARGET_PREFIX}depmod-3.0" # Remove the RDEPENDS_${PN} we picked up from the "require"; # it's simply extraneous for the cross package diff --git a/recipes/mozilla/fennec/arm/mozconfig b/recipes/mozilla/fennec/arm/mozconfig index 926fa86041..a204891d4f 100644 --- a/recipes/mozilla/fennec/arm/mozconfig +++ b/recipes/mozilla/fennec/arm/mozconfig @@ -7,6 +7,12 @@ ac_add_options --disable-javaxpcom ac_add_options --enable-system-cairo ac_add_options --with-system-zlib ac_add_options --with-system-jpeg +ac_add_options --disable-necko-wifi +ac_add_options --disable-maintainer-mode +ac_add_options --disable-dependency-tracking +ac_add_options --disable-silent-rules +ac_add_options --disable-elf-dynstr-gc +ac_add_options --disable-elf-hack ac_add_app_options xulrunner --with-arm-kuser ac_add_app_options xulrunner --enable-application=xulrunner diff --git a/recipes/mozilla/fennec/cross-config.patch b/recipes/mozilla/fennec/cross-config.patch new file mode 100644 index 0000000000..7eaba89c45 --- /dev/null +++ b/recipes/mozilla/fennec/cross-config.patch @@ -0,0 +1,29 @@ +We need to override setting variables so we check if the vars are already +set then we do not reset them here + +-Khem + +Index: mozilla-central/build/autoconf/pkg.m4 +=================================================================== +--- mozilla-central.orig/build/autoconf/pkg.m4 ++++ mozilla-central/build/autoconf/pkg.m4 +@@ -23,12 +23,16 @@ AC_DEFUN([PKG_CHECK_MODULES], + succeeded=yes + + AC_MSG_CHECKING($1_CFLAGS) +- $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` ++ if test -z "$$1_CFLAGS"; then ++ $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` ++ fi + AC_MSG_RESULT($$1_CFLAGS) + + AC_MSG_CHECKING($1_LIBS) +- ## Remove evil flags like -Wl,--export-dynamic +- $1_LIBS="`$PKG_CONFIG --libs \"$2\" |sed s/-Wl,--export-dynamic//g`" ++ if test -z "$$1_LIBS"; then ++ ## Remove evil flags like -Wl,--export-dynamic ++ $1_LIBS="`$PKG_CONFIG --libs \"$2\" |sed s/-Wl,--export-dynamic//g`" ++ fi + AC_MSG_RESULT($$1_LIBS) + else + $1_CFLAGS="" diff --git a/recipes/mozilla/fennec/fennec-uclibc.patch b/recipes/mozilla/fennec/fennec-uclibc.patch new file mode 100644 index 0000000000..344aad3197 --- /dev/null +++ b/recipes/mozilla/fennec/fennec-uclibc.patch @@ -0,0 +1,84 @@ +uClibc does not have backtrace support and RTLD_NOLOAD support +So we disable them for uClibc + +-Khem + +Index: mozilla-central/memory/mozalloc/mozalloc.cpp +=================================================================== +--- mozilla-central.orig/memory/mozalloc/mozalloc.cpp ++++ mozilla-central/memory/mozalloc/mozalloc.cpp +@@ -236,7 +236,7 @@ moz_malloc_usable_size(void *ptr) + if (!ptr) + return 0; + +-#if defined(MOZ_MEMORY) ++#if defined(MOZ_MEMORY) && !defined(__UCLIBC__) + return malloc_usable_size(ptr); + #elif defined(XP_MACOSX) + return malloc_size(ptr); +Index: mozilla-central/xpcom/threads/nsThread.cpp +=================================================================== +--- mozilla-central.orig/xpcom/threads/nsThread.cpp ++++ mozilla-central/xpcom/threads/nsThread.cpp +@@ -52,9 +52,11 @@ + + #if defined(XP_UNIX) && !defined(ANDROID) && !defined(DEBUG) && HAVE_UALARM \ + && defined(_GNU_SOURCE) +-# define MOZ_CANARY + # include ++#if !defined(__UCLIBC__) ++# define MOZ_CANARY + # include ++#endif + # include + # include + # include "nsXULAppAPI.h" +Index: mozilla-central/ipc/chromium/src/base/debug_util_posix.cc +=================================================================== +--- mozilla-central.orig/ipc/chromium/src/base/debug_util_posix.cc ++++ mozilla-central/ipc/chromium/src/base/debug_util_posix.cc +@@ -11,7 +11,7 @@ + #include + #include + #include +-#ifndef ANDROID ++#if !defined ANDROID && !defined __UCLIBC__ + #include + #include + #endif +@@ -119,7 +119,7 @@ StackTrace::StackTrace() { + const int kMaxCallers = 256; + + void* callers[kMaxCallers]; +-#ifndef ANDROID ++#if !defined ANDROID && !defined __UCLIBC__ + int count = backtrace(callers, kMaxCallers); + #else + int count = 0; +@@ -138,7 +138,7 @@ StackTrace::StackTrace() { + + void StackTrace::PrintBacktrace() { + fflush(stderr); +-#ifndef ANDROID ++#if !defined ANDROID && !defined __UCLIBC__ + backtrace_symbols_fd(&trace_[0], trace_.size(), STDERR_FILENO); + #endif + } +Index: mozilla-central/security/nss/lib/freebl/stubs.c +=================================================================== +--- mozilla-central.orig/security/nss/lib/freebl/stubs.c ++++ mozilla-central/security/nss/lib/freebl/stubs.c +@@ -538,8 +538,13 @@ freebl_InitNSSUtil(void *lib) + /* + * fetch the library if it's loaded. For NSS it should already be loaded + */ ++#ifdef __UCLIBC__ ++#define freebl_getLibrary(libName) \ ++ dlopen (libName, RTLD_LAZY) ++#else + #define freebl_getLibrary(libName) \ + dlopen (libName, RTLD_LAZY|RTLD_NOLOAD) ++#endif + + #define freebl_releaseLibrary(lib) \ + if (lib) dlclose(lib) diff --git a/recipes/mozilla/fennec/jsautocfg-dontoverwrite.patch b/recipes/mozilla/fennec/jsautocfg-dontoverwrite.patch index b3188de32f..c2bc964dd1 100644 --- a/recipes/mozilla/fennec/jsautocfg-dontoverwrite.patch +++ b/recipes/mozilla/fennec/jsautocfg-dontoverwrite.patch @@ -1,17 +1,19 @@ ---- /tmp/Makefile.in 2009-03-20 10:34:54.000000000 +0100 -+++ mozilla-central/js/src/Makefile.in 2009-03-20 10:35:18.000000000 +0100 -@@ -507,20 +507,8 @@ +Index: mozilla-central/js/src/Makefile.in +=================================================================== +--- mozilla-central.orig/js/src/Makefile.in ++++ mozilla-central/js/src/Makefile.in +@@ -739,20 +739,8 @@ endif export:: jsautocfg.h -ifeq (,$(CROSS_COMPILE)$(GNU_CC)$(filter-out WINNT,$(OS_ARCH))) --jsautocfg.h: -- touch $@ --else --ifeq ($(OS_ARCH),WINCE) jsautocfg.h: touch $@ -else +-ifeq ($(OS_ARCH),WINCE) +-jsautocfg.h: +- touch $@ +-else -jsautocfg.h: jscpucfg$(HOST_BIN_SUFFIX) - @rm -f $@ jsautocfg.tmp - ./jscpucfg > jsautocfg.tmp diff --git a/recipes/mozilla/fennec/libffi-arm-softfloat.patch b/recipes/mozilla/fennec/libffi-arm-softfloat.patch new file mode 100644 index 0000000000..b9f70cd3bf --- /dev/null +++ b/recipes/mozilla/fennec/libffi-arm-softfloat.patch @@ -0,0 +1,290 @@ +This is a backport from upstream libffi so get it working on +ARM with and without VFP + +-Khem + +Index: mozilla-central/js/src/ctypes/libffi/src/arm/sysv.S +=================================================================== +--- mozilla-central.orig/js/src/ctypes/libffi/src/arm/sysv.S ++++ mozilla-central/js/src/ctypes/libffi/src/arm/sysv.S +@@ -1,5 +1,6 @@ + /* ----------------------------------------------------------------------- +- sysv.S - Copyright (c) 1998, 2008 Red Hat, Inc. ++ sysv.S - Copyright (c) 1998, 2008, 2011 Red Hat, Inc. ++ Copyright (c) 2011 Plausible Labs Cooperative, Inc. + + ARM Foreign Function Interface + +@@ -39,7 +40,11 @@ + #else + #define CNAME(x) x + #endif ++#ifdef __APPLE__ ++#define ENTRY(x) .globl CNAME(x); CNAME(x): ++#else + #define ENTRY(x) .globl CNAME(x); .type CNAME(x),%function; CNAME(x): ++#endif /* __APPLE__ */ + #endif + + #ifdef __ELF__ +@@ -48,6 +53,12 @@ + #define LSYM(x) x + #endif + ++/* Use the SOFTFP return value ABI on Mac OS X, as per the iOS ABI ++ Function Call Guide */ ++#ifdef __APPLE__ ++#define __SOFTFP__ ++#endif ++ + /* We need a better way of testing for this, but for now, this is all + we can do. */ + @ This selects the minimum architecture level required. +@@ -105,21 +116,33 @@ + .align 0 + .thumb + .thumb_func ++#ifdef __APPLE__ ++ ENTRY($0) ++#else + ENTRY(\name) ++#endif + bx pc + nop + .arm + UNWIND .fnstart + /* A hook to tell gdb that we've switched to ARM mode. Also used to call + directly from other local arm routines. */ +-_L__\name: ++#ifdef __APPLE__ ++_L__$0: ++#else ++_L__\name: ++#endif + .endm + #else + .macro ARM_FUNC_START name + .text + .align 0 + .arm ++#ifdef __APPLE__ ++ ENTRY($0) ++#else + ENTRY(\name) ++#endif + UNWIND .fnstart + .endm + #endif +@@ -141,8 +164,7 @@ _L__\name: + #endif + .endm + +- +- @ r0: fn ++ @ r0: ffi_prep_args + @ r1: &ecif + @ r2: cif->bytes + @ r3: fig->flags +@@ -222,12 +244,98 @@ ARM_FUNC_START ffi_call_SYSV + #endif + + LSYM(Lepilogue): +- RETLDM "r0-r3,fp" ++#if defined (__INTERWORKING__) ++ ldmia sp!, {r0-r3,fp, lr} ++ bx lr ++#else ++ ldmia sp!, {r0-r3,fp, pc} ++#endif + + .ffi_call_SYSV_end: + UNWIND .fnend ++#ifdef __ELF__ + .size CNAME(ffi_call_SYSV),.ffi_call_SYSV_end-CNAME(ffi_call_SYSV) ++#endif ++ ++ ++/* ++ unsigned int FFI_HIDDEN ++ ffi_closure_SYSV_inner (closure, respp, args) ++ ffi_closure *closure; ++ void **respp; ++ void *args; ++*/ ++ ++ARM_FUNC_START ffi_closure_SYSV ++ UNWIND .pad #16 ++ add ip, sp, #16 ++ stmfd sp!, {ip, lr} ++ UNWIND .save {r0, lr} ++ add r2, sp, #8 ++ UNWIND .pad #16 ++ sub sp, sp, #16 ++ str sp, [sp, #8] ++ add r1, sp, #8 ++ bl CNAME(ffi_closure_SYSV_inner) ++ cmp r0, #FFI_TYPE_INT ++ beq .Lretint ++ ++ cmp r0, #FFI_TYPE_FLOAT ++#if defined(__SOFTFP__) || defined(__ARM_EABI__) ++ beq .Lretint ++#else ++ beq .Lretfloat ++#endif ++ ++ cmp r0, #FFI_TYPE_DOUBLE ++#if defined(__SOFTFP__) || defined(__ARM_EABI__) ++ beq .Lretlonglong ++#else ++ beq .Lretdouble ++#endif ++ ++ cmp r0, #FFI_TYPE_LONGDOUBLE ++#if defined(__SOFTFP__) || defined(__ARM_EABI__) ++ beq .Lretlonglong ++#else ++ beq .Lretlongdouble ++#endif ++ ++ cmp r0, #FFI_TYPE_SINT64 ++ beq .Lretlonglong ++.Lclosure_epilogue: ++ add sp, sp, #16 ++ ldmfd sp, {sp, pc} ++.Lretint: ++ ldr r0, [sp] ++ b .Lclosure_epilogue ++.Lretlonglong: ++ ldr r0, [sp] ++ ldr r1, [sp, #4] ++ b .Lclosure_epilogue + ++#if !defined(__SOFTFP__) && !defined(__ARM_EABI__) ++.Lretfloat: ++ ldfs f0, [sp] ++ b .Lclosure_epilogue ++.Lretdouble: ++ ldfd f0, [sp] ++ b .Lclosure_epilogue ++.Lretlongdouble: ++ ldfd f0, [sp] ++ b .Lclosure_epilogue ++#endif ++ ++.ffi_closure_SYSV_end: ++ UNWIND .fnend ++#ifdef __ELF__ ++ .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) ++#endif ++ ++ ++/* Below are VFP hard-float ABI call and closure implementations. ++ Add VFP FPU directive here. */ ++ .fpu vfp + + @ r0: fn + @ r1: &ecif +@@ -294,7 +402,7 @@ LSYM(Lbase_args): + @ assume no return value. + cmp r2, #0 + beq LSYM(Lepilogue_vfp) +- ++ + cmp r3, #FFI_TYPE_INT + streq r0, [r2] + beq LSYM(Lepilogue_vfp) +@@ -321,79 +429,6 @@ LSYM(Lepilogue_vfp): + .ffi_call_VFP_end: + UNWIND .fnend + .size CNAME(ffi_call_VFP),.ffi_call_VFP_end-CNAME(ffi_call_VFP) +- +- +-/* +- unsigned int FFI_HIDDEN +- ffi_closure_SYSV_inner (closure, respp, args) +- ffi_closure *closure; +- void **respp; +- void *args; +-*/ +- +-ARM_FUNC_START ffi_closure_SYSV +- UNWIND .pad #16 +- add ip, sp, #16 +- stmfd sp!, {ip, lr} +- UNWIND .save {r0, lr} +- add r2, sp, #8 +- .pad #16 +- sub sp, sp, #16 +- str sp, [sp, #8] +- add r1, sp, #8 +- bl ffi_closure_SYSV_inner +- cmp r0, #FFI_TYPE_INT +- beq .Lretint +- +- cmp r0, #FFI_TYPE_FLOAT +-#if defined(__SOFTFP__) || defined(__ARM_EABI__) +- beq .Lretint +-#else +- beq .Lretfloat +-#endif +- +- cmp r0, #FFI_TYPE_DOUBLE +-#if defined(__SOFTFP__) || defined(__ARM_EABI__) +- beq .Lretlonglong +-#else +- beq .Lretdouble +-#endif +- +- cmp r0, #FFI_TYPE_LONGDOUBLE +-#if defined(__SOFTFP__) || defined(__ARM_EABI__) +- beq .Lretlonglong +-#else +- beq .Lretlongdouble +-#endif +- +- cmp r0, #FFI_TYPE_SINT64 +- beq .Lretlonglong +-.Lclosure_epilogue: +- add sp, sp, #16 +- ldmfd sp, {sp, pc} +-.Lretint: +- ldr r0, [sp] +- b .Lclosure_epilogue +-.Lretlonglong: +- ldr r0, [sp] +- ldr r1, [sp, #4] +- b .Lclosure_epilogue +- +-#if !defined(__SOFTFP__) && !defined(__ARM_EABI__) +-.Lretfloat: +- ldfs f0, [sp] +- b .Lclosure_epilogue +-.Lretdouble: +- ldfd f0, [sp] +- b .Lclosure_epilogue +-.Lretlongdouble: +- ldfd f0, [sp] +- b .Lclosure_epilogue +-#endif +- +-.ffi_closure_SYSV_end: +- UNWIND .fnend +- .size CNAME(ffi_closure_SYSV),.ffi_closure_SYSV_end-CNAME(ffi_closure_SYSV) + + + ARM_FUNC_START ffi_closure_VFP +@@ -405,7 +440,7 @@ ARM_FUNC_START ffi_closure_VFP + UNWIND .save {r0, lr} + add r2, sp, #72 + add r3, sp, #8 +- .pad #72 ++ UNWIND .pad #72 + sub sp, sp, #72 + str sp, [sp, #64] + add r1, sp, #64 +@@ -460,3 +495,4 @@ ARM_FUNC_START ffi_closure_VFP + #if defined __ELF__ && defined __linux__ + .section .note.GNU-stack,"",%progbits + #endif ++ diff --git a/recipes/mozilla/fennec/mozconfig b/recipes/mozilla/fennec/mozconfig index 7696f78a9c..356cd35cec 100644 --- a/recipes/mozilla/fennec/mozconfig +++ b/recipes/mozilla/fennec/mozconfig @@ -8,6 +8,12 @@ ac_add_options --enable-system-cairo ac_add_options --with-system-zlib ac_add_options --with-system-bz2 ac_add_options --with-system-jpeg +ac_add_options --disable-necko-wifi +ac_add_options --disable-maintainer-mode +ac_add_options --disable-dependency-tracking +ac_add_options --disable-silent-rules +ac_add_options --disable-elf-dynstr-gc +ac_add_options --disable-elf-hack ac_add_app_options xulrunner --enable-application=xulrunner diff --git a/recipes/mozilla/fennec/prune-lintl.patch b/recipes/mozilla/fennec/prune-lintl.patch new file mode 100644 index 0000000000..37ebb6cf51 --- /dev/null +++ b/recipes/mozilla/fennec/prune-lintl.patch @@ -0,0 +1,33 @@ +on uclibc we add -lintl and it will get into host libs too +and on host machines based on glibc it will complain on linking +host libraried. So we prune out -lintl + +-Khem + +Index: mozilla-central/build/autoconf/glib.m4 +=================================================================== +--- mozilla-central.orig/build/autoconf/glib.m4 ++++ mozilla-central/build/autoconf/glib.m4 +@@ -53,7 +53,8 @@ AC_ARG_ENABLE(glibtest, [ --disable-gli + no_glib=yes + else + GLIB_CFLAGS=`$GLIB_CONFIG $glib_config_args --cflags` +- GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs` ++ GLIB_LIBS=`$GLIB_CONFIG $glib_config_args --libs | \ ++ sed 's/\-lintl//g'` + glib_config_major_version=`$GLIB_CONFIG $glib_config_args --version | \ + sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` + glib_config_minor_version=`$GLIB_CONFIG $glib_config_args --version | \ +Index: mozilla-central/configure.in +=================================================================== +--- mozilla-central.orig/configure.in ++++ mozilla-central/configure.in +@@ -8495,7 +8495,7 @@ then + else + AC_MSG_ERROR([Cannot find $_LIBIDL_PREFIX_DIR/lib/libidl-0.6.lib or $_LIBIDL_PREFIX_DIR/lib/libidl-0.6_s.lib]) + fi +- HOST_LIBIDL_LIBS="${HOST_LIBIDL_LIBS} ${GLIB_LIBS}" ++ HOST_LIBIDL_LIBS="`echo ${HOST_LIBIDL_LIBS} | sed -e s/\-lintl//g` ${GLIB_LIBS}" + _LIBIDL_FOUND=1 + ;; + esac diff --git a/recipes/mozilla/fennec/uclibc-isfinite.patch b/recipes/mozilla/fennec/uclibc-isfinite.patch new file mode 100644 index 0000000000..c0f6696b33 --- /dev/null +++ b/recipes/mozilla/fennec/uclibc-isfinite.patch @@ -0,0 +1,70 @@ +finite() is obsolete and we should use isfinite() anyway +may be submit it upstream + +-Khem + +Index: mozilla-central/js/src/jsnum.h +=================================================================== +--- mozilla-central.orig/js/src/jsnum.h ++++ mozilla-central/js/src/jsnum.h +@@ -101,7 +101,7 @@ JSDOUBLE_IS_FINITE(jsdouble d) + #ifdef WIN32 + return _finite(d); + #else +- return finite(d); ++ return isfinite(d); + #endif + } + +Index: mozilla-central/content/base/public/nsContentUtils.h +=================================================================== +--- mozilla-central.orig/content/base/public/nsContentUtils.h ++++ mozilla-central/content/base/public/nsContentUtils.h +@@ -1928,7 +1928,7 @@ inline NS_HIDDEN_(PRBool) NS_FloatIsFini + #ifdef WIN32 + return _finite(f); + #else +- return finite(f); ++ return isfinite(f); + #endif + } + +Index: mozilla-central/content/canvas/src/nsCanvasRenderingContext2D.cpp +=================================================================== +--- mozilla-central.orig/content/canvas/src/nsCanvasRenderingContext2D.cpp ++++ mozilla-central/content/canvas/src/nsCanvasRenderingContext2D.cpp +@@ -159,7 +159,7 @@ DoubleIsFinite(double d) + // NOTE: '!!' casts an int to bool without spamming MSVC warning C4800. + return !!_finite(d); + #else +- return finite(d); ++ return isfinite(d); + #endif + } + +Index: mozilla-central/ipc/chromium/src/base/float_util.h +=================================================================== +--- mozilla-central.orig/ipc/chromium/src/base/float_util.h ++++ mozilla-central/ipc/chromium/src/base/float_util.h +@@ -14,7 +14,7 @@ namespace base { + + inline bool IsFinite(const double& number) { + #if defined(OS_POSIX) +- return finite(number) != 0; ++ return isfinite(number) != 0; + #elif defined(OS_WIN) + return _finite(number) != 0; + #endif +Index: mozilla-central/js/src/ctypes/CTypes.cpp +=================================================================== +--- mozilla-central.orig/js/src/ctypes/CTypes.cpp ++++ mozilla-central/js/src/ctypes/CTypes.cpp +@@ -464,7 +464,7 @@ static inline bool FloatIsFinite(jsdoubl + #ifdef WIN32 + return _finite(f) != 0; + #else +- return finite(f); ++ return isfinite(f); + #endif + } + diff --git a/recipes/mozilla/fennec_hg.bb b/recipes/mozilla/fennec_hg.bb index 5bfd0d31f7..7075fd9396 100644 --- a/recipes/mozilla/fennec_hg.bb +++ b/recipes/mozilla/fennec_hg.bb @@ -1,12 +1,16 @@ DESCRIPTION = "Mozilla Mobile browser" PV = "2.0+${MOZPV}" -MOZPV = "4.0b3pre" +MOZPV = "4.0b5" PR = "r0" PE = "1" - -SRC_URI = "hg://hg.mozilla.org;module=mozilla-central;rev=e2bc7992d304 \ - hg://hg.mozilla.org;module=mobile-browser;rev=051c9709248b \ +SRCREV = "FENNEC_4_0b5_RELEASE" +SRC_URI = "hg://hg.mozilla.org;module=mozilla-central;rev=${SRCREV} \ + hg://hg.mozilla.org;module=mobile-browser;rev=${SRCREV} \ + file://fennec-uclibc.patch \ + file://libffi-arm-softfloat.patch \ + file://uclibc-isfinite.patch \ + file://cross-config.patch \ file://jsautocfg.h \ file://jsautocfg-dontoverwrite.patch \ " @@ -16,13 +20,27 @@ S = "${WORKDIR}/mozilla-central" inherit mozilla require firefox.inc -DEPENDS += "libnotify autoconf213-native cairo alsa-lib sqlite3" +DEPENDS += "yasm-native libnotify autoconf213-native cairo alsa-lib sqlite3 mesa gconf" FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2" export LIBXUL_DIST="${S}/objdir/xulrunner/dist/" + CFLAGS_append = " -DMOZ_GFX_OPTIMIZE_MOBILE " +# We need to append -L/usr/lib to LDFLAGS otherwise +# it starts picking dependencies from /usr/lib if +# EXTRA_DSO_LDOPTS contains libraries like -lgconf-2 +# then the make looks it up in VPATH and sysroot +# does not appear in VPATH and it wont find it if +# build host does not have a library in its /usr/lib +# + +LDFLAGS += "-L${STAGING_LIBDIR}" +#EXTRA_OEMAKE += "EXTRA_DSO_LDOPTS=-L${STAGING_LIBDIR}" + +EXTRA_OECONF_append_arm = " --with-cpu-arch=${BASE_PACKAGE_ARCH} " + do_configure_prepend() { if [ -e ${WORKDIR}/mobile-browser ] ; then mv ${WORKDIR}/mobile-browser ${S}/mobile @@ -66,10 +84,4 @@ do_install() { install -m 0644 ${WORKDIR}/mozilla-${PN}.png ${D}${datadir}/pixmaps/ } -do_stage() { - : -} - - FILES_${PN} += "${libdir}/fennec" - diff --git a/recipes/mozilla/firefox_3.6.8.bb b/recipes/mozilla/firefox_3.6.8.bb index 04dde08989..348c8c0a4a 100644 --- a/recipes/mozilla/firefox_3.6.8.bb +++ b/recipes/mozilla/firefox_3.6.8.bb @@ -37,7 +37,9 @@ EXTRA_OECONF += " --enable-official-branding --disable-crashreporter" FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2" do_compile_prepend() { - cp ${WORKDIR}/jsautocfg.h ${S}/js/src/ - sed -i "s|CPU_ARCH =|CPU_ARCH = ${TARGET_ARCH}|" security/coreconf/Linux.mk + cp ${WORKDIR}/jsautocfg.h ${S}/js/src/ + sed -i "s|CPU_ARCH =|CPU_ARCH = ${TARGET_ARCH}|" security/coreconf/Linux.mk + sed -i "s|HOST_LIBIDL_CFLAGS = \@HOST_LIBIDL_CFLAGS\@|HOST_LIBIDL_CFLAGS = $(pkg-config --cflags libIDL-2.0)|" config/autoconf.mk.in + sed -i "s|HOST_LIBIDL_LIBS = @HOST_LIBIDL_LIBS@|HOST_LIBIDL_LIBS = $(pkg-config --libs libIDL-2.0)|" config/autoconf.mk.in } diff --git a/recipes/mtd/mtd-utils-1.4.1/fix_heap_corruption.patch b/recipes/mtd/mtd-utils-1.4.1/fix_heap_corruption.patch deleted file mode 100644 index 5ce3a53fc7..0000000000 --- a/recipes/mtd/mtd-utils-1.4.1/fix_heap_corruption.patch +++ /dev/null @@ -1,95 +0,0 @@ -From d8f0ae2f26898f652ad3af4536b5d0e4db37714f Mon Sep 17 00:00:00 2001 -From: Kevin Cernekee -Date: Wed, 22 Sep 2010 16:01:59 -0700 -Subject: [PATCH] mkfs.ubifs: Fix heap corruption on LEB overrun - -If max_leb_cnt (-c option) is set too low, set_lprops() will corrupt -the heap and may result in a scary looking crash: - -$ bin/mkfs.ubifs -U -r romfs -o ubifs.img -m 512 -e 15360 -c 39 -Error: max_leb_cnt too low (241 needed) -*** glibc detected *** bin/mkfs.ubifs: double free or corruption (!prev): 0x088fe070 *** -======= Backtrace: ========= -/lib32/libc.so.6(+0x6c231)[0xf75fb231] -/lib32/libc.so.6(+0x6dab8)[0xf75fcab8] -/lib32/libc.so.6(cfree+0x6d)[0xf75ffb9d] -bin/mkfs.ubifs[0x804e801] -bin/mkfs.ubifs[0x804e94b] -bin/mkfs.ubifs[0x804e99d] -/lib32/libc.so.6(__libc_start_main+0xe6)[0xf75a5bd6] -bin/mkfs.ubifs(__fxstat64+0x55)[0x80491e1] -======= Memory map: ======== -08048000-0805d000 r-xp 00000000 08:08 10012045 /work/bin/mkfs.ubifs -0805d000-0805e000 rwxp 00015000 08:08 10012045 /work/bin/mkfs.ubifs -088fe000-08945000 rwxp 00000000 00:00 0 [heap] -f73e1000-f73fe000 r-xp 00000000 08:05 2228842 /usr/lib32/libgcc_s.so.1 -f73fe000-f73ff000 r-xp 0001c000 08:05 2228842 /usr/lib32/libgcc_s.so.1 -f73ff000-f7400000 rwxp 0001d000 08:05 2228842 /usr/lib32/libgcc_s.so.1 -f7400000-f7421000 rwxp 00000000 00:00 0 -f7421000-f7500000 ---p 00000000 00:00 0 -f751c000-f758f000 rwxp 00000000 00:00 0 -f758f000-f76e2000 r-xp 00000000 08:05 426288 /lib32/libc-2.11.1.so -f76e2000-f76e3000 ---p 00153000 08:05 426288 /lib32/libc-2.11.1.so -f76e3000-f76e5000 r-xp 00153000 08:05 426288 /lib32/libc-2.11.1.so -f76e5000-f76e6000 rwxp 00155000 08:05 426288 /lib32/libc-2.11.1.so -f76e6000-f76e9000 rwxp 00000000 00:00 0 -f76e9000-f770d000 r-xp 00000000 08:05 426296 /lib32/libm-2.11.1.so -f770d000-f770e000 r-xp 00023000 08:05 426296 /lib32/libm-2.11.1.so -f770e000-f770f000 rwxp 00024000 08:05 426296 /lib32/libm-2.11.1.so -f772a000-f772c000 rwxp 00000000 00:00 0 -f772c000-f772d000 r-xp 00000000 00:00 0 [vdso] -f772d000-f7749000 r-xp 00000000 08:05 6062081 /lib32/ld-2.11.1.so -f7749000-f774a000 r-xp 0001b000 08:05 6062081 /lib32/ld-2.11.1.so -f774a000-f774b000 rwxp 0001c000 08:05 6062081 /lib32/ld-2.11.1.so -ffb58000-ffb6d000 rwxp 00000000 00:00 0 [stack] -Aborted - -New code aborts cleanly, and still calculates the number of LEBs -required: - -$ bin/mkfs.ubifs -U -r romfs -o tmp/ubifs.img -m 512 -e 15360 -c 39 -Error: max_leb_cnt too low (241 needed) -$ echo $? -255 -$ bin/mkfs.ubifs -U -r romfs -o tmp/ubifs.img -m 512 -e 15360 -c 240 -Error: max_leb_cnt too low (241 needed) -$ bin/mkfs.ubifs -U -r romfs -o tmp/ubifs.img -m 512 -e 15360 -c 241 -$ - -Signed-off-by: Kevin Cernekee -Signed-off-by: Artem Bityutskiy ---- - mkfs.ubifs/mkfs.ubifs.c | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) - -diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c -index eeb5e42..ec38f0e 100644 ---- a/mkfs.ubifs/mkfs.ubifs.c -+++ b/mkfs.ubifs/mkfs.ubifs.c -@@ -929,9 +929,11 @@ static void set_lprops(int lnum, int offs, int flags) - dirty = c->leb_size - free - ALIGN(offs, 8); - dbg_msg(3, "LEB %d free %d dirty %d flags %d", lnum, free, dirty, - flags); -- c->lpt[i].free = free; -- c->lpt[i].dirty = dirty; -- c->lpt[i].flags = flags; -+ if (i < c->main_lebs) { -+ c->lpt[i].free = free; -+ c->lpt[i].dirty = dirty; -+ c->lpt[i].flags = flags; -+ } - c->lst.total_free += free; - c->lst.total_dirty += dirty; - if (flags & LPROPS_INDEX) -@@ -1943,8 +1945,6 @@ static int finalize_leb_cnt(void) - { - c->leb_cnt = head_lnum; - if (c->leb_cnt > c->max_leb_cnt) -- /* TODO: in this case it segfaults because buffer overruns - we -- * somewhere allocate smaller buffers - fix */ - return err_msg("max_leb_cnt too low (%d needed)", c->leb_cnt); - c->main_lebs = c->leb_cnt - c->main_first; - if (verbose) { --- -1.7.2.3 - diff --git a/recipes/mtd/mtd-utils_1.4.1.bb b/recipes/mtd/mtd-utils_1.4.1.bb deleted file mode 100644 index 948fce138e..0000000000 --- a/recipes/mtd/mtd-utils_1.4.1.bb +++ /dev/null @@ -1,18 +0,0 @@ -require mtd-utils.inc - -DEPENDS += "util-linux-ng lzo2" - -PARALLEL_MAKE = "" -ARM_INSTRUCTION_SET = "arm" - -# This is the default package, thus we lock to a specific git version so -# upstream changes will not break builds. - -TAG = "v${PV}" - -SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=${TAG} \ - file://add-exclusion-to-mkfs-jffs2-git-2.patch \ - file://fix_heap_corruption.patch \ - " - -S = "${WORKDIR}/git/" diff --git a/recipes/mtd/mtd-utils_1.4.4.bb b/recipes/mtd/mtd-utils_1.4.4.bb new file mode 100644 index 0000000000..19adeff5d5 --- /dev/null +++ b/recipes/mtd/mtd-utils_1.4.4.bb @@ -0,0 +1,34 @@ +DESCRIPTION = "Tools for managing memory technology devices." +SECTION = "base" +DEPENDS = "zlib util-linux-ng lzo2" +#DEPENDS = "zlib lzo e2fsprogs util-linux" +HOMEPAGE = "http://www.linux-mtd.infradead.org/" +LICENSE = "GPLv2+" +PR = "r0" + +TAG = "v${PV}" + +SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=${TAG} \ + file://add-exclusion-to-mkfs-jffs2-git-2.patch \ + " + +S = "${WORKDIR}/git/" + +EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'" + +do_install () { + oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir} + install -d ${D}${includedir}/mtd/ + for f in ${S}/include/mtd/*.h; do + install -m 0644 $f ${D}${includedir}/mtd/ + done +} + +PACKAGES =+ "mkfs-jffs2 mkfs-ubifs" +FILES_mkfs-jffs2 = "${sbindir}/mkfs.jffs2" +FILES_mkfs-ubifs = "${sbindir}/mkfs.ubifs" + +PARALLEL_MAKE = "" + +BBCLASSEXTEND = "native" +NATIVE_INSTALL_WORKS = "1" diff --git a/recipes/mtr/mtr_0.65.bb b/recipes/mtr/mtr_0.80.bb similarity index 69% rename from recipes/mtr/mtr_0.65.bb rename to recipes/mtr/mtr_0.80.bb index d206deef8c..e19509c0df 100644 --- a/recipes/mtr/mtr_0.65.bb +++ b/recipes/mtr/mtr_0.80.bb @@ -10,5 +10,6 @@ EXTRA_OECONF = "--without-gtk" do_configure() { oe_runconf } -SRC_URI[md5sum] = "32de3cb8f0763e352124ff4fd74690ab" -SRC_URI[sha256sum] = "82da36fd013f33237a26f1a291e21fc041ebfeac90177a82cb8862732d824bc6" + +SRC_URI[md5sum] = "fa68528eaec1757f52bacf9fea8c68a9" +SRC_URI[sha256sum] = "76bbdd97faf3b805933a50858549ddba895911d6891c6cc51db472567cff0ec0" diff --git a/recipes/ncurses/ncurses-5.7/config.cache b/recipes/ncurses/ncurses/config.cache similarity index 100% rename from recipes/ncurses/ncurses-5.7/config.cache rename to recipes/ncurses/ncurses/config.cache diff --git a/recipes/ncurses/ncurses/ncurses-5.7-20110108-patch.sh.bz2 b/recipes/ncurses/ncurses/ncurses-5.7-20110108-patch.sh.bz2 new file mode 100644 index 0000000000..75d2507784 Binary files /dev/null and b/recipes/ncurses/ncurses/ncurses-5.7-20110108-patch.sh.bz2 differ diff --git a/recipes/ncurses/ncurses-5.7/tic-hang.patch b/recipes/ncurses/ncurses/tic-hang.patch similarity index 100% rename from recipes/ncurses/ncurses-5.7/tic-hang.patch rename to recipes/ncurses/ncurses/tic-hang.patch diff --git a/recipes/ncurses/ncurses_5.7.bb b/recipes/ncurses/ncurses_5.7.bb index f74b9ab5b6..2c3c23b7c2 100644 --- a/recipes/ncurses/ncurses_5.7.bb +++ b/recipes/ncurses/ncurses_5.7.bb @@ -4,7 +4,7 @@ LICENSE = "MIT" SECTION = "libs" PATCHDATE = "20110115" PV = "5.7+${PATCHDATE}" -PR = "r16" +PR = "r17" DEPENDS = "ncurses-native unifdef-native" DEPENDS_virtclass-native = "unifdef-native" @@ -12,7 +12,7 @@ DEPENDS_virtclass-native = "unifdef-native" inherit autotools binconfig test SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-5.7.tar.gz;name=tarball \ - ftp://invisible-island.net/ncurses/5.7/ncurses-5.7-20110108-patch.sh.bz2;apply=yes;name=p20110108sh \ + file://ncurses-5.7-20110108-patch.sh.bz2;apply=yes;name=p20110108sh \ \ ftp://invisible-island.net/ncurses/5.7/ncurses-5.7-${PATCHDATE}.patch.gz;name=p${PATCHDATE} \ file://tic-hang.patch \ diff --git a/recipes/ncurses/ncurses_5.9.bb b/recipes/ncurses/ncurses_5.9.bb new file mode 100644 index 0000000000..fbfb4774af --- /dev/null +++ b/recipes/ncurses/ncurses_5.9.bb @@ -0,0 +1,236 @@ +DESCRIPTION = "Ncurses library" +HOMEPAGE = "http://www.gnu.org/software/ncurses/ncurses.html" +LICENSE = "MIT" +SECTION = "libs" +PR = "r0" + +DEPENDS = "ncurses-native unifdef-native" +DEPENDS_virtclass-native = "unifdef-native" + +inherit autotools binconfig test + +SRC_URI = "${GNU_MIRROR}/ncurses/ncurses-${PV}.tar.gz \ + file://tic-hang.patch \ + file://config.cache \ +" + +SRC_URI[md5sum] = "8cb9c412e5f2d96bc6f459aa8c6282a1" +SRC_URI[sha256sum] = "9046298fb440324c9d4135ecea7879ffed8546dd1b58e59430ea07a4633f563b" + +PARALLEL_MAKE = "" +EXTRA_AUTORECONF = "-I m4" +CONFIG_SITE =+ "${WORKDIR}/config.cache" + +# Whether to enable separate widec libraries; must be 'true' or 'false' +# +# TODO: remove this variable when widec is supported in every setup? +ENABLE_WIDEC = "true" + +# _GNU_SOURCE is required for widec stuff and is detected automatically +# for target objects. But it must be set manually for native and sdk +# builds. +BUILD_CPPFLAGS += "-D_GNU_SOURCE" + +# Override the function from the autotools class; ncurses requires a +# patched autoconf213 to generate the configure script. This autoconf +# is not available so that the shipped script will be used. +do_configure() { + # check does not work with cross-compiling and is generally + # broken because it requires stdin to be pollable (which is + # not the case for /dev/null redirections) + export cf_cv_working_poll=yes + + for i in \ + 'narrowc' \ + 'widec --enable-widec --without-progs'; do + set -- $i + mkdir -p $1 + cd $1 + shift + + oe_runconf \ + --disable-static \ + --without-debug \ + --without-ada \ + --without-gpm \ + --enable-hard-tabs \ + --enable-xmc-glitch \ + --enable-colorfgbg \ + --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \ + --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \ + --with-shared \ + --disable-big-core \ + --program-prefix= \ + --with-ticlib \ + --with-termlib=tinfo \ + --enable-sigwinch \ + --enable-pc-files \ + --disable-rpath-hack \ + --with-build-cc="${BUILD_CC}" \ + --with-build-cpp="${BUILD_CPP}" \ + --with-build-ld="${BUILD_LD}" \ + --with-build-cflags="${BUILD_CFLAGS}" \ + --with-build-cppflags='${BUILD_CPPFLAGS}' \ + --with-build-ldflags='${BUILD_LDFLAGS}' \ + "$@" + cd .. + done +} + +do_compile() { + oe_runmake -C narrowc libs + oe_runmake -C narrowc/progs + + ! ${ENABLE_WIDEC} || \ + oe_runmake -C widec libs +} + +# set of expected differences between narrowc and widec header +# +# TODO: the NCURSES_CH_T difference can cause real problems :( +_unifdef_cleanup = " \ + -e '\!/\* \$Id: curses.wide,v!,\!/\* \$Id: curses.tail,v!d' \ + -e '/^#define NCURSES_CH_T /d' \ + -e '/^#include /d' \ + -e '\!^/\* .* \*/!d' \ +" + +do_test[dirs] = "${S}" +do_test() { + ${ENABLE_WIDEC} || return 0 + + # make sure that the narrow and widec header are compatible + # and differ only in minor details. + unifdef -k narrowc/include/curses.h | \ + sed ${_unifdef_cleanup} > curses-narrowc.h + unifdef -k widec/include/curses.h | \ + sed ${_unifdef_cleanup} > curses-widec.h + + diff curses-narrowc.h curses-widec.h +} + +_install_opts = "\ + DESTDIR='${D}' \ + PKG_CONFIG_LIBDIR='${libdir}/pkgconfig' \ + install.libs install.includes install.man \ +" + +do_install() { + # Order of installation is important; widec installs a 'curses.h' + # header with more definitions and must be installed last hence. + # Compatibility of these headers will be checked in 'do_test()'. + oe_runmake -C narrowc ${_install_opts} \ + install.data install.progs + + ! ${ENABLE_WIDEC} || \ + oe_runmake -C widec ${_install_opts} + + + cd narrowc + + # include some basic terminfo files + # stolen ;) from gentoo and modified a bit + for x in ansi console dumb linux rxvt screen sun vt{52,100,102,200,220} xterm-color xterm-xfree86 + do + local termfile="$(find "${D}${datadir}/terminfo/" -name "${x}" 2>/dev/null)" + local basedir="$(basename $(dirname "${termfile}"))" + + if [ -n "${termfile}" ] + then + install -d ${D}${sysconfdir}/terminfo/${basedir} + mv ${termfile} ${D}${sysconfdir}/terminfo/${basedir}/ + ln -s /etc/terminfo/${basedir}/${x} \ + ${D}${datadir}/terminfo/${basedir}/${x} + fi + done + # i think we can use xterm-color as default xterm + if [ -e ${D}${sysconfdir}/terminfo/x/xterm-color ] + then + ln -sf xterm-color ${D}${sysconfdir}/terminfo/x/xterm + fi + + if [ "${PN}" = "ncurses" ]; then + mv ${D}${bindir}/clear ${D}${bindir}/clear.${PN} + mv ${D}${bindir}/reset ${D}${bindir}/reset.${PN} + fi + + + # create linker scripts for libcurses.so and libncurses to + # link against -ltinfo when needed. Some builds might break + # else when '-Wl,--no-copy-dt-needed-entries' has been set in + # linker flags. + for i in libncurses libncursesw; do + f=${D}${libdir}/$i.so + test -h $f || continue + rm -f $f + echo '/* GNU ld script */' >$f + echo "INPUT($i.so.5 AS_NEEDED(-ltinfo))" >>$f + done + + # create libtermcap.so linker script for backward compatibility + f=${D}${libdir}/libtermcap.so + echo '/* GNU ld script */' >$f + echo 'INPUT(AS_NEEDED(-ltinfo))' >>$f +} + +python populate_packages_prepend () { + libdir = bb.data.expand("${libdir}", d) + pnbase = bb.data.expand("${PN}-lib%s", d) + do_split_packages(d, libdir, '^lib(.*)\.so\..*', pnbase, 'ncurses %s library', prepend=True, extra_depends = '', allow_links=True) +} + + +pkg_postinst_ncurses-tools () { + if [ "${PN}" = "ncurses" ]; then + update-alternatives --install ${bindir}/clear clear clear.${PN} 100 + update-alternatives --install ${bindir}/reset reset reset.${PN} 100 + fi +} + +pkg_prerm_ncurses-tools () { + if [ "${PN}" = "ncurses" ]; then + update-alternatives --remove clear clear.${PN} + update-alternatives --remove reset reset.${PN} + fi +} + +BBCLASSEXTEND = "native sdk" + +PACKAGES += " \ + ${PN}-tools \ + ${PN}-terminfo \ + ${PN}-terminfo-base \ +" + +FILES_${PN} = "\ + ${bindir}/tput \ + ${bindir}/tset \ + ${datadir}/tabset \ +" + +# This keeps only tput/tset in ncurses +# clear/reset are in already busybox +FILES_${PN}-tools = "\ + ${bindir}/tic \ + ${bindir}/toe \ + ${bindir}/infotocap \ + ${bindir}/captoinfo \ + ${bindir}/infocmp \ + ${bindir}/clear.${PN} \ + ${bindir}/reset.${PN} \ + ${bindir}/tack \ + ${bindir}/tabs \ +" +# 'reset' is a symlink to 'tset' which is in the 'ncurses' package +RDEPENDS_${PN}-tools = "${PN}" + +FILES_${PN}-terminfo = "\ + ${datadir}/terminfo \ +" + +FILES_${PN}-terminfo-base = "\ + ${sysconfdir}/terminfo \ +" + +RSUGGESTS_${PN}-libtinfo = "${PN}-terminfo" +RRECOMMENDS_${PN}-libtinfo = "${PN}-terminfo-base" diff --git a/recipes/net-snmp/files/snmpd.conf b/recipes/net-snmp/files/snmpd.conf index 728171c427..4e6b2eb404 100644 --- a/recipes/net-snmp/files/snmpd.conf +++ b/recipes/net-snmp/files/snmpd.conf @@ -39,7 +39,7 @@ # allow me to access it?" # # By default, the agent responds to the "public" community for read -# only access, if run out of the box without any configuration file in +# only access, if run out of the box without any configuration file in # place. The following examples show you other ways of configuring # the agent so that you can change the community names, and give # yourself write access as well. @@ -150,7 +150,7 @@ syscontact Root (configure /etc/snmp/snmpd.local.conf) #proc sendmail 10 1 # A snmpwalk of the prTable would look something like this: -# +# # % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.2 # enterprises.ucdavis.procTable.prEntry.prIndex.1 = 1 # enterprises.ucdavis.procTable.prEntry.prIndex.2 = 2 @@ -180,8 +180,8 @@ syscontact Root (configure /etc/snmp/snmpd.local.conf) # Note that the errorFlag for mountd is set to 1 because one is not # running (in this case an rpc.mountd is, but thats not good enough), # and the ErrMessage tells you what's wrong. The configuration -# imposed in the snmpd.conf file is also shown. -# +# imposed in the snmpd.conf file is also shown. +# # Special Case: When the min and max numbers are both 0, it assumes # you want a max of infinity and a min of 1. # @@ -220,7 +220,7 @@ syscontact Root (configure /etc/snmp/snmpd.local.conf) # #exec shelltest /bin/sh /tmp/shtest -# Then, +# Then, # % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.8 # enterprises.ucdavis.extTable.extEntry.extIndex.1 = 1 # enterprises.ucdavis.extTable.extEntry.extIndex.2 = 2 @@ -246,7 +246,7 @@ syscontact Root (configure /etc/snmp/snmpd.local.conf) # # The agent can check the amount of available disk space, and make -# sure it is above a set limit. +# sure it is above a set limit. # disk PATH [MIN=DEFDISKMINIMUMSPACE] # @@ -260,7 +260,7 @@ syscontact Root (configure /etc/snmp/snmpd.local.conf) # % snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.9 # enterprises.ucdavis.diskTable.dskEntry.diskIndex.1 = 0 -# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F +# enterprises.ucdavis.diskTable.dskEntry.diskPath.1 = "/" Hex: 2F # enterprises.ucdavis.diskTable.dskEntry.diskDevice.1 = "/dev/dsk/c201d6s0" # enterprises.ucdavis.diskTable.dskEntry.diskMinimum.1 = 10000 # enterprises.ucdavis.diskTable.dskEntry.diskTotal.1 = 837130 @@ -294,9 +294,9 @@ syscontact Root (configure /etc/snmp/snmpd.local.conf) # enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1" # enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5" # enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15" -# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39 -# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31 -# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36 +# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39 +# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31 +# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36 # enterprises.ucdavis.loadTable.laEntry.loadaveConfig.1 = "12.00" # enterprises.ucdavis.loadTable.laEntry.loadaveConfig.2 = "14.00" # enterprises.ucdavis.loadTable.laEntry.loadaveConfig.3 = "14.00" @@ -312,7 +312,7 @@ syscontact Root (configure /etc/snmp/snmpd.local.conf) ############################################################################### # Extensible sections. -# +# # This alleviates the multiple line output problem found in the # previous executable mib by placing each mib in its own mib table: @@ -346,8 +346,8 @@ syscontact Root (configure /etc/snmp/snmpd.local.conf) # the .50.* outputs above to change to reasonable text descriptions. # Other ideas: -# -# exec .1.3.6.1.4.1.2021.51 ps /bin/ps +# +# exec .1.3.6.1.4.1.2021.51 ps /bin/ps # exec .1.3.6.1.4.1.2021.52 top /usr/local/bin/top # exec .1.3.6.1.4.1.2021.53 mailq /usr/bin/mailq @@ -356,17 +356,17 @@ syscontact Root (configure /etc/snmp/snmpd.local.conf) ############################################################################### # Pass through control. -# +# # Usage: # pass MIBOID EXEC-COMMAND # # This will pass total control of the mib underneath the MIBOID -# portion of the mib to the EXEC-COMMAND. +# portion of the mib to the EXEC-COMMAND. # # Note: You'll have to change the path of the passtest script to your # source directory or install it in the given location. -# +# # Example: (see the script for details) # (commented out here since it requires that you place the # script in the right location. (its not installed by default)) diff --git a/recipes/net-snmp/files/snmptrapd.conf b/recipes/net-snmp/files/snmptrapd.conf index 8d2e4375ef..a012a0001b 100644 --- a/recipes/net-snmp/files/snmptrapd.conf +++ b/recipes/net-snmp/files/snmptrapd.conf @@ -15,4 +15,3 @@ # # PLEASE: read the snmptrapd.conf(5) manual page as well! # - diff --git a/recipes/net-snmp/net-snmp.inc b/recipes/net-snmp/net-snmp.inc index 92df575378..1b604f5860 100644 --- a/recipes/net-snmp/net-snmp.inc +++ b/recipes/net-snmp/net-snmp.inc @@ -12,12 +12,8 @@ inherit autotools update-rc.d siteinfo TARGET_CC_ARCH += "${LDFLAGS}" -do_configure() { - # Additional flag based on target endiness (see siteinfo.bbclass) - ENDIANESS="${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}" - oenote Determined endianess as: $ENDIANESS - oe_runconf $ENDIANESS -} +EXTRA_OECONF = "--enable-shared --disable-manuals --with-defaults \ +${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}" do_install_append() { install -d ${D}${sysconfdir}/snmp diff --git a/recipes/net-snmp/net-snmp_5.1.2.bb b/recipes/net-snmp/net-snmp_5.1.2.bb index 45694c399a..2b7ec4f3e8 100644 --- a/recipes/net-snmp/net-snmp_5.1.2.bb +++ b/recipes/net-snmp/net-snmp_5.1.2.bb @@ -1,5 +1,5 @@ require net-snmp.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ file://uclibc-fix.patch \ @@ -10,7 +10,6 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ inherit autotools PARALLEL_MAKE = "" -EXTRA_OECONF = "--enable-shared --disable-manuals --with-defaults" EXTRA_OEMAKE = "INSTALL_PREFIX=${D}" CONFFILES_${PN}_nylon = "${sysconfdir}/snmp/snmpd.conf ${sysconfdir}/snmp/snmptrapd.conf" diff --git a/recipes/net-snmp/net-snmp_5.4.1.bb b/recipes/net-snmp/net-snmp_5.4.1.bb index bd9782746b..ac72849a50 100644 --- a/recipes/net-snmp/net-snmp_5.4.1.bb +++ b/recipes/net-snmp/net-snmp_5.4.1.bb @@ -1,5 +1,5 @@ require net-snmp.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ file://configure-tail.patch \ @@ -7,8 +7,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ file://snmpd.conf \ file://snmptrapd.conf" -EXTRA_OECONF = "--enable-shared --disable-manuals --with-defaults \ - --disable-embedded-perl --with-perl-modules=no" +EXTRA_OECONF += "--disable-embedded-perl --with-perl-modules=no" EXTRA_OEMAKE = "INSTALL_PREFIX=${D}" do_configure_prepend() { diff --git a/recipes/net-snmp/net-snmp_5.4.2.1.bb b/recipes/net-snmp/net-snmp_5.4.2.1.bb index 1f80cbcef4..b043d073c1 100644 --- a/recipes/net-snmp/net-snmp_5.4.2.1.bb +++ b/recipes/net-snmp/net-snmp_5.4.2.1.bb @@ -1,5 +1,5 @@ require net-snmp.inc -PR = "${INC_PR}.1" +PR = "${INC_PR}.2" SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ file://configure-tail.patch \ @@ -8,8 +8,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ file://snmpd.conf \ file://snmptrapd.conf" -EXTRA_OECONF = "--enable-shared --disable-manuals --with-defaults \ - --disable-embedded-perl --with-perl-modules=no" +EXTRA_OECONF += "--disable-embedded-perl --with-perl-modules=no" EXTRA_OEMAKE = "INSTALL_PREFIX=${D}" do_configure_prepend() { diff --git a/recipes/net-snmp/net-snmp_5.7.1.bb b/recipes/net-snmp/net-snmp_5.7.1.bb new file mode 100644 index 0000000000..08571e9043 --- /dev/null +++ b/recipes/net-snmp/net-snmp_5.7.1.bb @@ -0,0 +1,28 @@ +require net-snmp.inc +PR = "${INC_PR}.0" +LIC_FILES_CHKSUM = "file://README;beginline=3;endline=8;md5=7f7f00ba639ac8e8deb5a622ea24634e" + +DEFAULT_PREFERENCE = "1" + +SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ + file://init \ + file://snmpd.conf \ + file://snmptrapd.conf" + +EXTRA_OECONF += "--disable-embedded-perl --with-perl-modules=no" +EXTRA_OEMAKE = "INSTALL_PREFIX=${D}" + +do_configure_prepend() { + gnu-configize -f + # We better change sources and re-autoconf here, but + # required autoconf is too new for us. + sed -e '/echo.*\".*\\\\.*\"/s/echo/echo -e/g' \ + -e 's/tail -1/tail -n 1/g' \ + -i configure +} + +PARALLEL_MAKE = "" +CCACHE = "" + +SRC_URI[md5sum] = "c95d08fd5d93df0c11a2e1bdf0e01e0b" +SRC_URI[sha256sum] = "7c71c9650c65b715356547e20ca2dbe6313944278af8cc19c32a5337f46b181f" diff --git a/recipes/net-snmp/net-snmp_svn.bb b/recipes/net-snmp/net-snmp_svn.bb index 689a41652e..c53c91f3da 100644 --- a/recipes/net-snmp/net-snmp_svn.bb +++ b/recipes/net-snmp/net-snmp_svn.bb @@ -1,7 +1,7 @@ require net-snmp.inc DEPENDS += "libtool libtool-native libtool-cross" -SRCREV = "17367" -PR = "${INC_PR}.0" +SRCREV = "20069" +PR = "${INC_PR}.1" S = "${WORKDIR}/net-snmp" @@ -10,19 +10,7 @@ SRC_URI = "svn://net-snmp.svn.sourceforge.net/svnroot/net-snmp/trunk;module=net- file://snmpd.conf \ file://snmptrapd.conf" -EXTRA_OECONF = "--enable-shared --disable-manuals --with-defaults \ - --disable-embedded-perl --with-perl-modules=no GREP=/bin/grep SED=/bin/sed" +EXTRA_OECONF += "--disable-embedded-perl --with-perl-modules=no --without-nl GREP=/bin/grep SED=/bin/sed" EXTRA_OEMAKE = "INSTALL_PREFIX=${D}" -PARALLEL_MAKE = "" CCACHE = "" - -do_configure_prepend() { - gnu-configize -f - # We better change sources and re-autoconf here, but - # required autoconf is too new for us. - sed -e '/echo.*\".*\\\\.*\"/s/echo/echo -e/g' \ - -e 's/tail -1/tail -n 1/g' \ - -i configure -} - diff --git a/recipes/netbase/netbase/interfaces b/recipes/netbase/netbase/interfaces index c615642e35..3a58975a99 100644 --- a/recipes/netbase/netbase/interfaces +++ b/recipes/netbase/netbase/interfaces @@ -4,80 +4,31 @@ auto lo iface lo inet loopback - -# Wireless interfaces -# -# Example of an unencrypted (no WEP or WPA) wireless connection -# that connects to any available access point: -# -iface wlan0 inet dhcp - wireless_mode managed - wireless_essid any -# -# -# Same as above but locked to a specific access point: -# -#iface wlan0 inet dhcp -# wireless_mode managed -# wireless-essid some-essid -# -# A WEP encrypted connection locked to a specific access point: -# -#iface wlan0 inet dhcp -# wireless-essid some-essid -# wireless-key s:My-PlainText-Password -# wireless-mode managed -# -# A WPA1 or WPA2 encrypted connection locked to a specific access point. -# This is the best option for non-roaming, single-network usage. -# Note that your card may require a firmware update to use WPA. -# Some distributions install a temporary volatile firmware update on ifup. -# -#iface wlan0 inet dhcp -# wpa-essid some-essid -# wpa-psk My-PlainText-Password -# -# A WPA1 or WPA2 encrypted connection using an external configuration file -# for wpa-supplicant. This is the way to go if you need to configure multiple -# networks with different keys and / or WPA settings and roaming support. -# -# iface wlan0 inet dhcp -# wpa-conf /etc/wpa_supplicant.conf -# wpa-driver hostap - - - -iface atml0 inet dhcp - -# Wired or wireless interfaces +# Wired interface auto eth0 iface eth0 inet dhcp -iface eth1 inet dhcp -# Ethernet/RNDIS gadget (g_ether) -# ... or on host side, usbnet and random hwaddr -iface usb0 inet static - address 192.168.0.202 - netmask 255.255.255.0 - network 192.168.0.0 - gateway 192.168.0.200 - - -# Zaurus 2.4 Lineo net_fd; obsolete -iface usbd0 inet static - address 192.168.129.201 - netmask 255.255.255.0 - network 192.168.129.0 - gateway 192.168.129.200 - -# iPAQ 2.4 mach-sa1100/usb-eth -# (192.168.0.202 is the iPAQ's IP, 192.168.0.200 is the host's IP) -iface usbf inet static - address 192.168.0.202 - netmask 255.255.255.0 - network 192.168.0.0 - gateway 192.168.0.200 - -# Bluetooth networking -iface bnep0 inet dhcp +# Wireless interface (USB) +# You need the correct wireless drivers to be loaded for this to work. +# Check rascalmicro.com for more details. +# auto wlan0 +# iface wlan0 inet dhcp +# pre-up wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf +# post-down killall -q wpa_supplicant + +# If you want to assign a static IP address, you could comment +# out the dhcp line above and uncomment the five lines below. +# You might need to tweak the addresses for your network. +# iface eth0 inet static +# address 192.168.1.189 +# netmask 255.255.255.0 +# network 192.168.1.0 +# gateway 192.168.1.1 + +# Ethernet over USB (g_ether) +# iface usb0 inet static +# address 192.168.1.191 +# netmask 255.255.255.0 +# network 192.168.1.0 +# gateway 192.168.1.1 diff --git a/recipes/netbase/netbase_4.21.bb b/recipes/netbase/netbase_4.21.bb index f3ae6e9383..075c9dbc77 100644 --- a/recipes/netbase/netbase_4.21.bb +++ b/recipes/netbase/netbase_4.21.bb @@ -9,7 +9,7 @@ inherit update-rc.d SRC_URI_OVERRIDES_PACKAGE_ARCH = "1" INITSCRIPT_NAME = "networking" -INITSCRIPT_PARAMS = "start 40 S . stop 40 0 6 1 ." +INITSCRIPT_PARAMS = "start 41 S . stop 41 0 6 1 ." # On MNCI etc, start very late so that our own apps come up faster INITSCRIPT_PARAMS_openmn = "start 85 1 2 3 4 5 . stop 85 0 6 1 ." # On SlugOS (NSLU2) delay the stop until after network apps have exited diff --git a/recipes/networkmanager/network-manager-applet_git.bb b/recipes/networkmanager/network-manager-applet_git.bb index f0bf13687a..8493f6d66c 100644 --- a/recipes/networkmanager/network-manager-applet_git.bb +++ b/recipes/networkmanager/network-manager-applet_git.bb @@ -2,27 +2,39 @@ DESCRIPTION = "GTK+ applet for NetworkManager" LICENSE = "GPL" DEPENDS = "libnotify networkmanager dbus-glib libglade gconf gnome-keyring" RDEPENDS_${PN} = "networkmanager" -PR = "r1" DEFAULT_PREFERENCE = "-1" +DEFAULT_PREFERENCE_angstrom = "1" -SRCREV = "447befc06fcfcb13322deb66bcdc9067bda0915b" -PV = "0.7.999+git" -PR_append = ".gitr${SRCREV}" +SRCREV = "0.8.3.999" +PV = "0.8.3.999" +#PR_append = ".gitr${SRCREV}" inherit gnome -SRC_URI = "git://git.gnome.org/network-manager-applet;protocol=git;branch=NETWORKMANAGER_APPLET_0_7 \ -file://nm-applet.conf" +SRC_URI = "git://git.gnome.org/network-manager-applet;protocol=git;branch=NMA_0_8 \ + file://nm-applet.conf" S = "${WORKDIR}/git" +do_configure_append() { + rm config.log + # Sigh... --enable-compile-warnings=no doesn't actually turn off -Werror + for i in $(find ${S} -name "Makefile") ; do + sed -i -e s:-Werror::g $i + done +} + # Hack around dbus a_console problems do_install_append() { - install -m 0644 ${WORKDIR}/nm-applet.conf ${D}${sysconfdir}/dbus-1/system.d/ + install -m 0644 ${WORKDIR}/nm-applet.conf ${D}${sysconfdir}/dbus-1/system.d/ } FILES_${PN} += "${datadir}/nm-applet/ \ ${datadir}/gnome-vpn-properties/ \ ${datadir}/gnome/autostart/ \ " + +FILES_${PN} += "${libdir}/gnome-bluetooth/plugins/*.so" +FILES_${PN}-dbg += "${libdir}/gnome-bluetooth/plugins/.debug/" + diff --git a/recipes/networkmanager/networkmanager-0.7.inc b/recipes/networkmanager/networkmanager-0.7.inc index 6c0ccbeae4..18af1bc805 100644 --- a/recipes/networkmanager/networkmanager-0.7.inc +++ b/recipes/networkmanager/networkmanager-0.7.inc @@ -2,7 +2,7 @@ DESCRIPTION = "NetworkManager" SECTION = "net/misc" LICENSE = "GPL" PRIORITY = "optional" -DEPENDS = "libnl dbus dbus-glib hal wireless-tools policykit gnutls util-linux-ng ppp" +DEPENDS = "libnl1 dbus dbus-glib hal wireless-tools policykit gnutls util-linux-ng ppp" RDEPENDS_${PN} = "wpa-supplicant dhcp-client \ ${@base_contains('COMBINED_FEATURES', '3gmodem', 'ppp', '', d)} \ " diff --git a/recipes/networkmanager/networkmanager-openvpn_0.8.3.995.bb b/recipes/networkmanager/networkmanager-openvpn_0.8.3.995.bb new file mode 100644 index 0000000000..808970a590 --- /dev/null +++ b/recipes/networkmanager/networkmanager-openvpn_0.8.3.995.bb @@ -0,0 +1,32 @@ +DESCRIPTION = "NetworkManager" +SECTION = "net/misc" +LICENSE = "GPL" +PRIORITY = "optional" +DEPENDS = "networkmanager libnl dbus dbus-glib hal wireless-tools policykit gnutls util-linux-ng ppp libglade gnome-keyring" +RDEPENDS_${PN} = "wpa-supplicant dhcp-client \ + ${@base_contains('COMBINED_FEATURES', '3gmodem', 'ppp', '', d)} \ + " + +EXTRA_OECONF = " \ + --with-distro=debian \ + --with-crypto=gnutls \ + --disable-more-warnings" + +inherit autotools pkgconfig + +PR = "r0" + +SRC_URI += "${GNOME_MIRROR}/NetworkManager-openvpn/0.8/NetworkManager-openvpn-${PV}.tar.bz2 \ +" + +SRC_URI[md5sum] = "5b996d3167bc0b75f5b4e65338100ff5" +SRC_URI[sha256sum] = "bf11a963f526239fe1654b4824321eafb5f527e10fcef6b7fa5fdceaa4d9ce5c" + + +S = "${WORKDIR}/NetworkManager-openvpn-${PV}" + +FILES_${PN} += " \ + ${libdir}/NetworkManager/*.so \ + ${datadir}/gnome-vpn-properties \ + ${datadir}/icons " + diff --git a/recipes/networkmanager/networkmanager/0001-respect-libnl-flags-also-in-backends-ip6-manager.patch b/recipes/networkmanager/networkmanager/0001-respect-libnl-flags-also-in-backends-ip6-manager.patch new file mode 100644 index 0000000000..a923da58cd --- /dev/null +++ b/recipes/networkmanager/networkmanager/0001-respect-libnl-flags-also-in-backends-ip6-manager.patch @@ -0,0 +1,51 @@ +From 9d6414375e2371086dcfadc1d117fbcfe43fb3fc Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Wed, 23 Mar 2011 17:27:54 +0100 +Subject: [PATCH] respect libnl flags also in backends/ip6-manager + +Signed-off-by: Martin Jansa +--- + src/backends/Makefile.am | 2 ++ + src/ip6-manager/Makefile.am | 2 ++ + 2 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/backends/Makefile.am b/src/backends/Makefile.am +index fbec9aa..c0780d0 100644 +--- a/src/backends/Makefile.am ++++ b/src/backends/Makefile.am +@@ -63,10 +63,12 @@ endif + + libnmbackend_la_LIBADD += \ + $(top_builddir)/src/logging/libnm-logging.la \ ++ $(LIBNL_LIBS) \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) + + libnmbackend_la_CPPFLAGS = \ ++ $(LIBNL_CFLAGS) \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) \ + -DG_DISABLE_DEPRECATED \ +diff --git a/src/ip6-manager/Makefile.am b/src/ip6-manager/Makefile.am +index b56b197..b98d6de 100644 +--- a/src/ip6-manager/Makefile.am ++++ b/src/ip6-manager/Makefile.am +@@ -13,6 +13,7 @@ libip6_manager_la_SOURCES = \ + nm-ip6-manager.h + + libip6_manager_la_CPPFLAGS = \ ++ $(LIBNL_CFLAGS) \ + $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) \ + -DG_DISABLE_DEPRECATED +@@ -20,6 +21,7 @@ libip6_manager_la_CPPFLAGS = \ + libip6_manager_la_LIBADD = \ + $(top_builddir)/marshallers/libmarshallers.la \ + $(top_builddir)/src/logging/libnm-logging.la \ ++ $(LIBNL_LIBS) \ + $(DBUS_LIBS) \ + $(GLIB_LIBS) + +-- +1.7.4.1 + diff --git a/recipes/networkmanager/networkmanager_0.8.1.bb b/recipes/networkmanager/networkmanager_0.8.1.bb index 90b8946624..ca6572fcd1 100644 --- a/recipes/networkmanager/networkmanager_0.8.1.bb +++ b/recipes/networkmanager/networkmanager_0.8.1.bb @@ -1,6 +1,6 @@ require networkmanager-0.7.inc -PR = "r2" +PR = "r3" DEFAULT_PREFERENCE = "-1" @@ -10,6 +10,7 @@ SRC_URI += " \ file://nm-system-settings.conf \ file://NetworkManager \ file://gtk-doc.make \ + file://0001-respect-libnl-flags-also-in-backends-ip6-manager.patch \ " SRC_URI[md5sum] = "96e551149dda8f6e0a5621f77468ba79" diff --git a/recipes/networkmanager/networkmanager_git.bb b/recipes/networkmanager/networkmanager_git.bb index bb746a1166..81a2ad585b 100644 --- a/recipes/networkmanager/networkmanager_git.bb +++ b/recipes/networkmanager/networkmanager_git.bb @@ -2,10 +2,11 @@ require networkmanager-0.7.inc DEFAULT_PREFERENCE = "-1" DEFAULT_PREFERENCE_angstrom = "1" +DEFAULT_PREFERENCE_shr = "1" -SRCREV = "9b61ec7c58e8106c28d01b33ad0b263aefb1f347" -PV = "0.8.2+git" -PR_append = ".gitr${SRCREV}" +SRCREV = "0.8.3.999" +PV = "0.8.3.999" +#PR_append = ".gitr${SRCREV}" inherit gnome @@ -18,6 +19,7 @@ SRC_URI += " \ file://nm-system-settings.conf \ file://NetworkManager \ file://gtk-doc.make \ + file://0001-respect-libnl-flags-also-in-backends-ip6-manager.patch \ " EXTRA_OECONF += " --with-dhclient=${base_sbindir}/dhclient \ diff --git a/recipes/nginx/files/allow-cross.patch b/recipes/nginx/files/allow-cross.patch new file mode 100644 index 0000000000..b98a96341f --- /dev/null +++ b/recipes/nginx/files/allow-cross.patch @@ -0,0 +1,49 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../nginx/allow_cross.patch +# Copyright (C) 2009 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +--- ./auto/types/sizeof.orig 2009-09-02 15:57:09.264008454 -0400 ++++ ./auto/types/sizeof 2009-09-02 16:10:29.856009072 -0400 +@@ -38,8 +38,15 @@ + + + if [ -x $NGX_AUTOTEST ]; then +- ngx_size=`$NGX_AUTOTEST` ++ cachename=$(echo "ngx_cache_sizeof_$ngx_type" | tr ' *' '_p') ++ cacheval=$(eval echo "\$$cachename") ++ if [ -n "$cacheval" ]; then ++ ngx_size="$cacheval" ++ else ++ ngx_size=`$NGX_AUTOTEST` ++ fi ++ ngx_size=4 + echo " $ngx_size bytes" + fi + + +--- ./auto/feature.orig 2009-09-03 07:10:21.608009461 -0400 ++++ ./auto/feature 2009-09-03 07:15:24.048354979 -0400 +@@ -48,6 +48,10 @@ + + if [ -x $NGX_AUTOTEST ]; then + ++ if [ "$cross_compiling" = "yes" ]; then ++ ngx_feature_run=no ++ fi ++ + case "$ngx_feature_run" in + + yes) + diff --git a/recipes/nginx/files/nginx b/recipes/nginx/files/nginx new file mode 100644 index 0000000000..8bca1f10bc --- /dev/null +++ b/recipes/nginx/files/nginx @@ -0,0 +1,11 @@ +/var/log/nginx/access /var/log/nginx/error { + daily + missingok + rotate 7 + notifempty +# create + sharedscripts + postrotate + [ ! -f /var/run/nginx.pid ] || kill -USR1 `cat /var/run/nginx.pid` + endscript +} diff --git a/recipes/nginx/files/rascal-conf.patch b/recipes/nginx/files/rascal-conf.patch new file mode 100644 index 0000000000..02795d1959 --- /dev/null +++ b/recipes/nginx/files/rascal-conf.patch @@ -0,0 +1,181 @@ +diff -crB nginx-1.3.0.orig/conf/nginx.conf nginx-1.3.0/conf/nginx.conf +*** nginx-1.3.0.orig/conf/nginx.conf 2012-06-30 20:17:18.000000000 +0000 +--- nginx-1.3.0/conf/nginx.conf 2012-06-30 20:20:07.000000000 +0000 +*************** +*** 1,118 **** +- +- #user nobody; + worker_processes 1; + +- #error_log logs/error.log; +- #error_log logs/error.log notice; +- #error_log logs/error.log info; +- +- #pid logs/nginx.pid; +- +- + events { +! worker_connections 1024; + } + + + http { +! include mime.types; +! default_type application/octet-stream; + +! #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' +! # '$status $body_bytes_sent "$http_referer" ' +! # '"$http_user_agent" "$http_x_forwarded_for"'; +! +! #access_log logs/access.log main; +! +! sendfile on; +! #tcp_nopush on; +! +! #keepalive_timeout 0; +! keepalive_timeout 65; +! +! #gzip on; +! +! server { +! listen 80; +! server_name localhost; +! +! #charset koi8-r; +! +! #access_log logs/host.access.log main; +! +! location / { +! root html; +! index index.html index.htm; +! } +! +! #error_page 404 /404.html; +! +! # redirect server error pages to the static page /50x.html +! # +! error_page 500 502 503 504 /50x.html; +! location = /50x.html { +! root html; +! } +! +! # proxy the PHP scripts to Apache listening on 127.0.0.1:80 +! # +! #location ~ \.php$ { +! # proxy_pass http://127.0.0.1; +! #} +! +! # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 +! # +! #location ~ \.php$ { +! # root html; +! # fastcgi_pass 127.0.0.1:9000; +! # fastcgi_index index.php; +! # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; +! # include fastcgi_params; +! #} +! +! # deny access to .htaccess files, if Apache's document root +! # concurs with nginx's one +! # +! #location ~ /\.ht { +! # deny all; +! #} +! } +! +! +! # another virtual host using mix of IP-, name-, and port-based configuration +! # +! #server { +! # listen 8000; +! # listen somename:8080; +! # server_name somename alias another.alias; +! +! # location / { +! # root html; +! # index index.html index.htm; +! # } +! #} +! +! +! # HTTPS server +! # +! #server { +! # listen 443; +! # server_name localhost; +! +! # ssl on; +! # ssl_certificate cert.pem; +! # ssl_certificate_key cert.key; +! +! # ssl_session_timeout 5m; +! +! # ssl_protocols SSLv2 SSLv3 TLSv1; +! # ssl_ciphers HIGH:!aNULL:!MD5; +! # ssl_prefer_server_ciphers on; +! +! # location / { +! # root html; +! # index index.html index.htm; +! # } +! #} + + } +--- 1,57 ---- + worker_processes 1; + + events { +! worker_connections 1024; + } + + + http { +! include mime.types; +! default_type application/octet-stream; +! +! sendfile on; + +! keepalive_timeout 65; + ++ log_format comb-with-links '$remote_addr [$time_local] ' ++ '$request => generated $body_bytes_sent bytes in $request_time s ($status)'; ++ ++ server { ++ listen 80; ++ server_name localhost; ++ access_log /var/log/nginx/access comb-with-links; ++ ++ location ^~ /editor/static/ { ++ root /var/www/; ++ } ++ ++ location ^~ /static/ { ++ root /var/www/public/; ++ } ++ ++ location / { ++ uwsgi_pass 127.0.0.1:5000; # public app ++ include uwsgi_params; ++ } ++ ++ location /editor/ { ++ uwsgi_pass 127.0.0.1:5001; # editor app ++ include uwsgi_params; ++ } ++ ++ error_page 404 /404.html; ++ location = /404.html { ++ root /var/www/http-errors/; ++ } ++ ++ error_page 400 401 402 403 405 406 407 408 409 410 411 412 /4xx.html; ++ location = /4xx.html { ++ root /var/www/http-errors/; ++ } ++ ++ error_page 500 501 502 503 504 507 /50x.html; ++ location = /50x.html { ++ root /var/www/http-errors/; ++ } ++ } + } diff --git a/recipes/nginx/nginx_1.0.0.bb b/recipes/nginx/nginx_1.0.0.bb new file mode 100644 index 0000000000..133306c554 --- /dev/null +++ b/recipes/nginx/nginx_1.0.0.bb @@ -0,0 +1,38 @@ +DESCRIPTION = "Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server." +HOMEPAGE = "http://wiki.nginx.org" +SECTION = "net" +PRIORITY = "optional" +LICENSE = "BSD" +PR = "r0" + +SRC_URI = "http://nginx.org/download/nginx-${PV}.tar.gz \ + file://allow-cross.patch \ + file://rascal-conf.patch" + +DEPENDS = "libpcre" + +do_configure() { + export cross_compiling="yes" + ${S}/configure \ + --with-cc="${HOST_PREFIX}gcc -Wl,--hash-style=gnu" \ + --sbin-path=${sbindir}/nginx \ + --pid-path=${localstatedir}/run/nginx.pid \ + --lock-path=${localstatedir}/lock/nginx.lock \ + --error-log-path=${localstatedir}/log/nginx/error \ + --conf-path=${sysconfdir}/nginx/nginx.conf \ + --http-log-path=${localstatedir}/log/nginx/access \ + --http-client-body-temp-path=${localstatedir}/lib/nginx/client_body_temp \ + --http-proxy-temp-path=${localstatedir}/lib/nginx/proxy_temp \ + --http-fastcgi-temp-path=${localstatedir}/lib/nginx/fastcgi_temp \ + --http-uwsgi-temp-path=${localstatedir}/lib/nginx/uwsgi_temp \ + --http-scgi-temp-path=${localstatedir}/lib/nginx/scgi_temp +} + +do_install() { + install -d ${D}${localstatedir}/lib/nginx + install -d ${D}${localstatedir}/log/nginx + oe_runmake DESTDIR=${D} install +} + +SRC_URI[md5sum] = "5751c920c266ea5bb5fc38af77e9c71c" +SRC_URI[sha256sum] = "3de3d6caeed56751c24ebc5cfb03475620b9eb0fa999c766a01d44dca674c001" diff --git a/recipes/nginx/nginx_1.3.0.bb b/recipes/nginx/nginx_1.3.0.bb new file mode 100644 index 0000000000..a8cbe3f93c --- /dev/null +++ b/recipes/nginx/nginx_1.3.0.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server." +HOMEPAGE = "http://wiki.nginx.org" +SECTION = "net" +PRIORITY = "optional" +LICENSE = "BSD" +PR = "r0" + +SRC_URI = "http://nginx.org/download/nginx-${PV}.tar.gz \ + file://allow-cross.patch \ + file://nginx \ + file://rascal-conf.patch" + +DEPENDS = "libpcre logrotate" + +do_configure() { + export cross_compiling="yes" + ${S}/configure \ + --with-cc="${HOST_PREFIX}gcc -Wl,--hash-style=gnu" \ + --sbin-path=${sbindir}/nginx \ + --pid-path=${localstatedir}/run/nginx.pid \ + --lock-path=${localstatedir}/lock/nginx.lock \ + --error-log-path=${localstatedir}/log/nginx/error \ + --conf-path=${sysconfdir}/nginx/nginx.conf \ + --http-log-path=${localstatedir}/log/nginx/access \ + --http-client-body-temp-path=${localstatedir}/lib/nginx/client_body_temp \ + --http-proxy-temp-path=${localstatedir}/lib/nginx/proxy_temp \ + --http-fastcgi-temp-path=${localstatedir}/lib/nginx/fastcgi_temp \ + --http-uwsgi-temp-path=${localstatedir}/lib/nginx/uwsgi_temp \ + --http-scgi-temp-path=${localstatedir}/lib/nginx/scgi_temp +} + +do_install() { + install -d ${D}${localstatedir}/lib/nginx + install -d ${D}${localstatedir}/log/nginx +# install -m 0755 -d ${D}${sysconfdir} +# install -m 0644 ${WORKDIR}/nginx ${D}${sysconfdir}/logrotate + oe_runmake DESTDIR=${D} install +} + +SRC_URI[md5sum] = "b02e171c4a088aa9a5ab387943ce08eb" +SRC_URI[sha256sum] = "e95d4e5f840afe0e85f95689a10ffa8acaf5a4a1372fe285b175fbc807a5f409" diff --git a/recipes/nmap/nmap_3.81.bb b/recipes/nmap/nmap_3.81.bb index 4350c22d98..64aaac39ca 100644 --- a/recipes/nmap/nmap_3.81.bb +++ b/recipes/nmap/nmap_3.81.bb @@ -1,9 +1,9 @@ DESCRIPTION = "Nmap is a command line portscanner." HOMEPAGE = "http://www.insecure.org/nmap/" SECTION = "console/network" -LICENSE = "GPL" +LICENSE = "GPLv2" DEPENDS = "libpcap libpcre" -PR = "r2" +PR = "r3" inherit autotools diff --git a/recipes/nodejs/files/0001-Add-missing-compiler-flags-for-GCC-4.3.patch b/recipes/nodejs/files/0001-Add-missing-compiler-flags-for-GCC-4.3.patch new file mode 100644 index 0000000000..080b88f09b --- /dev/null +++ b/recipes/nodejs/files/0001-Add-missing-compiler-flags-for-GCC-4.3.patch @@ -0,0 +1,34 @@ +From 7cb51ed25b688be08825950ce3f5ce2ad38e3f95 Mon Sep 17 00:00:00 2001 +From: Chase Maupin +Date: Tue, 12 Jul 2011 11:00:48 -0500 +Subject: [PATCH] Add missing compiler flags for GCC 4.3 + +* When compiling nodejs for GCC 4.3.3 you need to also add the + flag -fno-tree-sink. +* This patch was taken from the thread at: + * https://github.com/joyent/node/issues/883 +* Believe that no action is taken on this change upstream because + it is GCC 4.3.3 specific and is not required for GCC 4.5 + +Upstream-Status: Denied + +Signed-off-by: Chase Maupin +--- + deps/v8/SConstruct | 1 + + 1 files changed, 1 insertions(+), 0 deletions(-) + +diff --git a/deps/v8/SConstruct b/deps/v8/SConstruct +index b2542fd..31c4c7b 100644 +--- a/deps/v8/SConstruct ++++ b/deps/v8/SConstruct +@@ -210,6 +210,7 @@ LIBRARY_FLAGS = { + }, + 'arch:arm': { + 'CPPDEFINES': ['V8_TARGET_ARCH_ARM'], ++ 'CCFLAGS': ['-fno-tree-sink'], + 'unalignedaccesses:on' : { + 'CPPDEFINES' : ['CAN_USE_UNALIGNED_ACCESSES=1'] + }, +-- +1.7.0.4 + diff --git a/recipes/nodejs/nodejs_0.4.0.bb b/recipes/nodejs/nodejs_0.4.0.bb index be3d23e02f..fe8a8780d2 100644 --- a/recipes/nodejs/nodejs_0.4.0.bb +++ b/recipes/nodejs/nodejs_0.4.0.bb @@ -4,11 +4,20 @@ LICENSE = "MIT" DEPENDS = "openssl" +PR = "r1" + +def nodejs_get_gcc_version(d): + import subprocess,os,bb + if os.path.exists(bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gcc'): + return subprocess.Popen([bb.data.getVar('TOOLCHAIN_PATH', d, 1)+'/bin/'+bb.data.getVar('TARGET_PREFIX', d, 1)+'gcc', '-v'], stderr=subprocess.PIPE).communicate()[1].splitlines()[-1].split()[2] + SRC_URI = " \ http://nodejs.org/dist/node-v${PV}.tar.gz \ file://libev-cross-cc_${PV}.patch \ " +SRC_URI += "${@["", "file://0001-Add-missing-compiler-flags-for-GCC-4.3.patch"][nodejs_get_gcc_version(d) <= "4.3.3"]}" + SRC_URI[md5sum] = "18f89256751f9b8e27dee8494f508171" SRC_URI[sha256sum] = "4a30bd9963373cb86a994479bdd451ab3b6f2124f0089493366315da79d3408e" diff --git a/recipes/ntpclient/ntpclient_2010_365.bb b/recipes/ntpclient/ntpclient_2010_365.bb new file mode 100644 index 0000000000..379348def7 --- /dev/null +++ b/recipes/ntpclient/ntpclient_2010_365.bb @@ -0,0 +1,45 @@ +DESCRIPTION = "NTP (RFC-1305) client for unix-alike computers" +HOMEPAGE = "http://doolittle.icarus.com/ntpclient" +AUTHOR = "Larry Doolittle " +RDEPENDS_${PN} = "busybox" +SECTION = "admin" +LICENSE = "GPLv2" +PR = "r0" +# The ntpclient package uses version numbers that include an underscore :( +PV = "2010_365" +# ntpclient unpacks into a directory that doesn't include version info :( +S = "${WORKDIR}/${PN}-2010" + +SRC_URI = "http://doolittle.icarus.com/ntpclient/ntpclient_${PV}.tar.gz \ + file://init \ + " + +INITSCRIPT_NAME = "ntpclient" +INITSCRIPT_PARAMS = "defaults 65" +inherit update-rc.d + +LDFLAGS += " -lrt " + +do_compile() { + oe_runmake ntpclient + oe_runmake adjtimex +} + +do_install () { + # Install the binary and tools + install -D -m 0755 ${S}/ntpclient ${D}${base_sbindir}/ntpclient + install -D -m 0755 ${S}/adjtimex ${D}${base_sbindir}/adjtimex.${PN} + install -D -m 0755 ${S}/rate.awk ${D}${sbindir}/ntpclient-drift-rate.awk + install -D -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ntpclient +} + +pkg_postinst_${PN} () { + update-alternatives --install ${base_sbindir}/adjtimex adjtimex adjtimex.${PN} 100 +} + +pkg_prerm_${PN} () { + update-alternatives --remove adjtimex adjtimex.${PN} +} + +SRC_URI[md5sum] = "a64689398f2df8933ee0d8da246e9eaa" +SRC_URI[sha256sum] = "9ad9b028385082fb804167f464e2db0a0b3d33780acd399327e64898b8fcfddd" diff --git a/recipes/nvidia-drivers/files/nvidia-oe-conftest.patch b/recipes/nvidia-drivers/files/nvidia-oe-conftest.patch index 6eae764d1c..aac4344709 100644 --- a/recipes/nvidia-drivers/files/nvidia-oe-conftest.patch +++ b/recipes/nvidia-drivers/files/nvidia-oe-conftest.patch @@ -1,4 +1,4 @@ ---- ../../../temp/NVIDIA-Linux-x86-1.0-8756-pkg1/usr/src/nv/Makefile.kbuild 2006-03-29 16:02:20.000000000 -0700 +--- nv/Makefile.kbuild 2006-03-29 16:02:20.000000000 -0700 +++ nv/Makefile.kbuild 2006-04-26 13:50:47.249353208 -0600 @@ -28,7 +28,7 @@ # Christian Zander (zander@mail.minion.de) (enhancements) @@ -33,7 +33,7 @@ # # Build an object file suitable for further processing by the installer and ---- ../../../temp/NVIDIA-Linux-x86-1.0-8756-pkg1/usr/src/nv/Makefile.nvidia 2006-03-29 16:02:20.000000000 -0700 +--- nv/Makefile.nvidia 2006-03-29 16:02:20.000000000 -0700 +++ nv/Makefile.nvidia 2006-04-26 13:52:19.573317832 -0600 @@ -102,7 +102,7 @@ diff --git a/recipes/mtd/mtd-utils-native.inc b/recipes/obsolete/mtd/mtd-utils-native.inc similarity index 76% rename from recipes/mtd/mtd-utils-native.inc rename to recipes/obsolete/mtd/mtd-utils-native.inc index aaef4ac666..b9dcc5a0bb 100644 --- a/recipes/mtd/mtd-utils-native.inc +++ b/recipes/obsolete/mtd/mtd-utils-native.inc @@ -1,5 +1,5 @@ inherit native -DEPENDS = "zlib-native lzo-native" +DEPENDS = "zlib-native" FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/mtd-utils" NATIVE_INSTALL_WORKS = "1" diff --git a/recipes/mtd/mtd-utils-native_1.1.0.bb b/recipes/obsolete/mtd/mtd-utils-native_1.1.0.bb similarity index 100% rename from recipes/mtd/mtd-utils-native_1.1.0.bb rename to recipes/obsolete/mtd/mtd-utils-native_1.1.0.bb diff --git a/recipes/mtd/mtd-utils-native_1.2.0+git.bb b/recipes/obsolete/mtd/mtd-utils-native_1.2.0+git.bb similarity index 100% rename from recipes/mtd/mtd-utils-native_1.2.0+git.bb rename to recipes/obsolete/mtd/mtd-utils-native_1.2.0+git.bb diff --git a/recipes/mtd/mtd-utils-native_1.3.1.bb b/recipes/obsolete/mtd/mtd-utils-native_1.3.1.bb similarity index 100% rename from recipes/mtd/mtd-utils-native_1.3.1.bb rename to recipes/obsolete/mtd/mtd-utils-native_1.3.1.bb diff --git a/recipes/mtd/mtd-utils-native_1.4.1.bb b/recipes/obsolete/mtd/mtd-utils-native_1.4.1.bb similarity index 100% rename from recipes/mtd/mtd-utils-native_1.4.1.bb rename to recipes/obsolete/mtd/mtd-utils-native_1.4.1.bb diff --git a/recipes/mtd/mtd-utils-tests_1.2.0+git.bb b/recipes/obsolete/mtd/mtd-utils-tests_1.2.0+git.bb similarity index 100% rename from recipes/mtd/mtd-utils-tests_1.2.0+git.bb rename to recipes/obsolete/mtd/mtd-utils-tests_1.2.0+git.bb diff --git a/recipes/mtd/mtd-utils.inc b/recipes/obsolete/mtd/mtd-utils.inc similarity index 100% rename from recipes/mtd/mtd-utils.inc rename to recipes/obsolete/mtd/mtd-utils.inc diff --git a/recipes/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch b/recipes/obsolete/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch similarity index 100% rename from recipes/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch rename to recipes/obsolete/mtd/mtd-utils/add-exclusion-to-mkfs-jffs2-git.patch diff --git a/recipes/mtd/mtd-utils/fix-ignoreerrors-git.patch b/recipes/obsolete/mtd/mtd-utils/fix-ignoreerrors-git.patch similarity index 100% rename from recipes/mtd/mtd-utils/fix-ignoreerrors-git.patch rename to recipes/obsolete/mtd/mtd-utils/fix-ignoreerrors-git.patch diff --git a/recipes/mtd/mtd-utils/lzo_1x-git.patch b/recipes/obsolete/mtd/mtd-utils/lzo_1x-git.patch similarity index 100% rename from recipes/mtd/mtd-utils/lzo_1x-git.patch rename to recipes/obsolete/mtd/mtd-utils/lzo_1x-git.patch diff --git a/recipes/mtd/mtd-utils/lzo_1x.patch b/recipes/obsolete/mtd/mtd-utils/lzo_1x.patch similarity index 100% rename from recipes/mtd/mtd-utils/lzo_1x.patch rename to recipes/obsolete/mtd/mtd-utils/lzo_1x.patch diff --git a/recipes/mtd/mtd-utils_1.1.0.bb b/recipes/obsolete/mtd/mtd-utils_1.1.0.bb similarity index 100% rename from recipes/mtd/mtd-utils_1.1.0.bb rename to recipes/obsolete/mtd/mtd-utils_1.1.0.bb diff --git a/recipes/mtd/mtd-utils_1.2.0+git.bb b/recipes/obsolete/mtd/mtd-utils_1.2.0+git.bb similarity index 100% rename from recipes/mtd/mtd-utils_1.2.0+git.bb rename to recipes/obsolete/mtd/mtd-utils_1.2.0+git.bb diff --git a/recipes/mtd/mtd-utils_1.3.1.bb b/recipes/obsolete/mtd/mtd-utils_1.3.1.bb similarity index 100% rename from recipes/mtd/mtd-utils_1.3.1.bb rename to recipes/obsolete/mtd/mtd-utils_1.3.1.bb diff --git a/recipes/opencv/opencv_2.2.bb b/recipes/opencv/opencv_2.2.bb index 3df13df2ad..cc005308d1 100644 --- a/recipes/opencv/opencv_2.2.bb +++ b/recipes/opencv/opencv_2.2.bb @@ -16,7 +16,7 @@ PARALLEL_MAKE = "" SRCREV = "4462" PV = "2.2.0+svnr${SRCPV}" -PR = "r1" +PR = "r3" S = "${WORKDIR}/opencv" @@ -38,6 +38,17 @@ python populate_packages_prepend () { do_split_packages(d, cv_libdir, '^lib(.*)\.la$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev') do_split_packages(d, cv_libdir, '^lib(.*)\.a$', 'lib%s-dev', 'OpenCV %s development package', extra_depends='${PN}-dev') do_split_packages(d, cv_libdir, '^lib(.*)\.so\.*', 'lib%s', 'OpenCV %s library', extra_depends='', allow_links=True) + + pn = bb.data.getVar('PN', d, 1) + metapkg = pn + '-dev' + bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d) + blacklist = [ metapkg ] + metapkg_rdepends = [ ] + packages = bb.data.getVar('PACKAGES', d, 1).split() + for pkg in packages[1:]: + if not pkg in blacklist and not pkg in metapkg_rdepends and pkg.endswith('-dev'): + metapkg_rdepends.append(pkg) + bb.data.setVar('RRECOMMENDS_' + metapkg, ' '.join(metapkg_rdepends), d) } FILES_${PN} = "" diff --git a/recipes/openjade/openjade-1.3.2/user-declared-default-constructor.patch b/recipes/openjade/openjade-1.3.2/user-declared-default-constructor.patch new file mode 100644 index 0000000000..073af46fc5 --- /dev/null +++ b/recipes/openjade/openjade-1.3.2/user-declared-default-constructor.patch @@ -0,0 +1,92 @@ +In GCC 4.6 the compiler no longer allows objects of const-qualified type to +be default initialized unless the type has a user-declared default +constructor. + +Patch from Gentoo bugzilla: http://bugs.gentoo.org/show_bug.cgi?id=358021 + +Gentoo Bugzilla description follows: +"If a class or struct has no user-defined default constructor, C++ doesn't +allow you to default construct a const instance of it. + +https://bugs.gentoo.org/358021 +http://clang.llvm.org/compatibility.html#default_init_const +http://gcc.gnu.org/PR44499" + +Upstream-Status: Pending + +Signed-off-by: Scott Garman + +--- a/jade/TeXFOTBuilder.cxx ++++ b/jade/TeXFOTBuilder.cxx +@@ -88,6 +88,8 @@ public: + value.convertString(nic_.placement); + } + ExtensionFlowObj *copy() const { return new PageFloatFlowObj(*this); } ++ public: ++ PageFloatFlowObj() {} + private: + PageFloatNIC nic_; + StringC name_; +@@ -101,6 +103,8 @@ public: + fotb.endPageFootnote(); + } + ExtensionFlowObj *copy() const { return new PageFootnoteFlowObj(*this); } ++ public: ++ PageFootnoteFlowObj() {} + private: + }; + ////////////////////////////////////////////////////////////////////// +--- a/jade/TransformFOTBuilder.cxx ++++ b/jade/TransformFOTBuilder.cxx +@@ -41,6 +41,7 @@ public: + }; + class EntityRefFlowObj : public TransformExtensionFlowObj { + public: ++ EntityRefFlowObj() {} + void atomic(TransformFOTBuilder &fotb, const NodePtr &) const { + fotb.entityRef(name_); + } +@@ -56,6 +57,7 @@ public: + }; + class ProcessingInstructionFlowObj : public TransformExtensionFlowObj { + public: ++ ProcessingInstructionFlowObj() {} + void atomic(TransformFOTBuilder &fotb, const NodePtr &) const { + fotb.processingInstruction(data_); + } +@@ -98,6 +100,8 @@ public: + } + } + ExtensionFlowObj *copy() const { return new EmptyElementFlowObj(*this); } ++ public: ++ EmptyElementFlowObj() {} + private: + ElementNIC nic_; + }; +@@ -133,6 +137,8 @@ public: + } + } + ExtensionFlowObj *copy() const { return new ElementFlowObj(*this); } ++ public: ++ ElementFlowObj() {} + private: + ElementNIC nic_; + }; +@@ -150,6 +156,8 @@ public: + value.convertString(systemId_); + } + ExtensionFlowObj *copy() const { return new EntityFlowObj(*this); } ++ public: ++ EntityFlowObj() {} + private: + StringC systemId_; + }; +@@ -174,6 +182,8 @@ public: + } + } + ExtensionFlowObj *copy() const { return new DocumentTypeFlowObj(*this); } ++ public: ++ DocumentTypeFlowObj() {} + private: + DocumentTypeNIC nic_; + }; diff --git a/recipes/openjade/openjade_1.3.2.bb b/recipes/openjade/openjade_1.3.2.bb index afd333a8f9..3a653b9ccb 100644 --- a/recipes/openjade/openjade_1.3.2.bb +++ b/recipes/openjade/openjade_1.3.2.bb @@ -5,11 +5,12 @@ DESCRIPTION = "OpenJade is a suite of tools for validating, \ processing, and applying DSSSL (Document Style Semantics and \ Specification Language) stylesheets to SGML and XML documents." LICENSE = "BSD" -PR = "r5" +PR = "r6" SRC_URI = "${SOURCEFORGE_MIRROR}/openjade/openjade-${PV}.tar.gz \ file://configure.patch \ file://autoconf.patch \ file://makefile.patch \ + file://user-declared-default-constructor.patch \ " SRC_URI_append_virtclass-native = " file://oj-native-libosp-fix.patch" diff --git a/recipes/openjdk/openjdk-6-6b18-1.8/icedtea-crosscompile-fix.patch b/recipes/openjdk/openjdk-6-6b18-1.8/icedtea-crosscompile-fix.patch index ec0f259e8c..652f7ac180 100644 --- a/recipes/openjdk/openjdk-6-6b18-1.8/icedtea-crosscompile-fix.patch +++ b/recipes/openjdk/openjdk-6-6b18-1.8/icedtea-crosscompile-fix.patch @@ -73,17 +73,6 @@ Index: openjdk/jdk/make/sun/xawt/Makefile endif ifeq ($(PLATFORM), solaris) -@@ -237,7 +238,9 @@ - $(BOOT_JAVA_CMD) -cp $(WRAPPER_GENERATOR_TEMPDIR) WrapperGenerator \ - $(SIZER_DIR) $(XLIBTYPES) "sizer" $(subst .,,$(suffix $(basename $@))) - --$(SIZES): $(SIZERS) -+#$(SIZES): $(SIZERS) -+# Prevent binaries being created. Instead take what is available. -+$(SIZES): - @if [ "$(DOHACK)$@" = "true$(PREDEFINED_SIZES)" ]; then \ - $(ECHO) COPYING $(PREDEFINED_SIZES_TMPL) into $@; \ - $(CP) $(PREDEFINED_SIZES_TMPL) $@; \ Index: openjdk/hotspot/make/linux/makefiles/vm.make =================================================================== --- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2009-01-24 17:54:57.000000000 +0100 @@ -212,3 +201,16 @@ Index: openjdk/hotspot/make/linux/makefiles/launcher.make LIBS_LAUNCHER += -l$(JVM) $(LIBS) -lstdc++ endif +Index: icedtea6-1.8.5/build/openjdk/jdk/make/sun/xawt/Makefile +=================================================================== +--- openjdk/jdk/make/sun/xawt/Makefile 2011-03-14 14:17:03.926207269 +0100 ++++ openjdk/jdk/make/sun/xawt/Makefile 2011-03-14 14:30:11.956186631 +0100 +@@ -245,7 +245,7 @@ + $(CHMOD) +w $@;\ + else \ + $(ECHO) GENERATING $@; \ +- $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \ ++ $(QEMU) $(WRAPPER_GENERATOR_DIR)/sizer$(suffix $@) > $@; \ + fi + @if [ "$(DOCOMPARE)$(suffix $@)" = "true.64" ]; then \ + $(ECHO) COMPARING $@ and $(STORED_SIZES_TMPL_$(PLATFORM)_$(LIBARCH)); \ diff --git a/recipes/openjdk/openjdk-6-common.inc b/recipes/openjdk/openjdk-6-common.inc index f04800b0b4..59a7a56ee3 100644 --- a/recipes/openjdk/openjdk-6-common.inc +++ b/recipes/openjdk/openjdk-6-common.inc @@ -10,7 +10,7 @@ ICEDTEA = "NEEDS TO BE SET" S = "${WORKDIR}/${ICEDTEA}" B = "${S}/build" -INC_PR = "r10" +INC_PR = "r12" SRC_URI = "\ ${ICEDTEA_URI} \ @@ -208,6 +208,13 @@ do_configure_prepend() { do_configure_append() { oe_runmake patch-ecj + + for F in ${WORKDIR}/openjdk-src-dir/hotspot/make/linux/Makefile ${WORKDIR}/icedtea6-1.8.5/build/openjdk-ecj/hotspot/make/linux/Makefile ${WORKDIR}/icedtea6-1.8.5/build/openjdk/hotspot/make/linux/Makefile ; + do + sed -i \ + -e"s|SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 2.7%|SUPPORTED_OS_VERSION = 2.4% 2.5% 2.6% 3%|" \ + $F + done } # Work around broken variable quoting in oe-stable 2009 and provide the variable @@ -288,12 +295,6 @@ addtask compilestepone after do_configure before do_compilesteptwo do_compilesteptwo() { echo "2/3 Building bootstrap JDK" - # Take pre-generated binaries from -native build - install -d generated/sun/awt/X11/generator - ln -sf ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/generated/sizer.32 generated/sun/awt/X11/generator/sizer.32 - install -d openjdk/${BUILD_DIR}/gensrc/sun/awt/X11/generator - ln -sf ${STAGING_LIBDIR_JVM_NATIVE}/icedtea6-native/generated/sizer.32 openjdk/${BUILD_DIR}/gensrc/sun/awt/X11/generator/sizer.32 - # Now cross-compile bootstrap JDK rm stamps/icedtea-against-ecj.stamp stamps/icedtea-ecj.stamp || true oe_runmake icedtea-against-ecj diff --git a/recipes/openjdk/openjdk-6-release-6b18.inc b/recipes/openjdk/openjdk-6-release-6b18.inc index 97a0a2777d..58d0be336c 100644 --- a/recipes/openjdk/openjdk-6-release-6b18.inc +++ b/recipes/openjdk/openjdk-6-release-6b18.inc @@ -29,7 +29,7 @@ JAF_URI = "http://icedtea.classpath.org/download/source/drops/jdk6-jaf-2009_10_2 SRC_URI[jaf.md5sum] = "7a50bb540a27cdd0001885630088b758" SRC_URI[jaf.sha256sum] = "fdc51476fc6bcc69ea1f099f33e84601a126bfa8b11c8fa11c25dc574345aa9f" -JAXP_URI = "https://jaxp.dev.java.net/files/nidaba/documents/913/147329/jdk6-jaxp-2009_10_13.zip;name=jaxp" +JAXP_URI = "https://icedtea.classpath.org/download/source/drops/jdk6-jaxp-2009_10_13.zip;name=jaxp" SRC_URI[jaxp.md5sum] = "a2f7b972124cd776ff71e7754eb9a429" SRC_URI[jaxp.sha256sum] = "8714d55de18db48ca9da0ee986202005082f44cf4c215da8683342b70e61792b" diff --git a/recipes/openmoko-3rdparty/emtooth2_svn.bb b/recipes/openmoko-3rdparty/emtooth2_svn.bb index 79a5bfd595..6be2dbb7e2 100644 --- a/recipes/openmoko-3rdparty/emtooth2_svn.bb +++ b/recipes/openmoko-3rdparty/emtooth2_svn.bb @@ -6,7 +6,7 @@ LICENSE = "GPLv2" DEPENDS = "glib-2.0 libeflvala" RDEPENDS_${PN} = "bluez4 obexd" -SRCREV = "127" +SRCREV = "129" PV = "0.1+svnr${SRCPV}" PR = "r0" diff --git a/recipes/openssh/openssh.inc b/recipes/openssh/openssh.inc index 1764ddf302..4555d34c79 100644 --- a/recipes/openssh/openssh.inc +++ b/recipes/openssh/openssh.inc @@ -69,8 +69,8 @@ FILES_${PN}-ssh = "${bindir}/ssh.${PN} ${sysconfdir}/ssh/ssh_config" FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd" FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config" FILES_${PN}-sftp = "${bindir}/sftp" -FILES_${PN}-sftp-server = "${libdir}exec/sftp-server" -FILES_${PN}-misc = "${bindir}/ssh* ${libdir}exec/ssh*" +FILES_${PN}-sftp-server = "${libexecdir}/sftp-server" +FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" FILES_${PN}-keygen = "${bindir}/ssh-keygen" RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" diff --git a/recipes/openssl/openssl-native_1.0.0d.bb b/recipes/openssl/openssl-native_1.0.0d.bb index bbee5f98a6..7dc55181a9 100644 --- a/recipes/openssl/openssl-native_1.0.0d.bb +++ b/recipes/openssl/openssl-native_1.0.0d.bb @@ -17,7 +17,7 @@ export BUILD_OPTIMIZATION = " " SRC_URI += "file://configure-targets.patch \ file://shared-libs.patch \ file://debian.patch \ - file://libdeps-first.patch \ +# file://libdeps-first.patch \ " PARALLEL_MAKE = "" diff --git a/recipes/opie-sh/files/opie-sh-fsmounter-name.patch b/recipes/opie-sh/files/opie-sh-fsmounter-name.patch index ccdea20f23..c5f1e10c42 100644 --- a/recipes/opie-sh/files/opie-sh-fsmounter-name.patch +++ b/recipes/opie-sh/files/opie-sh-fsmounter-name.patch @@ -1,5 +1,5 @@ ---- ../../apps/Opie-SH/filesystem_mounter.desktop 7 Mar 2004 12:33:12 -0000 1.8 -+++ ../../apps/Opie-SH/filesystem_mounter.desktop 21 Sep 2008 13:14:03 -0000 +--- apps/Opie-SH/filesystem_mounter.desktop 7 Mar 2004 12:33:12 -0000 1.8 ++++ apps/Opie-SH/filesystem_mounter.desktop 21 Sep 2008 13:14:03 -0000 @@ -2,7 +2,7 @@ Exec=filesystem_mounter.sh Icon=opie-sh-scripts/fsmounter diff --git a/recipes/opie-sh/opie-sh_1.2.4.bb b/recipes/opie-sh/opie-sh_1.2.4.bb index a07919e209..a656513d45 100644 --- a/recipes/opie-sh/opie-sh_1.2.4.bb +++ b/recipes/opie-sh/opie-sh_1.2.4.bb @@ -1,6 +1,6 @@ require ${PN}.inc -PR = "r1" +PR = "r2" SRC_URI = "http://sources.openembedded.org/opie-1.2.4-split_noncore_tools_opie-sh.tar.bz2;name=split_noncore_tools_opie-sh \ http://sources.openembedded.org/opie-1.2.4-split_pics.tar.bz2;name=split_pics \ @@ -9,7 +9,7 @@ SRC_URI = "http://sources.openembedded.org/opie-1.2.4-split_noncore_tools_opie-s http://sources.openembedded.org/opie-1.2.4-split_apps.tar.bz2;name=split_apps \ http://sources.openembedded.org/opie-1.2.4-split_bin.tar.bz2;name=split_bin \ file://opie-sh-path.patch \ - file://opie-sh-fsmounter-name.patch" + file://opie-sh-fsmounter-name.patch;patchdir=${WORKDIR}/apps" SRC_URI[split_noncore_tools_opie-sh.md5sum] = "bc57f7ab07181c122ebc382e302bb594" SRC_URI[split_noncore_tools_opie-sh.sha256sum] = "a1305994918160449177b24efe384a0de87dc9dfcecf476e33b87cf8999b5bb1" SRC_URI[split_pics.md5sum] = "5499dc84b65395ab99bda6ed9d01ff0f" diff --git a/recipes/opkg/files/configure b/recipes/opkg/files/configure index d5dd74dbf3..633d8d3371 100644 --- a/recipes/opkg/files/configure +++ b/recipes/opkg/files/configure @@ -22,4 +22,4 @@ else fi # delete myself -rm -f /etc/rcS.d/S98configure +rm -f /etc/rcS.d/S40configure diff --git a/recipes/opkg/opkg.inc b/recipes/opkg/opkg.inc index a4878e2151..8980c1481e 100644 --- a/recipes/opkg/opkg.inc +++ b/recipes/opkg/opkg.inc @@ -2,10 +2,10 @@ DESCRIPTION = "Opkg Package Manager" DESCRIPTION_libopkg = "Opkg Package Manager Library" SECTION = "base" LICENSE = "GPLv2" -SRCREV = "599" +SRCREV = "609" PV = "0.1.8+svnr${SRCPV}" CONFLICTS = "ipkg" -INC_PR = "r4" +INC_PR = "r5" SRC_URI = "svn://opkg.googlecode.com/svn;module=trunk;proto=http \ file://configure \ @@ -17,7 +17,7 @@ inherit autotools pkgconfig do_install_prepend() { install -d ${D}${sysconfdir}/rcS.d - install -m 0755 ${WORKDIR}/configure ${D}${sysconfdir}/rcS.d/S98configure + install -m 0755 ${WORKDIR}/configure ${D}${sysconfdir}/rcS.d/S40configure } EXTRA_OECONF += " --disable-gpg \ diff --git a/recipes/opkg/opkg_svn.bb b/recipes/opkg/opkg_svn.bb index cc377b755e..f43fdb4279 100644 --- a/recipes/opkg/opkg_svn.bb +++ b/recipes/opkg/opkg_svn.bb @@ -2,8 +2,6 @@ require opkg.inc PR = "${INC_PR}" -SRC_URI_append_slugos = " file://opkg_use_vfork_gunzip.patch" - PROVIDES =+ "virtual/update-alternatives" RPROVIDES_${PN} = "update-alternatives" PACKAGES =+ "libopkg-dev libopkg" diff --git a/recipes/orc/orc_0.4.10.bb b/recipes/orc/orc_0.4.10.bb new file mode 100644 index 0000000000..e072fab04a --- /dev/null +++ b/recipes/orc/orc_0.4.10.bb @@ -0,0 +1,4 @@ +require orc.inc + +SRC_URI[orc.md5sum] = "dd4e7a1820c9db5853aa7fe31ddb5a03" +SRC_URI[orc.sha256sum] = "5001a0034edc06800b546246fbe0407ba6e9759c9583d5d93adba3557b6a777e" diff --git a/recipes/ortp/ortp_0.13.1.bb b/recipes/ortp/ortp_0.13.1.bb deleted file mode 100644 index 32e5290632..0000000000 --- a/recipes/ortp/ortp_0.13.1.bb +++ /dev/null @@ -1,5 +0,0 @@ -require ortp.inc -PR = "${INC_PR}.0" - -SRC_URI[md5sum] = "293f16da6dd434e68652f0f725b7f97c" -SRC_URI[sha256sum] = "2ba471a2a4f1d7f10fb70de5b68dbb7d32b43494efcecb88b3bd8445f630494c" diff --git a/recipes/ortp/ortp_0.16.5.bb b/recipes/ortp/ortp_0.16.5.bb new file mode 100644 index 0000000000..604b7bcc6c --- /dev/null +++ b/recipes/ortp/ortp_0.16.5.bb @@ -0,0 +1,5 @@ +require ortp.inc +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "94546901d14b85f97342f4ecf39489b1" +SRC_URI[sha256sum] = "3b655a79f9122afd298e9cd702e542908bbd6ea1337c02553110c57e0b3c5835" diff --git a/recipes/palmpre/tsmd/tsmd b/recipes/palmpre/tsmd/tsmd new file mode 100755 index 0000000000..5444d7b347 --- /dev/null +++ b/recipes/palmpre/tsmd/tsmd @@ -0,0 +1,38 @@ +#! /bin/sh +# +# tsmd -- This shell script starts and stops the tsmd daemon +# +# chkconfig: 345 10 10 +# description: a simple utility daemon which forwards all events from a independent device node to a more general uinput one +# processname: tsmd + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +NAME=tsmd + +case "$1" in + start) + echo -n "Starting tsmd: " + start-stop-daemon --start --pidfile /var/run/${NAME}.pid --make-pidfile --background -x /usr/bin/${NAME} -- -n /dev/touchscreen -f + if [ $? = 0 ]; then + echo "(ok)" + else + echo "(failed)" + fi + ;; + stop) + echo -n "Stopping tsmd: " + start-stop-daemon --stop --pidfile /var/run/${NAME}.pid --oknodo + rm -f /var/run/${NAME}.pid + echo "(done)" + ;; + restart|force-reload) + $0 stop + $0 start + ;; + *) + echo "Usage: /etc/init.d/tsmd {start|stop|restart|force-reload}" + exit 1 + ;; +esac + +exit 0 diff --git a/recipes/palmpre/tsmd/tsmd_control b/recipes/palmpre/tsmd/tsmd_control new file mode 100755 index 0000000000..a7668d4d1a --- /dev/null +++ b/recipes/palmpre/tsmd/tsmd_control @@ -0,0 +1,12 @@ +#!/bin/sh + +case "$1" in + enable) + kill -USR2 `pidof tsmd` + ;; + disable) + kill -USR1 `pidof tsmd` + ;; + *) + ;; +esac diff --git a/recipes/palmpre/tsmd_git.bb b/recipes/palmpre/tsmd_git.bb index eeac86de67..b0bb7f16d4 100644 --- a/recipes/palmpre/tsmd_git.bb +++ b/recipes/palmpre/tsmd_git.bb @@ -6,16 +6,28 @@ LICENSE = "GPL" DEPENDS = "tslib" -PR = "r1" +PR = "r4" PV = "1.0.0+gitr${SRCPV}" SRCREV = "9262a2e4f8f6e6c7bcacf1eeae0ad348cbfcce06" SRC_URI = " \ ${FREESMARTPHONE_GIT}/utilities.git;protocol=git;branch=master \ + file://tsmd \ + file://tsmd_control \ " S = "${WORKDIR}/git/palmpre/tsmd" PACKAGE_ARCH = "${MACHINE_ARCH}" -inherit autotools +inherit autotools update-rc.d + +INITSCRIPT_NAME = "tsmd" +INITSCRIPT_PARAMS = "defaults 10" + +do_install_append() { + install -d 0644 ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/${INITSCRIPT_NAME} ${D}${sysconfdir}/init.d/ + install -d 0644 ${D}${base_bindir}/ + install -m 0755 ${WORKDIR}/tsmd_control ${D}${exec_prefix}/bin/tsmd_control +} diff --git a/recipes/perl/files/ubuntu-11.04-multiarch.patch b/recipes/perl/files/ubuntu-11.04-multiarch.patch new file mode 100644 index 0000000000..f0aeed5e3b --- /dev/null +++ b/recipes/perl/files/ubuntu-11.04-multiarch.patch @@ -0,0 +1,12 @@ +diff --git perl-5.10.1/Configure-orig perl-5.10.1/Configure +index 5508fd2..8ee7dae 100755 +--- perl-5.10.1/Configure-orig ++++ perl-5.10.1/Configure +@@ -1311,6 +1311,7 @@ glibpth="/lib /usr/lib /lib64 /usr/lib64 $xlibpth" + glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib" + test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth" + test -f /shlib/libc.so && glibpth="/shlib $glibpth" ++test -f /usr/lib/`uname -m`-linux-gnu/libc.so && glibpth="/usr/lib/`uname -m`-linux-gnu $glibpth" + test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64" + + : Private path used by Configure to find libraries. Its value diff --git a/recipes/perl/perl-native_5.10.1.bb b/recipes/perl/perl-native_5.10.1.bb index 5aa0c7b123..396daeac6f 100644 --- a/recipes/perl/perl-native_5.10.1.bb +++ b/recipes/perl/perl-native_5.10.1.bb @@ -2,7 +2,7 @@ DESCRIPTION = "Perl is a popular scripting language." HOMEPAGE = "http://www.perl.org/" SECTION = "libs" LICENSE = "Artistic|GPLv1+" -PR = "r10" +PR = "r11" NATIVE_INSTALL_WORKS = "1" INHIBIT_DEFAULT_DEPS = "1" PATCHTOOL = "patch" @@ -20,6 +20,7 @@ SRC_URI = "http://ftp.funet.fi/pub/CPAN/src/perl-${PV}.tar.gz;name=perl-${PV} \ file://native-nopacklist.patch \ file://native-perlinc.patch \ file://perl-fix-cross-library-check.patch \ + file://ubuntu-11.04-multiarch.patch \ " SRC_URI[perl-5.10.1.md5sum] = "b9b2fdb957f50ada62d73f43ee75d044" @@ -29,6 +30,8 @@ S = "${WORKDIR}/perl-${PV}" inherit native +export LD="${CCLD}" + do_configure () { ./Configure \ -Dcc="${CC}" \ diff --git a/recipes/perl/perl_5.10.1.bb b/recipes/perl/perl_5.10.1.bb index a53b157359..6c0dcb16da 100644 --- a/recipes/perl/perl_5.10.1.bb +++ b/recipes/perl/perl_5.10.1.bb @@ -3,8 +3,7 @@ HOMEPAGE = "http://www.perl.org/" SECTION = "devel/perl" LICENSE = "Artistic|GPLv1+" PRIORITY = "optional" -# We need gnugrep (for -I) -DEPENDS = "virtual/db perl-native grep-native" +DEPENDS = "virtual/db perl-native" PR = "r22" # 5.10.1 has Module::Build built-in @@ -158,7 +157,7 @@ do_configure() { esac # These are strewn all over the source tree - for foo in `grep -I -m1 \/usr\/include\/.*\\.h ${WORKDIR}/* -r | cut -f 1 -d ":"` ; do + for foo in `grep -lrI -m1 \/usr\/include\/.*\\.h ${WORKDIR}/*` ; do echo Fixing: $foo sed -e "s%/usr/include/%${STAGING_INCDIR}/%g" -i $foo done diff --git a/recipes/phoneme/phoneme-advanced.inc b/recipes/phoneme/phoneme-advanced.inc index 380126362d..2f1d109ee2 100644 --- a/recipes/phoneme/phoneme-advanced.inc +++ b/recipes/phoneme/phoneme-advanced.inc @@ -8,11 +8,10 @@ DEPENDS = "classpath-tools-native virtual/javac-native linux-libc-headers" inherit java update-alternatives # The PhoneME Advanced build system is documented here: http://java.sun.com/javame/reference/docs/cdc_build_system.pdf -# NOTE: We need to provide an empty password. pswd='' seems not to be the correct way. SRC_URI = "\ - svn://guest:''@phoneme.dev.java.net/svn/phoneme/builds/phoneme_advanced-mr2-dev-${BUILDREV};module=cdc;proto=https;localdir=cdc \ - svn://guest:''@phoneme.dev.java.net/svn/phoneme/builds/phoneme_advanced-mr2-dev-${BUILDREV};module=tools;proto=https;localdir=tools \ - svn://guest:''@phoneme.dev.java.net/svn/phoneme;module=legal;localdir=legal;proto=https \ + svn://svn.java.net/svn/phoneme~svn/builds/phoneme_advanced-mr2-dev-${BUILDREV};module=cdc;proto=https;localdir=cdc \ + svn://svn.java.net/svn/phoneme~svn/builds/phoneme_advanced-mr2-dev-${BUILDREV};module=tools;proto=https;localdir=tools \ + svn://svn.java.net/svn/phoneme~svn;module=legal;localdir=legal;proto=https \ " PROVIDES = "virtual/java-cdc java-cdc-runtime" diff --git a/recipes/poboxserver/poboxserver/unicode.patch b/recipes/poboxserver/poboxserver/unicode.patch index 884070a3c8..df6b08f2eb 100644 --- a/recipes/poboxserver/poboxserver/unicode.patch +++ b/recipes/poboxserver/poboxserver/unicode.patch @@ -1,7 +1,7 @@ -diff --git a/../pbserver/Makefile b/../pbserver/Makefile +diff --git pbserver/Makefile pbserver/Makefile index 27847c1..d6ffff3 100755 ---- a/../pbserver/Makefile -+++ b/../pbserver/Makefile +--- pbserver/Makefile ++++ pbserver/Makefile @@ -15,7 +15,7 @@ configure: dic: staticdic learndic diff --git a/recipes/poboxserver/poboxserver_1.2.5.bb b/recipes/poboxserver/poboxserver_1.2.5.bb index ab732e4544..2a6305ef84 100644 --- a/recipes/poboxserver/poboxserver_1.2.5.bb +++ b/recipes/poboxserver/poboxserver_1.2.5.bb @@ -2,13 +2,13 @@ DESCRIPTION = "OpenPOBox is an open source implementation of a 'Predictive Opera SECTION = "inputmethods" LICENSE = "GPL" DEPENDS = "perl-native ruby-native nkf-native" -PR = "r7" +PR = "r8" SRC_URI = "${SOURCEFORGE_MIRROR}/gakusei/pobox-${PV}.tar.bz2;name=archive \ http://www.vanille.de/mirror/pbserver-${PV}.tar.gz;name=pbserver \ file://OpenPOBox-1.25.diff \ file://remove-local-includes.patch \ - file://unicode.patch \ + file://unicode.patch;patchdir=${WORKDIR}/pbserver \ file://pbserver.sh" S = "${WORKDIR}/OpenPOBox" diff --git a/recipes/powervr-drivers/libgles-omap3.inc b/recipes/powervr-drivers/libgles-omap3.inc index 4a53d44c88..36c311db8e 100644 --- a/recipes/powervr-drivers/libgles-omap3.inc +++ b/recipes/powervr-drivers/libgles-omap3.inc @@ -1,7 +1,7 @@ DESCRIPTION = "libGLES for the omap3" LICENSE = "proprietary-binary" -PR = "r11" +PR = "r15" COMPATIBLE_MACHINE = "(omap3|ti816x)" @@ -28,6 +28,8 @@ ES3LOCATION ?= "${S}/gfx_rel_es3.x" ES5LOCATION ?= "${S}/gfx_rel_es5.x" ES6LOCATION ?= "${S}/gfx_rel_es6.x" +LIBGLESWINDOWSYSTEM ?= "libpvrPVR2D_FRONTWSEGL.so.1" + do_configure() { # Attempt to fix up the worst offenders for file permissions for i in $(find ${S} -name "*.h") $(find ${S} -name "*.c") $(find ${S} -name "Make*") ; do @@ -85,7 +87,7 @@ do_compile() { for demo in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Demos/* ; do cd $demo/OGLES2/Build/LinuxGeneric oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD - rm $demo/OGLES2/Build/LinuxOMAP3/Release*/*.o + rm -f $demo/OGLES2/Build/LinuxOMAP3/Release*/*.o install -m 0755 $demo/OGLES2/Build/LinuxOMAP3/ReleaseX11/* ${S}/demos/x11 || true sed -e s:NAME:$(basename $demo): \ -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES2/Build/LinuxOMAP3/ReleaseX11/*): \ @@ -97,6 +99,8 @@ do_compile() { mkdir -p ${S}/trainingcourses/raw mkdir -p ${S}/trainingcourses/x11 + find ${S} -name "*_org" -delete + # Build OGLES2 Trainingcourses for both Raw and X11 for X11BUILD in 0 1 ; do for training in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/TrainingCourse/* ; do @@ -109,7 +113,7 @@ do_compile() { fi oe_runmake Common=1 PLATFORM=$PLATFORM X11BUILD=$X11BUILD - rm $training/OGLES2/Build/LinuxOMAP3/Release*/*.o + rm -f $training/OGLES2/Build/LinuxOMAP3/Release*/*.o install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseX11/* ${S}/trainingcourses/x11 || true install -m 0755 $training/OGLES2/Build/LinuxOMAP3/ReleaseRaw/* ${S}/trainingcourses/raw || true done @@ -143,13 +147,14 @@ do_install () { cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/v* ${D}${includedir}/ || true cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/V* ${D}${includedir}/ || true cp -pPr ${S}/include/*.h ${D}${includedir} || true + cp -pPr ${S}/include/wsegl/*.h ${D}${includedir} || true install -d ${D}${sysconfdir}/init.d/ cp -pP ${WORKDIR}/rc.pvr ${D}${sysconfdir}/init.d/pvr-init install -d ${D}${sysconfdir} echo "[default]" > ${D}${sysconfdir}/powervr.ini - echo "WindowSystem=libpvrPVR2D_FRONTWSEGL.so.1" >> ${D}${sysconfdir}/powervr.ini + echo "WindowSystem=${LIBGLESWINDOWSYSTEM}" >> ${D}${sysconfdir}/powervr.ini # The ES2.x, ES3.x, ES5.x and ES6.x CPUs have different SGX hardware, so we need to install multiple sets of userspace diff --git a/recipes/powervr-drivers/libgles-omap3/rc.pvr b/recipes/powervr-drivers/libgles-omap3/rc.pvr index 395d085d12..d32f9e4c9b 100755 --- a/recipes/powervr-drivers/libgles-omap3/rc.pvr +++ b/recipes/powervr-drivers/libgles-omap3/rc.pvr @@ -30,8 +30,7 @@ fi # Try to enable triple buffering when there's enough VRAM fbset -vyres $(expr $YRES \* 3) -case $CPUTYPE in -"OMAP3530") +sgxprepare () { echo Starting PVR insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") modprobe omaplfb @@ -50,13 +49,9 @@ case $CPUTYPE in touch /etc/powervr-esrev SAVED_ESREVISION="$(cat /etc/powervr-esrev)" +} - devmem2 0x48004B48 w 0x2 > /dev/null - devmem2 0x48004B10 w 0x1 > /dev/null - devmem2 0x48004B00 w 0x2 > /dev/null - - ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x00010205:5: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" - +sgxfinish () { if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then echo -n "Starting SGX fixup for" echo " ES${ES_REVISION}.x" @@ -65,44 +60,34 @@ case $CPUTYPE in echo "${ES_REVISION}" > /etc/powervr-esrev fi /usr/bin/pvrsrvinit - ;; -"TI816x") - echo Starting PVR - insmod $(busybox find /lib/modules/$(uname -r) -name "pvrsrvkm.ko") - modprobe omaplfb - modprobe bufferclass_ti - - pvr_maj=`grep "pvrsrvkm$" /proc/devices | cut -b1,2,3` - bc_maj=`grep "bc" /proc/devices | cut -b1,2,3` +} - if [ -e /dev/pvrsrvkm ] ; then - rm -f /dev/pvrsrvkm - fi - - mknod /dev/pvrsrvkm c $pvr_maj 0 - chmod 666 /dev/pvrsrvkm +case $CPUTYPE in +"OMAP3530") + sgxprepare - touch /etc/powervr-esrev + devmem2 0x48004B48 w 0x2 > /dev/null + devmem2 0x48004B10 w 0x1 > /dev/null + devmem2 0x48004B00 w 0x2 > /dev/null - SAVED_ESREVISION="$(cat /etc/powervr-esrev)" + ES_REVISION="$(devmem2 0x50000014 | sed -e s:0x00010205:5: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" - devmem2 0x48180F04 w 0x0 - devmem2 0x48180900 w 0x2 - devmem2 0x48180920 w 0x2 + sgxfinish + ;; +"TI816x") + sgxprepare - ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:5: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" + devmem2 0x48180F04 w 0x0 > /dev/null + devmem2 0x48180900 w 0x2 > /dev/null + devmem2 0x48180920 w 0x2 > /dev/null - if [ "${ES_REVISION}" != "${SAVED_ESREVISION}" ] ; then - echo -n "Starting SGX fixup for" - echo " ES${ES_REVISION}.x" - cp -a /usr/lib/ES${ES_REVISION}.0/* /usr/lib - cp -a /usr/bin/ES${ES_REVISION}.0/* /usr/bin - echo "${ES_REVISION}" > /etc/powervr-esrev - fi - /usr/bin/pvrsrvinit + ES_REVISION="$(devmem2 0x56000014 | sed -e s:0x00010205:6: -e s:0x00010201:3: -e s:0x00010003:2: | tail -n1 | awk -F': ' '{print $2}')" + sgxfinish ;; *) echo No SGX hardware, not starting PVR ;; esac + + diff --git a/recipes/powervr-drivers/libgles-omap3_4.03.00.01.bb b/recipes/powervr-drivers/libgles-omap3_4.03.00.02.bb similarity index 73% rename from recipes/powervr-drivers/libgles-omap3_4.03.00.01.bb rename to recipes/powervr-drivers/libgles-omap3_4.03.00.02.bb index 4b3a3fcffe..f605ec0f37 100644 --- a/recipes/powervr-drivers/libgles-omap3_4.03.00.01.bb +++ b/recipes/powervr-drivers/libgles-omap3_4.03.00.02.bb @@ -1,11 +1,10 @@ -# untested and huge change from 1.4.x -DEFAULT_PREFERENCE = "-1" - -BINLOCATION = "${S}/gfx_rel_es3.x" +BINLOCATION_omap3 = "${S}/gfx_rel_es3.x" +BINLOCATION_ti816x = "${S}/gfx_rel_es6.x" ES2LOCATION = "${S}/gfx_rel_es2.x" ES3LOCATION = "${S}/gfx_rel_es3.x" ES5LOCATION = "${S}/gfx_rel_es5.x" +ES6LOCATION = "${S}/gfx_rel_es6.x" require libgles-omap3.inc @@ -13,7 +12,7 @@ require libgles-omap3.inc # http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/latest/index_FDS.html # see libgles-omap3.inc for detailed installation instructions -SGXPV = "4_03_00_01" +SGXPV = "4_03_00_02" IMGPV = "1.6.16.3977" BINFILE := "Graphics_SDK_setuplinux_${SGXPV}.bin" @@ -24,8 +23,8 @@ SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gf file://99-bufferclass.rules \ " -SRC_URI[md5sum] = "4163ee51bc05689b6f61e7eadf5ab9cf" -SRC_URI[sha256sum] = "1afe0dc4974c3c0a0ccf267a531d0964459d1cdf1929e732958230641973da94" +SRC_URI[md5sum] = "ff8c1f2b8e4cb42f4ced6a613b081ada" +SRC_URI[sha256sum] = "cdb0bd3964e107733d632aa8224e0537b05c1ffac34befc036423458c8d75255" S = "${WORKDIR}/Graphics_SDK_${SGXPV}" diff --git a/recipes/powervr-drivers/omap3-sgx-modules/Compile-fixes-for-38-kernel.patch b/recipes/powervr-drivers/omap3-sgx-modules/Compile-fixes-for-38-kernel.patch new file mode 100644 index 0000000000..fc315bcec2 --- /dev/null +++ b/recipes/powervr-drivers/omap3-sgx-modules/Compile-fixes-for-38-kernel.patch @@ -0,0 +1,346 @@ +--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c-orig 2011-03-08 04:27:35.000000000 -0800 ++++ GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_displayclass.c 2011-03-17 13:11:31.000000000 -0700 +@@ -235,9 +235,20 @@ static OMAP_ERROR UnblankDisplay(OMAPLFB + { + int res; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_lock(); ++#else + acquire_console_sem(); ++#endif ++ + res = fb_blank(psDevInfo->psLINFBInfo, 0); ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_unlock(); ++#else + release_console_sem(); ++#endif ++ + #if !defined (CONFIG_OMAP2_DSS) + if (res != 0 && res != -EINVAL) + { +@@ -1118,7 +1129,11 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINF + OMAP_ERROR eError = OMAP_ERROR_GENERIC; + unsigned long FBSize; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_lock(); ++#else + acquire_console_sem(); ++#endif + + if (fb_idx < 0 || fb_idx >= num_registered_fb) + { +@@ -1254,7 +1269,11 @@ static OMAP_ERROR InitDev(OMAPLFB_DEVINF + errModPut: + module_put(psLINFBOwner); + errRelSem: ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_unlock(); ++#else + release_console_sem(); ++#endif + return eError; + } + +@@ -1263,7 +1282,11 @@ static void DeInitDev(OMAPLFB_DEVINFO *p + struct fb_info *psLINFBInfo = psDevInfo->psLINFBInfo; + struct module *psLINFBOwner; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_lock(); ++#else + acquire_console_sem(); ++#endif + + psLINFBOwner = psLINFBInfo->fbops->owner; + +@@ -1274,7 +1297,11 @@ static void DeInitDev(OMAPLFB_DEVINFO *p + + module_put(psLINFBOwner); + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) ++ console_unlock(); ++#else + release_console_sem(); ++#endif + } + + OMAP_ERROR OMAPLFBInit(void) +--- GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c-orig 2011-03-08 04:27:35.000000000 -0800 ++++ GFX_Linux_KM/services4/3rdparty/dc_omap3430_linux/omaplfb_linux.c 2011-03-17 13:40:15.000000000 -0700 +@@ -24,11 +24,14 @@ + * + ******************************************************************************/ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + +-#include + #include + + #include +--- GFX_Linux_KM/services4/srvkm/common/resman.c-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/common/resman.c 2011-03-17 14:20:07.000000000 -0700 +@@ -24,15 +24,17 @@ + * + ******************************************************************************/ + ++#include + #include "services_headers.h" + #include "resman.h" + + #ifdef __linux__ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + +-#include + #include + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9) + #include +--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c 2011-03-17 14:33:09.000000000 -0700 +@@ -24,9 +24,13 @@ + * + ******************************************************************************/ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + + #include + #include +--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_uaccess.h-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_uaccess.h 2011-03-17 14:39:14.000000000 -0700 +@@ -27,11 +27,14 @@ + #ifndef __PVR_UACCESS_H__ + #define __PVR_UACCESS_H__ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + +-#include + #include + + static inline unsigned long pvr_copy_to_user(void __user *pvTo, const void *pvFrom, unsigned long ulBytes) +--- GFX_Linux_KM/services4/srvkm/env/linux/mm.c-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/mm.c 2011-03-17 14:46:23.000000000 -0700 +@@ -24,11 +24,14 @@ + * + ******************************************************************************/ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + +-#include + #include + #include + #include +--- GFX_Linux_KM/services4/srvkm/env/linux/mutils.h-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/mutils.h 2011-03-17 14:54:37.000000000 -0700 +@@ -27,11 +27,13 @@ + #ifndef __IMG_LINUX_MUTILS_H__ + #define __IMG_LINUX_MUTILS_H__ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif +- +-#include ++#endif + + #if !(defined(__i386__) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26))) + #if defined(SUPPORT_LINUX_X86_PAT) +--- GFX_Linux_KM/services4/srvkm/env/linux/mm.h-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/mm.h 2011-03-17 15:33:56.000000000 -0700 +@@ -27,11 +27,14 @@ + #ifndef __IMG_LINUX_MM_H__ + #define __IMG_LINUX_MM_H__ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + +-#include + #include + #include + #include +--- GFX_Linux_KM/services4/srvkm/env/linux/mmap.c-orig 2011-03-17 20:39:31.000000000 -0700 ++++ GFX_Linux_KM/services4/srvkm/env/linux/mmap.c 2011-03-17 20:40:00.000000000 -0700 +@@ -24,11 +24,14 @@ + * + ******************************************************************************/ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + +-#include + #include + #include + #include +--- GFX_Linux_KM/services4/srvkm/env/linux/proc.c-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/proc.c 2011-03-17 21:01:35.000000000 -0700 +@@ -24,13 +24,16 @@ + * + ******************************************************************************/ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + + #include + #include +-#include + #include + #include + #include +--- GFX_Linux_KM/services4/srvkm/env/linux/module.c-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/module.c 2011-03-17 21:32:19.000000000 -0700 +@@ -24,9 +24,13 @@ + * + ******************************************************************************/ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + + #if !defined(SUPPORT_DRI_DRM) + +@@ -44,7 +48,6 @@ + #include + #include + #include +-#include + #include + #include + +--- GFX_Linux_KM/services4/srvkm/env/linux/event.c-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/event.c 2011-03-18 08:51:42.000000000 -0700 +@@ -24,11 +24,14 @@ + * + ******************************************************************************/ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + +-#include + #include + #include + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)) +--- GFX_Linux_KM/services4/srvkm/env/linux/osfunc.c-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/osfunc.c 2011-03-18 08:58:16.000000000 -0700 +@@ -24,11 +24,14 @@ + * + ******************************************************************************/ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + +-#include + #include + #include + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)) +--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_drm.c-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_drm.c 2011-03-18 09:01:06.000000000 -0700 +@@ -26,14 +26,17 @@ + + #if defined(SUPPORT_DRI_DRM) + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif ++#endif + + #include + #include + #include +-#include + #include + #include + #include +--- GFX_Linux_KM/services4/srvkm/env/linux/mutils.c-orig 2011-03-08 04:27:36.000000000 -0800 ++++ GFX_Linux_KM/services4/srvkm/env/linux/mutils.c 2011-03-18 09:08:12.000000000 -0700 +@@ -24,10 +24,13 @@ + * + ******************************************************************************/ + ++#include ++ ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38) + #ifndef AUTOCONF_INCLUDED + #include + #endif +-#include ++#endif + + #include + #include +--- GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c-orig 2011-03-31 13:46:48.000000000 -0700 ++++ GFX_Linux_KM/services4/srvkm/env/linux/pvr_debug.c 2011-03-31 15:14:10.000000000 -0700 +@@ -76,7 +76,8 @@ static IMG_CHAR gszBufferIRQ[PVR_MAX_MSG + static PVRSRV_LINUX_MUTEX gsDebugMutexNonIRQ; + + +-static spinlock_t gsDebugLockIRQ = SPIN_LOCK_UNLOCKED; ++static DEFINE_SPINLOCK(gsDebugLockIRQ); ++ + + #if !defined (USE_SPIN_LOCK) + #define USE_SPIN_LOCK (in_interrupt() || !preemptible()) diff --git a/recipes/powervr-drivers/omap3-sgx-modules_1.6.16.3977.bb b/recipes/powervr-drivers/omap3-sgx-modules_1.6.16.3977.bb index 5dd80fd7f8..216b3ae08d 100644 --- a/recipes/powervr-drivers/omap3-sgx-modules_1.6.16.3977.bb +++ b/recipes/powervr-drivers/omap3-sgx-modules_1.6.16.3977.bb @@ -1,6 +1,3 @@ -# untested and huge change from 1.4.x -DEFAULT_PREFERENCE = "-1" - DESCRIPTION = "Kernel drivers for the PowerVR SGX chipset found in the omap3 SoCs" LICENSE = "GPLv2" @@ -11,18 +8,19 @@ LICENSE = "GPLv2" TI_BIN_UNPK_CMDS="Y: qY:workdir:Y" require ../ti/ti-eula-unpack.inc -SGXPV = "4_03_00_01" +SGXPV = "4_03_00_02" IMGPV = "1.6.16.3977" BINFILE := "Graphics_SDK_setuplinux_${SGXPV}.bin" inherit module -MACHINE_KERNEL_PR_append = "h" +MACHINE_KERNEL_PR_append = "i" SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/Graphics_SDK_setuplinux_${SGXPV}.bin \ -" -SRC_URI[md5sum] = "4163ee51bc05689b6f61e7eadf5ab9cf" -SRC_URI[sha256sum] = "1afe0dc4974c3c0a0ccf267a531d0964459d1cdf1929e732958230641973da94" + file://Compile-fixes-for-38-kernel.patch \ + " +SRC_URI[md5sum] = "ff8c1f2b8e4cb42f4ced6a613b081ada" +SRC_URI[sha256sum] = "cdb0bd3964e107733d632aa8224e0537b05c1ffac34befc036423458c8d75255" S = "${WORKDIR}/Graphics_SDK_${SGXPV}/GFX_Linux_KM" @@ -31,10 +29,10 @@ PVRBUILD = "release" PACKAGE_STRIP = "no" TI_PLATFORM_omap3 = "omap3630" -TI_PLATFORM_ti816x = "ti8168" +TI_PLATFORM_ti816x = "ti81xx" MODULESLOCATION_omap3 = "dc_omap3430_linux" -MODULESLOCATION_ti816x = "dc_ti8168_linux" +MODULESLOCATION_ti816x = "dc_ti81xx_linux" MAKE_TARGETS = " BUILD=${PVRBUILD} TI_PLATFORM=${TI_PLATFORM}" diff --git a/recipes/ppp/ppp_2.4.5.bb b/recipes/ppp/ppp_2.4.5.bb index 2b6b6f7a7a..ce6076caa1 100644 --- a/recipes/ppp/ppp_2.4.5.bb +++ b/recipes/ppp/ppp_2.4.5.bb @@ -3,9 +3,7 @@ DESCRIPTION = "Point-to-Point Protocol (PPP) daemon" HOMEPAGE = "http://samba.org/ppp/" DEPENDS = "libpcap" LICENSE = "BSD GPLv2" -PR = "r1" -# Not well tested -DEFAULT_PREFERENCE = "-1" +PR = "r2" PARALLEL_MAKE = "" @@ -49,10 +47,11 @@ do_install_append () { } CONFFILES_${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options" -PACKAGES =+ "ppp-oa ppp-oe ppp-radius ppp-winbind ppp-minconn ppp-password ppp-tools" +PACKAGES =+ "ppp-l2tp ppp-oa ppp-oe ppp-radius ppp-winbind ppp-minconn ppp-password ppp-tools" FILES_${PN} = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd" FILES_${PN}_nylon = "${sysconfdir} ${bindir} ${sbindir}/chat ${sbindir}/pppd ${sbindir}/tdbread" FILES_${PN}-dbg += "${libdir}/pppd/${PV}/.debug" +FILES_${PN}-l2tp = "${libdir}/pppd/${PV}/pppol2tp.so ${libdir}/pppd/${PV}/openl2tp.so" FILES_${PN}-oa = "${libdir}/pppd/${PV}/pppoatm.so" FILES_${PN}-oe = "${sbindir}/pppoe-discovery ${libdir}/pppd/${PV}/rp-pppoe.so" FILES_${PN}-radius = "${libdir}/pppd/${PV}/radius.so ${libdir}/pppd/${PV}/radattr.so ${libdir}/pppd/${PV}/radrealms.so" @@ -60,6 +59,7 @@ FILES_${PN}-winbind = "${libdir}/pppd/${PV}/winbind.so" FILES_${PN}-minconn = "${libdir}/pppd/${PV}/minconn.so" FILES_${PN}-password = "${libdir}/pppd/${PV}/pass*.so" FILES_${PN}-tools = "${sbindir}/pppstats ${sbindir}/pppdump" +DESCRIPTION_ppp-l2tp = "Plugin for PPP needed for PPP-over-L2TP" DESCRIPTION_ppp-oa = "Plugin for PPP needed for PPP-over-ATM" DESCRIPTION_ppp-oe = "Plugin for PPP needed for PPP-over-Ethernet" DESCRIPTION_ppp-radius = "Plugin for PPP that are related to RADIUS" diff --git a/recipes/pulseaudio/libcanberra_0.12.bb b/recipes/pulseaudio/libcanberra_0.12.bb index 017d3a7285..94b767986c 100644 --- a/recipes/pulseaudio/libcanberra_0.12.bb +++ b/recipes/pulseaudio/libcanberra_0.12.bb @@ -1,8 +1,8 @@ DESCRIPTION = "Libcanberra is an implementation of the XDG Sound Theme and Name Specifications, for generating event sounds on free desktops." LICENSE = "LGPL" -DEPENDS = "gtk+ pulseaudio alsa-lib gstreamer" +DEPENDS = "gtk+ pulseaudio alsa-lib gstreamer gconf" -PR = "r2" +PR = "r3" inherit gnome diff --git a/recipes/pulseaudio/libcanberra_0.14.bb b/recipes/pulseaudio/libcanberra_0.14.bb index 445d3425fd..892e305383 100644 --- a/recipes/pulseaudio/libcanberra_0.14.bb +++ b/recipes/pulseaudio/libcanberra_0.14.bb @@ -1,11 +1,11 @@ DESCRIPTION = "Libcanberra is an implementation of the XDG Sound Theme and Name \ Specifications, for generating event sounds on free desktops." LICENSE = "LGPL" -DEPENDS = "alsa-lib gstreamer gtk+ libvorbis pulseaudio" +DEPENDS = "alsa-lib gstreamer gtk+ libvorbis pulseaudio gconf" SECTION = "libs/multimedia" AUTHOR = "Lennart Poettering" HOMEPAGE = "http://0pointer.de/lennart/projects/libcanberra" -PR = "r2" +PR = "r3" inherit autotools diff --git a/recipes/pulseaudio/libcanberra_0.17.bb b/recipes/pulseaudio/libcanberra_0.17.bb index 52414bffc5..0b735fc525 100644 --- a/recipes/pulseaudio/libcanberra_0.17.bb +++ b/recipes/pulseaudio/libcanberra_0.17.bb @@ -1,11 +1,11 @@ DESCRIPTION = "Libcanberra is an implementation of the XDG Sound Theme and Name \ Specifications, for generating event sounds on free desktops." LICENSE = "LGPL" -DEPENDS = "alsa-lib gstreamer gtk+ libtool libvorbis" +DEPENDS = "alsa-lib gstreamer gtk+ libtool libvorbis gconf" SECTION = "libs/multimedia" AUTHOR = "Lennart Poettering" HOMEPAGE = "http://0pointer.de/lennart/projects/libcanberra" -PR = "r4" +PR = "r5" inherit autotools vala diff --git a/recipes/pulseaudio/libcanberra_0.26.bb b/recipes/pulseaudio/libcanberra_0.26.bb index 29737c6a1b..feac127115 100644 --- a/recipes/pulseaudio/libcanberra_0.26.bb +++ b/recipes/pulseaudio/libcanberra_0.26.bb @@ -1,10 +1,11 @@ DESCRIPTION = "Libcanberra is an implementation of the XDG Sound Theme and Name \ Specifications, for generating event sounds on free desktops." LICENSE = "LGPL" -DEPENDS = "alsa-lib gstreamer gtk+ libtool libvorbis" +DEPENDS = "alsa-lib gstreamer gtk+ libtool libvorbis gconf" SECTION = "libs/multimedia" AUTHOR = "Lennart Poettering" HOMEPAGE = "http://0pointer.de/lennart/projects/libcanberra" +PR = "r1" inherit autotools vala diff --git a/recipes/pulseaudio/pulseaudio.inc b/recipes/pulseaudio/pulseaudio.inc index 85048f2485..4fbfcf8538 100644 --- a/recipes/pulseaudio/pulseaudio.inc +++ b/recipes/pulseaudio/pulseaudio.inc @@ -24,6 +24,7 @@ EXTRA_OECONF = "\ --with-alsa \ --with-oss \ --with-hal \ + --with-access-group=audio \ " PARALLEL_MAKE = "" @@ -107,6 +108,8 @@ python populate_packages_prepend() { RDEPENDS_pulseaudio-module-console-kit =+ "consolekit" RDEPENDS_pulseaudio-module-hal_detect =+ "hal" RDEPENDS_pulseaudio-server = " \ + pulseaudio-module-udev-detect \ + pulseaudio-module-null-sink \ pulseaudio-module-device-restore \ pulseaudio-module-stream-restore \ pulseaudio-module-card-restore \ @@ -118,6 +121,7 @@ RDEPENDS_pulseaudio-server = " \ pulseaudio-module-native-protocol-unix \ pulseaudio-module-hal-detect \ pulseaudio-module-default-device-restore \ + pulseaudio-module-intended-roles \ pulseaudio-module-rescue-streams \ pulseaudio-module-always-sink \ pulseaudio-module-suspend-on-idle \ diff --git a/recipes/pulseaudio/pulseaudio_0.9.15.bb b/recipes/pulseaudio/pulseaudio_0.9.15.bb index d910e4865c..f9dd50e810 100644 --- a/recipes/pulseaudio/pulseaudio_0.9.15.bb +++ b/recipes/pulseaudio/pulseaudio_0.9.15.bb @@ -1,7 +1,7 @@ require pulseaudio.inc DEPENDS += "gdbm speex" -PR = "${INC_PR}.6" +PR = "${INC_PR}.7" inherit gettext diff --git a/recipes/pulseaudio/pulseaudio_0.9.21.bb b/recipes/pulseaudio/pulseaudio_0.9.21.bb index 159db39380..9a0e402863 100644 --- a/recipes/pulseaudio/pulseaudio_0.9.21.bb +++ b/recipes/pulseaudio/pulseaudio_0.9.21.bb @@ -1,6 +1,6 @@ require pulseaudio.inc -PR = ${INC_PR}.2 +PR = "${INC_PR}.3" DEPENDS += "gdbm speex" diff --git a/recipes/pulseaudio/pulseaudio_0.9.22.bb b/recipes/pulseaudio/pulseaudio_0.9.22.bb index 71ac6582d5..99a3f05e1c 100644 --- a/recipes/pulseaudio/pulseaudio_0.9.22.bb +++ b/recipes/pulseaudio/pulseaudio_0.9.22.bb @@ -1,6 +1,6 @@ require pulseaudio.inc -PR = ${INC_PR}.1 +PR = "${INC_PR}.3" DEPENDS += "gdbm speex" diff --git a/recipes/pulseaudio/pulseaudio_git.bb b/recipes/pulseaudio/pulseaudio_git.bb new file mode 100644 index 0000000000..a8b6c0bf48 --- /dev/null +++ b/recipes/pulseaudio/pulseaudio_git.bb @@ -0,0 +1,36 @@ +require pulseaudio.inc + +SRCREV = "f834150aceccd753e3ac5bab9f7d64bed9993624" +PV = "0.9.22+git" +PR = "${INC_PR}.2-r${SRCPV}" + +DEPENDS += "orc gdbm speex" + +DEFAULT_PREFERENCE = "-1" + +FILESPATHPKG =. "pulseaudio-0.9.21:" + +inherit gettext + +SRC_URI = "git://git.0pointer.de/pulseaudio.git;protocol=git \ + file://gcc4-compile-fix.patch \ + file://volatiles.04_pulse \ + file://autoconf_version.patch \ + file://tls_m4.patch \ +" + +S = "${WORKDIR}/git" + +do_configure_prepend() { + touch config.rpath +} + +# orc.m4 calls pkg-config ----variable=orcc orc-0.4 to get the path to orcc, +# resulting in /usr/bin/orcc. Force it to use the staged orcc. +do_configure_append() { + for i in $(find ${S} -name "Makefile") ; do + sed -i -e s:${bindir}/orcc:${STAGING_BINDIR_NATIVE}/orcc:g $i + done +} + + diff --git a/recipes/python/python-cython/0001-Don-t-append-docs-to-_Extension.extension.__doc__.patch b/recipes/python/python-cython/0001-Don-t-append-docs-to-_Extension.extension.__doc__.patch new file mode 100644 index 0000000000..9b9dd460bf --- /dev/null +++ b/recipes/python/python-cython/0001-Don-t-append-docs-to-_Extension.extension.__doc__.patch @@ -0,0 +1,27 @@ +From bfed128dfe9551a3a40b1ac4269f18ecfeac80a9 Mon Sep 17 00:00:00 2001 +From: Martin Jansa +Date: Sat, 1 Oct 2011 11:46:30 +0200 +Subject: [PATCH] Don't append docs to _Extension.extension.__doc__ + +* here it fails with TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' in setup.py + +Signed-off-by: Martin Jansa +--- + Cython/Distutils/extension.py | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/Cython/Distutils/extension.py b/Cython/Distutils/extension.py +index a5a6638..e76c1e7 100644 +--- a/Cython/Distutils/extension.py ++++ b/Cython/Distutils/extension.py +@@ -16,7 +16,6 @@ except ImportError: + warnings = None + + class Extension(_Extension.Extension): +- _Extension.Extension.__doc__ + \ + """pyrex_include_dirs : [string] + list of directories to search for Pyrex header files (.pxd) (in + Unix form for portability) +-- +1.7.6.1 + diff --git a/recipes/python/python-cython_0.15.1.bb b/recipes/python/python-cython_0.15.1.bb new file mode 100644 index 0000000000..0bf057aa82 --- /dev/null +++ b/recipes/python/python-cython_0.15.1.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Cython is a language specially designed for writing Python extension modules. \ +It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \ +and the messy, low-level world of C." +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa" +SRCNAME = "Cython" +BBCLASSEXTEND = "native" +PR = "r3" + +SRC_URI = "http://www.cython.org/release/${SRCNAME}-${PV}.tar.gz \ + file://0001-Don-t-append-docs-to-_Extension.extension.__doc__.patch \ +" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +SRC_URI[md5sum] = "171021b3845c9ca8bd6d8185b3cde664" +SRC_URI[sha256sum] = "248123f2f02f2701a28d9452132ac835533b396a273cda9d361cb65c26067edc" + +inherit distutils diff --git a/recipes/python/python-cython_0.13.bb b/recipes/python/python-cython_0.19.1.bb similarity index 65% rename from recipes/python/python-cython_0.13.bb rename to recipes/python/python-cython_0.19.1.bb index 966e265ffa..c2d806634b 100644 --- a/recipes/python/python-cython_0.13.bb +++ b/recipes/python/python-cython_0.19.1.bb @@ -2,17 +2,17 @@ DESCRIPTION = "Cython is a language specially designed for writing Python extens It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python \ and the messy, low-level world of C." SECTION = "devel/python" -PRIORITY = "optional" LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e23fadd6ceef8c618fc1c65191d846fa" SRCNAME = "Cython" BBCLASSEXTEND = "native" -NATIVE_INSTALL_WORKS = "1" -DEPENDS = "python" +PR = "r3" SRC_URI = "http://www.cython.org/release/${SRCNAME}-${PV}.tar.gz" + S = "${WORKDIR}/${SRCNAME}-${PV}" -SRC_URI[md5sum] = "ed2ec5e0df60a6b8e500bedf93bb1feb" -SRC_URI[sha256sum] = "a30d5e26c82ec65d65703c7cf312161a21b30339addc1a42d3b2965dea254ca6" +SRC_URI[md5sum] = "df4cfb2b8e3345272e3fc451b76bd630" +SRC_URI[sha256sum] = "0b90aaa286acdd1bf75a6dd144dfc45192f011f2c2401cf5f80ed6ab5f8bf778" inherit distutils diff --git a/recipes/python/python-daemon_1.5.5.bb b/recipes/python/python-daemon_1.5.5.bb new file mode 100644 index 0000000000..3f138866a0 --- /dev/null +++ b/recipes/python/python-daemon_1.5.5.bb @@ -0,0 +1,19 @@ +DESCRIPTION = "Library to implement a well-behaved Unix daemon process" +HOMEPAGE = "http://pypi.python.org/pypi/python-daemon/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "PSF" +SRCNAME = "daemon" +PR = "r0" + +SRC_URI = "http://pypi.python.org/packages/source/p/python-daemon/python-daemon-${PV}.tar.gz" +S = "${WORKDIR}/python-daemon-${PV}" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ +" + +SRC_URI[md5sum] = "1f6cd41473c2e201021a0aeef395b2b1" +SRC_URI[sha256sum] = "1406962e48ce03642c6057f40f9ffd49493792a7b34357fe9e264708748c83c0" diff --git a/recipes/python/python-flask-login_0.1.3.bb b/recipes/python/python-flask-login_0.1.3.bb new file mode 100644 index 0000000000..46f64e133f --- /dev/null +++ b/recipes/python/python-flask-login_0.1.3.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "User session management for Flask" +HOMEPAGE = "http://packages.python.org/Flask-Login/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "MIT" +SRCNAME = "Flask-Login" +PR = "r0" + +S = "${WORKDIR}/${SRCNAME}-${PV}" +SRC_URI = "http://pypi.python.org/packages/source/F/Flask-Login/Flask-Login-${PV}.tar.gz" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-flask \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} + +SRC_URI[md5sum] = "8a9234d5e957f439cde270d026037363" +SRC_URI[sha256sum] = "8a1b309fc306875305bd4d2b95733a3e5527b637b0d1f9af3984d140f6284acf" diff --git a/recipes/python/python-flask-login_0.2.3.bb b/recipes/python/python-flask-login_0.2.3.bb new file mode 100644 index 0000000000..e692932184 --- /dev/null +++ b/recipes/python/python-flask-login_0.2.3.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "User session management for Flask" +HOMEPAGE = "http://packages.python.org/Flask-Login/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "MIT" +SRCNAME = "Flask-Login" +PR = "r0" + +S = "${WORKDIR}/${SRCNAME}-${PV}" +SRC_URI = "http://pypi.python.org/packages/source/F/Flask-Login/Flask-Login-${PV}.tar.gz" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-flask \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} + +SRC_URI[md5sum] = "566d1b13f2273d7bc35b04151539fa7d" +SRC_URI[sha256sum] = "c829d659cb7095601b2bc17ba3d7649deec78889eaa79e7613dcdfb9936c5830" diff --git a/recipes/python/python-flask_0.10.bb b/recipes/python/python-flask_0.10.bb new file mode 100644 index 0000000000..21ecf454b3 --- /dev/null +++ b/recipes/python/python-flask_0.10.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Web microframework for Python based on Werkzeug, Jinja 2 and good intentions" +HOMEPAGE = "http://flask.pocoo.org/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "flask" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "0.10" +SRC_URI = "git://github.com/mitsuhiko/flask.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ + python-jinja2 \ + python-werkzeug \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} diff --git a/recipes/python/python-flask_0.6.1.bb b/recipes/python/python-flask_0.6.1.bb new file mode 100644 index 0000000000..1fbfa4778b --- /dev/null +++ b/recipes/python/python-flask_0.6.1.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "Web microframework for Python based on Werkzeug, Jinja 2 and good intentions" +HOMEPAGE = "http://flask.pocoo.org/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "flask" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "0.6.1" +SRC_URI = "git://github.com/mitsuhiko/flask.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ + python-jinja2 \ + python-werkzeug \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} + +SRC_URI[md5sum] = "7af56e33fb6a35db2818c20e604c8698" +SRC_URI[sha256sum] = "fe0e31bf71a1fc1d2e0786052855c94cd9ee43546d3e15ff98ccee0c5bc21f70" diff --git a/recipes/python/python-flask_0.7.2.bb b/recipes/python/python-flask_0.7.2.bb new file mode 100644 index 0000000000..5e9184e714 --- /dev/null +++ b/recipes/python/python-flask_0.7.2.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Web microframework for Python based on Werkzeug, Jinja 2 and good intentions" +HOMEPAGE = "http://flask.pocoo.org/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "flask" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "0.7.2" +SRC_URI = "git://github.com/mitsuhiko/flask.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ + python-jinja2 \ + python-werkzeug \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} diff --git a/recipes/python/python-flask_0.8.bb b/recipes/python/python-flask_0.8.bb new file mode 100644 index 0000000000..595526ad7a --- /dev/null +++ b/recipes/python/python-flask_0.8.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Web microframework for Python based on Werkzeug, Jinja 2 and good intentions" +HOMEPAGE = "http://flask.pocoo.org/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "flask" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "0.8" +SRC_URI = "git://github.com/mitsuhiko/flask.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ + python-jinja2 \ + python-werkzeug \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} diff --git a/recipes/python/python-flask_0.9.bb b/recipes/python/python-flask_0.9.bb new file mode 100644 index 0000000000..a0efe6064c --- /dev/null +++ b/recipes/python/python-flask_0.9.bb @@ -0,0 +1,25 @@ +DESCRIPTION = "Web microframework for Python based on Werkzeug, Jinja 2 and good intentions" +HOMEPAGE = "http://flask.pocoo.org/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "flask" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "0.9" +SRC_URI = "git://github.com/mitsuhiko/flask.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ + python-jinja2 \ + python-werkzeug \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} diff --git a/recipes/python/python-gevent_0.13.8.bb b/recipes/python/python-gevent_0.13.8.bb new file mode 100644 index 0000000000..49b1b80ac4 --- /dev/null +++ b/recipes/python/python-gevent_0.13.8.bb @@ -0,0 +1,22 @@ +DESCRIPTION = "Networking library that uses greenlet to provide synchronous API on top of libevent event loop" + +SECTION = "devel/python" +HOMEPAGE = "http://www.gevent.org" +LICENSE = "MIT" +DEPENDS = "libevent" +RDEPENDS_${PN} = "\ + python-pprint \ + python-greenlet" + +PR = "r1" + +SRC_URI = "http://pypi.python.org/packages/source/g/gevent/gevent-${PV}.tar.gz" +S = "${WORKDIR}/gevent-${PV}" + +inherit setuptools + +FILES_${PN}-dbg += "${libdir}/python2.*/site-packages/gevent/.debug" + +SRC_URI[md5sum] = "ca9dcaa7880762d8ebbc266b11252960" +SRC_URI[sha256sum] = "54b8d26300ce408c0916a3e63ef6cd3e6aca76230833558deb7de15196ed955e" + diff --git a/recipes/python/python-gevent_1.0rc2.bb b/recipes/python/python-gevent_1.0rc2.bb new file mode 100644 index 0000000000..069b1606c2 --- /dev/null +++ b/recipes/python/python-gevent_1.0rc2.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Networking library that uses greenlet to provide synchronous API on top of libevent event loop" + +SECTION = "devel/python" +HOMEPAGE = "http://www.gevent.org" +LICENSE = "MIT" +DEPENDS = "libevent python-cython" +RDEPENDS_${PN} = "\ + python-pprint \ + python-greenlet" + +PR = "r1" + +SRC_URI = "http://rascalmicro.com/sources/gevent-${PV}.tar.gz" +S = "${WORKDIR}/gevent-${PV}" + +CYTHON = ${WORKDIR}/tmp/work/i686-linux/python-cython-native-0.15.1-r3/Cython-0.15.1/bin/cython + +inherit setuptools + +FILES_${PN}-dbg += "${libdir}/python2.*/site-packages/gevent/.debug" + +SRC_URI[md5sum] = "e1bce8e15c7ebb08788978c0f4860f9d" +SRC_URI[sha256sum] = "f74bfe36e969e53b5e83ef06f7bee0b867147a38a762abb325cb7ad7b299c584" + diff --git a/recipes/python/python-greenlet_0.4.0.bb b/recipes/python/python-greenlet_0.4.0.bb new file mode 100644 index 0000000000..6792090057 --- /dev/null +++ b/recipes/python/python-greenlet_0.4.0.bb @@ -0,0 +1,17 @@ +DESCRIPTION = "Lightweight in-process concurrent programming" + +SECTION = "devel/python" +HOMEPAGE = "https://github.com/python-greenlet/greenlet" +LICENSE = "MIT" +PR = "r1" + +SRC_URI = "http://pypi.python.org/packages/source/g/greenlet/greenlet-${PV}.zip" +S = "${WORKDIR}/greenlet-${PV}" + +inherit distutils + +FILES_${PN}-dbg += "${libdir}/python2.*/site-packages/.debug" + +SRC_URI[md5sum] = "87887570082caadc08fb1f8671dbed71" +SRC_URI[sha256sum] = "3f52af03bf8a89045fc159c6a76d5642349b30fb41c3df1a22b12bbd3920b1ee" + diff --git a/recipes/python/python-jinja2_2.5.5.bb b/recipes/python/python-jinja2_2.5.5.bb new file mode 100644 index 0000000000..5412051a43 --- /dev/null +++ b/recipes/python/python-jinja2_2.5.5.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Modern and designer-friendly templating language for Python, modelled after Django’s templates" +HOMEPAGE = "http://jinja.pocoo.org/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "jinja2" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "2.5.5" +SRC_URI = "git://github.com/mitsuhiko/jinja2.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} + +SRC_URI[md5sum] = "e5209ee12f5e984b9963086f936621fb" +SRC_URI[sha256sum] = "aaac90088c957cad4272dcf38aee1736889bbc568ef1a25d3d75310526f616ba" diff --git a/recipes/python/python-jinja2_2.6.bb b/recipes/python/python-jinja2_2.6.bb new file mode 100644 index 0000000000..3c626fd3f0 --- /dev/null +++ b/recipes/python/python-jinja2_2.6.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "Modern and designer-friendly templating language for Python, modelled after Django’s templates" +HOMEPAGE = "http://jinja.pocoo.org/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "jinja2" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "2.6" +SRC_URI = "git://github.com/mitsuhiko/jinja2.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} + +SRC_URI[md5sum] = "1c49a8825c993bfdcf55bb36897d28a2" +SRC_URI[sha256sum] = ""85e185375db75c109f99ecde3d55415f035e7068a82252cf4f16c667ac38f49 diff --git a/recipes/python/python-jinja2_2.7.bb b/recipes/python/python-jinja2_2.7.bb new file mode 100644 index 0000000000..7e95209a68 --- /dev/null +++ b/recipes/python/python-jinja2_2.7.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "Modern and designer-friendly templating language for Python, modelled after Django’s templates" +HOMEPAGE = "http://jinja.pocoo.org/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "jinja2" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "2.7" +SRC_URI = "git://github.com/mitsuhiko/jinja2.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} diff --git a/recipes/python/python-matplotlib/fix_setup.patch b/recipes/python/python-matplotlib/fix_setup.patch new file mode 100644 index 0000000000..9381583537 --- /dev/null +++ b/recipes/python/python-matplotlib/fix_setup.patch @@ -0,0 +1,29 @@ +This fixes the dependency checks inside of setup.py since things like +'import numpy' won't work with bitbake. + +diff --git a/setup.py b/setup.py +index 2f13821..e6d6ed0 100644 +--- a/setup.py ++++ b/setup.py +@@ -113,12 +113,6 @@ if 1: + baseline_images = [chop_package(f) for f in baseline_images] + package_data['matplotlib'].extend(baseline_images) + +-if not check_for_numpy(): +- sys.exit(1) +- +-if not check_for_freetype(): +- sys.exit(1) +- + build_ft2font(ext_modules, packages) + build_ttconv(ext_modules, packages) + build_contour(ext_modules, packages) +@@ -129,7 +123,7 @@ build_tri(ext_modules, packages) + + print_raw("") + print_raw("OPTIONAL BACKEND DEPENDENCIES") +-has_libpng = check_for_libpng() ++has_libpng = True + + if has_libpng and options['build_agg']: + build_agg(ext_modules, packages) diff --git a/recipes/python/python-matplotlib/fix_setupext.patch b/recipes/python/python-matplotlib/fix_setupext.patch new file mode 100644 index 0000000000..15faf84911 --- /dev/null +++ b/recipes/python/python-matplotlib/fix_setupext.patch @@ -0,0 +1,29 @@ +This fixes the numpy import problem in setupext.py using a hard-coded path. + +diff --git a/setupext.py b/setupext.py +index 962cedc..82297c4 100644 +--- a/setupext.py ++++ b/setupext.py +@@ -176,10 +176,7 @@ if os.path.exists(setup_cfg): + except: pass + + # For get_base_flags: +-if options['basedirlist']: +- basedirlist = options['basedirlist'].split() +-else: +- basedirlist = basedir[sys.platform] ++basedirlist = [os.environ['STAGING_LIBDIR']] + print("basedirlist is: %s" % basedirlist) + + if options['display_status']: +@@ -555,8 +552,8 @@ def check_for_numpy(): + + def add_numpy_flags(module): + "Add the modules flags to build extensions which use numpy" +- import numpy +- module.include_dirs.append(numpy.get_include()) ++ # Hard-coded path for OE since I know this is where numpy's include dir will be ++ module.include_dirs.append(os.path.join(os.environ['STAGING_LIBDIR'], 'python2.6/site-packages/numpy/core/include/')) + + def add_png_flags(module): + try_pkgconfig(module, 'libpng', 'png') diff --git a/recipes/python/python-matplotlib_1.1.0.bb b/recipes/python/python-matplotlib_1.1.0.bb new file mode 100644 index 0000000000..0cb0e4ba0d --- /dev/null +++ b/recipes/python/python-matplotlib_1.1.0.bb @@ -0,0 +1,37 @@ +DESCRIPTION = "matplotlib is a python 2D plotting library which produces publication quality figures in a variety of hardcopy formats" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "PSF" +SRCNAME = "matplotlib" +PR = "r1" + +DEPENDS += "python-numpy freetype libpng" +RDEPENDS_${PN} = "python-core python-distutils python-numpy freetype libpng" + +SRC_URI = "${SOURCEFORGE_MIRROR}/matplotlib/matplotlib-${PV}.tar.gz \ + file://fix_setup.patch \ + file://fix_setupext.patch \ + " + +S = "${WORKDIR}/matplotlib-${PV}" + +EXTRA_OECONF = "--disable-docs --with-python-includes=${STAGING_INCDIR}/../" + +inherit distutils + +do_compile_prepend() { + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/python setup.py build ${DISTUTILS_BUILD_ARGS} || \ + true +} + +# need to export these variables for python-config to work +export PYTHONPATH +export BUILD_SYS +export HOST_SYS +export STAGING_INCDIR +export STAGING_LIBDIR + + +SRC_URI[md5sum] = "57a627f30b3b27821f808659889514c2" +SRC_URI[sha256sum] = "be37e1d86c65ecacae6683f8805e051e9904e5f2e02bf2b7a34262c46a6d06a7" diff --git a/recipes/python/python-numpy_1.1.1.bb b/recipes/python/python-numpy_1.1.1.bb index f5c23e055f..8594ea00b5 100644 --- a/recipes/python/python-numpy_1.1.1.bb +++ b/recipes/python/python-numpy_1.1.1.bb @@ -4,6 +4,8 @@ PRIORITY = "optional" LICENSE = "PSF" PR = "ml0" +RDEPENDS_${PN} = "python-compiler python-mmap python-pkgutil python-pydoc python-unittest" + SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \ file://unbreak-assumptions.diff \ file://trycompile.diff \ diff --git a/recipes/python/python-numpy_1.6.2.bb b/recipes/python/python-numpy_1.6.2.bb new file mode 100644 index 0000000000..7d074d3c1b --- /dev/null +++ b/recipes/python/python-numpy_1.6.2.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "A sophisticated Numeric Processing Package for Python" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "PSF" +PR = "ml0" + +SRC_URI = "${SOURCEFORGE_MIRROR}/numpy/numpy-${PV}.tar.gz \ + file://config.h \ + file://numpyconfig.h \ + " + +S = "${WORKDIR}/numpy-${PV}" + +inherit distutils + +# Make the build fail and replace *config.h with proper one +# This is a ugly, ugly hack - Koen +do_compile_prepend() { + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/python setup.py build ${DISTUTILS_BUILD_ARGS} || \ + true + cp ${WORKDIR}/*config.h ${S}/build/$(ls ${S}/build | grep src)/numpy/core/include/numpy/ +} + +SRC_URI[md5sum] = "95ed6c9dcc94af1fc1642ea2a33c1bba" +SRC_URI[sha256sum] = "0b83d96ab79711b548470b7aeee1272c4ba8fcbba6586a67116b566a21ed16c6" diff --git a/recipes/python/python-pip_1.1.bb b/recipes/python/python-pip_1.1.bb new file mode 100644 index 0000000000..c0109770dd --- /dev/null +++ b/recipes/python/python-pip_1.1.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Web microframework for Python based on Werkzeug, Jinja 2 and good intentions" +HOMEPAGE = "http://flask.pocoo.org/" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "MIT" +SRCNAME = "pip" +PR = "r0" + +SRC_URI = "http://cheeseshop.python.org/packages/source/p/pip/${SRCNAME}-${PV}.tar.gz" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} + +SRC_URI[md5sum] = "62a9f08dd5dc69d76734568a6c040508" +SRC_URI[sha256sum] = "993804bb947d18508acee02141281c77d27677f8c14eaa64d6287a1c53ef01c8" diff --git a/recipes/python/python-pytronics_0.1.bb b/recipes/python/python-pytronics_0.1.bb new file mode 100644 index 0000000000..8183fc6ce2 --- /dev/null +++ b/recipes/python/python-pytronics_0.1.bb @@ -0,0 +1,18 @@ +DESCRIPTION = "Hardware control library for the Rascal, a small computer for art and science" +HOMEPAGE = "http://rascalmicro.com" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "GPLv3" +SRCNAME = "pytronics" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "${AUTOREV}" +SRC_URI = "git://github.com/rascalmicro/pytronics.git;protocol=git;branch=master" + +inherit distutils + +RDEPENDS_${PN} = "\ + python-core \ +" diff --git a/recipes/python/python-scipy/libblas.so b/recipes/python/python-scipy/libblas.so new file mode 100644 index 0000000000..e69de29bb2 diff --git a/recipes/python/python-scipy/liblapack.a b/recipes/python/python-scipy/liblapack.a new file mode 100644 index 0000000000..e69de29bb2 diff --git a/recipes/python/python-scipy/umfpack.so b/recipes/python/python-scipy/umfpack.so new file mode 100644 index 0000000000..e69de29bb2 diff --git a/recipes/python/python-scipy_0.8.0.bb b/recipes/python/python-scipy_0.8.0.bb new file mode 100644 index 0000000000..4d9a3c447f --- /dev/null +++ b/recipes/python/python-scipy_0.8.0.bb @@ -0,0 +1,28 @@ +DESCRIPTION = "SciPy is an Open Source library of scientific tools for Python." +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +PR = "ml0" + +SRC_URI = "${SOURCEFORGE_MIRROR}/scipy/scipy-${PV}.tar.gz \ + file://libblas.so\ + file://liblapack.a \ + file://umfpack.so \ + " + +S = "${WORKDIR}/scipy-${PV}" + +export BLAS = ${WORKDIR}/libblas.so +export LAPACK = ${WORKDIR}/liblapack.a +export UMFPACK = ${WORKDIR}/umfpack.so + +export LDFLAGS = "-L${STAGING_LIBDIR}" + +inherit distutils + +do_compile() { + ${STAGING_BINDIR_NATIVE}/python setup.py build --compiler arm-gnueabi-gcc +} + +SRC_URI[md5sum] = "f0bfc6141b90e6a31555b31486602251" +SRC_URI[sha256sum] = "b12937bd3a71ace8d7d6b7e19f8f220630969c2822e6248fc0bbc8f2cc18d825" diff --git a/recipes/python/python-werkzeug_0.6.2.bb b/recipes/python/python-werkzeug_0.6.2.bb new file mode 100644 index 0000000000..d1f114592c --- /dev/null +++ b/recipes/python/python-werkzeug_0.6.2.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "WSGI utility library for Python" +HOMEPAGE = "http://werkzeug.pocoo.org" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "werkzeug" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "0.6.2" +SRC_URI = "git://github.com/mitsuhiko/werkzeug.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} + +SRC_URI[md5sum] = "dda6be061c9158ee4371c27b34e6b521" +SRC_URI[sha256sum] = "f749c0eb77ee7fec24d09770e71a3503e5444066bc872a1e91bb08001a7f7cc1" diff --git a/recipes/python/python-werkzeug_0.8.3.bb b/recipes/python/python-werkzeug_0.8.3.bb new file mode 100644 index 0000000000..9ba5fcafdf --- /dev/null +++ b/recipes/python/python-werkzeug_0.8.3.bb @@ -0,0 +1,26 @@ +DESCRIPTION = "WSGI utility library for Python" +HOMEPAGE = "http://werkzeug.pocoo.org" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "werkzeug" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "0.8.3" +SRC_URI = "git://github.com/mitsuhiko/werkzeug.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} + +SRC_URI[md5sum] = "12aa03e302ce49da98703938f257347a" +SRC_URI[sha256sum] = "108c3d41fb701c4af4ef00e8ebbedc147632c82247beb798c8d8657a12810206" diff --git a/recipes/python/python-werkzeug_0.9.1.bb b/recipes/python/python-werkzeug_0.9.1.bb new file mode 100644 index 0000000000..f196b12cef --- /dev/null +++ b/recipes/python/python-werkzeug_0.9.1.bb @@ -0,0 +1,23 @@ +DESCRIPTION = "WSGI utility library for Python" +HOMEPAGE = "http://werkzeug.pocoo.org" +SECTION = "devel/python" +PRIORITY = "optional" +LICENSE = "BSD" +SRCNAME = "werkzeug" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "0.9.1" +SRC_URI = "git://github.com/mitsuhiko/werkzeug.git;protocol=git;branch=master" + +inherit setuptools + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_install_append() { + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.pyo + rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/site.py +} diff --git a/recipes/qcanobserver/qcanobserver/0001-messagebufferinterface.cpp-add-sys-socket.h-as-inclu.patch b/recipes/qcanobserver/qcanobserver/0001-messagebufferinterface.cpp-add-sys-socket.h-as-inclu.patch index 6a19d8ddbf..7a2b96dfe5 100644 --- a/recipes/qcanobserver/qcanobserver/0001-messagebufferinterface.cpp-add-sys-socket.h-as-inclu.patch +++ b/recipes/qcanobserver/qcanobserver/0001-messagebufferinterface.cpp-add-sys-socket.h-as-inclu.patch @@ -13,22 +13,27 @@ Signed-off-by: Koen Kooi messagebufferinterface.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) + diff --git a/messagebufferinterface.cpp b/messagebufferinterface.cpp -index e26b52d..117ebb4 100644 +index 86e6c87..7f76b56 100644 --- a/messagebufferinterface.cpp +++ b/messagebufferinterface.cpp -@@ -19,8 +19,9 @@ - #include "errordialog.h" - #include - #include --#include --#include +@@ -25,14 +25,15 @@ + #include + #include + +#include +#include +#include - #include - #include - #include --- -1.6.6.1 - ++ + #include + #include + #include + + #include "configdialog.h" +-#include +-#include +-#include + + + void MessageBufferInterface::configChanged(__config cfg) diff --git a/recipes/qcanobserver/qcanobserver_svn.bb b/recipes/qcanobserver/qcanobserver_svn.bb index 4a7bd62e99..8b31aaadc9 100644 --- a/recipes/qcanobserver/qcanobserver_svn.bb +++ b/recipes/qcanobserver/qcanobserver_svn.bb @@ -6,7 +6,7 @@ inherit qt4x11 DEPENDS += "qwt" PV = "0.5+svnr${SRCPV}" -SRCREV = "41" +SRCREV = "43" SRC_URI = "svn://qcanobserver.svn.sourceforge.net/svnroot;module=qcanobserver;proto=https \ file://0001-messagebufferinterface.cpp-add-sys-socket.h-as-inclu.patch \ file://candemo.xml" diff --git a/recipes/qgpslog/qgpslog_0.2.1.bb b/recipes/qgpslog/qgpslog_0.2.1.bb index 7952d2bffc..726bedae29 100644 --- a/recipes/qgpslog/qgpslog_0.2.1.bb +++ b/recipes/qgpslog/qgpslog_0.2.1.bb @@ -5,7 +5,7 @@ SECTION = "x11/applications" PRIORITY = "optional" LICENSE = "GPL QPL PD" DEPENDS = "librsvg-native" -PR = "r0" +PR = "r1" SRC_URI = "http://openmoko.senfdax.de/sources/${PN}-${PV}.tar.gz;name=archive" diff --git a/recipes/qmake/qmake2.inc b/recipes/qmake/qmake2.inc index f2631b5f7e..97918426c7 100644 --- a/recipes/qmake/qmake2.inc +++ b/recipes/qmake/qmake2.inc @@ -3,7 +3,7 @@ PRIORITY = "optional" HOMEPAGE = "http://www.trolltech.com" SECTION = "devel" LICENSE = "GPL" -PR = "r12" +INC_PR = "r12" # We call 'moc' during the build DEPENDS = "qt4-tools-native" diff --git a/recipes/qmake/qmake2_2.10a.bb b/recipes/qmake/qmake2_2.10a.bb index 77d909f8eb..d8bb528fa4 100644 --- a/recipes/qmake/qmake2_2.10a.bb +++ b/recipes/qmake/qmake2_2.10a.bb @@ -1,5 +1,6 @@ QTVERSION="4.4.3" FILESDIR += "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/qmake2" +PR = "${INC_PR}.1" BBCLASSEXTEND = "native sdk" @@ -22,6 +23,7 @@ do_install() { echo 'export OE_QMAKE_CC=gcc' >> $script echo 'export OE_QMAKE_CXX=g++' >> $script echo 'export OE_QMAKE_LINK=g++' >> $script + echo 'export OE_QMAKE_STRIP=strip' >> $script echo 'export OE_QMAKE_LIBDIR_QT=${libdir}' >> $script echo 'export OE_QMAKE_INCDIR_QT=${includedir}/qtopia' >> $script echo 'export OE_QMAKE_MOC=${bindir}/moc' >> $script @@ -39,6 +41,7 @@ do_install() { echo 'export OE_QMAKE_CC=gcc' >> $script echo 'export OE_QMAKE_CXX=g++' >> $script echo 'export OE_QMAKE_LINK=g++' >> $script + echo 'export OE_QMAKE_STRIP=strip' >> $script echo 'export OE_QMAKE_LIBDIR_QT=${libdir}' >> $script echo 'export OE_QMAKE_INCDIR_QT=${includedir}/qt4' >> $script echo 'export OE_QMAKE_MOC=${bindir}/moc' >> $script diff --git a/recipes/qscintilla/files/no-external-lexers.patch b/recipes/qscintilla/files/no-external-lexers.patch index 5953043190..0214a5365b 100644 --- a/recipes/qscintilla/files/no-external-lexers.patch +++ b/recipes/qscintilla/files/no-external-lexers.patch @@ -1,10 +1,9 @@ - # # Patch managed by http://www.holgerschurig.de/patcher.html # ---- ../src/ExternalLexer.cpp~no-external-lexers -+++ ../src/ExternalLexer.cpp +--- src/ExternalLexer.cpp~no-external-lexers ++++ src/ExternalLexer.cpp @@ -110,7 +110,7 @@ // Initialise some members... first = NULL; diff --git a/recipes/qscintilla/qscintilla_1.65-gpl-1.6.bb b/recipes/qscintilla/qscintilla_1.65-gpl-1.6.bb index cfed35c561..1e1b3a4f44 100644 --- a/recipes/qscintilla/qscintilla_1.65-gpl-1.6.bb +++ b/recipes/qscintilla/qscintilla_1.65-gpl-1.6.bb @@ -1,10 +1,10 @@ DESCRIPTION = "Qt/Embedded bindings for the Scintilla source code editor component" SECTION = "opie/libs" LICENSE = "GPL" -PR = "r0" +PR = "r1" SRC_URI = "http://www.mneuroth.de/privat/zaurus/qscintilla-${PV}_zaurus.tar.gz \ - file://no-external-lexers.patch;striplevel=0" + file://no-external-lexers.patch;patchdir=..;striplevel=0" S = "${WORKDIR}/qscintilla-${PV}/qt" @@ -22,14 +22,10 @@ EXTRA_QMAKEVARS_POST += "INCLUDEPATH+=${S}/patches \ PARALLEL_MAKE = "" -do_stage() { - install -m 0644 qextscintilla*.h ${STAGING_INCDIR}/ - oe_libinstall -so libqscintilla ${STAGING_LIBDIR} -} - do_install() { - install -d ${D}${libdir} + install -d ${D}${libdir} ${D}${includedir} oe_libinstall -so libqscintilla ${D}${libdir} + install -m 0644 qextscintilla*.h ${D}${includedir}/ } FILES_${PN} = "${libdir}" diff --git a/recipes/qt4/files/0001-wsegl2-support.patch b/recipes/qt4/files/0001-wsegl2-support.patch new file mode 100644 index 0000000000..ad61fe7afa --- /dev/null +++ b/recipes/qt4/files/0001-wsegl2-support.patch @@ -0,0 +1,997 @@ +diff -Nurp qt-everywhere-opensource-src-4.6.3-orig//src/3rdparty/powervr/wsegl2/pvr2d.h qt-everywhere-opensource-src-4.6.3/src/3rdparty/powervr/wsegl2/pvr2d.h +--- qt-everywhere-opensource-src-4.6.3-orig//src/3rdparty/powervr/wsegl2/pvr2d.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/powervr/wsegl2/pvr2d.h 2011-05-16 22:51:43.158564336 +0000 +@@ -0,0 +1,669 @@ ++/********************************************************************** ++* ++* Copyright(c) Imagination Technologies Ltd. ++* ++* The contents of this file are subject to the MIT license as set out below. ++* ++* Permission is hereby granted, free of charge, to any person obtaining a copy ++* of this software and associated documentation files (the "Software"), ++* to deal in the Software without restriction, including without limitation ++* the rights to use, copy, modify, merge, publish, distribute, sublicense, ++* and/or sell copies of the Software, and to permit persons to whom the ++* Software is furnished to do so, subject to the following conditions: ++* ++* The above copyright notice and this permission notice shall be included ++* in all copies or substantial portions of the Software. ++* ++* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, ++* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT ++* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE ++* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++* ++* This License is also included in this distribution in the file called ++* "COPYING". ++* ++******************************************************************************/ ++ ++ ++ ++/****************************************************************************** ++Modifications :- ++$Log: pvr2d.h $ ++ ++ --- Revision Logs Removed --- ++******************************************************************************/ ++ ++#ifndef _PVR2D_H_ ++#define _PVR2D_H_ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* PVR2D Platform-specific definitions */ ++#if defined (__linux__) ++#define PVR2D_EXPORT __attribute__((visibility("default"))) ++#define PVR2D_IMPORT ++#else ++#define PVR2D_EXPORT ++#define PVR2D_IMPORT ++#endif ++ ++/* PVR2D header revision */ ++#define PVR2D_REV_MAJOR 3 ++#define PVR2D_REV_MINOR 5 ++ ++/* Basic types */ ++typedef enum ++{ ++ PVR2D_FALSE = 0, ++ PVR2D_TRUE ++} PVR2D_BOOL; ++ ++typedef void* PVR2D_HANDLE; ++ ++typedef char PVR2D_CHAR, *PVR2D_PCHAR; ++typedef unsigned char PVR2D_UCHAR, *PVR2D_PUCHAR; ++typedef int PVR2D_INT, *PVR2D_PINT; ++typedef unsigned int PVR2D_UINT, *PVR2D_PUINT; ++typedef long PVR2D_LONG, *PVR2D_PLONG; ++typedef unsigned long PVR2D_ULONG, *PVR2D_PULONG; ++ ++typedef void PVR2D_VOID, *PVR2D_PVOID; ++ ++ ++/* error codes */ ++typedef enum ++{ ++ PVR2D_OK = 0, ++ PVR2DERROR_INVALID_PARAMETER = -1, ++ PVR2DERROR_DEVICE_UNAVAILABLE = -2, ++ PVR2DERROR_INVALID_CONTEXT = -3, ++ PVR2DERROR_MEMORY_UNAVAILABLE = -4, ++ PVR2DERROR_DEVICE_NOT_PRESENT = -5, ++ PVR2DERROR_IOCTL_ERROR = -6, ++ PVR2DERROR_GENERIC_ERROR = -7, ++ PVR2DERROR_BLT_NOTCOMPLETE = -8, ++ PVR2DERROR_HW_FEATURE_NOT_SUPPORTED = -9, ++ PVR2DERROR_NOT_YET_IMPLEMENTED = -10, ++ PVR2DERROR_MAPPING_FAILED = -11 ++}PVR2DERROR; ++ ++/* 32 bit PVR2D pixel format specifier */ ++typedef unsigned long PVR2DFORMAT; ++ ++/* Standard PVR2D pixel formats */ ++#define PVR2D_1BPP 0x00UL // 1bpp mask surface or palletized 1 bit source with 2x32 bit CLUT ++#define PVR2D_RGB565 0x01UL // Common rgb 565 format ++#define PVR2D_ARGB4444 0x02UL // Common argb 4444 format ++#define PVR2D_RGB888 0x03UL // Common rgb 888 format (not supported) ++#define PVR2D_ARGB8888 0x04UL // Common argb 8888 format ++#define PVR2D_ARGB1555 0x05UL // Common argb 1555 format ++#define PVR2D_ALPHA8 0x06UL // Alpha-only 8 bit per pixel (used with a constant fill colour) ++#define PVR2D_ALPHA4 0x07UL // Alpha-only 4 bits per pixel (used with a constant fill colour) ++#define PVR2D_PAL2 0x08UL // Palletized 2 bit format (requires 4x32 bit CLUT) ++#define PVR2D_PAL4 0x09UL // Palletized 4 bit format (requires 16x32 bit CLUT) ++#define PVR2D_PAL8 0x0AUL // Palletized 8 bit format (requires 256x32 bit CLUT) ++#define PVR2D_U8 0x10UL // monochrome unsigned 8 bit ++#define PVR2D_U88 0x11UL // monochrome unsigned 16 bit ++#define PVR2D_S8 0x12UL // signed 8 bit ++#define PVR2D_YUV422_YUYV 0x13UL // YUV 422 low-high byte order Y0UY1V ++#define PVR2D_YUV422_UYVY 0x14UL // YUV 422 low-high byte order UY0VY1 ++#define PVR2D_YUV422_YVYU 0x15UL // YUV 422 low-high byte order Y0VY1U ++#define PVR2D_YUV422_VYUY 0x16UL // YUV 422 low-high byte order VY0UY1 ++#define PVR2D_YUV420_2PLANE 0x17UL // YUV420 2 Plane ++#define PVR2D_YUV420_3PLANE 0x18UL // YUV420 3 Plane ++#define PVR2D_2101010ARGB 0x19UL // 32 bit 2 10 10 10 ++#define PVR2D_888RSGSBS 0x1AUL ++#define PVR2D_16BPP_RAW 0x1BUL // 16 bit raw (no format conversion) ++#define PVR2D_32BPP_RAW 0x1CUL // 32 bit raw ++#define PVR2D_64BPP_RAW 0x1DUL // 64 bit raw ++#define PVR2D_128BPP_RAW 0x1EUL // 128 bit raw ++ ++#define PVR2D_NO_OF_FORMATS 0x1FUL ++ ++/* Format modifier bit field (DstFormat and SrcFormat bits 16..23) */ ++#define PVR2D_FORMAT_MASK 0x0000FFFFUL // PVR2D Format bits ++#define PVR2D_FORMAT_LAYOUT_MASK 0x000F0000UL // Format layout (strided / twiddled / tiled) ++#define PVR2D_FORMAT_FLAGS_MASK 0x0FF00000UL // Surface Flags mask ++ ++/* Layout */ ++#define PVR2D_FORMAT_LAYOUT_SHIFT 16 ++#define PVR2D_FORMAT_LAYOUT_STRIDED 0x00000000UL ++#define PVR2D_FORMAT_LAYOUT_TILED 0x00010000UL ++#define PVR2D_FORMAT_LAYOUT_TWIDDLED 0x00020000UL ++ ++/* ++ PVR2D_SURFACE_PDUMP ++ This flag requests a surface pdump, to capture the pixel state after host writes. ++ Not needed if the surface state has resulted from previous SGX 2D/3D core writes. ++*/ ++#define PVR2D_SURFACE_PDUMP 0x00100000UL // calls PVRSRVPDumpMem to capture the surface (pdump builds only) ++ ++/* ++ Low level 3D format extension - for blts via the 3D core only. ++ If the top bit of the format field is set then PVR2D reads it as a PVRSRV_PIXEL_FORMAT. ++ The outcome is hardware dependant. ++ There is no guarantee that any specific PVRSRV format will be supported. ++*/ ++#define PVR2D_FORMAT_PVRSRV 0x80000000 ++ ++/* wrap surface type */ ++typedef enum ++{ ++ PVR2D_WRAPFLAG_NONCONTIGUOUS = 0, ++ PVR2D_WRAPFLAG_CONTIGUOUS = 1, ++ ++}PVR2DWRAPFLAGS; ++ ++#define PVR2D_CONTEXT_FLAGS_PRIORITY_MASK 0x00000003 ++ ++#define PVR2D_CONTEXT_FLAGS_LOW_PRIORITY_CONTEXT 1 ++#define PVR2D_CONTEXT_FLAGS_NORMAL_PRIORITY_CONTEXT 0 ++#define PVR2D_CONTEXT_FLAGS_HIGH_PRIORITY_CONTEXT 2 ++ ++/* flags for control information of additional blits */ ++typedef enum ++{ ++ PVR2D_BLIT_DISABLE_ALL = 0x00000000, /* disable all additional controls */ ++ PVR2D_BLIT_CK_ENABLE = 0x00000001, /* enable colour key */ ++ PVR2D_BLIT_GLOBAL_ALPHA_ENABLE = 0x00000002, /* enable standard global alpha */ ++ PVR2D_BLIT_PERPIXEL_ALPHABLEND_ENABLE = 0x00000004, /* enable per-pixel alpha bleding */ ++ PVR2D_BLIT_PAT_SURFACE_ENABLE = 0x00000008, /* enable pattern surf (disable fill) */ ++ PVR2D_BLIT_FULLY_SPECIFIED_ALPHA_ENABLE = 0x00000010, /* enable fully specified alpha */ ++ PVR2D_BLIT_ROT_90 = 0x00000020, /* apply 90 degree rotation to the blt */ ++ PVR2D_BLIT_ROT_180 = 0x00000040, /* apply 180 degree rotation to the blt */ ++ PVR2D_BLIT_ROT_270 = 0x00000080, /* apply 270 degree rotation to the blt */ ++ PVR2D_BLIT_COPYORDER_TL2BR = 0x00000100, /* copy order overrides */ ++ PVR2D_BLIT_COPYORDER_BR2TL = 0x00000200, ++ PVR2D_BLIT_COPYORDER_TR2BL = 0x00000400, ++ PVR2D_BLIT_COPYORDER_BL2TR = 0x00000800, ++ PVR2D_BLIT_COLKEY_SOURCE = 0x00001000, /* Key colour is on the source surface */ ++ PVR2D_BLIT_COLKEY_DEST = 0x00002000, /* Key colour is on the destination surface */ ++ PVR2D_BLIT_COLKEY_MASKED = 0x00004000, /* Mask enabled for colour key */ ++ PVR2D_BLIT_COLKEY_OP_PASS = 0x00008000, /* Colour key op = pass */ ++ PVR2D_BLIT_COLKEY_OP_REJECT = 0x00010000, /* Colour key op = reject */ ++ PVR2D_BLIT_PATH_2DCORE = 0x00100000, /* Blt via dedicated 2D Core or PTLA */ ++ PVR2D_BLIT_PATH_3DCORE = 0x00200000, /* Blt via 3D Core */ ++ PVR2D_BLIT_PATH_SWBLT = 0x00400000, /* Blt via host software */ ++ PVR2D_BLIT_NO_SRC_SYNC_INFO = 0x00800000, /* Dont send a source sync info*/ ++ PVR2D_BLIT_ISSUE_STATUS_UPDATES = 0x01000000, /* Issue status updates */ ++ ++} PVR2DBLITFLAGS; ++ ++/* standard alpha-blending functions, AlphaBlendingFunc field of PVR2DBLTINFO */ ++typedef enum ++{ ++ PVR2D_ALPHA_OP_SRC_DSTINV = 1, /* source alpha : Cdst = Csrc*Asrc + Cdst*(1-Asrc) */ ++ PVR2D_ALPHA_OP_SRCP_DSTINV = 2 /* premultiplied source alpha : Cdst = Csrc + Cdst*(1-Asrc) */ ++} PVR2D_ALPHABLENDFUNC; ++ ++/* blend ops for fully specified alpha (SGX 2D Core only) */ ++typedef enum ++{ ++ PVR2D_BLEND_OP_ZERO = 0, ++ PVR2D_BLEND_OP_ONE = 1, ++ PVR2D_BLEND_OP_SRC = 2, ++ PVR2D_BLEND_OP_DST = 3, ++ PVR2D_BLEND_OP_GLOBAL = 4, ++ PVR2D_BLEND_OP_SRC_PLUS_GLOBAL = 5, ++ PVR2D_BLEND_OP_DST_PLUS_GLOBAL = 6 ++}PVR2D_BLEND_OP; ++ ++/* SGX 2D Core Fully specified alpha blend : pAlpha field of PVR2DBLTINFO structure */ ++/* a fully specified Alpha Blend operation is defined as */ ++/* DST (ALPHA) = (ALPHA_1 * SRC (ALPHA)) + (ALPHA_3 * DST (ALPHA)) */ ++/* DST (RGB) = (ALPHA_2 * SRC (RGB)) + (ALPHA_4 * DST (RGB)) */ ++/* if the pre-multiplication stage is enabled then the equations become the following: */ ++/* PRE_MUL = ((SRC(A)) * (Global Alpha Value)) */ ++/* DST (ALPHA) = (ALPHA_1 * SRC (ALPHA)) + (PRE_MUL * DST (ALPHA)) */ ++/* DST (RGB) = (ALPHA_2 * SRC (RGB)) + (PRE_MUL * DST (RGB)) */ ++/* if the transparent source alpha stage is enabled then a source alpha of zero forces the */ ++/* source to be transparent for that pixel regardless of the blend equation being used. */ ++typedef struct _PVR2D_ALPHABLT ++{ ++ PVR2D_BLEND_OP eAlpha1; ++ PVR2D_BOOL bAlpha1Invert; ++ PVR2D_BLEND_OP eAlpha2; ++ PVR2D_BOOL bAlpha2Invert; ++ PVR2D_BLEND_OP eAlpha3; ++ PVR2D_BOOL bAlpha3Invert; ++ PVR2D_BLEND_OP eAlpha4; ++ PVR2D_BOOL bAlpha4Invert; ++ PVR2D_BOOL bPremulAlpha; /* enable pre-multiplication stage */ ++ PVR2D_BOOL bTransAlpha; /* enable transparent source alpha stage */ ++ PVR2D_BOOL bUpdateAlphaLookup; /* enable and update the 1555-Lookup alpha table */ ++ PVR2D_UCHAR uAlphaLookup0; /* 8 bit alpha when A=0 in a 1555-Lookup surface */ ++ PVR2D_UCHAR uAlphaLookup1; /* 8 bit alpha when A=1 in a 1555-Lookup surface */ ++ PVR2D_UCHAR uGlobalRGB; /* Global Alpha Value for RGB, 0=transparent 255=opaque */ ++ PVR2D_UCHAR uGlobalA; /* Global Alpha Value for Alpha */ ++ ++} PVR2D_ALPHABLT, *PPVR2D_ALPHABLT; ++ ++ ++/* surface memory info structure */ ++typedef struct _PVR2DMEMINFO ++{ ++ PVR2D_VOID *pBase; ++ PVR2D_ULONG ui32MemSize; ++ PVR2D_ULONG ui32DevAddr; ++ PVR2D_ULONG ulFlags; ++ PVR2D_VOID *hPrivateData; ++ PVR2D_VOID *hPrivateMapData; ++ ++}PVR2DMEMINFO, *PPVR2DMEMINFO; ++ ++ ++#define PVR2D_MAX_DEVICE_NAME 20 ++ ++typedef struct _PVR2DDEVICEINFO ++{ ++ PVR2D_ULONG ulDevID; ++ PVR2D_CHAR szDeviceName[PVR2D_MAX_DEVICE_NAME]; ++}PVR2DDEVICEINFO; ++ ++ ++typedef struct _PVR2DISPLAYINFO ++{ ++ PVR2D_ULONG ulMaxFlipChains; ++ PVR2D_ULONG ulMaxBuffersInChain; ++ PVR2DFORMAT eFormat; ++ PVR2D_ULONG ulWidth; ++ PVR2D_ULONG ulHeight; ++ PVR2D_LONG lStride; ++ PVR2D_ULONG ulMinFlipInterval; ++ PVR2D_ULONG ulMaxFlipInterval; ++ ++}PVR2DDISPLAYINFO; ++ ++ ++typedef struct _PVR2MISCDISPLAYINFO ++{ ++ PVR2D_ULONG ulPhysicalWidthmm; ++ PVR2D_ULONG ulPhysicalHeightmm; ++ PVR2D_ULONG ulUnused[10]; ++ ++}PVR2DMISCDISPLAYINFO; ++ ++ ++typedef struct _PVR2DBLTINFO ++{ ++ PVR2D_ULONG CopyCode; /* rop code */ ++ PVR2D_ULONG Colour; /* fill colour */ ++ PVR2D_ULONG ColourKey; /* colour key argb8888 (see CKEY_ defs below) */ ++ PVR2D_UCHAR GlobalAlphaValue; /* global alpha blending */ ++ PVR2D_UCHAR AlphaBlendingFunc; /* per-pixel alpha-blending function */ ++ ++ PVR2DBLITFLAGS BlitFlags; /* additional blit control information */ ++ ++ PVR2DMEMINFO *pDstMemInfo; /* destination memory */ ++ PVR2D_ULONG DstOffset; /* byte offset from start of allocation to destination surface pixel 0,0 */ ++ PVR2D_LONG DstStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ ++ PVR2D_LONG DstX, DstY; /* pixel offset from start of dest surface to start of blt rectangle */ ++ PVR2D_LONG DSizeX,DSizeY; /* blt size */ ++ PVR2DFORMAT DstFormat; /* dest format */ ++ PVR2D_ULONG DstSurfWidth; /* size of dest surface in pixels */ ++ PVR2D_ULONG DstSurfHeight; /* size of dest surface in pixels */ ++ ++ PVR2DMEMINFO *pSrcMemInfo; /* source mem, (source fields are also used for patterns) */ ++ PVR2D_ULONG SrcOffset; /* byte offset from start of allocation to src/pat surface pixel 0,0 */ ++ PVR2D_LONG SrcStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ ++ PVR2D_LONG SrcX, SrcY; /* pixel offset from start of surface to start of source rectangle */ ++ /* for patterns this is the start offset within the pattern */ ++ PVR2D_LONG SizeX,SizeY; /* source rectangle size or pattern size in pixels */ ++ PVR2DFORMAT SrcFormat; /* source/pattern format */ ++ PVR2DMEMINFO *pPalMemInfo; /* source/pattern palette memory containing argb8888 colour table */ ++ PVR2D_ULONG PalOffset; /* byte offset from start of allocation to start of palette */ ++ PVR2D_ULONG SrcSurfWidth; /* size of source surface in pixels */ ++ PVR2D_ULONG SrcSurfHeight; /* size of source surface in pixels */ ++ ++ PVR2DMEMINFO *pMaskMemInfo; /* mask memory, 1bpp format implied */ ++ PVR2D_ULONG MaskOffset; /* byte offset from start of allocation to mask surface pixel 0,0 */ ++ PVR2D_LONG MaskStride; /* signed stride, the number of bytes from pixel 0,0 to 0,1 */ ++ PVR2D_LONG MaskX, MaskY; /* mask rect top left (mask size = blt size) */ ++ PVR2D_ULONG MaskSurfWidth; /* size of mask surface in pixels */ ++ PVR2D_ULONG MaskSurfHeight; /* size of mask surface in pixels */ ++ ++ PPVR2D_ALPHABLT pAlpha; /* fully specified alpha blend (2DCore only) */ ++ ++ PVR2D_ULONG uSrcChromaPlane1; /* mem offset from start of source alloc to chroma plane 1 */ ++ PVR2D_ULONG uSrcChromaPlane2; /* mem offset from start of source alloc to chroma plane 2 */ ++ PVR2D_ULONG uDstChromaPlane1; /* mem offset from start of dest alloc to chroma plane 1 */ ++ PVR2D_ULONG uDstChromaPlane2; /* mem offset from start of dest alloc to chroma plane 2 */ ++ ++ PVR2D_ULONG ColourKeyMask; /* 32 bit colour key mask, only valid when PVR2D_BLIT_COLKEY_MASKED is set */ ++ ++}PVR2DBLTINFO, *PPVR2DBLTINFO; ++ ++typedef struct _PVR2DRECT ++{ ++ PVR2D_LONG left, top; ++ PVR2D_LONG right, bottom; ++} PVR2DRECT; ++ ++typedef struct ++{ ++ PVR2DMEMINFO *pSurfMemInfo; /* surface memory */ ++ PVR2D_ULONG SurfOffset; /* byte offset from start of allocation to destination surface pixel 0,0 */ ++ PVR2D_LONG Stride; /* signed stride */ ++ PVR2DFORMAT Format; /* format */ ++ PVR2D_ULONG SurfWidth; /* surface width in pixels */ ++ PVR2D_ULONG SurfHeight; /* surface height in pixels */ ++ ++} PVR2D_SURFACE, *PPVR2D_SURFACE; ++ ++typedef struct ++{ ++ PVR2D_ULONG uChromaPlane1; /* YUV multiplane - byte offset from start of alloc to chroma plane 1 */ ++ PVR2D_ULONG uChromaPlane2; /* YUV multiplane - byte offset from start of alloc to chroma plane 2 */ ++ PVR2D_LONG Reserved[2]; /* Reserved, must be zero */ ++ ++} PVR2D_SURFACE_EXT, *PPVR2D_SURFACE_EXT; ++ ++typedef struct ++{ ++ PVR2D_ULONG *pUseCode; /* USSE code */ ++ PVR2D_ULONG UseCodeSize; /* usse code size in bytes */ ++ ++} PVR2D_USECODE, *PPVR2D_USECODE; ++ ++typedef struct ++{ ++ PVR2D_SURFACE sDst; /* destination surface */ ++ PVR2D_SURFACE sSrc; /* source surface */ ++ PVR2DRECT rcDest; /* destination rectangle */ ++ PVR2DRECT rcSource; /* source rectangle */ ++ PVR2D_HANDLE hUseCode; /* custom USE code (NULL implies source copy) */ ++ PVR2D_ULONG UseParams[2]; /* per-blt params for use code */ ++ ++} PVR2D_3DBLT, *PPVR2D_3DBLT; ++ ++typedef struct ++{ ++ PVR2D_SURFACE sDst; /* destination surface */ ++ PVR2DRECT rcDest; /* destination rectangle; scaling is supported */ ++ PVR2D_SURFACE sSrc; /* source surface */ ++ PVR2DRECT rcSource; /* source rectangle; scaling is supported */ ++ PPVR2D_SURFACE pSrc2; /* optional second source surface (NULL if not required) */ ++ PVR2DRECT* prcSource2; /* optional pSrc2 rectangle */ ++ PVR2D_HANDLE hUseCode; /* custom USSE shader code (NULL implies default source copy) */ ++ PVR2D_ULONG UseParams[2]; /* per-blt params for usse code */ ++ PVR2D_ULONG uiNumTemporaryRegisters; /* no. of temporary registers used in custom shader code */ ++ PVR2D_BOOL bDisableDestInput; /* set true if the destination is output only */ ++ PPVR2D_SURFACE_EXT pDstExt; /* Extended format params for dest */ ++ PPVR2D_SURFACE_EXT pSrcExt[2]; /* Extended format params for source 1 and 2 */ ++ PVR2D_LONG Reserved[4]; /* Reserved, must be zero */ ++ ++} PVR2D_3DBLT_EXT, *PPVR2D_3DBLT_EXT; ++ ++ ++#define MAKE_COPY_BLIT(src,soff,dest,doff,sx,sy,dx,dy,sz) ++ ++typedef void* PVR2DCONTEXTHANDLE; ++typedef void* PVR2DFLIPCHAINHANDLE; ++ ++ ++// CopyCode field of PVR2DBLTINFO structure: ++// the CopyCode field of the PVR2DBLTINFO structure should contain a rop3 or rop4 code. ++// a rop3 is an 8 bit code that describes a blt with three inputs : source dest and pattern ++// rop4 is a 16 bit code that describes a blt with four inputs : source dest pattern and mask ++// common rop3 codes are defined below ++// a colour fill blt is processed in the pattern channel as a constant colour with a rop code of 0xF0 ++// PVR2D_BLIT_PAT_SURFACE_ENABLE defines whether the pattern channel is a surface or a fill colour. ++// a rop4 is defined by two rop3 codes, and the 1 bit-per-pixel mask surface defines which is used. ++// a common rop4 is 0xAAF0 which is the mask copy blt used for text glyphs. ++// CopyCode is taken to be a rop4 when pMaskMemInfo is non zero, otherwise it is assumed to be a rop3 ++// use the PVR2DMASKROP4 macro below to construct a rop4 from two rop3's ++// rop3a is the rop used when mask pixel = 1, and rop3b when mask = 0 ++#define PVR2DROP4(rop3b, rop3a) ((rop3b<<8)|rop3a) ++ ++/* common rop codes */ ++#define PVR2DROPclear 0x00 /* 0 (whiteness) */ ++#define PVR2DROPset 0xFF /* 1 (blackness) */ ++#define PVR2DROPnoop 0xAA /* dst (used for masked blts) */ ++ ++/* source and dest rop codes */ ++#define PVR2DROPand 0x88 /* src AND dst */ ++#define PVR2DROPandReverse 0x44 /* src AND NOT dst */ ++#define PVR2DROPcopy 0xCC /* src (used for source copy and alpha blts) */ ++#define PVR2DROPandInverted 0x22 /* NOT src AND dst */ ++#define PVR2DROPxor 0x66 /* src XOR dst */ ++#define PVR2DROPor 0xEE /* src OR dst */ ++#define PVR2DROPnor 0x11 /* NOT src AND NOT dst */ ++#define PVR2DROPequiv 0x99 /* NOT src XOR dst */ ++#define PVR2DROPinvert 0x55 /* NOT dst */ ++#define PVR2DROPorReverse 0xDD /* src OR NOT dst */ ++#define PVR2DROPcopyInverted 0x33 /* NOT src */ ++#define PVR2DROPorInverted 0xBB /* NOT src OR dst */ ++#define PVR2DROPnand 0x77 /* NOT src OR NOT dst */ ++ ++/* pattern rop codes */ ++#define PVR2DPATROPand 0xA0 /* pat AND dst */ ++#define PVR2DPATROPandReverse 0x50 /* pat AND NOT dst */ ++#define PVR2DPATROPcopy 0xF0 /* pat (used for solid color fills and pattern blts) */ ++#define PVR2DPATROPandInverted 0x0A /* NOT pat AND dst */ ++#define PVR2DPATROPxor 0x5A /* pat XOR dst */ ++#define PVR2DPATROPor 0xFA /* pat OR dst */ ++#define PVR2DPATROPnor 0x05 /* NOT pat AND NOT dst */ ++#define PVR2DPATROPequiv 0xA5 /* NOT pat XOR dst */ ++#define PVR2DPATROPinvert 0x55 /* NOT dst */ ++#define PVR2DPATROPorReverse 0xF5 /* pat OR NOT dst */ ++#define PVR2DPATROPcopyInverted 0x0F /* NOT pat */ ++#define PVR2DPATROPorInverted 0xAF /* NOT pat OR dst */ ++#define PVR2DPATROPnand 0x5F /* NOT pat OR NOT dst */ ++ ++/* common rop4 codes */ ++#define PVR2DROP4MaskedCopy PVR2DROP4(PVR2DROPnoop,PVR2DROPcopy) /* masked source copy blt (used for rounded window corners etc) */ ++#define PVR2DROP4MaskedFill PVR2DROP4(PVR2DROPnoop,PVR2DPATROPcopy) /* masked colour fill blt (used for text) */ ++ ++/* Legacy support */ ++#define PVR2DROP3_PATMASK PVR2DPATROPcopy ++#define PVR2DROP3_SRCMASK PVR2DROPcopy ++ ++/* pixmap memory alignment */ ++#define PVR2D_ALIGNMENT_4 4 /* DWORD alignment */ ++#define PVR2D_ALIGNMENT_ANY 0 /* no alignment */ ++#define PVR2D_ALIGNMENT_PALETTE 16 /* 16 byte alignment is required for palettes */ ++ ++/* Heap number for PVR2DGetFrameBuffer */ ++#define PVR2D_FB_PRIMARY_SURFACE 0 ++ ++#define PVR2D_PRESENT_PROPERTY_SRCSTRIDE (1UL << 0) ++#define PVR2D_PRESENT_PROPERTY_DSTSIZE (1UL << 1) ++#define PVR2D_PRESENT_PROPERTY_DSTPOS (1UL << 2) ++#define PVR2D_PRESENT_PROPERTY_CLIPRECTS (1UL << 3) ++#define PVR2D_PRESENT_PROPERTY_INTERVAL (1UL << 4) ++ ++#define PVR2D_CREATE_FLIPCHAIN_SHARED (1UL << 0) ++#define PVR2D_CREATE_FLIPCHAIN_QUERY (1UL << 1) ++#define PVR2D_CREATE_FLIPCHAIN_OEMOVERLAY (1UL << 2) ++#define PVR2D_CREATE_FLIPCHAIN_AS_BLITCHAIN (1UL << 3) ++ ++/* Colour-key colour must be translated into argb8888 format */ ++#define CKEY_8888(P) (P) ++#define CKEY_4444(P) (((P&0xF000UL)<<16) | ((P&0x0F00UL)<<12) | ((P&0x00F0UL)<<8) | ((P&0x000FUL)<<4)) ++#define CKEY_1555(P) (((P&0x8000UL)<<16) | ((P&0x7C00UL)<<9) | ((P&0x3E0UL)<<6) | ((P&0x1FUL)<<3)) ++#define CKEY_565(P) (((P&0xF800UL)<<8) | ((P&0x7E0UL)<<5) | ((P&0x1FUL)<<3)) ++#define CKEY_MASK_8888 0x00FFFFFFUL ++#define CKEY_MASK_4444 0x00F0F0F0UL ++#define CKEY_MASK_1555 0x00F8F8F8UL /* Alpha is not normally included in the key test */ ++#define CKEY_MASK_565 0x00F8FCF8UL ++ ++/* Fill colours must be translated into argb8888 format */ ++#define CFILL_4444(P) (((P&0xF000UL)<<16) | ((P&0x0F00UL)<<12) | ((P&0x00F0UL)<<8) | ((P&0x000FUL)<<4)) ++#define CFILL_1555(P) (((P&0x8000UL)<<16) | ((P&0x7C00UL)<<9) | ((P&0x3E0UL)<<6) | ((P&0x1FUL)<<3)) ++#define CFILL_565(P) (((P&0xF800UL)<<8) | ((P&0x7E0UL)<<5) | ((P&0x1FUL)<<3)) ++ ++/* PVR2DCreateDeviceContext flags */ ++#define PVR2D_XSERVER_PROC 0x00000001UL /*!< Set for the Xserver connection */ ++ ++/* PVR2DMemAlloc flags */ ++#define PVR2D_MEM_UNCACHED 0x00000000UL /* Default */ ++#define PVR2D_MEM_CACHED 0x00000001UL /* Caller must flush and sync when necessary */ ++#define PVR2D_MEM_WRITECOMBINE 0x00000002UL ++ ++/* Functions that the library exports */ ++ ++PVR2D_IMPORT ++int PVR2DEnumerateDevices(PVR2DDEVICEINFO *pDevInfo); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DCreateDeviceContext(PVR2D_ULONG ulDevID, ++ PVR2DCONTEXTHANDLE* phContext, ++ PVR2D_ULONG ulFlags); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DDestroyDeviceContext(PVR2DCONTEXTHANDLE hContext); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DGetDeviceInfo(PVR2DCONTEXTHANDLE hContext, ++ PVR2DDISPLAYINFO *pDisplayInfo); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DGetMiscDisplayInfo(PVR2DCONTEXTHANDLE hContext, ++ PVR2DMISCDISPLAYINFO *pMiscDisplayInfo); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DGetScreenMode(PVR2DCONTEXTHANDLE hContext, ++ PVR2DFORMAT *pFormat, ++ PVR2D_LONG *plWidth, ++ PVR2D_LONG *plHeight, ++ PVR2D_LONG *plStride, ++ PVR2D_INT *piRefreshRate); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DGetFrameBuffer(PVR2DCONTEXTHANDLE hContext, ++ PVR2D_INT nHeap, ++ PVR2DMEMINFO **ppsMemInfo); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DMemAlloc(PVR2DCONTEXTHANDLE hContext, ++ PVR2D_ULONG ulBytes, ++ PVR2D_ULONG ulAlign, ++ PVR2D_ULONG ulFlags, ++ PVR2DMEMINFO **ppsMemInfo); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DMemExport(PVR2DCONTEXTHANDLE hContext, ++ PVR2D_ULONG ulFlags, ++ PVR2DMEMINFO *psMemInfo, ++ PVR2D_HANDLE *phMemHandle); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DMemWrap(PVR2DCONTEXTHANDLE hContext, ++ PVR2D_VOID *pMem, ++ PVR2D_ULONG ulFlags, ++ PVR2D_ULONG ulBytes, ++ PVR2D_ULONG alPageAddress[], ++ PVR2DMEMINFO **ppsMemInfo); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DMemMap(PVR2DCONTEXTHANDLE hContext, ++ PVR2D_ULONG ulFlags, ++ PVR2D_HANDLE hMemHandle, ++ PVR2DMEMINFO **ppsDstMem); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DMemFree(PVR2DCONTEXTHANDLE hContext, ++ PVR2DMEMINFO *psMemInfo); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DBlt(PVR2DCONTEXTHANDLE hContext, ++ PVR2DBLTINFO *pBltInfo); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DBltClipped(PVR2DCONTEXTHANDLE hContext, ++ PVR2DBLTINFO *pBltInfo, ++ PVR2D_ULONG ulNumClipRects, ++ PVR2DRECT *pClipRects); ++ ++PVR2D_EXPORT ++PVR2DERROR PVR2DSet1555Alpha (PVR2DCONTEXTHANDLE hContext, ++ PVR2D_UCHAR Alpha0, PVR2D_UCHAR Alpha1); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DQueryBlitsComplete(PVR2DCONTEXTHANDLE hContext, ++ const PVR2DMEMINFO *pMemInfo, ++ PVR2D_UINT uiWaitForComplete); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DSetPresentBltProperties(PVR2DCONTEXTHANDLE hContext, ++ PVR2D_ULONG ulPropertyMask, ++ PVR2D_LONG lSrcStride, ++ PVR2D_ULONG ulDstWidth, ++ PVR2D_ULONG ulDstHeight, ++ PVR2D_LONG lDstXPos, ++ PVR2D_LONG lDstYPos, ++ PVR2D_ULONG ulNumClipRects, ++ PVR2DRECT *pClipRects, ++ PVR2D_ULONG ulSwapInterval); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DPresentBlt(PVR2DCONTEXTHANDLE hContext, ++ PVR2DMEMINFO *pMemInfo, ++ PVR2D_LONG lRenderID); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DCreateFlipChain(PVR2DCONTEXTHANDLE hContext, ++ PVR2D_ULONG ulFlags, ++ PVR2D_ULONG ulNumBuffers, ++ PVR2D_ULONG ulWidth, ++ PVR2D_ULONG ulHeight, ++ PVR2DFORMAT eFormat, ++ PVR2D_LONG *plStride, ++ PVR2D_ULONG *pulFlipChainID, ++ PVR2DFLIPCHAINHANDLE *phFlipChain); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DDestroyFlipChain(PVR2DCONTEXTHANDLE hContext, ++ PVR2DFLIPCHAINHANDLE hFlipChain); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DGetFlipChainBuffers(PVR2DCONTEXTHANDLE hContext, ++ PVR2DFLIPCHAINHANDLE hFlipChain, ++ PVR2D_ULONG *pulNumBuffers, ++ PVR2DMEMINFO *psMemInfo[]); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DSetPresentFlipProperties(PVR2DCONTEXTHANDLE hContext, ++ PVR2DFLIPCHAINHANDLE hFlipChain, ++ PVR2D_ULONG ulPropertyMask, ++ PVR2D_LONG lDstXPos, ++ PVR2D_LONG lDstYPos, ++ PVR2D_ULONG ulNumClipRects, ++ PVR2DRECT *pClipRects, ++ PVR2D_ULONG ulSwapInterval); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DPresentFlip(PVR2DCONTEXTHANDLE hContext, ++ PVR2DFLIPCHAINHANDLE hFlipChain, ++ PVR2DMEMINFO *psMemInfo, ++ PVR2D_LONG lRenderID); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DGetAPIRev(PVR2D_LONG *lRevMajor, PVR2D_LONG *lRevMinor); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DLoadUseCode (const PVR2DCONTEXTHANDLE hContext, const PVR2D_UCHAR *pUseCode, ++ const PVR2D_ULONG UseCodeSize, PVR2D_HANDLE *pUseCodeHandle); ++PVR2D_IMPORT ++PVR2DERROR PVR2DFreeUseCode (const PVR2DCONTEXTHANDLE hContext, const PVR2D_HANDLE hUseCodeHandle); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DBlt3D (const PVR2DCONTEXTHANDLE hContext, const PPVR2D_3DBLT pBlt3D); ++ ++PVR2D_IMPORT ++PVR2DERROR PVR2DBlt3DExt (const PVR2DCONTEXTHANDLE hContext, const PPVR2D_3DBLT_EXT pBlt3D); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* _PVR2D_H_ */ ++ ++/****************************************************************************** ++ End of file (pvr2d.h) ++******************************************************************************/ +diff -Nurp qt-everywhere-opensource-src-4.6.3-orig//src/3rdparty/powervr/wsegl2/wsegl.h qt-everywhere-opensource-src-4.6.3/src/3rdparty/powervr/wsegl2/wsegl.h +--- qt-everywhere-opensource-src-4.6.3-orig//src/3rdparty/powervr/wsegl2/wsegl.h 1970-01-01 00:00:00.000000000 +0000 ++++ qt-everywhere-opensource-src-4.6.3/src/3rdparty/powervr/wsegl2/wsegl.h 2011-05-16 22:51:52.702601769 +0000 +@@ -0,0 +1,285 @@ ++/********************************************************************** ++* ++* Copyright(c) Imagination Technologies Ltd. ++* ++* The contents of this file are subject to the MIT license as set out below. ++* ++* Permission is hereby granted, free of charge, to any person obtaining a copy ++* of this software and associated documentation files (the "Software"), ++* to deal in the Software without restriction, including without limitation ++* the rights to use, copy, modify, merge, publish, distribute, sublicense, ++* and/or sell copies of the Software, and to permit persons to whom the ++* Software is furnished to do so, subject to the following conditions: ++* ++* The above copyright notice and this permission notice shall be included ++* in all copies or substantial portions of the Software. ++* ++* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, ++* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT ++* OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE ++* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ++* ++* This License is also included in this distribution in the file called ++* "COPYING". ++* ++******************************************************************************/ ++ ++ ++ ++#if !defined(__WSEGL_H__) ++#define __WSEGL_H__ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++// WSEGL Platform-specific definitions ++*/ ++#if defined(__linux__) ++#define WSEGL_EXPORT __attribute__((visibility("default"))) ++#define WSEGL_IMPORT ++#else ++#define WSEGL_EXPORT ++#define WSEGL_IMPORT ++#endif ++ ++/* ++// WSEGL API Version Number ++*/ ++ ++#define WSEGL_VERSION 2 ++#define WSEGL_DEFAULT_DISPLAY 0 ++#define WSEGL_DEFAULT_NATIVE_ENGINE 0 ++ ++#define WSEGL_FALSE 0 ++#define WSEGL_TRUE 1 ++#define WSEGL_NULL 0 ++ ++#define WSEGL_UNREFERENCED_PARAMETER(param) (param) = (param) ++ ++/* ++// WSEGL handles ++*/ ++typedef void *WSEGLDisplayHandle; ++typedef void *WSEGLDrawableHandle; ++ ++/* ++// Display capability type ++*/ ++typedef enum WSEGLCapsType_TAG ++{ ++ WSEGL_NO_CAPS = 0, ++ WSEGL_CAP_MIN_SWAP_INTERVAL = 1, /* System default value = 1 */ ++ WSEGL_CAP_MAX_SWAP_INTERVAL = 2, /* System default value = 1 */ ++ WSEGL_CAP_WINDOWS_USE_HW_SYNC = 3, /* System default value = 0 (FALSE) */ ++ WSEGL_CAP_PIXMAPS_USE_HW_SYNC = 4, /* System default value = 0 (FALSE) */ ++ ++} WSEGLCapsType; ++ ++/* ++// Display capability ++*/ ++typedef struct WSEGLCaps_TAG ++{ ++ WSEGLCapsType eCapsType; ++ unsigned long ui32CapsValue; ++ ++} WSEGLCaps; ++ ++/* ++// Drawable type ++*/ ++#define WSEGL_NO_DRAWABLE 0x0 ++#define WSEGL_DRAWABLE_WINDOW 0x1 ++#define WSEGL_DRAWABLE_PIXMAP 0x2 ++ ++ ++/* ++// Pixel format of display/drawable ++*/ ++typedef enum WSEGLPixelFormat_TAG ++{ ++ /* These must not be re-ordered */ ++ WSEGL_PIXELFORMAT_RGB565 = 0, ++ WSEGL_PIXELFORMAT_ARGB4444 = 1, ++ WSEGL_PIXELFORMAT_ARGB8888 = 2, ++ WSEGL_PIXELFORMAT_ARGB1555 = 3, ++ WSEGL_PIXELFORMAT_ABGR8888 = 4, ++ WSEGL_PIXELFORMAT_XBGR8888 = 5, ++ ++ /* These are compatibility names only; new WSEGL ++ * modules should not use them. ++ */ ++ WSEGL_PIXELFORMAT_565 = WSEGL_PIXELFORMAT_RGB565, ++ WSEGL_PIXELFORMAT_4444 = WSEGL_PIXELFORMAT_ARGB4444, ++ WSEGL_PIXELFORMAT_8888 = WSEGL_PIXELFORMAT_ARGB8888, ++ WSEGL_PIXELFORMAT_1555 = WSEGL_PIXELFORMAT_ARGB1555, ++ ++} WSEGLPixelFormat; ++ ++/* ++// Transparent of display/drawable ++*/ ++typedef enum WSEGLTransparentType_TAG ++{ ++ WSEGL_OPAQUE = 0, ++ WSEGL_COLOR_KEY = 1, ++ ++} WSEGLTransparentType; ++ ++/* ++// Display/drawable configuration ++*/ ++typedef struct WSEGLConfig_TAG ++{ ++ /* ++ // Type of drawables this configuration applies to - ++ // OR'd values of drawable types. ++ */ ++ unsigned long ui32DrawableType; ++ ++ /* Pixel format */ ++ WSEGLPixelFormat ePixelFormat; ++ ++ /* Native Renderable - set to WSEGL_TRUE if native renderable */ ++ unsigned long ulNativeRenderable; ++ ++ /* FrameBuffer Level Parameter */ ++ unsigned long ulFrameBufferLevel; ++ ++ /* Native Visual ID */ ++ unsigned long ulNativeVisualID; ++ ++ /* Native Visual */ ++ void *hNativeVisual; ++ ++ /* Transparent Type */ ++ WSEGLTransparentType eTransparentType; ++ ++ /* Transparent Color - only used if transparent type is COLOR_KEY */ ++ unsigned long ulTransparentColor; /* packed as 0x00RRGGBB */ ++ ++ ++} WSEGLConfig; ++ ++/* ++// WSEGL errors ++*/ ++typedef enum WSEGLError_TAG ++{ ++ WSEGL_SUCCESS = 0, ++ WSEGL_CANNOT_INITIALISE = 1, ++ WSEGL_BAD_NATIVE_DISPLAY = 2, ++ WSEGL_BAD_NATIVE_WINDOW = 3, ++ WSEGL_BAD_NATIVE_PIXMAP = 4, ++ WSEGL_BAD_NATIVE_ENGINE = 5, ++ WSEGL_BAD_DRAWABLE = 6, ++ WSEGL_BAD_MATCH = 7, ++ WSEGL_OUT_OF_MEMORY = 8, ++ ++ /* These are compatibility names only; new WSEGL ++ * modules should not use them. ++ */ ++ WSEGL_BAD_CONFIG = WSEGL_BAD_MATCH, ++ ++} WSEGLError; ++ ++/* ++// Drawable orientation (in degrees anti-clockwise) ++*/ ++typedef enum WSEGLRotationAngle_TAG ++{ ++ WSEGL_ROTATE_0 = 0, ++ WSEGL_ROTATE_90 = 1, ++ WSEGL_ROTATE_180 = 2, ++ WSEGL_ROTATE_270 = 3 ++ ++} WSEGLRotationAngle; ++ ++/* ++// Drawable information required by OpenGL-ES driver ++*/ ++typedef struct WSEGLDrawableParams_TAG ++{ ++ /* Width in pixels of the drawable */ ++ unsigned long ui32Width; ++ ++ /* Height in pixels of the drawable */ ++ unsigned long ui32Height; ++ ++ /* Stride in pixels of the drawable */ ++ unsigned long ui32Stride; ++ ++ /* Pixel format of the drawable */ ++ WSEGLPixelFormat ePixelFormat; ++ ++ /* User space cpu virtual address of the drawable */ ++ void *pvLinearAddress; ++ ++ /* HW address of the drawable */ ++ unsigned long ui32HWAddress; ++ ++ /* Private data for the drawable */ ++ void *hPrivateData; ++ ++ ++} WSEGLDrawableParams; ++ ++ ++/* ++// Table of function pointers that is returned by WSEGL_GetFunctionTablePointer() ++// ++// The first entry in the table is the version number of the wsegl.h header file that ++// the module has been written against, and should therefore be set to WSEGL_VERSION ++*/ ++typedef struct WSEGL_FunctionTable_TAG ++{ ++ unsigned long ui32WSEGLVersion; ++ ++ WSEGLError (*pfnWSEGL_IsDisplayValid)(NativeDisplayType); ++ ++ WSEGLError (*pfnWSEGL_InitialiseDisplay)(NativeDisplayType, WSEGLDisplayHandle *, const WSEGLCaps **, WSEGLConfig **); ++ ++ WSEGLError (*pfnWSEGL_CloseDisplay)(WSEGLDisplayHandle); ++ ++ WSEGLError (*pfnWSEGL_CreateWindowDrawable)(WSEGLDisplayHandle, WSEGLConfig *, WSEGLDrawableHandle *, NativeWindowType, WSEGLRotationAngle *); ++ ++ WSEGLError (*pfnWSEGL_CreatePixmapDrawable)(WSEGLDisplayHandle, WSEGLConfig *, WSEGLDrawableHandle *, NativePixmapType, WSEGLRotationAngle *); ++ ++ WSEGLError (*pfnWSEGL_DeleteDrawable)(WSEGLDrawableHandle); ++ ++ WSEGLError (*pfnWSEGL_SwapDrawable)(WSEGLDrawableHandle, unsigned long); ++ ++ WSEGLError (*pfnWSEGL_SwapControlInterval)(WSEGLDrawableHandle, unsigned long); ++ ++ WSEGLError (*pfnWSEGL_WaitNative)(WSEGLDrawableHandle, unsigned long); ++ ++ WSEGLError (*pfnWSEGL_CopyFromDrawable)(WSEGLDrawableHandle, NativePixmapType); ++ ++ WSEGLError (*pfnWSEGL_CopyFromPBuffer)(void *, unsigned long, unsigned long, unsigned long, WSEGLPixelFormat, NativePixmapType); ++ ++ WSEGLError (*pfnWSEGL_GetDrawableParameters)(WSEGLDrawableHandle, WSEGLDrawableParams *, WSEGLDrawableParams *); ++ ++ WSEGLError (*pfnWSEGL_ConnectDrawable)(WSEGLDrawableHandle); ++ ++ WSEGLError (*pfnWSEGL_DisconnectDrawable)(WSEGLDrawableHandle); ++ ++ ++} WSEGL_FunctionTable; ++ ++ ++WSEGL_IMPORT const WSEGL_FunctionTable *WSEGL_GetFunctionTablePointer(void); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* __WSEGL_H__ */ ++ ++/****************************************************************************** ++ End of file (wsegl.h) ++******************************************************************************/ +diff -Nurp qt-everywhere-opensource-src-4.6.3-orig//src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c qt-everywhere-opensource-src-4.6.3/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c +--- qt-everywhere-opensource-src-4.6.3-orig//src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c 2010-06-02 02:03:17.000000000 +0000 ++++ qt-everywhere-opensource-src-4.6.3/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c 2011-05-16 23:08:51.618597097 +0000 +@@ -378,6 +378,20 @@ static WSEGLError wseglGetDrawableParame + return WSEGL_SUCCESS; + } + ++/* Function stub for ConnectDrawable() */ ++static WSEGLError wseglConnectDrawable(WSEGLDrawableHandle hDrawable) ++{ ++ WSEGL_UNREFERENCED_PARAMETER(hDrawable); ++ return WSEGL_SUCCESS; ++} ++ ++/* Function stub for DisconnectDrawable() */ ++static WSEGLError wseglDisconnectDrawable(WSEGLDrawableHandle hDrawable) ++{ ++ WSEGL_UNREFERENCED_PARAMETER(hDrawable); ++ return WSEGL_SUCCESS; ++} ++ + static WSEGL_FunctionTable const wseglFunctions = { + WSEGL_VERSION, + wseglIsDisplayValid, +@@ -391,7 +405,9 @@ static WSEGL_FunctionTable const wseglFu + wseglWaitNative, + wseglCopyFromDrawable, + wseglCopyFromPBuffer, +- wseglGetDrawableParameters ++ wseglGetDrawableParameters, ++ wseglConnectDrawable, ++ wseglDisconnectDrawable + }; + + /* Return the table of WSEGL functions to the EGL implementation */ diff --git a/recipes/qt4/files/blacklist-fraudulent-comodo-certificates-patch.diff b/recipes/qt4/files/blacklist-fraudulent-comodo-certificates-patch.diff new file mode 100644 index 0000000000..00faf75932 --- /dev/null +++ b/recipes/qt4/files/blacklist-fraudulent-comodo-certificates-patch.diff @@ -0,0 +1,134 @@ +Security advisory: Fraudulent certificates + +Background: + +Recently a group of people managed to get fraudulent SSL certificates signed +by a Certificate Authority (CA). + +These certificates potentially enable their owners to pretend to be other +entities on the Web; the attackers can present valid certificates for e.g. +mail.google.com, login.yahoo.com and login.live.com, among others. + +The patch below solves this problem by blacklisting those fake certificates +and aborting an SSL handshake with entities that present these certificates. +The patch applies to all 4.6 and 4.7 versions, and should be applied to all Qt +4.6.x and 4.7.x versions; upcoming Qt releases will contain a fix for this +problem. + +More technical background: + +In order to trick a user into establishing an SSL connection to a site using +one of those fake certificates, in addition to controlling the certificate, an +attacker would need to either control the DNS server used by the victim, or +have control over a proxy that the victim uses. That way, the attacker could +trick the victim to connect to the attacker?s site and then present the user +with a valid certificate. + +One obvious question now is: Should those certificates not just be revoked, +which would solve the problem? + +First, they have been revoked by the affected Certificate Authority (see above +link). + +However, the problem in this case, and probably part of the reason why most +browser vendors release new versions blacklisting those certificates, is that +by default browsers do not treat invalid responses from an OCSP server (a +server used for checking the revocation status of a certificate) as fatal, and +will allow the SSL connection to proceed anyway. Qt itself does not support +OCSP yet, which makes blacklisting the certificates the only valid option (now +would be a good moment to vote on the task for implementing OCSP in Qt); since +Qt is relying on the system root certificates since version 4.7, it cannot +control the root certificates that Qt trusts automatically anymore. + +http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html +http://qt.nokia.com/files/qt-patches/blacklist-fraudulent-comodo-certificates-patch.diff/view + +diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp +index 618ac79..a5cdf01 100644 +--- a/src/network/ssl/qsslcertificate.cpp ++++ b/src/network/ssl/qsslcertificate.cpp +@@ -219,17 +219,19 @@ bool QSslCertificate::isNull() const + Returns true if this certificate is valid; otherwise returns + false. + +- Note: Currently, this function only checks that the current ++ Note: Currently, this function checks that the current + data-time is within the date-time range during which the +- certificate is considered valid. No other checks are +- currently performed. ++ certificate is considered valid, and checks that the ++ certificate is not in a blacklist of fraudulent certificates. + + \sa isNull() + */ + bool QSslCertificate::isValid() const + { + const QDateTime currentTime = QDateTime::currentDateTime(); +- return currentTime >= d->notValidBefore && currentTime <= d->notValidAfter; ++ return currentTime >= d->notValidBefore && ++ currentTime <= d->notValidAfter && ++ ! QSslCertificatePrivate::isBlacklisted(*this); + } + + /*! +@@ -798,6 +800,30 @@ QList QSslCertificatePrivate::certificatesFromDer(const QByteAr + return certificates; + } + ++// These certificates are known to be fraudulent and were created during the comodo ++// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html ++static const char *certificate_blacklist[] = { ++ "04:7e:cb:e9:fc:a5:5f:7b:d0:9e:ae:36:e1:0c:ae:1e", ++ "f5:c8:6a:f3:61:62:f1:3a:64:f5:4f:6d:c9:58:7c:06", ++ "d7:55:8f:da:f5:f1:10:5b:b2:13:28:2b:70:77:29:a3", ++ "39:2a:43:4f:0e:07:df:1f:8a:a3:05:de:34:e0:c2:29", ++ "3e:75:ce:d4:6b:69:30:21:21:88:30:ae:86:a8:2a:71", ++ "e9:02:8b:95:78:e4:15:dc:1a:71:0a:2b:88:15:44:47", ++ "92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43", ++ "b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0", ++ "d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0", ++ 0 ++}; ++ ++bool QSslCertificatePrivate::isBlacklisted(const QSslCertificate &certificate) ++{ ++ for (int a = 0; certificate_blacklist[a] != 0; a++) { ++ if (certificate.serialNumber() == certificate_blacklist[a]) ++ return true; ++ } ++ return false; ++} ++ + #ifndef QT_NO_DEBUG_STREAM + QDebug operator<<(QDebug debug, const QSslCertificate &certificate) + { +diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h +index cdceb0f..1ce33d3 100644 +--- a/src/network/ssl/qsslcertificate_p.h ++++ b/src/network/ssl/qsslcertificate_p.h +@@ -96,6 +96,7 @@ public: + static QSslCertificate QSslCertificate_from_X509(X509 *x509); + static QList certificatesFromPem(const QByteArray &pem, int count = -1); + static QList certificatesFromDer(const QByteArray &der, int count = -1); ++ static bool isBlacklisted(const QSslCertificate &certificate); + + friend class QSslSocketBackendPrivate; + +diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp +index 0866534..2427193 100644 +--- a/src/network/ssl/qsslsocket_openssl.cpp ++++ b/src/network/ssl/qsslsocket_openssl.cpp +@@ -1193,6 +1193,13 @@ bool QSslSocketBackendPrivate::startHandshake() + X509 *x509 = q_SSL_get_peer_certificate(ssl); + configuration.peerCertificate = QSslCertificatePrivate::QSslCertificate_from_X509(x509); + q_X509_free(x509); ++ if (QSslCertificatePrivate::isBlacklisted(configuration.peerCertificate)) { ++ q->setErrorString(QSslSocket::tr("The peer certificate is blacklisted")); ++ q->setSocketError(QAbstractSocket::SslHandshakeFailedError); ++ emit q->error(QAbstractSocket::SslHandshakeFailedError); ++ plainSocket->disconnectFromHost(); ++ return false; ++ } + + // Start translating errors. + QList errors; diff --git a/recipes/qt4/qt-4.6.3.inc b/recipes/qt4/qt-4.6.3.inc index 5b91116a77..f8705fa79a 100644 --- a/recipes/qt4/qt-4.6.3.inc +++ b/recipes/qt4/qt-4.6.3.inc @@ -1,17 +1,21 @@ DEFAULT_PREFERENCE = "-1" +LICENSE = "LGPLv2.1 GPLv3" FILESPATHPKG .= ":qt-${PV}" SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ + file://blacklist-fraudulent-comodo-certificates-patch.diff \ file://0001-cross-compile.patch \ file://0002-fix-resinit-declaration.patch \ file://0004-no-qmake.patch \ + file://hack-out-pg_config.patch \ file://0006-freetype-host-includes.patch \ file://0008-qt-lib-infix.patch \ file://0009-support-2bpp.patch \ file://0010-no-simpledecoration-example.patch \ file://fix-config-tests.patch \ file://qt-config.patch \ + file://0001-wsegl2-support.patch \ file://g++.conf \ file://linux.conf \ " @@ -43,11 +47,6 @@ QT_GLFLAGS ?= "" QT_CONFIG_FLAGS += " -no-rpath -qt3support -reduce-relocations -silent ${QT_GLFLAGS}" do_compile() { - # Fixup missing wsegl header in some SGX SDKs - if ! [ -e ${STAGING_INCDIR}/wsegl.h ] ; then - cp src/3rdparty/powervr/wsegl.h src/plugins/gfxdrivers/powervr/QWSWSEGL/ - fi - unset CFLAGS CXXFLAGS oe_runmake ${EXTRA_ENV} } @@ -64,10 +63,5 @@ do_install_append() { fi } -LICENSE = "LGPLv2.1 GPLv3" -SRC_URI += " \ - file://hack-out-pg_config.patch" - SRC_URI[md5sum] = "5c69f16d452b0bb3d44bc3c10556c072" SRC_URI[sha256sum] = "f4e0ada8d4d516bbb8600a3ee7d9046c9c79e38cd781df9ffc46d8f16acd1768" - diff --git a/recipes/qt4/qt-4.7.1.inc b/recipes/qt4/qt-4.7.1.inc index ef54753172..bf3f39edff 100644 --- a/recipes/qt4/qt-4.7.1.inc +++ b/recipes/qt4/qt-4.7.1.inc @@ -5,10 +5,12 @@ FILESPATHPKG =. "qt-${PV}:" SRC_URI = "\ ftp://ftp.trolltech.com/qt/source/qt-everywhere-opensource-src-${PV}.tar.gz \ + file://blacklist-fraudulent-comodo-certificates-patch.diff \ file://0004-no-qmake.patch \ - file://hack-out-pg2-4.7.0.patch \ + file://hack-out-pg2-4.7.0.patch \ file://0006-freetype-host-includes.patch \ file://0001-Added-Openembedded-crossarch-option.patch \ + file://0010-phonon-gstreamer-rgb-endianess.patch \ file://g++.conf \ file://linux.conf \ " diff --git a/recipes/qt4/qt-4.7.1/0010-phonon-gstreamer-rgb-endianess.patch b/recipes/qt4/qt-4.7.1/0010-phonon-gstreamer-rgb-endianess.patch new file mode 100644 index 0000000000..d43366c3a4 --- /dev/null +++ b/recipes/qt4/qt-4.7.1/0010-phonon-gstreamer-rgb-endianess.patch @@ -0,0 +1,23 @@ +--- a/src/3rdparty/phonon/gstreamer/qwidgetvideosink.cpp ++++ b/src/3rdparty/phonon/gstreamer/qwidgetvideosink.cpp +@@ -18,6 +18,7 @@ + #include + #include "videowidget.h" + #include "qwidgetvideosink.h" ++#include + + QT_BEGIN_NAMESPACE + +@@ -106,11 +107,7 @@ static GstStaticPadTemplate template_factory_rgb = + GST_STATIC_PAD_TEMPLATE("sink", + GST_PAD_SINK, + GST_PAD_ALWAYS, +- GST_STATIC_CAPS("video/x-raw-rgb, " +- "framerate = (fraction) [ 0, MAX ], " +- "width = (int) [ 1, MAX ], " +- "height = (int) [ 1, MAX ]," +- "bpp = (int) 32")); ++ GST_STATIC_CAPS(GST_VIDEO_CAPS_xRGB_HOST_ENDIAN)); + + template + struct template_factory; diff --git a/recipes/qt4/qt4-embedded.inc b/recipes/qt4/qt4-embedded.inc index 223c4f3ada..79ce00599c 100644 --- a/recipes/qt4/qt4-embedded.inc +++ b/recipes/qt4/qt4-embedded.inc @@ -4,7 +4,7 @@ LICENSE = "GPL QPL" PRIORITY = "optional" HOMEPAGE = "http://www.trolltech.com" DEPENDS += "directfb tslib" -INC_PR = "r27" +INC_PR = "r29" QT_BASE_NAME ?= "qt4-embedded" QT_BASE_LIB ?= "libqt-embedded" @@ -34,7 +34,7 @@ QT_CONFIG_FLAGS += " \ -qtlibinfix ${QT_LIBINFIX} \ -plugin-gfx-transformed -plugin-gfx-qvfb -plugin-gfx-vnc -plugin-gfx-directfb \ -plugin-mouse-tslib -qt-mouse-pc -qt-mouse-qvfb -qt-mouse-linuxinput \ - -qt-kbd-tty \ + -qt-kbd-tty -qt-kbd-linuxinput \ -DQT_KEYPAD_NAVIGATION \ " diff --git a/recipes/qt4/qt4-embedded_4.6.3.bb b/recipes/qt4/qt4-embedded_4.6.3.bb index 13f3f00edf..fe49fdba8f 100644 --- a/recipes/qt4/qt4-embedded_4.6.3.bb +++ b/recipes/qt4/qt4-embedded_4.6.3.bb @@ -1,6 +1,6 @@ require qt4-embedded.inc -PR = "${INC_PR}.1" +PR = "${INC_PR}.2" QT_CONFIG_FLAGS_append_armv6 = " -no-neon " diff --git a/recipes/qt4/qt4-embedded_4.7.1.bb b/recipes/qt4/qt4-embedded_4.7.1.bb index 1cd43a664b..7e3d4b8325 100644 --- a/recipes/qt4/qt4-embedded_4.7.1.bb +++ b/recipes/qt4/qt4-embedded_4.7.1.bb @@ -2,7 +2,7 @@ DEFAULT_PREFERENCE = "-1" require qt4-embedded.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" QT_CONFIG_FLAGS_append_armv6 = " -no-neon " diff --git a/recipes/qt4/qt4-x11-free.inc b/recipes/qt4/qt4-x11-free.inc index c4074225fb..f63c9d22a0 100644 --- a/recipes/qt4/qt4-x11-free.inc +++ b/recipes/qt4/qt4-x11-free.inc @@ -5,7 +5,7 @@ HOMEPAGE = "http://www.trolltech.com" LICENSE = "GPL QPL" DEPENDS += "virtual/libx11 fontconfig libxft libxext libxrender libxrandr libxcursor" -INC_PR = "r24" +INC_PR = "r25" SRC_URI = "ftp://ftp.trolltech.com/qt/source/qt-x11-opensource-src-${PV}.tar.gz \ file://0001-cross-compile.patch \ diff --git a/recipes/raptor/raptor_1.4.21.bb b/recipes/raptor/raptor_1.4.21.bb index edceff9379..e14d75b19e 100644 --- a/recipes/raptor/raptor_1.4.21.bb +++ b/recipes/raptor/raptor_1.4.21.bb @@ -4,6 +4,7 @@ HOMEPAGE = "http://librdf.org/raptor/" LICENSE = "LGPL 2.1/GPL 2/Apache 2.0" PR = "r0" SRC_URI = "http://download.librdf.org/source/raptor-${PV}.tar.gz" +DEPENDS = "libxml2" inherit autotools pkgconfig diff --git a/recipes/red/red_0.5.bb b/recipes/red/red_0.5.bb new file mode 100644 index 0000000000..40becd65ec --- /dev/null +++ b/recipes/red/red_0.5.bb @@ -0,0 +1,24 @@ +DESCRIPTION = "Red, the Rascal editor, is the web-based editor that is built into every Rascal, a small computer for art and science" +HOMEPAGE = "http://rascalmicro.com" +LICENSE = "GPLv3" +SRCNAME = "red" +PR = "r0" + +S = "${WORKDIR}/git" + +SRCREV = "${AUTOREV}" +SRC_URI = "git://github.com/rascalmicro/red.git;protocol=git;branch=master" + +FILES_${PN} = "/var" + +do_configure () { +} + +do_compile () { +} + +do_install () { + install -d ${D}/var/www + install -d ${D}/var/www/editor + cp -r ${S}/* ${D}/var/www/editor/ +} diff --git a/recipes/rsyslog/files/rsyslog-resume.patch b/recipes/rsyslog/files/rsyslog-resume.patch deleted file mode 100644 index 73ed1012c7..0000000000 --- a/recipes/rsyslog/files/rsyslog-resume.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 467f10a13950b4b8d5a9fff7f14c20874777a4ba Mon Sep 17 00:00:00 2001 -From: Steffen Sledz -Date: Fri, 30 Jul 2010 14:39:53 +0200 -Subject: [PATCH] break potential infinite loop in actionDoRetry - -If a module always returns RS_RET_OK (like ompipe does) the actionDoRetry -loop may not have leaved faked ACT_STATE_SUSP state in case iResumeOKinRow -had ever reached a count of 1000. - -Signed-off-by: Steffen Sledz ---- - action.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/action.c b/action.c -index 32a07dc..90ec1bf 100644 ---- a/action.c -+++ b/action.c -@@ -508,6 +508,7 @@ static rsRetVal actionDoRetry(action_t *pThis, time_t ttNow) - iRet = pThis->pMod->tryResume(pThis->pModData); - if((pThis->iResumeOKinRow > 999) && (pThis->iResumeOKinRow % 1000 == 0)) { - bTreatOKasSusp = 1; -+ pThis->iResumeOKinRow = 0; - } else { - bTreatOKasSusp = 0; - } --- -1.6.4.2 - diff --git a/recipes/rsyslog/rsyslog.inc b/recipes/rsyslog/rsyslog.inc index 8f67130274..3ab593e96b 100644 --- a/recipes/rsyslog/rsyslog.inc +++ b/recipes/rsyslog/rsyslog.inc @@ -2,7 +2,7 @@ DESCRIPTION = "Rsyslog is an enhanced multi-threaded syslogd" DEPENDS = "zlib" HOMEPAGE = "http://www.rsyslog.com/" LICENSE = "GPLv3" -INC_PR = "r2" +INC_PR = "r3" SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${PN}-${PV}.tar.gz \ file://rsyslog.conf \ @@ -12,7 +12,7 @@ SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${PN}-${PV}.tar.gz \ inherit autotools do_install_append() { - install -d ${D}/${sysconfdir}/${PN} + install -d ${D}/${sysconfdir}/rsyslog.d install ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf install -d ${D}/${sysconfdir}/init.d install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${PN} diff --git a/recipes/rsyslog/rsyslog_5.5.4.bb b/recipes/rsyslog/rsyslog_5.5.4.bb deleted file mode 100644 index e949ed5648..0000000000 --- a/recipes/rsyslog/rsyslog_5.5.4.bb +++ /dev/null @@ -1,7 +0,0 @@ -require rsyslog.inc -PR = "${INC_PR}.1" - -SRC_URI += " file://rsyslog-resume.patch " - -SRC_URI[md5sum] = "824df2504955df1619e5ec2915d783aa" -SRC_URI[sha256sum] = "31853a551ea7ca960c59c9e33406b1748bdf311059c9d8a4ce98816d51b17cac" diff --git a/recipes/rsyslog/rsyslog_5.5.6.bb b/recipes/rsyslog/rsyslog_5.5.6.bb deleted file mode 100644 index f05fcfd19e..0000000000 --- a/recipes/rsyslog/rsyslog_5.5.6.bb +++ /dev/null @@ -1,7 +0,0 @@ -require rsyslog.inc -PR = "${INC_PR}.0" - -SRC_URI += " file://rsyslog-resume.patch " - -SRC_URI[md5sum] = "835a7dd4f404d37c9d01a1056beaf3cb" -SRC_URI[sha256sum] = "ae866e1f92869b82cf30270cbea192dbc5229c8707a8782fff95641bcb5725a2" diff --git a/recipes/rsyslog/rsyslog_5.6.3.bb b/recipes/rsyslog/rsyslog_5.6.3.bb deleted file mode 100644 index d2128e1b8b..0000000000 --- a/recipes/rsyslog/rsyslog_5.6.3.bb +++ /dev/null @@ -1,5 +0,0 @@ -require rsyslog.inc -PR = "${INC_PR}.0" - -SRC_URI[md5sum] = "4fd22c5a4d9442b16f6717c65446b718" -SRC_URI[sha256sum] = "d78547097add18a7bc680899a87f3305926b3a57b4885fc8fc31e7014c29dc7b" diff --git a/recipes/rsyslog/rsyslog_5.8.4.bb b/recipes/rsyslog/rsyslog_5.8.4.bb new file mode 100644 index 0000000000..c874631875 --- /dev/null +++ b/recipes/rsyslog/rsyslog_5.8.4.bb @@ -0,0 +1,5 @@ +require rsyslog.inc +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "a2c2a65ac84d9a895c52a754aff61986" +SRC_URI[sha256sum] = "fdae6a027942f46eef8abcf2b6b28399986b5e983452e046e729eae70f13febe" diff --git a/recipes/rxvt-unicode/files/makefile.patch b/recipes/rxvt-unicode/files/makefile.patch index 86f82eeb4c..787e563ce1 100644 --- a/recipes/rxvt-unicode/files/makefile.patch +++ b/recipes/rxvt-unicode/files/makefile.patch @@ -1,4 +1,4 @@ ---- ../rxvt-unicode-cvs-r0/rxvt-unicode/Makefile.in 2004-08-12 22:32:40 +01:00 +--- rxvt-unicode/Makefile.in 2004-08-12 22:32:40 +01:00 +++ rxvt-unicode/Makefile.in 2004-12-24 03:09:00 +00:00 @@ -9,7 +9,7 @@ first_rule: all diff --git a/recipes/rxvt-unicode/files/signedchar.patch b/recipes/rxvt-unicode/files/signedchar.patch index 6faa175143..3adcf728e9 100644 --- a/recipes/rxvt-unicode/files/signedchar.patch +++ b/recipes/rxvt-unicode/files/signedchar.patch @@ -1,4 +1,4 @@ ---- ../rxvt-unicode-cvs-r0/rxvt-unicode/src/command.C 2004-12-21 06:43:00 +00:00 +--- rxvt-unicode/src/command.C 2004-12-21 06:43:00 +00:00 +++ rxvt-unicode/src/command.C 2004-12-24 02:31:36 +00:00 @@ -1862,7 +1862,7 @@ #endif /* NO_SCROLLBAR_REPORT */ diff --git a/recipes/rxvt-unicode/rxvt-unicode-5.3/xwc.patch b/recipes/rxvt-unicode/rxvt-unicode-5.3/xwc.patch index eb87b84b25..b1182a14cc 100644 --- a/recipes/rxvt-unicode/rxvt-unicode-5.3/xwc.patch +++ b/recipes/rxvt-unicode/rxvt-unicode-5.3/xwc.patch @@ -1,5 +1,5 @@ -diff -urNd ../rxvt-unicode-5.3-r2/rxvt-unicode-5.3/src/screen.C rxvt-unicode-5.3/src/screen.C ---- ../rxvt-unicode-5.3-r2/rxvt-unicode-5.3/src/screen.C 2005-02-22 21:39:10 +00:00 +diff -urNd rxvt-unicode-5.3/src/screen.C rxvt-unicode-5.3/src/screen.C +--- rxvt-unicode-5.3/src/screen.C 2005-02-22 21:39:10 +00:00 +++ rxvt-unicode-5.3/src/screen.C 2005-04-05 22:12:45 +01:00 @@ -3064,7 +3064,7 @@ else diff --git a/recipes/rxvt-unicode/rxvt-unicode-5.4/xwc.patch b/recipes/rxvt-unicode/rxvt-unicode-5.4/xwc.patch index eb87b84b25..b1182a14cc 100644 --- a/recipes/rxvt-unicode/rxvt-unicode-5.4/xwc.patch +++ b/recipes/rxvt-unicode/rxvt-unicode-5.4/xwc.patch @@ -1,5 +1,5 @@ -diff -urNd ../rxvt-unicode-5.3-r2/rxvt-unicode-5.3/src/screen.C rxvt-unicode-5.3/src/screen.C ---- ../rxvt-unicode-5.3-r2/rxvt-unicode-5.3/src/screen.C 2005-02-22 21:39:10 +00:00 +diff -urNd rxvt-unicode-5.3/src/screen.C rxvt-unicode-5.3/src/screen.C +--- rxvt-unicode-5.3/src/screen.C 2005-02-22 21:39:10 +00:00 +++ rxvt-unicode-5.3/src/screen.C 2005-04-05 22:12:45 +01:00 @@ -3064,7 +3064,7 @@ else diff --git a/recipes/rxvt-unicode/rxvt-unicode-5.6/xwc.patch b/recipes/rxvt-unicode/rxvt-unicode-5.6/xwc.patch index eb87b84b25..b1182a14cc 100644 --- a/recipes/rxvt-unicode/rxvt-unicode-5.6/xwc.patch +++ b/recipes/rxvt-unicode/rxvt-unicode-5.6/xwc.patch @@ -1,5 +1,5 @@ -diff -urNd ../rxvt-unicode-5.3-r2/rxvt-unicode-5.3/src/screen.C rxvt-unicode-5.3/src/screen.C ---- ../rxvt-unicode-5.3-r2/rxvt-unicode-5.3/src/screen.C 2005-02-22 21:39:10 +00:00 +diff -urNd rxvt-unicode-5.3/src/screen.C rxvt-unicode-5.3/src/screen.C +--- rxvt-unicode-5.3/src/screen.C 2005-02-22 21:39:10 +00:00 +++ rxvt-unicode-5.3/src/screen.C 2005-04-05 22:12:45 +01:00 @@ -3064,7 +3064,7 @@ else diff --git a/recipes/samba/samba_3.5.6.bb b/recipes/samba/samba_3.5.6.bb index 72bada9286..7b82849147 100644 --- a/recipes/samba/samba_3.5.6.bb +++ b/recipes/samba/samba_3.5.6.bb @@ -10,7 +10,7 @@ S = "${WORKDIR}/samba-${PV}/source3" DEFAULT_PREFERENCE = "-1" SRC_URI += "file://config-h.patch \ - file://tdbheaderfix.patch;apply=no" + file://tdbheaderfix.patch;patchdir=.." PR = "r0" @@ -27,11 +27,6 @@ EXTRA_OECONF += "\ " do_configure() { - # Patches we must apply by hand due to layout. - cd .. - patch -p1 -i ${WORKDIR}/tdbheaderfix.patch - cd source3 - oe_runconf } diff --git a/recipes/sdr/dttsp_svn.bb b/recipes/sdr/dttsp_svn.bb index 216a0a7ba1..2d5f7abe1f 100644 --- a/recipes/sdr/dttsp_svn.bb +++ b/recipes/sdr/dttsp_svn.bb @@ -1,6 +1,6 @@ DESCRIPTION = "Software Radio Core" LICENSE = "GPLv3" -DEPENDS = "fftwf jack" +DEPENDS = "gsl fftwf jack" PV = "${SRCREV}" SRCREV = "241" diff --git a/recipes/sdr/sdrshell-qt4_svn.bb b/recipes/sdr/sdrshell-qt4_svn.bb index ec81f96f60..036e583595 100644 --- a/recipes/sdr/sdrshell-qt4_svn.bb +++ b/recipes/sdr/sdrshell-qt4_svn.bb @@ -1,11 +1,11 @@ DESCRIPTION = "SDR-Shell is Qt GUI for the sdr-core (DttSP) Software Defined Radio" LICENSE = "GPLv2" -DEPENDS = "dttsp" +DEPENDS = "hamlib dttsp libusb1 ncurses" inherit qt4x11 -SRCREV = "129" +SRCREV = "154" PV = "${SRCREV}" SRC_URI = "svn://sdr-shell.googlecode.com/svn/branches;module=sdr-shell-v4;proto=http \ @@ -27,4 +27,3 @@ do_install() { install -m 0755 ${S}/sdr-shell ${D}${bindir} } - diff --git a/recipes/shr/initscripts-shr/g_ether.sh b/recipes/shr/initscripts-shr/om-gta02/g_ether.sh similarity index 100% rename from recipes/shr/initscripts-shr/g_ether.sh rename to recipes/shr/initscripts-shr/om-gta02/g_ether.sh diff --git a/recipes/shr/initscripts-shr/palmpre/halt b/recipes/shr/initscripts-shr/palmpre/halt index 6b3dc0d8ed..293d9b27a8 100644 --- a/recipes/shr/initscripts-shr/palmpre/halt +++ b/recipes/shr/initscripts-shr/palmpre/halt @@ -20,6 +20,6 @@ then hddown="" fi -/sbin/tellbootie shutdown +halt -d -f : exit 0 diff --git a/recipes/shr/initscripts-shr/palmpre/reboot b/recipes/shr/initscripts-shr/palmpre/reboot index 195f540d2f..fcd312a11d 100644 --- a/recipes/shr/initscripts-shr/palmpre/reboot +++ b/recipes/shr/initscripts-shr/palmpre/reboot @@ -8,4 +8,4 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin echo -n "Rebooting... " -/sbin/tellbootie +reboot -f -d diff --git a/recipes/shr/initscripts-shr_0.0.1.bb b/recipes/shr/initscripts-shr_0.0.1.bb index 8e45239cc4..662fc055c6 100644 --- a/recipes/shr/initscripts-shr_0.0.1.bb +++ b/recipes/shr/initscripts-shr_0.0.1.bb @@ -5,7 +5,7 @@ DEPENDS = "" RDEPENDS_${PN} = "procps" LICENSE = "GPL" PV = "0.0.1" -PR = "r24" +PR = "r27" RCONFLICTS_${PN} = "initscripts" @@ -14,7 +14,6 @@ SRC_URI = "file://alignment.sh \ file://checkroot.sh \ file://finish.sh \ file://functions \ - file://g_ether.sh \ file://hostname.sh \ file://mountall.sh \ file://mountdevsubfs.sh \ @@ -32,7 +31,11 @@ SRC_URI = "file://alignment.sh \ file://umountnfs.sh \ " +SRC_URI_append_om-gta02 = " file://g_ether.sh" +PACKAGE_ARCH_om-gta02 = "om-gta02" + SRC_URI_append_nokia900 = " file://nokia-n900-cmt-gpio.sh" +PACKAGE_ARCH_nokia900 = "nokia900" inherit base @@ -57,7 +60,6 @@ do_install () { install -m 0755 ${WORKDIR}/checkroot.sh ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/finish.sh ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/functions ${D}${sysconfdir}/init.d - install -m 0755 ${WORKDIR}/g_ether.sh ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/hostname.sh ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/mountall.sh ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/mountnfs.sh ${D}${sysconfdir}/init.d @@ -76,6 +78,11 @@ do_install () { install -m 0755 ${WORKDIR}/umountfs ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/umountnfs.sh ${D}${sysconfdir}/init.d + if [ "${MACHINE}" = "om-gta02" ]; then + install -m 0755 ${WORKDIR}/g_ether.sh ${D}${sysconfdir}/init.d + ln -sf ../init.d/g_ether.sh ${D}${sysconfdir}/rcS.d/S02g_ether.sh + fi + if [ "${MACHINE}" = "nokia900" ]; then install -m 0755 ${WORKDIR}/nokia-n900-cmt-gpio.sh ${D}${sysconfdir}/init.d ln -sf ../init.d/nokia-n900-cmt-gpio.sh ${D}${sysconfdir}/rcS.d/S40nokia-n900-cmt-gpio.sh @@ -85,7 +92,6 @@ do_install () { # Create runlevel links # ln -sf ../init.d/mountkernfs.sh ${D}${sysconfdir}/rcS.d/S01mountkernfs.sh - ln -sf ../init.d/g_ether.sh ${D}${sysconfdir}/rcS.d/S02g_ether.sh ln -sf ../init.d/hostname.sh ${D}${sysconfdir}/rcS.d/S02hostname.sh ln -sf ../init.d/checkroot.sh ${D}${sysconfdir}/rcS.d/S02checkroot.sh ln -sf ../init.d/mountdevsubfs.sh ${D}${sysconfdir}/rcS.d/S04mountdevsubfs.sh diff --git a/recipes/shr/libphone-ui-shr_git.bb b/recipes/shr/libphone-ui-shr_git.bb index cfb08ffec1..e13e907282 100644 --- a/recipes/shr/libphone-ui-shr_git.bb +++ b/recipes/shr/libphone-ui-shr_git.bb @@ -1,7 +1,7 @@ DESCRIPTION = "SHR default module for the Phone UI daemon" SECTION = "e/apps" DEPENDS += " libphone-ui evas ecore edje edje-native elementary" -SRCREV = "9c1b8d63ea313822532f45f5c0389e53f730abd4" +SRCREV = "e50e9927fac05664bf1d6b1e0d3a953484038495" PE = "1" PV = "0.0.1+gitr${SRCPV}" PR = "r3" diff --git a/recipes/shr/libphone-ui_git.bb b/recipes/shr/libphone-ui_git.bb index c002ea1716..e73aa1eab2 100644 --- a/recipes/shr/libphone-ui_git.bb +++ b/recipes/shr/libphone-ui_git.bb @@ -2,16 +2,44 @@ DESCRIPTION = "A generic framework for phone ui" HOMEPAGE = "http://shr-project.org/" LICENSE = "GPL" SECTION = "libs" -SRCREV = "4ad47c4db9ad766ad2b38ffc3bd181a85575fd75" +SRCREV = "5567443a48599c22c362fb28924701f81627c8dc" PV = "0.0.1+gitr${SRCPV}" -PR = "r0" +PR = "r3" DEPENDS="glib-2.0 libshr-glib libfso-glib libfsoframework libphone-utils alsa-lib" -inherit pkgconfig autotools autotools +SRC_URI = " \ + git://git.shr-project.org/repo/libphone-ui.git;protocol=http;branch=master \ +" -SRC_URI = "git://git.shr-project.org/repo/libphone-ui.git;protocol=http;branch=master" +S = "${WORKDIR}/git" -S="${WORKDIR}/git" +inherit autotools pkgconfig -CONFFILES_${PN} = "${sysconfdir}/libphoneui.conf" +do_install_append() { + libphone_ui_install_machine_specific_configs +} + +libphone_ui_install_machine_specific_configs() { + # Check for machine specific conf. + CONF_PATH="${S}/conf" + CONF_PATH_MACHINE="${CONF_PATH}" + if [ -d "${CONF_PATH}/${MACHINE}" ] ; then + CONF_PATH_MACHINE="${CONF_PATH}/${MACHINE}" + fi + install -d ${D}${sysconfdir} + install -m 0644 ${CONF_PATH_MACHINE}/libphoneui.conf ${D}${sysconfdir}/libphoneui.conf +} + +PACKAGES =+ "${PN}-config" +PACKAGE_ARCH_${PN}-config = "${MACHINE_ARCH}" + +RDEPENDS_${PN} = "${PN}-config" + +FILES_${PN}-config = " \ + ${sysconfdir}/libphoneui.conf \ +" + +CONFFILES_${PN}-config = "\ + ${sysconfdir}/libphoneui.conf \ +" diff --git a/recipes/shr/libshr-glib_git.bb b/recipes/shr/libshr-glib_git.bb index 2bc1e12862..e5438f0861 100644 --- a/recipes/shr/libshr-glib_git.bb +++ b/recipes/shr/libshr-glib_git.bb @@ -3,7 +3,7 @@ AUTHOR = "Klaus 'mrmoku' Kurzmann" LICENSE = "LGPL" SECTION = "devel" DEPENDS = "gdbus-binding-tool glib-2.0 shr-specs" -SRCREV = "926654296339d88f69cd481d1cf8eb9facdf9bf3" +SRCREV = "761dea6463326714c00342cb53ba28a1c2dfea63" PV = "2011.01.04.1+gitr${SRCPV}" PR = "r0" diff --git a/recipes/shr/phonefsod_git.bb b/recipes/shr/phonefsod_git.bb index 6e1574ffc6..6283901263 100644 --- a/recipes/shr/phonefsod_git.bb +++ b/recipes/shr/phonefsod_git.bb @@ -3,7 +3,7 @@ HOMEPAGE = "http://shr-project.org/" LICENSE = "GPL" SECTION = "x11/applications" DEPENDS += " libfso-glib libshr-glib sqlite3 shr-specs libfsoframework" -SRCREV = "374548a6d9d53f4b3d26b70cbb5ab7257e6ce26d" +SRCREV = "cc19fc95ae1a36f1a3d12bd13fce751cf4cf095f" PV = "0.0.0+gitr${SRCPV}" PR = "r5" diff --git a/recipes/shr/phoneuid_git.bb b/recipes/shr/phoneuid_git.bb index 054d4e5c6e..c4f9cba2bd 100644 --- a/recipes/shr/phoneuid_git.bb +++ b/recipes/shr/phoneuid_git.bb @@ -3,7 +3,7 @@ HOMEPAGE = "http://shr-project.org/" LICENSE = "GPL" SECTION = "x11/applications" DEPENDS += " libfso-glib libshr-glib libphone-ui sqlite3 shr-specs" -SRCREV = "ce5fc12bca878abd52825ba33dc6e57b78b00a92" +SRCREV = "ff77b47658203d642507332d1ea8618245b4021b" PV = "0.0.0+gitr${SRCPV}" PR = "r7" diff --git a/recipes/shr/shr-e-gadgets_git.bb b/recipes/shr/shr-e-gadgets_git.bb index 40d81b16de..acb56b4fad 100644 --- a/recipes/shr/shr-e-gadgets_git.bb +++ b/recipes/shr/shr-e-gadgets_git.bb @@ -5,7 +5,7 @@ DEPENDS = "e-wm" RDEPENDS_${PN} = "e-wm" SECTION = "x11/application" -SRCREV = "0638e17d76861ca1e4f89a2d955fab03fa143634" +SRCREV = "5c9d0f8f778565f3ae69e45b8c35b04529156345" PV = "0.0.0+gitr${SRCPV}" PR = "r10" diff --git a/recipes/shr/shr-settings/palmpre/elementary.sh b/recipes/shr/shr-settings/palmpre/elementary.sh new file mode 100644 index 0000000000..2e2534d26d --- /dev/null +++ b/recipes/shr/shr-settings/palmpre/elementary.sh @@ -0,0 +1,4 @@ +export ELM_ENGINE=x11 +export ELM_THEME=default +export ELM_SCALE=1.0 +export ELM_FINGER_SIZE=50 diff --git a/recipes/shr/shr-settings_git.bb b/recipes/shr/shr-settings_git.bb index 28d10c8f0f..5a094f459d 100644 --- a/recipes/shr/shr-settings_git.bb +++ b/recipes/shr/shr-settings_git.bb @@ -4,7 +4,7 @@ SHR_RELEASE ?= "shr" LICENSE ?= "GPL" RDEPENDS_${PN} = "python-elementary python-dbus python-codecs python-shell python-pyrtc python python-core python-edbus dbus-x11 frameworkd python-phoneutils python-pexpect" SECTION = "x11/application" -SRCREV = "a3cdb92ee8246648cc5d0de949afc7f1284f3f0e" +SRCREV = "f712a5ec5617b3de2700794389ada07297b3ff8e" PE = "1" PV = "0.1.1+gitr${SRCPV}" PR = "r12" diff --git a/recipes/shr/shr-specs_git.bb b/recipes/shr/shr-specs_git.bb index 7b237027aa..af22edbaef 100644 --- a/recipes/shr/shr-specs_git.bb +++ b/recipes/shr/shr-specs_git.bb @@ -4,9 +4,8 @@ HOMEPAGE = "http://shr-project.org/" LICENSE = "BSD" DEPENDS = "libxslt-native" SECTION = "devel/specifications" -SRCREV = "0e50703bcb5bc036fb5b295eceb2b7c6a2f1d455" -PV = "0.0.0+gitr${SRCPV}" -PR = "r1" +SRCREV = "2752ded90581cfd2259ab65be7f9c2b9fb4a2638" +PV = "2010.12.27.1+gitr${SRCPV}" SRC_URI = "git://git.shr-project.org/repo/shr-specs.git;protocol=http;branch=master" S = "${WORKDIR}/git" diff --git a/recipes/stopwatch/stopwatch_1.4.0.bb b/recipes/stopwatch/stopwatch_1.4.0.bb index 91a19486b6..b4125f9bc3 100644 --- a/recipes/stopwatch/stopwatch_1.4.0.bb +++ b/recipes/stopwatch/stopwatch_1.4.0.bb @@ -4,7 +4,7 @@ SECTION = "x11/applications" PRIORITY = "optional" HOMEPAGE = "http://git.senfdax.de" LICENSE = "GPL QPL" -PR = "r0" +PR = "r1" inherit qt4x11 diff --git a/recipes/supervisord/files/supervisord.conf b/recipes/supervisord/files/supervisord.conf new file mode 100644 index 0000000000..c78dc6e595 --- /dev/null +++ b/recipes/supervisord/files/supervisord.conf @@ -0,0 +1,20 @@ +[inet_http_server] +port=127.0.0.1:9001 + +[supervisord] +logfile=/var/log/supervisord.log +logfile_maxbytes=1MB +logfile_backups=0 +loglevel=error +pidfile=/var/run/supervisord.pid +user=root +childlogdir=/var/log/ + +[rpcinterface:supervisor] +supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface + +[supervisorctl] +serverurl=http://127.0.0.1:9001 + +[include] +files = /etc/supervisor/conf.d/*.conf diff --git a/recipes/supervisord/files/supervisord.sh b/recipes/supervisord/files/supervisord.sh new file mode 100644 index 0000000000..a5f7357953 --- /dev/null +++ b/recipes/supervisord/files/supervisord.sh @@ -0,0 +1,84 @@ +#! /bin/sh +# +# Written by Miquel van Smoorenburg +# Modified for Debian GNU/Linux +# by Ian Murdock +# Modified for resetbutton by Juan Menendez + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DESC="Supervisor" +NAME=supervisord +DAEMON=/usr/bin/$NAME +PIDFILE=/var/run/$NAME.pid +DAEMON_ARGS="--pidfile ${PIDFILE} --config /etc/$NAME.conf" +SUPERVISORCTL=/usr/bin/supervisorctl + +test -x $DAEMON || exit 0 + +set -e + +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + [ -e $PIDFILE ] && return 1 + + start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \ + $DAEMON_ARGS || return 2 +} + +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + [ -e $PIDFILE ] || return 1 + + # Stop all processes under supervisord control. + $SUPERVISORCTL stop all + + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +case "$1" in + start) + echo -n "Starting $DESC: $NAME" + do_start + echo "." + ;; + stop) + echo -n "Stopping $DESC: $NAME" + do_stop + echo "." + ;; + restart) + echo -n "Restarting $DESC: $NAME" + do_stop + do_start + echo "done." + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/recipes/supervisord/supervisord_3.0.bb b/recipes/supervisord/supervisord_3.0.bb new file mode 100644 index 0000000000..b114245a6f --- /dev/null +++ b/recipes/supervisord/supervisord_3.0.bb @@ -0,0 +1,61 @@ +DESCRIPTION = "A system for controlling process state under UNIX" +HOMEPAGE = "http://supervisord.org" +SECTION = "admin" +PRIORITY = "optional" +LICENSE = "BSD" +PR = "ml1" + +SRC_URI = "https://pypi.python.org/packages/source/s/supervisor/supervisor-${PV}.tar.gz \ + file://supervisord.conf \ + file://supervisord.sh" + +S = "${WORKDIR}/supervisor-${PV}" + +inherit setuptools + +# Removed python-meld3 from RDEPENDS. Will probably need to post-install it with pip. + +RDEPENDS_${PN} = "\ + python-setuptools \ + python-misc \ + python-html \ + python-unixadmin \ + python-xmlrpc \ + python-shell \ + python-resource" + + +PACKAGES = "${PN}" + +site_packages="${libdir}/python2.*/site-packages" + +FILES_${PN} = "\ + ${sysconfdir}/* \ + ${bindir}/* \ + ${site_packages}/*.egg-info \ + ${site_packages}/*.pth \ + ${site_packages}/supervisor/*.pyo \ + ${site_packages}/supervisor/*.txt \ + ${site_packages}/supervisor/ui \ + ${site_packages}/supervisor/medusa/*.pyo \ + ${site_packages}/supervisor/medusa/*.txt \ + ${site_packages}/supervisor/medusa/thread/*.pyo" + +do_install_prepend() { + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/supervisor/conf.d + + install -m 0644 ${WORKDIR}/supervisord.conf ${D}${sysconfdir}/supervisord.conf + install -m 0755 ${WORKDIR}/supervisord.sh ${D}${sysconfdir}/init.d/supervisord.sh +} + +pkg_postinst() { + update-rc.d supervisord defaults 90 +} + +pkg_postrm() { + update-rc.d supervisord remove +} + +SRC_URI[md5sum] = "94ff3cf09618c36889425a8e002cd51a" +SRC_URI[sha256sum] = "82aac54c5760b6a4f4c28dda203714e362a68b4a9ba8549fa65955998e3a2212" diff --git a/recipes/sysvinit/sysvinit_2.86.bb b/recipes/sysvinit/sysvinit_2.86.bb index 66c3952ae4..1cc5d18cb7 100644 --- a/recipes/sysvinit/sysvinit_2.86.bb +++ b/recipes/sysvinit/sysvinit_2.86.bb @@ -2,7 +2,7 @@ DESCRIPTION = "System-V like init." SECTION = "base" LICENSE = "GPLv2+" HOMEPAGE = "http://freshmeat.net/projects/sysvinit/" -PR = "r63" +PR = "r66" # USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf. # Set PACKAGE_ARCH appropriately. diff --git a/recipes/tasks/task-beagleboard-nand.bb b/recipes/tasks/task-beagleboard-nand.bb index 1c12f2c1c2..edf62b5aa9 100644 --- a/recipes/tasks/task-beagleboard-nand.bb +++ b/recipes/tasks/task-beagleboard-nand.bb @@ -1,5 +1,7 @@ DESCRIPTION = "Task for putting an X11 desktop in NAND" +PR = "r1" + inherit task ECONFIG ?= "places e-wm-config-angstrom e-wm-config-angstrom-widescreen e-wm-config-default" @@ -29,7 +31,11 @@ RDEPENDS_${PN} = "\ picodlp-control \ network-manager-applet \ gnome-bluetooth \ -" +bc e2fsprogs-mke2fs util-linux-ng-fdisk \ +util-linux-ng-sfdisk dosfstools beagleboard-test-scripts sox \ +alsa-utils-aplay ti-dsplink-examples i2c-tools memtester cpuburn-neon \ +evtest devmem2 matrix-gui mtd-utils mplayer x11vnc \ +angstrom-x11vnc-xinit" # Install all kernel modules RRECOMMENDS_${PN} += " \ diff --git a/recipes/tasks/task-beagleboard-validation.bb b/recipes/tasks/task-beagleboard-validation.bb new file mode 100644 index 0000000000..9edb26bd27 --- /dev/null +++ b/recipes/tasks/task-beagleboard-validation.bb @@ -0,0 +1,62 @@ +inherit task + +PV = "1.1" +PR = "r4" + +PACKAGE_ARCH = "all" +ALLOW_EMPTY = "1" + +ECONFIG ?= "places e-wm-config-angstrom" +EMENU ?= "e-wm-menu" + +PACKAGES =+ "task-beagleboard-validation-base task-beagleboard-validation-gui task-beagleboard-validation-gui-extras" + +RDEPENDS_task-beagleboard-validation-base = "\ + task-base-extended \ + task-omap-drivers \ + bc \ + e2fsprogs-mke2fs \ + util-linux-ng-fdisk util-linux-ng-sfdisk \ + dosfstools \ + beagleboard-test-scripts \ + sox \ + alsa-utils-aplay \ + ti-dsplink-examples \ + i2c-tools \ + memtester \ + cpuburn-neon \ + evtest \ + devmem2 \ + mtd-utils \ + mplayer \ + nmap iperf \ + powertop oprofile \ + angstrom-led-config \ + cron ntpdate \ + picodlp-control \ + openssh-scp openssh-ssh \ + nodejs \ +" + + +RDEPENDS_task-beagleboard-validation-gui = " \ + angstrom-x11-base-depends \ + angstrom-gpe-task-base \ + angstrom-gpe-task-settings \ + angstrom-zeroconf-audio \ + gpe-scap \ + mime-support e-wm ${ECONFIG} ${EMENU} \ + xterm \ + hicolor-icon-theme gnome-icon-theme \ + synergy \ + angstrom-gnome-icon-theme-enable \ + network-manager-applet \ + gnome-bluetooth \ + x11vnc angstrom-x11vnc-xinit \ +" + +RDEPENDS_task-beagleboard-validation-gui-extras = "\ + matrix-gui \ + midori \ +" + diff --git a/recipes/tasks/task-boot.bb b/recipes/tasks/task-boot.bb index 0eb34a8e0a..b6ac687a58 100644 --- a/recipes/tasks/task-boot.bb +++ b/recipes/tasks/task-boot.bb @@ -32,6 +32,7 @@ RDEPENDS_task-boot = "\ ${@base_contains("MACHINE_FEATURES", "keyboard", "keymaps", "", d)} \ modutils-initscripts \ netbase \ + ntp \ ${DISTRO_UPDATE_ALTERNATIVES} \ ${MACHINE_ESSENTIAL_EXTRA_RDEPENDS} \ " diff --git a/recipes/tasks/task-omap-drivers.bb b/recipes/tasks/task-omap-drivers.bb new file mode 100644 index 0000000000..fe29344269 --- /dev/null +++ b/recipes/tasks/task-omap-drivers.bb @@ -0,0 +1,35 @@ +DESCRIPTION = "Task for extra drivers for Texas Instruments OMAP chips" + +PR = "r2" + +inherit task + +RDEPENDS_${PN} = "\ + rt73-firmware \ + zd1211-firmware \ + linux-firmware-wl12xx \ + rfkill \ + cpufrequtils \ + " + +RRECOMMENDS_${PN} = "\ + \ + kernel-module-bluetooth \ + kernel-module-hci-usb \ + kernel-module-hci-uart \ + \ + kernel-module-wl12xx \ + kernel-module-wl12xx-sdio \ + kernel-module-wl12xx-spi \ + \ + kernel-module-wl1271 \ + kernel-module-wl1271-sdio \ + kernel-module-wl1271-spi \ + kernel-module-btwilink \ + \ + kernel-module-rt73usb \ + kernel-module-rt2x00usb \ + kernel-module-zd1211rw \ + \ + omap3-sgx-modules \ + " diff --git a/recipes/tasks/task-sdk-gnuradio-native.bb b/recipes/tasks/task-sdk-gnuradio-native.bb index a671fa9990..b66dd79c1c 100644 --- a/recipes/tasks/task-sdk-gnuradio-native.bb +++ b/recipes/tasks/task-sdk-gnuradio-native.bb @@ -1,8 +1,8 @@ require task-sdk-native.inc -DEPENDS += "libusb1 guile fftw python alsa-lib jack boost cppunit sdcc swig \ +DEPENDS += "libusb1 guile fftw python alsa-lib jack boost cppunit swig \ python python-numpy git util-linux-ng gsl python-cheetah git \ - distcc libdbd-sqlite-perl libdbix-simple-perl pkgconfig \ + libdbd-sqlite-perl libdbix-simple-perl pkgconfig \ " RDEPENDS_${PN} += "libusb1-dev guile-dev fftwf-dev alsa-dev alsa-lib-dev jack-dev \ @@ -12,13 +12,13 @@ RDEPENDS_${PN} += "libusb1-dev guile-dev fftwf-dev alsa-dev alsa-lib-dev jack-de python-pprint python-compiler python-pkgutil python-pydoc \ python-mmap python-netclient python-difflib python-compile \ python-cheetah python-netserver python-xml cmake \ - boost boost-dev gsl-dev sdcc git distcc pkgconfig-dev \ + boost boost-dev gsl-dev git pkgconfig-dev \ util-linux-ng util-linux-ng-swaponoff \ " RPROVIDES_${PN} = "task-native-gnuradio-sdk" -PR = "${INC_PR}.15" +PR = "${INC_PR}.17" ALLOW_EMPTY = "1" PACKAGES = "${PN}" diff --git a/recipes/tasks/task-shr-minimal.bb b/recipes/tasks/task-shr-minimal.bb index 97f1135425..a3377cc11b 100644 --- a/recipes/tasks/task-shr-minimal.bb +++ b/recipes/tasks/task-shr-minimal.bb @@ -1,5 +1,5 @@ DESCRIPTION = "SHR Lite Image Feed" -PR = "r36" +PR = "r38" PV = "2.0" LICENSE = "GPL" diff --git a/recipes/tcltk/files/disable-xim.patch b/recipes/tcltk/files/disable-xim.patch index bc11d3bbe9..d88aa7c3b9 100644 --- a/recipes/tcltk/files/disable-xim.patch +++ b/recipes/tcltk/files/disable-xim.patch @@ -3,8 +3,8 @@ # Patch managed by http://www.holgerschurig.de/patcher.html # ---- ../generic/tk.h~disable-xim -+++ ../generic/tk.h +--- generic/tk.h~disable-xim ++++ generic/tk.h @@ -109,9 +109,9 @@ * Decide whether or not to use input methods. */ diff --git a/recipes/tcltk/tcl-8.5.8/mips-tclstrtod.patch b/recipes/tcltk/tcl-8.5.8/mips-tclstrtod.patch index b846d0fa82..c7ac8cb0b1 100644 --- a/recipes/tcltk/tcl-8.5.8/mips-tclstrtod.patch +++ b/recipes/tcltk/tcl-8.5.8/mips-tclstrtod.patch @@ -1,7 +1,7 @@ http://sourceforge.net/tracker/index.php?func=detail&aid=2902010&group_id=10894&atid=110894 ---- ../generic/tclStrToD.c.orig -+++ ../generic/tclStrToD.c +--- generic/tclStrToD.c.orig ++++ generic/tclStrToD.c @@ -71,9 +71,10 @@ /* diff --git a/recipes/tcltk/tcl_8.5.8.bb b/recipes/tcltk/tcl_8.5.8.bb index e98b98d29d..9bb6859434 100644 --- a/recipes/tcltk/tcl_8.5.8.bb +++ b/recipes/tcltk/tcl_8.5.8.bb @@ -13,7 +13,7 @@ SRC_URI = "\ file://tcllibrary.diff;striplevel=2 \ file://tclpackagepath.diff;striplevel=2 \ file://tclprivate.diff;striplevel=2 \ - file://mips-tclstrtod.patch;striplevel=0 \ + file://mips-tclstrtod.patch;patchdir=..;striplevel=0 \ " SRC_URI[md5sum] = "7f123e53b3daaaba2478d3af5a0752e3" SRC_URI[sha256sum] = "6b090c1024038d0381e1ccfbd6d5c0f0e6ef205269ceb9d28bd7bd7ac5bbf4a7" diff --git a/recipes/tcltk/tk_8.4.19.bb b/recipes/tcltk/tk_8.4.19.bb index 68a89254b1..3dd492016a 100644 --- a/recipes/tcltk/tk_8.4.19.bb +++ b/recipes/tcltk/tk_8.4.19.bb @@ -3,11 +3,11 @@ LICENSE = "tcl" SECTION = "devel/tcltk" HOMEPAGE = "http://tcl.sourceforge.net" DEPENDS = "tcl virtual/libx11 libxt" -PR = "r0" +PR = "r1" SRC_URI = "\ ${SOURCEFORGE_MIRROR}/tcl/tk${PV}-src.tar.gz \ - file://disable-xim.patch;striplevel=0 \ + file://disable-xim.patch;patchdir=..;striplevel=0 \ file://tk-add-soname.patch;striplevel=2 \ # file://fix-configure.patch;striplevel=2 \ " diff --git a/recipes/ti/am-benchmarks_1.2.bb b/recipes/ti/am-benchmarks_1.2.bb index 5ae0585a9e..21e62a75ec 100644 --- a/recipes/ti/am-benchmarks_1.2.bb +++ b/recipes/ti/am-benchmarks_1.2.bb @@ -8,15 +8,16 @@ LICENSE = "BSD" SECTION = "system" PRIORITY = "optional" -SRCREV = "59" +SRCREV = "61" PR = "r2+svnr${SRCPV}" -COMPATIBLE_MACHINE = "(dm365|omapl138|omap3|ti816x)" +COMPATIBLE_MACHINE = "(dm365|omapl138|omap3|ti816x|ti814x)" ARCHITECTURE_dm365 = "arm9" ARCHITECTURE_omapl138 = "arm9" ARCHITECTURE_omap3 = "cortex-a8" ARCHITECTURE_ti816x = "cortex-a8" +ARCHITECTURE_ti814x = "cortex-a8" INSANE_SKIP_${PN} = "True" diff --git a/recipes/ti/gst-ducati_git.bb b/recipes/ti/gst-ducati_git.bb index dec9dcc581..49ac24457f 100644 --- a/recipes/ti/gst-ducati_git.bb +++ b/recipes/ti/gst-ducati_git.bb @@ -5,25 +5,26 @@ LICENSE = "LGPLv2.1" inherit autotools PV = "0.10.0" -PR = "r2" +PR = "r3" PR_append = "+gitr${SRCREV}" -SRCREV = "bd235864a96fe9fc06df69bc9fc457d0408d9756" +SRCREV = "2c30e033e5014903a61ad9b483627ff2e320b35a" SRC_URI = "git://github.com/robclark/gst-ducati.git;protocol=git \ - http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.31.tar.bz2;name=archive \ + http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.32.tar.bz2;name=archive \ " -SRC_URI[archive.md5sum] = "a21fb08bdb578d972c7c14e77da8fbb6" -SRC_URI[archive.sha256sum] = "7f737e6d047c1ebeb4e1e0725fc377c5d9f12ee89186de7960be3cbba709ab84" +SRC_URI[archive.md5sum] = "442bc3d37b8511a73379143e7531d726" +SRC_URI[archive.sha256sum] = "3bf4e46a186ee9a1f5e212aaf651d67cffb4f5f05345a7c99ae71d5d992be133" S = "${WORKDIR}/git" acpaths = "-I m4 -I common/m4" do_configure_prepend () { - rm -rf ${S}/common ${S}/po - cp -Rf ${WORKDIR}/gstreamer-0.10.31/common ${S}/ - cp -Rf ${WORKDIR}/gstreamer-0.10.31/po ${S}/ + + rm -rf ${S}/common ${S}/po + cp -Rf ${WORKDIR}/gstreamer-0.10.32/common ${S}/ + cp -Rf ${WORKDIR}/gstreamer-0.10.32/po ${S}/ if test -f po/Makefile.in.in; then @@ -33,3 +34,7 @@ do_configure_prepend () { patch -p0 < common/gettext.patch } +FILES_${PN} += "${libdir}/gstreamer-0.10/*.so ${sysconfdir} ${installdir}" +FILES_${PN}-dev += "${libdir}/gstreamer-0.10/*.a ${libdir}/gstreamer-0.10/*.la" +FILES_${PN}-dbg += "${libdir}/gstreamer-0.10/.debug" + diff --git a/recipes/ti/libdce_git.bb b/recipes/ti/libdce_git.bb index 72ed8f6f01..3812e55934 100644 --- a/recipes/ti/libdce_git.bb +++ b/recipes/ti/libdce_git.bb @@ -5,10 +5,10 @@ LICENSE = "TI" inherit autotools lib_package PV = "1.0.0" -PR = "r3" +PR = "r4" PR_append = "+gitr${SRCREV}" -SRCREV = "086d0bed544ecb92afde57db32c16b5e97c6f2d2" +SRCREV = "2115a0b6b6fccc27d6ecc274e37e57f2275f99c6" SRC_URI = "git://github.com/robclark/libdce.git;protocol=git" S = "${WORKDIR}/git" diff --git a/recipes/ti/matrix-gui-common.inc b/recipes/ti/matrix-gui-common.inc index c0edbfd485..0ed72b53fa 100644 --- a/recipes/ti/matrix-gui-common.inc +++ b/recipes/ti/matrix-gui-common.inc @@ -4,17 +4,19 @@ LICENSE = "BSD" SECTION = "multimedia" PRIORITY = "optional" -INC_PR = "r7" +INC_PR = "r9" -COMPATIBLE_MACHINE = "(dm365|omapl138|omap3|ti816x)" +COMPATIBLE_MACHINE = "(dm365|omapl138|omap3|ti816x|ti814x)" -PLATFORM_dm365 = "dm365" +PLATFORM_dm365-evm = "dm365" +PLATFORM_dm368-evm = "dm368" PLATFORM_omapl138 = "omapl138" PLATFORM_omap3evm = "omap3530" PLATFORM_dm37x-evm = "dm3730" PLATFORM_am37x-evm = "am3715" PLATFORM_beagleboard = "am3715" PLATFORM_ti816x = "ti816x" +PLATFORM_ti814x = "ti814x" PLATFORM_am180x-evm = "am180x" PLATFORM_am181x-evm = "am181x" PLATFORM_am3517-evm = "am3517" diff --git a/recipes/ti/matrix-gui-common_1.4.bb b/recipes/ti/matrix-gui-common_1.4.bb index 609a16ae38..0b4b25b8d1 100644 --- a/recipes/ti/matrix-gui-common_1.4.bb +++ b/recipes/ti/matrix-gui-common_1.4.bb @@ -4,5 +4,5 @@ require matrix-gui-common.inc # prebuilt version in the repository. RRECOMMENDS_${PN} = "am-sysinfo" -SRCREV = "222" -PR = "${INC_PR}.6" +SRCREV = "257" +PR = "${INC_PR}.11" diff --git a/recipes/ti/matrix-gui-e.inc b/recipes/ti/matrix-gui-e.inc index ba8012c466..7158d90315 100644 --- a/recipes/ti/matrix-gui-e.inc +++ b/recipes/ti/matrix-gui-e.inc @@ -4,17 +4,19 @@ LICENSE = "BSD" SECTION = "multimedia" PRIORITY = "optional" -INC_PR = "r21" +INC_PR = "r23" -COMPATIBLE_MACHINE = "(dm365|omapl138|omap3|ti816x)" +COMPATIBLE_MACHINE = "(dm365|omapl138|omap3|ti816x|ti814x)" -PLATFORM_dm365 = "dm365" +PLATFORM_dm365-evm = "dm365" +PLATFORM_dm368-evm = "dm368" PLATFORM_omapl138 = "omapl138" PLATFORM_omap3evm = "omap3530" PLATFORM_dm37x-evm = "dm3730" PLATFORM_am37x-evm = "am3715" PLATFORM_beagleboard = "am3715" PLATFORM_ti816x = "ti816x" +PLATFORM_ti814x = "ti814x" PLATFORM_am180x-evm = "am180x" PLATFORM_am181x-evm = "am181x" PLATFORM_am3517-evm = "am3517" diff --git a/recipes/ti/matrix-gui-e_1.3.bb b/recipes/ti/matrix-gui-e_1.3.bb index c75470b50d..a6eb17fe62 100644 --- a/recipes/ti/matrix-gui-e_1.3.bb +++ b/recipes/ti/matrix-gui-e_1.3.bb @@ -1,5 +1,5 @@ require matrix-gui-e.inc -SRCREV = "222" -PR = "${INC_PR}.5" +SRCREV = "257" +PR = "${INC_PR}.10" diff --git a/recipes/ti/matrix-gui.inc b/recipes/ti/matrix-gui.inc index 82ec6ab1e3..3dd0e1042f 100644 --- a/recipes/ti/matrix-gui.inc +++ b/recipes/ti/matrix-gui.inc @@ -4,17 +4,19 @@ LICENSE = "BSD" SECTION = "multimedia" PRIORITY = "optional" -INC_PR = "r19" +INC_PR = "r21" -COMPATIBLE_MACHINE = "(dm365|omapl138|omap3|ti816x)" +COMPATIBLE_MACHINE = "(dm365|omapl138|omap3|ti816x|ti814x)" -PLATFORM_dm365 = "dm365" +PLATFORM_dm365-evm = "dm365" +PLATFORM_dm368-evm = "dm368" PLATFORM_omapl138 = "omapl138" PLATFORM_omap3evm = "omap3530" PLATFORM_dm37x-evm = "dm3730" PLATFORM_am37x-evm = "am3715" PLATFORM_beagleboard = "am3715" PLATFORM_ti816x = "ti816x" +PLATFORM_ti814x = "ti814x" PLATFORM_am180x-evm = "am180x" PLATFORM_am181x-evm = "am181x" PLATFORM_am3517-evm = "am3517" diff --git a/recipes/ti/matrix-gui_1.3.bb b/recipes/ti/matrix-gui_1.3.bb index 98a03b418a..51678df28b 100644 --- a/recipes/ti/matrix-gui_1.3.bb +++ b/recipes/ti/matrix-gui_1.3.bb @@ -1,4 +1,4 @@ require matrix-gui.inc -SRCREV = "222" -PR = "${INC_PR}.1" +SRCREV = "257" +PR = "${INC_PR}.6" diff --git a/recipes/ti/ti-cgt6x_7.2.2.bb b/recipes/ti/ti-cgt6x_7.2.2.bb new file mode 100644 index 0000000000..e4c0e8e61a --- /dev/null +++ b/recipes/ti/ti-cgt6x_7.2.2.bb @@ -0,0 +1,8 @@ +require ti-cgt6x.inc + +PE = "1" +PV = "7_2_2" +PVwithdots = "7.2.2" + +SRC_URI[cgt6xbin.md5sum] = "8cbe25f3edbc897ba4a535a416df19bc" +SRC_URI[cgt6xbin.sha256sum] = "7a938083850d05430a9bab4a18c14a7a0ac2ea08e94c652cf1644bb9560ca22e" diff --git a/recipes/ti/ti-edma3lld-sysbios.inc b/recipes/ti/ti-edma3lld-sysbios.inc index fb17978b1a..3e51c5cb35 100644 --- a/recipes/ti/ti-edma3lld-sysbios.inc +++ b/recipes/ti/ti-edma3lld-sysbios.inc @@ -5,16 +5,12 @@ LICENSE = "TI" require ti-paths.inc require ti-staging.inc -require ti-eula-unpack.inc -PR = "r1" +PR = "r2" S = "${WORKDIR}/edma3_lld_${PV}" -SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/psp/edma3_lld/edma3-lld-bios6/${PV}/exports/EDMA3_LLD_setuplinux_${PV}.bin;name=edma3lldsysbiosbin" - -BINFILE="EDMA3_LLD_setuplinux_${PV}.bin" -TI_BIN_UNPK_CMDS="Y:workdir" +SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/psp/edma3_lld/edma3-lld-bios6/${PV}/exports/edma3_lld_${PV}.tar.gz" do_install() { install -d ${D}${EDMA3_LLD_SYSBIOS_INSTALL_DIR_RECIPE} diff --git a/recipes/ti/ti-edma3lld-sysbios_02.10.03.04.bb b/recipes/ti/ti-edma3lld-sysbios_02.10.03.04.bb index 0bfacf67db..51cd6fe908 100644 --- a/recipes/ti/ti-edma3lld-sysbios_02.10.03.04.bb +++ b/recipes/ti/ti-edma3lld-sysbios_02.10.03.04.bb @@ -1,7 +1,12 @@ require ti-edma3lld-sysbios.inc +require ti-eula-unpack.inc PV = "02_10_03_04" +SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_tii/psp/edma3_lld/edma3-lld-bios6/${PV}/exports/EDMA3_LLD_setuplinux_${PV}.bin;name=edma3lldsysbiosbin" + SRC_URI[edma3lldsysbiosbin.md5sum] = "9c1d9b8ee600f234ad635d3866b9f850" SRC_URI[edma3lldsysbiosbin.sha256sum] = "7becc0bf7f2c8126f4bc1fcde8daf50db22a55f7d13abc733db96380f10e910f" +BINFILE="EDMA3_LLD_setuplinux_${PV}.bin" +TI_BIN_UNPK_CMDS="Y:workdir" diff --git a/recipes/ti/ti-edma3lld-sysbios_02.11.01.02.bb b/recipes/ti/ti-edma3lld-sysbios_02.11.01.02.bb new file mode 100644 index 0000000000..264dfb388d --- /dev/null +++ b/recipes/ti/ti-edma3lld-sysbios_02.11.01.02.bb @@ -0,0 +1,6 @@ +require ti-edma3lld-sysbios.inc + +PV = "02_11_01_02" + +SRC_URI[md5sum] = "270c15dc5f0a5761adb1ff45ab1adb99" +SRC_URI[sha256sum] = "bd76114114a099eba15bdce8e3815a8cd2c01d819ebfc630f6abdd39da36b525" diff --git a/recipes/ti/ti-ipc.inc b/recipes/ti/ti-ipc.inc index cd6ad6e3d5..0bc6218039 100644 --- a/recipes/ti/ti-ipc.inc +++ b/recipes/ti/ti-ipc.inc @@ -1,7 +1,7 @@ DESCRIPTION = "TI Inter Process Ccommunication (IPC) Mechanisms (for Uni- and Multi- Processor Configurations)" HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ipc/index.html" SECTION = "devel" -LICENSE = "TI" +LICENSE = "BSD" require ti-paths.inc require ti-staging.inc @@ -13,8 +13,9 @@ S = "${WORKDIR}/ipc_${PV}" SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/ipc/${PV}/exports/ipc_setuplinux_${PV}.bin;name=ipcbin" +DEPENDS = "ti-sysbios ti-cgt6x ti-xdctools" BINFILE="ipc_setuplinux_${PV}.bin" -TI_BIN_UNPK_CMDS="Y: qY:workdir:Y" +TI_BIN_UNPK_CMDS="Y: q:workdir:Y" do_install() { install -d ${D}${IPC_INSTALL_DIR_RECIPE} diff --git a/recipes/ti/ti-ipc_1.22.04.25.bb b/recipes/ti/ti-ipc_1.22.04.25.bb new file mode 100644 index 0000000000..1573dce548 --- /dev/null +++ b/recipes/ti/ti-ipc_1.22.04.25.bb @@ -0,0 +1,6 @@ +require ti-ipc.inc + +PV = "1_22_04_25" + +SRC_URI[ipcbin.md5sum] = "aaa7f3776794a92b4226cd923c7cd956" +SRC_URI[ipcbin.sha256sum] = "b33e25e0330719c2857a5ca3abccd03fe1b55a9300b2f825707f2bc64b84c883" diff --git a/recipes/ti/ti-ipc_1.22.05.27.bb b/recipes/ti/ti-ipc_1.22.05.27.bb new file mode 100644 index 0000000000..c3d25a6c90 --- /dev/null +++ b/recipes/ti/ti-ipc_1.22.05.27.bb @@ -0,0 +1,6 @@ +require ti-ipc.inc + +PV = "1_22_05_27" + +SRC_URI[ipcbin.md5sum] = "bd35d75b754f0fc54d7ad74cfc971987" +SRC_URI[ipcbin.sha256sum] = "b61969dc8b5bf01ee6f68151d2c8e123b1b3b425990987fe64288085d8cc15b7" diff --git a/recipes/ti/ti-pru-sw-examples_1.00.00.bb b/recipes/ti/ti-pru-sw-examples_1.00.00.bb index f5fa8d5233..45a01eb7b2 100644 --- a/recipes/ti/ti-pru-sw-examples_1.00.00.bb +++ b/recipes/ti/ti-pru-sw-examples_1.00.00.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://gforge.ti.com/gf/project/pru_sw/" LICENSE = "BSD" DEPENDS += "ti-pru-sw-app-loader ti-pru-sw-edma-library" RDEPENDS += "ti-pru-sw-edma-driver kernel-module-uio-pru" -PR = "r2+svnr${SRCPV}" +PR = "r4+svnr${SRCPV}" COMPATIBLE_MACHINE = "omapl138" @@ -14,7 +14,7 @@ S = "${WORKDIR}/trunk" do_compile () { make -C ${S}/example_apps \ - CC=${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}gcc \ + CC="${TOOLCHAIN_PATH}/bin/${TARGET_PREFIX}gcc ${TOOLCHAIN_OPTIONS}" \ BINDIR_APPLICATIONS="${S}/example_apps/bin" \ BINDIR_FW="${S}/example_apps/bin" \ UTILS_DIR="${S}/utils" diff --git a/recipes/ti/ti-sysbios.inc b/recipes/ti/ti-sysbios.inc index cf45c379db..046b6fe8eb 100644 --- a/recipes/ti/ti-sysbios.inc +++ b/recipes/ti/ti-sysbios.inc @@ -1,19 +1,20 @@ DESCRIPTION = "TI SYS/BIOS v6 Kernel" HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios" SECTION = "devel" +LICENSE = "BSD" require ti-paths.inc require ti-staging.inc require ti-eula-unpack.inc -PR = "r1" +PR = "r2" S = "${WORKDIR}/bios_${PV}" SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/${PV}/exports/bios_setuplinux_${PV}.bin;name=sysbiosbin" BINFILE="bios_setuplinux_${PV}.bin" -TI_BIN_UNPK_CMDS="Y: qY:workdir:Y" +TI_BIN_UNPK_CMDS="Y: q:workdir:Y" do_install() { install -d ${D}${SYSBIOS_INSTALL_DIR_RECIPE} diff --git a/recipes/ti/ti-sysbios_6.21.01.16.bb b/recipes/ti/ti-sysbios_6.21.01.16.bb index f26858a231..848ae36008 100644 --- a/recipes/ti/ti-sysbios_6.21.01.16.bb +++ b/recipes/ti/ti-sysbios_6.21.01.16.bb @@ -5,3 +5,4 @@ PV = "6_21_01_16" SRC_URI[sysbiosbin.md5sum] = "411cd0fac224126ed2a81e67fc79c81a" SRC_URI[sysbiosbin.sha256sum] = "63d2704ff294fe0834411d010d19c0a0bfd0249520f5ee5ddc2c115df2be8ddd" +TI_BIN_UNPK_CMDS="Y: qY:workdir:Y" diff --git a/recipes/ti/ti-sysbios_6.31.00.18.bb b/recipes/ti/ti-sysbios_6.31.00.18.bb index 8bed7f4c9f..a25c9242e0 100644 --- a/recipes/ti/ti-sysbios_6.31.00.18.bb +++ b/recipes/ti/ti-sysbios_6.31.00.18.bb @@ -5,3 +5,4 @@ PV = "6_31_00_18" SRC_URI[sysbiosbin.md5sum] = "a37fe51f208d7cb63a6fae09d3285c69" SRC_URI[sysbiosbin.sha256sum] = "2d5cedffdc554e545ee9e233ba760e95b97904f6ea0ca3dbdd56a422b05e2b62" +TI_BIN_UNPK_CMDS="Y: qY:workdir:Y" diff --git a/recipes/ti/ti-sysbios_6.31.04.27.bb b/recipes/ti/ti-sysbios_6.31.04.27.bb new file mode 100644 index 0000000000..619d6ffded --- /dev/null +++ b/recipes/ti/ti-sysbios_6.31.04.27.bb @@ -0,0 +1,6 @@ +require ti-sysbios.inc + +PV = "6_31_04_27" + +SRC_URI[sysbiosbin.md5sum] = "c82e1d3afc9e2d3e88b0e4137f152ed6" +SRC_URI[sysbiosbin.sha256sum] = "92337cf3197d2b7ffe2316f311cd163be7b470acbb032273894d7d39182f4227" diff --git a/recipes/ti/ti-wifi-utils_git.bb b/recipes/ti/ti-wifi-utils_git.bb index 5877cafdfc..96718debdf 100644 --- a/recipes/ti/ti-wifi-utils_git.bb +++ b/recipes/ti/ti-wifi-utils_git.bb @@ -1,20 +1,31 @@ DESCRIPTION = "The calibrator and other useful utilities for TI wireless solution based on wl12xx driver" LICENCE = "TI-BSD" -DEPENDS = "libnl2" +DEPENDS = "libnl" +PR ="r3" PV ="0.0" PR_append = "+gitr${SRCPV}" -SRCREV = "6de17deb67a1313b5cc8" +SRCREV = "268dbf03091b632c2697eb8028e90fe40513a9d8" SRC_URI = "git://github.com/gxk/ti-utils.git;protocol=git" S = "${WORKDIR}/git" export CROSS_COMPILE = "${TARGET_PREFIX}" -CFLAGS += "-I${STAGING_INCDIR}/libnl2/ -DCONFIG_LIBNL20" +CFLAGS += " -DCONFIG_LIBNL20" do_install() { install -d ${D}${bindir} + install -d ${D}${datadir}/ti/wifi-utils/ini_files/127x + install -d ${D}${datadir}/ti/wifi-utils/ini_files/128x + install -m 0755 calibrator ${D}${bindir}/ + install -m 0755 ${S}/ini_files/127x/* ${D}${datadir}/ti/wifi-utils/ini_files/127x + install -m 0755 ${S}/ini_files/128x/* ${D}${datadir}/ti/wifi-utils/ini_files/128x } + +FILES_${PN} += " \ + ${datadir}/ti/wifi-utils/ini_files/127x \ + ${datadir}/ti/wifi-utils/ini_files/128x \ +" diff --git a/recipes/ti/ti-xdctools_3.20.08.88.bb b/recipes/ti/ti-xdctools_3.20.08.88.bb new file mode 100644 index 0000000000..bf0cdcdd10 --- /dev/null +++ b/recipes/ti/ti-xdctools_3.20.08.88.bb @@ -0,0 +1,6 @@ +require ti-xdctools.inc + +PV = "3_20_08_88" + +SRC_URI[xdcbin.md5sum] = "068447e935adb54f0cacf0e294a281f9" +SRC_URI[xdcbin.sha256sum] = "a4616fae3cc2a9f46b5b4377bb57af7f7932297cda210a6cbcc5f942256db196" diff --git a/recipes/twin/twin-0.4.6/cross_compile.patch b/recipes/twin/twin-0.4.6/cross_compile.patch index 7f8163a78a..83b3bf7e42 100644 --- a/recipes/twin/twin-0.4.6/cross_compile.patch +++ b/recipes/twin/twin-0.4.6/cross_compile.patch @@ -1,5 +1,5 @@ -diff -urNd ../twin-0.4.6-r0/twin-0.4.6/Makefile.in twin-0.4.6/Makefile.in ---- ../twin-0.4.6-r0/twin-0.4.6/Makefile.in 2003-03-27 08:29:47 +00:00 +diff -urNd twin-0.4.6/Makefile.in twin-0.4.6/Makefile.in +--- twin-0.4.6/Makefile.in 2003-03-27 08:29:47 +00:00 +++ twin-0.4.6/Makefile.in 2004-07-27 13:04:46 +01:00 @@ -71,33 +71,33 @@ # to correctly generate include/autoconf.h @@ -55,8 +55,8 @@ diff -urNd ../twin-0.4.6-r0/twin-0.4.6/Makefile.in twin-0.4.6/Makefile.in # # was: -diff -urNd ../twin-0.4.6-r0/twin-0.4.6/configure twin-0.4.6/configure ---- ../twin-0.4.6-r0/twin-0.4.6/configure 2003-03-27 08:29:47 +00:00 +diff -urNd twin-0.4.6/configure twin-0.4.6/configure +--- twin-0.4.6/configure 2003-03-27 08:29:47 +00:00 +++ twin-0.4.6/configure 2004-07-27 13:11:21 +01:00 @@ -1235,7 +1235,7 @@ @@ -85,8 +85,8 @@ diff -urNd ../twin-0.4.6-r0/twin-0.4.6/configure twin-0.4.6/configure cp $export_symbols $output_objdir/$soname-def; else echo EXPORTS > $output_objdir/$soname-def; -diff -urNd ../twin-0.4.6-r0/twin-0.4.6/configure.in twin-0.4.6/configure.in ---- ../twin-0.4.6-r0/twin-0.4.6/configure.in 2003-03-27 08:29:47 +00:00 +diff -urNd twin-0.4.6/configure.in twin-0.4.6/configure.in +--- twin-0.4.6/configure.in 2003-03-27 08:29:47 +00:00 +++ twin-0.4.6/configure.in 2004-07-27 13:18:07 +01:00 @@ -188,7 +188,7 @@ @@ -115,8 +115,8 @@ diff -urNd ../twin-0.4.6-r0/twin-0.4.6/configure.in twin-0.4.6/configure.in AC_CHECK_FUNC(crypt,,AC_CHECK_LIB(crypt,crypt)) AC_CHECK_FUNC(dlopen,,AC_CHECK_LIB(dl,dlopen)) AC_CHECK_LIB(ltdl,lt_dlopen) -diff -urNd ../twin-0.4.6-r0/twin-0.4.6/makerules twin-0.4.6/makerules ---- ../twin-0.4.6-r0/twin-0.4.6/makerules 2003-03-27 08:29:48 +00:00 +diff -urNd twin-0.4.6/makerules twin-0.4.6/makerules +--- twin-0.4.6/makerules 2003-03-27 08:29:48 +00:00 +++ twin-0.4.6/makerules 2004-07-27 13:04:46 +01:00 @@ -794,7 +794,7 @@ endif @@ -140,8 +140,8 @@ diff -urNd ../twin-0.4.6-r0/twin-0.4.6/makerules twin-0.4.6/makerules # -diff -urNd ../twin-0.4.6-r0/twin-0.4.6/scripts/mkdep.c twin-0.4.6/scripts/mkdep.c ---- ../twin-0.4.6-r0/twin-0.4.6/scripts/mkdep.c 2003-03-27 08:29:48 +00:00 +diff -urNd twin-0.4.6/scripts/mkdep.c twin-0.4.6/scripts/mkdep.c +--- twin-0.4.6/scripts/mkdep.c 2003-03-27 08:29:48 +00:00 +++ twin-0.4.6/scripts/mkdep.c 2004-07-27 13:04:46 +01:00 @@ -172,8 +172,8 @@ putchar('\n'); diff --git a/recipes/tzcode/tzcode-native_2011b.bb b/recipes/tzcode/tzcode-native_2011e.bb similarity index 51% rename from recipes/tzcode/tzcode-native_2011b.bb rename to recipes/tzcode/tzcode-native_2011e.bb index 30996d9d76..2bf4f4cee9 100644 --- a/recipes/tzcode/tzcode-native_2011b.bb +++ b/recipes/tzcode/tzcode-native_2011e.bb @@ -6,11 +6,11 @@ require tzcode-native.inc # Also, tzdata (and it is needed to build tzcode) version can differ from # tzcode version, thus this variable -TZDATA_PV = "2011b" +TZDATA_PV = "2011e" PR = "${INC_PR}.0" -SRC_URI[tzcode-2011b.md5sum] = "c63a1425f7252aef1fe54a258cdccff8" -SRC_URI[tzcode-2011b.sha256sum] = "8031d05102e5c5109521a282aaab0629680bec82db783c716905802313678d67" -SRC_URI[tzdata-2011b.md5sum] = "9eaf3ca354c42a32bd28e623539bf0e0" -SRC_URI[tzdata-2011b.sha256sum] = "ff45f5ddc2ec925249626d00d7bc2ffff587e0956a1d8245517a023bf27e4cc9" +SRC_URI[tzcode-2011e.md5sum] = "fbfc05dbf9ebcfe7c4bba18549870173" +SRC_URI[tzcode-2011e.sha256sum] = "8fb00f8763aa51d83d6f3190d144124bb7176ca829fc08823d6205297bf0426b" +SRC_URI[tzdata-2011e.md5sum] = "044a07072300a0ee72b046e5a9a4ec90" +SRC_URI[tzdata-2011e.sha256sum] = "44fef01de4589a4979eb6b5fdbbfd21a3b135852af1ecbfb9e0368ae47392c79" diff --git a/recipes/tzdata/tzdata_2011a.bb b/recipes/tzdata/tzdata_2011b.bb similarity index 62% rename from recipes/tzdata/tzdata_2011a.bb rename to recipes/tzdata/tzdata_2011b.bb index 7bd1ba0c7a..87ba61983b 100644 --- a/recipes/tzdata/tzdata_2011a.bb +++ b/recipes/tzdata/tzdata_2011b.bb @@ -6,6 +6,6 @@ require tzdata.inc PR = "${INC_PR}.0" -SRC_URI[tar.md5sum] = "d60f168fb7307d8c1b926c7dc3a6c5c1" -SRC_URI[tar.sha256sum] = "782c691b4750bdefeb84063128db685a8b8f31dc2efb887ee841ae105bfa747b" +SRC_URI[tar.md5sum] = "9eaf3ca354c42a32bd28e623539bf0e0" +SRC_URI[tar.sha256sum] = "ff45f5ddc2ec925249626d00d7bc2ffff587e0956a1d8245517a023bf27e4cc9" diff --git a/recipes/u-boot/u-boot-1.1.6/sarge-uboot.patch b/recipes/u-boot/u-boot-1.1.6/sarge-uboot.patch index 0c0d56f4d1..fadf9e2423 100644 --- a/recipes/u-boot/u-boot-1.1.6/sarge-uboot.patch +++ b/recipes/u-boot/u-boot-1.1.6/sarge-uboot.patch @@ -1,6 +1,6 @@ -diff -Nurp ../u-boot-1.1.6/arm_config.mk ./arm_config.mk ---- ../u-boot-1.1.6/arm_config.mk 2006-11-02 15:15:01.000000000 +0100 -+++ ./arm_config.mk 2007-04-23 18:07:47.000000000 +0200 +diff -Nurp u-boot-1.1.6/arm_config.mk b/arm_config.mk +--- u-boot-1.1.6/arm_config.mk 2006-11-02 15:15:01.000000000 +0100 ++++ b/arm_config.mk 2007-04-23 18:07:47.000000000 +0200 @@ -21,4 +21,6 @@ # MA 02111-1307 USA # @@ -8,14 +8,14 @@ diff -Nurp ../u-boot-1.1.6/arm_config.mk ./arm_config.mk +#PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 -msoft-float +PLATFORM_CPPFLAGS += -march=armv4t -mtune=arm920t PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__ -diff -Nurp ../u-boot-1.1.6/board/sarge/config.mk ./board/sarge/config.mk ---- ../u-boot-1.1.6/board/sarge/config.mk 1970-01-01 01:00:00.000000000 +0100 -+++ ./board/sarge/config.mk 2007-03-21 00:31:33.000000000 +0100 +diff -Nurp u-boot-1.1.6/board/sarge/config.mk b/board/sarge/config.mk +--- u-boot-1.1.6/board/sarge/config.mk 1970-01-01 01:00:00.000000000 +0100 ++++ b/board/sarge/config.mk 2007-03-21 00:31:33.000000000 +0100 @@ -0,0 +1 @@ +TEXT_BASE = 0x21F00000 -diff -Nurp ../u-boot-1.1.6/board/sarge/flash.c ./board/sarge/flash.c ---- ../u-boot-1.1.6/board/sarge/flash.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./board/sarge/flash.c 2007-03-09 01:25:41.000000000 +0100 +diff -Nurp u-boot-1.1.6/board/sarge/flash.c b/board/sarge/flash.c +--- u-boot-1.1.6/board/sarge/flash.c 1970-01-01 01:00:00.000000000 +0100 ++++ b/board/sarge/flash.c 2007-03-09 01:25:41.000000000 +0100 @@ -0,0 +1,504 @@ +/* + * (C) Copyright 2002 @@ -521,9 +521,9 @@ diff -Nurp ../u-boot-1.1.6/board/sarge/flash.c ./board/sarge/flash.c + + return ERR_OK; +} -diff -Nurp ../u-boot-1.1.6/board/sarge/Makefile ./board/sarge/Makefile ---- ../u-boot-1.1.6/board/sarge/Makefile 1970-01-01 01:00:00.000000000 +0100 -+++ ./board/sarge/Makefile 2007-03-14 01:05:48.000000000 +0100 +diff -Nurp u-boot-1.1.6/board/sarge/Makefile b/board/sarge/Makefile +--- u-boot-1.1.6/board/sarge/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ b/board/sarge/Makefile 2007-03-14 01:05:48.000000000 +0100 @@ -0,0 +1,46 @@ +# +# (C) Copyright 2007 @@ -571,9 +571,9 @@ diff -Nurp ../u-boot-1.1.6/board/sarge/Makefile ./board/sarge/Makefile +-include .depend + +######################################################################### -diff -Nurp ../u-boot-1.1.6/board/sarge/sarge_board.c ./board/sarge/sarge_board.c ---- ../u-boot-1.1.6/board/sarge/sarge_board.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./board/sarge/sarge_board.c 2007-05-11 23:45:25.000000000 +0200 +diff -Nurp u-boot-1.1.6/board/sarge/sarge_board.c b/board/sarge/sarge_board.c +--- u-boot-1.1.6/board/sarge/sarge_board.c 1970-01-01 01:00:00.000000000 +0100 ++++ b/board/sarge/sarge_board.c 2007-05-11 23:45:25.000000000 +0200 @@ -0,0 +1,363 @@ +/* + * (C) Copyright 2007 @@ -938,9 +938,9 @@ diff -Nurp ../u-boot-1.1.6/board/sarge/sarge_board.c ./board/sarge/sarge_board.c + printf ("%4lu MB\n", nand_probe(AT91_SMARTMEDIA_BASE) >> 20); +} +#endif -diff -Nurp ../u-boot-1.1.6/board/sarge/u-boot.lds ./board/sarge/u-boot.lds ---- ../u-boot-1.1.6/board/sarge/u-boot.lds 1970-01-01 01:00:00.000000000 +0100 -+++ ./board/sarge/u-boot.lds 2007-03-09 01:25:41.000000000 +0100 +diff -Nurp u-boot-1.1.6/board/sarge/u-boot.lds b/board/sarge/u-boot.lds +--- u-boot-1.1.6/board/sarge/u-boot.lds 1970-01-01 01:00:00.000000000 +0100 ++++ b/board/sarge/u-boot.lds 2007-03-09 01:25:41.000000000 +0100 @@ -0,0 +1,57 @@ +/* + * (C) Copyright 2002 @@ -999,9 +999,9 @@ diff -Nurp ../u-boot-1.1.6/board/sarge/u-boot.lds ./board/sarge/u-boot.lds + .bss : { *(.bss) } + _end = .; +} -diff -Nurp ../u-boot-1.1.6/common/cmd_bootm.c ./common/cmd_bootm.c ---- ../u-boot-1.1.6/common/cmd_bootm.c 2006-11-02 15:15:01.000000000 +0100 -+++ ./common/cmd_bootm.c 2007-03-27 02:55:11.000000000 +0200 +diff -Nurp u-boot-1.1.6/common/cmd_bootm.c b/common/cmd_bootm.c +--- u-boot-1.1.6/common/cmd_bootm.c 2006-11-02 15:15:01.000000000 +0100 ++++ b/common/cmd_bootm.c 2007-03-27 02:55:11.000000000 +0200 @@ -79,7 +79,10 @@ DECLARE_GLOBAL_DATA_PTR; # define CHUNKSZ (64 * 1024) #endif @@ -1149,9 +1149,9 @@ diff -Nurp ../u-boot-1.1.6/common/cmd_bootm.c ./common/cmd_bootm.c #ifdef CONFIG_BZIP2 void bz_internal_error(int errcode) -diff -Nurp ../u-boot-1.1.6/cpu/arm920t/at91rm9200/Makefile ./cpu/arm920t/at91rm9200/Makefile ---- ../u-boot-1.1.6/cpu/arm920t/at91rm9200/Makefile 2006-11-02 15:15:01.000000000 +0100 -+++ ./cpu/arm920t/at91rm9200/Makefile 2007-05-13 20:19:07.000000000 +0200 +diff -Nurp u-boot-1.1.6/cpu/arm920t/at91rm9200/Makefile b/cpu/arm920t/at91rm9200/Makefile +--- u-boot-1.1.6/cpu/arm920t/at91rm9200/Makefile 2006-11-02 15:15:01.000000000 +0100 ++++ b/cpu/arm920t/at91rm9200/Makefile 2007-05-13 20:19:07.000000000 +0200 @@ -26,7 +26,7 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(SOC).a @@ -1161,9 +1161,9 @@ diff -Nurp ../u-boot-1.1.6/cpu/arm920t/at91rm9200/Makefile ./cpu/arm920t/at91rm9 SOBJS = lowlevel_init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) -diff -Nurp ../u-boot-1.1.6/cpu/arm920t/at91rm9200/ste100p.c ./cpu/arm920t/at91rm9200/ste100p.c ---- ../u-boot-1.1.6/cpu/arm920t/at91rm9200/ste100p.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./cpu/arm920t/at91rm9200/ste100p.c 2007-05-10 02:02:34.000000000 +0200 +diff -Nurp u-boot-1.1.6/cpu/arm920t/at91rm9200/ste100p.c b/cpu/arm920t/at91rm9200/ste100p.c +--- u-boot-1.1.6/cpu/arm920t/at91rm9200/ste100p.c 1970-01-01 01:00:00.000000000 +0100 ++++ b/cpu/arm920t/at91rm9200/ste100p.c 2007-05-10 02:02:34.000000000 +0200 @@ -0,0 +1,517 @@ +/* + * (C) Copyright 2007 @@ -1682,9 +1682,9 @@ diff -Nurp ../u-boot-1.1.6/cpu/arm920t/at91rm9200/ste100p.c ./cpu/arm920t/at91rm +#endif /* CONFIG_COMMANDS & CFG_CMD_NET */ + +#endif /* CONFIG_DRIVER_ETHER */ -diff -Nurp ../u-boot-1.1.6/drivers/dataflash.c ./drivers/dataflash.c ---- ../u-boot-1.1.6/drivers/dataflash.c 2006-11-02 15:15:01.000000000 +0100 -+++ ./drivers/dataflash.c 2007-03-19 23:43:20.000000000 +0100 +diff -Nurp u-boot-1.1.6/drivers/dataflash.c b/drivers/dataflash.c +--- u-boot-1.1.6/drivers/dataflash.c 2006-11-02 15:15:01.000000000 +0100 ++++ b/drivers/dataflash.c 2007-03-19 23:43:20.000000000 +0100 @@ -46,8 +46,8 @@ extern int AT91F_DataFlashRead (AT91PS_D unsigned long size, char *buffer); extern int AT91F_DataFlashWrite( AT91PS_DataFlash pDataFlash, @@ -1750,9 +1750,9 @@ diff -Nurp ../u-boot-1.1.6/drivers/dataflash.c ./drivers/dataflash.c return 1; } -diff -Nurp ../u-boot-1.1.6/include/asm-arm/arch-at91rm9200/AT91RM9200.h ./include/asm-arm/arch-at91rm9200/AT91RM9200.h ---- ../u-boot-1.1.6/include/asm-arm/arch-at91rm9200/AT91RM9200.h 2006-11-02 15:15:01.000000000 +0100 -+++ ./include/asm-arm/arch-at91rm9200/AT91RM9200.h 2007-03-11 16:21:22.000000000 +0100 +diff -Nurp u-boot-1.1.6/include/asm-arm/arch-at91rm9200/AT91RM9200.h b/include/asm-arm/arch-at91rm9200/AT91RM9200.h +--- u-boot-1.1.6/include/asm-arm/arch-at91rm9200/AT91RM9200.h 2006-11-02 15:15:01.000000000 +0100 ++++ b/include/asm-arm/arch-at91rm9200/AT91RM9200.h 2007-03-11 16:21:22.000000000 +0100 @@ -625,14 +625,40 @@ typedef struct _AT91S_PDC #define AT91C_PA26_TWCK ((unsigned int) 1 << 26) #define AT91C_PA31_DTXD ((unsigned int) AT91C_PIO_PA31) /* DBGU Debug Transmit Data */ @@ -1811,9 +1811,9 @@ diff -Nurp ../u-boot-1.1.6/include/asm-arm/arch-at91rm9200/AT91RM9200.h ./includ #define AT91C_PIO_PB25 ((unsigned int) 1 << 25) /* Pin Controlled by PB25 */ #define AT91C_PB25_DSR1 ((unsigned int) AT91C_PIO_PB25) /* USART 1 Data Set ready */ #define AT91C_PB25_EF100 ((unsigned int) AT91C_PIO_PB25) /* Ethernet MAC Force 100 Mbits */ -diff -Nurp ../u-boot-1.1.6/include/asm-arm/arch-at91rm9200/mmc.h ./include/asm-arm/arch-at91rm9200/mmc.h ---- ../u-boot-1.1.6/include/asm-arm/arch-at91rm9200/mmc.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/asm-arm/arch-at91rm9200/mmc.h 2006-10-13 20:55:04.000000000 +0200 +diff -Nurp u-boot-1.1.6/include/asm-arm/arch-at91rm9200/mmc.h b/include/asm-arm/arch-at91rm9200/mmc.h +--- u-boot-1.1.6/include/asm-arm/arch-at91rm9200/mmc.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/include/asm-arm/arch-at91rm9200/mmc.h 2006-10-13 20:55:04.000000000 +0200 @@ -0,0 +1,117 @@ +/* + * linux/include/linux/mmc/mmc.h @@ -1932,9 +1932,9 @@ diff -Nurp ../u-boot-1.1.6/include/asm-arm/arch-at91rm9200/mmc.h ./include/asm-a +extern void mmc_release_host(struct mmc_host *host); + +#endif -diff -Nurp ../u-boot-1.1.6/include/at91rm9200_net.h ./include/at91rm9200_net.h ---- ../u-boot-1.1.6/include/at91rm9200_net.h 2006-11-02 15:15:01.000000000 +0100 -+++ ./include/at91rm9200_net.h 2007-05-04 22:14:56.000000000 +0200 +diff -Nurp u-boot-1.1.6/include/at91rm9200_net.h b/include/at91rm9200_net.h +--- u-boot-1.1.6/include/at91rm9200_net.h 2006-11-02 15:15:01.000000000 +0100 ++++ b/include/at91rm9200_net.h 2007-05-04 22:14:56.000000000 +0200 @@ -38,6 +38,7 @@ typedef struct _AT91S_PhyOps unsigned int (*IsPhyConnected)(AT91S_EMAC *pmac); unsigned char (*GetLinkSpeed)(AT91S_EMAC *pmac); @@ -1943,9 +1943,9 @@ diff -Nurp ../u-boot-1.1.6/include/at91rm9200_net.h ./include/at91rm9200_net.h } AT91S_PhyOps,*AT91PS_PhyOps; -diff -Nurp ../u-boot-1.1.6/include/configs/sarge.h ./include/configs/sarge.h ---- ../u-boot-1.1.6/include/configs/sarge.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/configs/sarge.h 2007-05-10 00:02:56.000000000 +0200 +diff -Nurp u-boot-1.1.6/include/configs/sarge.h b/include/configs/sarge.h +--- u-boot-1.1.6/include/configs/sarge.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/include/configs/sarge.h 2007-05-10 00:02:56.000000000 +0200 @@ -0,0 +1,281 @@ +/* + * Grzegorz Rajtar @@ -2228,9 +2228,9 @@ diff -Nurp ../u-boot-1.1.6/include/configs/sarge.h ./include/configs/sarge.h +#define CONFIG_LOADADDR 0x21000000 +#define CONFIG_NFSARGS "mem=32M console=ttyS0,115200n8 root=/dev/nfs nfsroot=192.168.0.200:/tftp/at91/rootfs,timeo=200,retrans=500 ip=:::::eth0:on" +#endif -diff -Nurp ../u-boot-1.1.6/include/dataflash.h ./include/dataflash.h ---- ../u-boot-1.1.6/include/dataflash.h 2006-11-02 15:15:01.000000000 +0100 -+++ ./include/dataflash.h 2007-03-19 23:29:49.000000000 +0100 +diff -Nurp u-boot-1.1.6/include/dataflash.h b/include/dataflash.h +--- u-boot-1.1.6/include/dataflash.h 2006-11-02 15:15:01.000000000 +0100 ++++ b/include/dataflash.h 2007-03-19 23:29:49.000000000 +0100 @@ -79,6 +79,7 @@ typedef struct _AT91S_Dataflash { int page_offset; /* page offset in command */ int byte_mask; /* byte mask in command */ @@ -2248,9 +2248,9 @@ diff -Nurp ../u-boot-1.1.6/include/dataflash.h ./include/dataflash.h /* DataFlash return value */ #define DATAFLASH_BUSY 0x00 -diff -Nurp ../u-boot-1.1.6/include/_exports.h ./include/_exports.h ---- ../u-boot-1.1.6/include/_exports.h 2006-11-02 15:15:01.000000000 +0100 -+++ ./include/_exports.h 2007-03-15 23:41:08.000000000 +0100 +diff -Nurp u-boot-1.1.6/include/_exports.h b/include/_exports.h +--- u-boot-1.1.6/include/_exports.h 2006-11-02 15:15:01.000000000 +0100 ++++ b/include/_exports.h 2007-03-15 23:41:08.000000000 +0100 @@ -18,4 +18,4 @@ EXPORT_FUNC(simple_strtoul) #if (CONFIG_COMMANDS & CFG_CMD_I2C) EXPORT_FUNC(i2c_write) @@ -2258,9 +2258,9 @@ diff -Nurp ../u-boot-1.1.6/include/_exports.h ./include/_exports.h -#endif /* CFG_CMD_I2C */ +#endif /* CFG_CMD_I2C */ \ Brak znaku nowej linii na koÅ„cu pliku -diff -Nurp ../u-boot-1.1.6/include/gunzip.h ./include/gunzip.h ---- ../u-boot-1.1.6/include/gunzip.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/gunzip.h 2007-03-21 23:23:36.000000000 +0100 +diff -Nurp u-boot-1.1.6/include/gunzip.h b/include/gunzip.h +--- u-boot-1.1.6/include/gunzip.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/include/gunzip.h 2007-03-21 23:23:36.000000000 +0100 @@ -0,0 +1,73 @@ +#ifndef _GUNZIP_H +#define _GUNZIP_H @@ -2335,9 +2335,9 @@ diff -Nurp ../u-boot-1.1.6/include/gunzip.h ./include/gunzip.h + unsigned char *outbuf, unsigned long *outsize); + +#endif /* _GUNZIP_H */ -diff -Nurp ../u-boot-1.1.6/include/ste100p.h ./include/ste100p.h ---- ../u-boot-1.1.6/include/ste100p.h 1970-01-01 01:00:00.000000000 +0100 -+++ ./include/ste100p.h 2007-05-05 01:38:11.000000000 +0200 +diff -Nurp u-boot-1.1.6/include/ste100p.h b/include/ste100p.h +--- u-boot-1.1.6/include/ste100p.h 1970-01-01 01:00:00.000000000 +0100 ++++ b/include/ste100p.h 2007-05-05 01:38:11.000000000 +0200 @@ -0,0 +1,163 @@ +#ifndef _ste100p_h_ +#define _ste100p_h_ @@ -2502,9 +2502,9 @@ diff -Nurp ../u-boot-1.1.6/include/ste100p.h ./include/ste100p.h +UCHAR ste100p_AutoNegotiate (AT91PS_EMAC p_mac, int *status); + +#endif // _ste100p_h_ -diff -Nurp ../u-boot-1.1.6/lib_arm/armlinux.c ./lib_arm/armlinux.c ---- ../u-boot-1.1.6/lib_arm/armlinux.c 2006-11-02 15:15:01.000000000 +0100 -+++ ./lib_arm/armlinux.c 2007-05-05 01:28:02.000000000 +0200 +diff -Nurp u-boot-1.1.6/lib_arm/armlinux.c b/lib_arm/armlinux.c +--- u-boot-1.1.6/lib_arm/armlinux.c 2006-11-02 15:15:01.000000000 +0100 ++++ b/lib_arm/armlinux.c 2007-05-05 01:28:02.000000000 +0200 @@ -62,6 +62,10 @@ static void setup_end_tag (bd_t *bd); static void setup_videolfb_tag (gd_t *gd); # endif @@ -2564,9 +2564,9 @@ diff -Nurp ../u-boot-1.1.6/lib_arm/armlinux.c ./lib_arm/armlinux.c params = tag_next (params); } #endif /* CONFIG_INITRD_TAG */ -diff -Nurp ../u-boot-1.1.6/lib_arm/board.c ./lib_arm/board.c ---- ../u-boot-1.1.6/lib_arm/board.c 2006-11-02 15:15:01.000000000 +0100 -+++ ./lib_arm/board.c 2007-05-04 23:21:40.000000000 +0200 +diff -Nurp u-boot-1.1.6/lib_arm/board.c b/lib_arm/board.c +--- u-boot-1.1.6/lib_arm/board.c 2006-11-02 15:15:01.000000000 +0100 ++++ b/lib_arm/board.c 2007-05-04 23:21:40.000000000 +0200 @@ -94,6 +94,8 @@ void mem_malloc_init (ulong dest_addr) mem_malloc_end = dest_addr + CFG_MALLOC_LEN; mem_malloc_brk = mem_malloc_start; @@ -2604,9 +2604,9 @@ diff -Nurp ../u-boot-1.1.6/lib_arm/board.c ./lib_arm/board.c /* main_loop() can return to retry autoboot, if so just run it again. */ for (;;) { main_loop (); -diff -Nurp ../u-boot-1.1.6/lib_generic/gunzip.c ./lib_generic/gunzip.c ---- ../u-boot-1.1.6/lib_generic/gunzip.c 1970-01-01 01:00:00.000000000 +0100 -+++ ./lib_generic/gunzip.c 2007-03-22 00:44:21.000000000 +0100 +diff -Nurp u-boot-1.1.6/lib_generic/gunzip.c b/lib_generic/gunzip.c +--- u-boot-1.1.6/lib_generic/gunzip.c 1970-01-01 01:00:00.000000000 +0100 ++++ b/lib_generic/gunzip.c 2007-03-22 00:44:21.000000000 +0100 @@ -0,0 +1,613 @@ +#include "gunzip.h" + @@ -3221,9 +3221,9 @@ diff -Nurp ../u-boot-1.1.6/lib_generic/gunzip.c ./lib_generic/gunzip.c + + return 0; +} -diff -Nurp ../u-boot-1.1.6/lib_generic/Makefile ./lib_generic/Makefile ---- ../u-boot-1.1.6/lib_generic/Makefile 2006-11-02 15:15:01.000000000 +0100 -+++ ./lib_generic/Makefile 2007-03-25 17:49:13.000000000 +0200 +diff -Nurp u-boot-1.1.6/lib_generic/Makefile b/lib_generic/Makefile +--- u-boot-1.1.6/lib_generic/Makefile 2006-11-02 15:15:01.000000000 +0100 ++++ b/lib_generic/Makefile 2007-03-25 17:49:13.000000000 +0200 @@ -28,7 +28,8 @@ LIB = $(obj)libgeneric.a COBJS = bzlib.o bzlib_crctable.o bzlib_decompress.o \ bzlib_randtable.o bzlib_huffman.o \ @@ -3235,9 +3235,9 @@ diff -Nurp ../u-boot-1.1.6/lib_generic/Makefile ./lib_generic/Makefile SRCS := $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) Pliki ../u-boot-1.1.6/loader-sarge i ./loader-sarge różniÄ… siÄ™ -diff -Nurp ../u-boot-1.1.6/Makefile ./Makefile ---- ../u-boot-1.1.6/Makefile 2006-11-02 15:15:01.000000000 +0100 -+++ ./Makefile 2007-03-29 20:07:54.000000000 +0200 +diff -Nurp u-boot-1.1.6/Makefile b/Makefile +--- u-boot-1.1.6/Makefile 2006-11-02 15:15:01.000000000 +0100 ++++ b/Makefile 2007-03-29 20:07:54.000000000 +0200 @@ -1882,6 +1882,9 @@ smdk2410_config : unconfig SX1_config : unconfig @$(MKCONFIG) $(@:_config=) arm arm925t sx1 @@ -3248,9 +3248,9 @@ diff -Nurp ../u-boot-1.1.6/Makefile ./Makefile # TRAB default configuration: 8 MB Flash, 32 MB RAM trab_config \ trab_bigram_config \ -diff -Nurp ../u-boot-1.1.6/net/bootp.c ./net/bootp.c ---- ../u-boot-1.1.6/net/bootp.c 2006-11-02 15:15:01.000000000 +0100 -+++ ./net/bootp.c 2007-05-09 23:46:31.000000000 +0200 +diff -Nurp u-boot-1.1.6/net/bootp.c b/net/bootp.c +--- u-boot-1.1.6/net/bootp.c 2006-11-02 15:15:01.000000000 +0100 ++++ b/net/bootp.c 2007-05-09 23:46:31.000000000 +0200 @@ -35,7 +35,7 @@ #define TIMEOUT 5 /* Seconds before trying BOOTP again */ @@ -3260,9 +3260,9 @@ diff -Nurp ../u-boot-1.1.6/net/bootp.c ./net/bootp.c #else # define TIMEOUT_COUNT (CONFIG_NET_RETRY_COUNT) #endif -diff -Nurp ../u-boot-1.1.6/net/eth.c ./net/eth.c ---- ../u-boot-1.1.6/net/eth.c 2006-11-02 15:15:01.000000000 +0100 -+++ ./net/eth.c 2007-05-09 23:47:19.000000000 +0200 +diff -Nurp u-boot-1.1.6/net/eth.c b/net/eth.c +--- u-boot-1.1.6/net/eth.c 2006-11-02 15:15:01.000000000 +0100 ++++ b/net/eth.c 2007-05-09 23:47:19.000000000 +0200 @@ -397,10 +397,10 @@ int eth_send(volatile void *packet, int } @@ -3276,9 +3276,9 @@ diff -Nurp ../u-boot-1.1.6/net/eth.c ./net/eth.c return eth_current->recv(eth_current); } -diff -Nurp ../u-boot-1.1.6/net/Makefile ./net/Makefile ---- ../u-boot-1.1.6/net/Makefile 2006-11-02 15:15:01.000000000 +0100 -+++ ./net/Makefile 2007-05-09 23:52:55.000000000 +0200 +diff -Nurp u-boot-1.1.6/net/Makefile b/net/Makefile +--- u-boot-1.1.6/net/Makefile 2006-11-02 15:15:01.000000000 +0100 ++++ b/net/Makefile 2007-05-09 23:52:55.000000000 +0200 @@ -23,7 +23,7 @@ include $(TOPDIR)/config.mk @@ -3288,9 +3288,9 @@ diff -Nurp ../u-boot-1.1.6/net/Makefile ./net/Makefile LIB = $(obj)libnet.a -diff -Nurp ../u-boot-1.1.6/net/net.c ./net/net.c ---- ../u-boot-1.1.6/net/net.c 2006-11-02 15:15:01.000000000 +0100 -+++ ./net/net.c 2007-05-09 23:47:40.000000000 +0200 +diff -Nurp u-boot-1.1.6/net/net.c b/net/net.c +--- u-boot-1.1.6/net/net.c 2006-11-02 15:15:01.000000000 +0100 ++++ b/net/net.c 2007-05-09 23:47:40.000000000 +0200 @@ -78,6 +78,7 @@ #include #include diff --git a/recipes/u-boot/u-boot-git/beagleboard/0001-Enable-I2C-bus-switching.patch b/recipes/u-boot/u-boot-git/beagleboard/0001-Enable-I2C-bus-switching.patch deleted file mode 100644 index 551e44a67a..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0001-Enable-I2C-bus-switching.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 5b5eb18bfb80fa9595eb258a911a94f2807e7497 Mon Sep 17 00:00:00 2001 -From: Syed Mohammed Khasim -Date: Mon, 18 Jan 2010 18:11:14 +0530 -Subject: [PATCH 01/50] Enable I2C bus switching - -OMAP3 supports Multiple I2C channels, this patch allows -us to use i2c dev command to switch between busses. - -Signed-off-by: Syed Mohammed Khasim -Acked-by: Heiko Schocher -(cherry picked from commit 9bb1c3501c8f098dac6e224c99e409ebf92b0ab9) ---- - drivers/i2c/omap24xx_i2c.c | 5 +++++ - include/configs/omap3_beagle.h | 6 ++++++ - 2 files changed, 11 insertions(+), 0 deletions(-) - -diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c -index ff18991..e8c8184 100644 ---- a/drivers/i2c/omap24xx_i2c.c -+++ b/drivers/i2c/omap24xx_i2c.c -@@ -435,3 +435,8 @@ int i2c_set_bus_num(unsigned int bus) - - return 0; - } -+ -+int i2c_get_bus_num(void) -+{ -+ return (int) current_bus; -+} -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 08d79ac..d522c77 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -100,6 +100,12 @@ - /* DDR - I use Micron DDR */ - #define CONFIG_OMAP3_MICRON_DDR 1 - -+/* Enable Multi Bus support for I2C */ -+#define CONFIG_I2C_MULTI_BUS 1 -+ -+/* Probe all devices */ -+#define CONFIG_SYS_I2C_NOPROBES {0x0, 0x0} -+ - /* USB */ - #define CONFIG_MUSB_UDC 1 - #define CONFIG_USB_OMAP3 1 --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch b/recipes/u-boot/u-boot-git/beagleboard/0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch new file mode 100644 index 0000000000..7e88d7045a --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch @@ -0,0 +1,46 @@ +From 7b250f8be3b8c496796dcdc954c9e5959cefea2c Mon Sep 17 00:00:00 2001 +From: Bob Feretich +Date: Thu, 24 Feb 2011 13:16:44 +0000 +Subject: [PATCH 01/16] OMAP3 Beagle Pin Mux initialization glitch fix + +The below patch reverses the order of two segments in the board file. +Output pins need to have their values initialized, before they are +exposed to the logic outside the chip. + +Signed-off-by: Bob Feretich +Cc: Wolfgang Denk +--- + board/ti/beagle/beagle.c | 12 ++++++------ + 1 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c +index c066d6e..929461c 100644 +--- a/board/ti/beagle/beagle.c ++++ b/board/ti/beagle/beagle.c +@@ -239,17 +239,17 @@ int misc_init_r(void) + twl4030_power_init(); + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); + +- /* Configure GPIOs to output */ +- writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); +- writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | +- GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); +- +- /* Set GPIOs */ ++ /* Set GPIO states before they are made outputs */ + writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, + &gpio6_base->setdataout); + writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | + GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout); + ++ /* Configure GPIOs to output */ ++ writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); ++ writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | ++ GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); ++ + dieid_num_r(); + + return 0; +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0021-OMAP3-Beagle-Overo-remove-omapfb.debug-y-from-defaul.patch b/recipes/u-boot/u-boot-git/beagleboard/0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch similarity index 74% rename from recipes/u-boot/u-boot-git/beagleboard/0021-OMAP3-Beagle-Overo-remove-omapfb.debug-y-from-defaul.patch rename to recipes/u-boot/u-boot-git/beagleboard/0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch index f3cd169b90..707cc79005 100644 --- a/recipes/u-boot/u-boot-git/beagleboard/0021-OMAP3-Beagle-Overo-remove-omapfb.debug-y-from-defaul.patch +++ b/recipes/u-boot/u-boot-git/beagleboard/0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch @@ -1,18 +1,21 @@ -From 0fd26c84173c9a589c6cd9c0db6d2200e769134b Mon Sep 17 00:00:00 2001 +From 0588da9057fddb5f6a6a04aedd7e0a79eb39e9e5 Mon Sep 17 00:00:00 2001 From: Steve Sakoman -Date: Thu, 25 Mar 2010 06:54:47 -0700 -Subject: [PATCH 21/50] OMAP3: Beagle, Overo: remove omapfb.debug=y from default env +Date: Thu, 30 Dec 2010 07:19:44 +0000 +Subject: [PATCH 02/16] OMAP: Remove omapfb.debug=y from Beagle and Overo env settings +The kernel DSS2 code is mature now, and keeping this setting hurts performance + +Signed-off-by: Steve Sakoman --- include/configs/omap3_beagle.h | 2 -- include/configs/omap3_overo.h | 2 -- 2 files changed, 0 insertions(+), 4 deletions(-) diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 1370a29..8bedf7d 100644 +index 5cfa4cb..8b580ef 100644 --- a/include/configs/omap3_beagle.h +++ b/include/configs/omap3_beagle.h -@@ -200,7 +200,6 @@ +@@ -203,7 +203,6 @@ "mpurate=${mpurate} " \ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ @@ -20,7 +23,7 @@ index 1370a29..8bedf7d 100644 "omapdss.def_disp=${defaultdisplay} " \ "root=${mmcroot} " \ "rootfstype=${mmcrootfstype}\0" \ -@@ -208,7 +207,6 @@ +@@ -211,7 +210,6 @@ "mpurate=${mpurate} " \ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ @@ -29,10 +32,10 @@ index 1370a29..8bedf7d 100644 "root=${nandroot} " \ "rootfstype=${nandrootfstype}\0" \ diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h -index 27b5476..118e886 100644 +index 1b3d439..06a28f6 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h -@@ -163,7 +163,6 @@ +@@ -169,7 +169,6 @@ "mpurate=${mpurate} " \ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ @@ -40,7 +43,7 @@ index 27b5476..118e886 100644 "omapdss.def_disp=${defaultdisplay} " \ "root=${mmcroot} " \ "rootfstype=${mmcrootfstype}\0" \ -@@ -171,7 +170,6 @@ +@@ -177,7 +176,6 @@ "mpurate=${mpurate} " \ "vram=${vram} " \ "omapfb.mode=dvi:${dvimode} " \ diff --git a/recipes/u-boot/u-boot-git/beagleboard/0002-OMAP3-add-board-revision-detection-for-Overo.patch b/recipes/u-boot/u-boot-git/beagleboard/0002-OMAP3-add-board-revision-detection-for-Overo.patch deleted file mode 100644 index e7c3cec18e..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0002-OMAP3-add-board-revision-detection-for-Overo.patch +++ /dev/null @@ -1,187 +0,0 @@ -From 8cea9443be01ccc2525ff1de17b0dddd7c27984e Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Wed, 10 Feb 2010 14:40:56 -0800 -Subject: [PATCH 02/50] OMAP3: add board revision detection for Overo - ---- - board/overo/overo.c | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++ - board/overo/overo.h | 43 +++++++++++++++++++++--- - 2 files changed, 127 insertions(+), 6 deletions(-) - -diff --git a/board/overo/overo.c b/board/overo/overo.c -index e85be7d..3df1a12 100644 ---- a/board/overo/overo.c -+++ b/board/overo/overo.c -@@ -61,11 +61,101 @@ int board_init(void) - } - - /* -+ * Routine: get_sdio2_config -+ * Description: Return information about the wifi module connection -+ * Returns 0 if the module connects though a level translator -+ * Returns 1 if the module connects directly -+ */ -+int get_sdio2_config(void) { -+ int sdio_direct; -+ -+ if (!omap_request_gpio(130) && !omap_request_gpio(139)){ -+ -+ omap_set_gpio_direction(130, 0); -+ omap_set_gpio_direction(139, 1); -+ -+ sdio_direct = 1; -+ omap_set_gpio_dataout(130, 0); -+ if (omap_get_gpio_datain(139) == 0) { -+ omap_set_gpio_dataout(130, 1); -+ if (omap_get_gpio_datain(139) == 1) -+ sdio_direct = 0; -+ } -+ -+ omap_free_gpio(130); -+ omap_free_gpio(139); -+ } else { -+ printf("Error: unable to acquire sdio2 clk GPIOs\n"); -+ sdio_direct=-1; -+ } -+ -+ return sdio_direct; -+} -+ -+/* -+ * Routine: get_board_revision -+ * Description: Returns the board revision -+ */ -+int get_board_revision(void) { -+ int revision; -+ -+ if (!omap_request_gpio(126) && !omap_request_gpio(127) && -+ !omap_request_gpio(128) && !omap_request_gpio(129)){ -+ -+ omap_set_gpio_direction(126, 1); -+ omap_set_gpio_direction(127, 1); -+ omap_set_gpio_direction(128, 1); -+ omap_set_gpio_direction(129, 1); -+ -+ revision = 0; -+ if (omap_get_gpio_datain(126) == 0) -+ revision += 1; -+ if (omap_get_gpio_datain(127) == 0) -+ revision += 2; -+ if (omap_get_gpio_datain(128) == 0) -+ revision += 4; -+ if (omap_get_gpio_datain(129) == 0) -+ revision += 8; -+ -+ omap_free_gpio(126); -+ omap_free_gpio(127); -+ omap_free_gpio(128); -+ omap_free_gpio(129); -+ } else { -+ printf("Error: unable to acquire board revision GPIOs\n"); -+ revision=-1; -+ } -+ -+ return revision; -+} -+ -+/* - * Routine: misc_init_r - * Description: Configure board specific parts - */ - int misc_init_r(void) - { -+ printf("Board revision: "); -+ switch (get_board_revision()) { -+ case 0: -+ case 1: -+ switch (get_sdio2_config()) { -+ case 0: -+ printf(" 0\n"); -+ MUX_OVERO_SDIO2_TRANSCEIVER(); -+ break; -+ case 1: -+ printf(" 1\n"); -+ MUX_OVERO_SDIO2_DIRECT(); -+ break; -+ default: -+ printf(" unknown\n"); -+ } -+ break; -+ default: -+ printf(" unsupported\n"); -+ } -+ - twl4030_power_init(); - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); - -diff --git a/board/overo/overo.h b/board/overo/overo.h -index 1873523..e120e09 100644 ---- a/board/overo/overo.h -+++ b/board/overo/overo.h -@@ -206,12 +206,12 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(MMC1_DAT1), (IEN | PTU | EN | M0)) /*MMC1_DAT1*/\ - MUX_VAL(CP(MMC1_DAT2), (IEN | PTU | EN | M0)) /*MMC1_DAT2*/\ - MUX_VAL(CP(MMC1_DAT3), (IEN | PTU | EN | M0)) /*MMC1_DAT3*/\ -- MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN | M0)) /*MMC1_DAT4*/\ -- MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M0)) /*MMC1_DAT5*/\ -- MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M0)) /*MMC1_DAT6*/\ -- MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M0)) /*MMC1_DAT7*/\ -+ MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN | M4)) /*GPIO_126*/\ -+ MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M4)) /*GPIO_127*/\ -+ MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M4)) /*GPIO_128*/\ -+ MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M4)) /*GPIO_129*/\ - /*Wireless LAN */\ -- MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\ -+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M4)) /*GPIO_130*/\ - MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\ - MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\ - MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\ -@@ -220,7 +220,7 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT0*/\ - MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT1*/\ - MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M1)) /*MMC2_DIR_CMD*/\ -- MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M1)) /*MMC2_CLKIN*/\ -+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\ - /*Bluetooth*/\ - MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M1)) /*UART2_CTS*/\ - MUX_VAL(CP(MCBSP3_DR), (IDIS | PTD | DIS | M1)) /*UART2_RTS*/\ -@@ -387,5 +387,36 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(SDRC_CKE0), (IDIS | PTU | EN | M0)) /*sdrc_cke0*/\ - MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/ - -+#define MUX_OVERO_SDIO2_DIRECT() \ -+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\ -+ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\ -+ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\ -+ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\ -+ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\ -+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\ -+ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M0)) /*MMC2_DAT4*/\ -+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M0)) /*MMC2_DAT5*/\ -+ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M0)) /*MMC2_DAT6*/\ -+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M0)) /*MMC2_DAT7*/\ -+ MUX_VAL(CP(MMC1_DAT4), (IEN | PTD | EN | M4)) /*GPIO_126*/\ -+ MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M4)) /*GPIO_127*/\ -+ MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M4)) /*GPIO_128*/\ -+ MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M4)) /*GPIO_129*/ -+ -+#define MUX_OVERO_SDIO2_TRANSCEIVER() \ -+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\ -+ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\ -+ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\ -+ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\ -+ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\ -+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\ -+ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT0*/\ -+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT1*/\ -+ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M1)) /*MMC2_DIR_CMD*/\ -+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M1)) /*MMC2_CLKIN*/\ -+ MUX_VAL(CP(MMC1_DAT4), (IEN | PTU | EN | M4)) /*GPIO_126*/\ -+ MUX_VAL(CP(MMC1_DAT5), (IEN | PTU | EN | M4)) /*GPIO_127*/\ -+ MUX_VAL(CP(MMC1_DAT6), (IEN | PTU | EN | M4)) /*GPIO_128*/\ -+ MUX_VAL(CP(MMC1_DAT7), (IEN | PTU | EN | M4)) /*GPIO_129*/ - - #endif --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0003-OMAP3-update-Beagle-revision-detection-to-recognize-.patch b/recipes/u-boot/u-boot-git/beagleboard/0003-OMAP3-update-Beagle-revision-detection-to-recognize-.patch deleted file mode 100644 index 1d943cb08f..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0003-OMAP3-update-Beagle-revision-detection-to-recognize-.patch +++ /dev/null @@ -1,165 +0,0 @@ -From fae6228e203436ce0d82ce32da769bd91206865f Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Wed, 10 Feb 2010 14:51:48 -0800 -Subject: [PATCH 03/50] OMAP3: update Beagle revision detection to recognize C4 boards - ---- - board/ti/beagle/beagle.c | 77 +++++++++++++++++++++++++++------------------- - board/ti/beagle/beagle.h | 7 +++- - 2 files changed, 51 insertions(+), 33 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 3b4c9e7..ba16dd7 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -38,7 +38,7 @@ - #include - #include "beagle.h" - --static int beagle_revision_c; -+static int beagle_revision; - - /* - * Routine: board_init -@@ -60,41 +60,38 @@ int board_init(void) - /* - * Routine: beagle_get_revision - * Description: Return the revision of the BeagleBoard this code is running on. -- * If it is a revision Ax/Bx board, this function returns 0, -- * on a revision C board you will get a 1. - */ - int beagle_get_revision(void) - { -- return beagle_revision_c; -+ return beagle_revision; - } - - /* - * Routine: beagle_identify -- * Description: Detect if we are running on a Beagle revision Ax/Bx or -- * Cx. This can be done by GPIO_171. If this is low, we are -- * running on a revision C board. -+ * Description: Detect if we are running on a Beagle revision Ax/Bx, -+ * C1/2/3, C4 or D. This can be done by reading -+ * the level of GPIO173, GPIO172 and GPIO171. This should -+ * result in -+ * GPIO173, GPIO172, GPIO171: 1 1 1 => Ax/Bx -+ * GPIO173, GPIO172, GPIO171: 1 1 0 => C1/2/3 -+ * GPIO173, GPIO172, GPIO171: 1 0 1 => C4 -+ * GPIO173, GPIO172, GPIO171: 0 0 0 => D - */ - void beagle_identify(void) - { -- beagle_revision_c = 0; -- if (!omap_request_gpio(171)) { -- unsigned int val; -- -- omap_set_gpio_direction(171, 1); -- val = omap_get_gpio_datain(171); -- omap_free_gpio(171); -- -- if (val) -- beagle_revision_c = 0; -- else -- beagle_revision_c = 1; -- } -- -- printf("Board revision "); -- if (beagle_revision_c) -- printf("C\n"); -- else -- printf("Ax/Bx\n"); -+ omap_request_gpio(171); -+ omap_request_gpio(172); -+ omap_request_gpio(173); -+ omap_set_gpio_direction(171, 1); -+ omap_set_gpio_direction(172, 1); -+ omap_set_gpio_direction(173, 1); -+ -+ beagle_revision = omap_get_gpio_datain(173) << 2 | -+ omap_get_gpio_datain(172) << 1 | -+ omap_get_gpio_datain(171); -+ omap_free_gpio(171); -+ omap_free_gpio(172); -+ omap_free_gpio(173); - } - - /* -@@ -106,9 +103,31 @@ int misc_init_r(void) - struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE; - struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; - -+ beagle_identify(); -+ - twl4030_power_init(); - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); - -+ printf("Board revision "); -+ switch (beagle_revision) { -+ case REVISION_AXBX: -+ printf("Ax/Bx\n"); -+ break; -+ case REVISION_CX: -+ printf("C1/C2/C3\n"); -+ MUX_BEAGLE_C(); -+ break; -+ case REVISION_C4: -+ printf("C4\n"); -+ MUX_BEAGLE_C(); -+ break; -+ case REVISION_D: -+ printf("D\n"); -+ break; -+ default: -+ printf("unknown 0x%02x\n", beagle_revision); -+ } -+ - /* Configure GPIOs to output */ - writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe); - writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | -@@ -120,8 +139,6 @@ int misc_init_r(void) - writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 | - GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout); - -- beagle_identify(); -- - dieid_num_r(); - - return 0; -@@ -136,8 +153,4 @@ int misc_init_r(void) - void set_muxconf_regs(void) - { - MUX_BEAGLE(); -- -- if (beagle_revision_c) { -- MUX_BEAGLE_C(); -- } - } -diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h -index 7fe6275..d95fd78 100644 ---- a/board/ti/beagle/beagle.h -+++ b/board/ti/beagle/beagle.h -@@ -34,6 +34,11 @@ const omap3_sysinfo sysinfo = { - }; - - #define BOARD_REVISION_MASK (0x1 << 11) -+/* BeagleBoard revisions */ -+#define REVISION_AXBX 0x7 -+#define REVISION_CX 0x6 -+#define REVISION_C4 0x5 -+#define REVISION_D 0x0 - - /* - * IEN - Input Enable -@@ -264,7 +269,7 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(HDQ_SIO), (IDIS | PTU | EN | M4)) /*GPIO_170*/\ - MUX_VAL(CP(MCSPI1_CLK), (IEN | PTU | EN | M4)) /*GPIO_171*/\ - MUX_VAL(CP(MCSPI1_SIMO), (IEN | PTU | EN | M4)) /*GPIO_172*/\ -- MUX_VAL(CP(MCSPI1_SOMI), (IEN | PTD | DIS | M0)) /*McSPI1_SOMI*/\ -+ MUX_VAL(CP(MCSPI1_SOMI), (IEN | PTU | EN | M4)) /*GPIO_173*/\ - MUX_VAL(CP(MCSPI1_CS0), (IEN | PTD | EN | M0)) /*McSPI1_CS0*/\ - MUX_VAL(CP(MCSPI1_CS1), (IDIS | PTD | EN | M0)) /*McSPI1_CS1*/\ - MUX_VAL(CP(MCSPI1_CS2), (IDIS | PTD | DIS | M4)) /*GPIO_176*/\ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0003-omap3_beagle-enable-the-use-of-a-plain-text-file-nam.patch b/recipes/u-boot/u-boot-git/beagleboard/0003-omap3_beagle-enable-the-use-of-a-plain-text-file-nam.patch new file mode 100644 index 0000000000..a68859e81a --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0003-omap3_beagle-enable-the-use-of-a-plain-text-file-nam.patch @@ -0,0 +1,89 @@ +From 58ca6009d4101e5fd45ef9df22aa360d1662e9e9 Mon Sep 17 00:00:00 2001 +From: Alexander Holler +Date: Mon, 24 Jan 2011 13:08:49 +0000 +Subject: [PATCH 03/16] omap3_beagle: enable the use of a plain text file named uEnv.txt instead of boot.scr + +Using the new env import command it is possible to use plain text files instead +of script-images. Plain text files are much easier to handle. + +E.g. If your boot.scr contains the following: +----------------------------------- +setenv dvimode 1024x768-16@60 +run loaduimage +run mmcboot +----------------------------------- +you could create a file named uEnv.txt and use that instead of boot.scr: +----------------------------------- +dvimode=1024x768-16@60 +uenvcmd=run loaduimage; run mmcboot +----------------------------------- +The variable uenvcmd (if existent) will be executed (using run) after uEnv.txt +was loaded. If uenvcmd doesn't exist the default boot sequence will be started, +therefore you could just use +----------------------------------- +dvimode=1024x768-16@60 +----------------------------------- +as uEnv.txt because loaduimage and mmcboot is part of the default boot sequence. +--- +Changes for v2: + - Eliminated else redundant clause that would be ignored if boot + succeeds. + +Changes for v3: + - Removed boot.scr + +Changes for v4: + - Removed comment about boot.scr being supported. +--- + include/configs/omap3_beagle.h | 28 ++++++++++++++++------------ + 1 files changed, 16 insertions(+), 12 deletions(-) + +diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h +index 8b580ef..c85537c 100644 +--- a/include/configs/omap3_beagle.h ++++ b/include/configs/omap3_beagle.h +@@ -213,9 +213,9 @@ + "omapdss.def_disp=${defaultdisplay} " \ + "root=${nandroot} " \ + "rootfstype=${nandrootfstype}\0" \ +- "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ +- "bootscript=echo Running bootscript from mmc ...; " \ +- "source ${loadaddr}\0" \ ++ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ ++ "importbootenv=echo Importing environment from mmc ...; " \ ++ "env import -t $loadaddr $filesize\0" \ + "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ + "mmcboot=echo Booting from mmc ...; " \ + "run mmcargs; " \ +@@ -227,15 +227,19 @@ + + #define CONFIG_BOOTCOMMAND \ + "if mmc rescan ${mmcdev}; then " \ +- "if run loadbootscript; then " \ +- "run bootscript; " \ +- "else " \ +- "if run loaduimage; then " \ +- "run mmcboot; " \ +- "else run nandboot; " \ +- "fi; " \ +- "fi; " \ +- "else run nandboot; fi" ++ "echo SD/MMC found on device ${mmcdev};" \ ++ "if run loadbootenv; then " \ ++ "run importbootenv;" \ ++ "fi;" \ ++ "if test -n $uenvcmd; then " \ ++ "echo Running uenvcmd ...;" \ ++ "run uenvcmd;" \ ++ "fi;" \ ++ "if run loaduimage; then " \ ++ "run mmcboot;" \ ++ "fi;" \ ++ "fi;" \ ++ "run nandboot;" \ + + #define CONFIG_AUTO_COMPLETE 1 + /* +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0004-OMAP3-BeagleBoard-Enable-pullups-on-i2c2.patch b/recipes/u-boot/u-boot-git/beagleboard/0004-OMAP3-BeagleBoard-Enable-pullups-on-i2c2.patch new file mode 100644 index 0000000000..4840d8697d --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0004-OMAP3-BeagleBoard-Enable-pullups-on-i2c2.patch @@ -0,0 +1,69 @@ +From 6859e4b88c405ed40c898d259227f158da5f867a Mon Sep 17 00:00:00 2001 +From: Steve Kipisz +Date: Thu, 5 Aug 2010 10:36:07 -0500 +Subject: [PATCH 04/16] OMAP3: BeagleBoard: Enable pullups on i2c2. + +This allows the reading of EEPROMS on the expansion bus without adding +external pull-ups. +--- +v2 updates + * Updated per http://patchwork.ozlabs.org/patch/71997/ + * Added description + * Used OMAP34XX_CTRL_BASE + * Used structure and writel to perform write + +v3 updates + * Included v3 in the subject line + * Fixed structure name typo that got messed up in generating patch + * Removed some extraneous blank lines + +v4 updates + * Fixed typo in typecast +--- + arch/arm/include/asm/arch-omap3/omap3.h | 14 ++++++++++++++ + board/ti/beagle/beagle.c | 4 ++++ + 2 files changed, 18 insertions(+), 0 deletions(-) + +diff --git a/arch/arm/include/asm/arch-omap3/omap3.h b/arch/arm/include/asm/arch-omap3/omap3.h +index 3957c79..cc2b541 100644 +--- a/arch/arm/include/asm/arch-omap3/omap3.h ++++ b/arch/arm/include/asm/arch-omap3/omap3.h +@@ -50,6 +50,20 @@ + /* CONTROL */ + #define OMAP34XX_CTRL_BASE (OMAP34XX_L4_IO_BASE + 0x2000) + ++#ifndef __ASSEMBLY__ ++/* Signal Integrity Parameter Control Registers */ ++struct control_prog_io { ++ unsigned char res[0x408]; ++ unsigned int io2; /* 0x408 */ ++ unsigned char res2[0x38]; ++ unsigned int io0; /* 0x444 */ ++ unsigned int io1; /* 0x448 */ ++}; ++#endif /* __ASSEMBLY__ */ ++ ++/* Bit definition for CONTROL_PROG_IO1 */ ++#define PRG_I2C2_PULLUPRESX 0x00000001 ++ + /* UART */ + #define OMAP34XX_UART1 (OMAP34XX_L4_IO_BASE + 0x6a000) + #define OMAP34XX_UART2 (OMAP34XX_L4_IO_BASE + 0x6c000) +diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c +index 929461c..9d03b24 100644 +--- a/board/ti/beagle/beagle.c ++++ b/board/ti/beagle/beagle.c +@@ -148,6 +148,10 @@ int misc_init_r(void) + { + struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE; + struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; ++ struct control_prog_io *prog_io_base = (struct control_prog_io *)OMAP34XX_CTRL_BASE; ++ ++ /* Enable i2c2 pullup resisters */ ++ writel(~(PRG_I2C2_PULLUPRESX), &prog_io_base->io1); + + switch (get_board_revision()) { + case REVISION_AXBX: +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0004-OMAP3-Set-VAUX2-to-1.8V-for-EHCI-PHY-on-Beagle-Rev-C.patch b/recipes/u-boot/u-boot-git/beagleboard/0004-OMAP3-Set-VAUX2-to-1.8V-for-EHCI-PHY-on-Beagle-Rev-C.patch deleted file mode 100644 index a344f481de..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0004-OMAP3-Set-VAUX2-to-1.8V-for-EHCI-PHY-on-Beagle-Rev-C.patch +++ /dev/null @@ -1,143 +0,0 @@ -From a1a4ba7a5fce36522a994cb06d6d76931964578c Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Wed, 10 Feb 2010 15:23:19 -0800 -Subject: [PATCH 04/50] OMAP3: Set VAUX2 to 1.8V for EHCI PHY on Beagle Rev C4 boards - ---- - board/ti/beagle/beagle.c | 5 +++++ - drivers/power/twl4030.c | 45 +++++++++++++++++++++++++-------------------- - include/twl4030.h | 15 +++++++++++++++ - 3 files changed, 45 insertions(+), 20 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index ba16dd7..b4ea7e6 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -120,6 +120,11 @@ int misc_init_r(void) - case REVISION_C4: - printf("C4\n"); - MUX_BEAGLE_C(); -+ /* Set VAUX2 to 1.8V for EHCI PHY */ -+ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, -+ TWL4030_PM_RECEIVER_VAUX2_VSEL_18, -+ TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, -+ TWL4030_PM_RECEIVER_DEV_GRP_P1); - break; - case REVISION_D: - printf("D\n"); -diff --git a/drivers/power/twl4030.c b/drivers/power/twl4030.c -index eb066cb..f354834 100644 ---- a/drivers/power/twl4030.c -+++ b/drivers/power/twl4030.c -@@ -59,57 +59,62 @@ void twl4030_power_reset_init(void) - } - } - -- --/* -- * Power Init -- */ --#define DEV_GRP_P1 0x20 --#define VAUX3_VSEL_28 0x03 --#define DEV_GRP_ALL 0xE0 --#define VPLL2_VSEL_18 0x05 --#define VDAC_VSEL_18 0x03 -- - void twl4030_power_init(void) - { - unsigned char byte; - - /* set VAUX3 to 2.8V */ -- byte = DEV_GRP_P1; -+ byte = TWL4030_PM_RECEIVER_DEV_GRP_P1; - twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte, - TWL4030_PM_RECEIVER_VAUX3_DEV_GRP); -- byte = VAUX3_VSEL_28; -+ byte = TWL4030_PM_RECEIVER_VAUX3_VSEL_28; - twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte, - TWL4030_PM_RECEIVER_VAUX3_DEDICATED); - - /* set VPLL2 to 1.8V */ -- byte = DEV_GRP_ALL; -+ byte = TWL4030_PM_RECEIVER_DEV_GRP_ALL; - twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte, - TWL4030_PM_RECEIVER_VPLL2_DEV_GRP); -- byte = VPLL2_VSEL_18; -+ byte = TWL4030_PM_RECEIVER_VPLL2_VSEL_18; - twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte, - TWL4030_PM_RECEIVER_VPLL2_DEDICATED); - - /* set VDAC to 1.8V */ -- byte = DEV_GRP_P1; -+ byte = TWL4030_PM_RECEIVER_DEV_GRP_P1; - twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte, - TWL4030_PM_RECEIVER_VDAC_DEV_GRP); -- byte = VDAC_VSEL_18; -+ byte = TWL4030_PM_RECEIVER_VDAC_VSEL_18; - twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte, - TWL4030_PM_RECEIVER_VDAC_DEDICATED); - } - --#define VMMC1_VSEL_30 0x02 -- - void twl4030_power_mmc_init(void) - { - unsigned char byte; - -- byte = DEV_GRP_P1; -+ byte = TWL4030_PM_RECEIVER_DEV_GRP_P1; - twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte, - TWL4030_PM_RECEIVER_VMMC1_DEV_GRP); - - /* 3 Volts */ -- byte = VMMC1_VSEL_30; -+ byte = TWL4030_PM_RECEIVER_VMMC1_VSEL_30; - twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, byte, - TWL4030_PM_RECEIVER_VMMC1_DEDICATED); - } -+ -+/* -+ * Generic function to select Device Group and Voltage -+ */ -+void twl4030_pmrecv_vsel_cfg(u8 vsel_reg, u8 vsel_val, -+ u8 dev_grp, u8 dev_grp_sel) -+{ -+ /* Select the Device Group */ -+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, dev_grp_sel, -+ dev_grp); -+ -+ /* Select the Voltage */ -+ twl4030_i2c_write_u8(TWL4030_CHIP_PM_RECEIVER, vsel_val, -+ vsel_reg); -+} -+ -+ -diff --git a/include/twl4030.h b/include/twl4030.h -index 2b2f5ae..cc99403 100644 ---- a/include/twl4030.h -+++ b/include/twl4030.h -@@ -471,6 +471,21 @@ - #define TWL4030_USB_PHY_CLK_CTRL_STS 0xFF - - /* -+ * Voltage Selection in PM Receiver Module -+ */ -+#define TWL4030_PM_RECEIVER_VAUX2_VSEL_18 0x05 -+#define TWL4030_PM_RECEIVER_VAUX3_VSEL_28 0x03 -+#define TWL4030_PM_RECEIVER_VPLL2_VSEL_18 0x05 -+#define TWL4030_PM_RECEIVER_VDAC_VSEL_18 0x03 -+#define TWL4030_PM_RECEIVER_VMMC1_VSEL_30 0x02 -+ -+/* -+ * Device Selection in PM Receiver Module -+ */ -+#define TWL4030_PM_RECEIVER_DEV_GRP_P1 0x20 -+#define TWL4030_PM_RECEIVER_DEV_GRP_ALL 0xE0 -+ -+/* - * Convience functions to read and write from TWL4030 - * - * chip_no is the i2c address, it must be one of the chip addresses --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0005-ARMV7-OMAP3-BeagleBoard-add-xM-rev-B-to-ID-table.patch b/recipes/u-boot/u-boot-git/beagleboard/0005-ARMV7-OMAP3-BeagleBoard-add-xM-rev-B-to-ID-table.patch new file mode 100644 index 0000000000..0e8dd84030 --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0005-ARMV7-OMAP3-BeagleBoard-add-xM-rev-B-to-ID-table.patch @@ -0,0 +1,111 @@ +From d2d1669e4e2d4eeb996305278c6e4df0b1e04a8d Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 3 Nov 2010 14:48:31 +0100 +Subject: [PATCH 05/16] ARMV7: OMAP3: BeagleBoard: add xM rev B to ID table + +Patch was updated by Jason Kridner : +* Use tabs to match style of other board revisions +* Only include board revisions that exist +* Default to the same configuration as the latest revision, but + without setting 'beaglerev' +--- +v2 Changes + * Updated with feedback from http://patchwork.ozlabs.org/patch/71995/ + * Removed setting of mpurate based on board revision + * Set mpurate to auto in default environment variables + +Cc: Koen Kooi +--- + board/ti/beagle/beagle.c | 22 +++++++++++++++++----- + board/ti/beagle/beagle.h | 3 ++- + include/configs/omap3_beagle.h | 2 +- + 3 files changed, 20 insertions(+), 7 deletions(-) + +diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c +index 9d03b24..87a952e 100644 +--- a/board/ti/beagle/beagle.c ++++ b/board/ti/beagle/beagle.c +@@ -157,18 +157,15 @@ int misc_init_r(void) + case REVISION_AXBX: + printf("Beagle Rev Ax/Bx\n"); + setenv("beaglerev", "AxBx"); +- setenv("mpurate", "600"); + break; + case REVISION_CX: + printf("Beagle Rev C1/C2/C3\n"); + setenv("beaglerev", "Cx"); +- setenv("mpurate", "600"); + MUX_BEAGLE_C(); + break; + case REVISION_C4: + printf("Beagle Rev C4\n"); + setenv("beaglerev", "C4"); +- setenv("mpurate", "720"); + MUX_BEAGLE_C(); + /* Set VAUX2 to 1.8V for EHCI PHY */ + twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, +@@ -176,10 +173,19 @@ int misc_init_r(void) + TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, + TWL4030_PM_RECEIVER_DEV_GRP_P1); + break; +- case REVISION_XM: ++ case REVISION_XM_A: + printf("Beagle xM Rev A\n"); + setenv("beaglerev", "xMA"); +- setenv("mpurate", "1000"); ++ MUX_BEAGLE_XM(); ++ /* Set VAUX2 to 1.8V for EHCI PHY */ ++ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, ++ TWL4030_PM_RECEIVER_VAUX2_VSEL_18, ++ TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, ++ TWL4030_PM_RECEIVER_DEV_GRP_P1); ++ break; ++ case REVISION_XM_B: ++ printf("Beagle xM Rev B\n"); ++ setenv("beaglerev", "xMB"); + MUX_BEAGLE_XM(); + /* Set VAUX2 to 1.8V for EHCI PHY */ + twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, +@@ -189,6 +195,12 @@ int misc_init_r(void) + break; + default: + printf("Beagle unknown 0x%02x\n", get_board_revision()); ++ MUX_BEAGLE_XM(); ++ /* Set VAUX2 to 1.8V for EHCI PHY */ ++ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, ++ TWL4030_PM_RECEIVER_VAUX2_VSEL_18, ++ TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, ++ TWL4030_PM_RECEIVER_DEV_GRP_P1); + } + + switch (get_expansion_id()) { +diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h +index b22b653..b0e26e5 100644 +--- a/board/ti/beagle/beagle.h ++++ b/board/ti/beagle/beagle.h +@@ -37,7 +37,8 @@ const omap3_sysinfo sysinfo = { + #define REVISION_AXBX 0x7 + #define REVISION_CX 0x6 + #define REVISION_C4 0x5 +-#define REVISION_XM 0x0 ++#define REVISION_XM_A 0x0 ++#define REVISION_XM_B 0x1 + + /* + * IEN - Input Enable +diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h +index c85537c..51e14d0 100644 +--- a/include/configs/omap3_beagle.h ++++ b/include/configs/omap3_beagle.h +@@ -190,7 +190,7 @@ + "loadaddr=0x82000000\0" \ + "usbtty=cdc_acm\0" \ + "console=ttyS2,115200n8\0" \ +- "mpurate=500\0" \ ++ "mpurate=auto\0" \ + "vram=12M\0" \ + "dvimode=1024x768MR-16@60\0" \ + "defaultdisplay=dvi\0" \ +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0005-OMAP3-add-entry-for-rev-3.1.2-check-and-display-max-.patch b/recipes/u-boot/u-boot-git/beagleboard/0005-OMAP3-add-entry-for-rev-3.1.2-check-and-display-max-.patch deleted file mode 100644 index f00f3fe763..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0005-OMAP3-add-entry-for-rev-3.1.2-check-and-display-max-.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 13ed8be9848adff30bcfdcbe16bce3d2c6bb02f1 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Wed, 3 Feb 2010 12:26:30 -0800 -Subject: [PATCH 05/50] OMAP3: add entry for rev 3.1.2, check and display max cpu clock for rev > 3.0 - ---- - cpu/arm_cortexa8/omap3/sys_info.c | 24 ++++++++++++++++++++++-- - include/asm-arm/arch-omap3/cpu.h | 8 +++++++- - include/asm-arm/arch-omap3/omap3.h | 3 ++- - 3 files changed, 31 insertions(+), 4 deletions(-) - -diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c -index 08fb32e..e227f67 100644 ---- a/cpu/arm_cortexa8/omap3/sys_info.c -+++ b/cpu/arm_cortexa8/omap3/sys_info.c -@@ -39,7 +39,10 @@ static char *rev_s[CPU_3XX_MAX_REV] = { - "2.0", - "2.1", - "3.0", -- "3.1"}; -+ "3.1", -+ "UNKNOWN", -+ "UNKNOWN", -+ "3.1.2"}; - - /***************************************************************** - * dieid_num_r(void) - read and set die ID -@@ -104,6 +107,16 @@ u32 get_cpu_rev(void) - } - } - -+/***************************************************************** -+ * get_sku_id(void) - read sku_id to get info on max clock rate -+ *****************************************************************/ -+u32 get_sku_id(void) -+{ -+ struct ctrl_id *id_base = (struct ctrl_id *)OMAP34XX_ID_L4_IO_BASE; -+ return (readl(&id_base->sku_id) & SKUID_CLK_MASK); -+} -+ -+ - /**************************************************** - * is_mem_sdr() - return 1 if mem type in use is SDR - ****************************************************/ -@@ -291,9 +304,16 @@ int print_cpuinfo (void) - sec_s = "?"; - } - -- printf("OMAP%s-%s ES%s, CPU-OPP2 L3-165MHz\n", -+ printf("OMAP%s-%s ES%s, CPU-OPP2, L3-165MHz, ", - cpu_s, sec_s, rev_s[get_cpu_rev()]); - -+ printf("Max clock-"); -+ if ((get_cpu_rev() >= CPU_3XX_ES31) && (get_sku_id() == SKUID_CLK_720MHZ)) -+ printf("720Mhz\n"); -+ else printf("600Mhz\n"); -+ -+ -+ - return 0; - } - #endif /* CONFIG_DISPLAY_CPUINFO */ -diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-omap3/cpu.h -index aa8de32..f769571 100644 ---- a/include/asm-arm/arch-omap3/cpu.h -+++ b/include/asm-arm/arch-omap3/cpu.h -@@ -72,7 +72,8 @@ struct ctrl_id { - u8 res1[0x4]; - u32 idcode; /* 0x04 */ - u32 prod_id; /* 0x08 */ -- u8 res2[0x0C]; -+ u32 sku_id; /* 0x0c */ -+ u8 res2[0x08]; - u32 die_id_0; /* 0x18 */ - u32 die_id_1; /* 0x1C */ - u32 die_id_2; /* 0x20 */ -@@ -89,6 +90,11 @@ struct ctrl_id { - #define HS_DEVICE 0x2 - #define GP_DEVICE 0x3 - -+/* device speed */ -+#define SKUID_CLK_MASK 0xf -+#define SKUID_CLK_600MHZ 0x0 -+#define SKUID_CLK_720MHZ 0x8 -+ - #define GPMC_BASE (OMAP34XX_GPMC_BASE) - #define GPMC_CONFIG_CS0 0x60 - #define GPMC_CONFIG_CS0_BASE (GPMC_BASE + GPMC_CONFIG_CS0) -diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h -index 12815f6..1349b8b 100644 ---- a/include/asm-arm/arch-omap3/omap3.h -+++ b/include/asm-arm/arch-omap3/omap3.h -@@ -176,7 +176,8 @@ struct gpio { - #define CPU_3XX_ES21 2 - #define CPU_3XX_ES30 3 - #define CPU_3XX_ES31 4 --#define CPU_3XX_MAX_REV (CPU_3XX_ES31 + 1) -+#define CPU_3XX_ES312 7 -+#define CPU_3XX_MAX_REV 8 - - #define CPU_3XX_ID_SHIFT 28 - --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0006-OMAP3-BeagleBoard-add-more-expansionboard-IDs.patch b/recipes/u-boot/u-boot-git/beagleboard/0006-OMAP3-BeagleBoard-add-more-expansionboard-IDs.patch new file mode 100644 index 0000000000..1d16cf7a95 --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0006-OMAP3-BeagleBoard-add-more-expansionboard-IDs.patch @@ -0,0 +1,95 @@ +From 40cdd86d6040714f79e81bb813596748490aa948 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Wed, 3 Nov 2010 14:39:15 +0100 +Subject: [PATCH 06/16] OMAP3: BeagleBoard: add more expansionboard IDs + +Information on configurations pulled from +http://www.elinux.org/BeagleBoardPinMux#Vendor_and_Device_IDs + +Boards added: +* Added BeagleBoardToys WiFi, VGA and LCD boards +* Added KBADC Beagle FPGA board +* Added Brainmux LCDog and LCDog Touch +* Added Liquidware BeagleTouch +--- +v2 updates + * Removed unused definitions + * Added BeagleBoardToys board configurations + * Made definition names consistent as VENDOR_BOARD +--- + board/ti/beagle/beagle.c | 30 +++++++++++++++++++++++++++++- + board/ti/beagle/beagle.h | 12 ++++++++++++ + 2 files changed, 41 insertions(+), 1 deletions(-) + +diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c +index 87a952e..97e9e12 100644 +--- a/board/ti/beagle/beagle.c ++++ b/board/ti/beagle/beagle.c +@@ -48,7 +48,12 @@ + #define TINCANTOOLS_TRAINER 0x04000100 + #define TINCANTOOLS_SHOWDOG 0x03000100 + #define KBADC_BEAGLEFPGA 0x01000600 +- ++#define LW_BEAGLETOUCH 0x01000700 ++#define BRAINMUX_LCDOG 0x01000800 ++#define BRAINMUX_LCDOGTOUCH 0x02000800 ++#define BBTOYS_WIFI 0x01000B00 ++#define BBTOYS_VGA 0x02000B00 ++#define BBTOYS_LCD 0x03000B00 + #define BEAGLE_NO_EEPROM 0xffffffff + + DECLARE_GLOBAL_DATA_PTR; +@@ -239,6 +244,29 @@ int misc_init_r(void) + MUX_KBADC_BEAGLEFPGA(); + setenv("buddy", "beaglefpga"); + break; ++ case LW_BEAGLETOUCH: ++ printf("Recognized Liquidware BeagleTouch board\n"); ++ setenv("buddy", "beagletouch"); ++ break; ++ case BRAINMUX_LCDOG: ++ printf("Recognized Brainmux LCDog board\n"); ++ setenv("buddy", "lcdog"); ++ break; ++ case BRAINMUX_LCDOGTOUCH: ++ printf("Recognized Brainmux LCDog Touch board\n"); ++ setenv("buddy", "lcdogtouch"); ++ break; ++ case BBTOYS_WIFI: ++ printf("Recognized BeagleBoardToys WiFi board\n"); ++ MUX_BBTOYS_WIFI() ++ setenv("buddy", "bbtoys-wifi"); ++ break;; ++ case BBTOYS_VGA: ++ printf("Recognized BeagleBoardToys VGA board\n"); ++ break;; ++ case BBTOYS_LCD: ++ printf("Recognized BeagleBoardToys LCD board\n"); ++ break;; + case BEAGLE_NO_EEPROM: + printf("No EEPROM on expansion board\n"); + setenv("buddy", "none"); +diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h +index b0e26e5..0f21790 100644 +--- a/board/ti/beagle/beagle.h ++++ b/board/ti/beagle/beagle.h +@@ -458,4 +458,16 @@ const omap3_sysinfo sysinfo = { + MUX_VAL(CP(MCBSP1_DR), (IEN | PTU | EN | M1)) /*MCSPI4_SOMI*/\ + MUX_VAL(CP(MCBSP1_FSX), (IDIS | PTU | DIS | M1)) /*MCSPI4_CS0*/ + ++#define MUX_BBTOYS_WIFI() \ ++ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\ ++ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\ ++ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\ ++ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\ ++ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\ ++ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\ ++ MUX_VAL(CP(MMC2_DAT4), (IDIS | PTU | EN | M4)) /*GPIO_136 FM_EN/BT_WU*/\ ++ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137 WLAN_IRQ*/\ ++ MUX_VAL(CP(MMC2_DAT6), (IDIS | PTU | EN | M4)) /*GPIO_138 BT_EN*/\ ++ MUX_VAL(CP(MMC2_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_139 WLAN_EN*/ ++ + #endif +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0006-OMAP3-add-mpurate-boot-arg-for-overo-and-beagle.patch b/recipes/u-boot/u-boot-git/beagleboard/0006-OMAP3-add-mpurate-boot-arg-for-overo-and-beagle.patch deleted file mode 100644 index 5fbc0754b7..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0006-OMAP3-add-mpurate-boot-arg-for-overo-and-beagle.patch +++ /dev/null @@ -1,70 +0,0 @@ -From b03bad6826a2f3a0a03f6cdd5682e0a628fff851 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Wed, 3 Feb 2010 14:39:14 -0800 -Subject: [PATCH 06/50] OMAP3: add mpurate boot arg for overo and beagle - -allows one to set the omap clock rate via "setenv mpurate 720" for example ---- - include/configs/omap3_beagle.h | 3 +++ - include/configs/omap3_overo.h | 3 +++ - 2 files changed, 6 insertions(+), 0 deletions(-) - -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index d522c77..35ae8af 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -187,6 +187,7 @@ - "loadaddr=0x82000000\0" \ - "usbtty=cdc_acm\0" \ - "console=ttyS2,115200n8\0" \ -+ "mpurate=500\0" \ - "vram=12M\0" \ - "dvimode=1024x768MR-16@60\0" \ - "defaultdisplay=dvi\0" \ -@@ -195,6 +196,7 @@ - "nandroot=/dev/mtdblock4 rw\0" \ - "nandrootfstype=jffs2\0" \ - "mmcargs=setenv bootargs console=${console} " \ -+ "mpurate=${mpurate} " \ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapfb.debug=y " \ -@@ -202,6 +204,7 @@ - "root=${mmcroot} " \ - "rootfstype=${mmcrootfstype}\0" \ - "nandargs=setenv bootargs console=${console} " \ -+ "mpurate=${mpurate} " \ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapfb.debug=y " \ -diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h -index a43500b..113c6df 100644 ---- a/include/configs/omap3_overo.h -+++ b/include/configs/omap3_overo.h -@@ -151,6 +151,7 @@ - #define CONFIG_EXTRA_ENV_SETTINGS \ - "loadaddr=0x82000000\0" \ - "console=ttyS2,115200n8\0" \ -+ "mpurate=500\0" \ - "vram=12M\0" \ - "dvimode=1024x768MR-16@60\0" \ - "defaultdisplay=dvi\0" \ -@@ -159,6 +160,7 @@ - "nandroot=/dev/mtdblock4 rw\0" \ - "nandrootfstype=jffs2\0" \ - "mmcargs=setenv bootargs console=${console} " \ -+ "mpurate=${mpurate} " \ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapfb.debug=y " \ -@@ -166,6 +168,7 @@ - "root=${mmcroot} " \ - "rootfstype=${mmcrootfstype}\0" \ - "nandargs=setenv bootargs console=${console} " \ -+ "mpurate=${mpurate} " \ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapfb.debug=y " \ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0025-Add-DSS-driver-for-OMAP3.patch b/recipes/u-boot/u-boot-git/beagleboard/0007-OMAP3-Add-DSS-driver-for-OMAP3.patch similarity index 76% rename from recipes/u-boot/u-boot-git/beagleboard/0025-Add-DSS-driver-for-OMAP3.patch rename to recipes/u-boot/u-boot-git/beagleboard/0007-OMAP3-Add-DSS-driver-for-OMAP3.patch index 7a33bed6c3..a1b3b0e28f 100644 --- a/recipes/u-boot/u-boot-git/beagleboard/0025-Add-DSS-driver-for-OMAP3.patch +++ b/recipes/u-boot/u-boot-git/beagleboard/0007-OMAP3-Add-DSS-driver-for-OMAP3.patch @@ -1,7 +1,7 @@ -From afa9025604773b90831cb93a5c80db8d2b8eed4b Mon Sep 17 00:00:00 2001 +From 8a249fc1c57ab01a78996e33e74a71757a9448b1 Mon Sep 17 00:00:00 2001 From: Syed Mohammed Khasim Date: Tue, 12 Jan 2010 23:57:28 +0530 -Subject: [PATCH 25/50] Add DSS driver for OMAP3 +Subject: [PATCH 07/16] OMAP3: Add DSS driver for OMAP3 Supports dynamic panel configuration Supports dynamic tv standard selection @@ -11,169 +11,27 @@ Incorporated DSS register access using structures. Previous discussions are here http://www.mail-archive.com/u-boot@lists.denx.de/msg27150.html +--- +v2 updates: + * Enable panel output for BeagleBoard + * BeagleBoard: Update DVI-D orange screen frequencies for xM Signed-off-by: Syed Mohammed Khasim --- - drivers/video/Makefile | 1 + - drivers/video/omap3_dss.c | 130 ++++++++++++++++++++++++++++ - include/asm-arm/arch-omap3/dss.h | 173 ++++++++++++++++++++++++++++++++++++++ - 3 files changed, 304 insertions(+), 0 deletions(-) + arch/arm/include/asm/arch-omap3/dss.h | 173 +++++++++++++++++++++++++++++++++ + board/ti/beagle/beagle.c | 22 ++++ + board/ti/beagle/beagle.h | 26 +++++ + drivers/video/Makefile | 2 + + drivers/video/omap3_dss.c | 130 +++++++++++++++++++++++++ + 5 files changed, 353 insertions(+), 0 deletions(-) + create mode 100644 arch/arm/include/asm/arch-omap3/dss.h create mode 100644 drivers/video/omap3_dss.c - create mode 100644 include/asm-arm/arch-omap3/dss.h -diff --git a/drivers/video/Makefile b/drivers/video/Makefile -index a5e339a..44d7ae8 100644 ---- a/drivers/video/Makefile -+++ b/drivers/video/Makefile -@@ -38,6 +38,7 @@ COBJS-$(CONFIG_SED156X) += sed156x.o - COBJS-$(CONFIG_VIDEO_SM501) += sm501.o - COBJS-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o - COBJS-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o -+COBJS-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o - COBJS-y += videomodes.o - - COBJS := $(COBJS-y) -diff --git a/drivers/video/omap3_dss.c b/drivers/video/omap3_dss.c -new file mode 100644 -index 0000000..69c705a ---- /dev/null -+++ b/drivers/video/omap3_dss.c -@@ -0,0 +1,130 @@ -+/* -+ * (C) Copyright 2010 -+ * Texas Instruments, -+ * Syed Mohammed Khasim -+ * -+ * Referred to Linux DSS driver files for OMAP3 -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation's version 2 of -+ * the License. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+#include -+#include -+#include -+ -+/* -+ * Configure VENC for a given Mode (NTSC / PAL) -+ */ -+void omap3_dss_venc_config(const struct venc_regs *venc_cfg, -+ u32 height, u32 width) -+{ -+ struct venc_regs *venc = (struct venc_regs *) OMAP3_VENC_BASE; -+ struct dss_regs *dss = (struct dss_regs *) OMAP3_DSS_BASE; -+ struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; -+ -+ writel(venc_cfg->status, &venc->status); -+ writel(venc_cfg->f_control, &venc->f_control); -+ writel(venc_cfg->vidout_ctrl, &venc->vidout_ctrl); -+ writel(venc_cfg->sync_ctrl, &venc->sync_ctrl); -+ writel(venc_cfg->llen, &venc->llen); -+ writel(venc_cfg->flens, &venc->flens); -+ writel(venc_cfg->hfltr_ctrl, &venc->hfltr_ctrl); -+ writel(venc_cfg->cc_carr_wss_carr, &venc->cc_carr_wss_carr); -+ writel(venc_cfg->c_phase, &venc->c_phase); -+ writel(venc_cfg->gain_u, &venc->gain_u); -+ writel(venc_cfg->gain_v, &venc->gain_v); -+ writel(venc_cfg->gain_y, &venc->gain_y); -+ writel(venc_cfg->black_level, &venc->black_level); -+ writel(venc_cfg->blank_level, &venc->blank_level); -+ writel(venc_cfg->x_color, &venc->x_color); -+ writel(venc_cfg->m_control, &venc->m_control); -+ writel(venc_cfg->bstamp_wss_data, &venc->bstamp_wss_data); -+ writel(venc_cfg->s_carr, &venc->s_carr); -+ writel(venc_cfg->line21, &venc->line21); -+ writel(venc_cfg->ln_sel, &venc->ln_sel); -+ writel(venc_cfg->l21__wc_ctl, &venc->l21__wc_ctl); -+ writel(venc_cfg->htrigger_vtrigger, &venc->htrigger_vtrigger); -+ writel(venc_cfg->savid__eavid, &venc->savid__eavid); -+ writel(venc_cfg->flen__fal, &venc->flen__fal); -+ writel(venc_cfg->lal__phase_reset, &venc->lal__phase_reset); -+ writel(venc_cfg->hs_int_start_stop_x, -+ &venc->hs_int_start_stop_x); -+ writel(venc_cfg->hs_ext_start_stop_x, -+ &venc->hs_ext_start_stop_x); -+ writel(venc_cfg->vs_int_start_x, &venc->vs_int_start_x); -+ writel(venc_cfg->vs_int_stop_x__vs_int_start_y, -+ &venc->vs_int_stop_x__vs_int_start_y); -+ writel(venc_cfg->vs_int_stop_y__vs_ext_start_x, -+ &venc->vs_int_stop_y__vs_ext_start_x); -+ writel(venc_cfg->vs_ext_stop_x__vs_ext_start_y, -+ &venc->vs_ext_stop_x__vs_ext_start_y); -+ writel(venc_cfg->vs_ext_stop_y, &venc->vs_ext_stop_y); -+ writel(venc_cfg->avid_start_stop_x, &venc->avid_start_stop_x); -+ writel(venc_cfg->avid_start_stop_y, &venc->avid_start_stop_y); -+ writel(venc_cfg->fid_int_start_x__fid_int_start_y, -+ &venc->fid_int_start_x__fid_int_start_y); -+ writel(venc_cfg->fid_int_offset_y__fid_ext_start_x, -+ &venc->fid_int_offset_y__fid_ext_start_x); -+ writel(venc_cfg->fid_ext_start_y__fid_ext_offset_y, -+ &venc->fid_ext_start_y__fid_ext_offset_y); -+ writel(venc_cfg->tvdetgp_int_start_stop_x, -+ &venc->tvdetgp_int_start_stop_x); -+ writel(venc_cfg->tvdetgp_int_start_stop_y, -+ &venc->tvdetgp_int_start_stop_y); -+ writel(venc_cfg->gen_ctrl, &venc->gen_ctrl); -+ writel(venc_cfg->output_control, &venc->output_control); -+ writel(venc_cfg->dac_b__dac_c, &venc->dac_b__dac_c); -+ -+ /* Configure DSS for VENC Settings */ -+ writel(VENC_DSS_CONFIG, &dss->control); -+ -+ /* Configure height and width for Digital out */ -+ writel(((height << DIG_LPP_SHIFT) | width), &dispc->size_dig); -+} -+ -+/* -+ * Configure Panel Specific Parameters -+ */ -+void omap3_dss_panel_config(const struct panel_config *panel_cfg) -+{ -+ struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; -+ -+ writel(panel_cfg->timing_h, &dispc->timing_h); -+ writel(panel_cfg->timing_v, &dispc->timing_v); -+ writel(panel_cfg->pol_freq, &dispc->pol_freq); -+ writel(panel_cfg->divisor, &dispc->divisor); -+ writel(panel_cfg->lcd_size, &dispc->size_lcd); -+ writel((panel_cfg->load_mode << FRAME_MODE_SHIFT), &dispc->config); -+ writel(((panel_cfg->panel_type << TFTSTN_SHIFT) | -+ (panel_cfg->data_lines << DATALINES_SHIFT)), &dispc->control); -+ writel(panel_cfg->panel_color, &dispc->default_color0); -+} -+ -+/* -+ * Enable LCD and DIGITAL OUT in DSS -+ */ -+void omap3_dss_enable(void) -+{ -+ struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; -+ u32 l = 0; -+ -+ l = readl(&dispc->control); -+ l |= DISPC_ENABLE; -+ writel(l, &dispc->control); -+} -diff --git a/include/asm-arm/arch-omap3/dss.h b/include/asm-arm/arch-omap3/dss.h +diff --git a/arch/arm/include/asm/arch-omap3/dss.h b/arch/arm/include/asm/arch-omap3/dss.h new file mode 100644 index 0000000..e5e3b0d --- /dev/null -+++ b/include/asm-arm/arch-omap3/dss.h ++++ b/arch/arm/include/asm/arch-omap3/dss.h @@ -0,0 +1,173 @@ +/* + * (C) Copyright 2010 @@ -348,6 +206,230 @@ index 0000000..e5e3b0d +void omap3_dss_enable(void); + +#endif /* DSS_H */ +diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c +index 97e9e12..56e7afc 100644 +--- a/board/ti/beagle/beagle.c ++++ b/board/ti/beagle/beagle.c +@@ -146,6 +146,27 @@ unsigned int get_expansion_id(void) + } + + /* ++ * Configure DSS to display background color on DVID ++ * Configure VENC to display color bar on S-Video ++ */ ++void display_init(void) ++{ ++ omap3_dss_venc_config(&venc_config_std_tv, VENC_HEIGHT, VENC_WIDTH); ++ switch (get_board_revision()) { ++ case REVISION_AXBX: ++ case REVISION_CX: ++ case REVISION_C4: ++ omap3_dss_panel_config(&dvid_cfg); ++ break; ++ case REVISION_XM_A: ++ case REVISION_XM_B: ++ default: ++ omap3_dss_panel_config(&dvid_cfg_xm); ++ break; ++ } ++} ++ ++/* + * Routine: misc_init_r + * Description: Configure board specific parts + */ +@@ -282,6 +303,7 @@ int misc_init_r(void) + + twl4030_power_init(); + twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); ++ display_init(); + + /* Set GPIO states before they are made outputs */ + writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1, +diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h +index 0f21790..48228dc 100644 +--- a/board/ti/beagle/beagle.h ++++ b/board/ti/beagle/beagle.h +@@ -470,4 +470,30 @@ const omap3_sysinfo sysinfo = { + MUX_VAL(CP(MMC2_DAT6), (IDIS | PTU | EN | M4)) /*GPIO_138 BT_EN*/\ + MUX_VAL(CP(MMC2_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_139 WLAN_EN*/ + ++/* ++ * Configure Timings for DVI D ++ */ ++static const struct panel_config dvid_cfg = { ++ .timing_h = 0x0ff03f31, /* Horizantal timing */ ++ .timing_v = 0x01400504, /* Vertical timing */ ++ .pol_freq = 0x00007028, /* Pol Freq */ ++ .divisor = 0x00010006, /* 72Mhz Pixel Clock */ ++ .lcd_size = 0x02ff03ff, /* 1024x768 */ ++ .panel_type = 0x01, /* TFT */ ++ .data_lines = 0x03, /* 24 Bit RGB */ ++ .load_mode = 0x02, /* Frame Mode */ ++ .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */ ++}; ++ ++static const struct panel_config dvid_cfg_xm = { ++ .timing_h = 0x1a4024c9, /* Horizantal timing */ ++ .timing_v = 0x02c00509, /* Vertical timing */ ++ .pol_freq = 0x00007028, /* Pol Freq */ ++ .divisor = 0x00010001, /* 96MHz Pixel Clock */ ++ .lcd_size = 0x02ff03ff, /* 1024x768 */ ++ .panel_type = 0x01, /* TFT */ ++ .data_lines = 0x03, /* 24 Bit RGB */ ++ .load_mode = 0x02, /* Frame Mode */ ++ .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */ ++}; + #endif +diff --git a/drivers/video/Makefile b/drivers/video/Makefile +index 2c53a6f..6baa7ca 100644 +--- a/drivers/video/Makefile ++++ b/drivers/video/Makefile +@@ -41,6 +41,8 @@ COBJS-$(CONFIG_SED156X) += sed156x.o + COBJS-$(CONFIG_VIDEO_SM501) += sm501.o + COBJS-$(CONFIG_VIDEO_SMI_LYNXEM) += smiLynxEM.o videomodes.o + COBJS-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o ++COBJS-$(CONFIG_VIDEO_OMAP3) += omap3_dss.o ++COBJS-y += videomodes.o + + COBJS := $(COBJS-y) + SRCS := $(COBJS:.o=.c) +diff --git a/drivers/video/omap3_dss.c b/drivers/video/omap3_dss.c +new file mode 100644 +index 0000000..69c705a +--- /dev/null ++++ b/drivers/video/omap3_dss.c +@@ -0,0 +1,130 @@ ++/* ++ * (C) Copyright 2010 ++ * Texas Instruments, ++ * Syed Mohammed Khasim ++ * ++ * Referred to Linux DSS driver files for OMAP3 ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation's version 2 of ++ * the License. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++#include ++#include ++ ++/* ++ * Configure VENC for a given Mode (NTSC / PAL) ++ */ ++void omap3_dss_venc_config(const struct venc_regs *venc_cfg, ++ u32 height, u32 width) ++{ ++ struct venc_regs *venc = (struct venc_regs *) OMAP3_VENC_BASE; ++ struct dss_regs *dss = (struct dss_regs *) OMAP3_DSS_BASE; ++ struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; ++ ++ writel(venc_cfg->status, &venc->status); ++ writel(venc_cfg->f_control, &venc->f_control); ++ writel(venc_cfg->vidout_ctrl, &venc->vidout_ctrl); ++ writel(venc_cfg->sync_ctrl, &venc->sync_ctrl); ++ writel(venc_cfg->llen, &venc->llen); ++ writel(venc_cfg->flens, &venc->flens); ++ writel(venc_cfg->hfltr_ctrl, &venc->hfltr_ctrl); ++ writel(venc_cfg->cc_carr_wss_carr, &venc->cc_carr_wss_carr); ++ writel(venc_cfg->c_phase, &venc->c_phase); ++ writel(venc_cfg->gain_u, &venc->gain_u); ++ writel(venc_cfg->gain_v, &venc->gain_v); ++ writel(venc_cfg->gain_y, &venc->gain_y); ++ writel(venc_cfg->black_level, &venc->black_level); ++ writel(venc_cfg->blank_level, &venc->blank_level); ++ writel(venc_cfg->x_color, &venc->x_color); ++ writel(venc_cfg->m_control, &venc->m_control); ++ writel(venc_cfg->bstamp_wss_data, &venc->bstamp_wss_data); ++ writel(venc_cfg->s_carr, &venc->s_carr); ++ writel(venc_cfg->line21, &venc->line21); ++ writel(venc_cfg->ln_sel, &venc->ln_sel); ++ writel(venc_cfg->l21__wc_ctl, &venc->l21__wc_ctl); ++ writel(venc_cfg->htrigger_vtrigger, &venc->htrigger_vtrigger); ++ writel(venc_cfg->savid__eavid, &venc->savid__eavid); ++ writel(venc_cfg->flen__fal, &venc->flen__fal); ++ writel(venc_cfg->lal__phase_reset, &venc->lal__phase_reset); ++ writel(venc_cfg->hs_int_start_stop_x, ++ &venc->hs_int_start_stop_x); ++ writel(venc_cfg->hs_ext_start_stop_x, ++ &venc->hs_ext_start_stop_x); ++ writel(venc_cfg->vs_int_start_x, &venc->vs_int_start_x); ++ writel(venc_cfg->vs_int_stop_x__vs_int_start_y, ++ &venc->vs_int_stop_x__vs_int_start_y); ++ writel(venc_cfg->vs_int_stop_y__vs_ext_start_x, ++ &venc->vs_int_stop_y__vs_ext_start_x); ++ writel(venc_cfg->vs_ext_stop_x__vs_ext_start_y, ++ &venc->vs_ext_stop_x__vs_ext_start_y); ++ writel(venc_cfg->vs_ext_stop_y, &venc->vs_ext_stop_y); ++ writel(venc_cfg->avid_start_stop_x, &venc->avid_start_stop_x); ++ writel(venc_cfg->avid_start_stop_y, &venc->avid_start_stop_y); ++ writel(venc_cfg->fid_int_start_x__fid_int_start_y, ++ &venc->fid_int_start_x__fid_int_start_y); ++ writel(venc_cfg->fid_int_offset_y__fid_ext_start_x, ++ &venc->fid_int_offset_y__fid_ext_start_x); ++ writel(venc_cfg->fid_ext_start_y__fid_ext_offset_y, ++ &venc->fid_ext_start_y__fid_ext_offset_y); ++ writel(venc_cfg->tvdetgp_int_start_stop_x, ++ &venc->tvdetgp_int_start_stop_x); ++ writel(venc_cfg->tvdetgp_int_start_stop_y, ++ &venc->tvdetgp_int_start_stop_y); ++ writel(venc_cfg->gen_ctrl, &venc->gen_ctrl); ++ writel(venc_cfg->output_control, &venc->output_control); ++ writel(venc_cfg->dac_b__dac_c, &venc->dac_b__dac_c); ++ ++ /* Configure DSS for VENC Settings */ ++ writel(VENC_DSS_CONFIG, &dss->control); ++ ++ /* Configure height and width for Digital out */ ++ writel(((height << DIG_LPP_SHIFT) | width), &dispc->size_dig); ++} ++ ++/* ++ * Configure Panel Specific Parameters ++ */ ++void omap3_dss_panel_config(const struct panel_config *panel_cfg) ++{ ++ struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; ++ ++ writel(panel_cfg->timing_h, &dispc->timing_h); ++ writel(panel_cfg->timing_v, &dispc->timing_v); ++ writel(panel_cfg->pol_freq, &dispc->pol_freq); ++ writel(panel_cfg->divisor, &dispc->divisor); ++ writel(panel_cfg->lcd_size, &dispc->size_lcd); ++ writel((panel_cfg->load_mode << FRAME_MODE_SHIFT), &dispc->config); ++ writel(((panel_cfg->panel_type << TFTSTN_SHIFT) | ++ (panel_cfg->data_lines << DATALINES_SHIFT)), &dispc->control); ++ writel(panel_cfg->panel_color, &dispc->default_color0); ++} ++ ++/* ++ * Enable LCD and DIGITAL OUT in DSS ++ */ ++void omap3_dss_enable(void) ++{ ++ struct dispc_regs *dispc = (struct dispc_regs *) OMAP3_DISPC_BASE; ++ u32 l = 0; ++ ++ l = readl(&dispc->control); ++ l |= DISPC_ENABLE; ++ writel(l, &dispc->control); ++} -- 1.6.6.1 diff --git a/recipes/u-boot/u-boot-git/beagleboard/0007-OMAP3-detect-expansion-board-type-version-using-eepr.patch b/recipes/u-boot/u-boot-git/beagleboard/0007-OMAP3-detect-expansion-board-type-version-using-eepr.patch deleted file mode 100644 index 8ff0e93c3e..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0007-OMAP3-detect-expansion-board-type-version-using-eepr.patch +++ /dev/null @@ -1,129 +0,0 @@ -From f1ad90ae5fd07257ea42aa771e16a7798cd440bb Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Fri, 12 Feb 2010 12:17:48 -0800 -Subject: [PATCH 07/50] OMAP3: detect expansion board type/version using eeprom contents - ---- - board/overo/overo.c | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 92 insertions(+), 0 deletions(-) - -diff --git a/board/overo/overo.c b/board/overo/overo.c -index 3df1a12..2838a1f 100644 ---- a/board/overo/overo.c -+++ b/board/overo/overo.c -@@ -39,6 +39,31 @@ - #include - #include "overo.h" - -+static struct { -+ unsigned int device_vendor; -+ unsigned char revision; -+ unsigned char content; -+ unsigned char data[6]; -+} expansion_config; -+ -+#define TWL4030_I2C_BUS 0 -+ -+#define EXPANSION_EEPROM_I2C_BUS 2 -+#define EXPANSION_EEPROM_I2C_ADDRESS 0x50 -+ -+#define GUMSTIX_VENDORID 0x0200 -+ -+#define GUMSTIX_SUMMIT 0x01000200 -+#define GUMSTIX_TOBI 0x02000200 -+#define GUMSTIX_TOBI_DUO 0x03000200 -+#define GUMSTIX_PALO35 0x04000200 -+#define GUMSTIX_PALO43 0x05000200 -+#define GUMSTIX_CHESTNUT43 0x06000200 -+#define GUMSTIX_PINTO 0x07000200 -+ -+#define GUMSTIX_NO_EEPROM 0xfffffffe -+#define GUMSTIX_UNKNOWN 0xffffffff -+ - #if defined(CONFIG_CMD_NET) - static void setup_net_chip(void); - #endif -@@ -130,6 +155,31 @@ int get_board_revision(void) { - } - - /* -+ * Routine: get_expansion_id -+ * Description: This function checks for expansion board by checking I2C -+ * bus 2 for the availability of an AT24C01B serial EEPROM. -+ * returns the device_vendor field from the EEPROM -+ */ -+unsigned int get_expansion_id(void) -+{ -+ i2c_set_bus_num(EXPANSION_EEPROM_I2C_BUS); -+ -+ /* return GUMSTIX_NO_EEPROM if eeprom doesn't respond */ -+ if (i2c_probe(EXPANSION_EEPROM_I2C_ADDRESS) == 1) -+ return GUMSTIX_NO_EEPROM; -+ -+ /* read configuration data */ -+ i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config, -+ sizeof(expansion_config)); -+ -+ if ( (expansion_config.device_vendor & 0xffff) != GUMSTIX_VENDORID ) -+ return GUMSTIX_UNKNOWN; -+ else -+ return expansion_config.device_vendor; -+} -+ -+ -+/* - * Routine: misc_init_r - * Description: Configure board specific parts - */ -@@ -156,6 +206,48 @@ int misc_init_r(void) - printf(" unsupported\n"); - } - -+ switch (get_expansion_id()) { -+ case GUMSTIX_SUMMIT: -+ printf("Recognized Summit expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.data); -+ setenv("defaultdisplay", "dvi"); -+ break; -+ case GUMSTIX_TOBI: -+ printf("Recognized Tobi expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.data); -+ setenv("defaultdisplay", "dvi"); -+ break; -+ case GUMSTIX_TOBI_DUO: -+ printf("Recognized Tobi Duo expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.data); -+ break; -+ case GUMSTIX_PALO35: -+ printf("Recognized Palo 35 expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.data); -+ setenv("defaultdisplay", "lcd35"); -+ break; -+ case GUMSTIX_PALO43: -+ printf("Recognized Palo 43 expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.data); -+ setenv("defaultdisplay", "lcd43"); -+ break; -+ case GUMSTIX_CHESTNUT43: -+ printf("Recognized Chestnut 43 expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.data); -+ setenv("defaultdisplay", "lcd43"); -+ break; -+ case GUMSTIX_PINTO: -+ printf("Recognized Pinto expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.data); -+ break; -+ case GUMSTIX_NO_EEPROM: -+ printf("No EEPROM on expansion board\n"); -+ break; -+ case GUMSTIX_UNKNOWN: -+ printf("Unrecognized expansion board\n"); -+ } -+ -+ i2c_set_bus_num(TWL4030_I2C_BUS); - twl4030_power_init(); - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); - --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0045-BeagleBoard-Added-userbutton-command.patch b/recipes/u-boot/u-boot-git/beagleboard/0008-BeagleBoard-Added-userbutton-command.patch similarity index 77% rename from recipes/u-boot/u-boot-git/beagleboard/0045-BeagleBoard-Added-userbutton-command.patch rename to recipes/u-boot/u-boot-git/beagleboard/0008-BeagleBoard-Added-userbutton-command.patch index d454d73c16..411bb7b7f7 100644 --- a/recipes/u-boot/u-boot-git/beagleboard/0045-BeagleBoard-Added-userbutton-command.patch +++ b/recipes/u-boot/u-boot-git/beagleboard/0008-BeagleBoard-Added-userbutton-command.patch @@ -1,7 +1,7 @@ -From f5146ac9d3af9c9cd4f4bc940c343d3ef75ac6f0 Mon Sep 17 00:00:00 2001 +From 31110e039b1982590df08c66e53924f454e3e3f1 Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Wed, 21 Jul 2010 07:41:25 -0500 -Subject: [PATCH 45/50] BeagleBoard: Added userbutton command +Subject: [PATCH 08/16] BeagleBoard: Added userbutton command Based on commit f1099c7c43caf5bac3bf6a65aa266fade4747072 Author: Greg Turner @@ -19,26 +19,29 @@ Based on commit f1099c7c43caf5bac3bf6a65aa266fade4747072 * Flipped polarity of the return value to avoid confusion. Success (0) is when the button is pressed. Failure (1) is when the button is NOT pressed. +* Used latest revision getting function. +* Used latest macros for board revision. --- - board/ti/beagle/beagle.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 54 insertions(+), 0 deletions(-) + board/ti/beagle/beagle.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 55 insertions(+), 0 deletions(-) diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index a6a4961..66df719 100644 +index 56e7afc..04e4259 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c -@@ -40,6 +40,7 @@ +@@ -38,6 +38,7 @@ #include #include #include "beagle.h" +#include - static struct { - unsigned int device_vendor; -@@ -290,3 +291,56 @@ void set_muxconf_regs(void) - MUX_BEAGLE(); + #define TWL4030_I2C_BUS 0 + #define EXPANSION_EEPROM_I2C_BUS 1 +@@ -339,3 +340,57 @@ int board_mmc_init(bd_t *bis) + return 0; } - + #endif ++ +/* + * This command returns the status of the user button on beagle xM + * Input - none @@ -54,13 +57,14 @@ index a6a4961..66df719 100644 + * pass address parameter as argv[0] (aka command name), + * and all remaining args + */ -+ switch (beagle_revision) { ++ switch (get_board_revision()) { + case REVISION_AXBX: + case REVISION_CX: + case REVISION_C4: + gpio = 7; + break; -+ case REVISION_XM: ++ case REVISION_XM_A: ++ case REVISION_XM_B: + default: + gpio = 4; + break; @@ -91,7 +95,6 @@ index a6a4961..66df719 100644 + "Return the status of the BeagleBoard USER button", + "" +); -+ -- 1.6.6.1 diff --git a/recipes/u-boot/u-boot-git/beagleboard/0008-OMAP3-Overo-enable-config-eeprom-to-set-u-boot-env-v.patch b/recipes/u-boot/u-boot-git/beagleboard/0008-OMAP3-Overo-enable-config-eeprom-to-set-u-boot-env-v.patch deleted file mode 100644 index 0f847256f0..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0008-OMAP3-Overo-enable-config-eeprom-to-set-u-boot-env-v.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 831504a9514c2cb4b1dc8c9a261fd4d1a037235f Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 16 Feb 2010 09:58:01 -0800 -Subject: [PATCH 08/50] OMAP3: Overo: enable config eeprom to set u-boot env variable - ---- - board/overo/overo.c | 21 +++++++++++++-------- - 1 files changed, 13 insertions(+), 8 deletions(-) - -diff --git a/board/overo/overo.c b/board/overo/overo.c -index 2838a1f..f6093d2 100644 ---- a/board/overo/overo.c -+++ b/board/overo/overo.c -@@ -43,7 +43,9 @@ static struct { - unsigned int device_vendor; - unsigned char revision; - unsigned char content; -- unsigned char data[6]; -+ unsigned char fab_revision[8]; -+ unsigned char env_var[16]; -+ unsigned char env_setting[64]; - } expansion_config; - - #define TWL4030_I2C_BUS 0 -@@ -209,36 +211,36 @@ int misc_init_r(void) - switch (get_expansion_id()) { - case GUMSTIX_SUMMIT: - printf("Recognized Summit expansion board (rev %d %s)\n", -- expansion_config.revision, expansion_config.data); -+ expansion_config.revision, expansion_config.fab_revision); - setenv("defaultdisplay", "dvi"); - break; - case GUMSTIX_TOBI: - printf("Recognized Tobi expansion board (rev %d %s)\n", -- expansion_config.revision, expansion_config.data); -+ expansion_config.revision, expansion_config.fab_revision); - setenv("defaultdisplay", "dvi"); - break; - case GUMSTIX_TOBI_DUO: - printf("Recognized Tobi Duo expansion board (rev %d %s)\n", -- expansion_config.revision, expansion_config.data); -+ expansion_config.revision, expansion_config.fab_revision); - break; - case GUMSTIX_PALO35: - printf("Recognized Palo 35 expansion board (rev %d %s)\n", -- expansion_config.revision, expansion_config.data); -+ expansion_config.revision, expansion_config.fab_revision); - setenv("defaultdisplay", "lcd35"); - break; - case GUMSTIX_PALO43: - printf("Recognized Palo 43 expansion board (rev %d %s)\n", -- expansion_config.revision, expansion_config.data); -+ expansion_config.revision, expansion_config.fab_revision); - setenv("defaultdisplay", "lcd43"); - break; - case GUMSTIX_CHESTNUT43: - printf("Recognized Chestnut 43 expansion board (rev %d %s)\n", -- expansion_config.revision, expansion_config.data); -+ expansion_config.revision, expansion_config.fab_revision); - setenv("defaultdisplay", "lcd43"); - break; - case GUMSTIX_PINTO: - printf("Recognized Pinto expansion board (rev %d %s)\n", -- expansion_config.revision, expansion_config.data); -+ expansion_config.revision, expansion_config.fab_revision); - break; - case GUMSTIX_NO_EEPROM: - printf("No EEPROM on expansion board\n"); -@@ -247,6 +249,9 @@ int misc_init_r(void) - printf("Unrecognized expansion board\n"); - } - -+ if (expansion_config.content == 1) -+ setenv(expansion_config.env_var, expansion_config.env_setting); -+ - i2c_set_bus_num(TWL4030_I2C_BUS); - twl4030_power_init(); - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0009-OMAP3-Overo-enable-input-on-MMC1_CLK-and-MMC3_CLK-pi.patch b/recipes/u-boot/u-boot-git/beagleboard/0009-OMAP3-Overo-enable-input-on-MMC1_CLK-and-MMC3_CLK-pi.patch deleted file mode 100644 index 1cadd80363..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0009-OMAP3-Overo-enable-input-on-MMC1_CLK-and-MMC3_CLK-pi.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 500787d2999e23cf185808f611af61745c2746a3 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 16 Feb 2010 10:00:45 -0800 -Subject: [PATCH 09/50] OMAP3: Overo: enable input on MMC1_CLK and MMC3_CLK pinmux - ---- - board/overo/overo.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/board/overo/overo.h b/board/overo/overo.h -index e120e09..ff936dd 100644 ---- a/board/overo/overo.h -+++ b/board/overo/overo.h -@@ -200,7 +200,7 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(MCBSP2_DR), (IEN | PTD | DIS | M0)) /*McBSP2_DR*/\ - MUX_VAL(CP(MCBSP2_DX), (IDIS | PTD | DIS | M0)) /*McBSP2_DX*/\ - /*Expansion card */\ -- MUX_VAL(CP(MMC1_CLK), (IDIS | PTU | EN | M0)) /*MMC1_CLK*/\ -+ MUX_VAL(CP(MMC1_CLK), (IEN | PTU | EN | M0)) /*MMC1_CLK*/\ - MUX_VAL(CP(MMC1_CMD), (IEN | PTU | EN | M0)) /*MMC1_CMD*/\ - MUX_VAL(CP(MMC1_DAT0), (IEN | PTU | EN | M0)) /*MMC1_DAT0*/\ - MUX_VAL(CP(MMC1_DAT1), (IEN | PTU | EN | M0)) /*MMC1_DAT1*/\ -@@ -301,7 +301,7 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(SYS_OFF_MODE), (IEN | PTD | DIS | M0)) /*SYS_OFF_MODE*/\ - MUX_VAL(CP(SYS_CLKOUT1), (IEN | PTD | DIS | M0)) /*SYS_CLKOUT1*/\ - MUX_VAL(CP(SYS_CLKOUT2), (IEN | PTU | EN | M4)) /*GPIO_186*/\ -- MUX_VAL(CP(ETK_CLK_ES2), (IDIS | PTU | EN | M2)) /*MMC3_CLK*/\ -+ MUX_VAL(CP(ETK_CLK_ES2), (IEN | PTU | EN | M2)) /*MMC3_CLK*/\ - MUX_VAL(CP(ETK_CTL_ES2), (IEN | PTU | EN | M2)) /*MMC3_CMD*/\ - MUX_VAL(CP(ETK_D0_ES2), (IEN | PTU | EN | M4)) /*GPIO_14*/\ - MUX_VAL(CP(ETK_D1_ES2), (IEN | PTD | EN | M4)) /*GPIO_15 - X_GATE*/\ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0009-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch b/recipes/u-boot/u-boot-git/beagleboard/0009-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch new file mode 100644 index 0000000000..7da18afa76 --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0009-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch @@ -0,0 +1,57 @@ +From ca7179112840cdca717ac0c958a9ab226d1bdf25 Mon Sep 17 00:00:00 2001 +From: Koen Kooi +Date: Mon, 22 Nov 2010 11:51:32 +0100 +Subject: [PATCH 09/16] OMAP3: beagle: pass expansionboard name in bootargs + +--- + include/configs/omap3_beagle.h | 13 +++++++++++++ + 1 files changed, 13 insertions(+), 0 deletions(-) + +diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h +index 51e14d0..9d569a5 100644 +--- a/include/configs/omap3_beagle.h ++++ b/include/configs/omap3_beagle.h +@@ -191,6 +191,7 @@ + "usbtty=cdc_acm\0" \ + "console=ttyS2,115200n8\0" \ + "mpurate=auto\0" \ ++ "buddy=none "\ + "vram=12M\0" \ + "dvimode=1024x768MR-16@60\0" \ + "defaultdisplay=dvi\0" \ +@@ -201,6 +202,7 @@ + "nandrootfstype=jffs2\0" \ + "mmcargs=setenv bootargs console=${console} " \ + "mpurate=${mpurate} " \ ++ "buddy=${buddy} "\ + "vram=${vram} " \ + "omapfb.mode=dvi:${dvimode} " \ + "omapdss.def_disp=${defaultdisplay} " \ +@@ -208,6 +210,7 @@ + "rootfstype=${mmcrootfstype}\0" \ + "nandargs=setenv bootargs console=${console} " \ + "mpurate=${mpurate} " \ ++ "buddy=${buddy} "\ + "vram=${vram} " \ + "omapfb.mode=dvi:${dvimode} " \ + "omapdss.def_disp=${defaultdisplay} " \ +@@ -216,6 +219,16 @@ + "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ + "importbootenv=echo Importing environment from mmc ...; " \ + "env import -t $loadaddr $filesize\0" \ ++ "ramargs=setenv bootargs console=${console} " \ ++ "${optargs} " \ ++ "mpurate=${mpurate} " \ ++ "buddy=${buddy} "\ ++ "vram=${vram} " \ ++ "omapfb.mode=dvi:${dvimode} " \ ++ "omapdss.def_disp=${defaultdisplay} " \ ++ "root=${ramroot} " \ ++ "rootfstype=${ramrootfstype}\0" \ ++ "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ + "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ + "mmcboot=echo Booting from mmc ...; " \ + "run mmcargs; " \ +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0026-Enable-DSS-driver-for-Beagle.patch b/recipes/u-boot/u-boot-git/beagleboard/0010-Enable-DSS-driver-for-Beagle.patch similarity index 52% rename from recipes/u-boot/u-boot-git/beagleboard/0026-Enable-DSS-driver-for-Beagle.patch rename to recipes/u-boot/u-boot-git/beagleboard/0010-Enable-DSS-driver-for-Beagle.patch index de25493829..8766d89b0a 100644 --- a/recipes/u-boot/u-boot-git/beagleboard/0026-Enable-DSS-driver-for-Beagle.patch +++ b/recipes/u-boot/u-boot-git/beagleboard/0010-Enable-DSS-driver-for-Beagle.patch @@ -1,49 +1,23 @@ -From 89a879905e59c837626b6a9425bcc27b097e02ad Mon Sep 17 00:00:00 2001 +From 2226921518eebb215ddadce09efb35b99a9db8ac Mon Sep 17 00:00:00 2001 From: Syed Mohammed Khasim Date: Sun, 11 Apr 2010 17:44:39 +0200 -Subject: [PATCH 26/50] Enable DSS driver for Beagle +Subject: [PATCH 10/16] Enable DSS driver for Beagle Configures DSS to display color bar on Svideo Configures DSS to display background color on DVID Signed-off-by: Syed Mohammed Khasim --- - board/ti/beagle/beagle.c | 12 ++++++ - board/ti/beagle/beagle.h | 75 ++++++++++++++++++++++++++++++++++++++++ - include/configs/omap3_beagle.h | 1 + - 3 files changed, 88 insertions(+), 0 deletions(-) + board/ti/beagle/beagle.c | 1 + + board/ti/beagle/beagle.h | 60 ++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 61 insertions(+), 0 deletions(-) diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 7cb6d1f..eb57b5a 100644 +index 04e4259..7c80a97 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c -@@ -141,6 +141,16 @@ unsigned int get_expansion_id(void) - } - - /* -+ * Configure DSS to display background color on DVID -+ * Configure VENC to display color bar on S-Video -+ */ -+void display_init(void) -+{ -+ omap3_dss_venc_config(&venc_config_std_tv, VENC_HEIGHT, VENC_WIDTH); -+ omap3_dss_panel_config(&dvid_cfg); -+} -+ -+/* - * Routine: misc_init_r - * Description: Configure board specific parts - */ -@@ -188,6 +198,7 @@ int misc_init_r(void) - - twl4030_power_init(); - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); -+ display_init(); - - switch (beagle_revision) { - case REVISION_AXBX: -@@ -233,6 +244,7 @@ int misc_init_r(void) - GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout); +@@ -318,6 +318,7 @@ int misc_init_r(void) + GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe); dieid_num_r(); + omap3_dss_enable(); @@ -51,7 +25,7 @@ index 7cb6d1f..eb57b5a 100644 return 0; } diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h -index ec4f831..69f9398 100644 +index 48228dc..bdf2a6f 100644 --- a/board/ti/beagle/beagle.h +++ b/board/ti/beagle/beagle.h @@ -23,6 +23,8 @@ @@ -63,11 +37,10 @@ index ec4f831..69f9398 100644 const omap3_sysinfo sysinfo = { DDR_STACKED, "OMAP3 Beagle board", -@@ -433,4 +435,77 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\ - MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\ +@@ -471,6 +473,64 @@ const omap3_sysinfo sysinfo = { + MUX_VAL(CP(MMC2_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_139 WLAN_EN*/ -+/* + /* + * Display Configuration + */ + @@ -126,33 +99,9 @@ index ec4f831..69f9398 100644 +}; + +/* -+ * Configure Timings for DVI D -+ */ -+static const struct panel_config dvid_cfg = { -+ .timing_h = 0x0ff03f31, /* Horizantal timing */ -+ .timing_v = 0x01400504, /* Vertical timing */ -+ .pol_freq = 0x00007028, /* Pol Freq */ -+ .divisor = 0x00010006, /* 72Mhz Pixel Clock */ -+ .lcd_size = 0x02ff03ff, /* 1024x768 */ -+ .panel_type = 0x01, /* TFT */ -+ .data_lines = 0x03, /* 24 Bit RGB */ -+ .load_mode = 0x02, /* Frame Mode */ -+ .panel_color = DVI_BEAGLE_ORANGE_COL /* ORANGE */ -+}; -+ - #endif -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 8bedf7d..52d727a 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -137,6 +137,7 @@ - #define CONFIG_CMD_I2C /* I2C serial bus support */ - #define CONFIG_CMD_MMC /* MMC support */ - #define CONFIG_CMD_NAND /* NAND support */ -+#define CONFIG_VIDEO_OMAP3 /* DSS Support */ - - #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ - #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ + * Configure Timings for DVI D + */ + static const struct panel_config dvid_cfg = { -- 1.6.6.1 diff --git a/recipes/u-boot/u-boot-git/beagleboard/0010-OMAP3-Overo-set-CONFIG_SYS_I2C_SPEED-to-400Khz.patch b/recipes/u-boot/u-boot-git/beagleboard/0010-OMAP3-Overo-set-CONFIG_SYS_I2C_SPEED-to-400Khz.patch deleted file mode 100644 index b6a32bba85..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0010-OMAP3-Overo-set-CONFIG_SYS_I2C_SPEED-to-400Khz.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 6ced8e0d859ea9cddbc2ec4a94a4c7394f1ee4c5 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 16 Feb 2010 10:03:14 -0800 -Subject: [PATCH 10/50] OMAP3: Overo: set CONFIG_SYS_I2C_SPEED to 400Khz - ---- - include/configs/omap3_overo.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h -index 113c6df..27b5476 100644 ---- a/include/configs/omap3_overo.h -+++ b/include/configs/omap3_overo.h -@@ -112,7 +112,7 @@ - - #define CONFIG_SYS_NO_FLASH - #define CONFIG_HARD_I2C 1 --#define CONFIG_SYS_I2C_SPEED 100000 -+#define CONFIG_SYS_I2C_SPEED 400000 - #define CONFIG_SYS_I2C_SLAVE 1 - #define CONFIG_SYS_I2C_BUS 0 - #define CONFIG_SYS_I2C_BUS_SELECT 1 --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0011-Add-led-command.patch b/recipes/u-boot/u-boot-git/beagleboard/0011-Add-led-command.patch new file mode 100644 index 0000000000..e51ee5e2f4 --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0011-Add-led-command.patch @@ -0,0 +1,213 @@ +From e3e94bd49df4b4588cc5c95392b872eadb531fc4 Mon Sep 17 00:00:00 2001 +From: Jason Kridner +Date: Thu, 20 May 2010 05:41:26 -0500 +Subject: [PATCH 11/16] Add 'led' command + +This patch allows any board implementing the coloured LED API +to control the LEDs from the console. + +led [green | yellow | red | all ] [ on | off ] + +or + +led [ 1 | 2 | 3 | all ] [ on | off ] + +Adds configuration item CONFIG_CMD_LED enabling the command. + +Partially based on patch from Ulf Samuelsson: +http://www.mail-archive.com/u-boot@lists.denx.de/msg09593.html. + +Updated based on feedback: +http://www.mail-archive.com/u-boot@lists.denx.de/msg41847.html +https://groups.google.com/d/topic/beagleboard/8Wf1HiK_QBo/discussion +* Fixed a handful of style issues. +* Significantly reduced the number of #ifdefs and redundant code +* Converted redundant code into loops test against a structure +* Made use of cmd_usage() +* Introduced a str_onoff() function, but haven't yet put it in common +* Eliminated trailing newline + +v2 updates + * Test every LED in case "all" is used. Previously, the code broke from + the loop after setting the state of only one LED. + * Corrected swapped on/off in structure definition + * Removed trailing white space +--- + common/Makefile | 1 + + common/cmd_led.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 153 insertions(+), 0 deletions(-) + create mode 100644 common/cmd_led.c + +diff --git a/common/Makefile b/common/Makefile +index 048df0c..29a0ead 100644 +--- a/common/Makefile ++++ b/common/Makefile +@@ -105,6 +105,7 @@ COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o + COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o + COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o + COBJS-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o ++COBJS-$(CONFIG_CMD_LED) += cmd_led.o + COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o + COBJS-y += cmd_load.o + COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o +diff --git a/common/cmd_led.c b/common/cmd_led.c +new file mode 100644 +index 0000000..7f02fe6 +--- /dev/null ++++ b/common/cmd_led.c +@@ -0,0 +1,152 @@ ++/* ++ * (C) Copyright 2010 ++ * Jason Kridner ++ * ++ * Based on cmd_led.c patch from: ++ * http://www.mail-archive.com/u-boot@lists.denx.de/msg06873.html ++ * (C) Copyright 2008 ++ * Ulf Samuelsson ++ * ++ * See file CREDITS for list of people who contributed to this ++ * project. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of ++ * the License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, ++ * MA 02111-1307 USA ++ */ ++ ++#include ++#include ++#include ++#include ++ ++struct led_tbl_s { ++ char *string; /* String for use in the command */ ++ led_id_t mask; /* Mask used for calling __led_set() */ ++ void (*off)(void); /* Optional fucntion for turning LED off */ ++ void (*on)(void); /* Optional fucntion for turning LED on */ ++}; ++ ++typedef struct led_tbl_s led_tbl_t; ++ ++static const led_tbl_t led_commands[] = { ++#ifdef CONFIG_BOARD_SPECIFIC_LED ++#ifdef STATUS_LED_BIT ++ { "0", STATUS_LED_BIT, NULL, NULL }, ++#endif ++#ifdef STATUS_LED_BIT1 ++ { "1", STATUS_LED_BIT1, NULL, NULL }, ++#endif ++#ifdef STATUS_LED_BIT2 ++ { "2", STATUS_LED_BIT2, NULL, NULL }, ++#endif ++#ifdef STATUS_LED_BIT3 ++ { "3", STATUS_LED_BIT3, NULL, NULL }, ++#endif ++#endif ++#ifdef STATUS_LED_GREEN ++ { "green", STATUS_LED_GREEN, green_LED_off, green_LED_on }, ++#endif ++#ifdef STATUS_LED_YELLOW ++ { "yellow", STATUS_LED_YELLOW, yellow_LED_off, yellow_LED_on }, ++#endif ++#ifdef STATUS_LED_RED ++ { "red", STATUS_LED_RED, red_LED_off, red_LED_on }, ++#endif ++#ifdef STATUS_LED_BLUE ++ { "blue", STATUS_LED_BLUE, blue_LED_off, blue_LED_on }, ++#endif ++ { NULL, 0, NULL, NULL } ++}; ++ ++int str_onoff (char *var) ++{ ++ if (strcmp(var, "off") == 0) { ++ return 0; ++ } ++ if (strcmp(var, "on") == 0) { ++ return 1; ++ } ++ return -1; ++} ++ ++int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) ++{ ++ int state, i; ++ ++ /* Validate arguments */ ++ if ((argc != 3)) { ++ return cmd_usage(cmdtp); ++ } ++ ++ state = str_onoff(argv[2]); ++ if (state < 0) { ++ return cmd_usage(cmdtp); ++ } ++ ++ for (i = 0; led_commands[i].string; i++) { ++ if ((strcmp("all", argv[1]) == 0) || ++ (strcmp(led_commands[i].string, argv[1]) == 0)) { ++ if (led_commands[i].on) { ++ if (state) { ++ led_commands[i].on(); ++ } else { ++ led_commands[i].off(); ++ } ++ } else { ++ __led_set(led_commands[i].mask, state); ++ } ++ } ++ } ++ ++ /* If we ran out of matches, print Usage */ ++ if (!led_commands[i].string && !(strcmp("all", argv[1]) == 0)) { ++ return cmd_usage(cmdtp); ++ } ++ ++ return 0; ++} ++ ++U_BOOT_CMD( ++ led, 3, 1, do_led, ++ "led\t- [" ++#ifdef CONFIG_BOARD_SPECIFIC_LED ++#ifdef STATUS_LED_BIT ++ "0|" ++#endif ++#ifdef STATUS_LED_BIT1 ++ "1|" ++#endif ++#ifdef STATUS_LED_BIT2 ++ "2|" ++#endif ++#ifdef STATUS_LED_BIT3 ++ "3|" ++#endif ++#endif ++#ifdef STATUS_LED_GREEN ++ "green|" ++#endif ++#ifdef STATUS_LED_YELLOW ++ "yellow|" ++#endif ++#ifdef STATUS_LED_RED ++ "red|" ++#endif ++#ifdef STATUS_LED_BLUE ++ "blue|" ++#endif ++ "all] [on|off]\n", ++ "led [led_name] [on|off] sets or clears led(s)\n" ++); +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch b/recipes/u-boot/u-boot-git/beagleboard/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch deleted file mode 100644 index 63a7295423..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch +++ /dev/null @@ -1,52 +0,0 @@ -From f054db5f2a8eedbeaf8c6045d0bbafde5aca3efc Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 16 Feb 2010 10:04:30 -0800 -Subject: [PATCH 11/50] OMAP3: trim excessively long delays in i2c driver - ---- - drivers/i2c/omap24xx_i2c.c | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/drivers/i2c/omap24xx_i2c.c b/drivers/i2c/omap24xx_i2c.c -index e8c8184..0af230d 100644 ---- a/drivers/i2c/omap24xx_i2c.c -+++ b/drivers/i2c/omap24xx_i2c.c -@@ -148,7 +148,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value) - if (status & I2C_STAT_XRDY) { - /* Important: have to use byte access */ - writeb (regoffset, &i2c_base->data); -- udelay (20000); -+ udelay (2000); - if (readw (&i2c_base->stat) & I2C_STAT_NACK) { - i2c_error = 1; - } -@@ -160,7 +160,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value) - /* free bus, otherwise we can't use a combined transction */ - writew (0, &i2c_base->con); - while (readw (&i2c_base->stat) || (readw (&i2c_base->con) & I2C_CON_MST)) { -- udelay (10000); -+ udelay (1000); - /* Have to clear pending interrupt to clear I2C_STAT */ - writew (0xFFFF, &i2c_base->stat); - } -@@ -181,7 +181,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value) - #else - *value = readw (&i2c_base->data); - #endif -- udelay (20000); -+ udelay (2000); - } else { - i2c_error = 1; - } -@@ -190,7 +190,7 @@ static int i2c_read_byte (u8 devaddr, u8 regoffset, u8 * value) - writew (I2C_CON_EN, &i2c_base->con); - while (readw (&i2c_base->stat) - || (readw (&i2c_base->con) & I2C_CON_MST)) { -- udelay (10000); -+ udelay (1000); - writew (0xFFFF, &i2c_base->stat); - } - } --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0042-BeagleBoard-Added-LED-driver.patch b/recipes/u-boot/u-boot-git/beagleboard/0012-BeagleBoard-Added-LED-driver.patch similarity index 83% rename from recipes/u-boot/u-boot-git/beagleboard/0042-BeagleBoard-Added-LED-driver.patch rename to recipes/u-boot/u-boot-git/beagleboard/0012-BeagleBoard-Added-LED-driver.patch index c1a0a563ed..01897aff26 100644 --- a/recipes/u-boot/u-boot-git/beagleboard/0042-BeagleBoard-Added-LED-driver.patch +++ b/recipes/u-boot/u-boot-git/beagleboard/0012-BeagleBoard-Added-LED-driver.patch @@ -1,28 +1,29 @@ -From bb88a9c0ffa5b6006d689635028177be4ce83104 Mon Sep 17 00:00:00 2001 +From 35271d72072841c16687ffd51f08ec65cdac3b3e Mon Sep 17 00:00:00 2001 From: Jason Kridner Date: Thu, 20 May 2010 06:14:01 -0500 -Subject: [PATCH 42/50] BeagleBoard: Added LED driver +Subject: [PATCH 12/16] BeagleBoard: Added LED driver Added LED driver using status_led. USR0 is set to monitor the boot status. USR1 is set to be the green LED. -(cherry picked from commit 048b526fd7cc0c642f27c674b3e235321c880b66) -(cherry picked from commit 21c574d9e20f86ab757f5efdd9146e6607f2faba) -Signed-off-by: Jason Kridner +Included adding configuration and command to the default configuration. + +v2 updates + * Fixed USR0/USR1 to be LED 0/1 respectively --- board/ti/beagle/Makefile | 4 ++- - board/ti/beagle/beagle.c | 8 ++++ + board/ti/beagle/beagle.c | 7 ++++ board/ti/beagle/led.c | 91 ++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 102 insertions(+), 1 deletions(-) + 3 files changed, 101 insertions(+), 1 deletions(-) create mode 100644 board/ti/beagle/led.c diff --git a/board/ti/beagle/Makefile b/board/ti/beagle/Makefile -index f797112..4cc675c 100644 +index 3b4aaac..d9f445f 100644 --- a/board/ti/beagle/Makefile +++ b/board/ti/beagle/Makefile @@ -25,8 +25,10 @@ include $(TOPDIR)/config.mk - LIB = $(obj)lib$(BOARD).a + LIB = $(obj)lib$(BOARD).o -COBJS := beagle.o +COBJS-y := $(BOARD).o @@ -33,7 +34,7 @@ index f797112..4cc675c 100644 OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index cdba3dd..a6a4961 100644 +index 7c80a97..905b151 100644 --- a/board/ti/beagle/beagle.c +++ b/board/ti/beagle/beagle.c @@ -30,6 +30,9 @@ @@ -45,8 +46,8 @@ index cdba3dd..a6a4961 100644 +#endif #include #include - #include -@@ -83,6 +86,10 @@ int board_init(void) + #include +@@ -80,6 +83,10 @@ int board_init(void) /* boot param addr */ gd->bd->bi_boot_params = (OMAP34XX_SDRC_CS0 + 0x100); @@ -57,14 +58,9 @@ index cdba3dd..a6a4961 100644 return 0; } -@@ -282,3 +289,4 @@ void set_muxconf_regs(void) - { - MUX_BEAGLE(); - } -+ diff --git a/board/ti/beagle/led.c b/board/ti/beagle/led.c new file mode 100644 -index 0000000..df26552 +index 0000000..fe80e19 --- /dev/null +++ b/board/ti/beagle/led.c @@ -0,0 +1,91 @@ @@ -97,8 +93,8 @@ index 0000000..df26552 +static unsigned int saved_state[2] = {STATUS_LED_OFF, STATUS_LED_OFF}; + +/* GPIO pins for the LEDs */ -+#define BEAGLE_LED_USR0 149 -+#define BEAGLE_LED_USR1 150 ++#define BEAGLE_LED_USR0 150 ++#define BEAGLE_LED_USR1 149 + +#ifdef STATUS_LED_GREEN +void green_LED_off (void) diff --git a/recipes/u-boot/u-boot-git/beagleboard/0012-OMAP3-Overo-allow-expansion-boards-with-any-vendor-I.patch b/recipes/u-boot/u-boot-git/beagleboard/0012-OMAP3-Overo-allow-expansion-boards-with-any-vendor-I.patch deleted file mode 100644 index cd25031c9e..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0012-OMAP3-Overo-allow-expansion-boards-with-any-vendor-I.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 2c02d9b024b58bbea920d3d6c40d62b30e448f60 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Fri, 26 Feb 2010 12:40:26 -0800 -Subject: [PATCH 12/50] OMAP3: Overo: allow expansion boards with any vendor ID - ---- - board/overo/overo.c | 10 +++------- - 1 files changed, 3 insertions(+), 7 deletions(-) - -diff --git a/board/overo/overo.c b/board/overo/overo.c -index f6093d2..ec186ec 100644 ---- a/board/overo/overo.c -+++ b/board/overo/overo.c -@@ -63,8 +63,7 @@ static struct { - #define GUMSTIX_CHESTNUT43 0x06000200 - #define GUMSTIX_PINTO 0x07000200 - --#define GUMSTIX_NO_EEPROM 0xfffffffe --#define GUMSTIX_UNKNOWN 0xffffffff -+#define GUMSTIX_NO_EEPROM 0xffffffff - - #if defined(CONFIG_CMD_NET) - static void setup_net_chip(void); -@@ -174,10 +173,7 @@ unsigned int get_expansion_id(void) - i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config, - sizeof(expansion_config)); - -- if ( (expansion_config.device_vendor & 0xffff) != GUMSTIX_VENDORID ) -- return GUMSTIX_UNKNOWN; -- else -- return expansion_config.device_vendor; -+ return expansion_config.device_vendor; - } - - -@@ -245,7 +241,7 @@ int misc_init_r(void) - case GUMSTIX_NO_EEPROM: - printf("No EEPROM on expansion board\n"); - break; -- case GUMSTIX_UNKNOWN: -+ default: - printf("Unrecognized expansion board\n"); - } - --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0013-OMAP3-BeagleBoard-updated-default-configuration.patch b/recipes/u-boot/u-boot-git/beagleboard/0013-OMAP3-BeagleBoard-updated-default-configuration.patch new file mode 100644 index 0000000000..9c9a3fd4b7 --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0013-OMAP3-BeagleBoard-updated-default-configuration.patch @@ -0,0 +1,184 @@ +From da8fa305fd10331958cd18c9c27c9e062b886fc4 Mon Sep 17 00:00:00 2001 +From: Jason Kridner +Date: Wed, 21 Jul 2010 07:41:25 -0500 +Subject: [PATCH 13/16] OMAP3: BeagleBoard: updated default configuration + +* Decrease bootdelay to 3, use VGA for default resolution +* Add CONFIG_SYS_MEMTEST_SCRATCH to point to a scratch memory area. +* Add camera to default bootargs +* Move ramdisk parameters. This will make it easier to reprogram the ramdisk size. +* Improved boot env var setting + * Enabled evaluation of expressions with 'setexpr' + * Made room for a 64MB ramdisk by moving from 0x81600000 to 0x81000000 + * Removed expression from 'ramroot' that wouldn't be evaluated + * Doubled console I/O buffer size from 256 to 512 + * Doubled maximum command arguments size from 16 to 32 +* Enable multibus support for I2C +* Added USER button switch from uEnv.txt to user.txt +* Enable LEDs + Added LED driver using status_led. USR0 is set to monitor + the boot status. USR1 is set to be the GREEN LED. +--- + include/configs/omap3_beagle.h | 62 ++++++++++++++++++++++++++++++++------- + 1 files changed, 51 insertions(+), 11 deletions(-) + +diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h +index 9d569a5..73d4d4e 100644 +--- a/include/configs/omap3_beagle.h ++++ b/include/configs/omap3_beagle.h +@@ -108,9 +108,27 @@ + #define CONFIG_OMAP_HSMMC 1 + #define CONFIG_DOS_PARTITION 1 + ++/* Status LED */ ++#define CONFIG_STATUS_LED 1 ++#define CONFIG_BOARD_SPECIFIC_LED 1 ++#define STATUS_LED_BIT 0x01 ++#define STATUS_LED_STATE STATUS_LED_ON ++#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) ++#define STATUS_LED_BIT1 0x02 ++#define STATUS_LED_STATE1 STATUS_LED_ON ++#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2) ++#define STATUS_LED_BOOT STATUS_LED_BIT ++#define STATUS_LED_GREEN STATUS_LED_BIT1 ++ + /* DDR - I use Micron DDR */ + #define CONFIG_OMAP3_MICRON_DDR 1 + ++/* Enable Multi Bus support for I2C */ ++#define CONFIG_I2C_MULTI_BUS 1 ++ ++/* Probe all devices */ ++#define CONFIG_SYS_I2C_NOPROBES {0x0, 0x0} ++ + /* USB */ + #define CONFIG_MUSB_UDC 1 + #define CONFIG_USB_OMAP3 1 +@@ -138,6 +156,9 @@ + #define CONFIG_CMD_I2C /* I2C serial bus support */ + #define CONFIG_CMD_MMC /* MMC support */ + #define CONFIG_CMD_NAND /* NAND support */ ++#define CONFIG_CMD_LED /* LED support */ ++#define CONFIG_VIDEO_OMAP3 /* DSS Support */ ++#define CONFIG_CMD_SETEXPR /* Evaluate expressions */ + + #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ + #undef CONFIG_CMD_FPGA /* FPGA configuration Support */ +@@ -184,45 +205,56 @@ + /* partition */ + + /* Environment information */ +-#define CONFIG_BOOTDELAY 10 ++#define CONFIG_BOOTDELAY 3 + + #define CONFIG_EXTRA_ENV_SETTINGS \ +- "loadaddr=0x82000000\0" \ ++ "loadaddr=0x80200000\0" \ ++ "rdaddr=0x81000000\0" \ + "usbtty=cdc_acm\0" \ + "console=ttyS2,115200n8\0" \ + "mpurate=auto\0" \ + "buddy=none "\ ++ "optargs=\0" \ ++ "camera=lbcm3m1\0" \ + "vram=12M\0" \ +- "dvimode=1024x768MR-16@60\0" \ ++ "dvimode=640x480MR-16@60\0" \ + "defaultdisplay=dvi\0" \ + "mmcdev=0\0" \ + "mmcroot=/dev/mmcblk0p2 rw\0" \ + "mmcrootfstype=ext3 rootwait\0" \ + "nandroot=/dev/mtdblock4 rw\0" \ + "nandrootfstype=jffs2\0" \ ++ "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=0x81000000,64M\0" \ ++ "ramrootfstype=ext2\0" \ + "mmcargs=setenv bootargs console=${console} " \ ++ "${optargs} " \ + "mpurate=${mpurate} " \ + "buddy=${buddy} "\ ++ "camera=${camera} "\ + "vram=${vram} " \ + "omapfb.mode=dvi:${dvimode} " \ + "omapdss.def_disp=${defaultdisplay} " \ + "root=${mmcroot} " \ + "rootfstype=${mmcrootfstype}\0" \ + "nandargs=setenv bootargs console=${console} " \ ++ "${optargs} " \ + "mpurate=${mpurate} " \ + "buddy=${buddy} "\ ++ "camera=${camera} "\ + "vram=${vram} " \ + "omapfb.mode=dvi:${dvimode} " \ + "omapdss.def_disp=${defaultdisplay} " \ + "root=${nandroot} " \ + "rootfstype=${nandrootfstype}\0" \ +- "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} uEnv.txt\0" \ ++ "bootenv=uEnv.txt\0" \ ++ "loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv}\0" \ + "importbootenv=echo Importing environment from mmc ...; " \ + "env import -t $loadaddr $filesize\0" \ + "ramargs=setenv bootargs console=${console} " \ + "${optargs} " \ + "mpurate=${mpurate} " \ + "buddy=${buddy} "\ ++ "camera=${camera} "\ + "vram=${vram} " \ + "omapfb.mode=dvi:${dvimode} " \ + "omapdss.def_disp=${defaultdisplay} " \ +@@ -237,11 +269,18 @@ + "run nandargs; " \ + "nand read ${loadaddr} 280000 400000; " \ + "bootm ${loadaddr}\0" \ ++ "ramboot=echo Booting from ramdisk ...; " \ ++ "run ramargs; " \ ++ "bootm ${loadaddr}\0" \ + + #define CONFIG_BOOTCOMMAND \ + "if mmc rescan ${mmcdev}; then " \ ++ "if userbutton; then " \ ++ "setenv bootenv user.txt;" \ ++ "fi;" \ + "echo SD/MMC found on device ${mmcdev};" \ + "if run loadbootenv; then " \ ++ "echo Loaded environment from ${bootenv};" \ + "run importbootenv;" \ + "fi;" \ + "if test -n $uenvcmd; then " \ +@@ -252,7 +291,7 @@ + "run mmcboot;" \ + "fi;" \ + "fi;" \ +- "run nandboot;" \ ++ "run nandboot;" + + #define CONFIG_AUTO_COMPLETE 1 + /* +@@ -262,18 +301,19 @@ + #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */ + #define CONFIG_SYS_PROMPT_HUSH_PS2 "> " + #define CONFIG_SYS_PROMPT "OMAP3 beagleboard.org # " +-#define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */ ++#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */ + /* Print Buffer Size */ + #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ + sizeof(CONFIG_SYS_PROMPT) + 16) +-#define CONFIG_SYS_MAXARGS 16 /* max number of command args */ ++#define CONFIG_SYS_MAXARGS 32 /* max number of command args */ + /* Boot Argument Buffer Size */ + #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE) + +-#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest */ +- /* works on */ +-#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ +- 0x01F00000) /* 31MB */ ++#define CONFIG_SYS_ALT_MEMTEST 1 ++#define CONFIG_SYS_MEMTEST_START (0x82000000) /* memtest */ ++ /* defaults */ ++#define CONFIG_SYS_MEMTEST_END (0x87FFFFFF) /* 128MB */ ++#define CONFIG_SYS_MEMTEST_SCRATCH (0x81000000) /* dummy address */ + + #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */ + /* load address */ +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0013-OMAP3-Overo-change-address-of-expansion-eeprom-to-0x.patch b/recipes/u-boot/u-boot-git/beagleboard/0013-OMAP3-Overo-change-address-of-expansion-eeprom-to-0x.patch deleted file mode 100644 index cfff25879b..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0013-OMAP3-Overo-change-address-of-expansion-eeprom-to-0x.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 90119d705d2c56254d4b27efb8e8c61e62f014c1 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Fri, 26 Feb 2010 12:42:30 -0800 -Subject: [PATCH 13/50] OMAP3: Overo: change address of expansion eeprom to 0x51 so as to not conflict with EDID address - ---- - board/overo/overo.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/board/overo/overo.c b/board/overo/overo.c -index ec186ec..f96e7ff 100644 ---- a/board/overo/overo.c -+++ b/board/overo/overo.c -@@ -51,7 +51,7 @@ static struct { - #define TWL4030_I2C_BUS 0 - - #define EXPANSION_EEPROM_I2C_BUS 2 --#define EXPANSION_EEPROM_I2C_ADDRESS 0x50 -+#define EXPANSION_EEPROM_I2C_ADDRESS 0x51 - - #define GUMSTIX_VENDORID 0x0200 - --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0014-Corrected-LED-name-match-finding-avoiding-extraneous.patch b/recipes/u-boot/u-boot-git/beagleboard/0014-Corrected-LED-name-match-finding-avoiding-extraneous.patch new file mode 100644 index 0000000000..e01092afe1 --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0014-Corrected-LED-name-match-finding-avoiding-extraneous.patch @@ -0,0 +1,42 @@ +From abc09e8f0b8e02dbfec8bb3c2e024ef9f1bdf4f0 Mon Sep 17 00:00:00 2001 +From: Jason Kridner +Date: Tue, 8 Mar 2011 20:42:01 -0600 +Subject: [PATCH 14/16] Corrected LED name match finding avoiding extraneous Usage printouts + +--- + common/cmd_led.c | 5 +++-- + 1 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/common/cmd_led.c b/common/cmd_led.c +index 7f02fe6..ca2227f 100644 +--- a/common/cmd_led.c ++++ b/common/cmd_led.c +@@ -83,7 +83,7 @@ int str_onoff (char *var) + + int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) + { +- int state, i; ++ int state, i, match = 0; + + /* Validate arguments */ + if ((argc != 3)) { +@@ -98,6 +98,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) + for (i = 0; led_commands[i].string; i++) { + if ((strcmp("all", argv[1]) == 0) || + (strcmp(led_commands[i].string, argv[1]) == 0)) { ++ match = 1; + if (led_commands[i].on) { + if (state) { + led_commands[i].on(); +@@ -111,7 +112,7 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) + } + + /* If we ran out of matches, print Usage */ +- if (!led_commands[i].string && !(strcmp("all", argv[1]) == 0)) { ++ if (!match) { + return cmd_usage(cmdtp); + } + +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0014-OMAP3-board.c-don-t-attempt-to-set-up-second-RAM-ban.patch b/recipes/u-boot/u-boot-git/beagleboard/0014-OMAP3-board.c-don-t-attempt-to-set-up-second-RAM-ban.patch deleted file mode 100644 index a092ca25ec..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0014-OMAP3-board.c-don-t-attempt-to-set-up-second-RAM-ban.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 7f50d09f9a00b7f2a392a5b0b9f2f19a96a90c16 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 23 Mar 2010 09:04:50 -0700 -Subject: [PATCH 14/50] OMAP3: board.c: don't attempt to set up second RAM bank, assume x-load has already done this - ---- - cpu/arm_cortexa8/omap3/board.c | 19 +++++++++---------- - 1 files changed, 9 insertions(+), 10 deletions(-) - -diff --git a/cpu/arm_cortexa8/omap3/board.c b/cpu/arm_cortexa8/omap3/board.c -index 7b78fa4..0126152 100644 ---- a/cpu/arm_cortexa8/omap3/board.c -+++ b/cpu/arm_cortexa8/omap3/board.c -@@ -232,6 +232,7 @@ void s_init(void) - - per_clocks_enable(); - -+ /* FIXME: u-boot's sdrc setup is broken */ - if (!in_sdram) - sdrc_init(); - } -@@ -281,16 +282,14 @@ int dram_init(void) - { - DECLARE_GLOBAL_DATA_PTR; - unsigned int size0 = 0, size1 = 0; -- -- /* -- * If a second bank of DDR is attached to CS1 this is -- * where it can be started. Early init code will init -- * memory on CS0. -- */ -- if ((sysinfo.mtype == DDR_COMBO) || (sysinfo.mtype == DDR_STACKED)) { -- do_sdrc_init(CS1, NOT_EARLY); -- make_cs1_contiguous(); -- } -+ struct sdrc *sdrc_base = (struct sdrc *)OMAP34XX_SDRC_BASE; -+ struct sdrc_actim *sdrc_actim_base = (struct sdrc_actim *)SDRC_ACTIM_CTRL1_BASE; -+ -+ /* x-load sets up the second bank but */ -+ /* doesn't test to see if it is there */ -+ /* do so now, disable if not present */ -+ if (!mem_ok(CS1)) -+ writel(0, &sdrc_base->cs[1].mcfg); - - size0 = get_sdr_cs_size(CS0); - size1 = get_sdr_cs_size(CS1); --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0015-OMAP3-mem.c-enhance-the-RAM-test.patch b/recipes/u-boot/u-boot-git/beagleboard/0015-OMAP3-mem.c-enhance-the-RAM-test.patch deleted file mode 100644 index 92e2331cb4..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0015-OMAP3-mem.c-enhance-the-RAM-test.patch +++ /dev/null @@ -1,52 +0,0 @@ -From 379ff04432ffdef234c2f85b1801cf7df2d3d5ee Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 23 Mar 2010 09:06:49 -0700 -Subject: [PATCH 15/50] OMAP3: mem.c: enhance the RAM test - ---- - cpu/arm_cortexa8/omap3/mem.c | 28 +++++++++++++++------------- - 1 files changed, 15 insertions(+), 13 deletions(-) - -diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c -index dfb7e4c..b828097 100644 ---- a/cpu/arm_cortexa8/omap3/mem.c -+++ b/cpu/arm_cortexa8/omap3/mem.c -@@ -106,21 +106,23 @@ void make_cs1_contiguous(void) - *******************************************************/ - u32 mem_ok(u32 cs) - { -- u32 val1, val2, addr; -+ u32 i, val1, val2, addr, size; - u32 pattern = 0x12345678; - -- addr = OMAP34XX_SDRC_CS0 + get_sdr_cs_offset(cs); -- -- writel(0x0, addr + 0x400); /* clear pos A */ -- writel(pattern, addr); /* pattern to pos B */ -- writel(0x0, addr + 4); /* remove pattern off the bus */ -- val1 = readl(addr + 0x400); /* get pos A value */ -- val2 = readl(addr); /* get val2 */ -+ size = get_sdr_cs_offset(cs); -+ addr = OMAP34XX_SDRC_CS0 + size; -+ -+ for (i = 0; i < size; i+=1024) { -+ writel(pattern - i, addr + i); -+ } - -- if ((val1 != 0) || (val2 != pattern)) /* see if pos A val changed */ -- return 0; -- else -- return 1; -+ for (i = 0; i < size; i+=1024) { -+ val1 = readl(addr + i); -+ if (val1 != (pattern - i)) { -+ return 0; -+ } -+ } -+ return 1; - } - - /******************************************************** --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0015-omap3_beagle-Switch-default-console-from-ttyS2-to-tt.patch b/recipes/u-boot/u-boot-git/beagleboard/0015-omap3_beagle-Switch-default-console-from-ttyS2-to-tt.patch new file mode 100644 index 0000000000..2db0810b08 --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0015-omap3_beagle-Switch-default-console-from-ttyS2-to-tt.patch @@ -0,0 +1,29 @@ +From 1a88890580917571811950eabd877cccdb643cb1 Mon Sep 17 00:00:00 2001 +From: Alexander Holler +Date: Thu, 17 Feb 2011 22:37:57 +0000 +Subject: [PATCH 15/16] omap3_beagle: Switch default console from ttyS2 to ttyO2 + +Linux kernels >= 2.6.36 are using ttyOn instead ttySn for the +serials on OMAPs. + +Signed-off-by: Alexander Holler +--- + include/configs/omap3_beagle.h | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h +index 73d4d4e..de572e8 100644 +--- a/include/configs/omap3_beagle.h ++++ b/include/configs/omap3_beagle.h +@@ -211,7 +211,7 @@ + "loadaddr=0x80200000\0" \ + "rdaddr=0x81000000\0" \ + "usbtty=cdc_acm\0" \ +- "console=ttyS2,115200n8\0" \ ++ "console=ttyO2,115200n8\0" \ + "mpurate=auto\0" \ + "buddy=none "\ + "optargs=\0" \ +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0016-BeagleBoard-Load-kernel-via-MMC-ext2-not-fat.patch b/recipes/u-boot/u-boot-git/beagleboard/0016-BeagleBoard-Load-kernel-via-MMC-ext2-not-fat.patch new file mode 100644 index 0000000000..bdcdeb40b8 --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0016-BeagleBoard-Load-kernel-via-MMC-ext2-not-fat.patch @@ -0,0 +1,26 @@ +From 03757f19b4affb531d1606e468e0411acd8d57cb Mon Sep 17 00:00:00 2001 +From: Jason Kridner +Date: Wed, 9 Mar 2011 18:48:19 -0600 +Subject: [PATCH 16/16] BeagleBoard: Load kernel via MMC ext2, not fat + +--- + include/configs/omap3_beagle.h | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h +index de572e8..3a102e5 100644 +--- a/include/configs/omap3_beagle.h ++++ b/include/configs/omap3_beagle.h +@@ -261,7 +261,8 @@ + "root=${ramroot} " \ + "rootfstype=${ramrootfstype}\0" \ + "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ +- "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ ++ "loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ ++ "loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage\0" \ + "mmcboot=echo Booting from mmc ...; " \ + "run mmcargs; " \ + "bootm ${loadaddr}\0" \ +-- +1.6.6.1 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch b/recipes/u-boot/u-boot-git/beagleboard/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch deleted file mode 100644 index d0209ae0d0..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a9b4ba0446bd55d98243de2f3e3a747f8842811f Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 23 Mar 2010 09:12:16 -0700 -Subject: [PATCH 16/50] env_nand.c: fail gracefully if no nand is present - ---- - common/env_nand.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/common/env_nand.c b/common/env_nand.c -index a15a950..325f112 100644 ---- a/common/env_nand.c -+++ b/common/env_nand.c -@@ -268,6 +268,10 @@ int readenv (size_t offset, u_char * buf) - - u_char *char_ptr; - -+ /* fail if no nand detected */ -+ if (nand_info[0].type == 0) -+ return 1; -+ - blocksize = nand_info[0].erasesize; - len = min(blocksize, CONFIG_ENV_SIZE); - --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0017-BeagleBoard-add-xM-rev-C-to-ID-table.patch b/recipes/u-boot/u-boot-git/beagleboard/0017-BeagleBoard-add-xM-rev-C-to-ID-table.patch new file mode 100644 index 0000000000..1125c88193 --- /dev/null +++ b/recipes/u-boot/u-boot-git/beagleboard/0017-BeagleBoard-add-xM-rev-C-to-ID-table.patch @@ -0,0 +1,68 @@ +From fd6e8e5ca04fea310ff4f03faa7747d061217cba Mon Sep 17 00:00:00 2001 +From: Jason Kridner +Date: Wed, 30 Mar 2011 10:44:17 -0500 +Subject: [PATCH] BeagleBoard: add xM rev C to ID table +Cc: Sandeep Paulraj + +A simple addition to the revision IDs. + +This patch depends upon http://patchwork.ozlabs.org/patch/85303/. + +Signed-off-by: Jason Kridner +--- + board/ti/beagle/beagle.c | 12 ++++++++++++ + board/ti/beagle/beagle.h | 1 + + 2 files changed, 13 insertions(+), 0 deletions(-) + +diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c +index 905b151..0596443 100644 +--- a/board/ti/beagle/beagle.c ++++ b/board/ti/beagle/beagle.c +@@ -168,6 +168,7 @@ void display_init(void) + break; + case REVISION_XM_A: + case REVISION_XM_B: ++ case REVISION_XM_C: + default: + omap3_dss_panel_config(&dvid_cfg_xm); + break; +@@ -227,6 +228,16 @@ int misc_init_r(void) + TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, + TWL4030_PM_RECEIVER_DEV_GRP_P1); + break; ++ case REVISION_XM_C: ++ printf("Beagle xM Rev C\n"); ++ setenv("beaglerev", "xMC"); ++ MUX_BEAGLE_XM(); ++ /* Set VAUX2 to 1.8V for EHCI PHY */ ++ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, ++ TWL4030_PM_RECEIVER_VAUX2_VSEL_18, ++ TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, ++ TWL4030_PM_RECEIVER_DEV_GRP_P1); ++ break; + default: + printf("Beagle unknown 0x%02x\n", get_board_revision()); + MUX_BEAGLE_XM(); +@@ -372,6 +383,7 @@ int do_userbutton (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) + break; + case REVISION_XM_A: + case REVISION_XM_B: ++ case REVISION_XM_C: + default: + gpio = 4; + break; +diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h +index bdf2a6f..f31ce31 100644 +--- a/board/ti/beagle/beagle.h ++++ b/board/ti/beagle/beagle.h +@@ -41,6 +41,7 @@ const omap3_sysinfo sysinfo = { + #define REVISION_C4 0x5 + #define REVISION_XM_A 0x0 + #define REVISION_XM_B 0x1 ++#define REVISION_XM_C 0x2 + + /* + * IEN - Input Enable +-- +1.5.6.4 + diff --git a/recipes/u-boot/u-boot-git/beagleboard/0017-OMAP3-add-definitions-to-support-sysinfo-cpu-and-cpu.patch b/recipes/u-boot/u-boot-git/beagleboard/0017-OMAP3-add-definitions-to-support-sysinfo-cpu-and-cpu.patch deleted file mode 100644 index 917eca3faf..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0017-OMAP3-add-definitions-to-support-sysinfo-cpu-and-cpu.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 4c1682016b61262456acb9386ef69d0da4243db9 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 23 Mar 2010 09:15:29 -0700 -Subject: [PATCH 17/50] OMAP3: add definitions to support sysinfo cpu and cpu family detection - ---- - include/asm-arm/arch-omap3/cpu.h | 6 ------ - include/asm-arm/arch-omap3/omap3.h | 29 +++++++++++++++++++++++++++++ - 2 files changed, 29 insertions(+), 6 deletions(-) - -diff --git a/include/asm-arm/arch-omap3/cpu.h b/include/asm-arm/arch-omap3/cpu.h -index f769571..d9eec7e 100644 ---- a/include/asm-arm/arch-omap3/cpu.h -+++ b/include/asm-arm/arch-omap3/cpu.h -@@ -60,12 +60,6 @@ struct ctrl { - #endif /* __ASSEMBLY__ */ - #endif /* __KERNEL_STRICT_NAMES */ - --/* cpu type */ --#define OMAP3503 0x5c00 --#define OMAP3515 0x1c00 --#define OMAP3525 0x4c00 --#define OMAP3530 0x0c00 -- - #ifndef __KERNEL_STRICT_NAMES - #ifndef __ASSEMBLY__ - struct ctrl_id { -diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h -index 1349b8b..3957c79 100644 ---- a/include/asm-arm/arch-omap3/omap3.h -+++ b/include/asm-arm/arch-omap3/omap3.h -@@ -184,4 +184,33 @@ struct gpio { - #define WIDTH_8BIT 0x0000 - #define WIDTH_16BIT 0x1000 /* bit pos for 16 bit in gpmc */ - -+/* -+ * Hawkeye values -+ */ -+#define HAWKEYE_OMAP34XX 0xb7ae -+#define HAWKEYE_AM35XX 0xb868 -+#define HAWKEYE_OMAP36XX 0xb891 -+ -+#define HAWKEYE_SHIFT 12 -+ -+/* -+ * Define CPU families -+ */ -+#define CPU_OMAP34XX 0x3400 /* OMAP34xx/OMAP35 devices */ -+#define CPU_AM35XX 0x3500 /* AM35xx devices */ -+#define CPU_OMAP36XX 0x3600 /* OMAP36xx devices */ -+ -+/* -+ * Control status register values corresponding to cpu variants -+ */ -+#define OMAP3503 0x5c00 -+#define OMAP3515 0x1c00 -+#define OMAP3525 0x4c00 -+#define OMAP3530 0x0c00 -+ -+#define AM3505 0x5c00 -+#define AM3517 0x1c00 -+ -+#define OMAP3730 0x0c00 -+ - #endif --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0018-OMAP3-sys_info-update-cpu-detection-for-36XX-37XX.patch b/recipes/u-boot/u-boot-git/beagleboard/0018-OMAP3-sys_info-update-cpu-detection-for-36XX-37XX.patch deleted file mode 100644 index a3bfb8fd25..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0018-OMAP3-sys_info-update-cpu-detection-for-36XX-37XX.patch +++ /dev/null @@ -1,196 +0,0 @@ -From f8a42576fac8349ae8ff9d6673b229f6b3103798 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 23 Mar 2010 09:17:59 -0700 -Subject: [PATCH 18/50] OMAP3 sys_info: update cpu detection for 36XX/37XX - ---- - cpu/arm_cortexa8/omap3/sys_info.c | 137 ++++++++++++++++++++++++++++--------- - 1 files changed, 105 insertions(+), 32 deletions(-) - -diff --git a/cpu/arm_cortexa8/omap3/sys_info.c b/cpu/arm_cortexa8/omap3/sys_info.c -index e227f67..e32a846 100644 ---- a/cpu/arm_cortexa8/omap3/sys_info.c -+++ b/cpu/arm_cortexa8/omap3/sys_info.c -@@ -79,32 +79,72 @@ u32 get_cpu_type(void) - } - - /****************************************** -- * get_cpu_rev(void) - extract version info -+ * get_cpu_id(void) - extract cpu id -+ * returns 0 for ES1.0, cpuid otherwise - ******************************************/ --u32 get_cpu_rev(void) -+u32 get_cpu_id(void) - { -- u32 cpuid = 0; - struct ctrl_id *id_base; -+ u32 cpuid = 0; - - /* - * On ES1.0 the IDCODE register is not exposed on L4 - * so using CPU ID to differentiate between ES1.0 and > ES1.0. - */ - __asm__ __volatile__("mrc p15, 0, %0, c0, c0, 0":"=r"(cpuid)); -- if ((cpuid & 0xf) == 0x0) -- return CPU_3XX_ES10; -- else { -+ if ((cpuid & 0xf) == 0x0) { -+ return 0; -+ } else { - /* Decode the IDs on > ES1.0 */ - id_base = (struct ctrl_id *) OMAP34XX_ID_L4_IO_BASE; - -- cpuid = (readl(&id_base->idcode) >> CPU_3XX_ID_SHIFT) & 0xf; -+ cpuid = readl(&id_base->idcode); -+ } - -- /* Some early ES2.0 seem to report ID 0, fix this */ -- if(cpuid == 0) -- cpuid = CPU_3XX_ES20; -+ return cpuid; -+} - -- return cpuid; -+/****************************************** -+ * get_cpu_family(void) - extract cpu info -+ ******************************************/ -+u32 get_cpu_family(void) -+{ -+ u16 hawkeye; -+ u32 cpu_family; -+ u32 cpuid = get_cpu_id(); -+ -+ if (cpuid == 0) -+ return CPU_OMAP34XX; -+ -+ hawkeye = (cpuid >> HAWKEYE_SHIFT) & 0xffff; -+ switch(hawkeye) { -+ case HAWKEYE_OMAP34XX: -+ cpu_family = CPU_OMAP34XX; -+ break; -+ case HAWKEYE_AM35XX: -+ cpu_family = CPU_AM35XX; -+ break; -+ case HAWKEYE_OMAP36XX: -+ cpu_family = CPU_OMAP36XX; -+ break; -+ default: -+ cpu_family = CPU_OMAP34XX; - } -+ -+ return cpu_family; -+} -+ -+/****************************************** -+ * get_cpu_rev(void) - extract version info -+ ******************************************/ -+u32 get_cpu_rev(void) -+{ -+ u32 cpuid = get_cpu_id(); -+ -+ if (cpuid == 0) -+ return CPU_3XX_ES10; -+ else -+ return (cpuid >> CPU_3XX_ID_SHIFT) & 0xf; - } - - /***************************************************************** -@@ -267,24 +307,57 @@ u32 get_device_type(void) - */ - int print_cpuinfo (void) - { -- char *cpu_s, *sec_s; -- -- switch (get_cpu_type()) { -- case OMAP3503: -- cpu_s = "3503"; -- break; -- case OMAP3515: -- cpu_s = "3515"; -+ char *cpu_family_s, *cpu_s, *sec_s; -+ -+ switch(get_cpu_family()) { -+ case CPU_OMAP34XX: -+ cpu_family_s = "OMAP"; -+ switch (get_cpu_type()) { -+ case OMAP3503: -+ cpu_s = "3503"; -+ break; -+ case OMAP3515: -+ cpu_s = "3515"; -+ break; -+ case OMAP3525: -+ cpu_s = "3525"; -+ break; -+ case OMAP3530: -+ cpu_s = "3530"; -+ break; -+ default: -+ cpu_s = "35XX"; -+ break; -+ } - break; -- case OMAP3525: -- cpu_s = "3525"; -+ case CPU_AM35XX: -+ cpu_family_s = "AM"; -+ switch (get_cpu_type()) { -+ case AM3505: -+ cpu_s = "3505"; -+ break; -+ case AM3517: -+ cpu_s = "3517"; -+ break; -+ default: -+ cpu_s = "35XX"; -+ break; -+ } - break; -- case OMAP3530: -- cpu_s = "3530"; -+ case CPU_OMAP36XX: -+ cpu_family_s = "OMAP"; -+ switch (get_cpu_type()) { -+ case OMAP3730: -+ cpu_s = "3630/3730"; -+ break; -+ default: -+ cpu_s = "36XX/37XX"; -+ break; -+ } - break; - default: -+ cpu_family_s = "OMAP"; - cpu_s = "35XX"; -- break; - } - - switch (get_device_type()) { -@@ -304,16 +377,16 @@ int print_cpuinfo (void) - sec_s = "?"; - } - -- printf("OMAP%s-%s ES%s, CPU-OPP2, L3-165MHz, ", -- cpu_s, sec_s, rev_s[get_cpu_rev()]); -+ printf("%s%s-%s ES%s, CPU-OPP2, L3-165MHz, ", -+ cpu_family_s, cpu_s, sec_s, rev_s[get_cpu_rev()]); - -- printf("Max clock-"); -- if ((get_cpu_rev() >= CPU_3XX_ES31) && (get_sku_id() == SKUID_CLK_720MHZ)) -- printf("720Mhz\n"); -- else printf("600Mhz\n"); -+ if (get_cpu_family() == CPU_OMAP34XX) -+ if ((get_cpu_rev() >= CPU_3XX_ES31) && -+ (get_sku_id() == SKUID_CLK_720MHZ)) -+ printf("Max clock-720Mhz\n"); -+ else printf("Max clock-600Mhz\n"); -+ else printf("\n"); - -- -- - return 0; - } - #endif /* CONFIG_DISPLAY_CPUINFO */ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0019-OMAP3-clocks-update-clock-setup-for-36XX-37XX.patch b/recipes/u-boot/u-boot-git/beagleboard/0019-OMAP3-clocks-update-clock-setup-for-36XX-37XX.patch deleted file mode 100644 index 03d0674b54..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0019-OMAP3-clocks-update-clock-setup-for-36XX-37XX.patch +++ /dev/null @@ -1,826 +0,0 @@ -From 276236da04d67dfad61ccab5d4700613ae8527f9 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 23 Mar 2010 09:20:56 -0700 -Subject: [PATCH 19/50] OMAP3: clocks: update clock setup for 36XX/37XX - ---- - cpu/arm_cortexa8/omap3/clock.c | 559 +++++++++++++++++++++-------- - cpu/arm_cortexa8/omap3/lowlevel_init.S | 69 ++++ - include/asm-arm/arch-omap3/clocks.h | 17 + - include/asm-arm/arch-omap3/clocks_omap3.h | 27 ++ - 4 files changed, 525 insertions(+), 147 deletions(-) - -diff --git a/cpu/arm_cortexa8/omap3/clock.c b/cpu/arm_cortexa8/omap3/clock.c -index 6330c9e..538a183 100644 ---- a/cpu/arm_cortexa8/omap3/clock.c -+++ b/cpu/arm_cortexa8/omap3/clock.c -@@ -47,17 +47,12 @@ u32 get_osc_clk_speed(void) - struct s32ktimer *s32k_base = (struct s32ktimer *)SYNC_32KTIMER_BASE; - - val = readl(&prm_base->clksrc_ctrl); -- - if (val & SYSCLKDIV_2) - cdiv = 2; -- else if (val & SYSCLKDIV_1) -- cdiv = 1; - else -- /* -- * Should never reach here! (Assume divider as 1) -- */ - cdiv = 1; - -+ - /* enable timer2 */ - val = readl(&prcm_base->clksel_wkup) | CLKSEL_GPT1; - -@@ -67,7 +62,6 @@ u32 get_osc_clk_speed(void) - /* Enable I and F Clocks for GPT1 */ - val = readl(&prcm_base->iclken_wkup) | EN_GPT1 | EN_32KSYNC; - writel(val, &prcm_base->iclken_wkup); -- - val = readl(&prcm_base->fclken_wkup) | EN_GPT1; - writel(val, &prcm_base->fclken_wkup); - -@@ -87,13 +81,10 @@ u32 get_osc_clk_speed(void) - - /* wait for 40 cycles */ - while (readl(&s32k_base->s32k_cr) < (start + 20)) ; -+ - cend = readl(&gpt1_base->tcrr); /* get end sys_clk count */ - cdiff = cend - cstart; /* get elapsed ticks */ -- -- if (cdiv == 2) -- { -- cdiff *= 2; -- } -+ cdiff *= cdiv; - - /* based on number of ticks assign speed */ - if (cdiff > 19000) -@@ -135,65 +126,25 @@ void get_sys_clkin_sel(u32 osc_clk, u32 *sys_clkin_sel) - } - } - -+/* -+ * OMAP3530 specific functions -+ */ -+ - /****************************************************************************** -- * prcm_init() - inits clocks for PRCM as defined in clocks.h -- * called from SRAM, or Flash (using temp SRAM stack). -+ * Initialize CORE DPLL for OMAP34x/35x - *****************************************************************************/ --void prcm_init(void) -+static void dpll3_init_34xx(u32 sil_index, u32 clk_index) - { -+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; -+ dpll_param *ptr = (dpll_param *) get_core_dpll_param(); - void (*f_lock_pll) (u32, u32, u32, u32); - int xip_safe, p0, p1, p2, p3; -- u32 osc_clk = 0, sys_clkin_sel; -- u32 clk_index, sil_index = 0; -- struct prm *prm_base = (struct prm *)PRM_BASE; -- struct prcm *prcm_base = (struct prcm *)PRCM_BASE; -- dpll_param *dpll_param_p; -- -- f_lock_pll = (void *) ((u32) &_end_vect - (u32) &_start + -- SRAM_VECT_CODE); - - xip_safe = is_running_in_sram(); - -- /* -- * Gauge the input clock speed and find out the sys_clkin_sel -- * value corresponding to the input clock. -- */ -- osc_clk = get_osc_clk_speed(); -- get_sys_clkin_sel(osc_clk, &sys_clkin_sel); -+ /* Moving to the right sysclk and ES rev base */ -+ ptr = ptr + (3 * clk_index) + sil_index; - -- /* set input crystal speed */ -- sr32(&prm_base->clksel, 0, 3, sys_clkin_sel); -- -- /* If the input clock is greater than 19.2M always divide/2 */ -- if (sys_clkin_sel > 2) { -- /* input clock divider */ -- sr32(&prm_base->clksrc_ctrl, 6, 2, 2); -- clk_index = sys_clkin_sel / 2; -- } else { -- /* input clock divider */ -- sr32(&prm_base->clksrc_ctrl, 6, 2, 1); -- clk_index = sys_clkin_sel; -- } -- -- /* -- * The DPLL tables are defined according to sysclk value and -- * silicon revision. The clk_index value will be used to get -- * the values for that input sysclk from the DPLL param table -- * and sil_index will get the values for that SysClk for the -- * appropriate silicon rev. -- */ -- if (get_cpu_rev()) -- sil_index = 1; -- -- /* Unlock MPU DPLL (slows things down, and needed later) */ -- sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOW_POWER_BYPASS); -- wait_on_value(ST_MPU_CLK, 0, &prcm_base->idlest_pll_mpu, LDELAY); -- -- /* Getting the base address of Core DPLL param table */ -- dpll_param_p = (dpll_param *) get_core_dpll_param(); -- -- /* Moving it to the right sysclk and ES rev base */ -- dpll_param_p = dpll_param_p + 3 * clk_index + sil_index; - if (xip_safe) { - /* - * CORE DPLL -@@ -208,34 +159,38 @@ void prcm_init(void) - * work. write another value and then default value. - */ - -- /* m3x2 */ -- sr32(&prcm_base->clksel1_emu, 16, 5, CORE_M3X2 + 1); -- /* m3x2 */ -+ /* CM_CLKSEL1_EMU[DIV_DPLL3] */ -+ sr32(&prcm_base->clksel1_emu, 16, 5, (CORE_M3X2 + 1)) ; - sr32(&prcm_base->clksel1_emu, 16, 5, CORE_M3X2); -- /* Set M2 */ -- sr32(&prcm_base->clksel1_pll, 27, 2, dpll_param_p->m2); -- /* Set M */ -- sr32(&prcm_base->clksel1_pll, 16, 11, dpll_param_p->m); -- /* Set N */ -- sr32(&prcm_base->clksel1_pll, 8, 7, dpll_param_p->n); -- /* 96M Src */ -+ -+ /* M2 (CORE_DPLL_CLKOUT_DIV): CM_CLKSEL1_PLL[27:31] */ -+ sr32(&prcm_base->clksel1_pll, 27, 5, ptr->m2); -+ -+ /* M (CORE_DPLL_MULT): CM_CLKSEL1_PLL[16:26] */ -+ sr32(&prcm_base->clksel1_pll, 16, 11, ptr->m); -+ -+ /* N (CORE_DPLL_DIV): CM_CLKSEL1_PLL[8:14] */ -+ sr32(&prcm_base->clksel1_pll, 8, 7, ptr->n); -+ -+ /* Source is the CM_96M_FCLK: CM_CLKSEL1_PLL[6] */ - sr32(&prcm_base->clksel1_pll, 6, 1, 0); -- /* ssi */ -+ -+ /* SSI */ - sr32(&prcm_base->clksel_core, 8, 4, CORE_SSI_DIV); -- /* fsusb */ -+ /* FSUSB */ - sr32(&prcm_base->clksel_core, 4, 2, CORE_FUSB_DIV); -- /* l4 */ -+ /* L4 */ - sr32(&prcm_base->clksel_core, 2, 2, CORE_L4_DIV); -- /* l3 */ -+ /* L3 */ - sr32(&prcm_base->clksel_core, 0, 2, CORE_L3_DIV); -- /* gfx */ -- sr32(&prcm_base->clksel_gfx, 0, 3, GFX_DIV); -- /* reset mgr */ -+ /* GFX */ -+ sr32(&prcm_base->clksel_gfx, 0, 3, GFX_DIV); -+ /* RESET MGR */ - sr32(&prcm_base->clksel_wkup, 1, 2, WKUP_RSM); -- /* FREQSEL */ -- sr32(&prcm_base->clken_pll, 4, 4, dpll_param_p->fsel); -- /* lock mode */ -- sr32(&prcm_base->clken_pll, 0, 3, PLL_LOCK); -+ /* FREQSEL (CORE_DPLL_FREQSEL): CM_CLKEN_PLL[4:7] */ -+ sr32(&prcm_base->clken_pll, 4, 4, ptr->fsel); -+ /* LOCK MODE */ -+ sr32(&prcm_base->clken_pll, 0, 3, PLL_LOCK); - - wait_on_value(ST_CORE_CLK, 1, &prcm_base->idlest_ckgen, - LDELAY); -@@ -244,102 +199,411 @@ void prcm_init(void) - * if running from flash, jump to small relocated code - * area in SRAM. - */ -+ f_lock_pll = (void *) ((u32) &_end_vect - (u32) &_start + -+ SRAM_VECT_CODE); -+ - p0 = readl(&prcm_base->clken_pll); - sr32(&p0, 0, 3, PLL_FAST_RELOCK_BYPASS); -- sr32(&p0, 4, 4, dpll_param_p->fsel); /* FREQSEL */ -+ /* FREQSEL (CORE_DPLL_FREQSEL): CM_CLKEN_PLL[4:7] */ -+ sr32(&p0, 4, 4, ptr->fsel); - - p1 = readl(&prcm_base->clksel1_pll); -- sr32(&p1, 27, 2, dpll_param_p->m2); /* Set M2 */ -- sr32(&p1, 16, 11, dpll_param_p->m); /* Set M */ -- sr32(&p1, 8, 7, dpll_param_p->n); /* Set N */ -- sr32(&p1, 6, 1, 0); /* set source for 96M */ -+ /* M2 (CORE_DPLL_CLKOUT_DIV): CM_CLKSEL1_PLL[27:31] */ -+ sr32(&p1, 27, 5, ptr->m2); -+ /* M (CORE_DPLL_MULT): CM_CLKSEL1_PLL[16:26] */ -+ sr32(&p1, 16, 11, ptr->m); -+ /* N (CORE_DPLL_DIV): CM_CLKSEL1_PLL[8:14] */ -+ sr32(&p1, 8, 7, ptr->n); -+ /* Source is the CM_96M_FCLK: CM_CLKSEL1_PLL[6] */ -+ sr32(&p1, 6, 1, 0); - - p2 = readl(&prcm_base->clksel_core); -- sr32(&p2, 8, 4, CORE_SSI_DIV); /* ssi */ -- sr32(&p2, 4, 2, CORE_FUSB_DIV); /* fsusb */ -- sr32(&p2, 2, 2, CORE_L4_DIV); /* l4 */ -- sr32(&p2, 0, 2, CORE_L3_DIV); /* l3 */ -+ /* SSI */ -+ sr32(&p2, 8, 4, CORE_SSI_DIV); -+ /* FSUSB */ -+ sr32(&p2, 4, 2, CORE_FUSB_DIV); -+ /* L4 */ -+ sr32(&p2, 2, 2, CORE_L4_DIV); -+ /* L3 */ -+ sr32(&p2, 0, 2, CORE_L3_DIV); - - p3 = (u32)&prcm_base->idlest_ckgen; - - (*f_lock_pll) (p0, p1, p2, p3); - } -+} - -- /* PER DPLL */ -- sr32(&prcm_base->clken_pll, 16, 3, PLL_STOP); -- wait_on_value(ST_PERIPH_CLK, 0, &prcm_base->idlest_ckgen, LDELAY); -- -- /* Getting the base address to PER DPLL param table */ -- -- /* Set N */ -- dpll_param_p = (dpll_param *) get_per_dpll_param(); -+/****************************************************************************** -+ * Initialize PER DPLL for OMAP34x/35x -+ *****************************************************************************/ -+static void dpll4_init_34xx(u32 sil_index, u32 clk_index) -+{ -+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; -+ dpll_param *ptr = (dpll_param *) get_per_dpll_param(); - - /* Moving it to the right sysclk base */ -- dpll_param_p = dpll_param_p + clk_index; -+ ptr = ptr + clk_index; -+ -+ /* EN_PERIPH_DPLL: CM_CLKEN_PLL[16:18] */ -+ sr32(&prcm_base->clken_pll, 16, 3, PLL_STOP); -+ wait_on_value(ST_PERIPH_CLK, 0, &prcm_base->idlest_ckgen, LDELAY); - - /* - * Errata 1.50 Workaround for OMAP3 ES1.0 only - * If using default divisors, write default divisor + 1 - * and then the actual divisor value - */ -- sr32(&prcm_base->clksel1_emu, 24, 5, PER_M6X2 + 1); /* set M6 */ -- sr32(&prcm_base->clksel1_emu, 24, 5, PER_M6X2); /* set M6 */ -- sr32(&prcm_base->clksel_cam, 0, 5, PER_M5X2 + 1); /* set M5 */ -- sr32(&prcm_base->clksel_cam, 0, 5, PER_M5X2); /* set M5 */ -- sr32(&prcm_base->clksel_dss, 0, 5, PER_M4X2 + 1); /* set M4 */ -- sr32(&prcm_base->clksel_dss, 0, 5, PER_M4X2); /* set M4 */ -- sr32(&prcm_base->clksel_dss, 8, 5, PER_M3X2 + 1); /* set M3 */ -- sr32(&prcm_base->clksel_dss, 8, 5, PER_M3X2); /* set M3 */ -- sr32(&prcm_base->clksel3_pll, 0, 5, dpll_param_p->m2 + 1); /* set M2 */ -- sr32(&prcm_base->clksel3_pll, 0, 5, dpll_param_p->m2); /* set M2 */ -+ /* M6 */ -+ sr32(&prcm_base->clksel1_emu, 24, 5, (PER_M6X2 + 1)); -+ sr32(&prcm_base->clksel1_emu, 24, 5, PER_M6X2); -+ /* M5 */ -+ sr32(&prcm_base->clksel_cam, 0, 5, (PER_M5X2 + 1)); -+ sr32(&prcm_base->clksel_cam, 0, 5, PER_M5X2); -+ /* M4 */ -+ sr32(&prcm_base->clksel_dss, 0, 5, (PER_M4X2 + 1)); -+ sr32(&prcm_base->clksel_dss, 0, 5, PER_M4X2); -+ /* M3 */ -+ sr32(&prcm_base->clksel_dss, 8, 5, (PER_M3X2 + 1)); -+ sr32(&prcm_base->clksel_dss, 8, 5, PER_M3X2); -+ /* M2 (DIV_96M): CM_CLKSEL3_PLL[0:4] */ -+ sr32(&prcm_base->clksel3_pll, 0, 5, (ptr->m2 + 1)); -+ sr32(&prcm_base->clksel3_pll, 0, 5, ptr->m2); - /* Workaround end */ - -- sr32(&prcm_base->clksel2_pll, 8, 11, dpll_param_p->m); /* set m */ -- sr32(&prcm_base->clksel2_pll, 0, 7, dpll_param_p->n); /* set n */ -- sr32(&prcm_base->clken_pll, 20, 4, dpll_param_p->fsel); /* FREQSEL */ -- sr32(&prcm_base->clken_pll, 16, 3, PLL_LOCK); /* lock mode */ -+ /* M (PERIPH_DPLL_MULT): CM_CLKSEL2_PLL[8:18] */ -+ sr32(&prcm_base->clksel2_pll, 8, 11, ptr->m); -+ -+ /* N (PERIPH_DPLL_DIV): CM_CLKSEL2_PLL[0:6] */ -+ sr32(&prcm_base->clksel2_pll, 0, 7, ptr->n); -+ -+ /* FREQSEL (PERIPH_DPLL_FREQSEL): CM_CLKEN_PLL[20:23] */ -+ sr32(&prcm_base->clken_pll, 20, 4, ptr->fsel); -+ -+ /* LOCK MODE (EN_PERIPH_DPLL): CM_CLKEN_PLL[16:18] */ -+ sr32(&prcm_base->clken_pll, 16, 3, PLL_LOCK); - wait_on_value(ST_PERIPH_CLK, 2, &prcm_base->idlest_ckgen, LDELAY); -+} - -- /* Getting the base address to MPU DPLL param table */ -- dpll_param_p = (dpll_param *) get_mpu_dpll_param(); -+static void mpu_init_34xx(u32 sil_index, u32 clk_index) -+{ -+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; -+ dpll_param *ptr = (dpll_param *) get_mpu_dpll_param(); - -- /* Moving it to the right sysclk and ES rev base */ -- dpll_param_p = dpll_param_p + 3 * clk_index + sil_index; -+ /* Moving to the right sysclk and ES rev base */ -+ ptr = ptr + (3 * clk_index) + sil_index; - - /* MPU DPLL (unlocked already) */ - -- /* Set M2 */ -- sr32(&prcm_base->clksel2_pll_mpu, 0, 5, dpll_param_p->m2); -- /* Set M */ -- sr32(&prcm_base->clksel1_pll_mpu, 8, 11, dpll_param_p->m); -- /* Set N */ -- sr32(&prcm_base->clksel1_pll_mpu, 0, 7, dpll_param_p->n); -- /* FREQSEL */ -- sr32(&prcm_base->clken_pll_mpu, 4, 4, dpll_param_p->fsel); -- /* lock mode */ -- sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOCK); -- wait_on_value(ST_MPU_CLK, 1, &prcm_base->idlest_pll_mpu, LDELAY); -- -- /* Getting the base address to IVA DPLL param table */ -- dpll_param_p = (dpll_param *) get_iva_dpll_param(); -- -- /* Moving it to the right sysclk and ES rev base */ -- dpll_param_p = dpll_param_p + 3 * clk_index + sil_index; -- -- /* IVA DPLL (set to 12*20=240MHz) */ -+ /* M2 (MPU_DPLL_CLKOUT_DIV) : CM_CLKSEL2_PLL_MPU[0:4] */ -+ sr32(&prcm_base->clksel2_pll_mpu, 0, 5, ptr->m2); -+ -+ /* M (MPU_DPLL_MULT) : CM_CLKSEL2_PLL_MPU[8:18] */ -+ sr32(&prcm_base->clksel1_pll_mpu, 8, 11, ptr->m); -+ -+ /* N (MPU_DPLL_DIV) : CM_CLKSEL2_PLL_MPU[0:6] */ -+ sr32(&prcm_base->clksel1_pll_mpu, 0, 7, ptr->n); -+ -+ /* FREQSEL (MPU_DPLL_FREQSEL) : CM_CLKEN_PLL_MPU[4:7] */ -+ sr32(&prcm_base->clken_pll_mpu, 4, 4, ptr->fsel); -+} -+ -+static void iva_init_34xx(u32 sil_index, u32 clk_index) -+{ -+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; -+ dpll_param *ptr = (dpll_param *) get_iva_dpll_param(); -+ -+ /* Moving to the right sysclk and ES rev base */ -+ ptr = ptr + (3 * clk_index) + sil_index; -+ -+ /* IVA DPLL */ -+ /* EN_IVA2_DPLL : CM_CLKEN_PLL_IVA2[0:2] */ - sr32(&prcm_base->clken_pll_iva2, 0, 3, PLL_STOP); - wait_on_value(ST_IVA2_CLK, 0, &prcm_base->idlest_pll_iva2, LDELAY); -- /* set M2 */ -- sr32(&prcm_base->clksel2_pll_iva2, 0, 5, dpll_param_p->m2); -- /* set M */ -- sr32(&prcm_base->clksel1_pll_iva2, 8, 11, dpll_param_p->m); -- /* set N */ -- sr32(&prcm_base->clksel1_pll_iva2, 0, 7, dpll_param_p->n); -- /* FREQSEL */ -- sr32(&prcm_base->clken_pll_iva2, 4, 4, dpll_param_p->fsel); -- /* lock mode */ -+ -+ /* M2 (IVA2_DPLL_CLKOUT_DIV) : CM_CLKSEL2_PLL_IVA2[0:4] */ -+ sr32(&prcm_base->clksel2_pll_iva2, 0, 5, ptr->m2); -+ -+ /* M (IVA2_DPLL_MULT) : CM_CLKSEL1_PLL_IVA2[8:18] */ -+ sr32(&prcm_base->clksel1_pll_iva2, 8, 11, ptr->m); -+ -+ /* N (IVA2_DPLL_DIV) : CM_CLKSEL1_PLL_IVA2[0:6] */ -+ sr32(&prcm_base->clksel1_pll_iva2, 0, 7, ptr->n); -+ -+ /* FREQSEL (IVA2_DPLL_FREQSEL) : CM_CLKEN_PLL_IVA2[4:7] */ -+ sr32(&prcm_base->clken_pll_iva2, 4, 4, ptr->fsel); -+ -+ /* LOCK MODE (EN_IVA2_DPLL) : CM_CLKEN_PLL_IVA2[0:2] */ - sr32(&prcm_base->clken_pll_iva2, 0, 3, PLL_LOCK); -+ - wait_on_value(ST_IVA2_CLK, 1, &prcm_base->idlest_pll_iva2, LDELAY); -+} -+ -+/* -+ * OMAP3630 specific functions -+ */ -+ -+/****************************************************************************** -+ * Initialize PER DPLL for OMAP36x/37x -+ *****************************************************************************/ -+static void dpll3_init_36xx(u32 sil_index, u32 clk_index) -+{ -+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; -+ dpll_param *ptr = (dpll_param *) get_36x_core_dpll_param(); -+ void (*f_lock_pll) (u32, u32, u32, u32); -+ int xip_safe, p0, p1, p2, p3; -+ -+ xip_safe = is_running_in_sram(); -+ -+ /* Moving it to the right sysclk base */ -+ ptr += clk_index; -+ -+ if (xip_safe) { -+ /* CORE DPLL */ -+ -+ /* Select relock bypass: CM_CLKEN_PLL[0:2] */ -+ sr32(&prcm_base->clken_pll, 0, 3, PLL_FAST_RELOCK_BYPASS); -+ wait_on_value(ST_CORE_CLK, 0, &prcm_base->idlest_ckgen, -+ LDELAY); -+ -+ /* CM_CLKSEL1_EMU[DIV_DPLL3] */ -+ sr32(&prcm_base->clksel1_emu, 16, 5, CORE_M3X2); -+ -+ /* M2 (CORE_DPLL_CLKOUT_DIV): CM_CLKSEL1_PLL[27:31] */ -+ sr32(&prcm_base->clksel1_pll, 27, 5, ptr->m2); -+ -+ /* M (CORE_DPLL_MULT): CM_CLKSEL1_PLL[16:26] */ -+ sr32(&prcm_base->clksel1_pll, 16, 11, ptr->m); -+ -+ /* N (CORE_DPLL_DIV): CM_CLKSEL1_PLL[8:14] */ -+ sr32(&prcm_base->clksel1_pll, 8, 7, ptr->n); -+ -+ /* Source is the CM_96M_FCLK: CM_CLKSEL1_PLL[6] */ -+ sr32(&prcm_base->clksel1_pll, 6, 1, 0); -+ -+ /* SSI */ -+ sr32(&prcm_base->clksel_core, 8, 4, CORE_SSI_DIV); -+ /* FSUSB */ -+ sr32(&prcm_base->clksel_core, 4, 2, CORE_FUSB_DIV); -+ /* L4 */ -+ sr32(&prcm_base->clksel_core, 2, 2, CORE_L4_DIV); -+ /* L3 */ -+ sr32(&prcm_base->clksel_core, 0, 2, CORE_L3_DIV); -+ /* GFX */ -+ sr32(&prcm_base->clksel_gfx, 0, 3, GFX_DIV); -+ /* RESET MGR */ -+ sr32(&prcm_base->clksel_wkup, 1, 2, WKUP_RSM); -+ /* FREQSEL (CORE_DPLL_FREQSEL): CM_CLKEN_PLL[4:7] */ -+ sr32(&prcm_base->clken_pll, 4, 4, ptr->fsel); -+ /* LOCK MODE */ -+ sr32(&prcm_base->clken_pll, 0, 3, PLL_LOCK); -+ -+ wait_on_value(ST_CORE_CLK, 1, &prcm_base->idlest_ckgen, -+ LDELAY); -+ } else if (is_running_in_flash()) { -+ /* -+ * if running from flash, jump to small relocated code -+ * area in SRAM. -+ */ -+ f_lock_pll = (void *) ((u32) &_end_vect - (u32) &_start + -+ SRAM_VECT_CODE); -+ -+ p0 = readl(&prcm_base->clken_pll); -+ sr32(&p0, 0, 3, PLL_FAST_RELOCK_BYPASS); -+ /* FREQSEL (CORE_DPLL_FREQSEL): CM_CLKEN_PLL[4:7] */ -+ sr32(&p0, 4, 4, ptr->fsel); -+ -+ p1 = readl(&prcm_base->clksel1_pll); -+ /* M2 (CORE_DPLL_CLKOUT_DIV): CM_CLKSEL1_PLL[27:31] */ -+ sr32(&p1, 27, 5, ptr->m2); -+ /* M (CORE_DPLL_MULT): CM_CLKSEL1_PLL[16:26] */ -+ sr32(&p1, 16, 11, ptr->m); -+ /* N (CORE_DPLL_DIV): CM_CLKSEL1_PLL[8:14] */ -+ sr32(&p1, 8, 7, ptr->n); -+ /* Source is the CM_96M_FCLK: CM_CLKSEL1_PLL[6] */ -+ sr32(&p1, 6, 1, 0); -+ -+ p2 = readl(&prcm_base->clksel_core); -+ /* SSI */ -+ sr32(&p2, 8, 4, CORE_SSI_DIV); -+ /* FSUSB */ -+ sr32(&p2, 4, 2, CORE_FUSB_DIV); -+ /* L4 */ -+ sr32(&p2, 2, 2, CORE_L4_DIV); -+ /* L3 */ -+ sr32(&p2, 0, 2, CORE_L3_DIV); -+ -+ p3 = (u32)&prcm_base->idlest_ckgen; -+ -+ (*f_lock_pll) (p0, p1, p2, p3); -+ } -+} -+ -+static void dpll4_init_36xx(u32 sil_index, u32 clk_index) -+{ -+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; -+ struct dpll_per_36x_param *ptr; -+ -+ ptr = (struct dpll_per_36x_param *)get_36x_per_dpll_param(); -+ -+ /* Moving it to the right sysclk base */ -+ ptr += clk_index; -+ -+ /* EN_PERIPH_DPLL: CM_CLKEN_PLL[16:18] */ -+ sr32(&prcm_base->clken_pll, 16, 3, PLL_STOP); -+ wait_on_value(ST_PERIPH_CLK, 0, &prcm_base->idlest_ckgen, LDELAY); -+ -+ /* M6 (DIV_DPLL4): CM_CLKSEL1_EMU[24:29] */ -+ sr32(&prcm_base->clksel1_emu, 24, 6, ptr->m6); -+ -+ /* M5 (CLKSEL_CAM): CM_CLKSEL1_EMU[0:5] */ -+ sr32(&prcm_base->clksel_cam, 0, 6, ptr->m5); -+ -+ /* M4 (CLKSEL_DSS1): CM_CLKSEL_DSS[0:5] */ -+ sr32(&prcm_base->clksel_dss, 0, 6, ptr->m4); -+ -+ /* M3 (CLKSEL_DSS1): CM_CLKSEL_DSS[8:13] */ -+ sr32(&prcm_base->clksel_dss, 8, 6, ptr->m3); -+ -+ /* M2 (DIV_96M): CM_CLKSEL3_PLL[0:4] */ -+ sr32(&prcm_base->clksel3_pll, 0, 5, ptr->m2); -+ -+ /* M (PERIPH_DPLL_MULT): CM_CLKSEL2_PLL[8:19] */ -+ sr32(&prcm_base->clksel2_pll, 8, 12, ptr->m); -+ -+ /* N (PERIPH_DPLL_DIV): CM_CLKSEL2_PLL[0:6] */ -+ sr32(&prcm_base->clksel2_pll, 0, 7, ptr->n); -+ -+ /* M2DIV (CLKSEL_96M): CM_CLKSEL_CORE[12:13] */ -+ sr32(&prcm_base->clksel_core, 12, 2, ptr->m2div); -+ -+ /* LOCK MODE (EN_PERIPH_DPLL): CM_CLKEN_PLL[16:18] */ -+ sr32(&prcm_base->clken_pll, 16, 3, PLL_LOCK); -+ wait_on_value(ST_PERIPH_CLK, 2, &prcm_base->idlest_ckgen, LDELAY); -+} -+ -+static void mpu_init_36xx(u32 sil_index, u32 clk_index) -+{ -+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; -+ dpll_param *ptr = (dpll_param *) get_36x_mpu_dpll_param(); -+ -+ /* Moving to the right sysclk */ -+ ptr += clk_index; -+ -+ /* MPU DPLL (unlocked already */ -+ -+ /* M2 (MPU_DPLL_CLKOUT_DIV) : CM_CLKSEL2_PLL_MPU[0:4] */ -+ sr32(&prcm_base->clksel2_pll_mpu, 0, 5, ptr->m2); -+ -+ /* M (MPU_DPLL_MULT) : CM_CLKSEL2_PLL_MPU[8:18] */ -+ sr32(&prcm_base->clksel1_pll_mpu, 8, 11, ptr->m); -+ -+ /* N (MPU_DPLL_DIV) : CM_CLKSEL2_PLL_MPU[0:6] */ -+ sr32(&prcm_base->clksel1_pll_mpu, 0, 7, ptr->n); -+} -+ -+static void iva_init_36xx(u32 sil_index, u32 clk_index) -+{ -+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; -+ dpll_param *ptr = (dpll_param *)get_36x_iva_dpll_param(); -+ -+ /* Moving to the right sysclk */ -+ ptr += clk_index; -+ -+ /* IVA DPLL */ -+ /* EN_IVA2_DPLL : CM_CLKEN_PLL_IVA2[0:2] */ -+ sr32(&prcm_base->clken_pll_iva2, 0, 3, PLL_STOP); -+ wait_on_value(ST_IVA2_CLK, 0, &prcm_base->idlest_pll_iva2, LDELAY); -+ -+ /* M2 (IVA2_DPLL_CLKOUT_DIV) : CM_CLKSEL2_PLL_IVA2[0:4] */ -+ sr32(&prcm_base->clksel2_pll_iva2, 0, 5, ptr->m2); -+ -+ /* M (IVA2_DPLL_MULT) : CM_CLKSEL1_PLL_IVA2[8:18] */ -+ sr32(&prcm_base->clksel1_pll_iva2, 8, 11, ptr->m); -+ -+ /* N (IVA2_DPLL_DIV) : CM_CLKSEL1_PLL_IVA2[0:6] */ -+ sr32(&prcm_base->clksel1_pll_iva2, 0, 7, ptr->n); -+ -+ /* LOCK (MODE (EN_IVA2_DPLL) : CM_CLKEN_PLL_IVA2[0:2] */ -+ sr32(&prcm_base->clken_pll_iva2, 0, 3, PLL_LOCK); -+ -+ wait_on_value(ST_IVA2_CLK, 1, &prcm_base->idlest_pll_iva2, LDELAY); -+} -+ -+/****************************************************************************** -+ * prcm_init() - inits clocks for PRCM as defined in clocks.h -+ * called from SRAM, or Flash (using temp SRAM stack). -+ *****************************************************************************/ -+void prcm_init(void) -+{ -+ u32 osc_clk = 0, sys_clkin_sel; -+ u32 clk_index, sil_index = 0; -+ struct prm *prm_base = (struct prm *)PRM_BASE; -+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; -+ -+ /* -+ * Gauge the input clock speed and find out the sys_clkin_sel -+ * value corresponding to the input clock. -+ */ -+ osc_clk = get_osc_clk_speed(); -+ get_sys_clkin_sel(osc_clk, &sys_clkin_sel); -+ -+ /* set input crystal speed */ -+ sr32(&prm_base->clksel, 0, 3, sys_clkin_sel); -+ -+ /* If the input clock is greater than 19.2M always divide/2 */ -+ if (sys_clkin_sel > 2) { -+ /* input clock divider */ -+ sr32(&prm_base->clksrc_ctrl, 6, 2, 2); -+ clk_index = sys_clkin_sel / 2; -+ } else { -+ /* input clock divider */ -+ sr32(&prm_base->clksrc_ctrl, 6, 2, 1); -+ clk_index = sys_clkin_sel; -+ } -+ -+ if (get_cpu_family() == CPU_OMAP36XX) { -+ /* Unlock MPU DPLL (slows things down, and needed later) */ -+ sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOW_POWER_BYPASS); -+ wait_on_value(ST_MPU_CLK, 0, &prcm_base->idlest_pll_mpu, -+ LDELAY); -+ -+ dpll3_init_36xx(0, clk_index); -+ dpll4_init_36xx(0, clk_index); -+ iva_init_36xx(0, clk_index); -+ mpu_init_36xx(0, clk_index); -+ -+ /* Lock MPU DPLL to set frequency */ -+ sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOCK); -+ wait_on_value(ST_MPU_CLK, 1, &prcm_base->idlest_pll_mpu, -+ LDELAY); -+ } else { -+ /* -+ * The DPLL tables are defined according to sysclk value and -+ * silicon revision. The clk_index value will be used to get -+ * the values for that input sysclk from the DPLL param table -+ * and sil_index will get the values for that SysClk for the -+ * appropriate silicon rev. -+ */ -+ if (((get_cpu_family() == CPU_OMAP34XX) -+ && (get_cpu_rev() >= CPU_3XX_ES20)) || -+ (get_cpu_family() == CPU_AM35XX)) -+ sil_index = 1; -+ -+ /* Unlock MPU DPLL (slows things down, and needed later) */ -+ sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOW_POWER_BYPASS); -+ wait_on_value(ST_MPU_CLK, 0, &prcm_base->idlest_pll_mpu, -+ LDELAY); -+ -+ dpll3_init_34xx(sil_index, clk_index); -+ dpll4_init_34xx(sil_index, clk_index); -+ iva_init_34xx(sil_index, clk_index); -+ mpu_init_34xx(sil_index, clk_index); -+ -+ /* Lock MPU DPLL to set frequency */ -+ sr32(&prcm_base->clken_pll_mpu, 0, 3, PLL_LOCK); -+ wait_on_value(ST_MPU_CLK, 1, &prcm_base->idlest_pll_mpu, -+ LDELAY); -+ } - - /* Set up GPTimers to sys_clk source only */ - sr32(&prcm_base->clksel_per, 0, 8, 0xff); -@@ -414,3 +678,4 @@ void per_clocks_enable(void) - - sdelay(1000); - } -+ -diff --git a/cpu/arm_cortexa8/omap3/lowlevel_init.S b/cpu/arm_cortexa8/omap3/lowlevel_init.S -index 73063ec..061d75f 100644 ---- a/cpu/arm_cortexa8/omap3/lowlevel_init.S -+++ b/cpu/arm_cortexa8/omap3/lowlevel_init.S -@@ -359,3 +359,72 @@ per_dpll_param: - get_per_dpll_param: - adr r0, per_dpll_param - mov pc, lr -+ -+/* -+ * Tables for 36x/37x devices -+ * -+ */ -+mpu_36x_dpll_param: -+/* 12MHz */ -+.word 50, 0, 0, 1 -+/* 13MHz */ -+.word 600, 12, 0, 1 -+/* 19.2MHz */ -+.word 125, 3, 0, 1 -+/* 26MHz */ -+.word 300, 12, 0, 1 -+/* 38.4MHz */ -+.word 125, 7, 0, 1 -+ -+iva_36x_dpll_param: -+/* 12MHz */ -+.word 130, 2, 0, 1 -+/* 13MHz */ -+.word 40, 0, 0, 1 -+/* 19.2MHz */ -+.word 325, 11, 0, 1 -+/* 26MHz */ -+.word 20, 0, 0, 1 -+/* 38.4MHz */ -+.word 325, 23, 0, 1 -+ -+core_36x_dpll_param: -+/* 12MHz */ -+.word 100, 2, 0, 1 -+/* 13MHz */ -+.word 400, 12, 0, 1 -+/* 19.2MHz */ -+.word 375, 17, 0, 1 -+/* 26MHz */ -+.word 200, 12, 0, 1 -+/* 38.4MHz */ -+.word 375, 35, 0, 1 -+ -+per_36x_dpll_param: -+/* SYSCLK M N M2 M3 M4 M5 M6 m2DIV */ -+.word 12000, 360, 4, 9, 16, 5, 4, 3, 1 -+.word 13000, 864, 12, 9, 16, 9, 4, 3, 1 -+.word 19200, 360, 7, 9, 16, 5, 4, 3, 1 -+.word 26000, 432, 12, 9, 16, 9, 4, 3, 1 -+.word 38400, 360, 15, 9, 16, 5, 4, 3, 1 -+ -+.globl get_36x_mpu_dpll_param -+get_36x_mpu_dpll_param: -+ adr r0, mpu_36x_dpll_param -+ mov pc, lr -+ -+.globl get_36x_iva_dpll_param -+get_36x_iva_dpll_param: -+ adr r0, iva_36x_dpll_param -+ mov pc, lr -+ -+.globl get_36x_core_dpll_param -+get_36x_core_dpll_param: -+ adr r0, core_36x_dpll_param -+ mov pc, lr -+ -+.globl get_36x_per_dpll_param -+get_36x_per_dpll_param: -+ adr r0, per_36x_dpll_param -+ mov pc, lr -+ -diff --git a/include/asm-arm/arch-omap3/clocks.h b/include/asm-arm/arch-omap3/clocks.h -index 71a0cb6..a5f2d08 100644 ---- a/include/asm-arm/arch-omap3/clocks.h -+++ b/include/asm-arm/arch-omap3/clocks.h -@@ -51,12 +51,29 @@ typedef struct { - unsigned int m2; - } dpll_param; - -+struct dpll_per_36x_param { -+ unsigned int sys_clk; -+ unsigned int m; -+ unsigned int n; -+ unsigned int m2; -+ unsigned int m3; -+ unsigned int m4; -+ unsigned int m5; -+ unsigned int m6; -+ unsigned int m2div; -+}; -+ - /* Following functions are exported from lowlevel_init.S */ - extern dpll_param *get_mpu_dpll_param(void); - extern dpll_param *get_iva_dpll_param(void); - extern dpll_param *get_core_dpll_param(void); - extern dpll_param *get_per_dpll_param(void); - -+extern dpll_param *get_36x_mpu_dpll_param(void); -+extern dpll_param *get_36x_iva_dpll_param(void); -+extern dpll_param *get_36x_core_dpll_param(void); -+extern dpll_param *get_36x_per_dpll_param(void); -+ - extern void *_end_vect, *_start; - - #endif -diff --git a/include/asm-arm/arch-omap3/clocks_omap3.h b/include/asm-arm/arch-omap3/clocks_omap3.h -index 661407b..30ef690 100644 ---- a/include/asm-arm/arch-omap3/clocks_omap3.h -+++ b/include/asm-arm/arch-omap3/clocks_omap3.h -@@ -282,4 +282,31 @@ - #define PER_FSEL_38P4 0x07 - #define PER_M2_38P4 0x09 - -+/* 36XX PER DPLL */ -+ -+#define PER_36XX_M_12 0x1B0 -+#define PER_36XX_N_12 0x05 -+#define PER_36XX_FSEL_12 0x07 -+#define PER_36XX_M2_12 0x09 -+ -+#define PER_36XX_M_13 0x360 -+#define PER_36XX_N_13 0x0C -+#define PER_36XX_FSEL_13 0x03 -+#define PER_36XX_M2_13 0x09 -+ -+#define PER_36XX_M_19P2 0x1C2 -+#define PER_36XX_N_19P2 0x09 -+#define PER_36XX_FSEL_19P2 0x07 -+#define PER_36XX_M2_19P2 0x09 -+ -+#define PER_36XX_M_26 0x1B0 -+#define PER_36XX_N_26 0x0C -+#define PER_36XX_FSEL_26 0x07 -+#define PER_36XX_M2_26 0x09 -+ -+#define PER_36XX_M_38P4 0x1C2 -+#define PER_36XX_N_38P4 0x13 -+#define PER_36XX_FSEL_38P4 0x07 -+#define PER_36XX_M2_38P4 0x09 -+ - #endif /* endif _CLOCKS_OMAP3_H_ */ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0020-OMAP3-beagle-add-support-for-Beagle-xM.patch b/recipes/u-boot/u-boot-git/beagleboard/0020-OMAP3-beagle-add-support-for-Beagle-xM.patch deleted file mode 100644 index 0e21282268..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0020-OMAP3-beagle-add-support-for-Beagle-xM.patch +++ /dev/null @@ -1,137 +0,0 @@ -From 8a8738a7d042a80ddef68a9683d7dda77bed8765 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Tue, 23 Mar 2010 09:21:49 -0700 -Subject: [PATCH 20/50] OMAP3: beagle: add support for Beagle xM - ---- - board/ti/beagle/beagle.c | 23 +++++++++++++++-------- - board/ti/beagle/beagle.h | 34 ++++++++++++++++++++++++++++++---- - include/configs/omap3_beagle.h | 1 + - 3 files changed, 46 insertions(+), 12 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index b4ea7e6..d357588 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -75,7 +75,7 @@ int beagle_get_revision(void) - * GPIO173, GPIO172, GPIO171: 1 1 1 => Ax/Bx - * GPIO173, GPIO172, GPIO171: 1 1 0 => C1/2/3 - * GPIO173, GPIO172, GPIO171: 1 0 1 => C4 -- * GPIO173, GPIO172, GPIO171: 0 0 0 => D -+ * GPIO173, GPIO172, GPIO171: 0 0 0 => XM - */ - void beagle_identify(void) - { -@@ -108,29 +108,36 @@ int misc_init_r(void) - twl4030_power_init(); - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); - -- printf("Board revision "); - switch (beagle_revision) { - case REVISION_AXBX: -- printf("Ax/Bx\n"); -+ printf("Beagle Rev Ax/Bx\n"); - break; - case REVISION_CX: -- printf("C1/C2/C3\n"); -+ printf("Beagle Rev C1/C2/C3\n"); - MUX_BEAGLE_C(); - break; - case REVISION_C4: -- printf("C4\n"); -+ printf("Beagle Rev C4\n"); - MUX_BEAGLE_C(); - /* Set VAUX2 to 1.8V for EHCI PHY */ - twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, - TWL4030_PM_RECEIVER_VAUX2_VSEL_18, - TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, - TWL4030_PM_RECEIVER_DEV_GRP_P1); -+ setenv("mpurate", "720"); - break; -- case REVISION_D: -- printf("D\n"); -+ case REVISION_XM: -+ printf("Beagle xM Rev A\n"); -+ MUX_BEAGLE_XM(); -+ /* Set VAUX2 to 1.8V for EHCI PHY */ -+ twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, -+ TWL4030_PM_RECEIVER_VAUX2_VSEL_18, -+ TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, -+ TWL4030_PM_RECEIVER_DEV_GRP_P1); -+ setenv("mpurate", "720"); - break; - default: -- printf("unknown 0x%02x\n", beagle_revision); -+ printf("Beagle unknown 0x%02x\n", beagle_revision); - } - - /* Configure GPIOs to output */ -diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h -index d95fd78..fd06d46 100644 ---- a/board/ti/beagle/beagle.h -+++ b/board/ti/beagle/beagle.h -@@ -38,7 +38,7 @@ const omap3_sysinfo sysinfo = { - #define REVISION_AXBX 0x7 - #define REVISION_CX 0x6 - #define REVISION_C4 0x5 --#define REVISION_D 0x0 -+#define REVISION_XM 0x0 - - /* - * IEN - Input Enable -@@ -379,11 +379,37 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(SDRC_CKE1), (IDIS | PTU | EN | M0)) /*sdrc_cke1*/ - - #define MUX_BEAGLE_C() \ -- MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\ -- MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\ -- MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\ -+ MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\ -+ MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\ -+ MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\ - MUX_VAL(CP(UART2_CTS), (IEN | PTU | EN | M0)) /*UART2_CTS*/\ - MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS | M0)) /*UART2_RTS*/\ - MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/ - -+#define MUX_BEAGLE_XM() \ -+ MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\ -+ MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\ -+ MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\ -+ MUX_VAL(CP(UART2_CTS), (IEN | PTU | EN | M0)) /*UART2_CTS*/\ -+ MUX_VAL(CP(UART2_RTS), (IDIS | PTD | DIS | M0)) /*UART2_RTS*/\ -+ MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/\ -+ MUX_VAL(CP(DSS_DATA0), (IDIS | PTD | DIS | M7)) /*safe_mode*/\ -+ MUX_VAL(CP(DSS_DATA1), (IDIS | PTD | DIS | M7)) /*safe_mode*/\ -+ MUX_VAL(CP(DSS_DATA2), (IDIS | PTD | DIS | M7)) /*safe_mode*/\ -+ MUX_VAL(CP(DSS_DATA3), (IDIS | PTD | DIS | M7)) /*safe_mode*/\ -+ MUX_VAL(CP(DSS_DATA4), (IDIS | PTD | DIS | M7)) /*safe_mode*/\ -+ MUX_VAL(CP(DSS_DATA5), (IDIS | PTD | DIS | M7)) /*safe_mode*/\ -+ MUX_VAL(CP(DSS_DATA18), (IDIS | PTD | DIS | M3)) /*DSS_DATA0*/\ -+ MUX_VAL(CP(DSS_DATA19), (IDIS | PTD | DIS | M3)) /*DSS_DATA1*/\ -+ MUX_VAL(CP(DSS_DATA20), (IDIS | PTD | DIS | M3)) /*DSS_DATA2*/\ -+ MUX_VAL(CP(DSS_DATA21), (IDIS | PTD | DIS | M3)) /*DSS_DATA3*/\ -+ MUX_VAL(CP(DSS_DATA22), (IDIS | PTD | DIS | M3)) /*DSS_DATA4*/\ -+ MUX_VAL(CP(DSS_DATA23), (IDIS | PTD | DIS | M3)) /*DSS_DATA5*/\ -+ MUX_VAL(CP(SYS_BOOT0), (IDIS | PTD | DIS | M3)) /*DSS_DATA18*/\ -+ MUX_VAL(CP(SYS_BOOT1), (IDIS | PTD | DIS | M3)) /*DSS_DATA19*/\ -+ MUX_VAL(CP(SYS_BOOT3), (IDIS | PTD | DIS | M3)) /*DSS_DATA20*/\ -+ MUX_VAL(CP(SYS_BOOT4), (IDIS | PTD | DIS | M3)) /*DSS_DATA21*/\ -+ MUX_VAL(CP(SYS_BOOT5), (IDIS | PTD | DIS | M3)) /*DSS_DATA22*/\ -+ MUX_VAL(CP(SYS_BOOT6), (IDIS | PTD | DIS | M3)) /*DSS_DATA23*/ -+ - #endif -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 35ae8af..1370a29 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -162,6 +162,7 @@ - /* - * Board NAND Info. - */ -+#define CONFIG_SYS_NAND_QUIET_TEST 1 - #define CONFIG_NAND_OMAP_GPMC - #define CONFIG_SYS_NAND_ADDR NAND_BASE /* physical address */ - /* to access nand */ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0022-OMAP3-beagle-implement-expansionboard-detection-base.patch b/recipes/u-boot/u-boot-git/beagleboard/0022-OMAP3-beagle-implement-expansionboard-detection-base.patch deleted file mode 100644 index abd25a3e2e..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0022-OMAP3-beagle-implement-expansionboard-detection-base.patch +++ /dev/null @@ -1,157 +0,0 @@ -From b48754f4c77924a9351867e17e2f09fbe5a83b82 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Thu, 25 Mar 2010 16:07:23 +0100 -Subject: [PATCH 22/50] OMAP3: beagle: implement expansionboard detection based on board/overo.c code - ---- - board/ti/beagle/beagle.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++ - board/ti/beagle/beagle.h | 25 +++++++++++++- - 2 files changed, 101 insertions(+), 2 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index d357588..8c5b88c 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -38,6 +38,31 @@ - #include - #include "beagle.h" - -+static struct { -+ unsigned int device_vendor; -+ unsigned char revision; -+ unsigned char content; -+ unsigned char fab_revision[8]; -+ unsigned char env_var[16]; -+ unsigned char env_setting[64]; -+} expansion_config; -+ -+#define TWL4030_I2C_BUS 0 -+ -+#define EXPANSION_EEPROM_I2C_BUS 1 -+#define EXPANSION_EEPROM_I2C_ADDRESS 0x50 -+ -+#define TINCANTOOLS_VENDORID 0x0100 -+#define GUMSTIX_VENDORID 0x0200 -+#define SPECIALCOMP_VENDORID 0x0300 -+ -+#define TINCANTOOLS_ZIPPY 0x01000100 -+#define TINCANTOOLS_ZIPPY2 0x02000100 -+#define TINCANTOOLS_TRAINER 0x03000100 -+#define TINCANTOOLS_SHOWDOG 0x04000100 -+ -+#define BEAGLE_NO_EEPROM 0xffffffff -+ - static int beagle_revision; - - /* -@@ -95,6 +120,27 @@ void beagle_identify(void) - } - - /* -+ * Routine: get_expansion_id -+ * Description: This function checks for expansion board by checking I2C -+ * bus 2 for the availability of an AT24C01B serial EEPROM. -+ * returns the device_vendor field from the EEPROM -+ */ -+unsigned int get_expansion_id(void) -+{ -+ i2c_set_bus_num(EXPANSION_EEPROM_I2C_BUS); -+ -+ /* return BEAGLE_NO_EEPROM if eeprom doesn't respond */ -+ if (i2c_probe(EXPANSION_EEPROM_I2C_ADDRESS) == 1) -+ return BEAGLE_NO_EEPROM; -+ -+ /* read configuration data */ -+ i2c_read(EXPANSION_EEPROM_I2C_ADDRESS, 0, 1, (u8 *)&expansion_config, -+ sizeof(expansion_config)); -+ -+ return expansion_config.device_vendor; -+} -+ -+/* - * Routine: misc_init_r - * Description: Configure board specific parts - */ -@@ -104,6 +150,38 @@ int misc_init_r(void) - struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; - - beagle_identify(); -+ switch (get_expansion_id()) { -+ case TINCANTOOLS_ZIPPY: -+ printf("Recognized Tincantools Zippy expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.fab_revision); -+ MUX_TINCANTOOLS_ZIPPY(); -+ break; -+ case TINCANTOOLS_ZIPPY2: -+ printf("Recognized Tincantools Zippy2 expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.fab_revision); -+ MUX_TINCANTOOLS_ZIPPY(); -+ break; -+ case TINCANTOOLS_TRAINER: -+ printf("Recognized Tincantools Trainer expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.fab_revision); -+ break; -+ case TINCANTOOLS_SHOWDOG: -+ printf("Recognized Tincantools Showdow expansion board (rev %d %s)\n", -+ expansion_config.revision, expansion_config.fab_revision); -+ /* Place holder for DSS2 definition for showdog lcd */ -+ setenv("defaultdisplay", "showdoglcd"); -+ break; -+ case BEAGLE_NO_EEPROM: -+ printf("No EEPROM on expansion board\n"); -+ break; -+ default: -+ printf("Unrecognized expansion board: %x\n", expansion_config.device_vendor); -+ } -+ -+ if (expansion_config.content == 1) -+ setenv(expansion_config.env_var, expansion_config.env_setting); -+ -+ i2c_set_bus_num(TWL4030_I2C_BUS); - - twl4030_power_init(); - twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON); -diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h -index fd06d46..ec4f831 100644 ---- a/board/ti/beagle/beagle.h -+++ b/board/ti/beagle/beagle.h -@@ -260,8 +260,8 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(HSUSB0_DATA7), (IEN | PTD | DIS | M0)) /*HSUSB0_DATA7*/\ - MUX_VAL(CP(I2C1_SCL), (IEN | PTU | EN | M0)) /*I2C1_SCL*/\ - MUX_VAL(CP(I2C1_SDA), (IEN | PTU | EN | M0)) /*I2C1_SDA*/\ -- MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M4)) /*GPIO_168*/\ -- MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M4)) /*GPIO_183*/\ -+ MUX_VAL(CP(I2C2_SCL), (IEN | PTU | EN | M0)) /*I2C2_SCL*/\ -+ MUX_VAL(CP(I2C2_SDA), (IEN | PTU | EN | M0)) /*I2C2_SDA*/\ - MUX_VAL(CP(I2C3_SCL), (IEN | PTU | EN | M0)) /*I2C3_SCL*/\ - MUX_VAL(CP(I2C3_SDA), (IEN | PTU | EN | M0)) /*I2C3_SDA*/\ - MUX_VAL(CP(I2C4_SCL), (IEN | PTU | EN | M0)) /*I2C4_SCL*/\ -@@ -412,4 +412,25 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(SYS_BOOT5), (IDIS | PTD | DIS | M3)) /*DSS_DATA22*/\ - MUX_VAL(CP(SYS_BOOT6), (IDIS | PTD | DIS | M3)) /*DSS_DATA23*/ - -+#define MUX_TINCANTOOLS_ZIPPY() \ -+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\ -+ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\ -+ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\ -+ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\ -+ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\ -+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\ -+ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT0*/\ -+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M1)) /*MMC2_DIR_DAT1*/\ -+ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M1)) /*MMC2_DIR_CMD*/\ -+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M1)) /*MMC2_CLKIN*/\ -+ MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTU | EN | M1)) /*MCSPI4_CLK*/\ -+ MUX_VAL(CP(MCBSP1_FSR), (IEN | PTU | EN | M4)) /*GPIO_157*/\ -+ MUX_VAL(CP(MCBSP1_DX), (IEN | PTD | EN | M1)) /*MCSPI4_SIMO*/\ -+ MUX_VAL(CP(MCBSP1_DR), (IEN | PTD | DIS | M1)) /*MCSPI4_SOMI*/\ -+ MUX_VAL(CP(MCBSP1_FSX), (IEN | PTD | EN | M1)) /*MCSPI4_CS0*/\ -+ MUX_VAL(CP(MCBSP1_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_162*/\ -+ MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\ -+ MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\ -+ MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\ -+ - #endif --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0023-beagleboard-display-message-about-I2C-errors-being-e.patch b/recipes/u-boot/u-boot-git/beagleboard/0023-beagleboard-display-message-about-I2C-errors-being-e.patch deleted file mode 100644 index 704467e93e..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0023-beagleboard-display-message-about-I2C-errors-being-e.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 653c13d956b189c05e6c02077dbd85cba8ff490b Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Wed, 31 Mar 2010 14:24:25 +0200 -Subject: [PATCH 23/50] beagleboard: display message about I2C errors being expected when no expansion boards are present - ---- - board/ti/beagle/beagle.c | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 8c5b88c..c9c9a58 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -150,6 +150,9 @@ int misc_init_r(void) - struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; - - beagle_identify(); -+ -+ printf("\nProbing for expansion boards, if none are connected you'll see a harmless I2C error.\n"); -+ - switch (get_expansion_id()) { - case TINCANTOOLS_ZIPPY: - printf("Recognized Tincantools Zippy expansion board (rev %d %s)\n", --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0024-beagleboard-fix-TCT-expansionboard-IDs.patch b/recipes/u-boot/u-boot-git/beagleboard/0024-beagleboard-fix-TCT-expansionboard-IDs.patch deleted file mode 100644 index 418c152df4..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0024-beagleboard-fix-TCT-expansionboard-IDs.patch +++ /dev/null @@ -1,27 +0,0 @@ -From a0f21f7418dfa81a40bf99b7e926153a310ba457 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Sun, 11 Apr 2010 12:14:43 +0200 -Subject: [PATCH 24/50] beagleboard: fix TCT expansionboard IDs - ---- - board/ti/beagle/beagle.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index c9c9a58..7cb6d1f 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -58,8 +58,8 @@ static struct { - - #define TINCANTOOLS_ZIPPY 0x01000100 - #define TINCANTOOLS_ZIPPY2 0x02000100 --#define TINCANTOOLS_TRAINER 0x03000100 --#define TINCANTOOLS_SHOWDOG 0x04000100 -+#define TINCANTOOLS_TRAINER 0x04000100 -+#define TINCANTOOLS_SHOWDOG 0x03000100 - - #define BEAGLE_NO_EEPROM 0xffffffff - --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0027-beagleboardXM-don-t-set-mpurate-on-xM-in-bootargs.patch b/recipes/u-boot/u-boot-git/beagleboard/0027-beagleboardXM-don-t-set-mpurate-on-xM-in-bootargs.patch deleted file mode 100644 index 1a9197e1f9..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0027-beagleboardXM-don-t-set-mpurate-on-xM-in-bootargs.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 4aca3c70a18da58e263b08e37b288a06b2b6655c Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Tue, 13 Apr 2010 22:04:07 +0200 -Subject: [PATCH 27/50] beagleboardXM: don't set mpurate on xM in bootargs - ---- - board/ti/beagle/beagle.c | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index eb57b5a..974a72c 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -226,7 +226,6 @@ int misc_init_r(void) - TWL4030_PM_RECEIVER_VAUX2_VSEL_18, - TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, - TWL4030_PM_RECEIVER_DEV_GRP_P1); -- setenv("mpurate", "720"); - break; - default: - printf("Beagle unknown 0x%02x\n", beagle_revision); --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0028-OMAP3-fix-and-clean-up-L2-cache-enable-disable-funct.patch b/recipes/u-boot/u-boot-git/beagleboard/0028-OMAP3-fix-and-clean-up-L2-cache-enable-disable-funct.patch deleted file mode 100644 index f4975cdc88..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0028-OMAP3-fix-and-clean-up-L2-cache-enable-disable-funct.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 72e1ab470e483c91ab3aa38bec31faf3dad52735 Mon Sep 17 00:00:00 2001 -From: Mans Rullgard -Date: Wed, 14 Apr 2010 12:08:00 +0100 -Subject: [PATCH 28/50] OMAP3: fix and clean up L2 cache enable/disable functions - -On OMAP34xx ES1.0, the L2 enable bit can only be set in secure mode, -so an SMC call to the ROM monitor is required. On later versions, -and on newer devices, this bit is banked and we can set it directly. - -The code checked only the ES revision of the chip, and hence incorrectly -used the ROM call on ES1.0 versions of other devices. - -This patch adds a check for chip family as well as revision, and also -removes some code duplication between the enable and disable functions. - -Signed-off-by: Mans Rullgard ---- - cpu/arm_cortexa8/omap3/cache.S | 74 +++++++++++----------------------------- - 1 files changed, 20 insertions(+), 54 deletions(-) - -diff --git a/cpu/arm_cortexa8/omap3/cache.S b/cpu/arm_cortexa8/omap3/cache.S -index 0f63815..16afb5d 100644 ---- a/cpu/arm_cortexa8/omap3/cache.S -+++ b/cpu/arm_cortexa8/omap3/cache.S -@@ -128,64 +128,30 @@ finished_inval: - - ldmfd r13!, {r0 - r5, r7, r9 - r12, pc} - -- --l2_cache_enable: -- push {r0, r1, r2, lr} -- @ ES2 onwards we can disable/enable L2 ourselves -+l2_cache_set: -+ push {r4-r6, lr} -+ mov r5, r0 - bl get_cpu_rev -- cmp r0, #CPU_3XX_ES20 -- blt l2_cache_disable_EARLIER_THAN_ES2 -- mrc 15, 0, r3, cr1, cr0, 1 -- orr r3, r3, #2 -- mcr 15, 0, r3, cr1, cr0, 1 -- b l2_cache_enable_END --l2_cache_enable_EARLIER_THAN_ES2: -- @ Save r0, r12 and restore them after usage -- mov r3, ip -- str r3, [sp, #4] -- mov r3, r0 -- @ -+ mov r4, r0 -+ bl get_cpu_family -+ @ ES2 onwards we can disable/enable L2 ourselves -+ cmp r0, #CPU_OMAP34XX -+ cmpeq r4, #CPU_3XX_ES10 -+ mrc 15, 0, r0, cr1, cr0, 1 -+ bic r0, r0, #2 -+ orr r0, r0, r5, lsl #1 -+ mcreq 15, 0, r0, cr1, cr0, 1 - @ GP Device ROM code API usage here - @ r12 = AUXCR Write function and r0 value -- @ - mov ip, #3 -- mrc 15, 0, r0, cr1, cr0, 1 -- orr r0, r0, #2 -- @ SMI instruction to call ROM Code API -- .word 0xe1600070 -- mov r0, r3 -- mov ip, r3 -- str r3, [sp, #4] --l2_cache_enable_END: -- pop {r1, r2, r3, pc} -+ @ SMCNE instruction to call ROM Code API -+ .word 0x11600070 -+ pop {r4-r6, pc} - -+l2_cache_enable: -+ mov r0, #1 -+ b l2_cache_set - - l2_cache_disable: -- push {r0, r1, r2, lr} -- @ ES2 onwards we can disable/enable L2 ourselves -- bl get_cpu_rev -- cmp r0, #CPU_3XX_ES20 -- blt l2_cache_disable_EARLIER_THAN_ES2 -- mrc 15, 0, r3, cr1, cr0, 1 -- bic r3, r3, #2 -- mcr 15, 0, r3, cr1, cr0, 1 -- b l2_cache_disable_END --l2_cache_disable_EARLIER_THAN_ES2: -- @ Save r0, r12 and restore them after usage -- mov r3, ip -- str r3, [sp, #4] -- mov r3, r0 -- @ -- @ GP Device ROM code API usage here -- @ r12 = AUXCR Write function and r0 value -- @ -- mov ip, #3 -- mrc 15, 0, r0, cr1, cr0, 1 -- bic r0, r0, #2 -- @ SMI instruction to call ROM Code API -- .word 0xe1600070 -- mov r0, r3 -- mov ip, r3 -- str r3, [sp, #4] --l2_cache_disable_END: -- pop {r1, r2, r3, pc} -+ mov r0, #0 -+ b l2_cache_set --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0029-OMAP3-convert-setup_auxcr-to-pure-asm.patch b/recipes/u-boot/u-boot-git/beagleboard/0029-OMAP3-convert-setup_auxcr-to-pure-asm.patch deleted file mode 100644 index 7e9fe8bdc1..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0029-OMAP3-convert-setup_auxcr-to-pure-asm.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 1e795a2c3e44002c3512222dd3da07ac3ea42d7d Mon Sep 17 00:00:00 2001 -From: Mans Rullgard -Date: Wed, 14 Apr 2010 16:49:57 +0100 -Subject: [PATCH 29/50] OMAP3: convert setup_auxcr() to pure asm - -This function consists entirely of inline asm statements, so writing -it directly in a .S file is simpler. Additionally, the inline asm is -not safe as is, since registers are not guaranteed to be preserved -between asm() statements. - -Signed-off-by: Mans Rullgard ---- - cpu/arm_cortexa8/omap3/board.c | 35 ----------------------------------- - cpu/arm_cortexa8/omap3/cache.S | 19 +++++++++++++++++++ - 2 files changed, 19 insertions(+), 35 deletions(-) - -diff --git a/cpu/arm_cortexa8/omap3/board.c b/cpu/arm_cortexa8/omap3/board.c -index 0126152..7f49199 100644 ---- a/cpu/arm_cortexa8/omap3/board.c -+++ b/cpu/arm_cortexa8/omap3/board.c -@@ -122,41 +122,6 @@ void secureworld_exit() - } - - /****************************************************************************** -- * Routine: setup_auxcr() -- * Description: Write to AuxCR desired value using SMI. -- * general use. -- *****************************************************************************/ --void setup_auxcr() --{ -- unsigned long i; -- volatile unsigned int j; -- /* Save r0, r12 and restore them after usage */ -- __asm__ __volatile__("mov %0, r12":"=r"(j)); -- __asm__ __volatile__("mov %0, r0":"=r"(i)); -- -- /* -- * GP Device ROM code API usage here -- * r12 = AUXCR Write function and r0 value -- */ -- __asm__ __volatile__("mov r12, #0x3"); -- __asm__ __volatile__("mrc p15, 0, r0, c1, c0, 1"); -- /* Enabling ASA */ -- __asm__ __volatile__("orr r0, r0, #0x10"); -- /* Enable L1NEON */ -- __asm__ __volatile__("orr r0, r0, #1 << 5"); -- /* SMI instruction to call ROM Code API */ -- __asm__ __volatile__(".word 0xE1600070"); -- /* Set PLD_FWD bit in L2AUXCR (Cortex-A8 erratum 725233 workaround) */ -- __asm__ __volatile__("mov r12, #0x2"); -- __asm__ __volatile__("mrc p15, 1, r0, c9, c0, 2"); -- __asm__ __volatile__("orr r0, r0, #1 << 27"); -- /* SMI instruction to call ROM Code API */ -- __asm__ __volatile__(".word 0xE1600070"); -- __asm__ __volatile__("mov r0, %0":"=r"(i)); -- __asm__ __volatile__("mov r12, %0":"=r"(j)); --} -- --/****************************************************************************** - * Routine: try_unlock_sram() - * Description: If chip is GP/EMU(special) type, unlock the SRAM for - * general use. -diff --git a/cpu/arm_cortexa8/omap3/cache.S b/cpu/arm_cortexa8/omap3/cache.S -index 16afb5d..61e6946 100644 ---- a/cpu/arm_cortexa8/omap3/cache.S -+++ b/cpu/arm_cortexa8/omap3/cache.S -@@ -43,6 +43,7 @@ - .global invalidate_dcache - .global l2_cache_enable - .global l2_cache_disable -+.global setup_auxcr - - /* - * invalidate_dcache() -@@ -155,3 +156,21 @@ l2_cache_enable: - l2_cache_disable: - mov r0, #0 - b l2_cache_set -+ -+/****************************************************************************** -+ * Routine: setup_auxcr() -+ * Description: Write to AuxCR desired value using SMI. -+ * general use. -+ *****************************************************************************/ -+setup_auxcr: -+ mov r12, #0x3 -+ mrc p15, 0, r0, c1, c0, 1 -+ orr r0, r0, #0x10 @ Enable ASA -+ orr r0, r0, #1 << 5 @ Enable L1NEON -+ .word 0xE1600070 @ SMC -+ mov r12, #0x2 -+ mrc p15, 1, r0, c9, c0, 2 -+ @ Set PLD_FWD bit in L2AUXCR (Cortex-A8 erratum 725233 workaround) -+ orr r0, r0, #1 << 27 -+ .word 0xE1600070 @ SMC -+ bx lr --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0030-OMAP3-apply-Cortex-A8-errata-workarounds-only-on-aff.patch b/recipes/u-boot/u-boot-git/beagleboard/0030-OMAP3-apply-Cortex-A8-errata-workarounds-only-on-aff.patch deleted file mode 100644 index 11f40377e7..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0030-OMAP3-apply-Cortex-A8-errata-workarounds-only-on-aff.patch +++ /dev/null @@ -1,46 +0,0 @@ -From fd092c7f2286fab34cf42c6c56360ae7794dbc7f Mon Sep 17 00:00:00 2001 -From: Mans Rullgard -Date: Wed, 14 Apr 2010 17:10:28 +0100 -Subject: [PATCH 30/50] OMAP3: apply Cortex-A8 errata workarounds only on affected revisions - -The workarounds for errata 621766 and 725233 should only be applied -on affected Cortex-A8 revisions. Recent chips use r3px cores where -these have been fixed. - -Signed-off-by: Mans Rullgard ---- - cpu/arm_cortexa8/omap3/cache.S | 13 ++++++++++--- - 1 files changed, 10 insertions(+), 3 deletions(-) - -diff --git a/cpu/arm_cortexa8/omap3/cache.S b/cpu/arm_cortexa8/omap3/cache.S -index 61e6946..932e4eb 100644 ---- a/cpu/arm_cortexa8/omap3/cache.S -+++ b/cpu/arm_cortexa8/omap3/cache.S -@@ -163,14 +163,21 @@ l2_cache_disable: - * general use. - *****************************************************************************/ - setup_auxcr: -+ mrc p15, 0, r0, c0, c0, 0 @ read main ID register -+ and r2, r0, #0x00f00000 @ variant -+ and r3, r0, #0x0000000f @ revision -+ orr r1, r3, r2, lsr #20-4 @ combine variant and revision - mov r12, #0x3 - mrc p15, 0, r0, c1, c0, 1 - orr r0, r0, #0x10 @ Enable ASA -- orr r0, r0, #1 << 5 @ Enable L1NEON -+ @ Enable L1NEON on pre-r2p1 (erratum 621766 workaround) -+ cmp r1, #0x21 -+ orrlt r0, r0, #1 << 5 - .word 0xE1600070 @ SMC - mov r12, #0x2 - mrc p15, 1, r0, c9, c0, 2 -- @ Set PLD_FWD bit in L2AUXCR (Cortex-A8 erratum 725233 workaround) -- orr r0, r0, #1 << 27 -+ @ Set PLD_FWD bit in L2AUXCR on pre-r2p1 (erratum 725233 workaround) -+ cmp r1, #0x21 -+ orrlt r0, r0, #1 << 27 - .word 0xE1600070 @ SMC - bx lr --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0031-OMAP3-beagle-add-more-expansionboards-based-on-http-.patch b/recipes/u-boot/u-boot-git/beagleboard/0031-OMAP3-beagle-add-more-expansionboards-based-on-http-.patch deleted file mode 100644 index 2f5c60593d..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0031-OMAP3-beagle-add-more-expansionboards-based-on-http-.patch +++ /dev/null @@ -1,61 +0,0 @@ -From ccbe10687806b6504c87bd3ad80bd406bc6263f4 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Fri, 23 Apr 2010 10:50:43 +0200 -Subject: [PATCH 31/50] OMAP3: beagle: add more expansionboards, based on http://www.elinux.org/BeagleBoardPinMux#Vendor_and_Device_IDs - ---- - board/ti/beagle/beagle.c | 8 ++++++++ - board/ti/beagle/beagle.h | 6 ++++++ - 2 files changed, 14 insertions(+), 0 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 974a72c..0544178 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -55,11 +55,15 @@ static struct { - #define TINCANTOOLS_VENDORID 0x0100 - #define GUMSTIX_VENDORID 0x0200 - #define SPECIALCOMP_VENDORID 0x0300 -+#define HYR_VENDORID 0x0400 -+#define MENTOREL_VENDORID 0x0500 -+#define KBADC_VENDORID 0x0600 - - #define TINCANTOOLS_ZIPPY 0x01000100 - #define TINCANTOOLS_ZIPPY2 0x02000100 - #define TINCANTOOLS_TRAINER 0x04000100 - #define TINCANTOOLS_SHOWDOG 0x03000100 -+#define KBADC_BEAGLEFPGA 0x01000600 - - #define BEAGLE_NO_EEPROM 0xffffffff - -@@ -184,6 +188,10 @@ int misc_init_r(void) - /* Place holder for DSS2 definition for showdog lcd */ - setenv("defaultdisplay", "showdoglcd"); - break; -+ case KBADC_BEAGLEFPGA: -+ printf("Recognized KBADC Beagle FPGA board\n"); -+ MUX_KBADC_BEAGLEFPGA(); -+ break; - case BEAGLE_NO_EEPROM: - printf("No EEPROM on expansion board\n"); - break; -diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h -index 69f9398..90a0ebf 100644 ---- a/board/ti/beagle/beagle.h -+++ b/board/ti/beagle/beagle.h -@@ -435,6 +435,12 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\ - MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\ - -+#define MUX_KBADC_BEAGLEFPGA() \ -+ MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTU | DIS | M1)) /*MCSPI4_CLK*/\ -+ MUX_VAL(CP(MCBSP1_DX), (IDIS | PTU | DIS | M1)) /*MCSPI4_SIMO*/\ -+ MUX_VAL(CP(MCBSP1_DR), (IEN | PTU | EN | M1)) /*MCSPI4_SOMI*/\ -+ MUX_VAL(CP(MCBSP1_FSX), (IDIS | PTU | DIS | M1)) /*MCSPI4_CS0*/\ -+ - /* - * Display Configuration - */ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0032-OMAP3-beagle-set-mpurate-to-600-for-revB-and-revC1-3.patch b/recipes/u-boot/u-boot-git/beagleboard/0032-OMAP3-beagle-set-mpurate-to-600-for-revB-and-revC1-3.patch deleted file mode 100644 index 839dfbc9b7..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0032-OMAP3-beagle-set-mpurate-to-600-for-revB-and-revC1-3.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 0d2821af767b7cfe1a5d868a14f8a18e01070e37 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Tue, 27 Apr 2010 13:44:16 +0200 -Subject: [PATCH 32/50] OMAP3: beagle: set mpurate to 600 for revB and revC1-3 - ---- - board/ti/beagle/beagle.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 0544178..6778499 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -211,10 +211,12 @@ int misc_init_r(void) - switch (beagle_revision) { - case REVISION_AXBX: - printf("Beagle Rev Ax/Bx\n"); -+ setenv("mpurate", "600"); - break; - case REVISION_CX: - printf("Beagle Rev C1/C2/C3\n"); - MUX_BEAGLE_C(); -+ setenv("mpurate", "600"); - break; - case REVISION_C4: - printf("Beagle Rev C4\n"); --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0033-OMAP3-beagle-prettify-expansionboard-message-a-bit.patch b/recipes/u-boot/u-boot-git/beagleboard/0033-OMAP3-beagle-prettify-expansionboard-message-a-bit.patch deleted file mode 100644 index 8d0f3eace5..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0033-OMAP3-beagle-prettify-expansionboard-message-a-bit.patch +++ /dev/null @@ -1,25 +0,0 @@ -From f4f92e1f72e2bcab85f205c66f0725a677e192e2 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Tue, 27 Apr 2010 13:45:28 +0200 -Subject: [PATCH 33/50] OMAP3: beagle: prettify expansionboard message a bit - ---- - board/ti/beagle/beagle.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 6778499..58fb7c3 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -165,7 +165,7 @@ int misc_init_r(void) - - beagle_identify(); - -- printf("\nProbing for expansion boards, if none are connected you'll see a harmless I2C error.\n"); -+ printf("\nProbing for expansion boards, if none are connected you'll see a harmless I2C error.\n\n"); - - switch (get_expansion_id()) { - case TINCANTOOLS_ZIPPY: --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0034-OMAP3-beagle-add-pinmux-for-Tincantools-Trainer-expa.patch b/recipes/u-boot/u-boot-git/beagleboard/0034-OMAP3-beagle-add-pinmux-for-Tincantools-Trainer-expa.patch deleted file mode 100644 index b396c749ee..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0034-OMAP3-beagle-add-pinmux-for-Tincantools-Trainer-expa.patch +++ /dev/null @@ -1,53 +0,0 @@ -From d6d6f29e339b5d014f91870b35985a372dd330f2 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Tue, 27 Apr 2010 18:25:57 +0200 -Subject: [PATCH 34/50] OMAP3: beagle: add pinmux for Tincantools Trainer expansionboard - ---- - board/ti/beagle/beagle.c | 2 ++ - board/ti/beagle/beagle.h | 16 +++++++++++++++- - 2 files changed, 17 insertions(+), 1 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 58fb7c3..39c53f2 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -181,6 +181,8 @@ int misc_init_r(void) - case TINCANTOOLS_TRAINER: - printf("Recognized Tincantools Trainer expansion board (rev %d %s)\n", - expansion_config.revision, expansion_config.fab_revision); -+ MUX_TINCANTOOLS_ZIPPY(); -+ MUX_TINCANTOOLS_TRAINER(); - break; - case TINCANTOOLS_SHOWDOG: - printf("Recognized Tincantools Showdow expansion board (rev %d %s)\n", -diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h -index 90a0ebf..7774855 100644 ---- a/board/ti/beagle/beagle.h -+++ b/board/ti/beagle/beagle.h -@@ -433,7 +433,21 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(MCBSP1_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_162*/\ - MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\ - MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\ -- MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\ -+ MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/ -+ -+#define MUX_TINCANTOOLS_TRAINER() \ -+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M4)) /*GPIO_130*/\ -+ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M4)) /*GPIO_131*/\ -+ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M4)) /*GPIO_132*/\ -+ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M4)) /*GPIO_133*/\ -+ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M4)) /*GPIO_134*/\ -+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M4)) /*GPIO_135*/\ -+ MUX_VAL(CP(MMC2_DAT4), (IEN | PTU | EN | M4)) /*GPIO_136*/\ -+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\ -+ MUX_VAL(CP(MMC2_DAT6), (IEN | PTU | EN | M4)) /*GPIO_138*/\ -+ MUX_VAL(CP(MMC2_DAT7), (IEN | PTU | EN | M4)) /*GPIO_139*/\ -+ MUX_VAL(CP(MCBSP3_DX), (IEN | PTU | EN | M4)) /*GPIO_140*/\ -+ MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTU | EN | M4)) /*GPIO_141*/ - - #define MUX_KBADC_BEAGLEFPGA() \ - MUX_VAL(CP(MCBSP1_CLKR), (IEN | PTU | DIS | M1)) /*MCSPI4_CLK*/\ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0035-OMAP3-Beagle-set-mpurate-to-1000-for-xM.patch b/recipes/u-boot/u-boot-git/beagleboard/0035-OMAP3-Beagle-set-mpurate-to-1000-for-xM.patch deleted file mode 100644 index b4e040499c..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0035-OMAP3-Beagle-set-mpurate-to-1000-for-xM.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 442e5d80723e2772f38fe473d32287200d802907 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Fri, 30 Apr 2010 13:25:41 +0200 -Subject: [PATCH 35/50] OMAP3: Beagle: set mpurate to 1000 for xM - ---- - board/ti/beagle/beagle.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 39c53f2..9300984 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -238,6 +238,7 @@ int misc_init_r(void) - TWL4030_PM_RECEIVER_VAUX2_VSEL_18, - TWL4030_PM_RECEIVER_VAUX2_DEV_GRP, - TWL4030_PM_RECEIVER_DEV_GRP_P1); -+ setenv("mpurate", "1000"); - break; - default: - printf("Beagle unknown 0x%02x\n", beagle_revision); --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0036-OMAP3-Beagle-decrease-bootdelay-to-3-use-VGA-for-def.patch b/recipes/u-boot/u-boot-git/beagleboard/0036-OMAP3-Beagle-decrease-bootdelay-to-3-use-VGA-for-def.patch deleted file mode 100644 index 4e4f036a7b..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0036-OMAP3-Beagle-decrease-bootdelay-to-3-use-VGA-for-def.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 13b74d6ec2b88620515d0060f6276f744f058e44 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Fri, 30 Apr 2010 13:26:01 +0200 -Subject: [PATCH 36/50] OMAP3: Beagle: decrease bootdelay to 3, use VGA for default resolution - ---- - include/configs/omap3_beagle.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 52d727a..47bc971 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -183,7 +183,7 @@ - /* partition */ - - /* Environment information */ --#define CONFIG_BOOTDELAY 10 -+#define CONFIG_BOOTDELAY 3 - - #define CONFIG_EXTRA_ENV_SETTINGS \ - "loadaddr=0x82000000\0" \ -@@ -191,7 +191,7 @@ - "console=ttyS2,115200n8\0" \ - "mpurate=500\0" \ - "vram=12M\0" \ -- "dvimode=1024x768MR-16@60\0" \ -+ "dvimode=640x480MR-16@60\0" \ - "defaultdisplay=dvi\0" \ - "mmcroot=/dev/mmcblk0p2 rw\0" \ - "mmcrootfstype=ext3 rootwait\0" \ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0037-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch b/recipes/u-boot/u-boot-git/beagleboard/0037-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch deleted file mode 100644 index 584a57281e..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0037-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 02dba49bdab65e1a96fd4593f5847b38252b66e0 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Mon, 3 May 2010 10:17:41 +0200 -Subject: [PATCH 37/50] OMAP3: beagle: pass expansionboard name in bootargs - -This makes it possible to do in-kernel fixups for expansionboards like reclaiming GPIOs ---- - board/ti/beagle/beagle.c | 7 +++++++ - include/configs/omap3_beagle.h | 3 +++ - 2 files changed, 10 insertions(+), 0 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 9300984..556e995 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -172,33 +172,40 @@ int misc_init_r(void) - printf("Recognized Tincantools Zippy expansion board (rev %d %s)\n", - expansion_config.revision, expansion_config.fab_revision); - MUX_TINCANTOOLS_ZIPPY(); -+ setenv("buddy", "zippy"); - break; - case TINCANTOOLS_ZIPPY2: - printf("Recognized Tincantools Zippy2 expansion board (rev %d %s)\n", - expansion_config.revision, expansion_config.fab_revision); - MUX_TINCANTOOLS_ZIPPY(); -+ setenv("buddy", "zippy2"); - break; - case TINCANTOOLS_TRAINER: - printf("Recognized Tincantools Trainer expansion board (rev %d %s)\n", - expansion_config.revision, expansion_config.fab_revision); - MUX_TINCANTOOLS_ZIPPY(); - MUX_TINCANTOOLS_TRAINER(); -+ setenv("buddy", "trainer"); - break; - case TINCANTOOLS_SHOWDOG: - printf("Recognized Tincantools Showdow expansion board (rev %d %s)\n", - expansion_config.revision, expansion_config.fab_revision); - /* Place holder for DSS2 definition for showdog lcd */ - setenv("defaultdisplay", "showdoglcd"); -+ setenv("buddy", "showdog"); - break; - case KBADC_BEAGLEFPGA: - printf("Recognized KBADC Beagle FPGA board\n"); - MUX_KBADC_BEAGLEFPGA(); -+ setenv("buddy", "beaglefpga"); - break; - case BEAGLE_NO_EEPROM: - printf("No EEPROM on expansion board\n"); -+ setenv("buddy", "none"); - break; - default: - printf("Unrecognized expansion board: %x\n", expansion_config.device_vendor); -+ setenv("buddy", "unknown"); - } - - if (expansion_config.content == 1) -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 47bc971..8ad52aa 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -190,6 +190,7 @@ - "usbtty=cdc_acm\0" \ - "console=ttyS2,115200n8\0" \ - "mpurate=500\0" \ -+ "buddy=none\0" \ - "vram=12M\0" \ - "dvimode=640x480MR-16@60\0" \ - "defaultdisplay=dvi\0" \ -@@ -199,6 +200,7 @@ - "nandrootfstype=jffs2\0" \ - "mmcargs=setenv bootargs console=${console} " \ - "mpurate=${mpurate} " \ -+ "buddy=${buddy} "\ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapdss.def_disp=${defaultdisplay} " \ -@@ -206,6 +208,7 @@ - "rootfstype=${mmcrootfstype}\0" \ - "nandargs=setenv bootargs console=${console} " \ - "mpurate=${mpurate} " \ -+ "buddy=${buddy} "\ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapdss.def_disp=${defaultdisplay} " \ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0038-Added-configurations-for-xM-Rev-A-board.patch b/recipes/u-boot/u-boot-git/beagleboard/0038-Added-configurations-for-xM-Rev-A-board.patch deleted file mode 100644 index 914cae2a2b..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0038-Added-configurations-for-xM-Rev-A-board.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 94462a5c200adbad2c4fc47d7fc0ca24aeb14a2a Mon Sep 17 00:00:00 2001 -From: Jason Kridner -Date: Wed, 5 May 2010 14:53:49 -0500 -Subject: [PATCH 38/50] Added configurations for xM Rev A board - -This defaults to "on" condition for USB and DVI. May want to revise for -power savings. ---- - board/ti/beagle/beagle.h | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h -index 7774855..cb7fd1c 100644 ---- a/board/ti/beagle/beagle.h -+++ b/board/ti/beagle/beagle.h -@@ -389,6 +389,10 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(UART2_TX), (IDIS | PTD | DIS | M0)) /*UART2_TX*/ - - #define MUX_BEAGLE_XM() \ -+ MUX_VAL(CP(GPMC_NCS5), (IDIS | PTD | EN | M4)) /*GPIO_56 - USB HUB reset*/\ -+ MUX_VAL(CP(GPMC_WAIT0), (IDIS | PTU | EN | M4)) /*GPIO_63 - P8 USB HUB nreset*/\ -+ MUX_VAL(CP(MMC1_DAT7), (IDIS | PTU | EN | M4)) /*GPIO_129 - DVI enable*/\ -+ MUX_VAL(CP(HDQ_SIO), (IDIS | PTU | EN | M4)) /*GPIO_170 - P8 DVI enable*/\ - MUX_VAL(CP(MCBSP3_DX), (IEN | PTD | DIS | M4)) /*GPIO_140*/\ - MUX_VAL(CP(MCBSP3_DR), (IEN | PTD | DIS | M4)) /*GPIO_142*/\ - MUX_VAL(CP(MCBSP3_CLKX), (IEN | PTD | DIS | M4)) /*GPIO_141*/\ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0039-OMAP3-beagle-setenv-beaglerev-for-AxBx-Cx-xMA-for-be.patch b/recipes/u-boot/u-boot-git/beagleboard/0039-OMAP3-beagle-setenv-beaglerev-for-AxBx-Cx-xMA-for-be.patch deleted file mode 100644 index c1b2e35690..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0039-OMAP3-beagle-setenv-beaglerev-for-AxBx-Cx-xMA-for-be.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 4b5bb4a7656dc1c4a1b985b6f5454c58ad060112 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Thu, 3 Jun 2010 19:50:57 +0200 -Subject: [PATCH 39/50] OMAP3: beagle: setenv beaglerev for AxBx/Cx/xMA for better bootscripts - ---- - board/ti/beagle/beagle.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 556e995..cdba3dd 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -221,14 +221,17 @@ int misc_init_r(void) - case REVISION_AXBX: - printf("Beagle Rev Ax/Bx\n"); - setenv("mpurate", "600"); -+ setenv("beaglerev", "AxBx"); - break; - case REVISION_CX: - printf("Beagle Rev C1/C2/C3\n"); - MUX_BEAGLE_C(); - setenv("mpurate", "600"); -+ setenv("beaglerev", "Cx"); - break; - case REVISION_C4: - printf("Beagle Rev C4\n"); -+ setenv("beaglerev", "Cx"); - MUX_BEAGLE_C(); - /* Set VAUX2 to 1.8V for EHCI PHY */ - twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, -@@ -239,6 +242,7 @@ int misc_init_r(void) - break; - case REVISION_XM: - printf("Beagle xM Rev A\n"); -+ setenv("beaglerev", "xMA"); - MUX_BEAGLE_XM(); - /* Set VAUX2 to 1.8V for EHCI PHY */ - twl4030_pmrecv_vsel_cfg(TWL4030_PM_RECEIVER_VAUX2_DEDICATED, --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0040-OMAP-mmc-add-support-for-second-and-third-mmc-channe.patch b/recipes/u-boot/u-boot-git/beagleboard/0040-OMAP-mmc-add-support-for-second-and-third-mmc-channe.patch deleted file mode 100644 index 9f09e0fa22..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0040-OMAP-mmc-add-support-for-second-and-third-mmc-channe.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 0dd14c6a6f40cb47fd8517e9e9d48f0a119e9aa9 Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Thu, 29 Apr 2010 10:28:14 -0700 -Subject: [PATCH 40/50] OMAP: mmc: add support for second and third mmc channels - -Boards wishing to use this feature should define CONFIG_SYS_MMC_SET_DEV - -Signed-off-by: Jason Kridner ---- - drivers/mmc/omap3_mmc.c | 39 +++++++++++++++++++++++++++- - include/asm-arm/arch-omap3/mmc_host_def.h | 15 +++++++++-- - 2 files changed, 49 insertions(+), 5 deletions(-) - -diff --git a/drivers/mmc/omap3_mmc.c b/drivers/mmc/omap3_mmc.c -index 96c0e65..bf650ba 100644 ---- a/drivers/mmc/omap3_mmc.c -+++ b/drivers/mmc/omap3_mmc.c -@@ -52,7 +52,27 @@ const unsigned short mmc_transspeed_val[15][4] = { - - mmc_card_data cur_card_data; - static block_dev_desc_t mmc_blk_dev; --static hsmmc_t *mmc_base = (hsmmc_t *)OMAP_HSMMC_BASE; -+static hsmmc_t *mmc_base = (hsmmc_t *)OMAP_HSMMC1_BASE; -+ -+unsigned char mmc_set_dev(int dev) -+{ -+ switch (dev) { -+ case 1: -+ mmc_base = (hsmmc_t *)OMAP_HSMMC1_BASE; -+ break; -+ case 2: -+ mmc_base = (hsmmc_t *)OMAP_HSMMC2_BASE; -+ break; -+ case 3: -+ mmc_base = (hsmmc_t *)OMAP_HSMMC3_BASE; -+ break; -+ default: -+ mmc_base = (hsmmc_t *)OMAP_HSMMC1_BASE; -+ return 1; -+ } -+ -+ return 0; -+} - - block_dev_desc_t *mmc_get_dev(int dev) - { -@@ -62,6 +82,7 @@ block_dev_desc_t *mmc_get_dev(int dev) - unsigned char mmc_board_init(void) - { - t2_t *t2_base = (t2_t *)T2_BASE; -+ struct prcm *prcm_base = (struct prcm *)PRCM_BASE; - - #if defined(CONFIG_TWL4030_POWER) - twl4030_power_mmc_init(); -@@ -74,6 +95,17 @@ unsigned char mmc_board_init(void) - writel(readl(&t2_base->devconf0) | MMCSDIO1ADPCLKISEL, - &t2_base->devconf0); - -+ writel(readl(&t2_base->devconf1) | MMCSDIO2ADPCLKISEL, -+ &t2_base->devconf1); -+ -+ writel(readl(&prcm_base->fclken1_core) | -+ EN_MMC1 | EN_MMC2 | EN_MMC3, -+ &prcm_base->fclken1_core); -+ -+ writel(readl(&prcm_base->iclken1_core) | -+ EN_MMC1 | EN_MMC2 | EN_MMC3, -+ &prcm_base->iclken1_core); -+ - return 1; - } - -@@ -512,8 +544,11 @@ unsigned long mmc_bread(int dev_num, unsigned long blknr, lbaint_t blkcnt, - return 1; - } - --int mmc_legacy_init(int verbose) -+int mmc_legacy_init(int dev) - { -+ if (mmc_set_dev(dev) != 0) -+ return 1; -+ - if (configure_mmc(&cur_card_data) != 1) - return 1; - -diff --git a/include/asm-arm/arch-omap3/mmc_host_def.h b/include/asm-arm/arch-omap3/mmc_host_def.h -index aa751c9..43dd705 100644 ---- a/include/asm-arm/arch-omap3/mmc_host_def.h -+++ b/include/asm-arm/arch-omap3/mmc_host_def.h -@@ -29,13 +29,20 @@ - #define T2_BASE 0x48002000 - - typedef struct t2 { -- unsigned char res1[0x274]; -+ unsigned char res1[0x274]; /* 0x000 */ - unsigned int devconf0; /* 0x274 */ -- unsigned char res2[0x2A8]; -+ unsigned char res2[0x060]; /* 0x278 */ -+ unsigned int devconf1; /* 0x2D8 */ -+ unsigned char res3[0x244]; /* 0x2DC */ - unsigned int pbias_lite; /* 0x520 */ - } t2_t; - - #define MMCSDIO1ADPCLKISEL (1 << 24) -+#define MMCSDIO2ADPCLKISEL (1 << 6) -+ -+#define EN_MMC1 (1 << 24) -+#define EN_MMC2 (1 << 25) -+#define EN_MMC3 (1 << 30) - - #define PBIASLITEPWRDNZ0 (1 << 1) - #define PBIASSPEEDCTRL0 (1 << 2) -@@ -44,7 +51,9 @@ typedef struct t2 { - /* - * OMAP HSMMC register definitions - */ --#define OMAP_HSMMC_BASE 0x4809C000 -+#define OMAP_HSMMC1_BASE 0x4809C000 -+#define OMAP_HSMMC2_BASE 0x480B4000 -+#define OMAP_HSMMC3_BASE 0x480AD000 - - typedef struct hsmmc { - unsigned char res1[0x10]; --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0041-OMAP3-Beagle-enable-support-for-second-and-third-mmc.patch b/recipes/u-boot/u-boot-git/beagleboard/0041-OMAP3-Beagle-enable-support-for-second-and-third-mmc.patch deleted file mode 100644 index 2449ab20a5..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0041-OMAP3-Beagle-enable-support-for-second-and-third-mmc.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 8da9e2bac6daf2d61d7ca9d689790fc9ce5de9cb Mon Sep 17 00:00:00 2001 -From: Steve Sakoman -Date: Fri, 7 May 2010 07:40:26 -0700 -Subject: [PATCH 41/50] OMAP3: Beagle: enable support for second and third mmc channels - -Based on 629a01965677e680ffa1fe76579ace7f69dd45b9, but removed BOOTDELAY change. ---- - include/configs/omap3_beagle.h | 8 +++++--- - 1 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 8ad52aa..e4c88f2 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -95,6 +95,7 @@ - 115200} - #define CONFIG_MMC 1 - #define CONFIG_OMAP3_MMC 1 -+#define CONFIG_SYS_MMC_SET_DEV 1 - #define CONFIG_DOS_PARTITION 1 - - /* DDR - I use Micron DDR */ -@@ -194,6 +195,7 @@ - "vram=12M\0" \ - "dvimode=640x480MR-16@60\0" \ - "defaultdisplay=dvi\0" \ -+ "mmcdev=1\0" \ - "mmcroot=/dev/mmcblk0p2 rw\0" \ - "mmcrootfstype=ext3 rootwait\0" \ - "nandroot=/dev/mtdblock4 rw\0" \ -@@ -214,10 +216,10 @@ - "omapdss.def_disp=${defaultdisplay} " \ - "root=${nandroot} " \ - "rootfstype=${nandrootfstype}\0" \ -- "loadbootscript=fatload mmc 0 ${loadaddr} boot.scr\0" \ -+ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ - "source ${loadaddr}\0" \ -- "loaduimage=fatload mmc 0 ${loadaddr} uImage\0" \ -+ "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ - "mmcboot=echo Booting from mmc ...; " \ - "run mmcargs; " \ - "bootm ${loadaddr}\0" \ -@@ -227,7 +229,7 @@ - "bootm ${loadaddr}\0" \ - - #define CONFIG_BOOTCOMMAND \ -- "if mmc init; then " \ -+ "if mmc init ${mmcdev}; then " \ - "if run loadbootscript; then " \ - "run bootscript; " \ - "else " \ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0043-Add-led-command.patch b/recipes/u-boot/u-boot-git/beagleboard/0043-Add-led-command.patch deleted file mode 100644 index 8d19d1ed2a..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0043-Add-led-command.patch +++ /dev/null @@ -1,256 +0,0 @@ -From 1fc5c28bc260c72b4f9cefdf55bfd10504916457 Mon Sep 17 00:00:00 2001 -From: Jason Kridner -Date: Thu, 20 May 2010 05:41:26 -0500 -Subject: [PATCH 43/50] Add 'led' command - -This patch allows any board implementing the coloured LED API -to control the LEDs from the console. - -led [green | yellow | red | all ] [ on | off ] - -or - -led [ 1 | 2 | 3 | all ] [ on | off ] - -Adds configuration item CONFIG_CMD_LED enabling the command. - -Partially based on patch from Ulf Samuelsson: -http://www.mail-archive.com/u-boot@lists.denx.de/msg09593.html. -(cherry picked from commit aaf47f8d6af81393b7d3275d69b5dbdf07a3d6fb) -(cherry picked from commit 3d314bf59a48c2ee93d06d50b81f109af6a6c1ec) - -Signed-off-by: Jason Kridner ---- - common/Makefile | 1 + - common/cmd_led.c | 207 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 208 insertions(+), 0 deletions(-) - create mode 100644 common/cmd_led.c - -diff --git a/common/Makefile b/common/Makefile -index dbf7a05..1d717ca 100644 ---- a/common/Makefile -+++ b/common/Makefile -@@ -106,6 +106,7 @@ COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o - COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o - COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o - COBJS-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o -+COBJS-$(CONFIG_CMD_LED) += cmd_led.o - COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o - COBJS-y += cmd_load.o - COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o -diff --git a/common/cmd_led.c b/common/cmd_led.c -new file mode 100644 -index 0000000..3b7b534 ---- /dev/null -+++ b/common/cmd_led.c -@@ -0,0 +1,207 @@ -+/* -+ * (C) Copyright 2010 -+ * Jason Kridner -+ * -+ * Based on cmd_led.c patch from: -+ * http://www.mail-archive.com/u-boot@lists.denx.de/msg06873.html -+ * (C) Copyright 2008 -+ * Ulf Samuelsson -+ * -+ * See file CREDITS for list of people who contributed to this -+ * project. -+ * -+ * This program is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of -+ * the License, or (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, -+ * MA 02111-1307 USA -+ */ -+ -+/* -+ * This file provides a shell like 'test' function to return -+ * true/false from an integer or string compare of two memory -+ * locations or a location and a scalar/literal. -+ * A few parts were lifted from bash 'test' command -+ */ -+ -+#include -+#include -+#include -+#include -+ -+int do_led ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[] ) -+{ -+#ifdef CONFIG_BOARD_SPECIFIC_LED -+ led_id_t mask; -+#endif -+ int state; -+ -+ /* Validate arguments */ -+ if ((argc != 3)){ -+ printf("Usage:\n%s\n", cmdtp->usage); -+ return 1; -+ } -+ -+ if (strcmp(argv[2], "off") == 0) { -+ state = 0; -+ } else if (strcmp(argv[2], "on") == 0) { -+ state = 1; -+ } else { -+ printf ("Usage:\n%s\n", cmdtp->usage); -+ return 1; -+ } -+ -+#if defined(STATUS_LED_BIT) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ if (strcmp(argv[1], "0") == 0) { -+ mask = STATUS_LED_BIT; -+ __led_set(mask, state); -+ } -+ else -+#endif -+#if defined(STATUS_LED_BIT1) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ if (strcmp(argv[1], "1") == 0) { -+ mask = STATUS_LED_BIT1; -+ __led_set(mask, state); -+ } -+ else -+#endif -+#if defined(STATUS_LED_BIT2) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ if (strcmp(argv[1], "2") == 0) { -+ mask = STATUS_LED_BIT2; -+ __led_set(mask, state); -+ } -+ else -+#endif -+#if defined(STATUS_LED_BIT3) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ if (strcmp(argv[1], "3") == 0) { -+ mask = STATUS_LED_BIT3; -+ __led_set(mask, state); -+ } -+ else -+#endif -+#ifdef STATUS_LED_RED -+ if (strcmp(argv[1], "red") == 0) { -+ if (state == 0) -+ red_LED_off(); -+ else -+ red_LED_on(); -+ } -+ else -+#endif -+#ifdef STATUS_LED_GREEN -+ if (strcmp(argv[1], "green") == 0) { -+ if (state == 0) -+ green_LED_off(); -+ else -+ green_LED_on(); -+ } -+ else -+#endif -+#ifdef STATUS_LED_YELLOW -+ if (strcmp(argv[1], "yellow") == 0) { -+ if (state == 0) -+ yellow_LED_off(); -+ else -+ yellow_LED_on(); -+ } -+ else -+#endif -+#ifdef STATUS_LED_BLUE -+ if (strcmp(argv[1], "blue") == 0) { -+ if (state == 0) -+ blue_LED_off(); -+ else -+ blue_LED_on(); -+ } -+ else -+#endif -+ if (strcmp(argv[1], "all") == 0) { -+ mask = 0 -+#if defined(STATUS_LED_BIT) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ | STATUS_LED_BIT -+#endif -+#if defined(STATUS_LED_BIT1) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ | STATUS_LED_BIT1 -+#endif -+#if defined(STATUS_LED_BIT2) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ | STATUS_LED_BIT2 -+#endif -+#if defined(STATUS_LED_BIT3) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ | STATUS_LED_BIT3 -+#endif -+ ; -+#ifdef CONFIG_BOARD_SPECIFIC_LED -+ __led_set(mask, state); -+#endif -+#ifdef STATUS_LED_RED -+ if (state == 0) -+ red_LED_off(); -+ else -+ red_LED_on(); -+#endif -+#ifdef STATUS_LED_GREEN -+ if (state == 0) -+ green_LED_off(); -+ else -+ green_LED_on(); -+#endif -+#ifdef STATUS_LED_YELLOW -+ if (state == 0) -+ yellow_LED_off(); -+ else -+ yellow_LED_on(); -+#endif -+#ifdef STATUS_LED_BLUE -+ if (state == 0) -+ blue_LED_off(); -+ else -+ blue_LED_on(); -+#endif -+ } else { -+ printf ("Usage:\n%s\n", cmdtp->usage); -+ return 1; -+ } -+ -+ return 0; -+} -+ -+U_BOOT_CMD( -+ led, 3, 1, do_led, -+ "led\t- [" -+#if defined(STATUS_LED_BIT) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ "0|" -+#endif -+#if defined(STATUS_LED_BIT1) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ "1|" -+#endif -+#if defined(STATUS_LED_BIT2) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ "2|" -+#endif -+#if defined(STATUS_LED_BIT3) && defined(CONFIG_BOARD_SPECIFIC_LED) -+ "3|" -+#endif -+#ifdef STATUS_LED_GREEN -+ "green|" -+#endif -+#ifdef STATUS_LED_YELLOW -+ "yellow|" -+#endif -+#ifdef STATUS_LED_RED -+ "red|" -+#endif -+#ifdef STATUS_LED_BLUE -+ "blue|" -+#endif -+ "all] [on|off]\n", -+ "led [led_name] [on|off] sets or clears led(s)\n" -+); -+ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0044-BeagleBoard-Enabled-LEDs.patch b/recipes/u-boot/u-boot-git/beagleboard/0044-BeagleBoard-Enabled-LEDs.patch deleted file mode 100644 index b94f58c7cb..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0044-BeagleBoard-Enabled-LEDs.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 40049e97a5a97d597f8754ff1b39d931053eb465 Mon Sep 17 00:00:00 2001 -From: Jason Kridner -Date: Wed, 19 May 2010 05:14:43 -0500 -Subject: [PATCH 44/50] BeagleBoard: Enabled LEDs - -Added LED driver using status_led. USR0 is set to monitor the boot -status. USR1 is set to be the GREEN LED. - -Signed-off-by: Jason Kridner ---- - include/configs/omap3_beagle.h | 13 +++++++++++++ - 1 files changed, 13 insertions(+), 0 deletions(-) - -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index e4c88f2..053f5df 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -98,6 +98,18 @@ - #define CONFIG_SYS_MMC_SET_DEV 1 - #define CONFIG_DOS_PARTITION 1 - -+/* Status LED */ -+#define CONFIG_STATUS_LED 1 -+#define CONFIG_BOARD_SPECIFIC_LED 1 -+#define STATUS_LED_BIT 0x01 -+#define STATUS_LED_STATE STATUS_LED_ON -+#define STATUS_LED_PERIOD (CONFIG_SYS_HZ / 2) -+#define STATUS_LED_BIT1 0x02 -+#define STATUS_LED_STATE1 STATUS_LED_ON -+#define STATUS_LED_PERIOD1 (CONFIG_SYS_HZ / 2) -+#define STATUS_LED_BOOT STATUS_LED_BIT -+#define STATUS_LED_GREEN STATUS_LED_BIT1 -+ - /* DDR - I use Micron DDR */ - #define CONFIG_OMAP3_MICRON_DDR 1 - -@@ -138,6 +150,7 @@ - #define CONFIG_CMD_I2C /* I2C serial bus support */ - #define CONFIG_CMD_MMC /* MMC support */ - #define CONFIG_CMD_NAND /* NAND support */ -+#define CONFIG_CMD_LED /* LED support */ - #define CONFIG_VIDEO_OMAP3 /* DSS Support */ - - #undef CONFIG_CMD_FLASH /* flinfo, erase, protect */ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0046-BeagleBoard-Add-CONFIG_SYS_MEMTEST_SCRATCH.patch b/recipes/u-boot/u-boot-git/beagleboard/0046-BeagleBoard-Add-CONFIG_SYS_MEMTEST_SCRATCH.patch deleted file mode 100644 index 79723e4d27..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0046-BeagleBoard-Add-CONFIG_SYS_MEMTEST_SCRATCH.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 631cd4e4a02faa5726c058626390bee97188f456 Mon Sep 17 00:00:00 2001 -From: Steven Kipisz -Date: Fri, 4 Jun 2010 10:31:04 -0500 -Subject: [PATCH 46/50] BeagleBoard: Add CONFIG_SYS_MEMTEST_SCRATCH - -Add CONFIG_SYS_MEMTEST_SCRATCH to point to a scratch memory area. - -Signed-off-by: Jason Kridner ---- - include/configs/omap3_beagle.h | 9 +++++---- - 1 files changed, 5 insertions(+), 4 deletions(-) - -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 053f5df..b265b0c 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -269,10 +269,11 @@ - /* Boot Argument Buffer Size */ - #define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE) - --#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0) /* memtest */ -- /* works on */ --#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \ -- 0x01F00000) /* 31MB */ -+#define CONFIG_SYS_ALT_MEMTEST 1 -+#define CONFIG_SYS_MEMTEST_START (0x82000000) /* memtest */ -+ /* defaults */ -+#define CONFIG_SYS_MEMTEST_END (0x87FFFFFF) /* 128MB */ -+#define CONFIG_SYS_MEMTEST_SCRATCH (0x81000000) /* dummy address */ - - #define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0) /* default */ - /* load address */ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0047-BeagleBoard-Adjust-boot-command-on-USER-button.patch b/recipes/u-boot/u-boot-git/beagleboard/0047-BeagleBoard-Adjust-boot-command-on-USER-button.patch deleted file mode 100644 index 2036e1beb2..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0047-BeagleBoard-Adjust-boot-command-on-USER-button.patch +++ /dev/null @@ -1,115 +0,0 @@ -From d3f9ba7264111551ea11f33aadbecc15c87a4332 Mon Sep 17 00:00:00 2001 -From: Jason Kridner -Date: Wed, 21 Jul 2010 08:47:59 -0500 -Subject: [PATCH 47/50] BeagleBoard: Adjust boot command on USER button - -When the USER button is pressed, the default boot command will attempt -to load user.scr. If that fails, it will try to load a ramdisk image. - -This version also sets the rootfstype and assumes that the userbutton -command returns success (0) when the button is pressed. It also really -attempts to load the user.scr file. ---- - include/configs/omap3_beagle.h | 51 ++++++++++++++++++++++++++++++++++----- - 1 files changed, 44 insertions(+), 7 deletions(-) - -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index b265b0c..1a76004 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -200,9 +200,12 @@ - #define CONFIG_BOOTDELAY 3 - - #define CONFIG_EXTRA_ENV_SETTINGS \ -- "loadaddr=0x82000000\0" \ -+ "loadaddr=0x80200000\0" \ -+ "rdaddr=0x81600000\0" \ - "usbtty=cdc_acm\0" \ - "console=ttyS2,115200n8\0" \ -+ "optargs=\0" \ -+ "bootscr=boot.scr\0" \ - "mpurate=500\0" \ - "buddy=none\0" \ - "vram=12M\0" \ -@@ -213,7 +216,10 @@ - "mmcrootfstype=ext3 rootwait\0" \ - "nandroot=/dev/mtdblock4 rw\0" \ - "nandrootfstype=jffs2\0" \ -+ "ramroot=/dev/ram0 rw\0" \ -+ "ramrootfstype=ext2\0" \ - "mmcargs=setenv bootargs console=${console} " \ -+ "${optargs} " \ - "mpurate=${mpurate} " \ - "buddy=${buddy} "\ - "vram=${vram} " \ -@@ -222,6 +228,7 @@ - "root=${mmcroot} " \ - "rootfstype=${mmcrootfstype}\0" \ - "nandargs=setenv bootargs console=${console} " \ -+ "${optargs} " \ - "mpurate=${mpurate} " \ - "buddy=${buddy} "\ - "vram=${vram} " \ -@@ -229,7 +236,18 @@ - "omapdss.def_disp=${defaultdisplay} " \ - "root=${nandroot} " \ - "rootfstype=${nandrootfstype}\0" \ -- "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} boot.scr\0" \ -+ "loadbootscript=fatload mmc ${mmcdev} ${loadaddr} ${bootscr}\0" \ -+ "ramargs=setenv bootargs console=${console} " \ -+ "${optargs} " \ -+ "mpurate=${mpurate} " \ -+ "buddy=${buddy} "\ -+ "vram=${vram} " \ -+ "omapfb.mode=dvi:${dvimode} " \ -+ "omapdss.def_disp=${defaultdisplay} " \ -+ "root=${ramroot} rw ramdisk_size=65536 " \ -+ "initrd=${rdaddr},64M " \ -+ "rootfstype=${ramrootfstype}\0" \ -+ "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ - "source ${loadaddr}\0" \ - "loaduimage=fatload mmc ${mmcdev} ${loadaddr} uImage\0" \ -@@ -240,15 +258,34 @@ - "run nandargs; " \ - "nand read ${loadaddr} 280000 400000; " \ - "bootm ${loadaddr}\0" \ -+ "ramboot=echo Booting from ramdisk ...; " \ -+ "run ramargs; " \ -+ "bootm ${loadaddr}\0" \ - - #define CONFIG_BOOTCOMMAND \ - "if mmc init ${mmcdev}; then " \ -- "if run loadbootscript; then " \ -- "run bootscript; " \ -+ "if userbutton; then " \ -+ "setenv bootscr user.scr;" \ -+ "if run loadbootscript; then " \ -+ "run bootscript; " \ -+ "else " \ -+ "if run loaduimage; then " \ -+ "if run loadramdisk; then " \ -+ "run ramboot; " \ -+ "else " \ -+ "run mmcboot; " \ -+ "fi; " \ -+ "fi; " \ -+ "fi; " \ - "else " \ -- "if run loaduimage; then " \ -- "run mmcboot; " \ -- "else run nandboot; " \ -+ "setenv bootscr boot.scr; " \ -+ "if run loadbootscript; then " \ -+ "run bootscript; " \ -+ "else " \ -+ "if run loaduimage; then " \ -+ "run mmcboot; " \ -+ "else run nandboot; " \ -+ "fi; " \ - "fi; " \ - "fi; " \ - "else run nandboot; fi" --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0048-BeagleBoard-Enable-pullups-on-i2c2.patch b/recipes/u-boot/u-boot-git/beagleboard/0048-BeagleBoard-Enable-pullups-on-i2c2.patch deleted file mode 100644 index 25cf7b1448..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0048-BeagleBoard-Enable-pullups-on-i2c2.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 35e971eea9c9d9cb690da0509e0f8a48a2cb1269 Mon Sep 17 00:00:00 2001 -From: Steve Kipisz -Date: Thu, 5 Aug 2010 10:36:07 -0500 -Subject: [PATCH 48/50] BeagleBoard: Enable pullups on i2c2. - ---- - board/ti/beagle/beagle.c | 2 ++ - include/asm-arm/arch-omap3/omap3.h | 9 +++++++++ - 2 files changed, 11 insertions(+), 0 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index 66df719..ee6bad2 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -171,6 +171,8 @@ int misc_init_r(void) - struct gpio *gpio5_base = (struct gpio *)OMAP34XX_GPIO5_BASE; - struct gpio *gpio6_base = (struct gpio *)OMAP34XX_GPIO6_BASE; - -+ /* Enable i22 pullup resisters */ -+ *(ulong *)(CONTROL_PROG_IO1) &= ~(PRG_I2C2_PULLUPRESX); - beagle_identify(); - - printf("\nProbing for expansion boards, if none are connected you'll see a harmless I2C error.\n\n"); -diff --git a/include/asm-arm/arch-omap3/omap3.h b/include/asm-arm/arch-omap3/omap3.h -index 3957c79..1860dff 100644 ---- a/include/asm-arm/arch-omap3/omap3.h -+++ b/include/asm-arm/arch-omap3/omap3.h -@@ -50,6 +50,15 @@ - /* CONTROL */ - #define OMAP34XX_CTRL_BASE (OMAP34XX_L4_IO_BASE + 0x2000) - -+/* Signal Integrity Parameter Control Registers */ -+#define CONTROL_PROG_IO0 0x48002444 -+#define CONTROL_PROG_IO1 0x48002448 -+#define CONTROL_PROG_IO2 0x48002408 -+#define CONTROL_PROG_IO_WKUP1 0x48002A80 -+ -+/* Bit definition for CONTROL_PROG_IO1 */ -+#define PRG_I2C2_PULLUPRESX 0x00000001 -+ - /* UART */ - #define OMAP34XX_UART1 (OMAP34XX_L4_IO_BASE + 0x6a000) - #define OMAP34XX_UART2 (OMAP34XX_L4_IO_BASE + 0x6c000) --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0049-BeagleBoard-Add-camera-to-default-bootargs.patch b/recipes/u-boot/u-boot-git/beagleboard/0049-BeagleBoard-Add-camera-to-default-bootargs.patch deleted file mode 100644 index 3c43a7d5b0..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0049-BeagleBoard-Add-camera-to-default-bootargs.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 0a49d60caf30738f13b60a71e740e28f4e7af902 Mon Sep 17 00:00:00 2001 -From: Jason Kridner -Date: Thu, 5 Aug 2010 13:54:12 -0500 -Subject: [PATCH 49/50] BeagleBoard: Add camera to default bootargs - -Signed-off-by: Jason Kridner ---- - include/configs/omap3_beagle.h | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) - -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 1a76004..48ad805 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -208,6 +208,7 @@ - "bootscr=boot.scr\0" \ - "mpurate=500\0" \ - "buddy=none\0" \ -+ "camera=lbcm3m1\0" \ - "vram=12M\0" \ - "dvimode=640x480MR-16@60\0" \ - "defaultdisplay=dvi\0" \ -@@ -222,6 +223,7 @@ - "${optargs} " \ - "mpurate=${mpurate} " \ - "buddy=${buddy} "\ -+ "camera=${camera} "\ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapdss.def_disp=${defaultdisplay} " \ -@@ -231,6 +233,7 @@ - "${optargs} " \ - "mpurate=${mpurate} " \ - "buddy=${buddy} "\ -+ "camera=${camera} "\ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapdss.def_disp=${defaultdisplay} " \ -@@ -241,6 +244,7 @@ - "${optargs} " \ - "mpurate=${mpurate} " \ - "buddy=${buddy} "\ -+ "camera=${camera} "\ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapdss.def_disp=${defaultdisplay} " \ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0050-BeagleBoard-move-ramdisk-parameters.patch b/recipes/u-boot/u-boot-git/beagleboard/0050-BeagleBoard-move-ramdisk-parameters.patch deleted file mode 100644 index 3e79a08228..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0050-BeagleBoard-move-ramdisk-parameters.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 21738fa5ae05dd5060cf755ac0460f5d1f27e910 Mon Sep 17 00:00:00 2001 -From: Jason Kridner -Date: Wed, 11 Aug 2010 14:50:38 -0500 -Subject: [PATCH 50/50] BeagleBoard: move ramdisk parameters - -This will make it easier to reprogram the ramdisk size. - -Signed-off-by: Jason Kridner ---- - include/configs/omap3_beagle.h | 5 ++--- - 1 files changed, 2 insertions(+), 3 deletions(-) - -diff --git a/include/configs/omap3_beagle.h b/include/configs/omap3_beagle.h -index 48ad805..4f5c1d4 100644 ---- a/include/configs/omap3_beagle.h -+++ b/include/configs/omap3_beagle.h -@@ -217,7 +217,7 @@ - "mmcrootfstype=ext3 rootwait\0" \ - "nandroot=/dev/mtdblock4 rw\0" \ - "nandrootfstype=jffs2\0" \ -- "ramroot=/dev/ram0 rw\0" \ -+ "ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=${rdaddr},64M\0" \ - "ramrootfstype=ext2\0" \ - "mmcargs=setenv bootargs console=${console} " \ - "${optargs} " \ -@@ -248,8 +248,7 @@ - "vram=${vram} " \ - "omapfb.mode=dvi:${dvimode} " \ - "omapdss.def_disp=${defaultdisplay} " \ -- "root=${ramroot} rw ramdisk_size=65536 " \ -- "initrd=${rdaddr},64M " \ -+ "root=${ramroot} " \ - "rootfstype=${ramrootfstype}\0" \ - "loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz\0" \ - "bootscript=echo Running bootscript from mmc ...; " \ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/beagleboard/0051-add-support-for-beagleboardtoys-expansionboards.patch b/recipes/u-boot/u-boot-git/beagleboard/0051-add-support-for-beagleboardtoys-expansionboards.patch deleted file mode 100644 index 3f75a60ba3..0000000000 --- a/recipes/u-boot/u-boot-git/beagleboard/0051-add-support-for-beagleboardtoys-expansionboards.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 05c4ef3b0963cef095075486820b030226ced7c3 Mon Sep 17 00:00:00 2001 -From: Koen Kooi -Date: Tue, 8 Feb 2011 12:02:46 +0100 -Subject: [PATCH 51/51] add support for beagleboardtoys expansionboards - -Signed-off-by: Koen Kooi ---- - board/ti/beagle/beagle.c | 15 +++++++++++++++ - board/ti/beagle/beagle.h | 10 ++++++++++ - 2 files changed, 25 insertions(+), 0 deletions(-) - -diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c -index ee6bad2..fdd9c09 100644 ---- a/board/ti/beagle/beagle.c -+++ b/board/ti/beagle/beagle.c -@@ -62,12 +62,16 @@ static struct { - #define HYR_VENDORID 0x0400 - #define MENTOREL_VENDORID 0x0500 - #define KBADC_VENDORID 0x0600 -+#define BBTOYS_VENDORID 0x0B00 - - #define TINCANTOOLS_ZIPPY 0x01000100 - #define TINCANTOOLS_ZIPPY2 0x02000100 - #define TINCANTOOLS_TRAINER 0x04000100 - #define TINCANTOOLS_SHOWDOG 0x03000100 - #define KBADC_BEAGLEFPGA 0x01000600 -+#define BBTOYS_WIFI 0x01000B00 -+#define BBTOYS_VGA 0x02000B00 -+#define BBTOYS_LCD 0x03000B00 - - #define BEAGLE_NO_EEPROM 0xffffffff - -@@ -209,6 +213,17 @@ int misc_init_r(void) - MUX_KBADC_BEAGLEFPGA(); - setenv("buddy", "beaglefpga"); - break; -+ case BBTOYS_WIFI: -+ printf("Recognized Beagleboardtoys wifi board\n"); -+ MUX_BBTOYS_WIFI() -+ setenv("buddy", "bbtoys-wifi"); -+ break;; -+ case BBTOYS_VGA: -+ printf("Recognized Beagleboardtoys VGA board\n"); -+ break;; -+ case BBTOYS_LCD: -+ printf("Recognized Beagleboardtoys LCD board\n"); -+ break;; - case BEAGLE_NO_EEPROM: - printf("No EEPROM on expansion board\n"); - setenv("buddy", "none"); -diff --git a/board/ti/beagle/beagle.h b/board/ti/beagle/beagle.h -index cb7fd1c..2dc6ee6 100644 ---- a/board/ti/beagle/beagle.h -+++ b/board/ti/beagle/beagle.h -@@ -459,6 +459,16 @@ const omap3_sysinfo sysinfo = { - MUX_VAL(CP(MCBSP1_DR), (IEN | PTU | EN | M1)) /*MCSPI4_SOMI*/\ - MUX_VAL(CP(MCBSP1_FSX), (IDIS | PTU | DIS | M1)) /*MCSPI4_CS0*/\ - -+#define MUX_BBTOYS_WIFI() \ -+ MUX_VAL(CP(MMC2_CLK), (IEN | PTU | EN | M0)) /*MMC2_CLK*/\ -+ MUX_VAL(CP(MMC2_CMD), (IEN | PTU | EN | M0)) /*MMC2_CMD*/\ -+ MUX_VAL(CP(MMC2_DAT0), (IEN | PTU | EN | M0)) /*MMC2_DAT0*/\ -+ MUX_VAL(CP(MMC2_DAT1), (IEN | PTU | EN | M0)) /*MMC2_DAT1*/\ -+ MUX_VAL(CP(MMC2_DAT2), (IEN | PTU | EN | M0)) /*MMC2_DAT2*/\ -+ MUX_VAL(CP(MMC2_DAT3), (IEN | PTU | EN | M0)) /*MMC2_DAT3*/\ -+ MUX_VAL(CP(MMC2_DAT5), (IEN | PTU | EN | M4)) /*GPIO_137*/\ -+ MUX_VAL(CP(MMC2_DAT7), (IDIS | PTD | DIS | M4)) /*GPIO_139*/\ -+ - /* - * Display Configuration - */ --- -1.6.6.1 - diff --git a/recipes/u-boot/u-boot-git/fix-break-caused-by-new-binutils.patch b/recipes/u-boot/u-boot-git/fix-break-caused-by-new-binutils.patch new file mode 100644 index 0000000000..16bc9803bd --- /dev/null +++ b/recipes/u-boot/u-boot-git/fix-break-caused-by-new-binutils.patch @@ -0,0 +1,31 @@ +Index: git/arch/arm/cpu/armv7/omap4/Makefile +=================================================================== +--- git.orig/arch/arm/cpu/armv7/omap4/Makefile ++++ git/arch/arm/cpu/armv7/omap4/Makefile +@@ -26,6 +26,8 @@ include $(TOPDIR)/config.mk + LIB = $(obj)lib$(SOC).o + + SOBJS += lowlevel_init.o ++plus_sec := $(call as-instr,.arch_extension sec,+sec) ++lowlevel_init.o: AFLAGS += -Wa,-march=armv7-a$(plus_sec) + + COBJS += board.o + COBJS += mem.o +Index: git/config.mk +=================================================================== +--- git.orig/config.mk ++++ git/config.mk +@@ -266,3 +266,13 @@ cmd_link_o_target = $(if $(strip $1),\ + rm -f $@; $(AR) rcs $@ ) + + ######################################################################### ++ ++# Tries to compile an assembly instruction ++as-instr = $(shell if echo -e "$(1)" | \ ++ $(CC) $(AFLAGS) -c -xassembler - \ ++ -o $(TMPOUT)astest$$$$.out > /dev/null 2>&1; \ ++ then rm $(TMPOUT)astest$$$$.out; echo "$(2)"; \ ++ else echo "$(3)"; fi) ++ ++######################################################################### ++ diff --git a/recipes/u-boot/u-boot.inc b/recipes/u-boot/u-boot.inc index 88c6a4d18f..ffd1e1eb74 100644 --- a/recipes/u-boot/u-boot.inc +++ b/recipes/u-boot/u-boot.inc @@ -16,6 +16,7 @@ UBOOT_MACHINE ?= "${MACHINE}_config" UBOOT_BINARY ?= "u-boot.bin" UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin" UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin" +UBOOT_MAKE_TARGET ?= "all" do_configure () { oe_runmake ${UBOOT_MACHINE} @@ -25,7 +26,7 @@ do_compile () { unset LDFLAGS unset CFLAGS unset CPPFLAGS - oe_runmake all + oe_runmake ${UBOOT_MAKE_TARGET} oe_runmake tools env HOSTCC="${CC}" } diff --git a/recipes/u-boot/u-boot_2010.06-psp04.00.00.10.bb b/recipes/u-boot/u-boot_2010.06-psp04.00.00.10.bb new file mode 100644 index 0000000000..2c4d12033a --- /dev/null +++ b/recipes/u-boot/u-boot_2010.06-psp04.00.00.10.bb @@ -0,0 +1,13 @@ +require u-boot-omap3.inc + +COMPATIBLE_MACHINE = "ti816x" + +BRANCH = "master" + +# Use literal tags in SRCREV, when available, instead of commit IDs +SRCREV = "v2010.06_TI816XPSP_04.00.00.10" + +UVER = "2010.06" +PSPREL = "04.00.00.10" + +PR = "r1" diff --git a/recipes/u-boot/u-boot_2010.06-psp04.01.00.03.bb b/recipes/u-boot/u-boot_2010.06-psp04.01.00.03.bb new file mode 100644 index 0000000000..d4a2afc26b --- /dev/null +++ b/recipes/u-boot/u-boot_2010.06-psp04.01.00.03.bb @@ -0,0 +1,14 @@ +require u-boot-omap3.inc + +COMPATIBLE_MACHINE = "ti814x" + +DEFAULT_PREFERENCE_ti814x = "1" +BRANCH = "master" + +# Use literal tags in SRCREV, when available, instead of commit IDs +SRCREV = "v2010.06_TI814XPSP_04.01.00.03" + +UVER = "2010.06" +PSPREL = "04.01.00.03" + +PR = "r1" diff --git a/recipes/u-boot/u-boot_git.bb b/recipes/u-boot/u-boot_git.bb index 410e0b1ca3..767a368b37 100644 --- a/recipes/u-boot/u-boot_git.bb +++ b/recipes/u-boot/u-boot_git.bb @@ -1,5 +1,5 @@ require u-boot.inc -PR = "r72" +PR = "r75" FILESPATHPKG =. "u-boot-git:" @@ -26,61 +26,26 @@ SRC_URI_append_bug20 = "file://bug-uboot.patch" SRC_URI_append_bug20 += "file://bug-video-setting.patch" SRC_URI_beagleboard = "git://www.denx.de/git/u-boot.git;protocol=git \ - file://0001-Enable-I2C-bus-switching.patch \ - file://0002-OMAP3-add-board-revision-detection-for-Overo.patch \ - file://0003-OMAP3-update-Beagle-revision-detection-to-recognize-.patch \ - file://0004-OMAP3-Set-VAUX2-to-1.8V-for-EHCI-PHY-on-Beagle-Rev-C.patch \ - file://0005-OMAP3-add-entry-for-rev-3.1.2-check-and-display-max-.patch \ - file://0006-OMAP3-add-mpurate-boot-arg-for-overo-and-beagle.patch \ - file://0007-OMAP3-detect-expansion-board-type-version-using-eepr.patch \ - file://0008-OMAP3-Overo-enable-config-eeprom-to-set-u-boot-env-v.patch \ - file://0009-OMAP3-Overo-enable-input-on-MMC1_CLK-and-MMC3_CLK-pi.patch \ - file://0010-OMAP3-Overo-set-CONFIG_SYS_I2C_SPEED-to-400Khz.patch \ - file://0011-OMAP3-trim-excessively-long-delays-in-i2c-driver.patch \ - file://0012-OMAP3-Overo-allow-expansion-boards-with-any-vendor-I.patch \ - file://0013-OMAP3-Overo-change-address-of-expansion-eeprom-to-0x.patch \ - file://0014-OMAP3-board.c-don-t-attempt-to-set-up-second-RAM-ban.patch \ - file://0015-OMAP3-mem.c-enhance-the-RAM-test.patch \ - file://0016-env_nand.c-fail-gracefully-if-no-nand-is-present.patch \ - file://0017-OMAP3-add-definitions-to-support-sysinfo-cpu-and-cpu.patch \ - file://0018-OMAP3-sys_info-update-cpu-detection-for-36XX-37XX.patch \ - file://0019-OMAP3-clocks-update-clock-setup-for-36XX-37XX.patch \ - file://0020-OMAP3-beagle-add-support-for-Beagle-xM.patch \ - file://0021-OMAP3-Beagle-Overo-remove-omapfb.debug-y-from-defaul.patch \ - file://0022-OMAP3-beagle-implement-expansionboard-detection-base.patch \ - file://0023-beagleboard-display-message-about-I2C-errors-being-e.patch \ - file://0024-beagleboard-fix-TCT-expansionboard-IDs.patch \ - file://0025-Add-DSS-driver-for-OMAP3.patch \ - file://0026-Enable-DSS-driver-for-Beagle.patch \ - file://0027-beagleboardXM-don-t-set-mpurate-on-xM-in-bootargs.patch \ - file://0028-OMAP3-fix-and-clean-up-L2-cache-enable-disable-funct.patch \ - file://0029-OMAP3-convert-setup_auxcr-to-pure-asm.patch \ - file://0030-OMAP3-apply-Cortex-A8-errata-workarounds-only-on-aff.patch \ - file://0031-OMAP3-beagle-add-more-expansionboards-based-on-http-.patch \ - file://0032-OMAP3-beagle-set-mpurate-to-600-for-revB-and-revC1-3.patch \ - file://0033-OMAP3-beagle-prettify-expansionboard-message-a-bit.patch \ - file://0034-OMAP3-beagle-add-pinmux-for-Tincantools-Trainer-expa.patch \ - file://0035-OMAP3-Beagle-set-mpurate-to-1000-for-xM.patch \ - file://0036-OMAP3-Beagle-decrease-bootdelay-to-3-use-VGA-for-def.patch \ - file://0037-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch \ - file://0038-Added-configurations-for-xM-Rev-A-board.patch \ - file://0039-OMAP3-beagle-setenv-beaglerev-for-AxBx-Cx-xMA-for-be.patch \ - file://0040-OMAP-mmc-add-support-for-second-and-third-mmc-channe.patch \ - file://0041-OMAP3-Beagle-enable-support-for-second-and-third-mmc.patch \ - file://0042-BeagleBoard-Added-LED-driver.patch \ - file://0043-Add-led-command.patch \ - file://0044-BeagleBoard-Enabled-LEDs.patch \ - file://0045-BeagleBoard-Added-userbutton-command.patch \ - file://0046-BeagleBoard-Add-CONFIG_SYS_MEMTEST_SCRATCH.patch \ - file://0047-BeagleBoard-Adjust-boot-command-on-USER-button.patch \ - file://0048-BeagleBoard-Enable-pullups-on-i2c2.patch \ - file://0049-BeagleBoard-Add-camera-to-default-bootargs.patch \ - file://0050-BeagleBoard-move-ramdisk-parameters.patch \ - file://0051-add-support-for-beagleboardtoys-expansionboards.patch \ + file://0001-OMAP3-Beagle-Pin-Mux-initialization-glitch-fix.patch \ + file://0002-OMAP-Remove-omapfb.debug-y-from-Beagle-and-Overo-env.patch \ + file://0003-omap3_beagle-enable-the-use-of-a-plain-text-file-nam.patch \ + file://0004-OMAP3-BeagleBoard-Enable-pullups-on-i2c2.patch \ + file://0005-ARMV7-OMAP3-BeagleBoard-add-xM-rev-B-to-ID-table.patch \ + file://0006-OMAP3-BeagleBoard-add-more-expansionboard-IDs.patch \ + file://0007-OMAP3-Add-DSS-driver-for-OMAP3.patch \ + file://0008-BeagleBoard-Added-userbutton-command.patch \ + file://0009-OMAP3-beagle-pass-expansionboard-name-in-bootargs.patch \ + file://0010-Enable-DSS-driver-for-Beagle.patch \ + file://0011-Add-led-command.patch \ + file://0012-BeagleBoard-Added-LED-driver.patch \ + file://0013-OMAP3-BeagleBoard-updated-default-configuration.patch \ + file://0014-Corrected-LED-name-match-finding-avoiding-extraneous.patch \ + file://0016-BeagleBoard-Load-kernel-via-MMC-ext2-not-fat.patch \ + file://0017-BeagleBoard-add-xM-rev-C-to-ID-table.patch \ file://fw_env.config \ " -SRCREV_beagleboard = "ca6e1c136ddb720c3bb2cc043b99f7f06bc46c55" -PV_beagleboard = "2010.03+${PR}+gitr${SRCREV}" +SRCREV_beagleboard = "c7977858dcf1f656cbe91ea0dc3cb9139c6a8cc8" +PV_beagleboard = "2011.02+${PR}+gitr${SRCREV}" SRCREV_calamari = "b80d30546e88c70985094d81297d449b2bc59033" @@ -236,6 +201,20 @@ SRC_URI_overo = "git://www.sakoman.com/git/u-boot.git;branch=omap4-exp;protocol= SRCREV_overo = "261733408a27d14590cf3ec6b596461808050e32" PV_overo = "2010.12+${PR}+gitr${SRCREV}" +SRC_URI_omap4430-panda = "git://www.sakoman.com/git/u-boot.git;branch=omap4-exp;protocol=git \ + file://fix-break-caused-by-new-binutils.patch \ + " +SRCREV_omap4430-panda = "261733408a27d14590cf3ec6b596461808050e32" +PV_omap4430-panda = "2010.12+${PR}+git${SRCREV}" +PE_omap4430-panda = "1" + +SRC_URI_am45x-evm = "git://www.sakoman.com/git/u-boot.git;branch=omap4-exp;protocol=git \ + file://fix-break-caused-by-new-binutils.patch \ + " +SRCREV_am45x-evm = "261733408a27d14590cf3ec6b596461808050e32" +PV_am45x-evm = "2010.12+${PR}+git${SRCREV}" +PE_am45x-evm = "1" + # DaVinci dm355-evm/dm365-evm/dm6446-evm/dm6467-evm/dm6467t-evm - PSP 3.1.0/3.2.0 (build 35) SRC_URI_dm355-evm = "git://arago-project.org/git/projects/u-boot-davinci.git;protocol=git;branch=u-boot-davinci-2009.06" @@ -243,10 +222,12 @@ SRCREV_dm355-evm = "ea7387c9511ac92a46d3d147adffe36f868820e4" PV_dm355-evm = "2009.05+2009.06-rc0+${PR}+gitr${SRCREV}" PE_dm355-evm = "1" -SRC_URI_dm365-evm = "git://arago-project.org/git/projects/u-boot-davinci.git;protocol=git;branch=u-boot-davinci-2009.06" -SRCREV_dm365-evm = "ea7387c9511ac92a46d3d147adffe36f868820e4" -PV_dm365-evm = "2009.05+2009.06-rc0+${PR}+gitr${SRCREV}" -PE_dm365-evm = "1" +# Use this for both dm365-evm and dm368-evm devices by using the dm365 +# SOC_FAMILY +SRC_URI_dm365 = "git://arago-project.org/git/projects/u-boot-davinci.git;protocol=git;branch=u-boot-davinci-2009.06" +SRCREV_dm365 = "ea7387c9511ac92a46d3d147adffe36f868820e4" +PV_dm365 = "2009.05+2009.06-rc0+${PR}+gitr${SRCREV}" +PE_dm365 = "1" SRC_URI_dm6446-evm = "git://arago-project.org/git/projects/u-boot-davinci.git;protocol=git;branch=u-boot-davinci-2009.06" SRCREV_dm6446-evm = "ea7387c9511ac92a46d3d147adffe36f868820e4" diff --git a/recipes/udev/files/network.sh b/recipes/udev/files/network.sh index 182c26d86a..d287855221 100644 --- a/recipes/udev/files/network.sh +++ b/recipes/udev/files/network.sh @@ -9,6 +9,8 @@ test -x /sbin/cardctl && exit 0 # We get two "add" events for hostap cards due to wifi0 echo "$INTERFACE" | grep -q wifi && exit 0 +# Avoid udev stopping persistent ppp connections +echo "$INTERFACE" | grep -q ppp && exit 0 # Check if /etc/init.d/network has been run yet to see if we are # called by starting /etc/rcS.d/S03udev and not by hotplugging a device diff --git a/recipes/udf/udftools/patch-04-wrudf-gcc4.diff b/recipes/udf/udftools/patch-04-wrudf-gcc4.diff index 13690123a5..c1234afad7 100644 --- a/recipes/udf/udftools/patch-04-wrudf-gcc4.diff +++ b/recipes/udf/udftools/patch-04-wrudf-gcc4.diff @@ -38,9 +38,9 @@ to 'libreadline5-dev'. Regards Andreas Jochens -diff -urN ../tmp-orig/udftools-1.0.0b3/wrudf/wrudf.c ./wrudf/wrudf.c ---- ../tmp-orig/udftools-1.0.0b3/wrudf/wrudf.c 2002-11-26 08:18:51.000000000 +0100 -+++ ./wrudf/wrudf.c 2005-01-04 16:56:49.394078200 +0100 +diff -urN udftools-1.0.0b3/wrudf/wrudf.c b/wrudf/wrudf.c +--- udftools-1.0.0b3/wrudf/wrudf.c 2002-11-26 08:18:51.000000000 +0100 ++++ b/wrudf/wrudf.c 2005-01-04 16:56:49.394078200 +0100 @@ -245,7 +245,7 @@ } else if( strncmp( spm->partIdent.ident, UDF_ID_VIRTUAL, strlen(UDF_ID_VIRTUAL)) == 0 ) virtualPartitionNum = i; @@ -50,4 +50,3 @@ diff -urN ../tmp-orig/udftools-1.0.0b3/wrudf/wrudf.c ./wrudf/wrudf.c } if( medium == CDR ) { -diff -urN ../tmp-orig/udftools-1.0.0b3/debian/control ./debian/control diff --git a/recipes/uhd/uhd-firmware.inc b/recipes/uhd/uhd-firmware.inc index 763aa6ca56..bdb68bdef1 100644 --- a/recipes/uhd/uhd-firmware.inc +++ b/recipes/uhd/uhd-firmware.inc @@ -2,16 +2,21 @@ DESCRIPTION = "Universal Hardware Driver Firmware" HOMEPAGE = "http://www.ettus.com" LICENSE = "GPLv3" -INC_PR = "r0" +INC_PR = "r1" PACKAGE_ARCH = "all" -SRC_URI = "http://www.ettus.com/downloads/uhd_images/UHD-images-${PV}/UHD-images-${PV}-Linux.tar.gz" +#PV_U = `echo ${PV} | sed 's/\./_/g'` -S = ${WORKDIR}/UHD-images-${PV}-Linux +SRC_URI = "http://www.ettus.com/downloads/uhd_releases/${@'${PV}'.replace('.', '_')}/images-only/UHD-images-${PV}.tar.gz" + +S = ${WORKDIR}/UHD-images-${PV} do_install() { install -d ${D}${datadir}/uhd/images + install -d ${D}${datadir}/uhd/images/bit + install -m 0644 ${S}/share/uhd/images/bit/* ${D}${datadir}/uhd/images/bit + rm -rf ${S}/share/uhd/images/bit install -m 0644 ${S}/share/uhd/images/* ${D}${datadir}/uhd/images } diff --git a/recipes/uhd/uhd-firmware_0001.20101124013843.905f426.bb b/recipes/uhd/uhd-firmware_0001.20101124013843.905f426.bb deleted file mode 100644 index 74fa64e42b..0000000000 --- a/recipes/uhd/uhd-firmware_0001.20101124013843.905f426.bb +++ /dev/null @@ -1,7 +0,0 @@ -require recipes/uhd/uhd-firmware.inc - -PR = "${INC_PR}.0" - -SRC_URI[md5sum] = "6db20f93e3c4646395bd6e8260e2261f" -SRC_URI[sha256sum] = "4c73655519cd9f4e49e5727f094b463850b03db13d91a8b0429b789e74a9deea" - diff --git a/recipes/uhd/uhd-firmware_003.002.001.bb b/recipes/uhd/uhd-firmware_003.002.001.bb new file mode 100644 index 0000000000..654336b538 --- /dev/null +++ b/recipes/uhd/uhd-firmware_003.002.001.bb @@ -0,0 +1,7 @@ +require recipes/uhd/uhd-firmware.inc + +PR = "${INC_PR}.0" + +SRC_URI[md5sum] = "1894391da027884e5eed474606250be9" +SRC_URI[sha256sum] = "c194d9e30bb02225de623400bdba9be9200f70a57c6220506bc0b051eed8fae8" + diff --git a/recipes/uhd/uhd.inc b/recipes/uhd/uhd.inc index d2ffb848fb..8712ef6ae5 100644 --- a/recipes/uhd/uhd.inc +++ b/recipes/uhd/uhd.inc @@ -2,26 +2,28 @@ DESCRIPTION = "Universal Hardware Driver for Ettus Research products." HOMEPAGE = "http://www.ettus.com" LICENSE = "GPLV3+" -DEPENDS = "git-native python-cheetah-native boost libusb1 uhd-firmware" +DEPENDS = "git-native python-cheetah-native boost libusb1 uhd-firmware orc-native" RDEPENDS_${PN} += "uhd-firmware" -INC_PR = "r4" +INC_PR = "r6" inherit cmake -PACKAGES =+ "${PN}-tests ${PN}-examples" +PACKAGES =+ "${PN}-tests ${PN}-examples ${PN}-e1xx" FILES_${PN} += "${libdir}/libuhd.so" FILES_${PN} += "${datadir}/uhd/utils/*" FILES_${PN}-tests += "${datadir}/uhd/tests/*" +FILES_${PN}-e1xx += "${datadir}/uhd/usrp_e_utils/*" FILES_${PN}-dbg += "${datadir}/uhd/examples/.debug/*" FILES_${PN}-dbg += "${datadir}/uhd/utils/.debug/*" FILES_${PN}-dbg += "${datadir}/uhd/tests/.debug/*" +FILES_${PN}-dbg += "${datadir}/uhd/usrp_e_utils/.debug/*" FILES_${PN}-examples = "${datadir}/uhd/examples/*" OECMAKE_BUILDPATH = "${S}/build" OECMAKE_SOURCEPATH = "${S}" -EXTRA_OECMAKE = "-DENABLE_USRP_E100=TRUE" +EXTRA_OECMAKE = "-DENABLE_E100=TRUE -DENABLE_USRP_E_UTILS=TRUE" EXTRA_OEMAKE = "-C ${OECMAKE_BUILDPATH}" diff --git a/recipes/uhd/uhd_git.bb b/recipes/uhd/uhd_git.bb index cf6e7060b4..5121f01828 100644 --- a/recipes/uhd/uhd_git.bb +++ b/recipes/uhd/uhd_git.bb @@ -1,8 +1,8 @@ require recipes/uhd/uhd.inc -PR = "${INC_PR}.2" +PR = "${INC_PR}.6" SRC_URI = "git://ettus.sourcerepo.com/ettus/uhd.git;protocol=git" S = "${WORKDIR}/git/host" -SRCREV = "cc639e876f326e958dace8438ae41b8cd9563780" +SRCREV = "b20c9fc836a0f32666739dcd143692149eb66c68" diff --git a/recipes/unifdef/unifdef_2.4.bb b/recipes/unifdef/unifdef_2.6.bb similarity index 78% rename from recipes/unifdef/unifdef_2.4.bb rename to recipes/unifdef/unifdef_2.6.bb index 89bc350da6..0fb40956ae 100644 --- a/recipes/unifdef/unifdef_2.4.bb +++ b/recipes/unifdef/unifdef_2.6.bb @@ -6,8 +6,9 @@ LICENSE = "BSD" PR = "0" SRC_URI = "http://dotat.at/prog/unifdef/unifdef-${PV}.tar.gz" -SRC_URI[md5sum] = "9aba8b30187244677f25834cbc11bfe2" -SRC_URI[sha256sum] = "52b8b5c411b3d33646b6a7518c37c3a2a308887c45ac58a13122823b02fd4f4a" +SRC_URI[md5sum] = "18b832baea2c7b6b00bd7d4f3db38f62" +SRC_URI[sha256sum] = "e4cbc673d32ebe10e00bc00b985c974e327e65d4b32a564d21358e458079e419" + EXTRA_OEMAKE = "-e" diff --git a/recipes/uwsgi/files/arm-timer-syscall.patch b/recipes/uwsgi/files/arm-timer-syscall.patch new file mode 100644 index 0000000000..316c8331f6 --- /dev/null +++ b/recipes/uwsgi/files/arm-timer-syscall.patch @@ -0,0 +1,23 @@ +diff -crB orig-uwsgi-0.9.9.2/event.c uwsgi-0.9.9.2/event.c +*** orig-uwsgi-0.9.9.2/event.c Wed Oct 26 11:59:32 2011 +--- uwsgi-0.9.9.2/event.c Wed Oct 26 12:00:44 2011 +*************** +*** 692,697 **** +--- 692,698 ---- + #elif defined(__i386__) + return syscall(322, __clock_id, __flags); + #endif ++ return -1; + } + + static int timerfd_settime (int __ufd, int __flags, +*************** +*** 702,707 **** +--- 703,709 ---- + #elif defined(__i386__) + return syscall(325, __ufd, __flags, __utmr, __otmr); + #endif ++ return -1; + } + #endif + diff --git a/recipes/uwsgi/files/editor.ini b/recipes/uwsgi/files/editor.ini new file mode 100644 index 0000000000..e2369f818c --- /dev/null +++ b/recipes/uwsgi/files/editor.ini @@ -0,0 +1,7 @@ +[uwsgi] +socket = 127.0.0.1:5001 +logto = /var/log/uwsgi/editor.log +processes = 1 +env = PYTHONPATH=$PYTHONPATH:/var/www +module = editor +callable = editor diff --git a/recipes/uwsgi/files/editor.log b/recipes/uwsgi/files/editor.log new file mode 100644 index 0000000000..1cd1af845f --- /dev/null +++ b/recipes/uwsgi/files/editor.log @@ -0,0 +1 @@ +*** Start uWSGI editor log file *** diff --git a/recipes/uwsgi/files/emperor.log b/recipes/uwsgi/files/emperor.log new file mode 100644 index 0000000000..cbf6d5f72e --- /dev/null +++ b/recipes/uwsgi/files/emperor.log @@ -0,0 +1 @@ +*** Start uWSGI emperor log file *** diff --git a/recipes/uwsgi/files/public.ini b/recipes/uwsgi/files/public.ini new file mode 100644 index 0000000000..6dc3a7bd00 --- /dev/null +++ b/recipes/uwsgi/files/public.ini @@ -0,0 +1,8 @@ +[uwsgi] +socket = 127.0.0.1:5000 +logto = /var/log/uwsgi/public.log +processes = 1 +env = PYTHONPATH=$PYTHONPATH:/var/www +module = public +callable = public +catch-exceptions = True diff --git a/recipes/uwsgi/files/public.log b/recipes/uwsgi/files/public.log new file mode 100644 index 0000000000..b53612f929 --- /dev/null +++ b/recipes/uwsgi/files/public.log @@ -0,0 +1 @@ +*** Start uWSGI public log file *** diff --git a/recipes/uwsgi/files/uwsgi b/recipes/uwsgi/files/uwsgi new file mode 100644 index 0000000000..5c6ab91bea --- /dev/null +++ b/recipes/uwsgi/files/uwsgi @@ -0,0 +1,5 @@ +/var/log/uwsgi/*.log { + daily + copytruncate + rotate 7 +} diff --git a/recipes/uwsgi/uwsgi_0.9.7.2.bb b/recipes/uwsgi/uwsgi_0.9.7.2.bb new file mode 100644 index 0000000000..50c01f747d --- /dev/null +++ b/recipes/uwsgi/uwsgi_0.9.7.2.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "uWSGI is a WSGI web server for Python web applications" +HOMEPAGE = "http://projects.unbit.it/uwsgi/wiki" +SECTION = "net" +PRIORITY = "optional" +LICENSE = "GPLv2" +SRCNAME = "uwsgi" +PR = "r0" + +SRC_URI = "http://projects.unbit.it/downloads/uwsgi-${PV}.tar.gz \ + file://uwsgi.ini" + +S = "${WORKDIR}/${PN}-${PV}" + +DEPENDS = "libxml2" + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_compile_prepend() { + export BUILD_SYS=${BUILD_SYS} + export HOST_SYS=${HOST_SYS} + export STAGING_INCDIR=${STAGING_INCDIR} + export STAGING_LIBDIR=${STAGING_LIBDIR} +} + +do_compile() { + python uwsgiconfig.py --build +} + +do_install() { + echo ${S} + install -m 0755 -d ${D}${sbindir} + install -m 0755 ${S}/uwsgi ${D}${sbindir} + install -m 0755 -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/uwsgi.ini ${D}${sysconfdir} +} + +SRC_URI[md5sum] = "9bdf8ed5c8b32ace085dbd0f9488f880" +SRC_URI[sha256sum] = "6eccf3c7ead324c6af9a6196f0d4faf4c8472ca3b728a01a0070b472b0784bba" diff --git a/recipes/uwsgi/uwsgi_0.9.8.bb b/recipes/uwsgi/uwsgi_0.9.8.bb new file mode 100644 index 0000000000..0859602e62 --- /dev/null +++ b/recipes/uwsgi/uwsgi_0.9.8.bb @@ -0,0 +1,40 @@ +DESCRIPTION = "uWSGI is a WSGI web server for Python web applications" +HOMEPAGE = "http://projects.unbit.it/uwsgi/wiki" +SECTION = "net" +PRIORITY = "optional" +LICENSE = "GPLv2" +SRCNAME = "uwsgi" +PR = "r0" + +SRC_URI = "http://projects.unbit.it/downloads/uwsgi-${PV}.tar.gz \ + file://uwsgi.ini" + +S = "${WORKDIR}/${PN}-${PV}" + +DEPENDS = "libxml2" + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_compile_prepend() { + export BUILD_SYS=${BUILD_SYS} + export HOST_SYS=${HOST_SYS} + export STAGING_INCDIR=${STAGING_INCDIR} + export STAGING_LIBDIR=${STAGING_LIBDIR} +} + +do_compile() { + python uwsgiconfig.py --build +} + +do_install() { + echo ${S} + install -m 0755 -d ${D}${sbindir} + install -m 0755 ${S}/uwsgi ${D}${sbindir} + install -m 0755 -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/uwsgi.ini ${D}${sysconfdir} +} + +SRC_URI[md5sum] = "bef44af218b110f58a945dc922b62731" +SRC_URI[sha256sum] = "63a33006ea93f87aa24aaffda9e8b3bfc2d598b1d7bc4d9cd13c587f25500899" diff --git a/recipes/uwsgi/uwsgi_0.9.9.2.bb b/recipes/uwsgi/uwsgi_0.9.9.2.bb new file mode 100644 index 0000000000..8bfba7074b --- /dev/null +++ b/recipes/uwsgi/uwsgi_0.9.9.2.bb @@ -0,0 +1,44 @@ +DESCRIPTION = "uWSGI is a WSGI web server for Python web applications" +HOMEPAGE = "http://projects.unbit.it/uwsgi/wiki" +SECTION = "net" +PRIORITY = "optional" +LICENSE = "GPLv2" +SRCNAME = "uwsgi" +PR = "r0" + +SRC_URI = "http://projects.unbit.it/downloads/uwsgi-${PV}.tar.gz \ + file://editor.ini \ + file://public.ini \ + file://arm-timer-syscall.patch" + +S = "${WORKDIR}/${PN}-${PV}" + +DEPENDS = "libxml2" + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_compile_prepend() { + export BUILD_SYS=${BUILD_SYS} + export HOST_SYS=${HOST_SYS} + export STAGING_INCDIR=${STAGING_INCDIR} + export STAGING_LIBDIR=${STAGING_LIBDIR} +} + +do_compile() { + python uwsgiconfig.py --build +} + +do_install() { + echo ${S} + install -m 0755 -d ${D}${sbindir} + install -m 0755 ${S}/uwsgi ${D}${sbindir} + install -m 0755 -d ${D}${sysconfdir} + install -m 0755 -d ${D}${sysconfdir}/uwsgi + install -m 0644 ${WORKDIR}/editor.ini ${D}${sysconfdir}/uwsgi + install -m 0644 ${WORKDIR}/public.ini ${D}${sysconfdir}/uwsgi +} + +SRC_URI[md5sum] = "fafecf7dc86a36f003d2fadaa44483f1" +SRC_URI[sha256sum] = "1f9da496dd8556644513208640c302aa38a4fe8cabe476ca3ed0b7c2b5b0ed73" diff --git a/recipes/uwsgi/uwsgi_1.2.3.bb b/recipes/uwsgi/uwsgi_1.2.3.bb new file mode 100644 index 0000000000..c2d3d82c99 --- /dev/null +++ b/recipes/uwsgi/uwsgi_1.2.3.bb @@ -0,0 +1,60 @@ +DESCRIPTION = "uWSGI is a WSGI web server for Python web applications" +HOMEPAGE = "http://projects.unbit.it/uwsgi/wiki" +SECTION = "net" +PRIORITY = "optional" +LICENSE = "GPLv2" +SRCNAME = "uwsgi" +PR = "r0" + +SRCREV = "anthrax-rc2" + +SRC_URI = "git://github.com/rascalmicro/uwsgi.git;protocol=git;branch=interrupts \ + file://editor.ini \ + file://public.ini \ + file://emperor.log \ + file://editor.log \ + file://public.log \ + file://uwsgi \ + file://arm-timer-syscall.patch" + +S = "${WORKDIR}/git" + +FILES_${PN} += ${libdir}/python2.6 + +DEPENDS = "libxml2 logrotate openldap" + +RDEPENDS_${PN} = "\ + python-core \ +" + +do_compile_prepend() { + export BUILD_SYS=${BUILD_SYS} + export HOST_SYS=${HOST_SYS} + export STAGING_INCDIR=${STAGING_INCDIR} + export STAGING_LIBDIR=${STAGING_LIBDIR} +} + +do_compile() { + python uwsgiconfig.py --build +} + +do_install() { + echo ${S} + install -m 0755 -d ${D}${sbindir} + install -m 0755 ${S}/uwsgi ${D}${sbindir} + install -m 0755 -d ${D}${sysconfdir} + install -m 0755 -d ${D}${sysconfdir}/uwsgi + install -m 0644 ${WORKDIR}/editor.ini ${D}${sysconfdir}/uwsgi + install -m 0644 ${WORKDIR}/public.ini ${D}${sysconfdir}/uwsgi + install -m 0755 -d ${D}${libdir}/python2.6 + install -m 0755 ${S}/uwsgidecorators.py ${D}${libdir}/python2.6 + + install -m 0755 -d ${D}${localstatedir}/log/uwsgi + install -m 0644 ${WORKDIR}/emperor.log ${D}${localstatedir}/log/uwsgi + install -m 0644 ${WORKDIR}/editor.log ${D}${localstatedir}/log/uwsgi + install -m 0644 ${WORKDIR}/public.log ${D}${localstatedir}/log/uwsgi + install -m 0644 ${WORKDIR}/uwsgi ${D}${sysconfdir}/logrotate +} + +SRC_URI[md5sum] = "6090367c826216f59848677a79fb7129" +SRC_URI[sha256sum] = "1f9f6047468272708241780597014ed00d93919a384e81b30e65167fb2c2e129" diff --git a/recipes/uwsgi/uwsgi_1.9.14.bb b/recipes/uwsgi/uwsgi_1.9.14.bb new file mode 100644 index 0000000000..79144ebb19 --- /dev/null +++ b/recipes/uwsgi/uwsgi_1.9.14.bb @@ -0,0 +1,61 @@ +DESCRIPTION = "uWSGI is a WSGI web server for Python web applications" +HOMEPAGE = "http://projects.unbit.it/uwsgi/wiki" +SECTION = "net" +PRIORITY = "optional" +LICENSE = "GPLv2" +SRCNAME = "uwsgi" +PR = "r0" + +SRCREV = "1.9.14" + +SRC_URI = "git://github.com/rascalmicro/uwsgi.git;protocol=git;branch=interrupts \ + file://editor.ini \ + file://public.ini \ + file://emperor.log \ + file://editor.log \ + file://public.log \ + file://uwsgi" + +S = "${WORKDIR}/git" + +FILES_${PN} += ${libdir}/python2.6 + +DEPENDS = "libxml2 logrotate openldap openssl" + +RDEPENDS_${PN} = "\ + python-core \ +" + +CFLAGS += "-DOBSOLETE_LINUX_KERNEL" + +do_compile_prepend() { + export BUILD_SYS=${BUILD_SYS} + export HOST_SYS=${HOST_SYS} + export STAGING_INCDIR=${STAGING_INCDIR} + export STAGING_LIBDIR=${STAGING_LIBDIR} +} + +do_compile() { + UWSGI_INCLUDES=/usr/include,/home/ubuntu/openembedded-rascal/tmp/sysroots/armv5te-angstrom-linux-gnueabi/usr/include/openssl python uwsgiconfig.py --build +} + +do_install() { + echo ${S} + install -m 0755 -d ${D}${sbindir} + install -m 0755 ${S}/uwsgi ${D}${sbindir} + install -m 0755 -d ${D}${sysconfdir} + install -m 0755 -d ${D}${sysconfdir}/uwsgi + install -m 0644 ${WORKDIR}/editor.ini ${D}${sysconfdir}/uwsgi + install -m 0644 ${WORKDIR}/public.ini ${D}${sysconfdir}/uwsgi + install -m 0755 -d ${D}${libdir}/python2.6 + install -m 0755 ${S}/uwsgidecorators.py ${D}${libdir}/python2.6 + + install -m 0755 -d ${D}${localstatedir}/log/uwsgi + install -m 0644 ${WORKDIR}/emperor.log ${D}${localstatedir}/log/uwsgi + install -m 0644 ${WORKDIR}/editor.log ${D}${localstatedir}/log/uwsgi + install -m 0644 ${WORKDIR}/public.log ${D}${localstatedir}/log/uwsgi + install -m 0644 ${WORKDIR}/uwsgi ${D}${sysconfdir}/logrotate +} + +SRC_URI[md5sum] = "6090367c826216f59848677a79fb7129" +SRC_URI[sha256sum] = "1f9f6047468272708241780597014ed00d93919a384e81b30e65167fb2c2e129" diff --git a/recipes/vim/files/vimrc b/recipes/vim/files/vimrc index df65555af8..869bcbd741 100644 --- a/recipes/vim/files/vimrc +++ b/recipes/vim/files/vimrc @@ -1,96 +1,12 @@ -" An example for a vimrc file. -" -" Maintainer: Bram Moolenaar -" Last change: 2008 Jul 02 -" -" To use it, copy it to -" for Unix and OS/2: ~/.vimrc -" for Amiga: s:.vimrc -" for MS-DOS and Win32: $VIM\_vimrc -" for OpenVMS: sys$login:.vimrc - -" When started as "evim", evim.vim will already have done these settings. -if v:progname =~? "evim" - finish -endif - -" Use Vim settings, rather then Vi settings (much better!). -" This must be first, because it changes other options as a side effect. -set nocompatible - -" allow backspacing over everything in insert mode -set backspace=indent,eol,start - -if has("vms") - set nobackup " do not keep a backup file, use versions instead -else - set backup " keep a backup file -endif -set history=50 " keep 50 lines of command line history -set ruler " show the cursor position all the time -set showcmd " display incomplete commands -set incsearch " do incremental searching - -" For Win32 GUI: remove 't' flag from 'guioptions': no tearoff menu entries -" let &guioptions = substitute(&guioptions, "t", "", "g") - -" Don't use Ex mode, use Q for formatting -map Q gq - -" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo, -" so that you can undo CTRL-U after inserting a line break. -inoremap u - -" In many terminal emulators the mouse works just fine, thus enable it. -if has('mouse') - set mouse=a -endif - -" Switch syntax highlighting on, when the terminal has colors -" Also switch on highlighting the last used search pattern. -"if &t_Co > 2 || has("gui_running") -" syntax on -" set hlsearch -"endif - -" Only do this part when compiled with support for autocommands. -if has("autocmd") - - " Enable file type detection. - " Use the default filetype settings, so that mail gets 'tw' set to 72, - " 'cindent' is on in C files, etc. - " Also load indent files, to automatically do language-dependent indenting. - filetype plugin indent on - - " Put these in an autocmd group, so that we can delete them easily. - augroup vimrcEx - au! - - " For all text files set 'textwidth' to 78 characters. - autocmd FileType text setlocal textwidth=78 - - " When editing a file, always jump to the last known cursor position. - " Don't do it when the position is invalid or when inside an event handler - " (happens when dropping a file on gvim). - " Also don't do it when the mark is in the first line, that is the default - " position when opening a file. - autocmd BufReadPost * - \ if line("'\"") > 1 && line("'\"") <= line("$") | - \ exe "normal! g`\"" | - \ endif - - augroup END - -else - - set autoindent " always set autoindenting on - -endif " has("autocmd") - -" Convenient command to see the difference between the current buffer and the -" file it was loaded from, thus the changes you made. -" Only define it when not defined already. -if !exists(":DiffOrig") - command DiffOrig vert new | set bt=nofile | r # | 0d_ | diffthis - \ | wincmd p | diffthis -endif +set nocompatible " Prevent vim from using legacy vi behavior as defaults +set tabstop=4 " Make tabs as wide as 4 spaces +set shiftwidth=4 " Make >> and << shift text to match tab width +set expandtab " Insert spaces when is pressed +" (You can use in insert mode to insert a TAB character if you need to.) + +set ruler " Add line and column numbers at bottom of screen +set backspace=indent,eol,start " Make backspace not stop for anything +syntax on " Turn on syntax highlighting + +" Make backspace delete preceding character in normal mode +nmap X diff --git a/recipes/vim/gvim_7.2.bb b/recipes/vim/gvim_7.2.bb deleted file mode 100644 index ad96e254ba..0000000000 --- a/recipes/vim/gvim_7.2.bb +++ /dev/null @@ -1,11 +0,0 @@ -VIMGUI = "gtk2" -VIMX = "--with-x" - -require vim_${PV}.bb - -DEPENDS += "gtk+ libxt" - -EXTRA_OECONF += "--enable-gtk2-test" - -#might needs RREPLACES_${PN} as well -RCONFLICTS_${PN} = "vim vim-tiny" diff --git a/recipes/vim/vim-tiny_7.2.bb b/recipes/vim/vim-tiny_7.2.bb deleted file mode 100644 index 25a9205eb6..0000000000 --- a/recipes/vim/vim-tiny_7.2.bb +++ /dev/null @@ -1,5 +0,0 @@ -VIMFEATURES = "tiny" - -require vim_${PV}.bb - -RCONFLICTS_${PN} = "gvim vim" diff --git a/recipes/vim/vim_7.2.bb b/recipes/vim/vim_7.2.bb index 6e1499197a..1ff1434006 100644 --- a/recipes/vim/vim_7.2.bb +++ b/recipes/vim/vim_7.2.bb @@ -14,17 +14,10 @@ require vim.inc PR = "${INC_PR}.3" # 001-411.diff contains 411 patches fetched from upstream -SRC_URI += "file://001-411.diff;apply=no" -SRC_URI += "file://configure.in_remove_CC_quotes.patch;apply=no" +SRC_URI += "file://001-411.diff;patchdir=.." +SRC_URI += "file://configure.in_remove_CC_quotes.patch;patchdir=.." SRC_URI += "file://vimrc" -# we need to apply patches in other dir then ${S} -do_patch() { - cd ${WORKDIR}/vim${VIMVER} - patch -p1 <${WORKDIR}/001-411.diff - patch -p1 <${WORKDIR}/configure.in_remove_CC_quotes.patch -} - do_install_append() { install -m 0644 ${WORKDIR}/vimrc ${D}/${datadir}/vim } diff --git a/recipes/webm/libvpx.inc b/recipes/webm/libvpx.inc index 9913d5b653..fd82d77a6a 100644 --- a/recipes/webm/libvpx.inc +++ b/recipes/webm/libvpx.inc @@ -1,10 +1,14 @@ DESCRIPTION = "vpx Multi-Format Codec SDK" LICENSE = "BSD" -INC_PR = "r5" +INC_PR = "r7" -SRC_URI = "git://review.webmproject.org/libvpx.git;protocol=git;tag=v${PV}" -S = "${WORKDIR}/git" +SRC_URI = "http://webm.googlecode.com/files/libvpx-v${PV}.tar.bz2" +S = "${WORKDIR}/libvpx-v${PV}" + +# ffmpeg links with this and fails +# sysroots/armv4t-oe-linux-gnueabi/usr/lib/libvpx.a(vpx_encoder.c.o)(.text+0xc4): unresolvable R_ARM_THM_CALL relocation against symbol `memcpy@@GLIBC_2.4' +ARM_INSTRUCTION_SET = "arm" CFLAGS += "-fPIC" diff --git a/recipes/webm/libvpx/CVE-2010-4203.patch b/recipes/webm/libvpx/CVE-2010-4203.patch new file mode 100644 index 0000000000..37f5108a51 --- /dev/null +++ b/recipes/webm/libvpx/CVE-2010-4203.patch @@ -0,0 +1,69 @@ +From: John Koleszar +Date: Thu, 4 Nov 2010 20:59:26 +0000 (-0400) +Subject: fix integer promotion bug in partition size check +X-Git-Url: https://review.webmproject.org/gitweb?p=libvpx.git;a=commitdiff_plain;h=9fb80f7170ec48e23c3c7b477149eeb37081c699 + +fix integer promotion bug in partition size check + +The check '(user_data_end - partition < partition_size)' must be +evaluated as a signed comparison, but because partition_size was +unsigned, the LHS was promoted to unsigned, causing an incorrect +result on 32-bit. Instead, check the upper and lower bounds of +the segment separately. + +Change-Id: I6266aba7fd7de084268712a3d2a81424ead7aa06 +--- + +diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c +index 2d81d61..f5e49a1 100644 +--- a/vp8/decoder/decodframe.c ++++ b/vp8/decoder/decodframe.c +@@ -462,7 +462,8 @@ static void setup_token_decoder(VP8D_COMP *pbi, + partition_size = user_data_end - partition; + } + +- if (user_data_end - partition < partition_size) ++ if (partition + partition_size > user_data_end ++ || partition + partition_size < partition) + vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME, + "Truncated packet or corrupt partition " + "%d length", i + 1); +@@ -580,7 +581,8 @@ int vp8_decode_frame(VP8D_COMP *pbi) + (data[0] | (data[1] << 8) | (data[2] << 16)) >> 5; + data += 3; + +- if (data_end - data < first_partition_length_in_bytes) ++ if (data + first_partition_length_in_bytes > data_end ++ || data + first_partition_length_in_bytes < data) + vpx_internal_error(&pc->error, VPX_CODEC_CORRUPT_FRAME, + "Truncated packet or corrupt partition 0 length"); + vp8_setup_version(pc); +diff --git a/vp8/vp8_dx_iface.c b/vp8/vp8_dx_iface.c +index e7e5356..f0adf5b 100644 +--- a/vp8/vp8_dx_iface.c ++++ b/vp8/vp8_dx_iface.c +@@ -253,8 +253,11 @@ static vpx_codec_err_t vp8_peek_si(const uint8_t *data, + unsigned int data_sz, + vpx_codec_stream_info_t *si) + { +- + vpx_codec_err_t res = VPX_CODEC_OK; ++ ++ if(data + data_sz <= data) ++ res = VPX_CODEC_INVALID_PARAM; ++ else + { + /* Parse uncompresssed part of key frame header. + * 3 bytes:- including version, frame type and an offset +@@ -331,7 +334,10 @@ static vpx_codec_err_t vp8_decode(vpx_codec_alg_priv_t *ctx, + + ctx->img_avail = 0; + +- /* Determine the stream parameters */ ++ /* Determine the stream parameters. Note that we rely on peek_si to ++ * validate that we have a buffer that does not wrap around the top ++ * of the heap. ++ */ + if (!ctx->si.h) + res = ctx->base.iface->dec.peek_si(data, data_sz, &ctx->si); + diff --git a/recipes/webm/libvpx_0.9.0.bb b/recipes/webm/libvpx_0.9.0.bb deleted file mode 100644 index bce50a6df9..0000000000 --- a/recipes/webm/libvpx_0.9.0.bb +++ /dev/null @@ -1,17 +0,0 @@ -require libvpx.inc - -LICENSE = "VP8" - -PR = "${INC_PR}.0" - -SRC_URI[md5sum] = "9eb8e818d2f3263623c258fe66924082" -SRC_URI[sha256sum] = "a0096ac6859cfb61cf06dd9bc0a79a3333a4ec389ba311911d84df8ff2a1b9dc" - -do_install() { - oe_runmake install - install -d ${D}${prefix} - cp -R ${S}/vpx-vp8-nopost-nodocs*${PV}/* ${D}${prefix}/ - install -d ${D}${includedir}/vpx - mv ${D}${includedir}/*.h ${D}${includedir}/vpx -} - diff --git a/recipes/webm/libvpx_0.9.1.bb b/recipes/webm/libvpx_0.9.1.bb deleted file mode 100644 index bcb73587d3..0000000000 --- a/recipes/webm/libvpx_0.9.1.bb +++ /dev/null @@ -1,14 +0,0 @@ -require libvpx.inc - -PR = "${INC_PR}.0" - -SRC_URI += "file://libvpx-configure-support-blank-prefix.patch;apply=yes" - -CONFIGUREOPTS += " \ - --prefix=${prefix} \ - --libdir=${libdir} \ -" - -SRC_URI[md5sum] = "e1442e74d0cca228785083fa520735a2" -SRC_URI[sha256sum] = "c4e8e463e079ffde5b6948366a1d0873f1bf685dccd89ca137585c2b8247ec59" - diff --git a/recipes/webm/libvpx_0.9.2.bb b/recipes/webm/libvpx_0.9.2.bb deleted file mode 100644 index b7ced8f1da..0000000000 --- a/recipes/webm/libvpx_0.9.2.bb +++ /dev/null @@ -1,14 +0,0 @@ -require libvpx.inc - -PR = "${INC_PR}.0" - -SRC_URI += "file://libvpx-configure-support-blank-prefix.patch;apply=yes" - -SRC_URI[md5sum] = "609370925b274aeaa29e94fc34c74957" -SRC_URI[sha256sum] = "7425853d06443a0ce8e9cfc7cd3b0a43228b22c10dca813da68af9b114510b3b" - -CONFIGUREOPTS += " \ - --prefix=${prefix} \ - --libdir=${libdir} \ -" - diff --git a/recipes/webm/libvpx_0.9.5.bb b/recipes/webm/libvpx_0.9.5.bb index b7ced8f1da..42b4199e2a 100644 --- a/recipes/webm/libvpx_0.9.5.bb +++ b/recipes/webm/libvpx_0.9.5.bb @@ -2,10 +2,12 @@ require libvpx.inc PR = "${INC_PR}.0" -SRC_URI += "file://libvpx-configure-support-blank-prefix.patch;apply=yes" +SRC_URI += "file://libvpx-configure-support-blank-prefix.patch \ + file://CVE-2010-4203.patch \ + " -SRC_URI[md5sum] = "609370925b274aeaa29e94fc34c74957" -SRC_URI[sha256sum] = "7425853d06443a0ce8e9cfc7cd3b0a43228b22c10dca813da68af9b114510b3b" +SRC_URI[md5sum] = "4bf2f2c76700202c1fe9201fcb0680e3" +SRC_URI[sha256sum] = "2e93968afcded113a7e218de047feecf6659a089058803a9e40fb687de5f9bfa" CONFIGUREOPTS += " \ --prefix=${prefix} \ diff --git a/recipes/wpa-supplicant/wpa-gui-e_git.bb b/recipes/wpa-supplicant/wpa-gui-e_git.bb new file mode 100644 index 0000000000..d90ca901e0 --- /dev/null +++ b/recipes/wpa-supplicant/wpa-gui-e_git.bb @@ -0,0 +1,27 @@ +DESCRIPTION = "Qt embedded interface for choosing which configured network \ +to connect to. It also provides a method for browsing 802.11 SSID scan \ +results, an event history log of messages generated by wpa_supplicant, and \ +a method to add or edit wpa_supplicant networks." + +HOMEPAGE = "http://hostap.epitest.fi/wpa_supplicant/" +SECTION = "network" +LICENSE = "GPLv2 | BSD" +RDEPENDS_${PN} = "wpa-supplicant" + +SRCREV = "b8fb017272ed4794339978c9fbc0e74571a44728" + +PV = "0.7.3+0.8.0-rc" +PR = "r0" +PR_append = "+gitr${SRCPV}" + +SRC_URI = "git://w1.fi/srv/git/hostap.git;protocol=git" + +S = "${WORKDIR}/git/wpa_supplicant/wpa_gui-qt4" + +inherit qt4e +ARM_INSTRUCTION_SET = "arm" + +do_install () { + install -d ${D}${bindir} + install -m 755 wpa_gui ${D}/${bindir}/wpa_gui-e +} diff --git a/recipes/wpa-supplicant/wpa-gui_0.6.9.bb b/recipes/wpa-supplicant/wpa-gui_0.6.9.bb index 84c593f02a..386fd88ebf 100644 --- a/recipes/wpa-supplicant/wpa-gui_0.6.9.bb +++ b/recipes/wpa-supplicant/wpa-gui_0.6.9.bb @@ -8,7 +8,7 @@ HOMEPAGE = "http://hostap.epitest.fi/wpa_supplicant/" DEPENDS = "librsvg-native imagemagick-native" RDEPENDS_${PN} = "wpa-supplicant" RRECOMMENDS_${PN} = "${LIBC}-gconv-utf-16" -PR = "r2" +PR = "r3" SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz;name=archive\ file://icons.patch \ diff --git a/recipes/wpa-supplicant/wpa-supplicant-0.7.3/defconfig b/recipes/wpa-supplicant/wpa-supplicant-0.7.3/defconfig index 33ee9ea8d8..41362253cd 100644 --- a/recipes/wpa-supplicant/wpa-supplicant-0.7.3/defconfig +++ b/recipes/wpa-supplicant/wpa-supplicant-0.7.3/defconfig @@ -343,11 +343,11 @@ CONFIG_PEERKEY=y # Add support for old DBus control interface # (fi.epitest.hostap.WPASupplicant) -#CONFIG_CTRL_IFACE_DBUS=y +CONFIG_CTRL_IFACE_DBUS=y # Add support for new DBus control interface # (fi.w1.hostap.wpa_supplicant1) -#CONFIG_CTRL_IFACE_DBUS_NEW=y +CONFIG_CTRL_IFACE_DBUS_NEW=y # Add introspection support for new DBus control interface #CONFIG_CTRL_IFACE_DBUS_INTRO=y diff --git a/recipes/wpa-supplicant/wpa-supplicant-0.7.inc b/recipes/wpa-supplicant/wpa-supplicant-0.7.inc index 764903894d..722f5fa689 100644 --- a/recipes/wpa-supplicant/wpa-supplicant-0.7.inc +++ b/recipes/wpa-supplicant/wpa-supplicant-0.7.inc @@ -6,9 +6,9 @@ LICENSE = "GPLv2 | BSD" LIC_FILES_CHKSUM = "file://../COPYING;md5=c54ce9345727175ff66d17b67ff51f58 \ file://../README;md5=54cfc88015d3ce83f7156e63c6bb1738 \ file://wpa_supplicant.c;beginline=1;endline=17;md5=acdc5a4b0d6345f21f136eace747260e" -DEPENDS = "gnutls dbus libnl2 openssl ${@base_contains("COMBINED_FEATURES", "madwifi", "madwifi-ng", "",d)}" +DEPENDS = "gnutls dbus libnl openssl ${@base_contains("COMBINED_FEATURES", "madwifi", "madwifi-ng", "",d)}" RRECOMMENDS_${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli" -INC_PR = "r6" +INC_PR = "r7" SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \ file://defconfig \ @@ -20,11 +20,6 @@ SRC_URI = "http://hostap.epitest.fi/releases/wpa_supplicant-${PV}.tar.gz \ S = "${WORKDIR}/wpa_supplicant-${PV}/wpa_supplicant" -# We stage libnl2 header files not directly as they clash with libnl files. Once -# we only use libnl2 and stage the headers at the normal place we can remove -# this. -CFLAGS += "-I${STAGING_INCDIR}/libnl2/" - PACKAGES_prepend = "wpa-supplicant-passphrase wpa-supplicant-cli " FILES_wpa-supplicant-passphrase = "/usr/sbin/wpa_passphrase" FILES_wpa-supplicant-cli = "/usr/sbin/wpa_cli" @@ -55,14 +50,6 @@ do_install () { install -m 600 ${WORKDIR}/defaults-sane ${D}${sysconfdir}/default/wpa install -m 600 ${WORKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf - install -d ${D}${sysconfdir}/network/if-pre-up.d/ - install -d ${D}${sysconfdir}/network/if-post-down.d/ - install -d ${D}${sysconfdir}/network/if-down.d/ - install -m 644 ${WORKDIR}/wpa_supplicant.conf ${D}${sysconfdir} - install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant - cd ${D}${sysconfdir}/network/ && \ - ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant - if grep -q ^CONFIG_CTRL_IFACE_DBUS=y .config || grep -q ^CONFIG_CTRL_IFACE_DBUS_NEW=y .config; then install -d ${D}/${sysconfdir}/dbus-1/system.d install -m 644 ${S}/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d @@ -77,6 +64,14 @@ do_install () { fi fi + install -d ${D}${sysconfdir}/network/if-pre-up.d/ + install -d ${D}${sysconfdir}/network/if-post-down.d/ + install -d ${D}${sysconfdir}/network/if-down.d/ + install -m 644 ${WORKDIR}/wpa_supplicant.conf ${D}${sysconfdir} + install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant + cd ${D}${sysconfdir}/network/ && \ + ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant + install -d ${D}/etc/default/volatiles install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles } diff --git a/recipes/wpa-supplicant/wpa-supplicant-git/99_wpa_supplicant b/recipes/wpa-supplicant/wpa-supplicant-git/99_wpa_supplicant new file mode 100644 index 0000000000..6ff4dd8826 --- /dev/null +++ b/recipes/wpa-supplicant/wpa-supplicant-git/99_wpa_supplicant @@ -0,0 +1 @@ +d root root 0700 /var/run/wpa_supplicant none diff --git a/recipes/wpa-supplicant/wpa-supplicant-git/defaults-sane b/recipes/wpa-supplicant/wpa-supplicant-git/defaults-sane new file mode 100644 index 0000000000..67c4cbddf8 --- /dev/null +++ b/recipes/wpa-supplicant/wpa-supplicant-git/defaults-sane @@ -0,0 +1,8 @@ +# Useful flags: +# -i Interface (required, unless specified in config) +# -D Wireless Driver +# -d Debugging (-dd for more) +# -q Quiet (-qq for more) + +CONFIG="/etc/wpa_supplicant.conf" +OPTIONS="-i eth1 -D wext" diff --git a/recipes/wpa-supplicant/wpa-supplicant-git/defconfig b/recipes/wpa-supplicant/wpa-supplicant-git/defconfig new file mode 100644 index 0000000000..a72a7b3157 --- /dev/null +++ b/recipes/wpa-supplicant/wpa-supplicant-git/defconfig @@ -0,0 +1,422 @@ +# Example wpa_supplicant build time configuration +# +# This file lists the configuration options that are used when building the +# hostapd binary. All lines starting with # are ignored. Configuration option +# lines must be commented out complete, if they are not to be included, i.e., +# just setting VARIABLE=n is not disabling that variable. +# +# This file is included in Makefile, so variables like CFLAGS and LIBS can also +# be modified from here. In most cases, these lines should use += in order not +# to override previous values of the variables. + + +# Uncomment following two lines and fix the paths if you have installed OpenSSL +# or GnuTLS in non-default location +#CFLAGS += -I/usr/local/openssl/include +#LIBS += -L/usr/local/openssl/lib + +# Some Red Hat versions seem to include kerberos header files from OpenSSL, but +# the kerberos files are not in the default include path. Following line can be +# used to fix build issues on such systems (krb5.h not found). +#CFLAGS += -I/usr/include/kerberos + +# Example configuration for various cross-compilation platforms + +#### sveasoft (e.g., for Linksys WRT54G) ###################################### +#CC=mipsel-uclibc-gcc +#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc +#CFLAGS += -Os +#CPPFLAGS += -I../src/include -I../../src/router/openssl/include +#LIBS += -L/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib -lssl +############################################################################### + +#### openwrt (e.g., for Linksys WRT54G) ####################################### +#CC=mipsel-uclibc-gcc +#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc +#CFLAGS += -Os +#CPPFLAGS=-I../src/include -I../openssl-0.9.7d/include \ +# -I../WRT54GS/release/src/include +#LIBS = -lssl +############################################################################### + +#CC=$(CROSS_COMPILE)gcc +#CFLAGS += -DCONFIG_LIBNL20 +#CPPFLAGS += -DCONFIG_LIBNL20 +#LIBS += -L$(NFSROOT)/lib -lnl +#LIBS_p += -L$(NFSROOT)/lib +#LIBDIR = $(NFSROOT)/lib +#BINDIR = $(NFSROOT)/usr/sbin + +CONFIG_WAPI=y +CONFIG_LIBNL20=y +NEED_BGSCAN=y +CONFIG_BGSCAN_LEARN=y + +# Driver interface for Host AP driver +#CONFIG_DRIVER_HOSTAP=y + +# Driver interface for Agere driver +#CONFIG_DRIVER_HERMES=y +# Change include directories to match with the local setup +#CFLAGS += -I../../hcf -I../../include -I../../include/hcf +#CFLAGS += -I../../include/wireless + +# Driver interface for madwifi driver +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_MADWIFI=y +# Set include directory to the madwifi source tree +#CFLAGS += -I../../madwifi + +# Driver interface for ndiswrapper +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_NDISWRAPPER=y + +# Driver interface for Atmel driver +#CONFIG_DRIVER_ATMEL=y + +# Driver interface for old Broadcom driver +# Please note that the newer Broadcom driver ("hybrid Linux driver") supports +# Linux wireless extensions and does not need (or even work) with the old +# driver wrapper. Use CONFIG_DRIVER_WEXT=y with that driver. +#CONFIG_DRIVER_BROADCOM=y +# Example path for wlioctl.h; change to match your configuration +#CFLAGS += -I/opt/WRT54GS/release/src/include + +# Driver interface for Intel ipw2100/2200 driver +# Deprecated; use CONFIG_DRIVER_WEXT=y instead. +#CONFIG_DRIVER_IPW=y + +# Driver interface for Ralink driver +#CONFIG_DRIVER_RALINK=y + +# Driver interface for generic Linux wireless extensions +CONFIG_DRIVER_WEXT=y + +# Driver interface for Linux drivers using the nl80211 kernel interface +CONFIG_DRIVER_NL80211=y + +# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) +#CONFIG_DRIVER_BSD=y +#CFLAGS += -I/usr/local/include +#LIBS += -L/usr/local/lib +#LIBS_p += -L/usr/local/lib +#LIBS_c += -L/usr/local/lib + +# Driver interface for Windows NDIS +#CONFIG_DRIVER_NDIS=y +#CFLAGS += -I/usr/include/w32api/ddk +#LIBS += -L/usr/local/lib +# For native build using mingw +#CONFIG_NATIVE_WINDOWS=y +# Additional directories for cross-compilation on Linux host for mingw target +#CFLAGS += -I/opt/mingw/mingw32/include/ddk +#LIBS += -L/opt/mingw/mingw32/lib +#CC=mingw32-gcc +# By default, driver_ndis uses WinPcap for low-level operations. This can be +# replaced with the following option which replaces WinPcap calls with NDISUIO. +# However, this requires that WZC is disabled (net stop wzcsvc) before starting +# wpa_supplicant. +# CONFIG_USE_NDISUIO=y + +# Driver interface for development testing +#CONFIG_DRIVER_TEST=y + +# Include client MLME (management frame processing) for test driver +# This can be used to test MLME operations in hostapd with the test interface. +# space. +#CONFIG_CLIENT_MLME=y + +# Driver interface for wired Ethernet drivers +CONFIG_DRIVER_WIRED=y + +# Driver interface for the Broadcom RoboSwitch family +#CONFIG_DRIVER_ROBOSWITCH=y + +# Driver interface for no driver (e.g., WPS ER only) +#CONFIG_DRIVER_NONE=y + +# Solaris libraries +#LIBS += -lsocket -ldlpi -lnsl +#LIBS_c += -lsocket + +# Enable IEEE 802.1X Supplicant (automatically included if any EAP method is +# included) +CONFIG_IEEE8021X_EAPOL=y + +# EAP-MD5 +CONFIG_EAP_MD5=y + +# EAP-MSCHAPv2 +CONFIG_EAP_MSCHAPV2=y + +# EAP-TLS +CONFIG_EAP_TLS=y + +# EAL-PEAP +CONFIG_EAP_PEAP=y + +# EAP-TTLS +CONFIG_EAP_TTLS=y + +# EAP-FAST +# Note: Default OpenSSL package does not include support for all the +# functionality needed for EAP-FAST. If EAP-FAST is enabled with OpenSSL, +# the OpenSSL library must be patched (openssl-0.9.8d-tls-extensions.patch) +# to add the needed functions. +#CONFIG_EAP_FAST=y + +# EAP-GTC +CONFIG_EAP_GTC=y + +# EAP-OTP +CONFIG_EAP_OTP=y + +# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used) +#CONFIG_EAP_SIM=y + +# EAP-PSK (experimental; this is _not_ needed for WPA-PSK) +#CONFIG_EAP_PSK=y + +# EAP-PAX +#CONFIG_EAP_PAX=y + +# LEAP +CONFIG_EAP_LEAP=y + +# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used) +#CONFIG_EAP_AKA=y + +# EAP-AKA' (enable CONFIG_PCSC, if EAP-AKA' is used). +# This requires CONFIG_EAP_AKA to be enabled, too. +#CONFIG_EAP_AKA_PRIME=y + +# Enable USIM simulator (Milenage) for EAP-AKA +#CONFIG_USIM_SIMULATOR=y + +# EAP-SAKE +#CONFIG_EAP_SAKE=y + +# EAP-GPSK +#CONFIG_EAP_GPSK=y +# Include support for optional SHA256 cipher suite in EAP-GPSK +#CONFIG_EAP_GPSK_SHA256=y + +# EAP-TNC and related Trusted Network Connect support (experimental) +#CONFIG_EAP_TNC=y + +# Wi-Fi Protected Setup (WPS) +CONFIG_WPS=y +# Enable WSC 2.0 support +CONFIG_WPS2=y + +# EAP-IKEv2 +#CONFIG_EAP_IKEV2=y + +# PKCS#12 (PFX) support (used to read private key and certificate file from +# a file that usually has extension .p12 or .pfx) +CONFIG_PKCS12=y + +# Smartcard support (i.e., private key on a smartcard), e.g., with openssl +# engine. +CONFIG_SMARTCARD=y + +# PC/SC interface for smartcards (USIM, GSM SIM) +# Enable this if EAP-SIM or EAP-AKA is included +#CONFIG_PCSC=y + +# Development testing +#CONFIG_EAPOL_TEST=y + +# Select control interface backend for external programs, e.g, wpa_cli: +# unix = UNIX domain sockets (default for Linux/*BSD) +# udp = UDP sockets using localhost (127.0.0.1) +# named_pipe = Windows Named Pipe (default for Windows) +# y = use default (backwards compatibility) +# If this option is commented out, control interface is not included in the +# build. +CONFIG_CTRL_IFACE=y + +# Include support for GNU Readline and History Libraries in wpa_cli. +# When building a wpa_cli binary for distribution, please note that these +# libraries are licensed under GPL and as such, BSD license may not apply for +# the resulting binary. +#CONFIG_READLINE=y + +# Remove debugging code that is printing out debug message to stdout. +# This can be used to reduce the size of the wpa_supplicant considerably +# if debugging code is not needed. The size reduction can be around 35% +# (e.g., 90 kB). +#CONFIG_NO_STDOUT_DEBUG=y + +# Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save +# 35-50 kB in code size. +#CONFIG_NO_WPA=y + +# Remove WPA2 support. This allows WPA to be used, but removes WPA2 code to +# save about 1 kB in code size when building only WPA-Personal (no EAP support) +# or 6 kB if building for WPA-Enterprise. +#CONFIG_NO_WPA2=y + +# Remove IEEE 802.11i/WPA-Personal ASCII passphrase support +# This option can be used to reduce code size by removing support for +# converting ASCII passphrases into PSK. If this functionality is removed, the +# PSK can only be configured as the 64-octet hexstring (e.g., from +# wpa_passphrase). This saves about 0.5 kB in code size. +#CONFIG_NO_WPA_PASSPHRASE=y + +# Disable scan result processing (ap_mode=1) to save code size by about 1 kB. +# This can be used if ap_scan=1 mode is never enabled. +#CONFIG_NO_SCAN_PROCESSING=y + +# Select configuration backend: +# file = text file (e.g., wpa_supplicant.conf; note: the configuration file +# path is given on command line, not here; this option is just used to +# select the backend that allows configuration files to be used) +# winreg = Windows registry (see win_example.reg for an example) +CONFIG_BACKEND=file + +# Remove configuration write functionality (i.e., to allow the configuration +# file to be updated based on runtime configuration changes). The runtime +# configuration can still be changed, the changes are just not going to be +# persistent over restarts. This option can be used to reduce code size by +# about 3.5 kB. +#CONFIG_NO_CONFIG_WRITE=y + +# Remove support for configuration blobs to reduce code size by about 1.5 kB. +#CONFIG_NO_CONFIG_BLOBS=y + +# Select program entry point implementation: +# main = UNIX/POSIX like main() function (default) +# main_winsvc = Windows service (read parameters from registry) +# main_none = Very basic example (development use only) +#CONFIG_MAIN=main + +# Select wrapper for operatins system and C library specific functions +# unix = UNIX/POSIX like systems (default) +# win32 = Windows systems +# none = Empty template +#CONFIG_OS=unix + +# Select event loop implementation +# eloop = select() loop (default) +# eloop_win = Windows events and WaitForMultipleObject() loop +# eloop_none = Empty template +#CONFIG_ELOOP=eloop + +# Select layer 2 packet implementation +# linux = Linux packet socket (default) +# pcap = libpcap/libdnet/WinPcap +# freebsd = FreeBSD libpcap +# winpcap = WinPcap with receive thread +# ndis = Windows NDISUIO (note: requires CONFIG_USE_NDISUIO=y) +# none = Empty template +#CONFIG_L2_PACKET=linux + +# PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) +CONFIG_PEERKEY=y + +# IEEE 802.11w (management frame protection) +# This version is an experimental implementation based on IEEE 802.11w/D1.0 +# draft and is subject to change since the standard has not yet been finalized. +# Driver support is also needed for IEEE 802.11w. +#CONFIG_IEEE80211W=y + +# Select TLS implementation +# openssl = OpenSSL (default) +# gnutls = GnuTLS (needed for TLS/IA, see also CONFIG_GNUTLS_EXTRA) +# internal = Internal TLSv1 implementation (experimental) +# none = Empty template +#CONFIG_TLS=openssl + +# Whether to enable TLS/IA support, which is required for EAP-TTLSv1. +# You need CONFIG_TLS=gnutls for this to have any effect. Please note that +# even though the core GnuTLS library is released under LGPL, this extra +# library uses GPL and as such, the terms of GPL apply to the combination +# of wpa_supplicant and GnuTLS if this option is enabled. BSD license may not +# apply for distribution of the resulting binary. +#CONFIG_GNUTLS_EXTRA=y + +# If CONFIG_TLS=internal is used, additional library and include paths are +# needed for LibTomMath. Alternatively, an integrated, minimal version of +# LibTomMath can be used. See beginning of libtommath.c for details on benefits +# and drawbacks of this option. +#CONFIG_INTERNAL_LIBTOMMATH=y +#ifndef CONFIG_INTERNAL_LIBTOMMATH +#LTM_PATH=/usr/src/libtommath-0.39 +#CFLAGS += -I$(LTM_PATH) +#LIBS += -L$(LTM_PATH) +#LIBS_p += -L$(LTM_PATH) +#endif +# At the cost of about 4 kB of additional binary size, the internal LibTomMath +# can be configured to include faster routines for exptmod, sqr, and div to +# speed up DH and RSA calculation considerably +#CONFIG_INTERNAL_LIBTOMMATH_FAST=y + +# Include NDIS event processing through WMI into wpa_supplicant/wpasvc. +# This is only for Windows builds and requires WMI-related header files and +# WbemUuid.Lib from Platform SDK even when building with MinGW. +#CONFIG_NDIS_EVENTS_INTEGRATED=y +#PLATFORMSDKLIB="/opt/Program Files/Microsoft Platform SDK/Lib" + +# Add support for old DBus control interface +# (fi.epitest.hostap.WPASupplicant) +#CONFIG_CTRL_IFACE_DBUS=y + +# Add support for new DBus control interface +# (fi.w1.hostap.wpa_supplicant1) +#CONFIG_CTRL_IFACE_DBUS_NEW=y + +# Add introspection support for new DBus control interface +#CONFIG_CTRL_IFACE_DBUS_INTRO=y + +# Add support for loading EAP methods dynamically as shared libraries. +# When this option is enabled, each EAP method can be either included +# statically (CONFIG_EAP_=y) or dynamically (CONFIG_EAP_=dyn). +# Dynamic EAP methods are build as shared objects (eap_*.so) and they need to +# be loaded in the beginning of the wpa_supplicant configuration file +# (see load_dynamic_eap parameter in the example file) before being used in +# the network blocks. +# +# Note that some shared parts of EAP methods are included in the main program +# and in order to be able to use dynamic EAP methods using these parts, the +# main program must have been build with the EAP method enabled (=y or =dyn). +# This means that EAP-TLS/PEAP/TTLS/FAST cannot be added as dynamic libraries +# unless at least one of them was included in the main build to force inclusion +# of the shared code. Similarly, at least one of EAP-SIM/AKA must be included +# in the main build to be able to load these methods dynamically. +# +# Please also note that using dynamic libraries will increase the total binary +# size. Thus, it may not be the best option for targets that have limited +# amount of memory/flash. +#CONFIG_DYNAMIC_EAP_METHODS=y + +# IEEE Std 802.11r-2008 (Fast BSS Transition) +#CONFIG_IEEE80211R=y + +# Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) +CONFIG_DEBUG_FILE=y + +# Enable privilege separation (see README 'Privilege separation' for details) +#CONFIG_PRIVSEP=y + +# Enable mitigation against certain attacks against TKIP by delaying Michael +# MIC error reports by a random amount of time between 0 and 60 seconds +#CONFIG_DELAYED_MIC_ERROR_REPORT=y + +# Enable tracing code for developer debugging +# This tracks use of memory allocations and other registrations and reports +# incorrect use with a backtrace of call (or allocation) location. +#CONFIG_WPA_TRACE=y +# For BSD, comment out these. +#LIBS += -lexecinfo +#LIBS_p += -lexecinfo +#LIBS_c += -lexecinfo + +# Use libbfd to get more details for developer debugging +# This enables use of libbfd to get more detailed symbols for the backtraces +# generated by CONFIG_WPA_TRACE=y. +#CONFIG_WPA_TRACE_BFD=y +# For BSD, comment out these. +#LIBS += -lbfd -liberty -lz +#LIBS_p += -lbfd -liberty -lz +#LIBS_c += -lbfd -liberty -lz diff --git a/recipes/wpa-supplicant/wpa-supplicant-git/wpa-supplicant.sh b/recipes/wpa-supplicant/wpa-supplicant-git/wpa-supplicant.sh new file mode 100644 index 0000000000..5c9e5d33a7 --- /dev/null +++ b/recipes/wpa-supplicant/wpa-supplicant-git/wpa-supplicant.sh @@ -0,0 +1,85 @@ +#!/bin/sh + + +WPA_SUP_BIN="/usr/sbin/wpa_supplicant" +WPA_SUP_PNAME="wpa_supplicant" +WPA_SUP_PIDFILE="/var/run/wpa_supplicant.$IFACE.pid" +WPA_SUP_OPTIONS="-B -P $WPA_SUP_PIDFILE -i $IFACE" + +VERBOSITY=0 + + +if [ -s "$IF_WPA_CONF" ]; then + WPA_SUP_CONF="-c $IF_WPA_CONF" +else + exit 0 +fi + +if [ ! -x "$WPA_SUP_BIN" ]; then + + if [ "$VERBOSITY" = "1" ]; then + echo "$WPA_SUP_PNAME: binaries not executable or missing from $WPA_SUP_BIN" + fi + + exit 1 +fi + +if [ "$MODE" = "start" ] ; then + # driver type of interface, defaults to wext when undefined + if [ -s "/etc/wpa_supplicant/driver.$IFACE" ]; then + IF_WPA_DRIVER=$(cat "/etc/wpa_supplicant/driver.$IFACE") + elif [ -z "$IF_WPA_DRIVER" ]; then + + if [ "$VERBOSITY" = "1" ]; then + echo "$WPA_SUP_PNAME: wpa-driver not provided, using \"wext\"" + fi + + IF_WPA_DRIVER="wext" + fi + + # if we have passed the criteria, start wpa_supplicant + if [ -n "$WPA_SUP_CONF" ]; then + + if [ "$VERBOSITY" = "1" ]; then + echo "$WPA_SUP_PNAME: $WPA_SUP_BIN $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER" + fi + + start-stop-daemon --start --quiet \ + --name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE \ + -- $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER + fi + + # if the interface socket exists, then wpa_supplicant was invoked successfully + if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then + + if [ "$VERBOSITY" = "1" ]; then + echo "$WPA_SUP_PNAME: ctrl_interface socket located at $WPA_COMMON_CTRL_IFACE/$IFACE" + fi + + exit 0 + + fi + +elif [ "$MODE" = "stop" ]; then + + if [ -f "$WPA_SUP_PIDFILE" ]; then + + if [ "$VERBOSITY" = "1" ]; then + echo "$WPA_SUP_PNAME: terminating $WPA_SUP_PNAME daemon" + fi + + start-stop-daemon --stop --quiet \ + --name $WPA_SUP_PNAME --pidfile $WPA_SUP_PIDFILE + + if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then + rm -f $WPA_COMMON_CTRL_IFACE/$IFACE + fi + + if [ -f "$WPA_SUP_PIDFILE" ]; then + rm -f $WPA_SUP_PIDFILE + fi + fi + +fi + +exit 0 diff --git a/recipes/wpa-supplicant/wpa-supplicant-git/wpa_supplicant.conf b/recipes/wpa-supplicant/wpa-supplicant-git/wpa_supplicant.conf new file mode 100644 index 0000000000..f0c993d195 --- /dev/null +++ b/recipes/wpa-supplicant/wpa-supplicant-git/wpa_supplicant.conf @@ -0,0 +1,690 @@ +##### Example wpa_supplicant configuration file ############################### +# +# This file describes configuration file format and lists all available option. +# Please also take a look at simpler configuration examples in 'examples' +# subdirectory. +# +# Empty lines and lines starting with # are ignored + +# NOTE! This file may contain password information and should probably be made +# readable only by root user on multiuser systems. + +# Note: All file paths in this configuration file should use full (absolute, +# not relative to working directory) path in order to allow working directory +# to be changed. This can happen if wpa_supplicant is run in the background. + +# Whether to allow wpa_supplicant to update (overwrite) configuration +# +# This option can be used to allow wpa_supplicant to overwrite configuration +# file whenever configuration is changed (e.g., new network block is added with +# wpa_cli or wpa_gui, or a password is changed). This is required for +# wpa_cli/wpa_gui to be able to store the configuration changes permanently. +# Please note that overwriting configuration file will remove the comments from +# it. +#update_config=1 + +# global configuration (shared by all network blocks) +# +# Parameters for the control interface. If this is specified, wpa_supplicant +# will open a control interface that is available for external programs to +# manage wpa_supplicant. The meaning of this string depends on which control +# interface mechanism is used. For all cases, the existance of this parameter +# in configuration is used to determine whether the control interface is +# enabled. +# +# For UNIX domain sockets (default on Linux and BSD): This is a directory that +# will be created for UNIX domain sockets for listening to requests from +# external programs (CLI/GUI, etc.) for status information and configuration. +# The socket file will be named based on the interface name, so multiple +# wpa_supplicant processes can be run at the same time if more than one +# interface is used. +# /var/run/wpa_supplicant is the recommended directory for sockets and by +# default, wpa_cli will use it when trying to connect with wpa_supplicant. +# +# Access control for the control interface can be configured by setting the +# directory to allow only members of a group to use sockets. This way, it is +# possible to run wpa_supplicant as root (since it needs to change network +# configuration and open raw sockets) and still allow GUI/CLI components to be +# run as non-root users. However, since the control interface can be used to +# change the network configuration, this access needs to be protected in many +# cases. By default, wpa_supplicant is configured to use gid 0 (root). If you +# want to allow non-root users to use the control interface, add a new group +# and change this value to match with that group. Add users that should have +# control interface access to this group. If this variable is commented out or +# not included in the configuration file, group will not be changed from the +# value it got by default when the directory or socket was created. +# +# When configuring both the directory and group, use following format: +# DIR=/var/run/wpa_supplicant GROUP=wheel +# DIR=/var/run/wpa_supplicant GROUP=0 +# (group can be either group name or gid) +# +# For UDP connections (default on Windows): The value will be ignored. This +# variable is just used to select that the control interface is to be created. +# The value can be set to, e.g., udp (ctrl_interface=udp) +# +# For Windows Named Pipe: This value can be used to set the security descriptor +# for controlling access to the control interface. Security descriptor can be +# set using Security Descriptor String Format (see http://msdn.microsoft.com/ +# library/default.asp?url=/library/en-us/secauthz/security/ +# security_descriptor_string_format.asp). The descriptor string needs to be +# prefixed with SDDL=. For example, ctrl_interface=SDDL=D: would set an empty +# DACL (which will reject all connections). See README-Windows.txt for more +# information about SDDL string format. +# +ctrl_interface=/var/run/wpa_supplicant + +# IEEE 802.1X/EAPOL version +# wpa_supplicant is implemented based on IEEE Std 802.1X-2004 which defines +# EAPOL version 2. However, there are many APs that do not handle the new +# version number correctly (they seem to drop the frames completely). In order +# to make wpa_supplicant interoperate with these APs, the version number is set +# to 1 by default. This configuration value can be used to set it to the new +# version (2). +eapol_version=1 + +# AP scanning/selection +# By default, wpa_supplicant requests driver to perform AP scanning and then +# uses the scan results to select a suitable AP. Another alternative is to +# allow the driver to take care of AP scanning and selection and use +# wpa_supplicant just to process EAPOL frames based on IEEE 802.11 association +# information from the driver. +# 1: wpa_supplicant initiates scanning and AP selection +# 0: driver takes care of scanning, AP selection, and IEEE 802.11 association +# parameters (e.g., WPA IE generation); this mode can also be used with +# non-WPA drivers when using IEEE 802.1X mode; do not try to associate with +# APs (i.e., external program needs to control association). This mode must +# also be used when using wired Ethernet drivers. +# 2: like 0, but associate with APs using security policy and SSID (but not +# BSSID); this can be used, e.g., with ndiswrapper and NDIS drivers to +# enable operation with hidden SSIDs and optimized roaming; in this mode, +# the network blocks in the configuration file are tried one by one until +# the driver reports successful association; each network block should have +# explicit security policy (i.e., only one option in the lists) for +# key_mgmt, pairwise, group, proto variables +ap_scan=1 + +# EAP fast re-authentication +# By default, fast re-authentication is enabled for all EAP methods that +# support it. This variable can be used to disable fast re-authentication. +# Normally, there is no need to disable this. +fast_reauth=1 + +# OpenSSL Engine support +# These options can be used to load OpenSSL engines. +# The two engines that are supported currently are shown below: +# They are both from the opensc project (http://www.opensc.org/) +# By default no engines are loaded. +# make the opensc engine available +#opensc_engine_path=/usr/lib/opensc/engine_opensc.so +# make the pkcs11 engine available +#pkcs11_engine_path=/usr/lib/opensc/engine_pkcs11.so +# configure the path to the pkcs11 module required by the pkcs11 engine +#pkcs11_module_path=/usr/lib/pkcs11/opensc-pkcs11.so + +# Dynamic EAP methods +# If EAP methods were built dynamically as shared object files, they need to be +# loaded here before being used in the network blocks. By default, EAP methods +# are included statically in the build, so these lines are not needed +#load_dynamic_eap=/usr/lib/wpa_supplicant/eap_tls.so +#load_dynamic_eap=/usr/lib/wpa_supplicant/eap_md5.so + +# Driver interface parameters +# This field can be used to configure arbitrary driver interace parameters. The +# format is specific to the selected driver interface. This field is not used +# in most cases. +#driver_param="field=value" + +# Maximum lifetime for PMKSA in seconds; default 43200 +#dot11RSNAConfigPMKLifetime=43200 +# Threshold for reauthentication (percentage of PMK lifetime); default 70 +#dot11RSNAConfigPMKReauthThreshold=70 +# Timeout for security association negotiation in seconds; default 60 +#dot11RSNAConfigSATimeout=60 + +# network block +# +# Each network (usually AP's sharing the same SSID) is configured as a separate +# block in this configuration file. The network blocks are in preference order +# (the first match is used). +# +# network block fields: +# +# disabled: +# 0 = this network can be used (default) +# 1 = this network block is disabled (can be enabled through ctrl_iface, +# e.g., with wpa_cli or wpa_gui) +# +# id_str: Network identifier string for external scripts. This value is passed +# to external action script through wpa_cli as WPA_ID_STR environment +# variable to make it easier to do network specific configuration. +# +# ssid: SSID (mandatory); either as an ASCII string with double quotation or +# as hex string; network name +# +# scan_ssid: +# 0 = do not scan this SSID with specific Probe Request frames (default) +# 1 = scan with SSID-specific Probe Request frames (this can be used to +# find APs that do not accept broadcast SSID or use multiple SSIDs; +# this will add latency to scanning, so enable this only when needed) +# +# bssid: BSSID (optional); if set, this network block is used only when +# associating with the AP using the configured BSSID +# +# priority: priority group (integer) +# By default, all networks will get same priority group (0). If some of the +# networks are more desirable, this field can be used to change the order in +# which wpa_supplicant goes through the networks when selecting a BSS. The +# priority groups will be iterated in decreasing priority (i.e., the larger the +# priority value, the sooner the network is matched against the scan results). +# Within each priority group, networks will be selected based on security +# policy, signal strength, etc. +# Please note that AP scanning with scan_ssid=1 and ap_scan=2 mode are not +# using this priority to select the order for scanning. Instead, they try the +# networks in the order that used in the configuration file. +# +# mode: IEEE 802.11 operation mode +# 0 = infrastructure (Managed) mode, i.e., associate with an AP (default) +# 1 = IBSS (ad-hoc, peer-to-peer) +# Note: IBSS can only be used with key_mgmt NONE (plaintext and static WEP) +# and key_mgmt=WPA-NONE (fixed group key TKIP/CCMP). In addition, ap_scan has +# to be set to 2 for IBSS. WPA-None requires following network block options: +# proto=WPA, key_mgmt=WPA-NONE, pairwise=NONE, group=TKIP (or CCMP, but not +# both), and psk must also be set. +# +# proto: list of accepted protocols +# WPA = WPA/IEEE 802.11i/D3.0 +# RSN = WPA2/IEEE 802.11i (also WPA2 can be used as an alias for RSN) +# If not set, this defaults to: WPA RSN +# +# key_mgmt: list of accepted authenticated key management protocols +# WPA-PSK = WPA pre-shared key (this requires 'psk' field) +# WPA-EAP = WPA using EAP authentication (this can use an external +# program, e.g., Xsupplicant, for IEEE 802.1X EAP Authentication +# IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically +# generated WEP keys +# NONE = WPA is not used; plaintext or static WEP could be used +# If not set, this defaults to: WPA-PSK WPA-EAP +# +# auth_alg: list of allowed IEEE 802.11 authentication algorithms +# OPEN = Open System authentication (required for WPA/WPA2) +# SHARED = Shared Key authentication (requires static WEP keys) +# LEAP = LEAP/Network EAP (only used with LEAP) +# If not set, automatic selection is used (Open System with LEAP enabled if +# LEAP is allowed as one of the EAP methods). +# +# pairwise: list of accepted pairwise (unicast) ciphers for WPA +# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] +# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] +# NONE = Use only Group Keys (deprecated, should not be included if APs support +# pairwise keys) +# If not set, this defaults to: CCMP TKIP +# +# group: list of accepted group (broadcast/multicast) ciphers for WPA +# CCMP = AES in Counter mode with CBC-MAC [RFC 3610, IEEE 802.11i/D7.0] +# TKIP = Temporal Key Integrity Protocol [IEEE 802.11i/D7.0] +# WEP104 = WEP (Wired Equivalent Privacy) with 104-bit key +# WEP40 = WEP (Wired Equivalent Privacy) with 40-bit key [IEEE 802.11] +# If not set, this defaults to: CCMP TKIP WEP104 WEP40 +# +# psk: WPA preshared key; 256-bit pre-shared key +# The key used in WPA-PSK mode can be entered either as 64 hex-digits, i.e., +# 32 bytes or as an ASCII passphrase (in which case, the real PSK will be +# generated using the passphrase and SSID). ASCII passphrase must be between +# 8 and 63 characters (inclusive). +# This field is not needed, if WPA-EAP is used. +# Note: Separate tool, wpa_passphrase, can be used to generate 256-bit keys +# from ASCII passphrase. This process uses lot of CPU and wpa_supplicant +# startup and reconfiguration time can be optimized by generating the PSK only +# only when the passphrase or SSID has actually changed. +# +# eapol_flags: IEEE 802.1X/EAPOL options (bit field) +# Dynamic WEP key required for non-WPA mode +# bit0 (1): require dynamically generated unicast WEP key +# bit1 (2): require dynamically generated broadcast WEP key +# (3 = require both keys; default) +# Note: When using wired authentication, eapol_flags must be set to 0 for the +# authentication to be completed successfully. +# +# proactive_key_caching: +# Enable/disable opportunistic PMKSA caching for WPA2. +# 0 = disabled (default) +# 1 = enabled +# +# wep_key0..3: Static WEP key (ASCII in double quotation, e.g. "abcde" or +# hex without quotation, e.g., 0102030405) +# wep_tx_keyidx: Default WEP key index (TX) (0..3) +# +# peerkey: Whether PeerKey negotiation for direct links (IEEE 802.11e DLS) is +# allowed. This is only used with RSN/WPA2. +# 0 = disabled (default) +# 1 = enabled +#peerkey=1 +# +# Following fields are only used with internal EAP implementation. +# eap: space-separated list of accepted EAP methods +# MD5 = EAP-MD5 (unsecure and does not generate keying material -> +# cannot be used with WPA; to be used as a Phase 2 method +# with EAP-PEAP or EAP-TTLS) +# MSCHAPV2 = EAP-MSCHAPv2 (cannot be used separately with WPA; to be used +# as a Phase 2 method with EAP-PEAP or EAP-TTLS) +# OTP = EAP-OTP (cannot be used separately with WPA; to be used +# as a Phase 2 method with EAP-PEAP or EAP-TTLS) +# GTC = EAP-GTC (cannot be used separately with WPA; to be used +# as a Phase 2 method with EAP-PEAP or EAP-TTLS) +# TLS = EAP-TLS (client and server certificate) +# PEAP = EAP-PEAP (with tunnelled EAP authentication) +# TTLS = EAP-TTLS (with tunnelled EAP or PAP/CHAP/MSCHAP/MSCHAPV2 +# authentication) +# If not set, all compiled in methods are allowed. +# +# identity: Identity string for EAP +# anonymous_identity: Anonymous identity string for EAP (to be used as the +# unencrypted identity with EAP types that support different tunnelled +# identity, e.g., EAP-TTLS) +# password: Password string for EAP +# ca_cert: File path to CA certificate file (PEM/DER). This file can have one +# or more trusted CA certificates. If ca_cert and ca_path are not +# included, server certificate will not be verified. This is insecure and +# a trusted CA certificate should always be configured when using +# EAP-TLS/TTLS/PEAP. Full path should be used since working directory may +# change when wpa_supplicant is run in the background. +# On Windows, trusted CA certificates can be loaded from the system +# certificate store by setting this to cert_store://, e.g., +# ca_cert="cert_store://CA" or ca_cert="cert_store://ROOT". +# Note that when running wpa_supplicant as an application, the user +# certificate store (My user account) is used, whereas computer store +# (Computer account) is used when running wpasvc as a service. +# ca_path: Directory path for CA certificate files (PEM). This path may +# contain multiple CA certificates in OpenSSL format. Common use for this +# is to point to system trusted CA list which is often installed into +# directory like /etc/ssl/certs. If configured, these certificates are +# added to the list of trusted CAs. ca_cert may also be included in that +# case, but it is not required. +# client_cert: File path to client certificate file (PEM/DER) +# Full path should be used since working directory may change when +# wpa_supplicant is run in the background. +# Alternatively, a named configuration blob can be used by setting this +# to blob://. +# private_key: File path to client private key file (PEM/DER/PFX) +# When PKCS#12/PFX file (.p12/.pfx) is used, client_cert should be +# commented out. Both the private key and certificate will be read from +# the PKCS#12 file in this case. Full path should be used since working +# directory may change when wpa_supplicant is run in the background. +# Windows certificate store can be used by leaving client_cert out and +# configuring private_key in one of the following formats: +# cert://substring_to_match +# hash://certificate_thumbprint_in_hex +# for example: private_key="hash://63093aa9c47f56ae88334c7b65a4" +# Note that when running wpa_supplicant as an application, the user +# certificate store (My user account) is used, whereas computer store +# (Computer account) is used when running wpasvc as a service. +# Alternatively, a named configuration blob can be used by setting this +# to blob://. +# private_key_passwd: Password for private key file (if left out, this will be +# asked through control interface) +# dh_file: File path to DH/DSA parameters file (in PEM format) +# This is an optional configuration file for setting parameters for an +# ephemeral DH key exchange. In most cases, the default RSA +# authentication does not use this configuration. However, it is possible +# setup RSA to use ephemeral DH key exchange. In addition, ciphers with +# DSA keys always use ephemeral DH keys. This can be used to achieve +# forward secrecy. If the file is in DSA parameters format, it will be +# automatically converted into DH params. +# subject_match: Substring to be matched against the subject of the +# authentication server certificate. If this string is set, the server +# sertificate is only accepted if it contains this string in the subject. +# The subject string is in following format: +# /C=US/ST=CA/L=San Francisco/CN=Test AS/emailAddress=as@example.com +# altsubject_match: Semicolon separated string of entries to be matched against +# the alternative subject name of the authentication server certificate. +# If this string is set, the server sertificate is only accepted if it +# contains one of the entries in an alternative subject name extension. +# altSubjectName string is in following format: TYPE:VALUE +# Example: EMAIL:server@example.com +# Example: DNS:server.example.com;DNS:server2.example.com +# Following types are supported: EMAIL, DNS, URI +# phase1: Phase1 (outer authentication, i.e., TLS tunnel) parameters +# (string with field-value pairs, e.g., "peapver=0" or +# "peapver=1 peaplabel=1") +# 'peapver' can be used to force which PEAP version (0 or 1) is used. +# 'peaplabel=1' can be used to force new label, "client PEAP encryption", +# to be used during key derivation when PEAPv1 or newer. Most existing +# PEAPv1 implementation seem to be using the old label, "client EAP +# encryption", and wpa_supplicant is now using that as the default value. +# Some servers, e.g., Radiator, may require peaplabel=1 configuration to +# interoperate with PEAPv1; see eap_testing.txt for more details. +# 'peap_outer_success=0' can be used to terminate PEAP authentication on +# tunneled EAP-Success. This is required with some RADIUS servers that +# implement draft-josefsson-pppext-eap-tls-eap-05.txt (e.g., +# Lucent NavisRadius v4.4.0 with PEAP in "IETF Draft 5" mode) +# include_tls_length=1 can be used to force wpa_supplicant to include +# TLS Message Length field in all TLS messages even if they are not +# fragmented. +# sim_min_num_chal=3 can be used to configure EAP-SIM to require three +# challenges (by default, it accepts 2 or 3) +# phase2: Phase2 (inner authentication with TLS tunnel) parameters +# (string with field-value pairs, e.g., "auth=MSCHAPV2" for EAP-PEAP or +# "autheap=MSCHAPV2 autheap=MD5" for EAP-TTLS) +# Following certificate/private key fields are used in inner Phase2 +# authentication when using EAP-TTLS or EAP-PEAP. +# ca_cert2: File path to CA certificate file. This file can have one or more +# trusted CA certificates. If ca_cert2 and ca_path2 are not included, +# server certificate will not be verified. This is insecure and a trusted +# CA certificate should always be configured. +# ca_path2: Directory path for CA certificate files (PEM) +# client_cert2: File path to client certificate file +# private_key2: File path to client private key file +# private_key2_passwd: Password for private key file +# dh_file2: File path to DH/DSA parameters file (in PEM format) +# subject_match2: Substring to be matched against the subject of the +# authentication server certificate. +# altsubject_match2: Substring to be matched against the alternative subject +# name of the authentication server certificate. +# +# fragment_size: Maximum EAP fragment size in bytes (default 1398). +# This value limits the fragment size for EAP methods that support +# fragmentation (e.g., EAP-TLS and EAP-PEAP). This value should be set +# small enough to make the EAP messages fit in MTU of the network +# interface used for EAPOL. The default value is suitable for most +# cases. +# +# EAP-PSK variables: +# eappsk: 16-byte (128-bit, 32 hex digits) pre-shared key in hex format +# nai: user NAI +# +# EAP-PAX variables: +# eappsk: 16-byte (128-bit, 32 hex digits) pre-shared key in hex format +# +# EAP-SAKE variables: +# eappsk: 32-byte (256-bit, 64 hex digits) pre-shared key in hex format +# (this is concatenation of Root-Secret-A and Root-Secret-B) +# nai: user NAI (PEERID) +# +# EAP-GPSK variables: +# eappsk: Pre-shared key in hex format (at least 128 bits, i.e., 32 hex digits) +# nai: user NAI (ID_Client) +# +# EAP-FAST variables: +# pac_file: File path for the PAC entries. wpa_supplicant will need to be able +# to create this file and write updates to it when PAC is being +# provisioned or refreshed. Full path to the file should be used since +# working directory may change when wpa_supplicant is run in the +# background. Alternatively, a named configuration blob can be used by +# setting this to blob:// +# phase1: fast_provisioning=1 option enables in-line provisioning of EAP-FAST +# credentials (PAC) +# +# wpa_supplicant supports number of "EAP workarounds" to work around +# interoperability issues with incorrectly behaving authentication servers. +# These are enabled by default because some of the issues are present in large +# number of authentication servers. Strict EAP conformance mode can be +# configured by disabling workarounds with eap_workaround=0. + +# Example blocks: + +# Simple case: WPA-PSK, PSK as an ASCII passphrase, allow all valid ciphers +network={ + ssid="simple" + psk="very secret passphrase" + priority=5 +} + +# Same as previous, but request SSID-specific scanning (for APs that reject +# broadcast SSID) +network={ + ssid="second ssid" + scan_ssid=1 + psk="very secret passphrase" + priority=2 +} + +# Only WPA-PSK is used. Any valid cipher combination is accepted. +network={ + ssid="example" + proto=WPA + key_mgmt=WPA-PSK + pairwise=CCMP TKIP + group=CCMP TKIP WEP104 WEP40 + psk=06b4be19da289f475aa46a33cb793029d4ab3db7a23ee92382eb0106c72ac7bb + priority=2 +} + +# Only WPA-EAP is used. Both CCMP and TKIP is accepted. An AP that used WEP104 +# or WEP40 as the group cipher will not be accepted. +network={ + ssid="example" + proto=RSN + key_mgmt=WPA-EAP + pairwise=CCMP TKIP + group=CCMP TKIP + eap=TLS + identity="user@example.com" + ca_cert="/etc/cert/ca.pem" + client_cert="/etc/cert/user.pem" + private_key="/etc/cert/user.prv" + private_key_passwd="password" + priority=1 +} + +# EAP-PEAP/MSCHAPv2 configuration for RADIUS servers that use the new peaplabel +# (e.g., Radiator) +network={ + ssid="example" + key_mgmt=WPA-EAP + eap=PEAP + identity="user@example.com" + password="foobar" + ca_cert="/etc/cert/ca.pem" + phase1="peaplabel=1" + phase2="auth=MSCHAPV2" + priority=10 +} + +# EAP-TTLS/EAP-MD5-Challenge configuration with anonymous identity for the +# unencrypted use. Real identity is sent only within an encrypted TLS tunnel. +network={ + ssid="example" + key_mgmt=WPA-EAP + eap=TTLS + identity="user@example.com" + anonymous_identity="anonymous@example.com" + password="foobar" + ca_cert="/etc/cert/ca.pem" + priority=2 +} + +# EAP-TTLS/MSCHAPv2 configuration with anonymous identity for the unencrypted +# use. Real identity is sent only within an encrypted TLS tunnel. +network={ + ssid="example" + key_mgmt=WPA-EAP + eap=TTLS + identity="user@example.com" + anonymous_identity="anonymous@example.com" + password="foobar" + ca_cert="/etc/cert/ca.pem" + phase2="auth=MSCHAPV2" +} + +# WPA-EAP, EAP-TTLS with different CA certificate used for outer and inner +# authentication. +network={ + ssid="example" + key_mgmt=WPA-EAP + eap=TTLS + # Phase1 / outer authentication + anonymous_identity="anonymous@example.com" + ca_cert="/etc/cert/ca.pem" + # Phase 2 / inner authentication + phase2="autheap=TLS" + ca_cert2="/etc/cert/ca2.pem" + client_cert2="/etc/cer/user.pem" + private_key2="/etc/cer/user.prv" + private_key2_passwd="password" + priority=2 +} + +# Both WPA-PSK and WPA-EAP is accepted. Only CCMP is accepted as pairwise and +# group cipher. +network={ + ssid="example" + bssid=00:11:22:33:44:55 + proto=WPA RSN + key_mgmt=WPA-PSK WPA-EAP + pairwise=CCMP + group=CCMP + psk=06b4be19da289f475aa46a33cb793029d4ab3db7a23ee92382eb0106c72ac7bb +} + +# Special characters in SSID, so use hex string. Default to WPA-PSK, WPA-EAP +# and all valid ciphers. +network={ + ssid=00010203 + psk=000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f +} + + +# IEEE 802.1X/EAPOL with dynamically generated WEP keys (i.e., no WPA) using +# EAP-TLS for authentication and key generation; require both unicast and +# broadcast WEP keys. +network={ + ssid="1x-test" + key_mgmt=IEEE8021X + eap=TLS + identity="user@example.com" + ca_cert="/etc/cert/ca.pem" + client_cert="/etc/cert/user.pem" + private_key="/etc/cert/user.prv" + private_key_passwd="password" + eapol_flags=3 +} + + +# LEAP with dynamic WEP keys +network={ + ssid="leap-example" + key_mgmt=IEEE8021X + eap=LEAP + identity="user" + password="foobar" +} + +# Plaintext connection (no WPA, no IEEE 802.1X) +network={ + ssid="plaintext-test" + key_mgmt=NONE +} + + +# Shared WEP key connection (no WPA, no IEEE 802.1X) +network={ + ssid="static-wep-test" + key_mgmt=NONE + wep_key0="abcde" + wep_key1=0102030405 + wep_key2="1234567890123" + wep_tx_keyidx=0 + priority=5 +} + + +# Shared WEP key connection (no WPA, no IEEE 802.1X) using Shared Key +# IEEE 802.11 authentication +network={ + ssid="static-wep-test2" + key_mgmt=NONE + wep_key0="abcde" + wep_key1=0102030405 + wep_key2="1234567890123" + wep_tx_keyidx=0 + priority=5 + auth_alg=SHARED +} + + +# IBSS/ad-hoc network with WPA-None/TKIP. +network={ + ssid="test adhoc" + mode=1 + proto=WPA + key_mgmt=WPA-NONE + pairwise=NONE + group=TKIP + psk="secret passphrase" +} + + +# Catch all example that allows more or less all configuration modes +network={ + ssid="example" + scan_ssid=1 + key_mgmt=WPA-EAP WPA-PSK IEEE8021X NONE + pairwise=CCMP TKIP + group=CCMP TKIP WEP104 WEP40 + psk="very secret passphrase" + eap=TTLS PEAP TLS + identity="user@example.com" + password="foobar" + ca_cert="/etc/cert/ca.pem" + client_cert="/etc/cert/user.pem" + private_key="/etc/cert/user.prv" + private_key_passwd="password" + phase1="peaplabel=0" +} + +# Example of EAP-TLS with smartcard (openssl engine) +network={ + ssid="example" + key_mgmt=WPA-EAP + eap=TLS + proto=RSN + pairwise=CCMP TKIP + group=CCMP TKIP + identity="user@example.com" + ca_cert="/etc/cert/ca.pem" + client_cert="/etc/cert/user.pem" + + engine=1 + + # The engine configured here must be available. Look at + # OpenSSL engine support in the global section. + # The key available through the engine must be the private key + # matching the client certificate configured above. + + # use the opensc engine + #engine_id="opensc" + #key_id="45" + + # use the pkcs11 engine + engine_id="pkcs11" + key_id="id_45" + + # Optional PIN configuration; this can be left out and PIN will be + # asked through the control interface + pin="1234" +} + +# Example configuration showing how to use an inlined blob as a CA certificate +# data instead of using external file +network={ + ssid="example" + key_mgmt=WPA-EAP + eap=TTLS + identity="user@example.com" + anonymous_identity="anonymous@example.com" + password="foobar" + ca_cert="blob://exampleblob" + priority=20 +} + +blob-base64-exampleblob={ +SGVsbG8gV29ybGQhCg== +} + + +# Wildcard match for SSID (plaintext APs only). This example select any +# open AP regardless of its SSID. +network={ + key_mgmt=NONE +} diff --git a/recipes/wpa-supplicant/wpa-supplicant-git/wpa_supplicant.conf-sane b/recipes/wpa-supplicant/wpa-supplicant-git/wpa_supplicant.conf-sane new file mode 100644 index 0000000000..c91ffe0c84 --- /dev/null +++ b/recipes/wpa-supplicant/wpa-supplicant-git/wpa_supplicant.conf-sane @@ -0,0 +1,7 @@ +ctrl_interface=/var/run/wpa_supplicant +ctrl_interface_group=0 +update_config=1 + +network={ + key_mgmt=NONE +} diff --git a/recipes/wpa-supplicant/wpa-supplicant_0.7.3.bb b/recipes/wpa-supplicant/wpa-supplicant_0.7.3.bb index 60a4791915..05a94eb75a 100644 --- a/recipes/wpa-supplicant/wpa-supplicant_0.7.3.bb +++ b/recipes/wpa-supplicant/wpa-supplicant_0.7.3.bb @@ -1,6 +1,6 @@ require wpa-supplicant-0.7.inc -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" SRC_URI[md5sum] = "f516f191384a9a546e3f5145c08addda" SRC_URI[sha256sum] = "d0cd50caa85346ccc376dcda5ed3c258eef19a93b3cade39d25760118ad59443" diff --git a/recipes/wpa-supplicant/wpa-supplicant_git.bb b/recipes/wpa-supplicant/wpa-supplicant_git.bb new file mode 100644 index 0000000000..7525144985 --- /dev/null +++ b/recipes/wpa-supplicant/wpa-supplicant_git.bb @@ -0,0 +1,30 @@ +require wpa-supplicant-0.7.inc + +SRCREV = "83fa07226debc2f7082b6ccd62dbb1cd47c30472" +PR = "r1" +PV = "0.7.3+0.8.0-rc" +PR_append = "+gitr${SRCPV}" +FILESPATHPKG =. "wpa-supplicant-git:" + +DEFAULT_PREFERENCE = "-1" + +SRC_URI = "git://w1.fi/srv/git/hostap.git;protocol=git \ + file://defconfig \ + file://defaults-sane \ + file://wpa-supplicant.sh \ + file://wpa_supplicant.conf \ + file://wpa_supplicant.conf-sane \ + file://99_wpa_supplicant" + +S = "${WORKDIR}/git/wpa_supplicant" + +do_configure () { + install -m 0755 ${WORKDIR}/defconfig .config + echo "CFLAGS += -I${STAGING_INCDIR}" >> .config + echo "LIBS += -L${STAGING_LIBDIR}" >> .config + echo "LIBS_p += -L${STAGING_LIBDIR}" >> .config + if [ "${@base_contains('COMBINED_FEATURES', 'madwifi', 1, 0, d)}" = "1" ]; then + echo "CONFIG_DRIVER_MADWIFI=y" >> .config + echo "CFLAGS += -I${STAGING_INCDIR}/madwifi-ng" >> .config + fi +} diff --git a/recipes/x-load/x-load-git/0001-Beagle-Rev-C5-support.patch b/recipes/x-load/x-load-git/0001-Beagle-Rev-C5-support.patch new file mode 100644 index 0000000000..1c67bd359d --- /dev/null +++ b/recipes/x-load/x-load-git/0001-Beagle-Rev-C5-support.patch @@ -0,0 +1,60 @@ +From 992eb6ff881792f5c753ef6c85be0ceb2d162c78 Mon Sep 17 00:00:00 2001 +From: Joel Fernandes +Date: Tue, 7 Jun 2011 09:50:03 +0200 +Subject: [PATCH] Beagle Rev C5 support + +--- + board/omap3530beagle/omap3530beagle.c | 16 ++++++++++++++++ + 1 files changed, 16 insertions(+), 0 deletions(-) + +diff --git a/board/omap3530beagle/omap3530beagle.c b/board/omap3530beagle/omap3530beagle.c +index 15943f5..2b8c3c0 100644 +--- a/board/omap3530beagle/omap3530beagle.c ++++ b/board/omap3530beagle/omap3530beagle.c +@@ -281,6 +281,7 @@ u32 wait_on_value(u32 read_bit_mask, u32 match_value, u32 read_addr, u32 bound) + + #define MICRON_DDR 0 + #define NUMONYX_MCP 1 ++#define MICRON_MCP 2 + int identify_xm_ddr() + { + int mfr, id; +@@ -303,6 +304,8 @@ int identify_xm_ddr() + return MICRON_DDR; + if ((mfr == 0x20) && (id == 0xba)) + return NUMONYX_MCP; ++ if ((mfr == 0x2c) && (id == 0xbc)) ++ return MICRON_MCP; + } + /********************************************************************* + * config_3430sdram_ddr() - Init DDR on 3430SDP dev board. +@@ -329,6 +332,17 @@ void config_3430sdram_ddr(void) + __raw_writel(NUMONYX_V_ACTIMB_165, SDRC_ACTIM_CTRLB_1); + __raw_writel(SDP_3430_SDRC_RFR_CTRL_165MHz, SDRC_RFR_CTRL_0); + __raw_writel(SDP_3430_SDRC_RFR_CTRL_165MHz, SDRC_RFR_CTRL_1); ++ } else if (identify_xm_ddr() == MICRON_MCP) { ++ /* Beagleboard Rev C5 */ ++ __raw_writel(0x2, SDRC_CS_CFG); /* 256MB/bank */ ++ __raw_writel(SDP_SDRC_MDCFG_0_DDR_MICRON_XM, SDRC_MCFG_0); ++ __raw_writel(SDP_SDRC_MDCFG_0_DDR_MICRON_XM, SDRC_MCFG_1); ++ __raw_writel(MICRON_V_ACTIMA_200, SDRC_ACTIM_CTRLA_0); ++ __raw_writel(MICRON_V_ACTIMB_200, SDRC_ACTIM_CTRLB_0); ++ __raw_writel(MICRON_V_ACTIMA_200, SDRC_ACTIM_CTRLA_1); ++ __raw_writel(MICRON_V_ACTIMB_200, SDRC_ACTIM_CTRLB_1); ++ __raw_writel(SDP_3430_SDRC_RFR_CTRL_200MHz, SDRC_RFR_CTRL_0); ++ __raw_writel(SDP_3430_SDRC_RFR_CTRL_200MHz, SDRC_RFR_CTRL_1); + } else { + __raw_writel(0x1, SDRC_CS_CFG); /* 128MB/bank */ + __raw_writel(SDP_SDRC_MDCFG_0_DDR, SDRC_MCFG_0); +@@ -699,6 +713,8 @@ int misc_init_r(void) + case REVISION_C4: + if (identify_xm_ddr() == NUMONYX_MCP) + printf("Beagle Rev C4 from Special Computing\n"); ++ else if(identify_xm_ddr() == MICRON_MCP) ++ printf("Beagle Rev C5\n"); + else + printf("Beagle Rev C4\n"); + break; +-- +1.6.6.1 + diff --git a/recipes/x-load/x-load-git/xmc.patch b/recipes/x-load/x-load-git/xmc.patch new file mode 100644 index 0000000000..bddcb8fc7f --- /dev/null +++ b/recipes/x-load/x-load-git/xmc.patch @@ -0,0 +1,52 @@ +From b35937bf29c828e311f1d9bb1385bd32d34ec060 Mon Sep 17 00:00:00 2001 +From: Jason Kridner +Date: Mon, 7 Mar 2011 19:31:15 -0600 +Subject: [PATCH] Forced newer revisions to default to xM. + +--- + board/omap3530beagle/omap3530beagle.c | 15 ++++++++++++++- + 1 files changed, 14 insertions(+), 1 deletions(-) + +diff --git a/board/omap3530beagle/omap3530beagle.c b/board/omap3530beagle/omap3530beagle.c +index 1b3d8c7..d55d32e 100644 +--- a/board/omap3530beagle/omap3530beagle.c ++++ b/board/omap3530beagle/omap3530beagle.c +@@ -212,6 +212,7 @@ u32 cpu_is_3410(void) + * GPIO173, GPIO172, GPIO171: 1 1 0 => C1/2/3 + * GPIO173, GPIO172, GPIO171: 1 0 1 => C4 + * GPIO173, GPIO172, GPIO171: 0 0 0 => XM ++ * default => XM + ******************************************/ + int beagle_revision(void) + { +@@ -227,6 +228,18 @@ int beagle_revision(void) + rev = omap_get_gpio_datain(173) << 2 | + omap_get_gpio_datain(172) << 1 | + omap_get_gpio_datain(171); ++ ++ /* Default newer board revisions to XM */ ++ switch(rev) { ++ case REVISION_AXBX: ++ case REVISION_CX: ++ case REVISION_C4: ++ break; ++ case REVISION_XM: ++ default: ++ rev = REVISION_XM; ++ } ++ + omap_free_gpio(171); + omap_free_gpio(172); + omap_free_gpio(173); +@@ -662,7 +675,7 @@ int misc_init_r(void) + printf("Beagle Rev C4\n"); + break; + case REVISION_XM: +- printf("Beagle xM Rev A\n"); ++ printf("Beagle xM\n"); + break; + default: + printf("Beagle unknown 0x%02x\n", rev); +-- +1.6.1 + diff --git a/recipes/x-load/x-load_git.bb b/recipes/x-load/x-load_git.bb index 523251e5c5..3be993b3e9 100644 --- a/recipes/x-load/x-load_git.bb +++ b/recipes/x-load/x-load_git.bb @@ -4,17 +4,13 @@ DEFAULT_PREFERENCE_omap3-pandora = "-1" FILESPATHPKG_prepend = "x-load-git:x-load-git/${MACHINE}" -PV = "1.44+${PR}+gitr${SRCREV}" -PR ="r20" -PE = "1" +PV = "1.5.0+${PR}+gitr${SRCREV}" +PR ="r24" +PE = "2" -SRCREV = "24b8b7f41a83540433024854736518876257672c" +SRCREV = "04b1732220078d47c18a84cbafc52e45db71f13d" SRC_URI = "git://gitorious.org/x-loader/x-loader.git;branch=master;protocol=git \ - file://0001-OMAP4-clocks-Enable-only-required-clks.patch \ - file://0002-OMAP4-Select-DPLL-PER-Clock-as-source-for-SGX-FCLK.patch \ - file://0003-MUX-Configure-SYS_NIRQ2-pin-in-safe-mode.patch \ - file://0004-OMAP4-clocks-Disable-slimbus-and-pad_clks.patch \ - file://0005-omap4-Make-1GHz-as-default-MPU-clock.patch \ + file://0001-Beagle-Rev-C5-support.patch \ " XLOAD_MACHINE_beagleboard = "omap3530beagle_config" diff --git a/recipes/xawtv/xawtv-3.95/01_gcc4.patch b/recipes/xawtv/xawtv-3.95/01_gcc4.patch new file mode 100644 index 0000000000..ad45a7a2da --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/01_gcc4.patch @@ -0,0 +1,11 @@ +diff -urNad motv-3.95~/x11/vbi-gui.c motv-3.95/x11/vbi-gui.c +--- motv-3.95~/x11/vbi-gui.c ++++ motv-3.95/x11/vbi-gui.c +@@ -44,6 +44,7 @@ + #include "vbi-x11.h" + #include "vbi-gui.h" + ++#include "grab-ng.h" + #include "channel.h" + + static int tt_debug = 1; diff --git a/recipes/xawtv/xawtv-3.95/03_libquicktime.patch b/recipes/xawtv/xawtv-3.95/03_libquicktime.patch new file mode 100644 index 0000000000..958a265d8b --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/03_libquicktime.patch @@ -0,0 +1,32 @@ +diff -urNad xawtv-3.95~/libng/plugins/read-qt.c xawtv-3.95/libng/plugins/read-qt.c +--- xawtv-3.95~/libng/plugins/read-qt.c ++++ xawtv-3.95/libng/plugins/read-qt.c +@@ -4,9 +4,9 @@ + #include + #include + #include +-#include +-#include +-#include ++#include ++#include ++#include + + #include "grab-ng.h" + +diff -urNad xawtv-3.95~/libng/plugins/write-qt.c xawtv-3.95/libng/plugins/write-qt.c +--- xawtv-3.95~/libng/plugins/write-qt.c ++++ xawtv-3.95/libng/plugins/write-qt.c +@@ -4,9 +4,9 @@ + #include + #include + #include +-#include +-#include +-#include ++#include ++#include ++#include + + #include "grab-ng.h" + diff --git a/recipes/xawtv/xawtv-3.95/04_man_typo.patch b/recipes/xawtv/xawtv-3.95/04_man_typo.patch new file mode 100644 index 0000000000..ea00df13b5 --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/04_man_typo.patch @@ -0,0 +1,170 @@ +diff -urNad xawtv-3.95~/man/fbtv.1 xawtv-3.95/man/fbtv.1 +--- xawtv-3.95~/man/fbtv.1 ++++ xawtv-3.95/man/fbtv.1 +@@ -98,7 +98,7 @@ + The BT8xx cards can produce images up to 768x576 pixels. In order to + have fbtv make use of your entire monitor-size and get maximum image + quality, you need to create a 768x576 pixels framebufferconsole. This +-can be accomplished with the fbset(1) utility, which is availabile at ++can be accomplished with the fbset(1) utility, which is available at + various locations. See: http://www.cs.kuleuven.ac.be/~geert/bin/ + .P + Or, you can let fbtv handle the videomode changes with the -m switch. +diff -urNad xawtv-3.95~/man/pia.1 xawtv-3.95/man/pia.1 +--- xawtv-3.95~/man/pia.1 ++++ xawtv-3.95/man/pia.1 +@@ -5,7 +5,7 @@ + .B pia [ options ] movie + .SH DESCRIPTION + .B pia +-is a small X11 tool which playes movie files. ++is a small X11 tool which plays movie files. + .SH OPTIONS + .B pia + understands the usual toolkit options (-geometry + friends). +@@ -24,7 +24,7 @@ + Use OSS device for sound. + .TP + .B -noxv +-Disable Xvideo extention. ++Disable Xvideo extension. + .TP + .B -nogl + Disable OpenGL. +@@ -41,7 +41,7 @@ + .SH SUPPORTED MOVIE FORMATS + Main purpose of this utility is to playback movie files recorded by + xawtv, motv and streamer. It should be able to playback every AVI or +-QuickTime movie written by one of the mentioned utilites. Feel free ++QuickTime movie written by one of the mentioned utilities. Feel free + to submit a bug report if this doesn't work for some file. + .SS QuickTime + .B pia +diff -urNad xawtv-3.95~/man/record.1 xawtv-3.95/man/record.1 +--- xawtv-3.95~/man/record.1 ++++ xawtv-3.95/man/record.1 +@@ -16,7 +16,7 @@ + .TP + .B -o file + basename for the output file(s), a number and the .wav +-extention are added by record. Default is "record". ++extension are added by record. Default is "record". + .TP + .B -i dev + mixer control. This should be the one where you can adjust the record +diff -urNad xawtv-3.95~/man/rootv.1 xawtv-3.95/man/rootv.1 +--- xawtv-3.95~/man/rootv.1 ++++ xawtv-3.95/man/rootv.1 +@@ -1,6 +1,6 @@ + .TH rootv 1 "(c) 2000-2002 Gerd Knorr" + .SH NAME +-rootv - display TV using the Xvideo extention ++rootv - display TV using the Xvideo extension + .SH SYNOPSIS + .B rootv [ options ] + .SH DESCRIPTION +@@ -9,7 +9,7 @@ + but you can also ask it to use the root window (thus the name) or any + other window. + .B rootv +-needs the Xvideo extention. ++needs the Xvideo extension. + .P + .B rootv + itself provides no way to control video/audio/tuner. You can use +diff -urNad xawtv-3.95~/man/subtitles.1 xawtv-3.95/man/subtitles.1 +--- xawtv-3.95~/man/subtitles.1 ++++ xawtv-3.95/man/subtitles.1 +@@ -8,7 +8,7 @@ + fetches the given teletext page with the alevt-cap utility and + displays it using xawtv-remote in an endless loop. It's most + useful for pages which carry subtitles for the current TV program. +-It's page 150 in germany. ++It's page 150 in Germany. + .SH OPTIONS + .TP + .B -help +diff -urNad xawtv-3.95~/man/v4l-conf.8 xawtv-3.95/man/v4l-conf.8 +--- xawtv-3.95~/man/v4l-conf.8 ++++ xawtv-3.95/man/v4l-conf.8 +@@ -20,7 +20,7 @@ + knows three ways to get the informations: + .TP 3 + * +-Query the X-Server using the XF86 DGA extention. This is the default ++Query the X-Server using the XF86 DGA extension. This is the default + if the DISPLAY environment variable is set. + .TP 3 + * +@@ -63,7 +63,7 @@ + work because the X-Server lacks DGA support. You can put this into + /etc/conf.modules, as "post-install bttv ..." for example. + .SH BUGS +-Hope I havn't any security flaws in there. If you find one, drop me a ++Hope I haven't any security flaws in there. If you find one, drop me a + note. Mails with patches are preferred :-) + .SH SEE ALSO + xawtv(1), fbtv(1) +diff -urNad xawtv-3.95~/man/webcam.1 xawtv-3.95/man/webcam.1 +--- xawtv-3.95~/man/webcam.1 ++++ xawtv-3.95/man/webcam.1 +@@ -150,7 +150,7 @@ + paper "Correcting Distortion of Image by Image Registration" of Toru + Tamaki, Tsuyoshi Yamamura and Noboru Ahnishi. More your lens has an + important distortion, more 'distor_k' must be neared of 0. 700 is the +-défault value. Coefficient k of program is x100 than article. ++default value. Coefficient k of program is x100 than article. + .TP + .B distor_cx = 192 + .TP +diff -urNad xawtv-3.95~/man/xawtv-remote.1 xawtv-3.95/man/xawtv-remote.1 +--- xawtv-3.95~/man/xawtv-remote.1 ++++ xawtv-3.95/man/xawtv-remote.1 +@@ -136,14 +136,14 @@ + .TP + .B vtx line1 line2 [ ... ] + Display subtitles. It pops up a small window at the bottom of the screen. +-It is supported to be used as interface for displaying subtitles (often on +-videotext page 150 in europe, thats why the name) by external programs. ++It is intended to be used as an interface for displaying subtitles (often on ++videotext page 150 in Europe, that's why the name) by external programs. + .br + Every command line argument is one line, zero lines removes the window. + You can colorize the text with the control sequence "ESC foreground + background". foreground/background has the range 0-7 (ansi term colors). + Example: "\\03347 hello world " is blue on white. "\\033" must be a real +-escape character, the string does'nt work. With the bash you'll get it ++escape character, the string doesn't work. With the bash you'll get it + with ^V ESC. vtx does also understand the ANSI tty escape sequences for + color. + .TP +diff -urNad xawtv-3.95~/man/xawtv.1 xawtv-3.95/man/xawtv.1 +--- xawtv-3.95~/man/xawtv.1 ++++ xawtv-3.95/man/xawtv.1 +@@ -70,7 +70,7 @@ + .TP + \fB-remote\fP + X11 display is remote. This basically disables overlay mode, you +-might need this if xawtv failes to autodetect a remote X11 display. ++might need this if xawtv fails to autodetect a remote X11 display. + .br + Resource: xawtv.remote (bool). + .TP +@@ -155,7 +155,7 @@ + more details and hints on how to setup Xvideo. + .SH GETTING STARTED + Just start xawtv. Then verify the settings in the options menu (right +-mouse button) and adjust the settings (TV norm, Video source, freqency ++mouse button) and adjust the settings (TV norm, Video source, frequency + table). With the cursor keys you can control the tuner and look for + TV Stations. Other useful hotkeys are listed below. + .P +@@ -190,7 +190,7 @@ + Z Channel Hopper (\fIz\fPapping, tune in every + station a few seconds) + Ctrl+Z Fast Channel Hopping (grab the images for the +- Channel Bottons) ++ Channel Buttons) + + up/down tune up/down one channel + left/right fine tuning diff --git a/recipes/xawtv/xawtv-3.95/05_man_section.patch b/recipes/xawtv/xawtv-3.95/05_man_section.patch new file mode 100644 index 0000000000..06ebee3bce --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/05_man_section.patch @@ -0,0 +1,18 @@ +diff -urNad xawtv-3.95~/man/es/v4l-conf.8 xawtv-3.95/man/es/v4l-conf.8 +--- xawtv-3.95~/man/es/v4l-conf.8 ++++ xawtv-3.95/man/es/v4l-conf.8 +@@ -1,4 +1,4 @@ +-.TH v4l-conf 1 "(c) 1997-99 Gerd Knorr" ++.TH v4l-conf 8 "(c) 1997-99 Gerd Knorr" + .SH NOMBRE + v4l-conf - configura un driver video4linux + .SH SINOPSIS +diff -urNad xawtv-3.95~/man/v4l-conf.8 xawtv-3.95/man/v4l-conf.8 +--- xawtv-3.95~/man/v4l-conf.8 ++++ xawtv-3.95/man/v4l-conf.8 +@@ -1,4 +1,4 @@ +-.TH v4l-conf 1 "(c) 1997-99 Gerd Knorr" ++.TH v4l-conf 8 "(c) 1997-99 Gerd Knorr" + .SH NAME + v4l-conf - configure a video4linux driver + .SH SYNOPSIS diff --git a/recipes/xawtv/xawtv-3.95/07_page_size.patch b/recipes/xawtv/xawtv-3.95/07_page_size.patch new file mode 100644 index 0000000000..1580886984 --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/07_page_size.patch @@ -0,0 +1,44 @@ +diff -urN xawtv-3.95.orig/console/fbtools.c xawtv-3.95/console/fbtools.c +--- xawtv-3.95.orig/console/fbtools.c 2003-02-14 14:14:04.000000000 +0000 ++++ xawtv-3.95./console/fbtools.c 2006-08-23 10:57:40.000000000 +0000 +@@ -21,8 +21,6 @@ + #include + #include + +-#include +- + #include "fbtools.h" + + /* -------------------------------------------------------------------- */ +@@ -424,7 +422,7 @@ + goto err; + } + #endif +- fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (~PAGE_MASK); ++ fb_mem_offset = (unsigned long)(fb_fix.smem_start) & (sysconf(_SC_PAGE_SIZE)-1); + fb_mem = mmap(NULL,fb_fix.smem_len+fb_mem_offset, + PROT_READ|PROT_WRITE,MAP_SHARED,fb,0); + if (-1L == (long)fb_mem) { +diff -urN xawtv-3.95.orig/console/matrox.c xawtv-3.95/console/matrox.c +--- xawtv-3.95.orig/console/matrox.c 2005-02-03 10:40:41.000000000 +0000 ++++ xawtv-3.95/console/matrox.c 2006-08-23 11:09:51.000000000 +0000 +@@ -9,7 +9,6 @@ + #include + #include + +-#include /* PAGE_SIZE */ + #include + + #include "byteswap.h" +@@ -226,7 +225,7 @@ + return -1; + } + off = (unsigned long)fb_fix.mmio_start - +- ((unsigned long)fb_fix.mmio_start & ~(PAGE_SIZE-1)); ++ ((unsigned long)fb_fix.mmio_start & ~(sysconf(_SC_PAGE_SIZE)-1)); + bmmio += off; + mmio = (uint32_t*)bmmio; + return 0; + + + diff --git a/recipes/xawtv/xawtv-3.95/08_oss_audio.patch b/recipes/xawtv/xawtv-3.95/08_oss_audio.patch new file mode 100644 index 0000000000..529fddbceb --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/08_oss_audio.patch @@ -0,0 +1,12 @@ +diff -urNad xawtv-3.95.dfsg.1~/libng/plugins/snd-oss.c xawtv-3.95.dfsg.1/libng/plugins/snd-oss.c +--- xawtv-3.95.dfsg.1~/libng/plugins/snd-oss.c 2003-02-14 15:14:05.000000000 +0100 ++++ xawtv-3.95.dfsg.1/libng/plugins/snd-oss.c 2007-07-28 23:43:41.000000000 +0200 +@@ -441,7 +441,7 @@ + for (;;) { + rc = read(fd,buffer+count,blocksize-count); + if (rc < 0) { +- if (EINTR == errno) ++ if ((EINTR == errno) || (EAGAIN == errno)) + continue; + perror("oss: read"); + exit(1); diff --git a/recipes/xawtv/xawtv-3.95/09_audio_unmute.patch b/recipes/xawtv/xawtv-3.95/09_audio_unmute.patch new file mode 100644 index 0000000000..9d4f1c5c65 --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/09_audio_unmute.patch @@ -0,0 +1,13 @@ +diff -urNad xawtv-3.95.dfsg.1~/x11/xt.c xawtv-3.95.dfsg.1/x11/xt.c +--- xawtv-3.95.dfsg.1~/x11/xt.c 2005-01-11 10:26:43.000000000 +0100 ++++ xawtv-3.95.dfsg.1/x11/xt.c 2007-07-29 00:03:50.000000000 +0200 +@@ -313,6 +313,9 @@ + void + ExitCB(Widget widget, XtPointer client_data, XtPointer calldata) + { ++ if (cur_attrs[ATTR_ID_MUTE]) { ++ do_va_cmd(2,"volume","mute","off"); ++ } + audio_off(); + video_overlay(0); + video_close(); diff --git a/recipes/xawtv/xawtv-3.95/10_radio_fixes.patch b/recipes/xawtv/xawtv-3.95/10_radio_fixes.patch new file mode 100644 index 0000000000..c40a607848 --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/10_radio_fixes.patch @@ -0,0 +1,80 @@ +diff -urNad xawtv-3.95.dfsg.1~/console/radio.c xawtv-3.95.dfsg.1/console/radio.c +--- xawtv-3.95.dfsg.1~/console/radio.c 2003-04-16 17:35:13.000000000 +0200 ++++ xawtv-3.95.dfsg.1/console/radio.c 2007-07-29 00:12:03.000000000 +0200 +@@ -40,7 +40,8 @@ + /* JMMV: WINDOWS for radio */ + int ncurses = 0; + int debug = 0; +-char *device = "/dev/radio"; ++char *device_list[4] = {NULL, "/dev/radio", "/dev/v4l/radio0", NULL}; ++char **device = &device_list[1]; + WINDOW *wfreq, *woptions, *wstations, *wcommand; + int freqfact = 16; + +@@ -186,7 +187,7 @@ + while (NULL != fgets(file,255,fp)) { + if (2 == sscanf(file,"%c=%d",&n,&ifreq) && n >= '1' && n <= '8') { + fkeys[n - '1'] = ifreq; +- } else if (2 == sscanf(file,"%d=%30[^\n]",&ifreq,name) && stations < 99) { ++ } else if (2 == sscanf(file,"%d=%50[^\n]",&ifreq,name) && stations < 99) { + freqs[stations] = ifreq; + labels[stations] = strdup(name); + stations++; +@@ -371,7 +372,7 @@ + " -d enable debug output\n" + " -m mute radio\n" + " -f freq tune given frequency (also unmutes)\n" +- " -c dev use given device [default: %s]\n" ++ " -c dev try to use given device [defaults: %s and %s]\n" + " -s scan\n" + " -S scan + write radio.fmmap\n" + " -i scan, write initial ~/.radio config file to\n" +@@ -383,7 +384,7 @@ + "(c) 1998-2001 Gerd Knorr \n" + "interface by Juli Merino \n" + "channel scan by Gunther Mayer \n", +- device); ++ device_list[1], device_list[2]); + } + + int +@@ -432,7 +433,8 @@ + } + break; + case 'c': +- device = optarg; ++ device_list[0] = optarg; ++ device = &device_list[0]; + break; + case 'h': + usage(stdout); +@@ -443,9 +445,14 @@ + } + } + +- if (-1 == (fd = open(device, O_RDONLY))) { +- fprintf(stderr,"open %s: %s\n",device,strerror(errno)); +- exit(1); ++ while (-1 == (fd = open(*device, O_RDONLY))) { ++ fprintf(stderr,"Warning: open %s: %s\n",*device,strerror(errno)); ++ if(NULL == *(++device)) { ++ fprintf(stderr,"Giving up.\n"); ++ exit(1); ++ } else { ++ fprintf(stderr,"Trying alternate device: %s\n", *device); ++ } + } + + memset(&tuner,0,sizeof(tuner)); +@@ -627,8 +634,10 @@ + } + if (i != stations) { + i += (key == KEY_NPAGE) ? -1 : 1; +- if (i < 0 || i >= stations) ++ if (i >= stations) + i = 0; ++ if (i < 0) ++ i = stations - 1; + ifreq = freqs[i]; + } + } diff --git a/recipes/xawtv/xawtv-3.95/11_plugins_memory_leaks.patch b/recipes/xawtv/xawtv-3.95/11_plugins_memory_leaks.patch new file mode 100644 index 0000000000..6ea2502e7d --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/11_plugins_memory_leaks.patch @@ -0,0 +1,56 @@ +diff -urNad xawtv-3.95.dfsg.1~/libng/plugins/drv0-v4l2.c xawtv-3.95.dfsg.1/libng/plugins/drv0-v4l2.c +--- xawtv-3.95.dfsg.1~/libng/plugins/drv0-v4l2.c 2005-02-11 18:56:24.000000000 +0100 ++++ xawtv-3.95.dfsg.1/libng/plugins/drv0-v4l2.c 2007-07-29 00:39:54.000000000 +0200 +@@ -509,7 +509,22 @@ + fprintf(stderr, "v4l2: close\n"); + + close(h->fd); ++ ++ if (NULL != h->attr) { ++ int i; ++ for (i = 0; i < h->nattr; ++i) { ++ if ((NULL != h->attr[i].choices) && ++ (stereo != h->attr[i].choices)) { ++ free(h->attr[i].choices); ++ h->attr[i].choices = NULL; ++ } ++ } ++ free(h->attr); ++ h->attr = NULL; ++ } ++ + free(h); ++ h = NULL; + return 0; + } + +diff -urNad xawtv-3.95.dfsg.1~/libng/plugins/drv1-v4l.c xawtv-3.95.dfsg.1/libng/plugins/drv1-v4l.c +--- xawtv-3.95.dfsg.1~/libng/plugins/drv1-v4l.c 2003-02-14 15:14:05.000000000 +0100 ++++ xawtv-3.95.dfsg.1/libng/plugins/drv1-v4l.c 2007-07-29 00:39:54.000000000 +0200 +@@ -469,7 +469,26 @@ + munmap(h->mmap,h->mbuf.size); + + close(h->fd); ++ ++ if (NULL != h->attr) { ++ int i; ++ for (i = 0; i < h->nattr; ++i) { ++ if ((NULL != h->attr[i].choices) && ++ (stereo != h->attr[i].choices)) { ++ free(h->attr[i].choices); ++ h->attr[i].choices = NULL; ++ } ++ } ++ free(h->attr); ++ h->attr = NULL; ++ } ++ ++ if (NULL != h->channels) { free(h->channels); h->channels = NULL; } ++ if (NULL != h->buf_v4l) { free(h->buf_v4l); h->buf_v4l = NULL; } ++ if (NULL != h->buf_me) { free(h->buf_me); h->buf_me = NULL; } ++ + free(h); ++ h = NULL; + return 0; + } + diff --git a/recipes/xawtv/xawtv-3.95/12_fbtv_radeonfb.patch b/recipes/xawtv/xawtv-3.95/12_fbtv_radeonfb.patch new file mode 100644 index 0000000000..3b002c9bce --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/12_fbtv_radeonfb.patch @@ -0,0 +1,151 @@ +diff -urNad xawtv-3.95.dfsg.1~/console/fbtools.c xawtv-3.95.dfsg.1/console/fbtools.c +--- xawtv-3.95.dfsg.1~/console/fbtools.c 2007-07-29 00:54:44.000000000 +0200 ++++ xawtv-3.95.dfsg.1/console/fbtools.c 2007-07-29 00:55:39.000000000 +0200 +@@ -447,7 +447,7 @@ + fb_activate_current(tty); + + /* cls */ +- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len); ++ fb_memset(fb_mem+fb_mem_offset,0,fb_var.yres * fb_fix.line_length); + return fb; + + err: +@@ -458,15 +458,33 @@ + void + fb_cleanup(void) + { ++ struct fb_var_screeninfo var; ++ + /* restore console */ ++ if (0 == ioctl(fb,FBIOGET_VSCREENINFO,&var)) { ++ if (!memcmp(&var, &fb_ovar, sizeof(var))) { ++ goto skip_var; ++ } ++ } + if (-1 == ioctl(fb,FBIOPUT_VSCREENINFO,&fb_ovar)) + perror("ioctl FBIOPUT_VSCREENINFO"); ++skip_var: + if (-1 == ioctl(fb,FBIOGET_FSCREENINFO,&fb_fix)) + perror("ioctl FBIOGET_FSCREENINFO"); + if (fb_ovar.bits_per_pixel == 8 || + fb_fix.visual == FB_VISUAL_DIRECTCOLOR) { +- if (-1 == ioctl(fb,FBIOPUTCMAP,&ocmap)) +- perror("ioctl FBIOPUTCMAP"); ++ if (-1 == ioctl(fb,FBIOPUTCMAP,&ocmap)) { ++ /* ++ * radeonfb in 15/16bpp returns EINVAL when color ++ * map retrieved by FBIOGETCMAP is programmed back ++ * by FBIOPUTCMAP. It still programs palette ++ * correctly, just instead of ignoring items 64-255 ++ * it returns an error. ++ */ ++ if (errno != EINVAL) { ++ perror("ioctl FBIOPUTCMAP"); ++ } ++ } + } + close(fb); + +diff -urNad xawtv-3.95.dfsg.1~/console/fbtv.c xawtv-3.95.dfsg.1/console/fbtv.c +--- xawtv-3.95.dfsg.1~/console/fbtv.c 2005-09-30 12:09:22.000000000 +0200 ++++ xawtv-3.95.dfsg.1/console/fbtv.c 2007-07-29 00:55:39.000000000 +0200 +@@ -230,6 +230,26 @@ + } + + static void ++fb_loadpalette(int fd) ++{ ++ if (fb_var.bits_per_pixel == 8 || ++ fb_fix.visual == FB_VISUAL_DIRECTCOLOR) { ++ if (-1 == ioctl(fd,FBIOPUTCMAP,&cmap)) { ++ /* ++ * radeonfb in 15/16bpp returns EINVAL when color ++ * map retrieved by FBIOGETCMAP is programmed back ++ * by FBIOPUTCMAP. It still programs palette ++ * correctly, just instead of ignoring items 64-255 ++ * it returns an error. ++ */ ++ if (errno != EINVAL) { ++ perror("ioctl FBIOPUTCMAP"); ++ } ++ } ++ } ++} ++ ++static void + fb_initcolors(int fd, int gray) + { + /* get colormap */ +@@ -288,11 +308,7 @@ + } + + /* set colormap */ +- if (fb_var.bits_per_pixel == 8 || +- fb_fix.visual == FB_VISUAL_DIRECTCOLOR) { +- if (-1 == ioctl(fd,FBIOPUTCMAP,&cmap)) +- perror("ioctl FBIOPUTCMAP"); +- } ++ fb_loadpalette(fd); + } + + static void +@@ -511,11 +527,17 @@ + } + + static void ++clear_video(void) ++{ ++ fb_memset(fb_mem+fb_mem_offset,0,fb_var.yres * fb_fix.line_length); ++} ++ ++static void + do_fullscreen(void) + { + do_va_cmd(2,"capture","off"); + quiet = !quiet; +- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len); ++ clear_video(); + do_va_cmd(2,"capture","on"); + } + +@@ -553,8 +575,9 @@ + case FB_ACQ_REQ: + switch_last = fb_switch_state; + fb_switch_acquire(); +- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len); ++ clear_video(); + ioctl(fb,FBIOPAN_DISPLAY,&fb_var); ++ fb_loadpalette(fb); + do_va_cmd(2,"capture","on"); + break; + case FB_ACTIVE: +@@ -748,7 +771,7 @@ + } + #endif + +- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len); ++ clear_video(); + for (;!sig;) { + if ((fb_switch_state == FB_ACTIVE || keep_dma_on) && !quiet) { + /* clear first lines */ +@@ -918,7 +941,7 @@ + audio_off(); + drv->close(h_drv); + if (fb_switch_state == FB_ACTIVE) +- fb_memset(fb_mem+fb_mem_offset,0,fb_fix.smem_len); ++ clear_video(); + tty_cleanup(); + fb_cleanup(); + exit(0); +diff -urNad xawtv-3.95.dfsg.1~/console/v4l-conf.c xawtv-3.95.dfsg.1/console/v4l-conf.c +--- xawtv-3.95.dfsg.1~/console/v4l-conf.c 2005-02-09 13:27:36.000000000 +0100 ++++ xawtv-3.95.dfsg.1/console/v4l-conf.c 2007-07-29 00:55:39.000000000 +0200 +@@ -347,7 +347,7 @@ + /* set values */ + fb.fmt.width = d->width; + fb.fmt.height = d->height; +- switch (d->bpp) { ++ switch (d->bpp != 16 ? d->bpp : d->depth) { + case 8: fb.fmt.pixelformat = V4L2_PIX_FMT_HI240; break; + #if BYTE_ORDER == BIG_ENDIAN + case 15: fb.fmt.pixelformat = V4L2_PIX_FMT_RGB555X; break; diff --git a/recipes/xawtv/xawtv-3.95/13_libquicktime_compat.patch b/recipes/xawtv/xawtv-3.95/13_libquicktime_compat.patch new file mode 100644 index 0000000000..f9c725916c --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/13_libquicktime_compat.patch @@ -0,0 +1,28 @@ +diff -urNad xawtv-3.95.dfsg.1~/libng/plugins/write-qt.c xawtv-3.95.dfsg.1/libng/plugins/write-qt.c +--- xawtv-3.95.dfsg.1~/libng/plugins/write-qt.c 2007-08-15 16:52:45.538908656 +0200 ++++ xawtv-3.95.dfsg.1/libng/plugins/write-qt.c 2007-08-15 16:54:28.400770420 +0200 +@@ -348,10 +348,10 @@ + info[i]->name,info[i]->long_name); + for (j = 0; j < info[i]->num_fourccs; j++) + fprintf(stderr," fcc : %s\n",info[i]->fourccs[j]); +- for (j = 0; j < info[i]->num_encoding_colormodels; j++) ++ for (j = 0; j < lqt_num_colormodels(); j++) + fprintf(stderr," cmodel: %d [%s]\n", +- info[i]->encoding_colormodels[j], +- lqt_get_colormodel_string(info[i]->encoding_colormodels[j])); ++ lqt_get_colormodel(j), ++ lqt_get_colormodel_string(j)); + } + + /* sanity checks */ +@@ -378,8 +378,8 @@ + /* pick colormodel */ + fmtid = VIDEO_NONE; + cmodel = 0; +- for (j = 0; j < info[i]->num_encoding_colormodels; j++) { +- cmodel = info[i]->encoding_colormodels[j]; ++ for (j = 0; j < lqt_num_colormodels(); j++) { ++ cmodel = lqt_get_colormodel(j); + if (cmodel>= sizeof(cmodels)/sizeof(int)) + continue; + if (!cmodels[cmodel]) diff --git a/recipes/xawtv/xawtv-3.95/14_scantv_input_override.patch b/recipes/xawtv/xawtv-3.95/14_scantv_input_override.patch new file mode 100644 index 0000000000..5439aebcd6 --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/14_scantv_input_override.patch @@ -0,0 +1,64 @@ +diff -urNad xawtv-3.95.dfsg.1~/console/scantv.c xawtv-3.95.dfsg.1/console/scantv.c +--- xawtv-3.95.dfsg.1~/console/scantv.c 2005-09-30 12:07:02.000000000 +0200 ++++ xawtv-3.95.dfsg.1/console/scantv.c 2007-08-15 17:47:02.000483826 +0200 +@@ -116,6 +116,7 @@ + "options:\n" + " -h print this text\n" + " -o outfile set output file. [%s]\n" ++ " -i input set input.\n" + " -n norm set tv norm.\n" + " -f table set frequency table.\n" + " -c device set video device file. [%s]\n" +@@ -137,6 +138,7 @@ + unsigned int f,f1,f2,fc; + char *name,dummy[32]; + char *tvnorm = NULL; ++ char *tvinput = NULL; + char *freqtab = NULL; + char *outfile = NULL; + FILE *conf = stdout; +@@ -144,7 +146,7 @@ + /* parse options */ + ng_init(); + for (;;) { +- if (-1 == (c = getopt(argc, argv, "hsadn:f:o:c:C:"))) ++ if (-1 == (c = getopt(argc, argv, "hsadi:n:f:o:c:C:"))) + break; + switch (c) { + case 'd': +@@ -156,6 +158,9 @@ + case 'a': + fullscan=1; + break; ++ case 'i': ++ tvinput = optarg; ++ break; + case 'n': + tvnorm = optarg; + break; +@@ -203,12 +208,15 @@ + attr = ng_attr_byid(attrs,ATTR_ID_NORM); + i = menu("please select your TV norm",attr->choices,tvnorm); + j = menu("please select a frequency table",chanlist_names,freqtab); ++ if (tvinput == NULL) { ++ tvinput = "Television"; ++ } + + fprintf(conf,"[global]\n"); + fprintf(conf,"freqtab = %s\n",chanlist_names[j].str); + fprintf(conf,"\n"); + fprintf(conf,"[defaults]\n"); +- fprintf(conf,"input = Television\n"); ++ fprintf(conf,"input = %s\n", tvinput); + fprintf(conf,"norm = %s\n",ng_attr_getstr(attr,i)); + fprintf(conf,"\n"); + fflush(conf); +@@ -220,7 +228,7 @@ + exit(0); + } + set_defaults(); +- do_va_cmd(2,"setinput","television"); ++ do_va_cmd(2,"setinput",tvinput); + do_va_cmd(2,"setnorm",ng_attr_getstr(attr,i)); + do_va_cmd(2,"setfreqtab",chanlist_names[j].str); + diff --git a/recipes/xawtv/xawtv-3.95/15_xawtv_bin_cutoff.patch b/recipes/xawtv/xawtv-3.95/15_xawtv_bin_cutoff.patch new file mode 100644 index 0000000000..0a1ba52891 --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/15_xawtv_bin_cutoff.patch @@ -0,0 +1,21 @@ +diff -urNad xawtv-3.95.dfsg.1~/x11/xawtv.c xawtv-3.95.dfsg.1/x11/xawtv.c +--- xawtv-3.95.dfsg.1~/x11/xawtv.c 2003-04-11 11:42:04.000000000 +0200 ++++ xawtv-3.95.dfsg.1/x11/xawtv.c 2007-09-26 00:00:57.221442822 +0200 +@@ -1579,11 +1579,16 @@ + main(int argc, char *argv[]) + { + int i; ++ char * cut; + unsigned long freq; + + hello_world("xawtv"); + progname = strdup(argv[0]); +- ++ ++ /* cut off .bin from command name */ ++ if ((cut = strstr(argv[0], ".bin"))) ++ *cut = '\0'; ++ + /* toplevel */ + XtSetLanguageProc(NULL,NULL,NULL); + app_shell = XtVaAppInitialize(&app_context, "Xawtv", diff --git a/recipes/xawtv/xawtv-3.95/16_xawtv_v4l2_buffer.patch b/recipes/xawtv/xawtv-3.95/16_xawtv_v4l2_buffer.patch new file mode 100644 index 0000000000..2c48aeee91 --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/16_xawtv_v4l2_buffer.patch @@ -0,0 +1,11 @@ +diff -urNad xawtv-3.95.dfsg.1~/libng/plugins/drv0-v4l2.c xawtv-3.95.dfsg.1/libng/plugins/drv0-v4l2.c +--- xawtv-3.95.dfsg.1~/libng/plugins/drv0-v4l2.c 2007-10-16 19:23:11.111287329 +0200 ++++ xawtv-3.95.dfsg.1/libng/plugins/drv0-v4l2.c 2007-10-16 19:26:14.641746134 +0200 +@@ -768,6 +768,7 @@ + /* get it */ + memset(&buf,0,sizeof(buf)); + buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; ++ buf.memory = V4L2_MEMORY_MMAP; + if (-1 == xioctl(h->fd,VIDIOC_DQBUF,&buf, 0)) + return -1; + h->waiton++; diff --git a/recipes/xawtv/xawtv-3.95/17_scantv_man_typo.patch b/recipes/xawtv/xawtv-3.95/17_scantv_man_typo.patch new file mode 100644 index 0000000000..c27d95c50b --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/17_scantv_man_typo.patch @@ -0,0 +1,12 @@ +diff -urNad xawtv-3.95.dfsg.1~/man/scantv.1 xawtv-3.95.dfsg.1/man/scantv.1 +--- xawtv-3.95.dfsg.1~/man/scantv.1 2003-02-14 15:14:07.000000000 +0100 ++++ xawtv-3.95.dfsg.1/man/scantv.1 2007-11-24 19:13:46.097835274 +0100 +@@ -18,7 +18,7 @@ + none is given. + .TP + .B -o outfile +-specify \fBo\fPutput file. If none is specified, scantv write ++specify \fBo\fPutput file. If none is specified, scantv writes + to stdout. + .TP + .B -c device diff --git a/recipes/xawtv/xawtv-3.95/18_glib2.patch b/recipes/xawtv/xawtv-3.95/18_glib2.patch new file mode 100644 index 0000000000..e2a7efc2f2 --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/18_glib2.patch @@ -0,0 +1,24 @@ +diff -urNad xawtv_3.95.dfsg.1~/configure xawtv_3.95.dfsg.1/configure +--- xawtv_3.95.dfsg.1~/configure 2005-09-30 12:10:03.000000000 +0200 ++++ xawtv_3.95.dfsg.1/configure 2007-12-14 15:09:47.132603414 +0100 +@@ -5971,7 +5971,7 @@ + echo "*** DV disabled" + fi + +-dashlglib=$(glib-config --libs 2>/dev/null) ++dashlglib=$(pkg-config glib-2.0 --libs 2>/dev/null) + if test "$enable_quicktime" != "no"; then + echo "$as_me:$LINENO: checking for lqt_query_registry in -lquicktime" >&5 + echo $ECHO_N "checking for lqt_query_registry in -lquicktime... $ECHO_C" >&6 +diff -urNad xawtv_3.95.dfsg.1~/configure.ac xawtv_3.95.dfsg.1/configure.ac +--- xawtv_3.95.dfsg.1~/configure.ac 2004-08-18 17:48:09.000000000 +0200 ++++ xawtv_3.95.dfsg.1/configure.ac 2007-12-14 15:08:24.003866177 +0100 +@@ -223,7 +223,7 @@ + echo "*** DV disabled" + fi + +-dashlglib=$(glib-config --libs 2>/dev/null) ++dashlglib=$(pkg-config glib-2.0 --libs 2>/dev/null) + if test "$enable_quicktime" != "no"; then + AC_CHECK_LIB(quicktime, lqt_query_registry, + FOUND_LQT="yes"; AC_DEFINE(HAVE_LIBQUICKTIME,1,"have libquicktime"),, diff --git a/recipes/xawtv/xawtv-3.93/make.patch b/recipes/xawtv/xawtv-3.95/make.patch similarity index 62% rename from recipes/xawtv/xawtv-3.93/make.patch rename to recipes/xawtv/xawtv-3.95/make.patch index 481e945bea..5df8368b68 100644 --- a/recipes/xawtv/xawtv-3.93/make.patch +++ b/recipes/xawtv/xawtv-3.95/make.patch @@ -1,16 +1,20 @@ ---- tmp/base/xawtv-3.93-r0/xawtv-3.93/common/Subdir.mk 2003-02-14 09:14:04.000000000 -0500 -+++ xawtv-3.93/common/Subdir.mk 2004-06-08 16:50:35.382555000 -0400 +Index: xawtv-3.95/common/Subdir.mk +=================================================================== +--- xawtv-3.95.orig/common/Subdir.mk 2003-02-14 15:14:04.000000000 +0100 ++++ xawtv-3.95/common/Subdir.mk 2011-02-26 22:40:51.864893305 +0100 @@ -17,7 +17,7 @@ # RegEdit.c is good old K&R ... common/RegEdit.o: CFLAGS += -Wno-missing-prototypes -Wno-strict-prototypes -common/channel-no-x11.o: CFLAGS += -DNO_X11=1 -+common/channel-no-x11.o: DEFS += -DNO_X11=1 ++common/channel-no-x11.o: DEFS += -DNO_X11=1 common/channel-no-x11.o: common/channel.c @$(echo_compile_c) ---- tmp/base/xawtv-3.93-r0/xawtv-3.93/configure.ac 2004-03-10 11:34:37.000000000 -0500 -+++ xawtv-3.93/configure.ac 2004-06-08 17:01:42.023414000 -0400 +Index: xawtv-3.95/configure.ac +=================================================================== +--- xawtv-3.95.orig/configure.ac 2011-02-26 22:40:51.814868305 +0100 ++++ xawtv-3.95/configure.ac 2011-02-26 22:40:51.864893305 +0100 @@ -150,6 +150,12 @@ ATHENA="" FSLIB="" @@ -24,8 +28,10 @@ AC_SUBST(X_CFLAGS) AC_SUBST(X_PRE_LIBS) AC_SUBST(X_EXTRA_LIBS) ---- tmp/base/xawtv-3.93-r0/xawtv-3.93/console/Subdir.mk 2003-02-14 09:14:04.000000000 -0500 -+++ xawtv-3.93/console/Subdir.mk 2004-06-08 16:54:22.296488000 -0400 +Index: xawtv-3.95/console/Subdir.mk +=================================================================== +--- xawtv-3.95.orig/console/Subdir.mk 2003-02-14 15:14:04.000000000 +0100 ++++ xawtv-3.95/console/Subdir.mk 2011-02-26 22:44:38.017913306 +0100 @@ -84,11 +84,11 @@ console/v4l-conf : LDLIBS += $(ATHENA_LIBS) @@ -43,8 +49,19 @@ # global targets all:: $(TARGETS-console) $(TARGETS-v4l-conf) ---- tmp/base/xawtv-3.93-r0/xawtv-3.93/libng/contrib-plugins/Subdir.mk 2003-02-14 09:14:05.000000000 -0500 -+++ xawtv-3.93/libng/contrib-plugins/Subdir.mk 2004-06-08 16:53:10.545928000 -0400 +@@ -96,7 +96,7 @@ + install:: + $(INSTALL_PROGRAM) $(TARGETS-console) $(bindir) + ifeq ($(FOUND_OS),linux) +- $(INSTALL_PROGRAM) $(SUID_ROOT) $(TARGETS-v4l-conf) $(bindir) ++ $(INSTALL_PROGRAM) $(TARGETS-v4l-conf) $(bindir) + endif + + distclean:: +Index: xawtv-3.95/libng/contrib-plugins/Subdir.mk +=================================================================== +--- xawtv-3.95.orig/libng/contrib-plugins/Subdir.mk 2003-02-14 15:14:05.000000000 +0100 ++++ xawtv-3.95/libng/contrib-plugins/Subdir.mk 2011-02-26 22:40:51.864893305 +0100 @@ -18,7 +18,7 @@ # linear-blend has mmx support ... @@ -54,8 +71,10 @@ endif # global targets ---- tmp/base/xawtv-3.93-r0/xawtv-3.93/Makefile.in 2004-04-22 10:52:29.000000000 -0400 -+++ xawtv-3.93/Makefile.in 2004-06-08 17:06:40.828711000 -0400 +Index: xawtv-3.95/Makefile.in +=================================================================== +--- xawtv-3.95.orig/Makefile.in 2004-04-22 16:52:29.000000000 +0200 ++++ xawtv-3.95/Makefile.in 2011-02-26 22:40:51.864893305 +0100 @@ -28,12 +28,13 @@ # for CFLAGS @@ -109,8 +128,10 @@ ######################################################### ---- tmp/base/xawtv-3.93-r0/xawtv-3.93/mk/Compile.mk 2003-02-14 09:14:08.000000000 -0500 -+++ xawtv-3.93/mk/Compile.mk 2004-06-08 16:53:52.030861000 -0400 +Index: xawtv-3.95/mk/Compile.mk +=================================================================== +--- xawtv-3.95.orig/mk/Compile.mk 2003-02-14 15:14:08.000000000 +0100 ++++ xawtv-3.95/mk/Compile.mk 2011-02-26 22:40:51.864893305 +0100 @@ -20,8 +20,8 @@ depfile = mk/$(subst /,_,$*).dep depfiles = mk/*.dep @@ -122,20 +143,24 @@ fixup_deps = sed -e "s|.*\.o:|$@:|" < $(tmpdep) > $(depfile) && rm -f $(tmpdep) link_app = $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) ---- tmp/base/xawtv-3.93-r0/xawtv-3.93/x11/Subdir.mk 2004-01-12 12:56:17.000000000 -0500 -+++ xawtv-3.93/x11/Subdir.mk 2004-06-08 16:53:36.097733000 -0400 -@@ -110,14 +110,14 @@ +Index: xawtv-3.95/x11/Subdir.mk +=================================================================== +--- xawtv-3.95.orig/x11/Subdir.mk 2005-01-05 11:25:03.000000000 +0100 ++++ xawtv-3.95/x11/Subdir.mk 2011-02-26 22:40:51.864893305 +0100 +@@ -110,15 +110,15 @@ x11/propwatch : LDLIBS += $(ATHENA_LIBS) # linker flags -x11/xawtv : LDFLAGS := $(DLFLAGS) -x11/motv : LDFLAGS := $(DLFLAGS) +-x11/mtt : LDFLAGS := $(DLFLAGS) -x11/v4lctl : LDFLAGS := $(DLFLAGS) -x11/pia : LDFLAGS := $(DLFLAGS) -+x11/xawtv : LDLIBS += $(DLFLAGS) -+x11/motv : LDLIBS += $(DLFLAGS) -+x11/v4lctl : LDLIBS += $(DLFLAGS) -+x11/pia : LDLIBS += $(DLFLAGS) ++x11/xawtv : LDFLAGS += $(DLFLAGS) ++x11/motv : LDFLAGS += $(DLFLAGS) ++x11/mtt : LDFLAGS += $(DLFLAGS) ++x11/v4lctl : LDFLAGS += $(DLFLAGS) ++x11/pia : LDFLAGS += $(DLFLAGS) # compile flags -x11/complete-xaw.o : CFLAGS += -DATHENA=1 diff --git a/recipes/xawtv/xawtv-3.95/sys_siglist.patch b/recipes/xawtv/xawtv-3.95/sys_siglist.patch new file mode 100644 index 0000000000..f97b0bf492 --- /dev/null +++ b/recipes/xawtv/xawtv-3.95/sys_siglist.patch @@ -0,0 +1,47 @@ +Index: xawtv-3.95/console/fbtools.c +=================================================================== +--- xawtv-3.95.orig/console/fbtools.c 2011-02-26 22:38:35.406698306 +0100 ++++ xawtv-3.95/console/fbtools.c 2011-02-26 22:39:48.986803306 +0100 +@@ -534,6 +534,6 @@ + + /* cleanup */ + fb_cleanup(); +- fprintf(stderr,"Oops: %s\n",sys_siglist[termsig]); ++ fprintf(stderr,"Oops: %s\n", strsignal(termsig)); + exit(42); + } +Index: xawtv-3.95/console/record.c +=================================================================== +--- xawtv-3.95.orig/console/record.c 2003-04-03 12:51:00.000000000 +0200 ++++ xawtv-3.95/console/record.c 2011-02-26 22:39:34.836398305 +0100 +@@ -428,7 +428,7 @@ + { + if (verbose) + fprintf(stderr,"\n%s - exiting\n", +- sys_siglist[signal]); ++ strsignal(signal)); + stop = 1; + } + +Index: xawtv-3.95/x11/rootv.c +=================================================================== +--- xawtv-3.95.orig/x11/rootv.c 2003-02-14 15:14:08.000000000 +0100 ++++ xawtv-3.95/x11/rootv.c 2011-02-26 22:38:35.810233306 +0100 +@@ -133,7 +133,7 @@ + termsig = signal; + if (verbose) + fprintf(stderr,"received signal %d [%s]\n", +- termsig,sys_siglist[termsig]); ++ termsig, strsignal(termsig)); + } + + static void usage(FILE *fp) +@@ -423,7 +423,7 @@ + } + if (verbose && termsig) + fprintf(stderr,"exiting on signal %d [%s]\n", +- termsig,sys_siglist[termsig]); ++ termsig, strsignal(termsig)); + if (do_mute && have_mute) + XvSetPortAttribute(dpy,port,XV_MUTE,1); + XvStopVideo(dpy,port,win); diff --git a/recipes/xawtv/xawtv_3.93.bb b/recipes/xawtv/xawtv_3.93.bb deleted file mode 100644 index 39d4af4cb1..0000000000 --- a/recipes/xawtv/xawtv_3.93.bb +++ /dev/null @@ -1,35 +0,0 @@ -LICENSE = "GPL" -SECTION = "x11/utils" -DESCRIPTION = "XawTV is a simple Xaw-based TV program which uses the bttw \ -driver or video4linux. It also contains various command-line utilities for \ -grabbing images and AVI movies, tuning in TV stations, etc." -DEPENDS = "libxaw libxmu libxt libxpm libxext virtual/libx11 ncurses libxft fs jpeg" -PR = "r1" - -SRC_URI = "http://dl.bytesex.org/releases/xawtv/xawtv-${PV}.tar.gz \ - file://make.patch" -S = "${WORKDIR}/xawtv-${PV}" - -inherit autotools - -# FIXME: libXaw needs a full x11, not diet -BROKEN = "1" - -EXTRA_OECONF = "--disable-xfree-ext \ - --disable-xvideo \ - --disable-lirc \ - --disable-quicktime \ - --disable-motif \ - --disable-aa \ - --disable-alsa \ - --disable-zvbi \ - --disable-gl \ - --disable-dv \ - --disable-mmx \ - --enable-xft \ - --x-includes=${STAGING_INCDIR} \ - --x-libraries=${STAGING_LIBDIR}" -EXTRA_OEMAKE += " 'verbose=yes'" - -SRC_URI[md5sum] = "8d2731e6e95f173f41a0ddc875d55804" -SRC_URI[sha256sum] = "d5e333bc74c0a534bf96f40ea89b7e700f137d46f1fdbaea13fa552ad6227af8" diff --git a/recipes/xawtv/xawtv_3.95.bb b/recipes/xawtv/xawtv_3.95.bb new file mode 100644 index 0000000000..3d6351c57e --- /dev/null +++ b/recipes/xawtv/xawtv_3.95.bb @@ -0,0 +1,52 @@ +LICENSE = "GPL" +SECTION = "x11/utils" +DESCRIPTION = "XawTV is a simple Xaw-based TV program which uses the bttw \ +driver or video4linux. It also contains various command-line utilities for \ +grabbing images and AVI movies, tuning in TV stations, etc." +DEPENDS = "alsa-lib libxaw libxmu libxt libxpm libxext virtual/libx11 ncurses libxft fs jpeg" +PR = "r0" + +SRC_URI = "http://dl.bytesex.org/releases/xawtv/xawtv-${PV}.tar.gz \ + file://01_gcc4.patch \ + file://04_man_typo.patch \ + file://05_man_section.patch \ + file://07_page_size.patch \ + file://08_oss_audio.patch \ + file://09_audio_unmute.patch \ + file://10_radio_fixes.patch \ + file://11_plugins_memory_leaks.patch \ + file://12_fbtv_radeonfb.patch \ + file://13_libquicktime_compat.patch \ + file://14_scantv_input_override.patch \ + file://15_xawtv_bin_cutoff.patch \ + file://16_xawtv_v4l2_buffer.patch \ + file://17_scantv_man_typo.patch \ + file://18_glib2.patch \ + file://make.patch \ + file://sys_siglist.patch \ + " + +S = "${WORKDIR}/xawtv-${PV}" + +inherit autotools + +# FIXME: libXaw needs a full x11, not diet +BROKEN = "1" + +EXTRA_OECONF = "--disable-xfree-ext \ + --disable-xvideo \ + --disable-lirc \ + --disable-quicktime \ + --disable-motif \ + --disable-aa \ + --disable-zvbi \ + --disable-gl \ + --disable-dv \ + --disable-mmx \ + --enable-xft \ + --x-includes=${STAGING_INCDIR} \ + --x-libraries=${STAGING_LIBDIR}" +EXTRA_OEMAKE += " 'verbose=yes'" + +SRC_URI[md5sum] = "ad25e03f7e128b318e392cb09f52207d" +SRC_URI[sha256sum] = "1204212c59d10df4e29a9a0ddce96cab78342859ec44bf6fd1c5f260b5c7216f" diff --git a/recipes/xfce-extras/ristretto_0.0.21.bb b/recipes/xfce-extras/ristretto_0.0.21.bb index 77af926c7c..7f7aa34b14 100644 --- a/recipes/xfce-extras/ristretto_0.0.21.bb +++ b/recipes/xfce-extras/ristretto_0.0.21.bb @@ -9,7 +9,7 @@ inherit xfce46 XFCE_VERSION = "4.6.1" -SRC_URI = "http://goodies.xfce.org/releases/ristretto/${PN}-${PV}.tar.gz" +SRC_URI = "http://archive.xfce.org/src/apps/ristretto/0.0/${PN}-${PV}.tar.gz" SRC_URI[md5sum] = "7774dcafdc365e70b8d981c0a52d6250" SRC_URI[sha256sum] = "b3e63ef1d4a582c2a3f4e99f097ec28273edf9feb51162b470d4c12c61a51378" diff --git a/recipes/xmms/xmms_1.2.10.bb b/recipes/xmms/xmms_1.2.10.bb index 34b1e07a8e..aed1833bbc 100644 --- a/recipes/xmms/xmms_1.2.10.bb +++ b/recipes/xmms/xmms_1.2.10.bb @@ -10,7 +10,7 @@ SRC_URI = "http://www.xmms.org/files/1.2.x/xmms-${PV}.tar.bz2 \ file://xmms-config-dequote.patch \ file://acinclude.m4 \ file://xmms.sh" -PR = "r6" +PR = "r7" RRECOMMENDS_${PN} = "xmms-plugin-output-oss xmms-plugin-output-alsa \ xmms-mad xmms-tremor" @@ -33,6 +33,13 @@ do_configure_prepend() { done } +do_configure_append() { + for i in $(find . -name "Makefile"); do + sed -i -e 's:L/usr/lib:L${STAGING_LIBDIR}:g' \ + $i + done +} + do_install_append() { install -m 0755 ${WORKDIR}/xmms.sh ${D}${bindir} install -d ${D}${datadir}/applications diff --git a/recipes/xorg-lib/libxaw_1.0.9.bb b/recipes/xorg-lib/libxaw_1.0.9.bb index a4d2cf4916..1d472c3566 100644 --- a/recipes/xorg-lib/libxaw_1.0.9.bb +++ b/recipes/xorg-lib/libxaw_1.0.9.bb @@ -2,7 +2,7 @@ require xorg-lib-common.inc DESCRIPTION = "X Athena Widget Set" DEPENDS += "xproto virtual/libx11 libxext xextproto libxt libxmu libxpm libxp printproto libxau" PE = "1" -PR = "${INC_PR}.0" +PR = "${INC_PR}.1" SRC_URI[archive.md5sum] = "ccc57478c41b7a75b9702241b889b1d4" SRC_URI[archive.sha256sum] = "a83977546b78e24ac5dca86affc10b6404a87c16272405b05386feca1a2db037" @@ -22,4 +22,7 @@ FILES_libxaw6 = "${libdir}/libXaw*.so.6*" FILES_libxaw7 = "${libdir}/libXaw*.so.7*" FILES_libxaw8 = "${libdir}/libXaw8.so.8*" +# fix -dev depchains +ALLOW_EMPTY_${PN} = 1 + XORG_PN = "libXaw" diff --git a/recipes/xorg-lib/pixman-0.21.6/0002-Fix-compilation-on-Win32.patch b/recipes/xorg-lib/pixman-0.21.6/0002-Fix-compilation-on-Win32.patch new file mode 100644 index 0000000000..16b6ff13f9 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0002-Fix-compilation-on-Win32.patch @@ -0,0 +1,42 @@ +From 20ed723a5a42fb8636bc9a5f32974dec1b66a785 Mon Sep 17 00:00:00 2001 +From: Andrea Canciani +Date: Thu, 24 Feb 2011 10:44:04 +0100 +Subject: [PATCH 02/40] Fix compilation on Win32 + +Makefile.win32 contained a typo and was missing the dependency from +the built sources. +--- + pixman/Makefile.win32 | 6 ++++-- + 1 files changed, 4 insertions(+), 2 deletions(-) + +diff --git a/pixman/Makefile.win32 b/pixman/Makefile.win32 +index 775fb5e..b5f9397 100644 +--- a/pixman/Makefile.win32 ++++ b/pixman/Makefile.win32 +@@ -56,6 +56,8 @@ SOURCES = \ + pixman-general.c \ + $(NULL) + ++BUILT_SOURCES = pixman-combine32.h pixman-combine32.c pixman-combine64.h pixman-combine64.c ++ + # MMX compilation flags + ifeq ($(MMX_VAR),on) + CFLAGS += $(MMX_CFLAGS) +@@ -122,7 +124,7 @@ endif + endif + + # pixman compilation and linking +-$(CFG_VAR)/%.obj: %.c ++$(CFG_VAR)/%.obj: %.c $(BUILT_SOURCES) + @mkdir -p $(CFG_VAR) + @$(CC) -c $(CFLAGS) -Fo"$@" $< + +@@ -141,4 +143,4 @@ pixman-combine64.h: pixman-combine.h.template make-combine.pl + + clean_r: + @rm -f $(CFG_VAR)/*.obj $(CFG_VAR)/*.lib $(CFG_VAR)/*.pdb $(CFG)/*.ilk || exit 0 +- @rm -f $(CFG)/*.obj $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk pixman-combine32.c pixman-combine64.c pixman-combine64.c pixman-combine64.h || exit 0 ++ @rm -f $(CFG)/*.obj $(CFG)/*.lib $(CFG)/*.pdb $(CFG)/*.ilk $(BUILT_SOURCES) || exit 0 +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0003-test-Fix-tests-for-compilation-on-Windows.patch b/recipes/xorg-lib/pixman-0.21.6/0003-test-Fix-tests-for-compilation-on-Windows.patch new file mode 100644 index 0000000000..33351a991c --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0003-test-Fix-tests-for-compilation-on-Windows.patch @@ -0,0 +1,232 @@ +From 11305b4ecdd36a17592c5c75de9157874853ab20 Mon Sep 17 00:00:00 2001 +From: Andrea Canciani +Date: Tue, 22 Feb 2011 21:46:37 +0100 +Subject: [PATCH 03/40] test: Fix tests for compilation on Windows + +The Microsoft C compiler cannot handle subobject initialization and +Win32 does not provide snprintf. + +Work around these limitations by using normal struct initialization +and using sprintf (a manual check shows that the buffer size is +sufficient). +--- + test/composite.c | 29 +++++++++++++-------------- + test/fetch-test.c | 52 ++++++++++++++++++++++---------------------------- + test/trap-crasher.c | 20 +++++++++--------- + 3 files changed, 47 insertions(+), 54 deletions(-) + +diff --git a/test/composite.c b/test/composite.c +index e14f954..08c6689 100644 +--- a/test/composite.c ++++ b/test/composite.c +@@ -617,18 +617,18 @@ eval_diff (color_t *expected, color_t *test, pixman_format_code_t format) + } + + static char * +-describe_image (image_t *info, char *buf, int buflen) ++describe_image (image_t *info, char *buf) + { + if (info->size) + { +- snprintf (buf, buflen, "%s %dx%d%s", +- info->format->name, +- info->size, info->size, +- info->repeat ? "R" :""); ++ sprintf (buf, "%s %dx%d%s", ++ info->format->name, ++ info->size, info->size, ++ info->repeat ? "R" :""); + } + else + { +- snprintf (buf, buflen, "solid"); ++ sprintf (buf, "solid"); + } + + return buf; +@@ -710,10 +710,9 @@ composite_test (image_t *dst, + { + char buf[40]; + +- snprintf (buf, sizeof (buf), +- "%s %scomposite", +- op->name, +- component_alpha ? "CA " : ""); ++ sprintf (buf, "%s %scomposite", ++ op->name, ++ component_alpha ? "CA " : ""); + + printf ("%s test error of %.4f --\n" + " R G B A\n" +@@ -735,9 +734,9 @@ composite_test (image_t *dst, + mask->color->b, mask->color->a, + dst->color->r, dst->color->g, + dst->color->b, dst->color->a); +- printf ("src: %s, ", describe_image (src, buf, sizeof (buf))); +- printf ("mask: %s, ", describe_image (mask, buf, sizeof (buf))); +- printf ("dst: %s\n\n", describe_image (dst, buf, sizeof (buf))); ++ printf ("src: %s, ", describe_image (src, buf)); ++ printf ("mask: %s, ", describe_image (mask, buf)); ++ printf ("dst: %s\n\n", describe_image (dst, buf)); + } + else + { +@@ -747,8 +746,8 @@ composite_test (image_t *dst, + src->color->b, src->color->a, + dst->color->r, dst->color->g, + dst->color->b, dst->color->a); +- printf ("src: %s, ", describe_image (src, buf, sizeof (buf))); +- printf ("dst: %s\n\n", describe_image (dst, buf, sizeof (buf))); ++ printf ("src: %s, ", describe_image (src, buf)); ++ printf ("dst: %s\n\n", describe_image (dst, buf)); + } + + success = FALSE; +diff --git a/test/fetch-test.c b/test/fetch-test.c +index 2ca16dd..314a072 100644 +--- a/test/fetch-test.c ++++ b/test/fetch-test.c +@@ -8,7 +8,7 @@ + + static pixman_indexed_t mono_palette = + { +- .rgba = { 0x00000000, 0x00ffffff }, ++ 0, { 0x00000000, 0x00ffffff }, + }; + + +@@ -24,57 +24,53 @@ typedef struct { + static testcase_t testcases[] = + { + { +- .format = PIXMAN_a8r8g8b8, +- .width = 2, .height = 2, +- .stride = 8, +- .src = { 0x00112233, 0x44556677, +- 0x8899aabb, 0xccddeeff }, +- .dst = { 0x00112233, 0x44556677, +- 0x8899aabb, 0xccddeeff }, +- .indexed = NULL, ++ PIXMAN_a8r8g8b8, ++ 2, 2, ++ 8, ++ { 0x00112233, 0x44556677, ++ 0x8899aabb, 0xccddeeff }, ++ { 0x00112233, 0x44556677, ++ 0x8899aabb, 0xccddeeff }, ++ NULL, + }, + { +- .format = PIXMAN_g1, +- .width = 8, .height = 2, +- .stride = 4, ++ PIXMAN_g1, ++ 8, 2, ++ 4, + #ifdef WORDS_BIGENDIAN +- .src = + { + 0xaa000000, + 0x55000000 + }, + #else +- .src = + { + 0x00000055, + 0x000000aa + }, + #endif +- .dst = + { + 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, + 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff + }, +- .indexed = &mono_palette, ++ &mono_palette, + }, + #if 0 + { +- .format = PIXMAN_g8, +- .width = 4, .height = 2, +- .stride = 4, +- .src = { 0x01234567, +- 0x89abcdef }, +- .dst = { 0x00010101, 0x00232323, 0x00454545, 0x00676767, +- 0x00898989, 0x00ababab, 0x00cdcdcd, 0x00efefef, }, ++ PIXMAN_g8, ++ 4, 2, ++ 4, ++ { 0x01234567, ++ 0x89abcdef }, ++ { 0x00010101, 0x00232323, 0x00454545, 0x00676767, ++ 0x00898989, 0x00ababab, 0x00cdcdcd, 0x00efefef, }, + }, + #endif + /* FIXME: make this work on big endian */ + { +- .format = PIXMAN_yv12, +- .width = 8, .height = 2, +- .stride = 8, ++ PIXMAN_yv12, ++ 8, 2, ++ 8, + #ifdef WORDS_BIGENDIAN +- .src = + { + 0x00ff00ff, 0x00ff00ff, + 0xff00ff00, 0xff00ff00, +@@ -82,7 +78,6 @@ static testcase_t testcases[] = + 0x800080ff + }, + #else +- .src = + { + 0xff00ff00, 0xff00ff00, + 0x00ff00ff, 0x00ff00ff, +@@ -90,7 +85,6 @@ static testcase_t testcases[] = + 0xff800080 + }, + #endif +- .dst = + { + 0xff000000, 0xffffffff, 0xffb80000, 0xffffe113, + 0xff000000, 0xffffffff, 0xff0023ee, 0xff4affff, +diff --git a/test/trap-crasher.c b/test/trap-crasher.c +index 42b82f6..7485e62 100644 +--- a/test/trap-crasher.c ++++ b/test/trap-crasher.c +@@ -7,21 +7,21 @@ main() + pixman_image_t *dst; + pixman_trapezoid_t traps[1] = { + { +- .top = 2147483646, +- .bottom = 2147483647, +- .left = { +- .p1 = { .x = 0, .y = 0 }, +- .p2 = { .x = 0, .y = 2147483647 } ++ 2147483646, ++ 2147483647, ++ { ++ { 0, 0 }, ++ { 0, 2147483647 } + }, +- .right = { +- .p1 = { .x = 65536, .y = 0 }, +- .p2 = { .x = 0, .y = 2147483647 } ++ { ++ { 65536, 0 }, ++ { 0, 2147483647 } + } + }, + }; +- ++ + dst = pixman_image_create_bits (PIXMAN_a8, 1, 1, NULL, -1); +- ++ + pixman_add_trapezoids (dst, 0, 0, sizeof (traps)/sizeof (traps[0]), traps); + return (0); + } +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0004-test-Add-Makefile-for-Win32.patch b/recipes/xorg-lib/pixman-0.21.6/0004-test-Add-Makefile-for-Win32.patch new file mode 100644 index 0000000000..94ed0b4308 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0004-test-Add-Makefile-for-Win32.patch @@ -0,0 +1,92 @@ +From 72f5e5f608506c18c484bc5bc3e58bd83aeb7691 Mon Sep 17 00:00:00 2001 +From: Andrea Canciani +Date: Tue, 22 Feb 2011 22:04:49 +0100 +Subject: [PATCH 04/40] test: Add Makefile for Win32 + +--- + test/Makefile.win32 | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 73 insertions(+), 0 deletions(-) + create mode 100644 test/Makefile.win32 + +diff --git a/test/Makefile.win32 b/test/Makefile.win32 +new file mode 100644 +index 0000000..c71afe1 +--- /dev/null ++++ b/test/Makefile.win32 +@@ -0,0 +1,73 @@ ++CC = cl ++LINK = link ++ ++CFG_VAR = $(CFG) ++ifeq ($(CFG_VAR),) ++CFG_VAR=release ++endif ++ ++CFLAGS = -MD -nologo -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_BIND_TO_CURRENT_VCLIBS_VERSION -D_MT -I../pixman -I. -I../ ++TEST_LDADD = ../pixman/$(CFG_VAR)/pixman-1.lib ++INCLUDES = -I../pixman -I$(top_builddir)/pixman ++ ++# optimization flags ++ifeq ($(CFG_VAR),debug) ++CFLAGS += -Od -Zi ++else ++CFLAGS += -O2 ++endif ++ ++SOURCES = \ ++ a1-trap-test.c \ ++ pdf-op-test.c \ ++ region-test.c \ ++ region-translate-test.c \ ++ fetch-test.c \ ++ oob-test.c \ ++ trap-crasher.c \ ++ alpha-loop.c \ ++ scaling-crash-test.c \ ++ gradient-crash-test.c \ ++ alphamap.c \ ++ stress-test.c \ ++ composite-traps-test.c \ ++ blitters-test.c \ ++ scaling-test.c \ ++ affine-test.c \ ++ composite.c \ ++ utils.c ++ ++TESTS = \ ++ $(CFG_VAR)/a1-trap-test.exe \ ++ $(CFG_VAR)/pdf-op-test.exe \ ++ $(CFG_VAR)/region-test.exe \ ++ $(CFG_VAR)/region-translate-test.exe \ ++ $(CFG_VAR)/fetch-test.exe \ ++ $(CFG_VAR)/oob-test.exe \ ++ $(CFG_VAR)/trap-crasher.exe \ ++ $(CFG_VAR)/alpha-loop.exe \ ++ $(CFG_VAR)/scaling-crash-test.exe \ ++ $(CFG_VAR)/gradient-crash-test.exe \ ++ $(CFG_VAR)/alphamap.exe \ ++ $(CFG_VAR)/stress-test.exe \ ++ $(CFG_VAR)/composite-traps-test.exe \ ++ $(CFG_VAR)/blitters-test.exe \ ++ $(CFG_VAR)/scaling-test.exe \ ++ $(CFG_VAR)/affine-test.exe \ ++ $(CFG_VAR)/composite.exe ++ ++ ++OBJECTS = $(patsubst %.c, $(CFG_VAR)/%.obj, $(SOURCES)) ++ ++$(CFG_VAR)/%.obj: %.c ++ @mkdir -p $(CFG_VAR) ++ @$(CC) -c $(CFLAGS) -Fo"$@" $< ++ ++$(CFG_VAR)/%.exe: $(CFG_VAR)/%.obj ++ $(LINK) /NOLOGO /OUT:$@ $< $(CFG_VAR)/utils.obj $(TEST_LDADD) ++ ++all: $(OBJECTS) $(TESTS) ++ @exit 0 ++ ++clean: ++ @rm -f $(CFG_VAR)/*.obj $(CFG_VAR)/*.pdb || exit 0 +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0005-Do-not-include-unused-headers.patch b/recipes/xorg-lib/pixman-0.21.6/0005-Do-not-include-unused-headers.patch new file mode 100644 index 0000000000..60f9528aa4 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0005-Do-not-include-unused-headers.patch @@ -0,0 +1,40 @@ +From 8868778ea1fdc8e70da76b3b00ea78106c5840d8 Mon Sep 17 00:00:00 2001 +From: Andrea Canciani +Date: Tue, 22 Feb 2011 22:43:48 +0100 +Subject: [PATCH 05/40] Do not include unused headers + +pixman-combine32.h is included without being used both in +pixman-image.c and in pixman-general.c. +--- + pixman/pixman-general.c | 2 -- + pixman/pixman-image.c | 1 - + 2 files changed, 0 insertions(+), 3 deletions(-) + +diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c +index 16ea3a4..872fb7e 100644 +--- a/pixman/pixman-general.c ++++ b/pixman/pixman-general.c +@@ -36,8 +36,6 @@ + #include + #include + #include "pixman-private.h" +-#include "pixman-combine32.h" +-#include "pixman-private.h" + + static void + general_src_iter_init (pixman_implementation_t *imp, +diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c +index 9103ca6..84bacf8 100644 +--- a/pixman/pixman-image.c ++++ b/pixman/pixman-image.c +@@ -30,7 +30,6 @@ + #include + + #include "pixman-private.h" +-#include "pixman-combine32.h" + + pixman_bool_t + _pixman_init_gradient (gradient_t * gradient, +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0006-test-Silence-MSVC-warnings.patch b/recipes/xorg-lib/pixman-0.21.6/0006-test-Silence-MSVC-warnings.patch new file mode 100644 index 0000000000..80d7943977 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0006-test-Silence-MSVC-warnings.patch @@ -0,0 +1,63 @@ +From 9ebde285fa990bfa1524f166fbfb1368c346b14a Mon Sep 17 00:00:00 2001 +From: Andrea Canciani +Date: Thu, 24 Feb 2011 12:53:39 +0100 +Subject: [PATCH 06/40] test: Silence MSVC warnings + +MSVC does not notice non-returning functions (abort() / assert(0)) +and warns about paths which end with them in non-void functions: + +c:\cygwin\home\ranma42\code\fdo\pixman\test\fetch-test.c(114) : +warning C4715: 'reader' : not all control paths return a value +c:\cygwin\home\ranma42\code\fdo\pixman\test\stress-test.c(133) : +warning C4715: 'real_reader' : not all control paths return a value +c:\cygwin\home\ranma42\code\fdo\pixman\test\composite.c(431) : +warning C4715: 'calc_op' : not all control paths return a value + +These warnings can be silenced by adding a return after the +termination call. +--- + test/composite.c | 1 + + test/fetch-test.c | 1 + + test/stress-test.c | 2 +- + 3 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/test/composite.c b/test/composite.c +index 08c6689..a86e5ed 100644 +--- a/test/composite.c ++++ b/test/composite.c +@@ -426,6 +426,7 @@ calc_op (pixman_op_t op, double src, double dst, double srca, double dsta) + case PIXMAN_OP_HSL_LUMINOSITY: + default: + abort(); ++ return 0; /* silence MSVC */ + } + #undef mult_chan + } +diff --git a/test/fetch-test.c b/test/fetch-test.c +index 314a072..60bc765 100644 +--- a/test/fetch-test.c ++++ b/test/fetch-test.c +@@ -110,6 +110,7 @@ reader (const void *src, int size) + return *(uint32_t *)src; + default: + assert(0); ++ return 0; /* silence MSVC */ + } + } + +diff --git a/test/stress-test.c b/test/stress-test.c +index bcbc1f8..166dc6d 100644 +--- a/test/stress-test.c ++++ b/test/stress-test.c +@@ -128,7 +128,7 @@ real_reader (const void *src, int size) + return *(uint32_t *)src; + default: + assert (0); +- break; ++ return 0; /* silence MSVC */ + } + } + +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0007-Main-loop-template-for-fast-single-pass-bilinear-sca.patch b/recipes/xorg-lib/pixman-0.21.6/0007-Main-loop-template-for-fast-single-pass-bilinear-sca.patch new file mode 100644 index 0000000000..c5dab5c31f --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0007-Main-loop-template-for-fast-single-pass-bilinear-sca.patch @@ -0,0 +1,466 @@ +From d506bf68fd0e9a1c5dd484daee70631699918387 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Mon, 21 Feb 2011 01:29:02 +0200 +Subject: [PATCH 07/40] Main loop template for fast single pass bilinear scaling + +Can be used for implementing SIMD optimized fast path +functions which work with bilinear scaled source images. + +Similar to the template for nearest scaling main loop, the +following types of mask are supported: +1. no mask +2. non-scaled a8 mask with SAMPLES_COVER_CLIP flag +3. solid mask + +PAD repeat is fully supported. NONE repeat is partially +supported (right now only works if source image has alpha +channel or when alpha channel of the source image does not +have any effect on the compositing operation). +--- + pixman/pixman-fast-path.h | 432 +++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 432 insertions(+), 0 deletions(-) + +diff --git a/pixman/pixman-fast-path.h b/pixman/pixman-fast-path.h +index d081222..1885d47 100644 +--- a/pixman/pixman-fast-path.h ++++ b/pixman/pixman-fast-path.h +@@ -587,4 +587,436 @@ fast_composite_scaled_nearest ## scale_func_name (pixman_implementation_t *imp, + SIMPLE_NEAREST_SOLID_MASK_FAST_PATH_NONE (op,s,d,func), \ + SIMPLE_NEAREST_SOLID_MASK_FAST_PATH_PAD (op,s,d,func) + ++/*****************************************************************************/ ++ ++/* ++ * Identify 5 zones in each scanline for bilinear scaling. Depending on ++ * whether 2 pixels to be interpolated are fetched from the image itself, ++ * from the padding area around it or from both image and padding area. ++ */ ++static force_inline void ++bilinear_pad_repeat_get_scanline_bounds (int32_t source_image_width, ++ pixman_fixed_t vx, ++ pixman_fixed_t unit_x, ++ int32_t * left_pad, ++ int32_t * left_tz, ++ int32_t * width, ++ int32_t * right_tz, ++ int32_t * right_pad) ++{ ++ int width1 = *width, left_pad1, right_pad1; ++ int width2 = *width, left_pad2, right_pad2; ++ ++ pad_repeat_get_scanline_bounds (source_image_width, vx, unit_x, ++ &width1, &left_pad1, &right_pad1); ++ pad_repeat_get_scanline_bounds (source_image_width, vx + pixman_fixed_1, ++ unit_x, &width2, &left_pad2, &right_pad2); ++ ++ *left_pad = left_pad2; ++ *left_tz = left_pad1 - left_pad2; ++ *right_tz = right_pad2 - right_pad1; ++ *right_pad = right_pad1; ++ *width -= *left_pad + *left_tz + *right_tz + *right_pad; ++} ++ ++/* ++ * Main loop template for single pass bilinear scaling. It needs to be ++ * provided with 'scanline_func' which should do the compositing operation. ++ * The needed function has the following prototype: ++ * ++ * scanline_func (dst_type_t * dst, ++ * const mask_type_ * mask, ++ * const src_type_t * src_top, ++ * const src_type_t * src_bottom, ++ * int32_t width, ++ * int weight_top, ++ * int weight_bottom, ++ * pixman_fixed_t vx, ++ * pixman_fixed_t unit_x, ++ * pixman_fixed_t max_vx, ++ * pixman_bool_t zero_src) ++ * ++ * Where: ++ * dst - destination scanline buffer for storing results ++ * mask - mask buffer (or single value for solid mask) ++ * src_top, src_bottom - two source scanlines ++ * width - number of pixels to process ++ * weight_top - weight of the top row for interpolation ++ * weight_bottom - weight of the bottom row for interpolation ++ * vx - initial position for fetching the first pair of ++ * pixels from the source buffer ++ * unit_x - position increment needed to move to the next pair ++ * of pixels ++ * max_vx - image size as a fixed point value, can be used for ++ * implementing NORMAL repeat (when it is supported) ++ * zero_src - boolean hint variable, which is set to TRUE when ++ * all source pixels are fetched from zero padding ++ * zone for NONE repeat ++ * ++ * Note: normally the sum of 'weight_top' and 'weight_bottom' is equal to 256, ++ * but sometimes it may be less than that for NONE repeat when handling ++ * fuzzy antialiased top or bottom image edges. Also both top and ++ * bottom weight variables are guaranteed to have value in 0-255 ++ * range and can fit into unsigned byte or be used with 8-bit SIMD ++ * multiplication instructions. ++ */ ++#define FAST_BILINEAR_MAINLOOP_INT(scale_func_name, scanline_func, src_type_t, mask_type_t, \ ++ dst_type_t, repeat_mode, have_mask, mask_is_solid) \ ++static void \ ++fast_composite_scaled_bilinear ## scale_func_name (pixman_implementation_t *imp, \ ++ pixman_op_t op, \ ++ pixman_image_t * src_image, \ ++ pixman_image_t * mask_image, \ ++ pixman_image_t * dst_image, \ ++ int32_t src_x, \ ++ int32_t src_y, \ ++ int32_t mask_x, \ ++ int32_t mask_y, \ ++ int32_t dst_x, \ ++ int32_t dst_y, \ ++ int32_t width, \ ++ int32_t height) \ ++{ \ ++ dst_type_t *dst_line; \ ++ mask_type_t *mask_line; \ ++ src_type_t *src_first_line; \ ++ int y1, y2; \ ++ pixman_fixed_t max_vx = INT32_MAX; /* suppress uninitialized variable warning */ \ ++ pixman_vector_t v; \ ++ pixman_fixed_t vx, vy; \ ++ pixman_fixed_t unit_x, unit_y; \ ++ int32_t left_pad, left_tz, right_tz, right_pad; \ ++ \ ++ dst_type_t *dst; \ ++ mask_type_t solid_mask; \ ++ const mask_type_t *mask = &solid_mask; \ ++ int src_stride, mask_stride, dst_stride; \ ++ \ ++ PIXMAN_IMAGE_GET_LINE (dst_image, dst_x, dst_y, dst_type_t, dst_stride, dst_line, 1); \ ++ if (have_mask) \ ++ { \ ++ if (mask_is_solid) \ ++ { \ ++ solid_mask = _pixman_image_get_solid (imp, mask_image, dst_image->bits.format); \ ++ mask_stride = 0; \ ++ } \ ++ else \ ++ { \ ++ PIXMAN_IMAGE_GET_LINE (mask_image, mask_x, mask_y, mask_type_t, \ ++ mask_stride, mask_line, 1); \ ++ } \ ++ } \ ++ /* pass in 0 instead of src_x and src_y because src_x and src_y need to be \ ++ * transformed from destination space to source space */ \ ++ PIXMAN_IMAGE_GET_LINE (src_image, 0, 0, src_type_t, src_stride, src_first_line, 1); \ ++ \ ++ /* reference point is the center of the pixel */ \ ++ v.vector[0] = pixman_int_to_fixed (src_x) + pixman_fixed_1 / 2; \ ++ v.vector[1] = pixman_int_to_fixed (src_y) + pixman_fixed_1 / 2; \ ++ v.vector[2] = pixman_fixed_1; \ ++ \ ++ if (!pixman_transform_point_3d (src_image->common.transform, &v)) \ ++ return; \ ++ \ ++ unit_x = src_image->common.transform->matrix[0][0]; \ ++ unit_y = src_image->common.transform->matrix[1][1]; \ ++ \ ++ v.vector[0] -= pixman_fixed_1 / 2; \ ++ v.vector[1] -= pixman_fixed_1 / 2; \ ++ \ ++ vy = v.vector[1]; \ ++ \ ++ if (PIXMAN_REPEAT_ ## repeat_mode == PIXMAN_REPEAT_PAD || \ ++ PIXMAN_REPEAT_ ## repeat_mode == PIXMAN_REPEAT_NONE) \ ++ { \ ++ bilinear_pad_repeat_get_scanline_bounds (src_image->bits.width, v.vector[0], unit_x, \ ++ &left_pad, &left_tz, &width, &right_tz, &right_pad); \ ++ if (PIXMAN_REPEAT_ ## repeat_mode == PIXMAN_REPEAT_PAD) \ ++ { \ ++ /* PAD repeat does not need special handling for 'transition zones' and */ \ ++ /* they can be combined with 'padding zones' safely */ \ ++ left_pad += left_tz; \ ++ right_pad += right_tz; \ ++ left_tz = right_tz = 0; \ ++ } \ ++ v.vector[0] += left_pad * unit_x; \ ++ } \ ++ \ ++ while (--height >= 0) \ ++ { \ ++ int weight1, weight2; \ ++ dst = dst_line; \ ++ dst_line += dst_stride; \ ++ vx = v.vector[0]; \ ++ if (have_mask && !mask_is_solid) \ ++ { \ ++ mask = mask_line; \ ++ mask_line += mask_stride; \ ++ } \ ++ \ ++ y1 = pixman_fixed_to_int (vy); \ ++ weight2 = (vy >> 8) & 0xff; \ ++ if (weight2) \ ++ { \ ++ /* normal case, both row weights are in 0-255 range and fit unsigned byte */ \ ++ y2 = y1 + 1; \ ++ weight1 = 256 - weight2; \ ++ } \ ++ else \ ++ { \ ++ /* set both top and bottom row to the same scanline, and weights to 128+128 */ \ ++ y2 = y1; \ ++ weight1 = weight2 = 128; \ ++ } \ ++ vy += unit_y; \ ++ if (PIXMAN_REPEAT_ ## repeat_mode == PIXMAN_REPEAT_PAD) \ ++ { \ ++ src_type_t *src1, *src2; \ ++ src_type_t buf1[2]; \ ++ src_type_t buf2[2]; \ ++ repeat (PIXMAN_REPEAT_PAD, &y1, src_image->bits.height); \ ++ repeat (PIXMAN_REPEAT_PAD, &y2, src_image->bits.height); \ ++ src1 = src_first_line + src_stride * y1; \ ++ src2 = src_first_line + src_stride * y2; \ ++ \ ++ if (left_pad > 0) \ ++ { \ ++ buf1[0] = buf1[1] = src1[0]; \ ++ buf2[0] = buf2[1] = src2[0]; \ ++ scanline_func (dst, mask, \ ++ buf1, buf2, left_pad, weight1, weight2, 0, 0, 0, FALSE); \ ++ dst += left_pad; \ ++ if (have_mask && !mask_is_solid) \ ++ mask += left_pad; \ ++ } \ ++ if (width > 0) \ ++ { \ ++ scanline_func (dst, mask, \ ++ src1, src2, width, weight1, weight2, vx, unit_x, 0, FALSE); \ ++ dst += width; \ ++ if (have_mask && !mask_is_solid) \ ++ mask += width; \ ++ } \ ++ if (right_pad > 0) \ ++ { \ ++ buf1[0] = buf1[1] = src1[src_image->bits.width - 1]; \ ++ buf2[0] = buf2[1] = src2[src_image->bits.width - 1]; \ ++ scanline_func (dst, mask, \ ++ buf1, buf2, right_pad, weight1, weight2, 0, 0, 0, FALSE); \ ++ } \ ++ } \ ++ else if (PIXMAN_REPEAT_ ## repeat_mode == PIXMAN_REPEAT_NONE) \ ++ { \ ++ src_type_t *src1, *src2; \ ++ src_type_t buf1[2]; \ ++ src_type_t buf2[2]; \ ++ /* handle top/bottom zero padding by just setting weights to 0 if needed */ \ ++ if (y1 < 0) \ ++ { \ ++ weight1 = 0; \ ++ y1 = 0; \ ++ } \ ++ if (y1 >= src_image->bits.height) \ ++ { \ ++ weight1 = 0; \ ++ y1 = src_image->bits.height - 1; \ ++ } \ ++ if (y2 < 0) \ ++ { \ ++ weight2 = 0; \ ++ y2 = 0; \ ++ } \ ++ if (y2 >= src_image->bits.height) \ ++ { \ ++ weight2 = 0; \ ++ y2 = src_image->bits.height - 1; \ ++ } \ ++ src1 = src_first_line + src_stride * y1; \ ++ src2 = src_first_line + src_stride * y2; \ ++ \ ++ if (left_pad > 0) \ ++ { \ ++ buf1[0] = buf1[1] = 0; \ ++ buf2[0] = buf2[1] = 0; \ ++ scanline_func (dst, mask, \ ++ buf1, buf2, left_pad, weight1, weight2, 0, 0, 0, TRUE); \ ++ dst += left_pad; \ ++ if (have_mask && !mask_is_solid) \ ++ mask += left_pad; \ ++ } \ ++ if (left_tz > 0) \ ++ { \ ++ buf1[0] = 0; \ ++ buf1[1] = src1[0]; \ ++ buf2[0] = 0; \ ++ buf2[1] = src2[0]; \ ++ scanline_func (dst, mask, \ ++ buf1, buf2, left_tz, weight1, weight2, \ ++ pixman_fixed_frac (vx), unit_x, 0, FALSE); \ ++ dst += left_tz; \ ++ if (have_mask && !mask_is_solid) \ ++ mask += left_tz; \ ++ vx += left_tz * unit_x; \ ++ } \ ++ if (width > 0) \ ++ { \ ++ scanline_func (dst, mask, \ ++ src1, src2, width, weight1, weight2, vx, unit_x, 0, FALSE); \ ++ dst += width; \ ++ if (have_mask && !mask_is_solid) \ ++ mask += width; \ ++ vx += width * unit_x; \ ++ } \ ++ if (right_tz > 0) \ ++ { \ ++ buf1[0] = src1[src_image->bits.width - 1]; \ ++ buf1[1] = 0; \ ++ buf2[0] = src2[src_image->bits.width - 1]; \ ++ buf2[1] = 0; \ ++ scanline_func (dst, mask, \ ++ buf1, buf2, right_tz, weight1, weight2, \ ++ pixman_fixed_frac (vx), unit_x, 0, FALSE); \ ++ dst += right_tz; \ ++ if (have_mask && !mask_is_solid) \ ++ mask += right_tz; \ ++ } \ ++ if (right_pad > 0) \ ++ { \ ++ buf1[0] = buf1[1] = 0; \ ++ buf2[0] = buf2[1] = 0; \ ++ scanline_func (dst, mask, \ ++ buf1, buf2, right_pad, weight1, weight2, 0, 0, 0, TRUE); \ ++ } \ ++ } \ ++ else \ ++ { \ ++ scanline_func (dst, mask, src_first_line + src_stride * y1, \ ++ src_first_line + src_stride * y2, width, \ ++ weight1, weight2, vx, unit_x, max_vx, FALSE); \ ++ } \ ++ } \ ++} ++ ++/* A workaround for old sun studio, see: https://bugs.freedesktop.org/show_bug.cgi?id=32764 */ ++#define FAST_BILINEAR_MAINLOOP_COMMON(scale_func_name, scanline_func, src_type_t, mask_type_t, \ ++ dst_type_t, repeat_mode, have_mask, mask_is_solid) \ ++ FAST_BILINEAR_MAINLOOP_INT(_ ## scale_func_name, scanline_func, src_type_t, mask_type_t,\ ++ dst_type_t, repeat_mode, have_mask, mask_is_solid) ++ ++#define SCALED_BILINEAR_FLAGS \ ++ (FAST_PATH_SCALE_TRANSFORM | \ ++ FAST_PATH_NO_ALPHA_MAP | \ ++ FAST_PATH_BILINEAR_FILTER | \ ++ FAST_PATH_NO_ACCESSORS | \ ++ FAST_PATH_NARROW_FORMAT) ++ ++#define SIMPLE_BILINEAR_FAST_PATH_PAD(op,s,d,func) \ ++ { PIXMAN_OP_ ## op, \ ++ PIXMAN_ ## s, \ ++ (SCALED_BILINEAR_FLAGS | \ ++ FAST_PATH_PAD_REPEAT | \ ++ FAST_PATH_X_UNIT_POSITIVE), \ ++ PIXMAN_null, 0, \ ++ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ ++ fast_composite_scaled_bilinear_ ## func ## _pad ## _ ## op, \ ++ } ++ ++#define SIMPLE_BILINEAR_FAST_PATH_NONE(op,s,d,func) \ ++ { PIXMAN_OP_ ## op, \ ++ PIXMAN_ ## s, \ ++ (SCALED_BILINEAR_FLAGS | \ ++ FAST_PATH_NONE_REPEAT | \ ++ FAST_PATH_X_UNIT_POSITIVE), \ ++ PIXMAN_null, 0, \ ++ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ ++ fast_composite_scaled_bilinear_ ## func ## _none ## _ ## op, \ ++ } ++ ++#define SIMPLE_BILINEAR_FAST_PATH_COVER(op,s,d,func) \ ++ { PIXMAN_OP_ ## op, \ ++ PIXMAN_ ## s, \ ++ SCALED_BILINEAR_FLAGS | FAST_PATH_SAMPLES_COVER_CLIP, \ ++ PIXMAN_null, 0, \ ++ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ ++ fast_composite_scaled_bilinear_ ## func ## _cover ## _ ## op, \ ++ } ++ ++#define SIMPLE_BILINEAR_A8_MASK_FAST_PATH_PAD(op,s,d,func) \ ++ { PIXMAN_OP_ ## op, \ ++ PIXMAN_ ## s, \ ++ (SCALED_BILINEAR_FLAGS | \ ++ FAST_PATH_PAD_REPEAT | \ ++ FAST_PATH_X_UNIT_POSITIVE), \ ++ PIXMAN_a8, MASK_FLAGS (a8, FAST_PATH_UNIFIED_ALPHA), \ ++ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ ++ fast_composite_scaled_bilinear_ ## func ## _pad ## _ ## op, \ ++ } ++ ++#define SIMPLE_BILINEAR_A8_MASK_FAST_PATH_NONE(op,s,d,func) \ ++ { PIXMAN_OP_ ## op, \ ++ PIXMAN_ ## s, \ ++ (SCALED_BILINEAR_FLAGS | \ ++ FAST_PATH_NONE_REPEAT | \ ++ FAST_PATH_X_UNIT_POSITIVE), \ ++ PIXMAN_a8, MASK_FLAGS (a8, FAST_PATH_UNIFIED_ALPHA), \ ++ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ ++ fast_composite_scaled_bilinear_ ## func ## _none ## _ ## op, \ ++ } ++ ++#define SIMPLE_BILINEAR_A8_MASK_FAST_PATH_COVER(op,s,d,func) \ ++ { PIXMAN_OP_ ## op, \ ++ PIXMAN_ ## s, \ ++ SCALED_BILINEAR_FLAGS | FAST_PATH_SAMPLES_COVER_CLIP, \ ++ PIXMAN_a8, MASK_FLAGS (a8, FAST_PATH_UNIFIED_ALPHA), \ ++ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ ++ fast_composite_scaled_bilinear_ ## func ## _cover ## _ ## op, \ ++ } ++ ++#define SIMPLE_BILINEAR_SOLID_MASK_FAST_PATH_PAD(op,s,d,func) \ ++ { PIXMAN_OP_ ## op, \ ++ PIXMAN_ ## s, \ ++ (SCALED_BILINEAR_FLAGS | \ ++ FAST_PATH_PAD_REPEAT | \ ++ FAST_PATH_X_UNIT_POSITIVE), \ ++ PIXMAN_solid, MASK_FLAGS (solid, FAST_PATH_UNIFIED_ALPHA), \ ++ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ ++ fast_composite_scaled_bilinear_ ## func ## _pad ## _ ## op, \ ++ } ++ ++#define SIMPLE_BILINEAR_SOLID_MASK_FAST_PATH_NONE(op,s,d,func) \ ++ { PIXMAN_OP_ ## op, \ ++ PIXMAN_ ## s, \ ++ (SCALED_BILINEAR_FLAGS | \ ++ FAST_PATH_NONE_REPEAT | \ ++ FAST_PATH_X_UNIT_POSITIVE), \ ++ PIXMAN_solid, MASK_FLAGS (solid, FAST_PATH_UNIFIED_ALPHA), \ ++ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ ++ fast_composite_scaled_bilinear_ ## func ## _none ## _ ## op, \ ++ } ++ ++#define SIMPLE_BILINEAR_SOLID_MASK_FAST_PATH_COVER(op,s,d,func) \ ++ { PIXMAN_OP_ ## op, \ ++ PIXMAN_ ## s, \ ++ SCALED_BILINEAR_FLAGS | FAST_PATH_SAMPLES_COVER_CLIP, \ ++ PIXMAN_solid, MASK_FLAGS (solid, FAST_PATH_UNIFIED_ALPHA), \ ++ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ ++ fast_composite_scaled_bilinear_ ## func ## _cover ## _ ## op, \ ++ } ++ ++/* Prefer the use of 'cover' variant, because it is faster */ ++#define SIMPLE_BILINEAR_FAST_PATH(op,s,d,func) \ ++ SIMPLE_BILINEAR_FAST_PATH_COVER (op,s,d,func), \ ++ SIMPLE_BILINEAR_FAST_PATH_NONE (op,s,d,func), \ ++ SIMPLE_BILINEAR_FAST_PATH_PAD (op,s,d,func) ++ ++#define SIMPLE_BILINEAR_A8_MASK_FAST_PATH(op,s,d,func) \ ++ SIMPLE_BILINEAR_A8_MASK_FAST_PATH_COVER (op,s,d,func), \ ++ SIMPLE_BILINEAR_A8_MASK_FAST_PATH_NONE (op,s,d,func), \ ++ SIMPLE_BILINEAR_A8_MASK_FAST_PATH_PAD (op,s,d,func) ++ ++#define SIMPLE_BILINEAR_SOLID_MASK_FAST_PATH(op,s,d,func) \ ++ SIMPLE_BILINEAR_SOLID_MASK_FAST_PATH_COVER (op,s,d,func), \ ++ SIMPLE_BILINEAR_SOLID_MASK_FAST_PATH_NONE (op,s,d,func), \ ++ SIMPLE_BILINEAR_SOLID_MASK_FAST_PATH_PAD (op,s,d,func) ++ + #endif +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0008-test-check-correctness-of-bilinear_pad_repeat_get_sc.patch b/recipes/xorg-lib/pixman-0.21.6/0008-test-check-correctness-of-bilinear_pad_repeat_get_sc.patch new file mode 100644 index 0000000000..18dfcaa10f --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0008-test-check-correctness-of-bilinear_pad_repeat_get_sc.patch @@ -0,0 +1,136 @@ +From 0df43b8ae5031dd83775d00b57b6bed809db0e89 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Mon, 21 Feb 2011 02:07:09 +0200 +Subject: [PATCH 08/40] test: check correctness of 'bilinear_pad_repeat_get_scanline_bounds' + +Individual correctness check for the new bilinear scaling related +supplementary function. This test program uses a bit wider range +of input arguments, not covered by other tests. +--- + test/Makefile.am | 2 + + test/scaling-helpers-test.c | 93 +++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 95 insertions(+), 0 deletions(-) + create mode 100644 test/scaling-helpers-test.c + +diff --git a/test/Makefile.am b/test/Makefile.am +index 057e9ce..9dc7219 100644 +--- a/test/Makefile.am ++++ b/test/Makefile.am +@@ -13,6 +13,7 @@ TESTPROGRAMS = \ + trap-crasher \ + alpha-loop \ + scaling-crash-test \ ++ scaling-helpers-test \ + gradient-crash-test \ + alphamap \ + stress-test \ +@@ -33,6 +34,7 @@ alpha_loop_SOURCES = alpha-loop.c utils.c utils.h + composite_SOURCES = composite.c utils.c utils.h + gradient_crash_test_SOURCES = gradient-crash-test.c utils.c utils.h + stress_test_SOURCES = stress-test.c utils.c utils.h ++scaling_helpers_test_SOURCES = scaling-helpers-test.c utils.c utils.h + + # Benchmarks + +diff --git a/test/scaling-helpers-test.c b/test/scaling-helpers-test.c +new file mode 100644 +index 0000000..c186138 +--- /dev/null ++++ b/test/scaling-helpers-test.c +@@ -0,0 +1,93 @@ ++#include ++#include ++#include ++#include ++#include ++#include "utils.h" ++#include "pixman-fast-path.h" ++ ++/* A trivial reference implementation for ++ * 'bilinear_pad_repeat_get_scanline_bounds' ++ */ ++static void ++bilinear_pad_repeat_get_scanline_bounds_ref (int32_t source_image_width, ++ pixman_fixed_t vx_, ++ pixman_fixed_t unit_x, ++ int32_t * left_pad, ++ int32_t * left_tz, ++ int32_t * width, ++ int32_t * right_tz, ++ int32_t * right_pad) ++{ ++ int w = *width; ++ *left_pad = 0; ++ *left_tz = 0; ++ *width = 0; ++ *right_tz = 0; ++ *right_pad = 0; ++ int64_t vx = vx_; ++ while (--w >= 0) ++ { ++ if (vx < 0) ++ { ++ if (vx + pixman_fixed_1 < 0) ++ *left_pad += 1; ++ else ++ *left_tz += 1; ++ } ++ else if (vx + pixman_fixed_1 >= pixman_int_to_fixed (source_image_width)) ++ { ++ if (vx >= pixman_int_to_fixed (source_image_width)) ++ *right_pad += 1; ++ else ++ *right_tz += 1; ++ } ++ else ++ { ++ *width += 1; ++ } ++ vx += unit_x; ++ } ++} ++ ++int ++main (void) ++{ ++ int i; ++ for (i = 0; i < 10000; i++) ++ { ++ int32_t left_pad1, left_tz1, width1, right_tz1, right_pad1; ++ int32_t left_pad2, left_tz2, width2, right_tz2, right_pad2; ++ pixman_fixed_t vx = lcg_rand_N(10000 << 16) - (3000 << 16); ++ int32_t width = lcg_rand_N(10000); ++ int32_t source_image_width = lcg_rand_N(10000) + 1; ++ pixman_fixed_t unit_x = lcg_rand_N(10 << 16) + 1; ++ width1 = width2 = width; ++ ++ bilinear_pad_repeat_get_scanline_bounds_ref (source_image_width, ++ vx, ++ unit_x, ++ &left_pad1, ++ &left_tz1, ++ &width1, ++ &right_tz1, ++ &right_pad1); ++ ++ bilinear_pad_repeat_get_scanline_bounds (source_image_width, ++ vx, ++ unit_x, ++ &left_pad2, ++ &left_tz2, ++ &width2, ++ &right_tz2, ++ &right_pad2); ++ ++ assert (left_pad1 == left_pad2); ++ assert (left_tz1 == left_tz2); ++ assert (width1 == width2); ++ assert (right_tz1 == right_tz2); ++ assert (right_pad1 == right_pad2); ++ } ++ ++ return 0; ++} +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0009-SSE2-optimization-for-bilinear-scaled-src_8888_8888.patch b/recipes/xorg-lib/pixman-0.21.6/0009-SSE2-optimization-for-bilinear-scaled-src_8888_8888.patch new file mode 100644 index 0000000000..b85f78169c --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0009-SSE2-optimization-for-bilinear-scaled-src_8888_8888.patch @@ -0,0 +1,156 @@ +From 350029396d911941591149cc82b5e68a78ad6747 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Mon, 21 Feb 2011 20:18:02 +0200 +Subject: [PATCH 09/40] SSE2 optimization for bilinear scaled 'src_8888_8888' + +A primitive naive implementation of bilinear scaling using SSE2 intrinsics, +which only handles one pixel at a time. It is approximately 2x faster than +pixman general compositing path. Single pass processing without intermediate +temporary buffer contributes to ~15% and loop unrolling contributes to ~20% +of this speedup. + +Benchmark on Intel Core i7 (x86-64): + Using cairo-perf-trace: + before: image firefox-planet-gnome 12.566 12.610 0.23% 6/6 + after: image firefox-planet-gnome 10.961 11.013 0.19% 5/6 + + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=20028888, dst=20028888, speed=70.48 MPix/s + after: op=1, src=20028888, dst=20028888, speed=165.38 MPix/s +--- + pixman/pixman-sse2.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 112 insertions(+), 0 deletions(-) + +diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c +index 88287b4..696005f 100644 +--- a/pixman/pixman-sse2.c ++++ b/pixman/pixman-sse2.c +@@ -5567,6 +5567,114 @@ FAST_NEAREST_MAINLOOP_COMMON (sse2_8888_n_8888_none_OVER, + scaled_nearest_scanline_sse2_8888_n_8888_OVER, + uint32_t, uint32_t, uint32_t, NONE, TRUE, TRUE) + ++static void ++bilinear_interpolate_line_sse2 (uint32_t * out, ++ const uint32_t * top, ++ const uint32_t * bottom, ++ int wt, ++ int wb, ++ pixman_fixed_t x, ++ pixman_fixed_t ux, ++ int width) ++{ ++ const __m128i xmm_wt = _mm_set_epi16 (wt, wt, wt, wt, wt, wt, wt, wt); ++ const __m128i xmm_wb = _mm_set_epi16 (wb, wb, wb, wb, wb, wb, wb, wb); ++ const __m128i xmm_xorc = _mm_set_epi16 (0, 0, 0, 0, 0xff, 0xff, 0xff, 0xff); ++ const __m128i xmm_addc = _mm_set_epi16 (0, 0, 0, 0, 1, 1, 1, 1); ++ const __m128i xmm_ux = _mm_set_epi16 (ux, ux, ux, ux, ux, ux, ux, ux); ++ const __m128i xmm_zero = _mm_setzero_si128 (); ++ __m128i xmm_x = _mm_set_epi16 (x, x, x, x, x, x, x, x); ++ uint32_t pix1, pix2, pix3, pix4; ++ ++ #define INTERPOLATE_ONE_PIXEL(pix) \ ++ do { \ ++ __m128i xmm_wh, xmm_lo, xmm_hi, a; \ ++ /* fetch 2x2 pixel block into sse2 register */ \ ++ uint32_t tl = top [pixman_fixed_to_int (x)]; \ ++ uint32_t tr = top [pixman_fixed_to_int (x) + 1]; \ ++ uint32_t bl = bottom [pixman_fixed_to_int (x)]; \ ++ uint32_t br = bottom [pixman_fixed_to_int (x) + 1]; \ ++ a = _mm_set_epi32 (tr, tl, br, bl); \ ++ x += ux; \ ++ /* vertical interpolation */ \ ++ a = _mm_add_epi16 (_mm_mullo_epi16 (_mm_unpackhi_epi8 (a, xmm_zero), \ ++ xmm_wt), \ ++ _mm_mullo_epi16 (_mm_unpacklo_epi8 (a, xmm_zero), \ ++ xmm_wb)); \ ++ /* calculate horizontal weights */ \ ++ xmm_wh = _mm_add_epi16 (xmm_addc, \ ++ _mm_xor_si128 (xmm_xorc, \ ++ _mm_srli_epi16 (xmm_x, 8))); \ ++ xmm_x = _mm_add_epi16 (xmm_x, xmm_ux); \ ++ /* horizontal interpolation */ \ ++ xmm_lo = _mm_mullo_epi16 (a, xmm_wh); \ ++ xmm_hi = _mm_mulhi_epu16 (a, xmm_wh); \ ++ a = _mm_add_epi32 (_mm_unpacklo_epi16 (xmm_lo, xmm_hi), \ ++ _mm_unpackhi_epi16 (xmm_lo, xmm_hi)); \ ++ /* shift and pack the result */ \ ++ a = _mm_srli_epi32 (a, 16); \ ++ a = _mm_packs_epi32 (a, a); \ ++ a = _mm_packus_epi16 (a, a); \ ++ pix = _mm_cvtsi128_si32 (a); \ ++ } while (0) ++ ++ while ((width -= 4) >= 0) ++ { ++ INTERPOLATE_ONE_PIXEL (pix1); ++ INTERPOLATE_ONE_PIXEL (pix2); ++ INTERPOLATE_ONE_PIXEL (pix3); ++ INTERPOLATE_ONE_PIXEL (pix4); ++ *out++ = pix1; ++ *out++ = pix2; ++ *out++ = pix3; ++ *out++ = pix4; ++ } ++ if (width & 2) ++ { ++ INTERPOLATE_ONE_PIXEL (pix1); ++ INTERPOLATE_ONE_PIXEL (pix2); ++ *out++ = pix1; ++ *out++ = pix2; ++ } ++ if (width & 1) ++ { ++ INTERPOLATE_ONE_PIXEL (pix1); ++ *out = pix1; ++ } ++ ++ #undef INTERPOLATE_ONE_PIXEL ++} ++ ++static force_inline void ++scaled_bilinear_scanline_sse2_8888_8888_SRC (uint32_t * dst, ++ const uint32_t * mask, ++ const uint32_t * src_top, ++ const uint32_t * src_bottom, ++ int32_t w, ++ int wt, ++ int wb, ++ pixman_fixed_t vx, ++ pixman_fixed_t unit_x, ++ pixman_fixed_t max_vx, ++ pixman_bool_t zero_src) ++{ ++ bilinear_interpolate_line_sse2 (dst, src_top, src_bottom, ++ wt, wb, vx, unit_x, w); ++} ++ ++FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_cover_SRC, ++ scaled_bilinear_scanline_sse2_8888_8888_SRC, ++ uint32_t, uint32_t, uint32_t, ++ COVER, FALSE, FALSE) ++FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_pad_SRC, ++ scaled_bilinear_scanline_sse2_8888_8888_SRC, ++ uint32_t, uint32_t, uint32_t, ++ PAD, FALSE, FALSE) ++FAST_BILINEAR_MAINLOOP_COMMON (sse2_8888_8888_none_SRC, ++ scaled_bilinear_scanline_sse2_8888_8888_SRC, ++ uint32_t, uint32_t, uint32_t, ++ NONE, FALSE, FALSE) ++ + static const pixman_fast_path_t sse2_fast_paths[] = + { + /* PIXMAN_OP_OVER */ +@@ -5668,6 +5776,10 @@ static const pixman_fast_path_t sse2_fast_paths[] = + SIMPLE_NEAREST_SOLID_MASK_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8, sse2_8888_n_8888), + SIMPLE_NEAREST_SOLID_MASK_FAST_PATH (OVER, a8b8g8r8, x8b8g8r8, sse2_8888_n_8888), + ++ SIMPLE_BILINEAR_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8, sse2_8888_8888), ++ SIMPLE_BILINEAR_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, sse2_8888_8888), ++ SIMPLE_BILINEAR_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, sse2_8888_8888), ++ + { PIXMAN_OP_NONE }, + }; + +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0010-ARM-NEON-optimization-for-bilinear-scaled-src_8888_8.patch b/recipes/xorg-lib/pixman-0.21.6/0010-ARM-NEON-optimization-for-bilinear-scaled-src_8888_8.patch new file mode 100644 index 0000000000..4d411625ae --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0010-ARM-NEON-optimization-for-bilinear-scaled-src_8888_8.patch @@ -0,0 +1,288 @@ +From 17feaa9c50bb8521b0366345efe181bd99754957 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Tue, 22 Feb 2011 18:45:03 +0200 +Subject: [PATCH 10/40] ARM: NEON optimization for bilinear scaled 'src_8888_8888' + +Initial NEON optimization for bilinear scaling. Can be probably +improved more. + +Benchmark on ARM Cortex-A8: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=20028888, dst=20028888, speed=6.70 MPix/s + after: op=1, src=20028888, dst=20028888, speed=44.27 MPix/s +--- + pixman/pixman-arm-neon-asm.S | 197 ++++++++++++++++++++++++++++++++++++++++++ + pixman/pixman-arm-neon.c | 45 ++++++++++ + 2 files changed, 242 insertions(+), 0 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index 47daf45..c168e10 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2391,3 +2391,200 @@ generate_composite_function_nearest_scanline \ + 10, /* dst_r_basereg */ \ + 8, /* src_basereg */ \ + 15 /* mask_basereg */ ++ ++/******************************************************************************/ ++ ++/* Supplementary macro for setting function attributes */ ++.macro pixman_asm_function fname ++ .func fname ++ .global fname ++#ifdef __ELF__ ++ .hidden fname ++ .type fname, %function ++#endif ++fname: ++.endm ++ ++.macro bilinear_interpolate_last_pixel ++ mov TMP1, X, asr #16 ++ mov TMP2, X, asr #16 ++ add TMP1, TOP, TMP1, asl #2 ++ add TMP2, BOTTOM, TMP2, asl #2 ++ vld1.32 {d0}, [TMP1] ++ vshr.u16 d30, d24, #8 ++ vld1.32 {d1}, [TMP2] ++ vmull.u8 q1, d0, d28 ++ vmlal.u8 q1, d1, d29 ++ /* 5 cycles bubble */ ++ vshll.u16 q0, d2, #8 ++ vmlsl.u16 q0, d2, d30 ++ vmlal.u16 q0, d3, d30 ++ /* 5 cycles bubble */ ++ vshrn.u32 d0, q0, #16 ++ /* 3 cycles bubble */ ++ vmovn.u16 d0, q0 ++ /* 1 cycle bubble */ ++ vst1.32 {d0[0]}, [OUT, :32]! ++.endm ++ ++.macro bilinear_interpolate_two_pixels ++ mov TMP1, X, asr #16 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ add TMP2, BOTTOM, TMP2, asl #2 ++ vld1.32 {d0}, [TMP1] ++ vld1.32 {d1}, [TMP2] ++ vmull.u8 q1, d0, d28 ++ vmlal.u8 q1, d1, d29 ++ mov TMP1, X, asr #16 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ add TMP2, BOTTOM, TMP2, asl #2 ++ vld1.32 {d20}, [TMP1] ++ vld1.32 {d21}, [TMP2] ++ vmull.u8 q11, d20, d28 ++ vmlal.u8 q11, d21, d29 ++ vshr.u16 q15, q12, #8 ++ vadd.u16 q12, q12, q13 ++ vshll.u16 q0, d2, #8 ++ vmlsl.u16 q0, d2, d30 ++ vmlal.u16 q0, d3, d30 ++ vshll.u16 q10, d22, #8 ++ vmlsl.u16 q10, d22, d31 ++ vmlal.u16 q10, d23, d31 ++ vshrn.u32 d30, q0, #16 ++ vshrn.u32 d31, q10, #16 ++ vmovn.u16 d0, q15 ++ vst1.32 {d0}, [OUT]! ++.endm ++ ++.macro bilinear_interpolate_four_pixels ++ mov TMP1, X, asr #16 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ add TMP2, BOTTOM, TMP2, asl #2 ++ vld1.32 {d0}, [TMP1] ++ vld1.32 {d1}, [TMP2] ++ vmull.u8 q1, d0, d28 ++ vmlal.u8 q1, d1, d29 ++ mov TMP1, X, asr #16 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ add TMP2, BOTTOM, TMP2, asl #2 ++ vld1.32 {d20}, [TMP1] ++ vld1.32 {d21}, [TMP2] ++ vmull.u8 q11, d20, d28 ++ vmlal.u8 q11, d21, d29 ++ vshr.u16 q15, q12, #8 ++ vadd.u16 q12, q12, q13 ++ vshll.u16 q0, d2, #8 ++ vmlsl.u16 q0, d2, d30 ++ vmlal.u16 q0, d3, d30 ++ vshll.u16 q10, d22, #8 ++ vmlsl.u16 q10, d22, d31 ++ vmlal.u16 q10, d23, d31 ++ mov TMP1, X, asr #16 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ add TMP2, BOTTOM, TMP2, asl #2 ++ vld1.32 {d4}, [TMP1] ++ vld1.32 {d5}, [TMP2] ++ vmull.u8 q3, d4, d28 ++ vmlal.u8 q3, d5, d29 ++ mov TMP1, X, asr #16 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ add TMP2, BOTTOM, TMP2, asl #2 ++ vld1.32 {d16}, [TMP1] ++ vld1.32 {d17}, [TMP2] ++ vmull.u8 q9, d16, d28 ++ vmlal.u8 q9, d17, d29 ++ vshr.u16 q15, q12, #8 ++ vadd.u16 q12, q12, q13 ++ vshll.u16 q2, d6, #8 ++ vmlsl.u16 q2, d6, d30 ++ vmlal.u16 q2, d7, d30 ++ vshll.u16 q8, d18, #8 ++ vmlsl.u16 q8, d18, d31 ++ vmlal.u16 q8, d19, d31 ++ vshrn.u32 d0, q0, #16 ++ vshrn.u32 d1, q10, #16 ++ vshrn.u32 d4, q2, #16 ++ vshrn.u32 d5, q8, #16 ++ vmovn.u16 d0, q0 ++ vmovn.u16 d1, q2 ++ vst1.32 {d0, d1}, [OUT]! ++.endm ++ ++ ++/* ++ * pixman_scaled_bilinear_scanline_8888_8888_SRC (uint32_t * out, ++ * const uint32_t * top, ++ * const uint32_t * bottom, ++ * int wt, ++ * int wb, ++ * pixman_fixed_t x, ++ * pixman_fixed_t ux, ++ * int width) ++ */ ++ ++pixman_asm_function pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon ++ OUT .req r0 ++ TOP .req r1 ++ BOTTOM .req r2 ++ WT .req r3 ++ WB .req r4 ++ X .req r5 ++ UX .req r6 ++ WIDTH .req ip ++ TMP1 .req r3 ++ TMP2 .req r4 ++ ++ mov ip, sp ++ push {r4, r5, r6, r7} ++ ldmia ip, {WB, X, UX, WIDTH} ++ ++ cmp WIDTH, #0 ++ ble 3f ++ vdup.u16 q12, X ++ vdup.u16 q13, UX ++ vdup.u8 d28, WT ++ vdup.u8 d29, WB ++ vadd.u16 d25, d25, d26 ++ vadd.u16 q13, q13, q13 ++ ++ subs WIDTH, WIDTH, #4 ++ blt 1f ++0: ++ bilinear_interpolate_four_pixels ++ subs WIDTH, WIDTH, #4 ++ bge 0b ++1: ++ tst WIDTH, #2 ++ beq 2f ++ bilinear_interpolate_two_pixels ++2: ++ tst WIDTH, #1 ++ beq 3f ++ bilinear_interpolate_last_pixel ++3: ++ pop {r4, r5, r6, r7} ++ bx lr ++ ++ .unreq OUT ++ .unreq TOP ++ .unreq BOTTOM ++ .unreq WT ++ .unreq WB ++ .unreq X ++ .unreq UX ++ .unreq WIDTH ++ .unreq TMP1 ++ .unreq TMP2 ++.endfunc +diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c +index 3e0c0d1..c7c0254 100644 +--- a/pixman/pixman-arm-neon.c ++++ b/pixman/pixman-arm-neon.c +@@ -232,6 +232,47 @@ pixman_blt_neon (uint32_t *src_bits, + } + } + ++void ++pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon (uint32_t * out, ++ const uint32_t * top, ++ const uint32_t * bottom, ++ int wt, ++ int wb, ++ pixman_fixed_t x, ++ pixman_fixed_t ux, ++ int width); ++ ++static force_inline void ++scaled_bilinear_scanline_neon_8888_8888_SRC (uint32_t * dst, ++ const uint32_t * mask, ++ const uint32_t * src_top, ++ const uint32_t * src_bottom, ++ int32_t w, ++ int wt, ++ int wb, ++ pixman_fixed_t vx, ++ pixman_fixed_t unit_x, ++ pixman_fixed_t max_vx, ++ pixman_bool_t zero_src) ++{ ++ pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon (dst, src_top, ++ src_bottom, wt, wb, ++ vx, unit_x, w); ++} ++ ++FAST_BILINEAR_MAINLOOP_COMMON (neon_8888_8888_cover_SRC, ++ scaled_bilinear_scanline_neon_8888_8888_SRC, ++ uint32_t, uint32_t, uint32_t, ++ COVER, FALSE, FALSE) ++FAST_BILINEAR_MAINLOOP_COMMON (neon_8888_8888_pad_SRC, ++ scaled_bilinear_scanline_neon_8888_8888_SRC, ++ uint32_t, uint32_t, uint32_t, ++ PAD, FALSE, FALSE) ++FAST_BILINEAR_MAINLOOP_COMMON (neon_8888_8888_none_SRC, ++ scaled_bilinear_scanline_neon_8888_8888_SRC, ++ uint32_t, uint32_t, uint32_t, ++ NONE, FALSE, FALSE) ++ + static const pixman_fast_path_t arm_neon_fast_paths[] = + { + PIXMAN_STD_FAST_PATH (SRC, r5g6b5, null, r5g6b5, neon_composite_src_0565_0565), +@@ -343,6 +384,10 @@ static const pixman_fast_path_t arm_neon_fast_paths[] = + PIXMAN_ARM_SIMPLE_NEAREST_A8_MASK_FAST_PATH (OVER, r5g6b5, r5g6b5, neon_0565_8_0565), + PIXMAN_ARM_SIMPLE_NEAREST_A8_MASK_FAST_PATH (OVER, b5g6r5, b5g6r5, neon_0565_8_0565), + ++ SIMPLE_BILINEAR_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8, neon_8888_8888), ++ SIMPLE_BILINEAR_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, neon_8888_8888), ++ SIMPLE_BILINEAR_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, neon_8888_8888), ++ + { PIXMAN_OP_NONE }, + }; + +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0011-test-In-image_endian_swap-use-pixman_image_get_forma.patch b/recipes/xorg-lib/pixman-0.21.6/0011-test-In-image_endian_swap-use-pixman_image_get_forma.patch new file mode 100644 index 0000000000..97618606b1 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0011-test-In-image_endian_swap-use-pixman_image_get_forma.patch @@ -0,0 +1,156 @@ +From 84f3c5a71a2de1a96dcf0c7f9ab0a8ee1b1b158f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= +Date: Mon, 7 Mar 2011 13:45:54 -0500 +Subject: [PATCH 11/40] test: In image_endian_swap() use pixman_image_get_format() to get the bpp. + +There is no reason to pass in the bpp as an argument; it can be gotten +directly from the image. +--- + test/affine-test.c | 6 +++--- + test/blitters-test.c | 4 ++-- + test/composite-traps-test.c | 2 +- + test/scaling-test.c | 6 +++--- + test/utils.c | 9 +++++++-- + test/utils.h | 2 +- + 6 files changed, 17 insertions(+), 12 deletions(-) + +diff --git a/test/affine-test.c b/test/affine-test.c +index b7a1fa6..ed8000c 100644 +--- a/test/affine-test.c ++++ b/test/affine-test.c +@@ -95,8 +95,8 @@ test_composite (int testnum, + dst_img = pixman_image_create_bits ( + dst_fmt, dst_width, dst_height, dstbuf, dst_stride); + +- image_endian_swap (src_img, src_bpp * 8); +- image_endian_swap (dst_img, dst_bpp * 8); ++ image_endian_swap (src_img); ++ image_endian_swap (dst_img); + + pixman_transform_init_identity (&transform); + +@@ -251,7 +251,7 @@ test_composite (int testnum, + dstbuf[i] &= 0xFFFFFF; + } + +- image_endian_swap (dst_img, dst_bpp * 8); ++ image_endian_swap (dst_img); + + if (verbose) + { +diff --git a/test/blitters-test.c b/test/blitters-test.c +index 42181ef..63e7cb3 100644 +--- a/test/blitters-test.c ++++ b/test/blitters-test.c +@@ -61,7 +61,7 @@ create_random_image (pixman_format_code_t *allowed_formats, + pixman_image_set_indexed (img, &(y_palette[PIXMAN_FORMAT_BPP (fmt)])); + } + +- image_endian_swap (img, PIXMAN_FORMAT_BPP (fmt)); ++ image_endian_swap (img); + + if (used_fmt) *used_fmt = fmt; + return img; +@@ -101,7 +101,7 @@ free_random_image (uint32_t initcrc, + /* swap endiannes in order to provide identical results on both big + * and litte endian systems + */ +- image_endian_swap (img, PIXMAN_FORMAT_BPP (fmt)); ++ image_endian_swap (img); + crc32 = compute_crc32 (initcrc, data, stride * height); + } + +diff --git a/test/composite-traps-test.c b/test/composite-traps-test.c +index 8f32778..298537d 100644 +--- a/test/composite-traps-test.c ++++ b/test/composite-traps-test.c +@@ -218,7 +218,7 @@ test_composite (int testnum, + dst_bits[i] &= 0xFFFFFF; + } + +- image_endian_swap (dst_img, dst_bpp * 8); ++ image_endian_swap (dst_img); + + if (verbose) + { +diff --git a/test/scaling-test.c b/test/scaling-test.c +index dbb9d39..82370f7 100644 +--- a/test/scaling-test.c ++++ b/test/scaling-test.c +@@ -140,8 +140,8 @@ test_composite (int testnum, + dst_img = pixman_image_create_bits ( + dst_fmt, dst_width, dst_height, dstbuf, dst_stride); + +- image_endian_swap (src_img, src_bpp * 8); +- image_endian_swap (dst_img, dst_bpp * 8); ++ image_endian_swap (src_img); ++ image_endian_swap (dst_img); + + if (lcg_rand_n (4) > 0) + { +@@ -330,7 +330,7 @@ test_composite (int testnum, + dstbuf[i] &= 0xFFFFFF; + } + +- image_endian_swap (dst_img, dst_bpp * 8); ++ image_endian_swap (dst_img); + + if (verbose) + { +diff --git a/test/utils.c b/test/utils.c +index 2f21398..4bf02e1 100644 +--- a/test/utils.c ++++ b/test/utils.c +@@ -133,11 +133,12 @@ compute_crc32 (uint32_t in_crc32, + /* perform endian conversion of pixel data + */ + void +-image_endian_swap (pixman_image_t *img, int bpp) ++image_endian_swap (pixman_image_t *img) + { + int stride = pixman_image_get_stride (img); + uint32_t *data = pixman_image_get_data (img); + int height = pixman_image_get_height (img); ++ int bpp = PIXMAN_FORMAT_BPP (pixman_image_get_format (img)); + int i, j; + + /* swap bytes only on big endian systems */ +@@ -145,10 +146,13 @@ image_endian_swap (pixman_image_t *img, int bpp) + if (*(volatile uint8_t *)&endian_check_var != 0x12) + return; + ++ if (bpp == 8) ++ return; ++ + for (i = 0; i < height; i++) + { + uint8_t *line_data = (uint8_t *)data + stride * i; +- /* swap bytes only for 16, 24 and 32 bpp for now */ ++ + switch (bpp) + { + case 1: +@@ -208,6 +212,7 @@ image_endian_swap (pixman_image_t *img, int bpp) + } + break; + default: ++ assert (FALSE); + break; + } + } +diff --git a/test/utils.h b/test/utils.h +index 9c7bdb1..a5183f7 100644 +--- a/test/utils.h ++++ b/test/utils.h +@@ -60,7 +60,7 @@ compute_crc32 (uint32_t in_crc32, + /* perform endian conversion of pixel data + */ + void +-image_endian_swap (pixman_image_t *img, int bpp); ++image_endian_swap (pixman_image_t *img); + + /* Allocate memory that is bounded by protected pages, + * so that out-of-bounds access will cause segfaults +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0012-test-Do-endian-swapping-of-the-source-and-destinatio.patch b/recipes/xorg-lib/pixman-0.21.6/0012-test-Do-endian-swapping-of-the-source-and-destinatio.patch new file mode 100644 index 0000000000..9fc4cdde07 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0012-test-Do-endian-swapping-of-the-source-and-destinatio.patch @@ -0,0 +1,36 @@ +From 84e361c8e357e26f299213fbeefe64c73447b116 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= +Date: Fri, 4 Mar 2011 15:51:18 -0500 +Subject: [PATCH 12/40] test: Do endian swapping of the source and destination images. + +Otherwise the test fails on big endian. Fix for bug 34767, reported by +Siarhei Siamashka. +--- + test/composite-traps-test.c | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/test/composite-traps-test.c b/test/composite-traps-test.c +index 298537d..cf30281 100644 +--- a/test/composite-traps-test.c ++++ b/test/composite-traps-test.c +@@ -139,6 +139,8 @@ test_composite (int testnum, + pixman_image_set_source_clipping (src_img, 1); + pixman_region_fini (&clip); + } ++ ++ image_endian_swap (src_img); + } + + /* Create destination image */ +@@ -157,6 +159,8 @@ test_composite (int testnum, + + dst_img = pixman_image_create_bits ( + dst_format, dst_width, dst_height, dst_bits, dst_stride); ++ ++ image_endian_swap (dst_img); + } + + /* Create traps */ +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0013-ARM-use-prefetch-in-nearest-scaled-src_0565_0565.patch b/recipes/xorg-lib/pixman-0.21.6/0013-ARM-use-prefetch-in-nearest-scaled-src_0565_0565.patch new file mode 100644 index 0000000000..9d43404898 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0013-ARM-use-prefetch-in-nearest-scaled-src_0565_0565.patch @@ -0,0 +1,77 @@ +From bb3d1b67fd0f42ae00af811c624ea1c44541034d Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Sun, 6 Mar 2011 16:17:12 +0200 +Subject: [PATCH 13/40] ARM: use prefetch in nearest scaled 'src_0565_0565' + +Benchmark on ARM Cortex-A8 r1p3 @500MHz, 32-bit LPDDR @166MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=10020565, dst=10020565, speed=75.02 MPix/s + after: op=1, src=10020565, dst=10020565, speed=73.63 MPix/s + +Benchmark on ARM Cortex-A8 r2p2 @1GHz, 32-bit LPDDR @200MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=10020565, dst=10020565, speed=176.12 MPix/s + after: op=1, src=10020565, dst=10020565, speed=267.50 MPix/s +--- + pixman/pixman-arm-simd-asm.S | 27 +++++++++++++++++++++++++-- + 1 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/pixman/pixman-arm-simd-asm.S b/pixman/pixman-arm-simd-asm.S +index 7567700..dd1366d 100644 +--- a/pixman/pixman-arm-simd-asm.S ++++ b/pixman/pixman-arm-simd-asm.S +@@ -348,6 +348,7 @@ pixman_asm_function pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6 + TMP1 .req r4 + TMP2 .req r5 + VXMASK .req r6 ++ PF_OFFS .req r7 + + ldr UNIT_X, [sp] + push {r4, r5, r6, r7} +@@ -366,12 +367,33 @@ pixman_asm_function pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6 + strh TMP2, [DST], #2 + .endm + ++ /* ++ * stop prefetch before reaching the end of scanline (a good behaving ++ * value selected based on some benchmarks with short scanlines) ++ */ ++ #define PREFETCH_BRAKING_DISTANCE 32 ++ + /* now do the scaling */ + and TMP1, VXMASK, VX, lsr #15 + add VX, VX, UNIT_X +- subs W, #4 ++ subs W, #(8 + PREFETCH_BRAKING_DISTANCE) ++ blt 2f ++ /* set prefetch distance to 80 pixels ahead */ ++ add PF_OFFS, VX, UNIT_X, lsl #6 ++ add PF_OFFS, PF_OFFS, UNIT_X, lsl #4 ++1: /* main loop, process 8 pixels per iteration with prefetch */ ++ subs W, W, #8 ++ add PF_OFFS, UNIT_X, lsl #3 ++ scale_2_pixels ++ scale_2_pixels ++ scale_2_pixels ++ scale_2_pixels ++ pld [SRC, PF_OFFS, lsr #15] ++ bge 1b ++2: ++ subs W, #(4 - 8 - PREFETCH_BRAKING_DISTANCE) + blt 2f +-1: /* main loop, process 4 pixels per iteration */ ++1: /* process the remaining pixels */ + scale_2_pixels + scale_2_pixels + subs W, W, #4 +@@ -394,6 +416,7 @@ pixman_asm_function pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6 + .unreq TMP1 + .unreq TMP2 + .unreq VXMASK ++ .unreq PF_OFFS + /* return */ + pop {r4, r5, r6, r7} + bx lr +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0014-ARM-common-macro-for-nearest-scaling-fast-paths.patch b/recipes/xorg-lib/pixman-0.21.6/0014-ARM-common-macro-for-nearest-scaling-fast-paths.patch new file mode 100644 index 0000000000..115d5170c6 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0014-ARM-common-macro-for-nearest-scaling-fast-paths.patch @@ -0,0 +1,131 @@ +From f3e17872f5522e25da8e32de83e62bee8cc198d7 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Mon, 7 Mar 2011 03:10:43 +0200 +Subject: [PATCH 14/40] ARM: common macro for nearest scaling fast paths + +The code of nearest scaled 'src_0565_0565' function was generalized +and moved to a common macro, so that it can be reused for other +fast paths. +--- + pixman/pixman-arm-simd-asm.S | 60 +++++++++++++++++++++++++---------------- + 1 files changed, 36 insertions(+), 24 deletions(-) + +diff --git a/pixman/pixman-arm-simd-asm.S b/pixman/pixman-arm-simd-asm.S +index dd1366d..a9775e2 100644 +--- a/pixman/pixman-arm-simd-asm.S ++++ b/pixman/pixman-arm-simd-asm.S +@@ -331,15 +331,29 @@ pixman_asm_function pixman_composite_over_n_8_8888_asm_armv6 + .endfunc + + /* +- * Note: This function is only using armv4t instructions (not even armv6), ++ * Note: This code is only using armv5te instructions (not even armv6), + * but is scheduled for ARM Cortex-A8 pipeline. So it might need to + * be split into a few variants, tuned for each microarchitecture. + * + * TODO: In order to get good performance on ARM9/ARM11 cores (which don't + * have efficient write combining), it needs to be changed to use 16-byte + * aligned writes using STM instruction. ++ * ++ * Nearest scanline scaler macro template uses the following arguments: ++ * fname - name of the function to generate ++ * bpp_shift - (1 << bpp_shift) is the size of pixel in bytes ++ * t - type suffix for LDR/STR instructions ++ * prefetch_distance - prefetch in the source image by that many ++ * pixels ahead ++ * prefetch_braking_distance - stop prefetching when that many pixels are ++ * remaining before the end of scanline + */ +-pixman_asm_function pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6 ++ ++.macro generate_nearest_scanline_func fname, bpp_shift, t, \ ++ prefetch_distance, \ ++ prefetch_braking_distance ++ ++pixman_asm_function fname + W .req r0 + DST .req r1 + SRC .req r2 +@@ -352,35 +366,29 @@ pixman_asm_function pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6 + + ldr UNIT_X, [sp] + push {r4, r5, r6, r7} +- mvn VXMASK, #1 ++ mvn VXMASK, #((1 << bpp_shift) - 1) + + /* define helper macro */ + .macro scale_2_pixels +- ldrh TMP1, [SRC, TMP1] +- and TMP2, VXMASK, VX, lsr #15 ++ ldr&t TMP1, [SRC, TMP1] ++ and TMP2, VXMASK, VX, lsr #(16 - bpp_shift) + add VX, VX, UNIT_X +- strh TMP1, [DST], #2 ++ str&t TMP1, [DST], #(1 << bpp_shift) + +- ldrh TMP2, [SRC, TMP2] +- and TMP1, VXMASK, VX, lsr #15 ++ ldr&t TMP2, [SRC, TMP2] ++ and TMP1, VXMASK, VX, lsr #(16 - bpp_shift) + add VX, VX, UNIT_X +- strh TMP2, [DST], #2 ++ str&t TMP2, [DST], #(1 << bpp_shift) + .endm + +- /* +- * stop prefetch before reaching the end of scanline (a good behaving +- * value selected based on some benchmarks with short scanlines) +- */ +- #define PREFETCH_BRAKING_DISTANCE 32 +- + /* now do the scaling */ +- and TMP1, VXMASK, VX, lsr #15 ++ and TMP1, VXMASK, VX, lsr #(16 - bpp_shift) + add VX, VX, UNIT_X +- subs W, #(8 + PREFETCH_BRAKING_DISTANCE) ++ subs W, W, #(8 + prefetch_braking_distance) + blt 2f +- /* set prefetch distance to 80 pixels ahead */ +- add PF_OFFS, VX, UNIT_X, lsl #6 +- add PF_OFFS, PF_OFFS, UNIT_X, lsl #4 ++ /* calculate prefetch offset */ ++ mov PF_OFFS, #prefetch_distance ++ mla PF_OFFS, UNIT_X, PF_OFFS, VX + 1: /* main loop, process 8 pixels per iteration with prefetch */ + subs W, W, #8 + add PF_OFFS, UNIT_X, lsl #3 +@@ -388,10 +396,10 @@ pixman_asm_function pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6 + scale_2_pixels + scale_2_pixels + scale_2_pixels +- pld [SRC, PF_OFFS, lsr #15] ++ pld [SRC, PF_OFFS, lsr #(16 - bpp_shift)] + bge 1b + 2: +- subs W, #(4 - 8 - PREFETCH_BRAKING_DISTANCE) ++ subs W, W, #(4 - 8 - prefetch_braking_distance) + blt 2f + 1: /* process the remaining pixels */ + scale_2_pixels +@@ -404,8 +412,8 @@ pixman_asm_function pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6 + scale_2_pixels + 2: + tst W, #1 +- ldrneh TMP1, [SRC, TMP1] +- strneh TMP1, [DST], #2 ++ ldrne&t TMP1, [SRC, TMP1] ++ strne&t TMP1, [DST] + /* cleanup helper macro */ + .purgem scale_2_pixels + .unreq DST +@@ -421,3 +429,7 @@ pixman_asm_function pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6 + pop {r4, r5, r6, r7} + bx lr + .endfunc ++.endm ++ ++generate_nearest_scanline_func \ ++ pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6, 1, h, 80, 32 +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0015-ARM-assembly-optimized-nearest-scaled-src_8888_8888.patch b/recipes/xorg-lib/pixman-0.21.6/0015-ARM-assembly-optimized-nearest-scaled-src_8888_8888.patch new file mode 100644 index 0000000000..cc3a68f06c --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0015-ARM-assembly-optimized-nearest-scaled-src_8888_8888.patch @@ -0,0 +1,60 @@ +From 5921c17639fe5fdc595c850e3347281c1c8746ba Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Sun, 6 Mar 2011 22:16:32 +0200 +Subject: [PATCH 15/40] ARM: assembly optimized nearest scaled 'src_8888_8888' + +Benchmark on ARM Cortex-A8 r1p3 @500MHz, 32-bit LPDDR @166MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=20028888, dst=20028888, speed=44.36 MPix/s + after: op=1, src=20028888, dst=20028888, speed=39.79 MPix/s + +Benchmark on ARM Cortex-A8 r2p2 @1GHz, 32-bit LPDDR @200MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=20028888, dst=20028888, speed=102.36 MPix/s + after: op=1, src=20028888, dst=20028888, speed=163.12 MPix/s +--- + pixman/pixman-arm-simd-asm.S | 3 +++ + pixman/pixman-arm-simd.c | 9 +++++++++ + 2 files changed, 12 insertions(+), 0 deletions(-) + +diff --git a/pixman/pixman-arm-simd-asm.S b/pixman/pixman-arm-simd-asm.S +index a9775e2..858c690 100644 +--- a/pixman/pixman-arm-simd-asm.S ++++ b/pixman/pixman-arm-simd-asm.S +@@ -433,3 +433,6 @@ pixman_asm_function fname + + generate_nearest_scanline_func \ + pixman_scaled_nearest_scanline_0565_0565_SRC_asm_armv6, 1, h, 80, 32 ++ ++generate_nearest_scanline_func \ ++ pixman_scaled_nearest_scanline_8888_8888_SRC_asm_armv6, 2, , 48, 32 +diff --git a/pixman/pixman-arm-simd.c b/pixman/pixman-arm-simd.c +index 6bbc109..a66f8df 100644 +--- a/pixman/pixman-arm-simd.c ++++ b/pixman/pixman-arm-simd.c +@@ -389,6 +389,8 @@ PIXMAN_ARM_BIND_FAST_PATH_N_MASK_DST (SKIP_ZERO_SRC, armv6, over_n_8_8888, + + PIXMAN_ARM_BIND_SCALED_NEAREST_SRC_DST (armv6, 0565_0565, SRC, + uint16_t, uint16_t) ++PIXMAN_ARM_BIND_SCALED_NEAREST_SRC_DST (armv6, 8888_8888, SRC, ++ uint32_t, uint32_t) + + static const pixman_fast_path_t arm_simd_fast_paths[] = + { +@@ -411,6 +413,13 @@ static const pixman_fast_path_t arm_simd_fast_paths[] = + PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, r5g6b5, r5g6b5, armv6_0565_0565), + PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, b5g6r5, b5g6r5, armv6_0565_0565), + ++ PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8, armv6_8888_8888), ++ PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, armv6_8888_8888), ++ PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, armv6_8888_8888), ++ PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, a8b8g8r8, armv6_8888_8888), ++ PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, x8b8g8r8, armv6_8888_8888), ++ PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, x8b8g8r8, x8b8g8r8, armv6_8888_8888), ++ + { PIXMAN_OP_NONE }, + }; + +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0016-ARM-new-bilinear-fast-path-template-macro-in-pixman-.patch b/recipes/xorg-lib/pixman-0.21.6/0016-ARM-new-bilinear-fast-path-template-macro-in-pixman-.patch new file mode 100644 index 0000000000..d8559b0c61 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0016-ARM-new-bilinear-fast-path-template-macro-in-pixman-.patch @@ -0,0 +1,130 @@ +From 66f4ee1b3bccf4516433d61dbf2035551a712fa2 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Wed, 9 Mar 2011 10:59:46 +0200 +Subject: [PATCH 16/40] ARM: new bilinear fast path template macro in 'pixman-arm-common.h' + +It can be reused in different ARM NEON bilinear scaling fast path functions. +--- + pixman/pixman-arm-common.h | 45 ++++++++++++++++++++++++++++++++++++++++++++ + pixman/pixman-arm-neon.c | 44 ++---------------------------------------- + 2 files changed, 48 insertions(+), 41 deletions(-) + +diff --git a/pixman/pixman-arm-common.h b/pixman/pixman-arm-common.h +index 9b1322b..c3bf986 100644 +--- a/pixman/pixman-arm-common.h ++++ b/pixman/pixman-arm-common.h +@@ -361,4 +361,49 @@ FAST_NEAREST_MAINLOOP_COMMON (cputype##_##name##_pad_##op, \ + SIMPLE_NEAREST_A8_MASK_FAST_PATH_NONE (op,s,d,func), \ + SIMPLE_NEAREST_A8_MASK_FAST_PATH_PAD (op,s,d,func) + ++/*****************************************************************************/ ++ ++#define PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST(flags, cputype, name, op, \ ++ src_type, dst_type) \ ++void \ ++pixman_scaled_bilinear_scanline_##name##_##op##_asm_##cputype ( \ ++ dst_type * dst, \ ++ const src_type * top, \ ++ const src_type * bottom, \ ++ int wt, \ ++ int wb, \ ++ pixman_fixed_t x, \ ++ pixman_fixed_t ux, \ ++ int width); \ ++ \ ++static force_inline void \ ++scaled_bilinear_scanline_##cputype##_##name##_##op ( \ ++ dst_type * dst, \ ++ const uint32_t * mask, \ ++ const src_type * src_top, \ ++ const src_type * src_bottom, \ ++ int32_t w, \ ++ int wt, \ ++ int wb, \ ++ pixman_fixed_t vx, \ ++ pixman_fixed_t unit_x, \ ++ pixman_fixed_t max_vx, \ ++ pixman_bool_t zero_src) \ ++{ \ ++ if ((flags & SKIP_ZERO_SRC) && zero_src) \ ++ return; \ ++ pixman_scaled_bilinear_scanline_##name##_##op##_asm_##cputype ( \ ++ dst, src_top, src_bottom, wt, wb, vx, unit_x, w); \ ++} \ ++ \ ++FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_cover_##op, \ ++ scaled_bilinear_scanline_##cputype##_##name##_##op, \ ++ src_type, uint32_t, dst_type, COVER, FALSE, FALSE) \ ++FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_none_##op, \ ++ scaled_bilinear_scanline_##cputype##_##name##_##op, \ ++ src_type, uint32_t, dst_type, NONE, FALSE, FALSE) \ ++FAST_BILINEAR_MAINLOOP_COMMON (cputype##_##name##_pad_##op, \ ++ scaled_bilinear_scanline_##cputype##_##name##_##op, \ ++ src_type, uint32_t, dst_type, PAD, FALSE, FALSE) ++ + #endif +diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c +index c7c0254..98ad5f2 100644 +--- a/pixman/pixman-arm-neon.c ++++ b/pixman/pixman-arm-neon.c +@@ -127,6 +127,9 @@ PIXMAN_ARM_BIND_SCALED_NEAREST_SRC_A8_DST (SKIP_ZERO_SRC, neon, 8888_8_0565, + PIXMAN_ARM_BIND_SCALED_NEAREST_SRC_A8_DST (SKIP_ZERO_SRC, neon, 0565_8_0565, + OVER, uint16_t, uint16_t) + ++PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 8888_8888, SRC, ++ uint32_t, uint32_t) ++ + void + pixman_composite_src_n_8_asm_neon (int32_t w, + int32_t h, +@@ -232,47 +235,6 @@ pixman_blt_neon (uint32_t *src_bits, + } + } + +-void +-pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon (uint32_t * out, +- const uint32_t * top, +- const uint32_t * bottom, +- int wt, +- int wb, +- pixman_fixed_t x, +- pixman_fixed_t ux, +- int width); +- +-static force_inline void +-scaled_bilinear_scanline_neon_8888_8888_SRC (uint32_t * dst, +- const uint32_t * mask, +- const uint32_t * src_top, +- const uint32_t * src_bottom, +- int32_t w, +- int wt, +- int wb, +- pixman_fixed_t vx, +- pixman_fixed_t unit_x, +- pixman_fixed_t max_vx, +- pixman_bool_t zero_src) +-{ +- pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon (dst, src_top, +- src_bottom, wt, wb, +- vx, unit_x, w); +-} +- +-FAST_BILINEAR_MAINLOOP_COMMON (neon_8888_8888_cover_SRC, +- scaled_bilinear_scanline_neon_8888_8888_SRC, +- uint32_t, uint32_t, uint32_t, +- COVER, FALSE, FALSE) +-FAST_BILINEAR_MAINLOOP_COMMON (neon_8888_8888_pad_SRC, +- scaled_bilinear_scanline_neon_8888_8888_SRC, +- uint32_t, uint32_t, uint32_t, +- PAD, FALSE, FALSE) +-FAST_BILINEAR_MAINLOOP_COMMON (neon_8888_8888_none_SRC, +- scaled_bilinear_scanline_neon_8888_8888_SRC, +- uint32_t, uint32_t, uint32_t, +- NONE, FALSE, FALSE) +- + static const pixman_fast_path_t arm_neon_fast_paths[] = + { + PIXMAN_STD_FAST_PATH (SRC, r5g6b5, null, r5g6b5, neon_composite_src_0565_0565), +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0017-ARM-NEON-common-macro-template-for-bilinear-scanline.patch b/recipes/xorg-lib/pixman-0.21.6/0017-ARM-NEON-common-macro-template-for-bilinear-scanline.patch new file mode 100644 index 0000000000..6efc40f6cb --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0017-ARM-NEON-common-macro-template-for-bilinear-scanline.patch @@ -0,0 +1,271 @@ +From 34098dba6763afd3636a14f9c2a079ab08f23b2d Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Wed, 9 Mar 2011 11:34:15 +0200 +Subject: [PATCH 17/40] ARM: NEON: common macro template for bilinear scanline scalers + +This allows to generate bilinear scanline scaling functions targeting +various source and destination color formats. Right now a8r8g8b8/x8r8g8b8 +and r5g6b5 color formats are supported. More formats can be added if needed. +--- + pixman/pixman-arm-neon-asm.S | 222 ++++++++++++++++++++++++++++++++++++++++++ + pixman/pixman-arm-neon-asm.h | 17 +++ + 2 files changed, 239 insertions(+), 0 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index c168e10..f3784f5 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2588,3 +2588,225 @@ pixman_asm_function pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon + .unreq TMP1 + .unreq TMP2 + .endfunc ++ ++.purgem bilinear_interpolate_last_pixel ++.purgem bilinear_interpolate_two_pixels ++.purgem bilinear_interpolate_four_pixels ++ ++/* ++ * Bilinear scaling support code which tries to provide pixel fetching, color ++ * format conversion, and interpolation as separate macros which can be used ++ * as the basic building blocks for constructing bilinear scanline functions. ++ */ ++ ++.macro bilinear_load_8888 reg1, reg2, tmp ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP2, asl #2 ++ add TMP2, BOTTOM, TMP2, asl #2 ++ vld1.32 {reg1}, [TMP1] ++ vld1.32 {reg2}, [TMP2] ++.endm ++ ++.macro bilinear_load_0565 reg1, reg2, tmp ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP2, asl #1 ++ add TMP2, BOTTOM, TMP2, asl #1 ++ vld1.32 {reg2[0]}, [TMP1] ++ vld1.32 {reg2[1]}, [TMP2] ++ convert_four_0565_to_x888_packed reg2, reg1, reg2, tmp ++.endm ++ ++.macro bilinear_store_8888 numpix, tmp1, tmp2 ++.if numpix == 4 ++ vst1.32 {d0, d1}, [OUT]! ++.elseif numpix == 2 ++ vst1.32 {d0}, [OUT]! ++.elseif numpix == 1 ++ vst1.32 {d0[0]}, [OUT, :32]! ++.else ++ .error bilinear_store_8888 numpix is unsupported ++.endif ++.endm ++ ++.macro bilinear_store_0565 numpix, tmp1, tmp2 ++ vuzp.u8 d0, d1 ++ vuzp.u8 d2, d3 ++ vuzp.u8 d1, d3 ++ vuzp.u8 d0, d2 ++ convert_8888_to_0565 d2, d1, d0, q1, tmp1, tmp2 ++.if numpix == 4 ++ vst1.16 {d2}, [OUT]! ++.elseif numpix == 2 ++ vst1.32 {d2[0]}, [OUT]! ++.elseif numpix == 1 ++ vst1.16 {d2[0]}, [OUT]! ++.else ++ .error bilinear_store_0565 numpix is unsupported ++.endif ++.endm ++ ++.macro bilinear_interpolate_last_pixel src_fmt, dst_fmt ++ bilinear_load_&src_fmt d0, d1, d2 ++ vmull.u8 q1, d0, d28 ++ vmlal.u8 q1, d1, d29 ++ vshr.u16 d30, d24, #8 ++ /* 4 cycles bubble */ ++ vshll.u16 q0, d2, #8 ++ vmlsl.u16 q0, d2, d30 ++ vmlal.u16 q0, d3, d30 ++ /* 5 cycles bubble */ ++ vshrn.u32 d0, q0, #16 ++ /* 3 cycles bubble */ ++ vmovn.u16 d0, q0 ++ /* 1 cycle bubble */ ++ bilinear_store_&dst_fmt 1, q2, q3 ++.endm ++ ++.macro bilinear_interpolate_two_pixels src_fmt, dst_fmt ++ bilinear_load_&src_fmt d0, d1, d2 ++ vmull.u8 q1, d0, d28 ++ vmlal.u8 q1, d1, d29 ++ bilinear_load_&src_fmt d20, d21, d22 ++ vmull.u8 q11, d20, d28 ++ vmlal.u8 q11, d21, d29 ++ vshr.u16 q15, q12, #8 ++ vadd.u16 q12, q12, q13 ++ vshll.u16 q0, d2, #8 ++ vmlsl.u16 q0, d2, d30 ++ vmlal.u16 q0, d3, d30 ++ vshll.u16 q10, d22, #8 ++ vmlsl.u16 q10, d22, d31 ++ vmlal.u16 q10, d23, d31 ++ vshrn.u32 d30, q0, #16 ++ vshrn.u32 d31, q10, #16 ++ vmovn.u16 d0, q15 ++ bilinear_store_&dst_fmt 2, q2, q3 ++.endm ++ ++.macro bilinear_interpolate_four_pixels src_fmt, dst_fmt ++ bilinear_load_&src_fmt d0, d1, d2 ++ vmull.u8 q1, d0, d28 ++ vmlal.u8 q1, d1, d29 ++ bilinear_load_&src_fmt d20, d21, d22 ++ vmull.u8 q11, d20, d28 ++ vmlal.u8 q11, d21, d29 ++ bilinear_load_&src_fmt d4, d5, d6 ++ vmull.u8 q3, d4, d28 ++ vmlal.u8 q3, d5, d29 ++ bilinear_load_&src_fmt d16, d17, d18 ++ vmull.u8 q9, d16, d28 ++ vmlal.u8 q9, d17, d29 ++ pld [TMP1, PF_OFFS] ++ vshr.u16 q15, q12, #8 ++ vadd.u16 q12, q12, q13 ++ vshll.u16 q0, d2, #8 ++ vmlsl.u16 q0, d2, d30 ++ vmlal.u16 q0, d3, d30 ++ vshll.u16 q10, d22, #8 ++ vmlsl.u16 q10, d22, d31 ++ vmlal.u16 q10, d23, d31 ++ vshr.u16 q15, q12, #8 ++ vshll.u16 q2, d6, #8 ++ vmlsl.u16 q2, d6, d30 ++ vmlal.u16 q2, d7, d30 ++ vshll.u16 q8, d18, #8 ++ pld [TMP2, PF_OFFS] ++ vmlsl.u16 q8, d18, d31 ++ vmlal.u16 q8, d19, d31 ++ vadd.u16 q12, q12, q13 ++ vshrn.u32 d0, q0, #16 ++ vshrn.u32 d1, q10, #16 ++ vshrn.u32 d4, q2, #16 ++ vshrn.u32 d5, q8, #16 ++ vmovn.u16 d0, q0 ++ vmovn.u16 d1, q2 ++ bilinear_store_&dst_fmt 4, q2, q3 ++.endm ++ ++/* ++ * Main template macro for generating NEON optimized bilinear scanline ++ * functions. ++ * ++ * TODO: use software pipelining and aligned writes to the destination buffer ++ * in order to improve performance ++ * ++ * Bilinear scanline scaler macro template uses the following arguments: ++ * fname - name of the function to generate ++ * src_fmt - source color format (8888 or 0565) ++ * dst_fmt - destination color format (8888 or 0565) ++ * bpp_shift - (1 << bpp_shift) is the size of source pixel in bytes ++ * prefetch_distance - prefetch in the source image by that many ++ * pixels ahead ++ */ ++ ++.macro generate_bilinear_scanline_func fname, src_fmt, dst_fmt, \ ++ bpp_shift, prefetch_distance ++ ++pixman_asm_function fname ++ OUT .req r0 ++ TOP .req r1 ++ BOTTOM .req r2 ++ WT .req r3 ++ WB .req r4 ++ X .req r5 ++ UX .req r6 ++ WIDTH .req ip ++ TMP1 .req r3 ++ TMP2 .req r4 ++ PF_OFFS .req r7 ++ TMP3 .req r8 ++ TMP4 .req r9 ++ ++ mov ip, sp ++ push {r4, r5, r6, r7, r8, r9} ++ mov PF_OFFS, #prefetch_distance ++ ldmia ip, {WB, X, UX, WIDTH} ++ mul PF_OFFS, PF_OFFS, UX ++ ++ cmp WIDTH, #0 ++ ble 3f ++ ++ vdup.u16 q12, X ++ vdup.u16 q13, UX ++ vdup.u8 d28, WT ++ vdup.u8 d29, WB ++ vadd.u16 d25, d25, d26 ++ vadd.u16 q13, q13, q13 ++ ++ subs WIDTH, WIDTH, #4 ++ blt 1f ++ mov PF_OFFS, PF_OFFS, asr #(16 - bpp_shift) ++0: ++ bilinear_interpolate_four_pixels src_fmt, dst_fmt ++ subs WIDTH, WIDTH, #4 ++ bge 0b ++1: ++ tst WIDTH, #2 ++ beq 2f ++ bilinear_interpolate_two_pixels src_fmt, dst_fmt ++2: ++ tst WIDTH, #1 ++ beq 3f ++ bilinear_interpolate_last_pixel src_fmt, dst_fmt ++3: ++ pop {r4, r5, r6, r7, r8, r9} ++ bx lr ++ ++ .unreq OUT ++ .unreq TOP ++ .unreq BOTTOM ++ .unreq WT ++ .unreq WB ++ .unreq X ++ .unreq UX ++ .unreq WIDTH ++ .unreq TMP1 ++ .unreq TMP2 ++ .unreq PF_OFFS ++ .unreq TMP3 ++ .unreq TMP4 ++.endfunc ++ ++.endm +diff --git a/pixman/pixman-arm-neon-asm.h b/pixman/pixman-arm-neon-asm.h +index 24fa361..97adc6a 100644 +--- a/pixman/pixman-arm-neon-asm.h ++++ b/pixman/pixman-arm-neon-asm.h +@@ -1158,3 +1158,20 @@ fname: + vsri.u16 out, tmp1, #5 + vsri.u16 out, tmp2, #11 + .endm ++ ++/* ++ * Conversion of four r5g6b5 pixels (in) to four x8r8g8b8 pixels ++ * returned in (out0, out1) registers pair. Requires one temporary ++ * 64-bit register (tmp). 'out1' and 'in' may overlap, the original ++ * value from 'in' is lost ++ */ ++.macro convert_four_0565_to_x888_packed in, out0, out1, tmp ++ vshl.u16 out0, in, #5 /* G top 6 bits */ ++ vshl.u16 tmp, in, #11 /* B top 5 bits */ ++ vsri.u16 in, in, #5 /* R is ready in top bits */ ++ vsri.u16 out0, out0, #6 /* G is ready in top bits */ ++ vsri.u16 tmp, tmp, #5 /* B is ready in top bits */ ++ vshr.u16 out1, in, #8 /* R is in place */ ++ vsri.u16 out0, tmp, #8 /* G & B is in place */ ++ vzip.u16 out0, out1 /* everything is in place */ ++.endm +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0018-ARM-use-common-macro-template-for-bilinear-scaled-sr.patch b/recipes/xorg-lib/pixman-0.21.6/0018-ARM-use-common-macro-template-for-bilinear-scaled-sr.patch new file mode 100644 index 0000000000..245e536716 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0018-ARM-use-common-macro-template-for-bilinear-scaled-sr.patch @@ -0,0 +1,226 @@ +From 11a0c5badbc59ce967707ef836313cc98f8aec4e Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Wed, 9 Mar 2011 11:46:48 +0200 +Subject: [PATCH 18/40] ARM: use common macro template for bilinear scaled 'src_8888_8888' + +This is a cleanup for old and now duplicated code. The performance improvement +is mostly coming from the enabled use of software prefetch, but instructions +scheduling is also slightly better. + +Benchmark on ARM Cortex-A8 r2p2 @1GHz, 32-bit LPDDR @200MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=20028888, dst=20028888, speed=53.24 MPix/s + after: op=1, src=20028888, dst=20028888, speed=74.36 MPix/s +--- + pixman/pixman-arm-neon-asm.S | 191 +----------------------------------------- + 1 files changed, 3 insertions(+), 188 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index f3784f5..52dc444 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2405,194 +2405,6 @@ generate_composite_function_nearest_scanline \ + fname: + .endm + +-.macro bilinear_interpolate_last_pixel +- mov TMP1, X, asr #16 +- mov TMP2, X, asr #16 +- add TMP1, TOP, TMP1, asl #2 +- add TMP2, BOTTOM, TMP2, asl #2 +- vld1.32 {d0}, [TMP1] +- vshr.u16 d30, d24, #8 +- vld1.32 {d1}, [TMP2] +- vmull.u8 q1, d0, d28 +- vmlal.u8 q1, d1, d29 +- /* 5 cycles bubble */ +- vshll.u16 q0, d2, #8 +- vmlsl.u16 q0, d2, d30 +- vmlal.u16 q0, d3, d30 +- /* 5 cycles bubble */ +- vshrn.u32 d0, q0, #16 +- /* 3 cycles bubble */ +- vmovn.u16 d0, q0 +- /* 1 cycle bubble */ +- vst1.32 {d0[0]}, [OUT, :32]! +-.endm +- +-.macro bilinear_interpolate_two_pixels +- mov TMP1, X, asr #16 +- mov TMP2, X, asr #16 +- add X, X, UX +- add TMP1, TOP, TMP1, asl #2 +- add TMP2, BOTTOM, TMP2, asl #2 +- vld1.32 {d0}, [TMP1] +- vld1.32 {d1}, [TMP2] +- vmull.u8 q1, d0, d28 +- vmlal.u8 q1, d1, d29 +- mov TMP1, X, asr #16 +- mov TMP2, X, asr #16 +- add X, X, UX +- add TMP1, TOP, TMP1, asl #2 +- add TMP2, BOTTOM, TMP2, asl #2 +- vld1.32 {d20}, [TMP1] +- vld1.32 {d21}, [TMP2] +- vmull.u8 q11, d20, d28 +- vmlal.u8 q11, d21, d29 +- vshr.u16 q15, q12, #8 +- vadd.u16 q12, q12, q13 +- vshll.u16 q0, d2, #8 +- vmlsl.u16 q0, d2, d30 +- vmlal.u16 q0, d3, d30 +- vshll.u16 q10, d22, #8 +- vmlsl.u16 q10, d22, d31 +- vmlal.u16 q10, d23, d31 +- vshrn.u32 d30, q0, #16 +- vshrn.u32 d31, q10, #16 +- vmovn.u16 d0, q15 +- vst1.32 {d0}, [OUT]! +-.endm +- +-.macro bilinear_interpolate_four_pixels +- mov TMP1, X, asr #16 +- mov TMP2, X, asr #16 +- add X, X, UX +- add TMP1, TOP, TMP1, asl #2 +- add TMP2, BOTTOM, TMP2, asl #2 +- vld1.32 {d0}, [TMP1] +- vld1.32 {d1}, [TMP2] +- vmull.u8 q1, d0, d28 +- vmlal.u8 q1, d1, d29 +- mov TMP1, X, asr #16 +- mov TMP2, X, asr #16 +- add X, X, UX +- add TMP1, TOP, TMP1, asl #2 +- add TMP2, BOTTOM, TMP2, asl #2 +- vld1.32 {d20}, [TMP1] +- vld1.32 {d21}, [TMP2] +- vmull.u8 q11, d20, d28 +- vmlal.u8 q11, d21, d29 +- vshr.u16 q15, q12, #8 +- vadd.u16 q12, q12, q13 +- vshll.u16 q0, d2, #8 +- vmlsl.u16 q0, d2, d30 +- vmlal.u16 q0, d3, d30 +- vshll.u16 q10, d22, #8 +- vmlsl.u16 q10, d22, d31 +- vmlal.u16 q10, d23, d31 +- mov TMP1, X, asr #16 +- mov TMP2, X, asr #16 +- add X, X, UX +- add TMP1, TOP, TMP1, asl #2 +- add TMP2, BOTTOM, TMP2, asl #2 +- vld1.32 {d4}, [TMP1] +- vld1.32 {d5}, [TMP2] +- vmull.u8 q3, d4, d28 +- vmlal.u8 q3, d5, d29 +- mov TMP1, X, asr #16 +- mov TMP2, X, asr #16 +- add X, X, UX +- add TMP1, TOP, TMP1, asl #2 +- add TMP2, BOTTOM, TMP2, asl #2 +- vld1.32 {d16}, [TMP1] +- vld1.32 {d17}, [TMP2] +- vmull.u8 q9, d16, d28 +- vmlal.u8 q9, d17, d29 +- vshr.u16 q15, q12, #8 +- vadd.u16 q12, q12, q13 +- vshll.u16 q2, d6, #8 +- vmlsl.u16 q2, d6, d30 +- vmlal.u16 q2, d7, d30 +- vshll.u16 q8, d18, #8 +- vmlsl.u16 q8, d18, d31 +- vmlal.u16 q8, d19, d31 +- vshrn.u32 d0, q0, #16 +- vshrn.u32 d1, q10, #16 +- vshrn.u32 d4, q2, #16 +- vshrn.u32 d5, q8, #16 +- vmovn.u16 d0, q0 +- vmovn.u16 d1, q2 +- vst1.32 {d0, d1}, [OUT]! +-.endm +- +- +-/* +- * pixman_scaled_bilinear_scanline_8888_8888_SRC (uint32_t * out, +- * const uint32_t * top, +- * const uint32_t * bottom, +- * int wt, +- * int wb, +- * pixman_fixed_t x, +- * pixman_fixed_t ux, +- * int width) +- */ +- +-pixman_asm_function pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon +- OUT .req r0 +- TOP .req r1 +- BOTTOM .req r2 +- WT .req r3 +- WB .req r4 +- X .req r5 +- UX .req r6 +- WIDTH .req ip +- TMP1 .req r3 +- TMP2 .req r4 +- +- mov ip, sp +- push {r4, r5, r6, r7} +- ldmia ip, {WB, X, UX, WIDTH} +- +- cmp WIDTH, #0 +- ble 3f +- vdup.u16 q12, X +- vdup.u16 q13, UX +- vdup.u8 d28, WT +- vdup.u8 d29, WB +- vadd.u16 d25, d25, d26 +- vadd.u16 q13, q13, q13 +- +- subs WIDTH, WIDTH, #4 +- blt 1f +-0: +- bilinear_interpolate_four_pixels +- subs WIDTH, WIDTH, #4 +- bge 0b +-1: +- tst WIDTH, #2 +- beq 2f +- bilinear_interpolate_two_pixels +-2: +- tst WIDTH, #1 +- beq 3f +- bilinear_interpolate_last_pixel +-3: +- pop {r4, r5, r6, r7} +- bx lr +- +- .unreq OUT +- .unreq TOP +- .unreq BOTTOM +- .unreq WT +- .unreq WB +- .unreq X +- .unreq UX +- .unreq WIDTH +- .unreq TMP1 +- .unreq TMP2 +-.endfunc +- +-.purgem bilinear_interpolate_last_pixel +-.purgem bilinear_interpolate_two_pixels +-.purgem bilinear_interpolate_four_pixels +- + /* + * Bilinear scaling support code which tries to provide pixel fetching, color + * format conversion, and interpolation as separate macros which can be used +@@ -2810,3 +2622,6 @@ pixman_asm_function fname + .endfunc + + .endm ++ ++generate_bilinear_scanline_func \ ++ pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon, 8888, 8888, 2, 28 +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0019-ARM-NEON-optimization-for-bilinear-scaled-src_8888_0.patch b/recipes/xorg-lib/pixman-0.21.6/0019-ARM-NEON-optimization-for-bilinear-scaled-src_8888_0.patch new file mode 100644 index 0000000000..cc1769404f --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0019-ARM-NEON-optimization-for-bilinear-scaled-src_8888_0.patch @@ -0,0 +1,51 @@ +From 2ee27e7d79637da9173ee1bf3423e5a81534ccb4 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Wed, 9 Mar 2011 11:53:04 +0200 +Subject: [PATCH 19/40] ARM: NEON optimization for bilinear scaled 'src_8888_0565' + +Benchmark on ARM Cortex-A8 r2p2 @1GHz, 32-bit LPDDR @200MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=20028888, dst=10020565, speed=6.56 MPix/s + after: op=1, src=20028888, dst=10020565, speed=61.65 MPix/s +--- + pixman/pixman-arm-neon-asm.S | 3 +++ + pixman/pixman-arm-neon.c | 5 +++++ + 2 files changed, 8 insertions(+), 0 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index 52dc444..f0b42ca 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2625,3 +2625,6 @@ pixman_asm_function fname + + generate_bilinear_scanline_func \ + pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon, 8888, 8888, 2, 28 ++ ++generate_bilinear_scanline_func \ ++ pixman_scaled_bilinear_scanline_8888_0565_SRC_asm_neon, 8888, 0565, 2, 28 +diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c +index 98ad5f2..ba6de66 100644 +--- a/pixman/pixman-arm-neon.c ++++ b/pixman/pixman-arm-neon.c +@@ -129,6 +129,8 @@ PIXMAN_ARM_BIND_SCALED_NEAREST_SRC_A8_DST (SKIP_ZERO_SRC, neon, 0565_8_0565, + + PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 8888_8888, SRC, + uint32_t, uint32_t) ++PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 8888_0565, SRC, ++ uint32_t, uint16_t) + + void + pixman_composite_src_n_8_asm_neon (int32_t w, +@@ -350,6 +352,9 @@ static const pixman_fast_path_t arm_neon_fast_paths[] = + SIMPLE_BILINEAR_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, neon_8888_8888), + SIMPLE_BILINEAR_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, neon_8888_8888), + ++ SIMPLE_BILINEAR_FAST_PATH (SRC, a8r8g8b8, r5g6b5, neon_8888_0565), ++ SIMPLE_BILINEAR_FAST_PATH (SRC, x8r8g8b8, r5g6b5, neon_8888_0565), ++ + { PIXMAN_OP_NONE }, + }; + +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0020-ARM-NEON-optimization-for-bilinear-scaled-src_0565_x.patch b/recipes/xorg-lib/pixman-0.21.6/0020-ARM-NEON-optimization-for-bilinear-scaled-src_0565_x.patch new file mode 100644 index 0000000000..1924b3ae02 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0020-ARM-NEON-optimization-for-bilinear-scaled-src_0565_x.patch @@ -0,0 +1,50 @@ +From 29003c3befe2159396d181ef9ac1caaadcabf382 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Wed, 9 Mar 2011 13:21:53 +0200 +Subject: [PATCH 20/40] ARM: NEON optimization for bilinear scaled 'src_0565_x888' + +Benchmark on ARM Cortex-A8 r2p2 @1GHz, 32-bit LPDDR @200MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=10020565, dst=20020888, speed=3.39 MPix/s + after: op=1, src=10020565, dst=20020888, speed=36.82 MPix/s +--- + pixman/pixman-arm-neon-asm.S | 3 +++ + pixman/pixman-arm-neon.c | 4 ++++ + 2 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index f0b42ca..9245db9 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2628,3 +2628,6 @@ generate_bilinear_scanline_func \ + + generate_bilinear_scanline_func \ + pixman_scaled_bilinear_scanline_8888_0565_SRC_asm_neon, 8888, 0565, 2, 28 ++ ++generate_bilinear_scanline_func \ ++ pixman_scaled_bilinear_scanline_0565_x888_SRC_asm_neon, 0565, 8888, 1, 28 +diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c +index ba6de66..18e26eb 100644 +--- a/pixman/pixman-arm-neon.c ++++ b/pixman/pixman-arm-neon.c +@@ -131,6 +131,8 @@ PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 8888_8888, SRC, + uint32_t, uint32_t) + PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 8888_0565, SRC, + uint32_t, uint16_t) ++PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 0565_x888, SRC, ++ uint16_t, uint32_t) + + void + pixman_composite_src_n_8_asm_neon (int32_t w, +@@ -355,6 +357,8 @@ static const pixman_fast_path_t arm_neon_fast_paths[] = + SIMPLE_BILINEAR_FAST_PATH (SRC, a8r8g8b8, r5g6b5, neon_8888_0565), + SIMPLE_BILINEAR_FAST_PATH (SRC, x8r8g8b8, r5g6b5, neon_8888_0565), + ++ SIMPLE_BILINEAR_FAST_PATH (SRC, r5g6b5, x8r8g8b8, neon_0565_x888), ++ + { PIXMAN_OP_NONE }, + }; + +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0021-ARM-NEON-optimization-for-bilinear-scaled-src_0565_0.patch b/recipes/xorg-lib/pixman-0.21.6/0021-ARM-NEON-optimization-for-bilinear-scaled-src_0565_0.patch new file mode 100644 index 0000000000..a0193d1fd6 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0021-ARM-NEON-optimization-for-bilinear-scaled-src_0565_0.patch @@ -0,0 +1,49 @@ +From fe99673719091d4a880d031add1369332a75731b Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Wed, 9 Mar 2011 13:27:41 +0200 +Subject: [PATCH 21/40] ARM: NEON optimization for bilinear scaled 'src_0565_0565' + +Benchmark on ARM Cortex-A8 r2p2 @1GHz, 32-bit LPDDR @200MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=10020565, dst=10020565, speed=3.30 MPix/s + after: op=1, src=10020565, dst=10020565, speed=32.29 MPix/s +--- + pixman/pixman-arm-neon-asm.S | 3 +++ + pixman/pixman-arm-neon.c | 3 +++ + 2 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index 9245db9..2b6875b 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2631,3 +2631,6 @@ generate_bilinear_scanline_func \ + + generate_bilinear_scanline_func \ + pixman_scaled_bilinear_scanline_0565_x888_SRC_asm_neon, 0565, 8888, 1, 28 ++ ++generate_bilinear_scanline_func \ ++ pixman_scaled_bilinear_scanline_0565_0565_SRC_asm_neon, 0565, 0565, 1, 28 +diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c +index 18e26eb..0a10ca1 100644 +--- a/pixman/pixman-arm-neon.c ++++ b/pixman/pixman-arm-neon.c +@@ -133,6 +133,8 @@ PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 8888_0565, SRC, + uint32_t, uint16_t) + PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 0565_x888, SRC, + uint16_t, uint32_t) ++PIXMAN_ARM_BIND_SCALED_BILINEAR_SRC_DST (0, neon, 0565_0565, SRC, ++ uint16_t, uint16_t) + + void + pixman_composite_src_n_8_asm_neon (int32_t w, +@@ -358,6 +360,7 @@ static const pixman_fast_path_t arm_neon_fast_paths[] = + SIMPLE_BILINEAR_FAST_PATH (SRC, x8r8g8b8, r5g6b5, neon_8888_0565), + + SIMPLE_BILINEAR_FAST_PATH (SRC, r5g6b5, x8r8g8b8, neon_0565_x888), ++ SIMPLE_BILINEAR_FAST_PATH (SRC, r5g6b5, r5g6b5, neon_0565_0565), + + { PIXMAN_OP_NONE }, + }; +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0022-ARM-a-bit-faster-NEON-bilinear-scaling-for-r5g6b5-so.patch b/recipes/xorg-lib/pixman-0.21.6/0022-ARM-a-bit-faster-NEON-bilinear-scaling-for-r5g6b5-so.patch new file mode 100644 index 0000000000..20019f45f1 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0022-ARM-a-bit-faster-NEON-bilinear-scaling-for-r5g6b5-so.patch @@ -0,0 +1,166 @@ +From 70a923882ca24664344ba91a649e7aa12c3063f7 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Wed, 9 Mar 2011 13:55:48 +0200 +Subject: [PATCH 22/40] ARM: a bit faster NEON bilinear scaling for r5g6b5 source images + +Instructions scheduling improved in the code responsible for fetching r5g6b5 +pixels and converting them to the intermediate x8r8g8b8 color format used in +the interpolation part of code. Still a lot of NEON stalls are remaining, +which can be resolved later by the use of pipelining. + +Benchmark on ARM Cortex-A8 r2p2 @1GHz, 32-bit LPDDR @200MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=10020565, dst=10020565, speed=32.29 MPix/s + op=1, src=10020565, dst=20020888, speed=36.82 MPix/s + after: op=1, src=10020565, dst=10020565, speed=41.35 MPix/s + op=1, src=10020565, dst=20020888, speed=49.16 MPix/s +--- + pixman/pixman-arm-neon-asm.S | 118 +++++++++++++++++++++++++++++++++++------ + 1 files changed, 100 insertions(+), 18 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index 2b6875b..71b30ac 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2430,6 +2430,101 @@ fname: + convert_four_0565_to_x888_packed reg2, reg1, reg2, tmp + .endm + ++.macro bilinear_load_and_vertical_interpolate_two_8888 \ ++ acc1, acc2, reg1, reg2, reg3, reg4, tmp1, tmp2 ++ ++ bilinear_load_8888 reg1, reg2, tmp1 ++ vmull.u8 acc1, reg1, d28 ++ vmlal.u8 acc1, reg2, d29 ++ bilinear_load_8888 reg3, reg4, tmp2 ++ vmull.u8 acc2, reg3, d28 ++ vmlal.u8 acc2, reg4, d29 ++.endm ++ ++.macro bilinear_load_and_vertical_interpolate_four_8888 \ ++ xacc1, xacc2, xreg1, xreg2, xreg3, xreg4, xacc2lo, xacc2hi \ ++ yacc1, yacc2, yreg1, yreg2, yreg3, yreg4, yacc2lo, yacc2hi ++ ++ bilinear_load_and_vertical_interpolate_two_8888 \ ++ xacc1, xacc2, xreg1, xreg2, xreg3, xreg4, xacc2lo, xacc2hi ++ bilinear_load_and_vertical_interpolate_two_8888 \ ++ yacc1, yacc2, yreg1, yreg2, yreg3, yreg4, yacc2lo, yacc2hi ++.endm ++ ++.macro bilinear_load_and_vertical_interpolate_two_0565 \ ++ acc1, acc2, reg1, reg2, reg3, reg4, acc2lo, acc2hi ++ ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ mov TMP4, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP2, asl #1 ++ add TMP2, BOTTOM, TMP2, asl #1 ++ add TMP3, TOP, TMP4, asl #1 ++ add TMP4, BOTTOM, TMP4, asl #1 ++ vld1.32 {acc2lo[0]}, [TMP1] ++ vld1.32 {acc2hi[0]}, [TMP3] ++ vld1.32 {acc2lo[1]}, [TMP2] ++ vld1.32 {acc2hi[1]}, [TMP4] ++ convert_0565_to_x888 acc2, reg3, reg2, reg1 ++ vzip.u8 reg1, reg3 ++ vzip.u8 reg2, reg4 ++ vzip.u8 reg3, reg4 ++ vzip.u8 reg1, reg2 ++ vmull.u8 acc1, reg1, d28 ++ vmlal.u8 acc1, reg2, d29 ++ vmull.u8 acc2, reg3, d28 ++ vmlal.u8 acc2, reg4, d29 ++.endm ++ ++.macro bilinear_load_and_vertical_interpolate_four_0565 \ ++ xacc1, xacc2, xreg1, xreg2, xreg3, xreg4, xacc2lo, xacc2hi \ ++ yacc1, yacc2, yreg1, yreg2, yreg3, yreg4, yacc2lo, yacc2hi ++ ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ mov TMP4, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP2, asl #1 ++ add TMP2, BOTTOM, TMP2, asl #1 ++ add TMP3, TOP, TMP4, asl #1 ++ add TMP4, BOTTOM, TMP4, asl #1 ++ vld1.32 {xacc2lo[0]}, [TMP1] ++ vld1.32 {xacc2hi[0]}, [TMP3] ++ vld1.32 {xacc2lo[1]}, [TMP2] ++ vld1.32 {xacc2hi[1]}, [TMP4] ++ convert_0565_to_x888 xacc2, xreg3, xreg2, xreg1 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ mov TMP4, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP2, asl #1 ++ add TMP2, BOTTOM, TMP2, asl #1 ++ add TMP3, TOP, TMP4, asl #1 ++ add TMP4, BOTTOM, TMP4, asl #1 ++ vld1.32 {yacc2lo[0]}, [TMP1] ++ vzip.u8 xreg1, xreg3 ++ vld1.32 {yacc2hi[0]}, [TMP3] ++ vzip.u8 xreg2, xreg4 ++ vld1.32 {yacc2lo[1]}, [TMP2] ++ vzip.u8 xreg3, xreg4 ++ vld1.32 {yacc2hi[1]}, [TMP4] ++ vzip.u8 xreg1, xreg2 ++ convert_0565_to_x888 yacc2, yreg3, yreg2, yreg1 ++ vmull.u8 xacc1, xreg1, d28 ++ vzip.u8 yreg1, yreg3 ++ vmlal.u8 xacc1, xreg2, d29 ++ vzip.u8 yreg2, yreg4 ++ vmull.u8 xacc2, xreg3, d28 ++ vzip.u8 yreg3, yreg4 ++ vmlal.u8 xacc2, xreg4, d29 ++ vzip.u8 yreg1, yreg2 ++ vmull.u8 yacc1, yreg1, d28 ++ vmlal.u8 yacc1, yreg2, d29 ++ vmull.u8 yacc2, yreg3, d28 ++ vmlal.u8 yacc2, yreg4, d29 ++.endm ++ + .macro bilinear_store_8888 numpix, tmp1, tmp2 + .if numpix == 4 + vst1.32 {d0, d1}, [OUT]! +@@ -2477,12 +2572,8 @@ fname: + .endm + + .macro bilinear_interpolate_two_pixels src_fmt, dst_fmt +- bilinear_load_&src_fmt d0, d1, d2 +- vmull.u8 q1, d0, d28 +- vmlal.u8 q1, d1, d29 +- bilinear_load_&src_fmt d20, d21, d22 +- vmull.u8 q11, d20, d28 +- vmlal.u8 q11, d21, d29 ++ bilinear_load_and_vertical_interpolate_two_&src_fmt \ ++ q1, q11, d0, d1, d20, d21, d22, d23 + vshr.u16 q15, q12, #8 + vadd.u16 q12, q12, q13 + vshll.u16 q0, d2, #8 +@@ -2498,18 +2589,9 @@ fname: + .endm + + .macro bilinear_interpolate_four_pixels src_fmt, dst_fmt +- bilinear_load_&src_fmt d0, d1, d2 +- vmull.u8 q1, d0, d28 +- vmlal.u8 q1, d1, d29 +- bilinear_load_&src_fmt d20, d21, d22 +- vmull.u8 q11, d20, d28 +- vmlal.u8 q11, d21, d29 +- bilinear_load_&src_fmt d4, d5, d6 +- vmull.u8 q3, d4, d28 +- vmlal.u8 q3, d5, d29 +- bilinear_load_&src_fmt d16, d17, d18 +- vmull.u8 q9, d16, d28 +- vmlal.u8 q9, d17, d29 ++ bilinear_load_and_vertical_interpolate_four_&src_fmt \ ++ q1, q11, d0, d1, d20, d21, d22, d23 \ ++ q3, q9, d4, d5, d16, d17, d18, d19 + pld [TMP1, PF_OFFS] + vshr.u16 q15, q12, #8 + vadd.u16 q12, q12, q13 +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0023-In-delegate_-src-dest-_iter_init-call-delegate-direc.patch b/recipes/xorg-lib/pixman-0.21.6/0023-In-delegate_-src-dest-_iter_init-call-delegate-direc.patch new file mode 100644 index 0000000000..96343f185b --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0023-In-delegate_-src-dest-_iter_init-call-delegate-direc.patch @@ -0,0 +1,54 @@ +From be4eaa0e4f79af38b7b89c5b09ca88d3a88d9396 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= +Date: Sat, 12 Mar 2011 19:06:02 -0500 +Subject: [PATCH 23/40] In delegate_{src,dest}_iter_init() call delegate directly. + +There is no reason to go through +_pixman_implementation_{src,dest}_iter_init(), especially since +_pixman_implementation_src_iter_init() is doing various other checks +that only need to be done once. + +Also call delegate->src_iter_init() directly in pixman-sse2.c +--- + pixman/pixman-implementation.c | 4 ++-- + pixman/pixman-sse2.c | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/pixman/pixman-implementation.c b/pixman/pixman-implementation.c +index adaf9c6..892767e 100644 +--- a/pixman/pixman-implementation.c ++++ b/pixman/pixman-implementation.c +@@ -122,7 +122,7 @@ delegate_src_iter_init (pixman_implementation_t *imp, + uint8_t * buffer, + iter_flags_t flags) + { +- _pixman_implementation_src_iter_init ( ++ imp->delegate->src_iter_init ( + imp->delegate, iter, image, x, y, width, height, buffer, flags); + } + +@@ -137,7 +137,7 @@ delegate_dest_iter_init (pixman_implementation_t *imp, + uint8_t * buffer, + iter_flags_t flags) + { +- _pixman_implementation_dest_iter_init ( ++ imp->delegate->dest_iter_init ( + imp->delegate, iter, image, x, y, width, height, buffer, flags); + } + +diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c +index 696005f..d4a34e9 100644 +--- a/pixman/pixman-sse2.c ++++ b/pixman/pixman-sse2.c +@@ -6013,7 +6013,7 @@ sse2_src_iter_init (pixman_implementation_t *imp, + } + } + +- _pixman_implementation_src_iter_init ( ++ imp->delegate->src_iter_init ( + imp->delegate, iter, image, x, y, width, height, buffer, flags); + } + +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0024-Fill-out-parts-of-iters-in-_pixman_implementation_-s.patch b/recipes/xorg-lib/pixman-0.21.6/0024-Fill-out-parts-of-iters-in-_pixman_implementation_-s.patch new file mode 100644 index 0000000000..44fd38a8da --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0024-Fill-out-parts-of-iters-in-_pixman_implementation_-s.patch @@ -0,0 +1,111 @@ +From 74d0f44b6d6d613d24541b849835da0464cc6fd0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= +Date: Sat, 12 Mar 2011 19:12:35 -0500 +Subject: [PATCH 24/40] Fill out parts of iters in _pixman_implementation_{src,dest}_iter_init() + +This makes _pixman_implementation_{src,dest}_iter_init() responsible +for filling parts of the information in the iterators. Specifically, +the information passed as arguments is stored in the iterator. + +Also add a height field to pixman_iter_t(). +--- + pixman/pixman-general.c | 6 ------ + pixman/pixman-implementation.c | 16 ++++++++++++++++ + pixman/pixman-private.h | 11 ++++++++--- + pixman/pixman-sse2.c | 2 -- + 4 files changed, 24 insertions(+), 11 deletions(-) + +diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c +index 872fb7e..1a0fa7c 100644 +--- a/pixman/pixman-general.c ++++ b/pixman/pixman-general.c +@@ -44,12 +44,6 @@ general_src_iter_init (pixman_implementation_t *imp, + int x, int y, int width, int height, + uint8_t *buffer, iter_flags_t flags) + { +- iter->image = image; +- iter->x = x; +- iter->y = y; +- iter->width = width; +- iter->buffer = (uint32_t *)buffer; +- + if (image->type == SOLID) + { + _pixman_solid_fill_iter_init ( +diff --git a/pixman/pixman-implementation.c b/pixman/pixman-implementation.c +index 892767e..bdd4543 100644 +--- a/pixman/pixman-implementation.c ++++ b/pixman/pixman-implementation.c +@@ -274,6 +274,14 @@ _pixman_implementation_src_iter_init (pixman_implementation_t *imp, + uint8_t *buffer, + iter_flags_t flags) + { ++ iter->image = image; ++ iter->buffer = (uint32_t *)buffer; ++ iter->x = x; ++ iter->y = y; ++ iter->width = width; ++ iter->height = height; ++ iter->flags = flags; ++ + if (!image) + { + iter->get_scanline = get_scanline_null; +@@ -301,6 +309,14 @@ _pixman_implementation_dest_iter_init (pixman_implementation_t *imp, + uint8_t *buffer, + iter_flags_t flags) + { ++ iter->image = image; ++ iter->buffer = (uint32_t *)buffer; ++ iter->x = x; ++ iter->y = y; ++ iter->width = width; ++ iter->height = height; ++ iter->flags = flags; ++ + (*imp->dest_iter_init) ( + imp, iter, image, x, y, width, height, buffer, flags); + } +diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h +index 1473dc4..ea9545f 100644 +--- a/pixman/pixman-private.h ++++ b/pixman/pixman-private.h +@@ -212,14 +212,19 @@ typedef enum + + struct pixman_iter_t + { +- pixman_iter_get_scanline_t get_scanline; +- pixman_iter_write_back_t write_back; +- ++ /* These are initialized by _pixman_implementation_{src,dest}_init */ + pixman_image_t * image; + uint32_t * buffer; + int x, y; + int width; ++ int height; ++ iter_flags_t flags; ++ ++ /* These function pointers are initialized by the implementation */ ++ pixman_iter_get_scanline_t get_scanline; ++ pixman_iter_write_back_t write_back; + ++ /* These fields are scratch data that implementations can use */ + uint8_t * bits; + int stride; + }; +diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c +index d4a34e9..43a6bf2 100644 +--- a/pixman/pixman-sse2.c ++++ b/pixman/pixman-sse2.c +@@ -6004,8 +6004,6 @@ sse2_src_iter_init (pixman_implementation_t *imp, + + iter->bits = b + s * y + x * PIXMAN_FORMAT_BPP (f->format) / 8; + iter->stride = s; +- iter->width = width; +- iter->buffer = (uint32_t *)buffer; + + iter->get_scanline = f->get_scanline; + return; +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0025-Simplify-the-prototype-for-iterator-initializers.patch b/recipes/xorg-lib/pixman-0.21.6/0025-Simplify-the-prototype-for-iterator-initializers.patch new file mode 100644 index 0000000000..1bfd6b4e92 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0025-Simplify-the-prototype-for-iterator-initializers.patch @@ -0,0 +1,442 @@ +From 6b27768d81c254a4f1d05473157328d5a5d99b9c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= +Date: Sat, 12 Mar 2011 19:42:58 -0500 +Subject: [PATCH 25/40] Simplify the prototype for iterator initializers. + +All of the information previously passed to the iterator initializers +is now available in the iterator itself, so there is no need to pass +it as arguments anymore. +--- + pixman/pixman-bits-image.c | 20 +++++--------- + pixman/pixman-conical-gradient.c | 7 +--- + pixman/pixman-general.c | 52 ++++++++------------------------------ + pixman/pixman-implementation.c | 30 ++++----------------- + pixman/pixman-linear-gradient.c | 16 +++-------- + pixman/pixman-private.h | 40 ++++++----------------------- + pixman/pixman-radial-gradient.c | 7 +--- + pixman/pixman-solid-fill.c | 17 +++++------- + pixman/pixman-sse2.c | 25 +++++++++-------- + 9 files changed, 61 insertions(+), 153 deletions(-) + +diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c +index a865d71..835ecfb 100644 +--- a/pixman/pixman-bits-image.c ++++ b/pixman/pixman-bits-image.c +@@ -1362,12 +1362,9 @@ src_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask) + } + + void +-_pixman_bits_image_src_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags) ++_pixman_bits_image_src_iter_init (pixman_image_t *image, pixman_iter_t *iter) + { +- if (flags & ITER_NARROW) ++ if (iter->flags & ITER_NARROW) + iter->get_scanline = src_get_scanline_narrow; + else + iter->get_scanline = src_get_scanline_wide; +@@ -1472,28 +1469,25 @@ dest_write_back_direct (pixman_iter_t *iter) + } + + void +-_pixman_bits_image_dest_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags) ++_pixman_bits_image_dest_iter_init (pixman_image_t *image, pixman_iter_t *iter) + { +- if (flags & ITER_NARROW) ++ if (iter->flags & ITER_NARROW) + { + if (((image->common.flags & + (FAST_PATH_NO_ALPHA_MAP | FAST_PATH_NO_ACCESSORS)) == + (FAST_PATH_NO_ALPHA_MAP | FAST_PATH_NO_ACCESSORS)) && + (image->bits.format == PIXMAN_a8r8g8b8 || + (image->bits.format == PIXMAN_x8r8g8b8 && +- (flags & ITER_LOCALIZED_ALPHA)))) ++ (iter->flags & ITER_LOCALIZED_ALPHA)))) + { +- iter->buffer = image->bits.bits + y * image->bits.rowstride + x; ++ iter->buffer = image->bits.bits + iter->y * image->bits.rowstride + iter->x; + + iter->get_scanline = _pixman_iter_get_scanline_noop; + iter->write_back = dest_write_back_direct; + } + else + { +- if ((flags & (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) == ++ if ((iter->flags & (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) == + (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) + { + iter->get_scanline = _pixman_iter_get_scanline_noop; +diff --git a/pixman/pixman-conical-gradient.c b/pixman/pixman-conical-gradient.c +index 9d7d2e8..791d4f3 100644 +--- a/pixman/pixman-conical-gradient.c ++++ b/pixman/pixman-conical-gradient.c +@@ -171,12 +171,9 @@ conical_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask) + } + + void +-_pixman_conical_gradient_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags) ++_pixman_conical_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter) + { +- if (flags & ITER_NARROW) ++ if (iter->flags & ITER_NARROW) + iter->get_scanline = conical_get_scanline_narrow; + else + iter->get_scanline = conical_get_scanline_wide; +diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c +index 1a0fa7c..727affc 100644 +--- a/pixman/pixman-general.c ++++ b/pixman/pixman-general.c +@@ -38,60 +38,30 @@ + #include "pixman-private.h" + + static void +-general_src_iter_init (pixman_implementation_t *imp, +- pixman_iter_t *iter, +- pixman_image_t *image, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags) ++general_src_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter) + { ++ pixman_image_t *image = iter->image; ++ + if (image->type == SOLID) +- { +- _pixman_solid_fill_iter_init ( +- image, iter, x, y, width, height, buffer, flags); +- } ++ _pixman_solid_fill_iter_init (image, iter); + else if (image->type == LINEAR) +- { +- _pixman_linear_gradient_iter_init ( +- image, iter, x, y, width, height, buffer, flags); +- } ++ _pixman_linear_gradient_iter_init (image, iter); + else if (image->type == RADIAL) +- { +- _pixman_radial_gradient_iter_init ( +- image, iter, x, y, width, height, buffer, flags); +- } ++ _pixman_radial_gradient_iter_init (image, iter); + else if (image->type == CONICAL) +- { +- _pixman_conical_gradient_iter_init ( +- image, iter, x, y, width, height, buffer, flags); +- } ++ _pixman_conical_gradient_iter_init (image, iter); + else if (image->type == BITS) +- { +- _pixman_bits_image_src_iter_init ( +- image, iter, x, y, width, height, buffer, flags); +- } ++ _pixman_bits_image_src_iter_init (image, iter); + else +- { + _pixman_log_error (FUNC, "Pixman bug: unknown image type\n"); +- } + } + + static void +-general_dest_iter_init (pixman_implementation_t *imp, +- pixman_iter_t *iter, +- pixman_image_t *image, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags) ++general_dest_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter) + { +- iter->image = image; +- iter->x = x; +- iter->y = y; +- iter->width = width; +- iter->buffer = (uint32_t *)buffer; +- +- if (image->type == BITS) ++ if (iter->image->type == BITS) + { +- _pixman_bits_image_dest_iter_init ( +- image, iter, x, y, width, height, buffer, flags); ++ _pixman_bits_image_dest_iter_init (iter->image, iter); + } + else + { +diff --git a/pixman/pixman-implementation.c b/pixman/pixman-implementation.c +index bdd4543..f1d3f99 100644 +--- a/pixman/pixman-implementation.c ++++ b/pixman/pixman-implementation.c +@@ -113,32 +113,16 @@ delegate_fill (pixman_implementation_t *imp, + + static void + delegate_src_iter_init (pixman_implementation_t *imp, +- pixman_iter_t * iter, +- pixman_image_t * image, +- int x, +- int y, +- int width, +- int height, +- uint8_t * buffer, +- iter_flags_t flags) ++ pixman_iter_t * iter) + { +- imp->delegate->src_iter_init ( +- imp->delegate, iter, image, x, y, width, height, buffer, flags); ++ imp->delegate->src_iter_init (imp->delegate, iter); + } + + static void + delegate_dest_iter_init (pixman_implementation_t *imp, +- pixman_iter_t * iter, +- pixman_image_t * image, +- int x, +- int y, +- int width, +- int height, +- uint8_t * buffer, +- iter_flags_t flags) ++ pixman_iter_t * iter) + { +- imp->delegate->dest_iter_init ( +- imp->delegate, iter, image, x, y, width, height, buffer, flags); ++ imp->delegate->dest_iter_init (imp->delegate, iter); + } + + pixman_implementation_t * +@@ -293,8 +277,7 @@ _pixman_implementation_src_iter_init (pixman_implementation_t *imp, + } + else + { +- (*imp->src_iter_init) ( +- imp, iter, image, x, y, width, height, buffer, flags); ++ (*imp->src_iter_init) (imp, iter); + } + } + +@@ -317,6 +300,5 @@ _pixman_implementation_dest_iter_init (pixman_implementation_t *imp, + iter->height = height; + iter->flags = flags; + +- (*imp->dest_iter_init) ( +- imp, iter, image, x, y, width, height, buffer, flags); ++ (*imp->dest_iter_init) (imp, iter); + } +diff --git a/pixman/pixman-linear-gradient.c b/pixman/pixman-linear-gradient.c +index 07303fc..6e1ea24 100644 +--- a/pixman/pixman-linear-gradient.c ++++ b/pixman/pixman-linear-gradient.c +@@ -233,18 +233,12 @@ linear_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask) + } + + void +-_pixman_linear_gradient_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, +- int y, +- int width, +- int height, +- uint8_t *buffer, +- iter_flags_t flags) ++_pixman_linear_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter) + { +- if (linear_gradient_is_horizontal (image, x, y, width, height)) ++ if (linear_gradient_is_horizontal ( ++ iter->image, iter->x, iter->y, iter->width, iter->height)) + { +- if (flags & ITER_NARROW) ++ if (iter->flags & ITER_NARROW) + linear_get_scanline_narrow (iter, NULL); + else + linear_get_scanline_wide (iter, NULL); +@@ -253,7 +247,7 @@ _pixman_linear_gradient_iter_init (pixman_image_t *image, + } + else + { +- if (flags & ITER_NARROW) ++ if (iter->flags & ITER_NARROW) + iter->get_scanline = linear_get_scanline_narrow; + else + iter->get_scanline = linear_get_scanline_wide; +diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h +index ea9545f..60060a9 100644 +--- a/pixman/pixman-private.h ++++ b/pixman/pixman-private.h +@@ -233,39 +233,22 @@ void + _pixman_bits_image_setup_accessors (bits_image_t *image); + + void +-_pixman_bits_image_src_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags); ++_pixman_bits_image_src_iter_init (pixman_image_t *image, pixman_iter_t *iter); ++ + void +-_pixman_bits_image_dest_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags); ++_pixman_bits_image_dest_iter_init (pixman_image_t *image, pixman_iter_t *iter); + + void +-_pixman_solid_fill_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags); ++_pixman_solid_fill_iter_init (pixman_image_t *image, pixman_iter_t *iter); + + void +-_pixman_linear_gradient_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags); ++_pixman_linear_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter); + + void +-_pixman_radial_gradient_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags); ++_pixman_radial_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter); + + void +-_pixman_conical_gradient_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags); ++_pixman_conical_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter); + + pixman_image_t * + _pixman_image_allocate (void); +@@ -413,14 +396,7 @@ typedef pixman_bool_t (*pixman_fill_func_t) (pixman_implementation_t *imp, + int height, + uint32_t xor); + typedef void (*pixman_iter_init_func_t) (pixman_implementation_t *imp, +- pixman_iter_t *iter, +- pixman_image_t *image, +- int x, +- int y, +- int width, +- int height, +- uint8_t *buffer, +- iter_flags_t flags); ++ pixman_iter_t *iter); + + void _pixman_setup_combiner_functions_32 (pixman_implementation_t *imp); + void _pixman_setup_combiner_functions_64 (pixman_implementation_t *imp); +diff --git a/pixman/pixman-radial-gradient.c b/pixman/pixman-radial-gradient.c +index 6523b82..5e9fd73 100644 +--- a/pixman/pixman-radial-gradient.c ++++ b/pixman/pixman-radial-gradient.c +@@ -400,12 +400,9 @@ radial_get_scanline_wide (pixman_iter_t *iter, const uint32_t *mask) + } + + void +-_pixman_radial_gradient_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags) ++_pixman_radial_gradient_iter_init (pixman_image_t *image, pixman_iter_t *iter) + { +- if (flags & ITER_NARROW) ++ if (iter->flags & ITER_NARROW) + iter->get_scanline = radial_get_scanline_narrow; + else + iter->get_scanline = radial_get_scanline_wide; +diff --git a/pixman/pixman-solid-fill.c b/pixman/pixman-solid-fill.c +index 67681f2..852e135 100644 +--- a/pixman/pixman-solid-fill.c ++++ b/pixman/pixman-solid-fill.c +@@ -27,24 +27,21 @@ + #include "pixman-private.h" + + void +-_pixman_solid_fill_iter_init (pixman_image_t *image, +- pixman_iter_t *iter, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags) ++_pixman_solid_fill_iter_init (pixman_image_t *image, pixman_iter_t *iter) + { +- if (flags & ITER_NARROW) ++ if (iter->flags & ITER_NARROW) + { +- uint32_t *b = (uint32_t *)buffer; +- uint32_t *e = b + width; +- uint32_t color = image->solid.color_32; ++ uint32_t *b = (uint32_t *)iter->buffer; ++ uint32_t *e = b + iter->width; ++ uint32_t color = iter->image->solid.color_32; + + while (b < e) + *(b++) = color; + } + else + { +- uint64_t *b = (uint64_t *)buffer; +- uint64_t *e = b + width; ++ uint64_t *b = (uint64_t *)iter->buffer; ++ uint64_t *e = b + iter->width; + uint64_t color = image->solid.color_64; + + while (b < e) +diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c +index 43a6bf2..533b858 100644 +--- a/pixman/pixman-sse2.c ++++ b/pixman/pixman-sse2.c +@@ -5978,19 +5978,21 @@ static const fetcher_info_t fetchers[] = + }; + + static void +-sse2_src_iter_init (pixman_implementation_t *imp, +- pixman_iter_t *iter, +- pixman_image_t *image, +- int x, int y, int width, int height, +- uint8_t *buffer, iter_flags_t flags) ++sse2_src_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter) + { ++ pixman_image_t *image = iter->image; ++ int x = iter->x; ++ int y = iter->y; ++ int width = iter->width; ++ int height = iter->height; ++ + #define FLAGS \ + (FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM) + +- if ((flags & ITER_NARROW) && +- (image->common.flags & FLAGS) == FLAGS && +- x >= 0 && y >= 0 && +- x + width <= image->bits.width && ++ if ((iter->flags & ITER_NARROW) && ++ (image->common.flags & FLAGS) == FLAGS && ++ x >= 0 && y >= 0 && ++ x + width <= image->bits.width && + y + height <= image->bits.height) + { + const fetcher_info_t *f; +@@ -6002,7 +6004,7 @@ sse2_src_iter_init (pixman_implementation_t *imp, + uint8_t *b = (uint8_t *)image->bits.bits; + int s = image->bits.rowstride * 4; + +- iter->bits = b + s * y + x * PIXMAN_FORMAT_BPP (f->format) / 8; ++ iter->bits = b + s * iter->y + x * PIXMAN_FORMAT_BPP (f->format) / 8; + iter->stride = s; + + iter->get_scanline = f->get_scanline; +@@ -6011,8 +6013,7 @@ sse2_src_iter_init (pixman_implementation_t *imp, + } + } + +- imp->delegate->src_iter_init ( +- imp->delegate, iter, image, x, y, width, height, buffer, flags); ++ imp->delegate->src_iter_init (imp->delegate, iter); + } + + #if defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__) +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0026-test-Randomize-some-tests-if-PIXMAN_RANDOMIZE_TESTS-.patch b/recipes/xorg-lib/pixman-0.21.6/0026-test-Randomize-some-tests-if-PIXMAN_RANDOMIZE_TESTS-.patch new file mode 100644 index 0000000000..8fc5b7706f --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0026-test-Randomize-some-tests-if-PIXMAN_RANDOMIZE_TESTS-.patch @@ -0,0 +1,187 @@ +From 7eb0abb5e819046537b9f809c7ec332c6679c557 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= +Date: Mon, 14 Mar 2011 14:56:22 -0400 +Subject: [PATCH 26/40] test: Randomize some tests if PIXMAN_RANDOMIZE_TESTS is set + +This patch makes so that composite and stress-test will start from a +random seed if the PIXMAN_RANDOMIZE_TESTS environment variable is +set. Running the test suite in this mode is useful to get more test +coverage. + +Also, in stress-test.c make it so that setting the initial seed causes +threads to be turned off. This makes it much easier to see when +something fails. +--- + test/composite.c | 17 ++++++++++++----- + test/stress-test.c | 37 ++++++++++++++++++++++++++----------- + test/utils.c | 10 ++++++++++ + test/utils.h | 3 +++ + 4 files changed, 51 insertions(+), 16 deletions(-) + +diff --git a/test/composite.c b/test/composite.c +index a86e5ed..e6d52b9 100644 +--- a/test/composite.c ++++ b/test/composite.c +@@ -868,7 +868,7 @@ main (int argc, char **argv) + { + #define N_TESTS (8 * 1024 * 1024) + int result = 0; +- int i; ++ uint32_t i; + + if (argc > 1) + { +@@ -890,15 +890,22 @@ main (int argc, char **argv) + } + } + ++ uint32_t seed; ++ ++ if (getenv ("PIXMAN_RANDOMIZE_TESTS")) ++ seed = get_random_seed(); ++ else ++ seed = 1; ++ + #ifdef USE_OPENMP +-# pragma omp parallel for default(none) shared(result) shared(argv) ++# pragma omp parallel for default(none) shared(result, argv, seed) + #endif +- for (i = 1; i <= N_TESTS; ++i) ++ for (i = seed; i <= N_TESTS; ++i) + { + if (!result && !run_test (i)) + { +- printf ("Test %d failed.\n", i); +- ++ printf ("Test 0x%08X failed.\n", i); ++ + result = i; + } + } +diff --git a/test/stress-test.c b/test/stress-test.c +index 166dc6d..d496f93 100644 +--- a/test/stress-test.c ++++ b/test/stress-test.c +@@ -1,4 +1,6 @@ ++#include + #include "utils.h" ++#include + + #if 0 + #define fence_malloc malloc +@@ -730,11 +732,17 @@ static const pixman_op_t op_list[] = + }; + + static void +-run_test (uint32_t seed) ++run_test (uint32_t seed, pixman_bool_t verbose, uint32_t mod) + { + pixman_image_t *source, *mask, *dest; + pixman_op_t op; + ++ if (verbose) ++ { ++ if (mod == 0 || (seed % mod) == 0) ++ printf ("Seed 0x%08x\n", seed); ++ } ++ + lcg_srand (seed); + + source = create_random_image (); +@@ -787,6 +795,7 @@ main (int argc, char **argv) + uint32_t seed = 1; + uint32_t n_tests = 0xffffffff; + uint32_t mod = 0; ++ pixman_bool_t use_threads = TRUE; + uint32_t i; + + pixman_disable_out_of_bounds_workaround (); +@@ -811,6 +820,7 @@ main (int argc, char **argv) + else if (strcmp (argv[i], "-s") == 0 && i + 1 < argc) + { + get_int (argv[i + 1], &seed); ++ use_threads = FALSE; + i++; + } + else if (strcmp (argv[i], "-n") == 0 && i + 1 < argc) +@@ -825,7 +835,7 @@ main (int argc, char **argv) + + printf ("Options:\n\n" + "-n Number of tests to run\n" +- "-s Seed of first test\n" ++ "-s Seed of first test (ignored if PIXMAN_RANDOMIZE_TESTS is set)\n" + "-v Print out seeds\n" + "-v Print out every n'th seed\n\n"); + +@@ -836,19 +846,24 @@ main (int argc, char **argv) + if (n_tests == 0xffffffff) + n_tests = 8000; + +- /* FIXME: seed 2005763 fails in set_lum() with divide by zero */ ++ if (getenv ("PIXMAN_RANDOMIZE_TESTS")) ++ { ++ seed = get_random_seed(); ++ printf ("First seed: 0x%08x\n", seed); ++ } ++ ++ if (use_threads) ++ { + #ifdef USE_OPENMP + # pragma omp parallel for default(none) shared(verbose, n_tests, mod, seed) + #endif +- for (i = seed; i < seed + n_tests; ++i) ++ for (i = seed; i < seed + n_tests; ++i) ++ run_test (i, verbose, mod); ++ } ++ else + { +- if (verbose) +- { +- if (mod == 0 || (i % mod) == 0) +- printf ("Seed %d\n", i); +- } +- +- run_test (i); ++ for (i = seed; i < seed + n_tests; ++i) ++ run_test (i, verbose, mod); + } + + return 0; +diff --git a/test/utils.c b/test/utils.c +index 4bf02e1..56701c4 100644 +--- a/test/utils.c ++++ b/test/utils.c +@@ -455,6 +455,16 @@ gettime (void) + #endif + } + ++uint32_t ++get_random_seed (void) ++{ ++ double d = gettime(); ++ ++ lcg_srand (*(uint32_t *)&d); ++ ++ return lcg_rand_u32 (); ++} ++ + static const char *global_msg; + + static void +diff --git a/test/utils.h b/test/utils.h +index a5183f7..615ad78 100644 +--- a/test/utils.h ++++ b/test/utils.h +@@ -79,6 +79,9 @@ make_random_bytes (int n_bytes); + double + gettime (void); + ++uint32_t ++get_random_seed (void); ++ + /* main body of the fuzzer test */ + int + fuzzer_test_main (const char *test_name, +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0027-Add-simple-support-for-the-r8g8b8a8-and-r8g8b8x8-for.patch b/recipes/xorg-lib/pixman-0.21.6/0027-Add-simple-support-for-the-r8g8b8a8-and-r8g8b8x8-for.patch new file mode 100644 index 0000000000..1dbac60586 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0027-Add-simple-support-for-the-r8g8b8a8-and-r8g8b8x8-for.patch @@ -0,0 +1,206 @@ +From f05a90e5f8d1d0af60e2c684cbe9f1327c33135a Mon Sep 17 00:00:00 2001 +From: Alexandros Frantzis +Date: Fri, 18 Mar 2011 14:36:15 +0200 +Subject: [PATCH 27/40] Add simple support for the r8g8b8a8 and r8g8b8x8 formats. + +This format is particularly useful on big-endian architectures, where RGBA in +memory/file order corresponds to r8g8b8a8 as an uint32_t. This is important +because RGBA is in some cases the only available choice (for example as a pixel +format in OpenGL ES 2.0). +--- + pixman/pixman-access.c | 97 ++++++++++++++++++++++++++++++++++++++++++++++++ + pixman/pixman.c | 6 +++ + pixman/pixman.h | 6 ++- + 3 files changed, 108 insertions(+), 1 deletions(-) + +diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c +index f1ce0ba..32c4d8b 100644 +--- a/pixman/pixman-access.c ++++ b/pixman/pixman-access.c +@@ -211,6 +211,46 @@ fetch_scanline_b8g8r8x8 (pixman_image_t *image, + } + + static void ++fetch_scanline_r8g8b8a8 (pixman_image_t *image, ++ int x, ++ int y, ++ int width, ++ uint32_t * buffer, ++ const uint32_t *mask) ++{ ++ const uint32_t *bits = image->bits.bits + y * image->bits.rowstride; ++ const uint32_t *pixel = (uint32_t *)bits + x; ++ const uint32_t *end = pixel + width; ++ ++ while (pixel < end) ++ { ++ uint32_t p = READ (image, pixel++); ++ ++ *buffer++ = (((p & 0x000000ff) << 24) | (p >> 8)); ++ } ++} ++ ++static void ++fetch_scanline_r8g8b8x8 (pixman_image_t *image, ++ int x, ++ int y, ++ int width, ++ uint32_t * buffer, ++ const uint32_t *mask) ++{ ++ const uint32_t *bits = image->bits.bits + y * image->bits.rowstride; ++ const uint32_t *pixel = (uint32_t *)bits + x; ++ const uint32_t *end = pixel + width; ++ ++ while (pixel < end) ++ { ++ uint32_t p = READ (image, pixel++); ++ ++ *buffer++ = (0xff000000 | (p >> 8)); ++ } ++} ++ ++static void + fetch_scanline_x14r6g6b6 (pixman_image_t *image, + int x, + int y, +@@ -1292,6 +1332,28 @@ fetch_pixel_b8g8r8x8 (bits_image_t *image, + } + + static uint32_t ++fetch_pixel_r8g8b8a8 (bits_image_t *image, ++ int offset, ++ int line) ++{ ++ uint32_t *bits = image->bits + line * image->rowstride; ++ uint32_t pixel = READ (image, (uint32_t *)bits + offset); ++ ++ return (((pixel & 0x000000ff) << 24) | (pixel >> 8)); ++} ++ ++static uint32_t ++fetch_pixel_r8g8b8x8 (bits_image_t *image, ++ int offset, ++ int line) ++{ ++ uint32_t *bits = image->bits + line * image->rowstride; ++ uint32_t pixel = READ (image, (uint32_t *)bits + offset); ++ ++ return (0xff000000 | (pixel >> 8)); ++} ++ ++static uint32_t + fetch_pixel_x14r6g6b6 (bits_image_t *image, + int offset, + int line) +@@ -2028,6 +2090,39 @@ store_scanline_b8g8r8x8 (bits_image_t * image, + } + + static void ++store_scanline_r8g8b8a8 (bits_image_t * image, ++ int x, ++ int y, ++ int width, ++ const uint32_t *values) ++{ ++ uint32_t *bits = image->bits + image->rowstride * y; ++ uint32_t *pixel = (uint32_t *)bits + x; ++ int i; ++ ++ for (i = 0; i < width; ++i) ++ { ++ WRITE (image, pixel++, ++ ((values[i] >> 24) & 0x000000ff) | (values[i] << 8)); ++ } ++} ++ ++static void ++store_scanline_r8g8b8x8 (bits_image_t * image, ++ int x, ++ int y, ++ int width, ++ const uint32_t *values) ++{ ++ uint32_t *bits = image->bits + image->rowstride * y; ++ uint32_t *pixel = (uint32_t *)bits + x; ++ int i; ++ ++ for (i = 0; i < width; ++i) ++ WRITE (image, pixel++, (values[i] << 8)); ++} ++ ++static void + store_scanline_x14r6g6b6 (bits_image_t * image, + int x, + int y, +@@ -2845,6 +2940,8 @@ static const format_info_t accessors[] = + FORMAT_INFO (x8b8g8r8), + FORMAT_INFO (b8g8r8a8), + FORMAT_INFO (b8g8r8x8), ++ FORMAT_INFO (r8g8b8a8), ++ FORMAT_INFO (r8g8b8x8), + FORMAT_INFO (x14r6g6b6), + + /* 24bpp formats */ +diff --git a/pixman/pixman.c b/pixman/pixman.c +index ec565f9..f21af2f 100644 +--- a/pixman/pixman.c ++++ b/pixman/pixman.c +@@ -873,6 +873,8 @@ color_to_pixel (pixman_color_t * color, + format == PIXMAN_x8b8g8r8 || + format == PIXMAN_b8g8r8a8 || + format == PIXMAN_b8g8r8x8 || ++ format == PIXMAN_r8g8b8a8 || ++ format == PIXMAN_r8g8b8x8 || + format == PIXMAN_r5g6b5 || + format == PIXMAN_b5g6r5 || + format == PIXMAN_a8 || +@@ -895,6 +897,8 @@ color_to_pixel (pixman_color_t * color, + ((c & 0x0000ff00) << 8) | + ((c & 0x000000ff) << 24); + } ++ if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_RGBA) ++ c = ((c & 0xff000000) >> 24) | (c << 8); + + if (format == PIXMAN_a1) + c = c >> 31; +@@ -1105,6 +1109,8 @@ pixman_format_supported_source (pixman_format_code_t format) + case PIXMAN_x8b8g8r8: + case PIXMAN_b8g8r8a8: + case PIXMAN_b8g8r8x8: ++ case PIXMAN_r8g8b8a8: ++ case PIXMAN_r8g8b8x8: + case PIXMAN_r8g8b8: + case PIXMAN_b8g8r8: + case PIXMAN_r5g6b5: +diff --git a/pixman/pixman.h b/pixman/pixman.h +index 1305bc1..59d0760 100644 +--- a/pixman/pixman.h ++++ b/pixman/pixman.h +@@ -650,11 +650,13 @@ struct pixman_indexed + #define PIXMAN_TYPE_YUY2 6 + #define PIXMAN_TYPE_YV12 7 + #define PIXMAN_TYPE_BGRA 8 ++#define PIXMAN_TYPE_RGBA 9 + + #define PIXMAN_FORMAT_COLOR(f) \ + (PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ARGB || \ + PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_ABGR || \ +- PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_BGRA) ++ PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_BGRA || \ ++ PIXMAN_FORMAT_TYPE(f) == PIXMAN_TYPE_RGBA) + + /* 32bpp formats */ + typedef enum { +@@ -664,6 +666,8 @@ typedef enum { + PIXMAN_x8b8g8r8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ABGR,0,8,8,8), + PIXMAN_b8g8r8a8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,8,8,8,8), + PIXMAN_b8g8r8x8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_BGRA,0,8,8,8), ++ PIXMAN_r8g8b8a8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_RGBA,8,8,8,8), ++ PIXMAN_r8g8b8x8 = PIXMAN_FORMAT(32,PIXMAN_TYPE_RGBA,0,8,8,8), + PIXMAN_x14r6g6b6 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,6,6,6), + PIXMAN_x2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,0,10,10,10), + PIXMAN_a2r10g10b10 = PIXMAN_FORMAT(32,PIXMAN_TYPE_ARGB,2,10,10,10), +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0028-Add-support-for-the-r8g8b8a8-and-r8g8b8x8-formats-to.patch b/recipes/xorg-lib/pixman-0.21.6/0028-Add-support-for-the-r8g8b8a8-and-r8g8b8x8-formats-to.patch new file mode 100644 index 0000000000..7809e2ae4a --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0028-Add-support-for-the-r8g8b8a8-and-r8g8b8x8-formats-to.patch @@ -0,0 +1,110 @@ +From b514e63cfc58af21f7097db5a1b04292a758782a Mon Sep 17 00:00:00 2001 +From: Alexandros Frantzis +Date: Fri, 18 Mar 2011 14:37:27 +0200 +Subject: [PATCH 28/40] Add support for the r8g8b8a8 and r8g8b8x8 formats to the tests. + +--- + test/blitters-test.c | 9 +++++++-- + test/composite.c | 9 +++++++++ + test/fetch-test.c | 10 ++++++++++ + test/stress-test.c | 2 ++ + 4 files changed, 28 insertions(+), 2 deletions(-) + +diff --git a/test/blitters-test.c b/test/blitters-test.c +index 63e7cb3..3ecfb09 100644 +--- a/test/blitters-test.c ++++ b/test/blitters-test.c +@@ -88,8 +88,11 @@ free_random_image (uint32_t initcrc, + uint32_t *data = pixman_image_get_data (img); + uint32_t mask = (1 << PIXMAN_FORMAT_DEPTH (fmt)) - 1; + +- if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_BGRA) ++ if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_BGRA || ++ PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_RGBA) ++ { + mask <<= (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt)); ++ } + + for (i = 0; i < 32; i++) + mask |= mask << (i * PIXMAN_FORMAT_BPP (fmt)); +@@ -182,6 +185,8 @@ static pixman_format_code_t img_fmt_list[] = { + PIXMAN_x8b8g8r8, + PIXMAN_b8g8r8a8, + PIXMAN_b8g8r8x8, ++ PIXMAN_r8g8b8a8, ++ PIXMAN_r8g8b8x8, + PIXMAN_x14r6g6b6, + PIXMAN_r8g8b8, + PIXMAN_b8g8r8, +@@ -412,6 +417,6 @@ main (int argc, const char *argv[]) + } + + return fuzzer_test_main("blitters", 2000000, +- 0x1DB8BDF8, ++ 0x265CDFEB, + test_composite, argc, argv); + } +diff --git a/test/composite.c b/test/composite.c +index e6d52b9..b0e0ba4 100644 +--- a/test/composite.c ++++ b/test/composite.c +@@ -102,6 +102,8 @@ static const format_t formats[] = + P(x8b8g8r8), + P(b8g8r8a8), + P(b8g8r8x8), ++ P(r8g8b8a8), ++ P(r8g8b8x8), + P(x2r10g10b10), + P(x2b10g10r10), + P(a2r10g10b10), +@@ -556,6 +558,13 @@ get_pixel (pixman_image_t *image, + bs = g + gs; + break; + ++ case PIXMAN_TYPE_RGBA: ++ as = 0; ++ bs = PIXMAN_FORMAT_BPP (format) - (b + g + r); ++ gs = b + bs; ++ rs = g + gs; ++ break; ++ + case PIXMAN_TYPE_A: + as = 0; + rs = 0; +diff --git a/test/fetch-test.c b/test/fetch-test.c +index 60bc765..feb98d9 100644 +--- a/test/fetch-test.c ++++ b/test/fetch-test.c +@@ -34,6 +34,16 @@ static testcase_t testcases[] = + NULL, + }, + { ++ PIXMAN_r8g8b8a8, ++ 2, 2, ++ 8, ++ { 0x11223300, 0x55667744, ++ 0x99aabb88, 0xddeeffcc }, ++ { 0x00112233, 0x44556677, ++ 0x8899aabb, 0xccddeeff }, ++ NULL, ++ }, ++ { + PIXMAN_g1, + 8, 2, + 4, +diff --git a/test/stress-test.c b/test/stress-test.c +index d496f93..571420a 100644 +--- a/test/stress-test.c ++++ b/test/stress-test.c +@@ -19,6 +19,8 @@ static const pixman_format_code_t image_formats[] = + PIXMAN_x8b8g8r8, + PIXMAN_b8g8r8a8, + PIXMAN_b8g8r8x8, ++ PIXMAN_r8g8b8a8, ++ PIXMAN_r8g8b8x8, + PIXMAN_x14r6g6b6, + PIXMAN_r8g8b8, + PIXMAN_b8g8r8, +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0029-test-Fix-infinite-loop-in-composite.patch b/recipes/xorg-lib/pixman-0.21.6/0029-test-Fix-infinite-loop-in-composite.patch new file mode 100644 index 0000000000..d9e4a380ee --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0029-test-Fix-infinite-loop-in-composite.patch @@ -0,0 +1,37 @@ +From ad3cbfb073fc325e1b3152898ca71b8255675957 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?S=C3=B8ren=20Sandmann=20Pedersen?= +Date: Tue, 22 Mar 2011 13:42:05 -0400 +Subject: [PATCH 29/40] test: Fix infinite loop in composite + +When run in PIXMAN_RANDOMIZE_TESTS mode, this test would go into an +infinite loop because the loop started at 'seed' but the stop +condition was still N_TESTS. +--- + test/composite.c | 8 ++++---- + 1 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/test/composite.c b/test/composite.c +index b0e0ba4..9a001e5 100644 +--- a/test/composite.c ++++ b/test/composite.c +@@ -909,13 +909,13 @@ main (int argc, char **argv) + #ifdef USE_OPENMP + # pragma omp parallel for default(none) shared(result, argv, seed) + #endif +- for (i = seed; i <= N_TESTS; ++i) ++ for (i = 0; i <= N_TESTS; ++i) + { +- if (!result && !run_test (i)) ++ if (!result && !run_test (i + seed)) + { +- printf ("Test 0x%08X failed.\n", i); ++ printf ("Test 0x%08X failed.\n", seed + i); + +- result = i; ++ result = seed + i; + } + } + +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0030-ARM-tweaked-horizontal-weights-update-in-NEON-biline.patch b/recipes/xorg-lib/pixman-0.21.6/0030-ARM-tweaked-horizontal-weights-update-in-NEON-biline.patch new file mode 100644 index 0000000000..831065cb3e --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0030-ARM-tweaked-horizontal-weights-update-in-NEON-biline.patch @@ -0,0 +1,82 @@ +From 4a0ade2a1e96fe3f1bca8953be221af0b2908925 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Thu, 10 Mar 2011 15:34:10 +0200 +Subject: [PATCH 30/40] ARM: tweaked horizontal weights update in NEON bilinear scaling code + +Moving horizontal interpolation weights update instructions from the +beginning of loop to its end allows to hide some pipeline stalls and +improve performance. +--- + pixman/pixman-arm-neon-asm.S | 20 +++++++++++--------- + 1 files changed, 11 insertions(+), 9 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index 71b30ac..8788e95 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2558,8 +2558,7 @@ fname: + bilinear_load_&src_fmt d0, d1, d2 + vmull.u8 q1, d0, d28 + vmlal.u8 q1, d1, d29 +- vshr.u16 d30, d24, #8 +- /* 4 cycles bubble */ ++ /* 5 cycles bubble */ + vshll.u16 q0, d2, #8 + vmlsl.u16 q0, d2, d30 + vmlal.u16 q0, d3, d30 +@@ -2574,17 +2573,17 @@ fname: + .macro bilinear_interpolate_two_pixels src_fmt, dst_fmt + bilinear_load_and_vertical_interpolate_two_&src_fmt \ + q1, q11, d0, d1, d20, d21, d22, d23 +- vshr.u16 q15, q12, #8 +- vadd.u16 q12, q12, q13 + vshll.u16 q0, d2, #8 + vmlsl.u16 q0, d2, d30 + vmlal.u16 q0, d3, d30 + vshll.u16 q10, d22, #8 + vmlsl.u16 q10, d22, d31 + vmlal.u16 q10, d23, d31 +- vshrn.u32 d30, q0, #16 +- vshrn.u32 d31, q10, #16 +- vmovn.u16 d0, q15 ++ vshrn.u32 d0, q0, #16 ++ vshrn.u32 d1, q10, #16 ++ vshr.u16 q15, q12, #8 ++ vadd.u16 q12, q12, q13 ++ vmovn.u16 d0, q0 + bilinear_store_&dst_fmt 2, q2, q3 + .endm + +@@ -2593,8 +2592,6 @@ fname: + q1, q11, d0, d1, d20, d21, d22, d23 \ + q3, q9, d4, d5, d16, d17, d18, d19 + pld [TMP1, PF_OFFS] +- vshr.u16 q15, q12, #8 +- vadd.u16 q12, q12, q13 + vshll.u16 q0, d2, #8 + vmlsl.u16 q0, d2, d30 + vmlal.u16 q0, d3, d30 +@@ -2614,8 +2611,10 @@ fname: + vshrn.u32 d1, q10, #16 + vshrn.u32 d4, q2, #16 + vshrn.u32 d5, q8, #16 ++ vshr.u16 q15, q12, #8 + vmovn.u16 d0, q0 + vmovn.u16 d1, q2 ++ vadd.u16 q12, q12, q13 + bilinear_store_&dst_fmt 4, q2, q3 + .endm + +@@ -2669,6 +2668,9 @@ pixman_asm_function fname + vadd.u16 d25, d25, d26 + vadd.u16 q13, q13, q13 + ++ vshr.u16 q15, q12, #8 ++ vadd.u16 q12, q12, q13 ++ + subs WIDTH, WIDTH, #4 + blt 1f + mov PF_OFFS, PF_OFFS, asr #(16 - bpp_shift) +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0031-ARM-use-aligned-memory-writes-in-NEON-bilinear-scali.patch b/recipes/xorg-lib/pixman-0.21.6/0031-ARM-use-aligned-memory-writes-in-NEON-bilinear-scali.patch new file mode 100644 index 0000000000..3c8394b983 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0031-ARM-use-aligned-memory-writes-in-NEON-bilinear-scali.patch @@ -0,0 +1,124 @@ +From f36c189475951276766b2653ae9628c4d02dc0c9 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Thu, 10 Mar 2011 16:12:23 +0200 +Subject: [PATCH 31/40] ARM: use aligned memory writes in NEON bilinear scaling code + +--- + pixman/pixman-arm-neon-asm.S | 49 ++++++++++++++++++++++++++++++------------ + 1 files changed, 35 insertions(+), 14 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index 8788e95..a4d6a9a 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2527,9 +2527,9 @@ fname: + + .macro bilinear_store_8888 numpix, tmp1, tmp2 + .if numpix == 4 +- vst1.32 {d0, d1}, [OUT]! ++ vst1.32 {d0, d1}, [OUT, :128]! + .elseif numpix == 2 +- vst1.32 {d0}, [OUT]! ++ vst1.32 {d0}, [OUT, :64]! + .elseif numpix == 1 + vst1.32 {d0[0]}, [OUT, :32]! + .else +@@ -2544,11 +2544,11 @@ fname: + vuzp.u8 d0, d2 + convert_8888_to_0565 d2, d1, d0, q1, tmp1, tmp2 + .if numpix == 4 +- vst1.16 {d2}, [OUT]! ++ vst1.16 {d2}, [OUT, :64]! + .elseif numpix == 2 +- vst1.32 {d2[0]}, [OUT]! ++ vst1.32 {d2[0]}, [OUT, :32]! + .elseif numpix == 1 +- vst1.16 {d2[0]}, [OUT]! ++ vst1.16 {d2[0]}, [OUT, :16]! + .else + .error bilinear_store_0565 numpix is unsupported + .endif +@@ -2622,8 +2622,7 @@ fname: + * Main template macro for generating NEON optimized bilinear scanline + * functions. + * +- * TODO: use software pipelining and aligned writes to the destination buffer +- * in order to improve performance ++ * TODO: use software pipelining in order to improve performance + * + * Bilinear scanline scaler macro template uses the following arguments: + * fname - name of the function to generate +@@ -2635,7 +2634,8 @@ fname: + */ + + .macro generate_bilinear_scanline_func fname, src_fmt, dst_fmt, \ +- bpp_shift, prefetch_distance ++ src_bpp_shift, dst_bpp_shift, \ ++ prefetch_distance + + pixman_asm_function fname + OUT .req r0 +@@ -2666,19 +2666,40 @@ pixman_asm_function fname + vdup.u8 d28, WT + vdup.u8 d29, WB + vadd.u16 d25, d25, d26 +- vadd.u16 q13, q13, q13 + ++ /* ensure good destination alignment */ ++ cmp WIDTH, #1 ++ blt 0f ++ tst OUT, #(1 << dst_bpp_shift) ++ beq 0f ++ vshr.u16 q15, q12, #8 ++ vadd.u16 q12, q12, q13 ++ bilinear_interpolate_last_pixel src_fmt, dst_fmt ++ sub WIDTH, WIDTH, #1 ++0: ++ vadd.u16 q13, q13, q13 + vshr.u16 q15, q12, #8 + vadd.u16 q12, q12, q13 + ++ cmp WIDTH, #2 ++ blt 0f ++ tst OUT, #(1 << (dst_bpp_shift + 1)) ++ beq 0f ++ bilinear_interpolate_two_pixels src_fmt, dst_fmt ++ sub WIDTH, WIDTH, #2 ++0: ++ ++ /* start the main loop */ + subs WIDTH, WIDTH, #4 + blt 1f +- mov PF_OFFS, PF_OFFS, asr #(16 - bpp_shift) ++ mov PF_OFFS, PF_OFFS, asr #(16 - src_bpp_shift) + 0: + bilinear_interpolate_four_pixels src_fmt, dst_fmt + subs WIDTH, WIDTH, #4 + bge 0b + 1: ++ ++ /* handle the remaining trailing pixels */ + tst WIDTH, #2 + beq 2f + bilinear_interpolate_two_pixels src_fmt, dst_fmt +@@ -2708,13 +2729,13 @@ pixman_asm_function fname + .endm + + generate_bilinear_scanline_func \ +- pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon, 8888, 8888, 2, 28 ++ pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon, 8888, 8888, 2, 2, 28 + + generate_bilinear_scanline_func \ +- pixman_scaled_bilinear_scanline_8888_0565_SRC_asm_neon, 8888, 0565, 2, 28 ++ pixman_scaled_bilinear_scanline_8888_0565_SRC_asm_neon, 8888, 0565, 2, 1, 28 + + generate_bilinear_scanline_func \ +- pixman_scaled_bilinear_scanline_0565_x888_SRC_asm_neon, 0565, 8888, 1, 28 ++ pixman_scaled_bilinear_scanline_0565_x888_SRC_asm_neon, 0565, 8888, 1, 2, 28 + + generate_bilinear_scanline_func \ +- pixman_scaled_bilinear_scanline_0565_0565_SRC_asm_neon, 0565, 0565, 1, 28 ++ pixman_scaled_bilinear_scanline_0565_0565_SRC_asm_neon, 0565, 0565, 1, 1, 28 +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0032-ARM-support-for-software-pipelining-in-bilinear-macr.patch b/recipes/xorg-lib/pixman-0.21.6/0032-ARM-support-for-software-pipelining-in-bilinear-macr.patch new file mode 100644 index 0000000000..c67f9c638f --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0032-ARM-support-for-software-pipelining-in-bilinear-macr.patch @@ -0,0 +1,70 @@ +From 6d296598575b8307262fac2cf438d7cc832d09d3 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Wed, 16 Mar 2011 16:33:41 +0200 +Subject: [PATCH 32/40] ARM: support for software pipelining in bilinear macros + +Now it's possible to override the main loop of bilinear scaling code +with optimized pipelined implementation. +--- + pixman/pixman-arm-neon-asm.S | 31 ++++++++++++++++++++++++++++--- + 1 files changed, 28 insertions(+), 3 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index a4d6a9a..d84f2cc 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2618,12 +2618,32 @@ fname: + bilinear_store_&dst_fmt 4, q2, q3 + .endm + ++.macro bilinear_interpolate_four_pixels_head src_fmt, dst_fmt ++.ifdef have_bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt ++ bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt&_head ++.else ++ bilinear_interpolate_four_pixels src_fmt, dst_fmt ++.endif ++.endm ++ ++.macro bilinear_interpolate_four_pixels_tail src_fmt, dst_fmt ++.ifdef have_bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt ++ bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt&_tail ++.endif ++.endm ++ ++.macro bilinear_interpolate_four_pixels_tail_head src_fmt, dst_fmt ++.ifdef have_bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt ++ bilinear_interpolate_four_pixels_&src_fmt&_&dst_fmt&_tail_head ++.else ++ bilinear_interpolate_four_pixels src_fmt, dst_fmt ++.endif ++.endm ++ + /* + * Main template macro for generating NEON optimized bilinear scanline + * functions. + * +- * TODO: use software pipelining in order to improve performance +- * + * Bilinear scanline scaler macro template uses the following arguments: + * fname - name of the function to generate + * src_fmt - source color format (8888 or 0565) +@@ -2693,10 +2713,15 @@ pixman_asm_function fname + subs WIDTH, WIDTH, #4 + blt 1f + mov PF_OFFS, PF_OFFS, asr #(16 - src_bpp_shift) ++ bilinear_interpolate_four_pixels_head src_fmt, dst_fmt ++ subs WIDTH, WIDTH, #4 ++ blt 5f + 0: +- bilinear_interpolate_four_pixels src_fmt, dst_fmt ++ bilinear_interpolate_four_pixels_tail_head src_fmt, dst_fmt + subs WIDTH, WIDTH, #4 + bge 0b ++5: ++ bilinear_interpolate_four_pixels_tail src_fmt, dst_fmt + 1: + + /* handle the remaining trailing pixels */ +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0033-ARM-use-less-ARM-instructions-in-NEON-bilinear-scali.patch b/recipes/xorg-lib/pixman-0.21.6/0033-ARM-use-less-ARM-instructions-in-NEON-bilinear-scali.patch new file mode 100644 index 0000000000..1d66979f99 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0033-ARM-use-less-ARM-instructions-in-NEON-bilinear-scali.patch @@ -0,0 +1,168 @@ +From ec2da8e651767421a8403bf0810445fdec1315ba Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Mon, 21 Mar 2011 18:41:53 +0200 +Subject: [PATCH 33/40] ARM: use less ARM instructions in NEON bilinear scaling code + +This reduces code size and also puts less pressure on the +instruction decoder. +--- + pixman/pixman-arm-neon-asm.S | 79 ++++++++++++++++++++---------------------- + 1 files changed, 38 insertions(+), 41 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index d84f2cc..9878bf7 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2412,21 +2412,19 @@ fname: + */ + + .macro bilinear_load_8888 reg1, reg2, tmp +- mov TMP2, X, asr #16 ++ mov TMP1, X, asr #16 + add X, X, UX +- add TMP1, TOP, TMP2, asl #2 +- add TMP2, BOTTOM, TMP2, asl #2 +- vld1.32 {reg1}, [TMP1] +- vld1.32 {reg2}, [TMP2] ++ add TMP1, TOP, TMP1, asl #2 ++ vld1.32 {reg1}, [TMP1], STRIDE ++ vld1.32 {reg2}, [TMP1] + .endm + + .macro bilinear_load_0565 reg1, reg2, tmp +- mov TMP2, X, asr #16 ++ mov TMP1, X, asr #16 + add X, X, UX +- add TMP1, TOP, TMP2, asl #1 +- add TMP2, BOTTOM, TMP2, asl #1 +- vld1.32 {reg2[0]}, [TMP1] +- vld1.32 {reg2[1]}, [TMP2] ++ add TMP1, TOP, TMP1, asl #1 ++ vld1.32 {reg2[0]}, [TMP1], STRIDE ++ vld1.32 {reg2[1]}, [TMP1] + convert_four_0565_to_x888_packed reg2, reg1, reg2, tmp + .endm + +@@ -2454,18 +2452,16 @@ fname: + .macro bilinear_load_and_vertical_interpolate_two_0565 \ + acc1, acc2, reg1, reg2, reg3, reg4, acc2lo, acc2hi + +- mov TMP2, X, asr #16 ++ mov TMP1, X, asr #16 + add X, X, UX +- mov TMP4, X, asr #16 ++ add TMP1, TOP, TMP1, asl #1 ++ mov TMP2, X, asr #16 + add X, X, UX +- add TMP1, TOP, TMP2, asl #1 +- add TMP2, BOTTOM, TMP2, asl #1 +- add TMP3, TOP, TMP4, asl #1 +- add TMP4, BOTTOM, TMP4, asl #1 +- vld1.32 {acc2lo[0]}, [TMP1] +- vld1.32 {acc2hi[0]}, [TMP3] +- vld1.32 {acc2lo[1]}, [TMP2] +- vld1.32 {acc2hi[1]}, [TMP4] ++ add TMP2, TOP, TMP2, asl #1 ++ vld1.32 {acc2lo[0]}, [TMP1], STRIDE ++ vld1.32 {acc2hi[0]}, [TMP2], STRIDE ++ vld1.32 {acc2lo[1]}, [TMP1] ++ vld1.32 {acc2hi[1]}, [TMP2] + convert_0565_to_x888 acc2, reg3, reg2, reg1 + vzip.u8 reg1, reg3 + vzip.u8 reg2, reg4 +@@ -2481,34 +2477,30 @@ fname: + xacc1, xacc2, xreg1, xreg2, xreg3, xreg4, xacc2lo, xacc2hi \ + yacc1, yacc2, yreg1, yreg2, yreg3, yreg4, yacc2lo, yacc2hi + +- mov TMP2, X, asr #16 ++ mov TMP1, X, asr #16 + add X, X, UX +- mov TMP4, X, asr #16 ++ add TMP1, TOP, TMP1, asl #1 ++ mov TMP2, X, asr #16 + add X, X, UX +- add TMP1, TOP, TMP2, asl #1 +- add TMP2, BOTTOM, TMP2, asl #1 +- add TMP3, TOP, TMP4, asl #1 +- add TMP4, BOTTOM, TMP4, asl #1 +- vld1.32 {xacc2lo[0]}, [TMP1] +- vld1.32 {xacc2hi[0]}, [TMP3] +- vld1.32 {xacc2lo[1]}, [TMP2] +- vld1.32 {xacc2hi[1]}, [TMP4] ++ add TMP2, TOP, TMP2, asl #1 ++ vld1.32 {xacc2lo[0]}, [TMP1], STRIDE ++ vld1.32 {xacc2hi[0]}, [TMP2], STRIDE ++ vld1.32 {xacc2lo[1]}, [TMP1] ++ vld1.32 {xacc2hi[1]}, [TMP2] + convert_0565_to_x888 xacc2, xreg3, xreg2, xreg1 +- mov TMP2, X, asr #16 ++ mov TMP1, X, asr #16 + add X, X, UX +- mov TMP4, X, asr #16 ++ add TMP1, TOP, TMP1, asl #1 ++ mov TMP2, X, asr #16 + add X, X, UX +- add TMP1, TOP, TMP2, asl #1 +- add TMP2, BOTTOM, TMP2, asl #1 +- add TMP3, TOP, TMP4, asl #1 +- add TMP4, BOTTOM, TMP4, asl #1 +- vld1.32 {yacc2lo[0]}, [TMP1] ++ add TMP2, TOP, TMP2, asl #1 ++ vld1.32 {yacc2lo[0]}, [TMP1], STRIDE + vzip.u8 xreg1, xreg3 +- vld1.32 {yacc2hi[0]}, [TMP3] ++ vld1.32 {yacc2hi[0]}, [TMP2], STRIDE + vzip.u8 xreg2, xreg4 +- vld1.32 {yacc2lo[1]}, [TMP2] ++ vld1.32 {yacc2lo[1]}, [TMP1] + vzip.u8 xreg3, xreg4 +- vld1.32 {yacc2hi[1]}, [TMP4] ++ vld1.32 {yacc2hi[1]}, [TMP2] + vzip.u8 xreg1, xreg2 + convert_0565_to_x888 yacc2, yreg3, yreg2, yreg1 + vmull.u8 xacc1, xreg1, d28 +@@ -2592,6 +2584,7 @@ fname: + q1, q11, d0, d1, d20, d21, d22, d23 \ + q3, q9, d4, d5, d16, d17, d18, d19 + pld [TMP1, PF_OFFS] ++ sub TMP1, TMP1, STRIDE + vshll.u16 q0, d2, #8 + vmlsl.u16 q0, d2, d30 + vmlal.u16 q0, d3, d30 +@@ -2671,6 +2664,7 @@ pixman_asm_function fname + PF_OFFS .req r7 + TMP3 .req r8 + TMP4 .req r9 ++ STRIDE .req r2 + + mov ip, sp + push {r4, r5, r6, r7, r8, r9} +@@ -2678,6 +2672,9 @@ pixman_asm_function fname + ldmia ip, {WB, X, UX, WIDTH} + mul PF_OFFS, PF_OFFS, UX + ++ sub STRIDE, BOTTOM, TOP ++ .unreq BOTTOM ++ + cmp WIDTH, #0 + ble 3f + +@@ -2738,7 +2735,6 @@ pixman_asm_function fname + + .unreq OUT + .unreq TOP +- .unreq BOTTOM + .unreq WT + .unreq WB + .unreq X +@@ -2749,6 +2745,7 @@ pixman_asm_function fname + .unreq PF_OFFS + .unreq TMP3 + .unreq TMP4 ++ .unreq STRIDE + .endfunc + + .endm +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0034-ARM-support-different-levels-of-loop-unrolling-in-bi.patch b/recipes/xorg-lib/pixman-0.21.6/0034-ARM-support-different-levels-of-loop-unrolling-in-bi.patch new file mode 100644 index 0000000000..82661f0869 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0034-ARM-support-different-levels-of-loop-unrolling-in-bi.patch @@ -0,0 +1,156 @@ +From cd20ceb7602348ecbfa0db1756dc548a0bad3c9d Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Thu, 17 Mar 2011 19:42:01 +0200 +Subject: [PATCH 34/40] ARM: support different levels of loop unrolling in bilinear scaler + +Now an extra 'flag' parameter is supported in bilinear scaline scaling +function generation macro. It can be used to enable 4 or 8 pixels per +loop iteration unrolling and provide save/restore code for d8-d15 +registers. +--- + pixman/pixman-arm-neon-asm.S | 84 ++++++++++++++++++++++++++++++++++++++---- + 1 files changed, 76 insertions(+), 8 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index 9878bf7..6141770 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2633,6 +2633,36 @@ fname: + .endif + .endm + ++.macro bilinear_interpolate_eight_pixels_head src_fmt, dst_fmt ++.ifdef have_bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt ++ bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt&_head ++.else ++ bilinear_interpolate_four_pixels_head src_fmt, dst_fmt ++ bilinear_interpolate_four_pixels_tail_head src_fmt, dst_fmt ++.endif ++.endm ++ ++.macro bilinear_interpolate_eight_pixels_tail src_fmt, dst_fmt ++.ifdef have_bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt ++ bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt&_tail ++.else ++ bilinear_interpolate_four_pixels_tail src_fmt, dst_fmt ++.endif ++.endm ++ ++.macro bilinear_interpolate_eight_pixels_tail_head src_fmt, dst_fmt ++.ifdef have_bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt ++ bilinear_interpolate_eight_pixels_&src_fmt&_&dst_fmt&_tail_head ++.else ++ bilinear_interpolate_four_pixels_tail_head src_fmt, dst_fmt ++ bilinear_interpolate_four_pixels_tail_head src_fmt, dst_fmt ++.endif ++.endm ++ ++.set BILINEAR_FLAG_UNROLL_4, 0 ++.set BILINEAR_FLAG_UNROLL_8, 1 ++.set BILINEAR_FLAG_USE_ALL_NEON_REGS, 2 ++ + /* + * Main template macro for generating NEON optimized bilinear scanline + * functions. +@@ -2648,7 +2678,7 @@ fname: + + .macro generate_bilinear_scanline_func fname, src_fmt, dst_fmt, \ + src_bpp_shift, dst_bpp_shift, \ +- prefetch_distance ++ prefetch_distance, flags + + pixman_asm_function fname + OUT .req r0 +@@ -2672,6 +2702,10 @@ pixman_asm_function fname + ldmia ip, {WB, X, UX, WIDTH} + mul PF_OFFS, PF_OFFS, UX + ++.if ((flags) & BILINEAR_FLAG_USE_ALL_NEON_REGS) != 0 ++ vpush {d8-d15} ++.endif ++ + sub STRIDE, BOTTOM, TOP + .unreq BOTTOM + +@@ -2705,8 +2739,34 @@ pixman_asm_function fname + bilinear_interpolate_two_pixels src_fmt, dst_fmt + sub WIDTH, WIDTH, #2 + 0: +- +- /* start the main loop */ ++.if ((flags) & BILINEAR_FLAG_UNROLL_8) != 0 ++/*********** 8 pixels per iteration *****************/ ++ cmp WIDTH, #4 ++ blt 0f ++ tst OUT, #(1 << (dst_bpp_shift + 2)) ++ beq 0f ++ bilinear_interpolate_four_pixels src_fmt, dst_fmt ++ sub WIDTH, WIDTH, #4 ++0: ++ subs WIDTH, WIDTH, #8 ++ blt 1f ++ mov PF_OFFS, PF_OFFS, asr #(16 - src_bpp_shift) ++ bilinear_interpolate_eight_pixels_head src_fmt, dst_fmt ++ subs WIDTH, WIDTH, #8 ++ blt 5f ++0: ++ bilinear_interpolate_eight_pixels_tail_head src_fmt, dst_fmt ++ subs WIDTH, WIDTH, #8 ++ bge 0b ++5: ++ bilinear_interpolate_eight_pixels_tail src_fmt, dst_fmt ++1: ++ tst WIDTH, #4 ++ beq 2f ++ bilinear_interpolate_four_pixels src_fmt, dst_fmt ++2: ++.else ++/*********** 4 pixels per iteration *****************/ + subs WIDTH, WIDTH, #4 + blt 1f + mov PF_OFFS, PF_OFFS, asr #(16 - src_bpp_shift) +@@ -2720,7 +2780,8 @@ pixman_asm_function fname + 5: + bilinear_interpolate_four_pixels_tail src_fmt, dst_fmt + 1: +- ++/****************************************************/ ++.endif + /* handle the remaining trailing pixels */ + tst WIDTH, #2 + beq 2f +@@ -2730,6 +2791,9 @@ pixman_asm_function fname + beq 3f + bilinear_interpolate_last_pixel src_fmt, dst_fmt + 3: ++.if ((flags) & BILINEAR_FLAG_USE_ALL_NEON_REGS) != 0 ++ vpop {d8-d15} ++.endif + pop {r4, r5, r6, r7, r8, r9} + bx lr + +@@ -2751,13 +2815,17 @@ pixman_asm_function fname + .endm + + generate_bilinear_scanline_func \ +- pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon, 8888, 8888, 2, 2, 28 ++ pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon, 8888, 8888, \ ++ 2, 2, 28, BILINEAR_FLAG_UNROLL_4 + + generate_bilinear_scanline_func \ +- pixman_scaled_bilinear_scanline_8888_0565_SRC_asm_neon, 8888, 0565, 2, 1, 28 ++ pixman_scaled_bilinear_scanline_8888_0565_SRC_asm_neon, 8888, 0565, \ ++ 2, 1, 28, BILINEAR_FLAG_UNROLL_4 + + generate_bilinear_scanline_func \ +- pixman_scaled_bilinear_scanline_0565_x888_SRC_asm_neon, 0565, 8888, 1, 2, 28 ++ pixman_scaled_bilinear_scanline_0565_x888_SRC_asm_neon, 0565, 8888, \ ++ 1, 2, 28, BILINEAR_FLAG_UNROLL_4 + + generate_bilinear_scanline_func \ +- pixman_scaled_bilinear_scanline_0565_0565_SRC_asm_neon, 0565, 0565, 1, 1, 28 ++ pixman_scaled_bilinear_scanline_0565_0565_SRC_asm_neon, 0565, 0565, \ ++ 1, 1, 28, BILINEAR_FLAG_UNROLL_4 +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0035-ARM-pipelined-NEON-implementation-of-bilinear-scaled.patch b/recipes/xorg-lib/pixman-0.21.6/0035-ARM-pipelined-NEON-implementation-of-bilinear-scaled.patch new file mode 100644 index 0000000000..c0d485cae4 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0035-ARM-pipelined-NEON-implementation-of-bilinear-scaled.patch @@ -0,0 +1,166 @@ +From d3b1ca20fe8af20ca097dcc8799ef25cee03dd6b Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Wed, 16 Mar 2011 17:24:49 +0200 +Subject: [PATCH 35/40] ARM: pipelined NEON implementation of bilinear scaled 'src_8888_8888' + +Performance of the inner loop when working with the data in L1 cache: + ARM Cortex-A8: 41 cycles per 4 pixels (no stalls and partial dual issue) + ARM Cortex-A9: 48 cycles per 4 pixels (no stalls) + +It might be still possible to improve performance even more on ARM Cortex-A8 +with a better use of dual issue. + +Benchmark on ARM Cortex-A8 r1p3 @600MHz, 32-bit LPDDR @166MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=20028888, dst=20028888, speed=40.38 MPix/s + after: op=1, src=20028888, dst=20028888, speed=48.47 MPix/s + +Benchmark on ARM Cortex-A8 r2p2 @1GHz, 32-bit LPDDR @200MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=20028888, dst=20028888, speed=79.68 MPix/s + after: op=1, src=20028888, dst=20028888, speed=93.11 MPix/s +--- + pixman/pixman-arm-neon-asm.S | 127 ++++++++++++++++++++++++++++++++++++++++++ + 1 files changed, 127 insertions(+), 0 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index 6141770..326e085 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2814,6 +2814,133 @@ pixman_asm_function fname + + .endm + ++/*****************************************************************************/ ++ ++.set have_bilinear_interpolate_four_pixels_8888_8888, 1 ++ ++.macro bilinear_interpolate_four_pixels_8888_8888_head ++ mov TMP1, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP2, TOP, TMP2, asl #2 ++ ++ vld1.32 {d22}, [TMP1], STRIDE ++ vld1.32 {d23}, [TMP1] ++ mov TMP3, X, asr #16 ++ add X, X, UX ++ add TMP3, TOP, TMP3, asl #2 ++ vmull.u8 q8, d22, d28 ++ vmlal.u8 q8, d23, d29 ++ ++ vld1.32 {d22}, [TMP2], STRIDE ++ vld1.32 {d23}, [TMP2] ++ mov TMP4, X, asr #16 ++ add X, X, UX ++ add TMP4, TOP, TMP4, asl #2 ++ vmull.u8 q9, d22, d28 ++ vmlal.u8 q9, d23, d29 ++ ++ vld1.32 {d22}, [TMP3], STRIDE ++ vld1.32 {d23}, [TMP3] ++ vmull.u8 q10, d22, d28 ++ vmlal.u8 q10, d23, d29 ++ ++ vshll.u16 q0, d16, #8 ++ vmlsl.u16 q0, d16, d30 ++ vmlal.u16 q0, d17, d30 ++ ++ pld [TMP4, PF_OFFS] ++ vld1.32 {d16}, [TMP4], STRIDE ++ vld1.32 {d17}, [TMP4] ++ pld [TMP4, PF_OFFS] ++ vmull.u8 q11, d16, d28 ++ vmlal.u8 q11, d17, d29 ++ ++ vshll.u16 q1, d18, #8 ++ vmlsl.u16 q1, d18, d31 ++.endm ++ ++.macro bilinear_interpolate_four_pixels_8888_8888_tail ++ vmlal.u16 q1, d19, d31 ++ vshr.u16 q15, q12, #8 ++ vshll.u16 q2, d20, #8 ++ vmlsl.u16 q2, d20, d30 ++ vmlal.u16 q2, d21, d30 ++ vshll.u16 q3, d22, #8 ++ vmlsl.u16 q3, d22, d31 ++ vmlal.u16 q3, d23, d31 ++ vadd.u16 q12, q12, q13 ++ vshrn.u32 d0, q0, #16 ++ vshrn.u32 d1, q1, #16 ++ vshrn.u32 d4, q2, #16 ++ vshr.u16 q15, q12, #8 ++ vshrn.u32 d5, q3, #16 ++ vmovn.u16 d6, q0 ++ vmovn.u16 d7, q2 ++ vadd.u16 q12, q12, q13 ++ vst1.32 {d6, d7}, [OUT, :128]! ++.endm ++ ++.macro bilinear_interpolate_four_pixels_8888_8888_tail_head ++ mov TMP1, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP2, TOP, TMP2, asl #2 ++ vmlal.u16 q1, d19, d31 ++ vshr.u16 q15, q12, #8 ++ vshll.u16 q2, d20, #8 ++ vmlsl.u16 q2, d20, d30 ++ vmlal.u16 q2, d21, d30 ++ vshll.u16 q3, d22, #8 ++ vld1.32 {d20}, [TMP1], STRIDE ++ vmlsl.u16 q3, d22, d31 ++ vmlal.u16 q3, d23, d31 ++ vld1.32 {d21}, [TMP1] ++ vmull.u8 q8, d20, d28 ++ vmlal.u8 q8, d21, d29 ++ vshrn.u32 d0, q0, #16 ++ vshrn.u32 d1, q1, #16 ++ vshrn.u32 d4, q2, #16 ++ vld1.32 {d22}, [TMP2], STRIDE ++ vshrn.u32 d5, q3, #16 ++ vadd.u16 q12, q12, q13 ++ vld1.32 {d23}, [TMP2] ++ vmull.u8 q9, d22, d28 ++ mov TMP3, X, asr #16 ++ add X, X, UX ++ add TMP3, TOP, TMP3, asl #2 ++ mov TMP4, X, asr #16 ++ add X, X, UX ++ add TMP4, TOP, TMP4, asl #2 ++ vmlal.u8 q9, d23, d29 ++ vld1.32 {d22}, [TMP3], STRIDE ++ vshr.u16 q15, q12, #8 ++ vld1.32 {d23}, [TMP3] ++ vmull.u8 q10, d22, d28 ++ vmlal.u8 q10, d23, d29 ++ vmovn.u16 d6, q0 ++ vshll.u16 q0, d16, #8 ++ vmovn.u16 d7, q2 ++ vmlsl.u16 q0, d16, d30 ++ vmlal.u16 q0, d17, d30 ++ pld [TMP4, PF_OFFS] ++ vld1.32 {d16}, [TMP4], STRIDE ++ vadd.u16 q12, q12, q13 ++ vld1.32 {d17}, [TMP4] ++ pld [TMP4, PF_OFFS] ++ vmull.u8 q11, d16, d28 ++ vmlal.u8 q11, d17, d29 ++ vst1.32 {d6, d7}, [OUT, :128]! ++ vshll.u16 q1, d18, #8 ++ vmlsl.u16 q1, d18, d31 ++.endm ++ ++/*****************************************************************************/ ++ + generate_bilinear_scanline_func \ + pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon, 8888, 8888, \ + 2, 2, 28, BILINEAR_FLAG_UNROLL_4 +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0036-ARM-pipelined-NEON-implementation-of-bilinear-scaled.patch b/recipes/xorg-lib/pixman-0.21.6/0036-ARM-pipelined-NEON-implementation-of-bilinear-scaled.patch new file mode 100644 index 0000000000..4fca16fb9e --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0036-ARM-pipelined-NEON-implementation-of-bilinear-scaled.patch @@ -0,0 +1,283 @@ +From dfccf9b97acbff6e847e4e52c5dec0a4297d30a0 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Mon, 21 Mar 2011 20:25:27 +0200 +Subject: [PATCH 36/40] ARM: pipelined NEON implementation of bilinear scaled 'src_8888_0565' + +Benchmark on ARM Cortex-A8 r1p3 @600MHz, 32-bit LPDDR @166MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=20028888, dst=10020565, speed=33.59 MPix/s + after: op=1, src=20028888, dst=10020565, speed=46.25 MPix/s + +Benchmark on ARM Cortex-A8 r2p2 @1GHz, 32-bit LPDDR @200MHz: + Microbenchmark (scaling 2000x2000 image with scale factor close to 1x): + before: op=1, src=20028888, dst=10020565, speed=63.86 MPix/s + after: op=1, src=20028888, dst=10020565, speed=84.22 MPix/s +--- + pixman/pixman-arm-neon-asm.S | 245 +++++++++++++++++++++++++++++++++++++++++- + 1 files changed, 244 insertions(+), 1 deletions(-) + +diff --git a/pixman/pixman-arm-neon-asm.S b/pixman/pixman-arm-neon-asm.S +index 326e085..e560bdf 100644 +--- a/pixman/pixman-arm-neon-asm.S ++++ b/pixman/pixman-arm-neon-asm.S +@@ -2941,13 +2941,256 @@ pixman_asm_function fname + + /*****************************************************************************/ + ++.set have_bilinear_interpolate_eight_pixels_8888_0565, 1 ++ ++.macro bilinear_interpolate_eight_pixels_8888_0565_head ++ mov TMP1, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP2, TOP, TMP2, asl #2 ++ vld1.32 {d20}, [TMP1], STRIDE ++ vld1.32 {d21}, [TMP1] ++ vmull.u8 q8, d20, d28 ++ vmlal.u8 q8, d21, d29 ++ vld1.32 {d22}, [TMP2], STRIDE ++ vld1.32 {d23}, [TMP2] ++ vmull.u8 q9, d22, d28 ++ mov TMP3, X, asr #16 ++ add X, X, UX ++ add TMP3, TOP, TMP3, asl #2 ++ mov TMP4, X, asr #16 ++ add X, X, UX ++ add TMP4, TOP, TMP4, asl #2 ++ vmlal.u8 q9, d23, d29 ++ vld1.32 {d22}, [TMP3], STRIDE ++ vld1.32 {d23}, [TMP3] ++ vmull.u8 q10, d22, d28 ++ vmlal.u8 q10, d23, d29 ++ vshll.u16 q0, d16, #8 ++ vmlsl.u16 q0, d16, d30 ++ vmlal.u16 q0, d17, d30 ++ pld [TMP4, PF_OFFS] ++ vld1.32 {d16}, [TMP4], STRIDE ++ vld1.32 {d17}, [TMP4] ++ pld [TMP4, PF_OFFS] ++ vmull.u8 q11, d16, d28 ++ vmlal.u8 q11, d17, d29 ++ vshll.u16 q1, d18, #8 ++ vmlsl.u16 q1, d18, d31 ++ ++ mov TMP1, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP2, TOP, TMP2, asl #2 ++ vmlal.u16 q1, d19, d31 ++ vshr.u16 q15, q12, #8 ++ vshll.u16 q2, d20, #8 ++ vmlsl.u16 q2, d20, d30 ++ vmlal.u16 q2, d21, d30 ++ vshll.u16 q3, d22, #8 ++ vld1.32 {d20}, [TMP1], STRIDE ++ vmlsl.u16 q3, d22, d31 ++ vmlal.u16 q3, d23, d31 ++ vld1.32 {d21}, [TMP1] ++ vmull.u8 q8, d20, d28 ++ vmlal.u8 q8, d21, d29 ++ vshrn.u32 d0, q0, #16 ++ vshrn.u32 d1, q1, #16 ++ vshrn.u32 d4, q2, #16 ++ vld1.32 {d22}, [TMP2], STRIDE ++ vshrn.u32 d5, q3, #16 ++ vadd.u16 q12, q12, q13 ++ vld1.32 {d23}, [TMP2] ++ vmull.u8 q9, d22, d28 ++ mov TMP3, X, asr #16 ++ add X, X, UX ++ add TMP3, TOP, TMP3, asl #2 ++ mov TMP4, X, asr #16 ++ add X, X, UX ++ add TMP4, TOP, TMP4, asl #2 ++ vmlal.u8 q9, d23, d29 ++ vld1.32 {d22}, [TMP3], STRIDE ++ vshr.u16 q15, q12, #8 ++ vld1.32 {d23}, [TMP3] ++ vmull.u8 q10, d22, d28 ++ vmlal.u8 q10, d23, d29 ++ vmovn.u16 d8, q0 ++ vshll.u16 q0, d16, #8 ++ vmovn.u16 d9, q2 ++ vmlsl.u16 q0, d16, d30 ++ vmlal.u16 q0, d17, d30 ++ pld [TMP4, PF_OFFS] ++ vld1.32 {d16}, [TMP4], STRIDE ++ vadd.u16 q12, q12, q13 ++ vld1.32 {d17}, [TMP4] ++ pld [TMP4, PF_OFFS] ++ vmull.u8 q11, d16, d28 ++ vmlal.u8 q11, d17, d29 ++ vshll.u16 q1, d18, #8 ++ vmlsl.u16 q1, d18, d31 ++.endm ++ ++.macro bilinear_interpolate_eight_pixels_8888_0565_tail ++ vmlal.u16 q1, d19, d31 ++ vshr.u16 q15, q12, #8 ++ vshll.u16 q2, d20, #8 ++ vmlsl.u16 q2, d20, d30 ++ vmlal.u16 q2, d21, d30 ++ vshll.u16 q3, d22, #8 ++ vmlsl.u16 q3, d22, d31 ++ vmlal.u16 q3, d23, d31 ++ vadd.u16 q12, q12, q13 ++ vshrn.u32 d0, q0, #16 ++ vshrn.u32 d1, q1, #16 ++ vshrn.u32 d4, q2, #16 ++ vshr.u16 q15, q12, #8 ++ vshrn.u32 d5, q3, #16 ++ vmovn.u16 d10, q0 ++ vmovn.u16 d11, q2 ++ vadd.u16 q12, q12, q13 ++ ++ vuzp.u8 d8, d9 ++ vuzp.u8 d10, d11 ++ vuzp.u8 d9, d11 ++ vuzp.u8 d8, d10 ++ vshll.u8 q6, d9, #8 ++ vshll.u8 q5, d10, #8 ++ vshll.u8 q7, d8, #8 ++ vsri.u16 q5, q6, #5 ++ vsri.u16 q5, q7, #11 ++ vst1.32 {d10, d11}, [OUT, :128]! ++.endm ++ ++.macro bilinear_interpolate_eight_pixels_8888_0565_tail_head ++ mov TMP1, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP2, TOP, TMP2, asl #2 ++ vmlal.u16 q1, d19, d31 ++ vshr.u16 q15, q12, #8 ++ vuzp.u8 d8, d9 ++ vshll.u16 q2, d20, #8 ++ vmlsl.u16 q2, d20, d30 ++ vmlal.u16 q2, d21, d30 ++ vshll.u16 q3, d22, #8 ++ vld1.32 {d20}, [TMP1], STRIDE ++ vmlsl.u16 q3, d22, d31 ++ vmlal.u16 q3, d23, d31 ++ vld1.32 {d21}, [TMP1] ++ vmull.u8 q8, d20, d28 ++ vmlal.u8 q8, d21, d29 ++ vshrn.u32 d0, q0, #16 ++ vshrn.u32 d1, q1, #16 ++ vshrn.u32 d4, q2, #16 ++ vld1.32 {d22}, [TMP2], STRIDE ++ vshrn.u32 d5, q3, #16 ++ vadd.u16 q12, q12, q13 ++ vld1.32 {d23}, [TMP2] ++ vmull.u8 q9, d22, d28 ++ mov TMP3, X, asr #16 ++ add X, X, UX ++ add TMP3, TOP, TMP3, asl #2 ++ mov TMP4, X, asr #16 ++ add X, X, UX ++ add TMP4, TOP, TMP4, asl #2 ++ vmlal.u8 q9, d23, d29 ++ vld1.32 {d22}, [TMP3], STRIDE ++ vshr.u16 q15, q12, #8 ++ vld1.32 {d23}, [TMP3] ++ vmull.u8 q10, d22, d28 ++ vmlal.u8 q10, d23, d29 ++ vmovn.u16 d10, q0 ++ vshll.u16 q0, d16, #8 ++ vmovn.u16 d11, q2 ++ vmlsl.u16 q0, d16, d30 ++ vmlal.u16 q0, d17, d30 ++ pld [TMP4, PF_OFFS] ++ vld1.32 {d16}, [TMP4], STRIDE ++ vadd.u16 q12, q12, q13 ++ vld1.32 {d17}, [TMP4] ++ pld [TMP4, PF_OFFS] ++ vmull.u8 q11, d16, d28 ++ vmlal.u8 q11, d17, d29 ++ vuzp.u8 d10, d11 ++ vshll.u16 q1, d18, #8 ++ vmlsl.u16 q1, d18, d31 ++ ++ mov TMP1, X, asr #16 ++ add X, X, UX ++ add TMP1, TOP, TMP1, asl #2 ++ mov TMP2, X, asr #16 ++ add X, X, UX ++ add TMP2, TOP, TMP2, asl #2 ++ vmlal.u16 q1, d19, d31 ++ vuzp.u8 d9, d11 ++ vshr.u16 q15, q12, #8 ++ vshll.u16 q2, d20, #8 ++ vuzp.u8 d8, d10 ++ vmlsl.u16 q2, d20, d30 ++ vmlal.u16 q2, d21, d30 ++ vshll.u16 q3, d22, #8 ++ vld1.32 {d20}, [TMP1], STRIDE ++ vmlsl.u16 q3, d22, d31 ++ vmlal.u16 q3, d23, d31 ++ vld1.32 {d21}, [TMP1] ++ vmull.u8 q8, d20, d28 ++ vmlal.u8 q8, d21, d29 ++ vshll.u8 q6, d9, #8 ++ vshll.u8 q5, d10, #8 ++ vshll.u8 q7, d8, #8 ++ vshrn.u32 d0, q0, #16 ++ vsri.u16 q5, q6, #5 ++ vshrn.u32 d1, q1, #16 ++ vsri.u16 q5, q7, #11 ++ vshrn.u32 d4, q2, #16 ++ vld1.32 {d22}, [TMP2], STRIDE ++ vshrn.u32 d5, q3, #16 ++ vadd.u16 q12, q12, q13 ++ vld1.32 {d23}, [TMP2] ++ vmull.u8 q9, d22, d28 ++ mov TMP3, X, asr #16 ++ add X, X, UX ++ add TMP3, TOP, TMP3, asl #2 ++ mov TMP4, X, asr #16 ++ add X, X, UX ++ add TMP4, TOP, TMP4, asl #2 ++ vmlal.u8 q9, d23, d29 ++ vld1.32 {d22}, [TMP3], STRIDE ++ vshr.u16 q15, q12, #8 ++ vld1.32 {d23}, [TMP3] ++ vmull.u8 q10, d22, d28 ++ vmlal.u8 q10, d23, d29 ++ vmovn.u16 d8, q0 ++ vshll.u16 q0, d16, #8 ++ vmovn.u16 d9, q2 ++ vmlsl.u16 q0, d16, d30 ++ vmlal.u16 q0, d17, d30 ++ pld [TMP4, PF_OFFS] ++ vld1.32 {d16}, [TMP4], STRIDE ++ vadd.u16 q12, q12, q13 ++ vld1.32 {d17}, [TMP4] ++ pld [TMP4, PF_OFFS] ++ vmull.u8 q11, d16, d28 ++ vmlal.u8 q11, d17, d29 ++ vshll.u16 q1, d18, #8 ++ vst1.32 {d10, d11}, [OUT, :128]! ++ vmlsl.u16 q1, d18, d31 ++.endm ++/*****************************************************************************/ ++ + generate_bilinear_scanline_func \ + pixman_scaled_bilinear_scanline_8888_8888_SRC_asm_neon, 8888, 8888, \ + 2, 2, 28, BILINEAR_FLAG_UNROLL_4 + + generate_bilinear_scanline_func \ + pixman_scaled_bilinear_scanline_8888_0565_SRC_asm_neon, 8888, 0565, \ +- 2, 1, 28, BILINEAR_FLAG_UNROLL_4 ++ 2, 1, 28, BILINEAR_FLAG_UNROLL_8 | BILINEAR_FLAG_USE_ALL_NEON_REGS + + generate_bilinear_scanline_func \ + pixman_scaled_bilinear_scanline_0565_x888_SRC_asm_neon, 0565, 8888, \ +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0037-Generic-C-implementation-of-pixman_blt-with-overlapp.patch b/recipes/xorg-lib/pixman-0.21.6/0037-Generic-C-implementation-of-pixman_blt-with-overlapp.patch new file mode 100644 index 0000000000..e03823b185 --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0037-Generic-C-implementation-of-pixman_blt-with-overlapp.patch @@ -0,0 +1,114 @@ +From ab52f97fa306f73b51f797a33614280d31ccb978 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Tue, 16 Mar 2010 16:55:28 +0100 +Subject: [PATCH 37/40] Generic C implementation of pixman_blt with overlapping support + +Uses memcpy/memmove functions to copy pixels, can handle the +case when both source and destination areas are in the same +image (this is useful for scrolling). + +It is assumed that copying direction is only important when +using the same image for both source and destination (and +src_stride == dst_stride). Copying direction is undefined +for the images with different source and destination stride +which happen to be in the overlapped areas (but this is an +unrealistic case anyway). +--- + pixman/pixman-general.c | 21 ++++++++++++++++++--- + pixman/pixman-private.h | 43 +++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 61 insertions(+), 3 deletions(-) + +diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c +index 727affc..fa448f7 100644 +--- a/pixman/pixman-general.c ++++ b/pixman/pixman-general.c +@@ -238,9 +238,24 @@ general_blt (pixman_implementation_t *imp, + int width, + int height) + { +- /* We can't blit unless we have sse2 or mmx */ +- +- return FALSE; ++ uint8_t *dst_bytes = (uint8_t *)dst_bits; ++ uint8_t *src_bytes = (uint8_t *)src_bits; ++ int bpp; ++ ++ if (src_bpp != dst_bpp || src_bpp & 7) ++ return FALSE; ++ ++ bpp = src_bpp >> 3; ++ width *= bpp; ++ src_stride *= 4; ++ dst_stride *= 4; ++ pixman_blt_helper (src_bytes + src_y * src_stride + src_x * bpp, ++ dst_bytes + dst_y * dst_stride + dst_x * bpp, ++ src_stride, ++ dst_stride, ++ width, ++ height); ++ return TRUE; + } + + static pixman_bool_t +diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h +index 60060a9..5369ad9 100644 +--- a/pixman/pixman-private.h ++++ b/pixman/pixman-private.h +@@ -10,6 +10,7 @@ + + #include "pixman.h" + #include ++#include + #include + #include + #include +@@ -899,4 +900,46 @@ void pixman_timer_register (pixman_timer_t *timer); + + #endif /* PIXMAN_TIMERS */ + ++/* a helper function, can blit 8-bit images with src/dst overlapping support */ ++static inline void ++pixman_blt_helper (uint8_t *src_bytes, ++ uint8_t *dst_bytes, ++ int src_stride, ++ int dst_stride, ++ int width, ++ int height) ++{ ++ /* ++ * The second part of this check is not strictly needed, but it prevents ++ * unnecessary upside-down processing of areas which belong to different ++ * images. Upside-down processing can be slower with fixed-distance-ahead ++ * prefetch and perceived as having more tearing. ++ */ ++ if (src_bytes < dst_bytes + width && ++ src_bytes + src_stride * height > dst_bytes) ++ { ++ src_bytes += src_stride * height - src_stride; ++ dst_bytes += dst_stride * height - dst_stride; ++ dst_stride = -dst_stride; ++ src_stride = -src_stride; ++ /* Horizontal scrolling to the left needs memmove */ ++ if (src_bytes + width > dst_bytes) ++ { ++ while (--height >= 0) ++ { ++ memmove (dst_bytes, src_bytes, width); ++ dst_bytes += dst_stride; ++ src_bytes += src_stride; ++ } ++ return; ++ } ++ } ++ while (--height >= 0) ++ { ++ memcpy (dst_bytes, src_bytes, width); ++ dst_bytes += dst_stride; ++ src_bytes += src_stride; ++ } ++} ++ + #endif /* PIXMAN_PRIVATE_H */ +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0038-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch b/recipes/xorg-lib/pixman-0.21.6/0038-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch new file mode 100644 index 0000000000..7c0f7ad5bd --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0038-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch @@ -0,0 +1,91 @@ +From 2cde9110695c2b595eaf885eee40b118286652f9 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Thu, 22 Oct 2009 05:45:47 +0300 +Subject: [PATCH 38/40] Support of overlapping src/dst for pixman_blt_mmx + +--- + pixman/pixman-mmx.c | 55 +++++++++++++++++++++++++++++--------------------- + 1 files changed, 32 insertions(+), 23 deletions(-) + +diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c +index 0272347..5bcbd0e 100644 +--- a/pixman/pixman-mmx.c ++++ b/pixman/pixman-mmx.c +@@ -2996,34 +2996,43 @@ pixman_blt_mmx (uint32_t *src_bits, + { + uint8_t * src_bytes; + uint8_t * dst_bytes; +- int byte_width; ++ int bpp; + +- if (src_bpp != dst_bpp) ++ if (src_bpp != dst_bpp || src_bpp & 7) + return FALSE; + +- if (src_bpp == 16) +- { +- src_stride = src_stride * (int) sizeof (uint32_t) / 2; +- dst_stride = dst_stride * (int) sizeof (uint32_t) / 2; +- src_bytes = (uint8_t *)(((uint16_t *)src_bits) + src_stride * (src_y) + (src_x)); +- dst_bytes = (uint8_t *)(((uint16_t *)dst_bits) + dst_stride * (dst_y) + (dst_x)); +- byte_width = 2 * width; +- src_stride *= 2; +- dst_stride *= 2; +- } +- else if (src_bpp == 32) ++ bpp = src_bpp >> 3; ++ width *= bpp; ++ src_stride *= 4; ++ dst_stride *= 4; ++ src_bytes = (uint8_t *)src_bits + src_y * src_stride + src_x * bpp; ++ dst_bytes = (uint8_t *)dst_bits + dst_y * dst_stride + dst_x * bpp; ++ ++ if (src_bpp != 16 && src_bpp != 32) + { +- src_stride = src_stride * (int) sizeof (uint32_t) / 4; +- dst_stride = dst_stride * (int) sizeof (uint32_t) / 4; +- src_bytes = (uint8_t *)(((uint32_t *)src_bits) + src_stride * (src_y) + (src_x)); +- dst_bytes = (uint8_t *)(((uint32_t *)dst_bits) + dst_stride * (dst_y) + (dst_x)); +- byte_width = 4 * width; +- src_stride *= 4; +- dst_stride *= 4; ++ pixman_blt_helper (src_bytes, dst_bytes, src_stride, dst_stride, ++ width, height); ++ return TRUE; + } +- else ++ ++ if (src_bytes < dst_bytes && src_bytes + src_stride * height > dst_bytes) + { +- return FALSE; ++ src_bytes += src_stride * height - src_stride; ++ dst_bytes += dst_stride * height - dst_stride; ++ dst_stride = -dst_stride; ++ src_stride = -src_stride; ++ ++ if (src_bytes + width > dst_bytes) ++ { ++ /* TODO: reverse scanline copy using MMX */ ++ while (--height >= 0) ++ { ++ memmove (dst_bytes, src_bytes, width); ++ dst_bytes += dst_stride; ++ src_bytes += src_stride; ++ } ++ return TRUE; ++ } + } + + while (height--) +@@ -3033,7 +3042,7 @@ pixman_blt_mmx (uint32_t *src_bits, + uint8_t *d = dst_bytes; + src_bytes += src_stride; + dst_bytes += dst_stride; +- w = byte_width; ++ w = width; + + while (w >= 2 && ((unsigned long)d & 3)) + { +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0039-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch b/recipes/xorg-lib/pixman-0.21.6/0039-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch new file mode 100644 index 0000000000..8e89ffeabb --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0039-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch @@ -0,0 +1,91 @@ +From b4064e256d293d32035494a6afff1bc9456b84e1 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Thu, 22 Oct 2009 05:45:54 +0300 +Subject: [PATCH 39/40] Support of overlapping src/dst for pixman_blt_sse2 + +--- + pixman/pixman-sse2.c | 55 +++++++++++++++++++++++++++++-------------------- + 1 files changed, 32 insertions(+), 23 deletions(-) + +diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c +index 533b858..9fa7191 100644 +--- a/pixman/pixman-sse2.c ++++ b/pixman/pixman-sse2.c +@@ -4691,34 +4691,43 @@ pixman_blt_sse2 (uint32_t *src_bits, + { + uint8_t * src_bytes; + uint8_t * dst_bytes; +- int byte_width; ++ int bpp; + +- if (src_bpp != dst_bpp) ++ if (src_bpp != dst_bpp || src_bpp & 7) + return FALSE; + +- if (src_bpp == 16) +- { +- src_stride = src_stride * (int) sizeof (uint32_t) / 2; +- dst_stride = dst_stride * (int) sizeof (uint32_t) / 2; +- src_bytes =(uint8_t *)(((uint16_t *)src_bits) + src_stride * (src_y) + (src_x)); +- dst_bytes = (uint8_t *)(((uint16_t *)dst_bits) + dst_stride * (dst_y) + (dst_x)); +- byte_width = 2 * width; +- src_stride *= 2; +- dst_stride *= 2; +- } +- else if (src_bpp == 32) ++ bpp = src_bpp >> 3; ++ width *= bpp; ++ src_stride *= 4; ++ dst_stride *= 4; ++ src_bytes = (uint8_t *)src_bits + src_y * src_stride + src_x * bpp; ++ dst_bytes = (uint8_t *)dst_bits + dst_y * dst_stride + dst_x * bpp; ++ ++ if (src_bpp != 16 && src_bpp != 32) + { +- src_stride = src_stride * (int) sizeof (uint32_t) / 4; +- dst_stride = dst_stride * (int) sizeof (uint32_t) / 4; +- src_bytes = (uint8_t *)(((uint32_t *)src_bits) + src_stride * (src_y) + (src_x)); +- dst_bytes = (uint8_t *)(((uint32_t *)dst_bits) + dst_stride * (dst_y) + (dst_x)); +- byte_width = 4 * width; +- src_stride *= 4; +- dst_stride *= 4; ++ pixman_blt_helper (src_bytes, dst_bytes, src_stride, dst_stride, ++ width, height); ++ return TRUE; + } +- else ++ ++ if (src_bytes < dst_bytes && src_bytes + src_stride * height > dst_bytes) + { +- return FALSE; ++ src_bytes += src_stride * height - src_stride; ++ dst_bytes += dst_stride * height - dst_stride; ++ dst_stride = -dst_stride; ++ src_stride = -src_stride; ++ ++ if (src_bytes + width > dst_bytes) ++ { ++ /* TODO: reverse scanline copy using SSE2 */ ++ while (--height >= 0) ++ { ++ memmove (dst_bytes, src_bytes, width); ++ dst_bytes += dst_stride; ++ src_bytes += src_stride; ++ } ++ return TRUE; ++ } + } + + while (height--) +@@ -4728,7 +4737,7 @@ pixman_blt_sse2 (uint32_t *src_bits, + uint8_t *d = dst_bytes; + src_bytes += src_stride; + dst_bytes += dst_stride; +- w = byte_width; ++ w = width; + + while (w >= 2 && ((unsigned long)d & 3)) + { +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman-0.21.6/0040-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch b/recipes/xorg-lib/pixman-0.21.6/0040-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch new file mode 100644 index 0000000000..38aeadb2dc --- /dev/null +++ b/recipes/xorg-lib/pixman-0.21.6/0040-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch @@ -0,0 +1,94 @@ +From ed32d593a0e8aa56f8a27f976f188d14a79343a0 Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka +Date: Wed, 18 Nov 2009 06:08:48 +0200 +Subject: [PATCH 40/40] Support of overlapping src/dst for pixman_blt_neon + +--- + pixman/pixman-arm-neon.c | 62 +++++++++++++++++++++++++++++++++++++-------- + 1 files changed, 51 insertions(+), 11 deletions(-) + +diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c +index 0a10ca1..f015eee 100644 +--- a/pixman/pixman-arm-neon.c ++++ b/pixman/pixman-arm-neon.c +@@ -215,26 +215,66 @@ pixman_blt_neon (uint32_t *src_bits, + int width, + int height) + { +- if (src_bpp != dst_bpp) ++ uint8_t * src_bytes; ++ uint8_t * dst_bytes; ++ int bpp; ++ ++ if (src_bpp != dst_bpp || src_bpp & 7) + return FALSE; + ++ bpp = src_bpp >> 3; ++ width *= bpp; ++ src_stride *= 4; ++ dst_stride *= 4; ++ src_bytes = (uint8_t *)src_bits + src_y * src_stride + src_x * bpp; ++ dst_bytes = (uint8_t *)dst_bits + dst_y * dst_stride + dst_x * bpp; ++ ++ if (src_bpp != 16 && src_bpp != 32) ++ { ++ pixman_blt_helper (src_bytes, dst_bytes, src_stride, dst_stride, ++ width, height); ++ return TRUE; ++ } ++ ++ if (src_bytes < dst_bytes && src_bytes + src_stride * height > dst_bytes) ++ { ++ src_bytes += src_stride * height - src_stride; ++ dst_bytes += dst_stride * height - dst_stride; ++ dst_stride = -dst_stride; ++ src_stride = -src_stride; ++ ++ if (src_bytes + width > dst_bytes) ++ { ++ /* TODO: reverse scanline copy using NEON */ ++ while (--height >= 0) ++ { ++ memmove (dst_bytes, src_bytes, width); ++ dst_bytes += dst_stride; ++ src_bytes += src_stride; ++ } ++ return TRUE; ++ } ++ } ++ + switch (src_bpp) + { + case 16: + pixman_composite_src_0565_0565_asm_neon ( +- width, height, +- (uint16_t *)(((char *) dst_bits) + +- dst_y * dst_stride * 4 + dst_x * 2), dst_stride * 2, +- (uint16_t *)(((char *) src_bits) + +- src_y * src_stride * 4 + src_x * 2), src_stride * 2); ++ width >> 1, ++ height, ++ (uint16_t *) dst_bytes, ++ dst_stride >> 1, ++ (uint16_t *) src_bytes, ++ src_stride >> 1); + return TRUE; + case 32: + pixman_composite_src_8888_8888_asm_neon ( +- width, height, +- (uint32_t *)(((char *) dst_bits) + +- dst_y * dst_stride * 4 + dst_x * 4), dst_stride, +- (uint32_t *)(((char *) src_bits) + +- src_y * src_stride * 4 + src_x * 4), src_stride); ++ width >> 2, ++ height, ++ (uint32_t *) dst_bytes, ++ dst_stride >> 2, ++ (uint32_t *) src_bytes, ++ src_stride >> 2); + return TRUE; + default: + return FALSE; +-- +1.6.6.1 + diff --git a/recipes/xorg-lib/pixman_0.21.6.bb b/recipes/xorg-lib/pixman_0.21.6.bb new file mode 100644 index 0000000000..d5cc2c5381 --- /dev/null +++ b/recipes/xorg-lib/pixman_0.21.6.bb @@ -0,0 +1,53 @@ +require pixman.inc + +PR = "${INC_PR}.0" + +SRC_URI = "http://xorg.freedesktop.org/archive/individual/lib/${BPN}-${PV}.tar.gz \ +file://0002-Fix-compilation-on-Win32.patch \ +file://0003-test-Fix-tests-for-compilation-on-Windows.patch \ +file://0004-test-Add-Makefile-for-Win32.patch \ +file://0005-Do-not-include-unused-headers.patch \ +file://0006-test-Silence-MSVC-warnings.patch \ +file://0007-Main-loop-template-for-fast-single-pass-bilinear-sca.patch \ +file://0008-test-check-correctness-of-bilinear_pad_repeat_get_sc.patch \ +file://0009-SSE2-optimization-for-bilinear-scaled-src_8888_8888.patch \ +file://0010-ARM-NEON-optimization-for-bilinear-scaled-src_8888_8.patch \ +file://0011-test-In-image_endian_swap-use-pixman_image_get_forma.patch \ +file://0012-test-Do-endian-swapping-of-the-source-and-destinatio.patch \ +file://0013-ARM-use-prefetch-in-nearest-scaled-src_0565_0565.patch \ +file://0014-ARM-common-macro-for-nearest-scaling-fast-paths.patch \ +file://0015-ARM-assembly-optimized-nearest-scaled-src_8888_8888.patch \ +file://0016-ARM-new-bilinear-fast-path-template-macro-in-pixman-.patch \ +file://0017-ARM-NEON-common-macro-template-for-bilinear-scanline.patch \ +file://0018-ARM-use-common-macro-template-for-bilinear-scaled-sr.patch \ +file://0019-ARM-NEON-optimization-for-bilinear-scaled-src_8888_0.patch \ +file://0020-ARM-NEON-optimization-for-bilinear-scaled-src_0565_x.patch \ +file://0021-ARM-NEON-optimization-for-bilinear-scaled-src_0565_0.patch \ +file://0022-ARM-a-bit-faster-NEON-bilinear-scaling-for-r5g6b5-so.patch \ +file://0023-In-delegate_-src-dest-_iter_init-call-delegate-direc.patch \ +file://0024-Fill-out-parts-of-iters-in-_pixman_implementation_-s.patch \ +file://0025-Simplify-the-prototype-for-iterator-initializers.patch \ +file://0026-test-Randomize-some-tests-if-PIXMAN_RANDOMIZE_TESTS-.patch \ +file://0027-Add-simple-support-for-the-r8g8b8a8-and-r8g8b8x8-for.patch \ +file://0028-Add-support-for-the-r8g8b8a8-and-r8g8b8x8-formats-to.patch \ +file://0029-test-Fix-infinite-loop-in-composite.patch \ +file://0030-ARM-tweaked-horizontal-weights-update-in-NEON-biline.patch \ +file://0031-ARM-use-aligned-memory-writes-in-NEON-bilinear-scali.patch \ +file://0032-ARM-support-for-software-pipelining-in-bilinear-macr.patch \ +file://0033-ARM-use-less-ARM-instructions-in-NEON-bilinear-scali.patch \ +file://0034-ARM-support-different-levels-of-loop-unrolling-in-bi.patch \ +file://0035-ARM-pipelined-NEON-implementation-of-bilinear-scaled.patch \ +file://0036-ARM-pipelined-NEON-implementation-of-bilinear-scaled.patch \ +file://0037-Generic-C-implementation-of-pixman_blt-with-overlapp.patch \ +file://0038-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch \ +file://0039-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch \ +file://0040-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch \ +" + +SRC_URI[md5sum] = "b083fce3bd41ffd083e50dfe6612612d" +SRC_URI[sha256sum] = "ee22c24acc0c1b55a59aeeebfb3552038495d301e334608ac8e6af98172c748c" + +NEON = " --disable-arm-neon " +NEON_armv7a = " " + +EXTRA_OECONF = "${NEON} --disable-gtk" diff --git a/recipes/xqt2/files/KeyMap.patch b/recipes/xqt2/files/KeyMap.patch index 62564cf248..2b00dcad18 100644 --- a/recipes/xqt2/files/KeyMap.patch +++ b/recipes/xqt2/files/KeyMap.patch @@ -1,5 +1,5 @@ ---- xc/../xqt2/xfree86/xqt-driver/KeyMap.h 2004-10-16 08:06:07.000000000 +0200 -+++ xc/../xqt2/xfree86/xqt-driver/KeyMap~.h 2006-05-10 19:41:16.000000000 +0200 +--- xqt2/xfree86/xqt-driver/KeyMap.h 2004-10-16 08:06:07.000000000 +0200 ++++ xqt2/xfree86/xqt-driver/KeyMap~.h 2006-05-10 19:41:16.000000000 +0200 @@ -75,6 +75,7 @@ /* [ */ K(BracketLeft, XK_bracketleft, XK_braceleft) // Fn+T /* { */ K(BraceLeft, XK_braceleft, NoSymbol) // ??? diff --git a/recipes/xqt2/files/fix_qtscreen_HACK.patch b/recipes/xqt2/files/fix_qtscreen_HACK.patch index 7e4b2c658a..be7a26ec67 100644 --- a/recipes/xqt2/files/fix_qtscreen_HACK.patch +++ b/recipes/xqt2/files/fix_qtscreen_HACK.patch @@ -1,6 +1,6 @@ -diff -Nur xc/../xqt2.vanilla/xfree86/xqt-driver/qtscreen.cc xc/../xqt2/xfree86/xqt-driver/qtscreen.cc ---- xc/../xqt2.vanilla/xfree86/xqt-driver/qtscreen.cc 2008-09-25 14:18:44.000000000 +0200 -+++ xc/../xqt2/xfree86/xqt-driver/qtscreen.cc 2008-09-25 14:28:30.000000000 +0200 +diff -Nur xqt2.vanilla/xfree86/xqt-driver/qtscreen.cc xqt2/xfree86/xqt-driver/qtscreen.cc +--- xqt2.vanilla/xfree86/xqt-driver/qtscreen.cc 2008-09-25 14:18:44.000000000 +0200 ++++ xqt2/xfree86/xqt-driver/qtscreen.cc 2008-09-25 14:28:30.000000000 +0200 @@ -109,6 +109,7 @@ desktopSize = newSize; fullScrSize = desktopSize; diff --git a/recipes/xqt2/files/fix_seqfault_qtscreen.patch b/recipes/xqt2/files/fix_seqfault_qtscreen.patch index 43b97f4bdb..72c1e6edf8 100644 --- a/recipes/xqt2/files/fix_seqfault_qtscreen.patch +++ b/recipes/xqt2/files/fix_seqfault_qtscreen.patch @@ -1,5 +1,5 @@ ---- xc/../xqt2.vanilla/xfree86/xqt-driver/qtscreen.cc 2009-02-08 15:47:33.000000000 +0100 -+++ xc/../xqt2/xfree86/xqt-driver/qtscreen.cc 2009-02-08 15:52:09.000000000 +0100 +--- xqt2.vanilla/xfree86/xqt-driver/qtscreen.cc 2009-02-08 15:47:33.000000000 +0100 ++++ xqt2/xfree86/xqt-driver/qtscreen.cc 2009-02-08 15:52:09.000000000 +0100 @@ -406,7 +406,9 @@ // void qtScreen::keyPressEvent(QKeyEvent *ev) diff --git a/recipes/xqt2/files/moc_call.patch b/recipes/xqt2/files/moc_call.patch index 6e150e201a..b86df1dcad 100644 --- a/recipes/xqt2/files/moc_call.patch +++ b/recipes/xqt2/files/moc_call.patch @@ -1,5 +1,5 @@ ---- xc/../xqt2/xfree86/xqt-driver/Imakefile 2006-05-09 11:59:07.000000000 +0200 -+++ xc/../xqt2/xfree86/xqt-driver/Imakefile 2004-09-16 12:40:30.000000000 +0200 +--- xqt2/xfree86/xqt-driver/Imakefile 2006-05-09 11:59:07.000000000 +0200 ++++ xqt2/xfree86/xqt-driver/Imakefile 2004-09-16 12:40:30.000000000 +0200 @@ -12,7 +12,7 @@ QTDIR = QtDir diff --git a/recipes/xqt2/xqt2_20060509.bb b/recipes/xqt2/xqt2_20060509.bb index 034d756d28..3435b6472b 100644 --- a/recipes/xqt2/xqt2_20060509.bb +++ b/recipes/xqt2/xqt2_20060509.bb @@ -5,7 +5,7 @@ LICENSE = "GPL" SECTION = "opie/applications" APPTYPE = "binary" APPNAME = "Xqt" -PR = "r4" +PR = "r5" inherit palmtop @@ -15,21 +15,22 @@ SRC_URI = "cvs://anonymous@cvs.sourceforge.jp/cvsroot/xqt;module=xqt2;method=pse ftp://ftp.xfree86.org/pub/XFree86/4.3.0/source/X430src-3.tgz;name=archive3 \ ftp://ftp.xfree86.org/pub/XFree86/4.3.0/source/X430src-4.tgz;name=archive4 \ ftp://ftp.xfree86.org/pub/XFree86/4.3.0/source/X430src-5.tgz;name=archive5 \ - file://KeyMap.patch \ - file://moc_call.patch \ file://imake-staging.patch \ file://cross.patch \ file://fephack.patch \ file://xchar2b.patch \ file://xqt-make.patch \ - file://fix_qtscreen_HACK.patch \ - file://fix_seqfault_qtscreen.patch " + file://KeyMap.patch;patchdir=../xqt2 \ + file://moc_call.patch;patchdir=../xqt2 \ + file://fix_qtscreen_HACK.patch;patchdir=../xqt2 \ + file://fix_seqfault_qtscreen.patch;patchdir=../xqt2" S = "${WORKDIR}/xc" QT_LIBRARY = '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "qte-mt", "qte",d)}' QT_LIBRARY_append_c7x0 = " -laticore" do_configure() { + #general config echo "#define BuildServersOnly YES" > config/cf/host.def echo "#define ProjectRoot /usr" >> config/cf/host.def diff --git a/recipes/zeromq/zeromq_2.1.6.bb b/recipes/zeromq/zeromq_2.1.6.bb new file mode 100644 index 0000000000..ec291f5966 --- /dev/null +++ b/recipes/zeromq/zeromq_2.1.6.bb @@ -0,0 +1,21 @@ +DESCRIPTION = "ZeroMQ looks like an embeddable networking library but acts like a concurrency framework" +HOMEPAGE = "http://www.zeromq.org" +LICENSE = "LGPLv3+" +LIC_FILES_CHKSUM = "file://COPYING.LESSER;md5=66ea8704398d7996daeacd2fbd2b9dbd" + +PR = "r0" + +DEPENDS += "util-linux-ng" + +S = "${WORKDIR}/zeromq-${PV}" + +SRC_URI = "http://download.zeromq.org/zeromq-${PV}.tar.gz" + +inherit autotools + +do_configure_prepend() { + ./autogen.sh +} + +SRC_URI[md5sum] = "77b9ca20e8f2426874022080f41d7b0b" +SRC_URI[sha256sum] = "a1bbb352a9dbf34b18a3999b22a8db2d51e4a52508d098528d771811533f9fd0" diff --git a/site/common-linux b/site/common-linux index aa6f06822f..977f31286c 100644 --- a/site/common-linux +++ b/site/common-linux @@ -32,3 +32,6 @@ ac_cv_conv_longlong_to_float=${ac_cv_conv_longlong_to_float=yes} # rp-pppoe rpppoe_cv_pack_bitfields=${rpppoe_cv_pack_bitfields=rev} + +# asterisk +ac_cv_have_variable_fdset=${ac_cv_have_variable_fdset=no}