summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2009-10-30 08:43:42 +0100
committerStefan Schmidt <stefan@datenfreihafen.org>2009-10-30 08:43:42 +0100
commitab3568778b3617ce15811c0004d96a6bc3323bd6 (patch)
tree99e0e0f86829da61ebccb145d35a560f2a37f748
parent2012861d8154cd0241d8a3e1ab57b485006284dc (diff)
parentb2010b603e066e5a39667a83f4675c59ddf2efd8 (diff)
Merge branch 'org.openembedded.dev' of git.openembedded.org:openembedded into org.openembedded.dev
-rw-r--r--classes/package.bbclass120
-rw-r--r--conf/bitbake.conf4
-rw-r--r--conf/checksums.ini344
-rw-r--r--conf/distro/angstrom-2008.1.conf21
-rw-r--r--conf/machine/am3517-evm.conf (renamed from conf/machine/omap3517-evm.conf)2
-rwxr-xr-xcontrib/angstrom/sort.sh2
-rw-r--r--recipes/abiword/abiword-2.5.inc7
-rw-r--r--recipes/abiword/abiword_2.8.0.bb48
-rw-r--r--recipes/angstrom/angstrom-gpe-task-settings.bb3
-rw-r--r--recipes/angstrom/angstrom-uboot-scripts/dsplink.cmd4
-rw-r--r--recipes/angstrom/angstrom-uboot-scripts/touchbook-vrfb.cmd4
-rw-r--r--recipes/angstrom/angstrom-uboot-scripts/touchbook.cmd4
-rw-r--r--recipes/asio/asio_1.1.1.bb2
-rw-r--r--recipes/chicken/chicken-4.2.0/soname.patch1163
-rw-r--r--recipes/chicken/chicken-native_4.2.0.bb7
-rw-r--r--recipes/chicken/chicken.inc54
-rw-r--r--recipes/chicken/chicken2.inc19
-rw-r--r--recipes/chicken/chicken3.inc36
-rw-r--r--recipes/chicken/chicken_2.6.bb1
-rw-r--r--recipes/chicken/chicken_3.3.0.bb4
-rw-r--r--recipes/chicken/chicken_4.2.0.bb5
-rw-r--r--recipes/clutter/clutter.inc2
-rw-r--r--recipes/gnome/goffice_0.7.14.bb29
-rw-r--r--recipes/linux/linux-2.6.31/boc01/011-091028-gpio.patch31
-rw-r--r--recipes/linux/linux-2.6.31/boc01/boc01.dts2
-rw-r--r--recipes/linux/linux-2.6.31/boc01/boc01.dts.v12
-rw-r--r--recipes/linux/linux-2.6.31/collie/0001-add-locomo_spi-driver.patch1228
-rw-r--r--recipes/linux/linux-2.6.31/collie/0002-collie-fix-scoop-convesion-to-new-api.patch24
-rw-r--r--recipes/linux/linux-2.6.31/collie/0003-collie-prepare-for-gpiolib-use.patch104
-rw-r--r--recipes/linux/linux-2.6.31/collie/0004-fix-dma-for-SA1100.patch25
-rw-r--r--recipes/linux/linux-2.6.31/collie/0004-move-drivers-mfd-.h-to-include-linux-mfd.patch782
-rw-r--r--recipes/linux/linux-2.6.31/collie/0005-collie-locomo-led-change-default-trigger.patch27
-rw-r--r--recipes/linux/linux-2.6.31/collie/0006-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch43
-rw-r--r--recipes/linux/linux-2.6.31/collie/0007-add-gpiolib-support-to-ucb1x00.patch242
-rw-r--r--recipes/linux/linux-2.6.31/collie/0008-collie-convert-to-gpiolib-for-ucb1x00.patch80
-rw-r--r--recipes/linux/linux-2.6.31/collie/0009-collie-add-battery-driver.patch470
-rw-r--r--recipes/linux/linux-2.6.31/collie/0010-collie-support-pda_power-driver.patch103
-rw-r--r--recipes/linux/linux-2.6.31/collie/0011-fix-collie-keyboard-bug.patch24
-rw-r--r--recipes/linux/linux-2.6.31/collie/0012-add-collie-touchscreen-driver.patch533
-rw-r--r--recipes/linux/linux-2.6.31/collie/0013-add-sa1100-udc-hack-extra-hacked-for-collie.patch70
-rw-r--r--recipes/linux/linux-2.6.31/collie/0014-gadget-add-file.patch2568
-rw-r--r--recipes/linux/linux-2.6.31/collie/0015-ucb1x00-sound-hack-collie-specific.patch899
-rw-r--r--recipes/linux/linux-2.6.31/collie/defconfig1677
-rw-r--r--recipes/linux/linux-omap-psp-2.6.29/am3517-evm/defconfig (renamed from recipes/linux/linux-omap-psp-2.6.29/omap3517-evm/defconfig)0
-rw-r--r--recipes/linux/linux-omap-psp/am3517-evm/defconfig (renamed from recipes/linux/linux-omap-psp/omap3517-evm/defconfig)0
-rw-r--r--recipes/linux/linux-omap-psp_2.6.29.bb4
-rw-r--r--recipes/linux/linux-omap-psp_2.6.31.bb2
-rw-r--r--recipes/linux/linux_2.6.31.bb28
-rw-r--r--recipes/lzma/files/lzma-406-zlib-stream.patch405
-rw-r--r--recipes/lzma/lzma-4.65/001-large_files.patch13
-rw-r--r--recipes/lzma/lzma-4.65/002-lzmp.patch1059
-rw-r--r--recipes/lzma/lzma-4.65/003-compile_fixes.patch26
-rw-r--r--recipes/lzma/lzma-4.65/100-static_library.patch70
-rw-r--r--recipes/lzma/lzma-native_4.17.bb25
-rw-r--r--recipes/lzma/lzma-native_4.65.bb4
-rw-r--r--recipes/lzma/lzma.inc39
-rw-r--r--recipes/lzma/lzma_4.17.bb36
-rw-r--r--recipes/lzma/lzma_4.65.bb2
-rw-r--r--recipes/proxy-libintl/proxy-libintl-20080418/soname.patch13
-rw-r--r--recipes/proxy-libintl/proxy-libintl_20080418.bb3
-rw-r--r--recipes/squashfs-tools/squashfs-tools-4.0/lzma-support.patch462
-rw-r--r--recipes/squashfs-tools/squashfs-tools-4.0/portability.patch24
-rw-r--r--recipes/squashfs-tools/squashfs-tools-native_4.0.bb4
-rw-r--r--recipes/squashfs-tools/squashfs-tools_4.0.bb9
-rw-r--r--recipes/tasks/task-beagleboard-demo.bb6
-rw-r--r--recipes/u-boot/u-boot_git.bb6
-rw-r--r--recipes/x-load/x-load_1.41.bb2
-rw-r--r--recipes/x-load/x-load_git.bb4
-rw-r--r--recipes/xorg-driver/xf86-input-tslib_0.0.6.bb20
-rw-r--r--recipes/xorg-xserver/xserver-xorg-conf/am3517-evm/xorg.conf (renamed from recipes/xorg-xserver/xserver-xorg-conf/omap3517-evm/xorg.conf)0
-rw-r--r--site/avr32-common15
71 files changed, 12475 insertions, 625 deletions
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 7a9b987c7c..e7865754eb 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -28,12 +28,12 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
"""
import os, os.path, bb
- dvar = bb.data.getVar('D', d, 1)
+ dvar = bb.data.getVar('D', d, True)
if not dvar:
bb.error("D not defined")
return
- packages = bb.data.getVar('PACKAGES', d, 1).split()
+ packages = bb.data.getVar('PACKAGES', d, True).split()
if postinst:
postinst = '#!/bin/sh\n' + postinst + '\n'
@@ -94,7 +94,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
the_files.append(aux_files_pattern_verbatim % m.group(1))
bb.data.setVar('FILES_' + pkg, " ".join(the_files), d)
if extra_depends != '':
- the_depends = bb.data.getVar('RDEPENDS_' + pkg, d, 1)
+ the_depends = bb.data.getVar('RDEPENDS_' + pkg, d, True)
if the_depends:
the_depends = '%s %s' % (the_depends, extra_depends)
else:
@@ -106,7 +106,7 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst
if postrm:
bb.data.setVar('pkg_postrm_' + pkg, postrm, d)
else:
- oldfiles = bb.data.getVar('FILES_' + pkg, d, 1)
+ oldfiles = bb.data.getVar('FILES_' + pkg, d, True)
if not oldfiles:
bb.fatal("Package '%s' exists but has no files" % pkg)
bb.data.setVar('FILES_' + pkg, oldfiles + " " + os.path.join(root, o), d)
@@ -152,7 +152,7 @@ def runstrip(file, d):
import bb, os, commands, stat
- pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, 1)
+ pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
@@ -169,8 +169,8 @@ def runstrip(file, d):
bb.debug(2, "Already ran strip on %s" % file)
return 0
- strip = bb.data.getVar("STRIP", d, 1)
- objcopy = bb.data.getVar("OBJCOPY", d, 1)
+ strip = bb.data.getVar("STRIP", d, True)
+ objcopy = bb.data.getVar("OBJCOPY", d, True)
newmode = None
if not os.access(file, os.W_OK):
@@ -268,10 +268,10 @@ def get_package_mapping (pkg, d):
def runtime_mapping_rename (varname, d):
import bb, os
- #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, 1)))
+ #bb.note("%s before: %s" % (varname, bb.data.getVar(varname, d, True)))
new_depends = []
- for depend in explode_deps(bb.data.getVar(varname, d, 1) or ""):
+ for depend in explode_deps(bb.data.getVar(varname, d, True) or ""):
# Have to be careful with any version component of the depend
split_depend = depend.split(' (')
new_depend = get_package_mapping(split_depend[0].strip(), d)
@@ -282,7 +282,7 @@ def runtime_mapping_rename (varname, d):
bb.data.setVar(varname, " ".join(new_depends) or None, d)
- #bb.note("%s after: %s" % (varname, bb.data.getVar(varname, d, 1)))
+ #bb.note("%s after: %s" % (varname, bb.data.getVar(varname, d, True)))
#
# Package functions suitable for inclusion in PACKAGEFUNCS
@@ -291,23 +291,23 @@ def runtime_mapping_rename (varname, d):
python package_do_split_locales() {
import os
- if (bb.data.getVar('PACKAGE_NO_LOCALE', d, 1) == '1'):
+ 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, 1) or "").split()
+ packages = (bb.data.getVar('PACKAGES', d, True) or "").split()
- datadir = bb.data.getVar('datadir', d, 1)
+ datadir = bb.data.getVar('datadir', d, True)
if not datadir:
bb.note("datadir not defined")
return
- dvar = bb.data.getVar('D', d, 1)
+ dvar = bb.data.getVar('D', d, True)
if not dvar:
bb.error("D not defined")
return
- pn = bb.data.getVar('PN', d, 1)
+ pn = bb.data.getVar('PN', d, True)
if not pn:
bb.error("PN not defined")
return
@@ -346,27 +346,27 @@ python package_do_split_locales() {
python populate_packages () {
import glob, stat, errno, re
- workdir = bb.data.getVar('WORKDIR', d, 1)
+ workdir = bb.data.getVar('WORKDIR', d, True)
if not workdir:
bb.error("WORKDIR not defined, unable to package")
return
import os # path manipulations
- outdir = bb.data.getVar('DEPLOY_DIR', d, 1)
+ outdir = bb.data.getVar('DEPLOY_DIR', d, True)
if not outdir:
bb.error("DEPLOY_DIR not defined, unable to package")
return
bb.mkdirhier(outdir)
- dvar = bb.data.getVar('D', d, 1)
+ dvar = bb.data.getVar('D', d, True)
if not dvar:
bb.error("D not defined, unable to package")
return
bb.mkdirhier(dvar)
- packages = bb.data.getVar('PACKAGES', d, 1)
+ packages = bb.data.getVar('PACKAGES', d, True)
- pn = bb.data.getVar('PN', d, 1)
+ pn = bb.data.getVar('PN', d, True)
if not pn:
bb.error("PN not defined")
return
@@ -392,19 +392,19 @@ python populate_packages () {
else:
package_list.append(pkg)
- if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, 1) != '1'):
+ if (bb.data.getVar('INHIBIT_PACKAGE_STRIP', d, True) != '1'):
for root, dirs, files in os.walk(dvar):
for f in files:
file = os.path.join(root, f)
if not os.path.islink(file) and not os.path.isdir(file) and isexec(file):
runstrip(file, d)
- pkgdest = bb.data.getVar('PKGDEST', d, 1)
+ pkgdest = bb.data.getVar('PKGDEST', d, True)
os.system('rm -rf %s' % pkgdest)
seen = []
main_is_empty = 1
- main_pkg = bb.data.getVar('PN', d, 1)
+ main_pkg = bb.data.getVar('PN', d, True)
for pkg in package_list:
localdata = bb.data.createCopy(d)
@@ -412,13 +412,13 @@ python populate_packages () {
bb.mkdirhier(root)
bb.data.setVar('PKG', pkg, localdata)
- overrides = bb.data.getVar('OVERRIDES', localdata, 1)
+ overrides = bb.data.getVar('OVERRIDES', localdata, True)
if not overrides:
raise bb.build.FuncFailed('OVERRIDES not defined')
bb.data.setVar('OVERRIDES', overrides + ':' + pkg, localdata)
bb.data.update_data(localdata)
- filesvar = bb.data.getVar('FILES', localdata, 1) or ""
+ filesvar = bb.data.getVar('FILES', localdata, True) or ""
files = filesvar.split()
for file in files:
if os.path.isabs(file):
@@ -473,7 +473,7 @@ python populate_packages () {
bb.build.exec_func("package_name_hook", d)
for pkg in package_list:
- pkgname = bb.data.getVar('PKG_%s' % pkg, d, 1)
+ pkgname = bb.data.getVar('PKG_%s' % pkg, d, True)
if pkgname is None:
bb.data.setVar('PKG_%s' % pkg, pkg, d)
@@ -532,11 +532,11 @@ python emit_pkgdata() {
c = codecs.getencoder("string_escape")
return c(str)[0]
- val = bb.data.getVar('%s_%s' % (var, pkg), d, 1)
+ val = bb.data.getVar('%s_%s' % (var, pkg), d, True)
if val:
f.write('%s_%s: %s\n' % (var, pkg, encode(val)))
return
- val = bb.data.getVar('%s' % (var), d, 1)
+ val = bb.data.getVar('%s' % (var), d, True)
if val:
f.write('%s: %s\n' % (var, encode(val)))
return
@@ -554,7 +554,7 @@ python emit_pkgdata() {
f.close()
package_stagefile(data_file, d)
- workdir = bb.data.getVar('WORKDIR', d, 1)
+ workdir = bb.data.getVar('WORKDIR', d, True)
for pkg in packages.split():
subdata_file = pkgdatadir + "/runtime/%s" % pkg
@@ -582,9 +582,9 @@ python emit_pkgdata() {
#if pkgdatadir2:
# bb.copyfile(subdata_file, pkgdatadir2 + "/runtime/%s" % pkg)
- allow_empty = bb.data.getVar('ALLOW_EMPTY_%s' % pkg, d, 1)
+ allow_empty = bb.data.getVar('ALLOW_EMPTY_%s' % pkg, d, True)
if not allow_empty:
- allow_empty = bb.data.getVar('ALLOW_EMPTY', d, 1)
+ allow_empty = bb.data.getVar('ALLOW_EMPTY', d, True)
root = "%s/install/%s" % (workdir, pkg)
os.chdir(root)
g = glob('*') + glob('.[!.]*')
@@ -618,21 +618,21 @@ python package_do_shlibs() {
lib_re = re.compile("^lib.*\.so")
libdir_re = re.compile(".*/lib$")
- packages = bb.data.getVar('PACKAGES', d, 1)
+ packages = bb.data.getVar('PACKAGES', d, True)
- workdir = bb.data.getVar('WORKDIR', d, 1)
+ workdir = bb.data.getVar('WORKDIR', d, True)
if not workdir:
bb.error("WORKDIR not defined")
return
- ver = bb.data.getVar('PV', d, 1)
+ ver = bb.data.getVar('PV', d, True)
if not ver:
bb.error("PV not defined")
return
- pkgdest = bb.data.getVar('PKGDEST', d, 1)
+ pkgdest = bb.data.getVar('PKGDEST', d, True)
- shlibs_dir = bb.data.getVar('SHLIBSDIR', d, 1)
+ shlibs_dir = bb.data.getVar('SHLIBSDIR', d, True)
bb.mkdirhier(shlibs_dir)
pstageactive = bb.data.getVar('PSTAGING_ACTIVE', d, True)
@@ -650,12 +650,12 @@ python package_do_shlibs() {
use_ldconfig = False
needed = {}
- private_libs = bb.data.getVar('PRIVATE_LIBS', d, 1)
+ private_libs = bb.data.getVar('PRIVATE_LIBS', d, True)
for pkg in packages.split():
needs_ldconfig = False
bb.debug(2, "calculating shlib provides for %s" % pkg)
- pkgver = bb.data.getVar('PV_' + pkg, d, 1)
+ pkgver = bb.data.getVar('PV_' + pkg, d, True)
if not pkgver:
pkgver = ver
@@ -668,8 +668,8 @@ python package_do_shlibs() {
soname = None
path = os.path.join(root, file)
if (os.access(path, os.X_OK) or lib_re.match(file)) and not os.path.islink(path):
- cmd = bb.data.getVar('OBJDUMP', d, 1) + " -p " + path + " 2>/dev/null"
- cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', d, 1), cmd)
+ cmd = bb.data.getVar('OBJDUMP', d, True) + " -p " + path + " 2>/dev/null"
+ cmd = "PATH=\"%s\" %s" % (bb.data.getVar('PATH', d, True), cmd)
fd = os.popen(cmd)
lines = fd.readlines()
fd.close()
@@ -708,10 +708,10 @@ python package_do_shlibs() {
package_stagefile(shver_file, d)
if needs_ldconfig and use_ldconfig:
bb.debug(1, 'adding ldconfig call to postinst for %s' % pkg)
- postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, 1) or bb.data.getVar('pkg_postinst', d, 1)
+ postinst = bb.data.getVar('pkg_postinst_%s' % pkg, d, True) or bb.data.getVar('pkg_postinst', d, True)
if not postinst:
postinst = '#!/bin/sh\n'
- postinst += bb.data.getVar('ldconfig_postinst_fragment', d, 1)
+ postinst += bb.data.getVar('ldconfig_postinst_fragment', d, True)
bb.data.setVar('pkg_postinst_%s' % pkg, postinst, d)
if pstageactive == "1":
@@ -738,7 +738,7 @@ python package_do_shlibs() {
for l in lines:
shlib_provider[l.rstrip()] = (dep_pkg, lib_ver)
- assumed_libs = bb.data.getVar('ASSUME_SHLIBS', d, 1)
+ assumed_libs = bb.data.getVar('ASSUME_SHLIBS', d, True)
if assumed_libs:
for e in assumed_libs.split():
l, dep_pkg = e.split(":")
@@ -786,16 +786,16 @@ python package_do_shlibs() {
python package_do_pkgconfig () {
import re, os
- packages = bb.data.getVar('PACKAGES', d, 1)
+ packages = bb.data.getVar('PACKAGES', d, True)
- workdir = bb.data.getVar('WORKDIR', d, 1)
+ workdir = bb.data.getVar('WORKDIR', d, True)
if not workdir:
bb.error("WORKDIR not defined")
return
- pkgdest = bb.data.getVar('PKGDEST', d, 1)
+ pkgdest = bb.data.getVar('PKGDEST', d, True)
- shlibs_dir = bb.data.getVar('SHLIBSDIR', d, 1)
+ shlibs_dir = bb.data.getVar('SHLIBSDIR', d, True)
bb.mkdirhier(shlibs_dir)
pc_re = re.compile('(.*)\.pc$')
@@ -890,7 +890,7 @@ python package_do_pkgconfig () {
}
python read_shlibdeps () {
- packages = bb.data.getVar('PACKAGES', d, 1).split()
+ packages = bb.data.getVar('PACKAGES', d, True).split()
for pkg in packages:
rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
@@ -918,14 +918,14 @@ python package_depchains() {
package.
"""
- packages = bb.data.getVar('PACKAGES', d, 1)
- postfixes = (bb.data.getVar('DEPCHAIN_POST', d, 1) or '').split()
- prefixes = (bb.data.getVar('DEPCHAIN_PRE', d, 1) or '').split()
+ packages = bb.data.getVar('PACKAGES', d, True)
+ postfixes = (bb.data.getVar('DEPCHAIN_POST', d, True) or '').split()
+ prefixes = (bb.data.getVar('DEPCHAIN_PRE', d, True) or '').split()
def pkg_adddeprrecs(pkg, base, suffix, getname, depends, d):
#bb.note('depends for %s is %s' % (base, depends))
- rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "")
+ rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, True) or bb.data.getVar('RRECOMMENDS', d, True) or "")
for depend in depends:
if depend.find('-native') != -1 or depend.find('-cross') != -1 or depend.startswith('virtual/'):
@@ -946,7 +946,7 @@ python package_depchains() {
def pkg_addrrecs(pkg, base, suffix, getname, rdepends, d):
#bb.note('rdepends for %s is %s' % (base, rdepends))
- rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, 1) or bb.data.getVar('RRECOMMENDS', d, 1) or "")
+ rreclist = explode_deps(bb.data.getVar('RRECOMMENDS_' + pkg, d, True) or bb.data.getVar('RRECOMMENDS', d, True) or "")
for depend in rdepends:
if depend.endswith('-dev'):
@@ -966,15 +966,15 @@ python package_depchains() {
list.append(dep)
depends = []
- for dep in explode_deps(bb.data.getVar('DEPENDS', d, 1) or ""):
+ for dep in explode_deps(bb.data.getVar('DEPENDS', d, True) or ""):
add_dep(depends, dep)
rdepends = []
- for dep in explode_deps(bb.data.getVar('RDEPENDS', d, 1) or ""):
+ for dep in explode_deps(bb.data.getVar('RDEPENDS', d, True) or ""):
add_dep(rdepends, dep)
for pkg in packages.split():
- for dep in explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 1) or ""):
+ for dep in explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, True) or ""):
add_dep(rdepends, dep)
#bb.note('rdepends is %s' % rdepends)
@@ -1007,7 +1007,7 @@ python package_depchains() {
pkg_addrrecs(pkg, base, suffix, func, rdepends, d)
else:
rdeps = []
- for dep in explode_deps(bb.data.getVar('RDEPENDS_' + base, d, 1) or bb.data.getVar('RDEPENDS', d, 1) or ""):
+ for dep in explode_deps(bb.data.getVar('RDEPENDS_' + base, d, True) or bb.data.getVar('RDEPENDS', d, True) or ""):
add_dep(rdeps, dep)
pkg_addrrecs(pkg, base, suffix, func, rdeps, d)
}
@@ -1035,7 +1035,7 @@ def package_run_hooks(f, d):
bb.parse.parse_py.BBHandler.feeder(line, l, fn, os.path.basename(fn), d)
line += 1
fp.close()
- anonqueue = bb.data.getVar("__anonqueue", d, 1) or []
+ anonqueue = bb.data.getVar("__anonqueue", d, True) or []
body = [x['content'] for x in anonqueue]
flag = { 'python' : 1, 'func' : 1 }
bb.data.setVar("__anonfunc", "\n".join(body), d)
@@ -1054,12 +1054,12 @@ def package_run_hooks(f, d):
bb.data.delVar("__anonfunc", d)
python package_do_package () {
- packages = (bb.data.getVar('PACKAGES', d, 1) or "").split()
+ packages = (bb.data.getVar('PACKAGES', d, True) or "").split()
if len(packages) < 1:
bb.debug(1, "No packages to build, skipping do_package")
return
- for f in (bb.data.getVar('PACKAGEFUNCS', d, 1) or '').split():
+ for f in (bb.data.getVar('PACKAGEFUNCS', d, True) or '').split():
bb.build.exec_func(f, d)
package_run_hooks(f, d)
}
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index cb647b9640..ad9c0b96f1 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -345,7 +345,7 @@ IMAGE_CMD_ext2.gz = "install -d ${DEPLOY_DIR_IMAGE}/tmp.gz ; genext2fs -b ${ROOT
IMAGE_CMD_ext3 = "genext2fs -b ${ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3 ${EXTRA_IMAGECMD}; tune2fs -j ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3"
IMAGE_CMD_ext3.gz = "install -d ${DEPLOY_DIR_IMAGE}/tmp.gz ; genext2fs -b ${ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3 ${EXTRA_IMAGECMD}; tune2fs -j ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3; gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3; mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext3.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext3.gz"
IMAGE_CMD_squashfs = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${EXTRA_IMAGECMD} -noappend"
-IMAGE_CMD_squashfs-lzma = "mksquashfs-lzma ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend"
+IMAGE_CMD_squashfs-lzma = "mksquashfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${EXTRA_IMAGECMD} -noappend -lzma"
IMAGE_CMD_tar = "cd ${IMAGE_ROOTFS} && tar -cvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar ."
IMAGE_CMD_tar.gz = "cd ${IMAGE_ROOTFS} && tar -zcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.gz ."
IMAGE_CMD_tar.bz2 = "cd ${IMAGE_ROOTFS} && tar -jcvf ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.tar.bz2 ."
@@ -373,7 +373,7 @@ IMAGE_DEPENDS_ext2.gz = "genext2fs-native"
IMAGE_DEPENDS_ext3 = "genext2fs-native e2fsprogs-native"
IMAGE_DEPENDS_ext3.gz = "genext2fs-native e2fsprogs-native"
IMAGE_DEPENDS_squashfs = "squashfs-tools-native"
-IMAGE_DEPENDS_squashfs-lzma = "squashfs-lzma-tools-native"
+IMAGE_DEPENDS_squashfs-lzma = "squashfs-tools-native"
IMAGE_DEPENDS_ubi = "mtd-utils-native"
IMAGE_DEPENDS_ubifs = "mtd-utils-native"
diff --git a/conf/checksums.ini b/conf/checksums.ini
index ccabc558dc..061a24eba6 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -1414,6 +1414,10 @@ sha256=4d2d7a6b69b00ffe603a136a9df7ecda9f43448c7bc723503e76eaec9ab8e9fe
md5=fab04d8ef999c303f720197adf261310
sha256=b6656a0da13d94b334f02637c89d8fe13aa54752040ad1b8f14f668d8cb96e93
+[http://www.abisource.com/downloads/abiword/2.8.0/source/abiword-2.8.0.tar.gz]
+md5=f61c623cdb3c3b2aed05bbc868050ddd
+sha256=b0d0f723a08372ac0889e44a590ee1f13f8c5487b394181396f978191a627bdd
+
[http://www.abiword.org/downloads/abiword/2.5.1/source/abiword-plugins-2.5.1.tar.gz]
md5=b1ce7ca49a0ee4e04f828e10eaebe6a9
sha256=37faf6ea346c9b6473c5b2dfd1bb599457faa06b6a7cdef58e3e9f3e2773976b
@@ -2662,6 +2666,10 @@ sha256=8c01b85eab01f35ed6bc9d597d4c6c76cf9ddbe2596d9120d66e66135df1f9a1
md5=9685fab33d39954ab8a0d22e0969d5a4
sha256=aaaa45ab361781aebda2093fdc7eb5c187f6215b4ba308dd6b9ff2b727e805d3
+[http://xorg.freedesktop.org/releases/individual/app/bdftopcf-1.0.2.tar.bz2]
+md5=148f20d28caaa69bbe7dcca7c2674fb6
+sha256=11017f0dd637fd3228bd56fdbbd72193fd747c10d893a711c25bf6734c4da06b
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/bdftopcf-X11R7.0-1.0.0.tar.bz2]
md5=f43667fcf613054cae0679f5dc5a1e7a
sha256=59760e300acf5b616400d08ac97d8ea265dfbb872b6131c65eb6246c61654803
@@ -3890,6 +3898,10 @@ sha256=32385c5393c7376035f911f3e887351b1ce8fb6e56498cc4258815bc6db06326
md5=835401781fb606741ba3606fa3e89b78
sha256=5ce2519bac9956de5700a5777b2bbc2cd89202ef2d2252a40a0d1e8c9854bec6
+[http://chicken.wiki.br/releases/4.2.0/chicken-4.2.0.tar.gz]
+md5=4705b7634447a571ff083f435c110fe3
+sha256=8dc3887b9907685c99aac6924980445506cccbe3ada29407aad80a0e34d3bb79
+
[http://www.chillispot.org/download/chillispot-0.98.tar.gz]
md5=4bcf48ec7a94f28faee8b7dc7a0dd97a
sha256=bace8a6a0b27d09983a2c509d6e6bf8ab786935e269036f14dc158505feba602
@@ -4262,6 +4274,10 @@ sha256=bd6f9e5dc0a89e9918f78a550f6e688480f044cec2e8674d34c7c6212831d6bd
md5=315ce9665059f1b2f4067cc8bd7ecf44
sha256=a6d9b1e4e8720941e7fa7e68373a9a211c16bad0eb449438e0b8c6093190cab6
+[http://xorg.freedesktop.org/releases/individual/proto/compositeproto-0.4.1.tar.bz2]
+md5=3692f3f8b2ea10dff3d2cede8dc65e79
+sha256=e2744576731e1416503aade0d58a7861d0260f70b993351473a9f38ced606984
+
[http://xorg.freedesktop.org/releases/individual/proto/compositeproto-0.4.tar.bz2]
md5=6281344d656d4e0c8e9db4918efe3d1d
sha256=6013d1ca63b2b7540f6f99977090812b899852acfbd9df123b5ebaa911e30003
@@ -4734,6 +4750,10 @@ sha256=4488bee8994e45dfe91563e89fd7e862779ae02a67b8a121d2ec10b263f2d2f3
md5=33ee591e0b1ca5ad7902934541db7d24
sha256=9d2684fac835e9cdf78befff2a58292f54db90094acbfb9f2ed5316fa30d641d
+[http://xorg.freedesktop.org/releases/individual/proto/damageproto-1.2.0.tar.bz2]
+md5=434b931b02bd83ed9fc44951df81cdac
+sha256=a50250770a2eead9d6fd56577e3328d0a6a1c4d425b58faa0f5ca7683169ee8f
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/damageproto-X11R7.0-1.0.3.tar.bz2]
md5=b906344d68e09a5639deb0097bd74224
sha256=f71ae6f74fd43af078c052d5e9daa262b6bd28cc0d40938c3743391eaeb58bfc
@@ -5934,6 +5954,10 @@ sha256=e65015aa0e6ada88a001b07b092265f4cbaf377d99b4233972995cdb94e698ef
md5=11adda157b03d63fd61d95ad7ef00466
sha256=6d19107b66bbc96c085b0c2dd286ece22dcb73ba56a17fc95b0f2cbc5d6f4eac
+[http://xorg.freedesktop.org/releases/individual/font/encodings-1.0.3.tar.bz2]
+md5=29637480e7ce12546668631067c19ced
+sha256=07d9766d4aebe05ac572599f8f903a4fe06ab667a8182f2b6cc03e5fb3b80f53
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/encodings-X11R7.0-1.0.0.tar.bz2]
md5=385cbd4093b610610ca54c06cbb0f497
sha256=6bf1203487811d81e792db04fa347f4269dfd96de6ecd6cc590edb3999695d8e
@@ -6710,6 +6734,10 @@ sha256=c7ce53b1678268ec2f08d0a32580c2783b6e297941de36d8b880c0533ed51c26
md5=8b298cc3424597f8138c7faf7763dce9
sha256=b3fe971ccc8152db6c78da7117c31fc4cd2fcb2b6a4df3db0f8fed13d4ceb08f
+[http://xorg.freedesktop.org/releases/individual/proto/fixesproto-4.1.1.tar.bz2]
+md5=4c1cb4f2ed9f34de59f2f04783ca9483
+sha256=e72a32916ad4bbd03847f8945c55582bdbafc039d286ded7365d402a7ff164ef
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/fixesproto-X11R7.0-3.0.2.tar.bz2]
md5=ff8899d2325ed8a5787cde372ca8f80f
sha256=dd7f67b0f01c253512b53a8a051271144316e82783d5f8391df77fc8c21ed327
@@ -6858,6 +6886,10 @@ sha256=60a55ba4a57b5ed430c62662283e9cb6de685c8497173f1f2065f684b2aceabd
md5=443acfe70e26716282f9068730fe92c4
sha256=f16c1b3a1625c9a225aff2ac12067bd3907d157b0c60625689a5080f092e9a19
+[http://xorg.freedesktop.org/releases/individual/font/font-adobe-100dpi-1.0.1.tar.bz2]
+md5=c754c3f4a5e08442bf6972b9466625ed
+sha256=a742bca8d6f8fb76b511f11c2ad2a1d326687fe9f0490a9cf64524c3782cb52c
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-adobe-100dpi-X11R7.0-1.0.0.tar.bz2]
md5=f5de34fa63976de9263f032453348f6c
sha256=88a76f7d261b5a4466ab28f2985a8af838a03ae03ee83ce3a441ca8332742cc3
@@ -6866,6 +6898,10 @@ sha256=88a76f7d261b5a4466ab28f2985a8af838a03ae03ee83ce3a441ca8332742cc3
md5=813b5d3723c84388a938ab6732e1329c
sha256=d62745bee0f5e4f355f237020667d783ae9fea5f18a864d748ae1287bd176339
+[http://xorg.freedesktop.org/releases/individual/font/font-adobe-75dpi-1.0.1.tar.bz2]
+md5=a47681c97bd012196691c95e34d400f1
+sha256=4de51765d26b70728a8b6573be89d731be0384466290dbbb216cb05becdf9f71
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-adobe-75dpi-X11R7.0-1.0.0.tar.bz2]
md5=361fc4c9da3c34c5105df4f4688029d0
sha256=f1c7377f6b3b1d91ef384b81f44853e9dc23ff62c11f9f30291e34e9cf6c9d87
@@ -6874,6 +6910,10 @@ sha256=f1c7377f6b3b1d91ef384b81f44853e9dc23ff62c11f9f30291e34e9cf6c9d87
md5=5d28a30efef966f8dbbaff9a6619f01a
sha256=1943e1aa70c169b13bc7a308c8e949267f9ce6327479803203fbf10c06a9b5fe
+[http://xorg.freedesktop.org/releases/individual/font/font-adobe-utopia-100dpi-1.0.2.tar.bz2]
+md5=1c3a2c26bd3f6e406fbadc7380efa369
+sha256=dd8c3f5509589f9232b26273fecde2694bd2bb069c6aaa8f504ad3d24775955e
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-adobe-utopia-100dpi-X11R7.0-1.0.1.tar.bz2]
md5=b720eed8eba0e4c5bcb9fdf6c2003355
sha256=b962d55a91510e70c108b0c34ee928f8016391b40a8bc26d6df85d59c1283af5
@@ -6882,6 +6922,10 @@ sha256=b962d55a91510e70c108b0c34ee928f8016391b40a8bc26d6df85d59c1283af5
md5=dd912284e4750023f9682812532fa033
sha256=ebd4e2194bbc727e3bbda0f5dc1493fe3a211c7cf77e3d41f93135dd04ca7089
+[http://xorg.freedesktop.org/releases/individual/font/font-adobe-utopia-75dpi-1.0.2.tar.bz2]
+md5=71dffebeeb702d10876555c361fb69cf
+sha256=3b3ca4ba5b5b73e13b3662b5be16ea92a244adb3303a3625437ff7d385ba6557
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-adobe-utopia-75dpi-X11R7.0-1.0.1.tar.bz2]
md5=a6d5d355b92a7e640698c934b0b79b53
sha256=168b326dbad59381d0e0a9544d26f1fb8bd23d3b5478fcc426f7ce470ee8a2f7
@@ -6898,6 +6942,10 @@ sha256=0ba76231d9af3422376d9c1652ab3f8614bdd52acc2e2a839d911e1a54b5d5b6
md5=c4776b6f0f2ecdb7670b6fe64b5d2a2d
sha256=77db60d63224b9d856129d23c0b0d0e9154a166137daf749d39abfd56a4f89b6
+[http://xorg.freedesktop.org/releases/individual/font/font-alias-1.0.2.tar.bz2]
+md5=9d40dba6fb8cb58dacb433fc7bcaafca
+sha256=438bd6f3f9305edb6ea9905dc92c135d6067bbd7e01df913cb3ef27162b38270
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-alias-X11R7.0-1.0.1.tar.bz2]
md5=de7035b15ba7edc36f8685ab3c17a9cf
sha256=9c929ad5631e078d97835e5b631532edc8e3690d5068e59393d4aa04288022f4
@@ -6906,6 +6954,10 @@ sha256=9c929ad5631e078d97835e5b631532edc8e3690d5068e59393d4aa04288022f4
md5=81595016e2ff859716fc256ebb136ba6
sha256=90e9dfa3f33805ea2ffe06faa7258d8335cdf415826f963a1d0a76bd8df7bc94
+[http://xorg.freedesktop.org/releases/individual/font/font-arabic-misc-1.0.1.tar.bz2]
+md5=817ceb99636c873ad7679fe2a468678d
+sha256=f4b0305afd47844d337a87d03aab4359b576dc36464317f86541324ee6ea6f60
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-arabic-misc-X11R7.0-1.0.0.tar.bz2]
md5=b95dc750ddc7d511e1f570034d9e1b27
sha256=264119a6bda478c5cb226161d660fdc1c24c957b124c1e1cc8e693a06607c6a0
@@ -6914,6 +6966,10 @@ sha256=264119a6bda478c5cb226161d660fdc1c24c957b124c1e1cc8e693a06607c6a0
md5=e5592de74a5c04e3a2608800dd079197
sha256=ae8a11777579a2242f52ed19b5fdd6c6ef6fe2c2661a49d0599188de78cfee4a
+[http://xorg.freedesktop.org/releases/individual/font/font-bh-100dpi-1.0.1.tar.bz2]
+md5=8af580b87e17ddacdf0ce3d775248387
+sha256=c46d68487b09993266f34ac87a47e035af8a3f42c38f33d26ff18ac0c31c3397
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-bh-100dpi-X11R7.0-1.0.0.tar.bz2]
md5=29eeed0ad42653f27b929119581deb3e
sha256=8f74dea65f4d39236f29cdf29ffbfe948d1e8a99963ceb9b1b87b081765dba55
@@ -6922,6 +6978,10 @@ sha256=8f74dea65f4d39236f29cdf29ffbfe948d1e8a99963ceb9b1b87b081765dba55
md5=6e51cd02f4ce32e1393e34ab17a9b211
sha256=c79467b440cc9389c75d55fba64d0126d0f2e1e6c019dfafb7d89d07802c05bf
+[http://xorg.freedesktop.org/releases/individual/font/font-bh-75dpi-1.0.1.tar.bz2]
+md5=53785d2688392aec5cba79fc0ddb23a2
+sha256=8a3175a977f169f0882054ac5bf86c97bfee1dc031415092f75b2cfb57b69d40
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-bh-75dpi-X11R7.0-1.0.0.tar.bz2]
md5=7546c97560eb325400365adbc426308b
sha256=73ce25f055e0e5b1dc1fa41e7cf7ef3c2903715db9b3a240c1a9c391c1e298ba
@@ -6930,6 +6990,10 @@ sha256=73ce25f055e0e5b1dc1fa41e7cf7ef3c2903715db9b3a240c1a9c391c1e298ba
md5=c44d3f730564da465993e9292a33c235
sha256=36d47dcba591037b6af35fc151e3d7a6c9f16f42b3182e083ea140cb584d7013
+[http://xorg.freedesktop.org/releases/individual/font/font-bh-lucidatypewriter-100dpi-1.0.1.tar.bz2]
+md5=a2b3951dbc6ddb2e4c7e09519dd13333
+sha256=8156f7c4e5a3fbd478c287154c7e3c55c6631c148a7b185f604753d118018da9
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-bh-lucidatypewriter-100dpi-X11R7.0-1.0.0.tar.bz2]
md5=8a56f4cbea74f4dbbf9bdac95686dca8
sha256=9359a40738e7199d3b77ad0e55e02d0e27a6101aede4bc2a50e3c80d2c02cf03
@@ -6938,6 +7002,10 @@ sha256=9359a40738e7199d3b77ad0e55e02d0e27a6101aede4bc2a50e3c80d2c02cf03
md5=fdd9be5b9db94ef363a33e39b7977e2b
sha256=50f2f36f533a49c65842568052fe4d065354ff6f39ab36dd2129f465741da046
+[http://xorg.freedesktop.org/releases/individual/font/font-bh-lucidatypewriter-75dpi-1.0.1.tar.bz2]
+md5=6397062f2b346ce5bbe5472f3353a9a9
+sha256=20ff9c5914c6916c96647eeb3ba700468952fdf01925e62516219a7dd6eb3841
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-bh-lucidatypewriter-75dpi-X11R7.0-1.0.0.tar.bz2]
md5=e5cccf93f4f1f793cd32adfa81cc1b40
sha256=8d55580d9cf032127bd17b8d4a6bdcdb09392e76fe8ec075ce7472bc3de8e5d6
@@ -6962,6 +7030,10 @@ sha256=f7cede14e92d83d6c3d36eeb9d3d66fdd60372c39e8571cb9ae40a7d8c5182d5
md5=173352ddec3d26e2b91df1edcf1ae85b
sha256=0c705a74d7b52e41a1f1aa6732f0200877ba2d4303b79513a524e7cc1b30e2d2
+[http://xorg.freedesktop.org/releases/individual/font/font-bitstream-100dpi-1.0.1.tar.bz2]
+md5=3b8748f8029c53595e4a4a1b23fa790a
+sha256=3e05c9b74d0dc00e6e46ec758888e66514ab24fc75930877d4ba6db7d49f0347
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-bitstream-100dpi-X11R7.0-1.0.0.tar.bz2]
md5=dc595e77074de890974726769f25e123
sha256=3e9b85774a062d8a9c997d57d45164179e403061f0bb3765e593b6a465c523e6
@@ -6970,6 +7042,10 @@ sha256=3e9b85774a062d8a9c997d57d45164179e403061f0bb3765e593b6a465c523e6
md5=beb476657d50d07d17eef7c325a5ed08
sha256=2ddfeaccca97524e1b0f4fb37b2fd0f1338698e35f8b05b22b594fe29e201bfb
+[http://xorg.freedesktop.org/releases/individual/font/font-bitstream-75dpi-1.0.1.tar.bz2]
+md5=aed54fb53d2d24aff10c92985286d1e5
+sha256=cf9e1cb1c21517a566e5678791778d40c7c915d792bd29d319928f4e4234662b
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-bitstream-75dpi-X11R7.0-1.0.0.tar.bz2]
md5=408515646743d14e1e2e240da4fffdc2
sha256=71b1b6416e0018ad954225f53c0c9f2eaf8d663e1084657f3cb9b930073b7f6b
@@ -6994,6 +7070,10 @@ sha256=f6f09d398a89595bec5825043d36056c0a080aa2d47ae3e52c01a7258119fd6d
md5=22b451e7230b8c003cfc496ee2d360cc
sha256=06c94e7033f5cae77b9ba27b84af7c1d3e7f73a7239346aabf98eda6c7f484ee
+[http://xorg.freedesktop.org/releases/individual/font/font-cronyx-cyrillic-1.0.1.tar.bz2]
+md5=15f86f5e572df21218617982eb4b3bfc
+sha256=f7b43a428afe3111513e8ff0ebccc00fbddf2b57cec261ad9017d582fc9a3422
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-cronyx-cyrillic-X11R7.0-1.0.0.tar.bz2]
md5=447163fff74b57968fc5139d8b2ad988
sha256=28593d204b638c430d3ba1ecd3c87d1416d72d8dd1874a44588371970dc44b34
@@ -7002,6 +7082,10 @@ sha256=28593d204b638c430d3ba1ecd3c87d1416d72d8dd1874a44588371970dc44b34
md5=305fa22cdfefb8f80babd711051a534b
sha256=955de27117581ba501d7c2abae7f38b0a65662e4ab2e2b54b9eb2dc07aa5f3c5
+[http://xorg.freedesktop.org/releases/individual/font/font-cursor-misc-1.0.1.tar.bz2]
+md5=13c21c4d74155c662152a1a74f249d96
+sha256=deee02861beaa335448e9aba4320c88c30a174bc3dcfb05a434b4ddb137dc1b3
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-cursor-misc-X11R7.0-1.0.0.tar.bz2]
md5=82e89de0e1b9c95f32b0fc12f5131d2c
sha256=5a67c7201388653eda3efaaa62c2f8d4db4ce980a666436418c45575034c42b4
@@ -7010,6 +7094,10 @@ sha256=5a67c7201388653eda3efaaa62c2f8d4db4ce980a666436418c45575034c42b4
md5=61f9eab48c619af5494d3e384d8d7d79
sha256=f198eac92e343a38b1e23288880bac91c439bdc90c61a79a7cb0718e9a468926
+[http://xorg.freedesktop.org/releases/individual/font/font-daewoo-misc-1.0.1.tar.bz2]
+md5=05597e2b193a7b7de2ca525468276b1d
+sha256=e2283e4280c66fec7c986f0b4a476811f3419b9517280cd8b59a01563de6e491
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-daewoo-misc-X11R7.0-1.0.0.tar.bz2]
md5=2fd7e6c8c21990ad906872efd02f3873
sha256=c279ef1d730625a1cee74527529be25d0cbc91f7a8bb310ced871ce58cdc148d
@@ -7018,6 +7106,10 @@ sha256=c279ef1d730625a1cee74527529be25d0cbc91f7a8bb310ced871ce58cdc148d
md5=284e554db1c64fb7580a06df01444a2b
sha256=83386d1225dab1ebc58e7d197acc4c310ed4e29840abf291b1fa2ffac1b68bb9
+[http://xorg.freedesktop.org/releases/individual/font/font-dec-misc-1.0.1.tar.bz2]
+md5=05714516824c680ce747c6ef9d2fbbdd
+sha256=fb20da4afddc07e236e830939de0fdfc9a93c5c1c7048fafe669fac19b496552
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-dec-misc-X11R7.0-1.0.0.tar.bz2]
md5=7ff9aba4c65aa226bda7528294c7998c
sha256=e7ee982884f0c1fca409b6b9a946493afb23c9e61d33ac84ec29819717a66b75
@@ -7034,6 +7126,10 @@ sha256=534210f571a2166f3b6d4d8e1c37f74574c0130a4a1ed4c7d37b50a98fc95cfc
md5=ec709a96b64b497a5cb5658c93bd38dc
sha256=97e61313ce0bf229da5d489fc5a05562fdca14f9acc17c40d0b272a345ba4ea2
+[http://xorg.freedesktop.org/releases/individual/font/font-isas-misc-1.0.1.tar.bz2]
+md5=88b5b32c5a27576e9d00675bcc966806
+sha256=52fe0469eb91e94dc7a0e8164e947fee439f398b0eb63c210f682524f12cea7b
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-isas-misc-X11R7.0-1.0.0.tar.bz2]
md5=c0981507c9276c22956c7bfe932223d9
sha256=c845cfe0b4bc02ac2da322f4dbf6dab1ccfd204e926c40634b91c260316f55f7
@@ -7042,6 +7138,10 @@ sha256=c845cfe0b4bc02ac2da322f4dbf6dab1ccfd204e926c40634b91c260316f55f7
md5=61febb49a71065723a1fba17cbf23c67
sha256=3721eefd4ffc47c6948065f7acf9d5c731c4e8e54105d096735876d3712dc7ba
+[http://xorg.freedesktop.org/releases/individual/font/font-jis-misc-1.0.1.tar.bz2]
+md5=5835c99d056f4a29d7d6a5ae873cf00e
+sha256=a63b98c204395b61949214db199c38094489336731d4a4179eb053a5bb54e8cf
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-jis-misc-X11R7.0-1.0.0.tar.bz2]
md5=3732ca6c34d03e44c73f0c103512ef26
sha256=7f4c3ce6ddfa52232d00e09b0bc20316b2ab9edd8007c57c8f08a742dd78b546
@@ -7050,6 +7150,10 @@ sha256=7f4c3ce6ddfa52232d00e09b0bc20316b2ab9edd8007c57c8f08a742dd78b546
md5=8c8bffd7540f05caa0dbb4e6e1d6c58e
sha256=16b17b5939e12e9381c8096c1f77f064ee0073fa9cb09297dec278bade17a572
+[http://xorg.freedesktop.org/releases/individual/font/font-micro-misc-1.0.1.tar.bz2]
+md5=6350117efebe340f33e818f4a33e4e4b
+sha256=a5b987ea38bf53f63968a6cad1c052ca6d0fc678d9409c1953701f0159e4972b
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-micro-misc-X11R7.0-1.0.0.tar.bz2]
md5=eb0050d73145c5b9fb6b9035305edeb6
sha256=23b9c222618a1ea090b3a2b688f4c958b8469ed5f30a5c3e3d54bb02b235b222
@@ -7058,6 +7162,10 @@ sha256=23b9c222618a1ea090b3a2b688f4c958b8469ed5f30a5c3e3d54bb02b235b222
md5=3596907d7a2a99c81d8de99bc4552b6a
sha256=7c0bac1302129d3bf40ec7d9830e728b0251dc20dda8c8979227b478663290ff
+[http://xorg.freedesktop.org/releases/individual/font/font-misc-cyrillic-1.0.1.tar.bz2]
+md5=c79d7921d95b2c4f10fad464bb121090
+sha256=dafafbfd93d95820449972fd86ec312266eb73e5297966ee6e0163d294d8af75
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-misc-cyrillic-X11R7.0-1.0.0.tar.bz2]
md5=58d31311e8e51efbe16517adaf1a239d
sha256=e332497fe6220c019c411912653a96d26c8706c03456ac8ff3ff5ef38b1cc77c
@@ -7082,6 +7190,10 @@ sha256=cacbf0c055b95db07e4e61716a549195f6ed054ba98d0b443879f57876ca253d
md5=2a57f6188c41d4bc1b88ca3d08ad011d
sha256=26a02560ad1f1648e7c36be6daf42910762131d3974422d1b306e6cae13f17db
+[http://xorg.freedesktop.org/releases/individual/font/font-misc-misc-1.1.0.tar.bz2]
+md5=878bfd4e9f14c1279cea3a8392e0dbdd
+sha256=50f7528ab94f319a11efcd555dd5a7120191a42cf892c87cd6bdea8b908d497b
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-misc-misc-X11R7.0-1.0.0.tar.bz2]
md5=4a5a7987183a9e1ea232c8391ae4c244
sha256=bdc1b9407305a88bb687caa46443abddef6149d2e681597e12f1c48ec5bf3678
@@ -7090,6 +7202,10 @@ sha256=bdc1b9407305a88bb687caa46443abddef6149d2e681597e12f1c48ec5bf3678
md5=648b409b7eb78ad1cd5f6d7fac3eef88
sha256=f219183bd0f2b8ceca42a8a345c921f2a8ee19f4d86fef11c4ce8918d41aedff
+[http://xorg.freedesktop.org/releases/individual/font/font-mutt-misc-1.0.1.tar.bz2]
+md5=aab7ac62b960e77aa11d032bafe1d460
+sha256=77bf33cbf5d1849bef4e516698eb45b7d16263a84dcc2299fd61383501906e25
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-mutt-misc-X11R7.0-1.0.0.tar.bz2]
md5=139b368edecf8185d16a33b4a7c09657
sha256=386a8d522ffc427e00df8034a8ce834767643e104b0aac141cf1cbf3113dd1a4
@@ -7098,6 +7214,10 @@ sha256=386a8d522ffc427e00df8034a8ce834767643e104b0aac141cf1cbf3113dd1a4
md5=f1c6063d2fadc57e696a0aab69afd6e0
sha256=454e6cf885a4475569ce24ad3d4a82cb331d74e1a25f0747694a71098b56ef7a
+[http://xorg.freedesktop.org/releases/individual/font/font-schumacher-misc-1.1.0.tar.bz2]
+md5=86f4b7d8b11a2e6da70884c59b5866a3
+sha256=3003915fb53930fee5e6086ee7546ea0857ef0fc2311aaf84ed937b1b4de1b4d
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-schumacher-misc-X11R7.0-1.0.0.tar.bz2]
md5=d51808138ef63b84363f7d82ed8bb681
sha256=d5c6c9f293ffa4d2cdb312b463381271bb8ad763738396671fdea19456fb38df
@@ -7106,6 +7226,10 @@ sha256=d5c6c9f293ffa4d2cdb312b463381271bb8ad763738396671fdea19456fb38df
md5=aea02d9dff03e0e1a3de85364367c0c6
sha256=01de82644a9b765599ba8c36c6b689035a85b6590486842067f707f2cb0cf268
+[http://xorg.freedesktop.org/releases/individual/font/font-screen-cyrillic-1.0.2.tar.bz2]
+md5=c912a976b66073acd80c9d5c624f3aae
+sha256=c5dd881fb13ff16d358acb27f99f6c281415d3824beb342f3a02603f0efebe11
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-screen-cyrillic-X11R7.0-1.0.0.tar.bz2]
md5=c08da585feb173e1b27c3fbf8f90ba45
sha256=0c6da93cecc16e4ddc6897e90b941d72087bc82cfcbb26ef54e9a59d371c601d
@@ -7114,6 +7238,10 @@ sha256=0c6da93cecc16e4ddc6897e90b941d72087bc82cfcbb26ef54e9a59d371c601d
md5=0dfddd1a946e4497f009094c0ae1bdd5
sha256=1ae93ae76020b57cb0054ba9f33b4d5aec71342c6596750c07303d5c53452e23
+[http://xorg.freedesktop.org/releases/individual/font/font-sony-misc-1.0.1.tar.bz2]
+md5=7b6f5117814599b86ed3470de6c62aa3
+sha256=da9526844c74ce395d3912d3d8f538cd57102d6bcd9f73fd0a5dccf53bfc56ca
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-sony-misc-X11R7.0-1.0.0.tar.bz2]
md5=014725f97635da9e5e9b303ab796817e
sha256=4ea7d0a314b6c7ec65c92f44a3dad39ac9535b1bb9f54768573f60b69902e5cd
@@ -7122,6 +7250,10 @@ sha256=4ea7d0a314b6c7ec65c92f44a3dad39ac9535b1bb9f54768573f60b69902e5cd
md5=e17d43a7c6c0d862cfba0908ff132ffa
sha256=03c12d8f4d8e7f0178f501ea3ee0709ee3a1deda733afecd631807e6ba5729e5
+[http://xorg.freedesktop.org/releases/individual/font/font-sun-misc-1.0.1.tar.bz2]
+md5=5a185c5549a650bf062d343e128682ca
+sha256=411522f5ea8f951a7432ab946a92f524493e3a1a6e1ca3c48f09c46cb5ae9d09
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-sun-misc-X11R7.0-1.0.0.tar.bz2]
md5=0259436c430034f24f3b239113c9630e
sha256=80094cd7060a08bda61eef0e481800e8f94d4bbb08b8297dcf6aecea99a09a07
@@ -7130,6 +7262,10 @@ sha256=80094cd7060a08bda61eef0e481800e8f94d4bbb08b8297dcf6aecea99a09a07
md5=b81535f78fe05732931f02841e5ca37b
sha256=048c23b17ea32ee3abb341f0b1105ad07517b2e78efe2e95a4a8218089600612
+[http://xorg.freedesktop.org/releases/individual/font/font-util-1.1.1.tar.bz2]
+md5=5c735ae6916b65186f3c876d76c27ce3
+sha256=a33f1e3b0d7c3fd7c3505ce68888fec3cf897353084187d96e1e821fe3c02f88
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-util-X11R7.0-1.0.0.tar.bz2]
md5=73cc445cb20a658037ad3a7ac571f525
sha256=02eefdacc36d5df3707b3e454f5842d06c9c2eb9591e4cae93ccd3d66c78368f
@@ -7150,6 +7286,10 @@ sha256=6ec8f7024e93568062b5e824f6799d3efcef97c03f798a094a60599a32180718
md5=b99b02aff36a88ca3379715423c60303
sha256=478a7f6881fce6a335b409e1326449af4162a147d268f1978b8dd81c834beee3
+[http://xorg.freedesktop.org/releases/individual/font/font-winitzki-cyrillic-1.0.1.tar.bz2]
+md5=92bf4ecb373faac545cef2dcbe40be35
+sha256=7c57c29f70db18e543a3eb8f785b6b5d1372b78eee27707dbb10359d8ddb1446
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/font/font-winitzki-cyrillic-X11R7.0-1.0.0.tar.bz2]
md5=6dc447609609e4e2454ad7da29873501
sha256=5b6997057658e6b9e46c350c76fbeb32e597a6bb61c1e86b24494f5327742d1d
@@ -7210,6 +7350,10 @@ sha256=42c15ed555719c27f67990454cdda791cbcd26ab98712fd88ca7e20e6ce3f1fd
md5=c946f166107b016a21cc7a02e1132724
sha256=83bd547131aa11a232717a0f06d3c6cd58a0b2f6d541660bbe9ebf43073a8b7b
+[http://xorg.freedesktop.org/releases/individual/proto/fontsproto-2.1.0.tar.bz2]
+md5=f3a857deadca3144fba041af1dbf7603
+sha256=5a9af61dc9142488c9ba6e4ae30a9d970ea0f889a1ab7f59de1c1898c83aeb35
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/fontsproto-X11R7.0-2.0.2.tar.bz2]
md5=e2ca22df3a20177f060f04f15b8ce19b
sha256=90a5d9ad2328e682a58c179a7df9eac1193db06423e832b107bd4e7802f660b4
@@ -8662,6 +8806,10 @@ sha256=7f836c8189b55ef4ec8f3387673687d0a5c1a713abc9617144638b28e6857bd2
md5=dc590e34107de5cb296c238afa8e843b
sha256=9d9ef356cc4478499442573556787125dc76c8acd1e55e5001fb11f1e224d27f
+[http://xorg.freedesktop.org/releases/individual/proto/glproto-1.4.10.tar.bz2]
+md5=c9f8cebfba72bfab674bc0170551fb8d
+sha256=7fb83a28ae24d4f56eca88bc48f0fe414faee1afb2574bfb6257b52e8c716fcf
+
[http://xorg.freedesktop.org/releases/individual/proto/glproto-1.4.8.tar.bz2]
md5=3dfbd17203c0c88b94b6f579f24c11cc
sha256=2f5d84413853b688b7bb46c66fee108a499190e1f7810afffb775910778f053c
@@ -9270,6 +9418,10 @@ sha256=f08d0f214db875eac602bec37b20042f0ee4f14427f9559477a040ef39003538
md5=ca9e67a92945af7230eae72b2e8430ec
sha256=19a1f79c42b37ee3c90ba6298442b52438f1c67d311ebd33db72210cee2d99d2
+[http://ftp.gnome.org/pub/GNOME/sources/gnote/0.6/gnote-0.6.2.tar.bz2]
+md5=f58bbfd7f1665690198a07499556290a
+sha256=6a2af8f4e4f0d68e67cef8c796dd4a048d99601d7192d19127a88e273b91b648
+
[ftp://ftp.gnu.org/gnu/ghostscript/gnu-ghostscript-8.16.tar.gz]
md5=c42dfaebc37fe81eab0b5676b124ab63
sha256=417922d35e66ee90cf93cf3e93fdf281ec6b92de4f7436c9c1a97c0cc35b94a8
@@ -13146,6 +13298,10 @@ sha256=d172e5a401a2607f4ff145db4e8e09c193a1980bbb2c5c7f824e61ee3fdfdff3
md5=c6265b59ea2b594fd68e33f9125b4d20
sha256=e4863cdf5d471763806e9bcae25ea47606a56cd91a5546a34c093aa3de181051
+[http://xorg.freedesktop.org/releases/individual/lib/libX11-1.3.2.tar.bz2]
+md5=001d780829f936e34851ef7cd37b4dfd
+sha256=4def4d5c9fce85d690f1f29d675154594acdea3d3fe792d0cb513732c7b4bcb2
+
[http://xorg.freedesktop.org/releases/individual/lib/libX11-1.3.tar.bz2]
md5=0545089013213e90aac19b8f8045d32e
sha256=34656d022ff2f94430b534612821428fe15ade028d86a42907958167f2e497ac
@@ -13222,6 +13378,10 @@ sha256=2503f3e3348ee3cf38368161dfab8112d3aea2a26deea34f3136898c13cfb88d
md5=066218dceb82eb8da0e11d259ed3ceda
sha256=20c1ecad21474187b340cd6056b1083da8cfa5d919d208feac360644108db587
+[http://xorg.freedesktop.org/releases/individual/lib/libXaw-1.0.7.tar.bz2]
+md5=815e74de989ccda684e2baf8d12cf519
+sha256=740aaee9b09586b1c80f80890381c5ee70ea11efa4b6159f707c0f3684c6f328
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXaw-X11R7.0-1.0.1.tar.bz2]
md5=ded3c7ed6d6ca2c5e257f60079a1a824
sha256=076ed9c4b07379b1a957753a3c8fd2a1d93ba460587d450787630f81a85f9741
@@ -13334,6 +13494,10 @@ sha256=2dfd8eace1cafacc87b4055c57efeb771a740e24141d3f113de58c2a9eebd21f
md5=aa11d859cc8e9a0bad3bb55e1666547b
sha256=1280af98466cb4484a89858ede3347ba9d7785baeb80b11f2066142dc2317d97
+[http://xorg.freedesktop.org/releases/individual/lib/libXext-1.1.1.tar.bz2]
+md5=c417c0e8df39a067f90a2a2e7133637d
+sha256=110ce3bc7fb3a86659556994d0801c74bedcbd8ba8d1f90ee33d4c47a91e9bb3
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXext-X11R7.0-1.0.0.tar.bz2]
md5=9e47f574ac747446ac58ff9f6f402ceb
sha256=5ccefe638c3dfc12fd8c2f2de38ec7e0e0b54bb271fa75f687e474a58edbad28
@@ -13590,6 +13754,10 @@ sha256=9882ba2d74e9ca5cfd0c2231ac8eba14d8fc59d538c787fa639f8d77c996bbef
md5=dc266e850c51368f964e0d67bf5fb5e6
sha256=5682d343dd4e7ef291a6577e956c331946ce5801d8fa076284a01b41de3017ec
+[http://xorg.freedesktop.org/releases/individual/lib/libXrender-0.9.5.tar.bz2]
+md5=276dd9e85daf0680616cd9f132b354c9
+sha256=bc0590438a4be2b674cbac6f4ad46e5a89acd02aa94817da0fa8eb3ef05ed5d5
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libXrender-X11R7.0-0.9.0.2.tar.bz2]
md5=3f0fa590dd84df07568631c91fbe68ab
sha256=f240490ce348cedcf09c2c5d170c7d79002790d72ea5dc3d7d702005684ff713
@@ -14286,6 +14454,10 @@ sha256=b53afe2a88fa24bdd53e2a3dd51ab660b89b46b1ba4918735d7331b2e56548d6
md5=5cd16a2e51ca7b96a3081c7486ff98b9
sha256=b993aa3d17e845a12a49160b5d96993059ce919c7ba902005b910b867b6258c8
+[http://xorg.freedesktop.org/releases/individual/lib/libfontenc-1.0.5.tar.bz2]
+md5=4f0d8191819be9f2bdf9dad49a65e43b
+sha256=7f3cde0331e9ad3da720b1a8255e121673701199df0802b62380436e74222700
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/lib/libfontenc-X11R7.0-1.0.1.tar.bz2]
md5=d7971cbb2d1000737bba86a4bd70b900
sha256=448a4e35a8685b60829d1b51b498e2a6e4107549fd0458fa17dcc801d29d5f72
@@ -18174,6 +18346,10 @@ sha256=2a786e03611a53c7f6263db446c0c9ef76e94bcf930b0b5867cc6a9c19653074
md5=35394bf3f746a57fba624dba52fdbba3
sha256=6f9a3cc70d27704ee8e4ff01d5d69c974b059fd7e470172b68cfa477c7caf8e3
+[http://xorg.freedesktop.org/releases/individual/app/mkfontdir-1.0.5.tar.bz2]
+md5=9365ac66d19186eaf030482d312fca06
+sha256=a534650cff503619f9101577d816cde283da993bc039273477bd8dfbd01a2d0b
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/mkfontdir-X11R7.0-1.0.1.tar.bz2]
md5=29e6e5e8e7a29ed49abf33af192693cb
sha256=409f2fdfd87b5185ca651197c1d1facc22619bc1399bfb8dda8fda1fbb6205b2
@@ -18194,6 +18370,10 @@ sha256=dc9b946cc23490c960fbca8b32e4bba4bc23ce404a8d7e1c0e916894c83b4227
md5=5e6e210b70adfef1264b0212aab1f758
sha256=f79dff54153dc3beb9eb3f2e4776dbc55ed2a4d3d0adbf9c8a2d9eb230ed3850
+[http://xorg.freedesktop.org/releases/individual/app/mkfontscale-1.0.7.tar.bz2]
+md5=96ca346f185c0ab48e42bf5bb0375da5
+sha256=8306b229cca233216a6582cb1ff60af78e37c47d6412ac823d7d41c3d7de7127
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/mkfontscale-X11R7.0-1.0.1.tar.bz2]
md5=75bbd1dc425849e415a60afd9e74d2ff
sha256=e83b80b4ccd7863223fac4a2d54974a64a79c635d6bdda0c6e7039f966eae9e2
@@ -20806,6 +20986,10 @@ sha256=2b16516ef147bb604e1cf50c883143a052a7ff92d2930b70e571da0603b7d9ce
md5=837df4a02c61a60a880644393b57faed
sha256=45d491879791140dc1f20287e6489f32dc59ae37628038d991d9511abede3fc2
+[http://cairographics.org/releases/pixman-0.15.18.tar.gz]
+md5=9b60fe7623621b546b76777b8b7d2490
+sha256=3a5003cf6c7d5b03ed5977c108ee11410cfd7849eea370eb4feae98f2822c795
+
[http://cairographics.org/releases/pixman-0.15.6.tar.gz]
md5=fe922698df46b21d7e19f28ded4ca100
sha256=3438437c131c9847b34106225a728c11e522776ac454bb8740a9bc7aea409f22
@@ -22514,6 +22698,10 @@ sha256=102fd42f8f2562450f4e45c28bfb0390c2d30ffa6a805eead15d67018930f654
md5=a49416013fff33c853efb32f1926551e
sha256=cfeb1429465e3c24debde1bf53ec35ef738fde5e80d2eed14f33e315e747bb8d
+[http://xorg.freedesktop.org/releases/individual/proto/randrproto-1.3.1.tar.bz2]
+md5=a5c244c36382b0de39b2828cea4b651d
+sha256=d93ca3c0ae710a45da6a27e1eeadfb3c9d4aee47f23657c996e1124c0d9985ca
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/randrproto-X11R7.0-1.1.2.tar.bz2]
md5=bcf36d524f6f50aa16ee8e183350f7b8
sha256=7a5eb58f10d02f58c2f7fb153bb5dc6d72173d5fa3d317bdbd9674f4577e0ad0
@@ -22598,6 +22786,10 @@ sha256=e3e6a4f3f8e5c6052ab70155990c074d87aa0b614fc1be31d194750d1d962fcf
md5=0ed4706564a34fc2aff724aa16d3ff00
sha256=04e77a8b14f373a1825bbe0116cd0db8b2c5dee17b34ba9bddd27e576609cff9
+[http://xorg.freedesktop.org/releases/individual/proto/recordproto-1.14.tar.bz2]
+md5=70f5998c673aa510e2acd6d8fb3799de
+sha256=1bd2375bd2bdaa3ea90aa0a70cf1657a2d61877b6eb7e3fe3e6f1d289e69d067
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/recordproto-X11R7.0-1.13.2.tar.bz2]
md5=6f41a40e8cf4452f1c1725d46b08eb2e
sha256=080aecbaaa5ad81750541ed19fb5ea6ccb45e1c2a5a93e9a2878a42532e40ba5
@@ -22658,6 +22850,10 @@ sha256=60e83bebab37c2754ae77cc359c0b67e8bc72b46821c7fa260ccc5c811bd741f
md5=b00a97b00bf93ab2ac6442ea13ea9c0b
sha256=779317ca2e99f02b394af0c6f77f16def56de3b71a5d9f9ac6e5e9cfb65192e1
+[http://xorg.freedesktop.org/releases/individual/proto/renderproto-0.11.tar.bz2]
+md5=b160a9733fe91b666e74fca284333148
+sha256=c4d1d6d9b0b6ed9a328a94890c171d534f62708f0982d071ccd443322bedffc2
+
[http://xorg.freedesktop.org/releases/individual/proto/renderproto-0.9.2.tar.bz2]
md5=28fbe8a59ebd31f098b90ec64f3d133a
sha256=7754dfbbb1e3818f28720fa9647b8a593e9d54626a7896771c2bfac7f75e2726
@@ -22714,6 +22910,10 @@ sha256=78e0a532bb84d6d85e90244bf3bb0ee9a5246545ebc9b677173e37e231d30cdc
md5=b823b314e37eb19dae1f297951d2e933
sha256=0c33d6fceef5483001459bdc934b5831502250b27f1f4ad370ab044f8ab53487
+[http://xorg.freedesktop.org/releases/individual/proto/resourceproto-1.1.0.tar.bz2]
+md5=84795594b3ebd2ee2570cf93340d152c
+sha256=408d9ab067e4141d1bb844d2d0d7d26ad177567384190c32a913131cf549b36b
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/resourceproto-X11R7.0-1.0.2.tar.bz2]
md5=e13d7b0aa5c591224f073bbbd9d1b038
sha256=72df7c8fe3ea2177adcb9442fcc49dfde75231abf0300844bf4551393cdd42b4
@@ -23254,6 +23454,10 @@ sha256=b502bc765cffc23189b77ba4d22e843fe03404bfab4e24b97ff4daee58176b33
md5=5d551850e6f4acdf49a13f4eb3a5bbfa
sha256=db09abf73cc339c05c0488639731794372a4770cfca76c2645f503f9fccd478f
+[http://xorg.freedesktop.org/releases/individual/proto/scrnsaverproto-1.2.0.tar.bz2]
+md5=9040c991a56ee9b5976936f8c65d5c8a
+sha256=deaf0a3212617e0dab353a3c3a66e0a1f2398306eca0fd882ac15996b0e44d99
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/scrnsaverproto-X11R7.0-1.0.2.tar.bz2]
md5=3185971597710d8843d986da3271b83f
sha256=b709305970c99107d5121717711b244a7cd7a25e65d08f2e97dea8109f17b3cd
@@ -23722,6 +23926,10 @@ sha256=b2097320a1fca4851f1377a14f4cc14a46e27d2a44ca017c40a6cb618b2f31e8
md5=31da204a0255ba8c6a65386e65dc1c90
sha256=76d22f0cf07c8c4386a15c5c935b58319bd747befb940a0f03f652d59c4f67d2
+[http://xorg.freedesktop.org/releases/individual/app/smproxy-1.0.3.tar.bz2]
+md5=ba7dbde81be24fc1bd4156b360e5f8cf
+sha256=1b8dd25483280fc2a4a7d977b4a43dc4228b9c65e904c3d4ee68245705d4ae35
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/smproxy-X11R7.0-1.0.1.tar.bz2]
md5=60f54881b6fb27a8ba238629e4097c4d
sha256=c56617fd511eac4bdcff5b9b171be0aeacb7d8ddfe48615aa61295cf90b62888
@@ -25918,6 +26126,10 @@ sha256=97748154c41a1cd12635a79aee0c2846fd48ecb555fc8b54e3e5baec174e6e74
md5=81b9746d6202ccf0b4a498cfd0731e71
sha256=f3804f02f51a1be243ce7413dc67dca774f000686f8f2efedc77203a1962d401
+[http://xorg.freedesktop.org/releases/individual/util/util-macros-1.3.0.tar.gz]
+md5=51bb54c08415ee3c3000b7df9e9b07c5
+sha256=57d2629849796b4dc919261eadd1eea3ee6e634d58979797287f7e09408cde67
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/util/util-macros-X11R7.0-1.0.1.tar.bz2]
md5=bc6be634532d4936eb753de54e1663d3
sha256=e95a45db65b33be472a3134492e348c4cd6edc200d02a85654ffe62bc2e6fdcd
@@ -26082,6 +26294,10 @@ sha256=3cf9b04025015ad06ab3449f20778e34887f5aecdfe367a983ae8e52e394b0df
md5=44292d74a9a3c94b1ecb9d77a0da83e8
sha256=ab088478830cd30c2fe34fb7f44ffd4d177af7711c225c24676d3e9e9f24780c
+[http://xorg.freedesktop.org/releases/individual/proto/videoproto-2.3.0.tar.bz2]
+md5=fb762146a18207a1e8bc9f299dfc7ac0
+sha256=4f2bc94e5a1b60d6f35a9a2589ca98949e8841997f6a9acf4e85f46c1f34045f
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/videoproto-X11R7.0-2.2.2.tar.bz2]
md5=de9e16a8a464531a54a36211d2f983bd
sha256=074b4576113e89213940e3ea3901dd035ab317255cd78c929aa52d89227f1f37
@@ -26654,6 +26870,10 @@ sha256=9b4096bb1e273914adf101182c27d457f46fcc44d1b3ea027bae3d34ace8c6f7
md5=fd06c8b8e3572a0e14af65a49e0dd7d1
sha256=c81819618ec596fda55b950ef80f2ee02e5ce149ea99f1f741cedb459b4d3064
+[http://xorg.freedesktop.org/releases/individual/app/x11perf-1.5.1.tar.bz2]
+md5=66e4aa4645f83809071eb69553ed0222
+sha256=ab4c6a579f93fa9485ef5be8760a3da0d22acfa743f2114057c5262b77ff7056
+
[http://xorg.freedesktop.org/releases/individual/app/x11perf-1.5.tar.bz2]
md5=31283bfc3c78718ac1bd71e510d4e774
sha256=4729da53dde0b7e1748db4bb771f9b7aaf2e2b1e67293a3a5b96d54043ce1233
@@ -26726,6 +26946,10 @@ sha256=569e5a581e5eb16abf1c04a66da22c6dade14578ab34e5e78b8724bb655f1f17
md5=e91e10ace1df0d5f2cbc74ead256407a
sha256=1fd18b53fda74ea4649eb9577b1cf86538a25d171f10251eeb30d11cdd5bda8c
+[http://xorg.freedesktop.org/releases/individual/app/xauth-1.0.4.tar.bz2]
+md5=fa00078c414c4a57cab7a6d89a0c8734
+sha256=f91190c8b8bb18270b86b00f30da5684bb5e5bd1ed0ccf352322f8145e076a59
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xauth-X11R7.0-1.0.1.tar.bz2]
md5=ef2359ddaaea6ffaf9072fa342d6eb09
sha256=cbb271f6c3586210f31953933c4d06bd34272df9c596f5e26124ca3caf8529be
@@ -26754,6 +26978,10 @@ sha256=c9c899fddcb5053d6cf2a00a933b6e6b0429af547efbe85f89ad3bb35176bbec
md5=b28a9840cde3c38d7c09716372fea257
sha256=5aa5be594e77f772b85d39f0c25f61a61c7f6fa02ba940e614c5ee386deeb867
+[http://xorg.freedesktop.org/releases/individual/data/xbitmaps-1.1.0.tar.bz2]
+md5=f9ddd4e70a5375508b3acaf17be0d0ab
+sha256=c9a2059c8b0636b7ee1169647bb22f6eb4a0589e36fdb98936002e2569ad8761
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/data/xbitmaps-X11R7.0-1.0.1.tar.bz2]
md5=22c6f4a17220cd6b41d9799905f8e357
sha256=3d7b78cf588871caa00ef79f5f66657803cf9a07350ac5dcf56fbe5ca2a794a8
@@ -26862,6 +27090,10 @@ sha256=f28e8f6baaaa590ed991314c98f16d114e4668b93c5c6e7fb1bf51f3cc7bf6c0
md5=8579d5f50ba7f0c4a5bf16b9670fea01
sha256=e275a39f41ffae854db77b2c5decfad2cac32afbcd158842032dc9ca04efe92e
+[http://xorg.freedesktop.org/releases/individual/app/xcmsdb-1.0.2.tar.bz2]
+md5=7f2bed9f4dd3301d18d83eb296c3be0d
+sha256=bfcac66634ea4d4a1607f1c8a4170e6089db13355357fc143281a6fc0216face
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xcmsdb-X11R7.0-1.0.1.tar.bz2]
md5=1c8396ed5c416e3a6658394ff6c415ad
sha256=6e1cdf207ca998acd4e1cc991bde47fcf9d01d24ba733f9d3afe3c64843ef838
@@ -26914,6 +27146,10 @@ sha256=18d3e0d64853089c2154f1f867df087fc15f87e03e09fabc98ee5e265d8a53ef
md5=6fc90896b8c786cb1a2100b4167f7874
sha256=e009322bd2afef8d4ad91bcb6b17874e1cd00b1aaf397e7019a82cc44f3c174e
+[http://xorg.freedesktop.org/releases/individual/app/xcursorgen-1.0.3.tar.bz2]
+md5=69df079b3950a0db4e5f4e6f0e00ddee
+sha256=ed5f3ffe881c21ffca85406e5a5f553ed4985cc5e9acdb535f682c33bebac254
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xcursorgen-X11R7.0-1.0.0.tar.bz2]
md5=4d7b26dbb4442e89ec65c4147b31a5f7
sha256=8290616302932e72d4224cbe27d872efa5f44b0b8553ded0bbfb3537abe76907
@@ -27002,6 +27238,10 @@ sha256=c9927fc33e8a4422d74b1ebee0d19dd5a16d9ebc435e8f47f0aa546501ccfed3
md5=b7cbab6cbcd12bf7ad65dbc12d86e104
sha256=4294768751bd4ffb47e5ebacfc7b5b9f95a1a2f4d221d8af64474382473e1962
+[http://xorg.freedesktop.org/releases/individual/app/xdpyinfo-1.1.0.tar.bz2]
+md5=d1d516610316138105cd07064b257c5c
+sha256=780d8dfe65653f42ee26d35928ab7f72f5f27ab08eda692fe4baad05126a0631
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xdpyinfo-X11R7.0-1.0.1.tar.bz2]
md5=2b08e9ca783e3aa91d7fb84fdd716e93
sha256=d97f2872f5400f7fb5c0ad9442eced4bea55ab523de27417bd479db0071e3fed
@@ -27014,6 +27254,10 @@ sha256=f693977bdaea7eb6b095a6b6bc60b8a62110ecdef4c455211346e592f59c3772
md5=a5ec51ed9f0a55dc3462d90d52ff899c
sha256=7b03ac095b6c79688c20ad61e3576d4698e3f16c09a7f3f1e7c50826814e7265
+[http://xorg.freedesktop.org/releases/individual/app/xdriinfo-1.0.3.tar.bz2]
+md5=cb304d1ce562ac48b68eedeba38c662f
+sha256=2b762afd08c798d79fd6dacfd6280da39105927fa2bd91e3b1ba75b8cddc259c
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xdriinfo-X11R7.0-1.0.0.tar.bz2]
md5=75b8b53e29bb295f7fbae7909e0e9770
sha256=84753f1c33be507ed9c1cc9d5e78565cc61e60d1403e499d7f25603d9a3b4f6b
@@ -27050,6 +27294,10 @@ sha256=cac2771b67942d9a00b46532176feb18b2f82c434e0f6ece578d95953ef33053
md5=a9532c3d1683c99bb5df1895cb3a60b1
sha256=d4ac7ae154ee9733be27a5f55586abb9362c768f5fb8a4fc7fd2645100a9313a
+[http://xorg.freedesktop.org/releases/individual/app/xev-1.0.4.tar.bz2]
+md5=5f98c0a2725a33d60ef4956befe078fb
+sha256=7fad9c9755a624e677f44633dee218e9c22b4ba9a83e6709a6cbf8c1a501fde8
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xev-X11R7.0-1.0.1.tar.bz2]
md5=5d0d3c13b03e9516eafe536e6bd756c7
sha256=eb7ea9a7917fa6d603529e76f793e56baefa87a3034602634c73f9b284adc8b7
@@ -27282,6 +27530,10 @@ sha256=63606119e86c27b47bd7ec4b2b6048b76515df6755fc5dd8bcfc98f5fe53d994
md5=e926692d74ee81ed459d0fe89439ff8b
sha256=433fd29043cd427ba486bcce471aae3ad1abca94c8682feff92da0c380b8dff3
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-input-evdev-2.3.0.tar.bz2]
+md5=21dac6461379d67ee3b333c77f63e7bf
+sha256=6d57420cce9201a14f2fb5c5f6bc8999ffdcc9520020d54290eb22db27c366c8
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/driver/xf86-input-evdev-X11R7.0-1.0.0.5.tar.bz2]
md5=d982c6f185f4c75a4b65703ceed7be06
sha256=ba53e8ce6bfa01da7fa86a31853542a71722b41b511041bdb58cf66c10f3edb4
@@ -27382,6 +27634,10 @@ sha256=7b514715dfb5a2512dea3355bc3f09eb879d7184440c5525f0a9d29ec9f3be42
md5=d6fe929c4f6085d6dd67f197ae9c42f6
sha256=33939ec65dbf56f49e1e7de854a1cf95446e40c533950431901567e67112aef2
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-input-keyboard-1.4.0.tar.bz2]
+md5=fd17158ffeacecc8cc670604460cb98b
+sha256=842d36cfca68ddab4f2c562c73bfd43ba76de2d490d60034f0c5dd524aa6d6a5
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/driver/xf86-input-keyboard-X11R7.0-1.0.1.3.tar.bz2]
md5=8fb8a30fd9d7f152a1aef4eb8ef32b3f
sha256=e82d510157d13be37eed604cfb0d9355c054c4d3ac39bdef0c6ef320f2973d77
@@ -27466,6 +27722,10 @@ sha256=054b253f366795c2865714ce8bc545c79e59aa9ce1b7a9a4a05b9c674dff9dec
md5=e7dc0759c14a9bfd373917a49e5f7c7d
sha256=e6e1dbd64d41c826619a5881c5aeed46095bfdcb87c3e27d65292fc12a5bb7c7
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-input-mouse-1.5.0.tar.bz2]
+md5=c58629fddf0782dad5c02da6aeb35521
+sha256=f303e20872ab2fb20e07a7f734d17723346d2b4b8687ea2086f7a7468d1ab397
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/driver/xf86-input-mouse-X11R7.0-1.0.3.1.tar.bz2]
md5=12a908e5a97b1b03e8717abf167f4f27
sha256=183c1cda6550c8821ef4b8d13e681a32813bcd32b6cf34a75d3870e399fa292d
@@ -27582,6 +27842,10 @@ sha256=064f75c31ac167e61b9b29c2cef86908ecf1e1a742019298b37799664d08d19d
md5=4231b517d216e9f80ba66f13a0f30afd
sha256=d70c64f3f4fe931e12d5af7f91ff04cd0d16dd7459061c50b3149f9e35de8091
+[http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-0.0.6.tar.bz2]
+md5=b7a4d2f11637ee3fcf432e044b1d017f
+sha256=5f46fdef095a6e44a69e0f0b57c7d665224b26d990d006611236d8332e85b105
+
[http://xorg.freedesktop.org/releases/individual/driver/xf86-input-ur98-1.1.0.tar.bz2]
md5=3cf8928411458baaa9e726e51772c550
sha256=214bceb0fd52a932d448ce03d66539eed2e6660617e3d42977704cb7eec6472a
@@ -27910,6 +28174,10 @@ sha256=5afdc91e93ffed09ea5258c6fde210c729ea2b44d83f98acfd92c3da7e99e64b
md5=440c014bbd3072b5d379fe1bdb861918
sha256=b35a142aeba034ad06b8d9b477c243f82ce9f82ad65a0ee4408630f228e90258
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-video-intel-2.9.1.tar.bz2]
+md5=8951d0366c16991badb7f9050556f4f3
+sha256=95347c88854c2b41c07ab3bcdfadd1b8d27fb181a20520f185892877eb8d9d76
+
[http://xorg.freedesktop.org/releases/individual/driver/xf86-video-mach64-6.8.0.tar.bz2]
md5=6081b8fa50c689d51f85c2fbaf93867e
sha256=fba616f88d351759e00a90965e38a0d82608698ae36fc2a18df4036cd384e1a1
@@ -27918,6 +28186,10 @@ sha256=fba616f88d351759e00a90965e38a0d82608698ae36fc2a18df4036cd384e1a1
md5=ba373233a7d13084d14046a17b02e248
sha256=5becb5f0caf0f99296db28b32be46eb95d0a88ac8e4829c47cb637fb52d06564
+[http://xorg.freedesktop.org/releases/individual/driver/xf86-video-mga-1.4.11.tar.bz2]
+md5=9d1ca965cedb0856296b47442f3c739d
+sha256=c91922316f486f74d41ddbda92ff94a7917cea151ad802cf25603ab6b90f97e6
+
[http://xorg.freedesktop.org/releases/individual/driver/xf86-video-mga-1.4.9.tar.bz2]
md5=11066b84b949cd04300ec819c9c51532
sha256=d57dd2323052f064092167a232fb7576f46e5d62e98bc9cc6a7f270cc8d0fdc0
@@ -28474,6 +28746,10 @@ sha256=111c469a24374803b08104c725d8318760b226cedccd12b199c83d1b2756b8d6
md5=01470d088da3a8a3deefa8e1f45d69cb
sha256=f57da66bec8563502fe95c0e3f6ed297d9985862f5b64a5c9d3039719ac7f9da
+[http://xorg.freedesktop.org/releases/individual/proto/xf86driproto-2.1.0.tar.bz2]
+md5=309d552732666c3333d7dc63e80d042f
+sha256=d23f12deffd03e582e897ed6a7df3ea7f66ee8577f0f61374dcdf2ebffdce1be
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/xf86driproto-X11R7.0-2.0.3.tar.bz2]
md5=839a70dfb8d5b02bcfc24996ab99a618
sha256=256fd04cbd97b2b96e7ef808b6752561da855ded3835a1bb0d7acbe07758e924
@@ -28882,6 +29158,10 @@ sha256=085330064fdb90a152d2d44474fa20bb81ccb6c587c144f5f9c323cb9cc31eee
md5=f13ddedaa63a608d3b025d326f4f5b5d
sha256=5d3d5b230fc60aefae8f4865c17add133b5fb11377fd61c80897ef94fcccf41e
+[http://xorg.freedesktop.org/releases/individual/app/xgamma-1.0.3.tar.bz2]
+md5=e8a88bf1a18f35b724619849dca97f4f
+sha256=e5eb2588fbbdc5c2db5571b304204487a9c22eed15ac6cb816f605ec403e6e1a
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xgamma-X11R7.0-1.0.1.tar.bz2]
md5=07167da3f6b21985e27174ec70f213c0
sha256=ec744335f06c070d30f7f256262f6326c2cfff35a0ed6178e7be18ad44ad8a86
@@ -28898,6 +29178,10 @@ sha256=6151d08a12e7a9874738c46119c6ffe8383d1fe6c5d10ffc9d88e2adc8e454e8
md5=f746aba36f075ae4cae313d849a94f4e
sha256=edab2cc49d230f58e54c0f7b83fd726fec5fc31356668a11589649f19ba90db6
+[http://xorg.freedesktop.org/releases/individual/app/xhost-1.0.3.tar.bz2]
+md5=c7f91b4a750d297f269c2a0a3206a1b2
+sha256=2d63007c65e89fe273a43f3e45b3c0133acbc3ceeda6bfc9671388409134ad17
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xhost-X11R7.0-1.0.0.tar.bz2]
md5=76c44e84aaf4ad8e97cf15f4dbe4a24a
sha256=5e3db5f2387457f67798d664ed67c67337d2f84c45f15d986ee2f46f9b45d0d1
@@ -28926,6 +29210,10 @@ sha256=86402c93b332c44b4e79c568137257d567de1f95cd5f6f6e5433b7e67b40050a
md5=1cc292c562962ad0ad3a253cae68c632
sha256=e8a62b1cafbcfc3b9fed147612ed4320233d0c9d6de30c991c2cd0c691c40910
+[http://xorg.freedesktop.org/releases/individual/proto/xineramaproto-1.2.tar.bz2]
+md5=a8aadcb281b9c11a91303e24cdea45f5
+sha256=58e88087ceec7201d918f94d6b1247325adca2a9903fed11291b412427a7ba64
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/proto/xineramaproto-X11R7.0-1.1.2.tar.bz2]
md5=80516ad305063f4e6c6c3ccf42ea2142
sha256=f74d0dfb47d23f544a67464427754adf3fbc52b76b4a68834ab1caf8dc5406df
@@ -29022,6 +29310,10 @@ sha256=37af4603fa399760a055cc994c61b25778febf676af3fcfad84577f484a174e6
md5=68f2a143716c23b566f8509d9498f516
sha256=4b78e316ecf9a9498291f634a7e9ee712ba429d5606f300c0a27eacdaaa1f72b
+[http://xorg.freedesktop.org/releases/individual/app/xkbevd-1.1.0.tar.bz2]
+md5=8d3c1485c2dd62ea7395a37377958a39
+sha256=46037add20321ff13954ad91aa5f5f5ec52d78006f9d7c52aa6167622b34a2df
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xkbevd-X11R7.0-1.0.1.tar.bz2]
md5=7ba0496f079552d1918d73bd09bde9b2
sha256=9b358d085bb4fcbfcb0a928cacd4825ba918ef21a2a5e4a3ee401f09abc97f90
@@ -29042,6 +29334,10 @@ sha256=d2e9c3c28e23010441ce40c48bda7adabd338a256cb9b99848be6ed937fc10e7
md5=84396a3dd75337caaae29d8fa5616fb1
sha256=aaad73ed8db764978a18bc6ba774d38a4c1330c86622c0b47ae3ced09c175856
+[http://xorg.freedesktop.org/releases/individual/app/xkbutils-1.0.2.tar.bz2]
+md5=369a21641b7ca983d6641298e51d97f8
+sha256=12a37d4594a4deb2642b1659f3827068c24bb8791a20b927c5f3b7fdb0c70bee
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xkbutils-X11R7.0-1.0.1.tar.bz2]
md5=798502eca0c6c3e8c02d76fabb910532
sha256=8178a1c45af6e844ca0adcfe72fbddcbaebf3f305452a83e39768373981be92f
@@ -29094,6 +29390,10 @@ sha256=6a079872319ac7934578cace787f4f89ea87258f6dd8b33e5b4359be1256e9a3
md5=44473b880d26bfbe8b3d4d72b183cba7
sha256=988c71c6dc3519523fe5844ee3e49d91f843a83c783dd0baa20526d9d2981698
+[http://xorg.freedesktop.org/releases/individual/app/xlsclients-1.0.2.tar.bz2]
+md5=df270f7dd5528ae1b7d80c47585d8278
+sha256=8527cdd29d4fcc67df014bc8b371be98901c9082b8de81ea2302bf705c887698
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xlsclients-X11R7.0-1.0.1.tar.bz2]
md5=cc0d64e90eab0b90b38355e841824588
sha256=05c269e322ed1ef54b8a32883c8676f46330ec70d85b0a158dbefc2b0e91ceb8
@@ -29274,6 +29574,10 @@ sha256=23648ac11d5cc57f3e1e747a73bd1c4f83c42a657969814af0d399fdd3d7beec
md5=4f2005bdd430a98c262901383459009e
sha256=fffc67e50ce396e6ddd95e842fa8351954b8f09cb729a9a062e0496a8bda4925
+[http://xorg.freedesktop.org/releases/individual/doc/xorg-docs-1.5.tar.bz2]
+md5=359ac83ad27eecd5588914ba8715301d
+sha256=62cc63582e97ad76a02acdb409123ff0e2cf33df25c9977e3b8a7606be75eafc
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/doc/xorg-docs-X11R7.0-1.0.1.tar.bz2]
md5=ac0d76afa46ef5da9e1cf33558f4b303
sha256=a3adf1c61247254cc81c80a6c020fe6a9fe0abbdc5f66f8631ec87a1a356c4ae
@@ -29326,6 +29630,10 @@ sha256=a680174f54be7763819e5275c5d5d44fc9e9b6f8e9351dd45c150eb4c182d5bb
md5=ed0878bf32a24d4948c3b8a122a39eff
sha256=0edbaa994797cb7944a4129d33b634ad99164b21ec32355d56996a178d38bfcf
+[http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.7.1.tar.bz2]
+md5=dda7842467cda6018fdc87e6002e4db1
+sha256=a58c0de29cbd2b7d1a1ac5ee70a94ad1ed2a085132803c0ca83f2dd8513b4c20
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/xserver/xorg-server-X11R7.0-1.0.1.tar.bz2]
md5=0e7527480fb845a3c2e333bd0f47ff50
sha256=0419124e1bab473f8f9e2d7de1dba8bae2ed1375b72d55cdfb9471dac357ed47
@@ -29346,6 +29654,10 @@ sha256=be1fbd7646a55eb9a9ad161f9b83034ba88a82c780e29d4a7888db2495947f25
md5=f930e5be117922f0841614c8d43f1ae8
sha256=4def78f2e0e002f5693b61b53ab4325fbc150d3614fe53818e8df9b365a4dbea
+[http://xorg.freedesktop.org/releases/individual/doc/xorg-sgml-doctools-1.3.tar.bz2]
+md5=1e3ee108688d1df91049a565813c973d
+sha256=d5c0279fa84dc4a61ba2a6a9a892b34b7e9266f9562721b529b0296f5b75dbb2
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/doc/xorg-sgml-doctools-X11R7.0-1.0.1.tar.bz2]
md5=d08d4fd10ac46d8b4636efe4d8c0de74
sha256=2a676fdaf45a7a1e40f4df2cbd09d542672c2d0fe1f890a874b8719e0a448ad7
@@ -29410,6 +29722,10 @@ sha256=b871221d23dc4fc50398e9fe0e2a6a4e951aa6c9df2c5671d069ad88f0fd6249
md5=6b3a6896081f628bf5a2c9129417c86f
sha256=c325a9896d1cda43a681f1c2a6a2bbb1c580ade57a882b0a8f84ffa359238adf
+[http://xorg.freedesktop.org/releases/individual/app/xpr-1.0.3.tar.bz2]
+md5=1c2c540d240def3ea65ff2030f059f8a
+sha256=2878d6b04ef81ec415fa81313565bee521bf94132127615b9d717d5a489b937d
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xpr-X11R7.0-1.0.1.tar.bz2]
md5=487b5ab96b373acb80808758ce23eb49
sha256=8c77256313114c80d49ac5db0013c439ddf9888f2d265f66c9ee3da2de46cdf4
@@ -29442,6 +29758,10 @@ sha256=ddda23b888a3b4cf96a508af7ae07e3b2f1e9f2f2f0d5f6b2684cfa162337fa6
md5=48aa8fd78802f477dcbf9ef0dfd9f783
sha256=daa47cba7d5a919ca1bd053d8a8b6af4904f77eded4bdb055cd915aa5f5cd772
+[http://xorg.freedesktop.org/releases/individual/app/xprop-1.1.0.tar.bz2]
+md5=f0bacbd30f0dd1c1e9ccafe97687b7a4
+sha256=cc8e07901574895f113baffda19272c54545879e02012314527ebbf2dcc66226
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xprop-X11R7.0-1.0.1.tar.bz2]
md5=6730f0fbad6969825580de46e66b44dd
sha256=295a7f8bf08ca36c2db0defc1e5d38e498e7a7b6d7a0a78853e87ef71645388d
@@ -29542,6 +29862,10 @@ sha256=8be898b0514248d430a4c71be3ffdf6da8e296dabae27a186ed662f38c386397
md5=1228f890f86148e4e6ae22aa73118cbb
sha256=522831fd29c0b250f29735a01b02e96e311f200a675e45c8b3d187b6f86b32f5
+[http://xorg.freedesktop.org/releases/individual/app/xrefresh-1.0.3.tar.bz2]
+md5=8f4fafcfb77b3c6972cc44bb3f1c899c
+sha256=3ee0a5f7aeb14bbffbcafcff8e7806c9a59f08e1a58322a50f5fca023a7d7ed9
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xrefresh-X11R7.0-1.0.1.tar.bz2]
md5=5a46d5fb82aeeb4d6aac58c9cc367439
sha256=9915ee47ff85d83eee825b1a44857b92b4b16558e4bf436671ae7a37f4ab65ad
@@ -29702,6 +30026,10 @@ sha256=897d77acd3f4a366472386139827eaac24cc423c811ef0e65e0d5eca099a3155
md5=9af7db9f3052aef0b11636720b3101dd
sha256=4f9a751f4830d479fae8ccb68ed04896dc99612789310b7917bd15c04aa3351d
+[http://xorg.freedesktop.org/releases/individual/app/xsetroot-1.0.3.tar.bz2]
+md5=cbda9b9b8da5af4614110883d5a276b8
+sha256=d7e512cc686de3ab5fcd3c9f9e605d7cae68a4b50f2c0786f0f09ce08c728f48
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xsetroot-X11R7.0-1.0.1.tar.bz2]
md5=e2831b39cd395d6f6f4824b0e25f55ed
sha256=8327c294491dbd13c06c8d5d6bf971dca215f59facce99d3e4d0c170d7f0fe44
@@ -29774,6 +30102,10 @@ sha256=a67a8b09d9530021e2bd4b93136f385e72a8d8e4f2c26a99aeb169bee88facf0
md5=b3b57e78dc06885e79f8393a83619715
sha256=a26adb573ec47a21a8772d8ad89690c629c9128f8d3037d9037b032ae24cc76e
+[http://xorg.freedesktop.org/releases/individual/lib/xtrans-1.2.5.tar.bz2]
+md5=2d1e57e82acc5f21797e92341415af2f
+sha256=cc71a391f4da8176e5daeeac1ddf5137ba5e8d2263cb93a49f9e2a9976b90899
+
[http://xorg.freedesktop.org/releases/individual/lib/xtrans-1.2.tar.bz2]
md5=a91fef8b932b21992af7dfff7b2643f3
sha256=d6c3cabd5ecd0183a8a9bc6b3471545df8e2c78956b4c4cfd48f0c545a88c9a4
@@ -29842,6 +30174,10 @@ sha256=439b3c7ad96fc7b1ef9156c716e10b607883a9a58b777f8dc02f03284eb33fb3
md5=e1e318436f49e2f0f3764593dadd9ad2
sha256=126e2a612ac723f9688904fcfa612688d62e520ce55c56eb34eb5390074cf150
+[http://xorg.freedesktop.org/releases/individual/app/xvinfo-1.1.0.tar.bz2]
+md5=8cc299b2cb636b5f7fe672610789d3d4
+sha256=0a318f6ca0d92bd5cc2ab9d2690f6120b3e1537b7902ce110469864869e86efb
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xvinfo-X11R7.0-1.0.1.tar.bz2]
md5=39d79590345bed51da6df838f6490cbf
sha256=5b52a7241aef8e3372fb15f58f2276e043e19a87269aa6a0330b5823bc3697f6
@@ -29854,6 +30190,10 @@ sha256=c8bd9bcd64df439c2cd09eaa3e83a1297fbfed5c7d3dd8117342b3a25eeae131
md5=0a6ef08a2ac08ad5c4dd1522eb3788a3
sha256=ab8974e010c1957a9a65a54656215463dea324adcaa9954147ecdcc6e9307f61
+[http://xorg.freedesktop.org/releases/individual/app/xwd-1.0.3.tar.bz2]
+md5=007cea1f389abde5c93162dcd5541351
+sha256=fff2dbea086c554463d4309209ee05e026b7f19900598f55e0a24a6d7a7ee3fd
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xwd-X11R7.0-1.0.1.tar.bz2]
md5=596c443465ab9ab67c59c794261d4571
sha256=8ec0abf34ec88f3681666c7727749bac1ccf3f935c1c7f78c009a764f7f0fb11
@@ -29870,6 +30210,10 @@ sha256=fbe3a1aafbc6fa113e58971ff2a82605a7e106af8b810eea4b7512de58a5478a
md5=e2a9bf5ab7f2a0866700a3b49dd8c6bf
sha256=df9a52788632cd3338e7bd7107ac732b11b8e2c367d4600578cd77e350428ee4
+[http://xorg.freedesktop.org/releases/individual/app/xwininfo-1.0.5.tar.bz2]
+md5=908f8bc3255f639effa9780fb1c19ea4
+sha256=8db6b81a7b0bc4e7acce6c6d41df9747b0b19e12c21c5a70b51bbc63a42cdcd9
+
[http://xorg.freedesktop.org/releases/X11R7.0/src/app/xwininfo-X11R7.0-1.0.1.tar.bz2]
md5=3ec67e4e1b9f5a1fe7e56b56ab931893
sha256=75bc03d2eafd4c7139d707fb86b023376d5a5ad2e9315dad53b250cb19e8bce1
diff --git a/conf/distro/angstrom-2008.1.conf b/conf/distro/angstrom-2008.1.conf
index 2d1ed17c5d..1429fa0d65 100644
--- a/conf/distro/angstrom-2008.1.conf
+++ b/conf/distro/angstrom-2008.1.conf
@@ -2,23 +2,28 @@
#@TYPE: Distribution
#@NAME: Angstrom <http://www.angstrom-distribution.org>
#@DESCRIPTION: The Linux Distribution for Kernel 2.6 based devices
+#@MAINTAINER: Graeme 'XorA' Gregory <dp@xora.org.uk>
#@MAINTAINER: Koen Kooi <koen@openembedded.org>
+#@MAINTAINER: Philip 'Crofton' Balister <philip@balister.org>
#@--------------------------------------------------------------------
# This is a aimed to be the next stable angstrom release.
-# If you want something stable *right now*, use angstrom-2007.1
-# with the org.openembedded.angstrom-2007.12-stable branch
+# If you want something stable *right now*, use angstrom-2008.1
+# with the stable/2009 branch
#
-# Use this at your own risk, we welcome bugreports filed at
-# http://bugs.openembedded.net
+# Use this at your own risk, we welcome bugreports sent to
+# angstrom-distro-devel@linuxtogo.org
#
-# Again, in doubt, use DISTRO="angstrom-2007.1" with the
-# org.openembedded.angstrom-2007.12-stable branch
+# For more contact info please visit
+# http://www.angstrom-distribution.org/contact
+#
+# Again, in doubt, use DISTRO="angstrom-2008.1" with the
+# stable/2009 branch
#DISTRO_VERSION = "2009.X"
DISTRO_VERSION = "2009.X-test-${DATE}"
-DISTRO_REVISION = "2"
-DISTRO_PR = ".3"
+DISTRO_REVISION = "3"
+DISTRO_PR = ".4"
OLDEST_KERNEL ?= "2.6.16"
diff --git a/conf/machine/omap3517-evm.conf b/conf/machine/am3517-evm.conf
index 77ea2807b9..f7a60b4be4 100644
--- a/conf/machine/omap3517-evm.conf
+++ b/conf/machine/am3517-evm.conf
@@ -15,6 +15,8 @@ GUI_MACHINE_CLASS = "smallscreen"
require conf/machine/include/omap3.inc
+PACKAGE_EXTRA_ARCHS += "omap3517-evm"
+
# Ship all kernel modules
MACHINE_EXTRA_RRECOMMENDS = " omap3-sgx-modules kernel-modules"
diff --git a/contrib/angstrom/sort.sh b/contrib/angstrom/sort.sh
index c8b1d764aa..1e787a4ffa 100755
--- a/contrib/angstrom/sort.sh
+++ b/contrib/angstrom/sort.sh
@@ -58,7 +58,7 @@ case "$arch" in
"armv7")
machines="" ;;
"armv7a")
- machines="igep0020 omap3-touchbook beagleboard omap3evm omap3517-evm omap3-pandora omapzoom omapzoom2 overo" ;;
+ machines="igep0020 omap3-touchbook beagleboard omap3evm am3517-evm omap3517-evm omap3-pandora omapzoom omapzoom2 overo" ;;
"avr32")
machines="atngw100 at32stk1000" ;;
"bfin")
diff --git a/recipes/abiword/abiword-2.5.inc b/recipes/abiword/abiword-2.5.inc
index 09f61d0534..f4d654ea4c 100644
--- a/recipes/abiword/abiword-2.5.inc
+++ b/recipes/abiword/abiword-2.5.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "AbiWord is free word processing program similar to Microsoft(r) W
HOMEPAGE = "http://www.abiword.org""
SECTION = "x11/office"
LICENSE = "GPLv2"
-DEPENDS = "perl-native wv libgsf libgnomeprint libgnomeprintui libglade libfribidi enchant jpeg libpng libxml2"
+DEPENDS = "asio goffice perl-native wv libgsf libgnomeprint libgnomeprintui libglade libfribidi enchant jpeg libpng libxml2"
RDEPENDS = "enchant glibc-gconv-ibm850 glibc-gconv-cp1252 \
glibc-gconv-iso8859-15 glibc-gconv-iso8859-1"
@@ -29,7 +29,7 @@ FILES_${PN} += " \
${datadir}/abiword-${SHRT_VER}/templates/Memo.awt \
${datadir}/abiword-${SHRT_VER}/templates/Press-Release.awt "
-inherit autotools pkgconfig
+inherit autotools gtk-icon-cache pkgconfig mime
PARALLEL_MAKE = ""
@@ -54,6 +54,9 @@ do_install_append() {
PACKAGES += " abiword-clipart abiword-icons abiword-strings abiword-systemprofiles abiword-templates "
+ALLOW_EMPTY_abiword-clipart = "1"
+ALLOW_EMPTY_abiword-icons = "1"
+
FILES_abiword-clipart += "${datadir}/abiword-${SHRT_VER}/clipart"
FILES_abiword-icons += "${datadir}/abiword-${SHRT_VER}/icons"
FILES_abiword-strings += "${datadir}/abiword-${SHRT_VER}/AbiWord/strings"
diff --git a/recipes/abiword/abiword_2.8.0.bb b/recipes/abiword/abiword_2.8.0.bb
new file mode 100644
index 0000000000..546e29cd64
--- /dev/null
+++ b/recipes/abiword/abiword_2.8.0.bb
@@ -0,0 +1,48 @@
+require abiword-2.5.inc
+
+PR = "r1"
+
+SRC_URI = "http://www.abisource.com/downloads/abiword/${PV}/source/abiword-${PV}.tar.gz"
+
+do_configure() {
+ autotools_do_configure
+}
+
+EXTRA_OECONF = " --disable-static \
+ --enable-plugins \
+ --enable-collab-backend-xmpp \
+ --enable-collab-backend-tcp \
+ --enable-collab-backend-service \
+"
+
+RCONFLICTS = "abiword-embedded"
+
+FILES_${PN} += "${datadir}/mime-info ${datadir}/abiword-${SHRT_VER}/ui ${datadir}/abiword-${SHRT_VER}/xsl* ${datadir}/abiword-${SHRT_VER}/mime-info ${datadir}/abiword-${SHRT_VER}/Pr*.xml"
+FILES_abiword-strings += "${datadir}/abiword-${SHRT_VER}/strings"
+FILES_abiword-systemprofiles += "${datadir}/abiword-${SHRT_VER}/system.profile*"
+
+PACKAGES_DYNAMIC = "abiword-meta abiword-plugin-*"
+
+python populate_packages_prepend () {
+ abiword_libdir = bb.data.expand('${libdir}/abiword-2.8/plugins', d)
+ do_split_packages(d, abiword_libdir, '(.*)\.so$', 'abiword-plugin-%s', 'Abiword plugin for %s', extra_depends='')
+
+ metapkg = "abiword-meta"
+ bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d)
+ bb.data.setVar('FILES_' + metapkg, "", d)
+ blacklist = [ 'abiword-plugins-dbg', 'abiword-plugins', 'abiword-plugins-doc', 'abiword-plugins-dev', 'abiword-plugins-locale' ]
+ 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 not pkg.count("-dev") and not pkg.count("-dbg") and not pkg.count("static") and not pkg.count("locale") and not pkg.count("abiword-doc"):
+ print "Modifying ", pkg
+ metapkg_rdepends.append(pkg)
+ bb.data.setVar('RDEPENDS_' + metapkg, ' '.join(metapkg_rdepends), d)
+ bb.data.setVar('DESCRIPTION_' + metapkg, 'abiword-plugin meta package', d)
+ packages.append(metapkg)
+ bb.data.setVar('PACKAGES', ' '.join(packages), d)
+}
+
+FILES_${PN}-dev += "${libdir}/abiword-${SHRT_VER}/plugins/*.la"
+FILES_${PN}-dbg += "${libdir}/abiword-${SHRT_VER}/plugins/.debug"
+
diff --git a/recipes/angstrom/angstrom-gpe-task-settings.bb b/recipes/angstrom/angstrom-gpe-task-settings.bb
index 0280859fdc..953007b11b 100644
--- a/recipes/angstrom/angstrom-gpe-task-settings.bb
+++ b/recipes/angstrom/angstrom-gpe-task-settings.bb
@@ -1,12 +1,11 @@
DESCRIPTION = "Task packages for the Angstrom distribution"
-PR = "r34"
+PR = "r35"
inherit task
RDEPENDS_${PN} = "\
matchbox-panel-manager \
mboxkbd-layouts-gui \
- connman-gnome \
gpe-su \
gpe-conf \
gpe-package \
diff --git a/recipes/angstrom/angstrom-uboot-scripts/dsplink.cmd b/recipes/angstrom/angstrom-uboot-scripts/dsplink.cmd
new file mode 100644
index 0000000000..3ba551e015
--- /dev/null
+++ b/recipes/angstrom/angstrom-uboot-scripts/dsplink.cmd
@@ -0,0 +1,4 @@
+setenv vram '16M'
+setenv dvimode 'hd720 mem=88M@0x80000000 mem=128M@0x88000000 omapfb.vram=0:8M,1:4M,2:4M'
+run loaduimage
+run mmcboot
diff --git a/recipes/angstrom/angstrom-uboot-scripts/touchbook-vrfb.cmd b/recipes/angstrom/angstrom-uboot-scripts/touchbook-vrfb.cmd
new file mode 100644
index 0000000000..8991e704a4
--- /dev/null
+++ b/recipes/angstrom/angstrom-uboot-scripts/touchbook-vrfb.cmd
@@ -0,0 +1,4 @@
+mmcinit
+fatload mmc 0 0x82000000 uImage
+setenv bootargs 'console=tty1 omapfb.vrfb=1 omapfb.mode=dvi:1024x600MR-24@60 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 mem=88M@0x80000000 mem=128M@0x88000000 vram=18M omapfb.vram=0:10M,1:4M,2:4M'
+bootm
diff --git a/recipes/angstrom/angstrom-uboot-scripts/touchbook.cmd b/recipes/angstrom/angstrom-uboot-scripts/touchbook.cmd
new file mode 100644
index 0000000000..4702d3f393
--- /dev/null
+++ b/recipes/angstrom/angstrom-uboot-scripts/touchbook.cmd
@@ -0,0 +1,4 @@
+mmcinit
+fatload mmc 0 0x82000000 uImage
+setenv bootargs 'console=tty1 omapfb.mode=dvi:1024x600MR-24@60 root=/dev/mmcblk0p2 rootwait rootfstype=ext3 mem=88M@0x80000000 mem=128M@0x88000000 vram=16M omapfb.vram=0:8M,1:4M,2:4M'
+bootm
diff --git a/recipes/asio/asio_1.1.1.bb b/recipes/asio/asio_1.1.1.bb
index 89b363dd8a..a724921676 100644
--- a/recipes/asio/asio_1.1.1.bb
+++ b/recipes/asio/asio_1.1.1.bb
@@ -4,6 +4,8 @@ SECTION = "libs"
PRIORITY = "optional"
LICENSE = "Boost Software License"
+DEPENDS = "boost"
+
SRC_URI = "${SOURCEFORGE_MIRROR}/asio/${PN}-${PV}.tar.bz2"
inherit autotools pkgconfig
diff --git a/recipes/chicken/chicken-4.2.0/soname.patch b/recipes/chicken/chicken-4.2.0/soname.patch
new file mode 100644
index 0000000000..3126c64d3e
--- /dev/null
+++ b/recipes/chicken/chicken-4.2.0/soname.patch
@@ -0,0 +1,1163 @@
+--- chicken-4.2.0/defaults.make 2009-09-21 21:17:38.000000000 -0300
++++ chicken-4.2.0/defaults.make 2009-10-16 11:18:28.000000000 -0300
+@@ -52,11 +52,12 @@
+ MANDIR = $(TOPMANDIR)/man1
+ INCDIR = $(PREFIX)/include
+ DOCDIR = $(DATADIR)/doc
+-CHICKENLIBDIR = $(LIBDIR)/chicken
++VARDIR ?= $(LIBDIR)
++CHICKENLIBDIR = $(VARDIR)/chicken
+ EGGDIR = $(CHICKENLIBDIR)/$(BINARYVERSION)
+
+ ifdef WINDOWS_SHELL
+-SPREFIX = $(subst /,\\,$(PREFIX))
++SPREFIX = $(subst /,$(SEP),$(PREFIX))
+ IBINDIR = $(SPREFIX)$(SEP)bin
+ ILIBDIR = $(SPREFIX)$(SEP)lib
+ ISHAREDIR = $(SPREFIX)$(SEP)share
+@@ -143,14 +144,15 @@
+
+ # options
+
+-ifndef NOPTABLES
+-C_COMPILER_PTABLES_OPTIONS ?= -DC_ENABLE_PTABLES
+-endif
+ INCLUDES ?= -I. -I$(SRCDIR)
+ C_COMPILER_COMPILE_OPTION ?= -c
+ C_COMPILER_OUTPUT_OPTION ?= -o
+ C_COMPILER_OUTPUT ?= $(C_COMPILER_OUTPUT_OPTION) $@
+
++ifndef NOPTABLES
++C_COMPILER_OPTIONS += -DC_ENABLE_PTABLES
++endif
++
+ ifdef DEBUGBUILD
+ ifeq ($(C_COMPILER),gcc)
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
+@@ -219,7 +221,6 @@
+ # cross settings
+
+ HOST_C_COMPILER_OPTIONS ?= $(C_COMPILER_OPTIONS)
+-HOST_C_COMPILER_PTABLES_OPTIONS ?= $(C_COMPILER_PTABLES_OPTIONS)
+ HOST_C_COMPILER_COMPILE_OPTION ?= $(C_COMPILER_COMPILE_OPTION)
+ HOST_C_COMPILER_OPTIMIZATION_OPTIONS ?= $(C_COMPILER_OPTIMIZATION_OPTIONS)
+ HOST_C_COMPILER_SHARED_OPTIONS ?= $(C_COMPILER_SHARED_OPTIONS)
+@@ -279,17 +280,22 @@
+
+ # Scheme compiler flags
+
+-CHICKEN_OPTIONS = -no-trace -optimize-level 2 -include-path . -include-path $(SRCDIR)
++CHICKEN_OPTIONS = -optimize-level 2 -include-path . -include-path $(SRCDIR) -inline
+ ifdef DEBUGBUILD
+ CHICKEN_OPTIONS += -feature debugbuild -scrutinize -types $(SRCDIR)types.db
+ endif
+-CHICKEN_LIBRARY_OPTIONS = $(CHICKEN_OPTIONS) -explicit-use
+-CHICKEN_PROGRAM_OPTIONS = $(CHICKEN_OPTIONS) -no-lambda-info -inline -local
++CHICKEN_LIBRARY_OPTIONS = $(CHICKEN_OPTIONS) -explicit-use -no-trace
++CHICKEN_PROGRAM_OPTIONS = $(CHICKEN_OPTIONS) -no-lambda-info -local
+ CHICKEN_COMPILER_OPTIONS = $(CHICKEN_PROGRAM_OPTIONS) -extend private-namespace.scm
+ CHICKEN_UNSAFE_OPTIONS = -unsafe -no-lambda-info
+ CHICKEN_DYNAMIC_OPTIONS = $(CHICKEN_OPTIONS) -feature chicken-compile-shared -dynamic
+ CHICKEN_IMPORT_LIBRARY_OPTIONS = $(CHICKEN_DYNAMIC_OPTIONS)
+
++ifndef DEBUGBUILD
++CHICKEN_PROGRAM_OPTIONS += -no-trace
++CHICKEN_COMPILER_OPTIONS += -no-trace
++endif
++
+ # targets
+
+ CHICKEN_PROGRAM = $(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)
+--- chicken-4.2.0/Makefile.bsd 2009-09-21 21:17:38.000000000 -0300
++++ chicken-4.2.0/Makefile.bsd 2009-10-16 11:36:35.000000000 -0300
+@@ -37,13 +37,20 @@
+ ifdef DEBUGBUILD
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
+ else
++ifdef OPTIMIZE_FOR_SPEED
++C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3 -fomit-frame-pointer
++else
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
+ endif
++endif
+ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
+ LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -shared -Wl,-R$(RUNTIME_LINKER_PATH) -Wl,-L.
+ LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R$(RUNTIME_LINKER_PATH)
++LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,-soname,libchicken.so$(SONAME_VERSION)
++LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,-soname,libuchicken.so$(SONAME_VERSION)
+ LIBRARIES = -lm
+ NEEDS_RELINKING = yes
++USES_SONAME = yes
+
+ # special files
+
+--- chicken-4.2.0/Makefile.cross-linux-mingw 2009-09-21 21:17:38.000000000 -0300
++++ chicken-4.2.0/Makefile.cross-linux-mingw 2009-10-16 11:36:35.000000000 -0300
+@@ -49,7 +49,11 @@
+ ifdef DEBUGBUILD
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
+ else
+-C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os
++ifdef OPTIMIZE_FOR_SPEED
++C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3 -fomit-frame-pointer
++else
++C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
++endif
+ endif
+ C_COMPILER_SHARED_OPTIONS = -DPIC
+ C_COMPILER_GUI_RUNTIME_OPTIONS = -DC_WINDOWS_GUI
+--- chicken-4.2.0/Makefile.cygwin 2009-09-21 21:17:38.000000000 -0300
++++ chicken-4.2.0/Makefile.cygwin 2009-10-16 11:36:35.000000000 -0300
+@@ -47,7 +47,11 @@
+ ifdef DEBUGBUILD
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
+ else
+-C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os
++ifdef OPTIMIZE_FOR_SPEED
++C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3 -fomit-frame-pointer
++else
++C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
++endif
+ endif
+ C_COMPILER_SHARED_OPTIONS = -DPIC
+ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
+--- chicken-4.2.0/Makefile.linux 2009-09-21 21:17:38.000000000 -0300
++++ chicken-4.2.0/Makefile.linux 2009-10-16 11:36:35.000000000 -0300
+@@ -37,13 +37,20 @@
+ ifdef DEBUGBUILD
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
+ else
++ifdef OPTIMIZE_FOR_SPEED
++C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3 -fomit-frame-pointer
++else
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
+ endif
++endif
+ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
+ LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared -Wl,-R$(RUNTIME_LINKER_PATH)
+ LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R$(RUNTIME_LINKER_PATH)
++LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,-soname,libchicken.so$(SONAME_VERSION)
++LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,-soname,libuchicken.so$(SONAME_VERSION)
+ LIBRARIES = -lm -ldl
+ NEEDS_RELINKING = yes
++USES_SONAME = yes
+
+ # special files
+
+--- chicken-4.2.0/Makefile.macosx 2009-09-21 21:17:38.000000000 -0300
++++ chicken-4.2.0/Makefile.macosx 2009-10-16 11:36:35.000000000 -0300
+@@ -41,8 +41,12 @@
+ ifdef DEBUGBUILD
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
+ else
++ifdef OPTIMIZE_FOR_SPEED
++C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3 -fomit-frame-pointer
++else
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
+ endif
++endif
+ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -dynamiclib -compatibility_version 1 -current_version 1.0 -install_name $@
+ POSTINSTALL_PROGRAM_FLAGS = -change libchicken$(SO) $(LIBDIR)/libchicken$(SO)
+ LIBRARIAN_OPTIONS = scru
+@@ -73,9 +77,9 @@
+ ifneq ($(HACKED_APPLY),)
+ # We undefine HACKED_APPLY in order to override rules.make.
+ HACKED_APPLY=
+-apply-hack.ppc.darwin$(O): apply-hack.ppc.darwin.s
++apply-hack.ppc.darwin$(O): apply-hack.ppc.darwin.S
+ as -arch ppc -o $@ $<
+-apply-hack.x86$(O): apply-hack.x86.s
++apply-hack.x86$(O): apply-hack.x86.S
+ as -arch i386 -o $@ $<
+ $(APPLY_HACK_OBJECT): apply-hack.x86$(O) apply-hack.ppc.darwin$(O)
+ lipo -create -output $(APPLY_HACK_OBJECT) $^
+--- chicken-4.2.0/Makefile.mingw-msys 2009-09-21 21:17:38.000000000 -0300
++++ chicken-4.2.0/Makefile.mingw-msys 2009-10-16 11:36:35.000000000 -0300
+@@ -45,8 +45,12 @@
+ ifdef DEBUGBUILD
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
+ else
++ifdef OPTIMIZE_FOR_SPEED
++C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3
++else
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os
+ endif
++endif
+ C_COMPILER_SHARED_OPTIONS = -DPIC
+ C_COMPILER_GUI_RUNTIME_OPTIONS = -DC_WINDOWS_GUI
+ LINKER_OPTIONS = -Wl,--enable-auto-import
+--- chicken-4.2.0/Makefile.mingw 2009-09-21 21:17:38.000000000 -0300
++++ chicken-4.2.0/Makefile.mingw 2009-10-16 11:36:35.000000000 -0300
+@@ -25,7 +25,7 @@
+ # POSSIBILITY OF SUCH DAMAGE.
+
+
+-SEP = \\
++SEP = $(strip \)
+ SRCDIR =.$(SEP)
+
+ # platform configuration
+@@ -54,8 +54,12 @@
+ ifdef DEBUGBUILD
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
+ else
++ifdef OPTIMIZE_FOR_SPEED
++C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3
++else
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os
+ endif
++endif
+ C_COMPILER_SHARED_OPTIONS = -DPIC
+ C_COMPILER_GUI_RUNTIME_OPTIONS = -DC_WINDOWS_GUI
+ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
+--- chicken-4.2.0/Makefile.solaris 2009-09-21 21:17:38.000000000 -0300
++++ chicken-4.2.0/Makefile.solaris 2009-10-16 11:36:35.000000000 -0300
+@@ -37,8 +37,12 @@
+ ifdef DEBUGBUILD
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
+ else
++ifdef OPTIMIZE_FOR_SPEED
++C_COMPILER_OPTIMIZATION_OPTIONS ?= -O3 -fomit-frame-pointer
++else
+ C_COMPILER_OPTIMIZATION_OPTIONS ?= -Os -fomit-frame-pointer
+ endif
++endif
+ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
+ LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -shared -Wl,-R$(RUNTIME_LINKER_PATH) -Wl,-L.
+ LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R$(RUNTIME_LINKER_PATH)
+--- chicken-4.2.0/rules.make 2009-09-21 21:17:38.000000000 -0300
++++ chicken-4.2.0/rules.make 2009-10-16 11:18:01.000000000 -0300
+@@ -59,403 +59,403 @@
+ # library objects
+
+ runtime$(O): runtime.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ gui-runtime$(O): runtime.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $(C_COMPILER_GUI_RUNTIME_OPTIONS) $< \
+ $(C_COMPILER_OUTPUT)
+ eval$(O): eval.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ expand$(O): expand.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ chicken-syntax$(O): chicken-syntax.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ data-structures$(O): data-structures.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ ports$(O): ports.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ files$(O): files.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ extras$(O): extras.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ library$(O): library.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ lolevel$(O): lolevel.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ posixunix$(O): posixunix.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ posixwin$(O): posixwin.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ profiler$(O): profiler.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ regex$(O): regex.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ scheduler$(O): scheduler.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-1$(O): srfi-1.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-13$(O): srfi-13.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-14$(O): srfi-14.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-18$(O): srfi-18.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-69$(O): srfi-69.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-4$(O): srfi-4.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ stub$(O): stub.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ tcp$(O): tcp.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ utils$(O): utils.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+
+ uruntime$(O): runtime.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ ueval$(O): ueval.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ udata-structures$(O): udata-structures.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uports$(O): uports.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ ufiles$(O): ufiles.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uextras$(O): uextras.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ ulibrary$(O): ulibrary.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ ulolevel$(O): ulolevel.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uposixunix$(O): uposixunix.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uposixwin$(O): uposixwin.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uregex$(O): uregex.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-1$(O): usrfi-1.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-13$(O): usrfi-13.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-14$(O): usrfi-14.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-18$(O): usrfi-18.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-69$(O): usrfi-69.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-4$(O): usrfi-4.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ utcp$(O): utcp.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uutils$(O): uutils.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+
+ runtime-static$(O): runtime.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ gui-runtime-static$(O): runtime.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $(C_COMPILER_GUI_RUNTIME_OPTIONS) $< \
+ $(C_COMPILER_OUTPUT)
+ eval-static$(O): eval.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ expand-static$(O): expand.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ chicken-syntax-static$(O): chicken-syntax.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ data-structures-static$(O): data-structures.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ ports-static$(O): ports.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ files-static$(O): files.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ extras-static$(O): extras.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ library-static$(O): library.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ lolevel-static$(O): lolevel.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ posixunix-static$(O): posixunix.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ posixwin-static$(O): posixwin.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ profiler-static$(O): profiler.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ regex-static$(O): regex.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ scheduler-static$(O): scheduler.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-1-static$(O): srfi-1.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-13-static$(O): srfi-13.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-14-static$(O): srfi-14.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-18-static$(O): srfi-18.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-69-static$(O): srfi-69.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ srfi-4-static$(O): srfi-4.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ stub-static$(O): stub.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ tcp-static$(O): tcp.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ utils-static$(O): utils.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+
+ uruntime-static$(O): runtime.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ ueval-static$(O): ueval.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ udata-structures-static$(O): udata-structures.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uports-static$(O): uports.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ ufiles-static$(O): ufiles.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uextras-static$(O): uextras.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ ulibrary-static$(O): ulibrary.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ ulolevel-static$(O): ulolevel.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uposixunix-static$(O): uposixunix.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uposixwin-static$(O): uposixwin.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uregex-static$(O): uregex.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-1-static$(O): usrfi-1.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-13-static$(O): usrfi-13.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-14-static$(O): usrfi-14.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-18-static$(O): usrfi-18.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-69-static$(O): usrfi-69.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ usrfi-4-static$(O): usrfi-4.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ utcp-static$(O): utcp.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ uutils-static$(O): uutils.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
+@@ -564,112 +564,112 @@
+ # compiler objects
+
+ batch-driver$(O): batch-driver.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< \
+ $(C_COMPILER_OUTPUT)
+ c-backend$(O): c-backend.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< \
+ $(C_COMPILER_OUTPUT)
+ c-platform$(O): c-platform.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< \
+ $(C_COMPILER_OUTPUT)
+ optimizer$(O): optimizer.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< \
+ $(C_COMPILER_OUTPUT)
+ scrutinizer$(O): scrutinizer.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< \
+ $(C_COMPILER_OUTPUT)
+ chicken$(O): chicken.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< \
+ $(C_COMPILER_OUTPUT)
+ compiler$(O): compiler.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< \
+ $(C_COMPILER_OUTPUT)
+ support$(O): support.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< \
+ $(C_COMPILER_OUTPUT)
+
+ # static compiler objects
+
+ batch-driver-static$(O): batch-driver.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ c-backend-static$(O): c-backend.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ c-platform-static$(O): c-platform.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ chicken-static$(O): chicken.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ compiler-static$(O): compiler.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ support-static$(O): support.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ optimizer-static$(O): optimizer.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ scrutinizer-static$(O): scrutinizer.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+
+ # assembler objects
+
+ ifneq ($(HACKED_APPLY),)
+-$(APPLY_HACK_OBJECT): $(SRCDIR)apply-hack.$(ARCH).s
++$(APPLY_HACK_OBJECT): $(SRCDIR)apply-hack.$(ARCH)$(ASM)
+ $(ASSEMBLER) $(ASSEMBLER_OPTIONS) $(ASSEMBLER_COMPILE_OPTION) $< $(ASSEMBLER_OUTPUT)
+ endif
+
+ # program objects
+
+ chicken-profile$(O): chicken-profile.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ chicken-install$(O): chicken-install.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ chicken-uninstall$(O): chicken-uninstall.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ chicken-status$(O): chicken-status.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ chicken-setup$(O): chicken-setup.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ csc$(O): csc.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ csi$(O): csi.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+
+ # static program objects
+
+ csi-static$(O): csi.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+ chicken-bug$(O): chicken-bug.c chicken.h $(CHICKEN_CONFIG_H)
+- $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
++ $(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
+ $(C_COMPILER_STATIC_OPTIONS) \
+ $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
+
+@@ -682,11 +682,16 @@
+ libchicken$(SO): $(LIBCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT)
+ $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_LIBRARY_OPTIONS) $(LIBCHICKEN_SO_LINKER_OPTIONS) \
+ $(LINKER_OUTPUT) $^ $(LIBCHICKEN_SO_LIBRARIES)
+-
++ifdef USES_SONAME
++ ln -sf $(LIBCHICKEN_SO_FILE) $(LIBCHICKEN_SO_FILE).$(BINARYVERSION)
++endif
+
+ libuchicken$(SO): $(LIBUCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT)
+ $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_LINKER_OPTIONS) \
+ $(LINKER_OUTPUT) $^ $(LIBUCHICKEN_SO_LIBRARIES)
++ifdef USES_SONAME
++ ln -sf $(LIBUCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE).$(BINARYVERSION)
++endif
+
+ cygchicken-0.dll: $(LIBCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT)
+ gcc -shared -o $(LIBCHICKEN_SO_FILE) -Wl,--dll -Wl,--add-stdcall-alias \
+@@ -791,17 +796,10 @@
+ endif
+ endif
+ ifneq ($(POSTINSTALL_STATIC_LIBRARY),true)
+-ifdef WINDOWS
+- $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \
+- $(ILIBDIR)\\libchicken$(A)
+- $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \
+- $(ILIBDIR)\\libuchicken$(A)
+-else
+ $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \
+- $(ILIBDIR)/libchicken$(A)
++ $(ILIBDIR)$(SEP)libchicken$(A)
+ $(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \
+- $(ILIBDIR)/libuchicken$(A)
+-endif
++ $(ILIBDIR)$(SEP)libuchicken$(A)
+ endif
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken.h $(DESTDIR)$(IINCDIR)
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(CHICKEN_CONFIG_H) $(DESTDIR)$(IINCDIR)
+@@ -810,12 +808,18 @@
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBCHICKEN_SO_FILE) $(DESTDIR)$(IBINDIR)
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_FILE) $(DESTDIR)$(IBINDIR)
+ else
+- $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBCHICKEN_SO_FILE) $(DESTDIR)$(ILIBDIR)
+- $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_FILE) $(DESTDIR)$(ILIBDIR)
++ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBCHICKEN_SO_FILE) \
++ $(DESTDIR)$(ILIBDIR)$(SEP)$(LIBCHICKEN_SO_FILE)$(SONAME_VERSION)
++ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_FILE) \
++ $(DESTDIR)$(ILIBDIR)$(SEP)$(LIBUCHICKEN_SO_FILE)$(SONAME_VERSION)
+ endif
+ ifdef WINDOWS
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) libchickengui$(SO) $(DESTDIR)$(IBINDIR)
+ endif
++ifdef USES_SONAME
++ cd $(DESTDIR)$(ILIBDIR) && ln -sf $(LIBCHICKEN_SO_FILE).$(BINARYVERSION) libchicken$(SO)
++ cd $(DESTDIR)$(ILIBDIR) && ln -sf $(LIBUCHICKEN_SO_FILE).$(BINARYVERSION) libuchicken$(SO)
++endif
+ endif
+
+ install-dirs:
+@@ -838,8 +842,10 @@
+ $(CSI_PROGRAM)$(EXE) $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
+ $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
+ $(CHICKEN_STATUS_PROGRAM)$(EXE) $(CHICKEN_SETUP_PROGRAM)$(EXE) \
++ $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE) \
+ $(IMPORT_LIBRARIES:%=%.so) $(IMPORT_LIBRARIES:%=%.import.so)
+- $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install
++ $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) \
++ SONAME_VERSION=.$(BINARYVERSION) install
+ $(MAKE_WRITABLE_COMMAND) $(CHICKEN_PROGRAM)$(EXE) $(CSI_PROGRAM)$(EXE) \
+ $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE)
+ ifndef STATICBUILD
+@@ -856,35 +862,35 @@
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(CSC_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(CHICKEN_BUG_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)
+ ifneq ($(POSTINSTALL_PROGRAM),true)
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_PROGRAM)
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CSI_PROGRAM)
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_PROFILE_PROGRAM)
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CSC_PROGRAM)
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_BUG_PROGRAM)
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/setup-api.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/setup-download.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/setup-api.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/setup-download.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/chicken.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/lolevel.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/srfi-1.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/srfi-4.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/data-structures.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/ports.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/files.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/posix.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/srfi-13.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/srfi-69.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/extras.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/regex.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/irregex.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/srfi-14.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/tcp.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/foreign.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/scheme.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/csi.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/srfi-18.import.so
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/utils.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_PROGRAM)
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)$(SEP)$(CSI_PROGRAM)
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_PROFILE_PROGRAM)
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)$(SEP)$(CSC_PROGRAM)
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_BUG_PROGRAM)
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)setup-api.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)setup-download.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)setup-api.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)setup-download.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)chicken.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)lolevel.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)srfi-1.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)srfi-4.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)data-structures.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)ports.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)files.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)posix.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)srfi-13.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)srfi-69.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)extras.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)regex.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)irregex.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)srfi-14.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)tcp.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)foreign.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)scheme.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)csi.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)srfi-18.import.so
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)$(SEP)utils.import.so
+ endif
+ ifndef STATICBUILD
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)
+@@ -892,12 +898,12 @@
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(CHICKEN_STATUS_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(CHICKEN_SETUP_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)
+ ifneq ($(POSTINSTALL_PROGRAM),true)
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_INSTALL_PROGRAM)
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_UNINSTALL_PROGRAM)
+- $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_STATUS_PROGRAM)
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_INSTALL_PROGRAM)
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_UNINSTALL_PROGRAM)
++ $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_STATUS_PROGRAM)
+ endif
+ # this might be left over from older version and will break `chicken-install -update-db'
+- $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IEGGDIR)/compiler.import.so
++ -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IEGGDIR)$(SEP)compiler.import.so
+ ifneq ($(CROSS_CHICKEN),1)
+ ifeq ($(DESTDIR),)
+ -$(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_INSTALL_PROGRAM) -update-db
+@@ -983,23 +989,39 @@
+ $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) setup-download.so $(DESTDIR)$(IEGGDIR)
+
+ uninstall:
+- $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_PROGRAM)$(EXE) \
+- $(DESTDIR)$(IBINDIR)/$(CSI_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)/$(CHICKEN_PROFILE_PROGRAM)$(EXE) \
+- $(DESTDIR)$(IBINDIR)/$(CHICKEN_INSTALL_PROGRAM)$(EXE) \
+- $(DESTDIR)$(IBINDIR)/$(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
+- $(DESTDIR)$(IBINDIR)/$(CHICKEN_STATUS_PROGRAM)$(EXE) \
+- $(DESTDIR)$(IBINDIR)/$(CSC_PROGRAM)$(EXE) \
+- $(DESTDIR)$(IBINDIR)/$(CHICKEN_BUG_PROGRAM)$(EXE)
+- $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)/libchicken*.* $(DESTDIR)$(ILIBDIR)/libuchicken*.* $(DESTDIR)$(IBINDIR)/libchicken*.* $(DESTDIR)$(IBINDIR)/libuchicken*.*
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_PROGRAM)$(EXE) \
++ $(DESTDIR)$(IBINDIR)$(SEP)$(CSI_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_PROFILE_PROGRAM)$(EXE) \
++ $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_INSTALL_PROGRAM)$(EXE) \
++ $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
++ $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_STATUS_PROGRAM)$(EXE) \
++ $(DESTDIR)$(IBINDIR)$(SEP)$(CSC_PROGRAM)$(EXE) \
++ $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_BUG_PROGRAM)$(EXE) \
++ $(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_SETUP_PROGRAM)$(EXE)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)$(SEP)libchicken$(A)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)$(SEP)libuchicken$(A)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)$(SEP)libchicken$(SO)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)$(SEP)libuchicken$(SO)
++ifdef USES_SONAME
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)$(SEP)libchicken$(SO).$(BINARYVERSION)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)$(SEP)libuchicken$(SO).$(BINARYVERSION)
++endif
++ifdef WINDOWS
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)$(SEP)libchicken$(SO)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)$(SEP)libuchicken$(SO)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)$(SEP)libchickengui$(SO)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)$(SEP)libchickengui$(A)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)$(SEP)$(LIBCHICKEN_IMPORT_LIBRARY)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)$(SEP)$(LIBUCHICKEN_IMPORT_LIBRARY)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)$(SEP)$(LIBCHICKENGUI_IMPORT_LIBRARY)
++endif
+ ifdef ($(PLATFORM),cygwin)
+- $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)/cygchicken* $(DESTDIR)$(IBINDIR)/cyguchicken*
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)$(SEP)cygchicken* $(DESTDIR)$(IBINDIR)$(SEP)cyguchicken*
+ endif
+- $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IMANDIR)/chicken.1 $(DESTDIR)$(IMANDIR)/csi.1 \
+- $(DESTDIR)$(IMANDIR)/csc.1 $(DESTDIR)$(IMANDIR)/chicken-profile.1 $(DESTDIR)$(IMANDIR)/chicken-install.1 \
+- $(DESTDIR)$(IMANDIR)/chicken-bug.1 $(DESTDIR)$(IMANDIR)/chicken-uninstall.1 \
+- $(DESTDIR)$(IMANDIR)/chicken-status.1
+- $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IINCDIR)/chicken.h $(DESTDIR)$(IINCDIR)/chicken-config.h
+- $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IINCDIR)/chicken.gch
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IMANDIR)$(SEP)chicken.1 $(DESTDIR)$(IMANDIR)$(SEP)csi.1 \
++ $(DESTDIR)$(IMANDIR)$(SEP)csc.1 $(DESTDIR)$(IMANDIR)$(SEP)chicken-profile.1 $(DESTDIR)$(IMANDIR)$(SEP)chicken-install.1 \
++ $(DESTDIR)$(IMANDIR)$(SEP)chicken-bug.1 $(DESTDIR)$(IMANDIR)$(SEP)chicken-uninstall.1 \
++ $(DESTDIR)$(IMANDIR)$(SEP)chicken-status.1
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IINCDIR)$(SEP)chicken.h $(DESTDIR)$(IINCDIR)$(SEP)chicken-config.h
+ $(REMOVE_COMMAND) $(REMOVE_COMMAND_RECURSIVE_OPTIONS) $(DESTDIR)$(IDATADIR)
+ ifdef WINDOWS_SHELL
+ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)$(SEP)csibatch.bat
+@@ -1205,16 +1227,17 @@
+ uutils.c utcp.c usrfi-1.c usrfi-4.c usrfi-13.c usrfi-14.c \
+ usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c \
+ chicken-profile.c chicken-install.c chicken-uninstall.c chicken-status.c chicken-setup.c \
+- csc.c csi.c chicken.c batch-driver.c compiler.c optimizer.c scrutinizer.c support.c \
++ csc.c csi.c chicken.c batch-driver.c compiler.c optimizer.c \
++ scrutinizer.c support.c \
+ c-platform.c c-backend.c chicken-bug.c $(IMPORT_LIBRARIES:=.import.c)
+
+ dist: distfiles
+- CSI=$(CSI) $(CSI) -s $(SRCDIR)scripts/makedist.scm --platform=$(PLATFORM) CHICKEN=$(CHICKEN)
++ CSI=$(CSI) $(CSI) -s $(SRCDIR)scripts$(SEP)makedist.scm --platform=$(PLATFORM) CHICKEN=$(CHICKEN)
+
+ html:
+ $(MAKEDIR_COMMAND) $(MAKEDIR_COMMAND_OPTIONS) $(SRCDIR)html
+- $(COPY_COMMAND) $(SRCDIR)misc/manual.css $(SRCDIR)html
+- $(CSI) -s $(SRCDIR)scripts/wiki2html.scm --outdir=html manual/*
++ $(COPY_COMMAND) $(SRCDIR)misc$(SEP)manual.css $(SRCDIR)html
++ $(CSI) -s $(SRCDIR)scripts$(SEP)wiki2html.scm --outdir=html manual$(SEP)*
+
+ # cleaning up
+
+@@ -1234,8 +1257,12 @@
+ $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE) $(LIBCHICKENGUI_SO_FILE) \
+ libchicken$(A) libuchicken$(A) libchickengui$(A) libchicken$(SO) $(PROGRAM_IMPORT_LIBRARIES) \
+ $(IMPORT_LIBRARIES:=.import.so) $(LIBCHICKEN_IMPORT_LIBRARY) $(LIBUCHICKEN_IMPORT_LIBRARY) \
+- $(LIBCHICKENGUI_IMPORT_LIBRARY) setup-api.so setup-download.so setup-api.c setup-download.c \
++ $(LIBCHICKENGUI_IMPORT_LIBRARY) setup-api.so setup-download.so \
+ $(CLEAN_MINGW_LIBS)
++ifdef USES_SONAME
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) libchicken.so.$(BINARYVERSION)
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) libuchicken.so.$(BINARYVERSION)
++endif
+
+ confclean:
+ -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) chicken-config.h chicken-defaults.h buildsvnrevision
+@@ -1249,15 +1276,16 @@
+ uutils.c utcp.c usrfi-1.c usrfi-4.c usrfi-13.c usrfi-14.c \
+ usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c chicken-profile.c chicken-bug.c \
+ csc.c csi.c chicken-install.c chicken-setup.c chicken-uninstall.c chicken-status.c \
+- chicken.c batch-driver.c compiler.c optimizer.c scrutinizer.c support.c \
+- c-platform.c c-backend.c chicken-boot$(EXE) \
++ chicken.c batch-driver.c compiler.c optimizer.c \
++ scrutinizer.c support.c \
++ c-platform.c c-backend.c chicken-boot$(EXE) setup-api.c setup-download.c \
+ $(IMPORT_LIBRARIES:=.import.c)
+
+ distclean: clean confclean
+
+ testclean:
+- $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(SRCDIR)tests/*.out $(SRCDIR)tests/tmp* \
+- $(SRCDIR)tests/*.so $(SRCDIR)tests/*.import.scm $(SRCDIR)tests/repository
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(SRCDIR)tests$(SEP)a.out $(SRCDIR)tests$(SEP)scrutiny.out \
++ $(SRCDIR)tests$(SEP)tmp* $(SRCDIR)tests$(SEP)*.so $(SRCDIR)tests$(SEP)*.import.scm $(SRCDIR)tests$(SEP)repository
+
+ # run tests
+
+@@ -1273,19 +1301,19 @@
+ compiler-check:
+ @echo "======================================== packing ..."
+ $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) dist
+- $(REMOVE_COMMAND $(REMOVE_COMMAND_RECURSIVE_OPTIONS) tests/chicken-*
++ $(REMOVE_COMMAND $(REMOVE_COMMAND_RECURSIVE_OPTIONS) tests$(SEP)chicken-*
+ tar -C tests -xzf `ls -t chicken-*.tar.gz | head -1`
+ @echo "======================================== building stage 1 ..."
+- $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
+- touch tests/chicken-*/*.scm
++ $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests$(SEP)chicken-* confclean all
++ touch tests$(SEP)chicken-*$(SEP)*.scm
+ @echo "======================================== building stage 2 ..."
+- $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
+- cat tests/chicken-*/*.c >tests/stage2.out
++ $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests$(SEP)chicken-* confclean all
++ cat tests$(SEP)chicken-*$(SEP)*.c >tests$(SEP)stage2.out
+ @echo "======================================== building stage 3 ..."
+- $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests/chicken-* confclean all
+- cat tests/chicken-*/*.c >tests/stage3.out
+- diff tests/stage2.out tests/stage3.out >tests/stages.diff
+- $(REMOVE_COMMAND) $(REMOVE_COMMAND_RECURSIVE_OPTIONS) tests/chicken-*
++ $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) STATICBUILD=1 -C tests$(SEP)chicken-* confclean all
++ cat tests$(SEP)chicken-*$(SEP)*.c >tests$(SEP)stage3.out
++ diff tests$(SEP)stage2.out tests$(SEP)stage3.out >tests$(SEP)stages.diff
++ $(REMOVE_COMMAND) $(REMOVE_COMMAND_RECURSIVE_OPTIONS) tests$(SEP)chicken-*
+
+
+ # bootstrap from C source tarball
+@@ -1313,7 +1341,7 @@
+ .PHONY: bench
+
+ bench:
+- here=`pwd`; \
++ @here=`pwd`; \
+ cd $(SRCDIR)benchmarks; \
+ LD_LIBRARY_PATH=$$here DYLD_LIBRARY_PATH=$$here PATH=$$here:$$PATH \
+ $(CSI) -s cscbench.scm $(BENCHMARK_OPTIONS)
diff --git a/recipes/chicken/chicken-native_4.2.0.bb b/recipes/chicken/chicken-native_4.2.0.bb
new file mode 100644
index 0000000000..b3f5dfdaf5
--- /dev/null
+++ b/recipes/chicken/chicken-native_4.2.0.bb
@@ -0,0 +1,7 @@
+require chicken_${PV}.bb
+
+DEPENDS = "gcc-native"
+RDEPENDS = "gcc-native"
+
+inherit native
+
diff --git a/recipes/chicken/chicken.inc b/recipes/chicken/chicken.inc
new file mode 100644
index 0000000000..f0126a9c16
--- /dev/null
+++ b/recipes/chicken/chicken.inc
@@ -0,0 +1,54 @@
+ESCRIPTION = "A compiler that translates Scheme source files to C, and an interpreter"
+HOMEPAGE = "http://www.call-with-current-continuation.org/"
+SECTION = "interpreters"
+PRIORITY = "optional"
+LICENSE = "BSD"
+INC_PR = "r1"
+
+SRC_URI = "http://chicken.wiki.br/releases/${PV}/chicken-${PV}.tar.gz"
+
+# Parallel building is not supported
+PARALLEL_MAKE = ""
+
+# Required environment values
+export PLATFORM="linux"
+export PREFIX="${prefix}"
+export LIBRARIAN="${TARGET_PREFIX}"
+export TARGETSYSTEM="${TARGET_SYS}"
+
+do_compile() {
+ case ${TARGET_ARCH} in
+ i*86)
+ ARCH=x86
+ ;;
+ *)
+ echo "Check ARCH value for ${TARGET_ARCH}"
+ exit 1
+ ;;
+ esac
+
+ make ARCH=${ARCH} TARGET_C_COMPILER=gcc
+}
+
+do_install() {
+ case ${TARGET_ARCH} in
+ i*86)
+ ARCH=x86
+ ;;
+ *)
+ echo "Check ARCH value for ${TARGET_ARCH}"
+ exit 1
+ ;;
+ esac
+
+ make ARCH=${ARCH} DESTDIR=${D} install
+}
+
+PACKAGES += "chicken-bin libchicken libuchicken"
+
+FILES_${PN} = ""
+FILES_libchicken = "${libdir}/libchicken.so.*"
+FILES_libuchicken = "${libdir}/libuchicken.so.*"
+FILES_${PN}-bin = "${bindir}/* ${datadir}/chicken/*.* ${libdir}/chicken/*/*.so"
+FILES_${PN}-doc += "${datadir}/chicken/doc"
+FILES_${PN}-dbg += "${libdir}/chicken/*/.debug"
diff --git a/recipes/chicken/chicken2.inc b/recipes/chicken/chicken2.inc
deleted file mode 100644
index fbaf971f88..0000000000
--- a/recipes/chicken/chicken2.inc
+++ /dev/null
@@ -1,19 +0,0 @@
-DESCRIPTION = "A compiler that translates Scheme source files to C, and an interpreter"
-HOMEPAGE = "http://www.call-with-current-continuation.org/"
-SECTION = "interpreters"
-PRIORITY = "optional"
-LICENSE = "BSD"
-
-SRC_URI = "http://www.call-with-current-continuation.org/chicken-${PV}.tar.gz"
-
-inherit autotools
-
-do_install_append() {
- install -d ${D}${docdir}/${P}
- mv ${D}/${datadir}/chicken/doc ${D}${docdir}/${P}
-}
-
-do_stage() {
- autotools_stage_all
-}
-
diff --git a/recipes/chicken/chicken3.inc b/recipes/chicken/chicken3.inc
deleted file mode 100644
index 2feebfb48a..0000000000
--- a/recipes/chicken/chicken3.inc
+++ /dev/null
@@ -1,36 +0,0 @@
-DESCRIPTION = "A compiler that translates Scheme source files to C, and an interpreter"
-HOMEPAGE = "http://www.call-with-current-continuation.org/"
-SECTION = "interpreters"
-PRIORITY = "optional"
-LICENSE = "BSD"
-
-SRC_URI = "http://chicken.wiki.br/releases/${PV}/chicken-${PV}.tar.gz"
-
-inherit autotools
-
-do_compile() {
- export PLATFORM=linux
- export PREFIX=${prefix}
- export HOST=${TARGET_ARCH}-${DISTRO}-${TARGET_OS}
- export C_COMPILER=${HOST}-gcc
- export LIBRARIAN=${HOST}-ar
- # ARCH= is weird... but it's not enough to export this variable.
- # If ARCH is not set to empty-string, then the Makefile will try to
- # use the apply-hack.s file applicable to the machine doing the compiling.
- # There is no such apply-hack assembler code for arm, at least not yet.
- make ARCH=
-}
-
-do_install() {
- export PLATFORM=linux
- export PREFIX=${prefix}
- export HOST=${TARGET_ARCH}-${DISTRO}-${TARGET_OS}
- export C_COMPILER=${HOST}-gcc
- export LIBRARIAN=${HOST}-ar
- make ARCH= DESTDIR=${D} install
-}
-
-FILES_${PN} = "${bindir}/csi ${bindir}/chicken-bug"
-FILES_${PN} += "${libdir}/lib*.so.* ${libdir}/chicken"
-FILES_${PN} += "${datadir}/chicken/*.*"
-FILES_${PN}-dev += "${bindir}"
diff --git a/recipes/chicken/chicken_2.6.bb b/recipes/chicken/chicken_2.6.bb
deleted file mode 100644
index 934ef4a218..0000000000
--- a/recipes/chicken/chicken_2.6.bb
+++ /dev/null
@@ -1 +0,0 @@
-require chicken2.inc
diff --git a/recipes/chicken/chicken_3.3.0.bb b/recipes/chicken/chicken_3.3.0.bb
index 7d9fc69419..c61d655ab5 100644
--- a/recipes/chicken/chicken_3.3.0.bb
+++ b/recipes/chicken/chicken_3.3.0.bb
@@ -1 +1,3 @@
-require chicken3.inc
+require chicken.inc
+
+PR = "${INC_PR}.1"
diff --git a/recipes/chicken/chicken_4.2.0.bb b/recipes/chicken/chicken_4.2.0.bb
new file mode 100644
index 0000000000..473c7ad817
--- /dev/null
+++ b/recipes/chicken/chicken_4.2.0.bb
@@ -0,0 +1,5 @@
+require chicken.inc
+
+SRC_URI += "file://soname.patch;patch=1"
+
+PR = "${INC_PR}.1"
diff --git a/recipes/clutter/clutter.inc b/recipes/clutter/clutter.inc
index 705cece91e..55980eda02 100644
--- a/recipes/clutter/clutter.inc
+++ b/recipes/clutter/clutter.inc
@@ -2,7 +2,7 @@ DESCRIPTION = "Clutter graphics library"
HOMEPAGE = "http://www.clutter-project.org/"
LICENSE = "LGPL"
-COMPATIBLE_MACHINE = "(zylonite|mx31litekit|omap-3430ldp|omap-3430sdp|mx31ads|qemuarm|qemux86|ipodtouch|omap3517-evm|beagleboard|overo|omap3evm|omap5912osk)"
+COMPATIBLE_MACHINE = "(zylonite|mx31litekit|omap-3430ldp|omap-3430sdp|mx31ads|qemuarm|qemux86|ipodtouch|am3517-evm|beagleboard|overo|omap3evm|omap5912osk)"
STDDEPENDS = "virtual/libx11 gtk-doc-native pango glib-2.0 libxfixes gtk+"
BASE_CONF = "--disable-gtk-doc ${@get_clutter_fpu_setting(bb, d)}"
diff --git a/recipes/gnome/goffice_0.7.14.bb b/recipes/gnome/goffice_0.7.14.bb
index 9fff0b4cfe..77dd39ad79 100644
--- a/recipes/gnome/goffice_0.7.14.bb
+++ b/recipes/gnome/goffice_0.7.14.bb
@@ -1,9 +1,9 @@
DESCRIPTION="Gnome Office Library"
LICENSE="GPLv2"
-DEPENDS="glib-2.0 gtk+ pango cairo libgnomeprint libgsf libglade libpcre libxml2 libart-lgpl"
+PR = "r1"
-FILES_${PN}-dbg += "${libdir}/goffice/${PV}/plugins/*/.debug"
+DEPENDS="glib-2.0 gtk+ pango cairo libgnomeprint libgsf libglade libpcre libxml2 libart-lgpl"
inherit gnome pkgconfig
@@ -11,10 +11,33 @@ do_stage() {
autotools_stage_all
}
+FILES_${PN}-dbg += "${libdir}/goffice/${PV}/plugins/*/.debug"
+
+RRECOMMENDS_${PN} = " \
+ goffice-plugin-plot-barcol \
+ goffice-plugin-plot-distrib \
+ goffice-plugin-plot-pie \
+ goffice-plugin-plot-radar \
+ goffice-plugin-plot-surface \
+ goffice-plugin-plot-xy \
+ goffice-plugin-reg-linear \
+ goffice-plugin-reg-logfit \
+ goffice-plugin-smoothing \
+"
+
+FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
+ ${sysconfdir} ${sharedstatedir} ${localstatedir} \
+ ${base_bindir}/* ${base_sbindir}/* \
+ ${base_libdir}/*${SOLIBS} \
+ ${datadir}/${PN} \
+ ${datadir}/pixmaps ${datadir}/applications \
+ ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
+ ${libdir}/bonobo/servers"
+
PACKAGES_DYNAMIC = "goffice-plugin-*"
python populate_packages_prepend () {
- goffice_libdir = bb.data.expand('${libdir}/goffice/${PV}/plugins', d)
+ goffice_libdir = bb.data.expand('${libdir}/goffice/${PV}/plugins/', d)
do_split_packages(d, goffice_libdir, '(.*)', 'goffice-plugin-%s', 'Goffice plugin for %s', allow_dirs=True)
}
diff --git a/recipes/linux/linux-2.6.31/boc01/011-091028-gpio.patch b/recipes/linux/linux-2.6.31/boc01/011-091028-gpio.patch
index 2e37e81d40..c71f9e6289 100644
--- a/recipes/linux/linux-2.6.31/boc01/011-091028-gpio.patch
+++ b/recipes/linux/linux-2.6.31/boc01/011-091028-gpio.patch
@@ -1,8 +1,16 @@
Index: linux-2.6.31/arch/powerpc/platforms/83xx/mpc831x_rdb.c
===================================================================
---- linux-2.6.31.orig/arch/powerpc/platforms/83xx/mpc831x_rdb.c 2009-10-28 14:56:44.000000000 +0100
-+++ linux-2.6.31/arch/powerpc/platforms/83xx/mpc831x_rdb.c 2009-10-28 15:44:23.000000000 +0100
-@@ -20,6 +20,7 @@
+--- linux-2.6.31.orig/arch/powerpc/platforms/83xx/mpc831x_rdb.c 2009-10-29 16:31:14.000000000 +0100
++++ linux-2.6.31/arch/powerpc/platforms/83xx/mpc831x_rdb.c 2009-10-29 17:23:51.000000000 +0100
+@@ -13,6 +13,7 @@
+ * option) any later version.
+ */
+
++#include <linux/gpio.h>
+ #include <linux/pci.h>
+ #include <linux/of_platform.h>
+
+@@ -20,6 +21,7 @@
#include <asm/ipic.h>
#include <asm/udbg.h>
#include <sysdev/fsl_pci.h>
@@ -10,13 +18,26 @@ Index: linux-2.6.31/arch/powerpc/platforms/83xx/mpc831x_rdb.c
#include "mpc83xx.h"
-@@ -79,6 +80,9 @@
+@@ -79,7 +81,22 @@
static int __init declare_of_platform_devices(void)
{
-+ /* memory-mapped IO extender */
++ struct device_node *np;
++
++ /* declare memory-mapped IO extender */
+ simple_gpiochip_init("fsl,mpc8313-exio");
+
of_platform_bus_probe(NULL, of_bus_ids, NULL);
++
++ /* activate USB, RFID and touch board */
++ np = of_find_compatible_node(NULL, NULL, "fsl,mpc8313-exio");
++ if (np)
++ {
++ gpio_direction_output(217, 1); // EXIO1 : USB
++ gpio_direction_output(219, 1); // EXIO3 : RFID
++ gpio_direction_output(220, 1); // EXIO4 : Touch board
++ of_node_put(np);
++ }
return 0;
}
+ machine_device_initcall(mpc831x_rdb, declare_of_platform_devices);
diff --git a/recipes/linux/linux-2.6.31/boc01/boc01.dts b/recipes/linux/linux-2.6.31/boc01/boc01.dts
index 333b850ba2..4c8917e3a9 100644
--- a/recipes/linux/linux-2.6.31/boc01/boc01.dts
+++ b/recipes/linux/linux-2.6.31/boc01/boc01.dts
@@ -184,6 +184,8 @@
};
spi@7000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
cell-index = <0>;
compatible = "fsl,spi";
reg = <0x7000 0x1000>;
diff --git a/recipes/linux/linux-2.6.31/boc01/boc01.dts.v1 b/recipes/linux/linux-2.6.31/boc01/boc01.dts.v1
index a3e452e381..dcdef691c7 100644
--- a/recipes/linux/linux-2.6.31/boc01/boc01.dts.v1
+++ b/recipes/linux/linux-2.6.31/boc01/boc01.dts.v1
@@ -184,6 +184,8 @@
};
spi@7000 {
+ #address-cells = <1>;
+ #size-cells = <0>;
cell-index = <0>;
compatible = "fsl,spi";
reg = <0x7000 0x1000>;
diff --git a/recipes/linux/linux-2.6.31/collie/0001-add-locomo_spi-driver.patch b/recipes/linux/linux-2.6.31/collie/0001-add-locomo_spi-driver.patch
new file mode 100644
index 0000000000..61880876e1
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0001-add-locomo_spi-driver.patch
@@ -0,0 +1,1228 @@
+From f9a6c1625c0e415ecb3ae83d158ce1087e647b7c Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Mon, 20 Oct 2008 17:30:32 +0200
+Subject: [PATCH 01/15] add locomo_spi driver
+
+---
+ drivers/spi/Kconfig | 4 +
+ drivers/spi/Makefile | 1 +
+ drivers/spi/locomo_spi.c | 1097 ++++++++++++++++++++++++++++++++++++++++++++++
+ drivers/spi/locomo_spi.h | 75 ++++
+ 4 files changed, 1177 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/spi/locomo_spi.c
+ create mode 100644 drivers/spi/locomo_spi.h
+
+diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
+index 2c733c2..b72756d 100644
+--- a/drivers/spi/Kconfig
++++ b/drivers/spi/Kconfig
+@@ -139,6 +139,10 @@ config SPI_MPC52xx_PSC
+ This enables using the Freescale MPC52xx Programmable Serial
+ Controller in master SPI mode.
+
++config SPI_LOCOMO
++ tristate "Locomo SPI master"
++ depends on SPI_MASTER && SHARP_LOCOMO && EXPERIMENTAL
++
+ config SPI_MPC8xxx
+ tristate "Freescale MPC8xxx SPI controller"
+ depends on FSL_SOC
+diff --git a/drivers/spi/Makefile b/drivers/spi/Makefile
+index 3de408d..7618f08 100644
+--- a/drivers/spi/Makefile
++++ b/drivers/spi/Makefile
+@@ -31,6 +31,7 @@ obj-$(CONFIG_SPI_S3C24XX) += spi_s3c24xx.o
+ obj-$(CONFIG_SPI_TXX9) += spi_txx9.o
+ obj-$(CONFIG_SPI_XILINX) += xilinx_spi.o
+ obj-$(CONFIG_SPI_SH_SCI) += spi_sh_sci.o
++obj-$(CONFIG_SPI_LOCOMO) += locomo_spi.o
+ # ... add above this line ...
+
+ # SPI protocol drivers (device/link on bus)
+diff --git a/drivers/spi/locomo_spi.c b/drivers/spi/locomo_spi.c
+new file mode 100644
+index 0000000..d3a4bd9
+--- /dev/null
++++ b/drivers/spi/locomo_spi.c
+@@ -0,0 +1,1097 @@
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/device.h>
++#include <linux/stat.h>
++#include <linux/delay.h>
++#include <linux/wait.h>
++#include <linux/interrupt.h>
++#include <asm/hardware/locomo.h>
++#include <asm/errno.h>
++#include <linux/mmc/host.h>
++#include <linux/spi/spi.h>
++#include <linux/spi/mmc_spi.h>
++#include <linux/workqueue.h>
++#include <linux/spinlock.h>
++#include <linux/list.h>
++#include "locomo_spi.h"
++static struct locomospi_dev * spidev;
++static struct work_struct transfer_wq;
++int delay;
++
++char* transtxbuf=(char*)NULL;
++char* transrxbuf=(char*)NULL;
++int transfercount=0, transfersize=0;
++static DECLARE_WAIT_QUEUE_HEAD(transferqueue);
++/* MMC_SPI functions *********************************************************/
++
++static int locomommcspi_init(struct device *dev, irqreturn_t (*isr)(int, void*), void *mmc)
++{
++ int result;
++ result=request_irq(IRQ_LOCOMO_CARDDETECT, isr, IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, "locomo-spi", mmc);
++ return result;
++}
++
++static void locomommcspi_exit(struct device *dev, void* mmc)
++{
++ free_irq(IRQ_LOCOMO_CARDDETECT, mmc);
++}
++
++static int locomommcspi_getro(struct device *dev)
++{
++ return locomo_gpio_read_level(spidev->ldev->dev.parent,LOCOMO_GPIO_WRITE_PROT) > 0 ? 1 : 0;
++}
++
++static void locomommcspi_setpower(struct device *dev, unsigned int mask)
++{
++ if(!mask && spidev->card_power)
++ locomospi_power(0);
++ else if( !spidev->card_power )
++ locomospi_power(1);
++
++}
++
++
++static struct mmc_spi_platform_data colliemmc ={
++ .init = locomommcspi_init,
++ .exit = locomommcspi_exit,
++ .detect_delay = 200,
++ .get_ro = locomommcspi_getro,
++ .ocr_mask = MMC_VDD_32_33 | MMC_VDD_33_34,
++ .setpower = locomommcspi_setpower,
++ .powerup_msecs = 200,
++};
++
++/* Utility function **********************************************************/
++
++static void locomospi_power(int on)
++{
++ locomo_gpio_write(spidev->ldev->dev.parent, LOCOMO_GPIO_CARD_POWER, on);
++ spidev->card_power=on;
++ printk(KERN_DEBUG "locomospi: power %d\n",on);
++}
++
++static void locomospi_setclock(unsigned int div, unsigned int clock)
++{
++ u16 r = ioread16(spidev->base+LOCOMO_SPIMD);
++ div &= 0x7;
++ clock &= 0x3;
++ if(clock != spidev->clock_base || div != spidev->clock_div){
++ r &= ~(LOCOMO_SPI_XSEL | LOCOMO_SPI_CLKSEL | LOCOMO_SPI_XEN);
++ iowrite16(r,spidev->base+LOCOMO_SPIMD);
++ r |= (div | (clock <<3) | LOCOMO_SPI_XEN);
++ iowrite16(r,spidev->base+LOCOMO_SPIMD);
++ spidev->clock_div = div;
++ spidev->clock_base = clock;
++ udelay(300);
++ }
++
++}
++// returns 1 if card ist present, 0 otherwise
++static int locomospi_carddetect()
++{
++ return (locomo_gpio_read_level(spidev->ldev->dev.parent,LOCOMO_GPIO_CARD_DETECT)>0)?0:1;
++}
++
++static void locomospi_setcs(int high)
++{
++ u16 r;
++ printk(KERN_DEBUG "locomospi: cs %d\n",high);
++ r = ioread16(spidev->base + LOCOMO_SPICT);
++ if(high)
++ r |= LOCOMO_SPI_CS;
++ else
++ r &= ~LOCOMO_SPI_CS;
++ iowrite16(r, spidev->base + LOCOMO_SPICT);
++}
++
++static void locomospi_reg_open()
++{
++ u16 r;
++ spidev->clock_div = DIV_64;
++ spidev->clock_base = CLOCK_18MHZ;
++ locomospi_power(1);
++ msleep(100);
++// iowrite16( 0xec00 | (CLOCK_18MHZ <<3)|DIV_64, spidev->base+LOCOMO_SPIMD);
++ iowrite16( LOCOMO_SPI_MSB1ST | LOCOMO_SPI_DOSTAT | LOCOMO_SPI_RCPOL | LOCOMO_SPI_TCPOL
++ |(CLOCK_18MHZ <<3) | DIV_64, spidev->base+LOCOMO_SPIMD);
++// if(locomospi_carddetect()){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16( r, spidev->base+LOCOMO_SPIMD);
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XEN;
++ iowrite16( r, spidev->base+LOCOMO_SPIMD);
++// }
++ iowrite16( LOCOMO_SPI_CS, spidev->base+LOCOMO_SPICT);
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r |= (LOCOMO_SPI_CEN | LOCOMO_SPI_RXUEN | LOCOMO_SPI_ALIGNEN);
++ iowrite16( r, spidev->base+LOCOMO_SPICT);
++ udelay(200);
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r &= ~LOCOMO_SPI_CS;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++}
++
++static void locomospi_reg_release()
++{
++ u16 r;
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r &= ~LOCOMO_SPI_CEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r &= ~LOCOMO_SPI_XEN;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r &= ~LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r |= LOCOMO_SPI_XEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++ locomospi_power(0);
++}
++#if 0
++static int txrx(const char* txbuffer, char* rxbuffer, int size)
++{
++ u16 r = ioread16(spidev->base+LOCOMO_SPICT);
++ r |= LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++ printk(KERN_DEBUG "locomospi: %d bytes to prozess\n",size);
++ /* initialize global vars for isr */
++ transfercount=0; transfersize=size;
++ transtxbuf=txbuffer; transrxbuf=rxbuffer;
++
++ /* start transmit and go sleep isr will wake us*/
++ enable_irq(IRQ_LOCOMO_SPI_TEND);
++ iowrite8(txbuffer[0], spidev->base+LOCOMO_SPITD);
++ wait_event(transferqueue, transfercount >= transfersize);
++ disable_irq(IRQ_LOCOMO_SPI_TEND);
++ transrxbuf=NULL; transtxbuf=NULL;
++
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r &= ~LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++ int i;
++ for(i=0; i< size; i++)
++ printk(KERN_DEBUG "locomospi: sent: %x received: %x \n",txbuffer[i], rxbuffer[i]);
++
++
++ return size;
++}
++
++
++static int tx(const char* txbuffer, int size)
++{
++ printk(KERN_DEBUG "locomospi: %d bytes to send\n",size);
++ /* initialize global vars for isr */
++ transfercount=0; transfersize=size;
++ transtxbuf=txbuffer;
++
++ /* start transmit and go sleep isr will wake us*/
++ enable_irq(IRQ_LOCOMO_SPI_RFW);
++ iowrite8(txbuffer[0], spidev->base+LOCOMO_SPITD);
++ wait_event(transferqueue, transfercount >= transfersize);
++ disable_irq(IRQ_LOCOMO_SPI_RFW);
++ transtxbuf=NULL;
++
++ int i;
++ for(i=0; i< size; i++)
++ printk(KERN_DEBUG "locomospi: sent: %x\n",txbuffer[i]);
++
++
++ return size;
++}
++
++static int rx(char* rxbuffer, int size)
++{
++ printk(KERN_DEBUG "locomospi: %d bytes to read\n",size);
++ /* initialize global vars for isr */
++ transfercount=0; transfersize=size;
++ transrxbuf=rxbuffer;
++
++ /* start transmit and go sleep isr will wake us*/
++ enable_irq(IRQ_LOCOMO_SPI_RFR);
++ rxbuffer[0]=ioread8(spidev->base+LOCOMO_SPIRD);
++ wait_event(transferqueue, transfercount >= transfersize);
++ disable_irq(IRQ_LOCOMO_SPI_RFR);
++ transrxbuf=NULL;
++
++ int i;
++ for(i=0; i< size; i++)
++ printk(KERN_DEBUG "locomospi: received: %x \n", rxbuffer[i]);
++
++
++ return size;
++}
++
++#else
++static int txrx(const char* txbuffer, char* rxbuffer, int size)
++{
++ int i=0,j=0;
++ int wait;
++ u16 r;
++/* char * txback = kmalloc(size * sizeof(char), GFP_KERNEL);
++ memcpy(txback, txbuffer, size);
++*/
++ if(spidev->clock_div == 4)
++ wait = 0x10000;
++ else
++ wait = 8;
++
++// printk(KERN_DEBUG "locomospi: txrx %d bytes to prozess\n",size);
++
++// r = ioread16(spidev->base+LOCOMO_SPICT);
++// r |= LOCOMO_SPI_ALIGNEN;
++// iowrite16(r, spidev->base+LOCOMO_SPICT);
++ //discard first bogus byte
++
++ ioread8(spidev->base+LOCOMO_SPIRD);
++ for(i=0; i<size; i++){
++ for(j=0; j <= wait; j++){
++ if(ioread16(spidev->base+LOCOMO_SPIST) & LOCOMO_SPI_RFW)
++ break;
++ }
++ iowrite8(txbuffer[i], spidev->base+LOCOMO_SPITD);
++ ndelay(delay);
++
++ for(j=0; j <= wait; j++){
++ if(ioread16(spidev->base+LOCOMO_SPIST) & LOCOMO_SPI_RFR)
++ break;
++ }
++ rxbuffer[i] = ioread8(spidev->base+LOCOMO_SPIRD);
++ ndelay(delay);
++ }
++// r = ioread16(spidev->base+LOCOMO_SPICT);
++// r &= ~LOCOMO_SPI_ALIGNEN;
++// iowrite16(r, spidev->base+LOCOMO_SPICT);
++
++/* for(j=0; j< size; j++)
++ printk(KERN_DEBUG "locomospi: sent: %x received: %x \n",txback[j], rxbuffer[j]);
++
++ kfree(txback);
++*/ return i;
++}
++
++static int tx(const char* buffer, int size)
++{
++ int i=0,j=0;
++ int wait;
++ u16 r;
++ if(spidev->clock_div == 4)
++ wait = 0x10000;
++ else
++ wait = 8;
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r &= ~LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++
++// printk(KERN_DEBUG "locomospi: tx %d bytes to transmit\n",size);
++ for(i=0; i<size; i++){
++ for(j=0; j <= wait; j++){
++ if(ioread16(spidev->base+LOCOMO_SPIST) & LOCOMO_SPI_RFW)
++ break;
++ }
++ iowrite8(buffer[i], spidev->base+LOCOMO_SPITD);
++ ndelay(delay);
++ }
++
++ for(j=0; j <= wait; j++){
++ if(ioread16(spidev->base+LOCOMO_SPIST) & LOCOMO_SPI_TEND)
++ break;
++ }
++
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r |= LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++
++// for(j=0; j< size; j++)
++// printk(KERN_DEBUG "locomospi: sent: %x \n", buffer[j]);
++// printk(KERN_DEBUG "locomospi: tx %d bytes transmitted\n",i);
++ return i;
++}
++
++static int rx(char* buffer, int size)
++{
++ int i,j;
++ int wait;
++ u16 r;
++ printk(KERN_DEBUG "locomospi: rx %d bytes to receive\n",size);
++ if(spidev->clock_div == 4)
++ wait = 0x10000;
++ else
++ wait = 8;
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r &= ~LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++
++ for(i=0; i<size; i++){
++
++ for(j=0; j <= wait; j++){
++ if(ioread16(spidev->base+LOCOMO_SPIST) & LOCOMO_SPI_RFR)
++ break;
++ }
++ buffer[i]= ioread8(spidev->base+LOCOMO_SPIRD);
++ ndelay(delay);
++ }
++
++ r = ioread16(spidev->base+LOCOMO_SPICT);
++ r |= LOCOMO_SPI_ALIGNEN;
++ iowrite16(r, spidev->base+LOCOMO_SPICT);
++
++ for(j=0; j< size; j++)
++ printk(KERN_DEBUG "locomospi: received: %x \n", buffer[j]);
++ printk(KERN_DEBUG "locomospi: rx %d bytes received\n",i);
++ return i;
++}
++#endif
++/*
++static irqreturn_t locomospi_rwready(int irq, void *dev_id)
++{
++ struct locomospi_dev* dev=(struct locomospi_dev*) dev_id;
++// dev_dbg(&spidev->sdev->dev, "IRQ: %d\n", irq);
++// printk(KERN_DEBUG "locomospi: IRQ: %d\n", irq);
++ wake_up_interruptible(&dev->waitqueue);
++ return IRQ_HANDLED;
++}
++*/
++static irqreturn_t locomospi_testisr(int irq, void *dev_id)
++{
++ char *buf="";
++ switch(irq){
++ case IRQ_LOCOMO_SPI_RFR: buf="RFR";
++ break;
++ case IRQ_LOCOMO_SPI_RFW: buf="RFW";
++ break;
++ case IRQ_LOCOMO_SPI_REND:buf="REND";
++ break;
++ case IRQ_LOCOMO_SPI_TEND:buf="TEND";
++ break;
++ case IRQ_LOCOMO_CARDDETECT:
++ buf="CARD_DETECT";
++ break;
++ default: return IRQ_NONE;
++ }
++ printk(KERN_DEBUG "locomospi: IRQ: %s\n",buf);
++// dev_dbg(&spidev->sdev->dev, "IRQ: %s\n",buf);
++ return IRQ_HANDLED;
++}
++static irqreturn_t locomospi_txrxisr(int irq, void *dev_id)
++{
++ if(transfercount < transfersize){
++ transrxbuf[transfercount++] = ioread8(spidev->base+LOCOMO_SPIRD);
++ iowrite8(transtxbuf[transfercount], spidev->base+LOCOMO_SPITD);
++ }
++ else{
++ /* transfer complete. wake up txrx */
++ wake_up(&transferqueue);
++ }
++ return IRQ_HANDLED;
++}
++
++static irqreturn_t locomospi_txisr(int irq, void *dev_id)
++{
++ if(transfercount < transfersize){
++ iowrite8(transtxbuf[transfercount++], spidev->base+LOCOMO_SPITD);
++ }
++ else{
++ /* transfer complete. wake up txrx */
++ wake_up(&transferqueue);
++ }
++ return IRQ_HANDLED;
++}
++
++static irqreturn_t locomospi_rxisr(int irq, void *dev_id)
++{
++ if(transfercount < transfersize){
++ transrxbuf[transfercount++] = ioread8(spidev->base+LOCOMO_SPIRD);
++ }
++ else{
++ /* transfer complete. wake up txrx */
++ wake_up(&transferqueue);
++ }
++ return IRQ_HANDLED;
++}
++
++static void locomospi_clock(unsigned int Hz)
++{
++ u16 r;
++ printk(KERN_DEBUG "locomospi: changing clock to: %d\n", Hz);
++ if(Hz == 0){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r &= ~LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ }
++ else if(Hz >= 24576000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_1, CLOCK_25MHZ);
++ delay=41;
++ }
++ else if(Hz >= 22579200){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_1, CLOCK_22MHZ);
++ delay=45;
++ }
++ else if(Hz >= 18432000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_1, CLOCK_18MHZ);
++ delay=55;
++ }
++ else if(Hz >= 12288000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_2, CLOCK_25MHZ);
++ delay=82;
++ }
++ else if(Hz >= 11289600){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_2, CLOCK_22MHZ);
++ delay=89;
++ }
++ else if(Hz >= 9216000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_2, CLOCK_18MHZ);
++ delay=110;
++ }
++ else if(Hz >= 6144000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_4, CLOCK_25MHZ);
++ delay=164;
++ }
++ else if(Hz >= 5644800){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_4, CLOCK_22MHZ);
++ delay=178;
++ }
++ else if(Hz >= 4608000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_4, CLOCK_18MHZ);
++ delay=218;
++ }
++ else if(Hz >= 3072000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_8, CLOCK_25MHZ);
++ delay=327;
++ }
++ else if(Hz >= 2822400){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_8, CLOCK_22MHZ);
++ delay=355;
++ }
++ else if(Hz >= 2304000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_8, CLOCK_18MHZ);
++ delay=435;
++ }
++ else if(Hz >= 384000){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_64, CLOCK_25MHZ);
++ delay=2605;
++ }
++ else if(Hz >= 352800){
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_64, CLOCK_22MHZ);
++ delay=2834;
++ }
++ else{ /* set to 288 KHz */
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_XON;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ locomospi_setclock(DIV_64, CLOCK_18MHZ);
++ delay=3473;
++ }
++ spidev->clock = Hz;
++}
++
++/* sysfs attributes used for debug *******************************************/
++
++/* SPI registers */
++ssize_t locomospi_showspimd(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPIMD));
++}
++
++ssize_t locomospi_storespimd(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPIMD);
++ return count;
++}
++static DRIVER_ATTR(spimd, S_IWUSR | S_IRUGO, locomospi_showspimd, locomospi_storespimd);
++
++ssize_t locomospi_showspict(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPICT));
++}
++
++ssize_t locomospi_storespict(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPICT);
++ return count;
++}
++static DRIVER_ATTR(spict, S_IWUSR | S_IRUGO, locomospi_showspict, locomospi_storespict);
++
++ssize_t locomospi_showspist(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPIST));
++}
++
++ssize_t locomospi_storespist(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPIST);
++ return count;
++}
++static DRIVER_ATTR(spist, S_IWUSR | S_IRUGO, locomospi_showspist, locomospi_storespist);
++
++ssize_t locomospi_showspitd(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPITD));
++}
++
++ssize_t locomospi_storespitd(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPITD);
++ return count;
++}
++static DRIVER_ATTR(spitd, S_IWUSR | S_IRUGO, locomospi_showspitd, locomospi_storespitd);
++
++ssize_t locomospi_showspird(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPIRD));
++}
++
++ssize_t locomospi_storespird(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPIRD);
++ return count;
++}
++static DRIVER_ATTR(spird, S_IWUSR | S_IRUGO, locomospi_showspird, locomospi_storespird);
++
++ssize_t locomospi_showspits(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPITS));
++}
++
++ssize_t locomospi_storespits(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPITS);
++ return count;
++}
++static DRIVER_ATTR(spits, S_IWUSR | S_IRUGO, locomospi_showspits, locomospi_storespits);
++
++ssize_t locomospi_showspirs(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "0x%x\n", ioread16(spidev->base+LOCOMO_SPIRS));
++}
++
++ssize_t locomospi_storespirs(struct device_driver *drv, const char *buf, size_t count)
++{
++ iowrite16(simple_strtoul(buf, NULL, 16), spidev->base+LOCOMO_SPIRS);
++ return count;
++}
++static DRIVER_ATTR(spirs, S_IWUSR | S_IRUGO, locomospi_showspirs, locomospi_storespirs);
++
++/* MMC Card status */
++
++ssize_t locomospi_showpower(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "%d\n", spidev->card_power);
++}
++
++ssize_t locomospi_storepower(struct device_driver *drv, const char *buf, size_t count)
++{
++ locomospi_power(simple_strtoul(buf, NULL, 10));
++ return count;
++}
++static DRIVER_ATTR(cardpower, S_IWUSR | S_IRUGO, locomospi_showpower, locomospi_storepower);
++
++ssize_t locomospi_detectcard(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "%d\n",(locomo_gpio_read_level(spidev->ldev->dev.parent,LOCOMO_GPIO_CARD_DETECT)>0)?0:1);
++}
++static DRIVER_ATTR(carddetect, S_IRUGO, locomospi_detectcard, NULL);
++
++ssize_t locomospi_writeprotect(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "%d\n",(locomo_gpio_read_level(spidev->ldev->dev.parent,LOCOMO_GPIO_WRITE_PROT)>0)?1:0);
++}
++static DRIVER_ATTR(cardwriteprotect, S_IRUGO, locomospi_writeprotect, NULL);
++
++
++ssize_t locomospi_showclock(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "%d\n", spidev->clock);
++}
++
++ssize_t locomospi_storeclock(struct device_driver *drv, const char *buf, size_t count)
++{
++ locomospi_clock(simple_strtoul(buf, NULL, 10));
++ return count;
++}
++static DRIVER_ATTR(clock, S_IWUSR | S_IRUGO, locomospi_showclock, locomospi_storeclock);
++
++/* debug */
++ssize_t locomospi_showdelay(struct device_driver *drv, char *buf)
++{
++ return sprintf(buf, "%d\n", delay);
++}
++
++ssize_t locomospi_storedelay(struct device_driver *drv, const char *buf, size_t count)
++{
++ delay=simple_strtoul(buf,NULL,10);
++ return count;
++}
++static DRIVER_ATTR(delay, S_IWUSR | S_IRUGO, locomospi_showdelay, locomospi_storedelay);
++
++ssize_t locomospi_reset(struct device_driver *drv, const char *buf, size_t count)
++{
++ int choice = simple_strtoul(buf, NULL, 10);
++ char buff[100];
++ u16 r;
++ switch(choice){
++ case 0: locomospi_reg_release();
++ schedule_timeout(2*HZ);
++ locomospi_reg_open();
++ break;
++ case 1: {
++ char b1[] = "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
++ char b2[] = "\xff\x40\x00\x00\x00\x00\x95\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff";
++ locomospi_setcs(1);
++ txrx(b1,b1,17);
++ locomospi_setcs(0);
++ txrx(b2,b2,18);
++
++ }
++ break;
++ case 2: locomospi_setcs(1);
++ txrx("\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff",buff,18);
++ locomospi_setcs(0);
++ txrx("\xff\x40\x00\x00\x00\x00\x95\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff",buff,17);
++ break;
++ case 3:
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r |= LOCOMO_SPI_LOOPBACK;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ txrx("X",buff,1);
++ txrx("abcdefghijklmnopqrstuvwxyz1234567890",buff,36);
++ txrx("Y",buff,1);
++ udelay(100);
++ txrx("Z",buff,1);
++ schedule_timeout(HZ);
++ txrx("abcdefghijklmnopqrstuvwxyz1234567890",buff,36);
++
++ r = ioread16(spidev->base+LOCOMO_SPIMD);
++ r &= ~LOCOMO_SPI_LOOPBACK;
++ iowrite16(r, spidev->base+LOCOMO_SPIMD);
++ break;
++ default: /* do nothing */;
++ }
++ return count;
++}
++static DRIVER_ATTR(reset, S_IWUSR, NULL, locomospi_reset);
++
++typedef struct locomo_reg_entry {
++ u32 addr;
++ char* name;
++} locomo_reg_entry_t;
++#define LCM (sizeof(locomo_regs)/sizeof(locomo_reg_entry_t))
++static locomo_reg_entry_t locomo_regs[] =
++{
++/* { addr, name, description } */
++ { 0x00, "VER" },
++ { 0x04, "ST" },
++ { 0x08, "C32K" },
++ { 0x0C, "ICR" },
++ { 0x10, "MCSX0" },
++ { 0x14, "MCSX1" },
++ { 0x18, "MCSX2" },
++ { 0x1C, "MCSX3" },
++ { 0x20, "ASD" },
++ { 0x28, "HSD" },
++ { 0x2C, "HSC" },
++ { 0x30, "TADC" },
++ { 0x38, "TC" },
++ { 0x3C, "CPSD" },
++ { 0x40, "KIB" },
++ { 0x44, "KSC" },
++ { 0x48, "KCMD" },
++ { 0x4C, "KIC" },
++ { 0x54, "ACC" },
++ { 0x60, "SPIMD" },
++ { 0x64, "SPICT" },
++ { 0x68, "SPIST" },
++ { 0x70, "SPIIS" },
++ { 0x74, "SPIWE" },
++ { 0x78, "SPIIE" },
++ { 0x7C, "SPIIR" },
++ { 0x80, "SPITD" },
++ { 0x84, "SPIRD" },
++ { 0x88, "SPITS" },
++ { 0x8C, "SPIRS" },
++ { 0x90, "GPD" },
++ { 0x94, "GPE" },
++ { 0x98, "GPL" },
++ { 0x9C, "GPO" },
++ { 0xa0, "GRIE" },
++ { 0xa4, "GFIE" },
++ { 0xa8, "GIS" },
++ { 0xac, "GWE" },
++ { 0xb0, "GIE" },
++ { 0xb4, "GIR" },
++ { 0xc8, "ALC" },
++ { 0xcc, "ALR" },
++ { 0xd0, "PAIF" },
++ { 0xd8, "LTC" },
++ { 0xdc, "LTINT" },
++ { 0xe0, "DAC" },
++ { 0xe8, "LPT0" },
++ { 0xec, "LPT1" },
++ { 0xfc, "TCR" },
++};
++
++static ssize_t lcm_show(struct device *dev, struct device_attribute *attr, char *buf)
++{
++ int base = spidev->base - LOCOMO_SPI;
++ char b[4000]="";
++ char c[30];
++ int i;
++ for(i=0; i<LCM; i++){
++ sprintf(c,"%s:\t\t 0x%x\n",locomo_regs[i].name, ioread16(base + locomo_regs[i].addr));
++ strcat(b,c);
++ }
++ return sprintf(buf,"%s",b);
++}
++
++static DRIVER_ATTR(regs, 0444, lcm_show, NULL);
++
++
++/* SPI functions *************************************************************/
++
++static void locomospi_do_transfer(struct work_struct *wrk)
++{
++ struct list_head *mptr, *tptr, *mptr2;
++ struct spi_transfer *entry;
++ struct spi_message *msg;
++
++ list_for_each_safe(mptr, mptr2, &spidev->message_list){
++ msg = list_entry(mptr, struct spi_message, queue);
++
++ msg->status = 0;
++ msg->actual_length = 0;
++ list_for_each(tptr, &msg->transfers){
++ entry = list_entry(tptr, struct spi_transfer, transfer_list);
++ if(entry->tx_buf && entry->rx_buf){ //duplex
++ txrx((char*) entry->tx_buf, (char*) entry->rx_buf, entry->len);
++ msg->actual_length += entry->len;
++ } else if(entry->tx_buf && !entry->rx_buf){ //write
++ tx((char*) entry->tx_buf, entry->len);
++ msg->actual_length += entry->len;
++ } else if(!entry->tx_buf && entry->rx_buf){ //read
++ rx((char*) entry->rx_buf, entry->len);
++ msg->actual_length += entry->len;
++ } else if(!entry->tx_buf && !entry->rx_buf){ //error
++ dev_err(&spidev->sdev->dev, "do_transfer: no buffers allocated\n");
++ msg->status = -EFAULT;
++ }
++ }
++ spin_lock(&spidev->message_lock);
++ list_del(mptr);
++ spin_unlock(&spidev->message_lock);
++ msg->complete(msg->context);
++ }
++}
++
++static int locomospi_setup(struct spi_device *spi)
++{
++ if((spi->mode & SPI_CS_HIGH) != (spidev->spimode & SPI_CS_HIGH))
++ locomospi_setcs(spi->mode & SPI_CS_HIGH ? 1 : 0 );
++ if(spidev->clock != spi->max_speed_hz){
++ locomospi_clock(spi->max_speed_hz);
++ }
++ spidev->spimode = spi->mode;
++
++ return 0;
++}
++
++static int locomospi_transfer(struct spi_device *spi, struct spi_message *msg)
++{
++
++ spin_lock(&spidev->message_lock);
++ list_add_tail(&msg->queue, &spidev->message_list);
++ spin_unlock(&spidev->message_lock);
++ schedule_work(&transfer_wq);
++ return 0;
++}
++
++static struct locomo_driver locomo_spi_driver = {
++ .drv = {
++ .name = "locomo-spi",
++ },
++ .devid = LOCOMO_DEVID_SPI,
++ .probe = locomospi_probe,
++ .remove = locomospi_remove,
++#ifdef CONFIG_PM
++ .suspend = locomospi_suspend,
++ .resume = locomospi_resume,
++#endif
++};
++
++static struct spi_board_info board = {
++ .modalias = "mmc_spi",
++ .platform_data = (void*) &colliemmc,
++ .controller_data= NULL,
++ .irq = 0,
++ .max_speed_hz = 25000000,
++ .bus_num = 0,
++ .chip_select = 0,
++ .mode = 0,
++};
++
++#ifdef CONFIG_PM
++static int locomospi_suspend(struct locomo_dev *dev, pm_message_t state)
++{
++ disable_irq(IRQ_LOCOMO_CARDDETECT);
++ return 0;
++}
++
++static int locomospi_resume(struct locomo_dev *dev)
++{
++ enable_irq(IRQ_LOCOMO_CARDDETECT);
++ return 0;
++}
++#endif
++
++static int locomospi_probe(struct locomo_dev *dev)
++{
++ int result=0;
++ printk(KERN_DEBUG "Collie MMC over SPI Driver\n");
++ spidev=kmalloc(sizeof(struct locomospi_dev),GFP_KERNEL);
++ if(!spidev){
++ return -ENOMEM;
++ }
++ spidev->ldev = dev;
++ spidev->card_power = 1;
++ spidev->spimode = 0;
++
++ if(!request_mem_region((unsigned long) dev->mapbase, dev->length, LOCOMO_DRIVER_NAME(dev))) {
++ dev_err(&dev->dev, " Can't aquire access to io memory\n");
++ return -EBUSY;
++ }
++ spidev->base=(unsigned long) dev->mapbase;
++ locomospi_reg_open();
++
++ locomo_gpio_set_dir(dev->dev.parent, LOCOMO_GPIO_CARD_POWER, 0);
++ locomo_gpio_set_dir(dev->dev.parent, LOCOMO_GPIO_CARD_DETECT, 1);
++ locomo_gpio_set_dir(dev->dev.parent, LOCOMO_GPIO_WRITE_PROT, 1);
++
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_cardpower);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_carddetect);
++ if(result){
++ dev_err(&dev->dev,"error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_cardwriteprotect);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spimd);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spict);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spist);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spitd);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spird);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spits);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_spirs);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_clock);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_delay);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_reset);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ result=driver_create_file(&locomo_spi_driver.drv, &driver_attr_regs);
++ if(result){
++ dev_err(&dev->dev, "error creating driver attribute\n");
++ goto region;
++ }
++ INIT_WORK(&transfer_wq, locomospi_do_transfer);
++ INIT_LIST_HEAD(&spidev->message_list);
++ spin_lock_init(&spidev->message_lock);
++ init_waitqueue_head(&spidev->waitqueue);
++ spidev->master=spi_alloc_master(&dev->dev,0);
++ if(!spidev->master){
++ result=-ENOMEM;
++ goto region;
++ }
++ spidev->master->bus_num = 0;
++ spidev->master->num_chipselect = 1;
++ spidev->master->setup = locomospi_setup;
++ spidev->master->transfer = locomospi_transfer;
++ spidev->sdev = spi_new_device(spidev->master, &board);
++ if(!spidev->sdev){
++ dev_err(&dev->dev, "failed to register spi device\n");
++ result = -EINVAL;
++ goto master;
++ }
++/* result=request_irq(IRQ_LOCOMO_SPI_RFR, locomospi_testisr, IRQF_SHARED, "locomo-spi", (void*) spidev);
++ if(result) {
++ dev_err(&dev->dev, "Could not get IRQ: RFR\n");
++ goto regdev;
++ }
++ //disable_irq(IRQ_LOCOMO_SPI_RFR);
++*//* result=request_irq(IRQ_LOCOMO_SPI_RFW, locomospi_testisr, IRQF_SHARED, "locomo-spi", (void*) spidev);
++ if(result) {
++ dev_err(&dev->dev, "Could not get IRQ: RFW\n");
++ goto irq1;
++ }
++ //disable_irq(IRQ_LOCOMO_SPI_RFW);
++*//* result=request_irq(IRQ_LOCOMO_SPI_REND, locomospi_testisr, IRQF_SHARED, "locomo-spi", (void*) spidev);
++ if(result) {
++ dev_err(&dev->dev, "Could not get IRQ: REND\n");
++ goto irq2;
++ }
++*//* result=request_irq(IRQ_LOCOMO_SPI_TEND, locomospi_testisr, IRQF_SHARED, "locomo-spi", (void*) spidev);
++ if(result) {
++ dev_err(&dev->dev, "Could not get IRQ: TEND\n");
++ goto irq3;
++ }
++ //disable_irq(IRQ_LOCOMO_SPI_TEND);
++*/ spidev->workqueue = create_singlethread_workqueue("locomo-spi");
++ if(!spidev->workqueue){
++ dev_err(&dev->dev, "failed to create workqueue\n");
++ goto irq4;
++ }
++ result=spi_register_master(spidev->master);
++ if(result){
++ dev_err(&dev->dev, "failed to register spimaster\n");
++ goto wq;
++ }
++ return 0;
++wq:
++ destroy_workqueue(spidev->workqueue);
++irq4:
++// free_irq(IRQ_LOCOMO_SPI_TEND, (void*) spidev);
++irq3:
++// free_irq(IRQ_LOCOMO_SPI_REND, (void*) spidev);
++irq2:
++// free_irq(IRQ_LOCOMO_SPI_RFW, (void*) spidev);
++irq1:
++// free_irq(IRQ_LOCOMO_SPI_RFR, (void*) spidev);
++regdev:
++ spi_unregister_device(spidev->sdev);
++master:
++ spi_master_put(spidev->master);
++region:
++ release_mem_region((unsigned long) dev->mapbase, dev->length);
++ kfree(spidev);
++ return result;
++
++}
++
++static int locomospi_remove(struct locomo_dev *dev)
++{
++ spi_unregister_device(spidev->sdev);
++ spi_unregister_master(spidev->master);
++ destroy_workqueue(spidev->workqueue);
++ locomospi_reg_release();
++// free_irq(IRQ_LOCOMO_SPI_TEND, (void*) spidev);
++// free_irq(IRQ_LOCOMO_SPI_REND, (void*) spidev);
++// free_irq(IRQ_LOCOMO_SPI_RFW, (void*) spidev);
++// free_irq(IRQ_LOCOMO_SPI_RFR, (void*) spidev);
++ spi_master_put(spidev->master);
++ release_mem_region((unsigned long) dev->mapbase, dev->length);
++ kfree(spidev);
++ return 0;
++}
++
++
++
++static int __init locomospi_init(void)
++{
++ int ret = locomo_driver_register(&locomo_spi_driver);
++ if (ret)
++ return ret;
++
++
++ return 0;
++}
++
++static void __exit locomospi_exit(void)
++{
++ locomo_driver_unregister(&locomo_spi_driver);
++}
++
++module_init(locomospi_init);
++module_exit(locomospi_exit);
++
++MODULE_AUTHOR("Thomas Kunze thommy@tabao.de");
++MODULE_DESCRIPTION("Collie mmc driver");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/spi/locomo_spi.h b/drivers/spi/locomo_spi.h
+new file mode 100644
+index 0000000..7e1c0ce
+--- /dev/null
++++ b/drivers/spi/locomo_spi.h
+@@ -0,0 +1,75 @@
++#include <asm/hardware/locomo.h>
++#ifndef __LOCOMO_SPI_H__
++#define __LOCOMO_SPI_H__
++
++/* locomo-spi status register LOCOMO_SPIST */
++#define LOCOMO_SPI_TEND (1 << 3) /* Transfer end bit */
++#define LOCOMO_SPI_REND (1 << 2) /* Receive end bit */
++#define LOCOMO_SPI_RFW (1 << 1) /* write buffer bit */
++#define LOCOMO_SPI_RFR (1) /* read buffer bit */
++
++/* locomo-spi mode register LOCOMO_SPIMD */
++#define LOCOMO_SPI_LOOPBACK (1 << 15) /* loopback tx to rx */
++#define LOCOMO_SPI_MSB1ST (1 << 14) /* send MSB first */
++#define LOCOMO_SPI_DOSTAT (1 << 13) /* transmit line is idle high */
++#define LOCOMO_SPI_TCPOL (1 << 11) /* transmit CPOL (maybe affects CPHA too) */
++#define LOCOMO_SPI_RCPOL (1 << 10) /* receive CPOL (maybe affects CPHA too) */
++#define LOCOMO_SPI_TDINV (1 << 9) /* invert transmit line */
++#define LOCOMO_SPI_RDINV (1 << 8) /* invert receive line */
++#define LOCOMO_SPI_XON (1 << 7) /* enable spi controller clock */
++#define LOCOMO_SPI_XEN (1 << 6) /* clock bit write enable xon must be off, wait 300 us before xon->1 */
++#define LOCOMO_SPI_XSEL 0x0018 /* clock select */
++#define CLOCK_18MHZ 0 /* 18,432 MHz clock */
++#define CLOCK_22MHZ 1 /* 22,5792 MHz clock */
++#define CLOCK_25MHZ 2 /* 24,576 MHz clock */
++#define LOCOMO_SPI_CLKSEL 0x7
++#define DIV_1 0 /* don't divide clock */
++#define DIV_2 1 /* divide clock by two */
++#define DIV_4 2 /* divide clock by four */
++#define DIV_8 3 /* divide clock by eight*/
++#define DIV_64 4 /* divide clock by 64 */
++
++/* locomo-spi control register LOCOMO_SPICT */
++#define LOCOMO_SPI_CRC16_7_B (1 << 15) /* 0: crc16 1: crc7 */
++#define LOCOMO_SPI_CRCRX_TX_B (1 << 14)
++#define LOCOMO_SPI_CRCRESET_B (1 << 13)
++#define LOCOMO_SPI_CEN (1 << 7) /* ?? enable */
++#define LOCOMO_SPI_CS (1 << 6) /* chip select */
++#define LOCOMO_SPI_UNIT16 (1 << 5) /* 0: 8 bit units, 1: 16 bit unit */
++#define LOCOMO_SPI_ALIGNEN (1 << 2) /* align transfer enable */
++#define LOCOMO_SPI_RXWEN (1 << 1) /* continous receive */
++#define LOCOMO_SPI_RXUEN (1 << 0) /* aligned receive */
++
++#define IRQ_LOCOMO_CARDDETECT IRQ_LOCOMO_GPIO13
++
++
++struct locomospi_dev {
++ struct locomo_dev *ldev;
++ struct spi_master *master;
++ struct spi_device *sdev;
++ int card_power;
++ int clock_base;
++ int clock_div;
++ int clock;
++ unsigned long base;
++ u8 spimode;
++ wait_queue_head_t waitqueue;
++ struct workqueue_struct *workqueue;
++ struct list_head message_list;
++ spinlock_t message_lock;
++};
++
++
++static irqreturn_t locomospi_cardisr(int, void*);
++static int locomospi_probe(struct locomo_dev*);
++static int locomospi_remove(struct locomo_dev*);
++static int locomospi_carddetect(void);
++static void locomospi_reg_open(void);
++static void locomospi_reg_release(void);
++static int tx(const char*, int);
++static int rx(char *, int);
++static void locomospi_power(int on);
++static int locomospi_suspend(struct locomo_dev *dev, pm_message_t state);
++static int locomospi_resume(struct locomo_dev *dev);
++static void locomospi_setcs(int high);
++#endif
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0002-collie-fix-scoop-convesion-to-new-api.patch b/recipes/linux/linux-2.6.31/collie/0002-collie-fix-scoop-convesion-to-new-api.patch
new file mode 100644
index 0000000000..43b4afc4c6
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0002-collie-fix-scoop-convesion-to-new-api.patch
@@ -0,0 +1,24 @@
+From 9f36d9ef134f8e5113db06986409dda33170661a Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Tue, 28 Oct 2008 21:41:39 +0300
+Subject: [PATCH 02/15] collie: fix scoop convesion to new api
+
+---
+ arch/arm/mach-sa1100/collie.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
+index bbf2ebc..b629cba 100644
+--- a/arch/arm/mach-sa1100/collie.c
++++ b/arch/arm/mach-sa1100/collie.c
+@@ -56,6 +56,7 @@ static struct resource collie_scoop_resources[] = {
+ static struct scoop_config collie_scoop_setup = {
+ .io_dir = COLLIE_SCOOP_IO_DIR,
+ .io_out = COLLIE_SCOOP_IO_OUT,
++ .gpio_base = COLLIE_SCOOP_GPIO_BASE,
+ };
+
+ struct platform_device colliescoop_device = {
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0003-collie-prepare-for-gpiolib-use.patch b/recipes/linux/linux-2.6.31/collie/0003-collie-prepare-for-gpiolib-use.patch
new file mode 100644
index 0000000000..e45deb4215
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0003-collie-prepare-for-gpiolib-use.patch
@@ -0,0 +1,104 @@
+From 5feab05c7a53cd784cb85bbc6105fa6ac26d93a7 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Mon, 5 Oct 2009 22:05:38 +0200
+Subject: [PATCH 03/15] collie: prepare for gpiolib use
+
+prefix gpio definitions for direct register access with '_' so we
+can use the other names for gpio_request & co
+---
+ arch/arm/mach-sa1100/collie.c | 12 ++++---
+ arch/arm/mach-sa1100/include/mach/collie.h | 42 +++++++++++++++++----------
+ 2 files changed, 33 insertions(+), 21 deletions(-)
+
+diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
+index b629cba..9f5029c 100644
+--- a/arch/arm/mach-sa1100/collie.c
++++ b/arch/arm/mach-sa1100/collie.c
+@@ -249,22 +249,24 @@ static void __init collie_init(void)
+ GPDR = GPIO_LDD8 | GPIO_LDD9 | GPIO_LDD10 | GPIO_LDD11 | GPIO_LDD12 |
+ GPIO_LDD13 | GPIO_LDD14 | GPIO_LDD15 | GPIO_SSP_TXD |
+ GPIO_SSP_SCLK | GPIO_SSP_SFRM | GPIO_SDLC_SCLK |
+- COLLIE_GPIO_UCB1x00_RESET | COLLIE_GPIO_nMIC_ON |
+- COLLIE_GPIO_nREMOCON_ON | GPIO_32_768kHz;
++ _COLLIE_GPIO_UCB1x00_RESET | _COLLIE_GPIO_nMIC_ON |
++ _COLLIE_GPIO_nREMOCON_ON | GPIO_32_768kHz;
+
+ PPDR = PPC_LDD0 | PPC_LDD1 | PPC_LDD2 | PPC_LDD3 | PPC_LDD4 | PPC_LDD5 |
+ PPC_LDD6 | PPC_LDD7 | PPC_L_PCLK | PPC_L_LCLK | PPC_L_FCLK | PPC_L_BIAS |
+ PPC_TXD1 | PPC_TXD2 | PPC_TXD3 | PPC_TXD4 | PPC_SCLK | PPC_SFRM;
+
+- PWER = COLLIE_GPIO_AC_IN | COLLIE_GPIO_CO | COLLIE_GPIO_ON_KEY |
+- COLLIE_GPIO_WAKEUP | COLLIE_GPIO_nREMOCON_INT | PWER_RTC;
++ PWER = _COLLIE_GPIO_AC_IN | _COLLIE_GPIO_CO | _COLLIE_GPIO_ON_KEY |
++ _COLLIE_GPIO_WAKEUP | _COLLIE_GPIO_nREMOCON_INT | PWER_RTC;
+
+- PGSR = COLLIE_GPIO_nREMOCON_ON;
++ PGSR = _COLLIE_GPIO_nREMOCON_ON;
+
+ PSDR = PPC_RXD1 | PPC_RXD2 | PPC_RXD3 | PPC_RXD4;
+
+ PCFR = PCFR_OPDE;
+
++ GPSR |= _COLLIE_GPIO_UCB1x00_RESET;
++
+
+ platform_scoop_config = &collie_pcmcia_config;
+
+diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h
+index 9efb569..8c8fe46 100644
+--- a/arch/arm/mach-sa1100/include/mach/collie.h
++++ b/arch/arm/mach-sa1100/include/mach/collie.h
+@@ -30,24 +30,34 @@
+ COLLIE_SCP_LB_VOL_CHG )
+ #define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R )
+
+-/* GPIOs for which the generic definition doesn't say much */
++/* GPIOs for gpiolib */
+
+-#define COLLIE_GPIO_ON_KEY GPIO_GPIO (0)
+-#define COLLIE_GPIO_AC_IN GPIO_GPIO (1)
+-#define COLLIE_GPIO_SDIO_INT GPIO_GPIO (11)
+-#define COLLIE_GPIO_CF_IRQ GPIO_GPIO (14)
+-#define COLLIE_GPIO_nREMOCON_INT GPIO_GPIO (15)
+-#define COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO (16)
+-#define COLLIE_GPIO_nMIC_ON GPIO_GPIO (17)
+-#define COLLIE_GPIO_nREMOCON_ON GPIO_GPIO (18)
+-#define COLLIE_GPIO_CO GPIO_GPIO (20)
+-#define COLLIE_GPIO_MCP_CLK GPIO_GPIO (21)
+-#define COLLIE_GPIO_CF_CD GPIO_GPIO (22)
+-#define COLLIE_GPIO_UCB1x00_IRQ GPIO_GPIO (23)
+-#define COLLIE_GPIO_WAKEUP GPIO_GPIO (24)
+-#define COLLIE_GPIO_GA_INT GPIO_GPIO (25)
+-#define COLLIE_GPIO_MAIN_BAT_LOW GPIO_GPIO (26)
++#define COLLIE_GPIO_ON_KEY (0)
++#define COLLIE_GPIO_AC_IN (1)
++#define COLLIE_GPIO_SDIO_INT (11)
++#define COLLIE_GPIO_CF_IRQ (14)
++#define COLLIE_GPIO_nREMOCON_INT (15)
++#define COLLIE_GPIO_UCB1x00_RESET (16)
++#define COLLIE_GPIO_nMIC_ON (17)
++#define COLLIE_GPIO_nREMOCON_ON (18)
++#define COLLIE_GPIO_CO (20)
++#define COLLIE_GPIO_MCP_CLK (21)
++#define COLLIE_GPIO_CF_CD (22)
++#define COLLIE_GPIO_UCB1x00_IRQ (23)
++#define COLLIE_GPIO_WAKEUP (24)
++#define COLLIE_GPIO_GA_INT (25)
++#define COLLIE_GPIO_MAIN_BAT_LOW (26)
+
++/* GPIO definitions for direct register access */
++
++#define _COLLIE_GPIO_ON_KEY GPIO_GPIO(0)
++#define _COLLIE_GPIO_AC_IN GPIO_GPIO(1)
++#define _COLLIE_GPIO_nREMOCON_INT GPIO_GPIO(15)
++#define _COLLIE_GPIO_UCB1x00_RESET GPIO_GPIO(16)
++#define _COLLIE_GPIO_nMIC_ON GPIO_GPIO(17)
++#define _COLLIE_GPIO_nREMOCON_ON GPIO_GPIO(18)
++#define _COLLIE_GPIO_CO GPIO_GPIO(20)
++#define _COLLIE_GPIO_WAKEUP GPIO_GPIO(24)
+ /* Interrupts */
+
+ #define COLLIE_IRQ_GPIO_ON_KEY IRQ_GPIO0
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0004-fix-dma-for-SA1100.patch b/recipes/linux/linux-2.6.31/collie/0004-fix-dma-for-SA1100.patch
new file mode 100644
index 0000000000..6dbb856189
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0004-fix-dma-for-SA1100.patch
@@ -0,0 +1,25 @@
+From 4f4df9e1c0c82cfd9133f52089025a8ff363977c Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Mon, 20 Oct 2008 17:39:02 +0200
+Subject: [PATCH 04/23] fix dma for SA1100
+
+---
+ arch/arm/mach-sa1100/dma.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c
+index f990a3e..1489d64 100644
+--- a/arch/arm/mach-sa1100/dma.c
++++ b/arch/arm/mach-sa1100/dma.c
+@@ -39,7 +39,7 @@ typedef struct {
+
+ static sa1100_dma_t dma_chan[SA1100_DMA_CHANNELS];
+
+-static spinlock_t dma_list_lock;
++static DEFINE_SPINLOCK(dma_list_lock);
+
+
+ static irqreturn_t dma_irq_handler(int irq, void *dev_id)
+--
+1.5.6.5
+
diff --git a/recipes/linux/linux-2.6.31/collie/0004-move-drivers-mfd-.h-to-include-linux-mfd.patch b/recipes/linux/linux-2.6.31/collie/0004-move-drivers-mfd-.h-to-include-linux-mfd.patch
new file mode 100644
index 0000000000..06702d129c
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0004-move-drivers-mfd-.h-to-include-linux-mfd.patch
@@ -0,0 +1,782 @@
+From 0b7715e9e13c19249fab4069a9243e51daa4edc6 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Tue, 10 Feb 2009 14:54:57 +0100
+Subject: [PATCH 04/15] move drivers/mfd/*.h to include/linux/mfd
+
+So drivers like collie_battery driver can use
+those files easier.
+---
+ drivers/mfd/mcp-core.c | 2 +-
+ drivers/mfd/mcp-sa11x0.c | 2 +-
+ drivers/mfd/mcp.h | 66 -----------
+ drivers/mfd/ucb1x00-assabet.c | 2 +-
+ drivers/mfd/ucb1x00-core.c | 2 +-
+ drivers/mfd/ucb1x00-ts.c | 2 +-
+ drivers/mfd/ucb1x00.h | 255 -----------------------------------------
+ include/linux/mfd/mcp.h | 68 +++++++++++
+ include/linux/mfd/ucb1x00.h | 255 +++++++++++++++++++++++++++++++++++++++++
+ 9 files changed, 328 insertions(+), 326 deletions(-)
+ delete mode 100644 drivers/mfd/mcp.h
+ delete mode 100644 drivers/mfd/ucb1x00.h
+ create mode 100644 include/linux/mfd/mcp.h
+ create mode 100644 include/linux/mfd/ucb1x00.h
+
+diff --git a/drivers/mfd/mcp-core.c b/drivers/mfd/mcp-core.c
+index 57271cb..84815f9 100644
+--- a/drivers/mfd/mcp-core.c
++++ b/drivers/mfd/mcp-core.c
+@@ -17,11 +17,11 @@
+ #include <linux/device.h>
+ #include <linux/slab.h>
+ #include <linux/string.h>
++#include <linux/mfd/mcp.h>
+
+ #include <mach/dma.h>
+ #include <asm/system.h>
+
+-#include "mcp.h"
+
+ #define to_mcp(d) container_of(d, struct mcp, attached_device)
+ #define to_mcp_driver(d) container_of(d, struct mcp_driver, drv)
+diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
+index 62b32da..2121898 100644
+--- a/drivers/mfd/mcp-sa11x0.c
++++ b/drivers/mfd/mcp-sa11x0.c
+@@ -19,6 +19,7 @@
+ #include <linux/spinlock.h>
+ #include <linux/slab.h>
+ #include <linux/platform_device.h>
++#include <linux/mfd/mcp.h>
+
+ #include <mach/dma.h>
+ #include <mach/hardware.h>
+@@ -28,7 +29,6 @@
+
+ #include <mach/assabet.h>
+
+-#include "mcp.h"
+
+ struct mcp_sa11x0 {
+ u32 mccr0;
+diff --git a/drivers/mfd/mcp.h b/drivers/mfd/mcp.h
+deleted file mode 100644
+index c093a93..0000000
+--- a/drivers/mfd/mcp.h
++++ /dev/null
+@@ -1,66 +0,0 @@
+-/*
+- * linux/drivers/mfd/mcp.h
+- *
+- * Copyright (C) 2001 Russell King, 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.
+- */
+-#ifndef MCP_H
+-#define MCP_H
+-
+-struct mcp_ops;
+-
+-struct mcp {
+- struct module *owner;
+- struct mcp_ops *ops;
+- spinlock_t lock;
+- int use_count;
+- unsigned int sclk_rate;
+- unsigned int rw_timeout;
+- dma_device_t dma_audio_rd;
+- dma_device_t dma_audio_wr;
+- dma_device_t dma_telco_rd;
+- dma_device_t dma_telco_wr;
+- struct device attached_device;
+-};
+-
+-struct mcp_ops {
+- void (*set_telecom_divisor)(struct mcp *, unsigned int);
+- void (*set_audio_divisor)(struct mcp *, unsigned int);
+- void (*reg_write)(struct mcp *, unsigned int, unsigned int);
+- unsigned int (*reg_read)(struct mcp *, unsigned int);
+- void (*enable)(struct mcp *);
+- void (*disable)(struct mcp *);
+-};
+-
+-void mcp_set_telecom_divisor(struct mcp *, unsigned int);
+-void mcp_set_audio_divisor(struct mcp *, unsigned int);
+-void mcp_reg_write(struct mcp *, unsigned int, unsigned int);
+-unsigned int mcp_reg_read(struct mcp *, unsigned int);
+-void mcp_enable(struct mcp *);
+-void mcp_disable(struct mcp *);
+-#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate)
+-
+-struct mcp *mcp_host_alloc(struct device *, size_t);
+-int mcp_host_register(struct mcp *);
+-void mcp_host_unregister(struct mcp *);
+-
+-struct mcp_driver {
+- struct device_driver drv;
+- int (*probe)(struct mcp *);
+- void (*remove)(struct mcp *);
+- int (*suspend)(struct mcp *, pm_message_t);
+- int (*resume)(struct mcp *);
+-};
+-
+-int mcp_driver_register(struct mcp_driver *);
+-void mcp_driver_unregister(struct mcp_driver *);
+-
+-#define mcp_get_drvdata(mcp) dev_get_drvdata(&(mcp)->attached_device)
+-#define mcp_set_drvdata(mcp,d) dev_set_drvdata(&(mcp)->attached_device, d)
+-
+-#define mcp_priv(mcp) ((void *)((mcp)+1))
+-
+-#endif
+diff --git a/drivers/mfd/ucb1x00-assabet.c b/drivers/mfd/ucb1x00-assabet.c
+index 86fed48..cea9da6 100644
+--- a/drivers/mfd/ucb1x00-assabet.c
++++ b/drivers/mfd/ucb1x00-assabet.c
+@@ -14,10 +14,10 @@
+ #include <linux/fs.h>
+ #include <linux/proc_fs.h>
+ #include <linux/device.h>
++#include <linux/mfd/ucb1x00.h>
+
+ #include <mach/dma.h>
+
+-#include "ucb1x00.h"
+
+ #define UCB1X00_ATTR(name,input)\
+ static ssize_t name##_show(struct device *dev, struct device_attribute *attr, \
+diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
+index fea9085..61f3933 100644
+--- a/drivers/mfd/ucb1x00-core.c
++++ b/drivers/mfd/ucb1x00-core.c
+@@ -24,11 +24,11 @@
+ #include <linux/interrupt.h>
+ #include <linux/device.h>
+ #include <linux/mutex.h>
++#include <linux/mfd/ucb1x00.h>
+
+ #include <mach/dma.h>
+ #include <mach/hardware.h>
+
+-#include "ucb1x00.h"
+
+ static DEFINE_MUTEX(ucb1x00_mutex);
+ static LIST_HEAD(ucb1x00_drivers);
+diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
+index 61b7d3e..000cb41 100644
+--- a/drivers/mfd/ucb1x00-ts.c
++++ b/drivers/mfd/ucb1x00-ts.c
+@@ -30,12 +30,12 @@
+ #include <linux/freezer.h>
+ #include <linux/slab.h>
+ #include <linux/kthread.h>
++#include <linux/mfd/ucb1x00.h>
+
+ #include <mach/dma.h>
+ #include <mach/collie.h>
+ #include <asm/mach-types.h>
+
+-#include "ucb1x00.h"
+
+
+ struct ucb1x00_ts {
+diff --git a/drivers/mfd/ucb1x00.h b/drivers/mfd/ucb1x00.h
+deleted file mode 100644
+index a8ad8a0..0000000
+--- a/drivers/mfd/ucb1x00.h
++++ /dev/null
+@@ -1,255 +0,0 @@
+-/*
+- * linux/drivers/mfd/ucb1x00.h
+- *
+- * Copyright (C) 2001 Russell King, 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.
+- */
+-#ifndef UCB1200_H
+-#define UCB1200_H
+-
+-#define UCB_IO_DATA 0x00
+-#define UCB_IO_DIR 0x01
+-
+-#define UCB_IO_0 (1 << 0)
+-#define UCB_IO_1 (1 << 1)
+-#define UCB_IO_2 (1 << 2)
+-#define UCB_IO_3 (1 << 3)
+-#define UCB_IO_4 (1 << 4)
+-#define UCB_IO_5 (1 << 5)
+-#define UCB_IO_6 (1 << 6)
+-#define UCB_IO_7 (1 << 7)
+-#define UCB_IO_8 (1 << 8)
+-#define UCB_IO_9 (1 << 9)
+-
+-#define UCB_IE_RIS 0x02
+-#define UCB_IE_FAL 0x03
+-#define UCB_IE_STATUS 0x04
+-#define UCB_IE_CLEAR 0x04
+-#define UCB_IE_ADC (1 << 11)
+-#define UCB_IE_TSPX (1 << 12)
+-#define UCB_IE_TSMX (1 << 13)
+-#define UCB_IE_TCLIP (1 << 14)
+-#define UCB_IE_ACLIP (1 << 15)
+-
+-#define UCB_IRQ_TSPX 12
+-
+-#define UCB_TC_A 0x05
+-#define UCB_TC_A_LOOP (1 << 7) /* UCB1200 */
+-#define UCB_TC_A_AMPL (1 << 7) /* UCB1300 */
+-
+-#define UCB_TC_B 0x06
+-#define UCB_TC_B_VOICE_ENA (1 << 3)
+-#define UCB_TC_B_CLIP (1 << 4)
+-#define UCB_TC_B_ATT (1 << 6)
+-#define UCB_TC_B_SIDE_ENA (1 << 11)
+-#define UCB_TC_B_MUTE (1 << 13)
+-#define UCB_TC_B_IN_ENA (1 << 14)
+-#define UCB_TC_B_OUT_ENA (1 << 15)
+-
+-#define UCB_AC_A 0x07
+-#define UCB_AC_B 0x08
+-#define UCB_AC_B_LOOP (1 << 8)
+-#define UCB_AC_B_MUTE (1 << 13)
+-#define UCB_AC_B_IN_ENA (1 << 14)
+-#define UCB_AC_B_OUT_ENA (1 << 15)
+-
+-#define UCB_TS_CR 0x09
+-#define UCB_TS_CR_TSMX_POW (1 << 0)
+-#define UCB_TS_CR_TSPX_POW (1 << 1)
+-#define UCB_TS_CR_TSMY_POW (1 << 2)
+-#define UCB_TS_CR_TSPY_POW (1 << 3)
+-#define UCB_TS_CR_TSMX_GND (1 << 4)
+-#define UCB_TS_CR_TSPX_GND (1 << 5)
+-#define UCB_TS_CR_TSMY_GND (1 << 6)
+-#define UCB_TS_CR_TSPY_GND (1 << 7)
+-#define UCB_TS_CR_MODE_INT (0 << 8)
+-#define UCB_TS_CR_MODE_PRES (1 << 8)
+-#define UCB_TS_CR_MODE_POS (2 << 8)
+-#define UCB_TS_CR_BIAS_ENA (1 << 11)
+-#define UCB_TS_CR_TSPX_LOW (1 << 12)
+-#define UCB_TS_CR_TSMX_LOW (1 << 13)
+-
+-#define UCB_ADC_CR 0x0a
+-#define UCB_ADC_SYNC_ENA (1 << 0)
+-#define UCB_ADC_VREFBYP_CON (1 << 1)
+-#define UCB_ADC_INP_TSPX (0 << 2)
+-#define UCB_ADC_INP_TSMX (1 << 2)
+-#define UCB_ADC_INP_TSPY (2 << 2)
+-#define UCB_ADC_INP_TSMY (3 << 2)
+-#define UCB_ADC_INP_AD0 (4 << 2)
+-#define UCB_ADC_INP_AD1 (5 << 2)
+-#define UCB_ADC_INP_AD2 (6 << 2)
+-#define UCB_ADC_INP_AD3 (7 << 2)
+-#define UCB_ADC_EXT_REF (1 << 5)
+-#define UCB_ADC_START (1 << 7)
+-#define UCB_ADC_ENA (1 << 15)
+-
+-#define UCB_ADC_DATA 0x0b
+-#define UCB_ADC_DAT_VAL (1 << 15)
+-#define UCB_ADC_DAT(x) (((x) & 0x7fe0) >> 5)
+-
+-#define UCB_ID 0x0c
+-#define UCB_ID_1200 0x1004
+-#define UCB_ID_1300 0x1005
+-#define UCB_ID_TC35143 0x9712
+-
+-#define UCB_MODE 0x0d
+-#define UCB_MODE_DYN_VFLAG_ENA (1 << 12)
+-#define UCB_MODE_AUD_OFF_CAN (1 << 13)
+-
+-#include "mcp.h"
+-
+-struct ucb1x00_irq {
+- void *devid;
+- void (*fn)(int, void *);
+-};
+-
+-struct ucb1x00 {
+- spinlock_t lock;
+- struct mcp *mcp;
+- unsigned int irq;
+- struct semaphore adc_sem;
+- spinlock_t io_lock;
+- u16 id;
+- u16 io_dir;
+- u16 io_out;
+- u16 adc_cr;
+- u16 irq_fal_enbl;
+- u16 irq_ris_enbl;
+- struct ucb1x00_irq irq_handler[16];
+- struct device dev;
+- struct list_head node;
+- struct list_head devs;
+-};
+-
+-struct ucb1x00_driver;
+-
+-struct ucb1x00_dev {
+- struct list_head dev_node;
+- struct list_head drv_node;
+- struct ucb1x00 *ucb;
+- struct ucb1x00_driver *drv;
+- void *priv;
+-};
+-
+-struct ucb1x00_driver {
+- struct list_head node;
+- struct list_head devs;
+- int (*add)(struct ucb1x00_dev *dev);
+- void (*remove)(struct ucb1x00_dev *dev);
+- int (*suspend)(struct ucb1x00_dev *dev, pm_message_t state);
+- int (*resume)(struct ucb1x00_dev *dev);
+-};
+-
+-#define classdev_to_ucb1x00(cd) container_of(cd, struct ucb1x00, dev)
+-
+-int ucb1x00_register_driver(struct ucb1x00_driver *);
+-void ucb1x00_unregister_driver(struct ucb1x00_driver *);
+-
+-/**
+- * ucb1x00_clkrate - return the UCB1x00 SIB clock rate
+- * @ucb: UCB1x00 structure describing chip
+- *
+- * Return the SIB clock rate in Hz.
+- */
+-static inline unsigned int ucb1x00_clkrate(struct ucb1x00 *ucb)
+-{
+- return mcp_get_sclk_rate(ucb->mcp);
+-}
+-
+-/**
+- * ucb1x00_enable - enable the UCB1x00 SIB clock
+- * @ucb: UCB1x00 structure describing chip
+- *
+- * Enable the SIB clock. This can be called multiple times.
+- */
+-static inline void ucb1x00_enable(struct ucb1x00 *ucb)
+-{
+- mcp_enable(ucb->mcp);
+-}
+-
+-/**
+- * ucb1x00_disable - disable the UCB1x00 SIB clock
+- * @ucb: UCB1x00 structure describing chip
+- *
+- * Disable the SIB clock. The SIB clock will only be disabled
+- * when the number of ucb1x00_enable calls match the number of
+- * ucb1x00_disable calls.
+- */
+-static inline void ucb1x00_disable(struct ucb1x00 *ucb)
+-{
+- mcp_disable(ucb->mcp);
+-}
+-
+-/**
+- * ucb1x00_reg_write - write a UCB1x00 register
+- * @ucb: UCB1x00 structure describing chip
+- * @reg: UCB1x00 4-bit register index to write
+- * @val: UCB1x00 16-bit value to write
+- *
+- * Write the UCB1x00 register @reg with value @val. The SIB
+- * clock must be running for this function to return.
+- */
+-static inline void ucb1x00_reg_write(struct ucb1x00 *ucb, unsigned int reg, unsigned int val)
+-{
+- mcp_reg_write(ucb->mcp, reg, val);
+-}
+-
+-/**
+- * ucb1x00_reg_read - read a UCB1x00 register
+- * @ucb: UCB1x00 structure describing chip
+- * @reg: UCB1x00 4-bit register index to write
+- *
+- * Read the UCB1x00 register @reg and return its value. The SIB
+- * clock must be running for this function to return.
+- */
+-static inline unsigned int ucb1x00_reg_read(struct ucb1x00 *ucb, unsigned int reg)
+-{
+- return mcp_reg_read(ucb->mcp, reg);
+-}
+-/**
+- * ucb1x00_set_audio_divisor -
+- * @ucb: UCB1x00 structure describing chip
+- * @div: SIB clock divisor
+- */
+-static inline void ucb1x00_set_audio_divisor(struct ucb1x00 *ucb, unsigned int div)
+-{
+- mcp_set_audio_divisor(ucb->mcp, div);
+-}
+-
+-/**
+- * ucb1x00_set_telecom_divisor -
+- * @ucb: UCB1x00 structure describing chip
+- * @div: SIB clock divisor
+- */
+-static inline void ucb1x00_set_telecom_divisor(struct ucb1x00 *ucb, unsigned int div)
+-{
+- mcp_set_telecom_divisor(ucb->mcp, div);
+-}
+-
+-void ucb1x00_io_set_dir(struct ucb1x00 *ucb, unsigned int, unsigned int);
+-void ucb1x00_io_write(struct ucb1x00 *ucb, unsigned int, unsigned int);
+-unsigned int ucb1x00_io_read(struct ucb1x00 *ucb);
+-
+-#define UCB_NOSYNC (0)
+-#define UCB_SYNC (1)
+-
+-unsigned int ucb1x00_adc_read(struct ucb1x00 *ucb, int adc_channel, int sync);
+-void ucb1x00_adc_enable(struct ucb1x00 *ucb);
+-void ucb1x00_adc_disable(struct ucb1x00 *ucb);
+-
+-/*
+- * Which edges of the IRQ do you want to control today?
+- */
+-#define UCB_RISING (1 << 0)
+-#define UCB_FALLING (1 << 1)
+-
+-int ucb1x00_hook_irq(struct ucb1x00 *ucb, unsigned int idx, void (*fn)(int, void *), void *devid);
+-void ucb1x00_enable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges);
+-void ucb1x00_disable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges);
+-int ucb1x00_free_irq(struct ucb1x00 *ucb, unsigned int idx, void *devid);
+-
+-#endif
+diff --git a/include/linux/mfd/mcp.h b/include/linux/mfd/mcp.h
+new file mode 100644
+index 0000000..be95e09
+--- /dev/null
++++ b/include/linux/mfd/mcp.h
+@@ -0,0 +1,68 @@
++/*
++ * linux/drivers/mfd/mcp.h
++ *
++ * Copyright (C) 2001 Russell King, 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.
++ */
++#ifndef MCP_H
++#define MCP_H
++
++#include <mach/dma.h>
++
++struct mcp_ops;
++
++struct mcp {
++ struct module *owner;
++ struct mcp_ops *ops;
++ spinlock_t lock;
++ int use_count;
++ unsigned int sclk_rate;
++ unsigned int rw_timeout;
++ dma_device_t dma_audio_rd;
++ dma_device_t dma_audio_wr;
++ dma_device_t dma_telco_rd;
++ dma_device_t dma_telco_wr;
++ struct device attached_device;
++};
++
++struct mcp_ops {
++ void (*set_telecom_divisor)(struct mcp *, unsigned int);
++ void (*set_audio_divisor)(struct mcp *, unsigned int);
++ void (*reg_write)(struct mcp *, unsigned int, unsigned int);
++ unsigned int (*reg_read)(struct mcp *, unsigned int);
++ void (*enable)(struct mcp *);
++ void (*disable)(struct mcp *);
++};
++
++void mcp_set_telecom_divisor(struct mcp *, unsigned int);
++void mcp_set_audio_divisor(struct mcp *, unsigned int);
++void mcp_reg_write(struct mcp *, unsigned int, unsigned int);
++unsigned int mcp_reg_read(struct mcp *, unsigned int);
++void mcp_enable(struct mcp *);
++void mcp_disable(struct mcp *);
++#define mcp_get_sclk_rate(mcp) ((mcp)->sclk_rate)
++
++struct mcp *mcp_host_alloc(struct device *, size_t);
++int mcp_host_register(struct mcp *);
++void mcp_host_unregister(struct mcp *);
++
++struct mcp_driver {
++ struct device_driver drv;
++ int (*probe)(struct mcp *);
++ void (*remove)(struct mcp *);
++ int (*suspend)(struct mcp *, pm_message_t);
++ int (*resume)(struct mcp *);
++};
++
++int mcp_driver_register(struct mcp_driver *);
++void mcp_driver_unregister(struct mcp_driver *);
++
++#define mcp_get_drvdata(mcp) dev_get_drvdata(&(mcp)->attached_device)
++#define mcp_set_drvdata(mcp,d) dev_set_drvdata(&(mcp)->attached_device, d)
++
++#define mcp_priv(mcp) ((void *)((mcp)+1))
++
++#endif
+diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h
+new file mode 100644
+index 0000000..eac3463
+--- /dev/null
++++ b/include/linux/mfd/ucb1x00.h
+@@ -0,0 +1,255 @@
++/*
++ * linux/include/mfd/ucb1x00.h
++ *
++ * Copyright (C) 2001 Russell King, 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.
++ */
++#ifndef UCB1200_H
++#define UCB1200_H
++
++#include <linux/mfd/mcp.h>
++#define UCB_IO_DATA 0x00
++#define UCB_IO_DIR 0x01
++
++#define UCB_IO_0 (1 << 0)
++#define UCB_IO_1 (1 << 1)
++#define UCB_IO_2 (1 << 2)
++#define UCB_IO_3 (1 << 3)
++#define UCB_IO_4 (1 << 4)
++#define UCB_IO_5 (1 << 5)
++#define UCB_IO_6 (1 << 6)
++#define UCB_IO_7 (1 << 7)
++#define UCB_IO_8 (1 << 8)
++#define UCB_IO_9 (1 << 9)
++
++#define UCB_IE_RIS 0x02
++#define UCB_IE_FAL 0x03
++#define UCB_IE_STATUS 0x04
++#define UCB_IE_CLEAR 0x04
++#define UCB_IE_ADC (1 << 11)
++#define UCB_IE_TSPX (1 << 12)
++#define UCB_IE_TSMX (1 << 13)
++#define UCB_IE_TCLIP (1 << 14)
++#define UCB_IE_ACLIP (1 << 15)
++
++#define UCB_IRQ_TSPX 12
++
++#define UCB_TC_A 0x05
++#define UCB_TC_A_LOOP (1 << 7) /* UCB1200 */
++#define UCB_TC_A_AMPL (1 << 7) /* UCB1300 */
++
++#define UCB_TC_B 0x06
++#define UCB_TC_B_VOICE_ENA (1 << 3)
++#define UCB_TC_B_CLIP (1 << 4)
++#define UCB_TC_B_ATT (1 << 6)
++#define UCB_TC_B_SIDE_ENA (1 << 11)
++#define UCB_TC_B_MUTE (1 << 13)
++#define UCB_TC_B_IN_ENA (1 << 14)
++#define UCB_TC_B_OUT_ENA (1 << 15)
++
++#define UCB_AC_A 0x07
++#define UCB_AC_B 0x08
++#define UCB_AC_B_LOOP (1 << 8)
++#define UCB_AC_B_MUTE (1 << 13)
++#define UCB_AC_B_IN_ENA (1 << 14)
++#define UCB_AC_B_OUT_ENA (1 << 15)
++
++#define UCB_TS_CR 0x09
++#define UCB_TS_CR_TSMX_POW (1 << 0)
++#define UCB_TS_CR_TSPX_POW (1 << 1)
++#define UCB_TS_CR_TSMY_POW (1 << 2)
++#define UCB_TS_CR_TSPY_POW (1 << 3)
++#define UCB_TS_CR_TSMX_GND (1 << 4)
++#define UCB_TS_CR_TSPX_GND (1 << 5)
++#define UCB_TS_CR_TSMY_GND (1 << 6)
++#define UCB_TS_CR_TSPY_GND (1 << 7)
++#define UCB_TS_CR_MODE_INT (0 << 8)
++#define UCB_TS_CR_MODE_PRES (1 << 8)
++#define UCB_TS_CR_MODE_POS (2 << 8)
++#define UCB_TS_CR_BIAS_ENA (1 << 11)
++#define UCB_TS_CR_TSPX_LOW (1 << 12)
++#define UCB_TS_CR_TSMX_LOW (1 << 13)
++
++#define UCB_ADC_CR 0x0a
++#define UCB_ADC_SYNC_ENA (1 << 0)
++#define UCB_ADC_VREFBYP_CON (1 << 1)
++#define UCB_ADC_INP_TSPX (0 << 2)
++#define UCB_ADC_INP_TSMX (1 << 2)
++#define UCB_ADC_INP_TSPY (2 << 2)
++#define UCB_ADC_INP_TSMY (3 << 2)
++#define UCB_ADC_INP_AD0 (4 << 2)
++#define UCB_ADC_INP_AD1 (5 << 2)
++#define UCB_ADC_INP_AD2 (6 << 2)
++#define UCB_ADC_INP_AD3 (7 << 2)
++#define UCB_ADC_EXT_REF (1 << 5)
++#define UCB_ADC_START (1 << 7)
++#define UCB_ADC_ENA (1 << 15)
++
++#define UCB_ADC_DATA 0x0b
++#define UCB_ADC_DAT_VAL (1 << 15)
++#define UCB_ADC_DAT(x) (((x) & 0x7fe0) >> 5)
++
++#define UCB_ID 0x0c
++#define UCB_ID_1200 0x1004
++#define UCB_ID_1300 0x1005
++#define UCB_ID_TC35143 0x9712
++
++#define UCB_MODE 0x0d
++#define UCB_MODE_DYN_VFLAG_ENA (1 << 12)
++#define UCB_MODE_AUD_OFF_CAN (1 << 13)
++
++
++struct ucb1x00_irq {
++ void *devid;
++ void (*fn)(int, void *);
++};
++
++struct ucb1x00 {
++ spinlock_t lock;
++ struct mcp *mcp;
++ unsigned int irq;
++ struct semaphore adc_sem;
++ spinlock_t io_lock;
++ u16 id;
++ u16 io_dir;
++ u16 io_out;
++ u16 adc_cr;
++ u16 irq_fal_enbl;
++ u16 irq_ris_enbl;
++ struct ucb1x00_irq irq_handler[16];
++ struct device dev;
++ struct list_head node;
++ struct list_head devs;
++};
++
++struct ucb1x00_driver;
++
++struct ucb1x00_dev {
++ struct list_head dev_node;
++ struct list_head drv_node;
++ struct ucb1x00 *ucb;
++ struct ucb1x00_driver *drv;
++ void *priv;
++};
++
++struct ucb1x00_driver {
++ struct list_head node;
++ struct list_head devs;
++ int (*add)(struct ucb1x00_dev *dev);
++ void (*remove)(struct ucb1x00_dev *dev);
++ int (*suspend)(struct ucb1x00_dev *dev, pm_message_t state);
++ int (*resume)(struct ucb1x00_dev *dev);
++};
++
++#define classdev_to_ucb1x00(cd) container_of(cd, struct ucb1x00, dev)
++
++int ucb1x00_register_driver(struct ucb1x00_driver *);
++void ucb1x00_unregister_driver(struct ucb1x00_driver *);
++
++/**
++ * ucb1x00_clkrate - return the UCB1x00 SIB clock rate
++ * @ucb: UCB1x00 structure describing chip
++ *
++ * Return the SIB clock rate in Hz.
++ */
++static inline unsigned int ucb1x00_clkrate(struct ucb1x00 *ucb)
++{
++ return mcp_get_sclk_rate(ucb->mcp);
++}
++
++/**
++ * ucb1x00_enable - enable the UCB1x00 SIB clock
++ * @ucb: UCB1x00 structure describing chip
++ *
++ * Enable the SIB clock. This can be called multiple times.
++ */
++static inline void ucb1x00_enable(struct ucb1x00 *ucb)
++{
++ mcp_enable(ucb->mcp);
++}
++
++/**
++ * ucb1x00_disable - disable the UCB1x00 SIB clock
++ * @ucb: UCB1x00 structure describing chip
++ *
++ * Disable the SIB clock. The SIB clock will only be disabled
++ * when the number of ucb1x00_enable calls match the number of
++ * ucb1x00_disable calls.
++ */
++static inline void ucb1x00_disable(struct ucb1x00 *ucb)
++{
++ mcp_disable(ucb->mcp);
++}
++
++/**
++ * ucb1x00_reg_write - write a UCB1x00 register
++ * @ucb: UCB1x00 structure describing chip
++ * @reg: UCB1x00 4-bit register index to write
++ * @val: UCB1x00 16-bit value to write
++ *
++ * Write the UCB1x00 register @reg with value @val. The SIB
++ * clock must be running for this function to return.
++ */
++static inline void ucb1x00_reg_write(struct ucb1x00 *ucb, unsigned int reg, unsigned int val)
++{
++ mcp_reg_write(ucb->mcp, reg, val);
++}
++
++/**
++ * ucb1x00_reg_read - read a UCB1x00 register
++ * @ucb: UCB1x00 structure describing chip
++ * @reg: UCB1x00 4-bit register index to write
++ *
++ * Read the UCB1x00 register @reg and return its value. The SIB
++ * clock must be running for this function to return.
++ */
++static inline unsigned int ucb1x00_reg_read(struct ucb1x00 *ucb, unsigned int reg)
++{
++ return mcp_reg_read(ucb->mcp, reg);
++}
++/**
++ * ucb1x00_set_audio_divisor -
++ * @ucb: UCB1x00 structure describing chip
++ * @div: SIB clock divisor
++ */
++static inline void ucb1x00_set_audio_divisor(struct ucb1x00 *ucb, unsigned int div)
++{
++ mcp_set_audio_divisor(ucb->mcp, div);
++}
++
++/**
++ * ucb1x00_set_telecom_divisor -
++ * @ucb: UCB1x00 structure describing chip
++ * @div: SIB clock divisor
++ */
++static inline void ucb1x00_set_telecom_divisor(struct ucb1x00 *ucb, unsigned int div)
++{
++ mcp_set_telecom_divisor(ucb->mcp, div);
++}
++
++void ucb1x00_io_set_dir(struct ucb1x00 *ucb, unsigned int, unsigned int);
++void ucb1x00_io_write(struct ucb1x00 *ucb, unsigned int, unsigned int);
++unsigned int ucb1x00_io_read(struct ucb1x00 *ucb);
++
++#define UCB_NOSYNC (0)
++#define UCB_SYNC (1)
++
++unsigned int ucb1x00_adc_read(struct ucb1x00 *ucb, int adc_channel, int sync);
++void ucb1x00_adc_enable(struct ucb1x00 *ucb);
++void ucb1x00_adc_disable(struct ucb1x00 *ucb);
++
++/*
++ * Which edges of the IRQ do you want to control today?
++ */
++#define UCB_RISING (1 << 0)
++#define UCB_FALLING (1 << 1)
++
++int ucb1x00_hook_irq(struct ucb1x00 *ucb, unsigned int idx, void (*fn)(int, void *), void *devid);
++void ucb1x00_enable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges);
++void ucb1x00_disable_irq(struct ucb1x00 *ucb, unsigned int idx, int edges);
++int ucb1x00_free_irq(struct ucb1x00 *ucb, unsigned int idx, void *devid);
++
++#endif
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0005-collie-locomo-led-change-default-trigger.patch b/recipes/linux/linux-2.6.31/collie/0005-collie-locomo-led-change-default-trigger.patch
new file mode 100644
index 0000000000..171e13a941
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0005-collie-locomo-led-change-default-trigger.patch
@@ -0,0 +1,27 @@
+From ce349d6c14de18f6cbb8dd507d3a8bcb4cf4b8ed Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Tue, 10 Feb 2009 13:21:42 +0100
+Subject: [PATCH 05/15] collie: locomo-led change default trigger
+
+Collie uses now the powersupply framework. Change the
+default led-trigger of locomo-led to reflect that.
+---
+ drivers/leds/leds-locomo.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/leds/leds-locomo.c b/drivers/leds/leds-locomo.c
+index 5d91362..1f7c10f 100644
+--- a/drivers/leds/leds-locomo.c
++++ b/drivers/leds/leds-locomo.c
+@@ -44,7 +44,7 @@ static void locomoled_brightness_set1(struct led_classdev *led_cdev,
+
+ static struct led_classdev locomo_led0 = {
+ .name = "locomo:amber:charge",
+- .default_trigger = "sharpsl-charge",
++ .default_trigger = "main-battery-charging",
+ .brightness_set = locomoled_brightness_set0,
+ };
+
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0006-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch b/recipes/linux/linux-2.6.31/collie/0006-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch
new file mode 100644
index 0000000000..f30d801743
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0006-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch
@@ -0,0 +1,43 @@
+From 35f5efba0365e5029d8cae77f6b2546eea09e4d6 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Mon, 9 Feb 2009 23:14:44 +0100
+Subject: [PATCH 06/15] SA1100: make gpio_to_irq and reverse a macro
+
+The function can't be used for static initialisations so
+convert them to macros.
+---
+ arch/arm/mach-sa1100/include/mach/gpio.h | 19 ++++---------------
+ 1 files changed, 4 insertions(+), 15 deletions(-)
+
+diff --git a/arch/arm/mach-sa1100/include/mach/gpio.h b/arch/arm/mach-sa1100/include/mach/gpio.h
+index 582a0c9..7befc10 100644
+--- a/arch/arm/mach-sa1100/include/mach/gpio.h
++++ b/arch/arm/mach-sa1100/include/mach/gpio.h
+@@ -49,20 +49,9 @@ static inline void gpio_set_value(unsigned gpio, int value)
+
+ #define gpio_cansleep __gpio_cansleep
+
+-static inline unsigned gpio_to_irq(unsigned gpio)
+-{
+- if (gpio < 11)
+- return IRQ_GPIO0 + gpio;
+- else
+- return IRQ_GPIO11 - 11 + gpio;
+-}
+-
+-static inline unsigned irq_to_gpio(unsigned irq)
+-{
+- if (irq < IRQ_GPIO11_27)
+- return irq - IRQ_GPIO0;
+- else
+- return irq - IRQ_GPIO11 + 11;
+-}
++#define gpio_to_irq(gpio) ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \
++ (IRQ_GPIO11 - 11 + gpio))
++#define irq_to_gpio(irq) ((irq < IRQ_GPIO11_27) ? (irq - IRQ_GPIO0) : \
++ (irq - IRQ_GPIO11 + 11))
+
+ #endif
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0007-add-gpiolib-support-to-ucb1x00.patch b/recipes/linux/linux-2.6.31/collie/0007-add-gpiolib-support-to-ucb1x00.patch
new file mode 100644
index 0000000000..044cfd5b2b
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0007-add-gpiolib-support-to-ucb1x00.patch
@@ -0,0 +1,242 @@
+From c3c8eb1ae240994a9af99589e247f87dacf0d276 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Tue, 10 Feb 2009 14:50:56 +0100
+Subject: [PATCH 07/15] add gpiolib support to ucb1x00
+
+The old access methods to the gpios will be removed when
+all users has been converted. (mainly ucb1x00-ts)
+---
+ arch/arm/mach-sa1100/include/mach/mcp.h | 1 +
+ drivers/mfd/mcp-sa11x0.c | 1 +
+ drivers/mfd/ucb1x00-core.c | 87 ++++++++++++++++++++++++++++++-
+ include/linux/mfd/mcp.h | 1 +
+ include/linux/mfd/ucb1x00.h | 3 +
+ 5 files changed, 91 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-sa1100/include/mach/mcp.h b/arch/arm/mach-sa1100/include/mach/mcp.h
+index fb8b09a..ed1a331 100644
+--- a/arch/arm/mach-sa1100/include/mach/mcp.h
++++ b/arch/arm/mach-sa1100/include/mach/mcp.h
+@@ -16,6 +16,7 @@ struct mcp_plat_data {
+ u32 mccr0;
+ u32 mccr1;
+ unsigned int sclk_rate;
++ int gpio_base;
+ };
+
+ #endif
+diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c
+index 2121898..2584272 100644
+--- a/drivers/mfd/mcp-sa11x0.c
++++ b/drivers/mfd/mcp-sa11x0.c
+@@ -163,6 +163,7 @@ static int mcp_sa11x0_probe(struct platform_device *pdev)
+ mcp->dma_audio_wr = DMA_Ser4MCP0Wr;
+ mcp->dma_telco_rd = DMA_Ser4MCP1Rd;
+ mcp->dma_telco_wr = DMA_Ser4MCP1Wr;
++ mcp->gpio_base = data->gpio_base;
+
+ platform_set_drvdata(pdev, mcp);
+
+diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
+index 61f3933..e0d7700 100644
+--- a/drivers/mfd/ucb1x00-core.c
++++ b/drivers/mfd/ucb1x00-core.c
+@@ -25,11 +25,11 @@
+ #include <linux/device.h>
+ #include <linux/mutex.h>
+ #include <linux/mfd/ucb1x00.h>
++#include <linux/gpio.h>
+
+ #include <mach/dma.h>
+ #include <mach/hardware.h>
+
+-
+ static DEFINE_MUTEX(ucb1x00_mutex);
+ static LIST_HEAD(ucb1x00_drivers);
+ static LIST_HEAD(ucb1x00_devices);
+@@ -107,6 +107,60 @@ unsigned int ucb1x00_io_read(struct ucb1x00 *ucb)
+ return ucb1x00_reg_read(ucb, UCB_IO_DATA);
+ }
+
++static void ucb1x00_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
++{
++ struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio);
++ unsigned long flags;
++
++ spin_lock_irqsave(&ucb->io_lock, flags);
++ if (value)
++ ucb->io_out |= 1 << offset;
++ else
++ ucb->io_out &= ~(1 << offset);
++
++ ucb1x00_reg_write(ucb, UCB_IO_DATA, ucb->io_out);
++ spin_unlock_irqrestore(&ucb->io_lock, flags);
++}
++
++static int ucb1x00_gpio_get(struct gpio_chip *chip, unsigned offset)
++{
++ struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio);
++ return ucb1x00_reg_read(ucb, UCB_IO_DATA) & (1 << offset);
++}
++
++static int ucb1x00_gpio_direction_input(struct gpio_chip *chip, unsigned offset)
++{
++ struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio);
++ unsigned long flags;
++
++ spin_lock_irqsave(&ucb->io_lock, flags);
++ ucb->io_dir &= ~(1 << offset);
++ ucb1x00_reg_write(ucb, UCB_IO_DIR, ucb->io_dir);
++ spin_unlock_irqrestore(&ucb->io_lock, flags);
++
++ return 0;
++}
++
++static int ucb1x00_gpio_direction_output(struct gpio_chip *chip, unsigned offset
++ , int value)
++{
++ struct ucb1x00 *ucb = container_of(chip, struct ucb1x00, gpio);
++ unsigned long flags;
++
++ spin_lock_irqsave(&ucb->io_lock, flags);
++ ucb->io_dir |= (1 << offset);
++ ucb1x00_reg_write(ucb, UCB_IO_DIR, ucb->io_dir);
++
++ if (value)
++ ucb->io_out |= 1 << offset;
++ else
++ ucb->io_out &= ~(1 << offset);
++ ucb1x00_reg_write(ucb, UCB_IO_DATA, ucb->io_out);
++ spin_unlock_irqrestore(&ucb->io_lock, flags);
++
++ return 0;
++}
++
+ /*
+ * UCB1300 data sheet says we must:
+ * 1. enable ADC => 5us (including reference startup time)
+@@ -475,6 +529,7 @@ static int ucb1x00_probe(struct mcp *mcp)
+ struct ucb1x00_driver *drv;
+ unsigned int id;
+ int ret = -ENODEV;
++ int temp;
+
+ mcp_enable(mcp);
+ id = mcp_reg_read(mcp, UCB_ID);
+@@ -507,12 +562,27 @@ static int ucb1x00_probe(struct mcp *mcp)
+ goto err_free;
+ }
+
++ ucb->gpio.base = -1;
++ if (mcp->gpio_base != 0) {
++ ucb->gpio.label = dev_name(&ucb->dev);
++ ucb->gpio.base = mcp->gpio_base;
++ ucb->gpio.ngpio = 10;
++ ucb->gpio.set = ucb1x00_gpio_set;
++ ucb->gpio.get = ucb1x00_gpio_get;
++ ucb->gpio.direction_input = ucb1x00_gpio_direction_input;
++ ucb->gpio.direction_output = ucb1x00_gpio_direction_output;
++ ret = gpiochip_add(&ucb->gpio);
++ if (ret)
++ goto err_free;
++ } else
++ dev_info(&ucb->dev, "gpio_base not set so no gpiolib support");
++
+ ret = request_irq(ucb->irq, ucb1x00_irq, IRQF_TRIGGER_RISING,
+ "UCB1x00", ucb);
+ if (ret) {
+ printk(KERN_ERR "ucb1x00: unable to grab irq%d: %d\n",
+ ucb->irq, ret);
+- goto err_free;
++ goto err_gpio;
+ }
+
+ mcp_set_drvdata(mcp, ucb);
+@@ -521,6 +591,7 @@ static int ucb1x00_probe(struct mcp *mcp)
+ if (ret)
+ goto err_irq;
+
++
+ INIT_LIST_HEAD(&ucb->devs);
+ mutex_lock(&ucb1x00_mutex);
+ list_add(&ucb->node, &ucb1x00_devices);
+@@ -528,10 +599,14 @@ static int ucb1x00_probe(struct mcp *mcp)
+ ucb1x00_add_dev(ucb, drv);
+ }
+ mutex_unlock(&ucb1x00_mutex);
++
+ goto out;
+
+ err_irq:
+ free_irq(ucb->irq, ucb);
++ err_gpio:
++ if (ucb->gpio.base != -1)
++ temp = gpiochip_remove(&ucb->gpio);
+ err_free:
+ kfree(ucb);
+ err_disable:
+@@ -544,6 +619,7 @@ static void ucb1x00_remove(struct mcp *mcp)
+ {
+ struct ucb1x00 *ucb = mcp_get_drvdata(mcp);
+ struct list_head *l, *n;
++ int ret;
+
+ mutex_lock(&ucb1x00_mutex);
+ list_del(&ucb->node);
+@@ -553,6 +629,12 @@ static void ucb1x00_remove(struct mcp *mcp)
+ }
+ mutex_unlock(&ucb1x00_mutex);
+
++ if (ucb->gpio.base != -1) {
++ ret = gpiochip_remove(&ucb->gpio);
++ if (ret)
++ dev_err(&ucb->dev, "Can't remove gpio chip: %d\n", ret);
++ }
++
+ free_irq(ucb->irq, ucb);
+ device_unregister(&ucb->dev);
+ }
+@@ -603,6 +685,7 @@ static int ucb1x00_resume(struct mcp *mcp)
+ struct ucb1x00 *ucb = mcp_get_drvdata(mcp);
+ struct ucb1x00_dev *dev;
+
++ ucb1x00_reg_write(ucb, UCB_IO_DIR, ucb->io_dir);
+ mutex_lock(&ucb1x00_mutex);
+ list_for_each_entry(dev, &ucb->devs, dev_node) {
+ if (dev->drv->resume)
+diff --git a/include/linux/mfd/mcp.h b/include/linux/mfd/mcp.h
+index be95e09..ee49670 100644
+--- a/include/linux/mfd/mcp.h
++++ b/include/linux/mfd/mcp.h
+@@ -26,6 +26,7 @@ struct mcp {
+ dma_device_t dma_telco_rd;
+ dma_device_t dma_telco_wr;
+ struct device attached_device;
++ int gpio_base;
+ };
+
+ struct mcp_ops {
+diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h
+index eac3463..aa9c378 100644
+--- a/include/linux/mfd/ucb1x00.h
++++ b/include/linux/mfd/ucb1x00.h
+@@ -11,6 +11,8 @@
+ #define UCB1200_H
+
+ #include <linux/mfd/mcp.h>
++#include <linux/gpio.h>
++
+ #define UCB_IO_DATA 0x00
+ #define UCB_IO_DIR 0x01
+
+@@ -123,6 +125,7 @@ struct ucb1x00 {
+ struct device dev;
+ struct list_head node;
+ struct list_head devs;
++ struct gpio_chip gpio;
+ };
+
+ struct ucb1x00_driver;
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0008-collie-convert-to-gpiolib-for-ucb1x00.patch b/recipes/linux/linux-2.6.31/collie/0008-collie-convert-to-gpiolib-for-ucb1x00.patch
new file mode 100644
index 0000000000..45dc471c1a
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0008-collie-convert-to-gpiolib-for-ucb1x00.patch
@@ -0,0 +1,80 @@
+From a93eff611618fd63bb74f4f9c17b9d0e58cd226b Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Tue, 10 Feb 2009 14:12:02 +0100
+Subject: [PATCH 08/15] collie: convert to gpiolib for ucb1x00
+
+Only the parts used for collie_battery are converted.
+The rest will be cleaned up later.
+---
+ arch/arm/mach-sa1100/collie.c | 1 +
+ arch/arm/mach-sa1100/include/mach/collie.h | 35 ++++++++++++++-------------
+ 2 files changed, 19 insertions(+), 17 deletions(-)
+
+diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
+index 9f5029c..395cf09 100644
+--- a/arch/arm/mach-sa1100/collie.c
++++ b/arch/arm/mach-sa1100/collie.c
+@@ -86,6 +86,7 @@ static struct scoop_pcmcia_config collie_pcmcia_config = {
+ static struct mcp_plat_data collie_mcp_data = {
+ .mccr0 = MCCR0_ADM | MCCR0_ExtClk,
+ .sclk_rate = 9216000,
++ .gpio_base = COLLIE_TC35143_GPIO_BASE,
+ };
+
+ #ifdef CONFIG_SHARP_LOCOMO
+diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h
+index 8c8fe46..71a0b3f 100644
+--- a/arch/arm/mach-sa1100/include/mach/collie.h
++++ b/arch/arm/mach-sa1100/include/mach/collie.h
+@@ -25,10 +25,10 @@
+ #define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7)
+ #define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19
+
+-#define COLLIE_SCOOP_IO_DIR ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \
++#define COLLIE_SCOOP_IO_DIR (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \
+ COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \
+- COLLIE_SCP_LB_VOL_CHG )
+-#define COLLIE_SCOOP_IO_OUT ( COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R )
++ COLLIE_SCP_LB_VOL_CHG)
++#define COLLIE_SCOOP_IO_OUT (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R)
+
+ /* GPIOs for gpiolib */
+
+@@ -80,19 +80,20 @@
+ #define COLLIE_LCM_IRQ_GPIO_nSD_WP IRQ_LOCOMO_GPIO14
+
+ /* GPIO's on the TC35143AF (Toshiba Analog Frontend) */
+-#define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0 /* GPIO0=Version */
+-#define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1 /* GPIO1=TBL_CHK */
+-#define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2 /* GPIO2=VPNE_ON */
+-#define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3 /* GPIO3=IR_ON */
+-#define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4 /* GPIO4=AMP_ON */
+-#define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5 /* GPIO5=Version */
+-#define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5 /* GPIO5=fs 8k LPF */
+-#define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6 /* GPIO6=BUZZER BIAS */
+-#define COLLIE_TC35143_GPIO_MBAT_ON UCB_IO_7 /* GPIO7=MBAT_ON */
+-#define COLLIE_TC35143_GPIO_BBAT_ON UCB_IO_8 /* GPIO8=BBAT_ON */
+-#define COLLIE_TC35143_GPIO_TMP_ON UCB_IO_9 /* GPIO9=TMP_ON */
+-#define COLLIE_TC35143_GPIO_IN ( UCB_IO_0 | UCB_IO_2 | UCB_IO_5 )
+-#define COLLIE_TC35143_GPIO_OUT ( UCB_IO_1 | UCB_IO_3 | UCB_IO_4 | UCB_IO_6 | \
+- UCB_IO_7 | UCB_IO_8 | UCB_IO_9 )
++#define COLLIE_TC35143_GPIO_BASE (GPIO_MAX + 13)
++#define COLLIE_TC35143_GPIO_VERSION0 UCB_IO_0
++#define COLLIE_TC35143_GPIO_TBL_CHK UCB_IO_1
++#define COLLIE_TC35143_GPIO_VPEN_ON UCB_IO_2
++#define COLLIE_TC35143_GPIO_IR_ON UCB_IO_3
++#define COLLIE_TC35143_GPIO_AMP_ON UCB_IO_4
++#define COLLIE_TC35143_GPIO_VERSION1 UCB_IO_5
++#define COLLIE_TC35143_GPIO_FS8KLPF UCB_IO_5
++#define COLLIE_TC35143_GPIO_BUZZER_BIAS UCB_IO_6
++#define COLLIE_GPIO_MBAT_ON (COLLIE_TC35143_GPIO_BASE + 7)
++#define COLLIE_GPIO_BBAT_ON (COLLIE_TC35143_GPIO_BASE + 8)
++#define COLLIE_GPIO_TMP_ON (COLLIE_TC35143_GPIO_BASE + 9)
++#define COLLIE_TC35143_GPIO_IN (UCB_IO_0 | UCB_IO_2 | UCB_IO_5)
++#define COLLIE_TC35143_GPIO_OUT (UCB_IO_1 | UCB_IO_3 | UCB_IO_4 \
++ | UCB_IO_6)
+
+ #endif
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0009-collie-add-battery-driver.patch b/recipes/linux/linux-2.6.31/collie/0009-collie-add-battery-driver.patch
new file mode 100644
index 0000000000..9f2bdabdad
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0009-collie-add-battery-driver.patch
@@ -0,0 +1,470 @@
+From 1bc564846565218e693f5aef31d7db1228da6845 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Tue, 10 Feb 2009 14:12:29 +0100
+Subject: [PATCH 09/15] collie: add battery driver
+
+This driver is based on tosa_battery.c.
+---
+ drivers/power/Kconfig | 7 +
+ drivers/power/Makefile | 1 +
+ drivers/power/collie_battery.c | 418 ++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 426 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/power/collie_battery.c
+
+diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
+index bdbc4f7..def79ef 100644
+--- a/drivers/power/Kconfig
++++ b/drivers/power/Kconfig
+@@ -70,6 +70,13 @@ config BATTERY_TOSA
+ Say Y to enable support for the battery on the Sharp Zaurus
+ SL-6000 (tosa) models.
+
++config BATTERY_COLLIE
++ tristate "Sharp SL-5500 (collie) battery"
++ depends on SA1100_COLLIE && MCP_UCB1200
++ help
++ Say Y to enable support for the battery on the Sharp Zaurus
++ SL-5500 (collie) models.
++
+ config BATTERY_WM97XX
+ bool "WM97xx generic battery driver"
+ depends on TOUCHSCREEN_WM97XX=y
+diff --git a/drivers/power/Makefile b/drivers/power/Makefile
+index 380d17c..58c13f9 100644
+--- a/drivers/power/Makefile
++++ b/drivers/power/Makefile
+@@ -23,6 +23,7 @@ obj-$(CONFIG_BATTERY_DS2782) += ds2782_battery.o
+ obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o
+ obj-$(CONFIG_BATTERY_OLPC) += olpc_battery.o
+ obj-$(CONFIG_BATTERY_TOSA) += tosa_battery.o
++obj-$(CONFIG_BATTERY_COLLIE) += collie_battery.o
+ obj-$(CONFIG_BATTERY_WM97XX) += wm97xx_battery.o
+ obj-$(CONFIG_BATTERY_BQ27x00) += bq27x00_battery.o
+ obj-$(CONFIG_BATTERY_DA9030) += da9030_battery.o
+diff --git a/drivers/power/collie_battery.c b/drivers/power/collie_battery.c
+new file mode 100644
+index 0000000..039f41a
+--- /dev/null
++++ b/drivers/power/collie_battery.c
+@@ -0,0 +1,418 @@
++/*
++ * Battery and Power Management code for the Sharp SL-5x00
++ *
++ * Copyright (C) 2009 Thomas Kunze
++ *
++ * based on tosa_battery.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.
++ *
++ */
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/power_supply.h>
++#include <linux/delay.h>
++#include <linux/spinlock.h>
++#include <linux/interrupt.h>
++#include <linux/gpio.h>
++#include <linux/mfd/ucb1x00.h>
++
++#include <asm/mach/sharpsl_param.h>
++#include <asm/mach-types.h>
++#include <mach/collie.h>
++
++static DEFINE_MUTEX(bat_lock); /* protects gpio pins */
++static struct work_struct bat_work;
++static struct ucb1x00 *ucb;
++
++struct collie_bat {
++ int status;
++ struct power_supply psy;
++ int full_chrg;
++
++ struct mutex work_lock; /* protects data */
++
++ bool (*is_present)(struct collie_bat *bat);
++ int gpio_full;
++ int gpio_charge_on;
++
++ int technology;
++
++ int gpio_bat;
++ int adc_bat;
++ int adc_bat_divider;
++ int bat_max;
++ int bat_min;
++
++ int gpio_temp;
++ int adc_temp;
++ int adc_temp_divider;
++};
++
++static struct collie_bat collie_bat_main;
++
++static unsigned long collie_read_bat(struct collie_bat *bat)
++{
++ unsigned long value = 0;
++
++ if (bat->gpio_bat < 0 || bat->adc_bat < 0)
++ return 0;
++ mutex_lock(&bat_lock);
++ gpio_set_value(bat->gpio_bat, 1);
++ msleep(5);
++ ucb1x00_adc_enable(ucb);
++ value = ucb1x00_adc_read(ucb, bat->adc_bat, UCB_SYNC);
++ ucb1x00_adc_disable(ucb);
++ gpio_set_value(bat->gpio_bat, 0);
++ mutex_unlock(&bat_lock);
++ value = value * 1000000 / bat->adc_bat_divider;
++
++ return value;
++}
++
++static unsigned long collie_read_temp(struct collie_bat *bat)
++{
++ unsigned long value = 0;
++ if (bat->gpio_temp < 0 || bat->adc_temp < 0)
++ return 0;
++
++ mutex_lock(&bat_lock);
++ gpio_set_value(bat->gpio_temp, 1);
++ msleep(5);
++ ucb1x00_adc_enable(ucb);
++ value = ucb1x00_adc_read(ucb, bat->adc_temp, UCB_SYNC);
++ ucb1x00_adc_disable(ucb);
++ gpio_set_value(bat->gpio_temp, 0);
++ mutex_unlock(&bat_lock);
++
++ value = value * 10000 / bat->adc_temp_divider;
++
++ return value;
++}
++
++static int collie_bat_get_property(struct power_supply *psy,
++ enum power_supply_property psp,
++ union power_supply_propval *val)
++{
++ int ret = 0;
++ struct collie_bat *bat = container_of(psy, struct collie_bat, psy);
++
++ if (bat->is_present && !bat->is_present(bat)
++ && psp != POWER_SUPPLY_PROP_PRESENT) {
++ return -ENODEV;
++ }
++
++ switch (psp) {
++ case POWER_SUPPLY_PROP_STATUS:
++ val->intval = bat->status;
++ break;
++ case POWER_SUPPLY_PROP_TECHNOLOGY:
++ val->intval = bat->technology;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_NOW:
++ val->intval = collie_read_bat(bat);
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MAX:
++ if (bat->full_chrg == -1)
++ val->intval = bat->bat_max;
++ else
++ val->intval = bat->full_chrg;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
++ val->intval = bat->bat_max;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
++ val->intval = bat->bat_min;
++ break;
++ case POWER_SUPPLY_PROP_TEMP:
++ val->intval = collie_read_temp(bat);
++ break;
++ case POWER_SUPPLY_PROP_PRESENT:
++ val->intval = bat->is_present ? bat->is_present(bat) : 1;
++ break;
++ default:
++ ret = -EINVAL;
++ break;
++ }
++ return ret;
++}
++
++static void collie_bat_external_power_changed(struct power_supply *psy)
++{
++ schedule_work(&bat_work);
++}
++
++static irqreturn_t collie_bat_gpio_isr(int irq, void *data)
++{
++ pr_info("collie_bat_gpio irq: %d\n", gpio_get_value(irq_to_gpio(irq)));
++ schedule_work(&bat_work);
++ return IRQ_HANDLED;
++}
++
++static void collie_bat_update(struct collie_bat *bat)
++{
++ int old;
++ struct power_supply *psy = &bat->psy;
++
++ mutex_lock(&bat->work_lock);
++
++ old = bat->status;
++
++ if (bat->is_present && !bat->is_present(bat)) {
++ printk(KERN_NOTICE "%s not present\n", psy->name);
++ bat->status = POWER_SUPPLY_STATUS_UNKNOWN;
++ bat->full_chrg = -1;
++ } else if (power_supply_am_i_supplied(psy)) {
++ if (bat->status == POWER_SUPPLY_STATUS_DISCHARGING) {
++ gpio_set_value(bat->gpio_charge_on, 1);
++ mdelay(15);
++ }
++
++ if (gpio_get_value(bat->gpio_full)) {
++ if (old == POWER_SUPPLY_STATUS_CHARGING ||
++ bat->full_chrg == -1)
++ bat->full_chrg = collie_read_bat(bat);
++
++ gpio_set_value(bat->gpio_charge_on, 0);
++ bat->status = POWER_SUPPLY_STATUS_FULL;
++ } else {
++ gpio_set_value(bat->gpio_charge_on, 1);
++ bat->status = POWER_SUPPLY_STATUS_CHARGING;
++ }
++ } else {
++ gpio_set_value(bat->gpio_charge_on, 0);
++ bat->status = POWER_SUPPLY_STATUS_DISCHARGING;
++ }
++
++ if (old != bat->status)
++ power_supply_changed(psy);
++
++ mutex_unlock(&bat->work_lock);
++}
++
++static void collie_bat_work(struct work_struct *work)
++{
++ collie_bat_update(&collie_bat_main);
++}
++
++
++static enum power_supply_property collie_bat_main_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX,
++ POWER_SUPPLY_PROP_PRESENT,
++ POWER_SUPPLY_PROP_TEMP,
++};
++
++static enum power_supply_property collie_bat_bu_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX,
++ POWER_SUPPLY_PROP_PRESENT,
++};
++
++static struct collie_bat collie_bat_main = {
++ .status = POWER_SUPPLY_STATUS_DISCHARGING,
++ .full_chrg = -1,
++ .psy = {
++ .name = "main-battery",
++ .type = POWER_SUPPLY_TYPE_BATTERY,
++ .properties = collie_bat_main_props,
++ .num_properties = ARRAY_SIZE(collie_bat_main_props),
++ .get_property = collie_bat_get_property,
++ .external_power_changed = collie_bat_external_power_changed,
++ .use_for_apm = 1,
++ },
++
++ .gpio_full = COLLIE_GPIO_CO,
++ .gpio_charge_on = COLLIE_GPIO_CHARGE_ON,
++
++ .technology = POWER_SUPPLY_TECHNOLOGY_LIPO,
++
++ .gpio_bat = COLLIE_GPIO_MBAT_ON,
++ .adc_bat = UCB_ADC_INP_AD1,
++ .adc_bat_divider = 155,
++ .bat_max = 4310000,
++ .bat_min = 1551 * 1000000 / 414,
++
++ .gpio_temp = COLLIE_GPIO_TMP_ON,
++ .adc_temp = UCB_ADC_INP_AD0,
++ .adc_temp_divider = 10000,
++};
++
++static struct collie_bat collie_bat_bu = {
++ .status = POWER_SUPPLY_STATUS_UNKNOWN,
++ .full_chrg = -1,
++
++ .psy = {
++ .name = "backup-battery",
++ .type = POWER_SUPPLY_TYPE_BATTERY,
++ .properties = collie_bat_bu_props,
++ .num_properties = ARRAY_SIZE(collie_bat_bu_props),
++ .get_property = collie_bat_get_property,
++ .external_power_changed = collie_bat_external_power_changed,
++ },
++
++ .gpio_full = -1,
++ .gpio_charge_on = -1,
++
++ .technology = POWER_SUPPLY_TECHNOLOGY_LiMn,
++
++ .gpio_bat = COLLIE_GPIO_BBAT_ON,
++ .adc_bat = UCB_ADC_INP_AD1,
++ .adc_bat_divider = 155,
++ .bat_max = 3000000,
++ .bat_min = 1900000,
++
++ .gpio_temp = -1,
++ .adc_temp = -1,
++ .adc_temp_divider = -1,
++};
++
++static struct {
++ int gpio;
++ char *name;
++ bool output;
++ int value;
++} gpios[] = {
++ { COLLIE_GPIO_CO, "main battery full", 0, 0 },
++ { COLLIE_GPIO_MAIN_BAT_LOW, "main battery low", 0, 0 },
++ { COLLIE_GPIO_CHARGE_ON, "main charge on", 1, 0 },
++ { COLLIE_GPIO_MBAT_ON, "main battery", 1, 0 },
++ { COLLIE_GPIO_TMP_ON, "main battery temp", 1, 0 },
++ { COLLIE_GPIO_BBAT_ON, "backup battery", 1, 0 },
++};
++
++#ifdef CONFIG_PM
++static int collie_bat_suspend(struct ucb1x00_dev *dev, pm_message_t state)
++{
++ /* flush all pending status updates */
++ flush_scheduled_work();
++ return 0;
++}
++
++static int collie_bat_resume(struct ucb1x00_dev *dev)
++{
++ /* things may have changed while we were away */
++ schedule_work(&bat_work);
++ return 0;
++}
++#else
++#define collie_bat_suspend NULL
++#define collie_bat_resume NULL
++#endif
++
++static int __devinit collie_bat_probe(struct ucb1x00_dev *dev)
++{
++ int ret;
++ int i;
++
++ if (!machine_is_collie())
++ return -ENODEV;
++
++ ucb = dev->ucb;
++
++ for (i = 0; i < ARRAY_SIZE(gpios); i++) {
++ ret = gpio_request(gpios[i].gpio, gpios[i].name);
++ if (ret) {
++ i--;
++ goto err_gpio;
++ }
++
++ if (gpios[i].output)
++ ret = gpio_direction_output(gpios[i].gpio,
++ gpios[i].value);
++ else
++ ret = gpio_direction_input(gpios[i].gpio);
++
++ if (ret)
++ goto err_gpio;
++ }
++
++ mutex_init(&collie_bat_main.work_lock);
++
++ INIT_WORK(&bat_work, collie_bat_work);
++
++ ret = power_supply_register(&dev->ucb->dev, &collie_bat_main.psy);
++ if (ret)
++ goto err_psy_reg_main;
++ ret = power_supply_register(&dev->ucb->dev, &collie_bat_bu.psy);
++ if (ret)
++ goto err_psy_reg_bu;
++
++ ret = request_irq(gpio_to_irq(COLLIE_GPIO_CO),
++ collie_bat_gpio_isr,
++ IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
++ "main full", &collie_bat_main);
++ if (!ret) {
++ schedule_work(&bat_work);
++ return 0;
++ }
++ power_supply_unregister(&collie_bat_bu.psy);
++err_psy_reg_bu:
++ power_supply_unregister(&collie_bat_main.psy);
++err_psy_reg_main:
++
++ /* see comment in collie_bat_remove */
++ flush_scheduled_work();
++
++ i--;
++err_gpio:
++ for (; i >= 0; i--)
++ gpio_free(gpios[i].gpio);
++
++ return ret;
++}
++
++static void __devexit collie_bat_remove(struct ucb1x00_dev *dev)
++{
++ int i;
++
++ free_irq(gpio_to_irq(COLLIE_GPIO_CO), &collie_bat_main);
++
++ power_supply_unregister(&collie_bat_bu.psy);
++ power_supply_unregister(&collie_bat_main.psy);
++
++ /*
++ * now flush all pending work.
++ * we won't get any more schedules, since all
++ * sources (isr and external_power_changed)
++ * are unregistered now.
++ */
++ flush_scheduled_work();
++
++ for (i = ARRAY_SIZE(gpios) - 1; i >= 0; i--)
++ gpio_free(gpios[i].gpio);
++}
++
++static struct ucb1x00_driver collie_bat_driver = {
++ .add = collie_bat_probe,
++ .remove = __devexit_p(collie_bat_remove),
++ .suspend = collie_bat_suspend,
++ .resume = collie_bat_resume,
++};
++
++static int __init collie_bat_init(void)
++{
++ return ucb1x00_register_driver(&collie_bat_driver);
++}
++
++static void __exit collie_bat_exit(void)
++{
++ ucb1x00_unregister_driver(&collie_bat_driver);
++}
++
++module_init(collie_bat_init);
++module_exit(collie_bat_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Thomas Kunze");
++MODULE_DESCRIPTION("Collie battery driver");
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0010-collie-support-pda_power-driver.patch b/recipes/linux/linux-2.6.31/collie/0010-collie-support-pda_power-driver.patch
new file mode 100644
index 0000000000..cc37340de4
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0010-collie-support-pda_power-driver.patch
@@ -0,0 +1,103 @@
+From d1602a7c25ad8abbbcb1e15cfb5f7c59e83ce028 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Tue, 10 Feb 2009 13:48:32 +0100
+Subject: [PATCH 10/15] collie: support pda_power driver
+
+This add the pda-power platform device to collie.
+---
+ arch/arm/mach-sa1100/collie.c | 65 +++++++++++++++++++++++++++++++++++++++++
+ 1 files changed, 65 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
+index 395cf09..fdab9d9 100644
+--- a/arch/arm/mach-sa1100/collie.c
++++ b/arch/arm/mach-sa1100/collie.c
+@@ -26,6 +26,7 @@
+ #include <linux/mtd/partitions.h>
+ #include <linux/timer.h>
+ #include <linux/gpio.h>
++#include <linux/pda_power.h>
+
+ #include <mach/hardware.h>
+ #include <asm/mach-types.h>
+@@ -89,6 +90,69 @@ static struct mcp_plat_data collie_mcp_data = {
+ .gpio_base = COLLIE_TC35143_GPIO_BASE,
+ };
+
++/*
++ * Collie AC IN
++ */
++static int collie_power_init(struct device *dev)
++{
++ int ret = gpio_request(COLLIE_GPIO_AC_IN, "ac in");
++ if (ret)
++ goto err_gpio_req;
++
++ ret = gpio_direction_input(COLLIE_GPIO_AC_IN);
++ if (ret)
++ goto err_gpio_in;
++
++ return 0;
++
++err_gpio_in:
++ gpio_free(COLLIE_GPIO_AC_IN);
++err_gpio_req:
++ return ret;
++}
++
++static void collie_power_exit(struct device *dev)
++{
++ gpio_free(COLLIE_GPIO_AC_IN);
++}
++
++static int collie_power_ac_online(void)
++{
++ return gpio_get_value(COLLIE_GPIO_AC_IN) == 2;
++}
++
++static char *collie_ac_supplied_to[] = {
++ "main-battery",
++ "backup-battery",
++};
++
++static struct pda_power_pdata collie_power_data = {
++ .init = collie_power_init,
++ .is_ac_online = collie_power_ac_online,
++ .exit = collie_power_exit,
++ .supplied_to = collie_ac_supplied_to,
++ .num_supplicants = ARRAY_SIZE(collie_ac_supplied_to),
++};
++
++static struct resource collie_power_resource[] = {
++ {
++ .name = "ac",
++ .start = gpio_to_irq(COLLIE_GPIO_AC_IN),
++ .end = gpio_to_irq(COLLIE_GPIO_AC_IN),
++ .flags = IORESOURCE_IRQ |
++ IORESOURCE_IRQ_HIGHEDGE |
++ IORESOURCE_IRQ_LOWEDGE,
++ },
++};
++
++static struct platform_device collie_power_device = {
++ .name = "pda-power",
++ .id = -1,
++ .dev.platform_data = &collie_power_data,
++ .resource = collie_power_resource,
++ .num_resources = ARRAY_SIZE(collie_power_resource),
++};
++
+ #ifdef CONFIG_SHARP_LOCOMO
+ /*
+ * low-level UART features.
+@@ -180,6 +244,7 @@ struct platform_device collie_locomo_device = {
+ static struct platform_device *devices[] __initdata = {
+ &collie_locomo_device,
+ &colliescoop_device,
++ &collie_power_device,
+ };
+
+ static struct mtd_partition collie_partitions[] = {
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0011-fix-collie-keyboard-bug.patch b/recipes/linux/linux-2.6.31/collie/0011-fix-collie-keyboard-bug.patch
new file mode 100644
index 0000000000..283314c383
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0011-fix-collie-keyboard-bug.patch
@@ -0,0 +1,24 @@
+From cd73a608d2af290824e6bd0690777a8115467da0 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Mon, 20 Oct 2008 17:40:32 +0200
+Subject: [PATCH 11/15] fix collie keyboard bug
+
+---
+ drivers/input/keyboard/locomokbd.c | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/input/keyboard/locomokbd.c b/drivers/input/keyboard/locomokbd.c
+index 9caed30..79e19bf 100644
+--- a/drivers/input/keyboard/locomokbd.c
++++ b/drivers/input/keyboard/locomokbd.c
+@@ -265,6 +265,7 @@ static int __devinit locomokbd_probe(struct locomo_dev *dev)
+ for (i = 0; i < LOCOMOKBD_NUMKEYS; i++)
+ set_bit(locomokbd->keycode[i], input_dev->keybit);
+ clear_bit(0, input_dev->keybit);
++ locomo_writel(0, locomokbd->base + LOCOMO_KSC);
+
+ /* attempt to get the interrupt */
+ err = request_irq(dev->irq[0], locomokbd_interrupt, 0, "locomokbd", locomokbd);
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0012-add-collie-touchscreen-driver.patch b/recipes/linux/linux-2.6.31/collie/0012-add-collie-touchscreen-driver.patch
new file mode 100644
index 0000000000..9ccb0ff6a1
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0012-add-collie-touchscreen-driver.patch
@@ -0,0 +1,533 @@
+From 0bc8b02b3f6ea77df20f7c7770d19261159d662d Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Tue, 6 Oct 2009 22:10:51 +0200
+Subject: [PATCH 12/15] add collie touchscreen driver
+
+Conflicts:
+
+ drivers/input/touchscreen/Kconfig
+ drivers/input/touchscreen/Makefile
+ drivers/mfd/Makefile
+---
+ drivers/input/touchscreen/Kconfig | 6 +
+ drivers/input/touchscreen/Makefile | 1 +
+ drivers/input/touchscreen/collie-ts.c | 449 +++++++++++++++++++++++++++++++++
+ drivers/mfd/Makefile | 1 -
+ include/linux/mfd/ucb1x00.h | 3 +
+ 5 files changed, 459 insertions(+), 1 deletions(-)
+ create mode 100644 drivers/input/touchscreen/collie-ts.c
+
+diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
+index 72e2712..bcd73a6 100644
+--- a/drivers/input/touchscreen/Kconfig
++++ b/drivers/input/touchscreen/Kconfig
+@@ -296,6 +296,12 @@ config TOUCHSCREEN_ATMEL_TSADCC
+ To compile this driver as a module, choose M here: the
+ module will be called atmel_tsadcc.
+
++config TOUCHSCREEN_COLLIE_TS
++ tristate "Touchscreen collie support"
++ depends on MCP_UCB1200 && INPUT && !MCP_UCB1200_TS
++ help
++ Driver for touchscreen on collie - sharp sl-5500.
++
+ config TOUCHSCREEN_UCB1400
+ tristate "Philips UCB1400 touchscreen"
+ depends on AC97_BUS
+diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
+index 3e1c5e0..a24d32c 100644
+--- a/drivers/input/touchscreen/Makefile
++++ b/drivers/input/touchscreen/Makefile
+@@ -29,6 +29,7 @@ obj-$(CONFIG_TOUCHSCREEN_TOUCHIT213) += touchit213.o
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
+ obj-$(CONFIG_TOUCHSCREEN_TSC2007) += tsc2007.o
++obj-$(CONFIG_TOUCHSCREEN_COLLIE_TS) += collie-ts.o
+ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o
+ obj-$(CONFIG_TOUCHSCREEN_WACOM_W8001) += wacom_w8001.o
+ obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o
+diff --git a/drivers/input/touchscreen/collie-ts.c b/drivers/input/touchscreen/collie-ts.c
+new file mode 100644
+index 0000000..c7c0272
+--- /dev/null
++++ b/drivers/input/touchscreen/collie-ts.c
+@@ -0,0 +1,449 @@
++/*
++ * Touchscreen driver for UCB1x00-based touchscreens
++ *
++ * Copyright (C) 2001 Russell King, All Rights Reserved.
++ * Copyright (C) 2005 Pavel Machek
++ *
++ * 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.
++ *
++ * 21-Jan-2002 <jco@ict.es> :
++ *
++ * Added support for synchronous A/D mode. This mode is useful to
++ * avoid noise induced in the touchpanel by the LCD, provided that
++ * the UCB1x00 has a valid LCD sync signal routed to its ADCSYNC pin.
++ * It is important to note that the signal connected to the ADCSYNC
++ * pin should provide pulses even when the LCD is blanked, otherwise
++ * a pen touch needed to unblank the LCD will never be read.
++ */
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/init.h>
++#include <linux/smp.h>
++#include <linux/smp_lock.h>
++#include <linux/sched.h>
++#include <linux/completion.h>
++#include <linux/delay.h>
++#include <linux/string.h>
++#include <linux/input.h>
++#include <linux/device.h>
++#include <linux/freezer.h>
++#include <linux/slab.h>
++#include <linux/kthread.h>
++#include <linux/semaphore.h>
++
++#include <mach/dma.h>
++#include <mach/collie.h>
++#include <asm/mach-types.h>
++
++#include <linux/mfd/ucb1x00.h>
++
++struct ucb1x00_ts {
++ struct input_dev *idev;
++ struct ucb1x00 *ucb;
++
++ wait_queue_head_t irq_wait;
++ struct task_struct *rtask;
++ u16 x_res;
++ u16 y_res;
++
++ unsigned int adcsync:1;
++};
++
++static int adcsync;
++
++/**********************************
++
++ ................
++ . . = 340
++ . .
++ . ^.
++ . ^.
++ . ^.
++ . ^.
++ . .
++ . X. = 10
++ . <<<<<<<< Y .
++ ................
++ . Sharp =200
++ . .
++ . - O - .
++ . .
++ ................
++
++**********************************/
++
++
++static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x, u16 y)
++{
++ struct input_dev *idev = ts->idev;
++
++ input_report_abs(idev, ABS_X, x);
++ input_report_abs(idev, ABS_Y, y);
++ input_report_abs(idev, ABS_PRESSURE, pressure);
++ input_report_key(idev, BTN_TOUCH, 1);
++ input_sync(idev);
++}
++
++static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts)
++{
++ struct input_dev *idev = ts->idev;
++
++ input_report_abs(idev, ABS_PRESSURE, 0);
++ input_report_key(idev, BTN_TOUCH, 0);
++ input_sync(idev);
++}
++
++/*
++ * Switch to interrupt mode. This set touchscreen to interrupt
++ * mode, so that chip is able to send interrupt.
++ */
++static inline void ucb1x00_ts_mode_int(struct ucb1x00_ts *ts)
++{
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSMX_POW | UCB_TS_CR_TSPX_POW |
++ UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_GND |
++ UCB_TS_CR_MODE_INT);
++}
++
++/*
++ * Switch to pressure mode, and read pressure. We don't need to wait
++ * here, since both plates are being driven.
++ *
++ * set_read_pressure() in sharp code
++ */
++static inline void ucb1x00_ts_read_pressure(struct ucb1x00_ts *ts)
++{
++ ucb1x00_io_write(ts->ucb, COLLIE_TC35143_GPIO_TBL_CHK, 0);
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSPX_POW | UCB_TS_CR_TSMX_POW |
++ UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
++
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_AD2 |
++ UCB_ADC_SYNC_ENA);
++ udelay(100);
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_AD2 |
++ UCB_ADC_SYNC_ENA | UCB_ADC_START);
++}
++
++/*
++ * Switch to X position mode and measure Y plate. We switch the plate
++ * configuration in pressure mode, then switch to position mode. This
++ * gives a faster response time. Even so, we need to wait about 55us
++ * for things to stabilise.
++ */
++static inline void ucb1x00_ts_read_xpos(struct ucb1x00_ts *ts)
++{
++ ucb1x00_io_write(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK);
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW |
++ UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
++
++
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_TSPY | UCB_ADC_SYNC_ENA);
++ udelay(100);
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_TSPY | UCB_ADC_SYNC_ENA |
++ UCB_ADC_START);
++}
++
++/*
++ * Switch to Y position mode and measure X plate. We switch the plate
++ * configuration in pressure mode, then switch to position mode. This
++ * gives a faster response time. Even so, we need to wait about 55us
++ * for things to stabilise.
++ */
++static inline void ucb1x00_ts_read_ypos(struct ucb1x00_ts *ts)
++{
++ ucb1x00_io_write(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK);
++
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW |
++ UCB_TS_CR_MODE_POS | UCB_TS_CR_BIAS_ENA);
++
++
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_TSPX | UCB_ADC_SYNC_ENA);
++ udelay(100);
++ ucb1x00_reg_write(ts->ucb, UCB_ADC_CR, ts->ucb->adc_cr |
++ UCB_ADC_INP_TSPX | UCB_ADC_SYNC_ENA |
++ UCB_ADC_START);
++}
++
++/*
++ * Switch to X plate resistance mode. Set MX to ground, PX to
++ * supply. Measure current.
++ */
++static inline unsigned int ucb1x00_ts_read_xres(struct ucb1x00_ts *ts)
++{
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSMX_GND | UCB_TS_CR_TSPX_POW |
++ UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
++ return ucb1x00_adc_read(ts->ucb, 0, ts->adcsync);
++}
++
++/*
++ * Switch to Y plate resistance mode. Set MY to ground, PY to
++ * supply. Measure current.
++ */
++static inline unsigned int ucb1x00_ts_read_yres(struct ucb1x00_ts *ts)
++{
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR,
++ UCB_TS_CR_TSMY_GND | UCB_TS_CR_TSPY_POW |
++ UCB_TS_CR_MODE_PRES | UCB_TS_CR_BIAS_ENA);
++ return ucb1x00_adc_read(ts->ucb, 0, ts->adcsync);
++}
++
++/*
++ * This is a RT kernel thread that handles the ADC accesses
++ * (mainly so we can use semaphores in the UCB1200 core code
++ * to serialise accesses to the ADC).
++ */
++static int ucb1x00_thread(void *_ts)
++{
++ struct ucb1x00_ts *ts = _ts;
++ struct task_struct *tsk = current;
++ DECLARE_WAITQUEUE(wait, tsk);
++ int state;
++
++ /*
++ * We could run as a real-time thread. However, thus far
++ * this doesn't seem to be necessary.
++ */
++
++ add_wait_queue(&ts->irq_wait, &wait);
++
++ while (!kthread_should_stop()) {
++ unsigned int data[3];
++
++ for (state=0; state<3; state++) {
++
++ ucb1x00_adc_enable(ts->ucb);
++ ucb1x00_enable_irq(ts->ucb, UCB_IRQ_ADC, UCB_FALLING);
++ switch (state) {
++ /* Order matters here; last measurement seems to be more noisy then the
++ rest, and we care about pressure least */
++ case 2: ucb1x00_ts_read_pressure(ts);
++ break;
++ case 0: ucb1x00_ts_read_ypos(ts);
++ break;
++ case 1: ucb1x00_ts_read_xpos(ts);
++ break;
++ }
++ /* wait for adc */
++ try_to_freeze();
++ schedule_timeout(1000 * HZ);
++ ucb1x00_disable_irq(ts->ucb, UCB_IRQ_ADC, UCB_FALLING);
++ data[state] = UCB_ADC_DAT(ucb1x00_reg_read(ts->ucb, UCB_ADC_DATA));
++ ucb1x00_adc_disable(ts->ucb);
++ }
++
++ /* If not pressed any more, try to sleep! */
++ if (data[2] < 300) {
++ set_task_state(tsk, TASK_INTERRUPTIBLE);
++ ucb1x00_enable_irq(ts->ucb, UCB_IRQ_TSPX, UCB_RISING);
++ ucb1x00_ts_mode_int(ts);
++ ucb1x00_disable(ts->ucb);
++ ucb1x00_ts_event_release(ts);
++ try_to_freeze();
++ schedule_timeout(1000 * HZ);
++ ucb1x00_disable_irq(ts->ucb, UCB_IRQ_TSPX, UCB_RISING);
++ ucb1x00_enable(ts->ucb);
++ } else {
++ ucb1x00_ts_evt_add(ts, data[2], data[1], data[0]);
++ }
++ ucb1x00_disable(ts->ucb);
++ msleep(20);
++ ucb1x00_enable(ts->ucb);
++ }
++
++ remove_wait_queue(&ts->irq_wait, &wait);
++
++ ts->rtask = NULL;
++ return 0;
++}
++
++/*
++ * We only detect touch screen _touches_ with this interrupt
++ * handler, and even then we just schedule our task.
++ */
++static void ucb1x00_ts_irq(int idx, void *id)
++{
++ struct ucb1x00_ts *ts = id;
++ wake_up(&ts->irq_wait);
++}
++
++static void ucb1x00_adc_irq(int idx, void *id)
++{
++ struct ucb1x00_ts *ts = id;
++ wake_up(&ts->irq_wait);
++}
++
++static int ucb1x00_ts_open(struct input_dev *idev)
++{
++ struct ucb1x00_ts *ts = input_get_drvdata(idev);
++ int ret = 0;
++
++ BUG_ON(ts->rtask);
++
++ init_waitqueue_head(&ts->irq_wait);
++
++ ret = ucb1x00_hook_irq(ts->ucb, UCB_IRQ_TSPX, ucb1x00_ts_irq, ts);
++ if (ret < 0)
++ return ret;
++
++ ret = ucb1x00_hook_irq(ts->ucb, UCB_IRQ_ADC, ucb1x00_adc_irq, ts);
++ if (ret < 0) {
++ ucb1x00_free_irq(ts->ucb, UCB_IRQ_TSPX, ts);
++ return ret;
++ }
++
++ ucb1x00_enable_irq(ts->ucb, UCB_IRQ_TSPX, UCB_RISING);
++
++ /*
++ * If we do this at all, we should allow the user to
++ * measure and read the X and Y resistance at any time.
++ */
++ ucb1x00_adc_enable(ts->ucb);
++ ts->x_res = ucb1x00_ts_read_xres(ts);
++ ts->y_res = ucb1x00_ts_read_yres(ts);
++ ucb1x00_adc_disable(ts->ucb);
++
++ if (machine_is_collie()) {
++ ucb1x00_io_set_dir(ts->ucb, 0, COLLIE_TC35143_GPIO_TBL_CHK);
++ }
++
++ ts->rtask = kthread_run(ucb1x00_thread, ts, "ktsd");
++ if (!IS_ERR(ts->rtask)) {
++ ret = 0;
++ } else {
++ ucb1x00_free_irq(ts->ucb, UCB_IRQ_TSPX, ts);
++ ts->rtask = NULL;
++ ret = -EFAULT;
++ }
++
++ return ret;
++}
++
++/*
++ * Release touchscreen resources. Disable IRQs.
++ */
++static void ucb1x00_ts_close(struct input_dev *idev)
++{
++ struct ucb1x00_ts *ts = input_get_drvdata(idev);
++
++ if (ts->rtask)
++ kthread_stop(ts->rtask);
++
++ ucb1x00_enable(ts->ucb);
++ ucb1x00_free_irq(ts->ucb, UCB_IRQ_TSPX, ts);
++ ucb1x00_free_irq(ts->ucb, UCB_IRQ_ADC, ts);
++ ucb1x00_reg_write(ts->ucb, UCB_TS_CR, 0);
++ ucb1x00_disable(ts->ucb);
++}
++
++#ifdef CONFIG_PM
++static int ucb1x00_ts_resume(struct ucb1x00_dev *dev)
++{
++ struct ucb1x00_ts *ts = dev->priv;
++
++ if (ts->rtask != NULL) {
++ /*
++ * Restart the TS thread to ensure the
++ * TS interrupt mode is set up again
++ * after sleep.
++ */
++ wake_up(&ts->irq_wait);
++ }
++ return 0;
++}
++#else
++#define ucb1x00_ts_resume NULL
++#endif
++
++
++/*
++ * Initialisation.
++ */
++static int ucb1x00_ts_add(struct ucb1x00_dev *dev)
++{
++ struct ucb1x00_ts *ts;
++ struct input_dev *idev;
++ int err;
++
++ ts = kzalloc(sizeof(struct ucb1x00_ts), GFP_KERNEL);
++ idev = input_allocate_device();
++ if (!ts || !idev) {
++ err = -ENOMEM;
++ goto fail;
++ }
++
++ ts->ucb = dev->ucb;
++ ts->idev = idev;
++ ts->adcsync = adcsync ? UCB_SYNC : UCB_NOSYNC;
++
++ input_set_drvdata(idev, ts);
++ idev->name = "Touchscreen panel";
++ idev->id.product = ts->ucb->id;
++ idev->open = ucb1x00_ts_open;
++ idev->close = ucb1x00_ts_close;
++
++ __set_bit(EV_ABS, idev->evbit);
++ __set_bit(ABS_X, idev->absbit);
++ __set_bit(ABS_Y, idev->absbit);
++ __set_bit(ABS_PRESSURE, idev->absbit);
++
++ input_set_abs_params(ts->idev, ABS_X, 0, 450, 0, 0);
++ input_set_abs_params(ts->idev, ABS_Y, 200, 800, 0, 0);
++ input_set_abs_params(ts->idev, ABS_PRESSURE, 400, 800, 0, 0);
++
++
++ err = input_register_device(idev);
++ if (err)
++ goto fail;
++
++ dev->priv = ts;
++
++ return 0;
++
++ fail:
++ input_free_device(idev);
++ kfree(ts);
++ return err;
++}
++
++static void ucb1x00_ts_remove(struct ucb1x00_dev *dev)
++{
++ struct ucb1x00_ts *ts = dev->priv;
++
++ input_unregister_device(ts->idev);
++ kfree(ts);
++}
++
++static struct ucb1x00_driver ucb1x00_ts_driver = {
++ .add = ucb1x00_ts_add,
++ .remove = ucb1x00_ts_remove,
++ .resume = ucb1x00_ts_resume,
++};
++
++static int __init ucb1x00_ts_init(void)
++{
++ return ucb1x00_register_driver(&ucb1x00_ts_driver);
++}
++
++static void __exit ucb1x00_ts_exit(void)
++{
++ ucb1x00_unregister_driver(&ucb1x00_ts_driver);
++}
++
++module_param(adcsync, int, 0444);
++module_init(ucb1x00_ts_init);
++module_exit(ucb1x00_ts_exit);
++
++MODULE_AUTHOR("Russell King <rmk@arm.linux.org.uk>");
++MODULE_DESCRIPTION("UCB1x00 touchscreen driver");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
+index 6f8a9a1..184a8a9 100644
+--- a/drivers/mfd/Makefile
++++ b/drivers/mfd/Makefile
+@@ -32,7 +32,6 @@ obj-$(CONFIG_MCP) += mcp-core.o
+ obj-$(CONFIG_MCP_SA11X0) += mcp-sa11x0.o
+ obj-$(CONFIG_MCP_UCB1200) += ucb1x00-core.o
+ obj-$(CONFIG_MCP_UCB1200_TS) += ucb1x00-ts.o
+-
+ ifeq ($(CONFIG_SA1100_ASSABET),y)
+ obj-$(CONFIG_MCP_UCB1200) += ucb1x00-assabet.o
+ endif
+diff --git a/include/linux/mfd/ucb1x00.h b/include/linux/mfd/ucb1x00.h
+index aa9c378..b13171e 100644
+--- a/include/linux/mfd/ucb1x00.h
++++ b/include/linux/mfd/ucb1x00.h
+@@ -37,7 +37,10 @@
+ #define UCB_IE_TCLIP (1 << 14)
+ #define UCB_IE_ACLIP (1 << 15)
+
++/* UCB1200 irqs */
++#define UCB_IRQ_ADC 11
+ #define UCB_IRQ_TSPX 12
++#define UCB_IRQ_TSMX 13
+
+ #define UCB_TC_A 0x05
+ #define UCB_TC_A_LOOP (1 << 7) /* UCB1200 */
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0013-add-sa1100-udc-hack-extra-hacked-for-collie.patch b/recipes/linux/linux-2.6.31/collie/0013-add-sa1100-udc-hack-extra-hacked-for-collie.patch
new file mode 100644
index 0000000000..446139d911
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0013-add-sa1100-udc-hack-extra-hacked-for-collie.patch
@@ -0,0 +1,70 @@
+From 6458bd21e2c8cc3f5be98d8ea33854eb53fb138f Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Thu, 8 Oct 2009 00:12:48 +0200
+Subject: [PATCH 13/15] add sa1100-udc hack (extra hacked for collie)
+
+---
+ arch/arm/mach-sa1100/include/mach/collie.h | 5 ++---
+ drivers/usb/gadget/Kconfig | 15 +++++++++++++++
+ drivers/usb/gadget/Makefile | 1 +
+ 3 files changed, 18 insertions(+), 3 deletions(-)
+
+diff --git a/arch/arm/mach-sa1100/include/mach/collie.h b/arch/arm/mach-sa1100/include/mach/collie.h
+index 71a0b3f..1e5f492 100644
+--- a/arch/arm/mach-sa1100/include/mach/collie.h
++++ b/arch/arm/mach-sa1100/include/mach/collie.h
+@@ -23,11 +23,10 @@
+ #define COLLIE_SCP_5VON SCOOP_GPCR_PA16
+ #define COLLIE_SCP_AMP_ON SCOOP_GPCR_PA17
+ #define COLLIE_GPIO_VPEN (COLLIE_SCOOP_GPIO_BASE + 7)
+-#define COLLIE_SCP_LB_VOL_CHG SCOOP_GPCR_PA19
++#define COLLIE_GPIO_LB_VOL_CHG (COLLIE_SCOOP_GPIO_BASE + 8)
+
+ #define COLLIE_SCOOP_IO_DIR (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R | \
+- COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON | \
+- COLLIE_SCP_LB_VOL_CHG)
++ COLLIE_SCP_5VON | COLLIE_SCP_AMP_ON)
+ #define COLLIE_SCOOP_IO_OUT (COLLIE_SCP_MUTE_L | COLLIE_SCP_MUTE_R)
+
+ /* GPIOs for gpiolib */
+diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
+index 7f8e83a..d7da5c9 100644
+--- a/drivers/usb/gadget/Kconfig
++++ b/drivers/usb/gadget/Kconfig
+@@ -500,6 +500,21 @@ config USB_LANGWELL
+ # LAST -- dummy/emulated controller
+ #
+
++config USB_GADGET_SA1100
++ boolean "SA1100 USB Device Port"
++ depends on ARCH_SA1100
++ select USB_GADGET_SELECTED
++ help
++
++ Say "y" to link the driver statically, or "m" to build a
++ dynamically linked module called "sa1100_udc" and force all
++ gadget drivers to also be dynamically linked.
++
++config USB_SA1100
++ tristate
++ depends on USB_GADGET_SA1100
++ default USB_GADGET
++
+ config USB_GADGET_DUMMY_HCD
+ boolean "Dummy HCD (DEVELOPMENT)"
+ depends on USB=y || (USB=m && USB_GADGET=m)
+diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
+index e6017e6..1984d4a 100644
+--- a/drivers/usb/gadget/Makefile
++++ b/drivers/usb/gadget/Makefile
+@@ -15,6 +15,7 @@ obj-$(CONFIG_USB_GOKU) += goku_udc.o
+ obj-$(CONFIG_USB_OMAP) += omap_udc.o
+ obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o
+ obj-$(CONFIG_USB_S3C2410) += s3c2410_udc.o
++obj-$(CONFIG_USB_SA1100) += sa1100_udc.o
+ obj-$(CONFIG_USB_AT91) += at91_udc.o
+ obj-$(CONFIG_USB_ATMEL_USBA) += atmel_usba_udc.o
+ obj-$(CONFIG_USB_FSL_USB2) += fsl_usb2_udc.o
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0014-gadget-add-file.patch b/recipes/linux/linux-2.6.31/collie/0014-gadget-add-file.patch
new file mode 100644
index 0000000000..52dfd7eaa9
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0014-gadget-add-file.patch
@@ -0,0 +1,2568 @@
+From 14d5ae9ea28bf9418e6d58b4058019b1fe2d6877 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Fri, 9 Oct 2009 21:58:42 +0200
+Subject: [PATCH 14/15] gadget add file
+
+---
+ drivers/usb/gadget/sa1100_udc.c | 2447 +++++++++++++++++++++++++++++++++++++++
+ drivers/usb/gadget/sa1100_udc.h | 94 ++
+ 2 files changed, 2541 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/usb/gadget/sa1100_udc.c
+ create mode 100644 drivers/usb/gadget/sa1100_udc.h
+
+diff --git a/drivers/usb/gadget/sa1100_udc.c b/drivers/usb/gadget/sa1100_udc.c
+new file mode 100644
+index 0000000..5b9dad1
+--- /dev/null
++++ b/drivers/usb/gadget/sa1100_udc.c
+@@ -0,0 +1,2447 @@
++/*
++ * SA1100 USB Device Controller (UDC) driver.
++ *
++ * Copyright (C) Compaq Computer Corporation, 1998, 1999
++ * Copyright (C) Extenex Corporation, 2001
++ * Copyright (C) David Brownell, 2003
++ * Copyright (C) Nick Bane, 2005, 2006, 2007
++ * Many fragments from pxa2xx_udc.c and mach-sa1100 driver with various
++ * GPL Copyright authors incl Russel king and Nicolas Pitre
++ * Working port to 2.6.32-1 by N C Bane
++ *
++ * This file provides interrupt routing and overall coordination for the
++ * sa1100 USB endpoints: ep0, ep1out-bulk, ep2in-bulk, as well as device
++ * initialization and some parts of USB "Chapter 9" device behavior.
++ *
++ * It implements the "USB gadget controller" API, abstracting most hardware
++ * details so that drivers running on top of this API are mostly independent
++ * of hardware. A key exception is that ep0 logic needs to understand which
++ * endpoints a given controller has, and their capabilities. Also, hardware
++ * that doesn't fully support USB (like sa1100) may need workarounds in the
++ * protocols implemented by device functions.
++ *
++ * See linux/Documentation/arm/SA1100/SA1100_USB for more info, or the
++ * kerneldoc for the API exposed to gadget drivers.
++ *
++ */
++//#define DEBUG 1
++//#define VERBOSE 1
++
++//#define SA1100_USB_DEBUG
++#ifdef SA1100_USB_DEBUG
++static int sa1100_usb_debug=0;
++#endif
++
++#define NCB_DMA_FIX
++#ifdef NCB_DMA_FIX
++// This is a clunky fix for dma alignemnt issues
++// It should probably be done better by someone more
++// steeped in DMA lore
++#include <linux/slab.h>
++#define SEND_BUFFER_SIZE 4096 /* this is probably a bit big */
++#define RECEIVE_BUFFER_SIZE 256 /* 64 may be all that is necessary */
++static char *send_buffer=NULL;
++static char *receive_buffer=NULL;
++#endif
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/ioport.h>
++#include <linux/sched.h>
++#include <linux/slab.h>
++#include <linux/smp_lock.h>
++#include <linux/errno.h>
++#include <linux/init.h>
++#include <linux/timer.h>
++#include <linux/list.h>
++#include <linux/interrupt.h>
++#include <linux/version.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++
++#include <asm/byteorder.h>
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <mach/dma.h>
++#include <asm/system.h>
++#include <asm/mach-types.h>
++#include <asm/unaligned.h>
++
++#include <linux/usb.h>
++#include <linux/usb/ch9.h>
++#include <linux/usb/gadget.h>
++
++#if CONFIG_PROC_FS
++#include <linux/proc_fs.h>
++#endif
++
++#if defined(CONFIG_SA1100_BALLOON)
++#include <asm/arch/balloon2.h>
++#endif
++
++#if defined(CONFIG_SA1100_COLLIE)
++#include <linux/gpio.h>
++#include <mach/collie.h>
++#endif
++
++#define DRIVER_VERSION __DATE__
++
++#define DMA_ADDR_INVALID (~(dma_addr_t)0)
++
++
++static const char driver_name [] = "sa1100_udc";
++static const char driver_desc [] = "SA-1110 USB Device Controller";
++
++static const char ep0name [] = "ep0";
++
++#ifdef DEBUG
++static char *type_string (u8 bmAttributes)
++{
++ switch ( (bmAttributes) & USB_ENDPOINT_XFERTYPE_MASK) {
++ case USB_ENDPOINT_XFER_BULK: return "bulk";
++ //case USB_ENDPOINT_XFER_ISOC: return "iso";
++ case USB_ENDPOINT_XFER_INT: return "intr";
++ };
++ return "control";
++}
++#endif
++
++#include <linux/dma-mapping.h>
++struct usb_stats_t {
++ unsigned long ep0_fifo_write_failures;
++ unsigned long ep0_bytes_written;
++ unsigned long ep0_fifo_read_failures;
++ unsigned long ep0_bytes_read;
++};
++
++struct usb_info_t {
++ dma_regs_t *dmaregs_tx, *dmaregs_rx;
++ int state;
++ unsigned char address;
++ struct usb_stats_t stats;
++};
++
++enum { kError=-1, kEvSuspend=0, kEvReset=1,
++ kEvResume=2, kEvAddress=3, kEvConfig=4, kEvDeConfig=5 };
++int usbctl_next_state_on_event( int event ) {
++ return 0;
++}
++static struct usb_info_t usbd_info;
++
++/* receiver */
++void ep1_reset(void);
++void ep1_stall(void);
++int sa1100_usb_recv (struct usb_request *req, void (*callback) (int,int));
++
++/* xmitter */
++void ep2_reset(void);
++void ep2_stall(void);
++int sa1100_usb_send (struct usb_request *req, void (*callback) (int,int));
++
++/* UDC register utility functions */
++#define UDC_write(reg, val) { \
++ int i = 10000; \
++ do { \
++ (reg) = (val); \
++ if (i-- <= 0) { \
++ printk( "%s [%d]: write %#x to %p (%#lx) failed\n", \
++ __FUNCTION__, __LINE__, (val), &(reg), (reg)); \
++ break; \
++ } \
++ } while((reg) != (val)); \
++}
++
++#define UDC_set(reg, val) { \
++ int i = 10000; \
++ do { \
++ (reg) |= (val); \
++ if (i-- <= 0) { \
++ printk( "%s [%d]: set %#x of %p (%#lx) failed\n", \
++ __FUNCTION__, __LINE__, (val), &(reg), (reg)); \
++ break; \
++ } \
++ } while(!((reg) & (val))); \
++}
++
++#define UDC_clear(reg, val) { \
++ int i = 10000; \
++ do { \
++ (reg) &= ~(val); \
++ if (i-- <= 0) { \
++ printk( "%s [%d]: clear %#x of %p (%#lx) failed\n", \
++ __FUNCTION__, __LINE__, (val), &(reg), (reg)); \
++ break; \
++ } \
++ } while((reg) & (val)); \
++}
++
++#define UDC_flip(reg, val) { \
++ int i = 10000; \
++ (reg) = (val); \
++ do { \
++ (reg) = (val); \
++ if (i-- <= 0) { \
++ printk( "%s [%d]: flip %#x of %p (%#lx) failed\n", \
++ __FUNCTION__, __LINE__, (val), &(reg), (reg)); \
++ break; \
++ } \
++ } while(((reg) & (val))); \
++}
++
++#include "sa1100_udc.h"
++
++static struct sa1100_udc *the_controller;
++static void nuke (struct sa1100_ep *, int status);
++static void done (struct sa1100_ep *ep, struct sa1100_request *req, int status);
++static inline void ep0_idle (struct sa1100_udc *dev)
++{
++ dev->ep0state = EP0_IDLE;
++}
++
++// ep0 handlers
++
++// 1 == lots of trace noise, 0 = only "important' stuff
++#define VERBOSITY 0
++
++#if 1 && !defined( ASSERT )
++# define ASSERT(expr) \
++ if(!(expr)) { \
++ printk( "Assertion failed! %s,%s,%s,line=%d\n",\
++ #expr,__FILE__,__FUNCTION__,__LINE__); \
++ }
++#else
++# define ASSERT(expr)
++#endif
++
++#if VERBOSITY
++#define PRINTKD(fmt, args...) printk( fmt , ## args)
++#else
++#define PRINTKD(fmt, args...)
++#endif
++
++/* other subroutines */
++unsigned int (*wrint)(void);
++void ep0_int_hndlr( void );
++static void ep0_queue(void *buf, unsigned int req, unsigned int act);
++static void write_fifo( void );
++static int read_fifo( struct usb_ctrlrequest * p );
++
++/* some voodo helpers 01Mar01ww */
++static void set_cs_bits( __u32 set_bits );
++static void set_de( void );
++static void set_ipr( void );
++static void set_ipr_and_de( void );
++static bool clear_opr( void );
++
++/***************************************************************************
++Inline Helpers
++***************************************************************************/
++
++/* Data extraction from usb_request_t fields */
++enum { kTargetDevice=0, kTargetInterface=1, kTargetEndpoint=2 };
++static inline int request_target( __u8 b ) { return (int) ( b & 0x0F); }
++
++static inline int windex_to_ep_num( __u16 w ) { return (int) ( w & 0x000F); }
++inline int type_code_from_request( __u8 by ) { return (( by >> 4 ) & 3); }
++
++/* following is hook for self-powered flag in GET_STATUS. Some devices
++ .. might like to override and return real info */
++static inline bool self_powered_hook( void ) { return true; }
++
++#if VERBOSITY
++/* "pcs" == "print control status" */
++static inline void pcs( void )
++{
++ __u32 foo = Ser0UDCCS0;
++ printk( "%8.8X: %s %s %s %s\n",
++ foo,
++ foo & UDCCS0_SE ? "SE" : "",
++ foo & UDCCS0_OPR ? "OPR" : "",
++ foo & UDCCS0_IPR ? "IPR" : "",
++ foo & UDCCS0_SST ? "SST" : ""
++ );
++}
++static inline void preq( struct usb_ctrlrequest * pReq )
++{
++ static char * tnames[] = { "dev", "intf", "ep", "oth" };
++ static char * rnames[] = { "std", "class", "vendor", "???" };
++ char * psz;
++ switch( pReq->bRequest ) {
++ case USB_REQ_GET_STATUS: psz = "get stat"; break;
++ case USB_REQ_CLEAR_FEATURE: psz = "clr feat"; break;
++ case USB_REQ_SET_FEATURE: psz = "set feat"; break;
++ case USB_REQ_SET_ADDRESS: psz = "set addr"; break;
++ case USB_REQ_GET_DESCRIPTOR: psz = "get desc"; break;
++ case USB_REQ_SET_DESCRIPTOR: psz = "set desc"; break;
++ case USB_REQ_GET_CONFIGURATION: psz = "get cfg"; break;
++ case USB_REQ_SET_CONFIGURATION: psz = "set cfg"; break;
++ case USB_REQ_GET_INTERFACE: psz = "get intf"; break;
++ case USB_REQ_SET_INTERFACE: psz = "set intf"; break;
++ default: psz = "unknown"; break;
++ }
++ printk( "- [%s: %s req to %s. dir=%s]\n", psz,
++ rnames[ (pReq->bRequestType >> 5) & 3 ],
++ tnames[ pReq->bRequestType & 3 ],
++ ( pReq->bRequestType & 0x80 ) ? "in" : "out" );
++}
++
++static inline void usbctl_dump_request(const char *prefix, const struct usb_ctrlrequest *req)
++{
++ printk("%s: bRequestType=0x%02x bRequest=0x%02x "
++ "wValue=0x%04x wIndex=0x%04x wLength=0x%04x\n",
++ prefix, req->bRequestType, req->bRequest,
++ le16_to_cpu(req->wValue), le16_to_cpu(req->wIndex),
++ le16_to_cpu(req->wLength));
++}
++#else
++static inline void pcs( void ){}
++//static inline void preq( void ){}
++static inline void preq( void *x ){}
++static inline void usbctl_dump_request(const char *prefix, const struct usb_ctrlrequest *req) {}
++#endif
++
++/***************************************************************************
++Globals
++***************************************************************************/
++static const char pszMe[] = "usbep0: ";
++
++
++/* global write struct to keep write
++ ..state around across interrupts */
++static struct {
++ unsigned char *p;
++ int bytes_left;
++} wr;
++
++/***************************************************************************
++Public Interface
++***************************************************************************/
++
++/* reset received from HUB (or controller just went nuts and reset by itself!)
++ so udc core has been reset, track this state here */
++void ep0_reset(void)
++{
++ /* reset state machine */
++ wr.p = NULL;
++ wr.bytes_left = 0;
++ usbd_info.address=0;
++// needed?
++ Ser0UDCAR = 0;
++}
++
++
++/* handle interrupt for endpoint zero */
++
++inline void ep0_clear_write(void) {
++ wr.p = NULL;
++ wr.bytes_left = 0;
++}
++
++/* this is a config packet parser based on that from the updated HH 2.6 udc */
++static void ep0_read_packet(void)
++{
++ unsigned char status_buf[2]; /* returned in GET_STATUS */
++ struct usb_ctrlrequest req;
++ int request_type;
++ int n;
++ __u32 address;
++ __u32 in, out;
++
++ /* reset previous count */
++ the_controller->ep0_req_len=-1;
++
++ /* read the setup request */
++ n = read_fifo( &req );
++ usbctl_dump_request("ep0_read_packet",&req);
++
++ if ( n != sizeof( req ) ) {
++ printk( "%ssetup begin: fifo READ ERROR wanted %d bytes got %d. "
++ " Stalling out...\n",
++ pszMe, sizeof( req ), n );
++ /* force stall, serviced out */
++ set_cs_bits( UDCCS0_FST | UDCCS0_SO );
++ goto sh_sb_end;
++ }
++
++ /* Is it a standard request? (not vendor or class request) */
++ request_type = type_code_from_request( req.bRequestType );
++ if ( request_type != 0 ) {
++ printk( "%ssetup begin: unsupported bRequestType: %d ignored\n",
++ pszMe, request_type );
++ set_cs_bits( UDCCS0_DE | UDCCS0_SO );
++ goto sh_sb_end;
++ }
++
++ /* save requested reply size */
++ the_controller->ep0_req_len=le16_to_cpu(req.wLength);
++ PRINTKD("%s: request length is %d\n",__FUNCTION__,the_controller->ep0_req_len);
++
++#if VERBOSITY
++ {
++ unsigned char * pdb = (unsigned char *) &req;
++ PRINTKD( "%2.2X %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X %2.2X ",
++ pdb[0], pdb[1], pdb[2], pdb[3], pdb[4], pdb[5], pdb[6], pdb[7]
++ );
++ preq( &req );
++ }
++#endif
++
++ /* Handle it */
++ switch( req.bRequest ) {
++
++ /* This first bunch have no data phase */
++
++ case USB_REQ_SET_ADDRESS:
++ address = (__u32) (req.wValue & 0x7F);
++ /* when SO and DE sent, UDC will enter status phase and ack,
++ ..propagating new address to udc core. Next control transfer
++ ..will be on the new address. You can't see the change in a
++ ..read back of CAR until then. (about 250us later, on my box).
++ ..The original Intel driver sets S0 and DE and code to check
++ ..that address has propagated here. I tried this, but it
++ ..would only work sometimes! The rest of the time it would
++ ..never propagate and we'd spin forever. So now I just set
++ ..it and pray...
++ */
++ Ser0UDCAR = address;
++ usbd_info.address = address;
++ usbctl_next_state_on_event( kEvAddress );
++ set_cs_bits( UDCCS0_SO | UDCCS0_DE ); /* no data phase */
++ printk( "%sI have been assigned address: %d\n", pszMe, address );
++ break;
++
++
++ case USB_REQ_SET_CONFIGURATION:
++ if ( req.wValue == 1 ) {
++ /* configured */
++ if (usbctl_next_state_on_event( kEvConfig ) != kError) {
++ /* (re)set the out and in max packet sizes */
++ PRINTKD( "%s: calling the_controller.driver->setup with SET_CONFIGURATION\n", __FUNCTION__ );
++ the_controller->driver->setup(&the_controller->gadget, &req);
++ in = __le16_to_cpu( the_controller->ep[1].ep.maxpacket );
++ out = __le16_to_cpu( the_controller->ep[2].ep.maxpacket );
++ Ser0UDCOMP = ( out - 1 );
++ Ser0UDCIMP = ( in - 1 );
++ // we are configured
++ usbd_info.state = USB_STATE_CONFIGURED;
++ // enable rx and tx interrupts
++ Ser0UDCCR &= ~(UDCCR_RIM | UDCCR_TIM);
++
++ printk( "%sConfigured (OMP=%8.8X IMP=%8.8X)\n", pszMe, out, in );
++ break;
++ }
++ } else if ( req.wValue == 0 ) {
++ /* de-configured */
++ if (usbctl_next_state_on_event( kEvDeConfig ) != kError )
++ printk( "%sDe-Configured\n", pszMe );
++ usbd_info.state = 0;
++ Ser0UDCCR |= UDCCR_RIM | UDCCR_TIM;
++ ep1_reset ();
++ ep2_reset ();
++ printk("%s: de-configured. Tx and Rx interrupts disabled. ep1 and ep2 reset\n",__FUNCTION__);
++ } else {
++ printk( "%ssetup phase: Unknown "
++ "\"set configuration\" data %d\n",
++ pszMe, req.wValue );
++ }
++ set_cs_bits( UDCCS0_SO | UDCCS0_DE ); /* no data phase */
++ break;
++
++ case USB_REQ_CLEAR_FEATURE:
++ /* could check data length, direction...26Jan01ww */
++ if ( req.wValue == 0 ) { /* clearing ENDPOINT_HALT/STALL */
++ int ep = windex_to_ep_num( req.wIndex );
++ if ( ep == 1 ) {
++ printk( "%sclear feature \"endpoint halt\" "
++ " on receiver\n", pszMe );
++ ep1_reset();
++ }
++ else if ( ep == 2 ) {
++ printk( "%sclear feature \"endpoint halt\" "
++ "on xmitter\n", pszMe );
++ ep2_reset();
++ } else {
++ printk( "%sclear feature \"endpoint halt\" "
++ "on unsupported ep # %d\n",
++ pszMe, ep );
++ }
++ } else {
++ printk( "%sUnsupported feature selector (%d) "
++ "in clear feature. Ignored.\n" ,
++ pszMe, req.wValue );
++ }
++ set_cs_bits( UDCCS0_SO | UDCCS0_DE ); /* no data phase */
++ break;
++
++ case USB_REQ_SET_FEATURE:
++ if ( req.wValue == 0 ) { /* setting ENDPOINT_HALT/STALL */
++ int ep = windex_to_ep_num( req.wValue );
++ if ( ep == 1 ) {
++ printk( "%set feature \"endpoint halt\" "
++ "on receiver\n", pszMe );
++ ep1_stall();
++ }
++ else if ( ep == 2 ) {
++ printk( "%sset feature \"endpoint halt\" "
++ " on xmitter\n", pszMe );
++ ep2_stall();
++ } else {
++ printk( "%sset feature \"endpoint halt\" "
++ "on unsupported ep # %d\n",
++ pszMe, ep );
++ }
++ }
++ else {
++ printk( "%sUnsupported feature selector "
++ "(%d) in set feature\n",
++ pszMe, req.wValue );
++ }
++ set_cs_bits( UDCCS0_SO | UDCCS0_DE ); /* no data phase */
++ break;
++
++ /* The rest have a data phase that writes back to the host */
++ case USB_REQ_GET_STATUS:
++ /* return status bit flags */
++ status_buf[0] = status_buf[1] = 0;
++ n = request_target(req.bRequestType);
++ switch( n ) {
++ case kTargetDevice:
++ if ( self_powered_hook() )
++ status_buf[0] |= 1;
++ break;
++ case kTargetInterface:
++ break;
++ case kTargetEndpoint:
++ /* return stalled bit */
++ n = windex_to_ep_num( req.wIndex );
++ if ( n == 1 )
++ status_buf[0] |= (Ser0UDCCS1 & UDCCS1_FST) >> 4;
++ else if ( n == 2 )
++ status_buf[0] |= (Ser0UDCCS2 & UDCCS2_FST) >> 5;
++ else {
++ printk( "%sUnknown endpoint (%d) "
++ "in GET_STATUS\n", pszMe, n );
++ }
++ break;
++ default:
++ printk( "%sUnknown target (%d) in GET_STATUS\n",
++ pszMe, n );
++ /* fall thru */
++ break;
++ }
++ PRINTKD("%s: GET_STATUS writing %d\n",__FUNCTION__,req.wLength);
++ ep0_queue( status_buf, req.wLength, sizeof( status_buf ));
++ break;
++ case USB_REQ_GET_DESCRIPTOR:
++ PRINTKD( "%s: calling the_controller.driver->setup with GET_DESCRIPTOR\n", __FUNCTION__ );
++ the_controller->driver->setup(&the_controller->gadget, &req);
++ break;
++ case USB_REQ_GET_CONFIGURATION:
++ PRINTKD( "%s: calling the_controller.driver->setup with GET_CONFIGURATION\n", __FUNCTION__ );
++ the_controller->driver->setup(&the_controller->gadget, &req);
++ break;
++ case USB_REQ_GET_INTERFACE:
++ PRINTKD( "%s: calling the_controller->driver->setup with GET_INTERFACE\n", __FUNCTION__ );
++ the_controller->driver->setup(&the_controller->gadget, &req);
++ break;
++ case USB_REQ_SET_INTERFACE:
++ PRINTKD( "%s: calling the_controller->driver->setup with SET_INTERFACE\n", __FUNCTION__ );
++ the_controller->driver->setup(&the_controller->gadget, &req);
++ break;
++ default :
++ printk("%sunknown request 0x%x\n", pszMe, req.bRequest);
++ break;
++ } /* switch( bRequest ) */
++
++sh_sb_end:
++ return;
++
++}
++
++void ep0_int_hndlr(void)
++{
++ u32 cs_reg_in;
++
++ pcs();
++
++ cs_reg_in = Ser0UDCCS0;
++
++ /*
++ * If "setup end" has been set, the usb controller has terminated
++ * a setup transaction before we set DE. This happens during
++ * enumeration with some hosts. For example, the host will ask for
++ * our device descriptor and specify a return of 64 bytes. When we
++ * hand back the first 8, the host will know our max packet size
++ * and turn around and issue a new setup immediately. This causes
++ * the UDC to auto-ack the new setup and set SE. We must then
++ * "unload" (process) the new setup, which is what will happen
++ * after this preamble is finished executing.
++ */
++ if (cs_reg_in & UDCCS0_SE) {
++ PRINTKD("UDC: early termination of setup\n");
++
++ /*
++ * Clear setup end
++ */
++ set_cs_bits(UDCCS0_SSE);
++
++ /*
++ * Clear any pending write.
++ */
++ ep0_clear_write();
++ }
++
++ /*
++ * UDC sent a stall due to a protocol violation.
++ */
++ if (cs_reg_in & UDCCS0_SST) {
++ PRINTKD("UDC: write_preamble: UDC sent stall\n");
++
++ /*
++ * Clear sent stall
++ */
++ set_cs_bits(UDCCS0_SST);
++
++ /*
++ * Clear any pending write.
++ */
++ ep0_clear_write();
++ }
++
++ switch (cs_reg_in & (UDCCS0_OPR | UDCCS0_IPR)) {
++ case UDCCS0_OPR | UDCCS0_IPR:
++ PRINTKD("UDC: write_preamble: see OPR. Stopping write to "
++ "handle new SETUP\n");
++
++ /*
++ * very rarely, you can get OPR and
++ * leftover IPR. Try to clear
++ */
++ UDC_clear(Ser0UDCCS0, UDCCS0_IPR);
++
++ /*
++ * Clear any pending write.
++ */
++ ep0_clear_write();
++
++ /*FALLTHROUGH*/
++ case UDCCS0_OPR:
++ /*
++ * A new setup request is pending. Handle
++ * it. Note that we don't try to read a
++ * packet if SE was set and OPR is clear.
++ */
++ ep0_read_packet();
++ break;
++
++ case 0:
++ // if data pending ...
++ if (wr.p) {
++ unsigned int cs_bits = 0;
++ if (wr.bytes_left != 0) {
++ /*
++ * More data to go
++ */
++ write_fifo();
++ // packet ready
++ cs_bits |= UDCCS0_IPR;
++ }
++
++ if (wr.bytes_left == 0) {
++ /*
++ * All data sent.
++ */
++ cs_bits |= wrint();
++ // a null packet may be following
++ if (!wrint)
++ ep0_clear_write();
++ }
++ set_cs_bits(cs_bits);
++ }
++ else
++ PRINTKD("%s: No data - probably an ACK\n",__FUNCTION__);
++ break;
++
++ case UDCCS0_IPR:
++ PRINTKD("UDC: IPR set, not writing\n");
++ break;
++ }
++
++ pcs();
++ PRINTKD( "-end-\n" );
++}
++
++static unsigned int ep0_sh_write_data(void)
++{
++ /*
++ * If bytes left is zero, we are coming in on the
++ * interrupt after the last packet went out. And
++ * we know we don't have to empty packet this
++ * transfer so just set DE and we are done
++ */
++ PRINTKD("UDC: normal packet ended\n");
++ wrint=NULL;
++ return UDCCS0_DE;
++}
++
++static unsigned int ep0_sh_write_with_empty_packet(void)
++{
++ /*
++ * If bytes left is zero, we are coming in on the
++ * interrupt after the last packet went out.
++ * We must do short packet suff, so set DE and IPR
++ */
++ PRINTKD("UDC: short packet sent\n");
++ wrint=NULL;
++ return UDCCS0_IPR | UDCCS0_DE;
++}
++
++static unsigned int ep0_sh_write_data_then_empty_packet(void)
++{
++ PRINTKD("UDC: last packet full. Send empty packet next\n");
++ wrint=ep0_sh_write_with_empty_packet;
++ return 0;
++}
++
++static void ep0_queue(void *buf, unsigned int len, unsigned int req_len)
++{
++ __u32 cs_reg_bits = UDCCS0_IPR;
++
++ PRINTKD("a=%d r=%d\n", len, req_len);
++
++ if (len == 0) {
++ // no output packet to wait for
++ PRINTKD("%s: zero byte packet being queued. Setting DE and OPR end exiting\n",__FUNCTION__);
++ set_cs_bits(UDCCS0_DE | UDCCS0_SO);
++ return;
++ }
++
++ /*
++ * thou shalt not enter data phase until
++ * Out Packet Ready is clear
++ */
++ if (!clear_opr()) {
++ printk("UDC: SO did not clear OPR\n");
++ set_cs_bits(UDCCS0_DE | UDCCS0_SO);
++ return;
++ }
++
++ // note data to xmit stored
++ wr.p=buf;
++ wr.bytes_left=min(len, req_len);
++
++ // write the first block
++ write_fifo();
++
++ // done already?
++ if (wr.bytes_left == 0) {
++ /*
++ * out in one, so data end
++ */
++ cs_reg_bits |= UDCCS0_DE;
++ ep0_clear_write();
++ // rest is a shorter than expected reply?
++ } else if (len < req_len) {
++ /*
++ * we are going to short-change host
++ * so need nul to not stall
++ */
++ if (len % 8) {
++ PRINTKD("%s: %d more to go ending in a short packet.\n",__FUNCTION__,wr.bytes_left);
++ wrint=ep0_sh_write_with_empty_packet;
++ }
++ // unless we are on a packet boundary. Then send full packet plus null packet.
++ else {
++ PRINTKD("%s: %d more to go then add empty packet.\n",__FUNCTION__,wr.bytes_left);
++ wrint=ep0_sh_write_data_then_empty_packet;
++ }
++ } else {
++ /*
++ * we have as much or more than requested
++ */
++ PRINTKD("%s: %d more to go.\n",__FUNCTION__,wr.bytes_left);
++ wrint=ep0_sh_write_data;
++ }
++
++ /*
++ * note: IPR was set uncondtionally at start of routine
++ */
++ set_cs_bits(cs_reg_bits);
++}
++
++/*
++ * write_fifo()
++ * Stick bytes in the 8 bytes endpoint zero FIFO.
++ * This version uses a variety of tricks to make sure the bytes
++ * are written correctly. 1. The count register is checked to
++ * see if the byte went in, and the write is attempted again
++ * if not. 2. An overall counter is used to break out so we
++ * don't hang in those (rare) cases where the UDC reverses
++ * direction of the FIFO underneath us without notification
++ * (in response to host aborting a setup transaction early).
++ *
++ */
++static void write_fifo( void )
++{
++ int bytes_this_time = min(wr.bytes_left, 8);
++ int bytes_written = 0;
++
++ PRINTKD( "WF=%d: ", bytes_this_time );
++
++ while( bytes_this_time-- ) {
++ unsigned int cwc;
++ int i;
++ PRINTKD( "%2.2X ", *wr.p );
++ cwc = Ser0UDCWC & 15;
++ i = 10;
++ do {
++ Ser0UDCD0 = *wr.p;
++ udelay( 20 ); /* voodo 28Feb01ww */
++ } while( (Ser0UDCWC &15) == cwc && --i );
++
++ if ( i == 0 ) {
++ printk( "%swrite_fifo: write failure\n", pszMe );
++ usbd_info.stats.ep0_fifo_write_failures++;
++ }
++
++ wr.p++;
++ bytes_written++;
++ }
++ wr.bytes_left -= bytes_written;
++
++ /* following propagation voodo so maybe caller writing IPR in
++ ..a moment might actually get it to stick 28Feb01ww */
++ udelay( 300 );
++
++ usbd_info.stats.ep0_bytes_written += bytes_written;
++ PRINTKD( "L=%d WCR=%8.8lX\n", wr.bytes_left, Ser0UDCWC );
++}
++/*
++ * read_fifo()
++ * Read 1-8 bytes out of FIFO and put in request.
++ * Called to do the initial read of setup requests
++ * from the host. Return number of bytes read.
++ *
++ * Like write fifo above, this driver uses multiple
++ * reads checked agains the count register with an
++ * overall timeout.
++ *
++ */
++static int
++read_fifo( struct usb_ctrlrequest * request )
++{
++ int bytes_read = 0;
++ int fifo_count;
++
++ unsigned char * pOut = (unsigned char*) request;
++
++ fifo_count = ( Ser0UDCWC & 0xFF );
++
++ ASSERT( fifo_count <= 8 );
++ PRINTKD( "RF=%d ", fifo_count );
++
++ while( fifo_count-- ) {
++ unsigned int cwc;
++ int i;
++
++ cwc = Ser0UDCWC & 15;
++
++ i = 10;
++ do {
++ *pOut = (unsigned char) Ser0UDCD0;
++ udelay( 20 );
++ } while( ( Ser0UDCWC & 15 ) == cwc && --i );
++
++ if ( i == 0 ) {
++ printk( "%sread_fifo(): read failure\n", pszMe );
++ usbd_info.stats.ep0_fifo_read_failures++;
++ }
++ pOut++;
++ bytes_read++;
++ }
++
++ PRINTKD( "fc=%d\n", bytes_read );
++ usbd_info.stats.ep0_bytes_read++;
++ return bytes_read;
++}
++
++/* some voodo I am adding, since the vanilla macros just aren't doing it 1Mar01ww */
++
++#define ABORT_BITS ( UDCCS0_SST | UDCCS0_SE )
++#define OK_TO_WRITE (!( Ser0UDCCS0 & ABORT_BITS ))
++#define BOTH_BITS (UDCCS0_IPR | UDCCS0_DE)
++
++static void set_cs_bits( __u32 bits )
++{
++ if ( bits & ( UDCCS0_SO | UDCCS0_SSE | UDCCS0_FST | UDCCS0_SST) )
++ Ser0UDCCS0 = bits;
++ else if ( (bits & BOTH_BITS) == BOTH_BITS )
++ set_ipr_and_de();
++ else if ( bits & UDCCS0_IPR )
++ set_ipr();
++ else if ( bits & UDCCS0_DE )
++ set_de();
++}
++
++static void set_de( void )
++{
++ int i = 1;
++ while( 1 ) {
++ if ( OK_TO_WRITE ) {
++ Ser0UDCCS0 |= UDCCS0_DE;
++ } else {
++ PRINTKD( "%sQuitting set DE because SST or SE set\n", pszMe );
++ break;
++ }
++ if ( Ser0UDCCS0 & UDCCS0_DE )
++ break;
++ udelay( i );
++ if ( ++i == 50 ) {
++ printk( "%sDangnabbbit! Cannot set DE! (DE=%8.8X CCS0=%8.8lX)\n",
++ pszMe, UDCCS0_DE, Ser0UDCCS0 );
++ break;
++ }
++ }
++}
++
++static void set_ipr( void )
++{
++ int i = 1;
++ while( 1 ) {
++ if ( OK_TO_WRITE ) {
++ Ser0UDCCS0 |= UDCCS0_IPR;
++ } else {
++ PRINTKD( "%sQuitting set IPR because SST or SE set\n", pszMe );
++ break;
++ }
++ if ( Ser0UDCCS0 & UDCCS0_IPR )
++ break;
++ udelay( i );
++ if ( ++i == 50 ) {
++ printk( "%sDangnabbbit! Cannot set IPR! (IPR=%8.8X CCS0=%8.8lX)\n",
++ pszMe, UDCCS0_IPR, Ser0UDCCS0 );
++ break;
++ }
++ }
++}
++
++static void set_ipr_and_de( void )
++{
++ int i = 1;
++ while( 1 ) {
++ if ( OK_TO_WRITE ) {
++ Ser0UDCCS0 |= BOTH_BITS;
++ } else {
++ PRINTKD( "%sQuitting set IPR/DE because SST or SE set\n", pszMe );
++ break;
++ }
++ if ( (Ser0UDCCS0 & BOTH_BITS) == BOTH_BITS)
++ break;
++ udelay( i );
++ if ( ++i == 50 ) {
++ printk( "%sDangnabbbit! Cannot set DE/IPR! (DE=%8.8X IPR=%8.8X CCS0=%8.8lX)\n",
++ pszMe, UDCCS0_DE, UDCCS0_IPR, Ser0UDCCS0 );
++ break;
++ }
++ }
++}
++
++static bool clear_opr( void )
++{
++ int i = 10000;
++ bool is_clear;
++ do {
++ Ser0UDCCS0 = UDCCS0_SO;
++ is_clear = ! ( Ser0UDCCS0 & UDCCS0_OPR );
++ if ( i-- <= 0 ) {
++ printk( "%sclear_opr(): failed\n", pszMe );
++ break;
++ }
++ } while( ! is_clear );
++ return is_clear;
++}
++
++
++
++// ep1 handlers
++
++static char *ep1_buf;
++static int ep1_len;
++static void (*ep1_callback)(int flag, int size);
++static char *ep1_curdmabuf;
++static dma_addr_t ep1_curdmapos;
++static int ep1_curdmalen;
++static int ep1_remain;
++static int ep1_used;
++
++static dma_regs_t *dmaregs_rx = NULL;
++static int rx_pktsize;
++
++static int naking;
++
++static void
++ep1_start(void)
++{
++ sa1100_reset_dma(dmaregs_rx);
++ if (!ep1_curdmalen) {
++ ep1_curdmalen = rx_pktsize;
++ if (ep1_curdmalen > ep1_remain)
++ ep1_curdmalen = ep1_remain;
++ ep1_curdmapos = dma_map_single(NULL, ep1_curdmabuf, ep1_curdmalen,
++ DMA_FROM_DEVICE);
++ }
++
++ UDC_write( Ser0UDCOMP, ep1_curdmalen-1 );
++
++ sa1100_start_dma(dmaregs_rx, ep1_curdmapos, ep1_curdmalen);
++
++ if ( naking ) {
++ /* turn off NAK of OUT packets, if set */
++ UDC_flip( Ser0UDCCS1, UDCCS1_RPC );
++ naking = 0;
++ }
++}
++
++static void
++ep1_done(int flag)
++{
++ int size = ep1_len - ep1_remain;
++
++ if (!ep1_len)
++ return;
++ if (ep1_curdmalen)
++ dma_unmap_single(NULL, ep1_curdmapos, ep1_curdmalen,
++ DMA_FROM_DEVICE);
++ ep1_len = ep1_curdmalen = 0;
++ if (ep1_callback)
++ ep1_callback(flag, size);
++}
++
++void
++ep1_state_change_notify( int new_state )
++{
++
++}
++
++void
++ep1_stall( void )
++{
++ /* SET_FEATURE force stall at UDC */
++ UDC_set( Ser0UDCCS1, UDCCS1_FST );
++}
++
++int
++ep1_init(dma_regs_t *dmaregs)
++{
++ dmaregs_rx = dmaregs;
++ sa1100_reset_dma(dmaregs_rx);
++ ep1_done(-EAGAIN);
++ return 0;
++}
++
++void
++ep1_reset(void)
++{
++ if (dmaregs_rx)
++ sa1100_reset_dma(dmaregs_rx);
++ UDC_clear(Ser0UDCCS1, UDCCS1_FST);
++ ep1_done(-EINTR);
++}
++
++void ep1_int_hndlr(int udcsr)
++{
++ dma_addr_t dma_addr;
++ unsigned int len;
++ int status = Ser0UDCCS1;
++
++ if ( naking ) printk( "%sEh? in ISR but naking = %d\n", "usbrx: ", naking );
++
++ if (status & UDCCS1_RPC) {
++
++ if (!ep1_curdmalen) {
++ printk("usb_recv: RPC for non-existent buffer\n");
++ naking=1;
++ return;
++ }
++
++ sa1100_stop_dma(dmaregs_rx);
++
++ if (status & UDCCS1_SST) {
++ printk("usb_recv: stall sent OMP=%ld\n", Ser0UDCOMP);
++ UDC_flip(Ser0UDCCS1, UDCCS1_SST);
++ ep1_done(-EIO); // UDC aborted current transfer, so we do
++ return;
++ }
++
++ if (status & UDCCS1_RPE) {
++ printk("usb_recv: RPError %x\n", status);
++ UDC_flip(Ser0UDCCS1, UDCCS1_RPC);
++ ep1_done(-EIO);
++ return;
++ }
++
++ dma_addr=sa1100_get_dma_pos(dmaregs_rx);
++ dma_unmap_single(NULL, ep1_curdmapos, ep1_curdmalen,
++ DMA_FROM_DEVICE);
++ len = dma_addr - ep1_curdmapos;
++#ifdef SA1100_USB_DEBUG
++ if (sa1100_usb_debug) {
++ int i;
++ printk("usb rx %d :\n ",len);
++ if (sa1100_usb_debug>1) {
++ for (i=0; i<len; i++) {
++ if ((i % 32)==31)
++ printk("\n ");
++ printk("%2.2x ",((char *)ep1_curdmapos)[i]);
++ }
++ }
++ printk("\n");
++ }
++#endif
++ if (len < ep1_curdmalen) {
++ char *buf = ep1_curdmabuf + len;
++ while (Ser0UDCCS1 & UDCCS1_RNE) {
++ if (len >= ep1_curdmalen) {
++ printk("usb_recv: too much data in fifo\n");
++ break;
++ }
++ *buf++ = Ser0UDCDR;
++ len++;
++ }
++ } else if (Ser0UDCCS1 & UDCCS1_RNE) {
++ printk("usb_recv: fifo screwed, shouldn't contain data\n");
++ len = 0;
++ }
++
++#if defined(NCB_DMA_FIX)
++// if (len && (ep1_buf != ep1_curdmabuf))
++// memcpy(ep1_buf,ep1_curdmabuf,len);
++ if (len)
++ memcpy(&(((unsigned char *)ep1_buf)[ep1_used]),ep1_curdmabuf,len);
++#endif
++
++ ep1_curdmalen = 0; /* dma unmap already done */
++ ep1_remain -= len;
++ ep1_used += len;
++// ep1_curdmabuf += len; // use same buffer again
++ naking = 1;
++//printk("%s: received %d, %d remaining\n",__FUNCTION__,len,ep1_remain);
++ if (len && (len == rx_pktsize))
++ ep1_start();
++ else
++ ep1_done((len) ? 0 : -EPIPE);
++ }
++ /* else, you can get here if we are holding NAK */
++}
++
++int
++sa1100_usb_recv(struct usb_request *req, void (*callback)(int flag, int size))
++{
++ unsigned long flags;
++ char *buf=req->buf;
++ int len=req->length;
++
++ if (ep1_len)
++ return -EBUSY;
++
++ local_irq_save(flags);
++ ep1_buf = buf;
++ ep1_len = len;
++ ep1_callback = callback;
++ ep1_remain = len;
++ ep1_used = 0;
++#ifdef NCB_DMA_FIX
++// if (((size_t)buf)&3)
++ if (1)
++ ep1_curdmabuf = receive_buffer;
++ else
++#else
++ ep1_curdmabuf = buf;
++#endif
++ ep1_curdmalen = 0;
++ ep1_start();
++ local_irq_restore(flags);
++
++ return 0;
++}
++
++// ep2 handlers
++
++static char *ep2_buf;
++static int ep2_len;
++static void (*ep2_callback)(int status, int size);
++static dma_addr_t ep2_dma;
++static dma_addr_t ep2_curdmapos;
++static int ep2_curdmalen;
++static int ep2_remain;
++static dma_regs_t *dmaregs_tx = NULL;
++static int tx_pktsize;
++
++/* device state is changing, async */
++void
++ep2_state_change_notify( int new_state )
++{
++}
++
++/* set feature stall executing, async */
++void
++ep2_stall( void )
++{
++ UDC_set( Ser0UDCCS2, UDCCS2_FST ); /* force stall at UDC */
++}
++
++static void
++ep2_start(void)
++{
++ if (!ep2_len)
++ return;
++
++ ep2_curdmalen = tx_pktsize;
++ if (ep2_curdmalen > ep2_remain)
++ ep2_curdmalen = ep2_remain;
++
++ /* must do this _before_ queue buffer.. */
++ UDC_flip( Ser0UDCCS2,UDCCS2_TPC ); /* stop NAKing IN tokens */
++ UDC_write( Ser0UDCIMP, ep2_curdmalen-1 );
++
++ Ser0UDCAR = usbd_info.address; // fighting stupid silicon bug
++ sa1100_start_dma(dmaregs_tx, ep2_curdmapos, ep2_curdmalen);
++}
++
++static void
++ep2_done(int flag)
++{
++ int size = ep2_len - ep2_remain;
++ if (ep2_len) {
++ dma_unmap_single(NULL, ep2_dma, ep2_len, DMA_TO_DEVICE);
++ ep2_len = 0;
++ if (ep2_callback)
++ ep2_callback(flag, size);
++ }
++}
++
++int ep2_init(dma_regs_t *dmaregs)
++{
++ dmaregs_tx = dmaregs;
++ sa1100_reset_dma(dmaregs_tx);
++ ep2_done(-EAGAIN);
++ return 0;
++}
++
++void ep2_reset(void)
++{
++ UDC_clear(Ser0UDCCS2, UDCCS2_FST);
++ if (dmaregs_tx)
++ sa1100_reset_dma(dmaregs_tx);
++ ep2_done(-EINTR);
++}
++
++void ep2_int_hndlr(int udcsr)
++{
++ int status = Ser0UDCCS2;
++
++ if (Ser0UDCAR != usbd_info.address) // check for stupid silicon bug.
++ Ser0UDCAR = usbd_info.address;
++
++ if (status & UDCCS2_TPC) {
++
++ UDC_flip(Ser0UDCCS2, UDCCS2_SST);
++
++ sa1100_reset_dma(dmaregs_tx);
++
++ if (status & (UDCCS2_TPE | UDCCS2_TUR)) {
++ printk("usb_send: transmit error %x\n", status);
++ ep2_done(-EIO);
++ } else {
++ ep2_curdmapos += ep2_curdmalen;
++ ep2_remain -= ep2_curdmalen;
++
++ if (ep2_remain != 0)
++ ep2_start();
++ else
++ ep2_done(0);
++ }
++ } else {
++ printk("usb_send: Not TPC: UDCCS2 = %x\n", status);
++ }
++}
++
++int
++sa1100_usb_send(struct usb_request *req, void (*callback)(int status, int size))
++{
++ char *buf=req->buf;
++ int len=req->length;
++ unsigned long flags;
++
++ if (usbd_info.state != USB_STATE_CONFIGURED) {
++ PRINTKD("%s: return -ENODEV\n",__FUNCTION__);
++ return -ENODEV;
++ }
++
++ if (ep2_len) {
++ PRINTKD("%s: return -EBUSY\n",__FUNCTION__);
++ return -EBUSY;
++ }
++
++ local_irq_save(flags);
++#ifdef NCB_DMA_FIX
++ // if misaligned, copy to aligned buffer
++// if (((size_t)buf)&3) {
++ if (1) {
++ PRINTKD("%s: copying %d bytes to send_buffer\n",__FUNCTION__,len);
++ memcpy(send_buffer,buf,len);
++ ep2_buf = send_buffer;
++ }
++ else
++#endif
++ ep2_buf = buf;
++
++ ep2_len = len;
++ ep2_dma = dma_map_single(NULL, ep2_buf, len,DMA_TO_DEVICE);
++ PRINTKD("%s: mapped dma to buffer(%p0\n",__FUNCTION__,buf);
++
++ ep2_callback = callback;
++ ep2_remain = len;
++ ep2_curdmapos = ep2_dma;
++
++ PRINTKD("%s: calling ep2_start\n",__FUNCTION__);
++ ep2_start();
++ local_irq_restore(flags);
++
++ return 0;
++}
++/*-------------------------------------------------------------------------*/
++
++static int
++sa1100_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
++{
++ struct sa1100_udc *dev;
++ struct sa1100_ep *ep;
++ u32 max;
++ int type;
++
++ ep = container_of (_ep, struct sa1100_ep, ep);
++ if (!_ep || !desc || ep->desc || _ep->name == ep0name
++ || desc->bDescriptorType != USB_DT_ENDPOINT) {
++ PRINTKD("%s: _ep = %p, desc = %p\n",__FUNCTION__,_ep,desc);
++ if (_ep && desc)
++ PRINTKD("%s: ep->desc = %p, _ep->name = %s desc->bDescriptorType = %s\n",__FUNCTION__,ep->desc,_ep->name,
++ (desc->bDescriptorType == USB_DT_ENDPOINT) ? "USB_DT_ENDPOINT":"bad!!");
++ return -EINVAL;
++ }
++
++ dev = ep->dev;
++ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN)
++ return -ESHUTDOWN;
++
++ type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
++ max = le16_to_cpu (desc->wMaxPacketSize);
++ switch (max) {
++ case 64: case 32:
++ /* note: maxpacket > 16 means DMA might overrun/underrun */
++ case 16: case 8:
++ break;
++ default:
++ if (type == USB_ENDPOINT_XFER_INT && max < 64)
++ break;
++ return -EDOM;
++ }
++
++ switch (type) {
++ case USB_ENDPOINT_XFER_BULK:
++ case USB_ENDPOINT_XFER_INT:
++ if (ep == &dev->ep[2]) {
++ if (desc->bEndpointAddress != (USB_DIR_IN|2)) {
++ PRINTKD("%s: ep[2] has invalid endpoint\n",__FUNCTION__);
++ return -EINVAL;
++ }
++ tx_pktsize = max;
++ Ser0UDCOMP = max - 1;
++ PRINTKD("%s: ep2 max packet size is %d\n",__FUNCTION__,max);
++ break;
++ } else if (ep == &dev->ep[1]) {
++ if (desc->bEndpointAddress != (USB_DIR_OUT|1)) {
++ PRINTKD("%s: ep[1] has invalid endpoint\n",__FUNCTION__);
++ return -EINVAL;
++ }
++ rx_pktsize = max;
++ Ser0UDCIMP = max - 1;
++ PRINTKD("%s: ep1 max packet size is %d\n",__FUNCTION__,max);
++ break;
++ }
++ // FALLTHROUGH
++ default:
++ PRINTKD("%s: Invalid endpoint\n",__FUNCTION__);
++ return -EINVAL;
++ }
++
++ _ep->maxpacket = max;
++ ep->desc = desc;
++ ep->stopped = 0;
++
++ DEBUG (dev, "enabled %s %s max %04x\n", _ep->name,
++ type_string (desc->bmAttributes), max);
++
++ return 0;
++}
++
++static int sa1100_disable (struct usb_ep *_ep)
++{
++ struct sa1100_ep *ep;
++
++ ep = container_of (_ep, struct sa1100_ep, ep);
++ if (!_ep || !ep->desc || _ep->name == ep0name)
++ return -EINVAL;
++
++ nuke (ep, -ESHUTDOWN);
++
++ DEBUG (ep->dev, "disabled %s\n", _ep->name);
++
++ ep->desc = NULL;
++ ep->stopped = 1;
++ return 0;
++}
++
++/*-------------------------------------------------------------------------*/
++
++static struct usb_request *
++sa1100_alloc_request (struct usb_ep *_ep, gfp_t gfp_flags)
++{
++ struct sa1100_request *req;
++
++ if (!_ep)
++ return 0;
++
++ req = kzalloc(sizeof *req, gfp_flags);
++ if (!req)
++ return 0;
++
++ memset (req, 0, sizeof *req);
++ req->req.dma = DMA_ADDR_INVALID;
++ INIT_LIST_HEAD (&req->queue);
++ return &req->req;
++}
++
++static void sa1100_free_request(struct usb_ep *_ep, struct usb_request *_req)
++{
++ struct sa1100_request *req;
++
++ req = container_of (_req, struct sa1100_request, req);
++ WARN_ON (!list_empty (&req->queue));
++ kfree(req); //NCB - see pxa2xx_udc
++}
++
++/*-------------------------------------------------------------------------*/
++
++static void done(struct sa1100_ep *ep, struct sa1100_request *req, int status)
++{
++ unsigned stopped = ep->stopped;
++
++ list_del_init (&req->queue);
++
++ if (likely(req->req.status == -EINPROGRESS))
++ req->req.status = status;
++ else
++ status = req->req.status;
++
++ if (status && status != -ESHUTDOWN)
++ VDEBUG (ep->dev, "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;
++ req->req.complete (&ep->ep, &req->req);
++ ep->stopped = stopped;
++}
++
++/*-------------------------------------------------------------------------*/
++
++/* FIXME move away from the old non-queued api.
++ * - forces extra work on us
++ * - stores request state twice
++ * - doesn't let gadget driver handle dma mapping
++ * - status codes need mapping
++ */
++
++static int map_status(int status)
++{
++ switch (status) {
++ case 0:
++ case -EIO: /* ep[12]_int_handler */
++ return status;
++ case -EPIPE: /* ep1_int_handler */
++ return 0;
++ // case -EAGAIN: /* ep[12]_init */
++ // case -EINTR: /* ep[12]_reset */
++ default:
++ return -ESHUTDOWN;
++ }
++}
++
++static void tx_callback(int status, int size)
++{
++ struct sa1100_ep *ep = &the_controller->ep[2];
++ struct sa1100_request *req;
++
++ if (list_empty (&ep->queue)) {
++ if (status != -EAGAIN)
++ DEBUG (ep->dev, "%s, bogus tx callback %d/%d\n",
++ ep->ep.name, status, size);
++ return;
++ }
++ req = list_entry (ep->queue.next, struct sa1100_request, queue);
++ req->req.actual = size;
++ done (ep, req, map_status (status));
++
++ if (ep->stopped || list_empty (&ep->queue))
++ return;
++ req = list_entry (ep->queue.next, struct sa1100_request, queue);
++ sa1100_usb_send (&req->req, tx_callback);
++}
++
++static void rx_callback (int status, int size)
++{
++ struct sa1100_ep *ep = &the_controller->ep[1];
++ struct sa1100_request *req;
++
++ if (list_empty (&ep->queue)) {
++ if (status != -EAGAIN)
++ DEBUG (ep->dev, "%s, bogus tx callback %d/%d\n",
++ ep->ep.name, status, size);
++ return;
++ }
++ req = list_entry (ep->queue.next, struct sa1100_request, queue);
++ req->req.actual = size;
++ done (ep, req, map_status (status));
++
++ if (ep->stopped || list_empty (&ep->queue))
++ return;
++ req = list_entry (ep->queue.next, struct sa1100_request, queue);
++ sa1100_usb_recv (&req->req, rx_callback);
++}
++
++
++static int
++sa1100_queue (struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
++{
++ struct sa1100_request *req;
++ struct sa1100_ep *ep;
++ struct sa1100_udc *dev;
++ unsigned long flags;
++
++ req = container_of (_req, struct sa1100_request, req);
++ if (!_req || !_req->complete || !_req->buf
++ || !list_empty (&req->queue))
++ return -EINVAL;
++
++ ep = container_of (_ep, struct sa1100_ep, ep);
++ if (unlikely(!_ep || (!ep->desc && _ep->name != ep0name)))
++ return -EINVAL;
++
++ dev = ep->dev;
++ if (unlikely(!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN))
++ return -ESHUTDOWN;
++
++ // handle ep0
++ if (_ep->name == ep0name) {
++ ep0_queue( _req->buf, _req->length, dev->ep0_req_len >=0 ? dev->ep0_req_len: _req->length );
++ return 0;
++ }
++
++ /* sa1100 udc can't write zlps */
++ if (ep == &dev->ep[2] && _req->length == 0)
++ return -ERANGE;
++
++ /* the old sa1100 api doesn't use 'unsigned' for lengths */
++ if (_req->length > INT_MAX)
++ return -ERANGE;
++
++ VDEBUG (dev, "%s queue req %p, len %d buf %p\n",
++ _ep->name, _req, _req->length, _req->buf);
++
++ local_irq_save (flags);
++
++ _req->status = -EINPROGRESS;
++ _req->actual = 0;
++
++ if (list_empty (&ep->queue) && !ep->stopped) {
++ /* FIXME this does DMA mapping wrong. caller is allowed
++ * to provide buffers that don't need mapping, but this
++ * doesn't use them.
++ */
++ if (ep == &ep->dev->ep[2]) {
++ PRINTKD("%s: sa1100_usb_send buf %p length %d\n",__FUNCTION__,_req->buf,_req->length);
++ sa1100_usb_send (_req, tx_callback);
++ }
++ else if (ep == &ep->dev->ep[1]) {
++ PRINTKD("%s: sa1100_usb_recv buf %p length %d\n",__FUNCTION__,_req->buf,_req->length);
++ sa1100_usb_recv (_req, rx_callback);
++ }
++ /* ep0 rx/tx is handled separately */
++ }
++ list_add_tail (&req->queue, &ep->queue);
++
++ local_irq_restore (flags);
++
++ return 0;
++}
++
++/* dequeue ALL requests */
++static void nuke (struct sa1100_ep *ep, int status)
++{
++ struct sa1100_request *req;
++
++ /* called with irqs blocked */
++ while (!list_empty (&ep->queue)) {
++ req = list_entry (ep->queue.next,
++ struct sa1100_request,
++ queue);
++ done (ep, req, status);
++ }
++ if (ep == &ep->dev->ep[1])
++ ep1_reset ();
++ else if (ep == &ep->dev->ep[2])
++ ep2_reset ();
++}
++
++/* dequeue JUST ONE request */
++static int sa1100_dequeue (struct usb_ep *_ep, struct usb_request *_req)
++{
++ struct sa1100_ep *ep;
++ struct sa1100_request *req;
++ unsigned long flags;
++
++ ep = container_of (_ep, struct sa1100_ep, ep);
++ if (!_ep || (!ep->desc && _ep->name != ep0name) || !_req)
++ return -EINVAL;
++
++ local_irq_save (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) {
++ local_irq_restore(flags);
++ return -EINVAL;
++ }
++
++ done(ep, req, -ECONNRESET);
++
++ local_irq_restore(flags);
++
++ return 0;
++}
++
++/*-------------------------------------------------------------------------*/
++
++static int
++sa1100_set_halt (struct usb_ep *_ep, int value)
++{
++ struct sa1100_ep *ep;
++
++ ep = container_of (_ep, struct sa1100_ep, ep);
++ if (unlikely(!_ep
++ || (!ep->desc && _ep->name != ep0name))
++ || (ep->desc->bmAttributes & 0x03) == USB_ENDPOINT_XFER_ISOC)
++ return -EINVAL;
++ if (!ep->dev->driver || ep->dev->gadget.speed == USB_SPEED_UNKNOWN)
++ return -ESHUTDOWN;
++
++ VDEBUG (ep->dev, "%s %s halt\n", _ep->name, value ? "set" : "clear");
++
++ /* set/clear, then synch memory views with the device */
++ if (value) {
++ if (ep == &ep->dev->ep[1])
++ ep1_stall ();
++ else
++ ep2_stall ();
++ } else {
++ if (ep == &ep->dev->ep[1])
++ ep1_reset ();
++ else
++ ep2_reset ();
++ }
++
++ return 0;
++}
++
++static struct usb_ep_ops sa1100_ep_ops = {
++ .enable = sa1100_enable,
++ .disable = sa1100_disable,
++
++ .alloc_request = sa1100_alloc_request,
++ .free_request = sa1100_free_request,
++
++ .queue = sa1100_queue,
++ .dequeue = sa1100_dequeue,
++
++ .set_halt = sa1100_set_halt,
++ // .fifo_status = sa1100_fifo_status,
++ // .fifo_flush = sa1100_fifo_flush,
++};
++
++/*-------------------------------------------------------------------------*/
++
++static int sa1100_get_frame (struct usb_gadget *_gadget)
++{
++ return -EOPNOTSUPP;
++}
++
++static int sa1100_wakeup (struct usb_gadget *_gadget)
++{
++ struct sa1100_udc *dev;
++
++ if (!_gadget)
++ return 0;
++ dev = container_of (_gadget, struct sa1100_udc, gadget);
++
++ // FIXME
++
++ return 0;
++}
++
++static const struct usb_gadget_ops sa1100_ops = {
++ .get_frame = sa1100_get_frame,
++ .wakeup = sa1100_wakeup,
++
++ // .set_selfpowered = sa1100_set_selfpowered,
++};
++
++/*-------------------------------------------------------------------------*/
++
++static inline void enable_resume_mask_suspend (void)
++{
++ int i = 0;
++
++ while (1) {
++ Ser0UDCCR |= UDCCR_SUSIM; // mask future suspend events
++ udelay (i);
++ if ( (Ser0UDCCR & UDCCR_SUSIM) || (Ser0UDCSR & UDCSR_RSTIR))
++ break;
++ if (++i == 50) {
++ WARN_ (&the_controller, "%s Could not set SUSIM %8.8lX\n",
++ __FUNCTION__, Ser0UDCCR);
++ break;
++ }
++ }
++
++ i = 0;
++ while (1) {
++ Ser0UDCCR &= ~UDCCR_RESIM;
++ udelay (i);
++ if ( (Ser0UDCCR & UDCCR_RESIM) == 0
++ || (Ser0UDCSR & UDCSR_RSTIR))
++ break;
++ if (++i == 50) {
++ WARN_ (&the_controller, "%s Could not clear RESIM %8.8lX\n",
++ __FUNCTION__, Ser0UDCCR);
++ break;
++ }
++ }
++}
++
++static inline void enable_suspend_mask_resume (void)
++{
++ int i = 0;
++ while (1) {
++ Ser0UDCCR |= UDCCR_RESIM; // mask future resume events
++ udelay (i);
++ if (Ser0UDCCR & UDCCR_RESIM || (Ser0UDCSR & UDCSR_RSTIR))
++ break;
++ if (++i == 50) {
++ WARN_ (&the_controller, "%s could not set RESIM %8.8lX\n",
++ __FUNCTION__, Ser0UDCCR);
++ break;
++ }
++ }
++ i = 0;
++ while (1) {
++ Ser0UDCCR &= ~UDCCR_SUSIM;
++ udelay (i);
++ if ( (Ser0UDCCR & UDCCR_SUSIM) == 0
++ || (Ser0UDCSR & UDCSR_RSTIR))
++ break;
++ if (++i == 50) {
++ WARN_ (&the_controller, "%s Could not clear SUSIM %8.8lX\n",
++ __FUNCTION__, Ser0UDCCR);
++ break;
++ }
++ }
++}
++
++// HACK DEBUG 3Mar01ww
++// Well, maybe not, it really seems to help! 08Mar01ww
++static void core_kicker (void)
++{
++ u32 car = Ser0UDCAR;
++ u32 imp = Ser0UDCIMP;
++ u32 omp = Ser0UDCOMP;
++
++ UDC_set (Ser0UDCCR, UDCCR_UDD);
++ udelay (300);
++ UDC_clear (Ser0UDCCR, UDCCR_UDD);
++
++ Ser0UDCAR = car;
++ Ser0UDCIMP = imp;
++ Ser0UDCOMP = omp;
++}
++
++static irqreturn_t udc_int_hndlr(int irq, void *_dev)
++{
++ struct sa1100_udc *dev = _dev;
++ u32 status = Ser0UDCSR;
++
++ PRINTKD("%s: status = 0x%x and control = 0x%lx\n", __FUNCTION__,
++ status, Ser0UDCCR);
++ /* ReSeT Interrupt Request - UDC has been reset */
++ if (status & UDCSR_RSTIR) {
++ PRINTKD("%s: processing UDCSR_RSTIR\n", __FUNCTION__);
++ if (usbctl_next_state_on_event(kEvReset) != kError) {
++ /* starting 20ms or so reset sequence now... */
++ INFO (dev, "Resetting\n");
++ ep0_reset(); // just set state to idle
++ ep1_reset(); // flush dma, clear false stall
++ ep2_reset(); // flush dma, clear false stall
++ }
++ // mask reset ints, they flood during sequence, enable
++ // suspend and resume
++ UDC_set(Ser0UDCCR, UDCCR_REM); // mask reset
++ UDC_clear(Ser0UDCCR, (UDCCR_SUSIM | UDCCR_RESIM)); // enable suspend and resume
++ UDC_flip(Ser0UDCSR, status); // clear all pending sources
++ PRINTKD("%s: setting USB_FULL_SPEED\n",__FUNCTION__);
++ dev->gadget.speed = USB_SPEED_FULL;
++ return IRQ_HANDLED; // NCB
++ }
++
++ /* else we have done something other than reset,
++ * so be sure reset enabled
++ */
++ UDC_clear(Ser0UDCCR, UDCCR_REM);
++
++ /* RESume Interrupt Request */
++ if (status & UDCSR_RESIR) {
++ struct usb_gadget_driver *driver = dev->driver;
++
++ PRINTKD("%s: processing UDCSR_RESIR\n",__FUNCTION__);
++ if (driver->resume)
++ driver->resume (&dev->gadget);
++ core_kicker ();
++ enable_suspend_mask_resume ();
++ }
++
++ /* SUSpend Interrupt Request */
++ if (status & UDCSR_SUSIR) {
++ struct usb_gadget_driver *driver = dev->driver;
++
++ PRINTKD("%s: processing UDCSR_SUSIR\n",__FUNCTION__);
++ if (driver->suspend)
++ driver->suspend (&dev->gadget);
++ enable_resume_mask_suspend ();
++ }
++
++ UDC_flip(Ser0UDCSR, status); // clear all pending sources
++
++ if (status & UDCSR_EIR)
++ PRINTKD("%s: processing ep0_int_hndlr\n",__FUNCTION__);
++ ep0_int_hndlr();
++
++ if (status & UDCSR_RIR) {
++ PRINTKD("%s: processing ep1_int_hndlr\n",__FUNCTION__);
++ ep1_int_hndlr(status);
++ }
++ if (status & UDCSR_TIR) {
++ PRINTKD("%s: processing ep2_int_hndlr\n",__FUNCTION__);
++ ep2_int_hndlr(status);
++ }
++
++ return IRQ_HANDLED; // NCB
++}
++
++/* soft_connect_hook ()
++ * Some devices have platform-specific circuitry to make USB
++ * not seem to be plugged in, even when it is. This allows
++ * software to control when a device 'appears' on the USB bus
++ * (after Linux has booted and this driver has loaded, for
++ * example). If you have such a circuit, control it here.
++ */
++#ifdef CONFIG_SA1100_EXTENEX1
++static void soft_connect_hook(int enable)
++{
++ if (machine_is_extenex1 ()) {
++ if (enable) {
++ PPDR |= PPC_USB_SOFT_CON;
++ PPSR |= PPC_USB_SOFT_CON;
++ } else {
++ PPSR &= ~PPC_USB_SOFT_CON;
++ PPDR &= ~PPC_USB_SOFT_CON;
++ }
++ }
++}
++#elif defined(CONFIG_SA1100_BALLOON)
++static void soft_connect_hook(int enable)
++{
++ if (machine_is_balloon()) {
++ if (enable)
++ balloon_cpld_control(BALLOON_UDC_DISCONNECT, 0);
++ else
++ balloon_cpld_control(BALLOON_UDC_DISCONNECT, 1);
++ }
++}
++#elif defined(CONFIG_SA1100_COLLIE)
++static int collie_usb_init(void)
++{
++ int rc;
++ rc = gpio_request(COLLIE_GPIO_LB_VOL_CHG, "usb enable");
++ if (rc)
++ return rc;
++
++ rc = gpio_direction_output(COLLIE_GPIO_LB_VOL_CHG, 1);
++ if (rc)
++ gpio_free(COLLIE_GPIO_LB_VOL_CHG);
++
++ return rc;
++}
++
++static void collie_set_usb(int enable)
++{
++ gpio_set_value(COLLIE_GPIO_LB_VOL_CHG, enable);
++}
++
++static void collie_usb_exit(void)
++{
++ gpio_free(COLLIE_GPIO_LB_VOL_CHG);
++}
++
++static void soft_connect_hook(int enable)
++{
++ collie_set_usb(enable);
++}
++#else
++#define soft_connect_hook(x) do { } while (0);
++#endif
++
++/* "function" sysfs attribute */
++static ssize_t
++show_function(struct device *_dev, struct device_attribute *attr, char *buf)
++{
++ struct sa1100_udc *dev = dev_get_drvdata (_dev);
++
++ if (!dev->driver
++ || !dev->driver->function
++ || strlen(dev->driver->function) > PAGE_SIZE)
++ return 0;
++ return scnprintf (buf, PAGE_SIZE, "%s\n", dev->driver->function);
++}
++static DEVICE_ATTR(function, S_IRUGO, show_function, NULL);
++
++/* disable the UDC at the source */
++static void udc_disable(struct sa1100_udc *dev)
++{
++ soft_connect_hook(0);
++ UDC_set(Ser0UDCCR, UDCCR_UDD);
++ dev->gadget.speed = USB_SPEED_UNKNOWN;
++ ep0_idle(dev);
++}
++
++static void udc_reinit(struct sa1100_udc *dev)
++{
++ u32 i;
++
++ /* Initialize the gadget controller data structure */
++ INIT_LIST_HEAD(&dev->gadget.ep_list);
++ INIT_LIST_HEAD(&dev->gadget.ep0->ep_list);
++ ep0_idle(dev);
++ for ( i = 0 ; i < 3 ; i++) {
++ struct sa1100_ep *ep = &dev->ep[i];
++ if (i != 0)
++ list_add_tail(&ep->ep.ep_list, &dev->gadget.ep_list);
++ ep->desc = NULL;
++ ep->stopped = 0;
++ INIT_LIST_HEAD(&ep->queue);
++ }
++}
++
++/* enable the udc at the source */
++static void udc_enable(struct sa1100_udc *dev)
++{
++ UDC_clear (Ser0UDCCR, UDCCR_UDD);
++ ep0_idle(dev);
++}
++
++static void ep0_start(struct sa1100_udc *dev)
++{
++ udc_enable(dev);
++ udelay(100);
++
++ /* clear stall - receiver seems to start stalled? 19Jan01ww */
++ /* also clear other stuff just to be thurough 22Feb01ww */
++ UDC_clear(Ser0UDCCS1, UDCCS1_FST | UDCCS1_RPE | UDCCS1_RPC );
++ UDC_clear(Ser0UDCCS2, UDCCS2_FST | UDCCS2_TPE | UDCCS2_TPC );
++
++ /* mask everything */
++ Ser0UDCCR = 0xFC;
++
++ /* flush DMA and fire through some -EAGAINs */
++ ep1_init(dev->ep[1].dmaregs);
++ ep2_init(dev->ep[2].dmaregs);
++
++ /* enable any platform specific hardware */
++ soft_connect_hook(1);
++
++ /* clear all top-level sources */
++ Ser0UDCSR = UDCSR_RSTIR | UDCSR_RESIR | UDCSR_EIR |
++ UDCSR_RIR | UDCSR_TIR | UDCSR_SUSIR ;
++
++ /* EXERIMENT - a short line in the spec says toggling this
++ * bit diddles the internal state machine in the udc to
++ * expect a suspend
++ */
++ Ser0UDCCR |= UDCCR_RESIM;
++ /* END EXPERIMENT 10Feb01ww */
++
++ /* enable any platform specific hardware */
++ soft_connect_hook(1);
++
++ /* Enable interrupts. If you are unplugged you will immediately
++ * get a suspend interrupt. If you are plugged and have a soft
++ * connect-circuit, you will get a reset. If you are plugged
++ * without a soft-connect, I think you also get suspend. In short,
++ * start with suspend masked and everything else enabled
++ */
++ UDC_write(Ser0UDCCR, UDCCR_SUSIM);
++}
++
++
++/* when a driver is successfully registered, it will receive
++ * control requests including set_configuration(), which enables
++ * non-control requests. then usb traffic follows until a
++ * disconnect is reported. then a host may connect again, or
++ * the driver might get unbound.
++ */
++int usb_gadget_register_driver(struct usb_gadget_driver *driver)
++{
++ struct sa1100_udc *dev = the_controller;
++ int retval;
++
++ if (!driver || !driver->bind || !driver->setup)
++ 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 = device_add(&dev->gadget.dev);
++ if (retval != 0) {
++ printk(KERN_ERR "Error in device_add() : %d\n",retval);
++ goto register_error;
++ }
++
++ retval = driver->bind (&dev->gadget);
++ if (retval != 0) {
++ DEBUG(dev, "bind to driver %s --> %d\n",
++ driver->driver.name, retval);
++ device_del(&dev->gadget.dev);
++ goto register_error;
++ }
++
++ retval = device_create_file(dev->dev, &dev_attr_function);
++
++ /* ... then enable host detection and ep0; and we're ready
++ * for set_configuration as well as eventual disconnect.
++ */
++ ep0_start(dev);
++
++ DEBUG(dev, "%s ready\n", driver->driver.name);
++
++ return 0;
++
++register_error:
++ dev->driver = NULL;
++ dev->gadget.dev.driver = NULL;
++ return retval;
++}
++EXPORT_SYMBOL (usb_gadget_register_driver);
++
++static void
++stop_activity(struct sa1100_udc *dev, struct usb_gadget_driver *driver)
++{
++ int i;
++
++ /* don't disconnect if it's not connected */
++ if (dev->gadget.speed == USB_SPEED_UNKNOWN)
++ driver = NULL;
++ dev->gadget.speed = USB_SPEED_UNKNOWN;
++
++ /* mask everything */
++ Ser0UDCCR = 0xFC;
++
++ /* stop hardware; prevent new request submissions;
++ * and kill any outstanding requests.
++ */
++ for (i = 0; i < 3; i++) {
++ struct sa1100_ep *ep = &dev->ep[i];
++ ep->stopped = 1;
++ nuke(ep, -ESHUTDOWN);
++ }
++ udc_disable (dev);
++
++ /* report disconnect; the driver is already quiesced */
++ if (driver)
++ driver->disconnect(&dev->gadget);
++
++ /* re-init driver-visible data structures */
++ udc_reinit(dev);
++}
++
++int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
++{
++ struct sa1100_udc *dev = the_controller;
++
++ if (!dev)
++ return -ENODEV;
++ if (!driver || driver != dev->driver)
++ return -EINVAL;
++
++ local_irq_disable();
++ stop_activity (dev, driver);
++ local_irq_enable();
++ if (driver->unbind)
++ driver->unbind(&dev->gadget);
++ dev->driver = 0;
++
++ device_del(&dev->gadget.dev);
++ device_remove_file(dev->dev, &dev_attr_function);
++
++ DEBUG (dev, "unregistered driver '%s'\n", driver->driver.name);
++ return 0;
++}
++EXPORT_SYMBOL (usb_gadget_unregister_driver);
++
++
++/*-------------------------------------------------------------------------*/
++
++/*-------------------------------------------------------------------------*/
++
++//////////////////////////////////////////////////////////////////////////////
++// Proc Filesystem Support
++//////////////////////////////////////////////////////////////////////////////
++
++#if CONFIG_PROC_FS
++
++#define SAY(fmt,args...) p += sprintf (p, fmt, ## args)
++#define SAYV(num) p += sprintf (p, num_fmt, "Value", num)
++#define SAYC(label,yn) p += sprintf (p, yn_fmt, label, yn)
++#define SAYS(label,v) p += sprintf (p, cnt_fmt, label, v)
++
++static int usbctl_read_proc (char *page, char **start, off_t off,
++ int count, int *eof, void *data)
++{
++ const char * num_fmt = "%25.25s: %8.8lX\n";
++ const char * cnt_fmt = "%25.25s: %lu\n";
++ const char * yn_fmt = "%25.25s: %s\n";
++ const char * yes = "YES";
++ const char * no = "NO";
++ unsigned long v;
++ char * p = page;
++ int len;
++
++ SAY ("SA1100 USB Controller Core\n");
++
++ SAYS ("ep0 bytes read", usbd_info.stats.ep0_bytes_read);
++ SAYS ("ep0 bytes written", usbd_info.stats.ep0_bytes_written);
++ SAYS ("ep0 FIFO read failures", usbd_info.stats.ep0_fifo_read_failures);
++ SAYS ("ep0 FIFO write failures", usbd_info.stats.ep0_fifo_write_failures);
++
++ SAY ("\n");
++
++ v = Ser0UDCAR;
++ SAY ("%25.25s: 0x%8.8lX - %ld\n", "Address Register", v, v);
++ v = Ser0UDCIMP;
++ SAY ("%25.25s: %ld (%8.8lX)\n", "IN max packet size", v+1, v);
++ v = Ser0UDCOMP;
++ SAY ("%25.25s: %ld (%8.8lX)\n", "OUT max packet size", v+1, v);
++
++ v = Ser0UDCCR;
++ SAY ("\nUDC Mask Register\n");
++ SAYV (v);
++ SAYC ("UDC Active", (v & UDCCR_UDA) ? yes : no);
++ SAYC ("Suspend interrupts masked", (v & UDCCR_SUSIM) ? yes : no);
++ SAYC ("Resume interrupts masked", (v & UDCCR_RESIM) ? yes : no);
++ SAYC ("Reset interrupts masked", (v & UDCCR_REM) ? yes : no);
++
++ v = Ser0UDCSR;
++ SAY ("\nUDC Interrupt Request Register\n");
++ SAYV (v);
++ SAYC ("Reset pending", (v & UDCSR_RSTIR) ? yes : no);
++ SAYC ("Suspend pending", (v & UDCSR_SUSIR) ? yes : no);
++ SAYC ("Resume pending", (v & UDCSR_RESIR) ? yes : no);
++ SAYC ("ep0 pending", (v & UDCSR_EIR) ? yes : no);
++ SAYC ("receiver pending", (v & UDCSR_RIR) ? yes : no);
++ SAYC ("tramsitter pending", (v & UDCSR_TIR) ? yes : no);
++
++#ifdef CONFIG_SA1100_EXTENEX1
++ SAYC ("\nSoft connect", (PPSR & PPC_USB_SOFT_CON) ? "Visible" : "Hidden");
++#endif
++
++#if 1
++ SAY ("\nDMA Tx registers\n");
++ {
++ dma_regs_t *r=the_controller->ep[2].dmaregs;
++ SAY (" DDAR");
++ SAYV(r->DDAR);
++ SAY (" DCSR");
++ SAYV(r->RdDCSR);
++ SAY (" DBSA (address buf A) ");
++ SAYV(r->DBSA);
++ SAY (" DBTA (transfer count A) ");
++ SAYV(r->DBTA);
++ SAY (" DBSB (address buf B) ");
++ SAYV(r->DBSB);
++ SAY (" DBTB (transfer count B) ");
++ SAYV(r->DBTB);
++
++ }
++ SAY ("\nDMA Rx registers\n");
++ {
++ dma_regs_t *r=the_controller->ep[1].dmaregs;
++ SAY (" DDAR");
++ SAYV(r->DDAR);
++ SAY (" DCSR");
++ SAYV(r->RdDCSR);
++ SAY (" DBSA (address buf A) ");
++ SAYV(r->DBSA);
++ SAY (" DBTA (transfer count A) ");
++ SAYV(r->DBTA);
++ SAY (" DBSB (address buf B) ");
++ SAYV(r->DBSB);
++ SAY (" DBTB (transfer count B) ");
++ SAYV(r->DBTB);
++
++ }
++#endif
++#if 1
++ v = Ser0UDCCS0;
++ SAY ("\nUDC Endpoint Zero Status Register\n");
++ SAYV (v);
++ SAYC ("Out Packet Ready", (v & UDCCS0_OPR) ? yes : no);
++ SAYC ("In Packet Ready", (v & UDCCS0_IPR) ? yes : no);
++ SAYC ("Sent Stall", (v & UDCCS0_SST) ? yes : no);
++ SAYC ("Force Stall", (v & UDCCS0_FST) ? yes : no);
++ SAYC ("Data End", (v & UDCCS0_DE) ? yes : no);
++ SAYC ("Data Setup End", (v & UDCCS0_SE) ? yes : no);
++ SAYC ("Serviced (SO)", (v & UDCCS0_SO) ? yes : no);
++
++ v = Ser0UDCCS1;
++ SAY ("\nUDC Receiver Status Register\n");
++ SAYV (v);
++ SAYC ("Receive Packet Complete", (v & UDCCS1_RPC) ? yes : no);
++ SAYC ("Sent Stall", (v & UDCCS1_SST) ? yes : no);
++ SAYC ("Force Stall", (v & UDCCS1_FST) ? yes : no);
++ SAYC ("Receive Packet Error", (v & UDCCS1_RPE) ? yes : no);
++ SAYC ("Receive FIFO not empty", (v & UDCCS1_RNE) ? yes : no);
++
++ v = Ser0UDCCS2;
++ SAY ("\nUDC Transmitter Status Register\n");
++ SAYV (v);
++ SAYC ("FIFO has < 8 of 16 chars", (v & UDCCS2_TFS) ? yes : no);
++ SAYC ("Transmit Packet Complete", (v & UDCCS2_TPC) ? yes : no);
++ SAYC ("Transmit FIFO underrun", (v & UDCCS2_TUR) ? yes : no);
++ SAYC ("Transmit Packet Error", (v & UDCCS2_TPE) ? yes : no);
++ SAYC ("Sent Stall", (v & UDCCS2_SST) ? yes : no);
++ SAYC ("Force Stall", (v & UDCCS2_FST) ? yes : no);
++#endif
++
++ len = (p - page) - off;
++ if (len < 0)
++ len = 0;
++ *eof = (len <=count) ? 1 : 0;
++ *start = page + off;
++ return len;
++}
++
++static inline void register_proc_entry (void)
++{
++ create_proc_read_entry (driver_name, 0, NULL,
++ usbctl_read_proc, NULL);
++}
++
++static inline void unregister_proc_entry (void)
++{
++ remove_proc_entry (driver_name, NULL);
++}
++
++#else
++
++#define register_proc_entry() do {} while (0)
++#define unregister_proc_entry() do {} while (0)
++
++#endif /* CONFIG_PROC_FS */
++
++/*-------------------------------------------------------------------------*/
++
++MODULE_DESCRIPTION ("sa1100_udc");
++MODULE_AUTHOR ("Various");
++MODULE_LICENSE ("GPL");
++
++static struct sa1100_udc memory = {
++ .gadget = {
++ .ops = &sa1100_ops,
++ .ep0 = &memory.ep[0].ep,
++ .name = driver_name,
++ .dev = {
++ .init_name = "gadget",
++ },
++ },
++
++ /* control endpoint */
++ .ep[0] = {
++ .ep = {
++ .name = ep0name,
++ .ops = &sa1100_ep_ops,
++ .maxpacket = EP0_FIFO_SIZE,
++ },
++ .dev = &memory,
++ },
++
++ /* first group of endpoints */
++ .ep[1] = {
++ .ep = {
++ .name = "ep1out-bulk",
++ .ops = &sa1100_ep_ops,
++ .maxpacket = BULK_FIFO_SIZE,
++ },
++ .dev = &memory,
++ },
++ .ep[2] = {
++ .ep = {
++ .name = "ep2in-bulk",
++ .ops = &sa1100_ep_ops,
++ .maxpacket = BULK_FIFO_SIZE,
++ },
++ .dev = &memory,
++ }
++};
++
++static int __init sa1100_udc_probe(struct device *_dev)
++{
++ struct sa1100_udc *dev = &memory;
++ int retval = 0;
++
++ /* setup dev */
++ dev->dev = _dev;
++// dev->mach = _dev->platform_data;
++
++ device_initialize(&dev->gadget.dev);
++ dev->gadget.dev.parent = _dev;
++ dev->gadget.dev.dma_mask = _dev->dma_mask;
++
++ the_controller = dev;
++ dev_set_drvdata(_dev, dev);
++
++ /* controller stays disabled until gadget driver is bound */
++ udc_disable(dev);
++ udc_reinit(dev);
++
++// spin_lock_init(&the_udc.lock);
++ register_proc_entry();
++
++#if defined(CONFIG_SA1100_COLLIE)
++ collie_usb_init();
++#endif
++
++ /* setup dma channels and IRQ */
++ retval = sa1100_request_dma(DMA_Ser0UDCRd, "USB receive",
++ NULL, NULL, &dev->ep[1].dmaregs);
++ if (retval) {
++ ERROR(dev, "couldn't get rx dma, err %d\n", retval);
++ goto err_rx_dma;
++ }
++ retval = sa1100_request_dma(DMA_Ser0UDCWr, "USB transmit",
++ NULL, NULL, &dev->ep[2].dmaregs);
++ if (retval) {
++ ERROR(dev, "couldn't get tx dma, err %d\n", retval);
++ goto err_tx_dma;
++ }
++ retval = request_irq(IRQ_Ser0UDC, udc_int_hndlr, IRQF_DISABLED,
++ driver_name, dev);
++ if (retval) {
++ ERROR(dev, "couldn't get irq, err %d\n", retval);
++ goto err_irq;
++ }
++
++ INFO(dev, "initialized, rx %p tx %p irq %d\n",
++ dev->ep[1].dmaregs, dev->ep[2].dmaregs, IRQ_Ser0UDC);
++ return 0;
++
++err_irq:
++ sa1100_free_dma(dev->ep[2].dmaregs);
++ usbd_info.dmaregs_rx = 0;
++err_tx_dma:
++ sa1100_free_dma(dev->ep[1].dmaregs);
++ usbd_info.dmaregs_tx = 0;
++err_rx_dma:
++ return retval;
++}
++
++static int __exit sa1100_udc_remove(struct device *_dev)
++{
++ struct sa1100_udc *dev = dev_get_drvdata(_dev);
++
++ udc_disable(dev);
++ unregister_proc_entry();
++ usb_gadget_unregister_driver(dev->driver);
++ sa1100_free_dma(dev->ep[1].dmaregs);
++ sa1100_free_dma(dev->ep[2].dmaregs);
++ free_irq(IRQ_Ser0UDC, dev);
++ dev_set_drvdata(_dev,NULL);
++ the_controller = NULL;
++#if defined(CONFIG_SA1100_COLLIE)
++ collie_usb_exit();
++#endif
++ return 0;
++}
++
++static struct device_driver udc_driver = {
++ .name = "sa11x0-udc",
++ .bus = &platform_bus_type,
++ .probe = sa1100_udc_probe,
++ .remove = __exit_p(sa1100_udc_remove),
++// .suspend = sa1100_udc_suspend,
++// .resume = sa1100_udc_resume,
++ .owner = THIS_MODULE,
++};
++
++static int __init udc_init(void)
++{
++ printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION);
++#ifdef NCB_DMA_FIX
++ send_buffer = (char*) kzalloc(SEND_BUFFER_SIZE, GFP_KERNEL | GFP_DMA );
++ receive_buffer = (char*) kzalloc(RECEIVE_BUFFER_SIZE, GFP_KERNEL | GFP_DMA );
++#endif
++ return driver_register(&udc_driver);
++}
++module_init(udc_init);
++
++static void __exit udc_exit(void)
++{
++#ifdef NCB_DMA_FIX
++ if (send_buffer) {
++ kfree(send_buffer);
++ send_buffer = NULL;
++ }
++ if (receive_buffer) {
++ kfree(receive_buffer);
++ receive_buffer = NULL;
++ }
++#endif
++ driver_unregister(&udc_driver);
++}
++module_exit(udc_exit);
+diff --git a/drivers/usb/gadget/sa1100_udc.h b/drivers/usb/gadget/sa1100_udc.h
+new file mode 100644
+index 0000000..86fa28d
+--- /dev/null
++++ b/drivers/usb/gadget/sa1100_udc.h
+@@ -0,0 +1,94 @@
++/*
++ * internals of "new style" UDC controller
++ * <linux/usb_gadget.h> replaces ARM-specific "sa1100_usb.h".
++ */
++
++struct sa1100_ep {
++ struct usb_ep ep;
++ struct sa1100_udc *dev;
++ //unsigned long irqs;
++
++ const struct usb_endpoint_descriptor *desc;
++ struct list_head queue;
++ dma_regs_t *dmaregs;
++ unsigned stopped : 1;
++};
++
++struct sa1100_request {
++ struct usb_request req;
++ struct list_head queue;
++// NCB unsigned mapped : 1;
++};
++
++enum ep0_state {
++ EP0_IDLE,
++ EP0_IN_DATA_PHASE,
++ EP0_OUT_DATA_PHASE,
++ EP0_END_XFER,
++ EP0_STALL,
++};
++
++#define EP0_FIFO_SIZE ((unsigned)8)
++#define BULK_FIFO_SIZE ((unsigned)64)
++//#define ISO_FIFO_SIZE ((unsigned)256)
++//#define INT_FIFO_SIZE ((unsigned)8)
++
++struct udc_stats {
++ struct ep0stats {
++ unsigned long ops;
++ unsigned long bytes;
++ } read, write;
++ unsigned long irqs;
++};
++
++struct sa1100_udc {
++ struct usb_gadget gadget;
++ struct usb_gadget_driver *driver;
++ struct device *dev;
++ enum ep0_state ep0state;
++ struct udc_stats stats;
++// NCB spinlock_t lock;
++// NCB dma_regs_t *dmaregs_tx, *dmaregs_rx;
++ unsigned got_irq : 1,
++ vbus : 1,
++ pullup : 1,
++ has_cfr : 1,
++ req_pending : 1,
++ req_std : 1,
++ req_config : 1;
++ struct timer_list timer;
++ u64 dma_mask;
++ unsigned char address;
++ struct sa1100_ep ep[3];
++ int ep0_req_len;
++};
++
++/*-------------------------------------------------------------------------*/
++
++#define xprintk(dev,level,fmt,args...) \
++ printk(level "%s: " fmt , driver_name , ## args)
++
++#ifdef DEBUG
++#undef DEBUG
++#define DEBUG(dev,fmt,args...) \
++ xprintk(dev , KERN_DEBUG , fmt , ## args)
++#else
++#define DEBUG(dev,fmt,args...) \
++ do { } while (0)
++#endif /* DEBUG */
++
++#ifdef VERBOSE
++#define VDEBUG DEBUG
++#else
++#define VDEBUG(dev,fmt,args...) \
++ do { } while (0)
++#endif /* VERBOSE */
++
++#define ERROR(dev,fmt,args...) \
++ xprintk(dev , KERN_ERR , fmt , ## args)
++#define WARN_(dev,fmt,args...) \
++ xprintk(dev , KERN_WARNING , fmt , ## args)
++#define INFO(dev,fmt,args...) \
++ xprintk(dev , KERN_INFO , fmt , ## args)
++
++/*-------------------------------------------------------------------------*/
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/0015-ucb1x00-sound-hack-collie-specific.patch b/recipes/linux/linux-2.6.31/collie/0015-ucb1x00-sound-hack-collie-specific.patch
new file mode 100644
index 0000000000..29ad090e63
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/0015-ucb1x00-sound-hack-collie-specific.patch
@@ -0,0 +1,899 @@
+From 7e2cf8ebfd553d025184aef2c0574119e95e84a4 Mon Sep 17 00:00:00 2001
+From: Thomas Kunze <thommycheck@gmx.de>
+Date: Sat, 10 Oct 2009 21:05:21 +0200
+Subject: [PATCH 15/15] ucb1x00 sound hack (collie specific)
+
+---
+ sound/arm/Kconfig | 10 +
+ sound/arm/Makefile | 3 +
+ sound/arm/sa11xx-ucb1x00.c | 843 ++++++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 856 insertions(+), 0 deletions(-)
+ create mode 100644 sound/arm/sa11xx-ucb1x00.c
+
+diff --git a/sound/arm/Kconfig b/sound/arm/Kconfig
+index 885683a..068962e 100644
+--- a/sound/arm/Kconfig
++++ b/sound/arm/Kconfig
+@@ -11,6 +11,16 @@ menuconfig SND_ARM
+
+ if SND_ARM
+
++config SND_SA11XX_UCB1X00
++ tristate "SA11xx UCB1x00 driver (Simpad)"
++ depends on ARCH_SA1100 && SND
++ select SND_PCM
++ help
++ Say Y here if you have a Simpad handheld computer
++
++ To compile this driver as a module, choose M here: the module
++ will be called snd-sa11xx-ucb1x00.
++
+ config SND_ARMAACI
+ tristate "ARM PrimeCell PL041 AC Link support"
+ depends on ARM_AMBA
+diff --git a/sound/arm/Makefile b/sound/arm/Makefile
+index 5a549ed..48a25d0 100644
+--- a/sound/arm/Makefile
++++ b/sound/arm/Makefile
+@@ -2,6 +2,9 @@
+ # Makefile for ALSA
+ #
+
++obj-$(CONFIG_SND_SA11XX_UCB1X00) += snd-sa11xx-ucb1x00.o
++snd-sa11xx-ucb1x00-objs := sa11xx-ucb1x00.o
++
+ obj-$(CONFIG_SND_ARMAACI) += snd-aaci.o
+ snd-aaci-objs := aaci.o devdma.o
+
+diff --git a/sound/arm/sa11xx-ucb1x00.c b/sound/arm/sa11xx-ucb1x00.c
+new file mode 100644
+index 0000000..e93e7d8
+--- /dev/null
++++ b/sound/arm/sa11xx-ucb1x00.c
+@@ -0,0 +1,843 @@
++/*
++ * Driver for Philips UCB1300 on Siemens Simpad
++ * Copyright (C) 2008 Thomas Schätzlein <thomas@pnxs.de>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/init.h>
++#include <linux/err.h>
++#include <linux/platform_device.h>
++#include <linux/errno.h>
++#include <linux/ioctl.h>
++#include <linux/delay.h>
++#include <linux/slab.h>
++
++#ifdef CONFIG_PM
++#include <linux/pm.h>
++#endif
++
++#include <asm/dma.h>
++
++#include <sound/core.h>
++#include <sound/control.h>
++#include <sound/pcm.h>
++#include <sound/initval.h>
++#include <sound/info.h>
++
++#include <linux/mfd/ucb1x00.h>
++
++#undef DEBUG_MODE
++#undef DEBUG_FUNCTION_NAMES
++
++#define AUDIO_RATE_DEFAULT 44100
++
++/* extra register defines for collieis tc35143af */
++#define UCB_AC_A_MIC2_SEL (1 << 15)
++#define UCB_AC_A_OUT2_ENA (1 << 14)
++#define UCB_AC_B_IN_MUTE (1 << 13)
++#define UCB_AC_B_OUT_MUTE (1 << 5)
++
++
++
++MODULE_AUTHOR("Thomas Schätzlein <thomas@pnxs.de>");
++MODULE_LICENSE("GPL");
++MODULE_DESCRIPTION("SA1100/SA1111 + UCB1300 driver for ALSA");
++MODULE_SUPPORTED_DEVICE("{{UCB1x00,Simpad}}");
++
++static char *id; /* ID for this card */
++
++module_param(id, charp, 0444);
++MODULE_PARM_DESC(id, "ID string for SA1100/SA1111 + UCB1x00 soundcard.");
++
++struct audio_stream {
++ char *id; /* identification string */
++ int stream_id; /* numeric identification */
++ dma_device_t dma_dev; /* device identifier for DMA */
++ dma_regs_t *dma_regs; /* points to our DMA registers */
++ unsigned int active:1; /* we are using this stream for transfer now */
++ int period; /* current transfer period */
++ int periods; /* current count of periods registerd in the DMA engine */
++ unsigned int old_offset;
++ spinlock_t dma_lock; /* for locking in DMA operations (see dma-sa1100.c in the kernel) */
++ struct snd_pcm_substream *stream;
++};
++
++struct sa11xx_ucb1x00 {
++ struct snd_card* card;
++ struct snd_pcm* pcm;
++ struct ucb1x00_dev* ucb1x00;
++ struct device* pdev;
++ long samplerate;
++ struct audio_stream s[2]; /* playback & capture */
++};
++
++#if 0
++static unsigned int rates[] = {
++ 8000, 10666, 10985, 14647,
++ 16000, 21970, 22050, 24000,
++ 29400, 32000, 44100, 48000,
++};
++
++static struct snd_pcm_hw_constraint_list hw_constraints_rates = {
++ .count = ARRAY_SIZE(rates),
++ .list = rates,
++ .mask = 0,
++};
++#endif
++
++#define UCB1x00_SINGLE(xname, where, reg, shift, mask, invert) \
++{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, .info = snd_ucb1x00_info_single, \
++ .get = snd_ucb1x00_get_single, .put = snd_ucb1x00_put_single, \
++ .private_value = where | (reg << 5) | (shift << 9) | (mask << 13) | (invert << 19) \
++}
++
++#define UCB1x00_SINGLE_WHERE(value) (value & 31)
++#define UCB1x00_SINGLE_REG(value) ((value >> 5) & 15)
++#define UCB1x00_SINGLE_SHIFT(value) ((value >> 9) & 15)
++#define UCB1x00_SINGLE_MASK(value) ((value >> 13) & 63)
++#define UCB1x00_SINGLE_INV(value) ((value >> 19) & 1)
++
++static int snd_ucb1x00_info_single(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_info *uinfo)
++{
++ int mask = UCB1x00_SINGLE_MASK(kcontrol->private_value);
++
++// printk(KERN_INFO "snd_ucb1x00_info_single called\n");
++
++ uinfo->type = mask == 1 ? SNDRV_CTL_ELEM_TYPE_BOOLEAN : SNDRV_CTL_ELEM_TYPE_INTEGER;
++ uinfo->count = 1;
++ uinfo->value.integer.min = 0;
++ uinfo->value.integer.max = mask;
++ return 0;
++}
++
++static int snd_ucb1x00_get_single(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct sa11xx_ucb1x00* chip = snd_kcontrol_chip(kcontrol);
++ struct ucb1x00 *ucb = chip->ucb1x00->ucb;
++ unsigned int retval;
++
++ int reg = UCB1x00_SINGLE_REG(kcontrol->private_value);
++ int shift = UCB1x00_SINGLE_SHIFT(kcontrol->private_value);
++ int mask = UCB1x00_SINGLE_MASK(kcontrol->private_value);
++ int invert= UCB1x00_SINGLE_INV(kcontrol->private_value);
++
++// printk(KERN_INFO "snd_ucb1x00_get_single called\n");
++
++ retval = (ucb1x00_reg_read(ucb, reg) >> shift) & mask;
++
++// printk(KERN_INFO "ucb1x00_reg_read reg=%02X value=%08X\n", reg, retval);
++
++ ucontrol->value.integer.value[0] = retval;
++ if (invert) {
++ ucontrol->value.integer.value[0] = mask - ucontrol->value.integer.value[0];
++ }
++
++ return 0;
++}
++
++static int snd_ucb1x00_put_single(struct snd_kcontrol *kcontrol,
++ struct snd_ctl_elem_value *ucontrol)
++{
++ struct sa11xx_ucb1x00* chip = snd_kcontrol_chip(kcontrol);
++ struct ucb1x00 *ucb = chip->ucb1x00->ucb;
++ int reg = UCB1x00_SINGLE_REG(kcontrol->private_value);
++ int shift = UCB1x00_SINGLE_SHIFT(kcontrol->private_value);
++ int mask = UCB1x00_SINGLE_MASK(kcontrol->private_value);
++ int invert= UCB1x00_SINGLE_INV(kcontrol->private_value);
++ unsigned short val;
++ unsigned int regval;
++
++ val = (ucontrol->value.integer.value[0] & mask);
++ if (invert)
++ val = mask - val;
++
++// printk(KERN_INFO "snd_ucb1x00_put_single called val=%d\n", val);
++
++ regval = ucb1x00_reg_read(ucb, reg);
++ regval &= ~(mask << shift);
++ regval |= val << shift;
++// printk(KERN_INFO "snd_ucb1x00_put_single write regval=%08X to reg %d\n", regval, reg);
++ ucb1x00_reg_write(ucb, reg, regval);
++ return 0;
++}
++
++enum ucb1x00_config {
++ CMD_OMUTE = 0,
++ CMD_VOLUME,
++ CMD_IGAIN,
++ CMD_IMUTE,
++ CMD_LOOPBACK,
++ CMD_CLIP,
++ CMD_OENA,
++};
++
++static struct snd_kcontrol_new snd_ucb1x00_controls[] = {
++ UCB1x00_SINGLE("Master Playback Switch", CMD_OMUTE, UCB_AC_B, 5, 0x01, 1),
++ UCB1x00_SINGLE("Master Playback Volume", CMD_VOLUME, UCB_AC_B, 0, 0x1F, 1),
++
++ UCB1x00_SINGLE("Input Gain", CMD_IGAIN, UCB_AC_A, 7, 0x3F, 1),
++ UCB1x00_SINGLE("Input Mute", CMD_IMUTE, UCB_AC_B, 13, 1, 0),
++ UCB1x00_SINGLE("Output Mute", CMD_OMUTE, UCB_AC_B, 5, 1, 0),
++
++ UCB1x00_SINGLE("Audio Loopback", CMD_LOOPBACK, UCB_AC_B, 8, 1, 0),
++};
++
++static void sa11xx_ucb1x00_set_samplerate(struct sa11xx_ucb1x00 *sa11xx_ucb1x00, long rate)
++{
++ struct ucb1x00 *ucb = sa11xx_ucb1x00->ucb1x00->ucb;
++ unsigned int div_rate = ucb1x00_clkrate(ucb) / 32;
++ unsigned int div;
++ unsigned int reg;
++
++// printk(KERN_INFO "sa11xx_ucb1x00_set_samplerate called rate=%d div_rate=%d\n", rate, div_rate);
++
++ div = (div_rate + (rate / 2)) / rate;
++ if (div < 6) {
++ div = 6;
++ }
++ if (div > 127) {
++ div = 127;
++ }
++/*
++ printk(KERN_INFO "ucb=%08X\n", ucb);
++ printk(KERN_INFO "ucb1x00_set_audio_divisor(%d)\n", div*32);
++ printk(KERN_INFO "ucb1x00_reg_write(reg=%d, div=%d)\n", UCB_AC_A, div);
++*/
++ reg = ucb1x00_reg_read(ucb, UCB_AC_B);
++ reg &= ~(UCB_AC_B_IN_ENA);
++ ucb1x00_reg_write(ucb, UCB_AC_B, reg);
++
++ reg = ucb1x00_reg_read(ucb, UCB_AC_A);
++ reg &= ~(UCB_AC_A_OUT2_ENA);
++ ucb1x00_reg_write(ucb, UCB_AC_A, reg);
++
++ ucb1x00_set_audio_divisor(ucb, div*32); /* set divisor in MCP */
++
++ reg = ucb1x00_reg_read(ucb, UCB_AC_A);
++ reg &= ~(0x1F);
++ reg |= div;
++ ucb1x00_reg_write(ucb, UCB_AC_A, reg); /* set divisor in UCB1x00 */
++
++ reg = ucb1x00_reg_read(ucb, UCB_AC_B);
++ reg |= UCB_AC_B_IN_ENA;
++ ucb1x00_reg_write(ucb, UCB_AC_B, reg);
++
++ reg = ucb1x00_reg_read(ucb, UCB_AC_A);
++ reg |= UCB_AC_A_OUT2_ENA;
++ ucb1x00_reg_write(ucb, UCB_AC_A, reg);
++
++ sa11xx_ucb1x00->samplerate = div_rate / div;
++
++// printk(KERN_INFO "sa11xx_ucb1x00_set_samplerate done\n");
++}
++
++/* HW init and shutdown */
++static void sa11xx_ucb1x00_audio_init(struct sa11xx_ucb1x00 *sa11xx_ucb1x00)
++{
++ //unsigned long flags;
++
++ /* Setup DMA stuff */
++ sa11xx_ucb1x00->s[SNDRV_PCM_STREAM_PLAYBACK].id = "UCB1x00 out";
++ sa11xx_ucb1x00->s[SNDRV_PCM_STREAM_PLAYBACK].stream_id = SNDRV_PCM_STREAM_PLAYBACK;
++ sa11xx_ucb1x00->s[SNDRV_PCM_STREAM_PLAYBACK].dma_dev = sa11xx_ucb1x00->ucb1x00->ucb->mcp->dma_audio_wr;
++
++ sa11xx_ucb1x00->s[SNDRV_PCM_STREAM_CAPTURE].id = "UCB1x00 in";
++ sa11xx_ucb1x00->s[SNDRV_PCM_STREAM_CAPTURE].stream_id = SNDRV_PCM_STREAM_CAPTURE;
++ sa11xx_ucb1x00->s[SNDRV_PCM_STREAM_CAPTURE].dma_dev = sa11xx_ucb1x00->ucb1x00->ucb->mcp->dma_audio_rd;
++}
++
++#if 0
++static void sa11xx_ucb1x00_audio_shutdown(struct sa11xx_ucb1x00 *sa11xx_ucb1x00)
++{
++ /* mute on */
++// set_sa11xx_uda1341_egpio(IPAQ_EGPIO_QMUTE);
++
++ /* disable the audio power and all signals leading to the audio chip */
++// l3_close(sa11xx_uda1341->uda1341);
++// Ser4SSCR0 = 0;
++// clr_sa11xx_uda1341_egpio(IPAQ_EGPIO_CODEC_NRESET);
++
++ /* power off and mute off */
++ /* FIXME - is muting off necesary??? */
++
++// clr_sa11xx_uda1341_egpio(IPAQ_EGPIO_AUDIO_ON);
++// clr_sa11xx_uda1341_egpio(IPAQ_EGPIO_QMUTE);
++}
++#endif
++
++/* DMA stuff */
++
++/*
++ * these are the address and sizes used to fill the xmit buffer
++ * so we can get a clock in record only mode
++ */
++//#define FORCE_CLOCK_ADDR (dma_addr_t)FLUSH_BASE_PHYS
++//#define FORCE_CLOCK_SIZE 4096 // was 2048
++
++// FIXME Why this value exactly - wrote comment
++#define DMA_BUF_SIZE 8176 /* <= MAX_DMA_SIZE from asm/arch-sa1100/dma.h */
++
++static int audio_dma_request(struct audio_stream *s, void (*callback)(void *))
++{
++ int ret;
++
++// printk(KERN_INFO "audio_dma_request stream=%08X\n", s);
++
++ ret = sa1100_request_dma(s->dma_dev, s->id, callback, s, &s->dma_regs);
++ if (ret < 0)
++ printk(KERN_ERR "unable to grab audio dma 0x%x\n", s->dma_dev);
++ return ret;
++}
++
++static void audio_dma_free(struct audio_stream *s)
++{
++// printk(KERN_INFO "audio_dma_free stream=%08X\n", s);
++ sa1100_free_dma(s->dma_regs);
++ s->dma_regs = 0;
++}
++
++static u_int audio_get_dma_pos(struct audio_stream *s)
++{
++ struct snd_pcm_substream *substream = s->stream;
++ struct snd_pcm_runtime *runtime = substream->runtime;
++ unsigned int offset;
++ unsigned long flags;
++ dma_addr_t addr;
++
++ // this must be called w/ interrupts locked out see dma-sa1100.c in the kernel
++ spin_lock_irqsave(&s->dma_lock, flags);
++ addr = sa1100_get_dma_pos((s)->dma_regs);
++ offset = addr - runtime->dma_addr;
++ spin_unlock_irqrestore(&s->dma_lock, flags);
++
++// printk(KERN_INFO "audio_get_dma_pos real_offset=%d\n", offset);
++
++ offset = bytes_to_frames(runtime,offset);
++ if (offset >= runtime->buffer_size)
++ offset = 0;
++
++// printk(KERN_INFO "audio_get_dma_pos stream=%08X pos=%d\n", s, offset);
++
++ return offset;
++}
++
++/*
++ * this stops the dma and clears the dma ptrs
++ */
++static void audio_stop_dma(struct audio_stream *s)
++{
++ unsigned long flags;
++
++ spin_lock_irqsave(&s->dma_lock, flags);
++ s->active = 0;
++ s->period = 0;
++ /* this stops the dma channel and clears the buffer ptrs */
++ sa1100_clear_dma(s->dma_regs);
++ spin_unlock_irqrestore(&s->dma_lock, flags);
++}
++
++static void audio_process_dma(struct audio_stream *s)
++{
++ struct snd_pcm_substream *substream = s->stream;
++ struct snd_pcm_runtime *runtime;
++ unsigned int dma_size;
++ unsigned int offset;
++ int ret;
++
++// printk(KERN_ERR "audio_process_dma called periods=%d period=%d\n", s->periods, s->period);
++
++ /* must be set here - only valid for running streams, not for forced_clock dma fills */
++ runtime = substream->runtime;
++ while (s->active && s->periods < runtime->periods) {
++ dma_size = frames_to_bytes(runtime, runtime->period_size);
++ if (s->old_offset) {
++ /* a little trick, we need resume from old position */
++ offset = frames_to_bytes(runtime, s->old_offset - 1);
++ s->old_offset = 0;
++ s->periods = 0;
++ s->period = offset / dma_size;
++ offset %= dma_size;
++ dma_size = dma_size - offset;
++ if (!dma_size)
++ continue; /* special case */
++ } else {
++ offset = dma_size * s->period;
++ snd_BUG_ON(dma_size > DMA_BUF_SIZE);
++ }
++// printk(KERN_INFO "start addr=%08X size=%d\n", runtime->dma_addr + offset, dma_size);
++ ret = sa1100_start_dma((s)->dma_regs, runtime->dma_addr + offset, dma_size);
++ if (ret) {
++// printk(KERN_ERR "audio_process_dma: cannot queue DMA buffer (%i)\n", ret);
++ return;
++ }
++
++ s->period++;
++ s->period %= runtime->periods;
++ s->periods++;
++ }
++}
++
++static void audio_dma_callback(void *data)
++{
++ struct audio_stream *s = data;
++
++// printk(KERN_INFO "audio_dma_callback called stream=%08X\n", s);
++
++ /*
++ * If we are getting a callback for an active stream then we inform
++ * the PCM middle layer we've finished a period
++ */
++ if (s->active) {
++// printk(KERN_INFO "audio_dma_callback period elapsed\n");
++ snd_pcm_period_elapsed(s->stream);
++ }
++
++ spin_lock(&s->dma_lock);
++ if (s->periods > 0) {
++ s->periods--;
++ }
++ audio_process_dma(s);
++ spin_unlock(&s->dma_lock);
++}
++
++static void sa11xx_ucb1x00_enable_audio(struct ucb1x00* ucb)
++{
++ uint32_t reg;
++ reg = ucb1x00_reg_read(ucb, UCB_AC_A);
++ reg |= UCB_AC_A_OUT2_ENA;
++ ucb1x00_reg_write(ucb, UCB_AC_A, reg);
++}
++
++static void sa11xx_ucb1x00_disable_audio(struct ucb1x00* ucb)
++{
++ uint32_t reg;
++ reg = ucb1x00_reg_read(ucb, UCB_AC_A);
++ reg &= ~(UCB_AC_A_OUT2_ENA);
++ ucb1x00_reg_write(ucb, UCB_AC_A, reg);
++}
++
++/* PCM setting */
++
++/* trigger & timer */
++static int snd_sa11xx_ucb1x00_trigger(struct snd_pcm_substream *substream, int cmd)
++{
++ struct sa11xx_ucb1x00 *chip = snd_pcm_substream_chip(substream);
++ int stream_id = substream->pstr->stream;
++ struct audio_stream *s = &chip->s[stream_id];
++ int err = 0;
++
++// printk(KERN_INFO "snd_sa11xx_ucb1x00_trigger called\n");
++
++ /* note local interrupts are already disabled in the midlevel code */
++ spin_lock(&s->dma_lock);
++ switch (cmd) {
++ case SNDRV_PCM_TRIGGER_START:
++ /* requested stream startup */
++ s->active = 1;
++ sa11xx_ucb1x00_enable_audio(chip->ucb1x00->ucb);
++ audio_process_dma(s);
++ break;
++ case SNDRV_PCM_TRIGGER_STOP:
++ /* requested stream shutdown */
++ sa11xx_ucb1x00_disable_audio(chip->ucb1x00->ucb);
++ audio_stop_dma(s);
++ break;
++ case SNDRV_PCM_TRIGGER_SUSPEND:
++ s->active = 0;
++ sa1100_stop_dma(s->dma_regs);
++ s->old_offset = audio_get_dma_pos(s) + 1;
++#ifdef HH_VERSION
++ sa1100_dma_flush_all(s->dma_regs);
++#else
++ //FIXME - DMA API
++#endif
++ s->periods = 0;
++ break;
++ case SNDRV_PCM_TRIGGER_RESUME:
++ s->active = 1;
++ audio_process_dma(s);
++ break;
++ case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
++ sa1100_stop_dma(s->dma_regs);
++ s->active = 0;
++ case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
++ s->active = 1;
++ if (s->old_offset) {
++ audio_process_dma(s);
++ break;
++ }
++ sa1100_resume_dma(s->dma_regs);
++ break;
++ default:
++ err = -EINVAL;
++ break;
++ }
++ spin_unlock(&s->dma_lock);
++ return err;
++}
++
++static int snd_sa11xx_ucb1x00_prepare(struct snd_pcm_substream *substream)
++{
++ struct sa11xx_ucb1x00 *chip = snd_pcm_substream_chip(substream);
++ struct snd_pcm_runtime *runtime = substream->runtime;
++ struct audio_stream *s = &chip->s[substream->pstr->stream];
++
++// printk(KERN_INFO "snd_sa11xx_ucb1x00_prepare called\n");
++
++ /* set requested samplerate */
++ sa11xx_ucb1x00_set_samplerate(chip, runtime->rate);
++
++ s->period = 0;
++ s->periods = 0;
++
++ return 0;
++}
++
++static snd_pcm_uframes_t snd_sa11xx_ucb1x00_pointer(struct snd_pcm_substream *substream)
++{
++ struct sa11xx_ucb1x00 *chip = snd_pcm_substream_chip(substream);
++// printk(KERN_INFO "snd_sa11xx_ucb1x00_pointer called\n");
++ return audio_get_dma_pos(&chip->s[substream->pstr->stream]);
++}
++
++static struct snd_pcm_hardware snd_sa11xx_ucb1x00_hw =
++{
++ .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,
++/* .rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
++ SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 |\
++ SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |\
++ SNDRV_PCM_RATE_KNOT),*/
++ .rate_min = 5000,
++ .rate_max = 48000,
++ .channels_min = 1,
++ .channels_max = 1,
++ .buffer_bytes_max = 64*1024,
++ .period_bytes_min = 4096,
++ .period_bytes_max = DMA_BUF_SIZE,
++ .periods_min = 2,
++ .periods_max = 255,
++ .fifo_size = 0,
++};
++
++#if 0
++static struct snd_pcm_hardware snd_sa11xx_ucb1x00_playback =
++{
++ .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,
++ .rates = (SNDRV_PCM_RATE_8000 | SNDRV_PCM_RATE_16000 |\
++ SNDRV_PCM_RATE_22050 | SNDRV_PCM_RATE_32000 |\
++ SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000 |\
++ SNDRV_PCM_RATE_KNOT),
++ .rate_min = 8000,
++ .rate_max = 48000,
++ .channels_min = 2,
++ .channels_max = 2,
++ .buffer_bytes_max = 64*1024,
++ .period_bytes_min = 128,
++ .period_bytes_max = DMA_BUF_SIZE,
++ .periods_min = 2,
++ .periods_max = 8,
++ .fifo_size = 0,
++};
++#endif
++
++static int snd_card_sa11xx_ucb1x00_open(struct snd_pcm_substream *substream)
++{
++ struct sa11xx_ucb1x00 *chip = snd_pcm_substream_chip(substream);
++ struct snd_pcm_runtime *runtime = substream->runtime;
++ int stream_id = substream->pstr->stream;
++ //int err;
++
++ chip->s[stream_id].stream = substream;
++
++// printk(KERN_INFO "snd_card_sa11xx_ucb1x00_open called substream=%08X\n", substream);
++
++ runtime->hw = snd_sa11xx_ucb1x00_hw;
++ if (stream_id == SNDRV_PCM_STREAM_PLAYBACK) {
++ }
++ else {
++ }
++/*
++ if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) {
++ return err;
++ }
++*/
++/* if ((err = snd_pcm_hw_constraint_list(runtime, 0, SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates)) < 0) {
++ return err;
++ }
++*/
++ return 0;
++}
++
++static int snd_card_sa11xx_ucb1x00_close(struct snd_pcm_substream *substream)
++{
++ struct sa11xx_ucb1x00 *chip = snd_pcm_substream_chip(substream);
++
++ chip->s[substream->pstr->stream].stream = NULL;
++// printk(KERN_INFO "snd_card_sa11xx_ucb1x00_close called substream=%08X\n", substream);
++ return 0;
++}
++
++/* HW params & free */
++
++static int snd_sa11xx_ucb1x00_hw_params(struct snd_pcm_substream *substream,
++ struct snd_pcm_hw_params *hw_params)
++{
++// struct sa11xx_ucb1x00 *chip = snd_pcm_substream_chip(substream);
++// struct ucb1x00* ucb = chip->ucb1x00->ucb;
++// printk(KERN_INFO "snd_sa11xx_ucb1x00_hw_params called substream=%08X\n", substream);
++
++
++ return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
++}
++
++static int snd_sa11xx_ucb1x00_hw_free(struct snd_pcm_substream *substream)
++{
++// struct sa11xx_ucb1x00 *chip = snd_pcm_substream_chip(substream);
++// struct ucb1x00* ucb = chip->ucb1x00->ucb;
++// printk(KERN_INFO "snd_sa11xx_ucb1x00_hw_free called substream=%08X\n", substream);
++
++ return snd_pcm_lib_free_pages(substream);
++}
++
++static struct snd_pcm_ops snd_card_sa11xx_ucb1x00_playback_ops = {
++ .open = snd_card_sa11xx_ucb1x00_open,
++ .close = snd_card_sa11xx_ucb1x00_close,
++ .ioctl = snd_pcm_lib_ioctl,
++ .hw_params = snd_sa11xx_ucb1x00_hw_params,
++ .hw_free = snd_sa11xx_ucb1x00_hw_free,
++ .prepare = snd_sa11xx_ucb1x00_prepare,
++ .trigger = snd_sa11xx_ucb1x00_trigger,
++ .pointer = snd_sa11xx_ucb1x00_pointer,
++};
++
++static struct snd_pcm_ops snd_card_sa11xx_ucb1x00_capture_ops = {
++ .open = snd_card_sa11xx_ucb1x00_open,
++ .close = snd_card_sa11xx_ucb1x00_close,
++ .ioctl = snd_pcm_lib_ioctl,
++ .hw_params = snd_sa11xx_ucb1x00_hw_params,
++ .hw_free = snd_sa11xx_ucb1x00_hw_free,
++ .prepare = snd_sa11xx_ucb1x00_prepare,
++ .trigger = snd_sa11xx_ucb1x00_trigger,
++ .pointer = snd_sa11xx_ucb1x00_pointer,
++};
++
++static int __init snd_card_sa11xx_ucb1x00_pcm(struct sa11xx_ucb1x00 *sa11xx_ucb1x00, int device)
++{
++ struct snd_pcm *pcm;
++ int err;
++
++ if ((err = snd_pcm_new(sa11xx_ucb1x00->card, "UCB1x00 PCM", device, 1, 1, &pcm)) < 0) {
++ return err;
++ }
++
++ sa11xx_ucb1x00_audio_init(sa11xx_ucb1x00);
++
++
++ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_card_sa11xx_ucb1x00_playback_ops);
++ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_card_sa11xx_ucb1x00_capture_ops);
++ pcm->private_data = sa11xx_ucb1x00;
++ pcm->info_flags = 0;
++ strcpy(pcm->name, "UCB1x00 PCM");
++
++ err = snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
++ NULL, 64*1024, 64*1024);
++// printk(KERN_INFO "snd_pcm_lib_preallocate_pages_for_all returns %d\n", err);
++
++
++ /* setup DMA controller */
++ audio_dma_request(&sa11xx_ucb1x00->s[SNDRV_PCM_STREAM_PLAYBACK], audio_dma_callback);
++ audio_dma_request(&sa11xx_ucb1x00->s[SNDRV_PCM_STREAM_CAPTURE], audio_dma_callback);
++
++ sa11xx_ucb1x00->pcm = pcm;
++
++ return 0;
++}
++
++#if 0
++#ifdef CONFIG_PM
++
++static int snd_sa11xx_ucb1x00_suspend(struct platform_device *devptr,
++ pm_message_t state)
++{
++ struct snd_card *card = platform_get_drvdata(devptr);
++ struct sa11xx_ucb1x00 *chip = card->private_data;
++
++ snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
++ snd_pcm_suspend_all(chip->pcm);
++#ifdef HH_VERSION
++ sa1100_dma_sleep(chip->s[SNDRV_PCM_STREAM_PLAYBACK].dmach);
++ sa1100_dma_sleep(chip->s[SNDRV_PCM_STREAM_CAPTURE].dmach);
++#else
++ //FIXME
++#endif
++ l3_command(chip->ucb1x00, CMD_SUSPEND, NULL);
++ sa11xx_uda1341_audio_shutdown(chip);
++
++ return 0;
++}
++
++static int snd_sa11xx_ucb1x00_resume(struct platform_device *devptr)
++{
++ struct snd_card *card = platform_get_drvdata(devptr);
++ struct sa11xx_ucb1x00 *chip = card->private_data;
++
++ sa11xx_ucb1x00_audio_init(chip);
++ l3_command(chip->ucb1x00, CMD_RESUME, NULL);
++#ifdef HH_VERSION
++ sa1100_dma_wakeup(chip->s[SNDRV_PCM_STREAM_PLAYBACK].dmach);
++ sa1100_dma_wakeup(chip->s[SNDRV_PCM_STREAM_CAPTURE].dmach);
++#else
++ //FIXME
++#endif
++ snd_power_change_state(card, SNDRV_CTL_POWER_D0);
++ return 0;
++}
++#endif /* COMFIG_PM */
++#endif
++
++void snd_sa11xx_ucb1x00_free(struct snd_card *card)
++{
++ struct sa11xx_ucb1x00 *chip = card->private_data;
++
++// printk(KERN_INFO "snd_sa11xx_ucb1x00_free called\n");
++
++ if (&chip->s[SNDRV_PCM_STREAM_PLAYBACK]) {
++ audio_dma_free(&chip->s[SNDRV_PCM_STREAM_PLAYBACK]);
++ }
++ if (&chip->s[SNDRV_PCM_STREAM_CAPTURE]) {
++ audio_dma_free(&chip->s[SNDRV_PCM_STREAM_CAPTURE]);
++ }
++}
++
++static int ucb1x00_dev_free(struct snd_device *device)
++{
++ return 0;
++}
++
++static int snd_chip_ucb1x00_mixer_new(struct snd_card *card)
++{
++ static struct snd_device_ops ops = {
++ .dev_free = ucb1x00_dev_free,
++ };
++
++ struct sa11xx_ucb1x00 *chip = card->private_data;
++ int idx;
++ int err;
++
++ snd_BUG_ON(card == NULL);
++
++ for (idx = 0; idx < ARRAY_SIZE(snd_ucb1x00_controls); idx++) {
++ if ((err = snd_ctl_add(card, snd_ctl_new1(&snd_ucb1x00_controls[idx], chip))) < 0) {
++ return err;
++ }
++ }
++
++ if ((err = snd_device_new(card, SNDRV_DEV_CODEC, chip, &ops)) < 0) {
++ return err;
++ }
++
++ strcpy(card->mixername, "UCB1x00 Mixer");
++ // ((struct ucb1x00_dev *)clnt->driver_data)->card = card;
++
++ return 0;
++}
++
++static int __init sa11xx_ucb1x00_audio_add(struct ucb1x00_dev* dev)
++{
++ int err;
++ struct snd_card *card;
++ struct sa11xx_ucb1x00 *chip;
++
++ /* register the soundcard */
++ err = snd_card_create(-1, id, THIS_MODULE, sizeof(struct sa11xx_ucb1x00), &card);
++ if (err < 0)
++ return -err;
++
++
++ ucb1x00_enable(dev->ucb);
++
++ chip = card->private_data;
++ spin_lock_init(&chip->s[0].dma_lock);
++ spin_lock_init(&chip->s[1].dma_lock);
++
++ card->private_free = snd_sa11xx_ucb1x00_free;
++ chip->card = card;
++ chip->samplerate = AUDIO_RATE_DEFAULT;
++ chip->ucb1x00 = dev;
++ chip->pdev = &dev->ucb->mcp->attached_device;
++ dev->priv = chip;
++
++ // mixer
++ if ((err = snd_chip_ucb1x00_mixer_new(card)))
++ goto nodev;
++
++ // PCM
++ if ((err = snd_card_sa11xx_ucb1x00_pcm(chip, 0)) < 0)
++ goto nodev;
++
++ strcpy(card->driver, "UCB1x00");
++ strcpy(card->shortname, "Simpad UCB1x00");
++ sprintf(card->longname, "Siemens Simpad with Philips UCB1x00");
++
++ snd_card_set_dev(card, chip->pdev);
++
++ if ((err = snd_card_register(card)) == 0) {
++ printk( KERN_INFO "Simpad audio support initialized 2\n" );
++ return 0;
++ }
++
++ nodev:
++ snd_card_free(card);
++ return err;
++}
++
++static void sa11xx_ucb1x00_audio_remove(struct ucb1x00_dev* dev)
++{
++ struct sa11xx_ucb1x00* chip = dev->priv;
++ printk(KERN_INFO "sa11xx_ucb1x00_audio_remove called\n");
++ ucb1x00_disable(dev->ucb);
++ snd_card_free(chip->card);
++}
++
++static int sa11xx_ucb1x00_audio_resume(struct ucb1x00_dev* dev)
++{
++ printk(KERN_INFO "sa11xx_ucb1x00_audio_resume called\n");
++ return 0;
++}
++
++/* ---- GOOD ----------------------------------------------------- */
++
++static struct ucb1x00_driver sa11xx_ucb1x00_audio_driver = {
++ .add = sa11xx_ucb1x00_audio_add,
++ .remove = sa11xx_ucb1x00_audio_remove,
++ .resume = sa11xx_ucb1x00_audio_resume,
++};
++
++static int __init sa11xx_ucb1x00_init(void)
++{
++ return ucb1x00_register_driver(&sa11xx_ucb1x00_audio_driver);
++}
++
++static void __exit sa11xx_ucb1x00_exit(void)
++{
++ ucb1x00_unregister_driver(&sa11xx_ucb1x00_audio_driver);
++}
++
++module_init(sa11xx_ucb1x00_init);
++module_exit(sa11xx_ucb1x00_exit);
++
+--
+1.6.0.4
+
diff --git a/recipes/linux/linux-2.6.31/collie/defconfig b/recipes/linux/linux-2.6.31/collie/defconfig
new file mode 100644
index 0000000000..e815c97e42
--- /dev/null
+++ b/recipes/linux/linux-2.6.31/collie/defconfig
@@ -0,0 +1,1677 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.28
+# Fri Feb 13 10:42:04 2009
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+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_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=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"
+
+#
+# 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 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=y
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+# CONFIG_IKCONFIG is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_CGROUPS is not set
+# CONFIG_GROUP_SCHED is not set
+# CONFIG_USER_SCHED is not set
+# CONFIG_CGROUP_SCHED 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_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_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_AIO=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=m
+CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
+CONFIG_HAVE_KPROBES=y
+CONFIG_HAVE_KRETPROBES=y
+CONFIG_HAVE_CLK=y
+CONFIG_HAVE_GENERIC_DMA_COHERENT=y
+CONFIG_SLABINFO=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+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_KMOD=y
+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_INTEGRITY is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=m
+CONFIG_IOSCHED_CFQ=m
+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
+CONFIG_FREEZER=y
+
+#
+# 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_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+# CONFIG_ARCH_IMX 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_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_LOKI is not set
+# CONFIG_ARCH_MV78XX0 is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_ORION5X is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+CONFIG_ARCH_SA1100=y
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_MSM is not set
+
+#
+# SA11x0 Implementations
+#
+# CONFIG_SA1100_ASSABET is not set
+# CONFIG_SA1100_CERF is not set
+CONFIG_SA1100_COLLIE=y
+# CONFIG_SA1100_H3100 is not set
+# CONFIG_SA1100_H3600 is not set
+# CONFIG_SA1100_H3800 is not set
+# CONFIG_SA1100_BADGE4 is not set
+# CONFIG_SA1100_JORNADA720 is not set
+# CONFIG_SA1100_HACKKIT is not set
+# CONFIG_SA1100_LART is not set
+# CONFIG_SA1100_PLEB is not set
+# CONFIG_SA1100_SHANNON is not set
+# CONFIG_SA1100_SIMPAD is not set
+# CONFIG_SA1100_SSP is not set
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_SA1100=y
+CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_PABRT_NOIFAR=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WB=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_SHARP_LOCOMO=y
+CONFIG_SHARP_PARAM=y
+CONFIG_SHARP_SCOOP=y
+
+#
+# Bus support
+#
+CONFIG_ISA=y
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+CONFIG_PCCARD=y
+# CONFIG_PCMCIA_DEBUG is not set
+CONFIG_PCMCIA=y
+CONFIG_PCMCIA_LOAD_CIS=y
+CONFIG_PCMCIA_IOCTL=y
+
+#
+# PC-card bridges
+#
+# CONFIG_I82365 is not set
+# CONFIG_TCIC is not set
+CONFIG_PCMCIA_SA1100=y
+
+#
+# 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 is not set
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+# CONFIG_FLATMEM_MANUAL is not set
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+CONFIG_SPARSEMEM_MANUAL=y
+CONFIG_SPARSEMEM=y
+CONFIG_HAVE_MEMORY_PRESENT=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_PAGEFLAGS_EXTENDED=y
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+# CONFIG_PHYS_ADDR_T_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=0
+CONFIG_VIRT_TO_BUS=y
+CONFIG_UNEVICTABLE_LRU=y
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE="console=ttySA0,115200n8 console=tty1 root=/dev/mmcblk0p1 rootfstype=ext2 rootdelay=3 mem=64M fbcon=rotate:1 debug"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+CONFIG_ATAGS_PROC=y
+
+#
+# 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
+
+#
+# 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=m
+# CONFIG_ARTHUR is not set
+
+#
+# Power management options
+#
+CONFIG_PM=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_APM_EMULATION=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+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_XFRM_STATISTICS is not set
+CONFIG_XFRM_IPCOMP=m
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+# CONFIG_ASK_IP_FIB_HASH is not set
+# CONFIG_IP_FIB_TRIE 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_BIC is not set
+# CONFIG_DEFAULT_CUBIC is not set
+# CONFIG_DEFAULT_HTCP is not set
+# CONFIG_DEFAULT_VEGAS 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 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_NDISC_NODETYPE=y
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_NETFILTER_ADVANCED=y
+
+#
+# Core Netfilter Configuration
+#
+# CONFIG_NETFILTER_NETLINK_QUEUE is not set
+# CONFIG_NETFILTER_NETLINK_LOG 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_NFLOG is not set
+# CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
+# CONFIG_NETFILTER_XT_TARGET_RATEEST is not set
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
+# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP 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_HASHLIMIT is not set
+# CONFIG_NETFILTER_XT_MATCH_IPRANGE 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_MULTIPORT is not set
+# CONFIG_NETFILTER_XT_MATCH_OWNER is not set
+# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
+# CONFIG_NETFILTER_XT_MATCH_PKTTYPE is not set
+# CONFIG_NETFILTER_XT_MATCH_QUOTA is not set
+# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set
+# CONFIG_NETFILTER_XT_MATCH_REALM is not set
+# CONFIG_NETFILTER_XT_MATCH_RECENT 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_IP_VS is not set
+
+#
+# IP: Netfilter Configuration
+#
+# CONFIG_NF_DEFRAG_IPV4 is not set
+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_IP_NF_MANGLE=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_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_SCTP_HMAC_NONE is not set
+# CONFIG_SCTP_HMAC_SHA1 is not set
+# CONFIG_SCTP_HMAC_MD5 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_NET_SCHED is not set
+
+#
+# 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=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
+#
+
+#
+# FIR device drivers
+#
+# CONFIG_SA1100_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_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_HCIDTL1 is not set
+# CONFIG_BT_HCIBT3C is not set
+# CONFIG_BT_HCIBLUECARD is not set
+# CONFIG_BT_HCIBTUART is not set
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+# CONFIG_PHONET is not set
+CONFIG_WIRELESS=y
+CONFIG_CFG80211=y
+CONFIG_NL80211=y
+CONFIG_WIRELESS_OLD_REGULATORY=y
+CONFIG_WIRELESS_EXT=y
+CONFIG_WIRELESS_EXT_SYSFS=y
+CONFIG_MAC80211=y
+
+#
+# Rate control algorithm selection
+#
+# CONFIG_MAC80211_RC_PID is not set
+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 is not set
+# CONFIG_MAC80211_LEDS is not set
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG_MENU is not set
+CONFIG_IEEE80211=y
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=y
+CONFIG_IEEE80211_CRYPT_CCMP=y
+CONFIG_IEEE80211_CRYPT_TKIP=y
+# 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=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=y
+CONFIG_MTD_DEBUG_VERBOSE=0
+# 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_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 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
+CONFIG_MTD_SHARP=y
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+CONFIG_MTD_SA1100=y
+# 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_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 is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+CONFIG_MTD_UBI=m
+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_PNP 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
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_RAM=m
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+# 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=m
+# CONFIG_MISC_DEVICES is not set
+CONFIG_HAVE_IDE=y
+CONFIG_IDE=y
+
+#
+# Please see Documentation/ide/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_IDE_SATA is not set
+CONFIG_IDE_GD=y
+CONFIG_IDE_GD_ATA=y
+# CONFIG_IDE_GD_ATAPI is not set
+CONFIG_BLK_DEV_IDECS=y
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE 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_BLK_DEV_PLATFORM is not set
+# CONFIG_BLK_DEV_IDEDMA 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_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_AHA152X is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
+# CONFIG_SCSI_DH 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_DELAY is not set
+# CONFIG_DM_UEVENT 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=m
+# CONFIG_VETH is not set
+# CONFIG_ARCNET is not set
+# CONFIG_NET_ETHERNET is not set
+CONFIG_MII=m
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+# CONFIG_TR is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+CONFIG_PCMCIA_RAYCS=m
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_CS=m
+CONFIG_LIBERTAS_SDIO=m
+# CONFIG_LIBERTAS_DEBUG is not set
+CONFIG_LIBERTAS_THINFIRM=m
+CONFIG_HERMES=m
+CONFIG_PCMCIA_HERMES=m
+CONFIG_PCMCIA_SPECTRUM=m
+CONFIG_ATMEL=m
+CONFIG_PCMCIA_ATMEL=m
+CONFIG_AIRO_CS=m
+CONFIG_PCMCIA_WL3501=m
+CONFIG_MAC80211_HWSIM=m
+CONFIG_P54_COMMON=m
+# CONFIG_IWLWIFI_LEDS is not set
+CONFIG_HOSTAP=m
+CONFIG_HOSTAP_FIRMWARE=y
+# CONFIG_HOSTAP_FIRMWARE_NVRAM is not set
+CONFIG_HOSTAP_CS=m
+CONFIG_B43=m
+# CONFIG_B43_PCMCIA is not set
+# CONFIG_B43_DEBUG is not set
+CONFIG_B43LEGACY=m
+# CONFIG_B43LEGACY_DEBUG is not set
+CONFIG_B43LEGACY_DMA=y
+CONFIG_B43LEGACY_PIO=y
+CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
+# CONFIG_B43LEGACY_DMA_MODE is not set
+# CONFIG_B43LEGACY_PIO_MODE is not set
+CONFIG_RT2X00=m
+CONFIG_NET_PCMCIA=y
+CONFIG_PCMCIA_3C589=m
+CONFIG_PCMCIA_3C574=m
+CONFIG_PCMCIA_FMVJ18X=m
+CONFIG_PCMCIA_PCNET=m
+CONFIG_PCMCIA_NMCLAN=m
+CONFIG_PCMCIA_SMC91C92=m
+CONFIG_PCMCIA_XIRC2PS=m
+CONFIG_PCMCIA_AXNET=m
+# 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_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=m
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=640
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=480
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+CONFIG_INPUT_APMPOWER=y
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+CONFIG_KEYBOARD_LOCOMO=y
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE 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_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_INEXIO is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_HTCPEN is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1200_TS is not set
+CONFIG_TOUCHSCREEN_COLLIE_TS=y
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
+CONFIG_INPUT_MISC=y
+# 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=m
+
+#
+# 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 is not set
+CONFIG_DEVKMEM=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=m
+# 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
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_SA1100=y
+CONFIG_SERIAL_SA1100_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+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_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# PCMCIA character devices
+#
+# CONFIG_SYNCLINK_CS is not set
+# CONFIG_CARDMAN_4000 is not set
+# CONFIG_CARDMAN_4040 is not set
+# CONFIG_IPWIRELESS is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+# CONFIG_I2C 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_LOCOMO=y
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# 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 is not set
+
+#
+# Memory mapped GPIO expanders:
+#
+
+#
+# I2C GPIO expanders:
+#
+
+#
+# PCI GPIO expanders:
+#
+
+#
+# SPI GPIO expanders:
+#
+# CONFIG_GPIO_MAX7301 is not set
+# CONFIG_GPIO_MCP23S08 is not set
+# CONFIG_W1 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+CONFIG_PDA_POWER=y
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+CONFIG_BATTERY_COLLIE=y
+# CONFIG_HWMON is not set
+# CONFIG_THERMAL is not set
+# CONFIG_THERMAL_HWMON is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_SA1100_WATCHDOG=m
+
+#
+# ISA-based Watchdog Cards
+#
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_MIXCOMWD is not set
+# CONFIG_WDT is not set
+CONFIG_SSB_POSSIBLE=y
+
+#
+# Sonics Silicon Backplane
+#
+CONFIG_SSB=m
+CONFIG_SSB_PCMCIAHOST_POSSIBLE=y
+# CONFIG_SSB_PCMCIAHOST is not set
+# CONFIG_SSB_SILENT is not set
+# CONFIG_SSB_DEBUG is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_CORE 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_MFD_TMIO is not set
+# CONFIG_MFD_T7L66XB is not set
+# CONFIG_MFD_TC6387XB is not set
+# CONFIG_MFD_TC6393XB is not set
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_MCP=y
+CONFIG_MCP_SA11X0=y
+CONFIG_MCP_UCB1200=y
+
+#
+# Multimedia devices
+#
+
+#
+# Multimedia core support
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE 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 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_SA1100=y
+# 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_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_CORGI is not set
+CONFIG_BACKLIGHT_LOCOMO=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_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 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 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=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_SOUND is not set
+# CONFIG_HID_SUPPORT is not set
+CONFIG_HID=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 is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
+# CONFIG_USB_MUSB_HDRC is not set
+# CONFIG_USB_GADGET_MUSB_HDRC is not set
+
+#
+# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may also be needed;
+#
+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=500
+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_PXA27X 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_NET2280 is not set
+# CONFIG_USB_GADGET_GOKU is not set
+CONFIG_USB_GADGET_SA1100=y
+CONFIG_USB_SA1100=y
+# 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 is not set
+CONFIG_USB_GADGETFS=m
+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=m
+CONFIG_USB_CDC_COMPOSITE=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 is not set
+CONFIG_SDIO_UART=m
+CONFIG_MMC_TEST=m
+
+#
+# MMC/SD/SDIO Host Controller Drivers
+#
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SPI=y
+# CONFIG_MEMSTICK is not set
+# CONFIG_ACCESSIBILITY is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_LOCOMO=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_IDE_DISK=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+CONFIG_LEDS_TRIGGER_BACKLIGHT=m
+CONFIG_LEDS_TRIGGER_DEFAULT_ON=m
+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
+
+#
+# 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_RTC_DRV_SA1100 is not set
+# CONFIG_DMADEVICES is not set
+# CONFIG_REGULATOR is not set
+CONFIG_UIO=m
+CONFIG_UIO_PDRV=m
+CONFIG_UIO_PDRV_GENIRQ=m
+CONFIG_UIO_SMX=m
+CONFIG_UIO_SERCOS3=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_FS_XATTR is not set
+CONFIG_EXT4_FS=m
+# CONFIG_EXT4DEV_COMPAT is not set
+CONFIG_EXT4_FS_XATTR=y
+# CONFIG_EXT4_FS_POSIX_ACL is not set
+# CONFIG_EXT4_FS_SECURITY is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_JBD2=m
+# CONFIG_JBD2_DEBUG is not set
+CONFIG_FS_MBCACHE=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+# CONFIG_REISERFS_FS_XATTR 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_FILE_LOCKING=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_OCFS2_FS=m
+CONFIG_OCFS2_FS_O2CB=m
+CONFIG_OCFS2_FS_STATS=y
+CONFIG_OCFS2_DEBUG_MASKLOG=y
+# CONFIG_OCFS2_DEBUG_FS is not set
+# CONFIG_OCFS2_COMPAT_JBD is not set
+CONFIG_DNOTIFY=y
+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=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+# CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=m
+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 is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# 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=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=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_JFFS2_CMODE_FAVOURLZO is not set
+# CONFIG_UBIFS_FS is not set
+CONFIG_CRAMFS=m
+# 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_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+# CONFIG_SUNRPC_REGISTER_V4 is not set
+CONFIG_RPCSEC_GSS_KRB5=y
+# 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
+#
+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="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_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 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=y
+# 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_SCHED_DEBUG is not set
+# CONFIG_SCHEDSTATS is not set
+CONFIG_TIMER_STATS=y
+# CONFIG_DEBUG_OBJECTS is not set
+# 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_WRITECOUNT is not set
+# CONFIG_DEBUG_MEMORY_INIT is not set
+# CONFIG_DEBUG_LIST is not set
+# CONFIG_DEBUG_SG 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_FAULT_INJECTION is not set
+# CONFIG_LATENCYTOP is not set
+CONFIG_SYSCTL_SYSCALL_CHECK=y
+CONFIG_HAVE_FUNCTION_TRACER=y
+
+#
+# Tracers
+#
+# 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_CONTEXT_SWITCH_TRACER is not set
+# CONFIG_BOOT_TRACER is not set
+# CONFIG_STACK_TRACER is not set
+# CONFIG_DYNAMIC_PRINTK_DEBUG is not set
+# CONFIG_SAMPLES is not set
+CONFIG_HAVE_ARCH_KGDB=y
+# CONFIG_KGDB is not set
+# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_ERRORS=y
+# 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_AEAD=m
+CONFIG_CRYPTO_AEAD2=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_BLKCIPHER2=y
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_HASH2=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_MANAGER2=y
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_NULL=m
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_AUTHENC=m
+CONFIG_CRYPTO_TEST=m
+
+#
+# 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=y
+# 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
+
+#
+# Digest
+#
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_MICHAEL_MIC=y
+# 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=m
+CONFIG_CRYPTO_SHA512=m
+# CONFIG_CRYPTO_TGR192 is not set
+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 is not set
+CONFIG_CRYPTO_KHAZAD=m
+# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+
+#
+# Compression
+#
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_LZO=m
+
+#
+# Random Number Generation
+#
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRC16=m
+# CONFIG_CRC_T10DIF is not set
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC32=y
+CONFIG_CRC7=y
+CONFIG_LIBCRC32C=m
+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-omap-psp-2.6.29/omap3517-evm/defconfig b/recipes/linux/linux-omap-psp-2.6.29/am3517-evm/defconfig
index 4fa37bd8ef..4fa37bd8ef 100644
--- a/recipes/linux/linux-omap-psp-2.6.29/omap3517-evm/defconfig
+++ b/recipes/linux/linux-omap-psp-2.6.29/am3517-evm/defconfig
diff --git a/recipes/linux/linux-omap-psp/omap3517-evm/defconfig b/recipes/linux/linux-omap-psp/am3517-evm/defconfig
index 9b22a1787f..9b22a1787f 100644
--- a/recipes/linux/linux-omap-psp/omap3517-evm/defconfig
+++ b/recipes/linux/linux-omap-psp/am3517-evm/defconfig
diff --git a/recipes/linux/linux-omap-psp_2.6.29.bb b/recipes/linux/linux-omap-psp_2.6.29.bb
index 4c213b1dd1..2a2754eb13 100644
--- a/recipes/linux/linux-omap-psp_2.6.29.bb
+++ b/recipes/linux/linux-omap-psp_2.6.29.bb
@@ -3,7 +3,7 @@ require linux.inc
DESCRIPTION = "Linux kernel for OMAP processors"
KERNEL_IMAGETYPE = "uImage"
-COMPATIBLE_MACHINE = "omap3evm|omap3517-evm"
+COMPATIBLE_MACHINE = "omap3evm|am3517-evm"
SRCREV = "9abb6eb717acbca192ab251a056e3a66b2b47884"
@@ -16,7 +16,7 @@ SRC_URI = "git://arago-project.org/git/people/sriram/ti-psp-omap.git;protocol=gi
S = "${WORKDIR}/git"
-SRC_URI_append_omap3517-evm = " \
+SRC_URI_append_am3517-evm = " \
file://shiva-bits.diff;patch=1 \
file://shiva-ehci.diff;patch=1 \
"
diff --git a/recipes/linux/linux-omap-psp_2.6.31.bb b/recipes/linux/linux-omap-psp_2.6.31.bb
index 6828d52146..1e931e19e5 100644
--- a/recipes/linux/linux-omap-psp_2.6.31.bb
+++ b/recipes/linux/linux-omap-psp_2.6.31.bb
@@ -3,7 +3,7 @@ require linux.inc
DESCRIPTION = "Linux kernel for OMAP processors"
KERNEL_IMAGETYPE = "uImage"
-COMPATIBLE_MACHINE = "omap3evm|omap3517-evm"
+COMPATIBLE_MACHINE = "omap3evm|am3517-evm"
SRCREV = "9cf7a18fe227717dcc08163100dacd579de48e0c"
diff --git a/recipes/linux/linux_2.6.31.bb b/recipes/linux/linux_2.6.31.bb
index 1c45a58526..0956afdf75 100644
--- a/recipes/linux/linux_2.6.31.bb
+++ b/recipes/linux/linux_2.6.31.bb
@@ -1,22 +1,27 @@
require linux.inc
-PR = "r2"
+PR = "r3"
S = "${WORKDIR}/linux-${PV}"
# Mark archs/machines that this kernel supports
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_boc01 = "1"
+DEFAULT_PREFERENCE_collie = "1"
DEFAULT_PREFERENCE_db1200 = "1"
DEFAULT_PREFERENCE_qemumips = "1"
DEFAULT_PREFERENCE_qemux86 = "1"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.3.bz2;patch=1 \
- http://maxim.org.za/AT91RM9200/2.6/2.6.31-at91.patch.gz;patch=1 \
file://defconfig"
+SRC_URI_append_db1200 ="\
+ http://maxim.org.za/AT91RM9200/2.6/2.6.31-at91.patch.gz;patch=1 \
+ "
+
SRC_URI_append_boc01 = "\
+ http://maxim.org.za/AT91RM9200/2.6/2.6.31-at91.patch.gz;patch=1 \
file://boc01.dts \
file://boc01.dts.v1 \
file://004-081205-usb.patch;patch=1 \
@@ -27,6 +32,25 @@ SRC_URI_append_boc01 = "\
file://013-091015-lcd.patch;patch=1 \
"
+SRC_URI_append_collie = "\
+ file://0001-add-locomo_spi-driver.patch;patch=1 \
+ file://0002-collie-fix-scoop-convesion-to-new-api.patch;patch=1 \
+ file://0003-collie-prepare-for-gpiolib-use.patch;patch=1 \
+ file://0004-move-drivers-mfd-.h-to-include-linux-mfd.patch;patch=1 \
+ file://0005-collie-locomo-led-change-default-trigger.patch;patch=1 \
+ file://0006-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch;patch=1 \
+ file://0007-add-gpiolib-support-to-ucb1x00.patch;patch=1 \
+ file://0008-collie-convert-to-gpiolib-for-ucb1x00.patch;patch=1 \
+ file://0009-collie-add-battery-driver.patch;patch=1 \
+ file://0010-collie-support-pda_power-driver.patch;patch=1 \
+ file://0011-fix-collie-keyboard-bug.patch;patch=1 \
+ file://0012-add-collie-touchscreen-driver.patch;patch=1 \
+ file://0013-add-sa1100-udc-hack-extra-hacked-for-collie.patch;patch=1 \
+ file://0014-gadget-add-file.patch;patch=1 \
+ file://0004-fix-dma-for-SA1100.patch;patch=1 \
+ "
+
+
SRC_URI_append_ep93xx = " \
file://edb9301-fix-machine-id.patch;patch=1 \
"
diff --git a/recipes/lzma/files/lzma-406-zlib-stream.patch b/recipes/lzma/files/lzma-406-zlib-stream.patch
deleted file mode 100644
index 5af976372c..0000000000
--- a/recipes/lzma/files/lzma-406-zlib-stream.patch
+++ /dev/null
@@ -1,405 +0,0 @@
-diff -BurN lzma406/SRC/7zip/Compress/LZMA/LZMADecoder.cpp lzma/SRC/7zip/Compress/LZMA/LZMADecoder.cpp
---- lzma406/SRC/7zip/Compress/LZMA/LZMADecoder.cpp 2004-08-25 01:40:48.000000000 +0400
-+++ lzma/SRC/7zip/Compress/LZMA/LZMADecoder.cpp 2005-01-20 14:47:45.789801629 +0300
-@@ -288,12 +288,17 @@
- Byte remainder = (Byte)(properties[0] / 9);
- int lp = remainder % 5;
- int pb = remainder / 5;
-- if (pb > NLength::kNumPosStatesBitsMax)
-- return E_INVALIDARG;
-- _posStateMask = (1 << pb) - 1;
- UInt32 dictionarySize = 0;
- for (int i = 0; i < 4; i++)
- dictionarySize += ((UInt32)(properties[1 + i])) << (i * 8);
-+ return SetDecoderPropertiesRaw(lc, lp, pb, dictionarySize);
-+}
-+
-+STDMETHODIMP CDecoder::SetDecoderPropertiesRaw(int lc, int lp, int pb, UInt32 dictionarySize)
-+{
-+ if (pb > NLength::kNumPosStatesBitsMax)
-+ return E_INVALIDARG;
-+ _posStateMask = (1 << pb) - 1;
- _dictionarySizeCheck = MyMax(dictionarySize, UInt32(1));
- UInt32 blockSize = MyMax(_dictionarySizeCheck, UInt32(1 << 12));
- if (!_outWindowStream.Create(blockSize))
-diff -BurN lzma406/SRC/7zip/Compress/LZMA/LZMADecoder.h lzma/SRC/7zip/Compress/LZMA/LZMADecoder.h
---- lzma406/SRC/7zip/Compress/LZMA/LZMADecoder.h 2004-08-25 01:40:08.000000000 +0400
-+++ lzma/SRC/7zip/Compress/LZMA/LZMADecoder.h 2005-01-20 13:06:59.081297916 +0300
-@@ -234,6 +234,8 @@
- STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);
- STDMETHOD(ReadPart)(void *data, UInt32 size, UInt32 *processedSize);
-
-+ STDMETHOD(SetDecoderPropertiesRaw)(int lc, int lp, int pb, UInt32 dictionarySize);
-+
- virtual ~CDecoder() {}
- };
-
-diff -BurN lzma406/SRC/7zip/Compress/LZMA_Lib/makefile lzma/SRC/7zip/Compress/LZMA_Lib/makefile
---- lzma406/SRC/7zip/Compress/LZMA_Lib/makefile 1970-01-01 03:00:00.000000000 +0300
-+++ lzma/SRC/7zip/Compress/LZMA_Lib/makefile 2005-01-19 13:49:20.000000000 +0300
-@@ -0,0 +1,88 @@
-+PROG = liblzma.a
-+CXX = g++ -O3 -Wall
-+AR = ar
-+RM = rm -f
-+CFLAGS = -c
-+
-+OBJS = \
-+ ZLib.o \
-+ LZMADecoder.o \
-+ LZMAEncoder.o \
-+ LZInWindow.o \
-+ LZOutWindow.o \
-+ RangeCoderBit.o \
-+ InBuffer.o \
-+ OutBuffer.o \
-+ FileStreams.o \
-+ Alloc.o \
-+ C_FileIO.o \
-+ CommandLineParser.o \
-+ CRC.o \
-+ String.o \
-+ StringConvert.o \
-+ StringToInt.o \
-+ Vector.o \
-+
-+
-+all: $(PROG)
-+
-+$(PROG): $(OBJS)
-+ $(AR) r $(PROG) $(OBJS)
-+
-+ZLib.o: ZLib.cpp
-+ $(CXX) $(CFLAGS) ZLib.cpp
-+
-+LZMADecoder.o: ../LZMA/LZMADecoder.cpp
-+ $(CXX) $(CFLAGS) ../LZMA/LZMADecoder.cpp
-+
-+LZMAEncoder.o: ../LZMA/LZMAEncoder.cpp
-+ $(CXX) $(CFLAGS) ../LZMA/LZMAEncoder.cpp
-+
-+LZInWindow.o: ../LZ/LZInWindow.cpp
-+ $(CXX) $(CFLAGS) ../LZ/LZInWindow.cpp
-+
-+LZOutWindow.o: ../LZ/LZOutWindow.cpp
-+ $(CXX) $(CFLAGS) ../LZ/LZOutWindow.cpp
-+
-+RangeCoderBit.o: ../RangeCoder/RangeCoderBit.cpp
-+ $(CXX) $(CFLAGS) ../RangeCoder/RangeCoderBit.cpp
-+
-+InBuffer.o: ../../Common/InBuffer.cpp
-+ $(CXX) $(CFLAGS) ../../Common/InBuffer.cpp
-+
-+OutBuffer.o: ../../Common/OutBuffer.cpp
-+ $(CXX) $(CFLAGS) ../../Common/OutBuffer.cpp
-+
-+FileStreams.o: ../../Common/FileStreams.cpp
-+ $(CXX) $(CFLAGS) ../../Common/FileStreams.cpp
-+
-+Alloc.o: ../../../Common/Alloc.cpp
-+ $(CXX) $(CFLAGS) ../../../Common/Alloc.cpp
-+
-+C_FileIO.o: ../../../Common/C_FileIO.cpp
-+ $(CXX) $(CFLAGS) ../../../Common/C_FileIO.cpp
-+
-+CommandLineParser.o: ../../../Common/CommandLineParser.cpp
-+ $(CXX) $(CFLAGS) ../../../Common/CommandLineParser.cpp
-+
-+CRC.o: ../../../Common/CRC.cpp
-+ $(CXX) $(CFLAGS) ../../../Common/CRC.cpp
-+
-+MyWindows.o: ../../../Common/MyWindows.cpp
-+ $(CXX) $(CFLAGS) ../../../Common/MyWindows.cpp
-+
-+String.o: ../../../Common/String.cpp
-+ $(CXX) $(CFLAGS) ../../../Common/String.cpp
-+
-+StringConvert.o: ../../../Common/StringConvert.cpp
-+ $(CXX) $(CFLAGS) ../../../Common/StringConvert.cpp
-+
-+StringToInt.o: ../../../Common/StringToInt.cpp
-+ $(CXX) $(CFLAGS) ../../../Common/StringToInt.cpp
-+
-+Vector.o: ../../../Common/Vector.cpp
-+ $(CXX) $(CFLAGS) ../../../Common/Vector.cpp
-+
-+clean:
-+ -$(RM) $(PROG) $(OBJS)
-+
-diff -BurN lzma406/SRC/7zip/Compress/LZMA_Lib/ZLib.cpp lzma/SRC/7zip/Compress/LZMA_Lib/ZLib.cpp
---- lzma406/SRC/7zip/Compress/LZMA_Lib/ZLib.cpp 1970-01-01 03:00:00.000000000 +0300
-+++ lzma/SRC/7zip/Compress/LZMA_Lib/ZLib.cpp 2005-01-20 15:01:18.439221129 +0300
-@@ -0,0 +1,273 @@
-+/*
-+ * lzma zlib simplified wrapper
-+ *
-+ * Copyright (c) 2005 Oleg I. Vdovikin <oleg@cs.msu.su>
-+ *
-+ * This library is free software; you can redistribute
-+ * it and/or modify it under the terms of the GNU Lesser
-+ * General Public License as published by the Free Software
-+ * Foundation; either version 2.1 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This library 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 Lesser General Public License
-+ * for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General
-+ * Public License along with this library; if not, write to
-+ * the Free Software Foundation, Inc., 59 Temple Place,
-+ * Suite 330, Boston, MA 02111-1307 USA
-+ */
-+
-+/*
-+ * default values for encoder/decoder used by wrapper
-+ */
-+
-+#include <zlib.h>
-+
-+#define ZLIB_LC 3
-+#define ZLIB_LP 0
-+#define ZLIB_PB 2
-+
-+#ifdef WIN32
-+#include <initguid.h>
-+#else
-+#define INITGUID
-+#endif
-+
-+#include "../../../Common/MyWindows.h"
-+#include "../LZMA/LZMADecoder.h"
-+#include "../LZMA/LZMAEncoder.h"
-+
-+#define STG_E_SEEKERROR ((HRESULT)0x80030019L)
-+#define STG_E_MEDIUMFULL ((HRESULT)0x80030070L)
-+
-+class CInMemoryStream:
-+ public IInStream,
-+ public IStreamGetSize,
-+ public CMyUnknownImp
-+{
-+public:
-+ CInMemoryStream(const Bytef *data, UInt64 size) :
-+ m_data(data), m_size(size), m_offset(0) {}
-+
-+ virtual ~CInMemoryStream() {}
-+
-+ MY_UNKNOWN_IMP2(IInStream, IStreamGetSize)
-+
-+ STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize)
-+ {
-+ if (size > m_size - m_offset)
-+ size = m_size - m_offset;
-+
-+ if (size) {
-+ memcpy(data, m_data + m_offset, size);
-+ }
-+
-+ m_offset += size;
-+
-+ if (processedSize)
-+ *processedSize = size;
-+
-+ return S_OK;
-+ }
-+
-+ STDMETHOD(ReadPart)(void *data, UInt32 size, UInt32 *processedSize)
-+ {
-+ return Read(data, size, processedSize);
-+ }
-+
-+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
-+ {
-+ UInt64 _offset;
-+
-+ if (seekOrigin == STREAM_SEEK_SET) _offset = offset;
-+ else if (seekOrigin == STREAM_SEEK_CUR) _offset = m_offset + offset;
-+ else if (seekOrigin == STREAM_SEEK_END) _offset = m_size;
-+ else return STG_E_INVALIDFUNCTION;
-+
-+ if (_offset < 0 || _offset > m_size)
-+ return STG_E_SEEKERROR;
-+
-+ m_offset = _offset;
-+
-+ if (newPosition)
-+ *newPosition = m_offset;
-+
-+ return S_OK;
-+ }
-+
-+ STDMETHOD(GetSize)(UInt64 *size)
-+ {
-+ *size = m_size;
-+ return S_OK;
-+ }
-+protected:
-+ const Bytef *m_data;
-+ UInt64 m_size;
-+ UInt64 m_offset;
-+};
-+
-+class COutMemoryStream:
-+ public IOutStream,
-+ public CMyUnknownImp
-+{
-+public:
-+ COutMemoryStream(Bytef *data, UInt64 maxsize) :
-+ m_data(data), m_size(0), m_maxsize(maxsize), m_offset(0) {}
-+ virtual ~COutMemoryStream() {}
-+
-+ MY_UNKNOWN_IMP1(IOutStream)
-+
-+ STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize)
-+ {
-+ if (size > m_maxsize - m_offset)
-+ size = m_maxsize - m_offset;
-+
-+ if (size) {
-+ memcpy(m_data + m_offset, data, size);
-+ }
-+
-+ m_offset += size;
-+
-+ if (m_offset > m_size)
-+ m_size = m_offset;
-+
-+ if (processedSize)
-+ *processedSize = size;
-+
-+ return S_OK;
-+ }
-+
-+ STDMETHOD(WritePart)(const void *data, UInt32 size, UInt32 *processedSize)
-+ {
-+ return Write(data, size, processedSize);
-+ }
-+
-+ STDMETHOD(Seek)(Int64 offset, UInt32 seekOrigin, UInt64 *newPosition)
-+ {
-+ UInt64 _offset;
-+
-+ if (seekOrigin == STREAM_SEEK_SET) _offset = offset;
-+ else if (seekOrigin == STREAM_SEEK_CUR) _offset = m_offset + offset;
-+ else if (seekOrigin == STREAM_SEEK_END) _offset = m_size;
-+ else return STG_E_INVALIDFUNCTION;
-+
-+ if (_offset < 0 || _offset > m_maxsize)
-+ return STG_E_SEEKERROR;
-+
-+ m_offset = _offset;
-+
-+ if (newPosition)
-+ *newPosition = m_offset;
-+
-+ return S_OK;
-+ }
-+
-+ STDMETHOD(SetSize)(Int64 newSize)
-+ {
-+ if ((UInt64)newSize > m_maxsize)
-+ return STG_E_MEDIUMFULL;
-+
-+ return S_OK;
-+ }
-+protected:
-+ Bytef *m_data;
-+ UInt64 m_size;
-+ UInt64 m_maxsize;
-+ UInt64 m_offset;
-+};
-+
-+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
-+ const Bytef *source, uLong sourceLen,
-+ int level))
-+{
-+ CInMemoryStream *inStreamSpec = new CInMemoryStream(source, sourceLen);
-+ CMyComPtr<ISequentialInStream> inStream = inStreamSpec;
-+
-+ COutMemoryStream *outStreamSpec = new COutMemoryStream(dest, *destLen);
-+ CMyComPtr<ISequentialOutStream> outStream = outStreamSpec;
-+
-+ NCompress::NLZMA::CEncoder *encoderSpec =
-+ new NCompress::NLZMA::CEncoder;
-+ CMyComPtr<ICompressCoder> encoder = encoderSpec;
-+
-+ PROPID propIDs[] =
-+ {
-+ NCoderPropID::kDictionarySize,
-+ NCoderPropID::kPosStateBits,
-+ NCoderPropID::kLitContextBits,
-+ NCoderPropID::kLitPosBits,
-+ NCoderPropID::kAlgorithm,
-+ NCoderPropID::kNumFastBytes,
-+ NCoderPropID::kMatchFinder,
-+ NCoderPropID::kEndMarker
-+ };
-+ const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]);
-+
-+ PROPVARIANT properties[kNumProps];
-+ for (int p = 0; p < 6; p++)
-+ properties[p].vt = VT_UI4;
-+ properties[0].ulVal = UInt32(1 << (level + 14));
-+ properties[1].ulVal = UInt32(ZLIB_PB);
-+ properties[2].ulVal = UInt32(ZLIB_LC); // for normal files
-+ properties[3].ulVal = UInt32(ZLIB_LP); // for normal files
-+ properties[4].ulVal = UInt32(2);
-+ properties[5].ulVal = UInt32(128);
-+
-+ properties[6].vt = VT_BSTR;
-+ properties[6].bstrVal = (BSTR)(const wchar_t *)L"BT4";
-+
-+ properties[7].vt = VT_BOOL;
-+ properties[7].boolVal = VARIANT_TRUE;
-+
-+ if (encoderSpec->SetCoderProperties(propIDs, properties, kNumProps) != S_OK)
-+ return Z_MEM_ERROR; // should not happen
-+
-+ HRESULT result = encoder->Code(inStream, outStream, 0, 0, 0);
-+ if (result == E_OUTOFMEMORY)
-+ {
-+ return Z_MEM_ERROR;
-+ }
-+ else if (result != S_OK)
-+ {
-+ return Z_BUF_ERROR; // should not happen
-+ }
-+
-+ UInt64 fileSize;
-+ outStreamSpec->Seek(0, STREAM_SEEK_END, &fileSize);
-+ *destLen = fileSize;
-+
-+ return Z_OK;
-+}
-+
-+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
-+ const Bytef *source, uLong sourceLen))
-+{
-+ CInMemoryStream *inStreamSpec = new CInMemoryStream(source, sourceLen);
-+ CMyComPtr<ISequentialInStream> inStream = inStreamSpec;
-+
-+ COutMemoryStream *outStreamSpec = new COutMemoryStream(dest, *destLen);
-+ CMyComPtr<ISequentialOutStream> outStream = outStreamSpec;
-+
-+ NCompress::NLZMA::CDecoder *decoderSpec =
-+ new NCompress::NLZMA::CDecoder;
-+ CMyComPtr<ICompressCoder> decoder = decoderSpec;
-+
-+ if (decoderSpec->SetDecoderPropertiesRaw(ZLIB_LC,
-+ ZLIB_LP, ZLIB_PB, (1 << 23)) != S_OK) return Z_DATA_ERROR;
-+
-+ UInt64 fileSize = *destLen;
-+
-+ if (decoder->Code(inStream, outStream, 0, &fileSize, 0) != S_OK)
-+ {
-+ return Z_DATA_ERROR;
-+ }
-+
-+ outStreamSpec->Seek(0, STREAM_SEEK_END, &fileSize);
-+ *destLen = fileSize;
-+
-+ return Z_OK;
-+}
diff --git a/recipes/lzma/lzma-4.65/001-large_files.patch b/recipes/lzma/lzma-4.65/001-large_files.patch
new file mode 100644
index 0000000000..b95fe9e90f
--- /dev/null
+++ b/recipes/lzma/lzma-4.65/001-large_files.patch
@@ -0,0 +1,13 @@
+Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
+===================================================================
+--- lzma-4.65.orig/CPP/7zip/Compress/LZMA_Alone/makefile.gcc 2009-05-15 23:33:51.000000000 +0200
++++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc 2009-06-01 22:00:54.000000000 +0200
+@@ -3,7 +3,7 @@
+ CXX_C = gcc -O2 -Wall
+ LIB = -lm
+ RM = rm -f
+-CFLAGS = -c
++CFLAGS = -c -D_FILE_OFFSET_BITS=64
+
+ ifdef SystemDrive
+ IS_MINGW = 1
diff --git a/recipes/lzma/lzma-4.65/002-lzmp.patch b/recipes/lzma/lzma-4.65/002-lzmp.patch
new file mode 100644
index 0000000000..72d881cdb2
--- /dev/null
+++ b/recipes/lzma/lzma-4.65/002-lzmp.patch
@@ -0,0 +1,1059 @@
+Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzmp.cpp 2009-06-01 22:01:10.000000000 +0200
+@@ -0,0 +1,895 @@
++/*
++ * LZMA command line tool similar to gzip to encode and decode LZMA files.
++ *
++ * Copyright (C) 2005 Ville Koskinen
++ *
++ * 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 "../../../Common/MyInitGuid.h"
++
++#include <iostream>
++using std::cout;
++using std::cerr;
++using std::endl;
++
++#include <cstdio>
++#include <cstdlib>
++#include <cstring>
++
++#include <string>
++using std::string;
++#include <vector>
++using std::vector;
++typedef vector<string> stringVector;
++
++#include <unistd.h>
++#include <getopt.h>
++#include <signal.h>
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <utime.h>
++#include <sys/time.h> // futimes()
++
++// For Solaris
++#ifndef HAVE_FUTIMES
++//#define futimes(fd, tv) futimesat(fd, NULL, tv)
++#endif
++
++#if defined(_WIN32) || defined(OS2) || defined(MSDOS)
++#include <fcntl.h>
++#include <io.h>
++#define MY_SET_BINARY_MODE(file) setmode(fileno(file),O_BINARY)
++#else
++#define MY_SET_BINARY_MODE(file)
++#endif
++
++#include "../../../7zip/Common/FileStreams.h"
++
++#include "../../../Common/Types.h"
++
++#include "../../../7zip/Compress/LzmaDecoder.h"
++#include "../../../7zip/Compress/LzmaEncoder.h"
++
++#include "Exception.h"
++
++#include "lzma_version.h"
++
++namespace lzma {
++
++const char *PROGRAM_VERSION = PACKAGE_VERSION;
++const char *PROGRAM_COPYRIGHT = "Copyright (C) 2006 Ville Koskinen";
++
++/* LZMA_Alone switches:
++ -a{N}: set compression mode - [0, 2], default: 2 (max)
++ -d{N}: set dictionary - [0,28], default: 23 (8MB)
++ -fb{N}: set number of fast bytes - [5, 255], default: 128
++ -lc{N}: set number of literal context bits - [0, 8], default: 3
++ -lp{N}: set number of literal pos bits - [0, 4], default: 0
++ -pb{N}: set number of pos bits - [0, 4], default: 2
++ -mf{MF_ID}: set Match Finder: [bt2, bt3, bt4, bt4b, pat2r, pat2,
++ pat2h, pat3h, pat4h, hc3, hc4], default: bt4
++*/
++
++struct lzma_option {
++ short compression_mode; // -a
++ short dictionary; // -d
++ short fast_bytes; // -fb
++ wchar_t *match_finder; // -mf
++ short literal_context_bits; // -lc
++ short literal_pos_bits; // -lp
++ short pos_bits; // -pb
++};
++
++/* The following is a mapping from gzip/bzip2 style -1 .. -9 compression modes
++ * to the corresponding LZMA compression modes. Thanks, Larhzu, for coining
++ * these. */
++const lzma_option option_mapping[] = {
++ { 0, 0, 0, NULL, 0, 0, 0}, // -0 (needed for indexing)
++ { 0, 16, 64, L"hc4", 3, 0, 2}, // -1
++ { 0, 20, 64, L"hc4", 3, 0, 2}, // -2
++ { 1, 19, 64, L"bt4", 3, 0, 2}, // -3
++ { 2, 20, 64, L"bt4", 3, 0, 2}, // -4
++ { 2, 21, 128, L"bt4", 3, 0, 2}, // -5
++ { 2, 22, 128, L"bt4", 3, 0, 2}, // -6
++ { 2, 23, 128, L"bt4", 3, 0, 2}, // -7
++ { 2, 24, 255, L"bt4", 3, 0, 2}, // -8
++ { 2, 25, 255, L"bt4", 3, 0, 2}, // -9
++};
++
++struct extension_pair {
++ char *from;
++ char *to;
++};
++
++const extension_pair known_extensions[] = {
++ { ".lzma", "" },
++ { ".tlz", ".tar" },
++ { NULL, NULL }
++};
++
++/* Sorry, I just happen to like enumerations. */
++enum PROGRAM_MODE {
++ PM_COMPRESS = 0,
++ PM_DECOMPRESS,
++ PM_TEST,
++ PM_HELP,
++ PM_LICENSE,
++ PM_VERSION
++};
++
++enum {
++ STATUS_OK = 0,
++ STATUS_ERROR = 1,
++ STATUS_WARNING = 2
++};
++
++/* getopt options. */
++/* struct option { name, has_arg, flag, val } */
++const struct option long_options[] = {
++ { "stdout", 0, 0, 'c' },
++ { "decompress", 0, 0, 'd' },
++ { "compress", 0, 0, 'z' },
++ { "keep", 0, 0, 'k' },
++ { "force", 0, 0, 'f' },
++ { "test", 0, 0, 't' },
++ { "suffix", 1, 0, 'S' },
++ { "quiet", 0, 0, 'q' },
++ { "verbose", 0, 0, 'v' },
++ { "help", 0, 0, 'h' },
++ { "license", 0, 0, 'L' },
++ { "version", 0, 0, 'V' },
++ { "fast", 0, 0, '1' },
++ { "best", 0, 0, '9' },
++ { 0, 0, 0, 0 }
++};
++
++/* getopt option string (for the above options). */
++const char option_string[] = "cdzkftS:qvhLV123456789A:D:F:";
++
++/* Defaults. */
++PROGRAM_MODE program_mode = PM_COMPRESS;
++int verbosity = 0;
++bool stdinput = false;
++bool stdoutput = false;
++bool keep = false;
++bool force = false;
++int compression_mode = 7;
++//char *suffix = strdup(".lzma");
++char *suffix = strdup(known_extensions[0].from);
++lzma_option advanced_options = { -1, -1, -1, NULL, -1, -1, -1 };
++
++void print_help(const char *const argv0)
++{
++ // Help goes to stdout while other messages go to stderr.
++ cout << "\nlzma " << PROGRAM_VERSION
++ << " " << PROGRAM_COPYRIGHT << "\n"
++ "Based on LZMA SDK " << LZMA_SDK_VERSION_STRING << " "
++ << LZMA_SDK_COPYRIGHT_STRING
++ << "\n\nUsage: " << argv0
++ << " [flags and input files in any order]\n"
++" -c --stdout output to standard output\n"
++" -d --decompress force decompression\n"
++" -z --compress force compression\n"
++" -k --keep keep (don't delete) input files\n"
++" -f --force force overwrite of output file and compress links\n"
++" -t --test test compressed file integrity\n"
++" -S .suf --suffix .suf use suffix .suf on compressed files\n"
++" -q --quiet suppress error messages\n"
++" -v --verbose be verbose\n"
++" -h --help print this message\n"
++" -L --license display the license information\n"
++" -V --version display version numbers of LZMA SDK and lzma\n"
++" -1 .. -2 fast compression\n"
++" -3 .. -9 good to excellent compression. -7 is the default.\n"
++" --fast alias for -1\n"
++" --best alias for -9 (usually *not* what you want)\n\n"
++" Memory usage depends a lot on the chosen compression mode -1 .. -9.\n"
++" See the man page lzma(1) for details.\n\n";
++}
++
++void print_license(void)
++{
++ cout << "\n LZMA command line tool " << PROGRAM_VERSION << " - "
++ << PROGRAM_COPYRIGHT
++ << "\n LZMA SDK " << LZMA_SDK_VERSION_STRING << " - "
++ << LZMA_SDK_COPYRIGHT_STRING
++ << "\n This program is a part of the LZMA utils package.\n"
++ " http://tukaani.org/lzma/\n\n"
++" This program is free software; you can redistribute it and/or\n"
++" modify it under the terms of the GNU General Public License\n"
++" as published by the Free Software Foundation; either version 2\n"
++" of the License, or (at your option) any later version.\n"
++"\n"
++" This program is distributed in the hope that it will be useful,\n"
++" but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
++" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
++" GNU General Public License for more details.\n"
++"\n";
++}
++
++void print_version(void)
++{
++ cout << "LZMA command line tool " << PROGRAM_VERSION << "\n"
++ << "LZMA SDK " << LZMA_SDK_VERSION_STRING << "\n";
++}
++
++short str2int (const char *str, const int &min, const int &max)
++{
++ int value = -1;
++ char *endptr = NULL;
++ if (str == NULL || str[0] == '\0')
++ throw ArgumentException("Invalid integer option");
++ value = strtol (str, &endptr, 10);
++ if (*endptr != '\0' || value < min || value > max)
++ throw ArgumentException("Invalid integer option");
++ return value;
++}
++
++void parse_options(int argc, char **argv, stringVector &filenames)
++{
++ /* Snatched from getopt(3). */
++ int c;
++
++ /* Check how we were called */
++ {
++ char *p = strrchr (argv[0], '/'); // Remove path prefix, if any
++ if (p++ == NULL)
++ p = argv[0];
++ if (strstr (p, "un") != NULL) {
++ program_mode = PM_DECOMPRESS;
++ } else if (strstr (p, "cat") != NULL) {
++ program_mode = PM_DECOMPRESS;
++ stdoutput = true;
++ }
++ }
++
++ while (-1 != (c = getopt_long(argc, argv, option_string,
++ long_options, NULL))) {
++ switch (c) {
++ // stdout
++ case 'c':
++ stdoutput = true;
++ break;
++
++ // decompress
++ case 'd':
++ program_mode = PM_DECOMPRESS;
++ break;
++
++ // compress
++ case 'z':
++ program_mode = PM_COMPRESS;
++ break;
++
++ // keep
++ case 'k':
++ keep = true;
++ break;
++
++ // force
++ case 'f':
++ force = true;
++ break;
++
++ // test
++ case 't':
++ program_mode = PM_TEST;
++ break;
++
++ // suffix
++ case 'S':
++ if (optarg) {
++ free(suffix);
++ suffix = strdup(optarg);
++ }
++ break;
++
++ // quiet
++ case 'q':
++ verbosity = 0;
++ break;
++
++ // verbose
++ case 'v':
++ verbosity++;
++ break;
++
++ // help
++ case 'h':
++ program_mode = PM_HELP;
++ break;
++
++ // license
++ case 'L':
++ program_mode = PM_LICENSE;
++ break;
++
++ // version
++ case 'V':
++ program_mode = PM_VERSION;
++ break;
++
++ case '1': case '2': case '3': case '4': case '5':
++ case '6': case '7': case '8': case '9':
++ compression_mode = c - '0';
++ break;
++
++ // Advanced options //
++ // Compression mode
++ case 'A':
++ advanced_options.compression_mode =
++ str2int (optarg, 0, 2);
++ break;
++
++ // Dictionary size
++ case 'D':
++ advanced_options.dictionary =
++ str2int (optarg, 0, 28);
++ break;
++
++ // Fast bytes
++ case 'F':
++ advanced_options.fast_bytes =
++ str2int (optarg, 0, 273);
++ break;
++
++ default:
++ throw ArgumentException("");
++ break;
++ } // switch(c)
++ } // while(1)
++
++ for (int i = optind; i < argc; i++) {
++ if (strcmp("-", argv[i]) == 0)
++ continue;
++ filenames.push_back(argv[i]);
++ }
++} // parse_options
++
++void set_encoder_properties(NCompress::NLzma::CEncoder *encoder,
++ lzma_option &opt)
++{
++ /* Almost verbatim from LzmaAlone.cpp. */
++ PROPID propIDs[] =
++ {
++ NCoderPropID::kDictionarySize,
++ NCoderPropID::kPosStateBits,
++ NCoderPropID::kLitContextBits,
++ NCoderPropID::kLitPosBits,
++ NCoderPropID::kAlgorithm,
++ NCoderPropID::kNumFastBytes,
++ NCoderPropID::kMatchFinder,
++ NCoderPropID::kEndMarker
++ };
++ const int kNumProps = sizeof(propIDs) / sizeof(propIDs[0]);
++#define VALUE(x) (advanced_options.x >= 0 ? advanced_options.x : opt.x)
++ PROPVARIANT properties[kNumProps];
++ for (int p = 0; p < 6; p++)
++ properties[p].vt = VT_UI4;
++ properties[0].ulVal = UInt32(1 << VALUE (dictionary));
++ properties[1].ulVal = UInt32(VALUE (pos_bits));
++ properties[2].ulVal = UInt32(VALUE (literal_context_bits));
++ properties[3].ulVal = UInt32(VALUE (literal_pos_bits));
++ properties[4].ulVal = UInt32(VALUE (compression_mode));
++ properties[5].ulVal = UInt32(VALUE (fast_bytes));
++#undef VALUE
++
++ properties[6].vt = VT_BSTR;
++ properties[6].bstrVal = (BSTR)opt.match_finder;
++
++ properties[7].vt = VT_BOOL;
++ properties[7].boolVal = stdinput ? VARIANT_TRUE : VARIANT_FALSE;
++
++ if (encoder->SetCoderProperties(propIDs, properties, kNumProps) != S_OK)
++ throw Exception("SetCoderProperties() error");
++}
++
++void encode(NCompress::NLzma::CEncoder *encoderSpec,
++ CMyComPtr<ISequentialInStream> inStream,
++ CMyComPtr<ISequentialOutStream> outStream,
++ lzma_option encoder_options,
++ UInt64 fileSize)
++{
++ set_encoder_properties(encoderSpec, encoder_options);
++
++ encoderSpec->WriteCoderProperties(outStream);
++
++ for (int i = 0; i < 8; i++)
++ {
++ Byte b = Byte(fileSize >> (8 * i));
++ if (outStream->Write(&b, sizeof(b), 0) != S_OK)
++ throw Exception("Write error while encoding");
++ }
++
++ HRESULT result = encoderSpec->Code(inStream, outStream, 0, 0, 0);
++
++ if (result == E_OUTOFMEMORY)
++ throw Exception("Cannot allocate memory");
++ else if (result != S_OK) {
++ char buffer[33];
++ snprintf(buffer, 33, "%d", (unsigned int)result);
++ throw Exception(string("Encoder error: ") + buffer);
++ }
++}
++
++void decode(NCompress::NLzma::CDecoder *decoderSpec,
++ CMyComPtr<ISequentialInStream> inStream,
++ CMyComPtr<ISequentialOutStream> outStream)
++{
++ const UInt32 kPropertiesSize = 5;
++ Byte properties[kPropertiesSize];
++ UInt32 processedSize;
++ UInt64 fileSize = 0;
++
++ if (inStream->Read(properties, kPropertiesSize, &processedSize) != S_OK)
++ throw Exception("Read error");
++ if (processedSize != kPropertiesSize)
++ throw Exception("Read error");
++ if (decoderSpec->SetDecoderProperties2(properties, kPropertiesSize) != S_OK)
++ throw Exception("SetDecoderProperties() error");
++
++ for (int i = 0; i < 8; i++)
++ {
++ Byte b;
++
++ if (inStream->Read(&b, sizeof(b), &processedSize) != S_OK)
++ throw Exception("Read error");
++ if (processedSize != 1)
++ throw Exception("Read error");
++
++ fileSize |= ((UInt64)b) << (8 * i);
++ }
++
++ if (decoderSpec->Code(inStream, outStream, 0, &fileSize, 0) != S_OK)
++ throw Exception("Decoder error");
++}
++
++int open_instream(const string infile,
++ CMyComPtr<ISequentialInStream> &inStream,
++ UInt64 &fileSize)
++{
++ CInFileStream *inStreamSpec = new CInFileStream;
++ inStream = inStreamSpec;
++ if (!inStreamSpec->Open(infile.c_str()))
++ throw Exception("Cannot open input file " + infile);
++
++ inStreamSpec->File.GetLength(fileSize);
++
++ return inStreamSpec->File.GetHandle();
++}
++
++int open_outstream(const string outfile,
++ CMyComPtr<ISequentialOutStream> &outStream)
++{
++ COutFileStream *outStreamSpec = new COutFileStream;
++ outStream = outStreamSpec;
++
++ bool open_by_force = (program_mode == PM_TEST) | force;
++
++ if (!outStreamSpec->Create(outfile.c_str(), open_by_force))
++ throw Exception("Cannot open output file " + outfile);
++
++ return outStreamSpec->File.GetHandle();
++}
++
++double get_ratio(int inhandle, int outhandle)
++{
++ struct stat in_stats, out_stats;
++ fstat(inhandle, &in_stats);
++ fstat(outhandle, &out_stats);
++
++ return (double)out_stats.st_size / (double)in_stats.st_size;
++}
++
++mode_t get_file_mode(string filename)
++{
++ struct stat in_stat;
++ lstat(filename.c_str(), &in_stat);
++
++ return in_stat.st_mode;
++}
++
++bool string_ends_with(string str, string ending)
++{
++ return equal(ending.rbegin(), ending.rend(), str.rbegin());
++}
++
++bool extension_is_known(string filename)
++{
++ bool known_format = false;
++ extension_pair extension; int i = 1;
++
++ extension = known_extensions[0];
++ while (extension.from != NULL) {
++ if (string_ends_with(filename, extension.from)) {
++ known_format = true;
++ break;
++ }
++ extension = known_extensions[i];
++ i++;
++ }
++
++ if (!known_format) {
++ if (!string_ends_with(filename, suffix)) {
++ return false;
++ }
++ }
++
++ return true;
++}
++
++string replace_extension(string filename)
++{
++ int suffix_starts_at = filename.length() - strlen (suffix);
++ string from_suffix = filename.substr(suffix_starts_at, strlen (suffix));
++ string ret = filename.substr(0, suffix_starts_at);
++ extension_pair extension; int i = 1;
++
++ bool found_replacement = false;
++ extension = known_extensions[0];
++ while (extension.from != NULL) {
++ if (from_suffix.compare(extension.from) == 0) {
++ ret += extension.to;
++ found_replacement = true;
++ break;
++ }
++
++ extension = known_extensions[i];
++ i++;
++ }
++
++ return ret;
++}
++
++string pretty_print_status(string filename, string output_filename,
++ string ratio)
++{
++ string ret = "";
++
++ ret += filename;
++ ret += ":\t ";
++
++ if (program_mode == PM_TEST) {
++ ret += "decoded succesfully";
++
++ return ret;
++ }
++
++ if (!stdinput && !stdoutput) {
++ ret += ratio;
++ ret += " -- ";
++ }
++
++ if (program_mode == PM_COMPRESS) {
++ if (keep) {
++ ret += "encoded succesfully";
++
++ return ret;
++ }
++
++ ret += "replaced with ";
++ ret += output_filename;
++
++ return ret;
++ }
++
++ if (program_mode == PM_DECOMPRESS) {
++ if (keep) {
++ ret += "decoded succesfully";
++
++ return ret;
++ }
++
++ ret += "replaced with ";
++ ret += output_filename;
++
++ return ret;
++ }
++
++ return ret;
++}
++
++static string archive_name; // I know, it is crude, but I haven't found any other
++ // way then making a global variable to transfer filename to handler
++
++void signal_handler (int signum)
++{
++ unlink (archive_name.c_str()); // deleting
++ signal (signum, SIG_DFL); // we return the default function to used signal
++ kill (getpid(), signum); // and then send this signal to the process again
++}
++
++} // namespace lzma
++
++
++int main(int argc, char **argv)
++{
++ using namespace lzma;
++ using std::cerr;
++
++ stringVector filenames;
++
++ signal (SIGTERM,signal_handler);
++ signal (SIGHUP,signal_handler);
++ signal (SIGINT,signal_handler);
++
++ try {
++ parse_options(argc, argv, filenames);
++ }
++ catch (...) {
++ return STATUS_ERROR;
++ }
++
++ if (program_mode == PM_HELP) {
++ print_help(argv[0]);
++ return STATUS_OK;
++ }
++ else if (program_mode == PM_LICENSE) {
++ print_license();
++ return STATUS_OK;
++ }
++ else if (program_mode == PM_VERSION) {
++ print_version();
++ return STATUS_OK;
++ }
++
++ if (filenames.empty()) {
++ stdinput = true;
++ stdoutput = true;
++
++ /* FIXME: get rid of this */
++ filenames.push_back("-");
++ }
++
++ /* Protection: always create new files with 0600 in order to prevent
++ * outsiders from reading incomplete data. */
++ umask(0077);
++
++ bool warning = false;
++
++ for (int i = 0; i < filenames.size(); i++) {
++ CMyComPtr<ISequentialInStream> inStream;
++ CMyComPtr<ISequentialOutStream> outStream;
++ UInt64 fileSize = 0;
++ int inhandle = 0, outhandle = 0;
++ string output_filename;
++
++ if (stdinput) {
++ inStream = new CStdInFileStream;
++ MY_SET_BINARY_MODE(stdin);
++ fileSize = (UInt64)(Int64)-1;
++
++ inhandle = STDIN_FILENO;
++
++ outStream = new CStdOutFileStream;
++ MY_SET_BINARY_MODE(stdout);
++
++ outhandle = STDOUT_FILENO;
++ }
++ else {
++ mode_t infile_mode = get_file_mode(filenames[i]);
++ if (!S_ISREG(infile_mode)) {
++ if (S_ISDIR(infile_mode)) {
++ warning = true;
++ cerr << argv[0] << ": " << filenames[i] << ": "
++ << "cowardly refusing to work on directory"
++ << endl;
++
++ continue;
++ }
++ else if (S_ISLNK(infile_mode)) {
++ if (!stdoutput && !force) {
++ warning = true;
++
++ cerr << argv[0] << ": " << filenames[i] << ": "
++ << "cowardly refusing to work on symbolic link "
++ << "(use --force to force encoding or decoding)"
++ << endl;
++
++ continue;
++ }
++ }
++ else {
++ warning = true;
++
++ cerr << argv[0] << ": " << filenames[i] << ": "
++ << "doesn't exist or is not a regular file"
++ << endl;
++
++ continue;
++ }
++ }
++
++ // Test if the file already ends with *suffix.
++ if (program_mode == PM_COMPRESS && !force
++ && string_ends_with(filenames[i],
++ suffix)) {
++ warning = true;
++
++ cerr << filenames[i] << " already has "
++ << suffix << " suffix -- unchanged\n";
++
++ continue;
++ }
++
++ // Test if the file extension is known.
++ if (program_mode == PM_DECOMPRESS
++ && !extension_is_known(filenames[i])) {
++ warning = true;
++
++ cerr << filenames[i] << ": "
++ << " unknown suffix -- unchanged"
++ << endl;
++
++ continue;
++ }
++
++ try {
++ inhandle = open_instream(filenames[i], inStream, fileSize);
++ }
++ catch (Exception e) {
++ cerr << argv[0] << ": " << e.what() << endl;
++ return STATUS_ERROR;
++ }
++
++ if (stdoutput) {
++ outStream = new CStdOutFileStream;
++ MY_SET_BINARY_MODE(stdout);
++
++ outhandle = STDOUT_FILENO;
++ }
++ else {
++ /* Testing mode is nothing else but decoding
++ * and throwing away the result. */
++ if (program_mode == PM_TEST)
++ output_filename = "/dev/null";
++ else if (program_mode == PM_DECOMPRESS)
++ output_filename = replace_extension(filenames[i]);
++ else
++ output_filename = filenames[i]
++ + suffix;
++ archive_name = output_filename;
++
++ try {
++ outhandle = open_outstream(output_filename, outStream);
++ }
++ catch (Exception e) {
++ cerr << argv[0] << ": " << e.what() << endl;
++ return STATUS_ERROR;
++ }
++ }
++
++ }
++
++ // Unless --force is specified, do not read/write compressed
++ // data from/to a terminal.
++ if (!force) {
++ if (program_mode == PM_COMPRESS && isatty(outhandle)) {
++ cerr << argv[0] << ": compressed data not "
++ "written to a terminal. Use "
++ "-f to force compression.\n"
++ << argv[0] << ": For help, type: "
++ << argv[0] << " -h\n";
++ return STATUS_ERROR;
++ } else if (program_mode == PM_DECOMPRESS
++ && isatty(inhandle)) {
++ cerr << argv[0] << ": compressed data not "
++ "read from a terminal. Use "
++ "-f to force decompression.\n"
++ << argv[0] << ": For help, type: "
++ << argv[0] << " -h\n";
++ return STATUS_ERROR;
++ }
++ }
++
++ if (program_mode == PM_COMPRESS) {
++ NCompress::NLzma::CEncoder *encoderSpec =
++ new NCompress::NLzma::CEncoder;
++
++ lzma_option options = option_mapping[compression_mode];
++
++ try {
++ encode(encoderSpec, inStream, outStream, options, fileSize);
++ }
++ catch (Exception e) {
++ cerr << argv[0] << ": " << e.what() << endl;
++ unlink(output_filename.c_str());
++ delete(encoderSpec);
++
++ return STATUS_ERROR;
++ }
++
++ delete(encoderSpec);
++ }
++ else { // PM_DECOMPRESS | PM_TEST
++ NCompress::NLzma::CDecoder *decoderSpec =
++ new NCompress::NLzma::CDecoder;
++
++ try {
++ decode(decoderSpec, inStream, outStream);
++ }
++ catch (Exception e) {
++ cerr << argv[0] << ": " << e.what() << endl;
++ unlink(output_filename.c_str());
++ delete(decoderSpec);
++
++ return STATUS_ERROR;
++ }
++
++ delete(decoderSpec);
++ }
++
++ /* Set permissions and owners. */
++ if ( (program_mode == PM_COMPRESS || program_mode == PM_DECOMPRESS )
++ && (!stdinput && !stdoutput) ) {
++
++ int ret = 0;
++ struct stat file_stats;
++ ret = fstat(inhandle, &file_stats);
++
++ ret = fchmod(outhandle, file_stats.st_mode);
++ ret = fchown(outhandle, file_stats.st_uid, file_stats.st_gid);
++ // We need to call fchmod() again, since otherwise the SUID bits
++ // are lost.
++ ret = fchmod(outhandle, file_stats.st_mode);
++
++ struct timeval file_times[2];
++ // Access time
++ file_times[0].tv_sec = file_stats.st_atime;
++ file_times[0].tv_usec = 0;
++ // Modification time
++ file_times[1].tv_sec = file_stats.st_mtime;
++ file_times[1].tv_usec = 0;
++
++ ret = futimes(outhandle, file_times);
++
++ if (!keep)
++ unlink(filenames[i].c_str());
++ }
++
++ if (verbosity > 0) {
++ if (stdoutput) {
++ cerr << filenames[i] << ":\t ";
++ cerr << "decoded succesfully"
++ << endl;
++ }
++
++ else {
++ char buf[10] = { 0 };
++
++ if (program_mode == PM_DECOMPRESS)
++ snprintf(buf, 10, "%.2f%%",
++ (1 - get_ratio(outhandle, inhandle)) * 100);
++ if (program_mode == PM_COMPRESS)
++ snprintf(buf, 10, "%.2f%%",
++ (1 - get_ratio(inhandle, outhandle)) * 100);
++
++ string ratio = buf;
++ cerr << pretty_print_status(filenames[i], output_filename,
++ ratio)
++ << endl;
++ }
++ }
++ }
++
++ if (warning)
++ return STATUS_WARNING;
++
++ return STATUS_OK;
++}
++
+Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/Exception.h 2009-06-01 22:01:10.000000000 +0200
+@@ -0,0 +1,45 @@
++/* A couple of exceptions for lzmp.
++ *
++ * Copyright (C) 2005 Ville Koskinen
++ *
++ * 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 _EXCEPTION_H_
++#define _EXCEPTION_H_
++
++#include <string>
++using std::string;
++
++class Exception
++{
++private:
++ string message;
++public:
++ Exception(char *what): message(what) { }
++ Exception(string what): message(what) { }
++
++ ~Exception() { }
++
++ string what(void) { return message; }
++};
++
++class ArgumentException: public Exception
++{
++public:
++ ArgumentException(char *what): Exception(what) { }
++ ArgumentException(string what): Exception(what) { }
++
++ ~ArgumentException() { }
++};
++
++#endif
++
+Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc
+===================================================================
+--- lzma-4.65.orig/CPP/7zip/Compress/LZMA_Alone/makefile.gcc 2009-06-01 22:00:54.000000000 +0200
++++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/makefile.gcc 2009-06-01 22:06:13.000000000 +0200
+@@ -1,9 +1,10 @@
+-PROG = lzma
++PROG = lzma_alone
++PROG2 = lzma
+ CXX = g++ -O2 -Wall
+ CXX_C = gcc -O2 -Wall
+ LIB = -lm
+ RM = rm -f
+-CFLAGS = -c -D_FILE_OFFSET_BITS=64
++CFLAGS = -c -I ../../../ -D_FILE_OFFSET_BITS=64 -DPACKAGE_VERSION="\"4.32.0beta3\""
+
+ ifdef SystemDrive
+ IS_MINGW = 1
+@@ -45,12 +46,35 @@
+ Lzma86Dec.o \
+ Lzma86Enc.o \
+
++OBJS2 = \
++ C_FileIO.o \
++ CRC.o \
++ Alloc.o \
++ FileStreams.o \
++ StreamUtils.o \
++ InBuffer.o \
++ OutBuffer.o \
++ LzmaDecoder.o \
++ StringConvert.o \
++ StringToInt.o \
++ LzmaEncoder.o \
++ LzmaDec.o \
++ LzmaEnc.o \
++ LzFind.o \
++ 7zCrc.o \
++ lzmp.o
+
+-all: $(PROG)
++all: $(PROG) $(PROG2)
+
+ $(PROG): $(OBJS)
+ $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) $(LIB2)
+
++$(PROG2): $(OBJS2)
++ $(CXX) -o $(PROG2) $(LDFLAGS) $(OBJS2) $(LIB)
++
++lzmp.o: lzmp.cpp
++ $(CXX) $(CFLAGS) lzmp.cpp
++
+ LzmaAlone.o: LzmaAlone.cpp
+ $(CXX) $(CFLAGS) LzmaAlone.cpp
+
+@@ -131,5 +153,5 @@
+ $(CXX_C) $(CFLAGS) ../../../../C/LzmaUtil/Lzma86Enc.c
+
+ clean:
+- -$(RM) $(PROG) $(OBJS)
++ -$(RM) $(PROG) $(PROG2) $(OBJS)
+
+Index: lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ lzma-4.65/CPP/7zip/Compress/LZMA_Alone/lzma_version.h 2009-06-01 22:01:10.000000000 +0200
+@@ -0,0 +1,31 @@
++#ifndef LZMA_VERSION_H
++#define LZMA_VERSION_H
++
++/*
++ Version and copyright information used by LZMA utils.
++*/
++
++static const char *LZMA_SDK_VERSION_STRING = "4.43";
++
++static const char *LZMA_SDK_COPYRIGHT_STRING =
++ "Copyright (C) 1999-2006 Igor Pavlov";
++
++static const char *LZMA_SDK_COPYRIGHT_INFO =
++ " See http://7-zip.org/sdk.html or the documentation of LZMA SDK for\n"
++ " the license. For reference, the version 4.43 is free software\n"
++ " licensed under the GNU LGPL.";
++
++
++static const char *LZMA_UTILS_VERSION_STRING = PACKAGE_VERSION;
++
++static const char *LZMA_UTILS_COPYRIGHT_STRING =
++ "Copyright (C) 2006 Lasse Collin";
++
++static const char *LZMA_UTILS_COPYRIGHT_INFO =
++ "This program comes with ABSOLUTELY NO WARRANTY.\n"
++ "You may redistribute copies of this program\n"
++ "under the terms of the GNU General Public License.\n"
++ "For more information about these matters, see the file "
++ "named COPYING.\n";
++
++#endif /* ifndef LZMA_VERSION_H */
+Index: lzma-4.65/CPP/Common/C_FileIO.h
+===================================================================
+--- lzma-4.65.orig/CPP/Common/C_FileIO.h 2009-05-15 23:33:51.000000000 +0200
++++ lzma-4.65/CPP/Common/C_FileIO.h 2009-06-01 22:06:56.000000000 +0200
+@@ -24,6 +24,7 @@
+ bool Close();
+ bool GetLength(UInt64 &length) const;
+ off_t Seek(off_t distanceToMove, int moveMethod) const;
++ int GetHandle() const { return _handle; }
+ };
+
+ class CInFile: public CFileBase
diff --git a/recipes/lzma/lzma-4.65/003-compile_fixes.patch b/recipes/lzma/lzma-4.65/003-compile_fixes.patch
new file mode 100644
index 0000000000..49ae66b9c4
--- /dev/null
+++ b/recipes/lzma/lzma-4.65/003-compile_fixes.patch
@@ -0,0 +1,26 @@
+diff -urN lzma-4.65/CPP/7zip/Common/FileStreams.h lzma-4.65.new/CPP/7zip/Common/FileStreams.h
+--- lzma-4.65/CPP/7zip/Common/FileStreams.h 2009-05-15 23:33:51.000000000 +0200
++++ lzma-4.65.new/CPP/7zip/Common/FileStreams.h 2009-06-01 22:30:01.000000000 +0200
+@@ -72,6 +72,7 @@
+ public IOutStream,
+ public CMyUnknownImp
+ {
++public:
+ #ifdef USE_WIN_FILE
+ NWindows::NFile::NIO::COutFile File;
+ #else
+diff -urN lzma-4.65/CPP/Common/MyWindows.h lzma-4.65.new/CPP/Common/MyWindows.h
+--- lzma-4.65/CPP/Common/MyWindows.h 2009-05-15 23:33:51.000000000 +0200
++++ lzma-4.65.new/CPP/Common/MyWindows.h 2009-06-01 22:29:26.000000000 +0200
+@@ -101,8 +101,11 @@
+
+ #ifdef __cplusplus
+
++#ifndef INITGUID
++#define INITGUID
+ DEFINE_GUID(IID_IUnknown,
+ 0x00000000, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
++#endif
+ struct IUnknown
+ {
+ STDMETHOD(QueryInterface) (REFIID iid, void **outObject) PURE;
diff --git a/recipes/lzma/lzma-4.65/100-static_library.patch b/recipes/lzma/lzma-4.65/100-static_library.patch
new file mode 100644
index 0000000000..15ab4e0552
--- /dev/null
+++ b/recipes/lzma/lzma-4.65/100-static_library.patch
@@ -0,0 +1,70 @@
+--- a/C/LzmaUtil/makefile.gcc
++++ b/C/LzmaUtil/makefile.gcc
+@@ -1,44 +1,53 @@
+ PROG = lzma
+-CXX = g++
+-LIB =
++CC = gcc
++LIB = liblzma.a
+ RM = rm -f
+ CFLAGS = -c -O2 -Wall
++AR = ar
++RANLIB = ranlib
+
+ OBJS = \
+- LzmaUtil.o \
+ Alloc.o \
+ LzFind.o \
+ LzmaDec.o \
+ LzmaEnc.o \
++ LzmaLib.o \
+ 7zFile.o \
+ 7zStream.o \
+
+-
+ all: $(PROG)
+
+-$(PROG): $(OBJS)
+- $(CXX) -o $(PROG) $(LDFLAGS) $(OBJS) $(LIB) $(LIB2)
++$(PROG): LzmaUtil.o $(LIB)
++ $(CC) -o $(PROG) $(LDFLAGS) $< $(LIB)
+
+ LzmaUtil.o: LzmaUtil.c
+- $(CXX) $(CFLAGS) LzmaUtil.c
++ $(CC) $(CFLAGS) LzmaUtil.c
++
++$(LIB): $(OBJS)
++ rm -f $@
++ $(AR) rcu $@ $(OBJS)
++ $(RANLIB) $@
+
+ Alloc.o: ../Alloc.c
+- $(CXX) $(CFLAGS) ../Alloc.c
++ $(CC) $(CFLAGS) ../Alloc.c
+
+ LzFind.o: ../LzFind.c
+- $(CXX) $(CFLAGS) ../LzFind.c
++ $(CC) $(CFLAGS) ../LzFind.c
+
+ LzmaDec.o: ../LzmaDec.c
+- $(CXX) $(CFLAGS) ../LzmaDec.c
++ $(CC) $(CFLAGS) ../LzmaDec.c
+
+ LzmaEnc.o: ../LzmaEnc.c
+- $(CXX) $(CFLAGS) ../LzmaEnc.c
++ $(CC) $(CFLAGS) ../LzmaEnc.c
++
++LzmaLib.o: ../LzmaLib.c
++ $(CC) $(CFLAGS) ../LzmaLib.c
+
+ 7zFile.o: ../7zFile.c
+- $(CXX) $(CFLAGS) ../7zFile.c
++ $(CC) $(CFLAGS) ../7zFile.c
+
+ 7zStream.o: ../7zStream.c
+- $(CXX) $(CFLAGS) ../7zStream.c
++ $(CC) $(CFLAGS) ../7zStream.c
+
+ clean:
+- -$(RM) $(PROG) $(OBJS)
++ -$(RM) $(PROG) *.o *.a
diff --git a/recipes/lzma/lzma-native_4.17.bb b/recipes/lzma/lzma-native_4.17.bb
deleted file mode 100644
index 24664b32e4..0000000000
--- a/recipes/lzma/lzma-native_4.17.bb
+++ /dev/null
@@ -1,25 +0,0 @@
-DESCRIPTION = "LZMA is a general compression method. LZMA provides high compression ratio and very fast decompression."
-HOMEPAGE = "http://www.7-zip.org/"
-LICENSE = "LGPL"
-DEPENDS = "zlib-native"
-PR = "r3"
-
-PVNODOT = "${@bb.data.getVar('PV',d,1).split('.')[0]}${@bb.data.getVar('PV',d,1).split('.')[1]}"
-SRC_URI = "${SOURCEFORGE_MIRROR}/sevenzip/lzma${PVNODOT}.tar.bz2 \
- file://lzma-406-zlib-stream.patch;patch=1;pnum=2"
-
-S = "${WORKDIR}/SRC"
-
-inherit native
-
-CFLAGS += "-c -I${S}"
-
-do_compile() {
- oe_runmake -C 7zip/Compress/LZMA_Alone
- oe_runmake -C 7zip/Compress/LZMA_Lib
-}
-
-do_stage () {
- install -m 0755 7zip/Compress/LZMA_Alone/lzma ${STAGING_BINDIR}
- oe_libinstall -a -C 7zip/Compress/LZMA_Lib liblzma ${STAGING_LIBDIR}
-}
diff --git a/recipes/lzma/lzma-native_4.65.bb b/recipes/lzma/lzma-native_4.65.bb
new file mode 100644
index 0000000000..e8427a7367
--- /dev/null
+++ b/recipes/lzma/lzma-native_4.65.bb
@@ -0,0 +1,4 @@
+inherit native
+
+require lzma.inc
+PR = "${INC_PR}.1"
diff --git a/recipes/lzma/lzma.inc b/recipes/lzma/lzma.inc
new file mode 100644
index 0000000000..fc40c9313b
--- /dev/null
+++ b/recipes/lzma/lzma.inc
@@ -0,0 +1,39 @@
+DESCRIPTION = "LZMA is a general compression method. LZMA provides high compression ratio and very fast decompression."
+HOMEPAGE = "http://www.7-zip.org/"
+LICENSE = "LGPL"
+DEPENDS = "zlib"
+INC_PR = "r1"
+
+SRC_URI = "http://downloads.sourceforge.net/sevenzip/lzma${@bb.data.getVar('PV',d,1).replace('.','')}.tar.bz2 \
+ file://001-large_files.patch;patch=1 \
+ file://002-lzmp.patch;patch=1 \
+ file://003-compile_fixes.patch;patch=1 \
+ file://100-static_library.patch;patch=1"
+
+S = "${WORKDIR}"
+
+EXTRA_OEMAKE = "-f makefile.gcc"
+
+CFLAGS += "-c -I${S}"
+
+do_unpack_append() {
+ # It has few files with wrong encoding
+ os.system("find ${S} -type f -print0 | xargs -0 dos2unix")
+}
+
+do_compile() {
+ oe_runmake -C C/LzmaUtil
+ oe_runmake -C CPP/7zip/Compress/LZMA_Alone
+}
+
+do_install() {
+ install -d ${D}${bindir} ${D}${libdir}
+ install -m 0755 CPP/7zip/Compress/LZMA_Alone/lzma ${D}${bindir}
+ oe_libinstall -a -C C/LzmaUtil liblzma ${D}${libdir}
+}
+
+do_stage () {
+ install --d ${STAGING_INCDIR}/lzma
+ install -m 0644 C/*.h ${STAGING_INCDIR}/lzma
+ oe_libinstall -a -C C/LzmaUtil liblzma ${STAGING_LIBDIR}
+}
diff --git a/recipes/lzma/lzma_4.17.bb b/recipes/lzma/lzma_4.17.bb
deleted file mode 100644
index f83ddd587e..0000000000
--- a/recipes/lzma/lzma_4.17.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-DESCRIPTION = "LZMA is a general compression method. LZMA provides high compression ratio and very fast decompression."
-HOMEPAGE = "http://www.7-zip.org/"
-LICENSE = "LGPL"
-DEPENDS = "zlib"
-PR = "r1"
-
-SRC_URI = "http://www.7-zip.org/dl/lzma417.tar.bz2 \
- file://lzma-406-zlib-stream.patch;patch=1;pnum=2"
-
-S = "${WORKDIR}/SRC"
-
-EXTRA_OEMAKE += "CXX_C='${CC}'"
-
-CFLAGS += "-c -I${S}"
-
-# If you run into "internal compiler error" failures with gcc, disable optimization
-# using -O0, or use -O1 or -O2 instead of -Os. (reported failure: gcc 3.4.4 for sh4)
-#FULL_OPTIMIZATION = "-O0"
-
-# One such reported failure is a cross-gcc 3.4.4 for sh4:
-FULL_OPTIMIZATION_sh4 = "-O1"
-
-do_compile() {
- oe_runmake -C 7zip/Compress/LZMA_Alone
- oe_runmake -C 7zip/Compress/LZMA_Lib
-}
-
-do_install() {
- install -d ${D}${bindir} ${D}${libdir}
- install -m 0755 7zip/Compress/LZMA_Alone/lzma ${D}${bindir}
- oe_libinstall -a -C 7zip/Compress/LZMA_Lib liblzma ${D}${libdir}
-}
-
-do_stage () {
- oe_libinstall -a -C 7zip/Compress/LZMA_Lib liblzma ${STAGING_LIBDIR}
-}
diff --git a/recipes/lzma/lzma_4.65.bb b/recipes/lzma/lzma_4.65.bb
new file mode 100644
index 0000000000..d5632c8f8b
--- /dev/null
+++ b/recipes/lzma/lzma_4.65.bb
@@ -0,0 +1,2 @@
+require lzma.inc
+PR = "${INC_PR}.1"
diff --git a/recipes/proxy-libintl/proxy-libintl-20080418/soname.patch b/recipes/proxy-libintl/proxy-libintl-20080418/soname.patch
new file mode 100644
index 0000000000..d2e8064372
--- /dev/null
+++ b/recipes/proxy-libintl/proxy-libintl-20080418/soname.patch
@@ -0,0 +1,13 @@
+Index: proxy-libintl-20080418-r1/src/proxy-libintl/Makefile
+===================================================================
+--- proxy-libintl-20080418-r1.orig/src/proxy-libintl/Makefile
++++ proxy-libintl-20080418-r1/src/proxy-libintl/Makefile
+@@ -7,7 +7,7 @@ CFLAGS = -Wall -I ../../include
+ all : ../../lib/libintl.so ../../lib/intl.lib
+
+ ../../lib/libintl.so : libintl.o
+- $(CC) -shared -o $@ libintl.o
++ $(CC) -shared -Wl,-soname -Wl,libintl.so -o $@ libintl.o
+
+ ../../lib/intl.lib : ../../lib/libintl.so
+ cp ../../lib/libintl.so $@
diff --git a/recipes/proxy-libintl/proxy-libintl_20080418.bb b/recipes/proxy-libintl/proxy-libintl_20080418.bb
index 74ecfaf67b..6b91f530f3 100644
--- a/recipes/proxy-libintl/proxy-libintl_20080418.bb
+++ b/recipes/proxy-libintl/proxy-libintl_20080418.bb
@@ -3,13 +3,14 @@ HOMEPAGE = "http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/"
SECTION = "libs"
LICENSE = "LGPL"
-PR = "r1"
+PR = "r2"
PROVIDES = "virtual/libintl"
SRC_URI = " \
http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/${PN}-${PV}.zip \
file://stub-only.patch;patch=1 \
file://create-as-shared-lib.patch;patch=1 \
+ file://soname.patch;patch=1 \
"
S = "${WORKDIR}"
diff --git a/recipes/squashfs-tools/squashfs-tools-4.0/lzma-support.patch b/recipes/squashfs-tools/squashfs-tools-4.0/lzma-support.patch
new file mode 100644
index 0000000000..1441fb42f0
--- /dev/null
+++ b/recipes/squashfs-tools/squashfs-tools-4.0/lzma-support.patch
@@ -0,0 +1,462 @@
+Index: squashfs4.0/squashfs-tools/mksquashfs.c
+===================================================================
+--- squashfs4.0.orig/squashfs-tools/mksquashfs.c 2009-04-05 23:22:48.000000000 +0200
++++ squashfs4.0/squashfs-tools/mksquashfs.c 2009-09-14 17:21:46.210480446 +0200
+@@ -64,6 +64,18 @@
+ #include "global.h"
+ #include "sort.h"
+ #include "pseudo.h"
++#include "uncompress.h"
++
++#ifdef USE_LZMA
++#include <LzmaEnc.h>
++#include <LzmaDec.h>
++#define LZMA_DEFAULT_LEVEL 5
++#define LZMA_DEFAULT_DICT 0
++#define LZMA_DEFAULT_LC 1
++#define LZMA_DEFAULT_LP 2
++#define LZMA_DEFAULT_PB 2
++#define LZMA_DEFAULT_FB 32
++#endif
+
+ #ifdef SQUASHFS_TRACE
+ #define TRACE(s, args...) do { \
+@@ -830,6 +842,19 @@
+ rotate = (rotate + 1) % 4;
+ }
+
++#ifdef USE_LZMA
++static void *lzma_malloc(void *p, size_t size)
++{
++ (void)p;
++ return malloc(size);
++}
++static void lzma_free(void *p, void *addr)
++{
++ (void)p;
++ free(addr);
++}
++static ISzAlloc lzma_alloc = { lzma_malloc, lzma_free };
++#endif
+
+ unsigned int mangle2(z_stream **strm, char *d, char *s, int size,
+ int block_size, int uncompressed, int data_block)
+@@ -841,6 +866,50 @@
+ if(uncompressed)
+ goto notcompressed;
+
++#ifdef USE_LZMA
++ if (compression == LZMA_COMPRESSION) {
++ size_t outsize = block_size - LZMA_PROPS_SIZE;
++ size_t propsize = LZMA_PROPS_SIZE;
++ CLzmaEncProps props;
++
++ LzmaEncProps_Init(&props);
++ props.level = LZMA_DEFAULT_LEVEL;
++ props.dictSize = LZMA_DEFAULT_DICT;
++ props.lc = LZMA_DEFAULT_LC;
++ props.lp = LZMA_DEFAULT_LP;
++ props.pb = LZMA_DEFAULT_PB;
++ props.fb = LZMA_DEFAULT_FB;
++ props.numThreads = 1;
++
++ res = LzmaEncode((unsigned char *) d + LZMA_PROPS_SIZE, &outsize,
++ (unsigned char *) s, size,
++ &props, (unsigned char *) d, &propsize,
++ 1, NULL, &lzma_alloc, &lzma_alloc);
++ switch(res) {
++ case SZ_OK:
++ outsize += LZMA_PROPS_SIZE;
++ break;
++ case SZ_ERROR_DATA:
++ BAD_ERROR("lzma::compress failed, data error\n");
++ break;
++ case SZ_ERROR_MEM:
++ BAD_ERROR("lzma::compress failed, memory allocation error\n");
++ break;
++ case SZ_ERROR_PARAM:
++ BAD_ERROR("lzma::compress failed, invalid parameters\n");
++ break;
++ case SZ_ERROR_OUTPUT_EOF:
++ goto notcompressed;
++ /* should not happen */
++ default:
++ BAD_ERROR("lzma::compress failed, unknown error (%d)\n", res);
++ break;
++ }
++
++ return outsize;
++ }
++#endif
++
+ if(stream == NULL) {
+ if((stream = *strm = malloc(sizeof(z_stream))) == NULL)
+ BAD_ERROR("mangle::compress failed, not enough "
+@@ -1669,17 +1738,17 @@
+ else
+ data = read_from_disk(start_block, size);
+
+- res = uncompress((unsigned char *) buffer->data, &bytes,
++ res = uncompress_wrapper((unsigned char *) buffer->data, &bytes,
+ (const unsigned char *) data, size);
+ if(res != Z_OK) {
+ if(res == Z_MEM_ERROR)
+- BAD_ERROR("zlib::uncompress failed, not enough "
++ BAD_ERROR("uncompress failed, not enough "
+ "memory\n");
+ else if(res == Z_BUF_ERROR)
+- BAD_ERROR("zlib::uncompress failed, not enough "
++ BAD_ERROR("uncompress failed, not enough "
+ "room in output buffer\n");
+ else
+- BAD_ERROR("zlib::uncompress failed,"
++ BAD_ERROR("uncompress failed,"
+ " unknown error %d\n", res);
+ }
+ } else if(compressed_buffer)
+@@ -4282,6 +4351,10 @@
+ argv[0]);
+ exit(1);
+ }
++#ifdef USE_LZMA
++ } else if(strcmp(argv[i], "-lzma") == 0) {
++ compression = LZMA_COMPRESSION;
++#endif
+ } else if(strcmp(argv[i], "-ef") == 0) {
+ if(++i == argc) {
+ ERROR("%s: -ef missing filename\n", argv[0]);
+@@ -4410,6 +4483,9 @@
+ ERROR("-b <block_size>\t\tset data block to "
+ "<block_size>. Default %d bytes\n",
+ SQUASHFS_FILE_SIZE);
++#ifdef USE_LZMA
++ ERROR("-lzma Enable LZMA compression\n");
++#endif
+ ERROR("-processors <number>\tUse <number> processors."
+ " By default will use number of\n");
+ ERROR("\t\t\tprocessors available\n");
+@@ -4804,7 +4880,7 @@
+ sBlk.bytes_used = bytes;
+
+ /* Only compression supported */
+- sBlk.compression = ZLIB_COMPRESSION;
++ sBlk.compression = compression;
+
+ /* Xattrs are not currently supported */
+ sBlk.xattr_table_start = SQUASHFS_INVALID_BLK;
+Index: squashfs4.0/squashfs-tools/squashfs_fs.h
+===================================================================
+--- squashfs4.0.orig/squashfs-tools/squashfs_fs.h 2009-03-18 03:50:20.000000000 +0100
++++ squashfs4.0/squashfs-tools/squashfs_fs.h 2009-09-14 17:20:36.310480350 +0200
+@@ -229,6 +229,7 @@
+ typedef long long squashfs_inode_t;
+
+ #define ZLIB_COMPRESSION 1
++#define LZMA_COMPRESSION 2
+
+ struct squashfs_super_block {
+ unsigned int s_magic;
+Index: squashfs4.0/squashfs-tools/Makefile
+===================================================================
+--- squashfs4.0.orig/squashfs-tools/Makefile 2009-04-05 04:03:36.000000000 +0200
++++ squashfs4.0/squashfs-tools/Makefile 2009-09-14 17:20:36.310480350 +0200
+@@ -4,14 +4,20 @@
+
+ CFLAGS := -I$(INCLUDEDIR) -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -O2
+
++ifdef USE_LZMA
++ LZMA_CFLAGS = -DUSE_LZMA
++ LZMA_LIB = -llzma
++ CFLAGS += $(LZMA_CFLAGS)
++endif
++
+ all: mksquashfs unsquashfs
+
+-mksquashfs: mksquashfs.o read_fs.o sort.o swap.o pseudo.o
+- $(CC) mksquashfs.o read_fs.o sort.o swap.o pseudo.o -lz -lpthread -lm -o $@
++mksquashfs: mksquashfs.o read_fs.o sort.o swap.o pseudo.o uncompress.o
++ $(CC) mksquashfs.o read_fs.o sort.o swap.o pseudo.o uncompress.o -lz -lpthread -lm $(LZMA_LIB) -o $@
+
+-mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h squashfs_swap.h Makefile
++mksquashfs.o: mksquashfs.c squashfs_fs.h mksquashfs.h global.h sort.h squashfs_swap.h uncompress.h Makefile
+
+-read_fs.o: read_fs.c squashfs_fs.h read_fs.h global.h squashfs_swap.h Makefile
++read_fs.o: read_fs.c squashfs_fs.h read_fs.h global.h squashfs_swap.h uncompress.h Makefile
+
+ sort.o: sort.c squashfs_fs.h global.h sort.h Makefile
+
+@@ -19,18 +25,20 @@
+
+ pseudo.o: pseudo.c pseudo.h Makefile
+
+-unsquashfs: unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o
+- $(CC) unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o -lz -lpthread -lm -o $@
++uncompress.o: uncompress.c uncompress.h
++
++unsquashfs: unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o uncompress.o
++ $(CC) unsquashfs.o unsquash-1.o unsquash-2.o unsquash-3.o unsquash-4.o swap.o uncompress.o -lz -lpthread -lm $(LZMA_LIB) -o $@
+
+-unsquashfs.o: unsquashfs.h unsquashfs.c squashfs_fs.h squashfs_swap.h squashfs_compat.h global.h Makefile
++unsquashfs.o: unsquashfs.h unsquashfs.c squashfs_fs.h squashfs_swap.h squashfs_compat.h global.h uncompress.h Makefile
+
+-unsquash-1.o: unsquashfs.h unsquash-1.c squashfs_fs.h squashfs_compat.h global.h Makefile
++unsquash-1.o: unsquashfs.h unsquash-1.c squashfs_fs.h squashfs_compat.h global.h uncompress.h Makefile
+
+-unsquash-2.o: unsquashfs.h unsquash-2.c unsquashfs.h squashfs_fs.h squashfs_compat.h global.h Makefile
++unsquash-2.o: unsquashfs.h unsquash-2.c unsquashfs.h squashfs_fs.h squashfs_compat.h global.h uncompress.h Makefile
+
+-unsquash-3.o: unsquashfs.h unsquash-3.c squashfs_fs.h squashfs_compat.h global.h Makefile
++unsquash-3.o: unsquashfs.h unsquash-3.c squashfs_fs.h squashfs_compat.h global.h uncompress.h Makefile
+
+-unsquash-4.o: unsquashfs.h unsquash-4.c squashfs_fs.h squashfs_swap.h global.h Makefile
++unsquash-4.o: unsquashfs.h unsquash-4.c squashfs_fs.h squashfs_swap.h global.h uncompress.h Makefile
+
+ clean:
+ -rm -f *.o mksquashfs unsquashfs
+Index: squashfs4.0/squashfs-tools/read_fs.c
+===================================================================
+--- squashfs4.0.orig/squashfs-tools/read_fs.c 2009-03-31 06:23:14.000000000 +0200
++++ squashfs4.0/squashfs-tools/read_fs.c 2009-09-14 17:20:36.310480350 +0200
+@@ -51,6 +51,7 @@
+ #include "squashfs_swap.h"
+ #include "read_fs.h"
+ #include "global.h"
++#include "uncompress.h"
+
+ #include <stdlib.h>
+
+@@ -83,17 +84,17 @@
+ c_byte = SQUASHFS_COMPRESSED_SIZE(c_byte);
+ read_destination(fd, start + offset, c_byte, buffer);
+
+- res = uncompress(block, &bytes, (const unsigned char *) buffer,
+- c_byte);
++ res = uncompress_wrapper(block, &bytes,
++ (const unsigned char *) buffer, c_byte);
+ if(res != Z_OK) {
+ if(res == Z_MEM_ERROR)
+- ERROR("zlib::uncompress failed, not enough "
++ ERROR("uncompress failed, not enough "
+ "memory\n");
+ else if(res == Z_BUF_ERROR)
+- ERROR("zlib::uncompress failed, not enough "
++ ERROR("uncompress failed, not enough "
+ "room in output buffer\n");
+ else
+- ERROR("zlib::uncompress failed, unknown error "
++ ERROR("uncompress failed, unknown error "
+ "%d\n", res);
+ return 0;
+ }
+Index: squashfs4.0/squashfs-tools/unsquashfs.c
+===================================================================
+--- squashfs4.0.orig/squashfs-tools/unsquashfs.c 2009-04-05 23:23:06.000000000 +0200
++++ squashfs4.0/squashfs-tools/unsquashfs.c 2009-09-14 17:20:36.310480350 +0200
+@@ -24,6 +24,7 @@
+ #include "unsquashfs.h"
+ #include "squashfs_swap.h"
+ #include "squashfs_compat.h"
++#include "uncompress.h"
+ #include "read_fs.h"
+
+ struct cache *fragment_cache, *data_cache;
+@@ -597,18 +598,17 @@
+ if(read_bytes(start + offset, c_byte, buffer) == FALSE)
+ goto failed;
+
+- res = uncompress((unsigned char *) block, &bytes,
++ res = uncompress_wrapper((unsigned char *) block, &bytes,
+ (const unsigned char *) buffer, c_byte);
+-
+ if(res != Z_OK) {
+ if(res == Z_MEM_ERROR)
+- ERROR("zlib::uncompress failed, not enough "
++ ERROR("uncompress failed, not enough "
+ "memory\n");
+ else if(res == Z_BUF_ERROR)
+- ERROR("zlib::uncompress failed, not enough "
++ ERROR("uncompress failed, not enough "
+ "room in output buffer\n");
+ else
+- ERROR("zlib::uncompress failed, unknown error "
++ ERROR("uncompress failed, unknown error "
+ "%d\n", res);
+ goto failed;
+ }
+@@ -645,18 +645,17 @@
+ if(read_bytes(start, c_byte, data) == FALSE)
+ goto failed;
+
+- res = uncompress((unsigned char *) block, &bytes,
++ res = uncompress_wrapper((unsigned char *) block, &bytes,
+ (const unsigned char *) data, c_byte);
+-
+ if(res != Z_OK) {
+ if(res == Z_MEM_ERROR)
+- ERROR("zlib::uncompress failed, not enough "
++ ERROR("uncompress failed, not enough "
+ "memory\n");
+ else if(res == Z_BUF_ERROR)
+- ERROR("zlib::uncompress failed, not enough "
++ ERROR("uncompress failed, not enough "
+ "room in output buffer\n");
+ else
+- ERROR("zlib::uncompress failed, unknown error "
++ ERROR("uncompress failed, unknown error "
+ "%d\n", res);
+ goto failed;
+ }
+@@ -1459,7 +1458,7 @@
+ s_ops.read_inode = read_inode_4;
+ s_ops.read_uids_guids = read_uids_guids_4;
+ memcpy(&sBlk, &sBlk_4, sizeof(sBlk_4));
+- return TRUE;
++ goto done;
+ }
+
+ /*
+@@ -1548,6 +1547,9 @@
+ goto failed_mount;
+ }
+
++done:
++ compression = sBlk.compression;
++
+ return TRUE;
+
+ failed_mount:
+@@ -1710,19 +1712,19 @@
+ int res;
+ unsigned long bytes = block_size;
+
+- res = uncompress((unsigned char *) tmp, &bytes,
++ res = uncompress_wrapper((unsigned char *) tmp, &bytes,
+ (const unsigned char *) entry->data,
+ SQUASHFS_COMPRESSED_SIZE_BLOCK(entry->size));
+
+ if(res != Z_OK) {
+ if(res == Z_MEM_ERROR)
+- ERROR("zlib::uncompress failed, not enough"
++ ERROR("uncompress failed, not enough"
+ "memory\n");
+ else if(res == Z_BUF_ERROR)
+- ERROR("zlib::uncompress failed, not enough "
++ ERROR("uncompress failed, not enough "
+ "room in output buffer\n");
+ else
+- ERROR("zlib::uncompress failed, unknown error "
++ ERROR("uncompress failed, unknown error "
+ "%d\n", res);
+ } else
+ memcpy(entry->data, tmp, bytes);
+Index: squashfs4.0/squashfs-tools/mksquashfs.h
+===================================================================
+--- squashfs4.0.orig/squashfs-tools/mksquashfs.h 2009-02-19 19:31:08.000000000 +0100
++++ squashfs4.0/squashfs-tools/mksquashfs.h 2009-09-14 17:20:36.310480350 +0200
+@@ -41,4 +41,9 @@
+ #define SQUASHFS_SWAP_LONG_LONGS(s, d, n) \
+ memcpy(d, s, n * sizeof(long long))
+ #endif
++
++extern int uncompress_wrapper(unsigned char *dest, unsigned long *dest_len,
++ const unsigned char *src, unsigned long src_len);
++
++
+ #endif
+Index: squashfs4.0/squashfs-tools/uncompress.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ squashfs4.0/squashfs-tools/uncompress.c 2009-09-14 17:20:36.310480350 +0200
+@@ -0,0 +1,58 @@
++/*
++ * Copyright (c) 2009 Felix Fietkau <nbd@openwrt.org>
++ *
++ * 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,
++ * 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * uncompress.c
++ */
++
++
++
++#ifdef USE_LZMA
++#include <LzmaLib.h>
++#endif
++#include <zlib.h>
++#include "squashfs_fs.h"
++
++/* compression algorithm */
++int compression = ZLIB_COMPRESSION;
++
++
++int uncompress_wrapper(unsigned char *dest, unsigned long *dest_len,
++ const unsigned char *src, unsigned long src_len)
++{
++ int res;
++
++#ifdef USE_LZMA
++ if (compression == LZMA_COMPRESSION) {
++ size_t slen = src_len - LZMA_PROPS_SIZE;
++ res = LzmaUncompress((unsigned char *)dest, dest_len,
++ (const unsigned char *) src + LZMA_PROPS_SIZE, &slen,
++ (const unsigned char *) src, LZMA_PROPS_SIZE);
++ switch(res) {
++ case SZ_OK:
++ res = Z_OK;
++ break;
++ case SZ_ERROR_MEM:
++ res = Z_MEM_ERROR;
++ break;
++ }
++ } else
++#endif
++ res = uncompress(dest, dest_len, src, src_len);
++ return res;
++}
++
++
+Index: squashfs4.0/squashfs-tools/uncompress.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ squashfs4.0/squashfs-tools/uncompress.h 2009-09-14 17:20:36.310480350 +0200
+@@ -0,0 +1,29 @@
++/*
++ * Copyright (c) 2009 Felix Fietkau <nbd@openwrt.org>
++ *
++ * 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,
++ * 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * uncompress.h
++ */
++
++#ifdef USE_LZMA
++#include <LzmaLib.h>
++#endif
++
++extern int compression;
++extern int uncompress_wrapper(unsigned char *dest, unsigned long *dest_len,
++ const unsigned char *src, unsigned long src_len);
++
++
diff --git a/recipes/squashfs-tools/squashfs-tools-4.0/portability.patch b/recipes/squashfs-tools/squashfs-tools-4.0/portability.patch
new file mode 100644
index 0000000000..4318c0ca60
--- /dev/null
+++ b/recipes/squashfs-tools/squashfs-tools-4.0/portability.patch
@@ -0,0 +1,24 @@
+--- a/squashfs-tools/global.h
++++ b/squashfs-tools/global.h
+@@ -44,4 +44,8 @@ typedef long long squashfs_fragment_inde
+ typedef squashfs_inode_t squashfs_inode;
+ typedef squashfs_block_t squashfs_block;
+
++#ifndef FNM_EXTMATCH
++#define FNM_EXTMATCH 0
++#endif
++
+ #endif
+--- a/squashfs-tools/unsquashfs.h
++++ b/squashfs-tools/unsquashfs.h
+@@ -49,8 +49,10 @@
+ #define __BYTE_ORDER BYTE_ORDER
+ #define __BIG_ENDIAN BIG_ENDIAN
+ #define __LITTLE_ENDIAN LITTLE_ENDIAN
++#include <sys/sysctl.h>
+ #else
+ #include <endian.h>
++#include <sys/sysinfo.h>
+ #endif
+
+ #include "squashfs_fs.h"
diff --git a/recipes/squashfs-tools/squashfs-tools-native_4.0.bb b/recipes/squashfs-tools/squashfs-tools-native_4.0.bb
index 1a82323951..f21bf99645 100644
--- a/recipes/squashfs-tools/squashfs-tools-native_4.0.bb
+++ b/recipes/squashfs-tools/squashfs-tools-native_4.0.bb
@@ -1,8 +1,8 @@
+inherit native
+
require squashfs-tools_${PV}.bb
PR = "${INC_PR}.1"
-inherit native
-
PACKAGES = ""
do_stage () {
diff --git a/recipes/squashfs-tools/squashfs-tools_4.0.bb b/recipes/squashfs-tools/squashfs-tools_4.0.bb
index 0de5794b95..a4503fcf0f 100644
--- a/recipes/squashfs-tools/squashfs-tools_4.0.bb
+++ b/recipes/squashfs-tools/squashfs-tools_4.0.bb
@@ -1,5 +1,12 @@
require squashfs-tools.inc
+DEPENDS += "lzma"
PR = "${INC_PR}.1"
+EXTRA_OEMAKE = "USE_LZMA=1 \
+ LZMA_CFLAGS='-I${STAGING_INCDIR}/lzma -DUSE_LZMA' \
+ LZMA_LIB='${STAGING_LIBDIR}/liblzma.a'"
+
DEFAULT_PREFERENCE = "-1"
-SRC_URI += " file://Makefile.patch;patch=1"
+SRC_URI += " file://portability.patch;patch=1;pnum=2 \
+ file://lzma-support.patch;patch=1;pnum=2"
+
diff --git a/recipes/tasks/task-beagleboard-demo.bb b/recipes/tasks/task-beagleboard-demo.bb
index 22f06652b4..ca26baaaff 100644
--- a/recipes/tasks/task-beagleboard-demo.bb
+++ b/recipes/tasks/task-beagleboard-demo.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "Task for Beagleboard-demo-image"
-PR = "r14"
+PR = "r15"
inherit task
@@ -21,7 +21,7 @@ RDEPENDS_${PN} = "\
gecko-mediaplayer-firefox-hack \
hicolor-icon-theme gnome-icon-theme \
jaaa nmap iperf gnuplot \
- abiword \
+ abiword-meta \
gnumeric \
gimp \
powertop oprofile \
@@ -35,7 +35,7 @@ RDEPENDS_${PN} = "\
angstrom-gnome-icon-theme-enable \
openssh-scp openssh-ssh \
picodlp-control \
- connman-gnome \
+ network-manager-applet \
gnome-bluetooth \
"
diff --git a/recipes/u-boot/u-boot_git.bb b/recipes/u-boot/u-boot_git.bb
index 3d067c9ce6..15c3060a39 100644
--- a/recipes/u-boot/u-boot_git.bb
+++ b/recipes/u-boot/u-boot_git.bb
@@ -47,8 +47,8 @@ SRCREV_omap3evm = "2dea1db2a3b7c12ed70bbf8ee50755089c5e5170"
PV_omap3evm = "2009.03+${PR}+gitr${SRCREV}"
-SRCREV_omap3517-evm = "e60beb13cf0"
-SRC_URI_append_omap3517-evm = " \
+SRCREV_am3517-evm = "e60beb13cf0"
+SRC_URI_append_am3517-evm = " \
file://omap3evm/0001-Changes-for-making-a-NAND-build.patch;patch=1 \
file://omap3evm/0002-Fix-for-NFS-boot-for-OMAP3-EVM.patch;patch=1 \
file://omap3evm/0003-OMAP3-timer-handling-to-1ms-tick-and-CONFIG_SYS_HZ-t.patch;patch=1 \
@@ -66,7 +66,7 @@ file://omap3evm/0014-EMAC-driver-cleanup-removed-debug-prints.patch;patch=1 \
file://omap3evm/0015-EMAC-driver-Check-for-link-status-in-packet-send-lo.patch;patch=1 \
file://omap3evm/0016-Config-option-and-name-changed-to-omap3517_evm.patch;patch=1 \
"
-PV_omap3517-evm = "2009.03+${PR}+gitr${SRCREV}"
+PV_am3517-evm = "2009.03+${PR}+gitr${SRCREV}"
SRC_URI_omapzoom = "git://www.sakoman.net/git/u-boot-omap3.git;branch=omap3-dev;protocol=git"
SRCREV_omapzoom = "d691b424f1f5bf7eea3a4131dfc578d272e8f335"
diff --git a/recipes/x-load/x-load_1.41.bb b/recipes/x-load/x-load_1.41.bb
index 0a38f5ba0f..6995e66e5a 100644
--- a/recipes/x-load/x-load_1.41.bb
+++ b/recipes/x-load/x-load_1.41.bb
@@ -1,6 +1,6 @@
require x-load.inc
-COMPATIBLE_MACHINE = "omap3517-evm"
+COMPATIBLE_MACHINE = "am3517-evm"
SRC_URI = "file://x-loader-03.00.00.01.tar.gz \
file://0013-board.c-print-boot-method-mmc-onenand-nand.patch;patch=1 \
diff --git a/recipes/x-load/x-load_git.bb b/recipes/x-load/x-load_git.bb
index 3368fce52f..0e0e603cb8 100644
--- a/recipes/x-load/x-load_git.bb
+++ b/recipes/x-load/x-load_git.bb
@@ -1,6 +1,6 @@
require x-load.inc
-DEFAULT_PREFERENCE_omap3517-evm = "-1"
+DEFAULT_PREFERENCE_am3517-evm = "-1"
DEFAULT_PREFERENCE_omap3-pandora = "-1"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/x-load-git/${MACHINE}"
@@ -23,7 +23,7 @@ SRC_URI_append_omap3-touchbook = " \
"
-SRC_URI_append_omap3517-evm = " \
+SRC_URI_append_am3517-evm = " \
file://xload-shiva.diff;patch=1 \
"
diff --git a/recipes/xorg-driver/xf86-input-tslib_0.0.6.bb b/recipes/xorg-driver/xf86-input-tslib_0.0.6.bb
new file mode 100644
index 0000000000..785e5f4e5e
--- /dev/null
+++ b/recipes/xorg-driver/xf86-input-tslib_0.0.6.bb
@@ -0,0 +1,20 @@
+require xorg-driver-input.inc
+
+DESCRIPTION = "X.Org X server -- tslib input driver"
+RRECOMMENDS += "hal tslib-calibrate"
+DEPENDS += "tslib"
+
+SRC_URI = "http://www.pengutronix.de/software/xf86-input-tslib/download/xf86-input-tslib-${PV}.tar.bz2 \
+ file://10-x11-input-tslib.fdi"
+
+do_configure_prepend() {
+ rm -rf ${S}/m4/ || true
+}
+
+do_install_append() {
+ install -d ${D}/${datadir}/hal/fdi/policy/20thirdparty
+ install -m 0644 ${WORKDIR}/10-x11-input-tslib.fdi ${D}/${datadir}/hal/fdi/policy/20thirdparty
+}
+
+FILES_${PN} += "${datadir}/hal"
+
diff --git a/recipes/xorg-xserver/xserver-xorg-conf/omap3517-evm/xorg.conf b/recipes/xorg-xserver/xserver-xorg-conf/am3517-evm/xorg.conf
index 983bb0823a..983bb0823a 100644
--- a/recipes/xorg-xserver/xserver-xorg-conf/omap3517-evm/xorg.conf
+++ b/recipes/xorg-xserver/xserver-xorg-conf/am3517-evm/xorg.conf
diff --git a/site/avr32-common b/site/avr32-common
index fedd104417..a5dc10602e 100644
--- a/site/avr32-common
+++ b/site/avr32-common
@@ -44,3 +44,18 @@ dpkg_cv___va_copy=${ac_cv___va_copy=yes}
#libidl
libIDL_cv_long_long_format=${libIDL_cv_long_long_format=ll}
+
+# ORbit2
+ac_cv_alignof_CORBA_octet=1
+ac_cv_alignof_CORBA_boolean=1
+ac_cv_alignof_CORBA_char=1
+ac_cv_alignof_CORBA_wchar=2
+ac_cv_alignof_CORBA_short=2
+ac_cv_alignof_CORBA_long=4
+ac_cv_alignof_CORBA_long_long=4
+ac_cv_alignof_CORBA_float=4
+ac_cv_alignof_CORBA_double=4
+ac_cv_alignof_CORBA_long_double=4
+ac_cv_alignof_CORBA_struct=1
+ac_cv_alignof_CORBA_pointer=4
+