summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/autofs/autofs-4.1.4/no-bash.patch18
-rw-r--r--packages/autofs/autofs_4.1.4.bb10
-rw-r--r--packages/cryptsetup/.mtn2git_empty (renamed from packages/zaurus-updater/spitz/.mtn2git_empty)0
-rw-r--r--packages/cryptsetup/cryptsetup_1.0.5.bb21
-rw-r--r--packages/gcc/gcc-4.1.2/pr34130.patch16
-rw-r--r--packages/gcc/gcc-cross_4.1.2.bb4
-rw-r--r--packages/gcc/gcc_4.1.2.bb5
-rw-r--r--packages/gettext/gettext-0.14.1/disable_java.patch33
-rw-r--r--packages/gettext/gettext_0.14.1.bb5
-rw-r--r--packages/hostap/hostap-daemon-0.6.0/.mtn2git_empty0
-rw-r--r--packages/hostap/hostap-daemon-0.6.0/init37
-rw-r--r--packages/hostap/hostap-daemon-0.6.0/makefile-cross.diff25
-rw-r--r--packages/hostap/hostap-daemon_0.6.0.bb40
-rw-r--r--packages/initscripts/initscripts-1.0/slugos/bootclean.sh47
-rw-r--r--packages/initscripts/initscripts-1.0/slugos/volatiles36
-rw-r--r--packages/initscripts/initscripts-slugos_1.0.bb6
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.21/defconfig35
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.23/.mtn2git_empty0
-rw-r--r--packages/linux/ixp4xx-kernel/2.6.23/defconfig1940
-rw-r--r--packages/linux/ixp4xx-kernel_2.6.21.6.bb2
-rw-r--r--packages/linux/ixp4xx-kernel_2.6.23.8.bb24
-rw-r--r--packages/linux/linux-openmoko/defconfig-2.6.22.54
-rw-r--r--packages/linux/linux-openmoko/glamo-report-vram-size-to-userspace.patch67
-rw-r--r--packages/linux/linux-openmoko_2.6.22.5.bb3
-rw-r--r--packages/linux/linux-rp_2.6.23.bb2
-rw-r--r--packages/meta/slugos-packages.bb5
-rw-r--r--packages/mpfr/mpfr-native_2.3.0.bb4
-rw-r--r--packages/mpfr/mpfr_2.3.0.bb19
-rw-r--r--packages/openmoko2/openmoko-session2.bb2
-rwxr-xr-xpackages/openmoko2/openmoko-session2/etc/matchbox/session2
-rw-r--r--packages/portmap/portmap-6.0/no-pie.patch14
-rw-r--r--packages/portmap/portmap_6.0.bb5
-rw-r--r--packages/slugos-init/files/turnup3
-rw-r--r--packages/slugos-init/slugos-init_0.10.bb2
-rw-r--r--packages/tasks/task-openmoko.bb4
-rwxr-xr-xpackages/wireless-tools/wireless-tools/wireless-tools.if-pre-up8
-rw-r--r--packages/wireless-tools/wireless-tools_28+29pre21.bb2
-rw-r--r--packages/wlan-ng/wlan-ng-modules-0.2.7/2.6.22-fixes.patch2
-rw-r--r--packages/wlan-ng/wlan-ng-modules_0.2.7.bb2
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.3.0.0/build-glamo.patch91
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.3.0.0/smedia-glamo.patch3702
-rw-r--r--packages/xorg-xserver/xserver-kdrive-common.inc4
-rw-r--r--packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb4
-rw-r--r--packages/zaurus-updater/akita/updater.sh84
-rwxr-xr-xpackages/zaurus-updater/spitz/updater.sh280
-rw-r--r--packages/zaurus-updater/zaurus-updater.bb2
-rw-r--r--packages/zaurus-updater/zaurus-updater/updater.sh102
47 files changed, 6317 insertions, 406 deletions
diff --git a/packages/autofs/autofs-4.1.4/no-bash.patch b/packages/autofs/autofs-4.1.4/no-bash.patch
new file mode 100644
index 0000000000..16e83a0371
--- /dev/null
+++ b/packages/autofs/autofs-4.1.4/no-bash.patch
@@ -0,0 +1,18 @@
+diff -Naur autofs-4.1.4/samples.orig/auto.net autofs-4.1.4/samples/auto.net
+--- autofs-4.1.4/samples.orig/auto.net 2007-11-21 11:29:57.000000000 -0600
++++ autofs-4.1.4/samples/auto.net 2007-11-21 11:30:27.000000000 -0600
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # $Id: auto.net,v 1.8 2005/04/05 13:02:09 raven Exp $
+
+diff -Naur autofs-4.1.4/samples.orig/auto.smb autofs-4.1.4/samples/auto.smb
+--- autofs-4.1.4/samples.orig/auto.smb 2007-11-21 11:29:57.000000000 -0600
++++ autofs-4.1.4/samples/auto.smb 2007-11-21 11:30:34.000000000 -0600
+@@ -1,4 +1,4 @@
+-#!/bin/bash
++#!/bin/sh
+
+ # $Id: auto.smb,v 1.3 2005/04/05 13:02:09 raven Exp $
+
diff --git a/packages/autofs/autofs_4.1.4.bb b/packages/autofs/autofs_4.1.4.bb
index ab2bacedb7..d9863ad9dd 100644
--- a/packages/autofs/autofs_4.1.4.bb
+++ b/packages/autofs/autofs_4.1.4.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Kernel based automounter for linux."
SECTION = "base"
LICENSE = "GPL"
-PR = "r1"
+PR = "r2"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/daemons/autofs/v4/autofs-${PV}.tar.bz2 \
${KERNELORG_MIRROR}/pub/linux/daemons/autofs/v4/autofs-4.1.4-misc-fixes.patch;patch=1 \
@@ -12,9 +12,13 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/daemons/autofs/v4/autofs-${PV}.tar.bz2
file://Makefile.rules-cross.patch;patch=1 \
file://install.patch;patch=1 \
file://auto.net-sort-option-fix.patch;patch=1 \
- file://autofs-additional-distros.patch;patch=1"
+ file://autofs-additional-distros.patch;patch=1 \
+ file://no-bash.patch;patch=1"
-inherit autotools
+inherit autotools update-rc.d
+
+INITSCRIPT_NAME = "autofs"
+INITSCRIPT_PARAMS = "defaults"
EXTRA_OEMAKE="TARGET_PREFIX=${TARGET_PREFIX}"
PARALLEL_MAKE = ""
diff --git a/packages/zaurus-updater/spitz/.mtn2git_empty b/packages/cryptsetup/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/zaurus-updater/spitz/.mtn2git_empty
+++ b/packages/cryptsetup/.mtn2git_empty
diff --git a/packages/cryptsetup/cryptsetup_1.0.5.bb b/packages/cryptsetup/cryptsetup_1.0.5.bb
new file mode 100644
index 0000000000..7c070dc651
--- /dev/null
+++ b/packages/cryptsetup/cryptsetup_1.0.5.bb
@@ -0,0 +1,21 @@
+# Copyright Matthias Hentges <devel@hentges.net> (c) 2007
+# License: MIT (see http://www.opensource.org/licenses/mit-license.php
+# for a copy of the license)
+
+DESCRIPTION = "cryptsetup with luks support creates and manages encrypted containers and partitions"
+HOMEPAGE = "http://luks.endorphin.org/"
+SECTION = "console"
+LICENSE = "GPL"
+DEPENDS = "e2fsprogs-libs device-mapper libgcrypt popt"
+RRECOMMENDS = "kernel-module-aes \
+ kernel-module-dm-crypt \
+ kernel-module-md5 \
+ kernel-module-cbc \
+ kernel-module-sha256 \
+ "
+PR = "r2"
+
+SRC_URI = "http://luks.endorphin.org/source/cryptsetup-${PV}.tar.bz2"
+
+inherit autotools
+
diff --git a/packages/gcc/gcc-4.1.2/pr34130.patch b/packages/gcc/gcc-4.1.2/pr34130.patch
new file mode 100644
index 0000000000..415335f4b4
--- /dev/null
+++ b/packages/gcc/gcc-4.1.2/pr34130.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.1.2/gcc/fold-const.c
+===================================================================
+--- gcc-4.1.2.orig/gcc/fold-const.c 2007-11-21 18:53:42.000000000 +0100
++++ gcc-4.1.2/gcc/fold-const.c 2007-11-21 18:56:26.000000000 +0100
+@@ -5339,7 +5339,10 @@
+ }
+ break;
+ }
+- /* FALLTHROUGH */
++ /* If the constant is negative, we cannot simplify this. */
++ if (tree_int_cst_sgn (c) == -1)
++ break;
++ /* FALLTHROUGH */
+ case NEGATE_EXPR:
+ if ((t1 = extract_muldiv (op0, c, code, wide_type)) != 0)
+ return fold_build1 (tcode, ctype, fold_convert (ctype, t1));
diff --git a/packages/gcc/gcc-cross_4.1.2.bb b/packages/gcc/gcc-cross_4.1.2.bb
index 8204e2c316..337562b207 100644
--- a/packages/gcc/gcc-cross_4.1.2.bb
+++ b/packages/gcc/gcc-cross_4.1.2.bb
@@ -3,9 +3,9 @@ require gcc_${PV}.bb
require gcc-paths-cross.inc
inherit cross
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/gcc-${PV}"
-# NOTE: split PR. If the main .oe changes something that affects its *build*
+# NOTE: split PR. If the main .bb changes something that affects its *build*
# remember to increment this one too.
-PR = "r10"
+PR = "r11"
DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
diff --git a/packages/gcc/gcc_4.1.2.bb b/packages/gcc/gcc_4.1.2.bb
index 0f8cfa46b4..a6c99140b5 100644
--- a/packages/gcc/gcc_4.1.2.bb
+++ b/packages/gcc/gcc_4.1.2.bb
@@ -1,8 +1,10 @@
-PR = "r7"
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
LICENSE = "GPL"
+# NOTE: split PR. If the main .bb changes something that affects its *build*
+# remember to increment the -cross .bb PR too.
+PR = "r8"
inherit autotools gettext
@@ -32,6 +34,7 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-4.1.2/gcc-4.1.2.tar.bz2 \
file://cache-amnesia.patch;patch=1 \
file://gfortran.patch;patch=1 \
file://gcc-4.0.2-e300c2c3.patch;patch=1 \
+ file://pr34130.patch;patch=1 \
"
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
diff --git a/packages/gettext/gettext-0.14.1/disable_java.patch b/packages/gettext/gettext-0.14.1/disable_java.patch
new file mode 100644
index 0000000000..0c641eb91b
--- /dev/null
+++ b/packages/gettext/gettext-0.14.1/disable_java.patch
@@ -0,0 +1,33 @@
+Index: gettext-0.14.1/gettext-tools/configure.ac
+===================================================================
+--- gettext-0.14.1.orig/gettext-tools/configure.ac 2004-01-16 10:49:06.000000000 +0000
++++ gettext-0.14.1/gettext-tools/configure.ac 2007-11-14 21:43:39.000000000 +0000
+@@ -37,28 +37,16 @@
+ AC_PROG_YACC
+
+ gt_GCJ
+-if test -n "$HAVE_GCJ"; then
+- BUILDJAVAEXE=yes
+-else
+ BUILDJAVAEXE=no
+-fi
+ AC_SUBST(BUILDJAVAEXE)
+
+ gt_JAVACOMP
+ AC_CHECK_PROG(JAR, jar, jar)
+-if test -n "$HAVE_JAVACOMP" && test -n "$JAR"; then
+- BUILDJAVA=yes
+-else
+ BUILDJAVA=no
+-fi
+ AC_SUBST(BUILDJAVA)
+
+ gt_JAVAEXEC
+-if test -n "$HAVE_JAVAEXEC" && test $BUILDJAVA = yes; then
+- TESTJAVA=yes
+-else
+ TESTJAVA=no
+-fi
+ AC_SUBST(TESTJAVA)
+
+ gt_CSHARPCOMP
diff --git a/packages/gettext/gettext_0.14.1.bb b/packages/gettext/gettext_0.14.1.bb
index 4e25c0e829..960db30b56 100644
--- a/packages/gettext/gettext_0.14.1.bb
+++ b/packages/gettext/gettext_0.14.1.bb
@@ -2,13 +2,14 @@ DESCRIPTION = "The GNU internationalization library."
HOMEPAGE = "http://www.gnu.org/software/gettext/gettext.html"
SECTION = "libs"
LICENSE = "GPL"
-PR = "r5"
+PR = "r6"
PROVIDES = "virtual/libintl"
SRC_URI = "${GNU_MIRROR}/gettext/gettext-${PV}.tar.gz \
file://gettext-vpath.patch;patch=1;pnum=1 \
file://fixchicken.patch;patch=1;pnum=1 \
- file://getline.m4.patch;patch=1"
+ file://getline.m4.patch;patch=1 \
+ file://disable_java.patch;patch=1"
SRC_URI_append_linux-uclibc = " file://gettext-error_print_progname.patch;patch=1"
SRC_URI_append_linux-uclibcgnueabi = " file://gettext-error_print_progname.patch;patch=1"
diff --git a/packages/hostap/hostap-daemon-0.6.0/.mtn2git_empty b/packages/hostap/hostap-daemon-0.6.0/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/hostap/hostap-daemon-0.6.0/.mtn2git_empty
diff --git a/packages/hostap/hostap-daemon-0.6.0/init b/packages/hostap/hostap-daemon-0.6.0/init
new file mode 100644
index 0000000000..79f74b681e
--- /dev/null
+++ b/packages/hostap/hostap-daemon-0.6.0/init
@@ -0,0 +1,37 @@
+#!/bin/sh
+DAEMON=/usr/sbin/hostapd
+NAME=hostapd
+DESC="HOSTAP Daemon"
+ARGS="/etc/hostapd.conf -B"
+
+test -f $DAEMON || exit 0
+
+set -e
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon -S -x $DAEMON -- $ARGS
+ echo "$NAME."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon -K -x $DAEMON
+ echo "$NAME."
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ reload)
+ echo -n "Reloading $DESC: "
+ killall -HUP $(basename ${DAEMON})
+ echo "$NAME."
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/packages/hostap/hostap-daemon-0.6.0/makefile-cross.diff b/packages/hostap/hostap-daemon-0.6.0/makefile-cross.diff
new file mode 100644
index 0000000000..9534199e78
--- /dev/null
+++ b/packages/hostap/hostap-daemon-0.6.0/makefile-cross.diff
@@ -0,0 +1,25 @@
+diff -urN hostapd.orig/Makefile hostapd/Makefile
+--- hostapd.orig/Makefile 2007-05-28 19:26:55.000000000 +0200
++++ hostapd/Makefile 2007-11-22 16:28:44.000000000 +0100
+@@ -6,6 +6,8 @@
+ CFLAGS = -MMD -O2 -Wall -g
+ endif
+
++TARGET_PREFIX ?= /usr/local/bin/
++
+ # define HOSTAPD_DUMP_STATE to include SIGUSR1 handler for dumping state to
+ # a file (undefine it, if you want to save in binary size)
+ CFLAGS += -DHOSTAPD_DUMP_STATE
+@@ -361,10 +363,10 @@
+ fi
+
+ install: all
+- for i in $(ALL); do cp $$i /usr/local/bin/$$i; done
++ for i in $(ALL); do cp $$i $(TARGET_PREFIX)/$$i; done
+
+ hostapd: $(OBJS)
+- $(CC) -o hostapd $(OBJS) $(LIBS)
++ $(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
+
+ OBJS_c = hostapd_cli.o ../src/common/wpa_ctrl.o ../src/utils/os_$(CONFIG_OS).o
+ hostapd_cli: $(OBJS_c)
diff --git a/packages/hostap/hostap-daemon_0.6.0.bb b/packages/hostap/hostap-daemon_0.6.0.bb
new file mode 100644
index 0000000000..37b710db19
--- /dev/null
+++ b/packages/hostap/hostap-daemon_0.6.0.bb
@@ -0,0 +1,40 @@
+DESCRIPTION = "User space daemon for extended IEEE 802.11 management"
+HOMEPAGE = "http://hostap.epitest.fi"
+SECTION = "kernel/userland"
+PRIORITY = "optional"
+LICENSE = "GPL"
+DEPENDS = "openssl ${@base_contains("COMBINED_FEATURES", "pci", "madwifi-ng", "",d)}"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "http://hostap.epitest.fi/releases/hostapd-${PV}.tar.gz \
+ file://makefile-cross.diff;patch=1 \
+ file://defconfig \
+ file://init"
+
+S = "${WORKDIR}/hostapd-${PV}/hostapd"
+
+export HAS_PCI = "${@base_contains('COMBINED_FEATURES', 'pci', 1, 0,d)}"
+
+inherit update-rc.d
+INITSCRIPT_NAME=hostapd
+
+do_configure() {
+ install -m 0644 ${WORKDIR}/defconfig ${S}/.config
+ if [ "x$HAS_PCI" == "x1" ] ; then
+ echo "CONFIG_DRIVER_MADWIFI=y" >> .config
+ echo "CFLAGS += -I${STAGING_INCDIR}/madwifi-ng" >> .config
+ fi
+}
+
+do_compile() {
+ CFLAGS='${CFLAGS}' CC='${CC}' make
+}
+
+do_install() {
+ install -d ${D}${sbindir} ${D}${sysconfdir}/init.d
+ make TARGET_PREFIX=${D}${sbindir} install
+ install -m 0644 hostapd.conf ${D}${sysconfdir}
+ install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/hostapd
+}
+
diff --git a/packages/initscripts/initscripts-1.0/slugos/bootclean.sh b/packages/initscripts/initscripts-1.0/slugos/bootclean.sh
new file mode 100644
index 0000000000..1304cb3794
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/slugos/bootclean.sh
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# bootclean.sh - Cleans out /tmp, /var/run, and /var/lock
+# This script should run after mountall.sh in runlevel S.
+#
+# This script relies upon find and xargs, and is largely
+# based on the equivalent script in the Debian releases.
+
+. /etc/default/rcS
+
+# Completely clean out everything in /tmp, but do not walk into
+# anything that might be mounted beneath /tmp. If /tmp is not
+# a directory, ignore this (it's probably a symlink to
+# /var/volatiles/tmp, and we best leave it alone).
+
+if [ -d /tmp -a ! -L /tmp ] ; then
+ echo "bootclean.sh: Cleaning /tmp..."
+ cd /tmp || { echo "bootclean.sh: unable to cd to /tmp." ; return 1 ; }
+ find . -depth -xdev ! -type d -print0 | xargs -0r rm -f --
+ find . -depth -xdev -type d ! -name . -empty -exec rmdir \{\} \;
+else
+ echo "bootclean.sh: Skipping /tmp (not a directory)..."
+fi
+
+# Now clean out /var/lock.
+
+if [ -d /var/lock -a ! -L /var/lock ] ; then
+ echo "bootclean.sh: Cleaning /var/lock..."
+ cd /var/lock || { echo "bootclean.sh: unable to cd to /var/lock." ; return 1 ; }
+ find . -xdev ! -type d -print0 | xargs -0r rm -f --
+else
+ echo "bootclean.sh: Skipping /var/lock (not a directory)..."
+fi
+
+# Now clean out /var/run.
+
+if [ -d /var/run -a ! -L /var/run ] ; then
+ echo "bootclean.sh: Cleaning /var/run..."
+ cd /var/run || { echo "bootclean.sh: unable to cd to /var/run." ; return 1 ; }
+ find . -xdev ! -type d ! -name utmp -print0 | xargs -0r rm -f --
+else
+ echo "bootclean.sh: Skipping /var/run (not a directory)..."
+fi
+
+# done.
+
+exit 0
diff --git a/packages/initscripts/initscripts-1.0/slugos/volatiles b/packages/initscripts/initscripts-1.0/slugos/volatiles
new file mode 100644
index 0000000000..3c680b2643
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/slugos/volatiles
@@ -0,0 +1,36 @@
+# This configuration file lists filesystem objects that should get verified
+# during startup and be created if missing.
+#
+# Every line must either be a comment starting with #
+# or a definition of format:
+# <type> <owner> <group> <mode> <path> <linksource>
+# where the items are separated by whitespace !
+#
+# <type> : d|f|l : (d)irectory|(f)ile|(l)ink
+#
+# A linking example:
+# l root root 0777 /var/test /tmp/testfile
+# f root root 0644 /var/test none
+#
+# Understanding links:
+# When populate-volatile is to verify/create a directory or file, it will first
+# check it's existence. If a link is found to exist in the place of the target,
+# the path of the target is replaced with the target the link points to.
+# Thus, if a link is in the place to be verified, the object will be created
+# in the place the link points to instead.
+# This explains the order of "link before object" as in the example above, where
+# a link will be created at /var/test pointing to /tmp/testfile and due to this
+# link the file defined as /var/test will actually be created as /tmp/testfile.
+d root root 0755 /var/volatile/cache none
+d root root 1777 /var/volatile/lock none
+d root root 0755 /var/volatile/log none
+d root root 0755 /var/volatile/run none
+d root root 1777 /var/volatile/tmp none
+l root root 0755 /var/cache /var/volatile/cache
+l root root 1777 /var/lock /var/volatile/lock
+l root root 0755 /var/log /var/volatile/log
+l root root 0755 /var/run /var/volatile/run
+l root root 1777 /var/tmp /var/volatile/tmp
+d root root 0755 /var/lock/subsys none
+f root root 0664 /var/log/wtmp none
+f root root 0664 /var/run/utmp none
diff --git a/packages/initscripts/initscripts-slugos_1.0.bb b/packages/initscripts/initscripts-slugos_1.0.bb
index ed5f37f348..76d88f4627 100644
--- a/packages/initscripts/initscripts-slugos_1.0.bb
+++ b/packages/initscripts/initscripts-slugos_1.0.bb
@@ -10,7 +10,7 @@ RCONFLICTS = "initscripts"
# All other standard definitions inherited from initscripts
# Except the PR which is hacked here. The format used is
# a suffix
-PR := "${PR}.11"
+PR := "${PR}.12"
FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/${P}', '${FILE_DIRNAME}/initscripts-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
@@ -19,6 +19,7 @@ PACKAGES = "${PN}"
SRC_URI += "file://alignment.sh"
SRC_URI += "file://domainname.sh"
SRC_URI += "file://devices.patch;patch=1"
+SRC_URI += "file://bootclean.sh"
# Without this it is not possible to patch checkroot.sh
S = "${WORKDIR}"
@@ -30,6 +31,7 @@ do_install_append() {
# slugos specific scripts
install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/domainname.sh ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/bootclean.sh ${D}${sysconfdir}/init.d
# Remove the do install links (this detects a change to the
# initscripts .bb file - it will cause a build failure here.)
@@ -103,6 +105,8 @@ do_install_append() {
# checkfs.sh is currently disabled from S 30 (and won't work on SlugOS)
# ramdisk is not used on SlugOS, would run at S 30
update-rc.d -r ${D} mountall.sh start 35 S .
+ # bootclean must run after mountall but before populate-volatile
+ update-rc.d -r ${D} bootclean.sh start 36 S .
# base-files populate-volatile.sh runs at S37
update-rc.d -r ${D} devpts.sh start 38 S .
# slugos file syslog starts here (39)
diff --git a/packages/linux/ixp4xx-kernel/2.6.21/defconfig b/packages/linux/ixp4xx-kernel/2.6.21/defconfig
index cdaa9f58ef..921ab991c9 100644
--- a/packages/linux/ixp4xx-kernel/2.6.21/defconfig
+++ b/packages/linux/ixp4xx-kernel/2.6.21/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.21-rc4
-# Tue Mar 20 01:42:04 2007
+# Linux kernel version: 2.6.21
+# Wed Nov 21 03:10:50 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -671,7 +671,7 @@ CONFIG_MTD_IXP4XX=y
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=m
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_CRYPTOLOOP=m
CONFIG_BLK_DEV_NBD=m
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not set
@@ -836,11 +836,12 @@ CONFIG_MD_MULTIPATH=m
CONFIG_MD_FAULTY=m
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_DEBUG is not set
-# CONFIG_DM_CRYPT is not set
-# CONFIG_DM_SNAPSHOT is not set
-# CONFIG_DM_MIRROR is not set
-# CONFIG_DM_ZERO is not set
-# CONFIG_DM_MULTIPATH is not set
+CONFIG_DM_CRYPT=m
+CONFIG_DM_SNAPSHOT=m
+CONFIG_DM_MIRROR=m
+CONFIG_DM_ZERO=m
+CONFIG_DM_MULTIPATH=m
+# CONFIG_DM_MULTIPATH_EMC is not set
#
# Fusion MPT device support
@@ -1011,7 +1012,6 @@ CONFIG_SLHC=m
# CONFIG_SHAPER is not set
CONFIG_NETCONSOLE=m
CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
# CONFIG_NETPOLL_TRAP is not set
CONFIG_NET_POLL_CONTROLLER=y
@@ -1879,14 +1879,13 @@ CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
CONFIG_NFSD_V4=y
CONFIG_NFSD_TCP=y
-CONFIG_ROOT_NFS=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=m
CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_RPCSEC_GSS_SPKM3 is not set
CONFIG_SMB_FS=m
# CONFIG_SMB_NLS_DEFAULT is not set
@@ -2007,8 +2006,8 @@ CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_HMAC=y
-# CONFIG_CRYPTO_XCBC is not set
-# CONFIG_CRYPTO_NULL is not set
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_NULL=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1=m
@@ -2016,13 +2015,13 @@ CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_WP512=m
CONFIG_CRYPTO_TGR192=m
-# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_ECB=m
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_LRW is not set
+CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_DES=y
-# CONFIG_CRYPTO_FCRYPT is not set
+CONFIG_CRYPTO_FCRYPT=m
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_TWOFISH_COMMON=m
diff --git a/packages/linux/ixp4xx-kernel/2.6.23/.mtn2git_empty b/packages/linux/ixp4xx-kernel/2.6.23/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/ixp4xx-kernel/2.6.23/.mtn2git_empty
diff --git a/packages/linux/ixp4xx-kernel/2.6.23/defconfig b/packages/linux/ixp4xx-kernel/2.6.23/defconfig
new file mode 100644
index 0000000000..efbd55195d
--- /dev/null
+++ b/packages/linux/ixp4xx-kernel/2.6.23/defconfig
@@ -0,0 +1,1940 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23.8
+# Wed Nov 21 22:15:10 2007
+#
+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_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_ZONE_DMA=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 is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=m
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY 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 is not set
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_SHMEM=y
+# CONFIG_VM_EVENT_COUNTERS is not set
+CONFIG_SLAB=y
+# CONFIG_SLUB is not set
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_MODVERSIONS=y
+# 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
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+
+#
+# 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_CO285 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=y
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_KS8695 is not set
+# CONFIG_ARCH_NS9XXX is not set
+# CONFIG_ARCH_MXC is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# 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_SUPPORTS_BIG_ENDIAN=y
+
+#
+# Intel IXP4xx Implementation Options
+#
+
+#
+# IXP4xx Platforms
+#
+CONFIG_MACH_NSLU2=y
+CONFIG_MACH_AVILA=y
+CONFIG_MACH_LOFT=y
+# CONFIG_ARCH_ADI_COYOTE is not set
+# CONFIG_MACH_GATEWAY7001 is not set
+# CONFIG_MACH_WG302V2 is not set
+CONFIG_ARCH_IXDP425=y
+CONFIG_MACH_IXDPG425=y
+# CONFIG_MACH_IXDP465 is not set
+# CONFIG_MACH_KIXRP435 is not set
+CONFIG_ARCH_IXCDP1100=y
+# CONFIG_ARCH_PRPMC1100 is not set
+CONFIG_MACH_NAS100D=y
+CONFIG_MACH_DSMG600=y
+CONFIG_ARCH_IXDP4XX=y
+CONFIG_MACH_FSG=y
+# CONFIG_MACH_GTWX5715 is not set
+
+#
+# IXP4xx Options
+#
+CONFIG_DMABOUNCE=y
+# CONFIG_IXP4XX_INDIRECT_PCI is not set
+CONFIG_IXP4XX_QMGR=y
+CONFIG_IXP4XX_NPE=y
+
+#
+# Boot options
+#
+
+#
+# Power management
+#
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+CONFIG_CPU_BIG_ENDIAN=y
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+# CONFIG_IWMMXT is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+CONFIG_PCI=y
+CONFIG_PCI_SYSCALL=y
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_TICK_ONESHOT=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_PREEMPT=y
+CONFIG_HZ=100
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_BOUNCE=y
+CONFIG_VIRT_TO_BUS=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=" noirqdebug console=ttyS0,115200n8"
+# CONFIG_XIP_KERNEL is not set
+CONFIG_KEXEC=y
+
+#
+# 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_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+CONFIG_SUSPEND_UP_POSSIBLE=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+# CONFIG_IP_PNP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+CONFIG_INET_AH=m
+CONFIG_INET_ESP=m
+CONFIG_INET_IPCOMP=m
+CONFIG_INET_XFRM_TUNNEL=m
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=m
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IP_VS is not set
+CONFIG_IPV6=m
+# CONFIG_IPV6_PRIVACY is not set
+# CONFIG_IPV6_ROUTER_PREF is not set
+# CONFIG_IPV6_OPTIMISTIC_DAD is not set
+CONFIG_INET6_AH=m
+CONFIG_INET6_ESP=m
+CONFIG_INET6_IPCOMP=m
+# CONFIG_IPV6_MIP6 is not set
+CONFIG_INET6_XFRM_TUNNEL=m
+CONFIG_INET6_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_TRANSPORT=m
+CONFIG_INET6_XFRM_MODE_TUNNEL=m
+CONFIG_INET6_XFRM_MODE_BEET=m
+# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
+CONFIG_IPV6_SIT=m
+CONFIG_IPV6_TUNNEL=m
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETWORK_SECMARK is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_BRIDGE_NETFILTER=y
+
+#
+# Core Netfilter Configuration
+#
+CONFIG_NETFILTER_NETLINK=m
+CONFIG_NETFILTER_NETLINK_QUEUE=m
+CONFIG_NETFILTER_NETLINK_LOG=m
+CONFIG_NF_CONNTRACK_ENABLED=m
+CONFIG_NF_CONNTRACK=m
+CONFIG_NF_CT_ACCT=y
+CONFIG_NF_CONNTRACK_MARK=y
+CONFIG_NF_CONNTRACK_EVENTS=y
+CONFIG_NF_CT_PROTO_GRE=m
+CONFIG_NF_CT_PROTO_SCTP=m
+# CONFIG_NF_CT_PROTO_UDPLITE is not set
+CONFIG_NF_CONNTRACK_AMANDA=m
+CONFIG_NF_CONNTRACK_FTP=m
+CONFIG_NF_CONNTRACK_H323=m
+CONFIG_NF_CONNTRACK_IRC=m
+CONFIG_NF_CONNTRACK_NETBIOS_NS=m
+CONFIG_NF_CONNTRACK_PPTP=m
+CONFIG_NF_CONNTRACK_SANE=m
+CONFIG_NF_CONNTRACK_SIP=m
+CONFIG_NF_CONNTRACK_TFTP=m
+CONFIG_NF_CT_NETLINK=m
+CONFIG_NETFILTER_XTABLES=m
+CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
+CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
+CONFIG_NETFILTER_XT_TARGET_DSCP=m
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
+# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
+CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
+CONFIG_NETFILTER_XT_MATCH_COMMENT=m
+CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+# CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
+CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
+CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
+CONFIG_NETFILTER_XT_MATCH_DCCP=m
+CONFIG_NETFILTER_XT_MATCH_DSCP=m
+CONFIG_NETFILTER_XT_MATCH_ESP=m
+CONFIG_NETFILTER_XT_MATCH_HELPER=m
+CONFIG_NETFILTER_XT_MATCH_LENGTH=m
+CONFIG_NETFILTER_XT_MATCH_LIMIT=m
+CONFIG_NETFILTER_XT_MATCH_MAC=m
+CONFIG_NETFILTER_XT_MATCH_MARK=m
+CONFIG_NETFILTER_XT_MATCH_POLICY=m
+CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
+CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
+CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
+CONFIG_NETFILTER_XT_MATCH_QUOTA=m
+CONFIG_NETFILTER_XT_MATCH_REALM=m
+CONFIG_NETFILTER_XT_MATCH_SCTP=m
+CONFIG_NETFILTER_XT_MATCH_STATE=m
+CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
+CONFIG_NETFILTER_XT_MATCH_STRING=m
+CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
+# CONFIG_NETFILTER_XT_MATCH_U32 is not set
+CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
+# CONFIG_IP_NF_QUEUE is not set
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_IPRANGE=m
+CONFIG_IP_NF_MATCH_TOS=m
+CONFIG_IP_NF_MATCH_RECENT=m
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_AH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_OWNER=m
+CONFIG_IP_NF_MATCH_ADDRTYPE=m
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_NF_NAT=m
+CONFIG_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+CONFIG_IP_NF_TARGET_NETMAP=m
+CONFIG_IP_NF_TARGET_SAME=m
+CONFIG_NF_NAT_SNMP_BASIC=m
+CONFIG_NF_NAT_PROTO_GRE=m
+CONFIG_NF_NAT_FTP=m
+CONFIG_NF_NAT_IRC=m
+CONFIG_NF_NAT_TFTP=m
+CONFIG_NF_NAT_AMANDA=m
+CONFIG_NF_NAT_PPTP=m
+CONFIG_NF_NAT_H323=m
+CONFIG_NF_NAT_SIP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_TTL=m
+CONFIG_IP_NF_TARGET_CLUSTERIP=m
+CONFIG_IP_NF_RAW=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+CONFIG_IP_NF_ARP_MANGLE=m
+
+#
+# IPv6: Netfilter Configuration (EXPERIMENTAL)
+#
+CONFIG_NF_CONNTRACK_IPV6=m
+# CONFIG_IP6_NF_QUEUE is not set
+CONFIG_IP6_NF_IPTABLES=m
+CONFIG_IP6_NF_MATCH_RT=m
+CONFIG_IP6_NF_MATCH_OPTS=m
+CONFIG_IP6_NF_MATCH_FRAG=m
+CONFIG_IP6_NF_MATCH_HL=m
+CONFIG_IP6_NF_MATCH_OWNER=m
+CONFIG_IP6_NF_MATCH_IPV6HEADER=m
+CONFIG_IP6_NF_MATCH_AH=m
+CONFIG_IP6_NF_MATCH_MH=m
+CONFIG_IP6_NF_MATCH_EUI64=m
+CONFIG_IP6_NF_FILTER=m
+CONFIG_IP6_NF_TARGET_LOG=m
+CONFIG_IP6_NF_TARGET_REJECT=m
+CONFIG_IP6_NF_MANGLE=m
+CONFIG_IP6_NF_TARGET_HL=m
+CONFIG_IP6_NF_RAW=m
+
+#
+# Bridge: Netfilter Configuration
+#
+CONFIG_BRIDGE_NF_EBTABLES=m
+CONFIG_BRIDGE_EBT_BROUTE=m
+CONFIG_BRIDGE_EBT_T_FILTER=m
+CONFIG_BRIDGE_EBT_T_NAT=m
+CONFIG_BRIDGE_EBT_802_3=m
+CONFIG_BRIDGE_EBT_AMONG=m
+CONFIG_BRIDGE_EBT_ARP=m
+CONFIG_BRIDGE_EBT_IP=m
+CONFIG_BRIDGE_EBT_LIMIT=m
+CONFIG_BRIDGE_EBT_MARK=m
+CONFIG_BRIDGE_EBT_PKTTYPE=m
+CONFIG_BRIDGE_EBT_STP=m
+CONFIG_BRIDGE_EBT_VLAN=m
+CONFIG_BRIDGE_EBT_ARPREPLY=m
+CONFIG_BRIDGE_EBT_DNAT=m
+CONFIG_BRIDGE_EBT_MARK_T=m
+CONFIG_BRIDGE_EBT_REDIRECT=m
+CONFIG_BRIDGE_EBT_SNAT=m
+CONFIG_BRIDGE_EBT_LOG=m
+CONFIG_BRIDGE_EBT_ULOG=m
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+CONFIG_TIPC=m
+# CONFIG_TIPC_ADVANCED is not set
+# CONFIG_TIPC_DEBUG is not set
+# CONFIG_ATM is not set
+CONFIG_BRIDGE=m
+CONFIG_VLAN_8021Q=m
+# CONFIG_DECNET is not set
+CONFIG_LLC=m
+# CONFIG_LLC2 is not set
+CONFIG_IPX=m
+# CONFIG_IPX_INTERN is not set
+CONFIG_ATALK=m
+CONFIG_DEV_APPLETALK=m
+CONFIG_IPDDP=m
+CONFIG_IPDDP_ENCAP=y
+CONFIG_IPDDP_DECAP=y
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+CONFIG_NET_CLS_ROUTE=y
+
+#
+# Network testing
+#
+CONFIG_NET_PKTGEN=m
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA 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_CMTP=m
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+CONFIG_BT_HCIUSB_SCO=y
+CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART_H4=y
+CONFIG_BT_HCIUART_BCSP=y
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+CONFIG_BT_HCIVHCI=m
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+CONFIG_WIRELESS_EXT=y
+# CONFIG_MAC80211 is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+CONFIG_RFKILL=m
+# CONFIG_RFKILL_INPUT is not set
+# CONFIG_NET_9P is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+CONFIG_FW_LOADER=y
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
+# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_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=y
+CONFIG_NFTL_RW=y
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+# CONFIG_MTD_CFI_NOSWAP is not set
+CONFIG_MTD_CFI_BE_BYTE_SWAP=y
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+CONFIG_MTD_CFI_GEOMETRY=y
+# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
+# 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_OTP is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+CONFIG_MTD_COMPLEX_MAPPINGS=y
+# CONFIG_MTD_PHYSMAP is not set
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+CONFIG_MTD_IXP4XX=y
+# CONFIG_MTD_PCI is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 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 is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+CONFIG_BLK_DEV_NBD=m
+# CONFIG_BLK_DEV_SX8 is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=4
+CONFIG_BLK_DEV_RAM_SIZE=10240
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+CONFIG_CDROM_PKTCDVD=m
+CONFIG_CDROM_PKTCDVD_BUFFERS=8
+# CONFIG_CDROM_PKTCDVD_WCACHE is not set
+CONFIG_ATA_OVER_ETH=m
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_ST=m
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR 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=m
+# CONFIG_SCSI_SAS_LIBSAS is not set
+CONFIG_SCSI_LOWLEVEL=y
+CONFIG_ISCSI_TCP=m
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_3W_9XXX is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC94XX is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ARCMSR is not set
+# CONFIG_MEGARAID_NEWGEN is not set
+# CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
+# CONFIG_SCSI_HPTIOP is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_IPS is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_STEX is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_IPR is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_QLA_FC is not set
+# CONFIG_SCSI_QLA_ISCSI is not set
+# CONFIG_SCSI_LPFC is not set
+# CONFIG_SCSI_DC395x is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_SCSI_SRP is not set
+CONFIG_ATA=m
+# CONFIG_ATA_NONSTANDARD is not set
+# CONFIG_SATA_AHCI is not set
+# CONFIG_SATA_SVW is not set
+# CONFIG_ATA_PIIX is not set
+# CONFIG_SATA_MV is not set
+# CONFIG_SATA_NV is not set
+# CONFIG_PDC_ADMA is not set
+# CONFIG_SATA_QSTOR is not set
+# CONFIG_SATA_PROMISE is not set
+# CONFIG_SATA_SX4 is not set
+# CONFIG_SATA_SIL is not set
+# CONFIG_SATA_SIL24 is not set
+# CONFIG_SATA_SIS is not set
+# CONFIG_SATA_ULI is not set
+CONFIG_SATA_VIA=m
+# CONFIG_SATA_VITESSE is not set
+# CONFIG_SATA_INIC162X is not set
+# CONFIG_PATA_ALI is not set
+# CONFIG_PATA_AMD is not set
+CONFIG_PATA_ARTOP=m
+# CONFIG_PATA_ATIIXP is not set
+# CONFIG_PATA_CMD640_PCI is not set
+# CONFIG_PATA_CMD64X is not set
+# CONFIG_PATA_CS5520 is not set
+# CONFIG_PATA_CS5530 is not set
+# CONFIG_PATA_CYPRESS is not set
+# CONFIG_PATA_EFAR is not set
+# CONFIG_ATA_GENERIC is not set
+# CONFIG_PATA_HPT366 is not set
+# CONFIG_PATA_HPT37X is not set
+# CONFIG_PATA_HPT3X2N is not set
+# CONFIG_PATA_HPT3X3 is not set
+# CONFIG_PATA_IT821X is not set
+# CONFIG_PATA_IT8213 is not set
+# CONFIG_PATA_JMICRON is not set
+# CONFIG_PATA_TRIFLEX is not set
+# CONFIG_PATA_MARVELL is not set
+# CONFIG_PATA_MPIIX is not set
+# CONFIG_PATA_OLDPIIX is not set
+# CONFIG_PATA_NETCELL is not set
+# CONFIG_PATA_NS87410 is not set
+# CONFIG_PATA_OPTI is not set
+# CONFIG_PATA_OPTIDMA is not set
+# CONFIG_PATA_PDC_OLD is not set
+# CONFIG_PATA_RADISYS is not set
+# CONFIG_PATA_RZ1000 is not set
+# CONFIG_PATA_SC1200 is not set
+# CONFIG_PATA_SERVERWORKS is not set
+# CONFIG_PATA_PDC2027X is not set
+# CONFIG_PATA_SIL680 is not set
+# CONFIG_PATA_SIS is not set
+# CONFIG_PATA_VIA is not set
+# CONFIG_PATA_WINBOND is not set
+# CONFIG_PATA_PLATFORM is not set
+CONFIG_PATA_IXP4XX_CF=m
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID10=m
+CONFIG_MD_RAID456=m
+CONFIG_MD_RAID5_RESHAPE=y
+CONFIG_MD_MULTIPATH=m
+CONFIG_MD_FAULTY=m
+CONFIG_BLK_DEV_DM=m
+# CONFIG_DM_DEBUG is not set
+CONFIG_DM_CRYPT=m
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+# CONFIG_DM_MULTIPATH is not set
+# CONFIG_DM_DELAY is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_SPI is not set
+# CONFIG_FUSION_FC is not set
+# CONFIG_FUSION_SAS is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+# CONFIG_FIREWIRE is not set
+# CONFIG_IEEE1394 is not set
+# CONFIG_I2O is not set
+CONFIG_NETDEVICES=y
+# CONFIG_NETDEVICES_MULTIQUEUE is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_MACVLAN is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=m
+# CONFIG_ARCNET is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_IXP4XX_ETH=y
+# CONFIG_AX88796 is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_SMC91X is not set
+# CONFIG_DM9000 is not set
+# CONFIG_NET_TULIP is not set
+# CONFIG_HP100 is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_B44 is not set
+# CONFIG_FORCEDETH is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+# CONFIG_NE2K_PCI is not set
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_SC92031 is not set
+CONFIG_NETDEV_1000=y
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SKGE is not set
+# CONFIG_SKY2 is not set
+# CONFIG_SK98LIN is not set
+CONFIG_VIA_VELOCITY=m
+# CONFIG_TIGON3 is not set
+# CONFIG_BNX2 is not set
+# CONFIG_QLA3XXX is not set
+# CONFIG_ATL1 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_IPW2100 is not set
+# CONFIG_IPW2200 is not set
+CONFIG_LIBERTAS=m
+CONFIG_LIBERTAS_USB=m
+# CONFIG_LIBERTAS_DEBUG is not set
+# CONFIG_HERMES is not set
+# CONFIG_ATMEL is not set
+# CONFIG_PRISM54 is not set
+CONFIG_USB_ZD1201=m
+# CONFIG_HOSTAP is not set
+# CONFIG_BCM43XX is not set
+CONFIG_ZD1211RW=m
+# CONFIG_ZD1211RW_DEBUG is not set
+
+#
+# USB Network Adapters
+#
+CONFIG_USB_CATC=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_USBNET_MII=m
+CONFIG_USB_USBNET=m
+CONFIG_USB_NET_AX8817X=m
+CONFIG_USB_NET_CDCETHER=m
+CONFIG_USB_NET_DM9601=m
+CONFIG_USB_NET_GL620A=m
+CONFIG_USB_NET_NET1080=m
+CONFIG_USB_NET_PLUSB=m
+CONFIG_USB_NET_MCS7830=m
+# CONFIG_USB_NET_RNDIS_HOST is not set
+# CONFIG_USB_NET_CDC_SUBSET is not set
+CONFIG_USB_NET_ZAURUS=m
+# CONFIG_WAN is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+# CONFIG_PPPOL2TP is not set
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_NET_FC is not set
+# CONFIG_SHAPER is not set
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_TRAP is not set
+CONFIG_NET_POLL_CONTROLLER=y
+CONFIG_ISDN=m
+# CONFIG_ISDN_I4L is not set
+CONFIG_ISDN_CAPI=m
+CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
+CONFIG_CAPI_TRACE=y
+# CONFIG_ISDN_CAPI_MIDDLEWARE is not set
+CONFIG_ISDN_CAPI_CAPI20=m
+
+#
+# CAPI hardware drivers
+#
+# CONFIG_CAPI_AVM is not set
+# CONFIG_CAPI_EICON 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 is not set
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+# CONFIG_INPUT_KEYBOARD is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_IXP4XX_BEEPER=y
+CONFIG_INPUT_ATI_REMOTE=m
+CONFIG_INPUT_ATI_REMOTE2=m
+CONFIG_INPUT_KEYSPAN_REMOTE=m
+# CONFIG_INPUT_POWERMATE is not set
+CONFIG_INPUT_YEALINK=m
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+# CONFIG_SERIO is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_VT is not set
+CONFIG_SERIAL_NONSTANDARD=y
+# CONFIG_COMPUTONE is not set
+# CONFIG_ROCKETPORT is not set
+# CONFIG_CYCLADES is not set
+# CONFIG_DIGIEPCA is not set
+# CONFIG_MOXA_INTELLIO is not set
+# CONFIG_MOXA_SMARTIO is not set
+# CONFIG_MOXA_SMARTIO_NEW is not set
+# CONFIG_ISI is not set
+# CONFIG_SYNCLINKMP is not set
+# CONFIG_SYNCLINK_GT is not set
+CONFIG_N_HDLC=m
+# CONFIG_RISCOM8 is not set
+# CONFIG_SPECIALIX is not set
+# CONFIG_SX is not set
+# CONFIG_RIO is not set
+# CONFIG_STALDRV is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_PCI=m
+CONFIG_SERIAL_8250_NR_UARTS=2
+CONFIG_SERIAL_8250_RUNTIME_UARTS=2
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_JSM is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_IXP4XX_WATCHDOG=m
+
+#
+# PCI-based Watchdog Cards
+#
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_IXP4XX=y
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_DEVPORT=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+CONFIG_I2C_GPIO=y
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_IOP3XX is not set
+# CONFIG_I2C_IXP4XX is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+CONFIG_I2C_TINY_USB=m
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+CONFIG_SENSORS_EEPROM=y
+CONFIG_SENSORS_PCF8574=m
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+CONFIG_W1=m
+
+#
+# 1-wire Bus Masters
+#
+# CONFIG_W1_MASTER_MATROX is not set
+CONFIG_W1_MASTER_DS2490=m
+CONFIG_W1_MASTER_DS2482=m
+# CONFIG_W1_MASTER_DS1WM is not set
+
+#
+# 1-wire Slaves
+#
+CONFIG_W1_SLAVE_THERM=m
+CONFIG_W1_SLAVE_SMEM=m
+CONFIG_W1_SLAVE_DS2433=m
+CONFIG_W1_SLAVE_DS2433_CRC=y
+# CONFIG_W1_SLAVE_DS2760 is not set
+CONFIG_HWMON=m
+CONFIG_HWMON_VID=m
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ABITUGURU3 is not set
+CONFIG_SENSORS_AD7418=m
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_ATXP1 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_FSCPOS is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_GL520SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_LM92 is not set
+# CONFIG_SENSORS_LM93 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SIS5595 is not set
+# CONFIG_SENSORS_DME1737 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_THMC50 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_VT8231 is not set
+CONFIG_SENSORS_W83781D=m
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_PHANTOM is not set
+# CONFIG_EEPROM_93CX6 is not set
+# CONFIG_SGI_IOC4 is not set
+# CONFIG_TIFM_CORE is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_IXP4XX=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_CPU_ACTIVITY=y
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+# CONFIG_VIDEO_V4L1 is not set
+# CONFIG_VIDEO_V4L1_COMPAT is not set
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+CONFIG_VIDEO_VIVI=m
+CONFIG_VIDEO_SAA5246A=m
+CONFIG_VIDEO_SAA5249=m
+# CONFIG_TUNER_TEA5761 is not set
+CONFIG_VIDEO_SAA7134=m
+# CONFIG_VIDEO_SAA7134_ALSA is not set
+CONFIG_VIDEO_HEXIUM_ORION=m
+CONFIG_VIDEO_HEXIUM_GEMINI=m
+CONFIG_VIDEO_CX88=m
+CONFIG_VIDEO_CX88_ALSA=m
+# CONFIG_VIDEO_CX88_BLACKBIRD is not set
+# CONFIG_VIDEO_CAFE_CCIC is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_USBVISION is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_USB_SN9C102 is not set
+# CONFIG_USB_ZC0301 is not set
+CONFIG_USB_ZR364XX=m
+# CONFIG_RADIO_ADAPTERS is not set
+# CONFIG_DVB_CORE is not set
+CONFIG_VIDEO_SAA7146=m
+CONFIG_VIDEO_SAA7146_VV=m
+CONFIG_VIDEO_TUNER=m
+CONFIG_VIDEO_BUF=m
+CONFIG_VIDEO_BTCX=m
+CONFIG_VIDEO_IR_I2C=m
+CONFIG_VIDEO_IR=m
+CONFIG_VIDEO_TVEEPROM=m
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+# CONFIG_FB is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+CONFIG_SND_HWDEP=m
+CONFIG_SND_RAWMIDI=m
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=m
+CONFIG_SND_PCM_OSS=m
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# PCI devices
+#
+# CONFIG_SND_AD1889 is not set
+# CONFIG_SND_ALS300 is not set
+# CONFIG_SND_ALI5451 is not set
+# CONFIG_SND_ATIIXP is not set
+# CONFIG_SND_ATIIXP_MODEM is not set
+# CONFIG_SND_AU8810 is not set
+# CONFIG_SND_AU8820 is not set
+# CONFIG_SND_AU8830 is not set
+# CONFIG_SND_AZT3328 is not set
+# CONFIG_SND_BT87X is not set
+# CONFIG_SND_CA0106 is not set
+# CONFIG_SND_CMIPCI is not set
+# CONFIG_SND_CS4281 is not set
+# CONFIG_SND_CS46XX is not set
+# CONFIG_SND_DARLA20 is not set
+# CONFIG_SND_GINA20 is not set
+# CONFIG_SND_LAYLA20 is not set
+# CONFIG_SND_DARLA24 is not set
+# CONFIG_SND_GINA24 is not set
+# CONFIG_SND_LAYLA24 is not set
+# CONFIG_SND_MONA is not set
+# CONFIG_SND_MIA is not set
+# CONFIG_SND_ECHO3G is not set
+# CONFIG_SND_INDIGO is not set
+# CONFIG_SND_INDIGOIO is not set
+# CONFIG_SND_INDIGODJ is not set
+# CONFIG_SND_EMU10K1 is not set
+# CONFIG_SND_EMU10K1X is not set
+# CONFIG_SND_ENS1370 is not set
+# CONFIG_SND_ENS1371 is not set
+# CONFIG_SND_ES1938 is not set
+# CONFIG_SND_ES1968 is not set
+# CONFIG_SND_FM801 is not set
+# CONFIG_SND_HDA_INTEL is not set
+# CONFIG_SND_HDSP is not set
+# CONFIG_SND_HDSPM is not set
+# CONFIG_SND_ICE1712 is not set
+# CONFIG_SND_ICE1724 is not set
+# CONFIG_SND_INTEL8X0 is not set
+# CONFIG_SND_INTEL8X0M is not set
+# CONFIG_SND_KORG1212 is not set
+# CONFIG_SND_MAESTRO3 is not set
+# CONFIG_SND_MIXART is not set
+# CONFIG_SND_NM256 is not set
+# CONFIG_SND_PCXHR is not set
+# CONFIG_SND_RIPTIDE is not set
+# CONFIG_SND_RME32 is not set
+# CONFIG_SND_RME96 is not set
+# CONFIG_SND_RME9652 is not set
+# CONFIG_SND_SONICVIBES is not set
+# CONFIG_SND_TRIDENT is not set
+# CONFIG_SND_VIA82XX is not set
+# CONFIG_SND_VIA82XX_MODEM is not set
+# CONFIG_SND_VX222 is not set
+# CONFIG_SND_YMFPCI is not set
+
+#
+# ALSA ARM devices
+#
+
+#
+# USB devices
+#
+CONFIG_SND_USB_AUDIO=m
+CONFIG_SND_USB_CAIAQ=m
+CONFIG_SND_USB_CAIAQ_INPUT=y
+
+#
+# System on Chip audio support
+#
+# CONFIG_SND_SOC is not set
+
+#
+# SoC Audio support for SuperH
+#
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=m
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=m
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+CONFIG_USB_HIDDEV=y
+
+#
+# USB HID Boot Protocol drivers
+#
+CONFIG_USB_KBD=m
+CONFIG_USB_MOUSE=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+CONFIG_USB_ARCH_HAS_EHCI=y
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_SPLIT_ISO=y
+CONFIG_USB_EHCI_ROOT_HUB_TT=y
+CONFIG_USB_EHCI_TT_NEWSCHED=y
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=m
+# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
+# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+CONFIG_USB_UHCI_HCD=m
+# CONFIG_USB_U132_HCD is not set
+# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+CONFIG_USB_STORAGE_FREECOM=y
+# CONFIG_USB_STORAGE_DPCM is not set
+CONFIG_USB_STORAGE_USBAT=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+CONFIG_USB_STORAGE_ALAUDA=y
+CONFIG_USB_STORAGE_ONETOUCH=y
+CONFIG_USB_STORAGE_KARMA=y
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+# CONFIG_USB_MON is not set
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_AIRCABLE=m
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+CONFIG_USB_SERIAL_ARK3116=m
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_CP2101=m
+CONFIG_USB_SERIAL_CYPRESS_M8=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_FUNSOFT=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_GARMIN=m
+CONFIG_USB_SERIAL_IPW=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_MOS7720=m
+CONFIG_USB_SERIAL_MOS7840=m
+CONFIG_USB_SERIAL_NAVMAN=m
+CONFIG_USB_SERIAL_PL2303=m
+# CONFIG_USB_SERIAL_OTI6858 is not set
+CONFIG_USB_SERIAL_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OPTION=m
+CONFIG_USB_SERIAL_OMNINET=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+CONFIG_USB_ADUTUX=m
+# CONFIG_USB_AUERSWALD is not set
+CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
+CONFIG_USB_LCD=m
+CONFIG_USB_BERRY_CHARGE=m
+CONFIG_USB_LED=m
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+CONFIG_USB_CYTHERM=m
+CONFIG_USB_PHIDGET=m
+CONFIG_USB_PHIDGETKIT=m
+CONFIG_USB_PHIDGETMOTORCONTROL=m
+CONFIG_USB_PHIDGETSERVO=m
+CONFIG_USB_IDMOUSE=m
+CONFIG_USB_FTDI_ELAN=m
+# CONFIG_USB_APPLEDISPLAY is not set
+CONFIG_USB_SISUSBVGA=m
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+# CONFIG_MMC is not set
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+CONFIG_RTC_DRV_DS1307=y
+CONFIG_RTC_DRV_DS1672=y
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+CONFIG_RTC_DRV_ISL1208=y
+CONFIG_RTC_DRV_X1205=y
+CONFIG_RTC_DRV_PCF8563=y
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=m
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_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=y
+CONFIG_REISERFS_FS_POSIX_ACL=y
+CONFIG_REISERFS_FS_SECURITY=y
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
+CONFIG_UDF_FS=m
+CONFIG_UDF_NLS=y
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="utf8"
+CONFIG_NTFS_FS=m
+# CONFIG_NTFS_DEBUG is not set
+CONFIG_NTFS_RW=y
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# 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_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=m
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=m
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V3_ACL is not set
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=m
+CONFIG_SUNRPC_GSS=m
+CONFIG_SUNRPC_BIND34=y
+CONFIG_RPCSEC_GSS_KRB5=m
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
+CONFIG_CIFS=m
+# CONFIG_CIFS_STATS is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
+# 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
+
+#
+# Native Language Support
+#
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="utf8"
+CONFIG_NLS_CODEPAGE_437=m
+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=m
+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=m
+
+#
+# Distributed Lock Manager
+#
+# CONFIG_DLM is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+CONFIG_ENABLE_MUST_CHECK=y
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_FS is not set
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+CONFIG_XOR_BLOCKS=m
+CONFIG_ASYNC_CORE=m
+CONFIG_ASYNC_MEMCPY=m
+CONFIG_ASYNC_XOR=m
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_HASH=y
+CONFIG_CRYPTO_MANAGER=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_XCBC=m
+CONFIG_CRYPTO_NULL=m
+CONFIG_CRYPTO_MD4=m
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_SHA1=m
+CONFIG_CRYPTO_SHA256=m
+CONFIG_CRYPTO_SHA512=m
+CONFIG_CRYPTO_WP512=m
+CONFIG_CRYPTO_TGR192=m
+CONFIG_CRYPTO_GF128MUL=m
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_PCBC=m
+CONFIG_CRYPTO_LRW=m
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_FCRYPT=m
+CONFIG_CRYPTO_BLOWFISH=m
+CONFIG_CRYPTO_TWOFISH=m
+CONFIG_CRYPTO_TWOFISH_COMMON=m
+CONFIG_CRYPTO_SERPENT=m
+CONFIG_CRYPTO_AES=m
+CONFIG_CRYPTO_CAST5=m
+CONFIG_CRYPTO_CAST6=m
+CONFIG_CRYPTO_TEA=m
+CONFIG_CRYPTO_ARC4=m
+CONFIG_CRYPTO_KHAZAD=m
+CONFIG_CRYPTO_ANUBIS=m
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+CONFIG_CRYPTO_CAMELLIA=m
+# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+CONFIG_CRC16=y
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_TEXTSEARCH=y
+CONFIG_TEXTSEARCH_KMP=m
+CONFIG_TEXTSEARCH_BM=m
+CONFIG_TEXTSEARCH_FSM=m
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/ixp4xx-kernel_2.6.21.6.bb b/packages/linux/ixp4xx-kernel_2.6.21.6.bb
index b0ba8ba787..a9bacace21 100644
--- a/packages/linux/ixp4xx-kernel_2.6.21.6.bb
+++ b/packages/linux/ixp4xx-kernel_2.6.21.6.bb
@@ -16,7 +16,7 @@ IXP4XX_KERNEL_PATCH_DIR = "2.6.21"
# the changes in SVN between revisions include changes in the
# patches applied to the kernel, rather than simply defconfig
# changes
-PR = "r0.${IXP4XX_KERNEL_SVN_REV}"
+PR = "r1.${IXP4XX_KERNEL_SVN_REV}"
require ixp4xx-kernel.inc
require ixp4xx-kernel-svnpatch.inc
diff --git a/packages/linux/ixp4xx-kernel_2.6.23.8.bb b/packages/linux/ixp4xx-kernel_2.6.23.8.bb
new file mode 100644
index 0000000000..081195855d
--- /dev/null
+++ b/packages/linux/ixp4xx-kernel_2.6.23.8.bb
@@ -0,0 +1,24 @@
+# Kernel for IXP4xx
+#
+# This bitbake file pulls patches and the defconfig straight
+# from the NSLU2-Linux SVN repository. Information about this
+# repository can be found at:
+# http://trac.nslu2-linux.org/kernel/
+#
+# The revision that is pulled from SVN is specified below
+IXP4XX_KERNEL_SVN_REV = "925"
+#
+# The directory containing the patches to be applied is
+# specified below
+IXP4XX_KERNEL_PATCH_DIR = "2.6.23"
+#
+# Increment the number below (i.e. the digits after PR) when
+# the changes in SVN between revisions include changes in the
+# patches applied to the kernel, rather than simply defconfig
+# changes
+PR = "r0.${IXP4XX_KERNEL_SVN_REV}"
+
+require ixp4xx-kernel.inc
+require ixp4xx-kernel-svnpatch.inc
+
+SRC_URI += "file://defconfig"
diff --git a/packages/linux/linux-openmoko/defconfig-2.6.22.5 b/packages/linux/linux-openmoko/defconfig-2.6.22.5
index 5c0396199f..62a61935f6 100644
--- a/packages/linux/linux-openmoko/defconfig-2.6.22.5
+++ b/packages/linux/linux-openmoko/defconfig-2.6.22.5
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.22.5
-# Mon Nov 12 08:23:42 2007
+# Wed Nov 21 11:45:19 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1257,7 +1257,7 @@ CONFIG_SND_SOC=m
CONFIG_SND_S3C24XX_SOC=m
CONFIG_SND_S3C24XX_SOC_I2S=m
CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753=m
-# CONFIG_SND_S3C24XX_SOC_NEO1973_GTA02_WM8753 is not set
+CONFIG_SND_S3C24XX_SOC_NEO1973_GTA02_WM8753=m
#
# SoC Audio support for SuperH
diff --git a/packages/linux/linux-openmoko/glamo-report-vram-size-to-userspace.patch b/packages/linux/linux-openmoko/glamo-report-vram-size-to-userspace.patch
new file mode 100644
index 0000000000..563923e71c
--- /dev/null
+++ b/packages/linux/linux-openmoko/glamo-report-vram-size-to-userspace.patch
@@ -0,0 +1,67 @@
+From ff1564e5100eeccd53ee6b007813ea722f8cf8b6 Mon Sep 17 00:00:00 2001
+From: Chia-I Wu <olv@openmoko.com>
+Date: Mon, 1 Oct 2007 21:16:46 +0800
+Subject: [PATCH] glamo: report vram size to userspace
+
+Set fb_fix_screeninfo.smem_len to RESSIZE(fb_res). This is not the real
+vram size, as it is a hardcoded value in glamo-core.c for now.
+---
+ drivers/video/glamo/glamo-fb.c | 13 +++++--------
+ 1 files changed, 5 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/video/glamo/glamo-fb.c b/drivers/video/glamo/glamo-fb.c
+index 451de75..160a5b1 100644
+--- a/drivers/video/glamo/glamo-fb.c
++++ b/drivers/video/glamo/glamo-fb.c
+@@ -54,8 +54,6 @@
+
+ #define RESSIZE(ressource) (((ressource)->end - (ressource)->start)+1)
+
+-#define GLAMO_FB_ALLOC (640*480*2)
+-
+ struct glamofb_handle {
+ struct fb_info *fb;
+ struct device *dev;
+@@ -224,7 +222,6 @@ static int glamofb_set_par(struct fb_info *info)
+ }
+
+ glamo->fb->fix.line_length = (var->width * var->bits_per_pixel) / 8;
+- glamo->fb->fix.smem_len = info->fix.line_length * var->yres_virtual;
+
+ return 0;
+ }
+@@ -453,7 +450,7 @@ static int __init glamofb_probe(struct platform_device *pdev)
+ }
+
+ glamofb->fb_res = request_mem_region(glamofb->fb_res->start,
+- GLAMO_FB_ALLOC, pdev->name);
++ RESSIZE(glamofb->fb_res), pdev->name);
+ if (!glamofb->fb_res) {
+ dev_err(&pdev->dev, "failed to request vram region\n");
+ goto out_release_reg;
+@@ -467,6 +464,7 @@ static int __init glamofb_probe(struct platform_device *pdev)
+ goto out_release_fb;
+ }
+ fbinfo->fix.smem_start = (unsigned long) glamofb->fb_res->start;
++ fbinfo->fix.smem_len = RESSIZE(glamofb->fb_res);
+
+ fbinfo->screen_base = ioremap(glamofb->fb_res->start,
+ RESSIZE(glamofb->fb_res));
+@@ -522,11 +520,10 @@ static int __init glamofb_probe(struct platform_device *pdev)
+ fbinfo->var.green.length = 6;
+ fbinfo->var.blue.length = 5;
+ fbinfo->var.transp.length = 0;
+- fbinfo->fix.smem_len = mach_info->xres.max *
+- mach_info->yres.max *
+- mach_info->bpp.max / 8;
+
+- memset(fbinfo->screen_base, 0, fbinfo->fix.smem_len);
++ memset(fbinfo->screen_base, 0, mach_info->xres.max *
++ mach_info->yres.max *
++ mach_info->bpp.max / 8);
+
+ glamo_engine_enable(mach_info->glamo, GLAMO_ENGINE_LCD);
+ glamo_engine_reset(mach_info->glamo, GLAMO_ENGINE_LCD);
+--
+1.5.3.1
+
diff --git a/packages/linux/linux-openmoko_2.6.22.5.bb b/packages/linux/linux-openmoko_2.6.22.5.bb
index 00664ad448..1af9ed58a7 100644
--- a/packages/linux/linux-openmoko_2.6.22.5.bb
+++ b/packages/linux/linux-openmoko_2.6.22.5.bb
@@ -9,7 +9,7 @@ KERNEL_RELEASE = "2.6.22.5"
#PV = "${VANILLA_VERSION}+${KERNEL_RELEASE}-moko11+svnr${SRCREV}"
PV = "${KERNEL_RELEASE}-moko11+svnr${SRCREV}"
-PR = "r8"
+PR = "r9"
KERNEL_IMAGETYPE = "uImage"
UBOOT_ENTRYPOINT = "30008000"
@@ -29,6 +29,7 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${VANILLA_VERSION}.ta
file://iis-suspend.patch;patch=1 \
file://s3c24xx-pcm-suspend.patch;patch=1 \
file://gta-vibro-pwm-suspend.patch;patch=1 \
+ file://glamo-report-vram-size-to-userspace.patch;patch=1 \
file://defconfig-${KERNEL_RELEASE}"
S = "${WORKDIR}/linux-${VANILLA_VERSION}"
diff --git a/packages/linux/linux-rp_2.6.23.bb b/packages/linux/linux-rp_2.6.23.bb
index ccc67405a3..83077b66b8 100644
--- a/packages/linux/linux-rp_2.6.23.bb
+++ b/packages/linux/linux-rp_2.6.23.bb
@@ -1,6 +1,6 @@
require linux-rp.inc
-PR = "r8"
+PR = "r9"
DEFAULT_PREFERENCE_qemuarm = "-1"
DEFAULT_PREFERENCE_qemux86 = "-1"
diff --git a/packages/meta/slugos-packages.bb b/packages/meta/slugos-packages.bb
index abd9768a21..4badaa1b90 100644
--- a/packages/meta/slugos-packages.bb
+++ b/packages/meta/slugos-packages.bb
@@ -5,7 +5,7 @@
DESCRIPTION = "Packages that are compatible with the SlugOS firmware"
HOMEPAGE = "http://www.nslu2-linux.org"
LICENSE = "MIT"
-PR = "r40"
+PR = "r41"
CONFLICTS = "db3"
COMPATIBLE_MACHINE = "nslu2"
@@ -149,6 +149,7 @@ SLUGOS_PACKAGES = "\
net-tools \
netcat \
netpbm \
+ nfs-utils \
nmap \
ntfs-3g \
ntp \
@@ -166,6 +167,7 @@ SLUGOS_PACKAGES = "\
picocom \
pkgconfig \
popt \
+ portmap \
postfix \
ppp \
procps \
@@ -229,7 +231,6 @@ SLUGOS_BROKEN_PACKAGES = "\
fetchmail \
lirc-modules lirc \
madfu \
- portmap nfs-utils \
openldap \
pvrusb2-mci \
pwc \
diff --git a/packages/mpfr/mpfr-native_2.3.0.bb b/packages/mpfr/mpfr-native_2.3.0.bb
new file mode 100644
index 0000000000..01ba37c8bf
--- /dev/null
+++ b/packages/mpfr/mpfr-native_2.3.0.bb
@@ -0,0 +1,4 @@
+require mpfr_${PV}.bb
+inherit native
+DEPENDS = "gmp-native"
+
diff --git a/packages/mpfr/mpfr_2.3.0.bb b/packages/mpfr/mpfr_2.3.0.bb
new file mode 100644
index 0000000000..2acd7da3e4
--- /dev/null
+++ b/packages/mpfr/mpfr_2.3.0.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "A C library for multiple-precision floating-point computations with exact rounding"
+LICENSE = "LGPL"
+SECTION = "libs"
+DEPENDS = "gmp"
+PR = "r0"
+
+SRC_URI = "http://www.mpfr.org/mpfr-${PV}/mpfr-${PV}.tar.bz2"
+S = "${WORKDIR}/mpfr-${PV}"
+
+inherit autotools
+
+do_stage() {
+ oe_runmake install prefix=${STAGING_DIR} \
+ bindir=${STAGING_BINDIR} \
+ includedir=${STAGING_INCDIR} \
+ libdir=${STAGING_LIBDIR} \
+ datadir=${STAGING_DATADIR} \
+ infodir=${STAGING_DIR}/${HOST_SYS}/info
+}
diff --git a/packages/openmoko2/openmoko-session2.bb b/packages/openmoko2/openmoko-session2.bb
index a8768534b1..3d8c9109e1 100644
--- a/packages/openmoko2/openmoko-session2.bb
+++ b/packages/openmoko2/openmoko-session2.bb
@@ -4,7 +4,7 @@ SECTION = "x11"
RDEPENDS = "matchbox-applet-startup-monitor matchbox-panel-2"
RDEPENDS += "openmoko-common2 openmoko-today2 openmoko-dialer2"
RCONFLICTS_${PN} = "openmoko-session matchbox-common"
-PR = "r62"
+PR = "r63"
SRC_URI = "\
file://etc \
diff --git a/packages/openmoko2/openmoko-session2/etc/matchbox/session b/packages/openmoko2/openmoko-session2/etc/matchbox/session
index 2f27a4cc6a..9eea32a45d 100755
--- a/packages/openmoko2/openmoko-session2/etc/matchbox/session
+++ b/packages/openmoko2/openmoko-session2/etc/matchbox/session
@@ -2,7 +2,7 @@
SHOWCURSOR="no"
openmoko-today &
-openmoko-dialer &
+phone-kit &
matchbox-window-manager -use_titlebar yes -use_desktop_mode decorated -theme openmoko-standard-2 -use_cursor $SHOWCURSOR $@ &
diff --git a/packages/portmap/portmap-6.0/no-pie.patch b/packages/portmap/portmap-6.0/no-pie.patch
new file mode 100644
index 0000000000..4d7e2daae4
--- /dev/null
+++ b/packages/portmap/portmap-6.0/no-pie.patch
@@ -0,0 +1,14 @@
+--- portmap_6.0/Makefile.orig 2007-11-21 00:35:52.000000000 -0600
++++ portmap_6.0/Makefile 2007-11-21 00:37:23.000000000 -0600
+@@ -125,9 +125,9 @@
+ all: portmap pmap_dump pmap_set portmap.man
+
+ CPPFLAGS += $(HOSTS_ACCESS)
+-portmap: CFLAGS += -fpie
++#portmap: CFLAGS += -fpie
+ portmap: LDLIBS += $(WRAP_LIB)
+-portmap: LDFLAGS += -pie
++#portmap: LDFLAGS += -pie
+ portmap: portmap.o pmap_check.o from_local.o
+
+ from_local: CPPFLAGS += -DTEST
diff --git a/packages/portmap/portmap_6.0.bb b/packages/portmap/portmap_6.0.bb
index 315cb4a473..335b5c6d09 100644
--- a/packages/portmap/portmap_6.0.bb
+++ b/packages/portmap/portmap_6.0.bb
@@ -1,11 +1,16 @@
require portmap.inc
+PR = "r1"
+
SRC_URI = "http://neil.brown.name/portmap/portmap-6.0.tgz \
file://destdir-no-strip.patch;patch=1 \
file://no-tcpd-support.patch;patch=1 \
file://no-libwrap.patch;patch=1;pnum=0 \
file://portmap.init "
+# Remove this patch when SlugOS upgrades to binutils 1.18
+SRC_URI_append_slugos = " file://no-pie.patch;patch=1 "
+
S = "${WORKDIR}/${PN}_${PV}/"
CPPFLAGS += "-DFACILITY=LOG_DAEMON -DENABLE_DNS"
diff --git a/packages/slugos-init/files/turnup b/packages/slugos-init/files/turnup
index 761e07829d..8d4c3f0f93 100644
--- a/packages/slugos-init/files/turnup
+++ b/packages/slugos-init/files/turnup
@@ -28,6 +28,7 @@ d root root 0755 /var/lock/subsys none
d root root 0755 /var/lib/dropbear none
d root root 0755 /var/lib/misc none
f root root 0664 /var/log/wtmp none
+f root root 0664 /var/log/lastlog none
f root root 0664 /var/run/utmp none"
INRAM_NFS="\
@@ -50,6 +51,7 @@ d root root 0755 /var/lib/dropbear none
d root root 0755 /var/lib/misc none
d root root 0755 /var/lib/ipkg none
f root root 0664 /var/log/wtmp none
+f root root 0664 /var/log/lastlog none
f root root 0664 /var/run/utmp none"
INRAM_DISK="\
@@ -68,6 +70,7 @@ d root root 0755 /var/lib/dropbear none
d root root 0755 /var/lib/misc none
d root root 0755 /var/lib/ipkg none
f root root 0664 /var/log/wtmp none
+f root root 0664 /var/log/lastlog none
f root root 0664 /var/run/utmp none"
INRAM_HEADER="\
diff --git a/packages/slugos-init/slugos-init_0.10.bb b/packages/slugos-init/slugos-init_0.10.bb
index c8e903ce97..247578bab3 100644
--- a/packages/slugos-init/slugos-init_0.10.bb
+++ b/packages/slugos-init/slugos-init_0.10.bb
@@ -4,7 +4,7 @@ PRIORITY = "required"
LICENSE = "GPL"
DEPENDS = "base-files devio"
RDEPENDS = "busybox devio"
-PR = "r89"
+PR = "r90"
SRC_URI = "file://boot/flash \
file://boot/disk \
diff --git a/packages/tasks/task-openmoko.bb b/packages/tasks/task-openmoko.bb
index f03e822db8..e7b00e3316 100644
--- a/packages/tasks/task-openmoko.bb
+++ b/packages/tasks/task-openmoko.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "OpenMoko: Tasks for the OpenMoko Linux Distribution"
SECTION = "openmoko/base"
LICENSE = "MIT"
PROVIDES = "task-openmoko-everything"
-PR = "r69"
+PR = "r70"
inherit task
@@ -139,7 +139,7 @@ RDEPENDS_task-openmoko-pim = "\
openmoko-appmanager2 \
openmoko-tasks2 \
openmoko-mediaplayer2 \
-# openmoko-messages \
+ openmoko-messages2 \
"
#
diff --git a/packages/wireless-tools/wireless-tools/wireless-tools.if-pre-up b/packages/wireless-tools/wireless-tools/wireless-tools.if-pre-up
index 11fbced462..2518a5c834 100755
--- a/packages/wireless-tools/wireless-tools/wireless-tools.if-pre-up
+++ b/packages/wireless-tools/wireless-tools/wireless-tools.if-pre-up
@@ -60,10 +60,6 @@ if [ -n "$IF_WIRELESS_RETRY" ]; then
$IWCONFIG "$IFACE" retry $IF_WIRELESS_RETRY
fi
-if [ -n "$IF_WIRELESS_ESSID" ]; then
- $IWCONFIG "$IFACE" essid "$IF_WIRELESS_ESSID"
-fi
-
if [ -n "$IF_WIRELESS_NICK" ]; then
$IWCONFIG "$IFACE" nick "$IF_WIRELESS_NICK"
fi
@@ -116,6 +112,10 @@ if [ -n "$IF_WIRELESS_CHANNEL" ]; then
$IWCONFIG "$IFACE" channel $IF_WIRELESS_CHANNEL
fi
+if [ -n "$IF_WIRELESS_ESSID" ]; then
+ $IWCONFIG "$IFACE" essid "$IF_WIRELESS_ESSID"
+fi
+
if [ -n "$IF_WIRELESS_COMMIT" ]; then
$IWCONFIG "$IFACE" commit
fi
diff --git a/packages/wireless-tools/wireless-tools_28+29pre21.bb b/packages/wireless-tools/wireless-tools_28+29pre21.bb
index b42af6fee2..41bd546b6d 100644
--- a/packages/wireless-tools/wireless-tools_28+29pre21.bb
+++ b/packages/wireless-tools/wireless-tools_28+29pre21.bb
@@ -1,5 +1,7 @@
require wireless-tools.inc
+PR = "r1"
+
SRC_URI += "http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.29.pre21.tar.gz \
file://zzz-wireless.if-pre-up"
S = "${WORKDIR}/wireless_tools.29"
diff --git a/packages/wlan-ng/wlan-ng-modules-0.2.7/2.6.22-fixes.patch b/packages/wlan-ng/wlan-ng-modules-0.2.7/2.6.22-fixes.patch
index 5027c0066f..affc6567dc 100644
--- a/packages/wlan-ng/wlan-ng-modules-0.2.7/2.6.22-fixes.patch
+++ b/packages/wlan-ng/wlan-ng-modules-0.2.7/2.6.22-fixes.patch
@@ -37,7 +37,7 @@ Index: linux-wlan-ng-0.2.7/src/prism2/driver/prism2sta.c
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
+void prism2sta_commsqual_defer(struct work_struct *work)
+{
-+ hfa384x_t *hw = container_of(work, hfa384x_t, usb_work);
++ hfa384x_t *hw = container_of(work, hfa384x_t, commsqual_bh);
+#else
void prism2sta_commsqual_defer(void *data)
{
diff --git a/packages/wlan-ng/wlan-ng-modules_0.2.7.bb b/packages/wlan-ng/wlan-ng-modules_0.2.7.bb
index cb8d96e204..bacd662680 100644
--- a/packages/wlan-ng/wlan-ng-modules_0.2.7.bb
+++ b/packages/wlan-ng/wlan-ng-modules_0.2.7.bb
@@ -1,5 +1,7 @@
require wlan-ng-modules.inc
+PR = "r1"
+
SRC_URI += "ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/linux-wlan-ng-${PV}.tar.bz2 \
file://2.6.22-fixes.patch;patch=1"
diff --git a/packages/xorg-xserver/xserver-kdrive-1.3.0.0/build-glamo.patch b/packages/xorg-xserver/xserver-kdrive-1.3.0.0/build-glamo.patch
new file mode 100644
index 0000000000..208e599ee1
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-1.3.0.0/build-glamo.patch
@@ -0,0 +1,91 @@
+Index: xorg-server-1.3.0.0/configure.ac
+===================================================================
+--- xorg-server-1.3.0.0.orig/configure.ac 2007-11-22 17:40:34.000000000 +0800
++++ xorg-server-1.3.0.0/configure.ac 2007-11-22 17:59:56.000000000 +0800
+@@ -1576,6 +1576,7 @@
+ AM_CONDITIONAL(H3600_TS, false)
+ AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes])
+ AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes])
++AM_CONDITIONAL(KDRIVEGLAMO, [test x"$ac_cv_header_sys_vm86_h" = xyes -o x"$ac_cv_header_linux_fb_h" = xyes])
+
+ # Xephyr needs nanosleep() which is in librt on Solaris
+ AC_CHECK_FUNC([nanosleep], [],
+@@ -1824,6 +1825,7 @@
+ hw/kdrive/chips/Makefile
+ hw/kdrive/ephyr/Makefile
+ hw/kdrive/epson/Makefile
++hw/kdrive/glamo/Makefile
+ hw/kdrive/fake/Makefile
+ hw/kdrive/fbdev/Makefile
+ hw/kdrive/w100/Makefile
+Index: xorg-server-1.3.0.0/hw/kdrive/Makefile.am
+===================================================================
+--- xorg-server-1.3.0.0.orig/hw/kdrive/Makefile.am 2007-11-22 17:40:34.000000000 +0800
++++ xorg-server-1.3.0.0/hw/kdrive/Makefile.am 2007-11-22 17:54:54.000000000 +0800
+@@ -7,6 +7,10 @@
+ FBDEV_SUBDIRS = fbdev epson
+ endif
+
++if KDRIVEGLAMO
++GLAMO_SUBDIRS = glamo
++endif
++
+ if KDRIVEW100
+ W100_SUBDIRS = w100
+ endif
+@@ -30,8 +34,9 @@
+ $(FBDEV_SUBDIRS) \
+ $(W100_SUBDIRS) \
+ $(VESA_SUBDIRS) \
++ $(GLAMO_SUBDIRS) \
+ $(XEPHYR_SUBDIRS) \
+ fake
+
+ DIST_SUBDIRS = vesa ati chips epson i810 mach64 mga neomagic nvidia pm2 r128 \
+- smi via fbdev sdl ephyr src linux fake sis300
++ smi via fbdev sdl ephyr src linux fake sis300 glamo
+Index: xorg-server-1.3.0.0/hw/kdrive/glamo/Makefile.am
+===================================================================
+--- xorg-server-1.3.0.0.orig/hw/kdrive/glamo/Makefile.am 2007-11-22 17:40:34.000000000 +0800
++++ xorg-server-1.3.0.0/hw/kdrive/glamo/Makefile.am 2007-11-22 17:40:35.000000000 +0800
+@@ -41,11 +41,14 @@
+
+ Xglamo_LDADD = \
+ $(GLAMO_LIBS) \
+- @KDRIVE_LIBS@
++ @KDRIVE_LIBS@ \
++ @XSERVER_LIBS@
+
+ Xglamo_DEPENDENCIES = \
+ libglamo.a \
+- @KDRIVE_LOCAL_LIBS@
++ $(FBDEV_LIBS) \
++ $(VESA_LIBS) \
++ $(DRI_LIBS)
+
+ relink:
+ rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS)
+Index: xorg-server-1.3.0.0/hw/kdrive/glamo/glamo_stub.c
+===================================================================
+--- xorg-server-1.3.0.0.orig/hw/kdrive/glamo/glamo_stub.c 2007-11-22 17:40:34.000000000 +0800
++++ xorg-server-1.3.0.0/hw/kdrive/glamo/glamo_stub.c 2007-11-22 17:40:35.000000000 +0800
+@@ -49,16 +49,10 @@
+ void
+ InitInput(int argc, char **argv)
+ {
+- KdKeyboardInfo *ki;
+-
+- KdAddKeyboardDriver(&LinuxKeyboardDriver);
+- KdAddPointerDriver(&LinuxMouseDriver);
+-#ifdef TSLIB
+- KdAddPointerDriver(&TsDriver);
++ KdInitInput (&LinuxEvdevMouseFuncs, &LinuxEvdevKeyboardFuncs);
++#ifdef TOUCHSCREEN
++ KdAddMouseDriver (&TsFuncs);
+ #endif
+-
+- ki = KdParseKeyboard("keybd");
+- KdAddKeyboard(ki);
+ }
+
+ void
diff --git a/packages/xorg-xserver/xserver-kdrive-1.3.0.0/smedia-glamo.patch b/packages/xorg-xserver/xserver-kdrive-1.3.0.0/smedia-glamo.patch
new file mode 100644
index 0000000000..4ad3573c95
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive-1.3.0.0/smedia-glamo.patch
@@ -0,0 +1,3702 @@
+Index: xserver/hw/kdrive/glamo/Makefile.am
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ xserver/hw/kdrive/glamo/Makefile.am 2007-09-25 19:32:10.000000000 +0800
+@@ -0,0 +1,51 @@
++if KDRIVEFBDEV
++FBDEV_INCLUDES =-I$(top_srcdir)/hw/kdrive/fbdev
++FBDEV_LIBS = $(top_builddir)/hw/kdrive/fbdev/libfbdev.a
++endif
++
++if KDRIVEVESA
++VESA_INCLUDES = -I$(top_srcdir)/hw/kdrive/vesa
++VESA_LIBS = $(top_builddir)/hw/kdrive/vesa/libvesa.a
++endif
++
++INCLUDES = \
++ @KDRIVE_INCS@ \
++ $(DRI_INCLUDES) \
++ $(FBDEV_INCLUDES) \
++ $(VESA_INCLUDES) \
++ @KDRIVE_CFLAGS@
++
++bin_PROGRAMS = Xglamo
++
++noinst_LIBRARIES = libglamo.a
++
++libglamo_a_SOURCES = \
++ glamo_dma.c \
++ glamo_dma.h \
++ glamo_draw.c \
++ glamo_draw.h \
++ glamo.c \
++ glamo.h \
++ glamo-regs.h \
++ glamo_video.c
++
++Xglamo_SOURCES = \
++ glamo_stub.c
++
++GLAMO_LIBS = \
++ libglamo.a \
++ $(FBDEV_LIBS) \
++ $(VESA_LIBS) \
++ $(DRI_LIBS) \
++ @KDRIVE_LIBS@
++
++Xglamo_LDADD = \
++ $(GLAMO_LIBS) \
++ @KDRIVE_LIBS@
++
++Xglamo_DEPENDENCIES = \
++ libglamo.a \
++ @KDRIVE_LOCAL_LIBS@
++
++relink:
++ rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS)
+Index: xserver/hw/kdrive/glamo/glamo-regs.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ xserver/hw/kdrive/glamo/glamo-regs.h 2007-09-25 19:00:20.000000000 +0800
+@@ -0,0 +1,685 @@
++#ifndef _GLAMO_REGS_H
++#define _GLAMO_REGS_H
++
++/* Smedia Glamo 336x/337x driver
++ *
++ * (C) 2007 by OpenMoko, Inc.
++ * Author: Harald Welte <laforge@openmoko.org>
++ * All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++enum glamo_regster_offsets {
++ GLAMO_REGOFS_GENERIC = 0x0000,
++ GLAMO_REGOFS_HOSTBUS = 0x0200,
++ GLAMO_REGOFS_MEMORY = 0x0300,
++ GLAMO_REGOFS_VIDCAP = 0x0400,
++ GLAMO_REGOFS_ISP = 0x0500,
++ GLAMO_REGOFS_JPEG = 0x0800,
++ GLAMO_REGOFS_MPEG = 0x0c00,
++ GLAMO_REGOFS_LCD = 0x1100,
++ GLAMO_REGOFS_MMC = 0x1400,
++ GLAMO_REGOFS_MPROC0 = 0x1500,
++ GLAMO_REGOFS_MPROC1 = 0x1580,
++ GLAMO_REGOFS_CMDQUEUE = 0x1600,
++ GLAMO_REGOFS_RISC = 0x1680,
++ GLAMO_REGOFS_2D = 0x1700,
++ GLAMO_REGOFS_3D = 0x1b00,
++};
++
++
++enum glamo_register_generic {
++ GLAMO_REG_GCONF1 = 0x0000,
++ GLAMO_REG_GCONF2 = 0x0002,
++#define GLAMO_REG_DEVICE_ID GLAMO_REG_GCONF2
++ GLAMO_REG_GCONF3 = 0x0004,
++#define GLAMO_REG_REVISION_ID GLAMO_REG_GCONF3
++ GLAMO_REG_IRQ_GEN1 = 0x0006,
++#define GLAMO_REG_IRQ_ENABLE GLAMO_REG_IRQ_GEN1
++ GLAMO_REG_IRQ_GEN2 = 0x0008,
++#define GLAMO_REG_IRQ_SET GLAMO_REG_IRQ_GEN2
++ GLAMO_REG_IRQ_GEN3 = 0x000a,
++#define GLAMO_REG_IRQ_CLEAR GLAMO_REG_IRQ_GEN3
++ GLAMO_REG_IRQ_GEN4 = 0x000c,
++#define GLAMO_REG_IRQ_STATUS GLAMO_REG_IRQ_GEN4
++ GLAMO_REG_CLOCK_HOST = 0x0010,
++ GLAMO_REG_CLOCK_MEMORY = 0x0012,
++ GLAMO_REG_CLOCK_LCD = 0x0014,
++ GLAMO_REG_CLOCK_MMC = 0x0016,
++ GLAMO_REG_CLOCK_ISP = 0x0018,
++ GLAMO_REG_CLOCK_JPEG = 0x001a,
++ GLAMO_REG_CLOCK_3D = 0x001c,
++ GLAMO_REG_CLOCK_2D = 0x001e,
++ GLAMO_REG_CLOCK_RISC1 = 0x0020, /* 3365 only? */
++ GLAMO_REG_CLOCK_RISC2 = 0x0022, /* 3365 only? */
++ GLAMO_REG_CLOCK_MPEG = 0x0024,
++ GLAMO_REG_CLOCK_MPROC = 0x0026,
++
++ GLAMO_REG_CLOCK_GEN5_1 = 0x0030,
++ GLAMO_REG_CLOCK_GEN5_2 = 0x0032,
++ GLAMO_REG_CLOCK_GEN6 = 0x0034,
++ GLAMO_REG_CLOCK_GEN7 = 0x0036,
++ GLAMO_REG_CLOCK_GEN8 = 0x0038,
++ GLAMO_REG_CLOCK_GEN9 = 0x003a,
++ GLAMO_REG_CLOCK_GEN10 = 0x003c,
++ GLAMO_REG_CLOCK_GEN11 = 0x003e,
++ GLAMO_REG_PLL_GEN1 = 0x0040,
++ GLAMO_REG_PLL_GEN2 = 0x0042,
++ GLAMO_REG_PLL_GEN3 = 0x0044,
++ GLAMO_REG_PLL_GEN4 = 0x0046,
++ GLAMO_REG_PLL_GEN5 = 0x0048,
++ GLAMO_REG_GPIO_GEN1 = 0x0050,
++ GLAMO_REG_GPIO_GEN2 = 0x0052,
++ GLAMO_REG_GPIO_GEN3 = 0x0054,
++ GLAMO_REG_GPIO_GEN4 = 0x0056,
++ GLAMO_REG_GPIO_GEN5 = 0x0058,
++ GLAMO_REG_GPIO_GEN6 = 0x005a,
++ GLAMO_REG_GPIO_GEN7 = 0x005c,
++ GLAMO_REG_GPIO_GEN8 = 0x005e,
++ GLAMO_REG_GPIO_GEN9 = 0x0060,
++ GLAMO_REG_GPIO_GEN10 = 0x0062,
++ GLAMO_REG_DFT_GEN1 = 0x0070,
++ GLAMO_REG_DFT_GEN2 = 0x0072,
++ GLAMO_REG_DFT_GEN3 = 0x0074,
++ GLAMO_REG_DFT_GEN4 = 0x0076,
++
++ GLAMO_REG_DFT_GEN5 = 0x01e0,
++ GLAMO_REG_DFT_GEN6 = 0x01f0,
++};
++
++#define GLAMO_REG_HOSTBUS(x) (GLAMO_REGOFS_HOSTBUS-2+(x*2))
++
++#define REG_MEM(x) (GLAMO_REGOFS_MEMORY+(x))
++#define GLAMO_REG_MEM_TIMING(x) (GLAMO_REG_MEM_TIMING1-2+(x*2))
++
++enum glamo_register_mem {
++ GLAMO_REG_MEM_TYPE = REG_MEM(0x00),
++ GLAMO_REG_MEM_GEN = REG_MEM(0x02),
++ GLAMO_REG_MEM_TIMING1 = REG_MEM(0x04),
++ GLAMO_REG_MEM_TIMING2 = REG_MEM(0x06),
++ GLAMO_REG_MEM_TIMING3 = REG_MEM(0x08),
++ GLAMO_REG_MEM_TIMING4 = REG_MEM(0x0a),
++ GLAMO_REG_MEM_TIMING5 = REG_MEM(0x0c),
++ GLAMO_REG_MEM_TIMING6 = REG_MEM(0x0e),
++ GLAMO_REG_MEM_TIMING7 = REG_MEM(0x10),
++ GLAMO_REG_MEM_TIMING8 = REG_MEM(0x12),
++ GLAMO_REG_MEM_TIMING9 = REG_MEM(0x14),
++ GLAMO_REG_MEM_TIMING10 = REG_MEM(0x16),
++ GLAMO_REG_MEM_TIMING11 = REG_MEM(0x18),
++ GLAMO_REG_MEM_POWER1 = REG_MEM(0x1a),
++ GLAMO_REG_MEM_POWER2 = REG_MEM(0x1c),
++ GLAMO_REG_MEM_LCD_BUF1 = REG_MEM(0x1e),
++ GLAMO_REG_MEM_LCD_BUF2 = REG_MEM(0x20),
++ GLAMO_REG_MEM_LCD_BUF3 = REG_MEM(0x22),
++ GLAMO_REG_MEM_LCD_BUF4 = REG_MEM(0x24),
++ GLAMO_REG_MEM_BIST1 = REG_MEM(0x26),
++ GLAMO_REG_MEM_BIST2 = REG_MEM(0x28),
++ GLAMO_REG_MEM_BIST3 = REG_MEM(0x2a),
++ GLAMO_REG_MEM_BIST4 = REG_MEM(0x2c),
++ GLAMO_REG_MEM_BIST5 = REG_MEM(0x2e),
++ GLAMO_REG_MEM_MAH1 = REG_MEM(0x30),
++ GLAMO_REG_MEM_MAH2 = REG_MEM(0x32),
++ GLAMO_REG_MEM_DRAM1 = REG_MEM(0x34),
++ GLAMO_REG_MEM_DRAM2 = REG_MEM(0x36),
++ GLAMO_REG_MEM_CRC = REG_MEM(0x38),
++};
++
++#define GLAMO_MEM_TYPE_MASK 0x03
++
++enum glamo_reg_mem_dram1 {
++ GLAMO_MEM_DRAM1_EN_SDRAM_CLK = (1 << 11),
++ GLAMO_MEM_DRAM1_SELF_REFRESH = (1 << 12),
++};
++
++enum glamo_reg_mem_dram2 {
++ GLAMO_MEM_DRAM2_DEEP_PWRDOWN = (1 << 12),
++};
++
++enum glamo_irq {
++ GLAMO_IRQ_HOSTBUS = 0x0001,
++ GLAMO_IRQ_JPEG = 0x0002,
++ GLAMO_IRQ_MPEG = 0x0004,
++ GLAMO_IRQ_MPROC1 = 0x0008,
++ GLAMO_IRQ_MPROC0 = 0x0010,
++ GLAMO_IRQ_CMDQUEUE = 0x0020,
++ GLAMO_IRQ_2D = 0x0040,
++ GLAMO_IRQ_MMC = 0x0080,
++ GLAMO_IRQ_RISC = 0x0100,
++};
++
++enum glamo_reg_clock_host {
++ GLAMO_CLOCK_HOST_DG_BCLK = 0x0001,
++ GLAMO_CLOCK_HOST_DG_M0CLK = 0x0004,
++ GLAMO_CLOCK_HOST_RESET = 0x1000,
++};
++
++enum glamo_reg_clock_mem {
++ GLAMO_CLOCK_MEM_DG_M1CLK = 0x0001,
++ GLAMO_CLOCK_MEM_EN_M1CLK = 0x0002,
++ GLAMO_CLOCK_MEM_DG_MOCACLK = 0x0004,
++ GLAMO_CLOCK_MEM_EN_MOCACLK = 0x0008,
++ GLAMO_CLOCK_MEM_RESET = 0x1000,
++ GLAMO_CLOCK_MOCA_RESET = 0x2000,
++};
++
++enum glamo_reg_clock_lcd {
++ GLAMO_CLOCK_LCD_DG_DCLK = 0x0001,
++ GLAMO_CLOCK_LCD_EN_DCLK = 0x0002,
++ GLAMO_CLOCK_LCD_DG_DMCLK = 0x0004,
++ GLAMO_CLOCK_LCD_EN_DMCLK = 0x0008,
++ //
++ GLAMO_CLOCK_LCD_EN_DHCLK = 0x0020,
++ GLAMO_CLOCK_LCD_DG_M5CLK = 0x0040,
++ GLAMO_CLOCK_LCD_EN_M5CLK = 0x0080,
++ GLAMO_CLOCK_LCD_RESET = 0x1000,
++};
++
++enum glamo_reg_clock_mmc {
++ GLAMO_CLOCK_MMC_DG_TCLK = 0x0001,
++ GLAMO_CLOCK_MMC_EN_TCLK = 0x0002,
++ GLAMO_CLOCK_MMC_DG_M9CLK = 0x0004,
++ GLAMO_CLOCK_MMC_EN_M9CLK = 0x0008,
++ GLAMO_CLOCK_MMC_RESET = 0x1000,
++};
++
++enum glamo_reg_clock_isp {
++ GLAMO_CLOCK_ISP_DG_I1CLK = 0x0001,
++ GLAMO_CLOCK_ISP_EN_I1CLK = 0x0002,
++ GLAMO_CLOCK_ISP_DG_CCLK = 0x0004,
++ GLAMO_CLOCK_ISP_EN_CCLK = 0x0008,
++ //
++ GLAMO_CLOCK_ISP_EN_SCLK = 0x0020,
++ GLAMO_CLOCK_ISP_DG_M2CLK = 0x0040,
++ GLAMO_CLOCK_ISP_EN_M2CLK = 0x0080,
++ GLAMO_CLOCK_ISP_DG_M15CLK = 0x0100,
++ GLAMO_CLOCK_ISP_EN_M15CLK = 0x0200,
++ GLAMO_CLOCK_ISP1_RESET = 0x1000,
++ GLAMO_CLOCK_ISP2_RESET = 0x2000,
++};
++
++enum glamo_reg_clock_jpeg {
++ GLAMO_CLOCK_JPEG_DG_JCLK = 0x0001,
++ GLAMO_CLOCK_JPEG_EN_JCLK = 0x0002,
++ GLAMO_CLOCK_JPEG_DG_M3CLK = 0x0004,
++ GLAMO_CLOCK_JPEG_EN_M3CLK = 0x0008,
++ GLAMO_CLOCK_JPEG_RESET = 0x1000,
++};
++
++enum glamo_reg_clock_2d {
++ GLAMO_CLOCK_2D_DG_GCLK = 0x0001,
++ GLAMO_CLOCK_2D_EN_GCLK = 0x0002,
++ GLAMO_CLOCK_2D_DG_M7CLK = 0x0004,
++ GLAMO_CLOCK_2D_EN_M7CLK = 0x0008,
++ GLAMO_CLOCK_2D_DG_M6CLK = 0x0010,
++ GLAMO_CLOCK_2D_EN_M6CLK = 0x0020,
++ GLAMO_CLOCK_2D_RESET = 0x1000,
++ GLAMO_CLOCK_2D_CQ_RESET = 0x2000,
++};
++
++enum glamo_reg_clock_3d {
++ GLAMO_CLOCK_3D_DG_ECLK = 0x0001,
++ GLAMO_CLOCK_3D_EN_ECLK = 0x0002,
++ GLAMO_CLOCK_3D_DG_RCLK = 0x0004,
++ GLAMO_CLOCK_3D_EN_RCLK = 0x0008,
++ GLAMO_CLOCK_3D_DG_M8CLK = 0x0010,
++ GLAMO_CLOCK_3D_EN_M8CLK = 0x0020,
++ GLAMO_CLOCK_3D_BACK_RESET = 0x1000,
++ GLAMO_CLOCK_3D_FRONT_RESET = 0x2000,
++};
++
++enum glamo_reg_clock_mpeg {
++ GLAMO_CLOCK_MPEG_DG_X0CLK = 0x0001,
++ GLAMO_CLOCK_MPEG_EN_X0CLK = 0x0002,
++ GLAMO_CLOCK_MPEG_DG_X1CLK = 0x0004,
++ GLAMO_CLOCK_MPEG_EN_X1CLK = 0x0008,
++ GLAMO_CLOCK_MPEG_DG_X2CLK = 0x0010,
++ GLAMO_CLOCK_MPEG_EN_X2CLK = 0x0020,
++ GLAMO_CLOCK_MPEG_DG_X3CLK = 0x0040,
++ GLAMO_CLOCK_MPEG_EN_X3CLK = 0x0080,
++ GLAMO_CLOCK_MPEG_DG_X4CLK = 0x0100,
++ GLAMO_CLOCK_MPEG_EN_X4CLK = 0x0200,
++ GLAMO_CLOCK_MPEG_DG_X6CLK = 0x0400,
++ GLAMO_CLOCK_MPEG_EN_X6CLK = 0x0800,
++ GLAMO_CLOCK_MPEG_ENC_RESET = 0x1000,
++ GLAMO_CLOCK_MPEG_DEC_RESET = 0x2000,
++};
++
++enum glamo_reg_clock51 {
++ GLAMO_CLOCK_GEN51_EN_DIV_MCLK = 0x0001,
++ GLAMO_CLOCK_GEN51_EN_DIV_SCLK = 0x0002,
++ GLAMO_CLOCK_GEN51_EN_DIV_JCLK = 0x0004,
++ GLAMO_CLOCK_GEN51_EN_DIV_DCLK = 0x0008,
++ GLAMO_CLOCK_GEN51_EN_DIV_DMCLK = 0x0010,
++ GLAMO_CLOCK_GEN51_EN_DIV_DHCLK = 0x0020,
++ GLAMO_CLOCK_GEN51_EN_DIV_GCLK = 0x0040,
++ GLAMO_CLOCK_GEN51_EN_DIV_TCLK = 0x0080,
++ /* FIXME: higher bits */
++};
++
++enum glamo_reg_clock52 {
++ GLAMO_CLOCK_GEN52_EN_DIV_ACLK = 0x0001,
++ GLAMO_CLOCK_GEN52_EN_DIV_AMCLK = 0x0002,
++ GLAMO_CLOCK_GEN52_EN_DIV_OCLK = 0x0004,
++ GLAMO_CLOCK_GEN52_EN_DIV_ZCLK = 0x0008,
++ GLAMO_CLOCK_GEN52_EN_DIV_ICLK = 0x0010,
++ /* FIXME: higher bits */
++};
++
++enum glamo_reg_hostbus2 {
++ GLAMO_HOSTBUS2_MMIO_EN_ISP = 0x0001,
++ GLAMO_HOSTBUS2_MMIO_EN_JPEG = 0x0002,
++ GLAMO_HOSTBUS2_MMIO_EN_MPEG = 0x0004,
++ GLAMO_HOSTBUS2_MMIO_EN_LCD = 0x0008,
++ GLAMO_HOSTBUS2_MMIO_EN_MMC = 0x0010,
++ GLAMO_HOSTBUS2_MMIO_EN_MICROP0 = 0x0020,
++ GLAMO_HOSTBUS2_MMIO_EN_MICROP1 = 0x0040,
++ GLAMO_HOSTBUS2_MMIO_EN_CQ = 0x0080,
++ GLAMO_HOSTBUS2_MMIO_EN_RISC = 0x0100,
++ GLAMO_HOSTBUS2_MMIO_EN_2D = 0x0200,
++ GLAMO_HOSTBUS2_MMIO_EN_3D = 0x0400,
++};
++
++/* LCD Controller */
++
++#define REG_LCD(x) (x)
++enum glamo_reg_lcd {
++ GLAMO_REG_LCD_MODE1 = REG_LCD(0x00),
++ GLAMO_REG_LCD_MODE2 = REG_LCD(0x02),
++ GLAMO_REG_LCD_MODE3 = REG_LCD(0x04),
++ GLAMO_REG_LCD_WIDTH = REG_LCD(0x06),
++ GLAMO_REG_LCD_HEIGHT = REG_LCD(0x08),
++ GLAMO_REG_LCD_POLARITY = REG_LCD(0x0a),
++ GLAMO_REG_LCD_A_BASE1 = REG_LCD(0x0c),
++ GLAMO_REG_LCD_A_BASE2 = REG_LCD(0x0e),
++ GLAMO_REG_LCD_B_BASE1 = REG_LCD(0x10),
++ GLAMO_REG_LCD_B_BASE2 = REG_LCD(0x12),
++ GLAMO_REG_LCD_C_BASE1 = REG_LCD(0x14),
++ GLAMO_REG_LCD_C_BASE2 = REG_LCD(0x16),
++ GLAMO_REG_LCD_PITCH = REG_LCD(0x18),
++ /* RES */
++ GLAMO_REG_LCD_HORIZ_TOTAL = REG_LCD(0x1c),
++ /* RES */
++ GLAMO_REG_LCD_HORIZ_RETR_START = REG_LCD(0x20),
++ /* RES */
++ GLAMO_REG_LCD_HORIZ_RETR_END = REG_LCD(0x24),
++ /* RES */
++ GLAMO_REG_LCD_HORIZ_DISP_START = REG_LCD(0x28),
++ /* RES */
++ GLAMO_REG_LCD_HORIZ_DISP_END = REG_LCD(0x2c),
++ /* RES */
++ GLAMO_REG_LCD_VERT_TOTAL = REG_LCD(0x30),
++ /* RES */
++ GLAMO_REG_LCD_VERT_RETR_START = REG_LCD(0x34),
++ /* RES */
++ GLAMO_REG_LCD_VERT_RETR_END = REG_LCD(0x38),
++ /* RES */
++ GLAMO_REG_LCD_VERT_DISP_START = REG_LCD(0x3c),
++ /* RES */
++ GLAMO_REG_LCD_VERT_DISP_END = REG_LCD(0x40),
++ /* RES */
++ GLAMO_REG_LCD_POL = REG_LCD(0x44),
++ GLAMO_REG_LCD_DATA_START = REG_LCD(0x46),
++ GLAMO_REG_LCD_FRATE_CONTRO = REG_LCD(0x48),
++ GLAMO_REG_LCD_DATA_CMD_HDR = REG_LCD(0x4a),
++ GLAMO_REG_LCD_SP_START = REG_LCD(0x4c),
++ GLAMO_REG_LCD_SP_END = REG_LCD(0x4e),
++ GLAMO_REG_LCD_CURSOR_BASE1 = REG_LCD(0x50),
++ GLAMO_REG_LCD_CURSOR_BASE2 = REG_LCD(0x52),
++ GLAMO_REG_LCD_CURSOR_PITCH = REG_LCD(0x54),
++ GLAMO_REG_LCD_CURSOR_X_SIZE = REG_LCD(0x56),
++ GLAMO_REG_LCD_CURSOR_Y_SIZE = REG_LCD(0x58),
++ GLAMO_REG_LCD_CURSOR_X_POS = REG_LCD(0x5a),
++ GLAMO_REG_LCD_CURSOR_Y_POS = REG_LCD(0x5c),
++ GLAMO_REG_LCD_CURSOR_PRESET = REG_LCD(0x5e),
++ GLAMO_REG_LCD_CURSOR_FG_COLOR = REG_LCD(0x60),
++ /* RES */
++ GLAMO_REG_LCD_CURSOR_BG_COLOR = REG_LCD(0x64),
++ /* RES */
++ GLAMO_REG_LCD_CURSOR_DST_COLOR = REG_LCD(0x68),
++ /* RES */
++ GLAMO_REG_LCD_STATUS1 = REG_LCD(0x80),
++ GLAMO_REG_LCD_STATUS2 = REG_LCD(0x82),
++ GLAMO_REG_LCD_STATUS3 = REG_LCD(0x84),
++ GLAMO_REG_LCD_STATUS4 = REG_LCD(0x86),
++ /* RES */
++ GLAMO_REG_LCD_COMMAND1 = REG_LCD(0xa0),
++ GLAMO_REG_LCD_COMMAND2 = REG_LCD(0xa2),
++ /* RES */
++ GLAMO_REG_LCD_WFORM_DELAY1 = REG_LCD(0xb0),
++ GLAMO_REG_LCD_WFORM_DELAY2 = REG_LCD(0xb2),
++ /* RES */
++ GLAMO_REG_LCD_GAMMA_CORR = REG_LCD(0x100),
++ /* RES */
++ GLAMO_REG_LCD_GAMMA_R_ENTRY01 = REG_LCD(0x110),
++ GLAMO_REG_LCD_GAMMA_R_ENTRY23 = REG_LCD(0x112),
++ GLAMO_REG_LCD_GAMMA_R_ENTRY45 = REG_LCD(0x114),
++ GLAMO_REG_LCD_GAMMA_R_ENTRY67 = REG_LCD(0x116),
++ GLAMO_REG_LCD_GAMMA_R_ENTRY8 = REG_LCD(0x118),
++ /* RES */
++ GLAMO_REG_LCD_GAMMA_G_ENTRY01 = REG_LCD(0x130),
++ GLAMO_REG_LCD_GAMMA_G_ENTRY23 = REG_LCD(0x132),
++ GLAMO_REG_LCD_GAMMA_G_ENTRY45 = REG_LCD(0x134),
++ GLAMO_REG_LCD_GAMMA_G_ENTRY67 = REG_LCD(0x136),
++ GLAMO_REG_LCD_GAMMA_G_ENTRY8 = REG_LCD(0x138),
++ /* RES */
++ GLAMO_REG_LCD_GAMMA_B_ENTRY01 = REG_LCD(0x150),
++ GLAMO_REG_LCD_GAMMA_B_ENTRY23 = REG_LCD(0x152),
++ GLAMO_REG_LCD_GAMMA_B_ENTRY45 = REG_LCD(0x154),
++ GLAMO_REG_LCD_GAMMA_B_ENTRY67 = REG_LCD(0x156),
++ GLAMO_REG_LCD_GAMMA_B_ENTRY8 = REG_LCD(0x158),
++ /* RES */
++ GLAMO_REG_LCD_SRAM_DRIVING1 = REG_LCD(0x160),
++ GLAMO_REG_LCD_SRAM_DRIVING2 = REG_LCD(0x162),
++ GLAMO_REG_LCD_SRAM_DRIVING3 = REG_LCD(0x164),
++};
++
++enum glamo_reg_lcd_mode1 {
++ GLAMO_LCD_MODE1_PWRSAVE = 0x0001,
++ GLAMO_LCD_MODE1_PARTIAL_PRT = 0x0002,
++ GLAMO_LCD_MODE1_HWFLIP = 0x0004,
++ GLAMO_LCD_MODE1_LCD2 = 0x0008,
++ /* RES */
++ GLAMO_LCD_MODE1_PARTIAL_MODE = 0x0020,
++ GLAMO_LCD_MODE1_CURSOR_DSTCOLOR = 0x0040,
++ GLAMO_LCD_MODE1_PARTIAL_ENABLE = 0x0080,
++ GLAMO_LCD_MODE1_TVCLK_IN_ENABLE = 0x0100,
++ GLAMO_LCD_MODE1_HSYNC_HIGH_ACT = 0x0200,
++ GLAMO_LCD_MODE1_VSYNC_HIGH_ACT = 0x0400,
++ GLAMO_LCD_MODE1_HSYNC_FLIP = 0x0800,
++ GLAMO_LCD_MODE1_GAMMA_COR_EN = 0x1000,
++ GLAMO_LCD_MODE1_DITHER_EN = 0x2000,
++ GLAMO_LCD_MODE1_CURSOR_EN = 0x4000,
++ GLAMO_LCD_MODE1_ROTATE_EN = 0x8000,
++};
++
++enum glamo_reg_lcd_mode2 {
++ GLAMO_LCD_MODE2_CRC_CHECK_EN = 0x0001,
++ GLAMO_LCD_MODE2_DCMD_PER_LINE = 0x0002,
++ GLAMO_LCD_MODE2_NOUSE_BDEF = 0x0004,
++ GLAMO_LCD_MODE2_OUT_POS_MODE = 0x0008,
++ GLAMO_LCD_MODE2_FRATE_CTRL_EN = 0x0010,
++ GLAMO_LCD_MODE2_SINGLE_BUFFER = 0x0020,
++ GLAMO_LCD_MODE2_SER_LSB_TO_MSB = 0x0040,
++ /* FIXME */
++};
++
++enum glamo_reg_lcd_mode3 {
++ /* LCD color source data format */
++ GLAMO_LCD_SRC_RGB565 = 0x0000,
++ GLAMO_LCD_SRC_ARGB1555 = 0x4000,
++ GLAMO_LCD_SRC_ARGB4444 = 0x8000,
++ /* interface type */
++ GLAMO_LCD_MODE3_LCD = 0x1000,
++ GLAMO_LCD_MODE3_RGB = 0x0800,
++ GLAMO_LCD_MODE3_CPU = 0x0000,
++ /* mode */
++ GLAMO_LCD_MODE3_RGB332 = 0x0000,
++ GLAMO_LCD_MODE3_RGB444 = 0x0100,
++ GLAMO_LCD_MODE3_RGB565 = 0x0200,
++ GLAMO_LCD_MODE3_RGB666 = 0x0300,
++ /* depth */
++ GLAMO_LCD_MODE3_6BITS = 0x0000,
++ GLAMO_LCD_MODE3_8BITS = 0x0010,
++ GLAMO_LCD_MODE3_9BITS = 0x0020,
++ GLAMO_LCD_MODE3_16BITS = 0x0030,
++ GLAMO_LCD_MODE3_18BITS = 0x0040,
++};
++
++enum glamo_lcd_cmd_type {
++ GLAMO_LCD_CMD_TYPE_DISP = 0x0000,
++ GLAMO_LCD_CMD_TYPE_PARALLEL = 0x4000,
++ GLAMO_LCD_CMD_TYPE_SERIAL = 0x8000,
++ GLAMO_LCD_CMD_TYPE_SERIAL_DIRECT= 0xc000,
++};
++#define GLAMO_LCD_CMD_TYPE_MASK 0xc000
++
++enum glamo_lcd_cmds {
++ GLAMO_LCD_CMD_DATA_DISP_FIRE = 0x00,
++ GLAMO_LCD_CMD_DATA_DISP_SYNC = 0x01, /* RGB only */
++ /* switch to command mode, no display */
++ GLAMO_LCD_CMD_DATA_FIRE_NO_DISP = 0x02,
++ /* display until VSYNC, switch to command */
++ GLAMO_LCD_CMD_DATA_FIRE_VSYNC = 0x11,
++ /* display until HSYNC, switch to command */
++ GLAMO_LCD_CMD_DATA_FIRE_HSYNC = 0x12,
++ /* display until VSYNC, 1 black frame, VSYNC, switch to command */
++ GLAMO_LCD_CMD_DATA_FIRE_VSYNC_B = 0x13,
++ /* don't care about display and switch to command */
++ GLAMO_LCD_CMD_DATA_FIRE_FREE = 0x14, /* RGB only */
++ /* don't care about display, keep data display but disable data,
++ * and switch to command */
++ GLAMO_LCD_CMD_DATA_FIRE_FREE_D = 0x15, /* RGB only */
++};
++
++enum glamo_core_revisions {
++ GLAMO_CORE_REV_A0 = 0x0000,
++ GLAMO_CORE_REV_A1 = 0x0001,
++ GLAMO_CORE_REV_A2 = 0x0002,
++ GLAMO_CORE_REV_A3 = 0x0003,
++};
++
++#define REG_ISP(x) (GLAMO_REGOFS_ISP+(x))
++
++enum glamo_register_isp {
++ GLAMO_REG_ISP_EN1 = REG_ISP(0x00),
++ GLAMO_REG_ISP_EN2 = REG_ISP(0x02),
++ GLAMO_REG_ISP_EN3 = REG_ISP(0x04),
++ GLAMO_REG_ISP_EN4 = REG_ISP(0x06),
++ GLAMO_REG_ISP_CAP_0_ADDRL = REG_ISP(0x08),
++ GLAMO_REG_ISP_CAP_0_ADDRH = REG_ISP(0x0a),
++ GLAMO_REG_ISP_CAP_1_ADDRL = REG_ISP(0x0c),
++ GLAMO_REG_ISP_CAP_1_ADDRH = REG_ISP(0x0e),
++ GLAMO_REG_ISP_DEC_Y_ADDRL = REG_ISP(0x10),
++ GLAMO_REG_ISP_DEC_Y_ADDRH = REG_ISP(0x12),
++ GLAMO_REG_ISP_DEC_U_ADDRL = REG_ISP(0x14),
++ GLAMO_REG_ISP_DEC_U_ADDRH = REG_ISP(0x16),
++ GLAMO_REG_ISP_DEC_V_ADDRL = REG_ISP(0x18),
++ GLAMO_REG_ISP_DEC_V_ADDRH = REG_ISP(0x1a),
++ GLAMO_REG_ISP_CAP_SEG_HEIGHT = REG_ISP(0x1c),
++ GLAMO_REG_ISP_CAP_PITCH = REG_ISP(0x1e),
++ GLAMO_REG_ISP_CAP_HEIGHT = REG_ISP(0x20),
++ GLAMO_REG_ISP_CAP_WIDTH = REG_ISP(0x22),
++ GLAMO_REG_ISP_DEC_PITCH_Y = REG_ISP(0x24),
++ GLAMO_REG_ISP_DEC_PITCH_UV = REG_ISP(0x26),
++ GLAMO_REG_ISP_DEC_HEIGHT = REG_ISP(0x28),
++ GLAMO_REG_ISP_DEC_WIDTH = REG_ISP(0x2a),
++ GLAMO_REG_ISP_ONFLY_MODE1 = REG_ISP(0x2c),
++ GLAMO_REG_ISP_ONFLY_MODE2 = REG_ISP(0x2e),
++ GLAMO_REG_ISP_ONFLY_MODE3 = REG_ISP(0x30),
++ GLAMO_REG_ISP_ONFLY_MODE4 = REG_ISP(0x32),
++ GLAMO_REG_ISP_ONFLY_MODE5 = REG_ISP(0x34),
++ //
++ GLAMO_REG_ISP_YUV2RGB_11 = REG_ISP(0x50),
++ GLAMO_REG_ISP_YUV2RGB_21 = REG_ISP(0x52),
++ GLAMO_REG_ISP_YUV2RGB_32 = REG_ISP(0x54),
++ GLAMO_REG_ISP_YUV2RGB_33 = REG_ISP(0x56),
++ GLAMO_REG_ISP_YUV2RGB_RG = REG_ISP(0x58),
++ GLAMO_REG_ISP_YUV2RGB_B = REG_ISP(0x5a),
++ //
++ GLAMO_REG_ISP_PORT1_SCALEH = REG_ISP(0x76),
++ GLAMO_REG_ISP_PORT1_SCALEV = REG_ISP(0x78),
++ GLAMO_REG_ISP_PORT2_SCALEH = REG_ISP(0x7a),
++ GLAMO_REG_ISP_PORT2_SCALEV = REG_ISP(0x7c),
++ GLAMO_REG_ISP_DEC_SCALEH = REG_ISP(0x7e),
++ GLAMO_REG_ISP_DEC_SCALEV = REG_ISP(0x80),
++ GLAMO_REG_ISP_TURBO = REG_ISP(0x82),
++ GLAMO_REG_ISP_PORT1_CAP_EN = REG_ISP(0x84),
++ GLAMO_REG_ISP_PORT1_CAP_0_ADDRL = REG_ISP(0x86),
++ GLAMO_REG_ISP_PORT1_CAP_0_ADDRH = REG_ISP(0x88),
++ GLAMO_REG_ISP_PORT1_CAP_1_ADDRL = REG_ISP(0x8a),
++ GLAMO_REG_ISP_PORT1_CAP_1_ADDRH = REG_ISP(0x8c),
++ GLAMO_REG_ISP_PORT1_CAP_WIDTH = REG_ISP(0x8e),
++ GLAMO_REG_ISP_PORT1_CAP_HEIGHT = REG_ISP(0x90),
++ GLAMO_REG_ISP_PORT1_CAP_PITCH = REG_ISP(0x92),
++ GLAMO_REG_ISP_PORT1_CAP_CLIP_L = REG_ISP(0x94),
++ GLAMO_REG_ISP_PORT1_CAP_CLIP_R = REG_ISP(0x96),
++ GLAMO_REG_ISP_PORT1_CAP_CLIP_T = REG_ISP(0x98),
++ GLAMO_REG_ISP_PORT1_CAP_CLIP_B = REG_ISP(0x9a),
++ GLAMO_REG_ISP_PORT1_DEC_EN = REG_ISP(0x9c),
++ GLAMO_REG_ISP_PORT1_DEC_0_ADDRL = REG_ISP(0x9e),
++ GLAMO_REG_ISP_PORT1_DEC_0_ADDRH = REG_ISP(0xa0),
++ GLAMO_REG_ISP_PORT1_DEC_1_ADDRL = REG_ISP(0xa2),
++ GLAMO_REG_ISP_PORT1_DEC_1_ADDRH = REG_ISP(0xa4),
++ GLAMO_REG_ISP_PORT1_DEC_WIDTH = REG_ISP(0xa6),
++ GLAMO_REG_ISP_PORT1_DEC_HEIGHT = REG_ISP(0xa8),
++ GLAMO_REG_ISP_PORT1_DEC_PITCH = REG_ISP(0xaa),
++ GLAMO_REG_ISP_PORT1_DEC_CLIP_L = REG_ISP(0xac),
++ GLAMO_REG_ISP_PORT1_DEC_CLIP_R = REG_ISP(0xae),
++ GLAMO_REG_ISP_PORT1_DEC_CLIP_T = REG_ISP(0xb0),
++ GLAMO_REG_ISP_PORT1_DEC_CLIP_B = REG_ISP(0xb2),
++ GLAMO_REG_ISP_PORT2_EN = REG_ISP(0xb4),
++ GLAMO_REG_ISP_PORT2_0_Y_ADDRL = REG_ISP(0xb6),
++ GLAMO_REG_ISP_PORT2_0_Y_ADDRH = REG_ISP(0xb8),
++ GLAMO_REG_ISP_PORT2_0_U_ADDRL = REG_ISP(0xba),
++ GLAMO_REG_ISP_PORT2_0_U_ADDRH = REG_ISP(0xbc),
++ GLAMO_REG_ISP_PORT2_0_V_ADDRL = REG_ISP(0xbe),
++ GLAMO_REG_ISP_PORT2_0_V_ADDRH = REG_ISP(0xc0),
++ GLAMO_REG_ISP_PORT2_1_Y_ADDRL = REG_ISP(0xc2),
++ GLAMO_REG_ISP_PORT2_1_Y_ADDRH = REG_ISP(0xc4),
++ GLAMO_REG_ISP_PORT2_1_U_ADDRL = REG_ISP(0xc6),
++ GLAMO_REG_ISP_PORT2_1_U_ADDRH = REG_ISP(0xc8),
++ GLAMO_REG_ISP_PORT2_1_V_ADDRL = REG_ISP(0xca),
++ GLAMO_REG_ISP_PORT2_1_V_ADDRH = REG_ISP(0xcc),
++ GLAMO_REG_ISP_PORT2_2_Y_ADDRL = REG_ISP(0xce),
++ GLAMO_REG_ISP_PORT2_2_Y_ADDRH = REG_ISP(0xd0),
++ GLAMO_REG_ISP_PORT2_2_U_ADDRL = REG_ISP(0xd2),
++ GLAMO_REG_ISP_PORT2_2_U_ADDRH = REG_ISP(0xd4),
++ GLAMO_REG_ISP_PORT2_2_V_ADDRL = REG_ISP(0xd6),
++ GLAMO_REG_ISP_PORT2_2_V_ADDRH = REG_ISP(0xd8),
++ GLAMO_REG_ISP_PORT2_WIDTH = REG_ISP(0xda),
++ GLAMO_REG_ISP_PORT2_HEIGHT = REG_ISP(0xdc),
++ GLAMO_REG_ISP_PORT2_Y_PITCH = REG_ISP(0xde),
++ GLAMO_REG_ISP_PORT2_UV_PITCH = REG_ISP(0xe0),
++ //
++ GLAMO_REG_ISP_RGB2YUV_11_12 = REG_ISP(0xf6),
++ GLAMO_REG_ISP_RGB2YUV_13_21 = REG_ISP(0xf8),
++ GLAMO_REG_ISP_RGB2YUV_22_23 = REG_ISP(0xfa),
++ GLAMO_REG_ISP_RGB2YUV_31_32 = REG_ISP(0xfc),
++ GLAMO_REG_ISP_RGB2YUV_33 = REG_ISP(0xfe),
++ //
++ GLAMO_REG_ISP_PORT1_SCALEH_MATRIX = REG_ISP(0x10c),
++ //
++ GLAMO_REG_ISP_PORT1_SCALEV_MATRIX = REG_ISP(0x120),
++ //
++ GLAMO_REG_ISP_PORT2_SCALEH_MATRIX = REG_ISP(0x134),
++ //
++ GLAMO_REG_ISP_PORT2_SCALEV_MATRIX = REG_ISP(0x148),
++ //
++ GLAMO_REG_ISP_DEC_SCALEH_MATRIX = REG_ISP(0x15c),
++ //
++ GLAMO_REG_ISP_DEC_SCALEV_MATRIX = REG_ISP(0x170),
++ //
++ GLAMO_REG_ISP_STATUS = REG_ISP(0x184),
++};
++
++enum glamo_reg_isp_en1 {
++ GLAMO_ISP_EN1_FIRE_ISP = 0x0001,
++ GLAMO_ISP_EN1_FIRE_CAP = 0x0002,
++ GLAMO_ISP_EN1_VIDEO_CONF = 0x0004,
++ GLAMO_ISP_EN1_BAYER_SRC = 0x0008,
++ //
++ GLAMO_ISP_EN1_YUV_PACK = 0x0040,
++ GLAMO_ISP_EN1_PLANE_MODE = 0x0080,
++ GLAMO_ISP_EN1_YUV_INPUT = 0x0100,
++ GLAMO_ISP_EN1_YUV420 = 0x0200,
++ //
++};
++
++enum glamo_reg_isp_en3 {
++ //
++ GLAMO_ISP_EN3_SCALE_IMPROVE = 0x0040,
++ GLAMO_ISP_EN3_PLANE_MODE = 0x0080,
++ GLAMO_ISP_EN3_YUV_INPUT = 0x0100,
++ GLAMO_ISP_EN3_YUV420 = 0x0200,
++ //
++};
++
++enum glamo_reg_isp_port1_en {
++ GLAMO_ISP_PORT1_EN_OUTPUT = 0x0001,
++// GLAMO_ISP_PORT1_EN_SCALE = 0x0002,
++ GLAMO_ISP_PORT1_EN_CLIP = 0x0004,
++ GLAMO_ISP_PORT1_EN_CLIP_OUT = 0x0008,
++ GLAMO_ISP_PORT1_EN_DUAL_BUF = 0x0010,
++};
++
++enum glamo_reg_isp_port2_en {
++ GLAMO_ISP_PORT2_EN_OUTPUT = 0x0001,
++ GLAMO_ISP_PORT2_EN_SCALE = 0x0002,
++ GLAMO_ISP_PORT2_EN_JPEG = 0x0010,
++ GLAMO_ISP_PORT2_EN_MPEG = 0x0020,
++ GLAMO_ISP_PORT2_EN_ENCODE = 0x0040,
++ GLAMO_ISP_PORT2_EN_DECODE = 0x0080,
++};
++
++#define REG_CQ(x) (GLAMO_REGOFS_CMDQUEUE+(x))
++
++enum glamo_register_cq {
++ GLAMO_REG_CQ_BASE_ADDRL = REG_CQ(0x00),
++ GLAMO_REG_CQ_BASE_ADDRH = REG_CQ(0x02),
++ GLAMO_REG_CQ_LEN = REG_CQ(0x04),
++ GLAMO_REG_CQ_WRITE_ADDRL = REG_CQ(0x06),
++ GLAMO_REG_CQ_WRITE_ADDRH = REG_CQ(0x08),
++ GLAMO_REG_CQ_FLIP = REG_CQ(0x0a),
++ GLAMO_REG_CQ_CONTROL = REG_CQ(0x0c),
++ GLAMO_REG_CQ_READ_ADDRL = REG_CQ(0x0e),
++ GLAMO_REG_CQ_READ_ADDRH = REG_CQ(0x10),
++ GLAMO_REG_CQ_STATUS = REG_CQ(0x12),
++};
++
++#define REG_2D(x) (GLAMO_REGOFS_2D+(x))
++
++enum glamo_register_2d {
++ GLAMO_REG_2D_SRC_ADDRL = REG_2D(0x00),
++ GLAMO_REG_2D_SRC_ADDRH = REG_2D(0x02),
++ GLAMO_REG_2D_SRC_PITCH = REG_2D(0x04),
++ GLAMO_REG_2D_SRC_X = REG_2D(0x06),
++ GLAMO_REG_2D_SRC_Y = REG_2D(0x08),
++ GLAMO_REG_2D_DST_X = REG_2D(0x0a),
++ GLAMO_REG_2D_DST_Y = REG_2D(0x0c),
++ GLAMO_REG_2D_DST_ADDRL = REG_2D(0x0e),
++ GLAMO_REG_2D_DST_ADDRH = REG_2D(0x10),
++ GLAMO_REG_2D_DST_PITCH = REG_2D(0x12),
++ GLAMO_REG_2D_DST_HEIGHT = REG_2D(0x14),
++ GLAMO_REG_2D_RECT_WIDTH = REG_2D(0x16),
++ GLAMO_REG_2D_RECT_HEIGHT = REG_2D(0x18),
++ GLAMO_REG_2D_PAT_ADDRL = REG_2D(0x1a),
++ GLAMO_REG_2D_PAT_ADDRH = REG_2D(0x1c),
++ GLAMO_REG_2D_PAT_FG = REG_2D(0x1e),
++ GLAMO_REG_2D_PAT_BG = REG_2D(0x20),
++ GLAMO_REG_2D_SRC_FG = REG_2D(0x22),
++ GLAMO_REG_2D_SRC_BG = REG_2D(0x24),
++ GLAMO_REG_2D_MASK1 = REG_2D(0x26),
++ GLAMO_REG_2D_MASK2 = REG_2D(0x28),
++ GLAMO_REG_2D_MASK3 = REG_2D(0x2a),
++ GLAMO_REG_2D_MASK4 = REG_2D(0x2c),
++ GLAMO_REG_2D_ROT_X = REG_2D(0x2e),
++ GLAMO_REG_2D_ROT_Y = REG_2D(0x30),
++ GLAMO_REG_2D_LEFT_CLIP = REG_2D(0x32),
++ GLAMO_REG_2D_TOP_CLIP = REG_2D(0x34),
++ GLAMO_REG_2D_RIGHT_CLIP = REG_2D(0x36),
++ GLAMO_REG_2D_BOTTOM_CLIP = REG_2D(0x38),
++ GLAMO_REG_2D_COMMAND1 = REG_2D(0x3A),
++ GLAMO_REG_2D_COMMAND2 = REG_2D(0x3C),
++ GLAMO_REG_2D_COMMAND3 = REG_2D(0x3E),
++ GLAMO_REG_2D_SAFE = REG_2D(0x40),
++ GLAMO_REG_2D_STATUS = REG_2D(0x42),
++ GLAMO_REG_2D_ID1 = REG_2D(0x44),
++ GLAMO_REG_2D_ID2 = REG_2D(0x46),
++ GLAMO_REG_2D_ID3 = REG_2D(0x48),
++};
++
++#endif /* _GLAMO_REGS_H */
+Index: xserver/hw/kdrive/glamo/glamo.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ xserver/hw/kdrive/glamo/glamo.c 2007-09-26 17:44:47.000000000 +0800
+@@ -0,0 +1,498 @@
++/*
++ * Copyright © 2007 OpenMoko, Inc.
++ *
++ * This driver is based on Xati,
++ * Copyright © 2003 Eric Anholt
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting documentation, and
++ * that the name of the copyright holders not be used in advertising or
++ * publicity pertaining to distribution of the software without specific,
++ * written prior permission. The copyright holders make no representations
++ * about the suitability of this software for any purpose. It is provided "as
++ * is" without express or implied warranty.
++ *
++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
++ * OF THIS SOFTWARE.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <kdrive-config.h>
++#endif
++#include "glamo.h"
++#if defined(USE_DRI) && defined(GLXEXT)
++#include "glamo_sarea.h"
++#endif
++
++static Bool
++GLAMOCardInit(KdCardInfo *card)
++{
++ GLAMOCardInfo *glamoc;
++ Bool initialized = FALSE;
++
++ glamoc = xcalloc(sizeof(GLAMOCardInfo), 1);
++ if (glamoc == NULL)
++ return FALSE;
++
++#ifdef KDRIVEFBDEV
++ if (!initialized && fbdevInitialize(card, &glamoc->backend_priv.fbdev)) {
++ glamoc->use_fbdev = TRUE;
++ initialized = TRUE;
++ glamoc->backend_funcs.cardfini = fbdevCardFini;
++ glamoc->backend_funcs.scrfini = fbdevScreenFini;
++ glamoc->backend_funcs.initScreen = fbdevInitScreen;
++ glamoc->backend_funcs.finishInitScreen = fbdevFinishInitScreen;
++ glamoc->backend_funcs.createRes = fbdevCreateResources;
++ glamoc->backend_funcs.preserve = fbdevPreserve;
++ glamoc->backend_funcs.restore = fbdevRestore;
++ glamoc->backend_funcs.dpms = fbdevDPMS;
++ glamoc->backend_funcs.enable = fbdevEnable;
++ glamoc->backend_funcs.disable = fbdevDisable;
++ glamoc->backend_funcs.getColors = fbdevGetColors;
++ glamoc->backend_funcs.putColors = fbdevPutColors;
++#ifdef RANDR
++ glamoc->backend_funcs.randrSetConfig = fbdevRandRSetConfig;
++#endif
++ }
++#endif
++#ifdef KDRIVEVESA
++ if (!initialized && vesaInitialize(card, &glamoc->backend_priv.vesa)) {
++ glamoc->use_vesa = TRUE;
++ initialized = TRUE;
++ glamoc->backend_funcs.cardfini = vesaCardFini;
++ glamoc->backend_funcs.scrfini = vesaScreenFini;
++ glamoc->backend_funcs.initScreen = vesaInitScreen;
++ glamoc->backend_funcs.finishInitScreen = vesaFinishInitScreen;
++ glamoc->backend_funcs.createRes = vesaCreateResources;
++ glamoc->backend_funcs.preserve = vesaPreserve;
++ glamoc->backend_funcs.restore = vesaRestore;
++ glamoc->backend_funcs.dpms = vesaDPMS;
++ glamoc->backend_funcs.enable = vesaEnable;
++ glamoc->backend_funcs.disable = vesaDisable;
++ glamoc->backend_funcs.getColors = vesaGetColors;
++ glamoc->backend_funcs.putColors = vesaPutColors;
++#ifdef RANDR
++ glamoc->backend_funcs.randrSetConfig = vesaRandRSetConfig;
++#endif
++ }
++#endif
++
++ if (!initialized || !GLAMOMapReg(card, glamoc)) {
++ xfree(glamoc);
++ return FALSE;
++ }
++
++#ifdef USE_DRI
++ /* We demand identification by busid, not driver name */
++ glamoc->drmFd = drmOpen(NULL, glamoc->busid);
++ if (glamoc->drmFd < 0)
++ ErrorF("Failed to open DRM, DRI disabled.\n");
++#endif /* USE_DRI */
++
++ card->driver = glamoc;
++
++ glamoc->is_3362 = TRUE;
++ ErrorF("Using GLAMO 3362 card\n");
++
++ return TRUE;
++}
++
++static void
++GLAMOCardFini(KdCardInfo *card)
++{
++ GLAMOCardInfo *glamoc = (GLAMOCardInfo *)card->driver;
++
++ GLAMOUnmapReg(card, glamoc);
++ glamoc->backend_funcs.cardfini(card);
++}
++
++/*
++ * Once screen->off_screen_base is set, this function
++ * allocates the remaining memory appropriately
++ */
++
++static void
++GLAMOSetOffscreen (KdScreenInfo *screen)
++{
++ GLAMOCardInfo(screen);
++#if defined(USE_DRI) && defined(GLXEXT)
++ GLAMOScreenInfo *glamos = (GLAMOScreenInfo *)screen->driver;
++ int l;
++#endif
++ int screen_size;
++ char *mmio = glamoc->reg_base;
++
++ /* check (and adjust) pitch */
++ if (mmio)
++ {
++ int byteStride = screen->fb[0].byteStride;
++ int bitStride;
++ int pixelStride;
++ int bpp = screen->fb[0].bitsPerPixel;
++
++ /*
++ * Ensure frame buffer is correctly aligned
++ */
++ if (byteStride & 0x3f)
++ {
++ byteStride = (byteStride + 0x3f) & ~0x3f;
++ bitStride = byteStride * 8;
++ pixelStride = bitStride / bpp;
++
++ screen->fb[0].byteStride = byteStride;
++ screen->fb[0].pixelStride = pixelStride;
++ }
++ }
++
++ screen_size = screen->fb[0].byteStride * screen->height;
++
++ screen->off_screen_base = screen_size;
++
++#if defined(USE_DRI) && defined(GLXEXT)
++ /* Reserve a static area for the back buffer the same size as the
++ * visible screen. XXX: This would be better initialized in glamo_dri.c
++ * when GLX is set up, but the offscreen memory manager's allocations
++ * don't last through VT switches, while the kernel's understanding of
++ * offscreen locations does.
++ */
++ glamos->frontOffset = 0;
++ glamos->frontPitch = screen->fb[0].byteStride;
++
++ if (screen->off_screen_base + screen_size <= screen->memory_size) {
++ glamos->backOffset = screen->off_screen_base;
++ glamos->backPitch = screen->fb[0].byteStride;
++ screen->off_screen_base += screen_size;
++ }
++
++ /* Reserve the depth span for Rage 128 */
++ if (!glamoc->is_3362 && screen->off_screen_base +
++ screen->fb[0].byteStride <= screen->memory_size) {
++ glamos->spanOffset = screen->off_screen_base;
++ screen->off_screen_base += screen->fb[0].byteStride;
++ }
++
++ /* Reserve the static depth buffer, which happens to be the same
++ * bitsPerPixel as the screen.
++ */
++ if (screen->off_screen_base + screen_size <= screen->memory_size) {
++ glamos->depthOffset = screen->off_screen_base;
++ glamos->depthPitch = screen->fb[0].byteStride;
++ screen->off_screen_base += screen_size;
++ }
++
++ /* Reserve approx. half of remaining offscreen memory for local
++ * textures. Round down to a whole number of texture regions.
++ */
++ glamos->textureSize = (screen->memory_size - screen->off_screen_base) / 2;
++ l = GLAMOLog2(glamos->textureSize / GLAMO_NR_TEX_REGIONS);
++ if (l < GLAMO_LOG_TEX_GRANULARITY)
++ l = GLAMO_LOG_TEX_GRANULARITY;
++ glamos->textureSize = (glamos->textureSize >> l) << l;
++ if (glamos->textureSize >= 512 * 1024) {
++ glamos->textureOffset = screen->off_screen_base;
++ screen->off_screen_base += glamos->textureSize;
++ } else {
++ /* Minimum texture size is for 2 256x256x32bpp textures */
++ glamos->textureSize = 0;
++ }
++#endif /* USE_DRI && GLXEXT */
++}
++
++static Bool
++GLAMOScreenInit(KdScreenInfo *screen)
++{
++ GLAMOScreenInfo *glamos;
++ GLAMOCardInfo(screen);
++ Bool success = FALSE;
++
++ glamos = xcalloc(sizeof(GLAMOScreenInfo), 1);
++ if (glamos == NULL)
++ return FALSE;
++
++ glamos->glamoc = glamoc;
++ glamos->screen = screen;
++ screen->driver = glamos;
++
++ if (screen->fb[0].depth == 0)
++ screen->fb[0].depth = 16;
++#ifdef KDRIVEFBDEV
++ if (glamoc->use_fbdev) {
++ success = fbdevScreenInitialize(screen,
++ &glamos->backend_priv.fbdev);
++ }
++#endif
++#ifdef KDRIVEVESA
++ if (glamoc->use_vesa) {
++ success = vesaScreenInitialize(screen,
++ &glamos->backend_priv.vesa);
++ }
++#endif
++
++ if (!success) {
++ screen->driver = NULL;
++ xfree(glamos);
++ return FALSE;
++ }
++
++ GLAMOSetOffscreen (screen);
++
++ return TRUE;
++}
++
++#ifdef RANDR
++static Bool
++GLAMORandRSetConfig (ScreenPtr pScreen,
++ Rotation randr,
++ int rate,
++ RRScreenSizePtr pSize)
++{
++ KdScreenPriv(pScreen);
++ KdScreenInfo *screen = pScreenPriv->screen;
++ GLAMOCardInfo *glamoc = screen->card->driver;
++ Bool ret;
++
++ GLAMODrawDisable (pScreen);
++ ret = glamoc->backend_funcs.randrSetConfig(pScreen, randr, rate, pSize);
++ GLAMOSetOffscreen (screen);
++ /*
++ * Set frame buffer mapping
++ */
++ (*pScreen->ModifyPixmapHeader) (fbGetScreenPixmap (pScreen),
++ pScreen->width,
++ pScreen->height,
++ screen->fb[0].depth,
++ screen->fb[0].bitsPerPixel,
++ screen->fb[0].byteStride,
++ screen->fb[0].frameBuffer);
++
++ GLAMODrawEnable (pScreen);
++ return ret;
++}
++
++static Bool
++GLAMORandRInit (ScreenPtr pScreen)
++{
++ rrScrPrivPtr pScrPriv;
++
++ pScrPriv = rrGetScrPriv(pScreen);
++ pScrPriv->rrSetConfig = GLAMORandRSetConfig;
++ return TRUE;
++}
++#endif
++
++static void
++GLAMOScreenFini(KdScreenInfo *screen)
++{
++ GLAMOScreenInfo *glamos = (GLAMOScreenInfo *)screen->driver;
++ GLAMOCardInfo *glamoc = screen->card->driver;
++
++#ifdef XV
++ GLAMOFiniVideo(screen->pScreen);
++#endif
++
++ glamoc->backend_funcs.scrfini(screen);
++ xfree(glamos);
++ screen->driver = 0;
++}
++
++Bool
++GLAMOMapReg(KdCardInfo *card, GLAMOCardInfo *glamoc)
++{
++ glamoc->reg_base = (char *)KdMapDevice(GLAMO_REG_BASE(card),
++ GLAMO_REG_SIZE(card));
++
++ if (glamoc->reg_base == NULL)
++ return FALSE;
++
++ KdSetMappedMode(GLAMO_REG_BASE(card), GLAMO_REG_SIZE(card),
++ KD_MAPPED_MODE_REGISTERS);
++
++ return TRUE;
++}
++
++void
++GLAMOUnmapReg(KdCardInfo *card, GLAMOCardInfo *glamoc)
++{
++ if (glamoc->reg_base) {
++ KdResetMappedMode(GLAMO_REG_BASE(card), GLAMO_REG_SIZE(card),
++ KD_MAPPED_MODE_REGISTERS);
++ KdUnmapDevice((void *)glamoc->reg_base, GLAMO_REG_SIZE(card));
++ glamoc->reg_base = 0;
++ }
++}
++
++static Bool
++GLAMOInitScreen(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++
++#ifdef XV
++ GLAMOInitVideo(pScreen);
++#endif
++ return glamoc->backend_funcs.initScreen(pScreen);
++}
++
++static Bool
++GLAMOFinishInitScreen(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++
++ if (!glamoc->backend_funcs.finishInitScreen(pScreen))
++ return FALSE;
++#ifdef RANDR
++ if (!GLAMORandRInit (pScreen))
++ return FALSE;
++#endif
++ return TRUE;
++}
++
++static Bool
++GLAMOCreateResources(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++
++ return glamoc->backend_funcs.createRes(pScreen);
++}
++
++static void
++GLAMOPreserve(KdCardInfo *card)
++{
++ GLAMOCardInfo *glamoc = card->driver;
++
++ glamoc->backend_funcs.preserve(card);
++}
++
++static void
++GLAMORestore(KdCardInfo *card)
++{
++ GLAMOCardInfo *glamoc = card->driver;
++
++ GLAMOUnmapReg(card, glamoc);
++
++ glamoc->backend_funcs.restore(card);
++}
++
++static Bool
++GLAMODPMS(ScreenPtr pScreen, int mode)
++{
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++
++ return glamoc->backend_funcs.dpms(pScreen, mode);
++}
++
++static Bool
++GLAMOEnable(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++
++ if (!glamoc->backend_funcs.enable(pScreen))
++ return FALSE;
++
++ if ((glamoc->reg_base == NULL) && !GLAMOMapReg(pScreenPriv->screen->card,
++ glamoc))
++ return FALSE;
++
++ GLAMOSetOffscreen (pScreenPriv->screen);
++
++ return TRUE;
++}
++
++static void
++GLAMODisable(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++#if defined(USE_DRI) && defined(GLXEXT)
++ GLAMOScreenInfo(pScreenPriv);
++#endif /* USE_DRI && GLXEXT */
++ GLAMOCardInfo(pScreenPriv);
++
++ GLAMOUnmapReg(pScreenPriv->card, glamoc);
++
++ glamoc->backend_funcs.disable(pScreen);
++}
++
++static void
++GLAMOGetColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
++{
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++
++ glamoc->backend_funcs.getColors(pScreen, fb, n, pdefs);
++}
++
++static void
++GLAMOPutColors(ScreenPtr pScreen, int fb, int n, xColorItem *pdefs)
++{
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++
++ glamoc->backend_funcs.putColors(pScreen, fb, n, pdefs);
++}
++
++/* Compute log base 2 of val. */
++int
++GLAMOLog2(int val)
++{
++ int bits;
++
++ for (bits = 0; val != 0; val >>= 1, ++bits)
++ ;
++ return bits - 1;
++}
++
++KdCardFuncs GLAMOFuncs = {
++ GLAMOCardInit, /* cardinit */
++ GLAMOScreenInit, /* scrinit */
++ GLAMOInitScreen, /* initScreen */
++ GLAMOFinishInitScreen, /* finishInitScreen */
++ GLAMOCreateResources, /* createRes */
++ GLAMOPreserve, /* preserve */
++ GLAMOEnable, /* enable */
++ GLAMODPMS, /* dpms */
++ GLAMODisable, /* disable */
++ GLAMORestore, /* restore */
++ GLAMOScreenFini, /* scrfini */
++ GLAMOCardFini, /* cardfini */
++
++#if 0
++ GLAMOCursorInit, /* initCursor */
++ GLAMOCursorEnable, /* enableCursor */
++ GLAMOCursorDisable, /* disableCursor */
++ GLAMOCursorFini, /* finiCursor */
++ GLAMORecolorCursor, /* recolorCursor */
++#else
++ 0, /* initCursor */
++ 0, /* enableCursor */
++ 0, /* disableCursor */
++ 0, /* finiCursor */
++ 0, /* recolorCursor */
++#endif
++
++
++#if 1
++ GLAMODrawInit, /* initAccel */
++ GLAMODrawEnable, /* enableAccel */
++ GLAMODrawDisable, /* disableAccel */
++ GLAMODrawFini, /* finiAccel */
++#else
++ 0, /* initAccel */
++ 0, /* enableAccel */
++ 0, /* disableAccel */
++ 0, /* finiAccel */
++#endif
++
++ GLAMOGetColors, /* getColors */
++ GLAMOPutColors, /* putColors */
++};
+Index: xserver/hw/kdrive/glamo/glamo.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ xserver/hw/kdrive/glamo/glamo.h 2007-09-26 17:45:48.000000000 +0800
+@@ -0,0 +1,386 @@
++/*
++ * Copyright © 2007 OpenMoko, Inc.
++ *
++ * This driver is based on Xati,
++ * Copyright © 2003 Eric Anholt
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting documentation, and
++ * that the name of the copyright holders not be used in advertising or
++ * publicity pertaining to distribution of the software without specific,
++ * written prior permission. The copyright holders make no representations
++ * about the suitability of this software for any purpose. It is provided "as
++ * is" without express or implied warranty.
++ *
++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
++ * OF THIS SOFTWARE.
++ */
++
++#ifndef _GLAMO_H_
++#define _GLAMO_H_
++
++#ifdef HAVE_CONFIG_H
++#include <kdrive-config.h>
++#endif
++
++#ifdef KDRIVEFBDEV
++#include <fbdev.h>
++#endif
++#ifdef KDRIVEVESA
++#include <vesa.h>
++#endif
++
++#include "kxv.h"
++
++#undef XF86DRI
++#ifdef XF86DRI
++#define USE_DRI
++#include "xf86drm.h"
++#include "dri.h"
++#ifdef GLXEXT
++#include "GL/glxint.h"
++#include "GL/glxtokens.h"
++#include "glamo_dripriv.h"
++#endif
++#endif
++
++#define GLAMO_REG_BASE(c) ((c)->attr.address[0])
++#define GLAMO_REG_SIZE(c) (0x2400)
++
++#ifdef __powerpc__
++
++static __inline__ void
++MMIO_OUT16(__volatile__ void *base, const unsigned long offset,
++ const unsigned int val)
++{
++ __asm__ __volatile__(
++ "stwbrx %1,%2,%3\n\t"
++ "eieio"
++ : "=m" (*((volatile unsigned char *)base+offset))
++ : "r" (val), "b" (base), "r" (offset));
++}
++
++static __inline__ CARD32
++MMIO_IN16(__volatile__ void *base, const unsigned long offset)
++{
++ register unsigned int val;
++ __asm__ __volatile__(
++ "lwbrx %0,%1,%2\n\t"
++ "eieio"
++ : "=r" (val)
++ : "b" (base), "r" (offset),
++ "m" (*((volatile unsigned char *)base+offset)));
++ return val;
++}
++
++#else
++
++#define MMIO_OUT16(mmio, a, v) (*(VOL16 *)((mmio) + (a)) = (v))
++#define MMIO_IN16(mmio, a) (*(VOL16 *)((mmio) + (a)))
++
++#endif
++
++typedef volatile CARD8 VOL8;
++typedef volatile CARD16 VOL16;
++typedef volatile CARD32 VOL32;
++
++struct backend_funcs {
++ void (*cardfini)(KdCardInfo *);
++ void (*scrfini)(KdScreenInfo *);
++ Bool (*initScreen)(ScreenPtr);
++ Bool (*finishInitScreen)(ScreenPtr pScreen);
++ Bool (*createRes)(ScreenPtr);
++ void (*preserve)(KdCardInfo *);
++ void (*restore)(KdCardInfo *);
++ Bool (*dpms)(ScreenPtr, int);
++ Bool (*enable)(ScreenPtr);
++ void (*disable)(ScreenPtr);
++ void (*getColors)(ScreenPtr, int, int, xColorItem *);
++ void (*putColors)(ScreenPtr, int, int, xColorItem *);
++#ifdef RANDR
++ Bool (*randrSetConfig) (ScreenPtr, Rotation, int, RRScreenSizePtr);
++#endif
++};
++
++typedef struct _GLAMOCardInfo {
++ union {
++#ifdef KDRIVEFBDEV
++ FbdevPriv fbdev;
++#endif
++#ifdef KDRIVEVESA
++ VesaCardPrivRec vesa;
++#endif
++ } backend_priv;
++ struct backend_funcs backend_funcs;
++
++ char *reg_base;
++ Bool is_3362;
++ CARD32 crtc_pitch;
++ CARD32 crtc2_pitch;
++#ifdef USE_DRI
++ int drmFd;
++#endif /* USE_DRI */
++ Bool use_fbdev, use_vesa;
++} GLAMOCardInfo;
++
++#define getGLAMOCardInfo(kd) ((GLAMOCardInfo *) ((kd)->card->driver))
++#define GLAMOCardInfo(kd) GLAMOCardInfo *glamoc = getGLAMOCardInfo(kd)
++
++typedef struct _GLAMOCursor {
++ int width, height;
++ int xhot, yhot;
++
++ Bool has_cursor;
++ CursorPtr pCursor;
++ Pixel source, mask;
++ KdOffscreenArea *area;
++} GLAMOCursor;
++
++typedef struct _GLAMOPortPriv {
++ int brightness;
++ int saturation;
++ RegionRec clip;
++ CARD32 size;
++ KdOffscreenArea *off_screen;
++ DrawablePtr pDraw;
++ PixmapPtr pPixmap;
++
++ CARD32 src_offset;
++ CARD32 src_pitch;
++ CARD8 *src_addr;
++
++ int id;
++ int src_x1, src_y1, src_x2, src_y2;
++ int dst_x1, dst_y1, dst_x2, dst_y2;
++ int src_w, src_h, dst_w, dst_h;
++} GLAMOPortPrivRec, *GLAMOPortPrivPtr;
++
++typedef struct _dmaBuf {
++ int size;
++ int used;
++ void *address;
++#ifdef USE_DRI
++ drmBufPtr drmBuf;
++#endif
++} dmaBuf;
++
++typedef struct _GLAMOScreenInfo {
++ union {
++#ifdef KDRIVEFBDEV
++ FbdevScrPriv fbdev;
++#endif
++#ifdef KDRIVEVESA
++ VesaScreenPrivRec vesa;
++#endif
++ } backend_priv;
++ KaaScreenInfoRec kaa;
++
++ GLAMOCardInfo *glamoc;
++ KdScreenInfo *screen;
++
++ int scratch_offset;
++ int scratch_next;
++ KdOffscreenArea *scratch_area;
++
++ GLAMOCursor cursor;
++
++ KdVideoAdaptorPtr pAdaptor;
++ int num_texture_ports;
++
++ Bool using_dri; /* If we use the DRM for DMA. */
++
++ KdOffscreenArea *dma_space; /* For "DMA" from framebuffer. */
++ CARD16 *ring_addr; /* Beginning of ring buffer. */
++ int ring_write; /* Index of write ptr in ring. */
++ int ring_read; /* Index of read ptr in ring. */
++ int ring_len;
++
++ dmaBuf *indirectBuffer;
++ int indirectStart;
++
++#ifdef USE_DRI
++ Bool dma_started;
++
++ drmSize registerSize;
++ drmHandle registerHandle;
++ drmHandle fbHandle;
++
++ drmSize gartSize;
++ drmHandle agpMemHandle; /* Handle from drmAgpAlloc */
++ unsigned long gartOffset;
++ unsigned char *AGP; /* Map */
++ int agpMode;
++ drmSize pciSize;
++ drmHandle pciMemHandle;
++
++ /* ring buffer data */
++ unsigned long ringStart; /* Offset into AGP space */
++ drmHandle ringHandle; /* Handle from drmAddMap */
++ drmSize ringMapSize; /* Size of map */
++ int ringSize; /* Size of ring (MB) */
++ unsigned char *ring; /* Map */
++
++ unsigned long ringReadOffset; /* Offset into AGP space */
++ drmHandle ringReadPtrHandle; /* Handle from drmAddMap */
++ drmSize ringReadMapSize; /* Size of map */
++ unsigned char *ringReadPtr; /* Map */
++
++ /* vertex/indirect buffer data */
++ unsigned long bufStart; /* Offset into AGP space */
++ drmHandle bufHandle; /* Handle from drmAddMap */
++ drmSize bufMapSize; /* Size of map */
++ int bufSize; /* Size of buffers (MB) */
++ unsigned char *buf; /* Map */
++ int bufNumBufs; /* Number of buffers */
++ drmBufMapPtr buffers; /* Buffer map */
++
++ /* AGP Texture data */
++ unsigned long gartTexStart; /* Offset into AGP space */
++ drmHandle gartTexHandle; /* Handle from drmAddMap */
++ drmSize gartTexMapSize; /* Size of map */
++ int gartTexSize; /* Size of AGP tex space (MB) */
++ unsigned char *gartTex; /* Map */
++ int log2GARTTexGran;
++
++ int DMAusecTimeout; /* CCE timeout in usecs */
++
++ /* DRI screen private data */
++ int frontOffset;
++ int frontPitch;
++ int backOffset;
++ int backPitch;
++ int depthOffset;
++ int depthPitch;
++ int spanOffset;
++ int textureOffset;
++ int textureSize;
++ int log2TexGran;
++
++ int irqEnabled;
++
++ int serverContext;
++
++ DRIInfoPtr pDRIInfo;
++#ifdef GLXEXT
++ int numVisualConfigs;
++ __GLXvisualConfig *pVisualConfigs;
++ GLAMOConfigPrivPtr pVisualConfigsPriv;
++#endif /* GLXEXT */
++#endif /* USE_DRI */
++} GLAMOScreenInfo;
++
++#define getGLAMOScreenInfo(kd) ((GLAMOScreenInfo *) ((kd)->screen->driver))
++#define GLAMOScreenInfo(kd) GLAMOScreenInfo *glamos = getGLAMOScreenInfo(kd)
++
++typedef union { float f; CARD32 i; } fi_type;
++
++/* Surely there's a better way to go about this */
++static inline CARD32
++GLAMOFloatAsInt(float val)
++{
++ fi_type fi;
++
++ fi.f = val;
++ return fi.i;
++}
++
++#define GET_FLOAT_BITS(x) GLAMOFloatAsInt(x)
++
++static inline void
++MMIOSetBitMask(char *mmio, CARD32 reg, CARD16 mask, CARD16 val)
++{
++ CARD16 tmp;
++
++ val &= mask;
++
++ tmp = MMIO_IN16(mmio, reg);
++ tmp &= ~mask;
++ tmp |= val;
++
++ MMIO_OUT16(mmio, reg, tmp);
++}
++
++/* glamo.c */
++Bool
++GLAMOMapReg(KdCardInfo *card, GLAMOCardInfo *glamoc);
++
++void
++GLAMOUnmapReg(KdCardInfo *card, GLAMOCardInfo *glamoc);
++
++/* glamo_draw.c */
++void
++GLAMODrawSetup(ScreenPtr pScreen);
++
++Bool
++GLAMODrawInit(ScreenPtr pScreen);
++
++void
++GLAMODrawEnable(ScreenPtr pScreen);
++
++void
++GLAMODrawDisable(ScreenPtr pScreen);
++
++void
++GLAMODrawFini(ScreenPtr pScreen);
++
++/* glamo_dri.c */
++#ifdef USE_DRI
++Bool
++GLAMODRIScreenInit(ScreenPtr pScreen);
++
++void
++GLAMODRICloseScreen(ScreenPtr pScreen);
++
++void
++GLAMODRIDMAStart(GLAMOScreenInfo *glamos);
++
++void
++GLAMODRIDMAStop(GLAMOScreenInfo *glamos);
++
++void
++GLAMODRIDMAReset(GLAMOScreenInfo *glamos);
++
++void
++GLAMODRIDispatchIndirect(GLAMOScreenInfo *glamos, Bool discard);
++
++drmBufPtr
++GLAMODRIGetBuffer(GLAMOScreenInfo *glamos);
++
++#endif /* USE_DRI */
++
++/* glamo_cursor.c */
++Bool
++GLAMOCursorInit(ScreenPtr pScreen);
++
++void
++GLAMOCursorEnable(ScreenPtr pScreen);
++
++void
++GLAMOCursorDisable(ScreenPtr pScreen);
++
++void
++GLAMOCursorFini(ScreenPtr pScreen);
++
++void
++GLAMORecolorCursor(ScreenPtr pScreen, int ndef, xColorItem *pdef);
++
++int
++GLAMOLog2(int val);
++
++/* glamo_video.c */
++Bool
++GLAMOInitVideo(ScreenPtr pScreen);
++
++void
++GLAMOFiniVideo(ScreenPtr pScreen);
++
++extern KdCardFuncs GLAMOFuncs;
++
++#endif /* _GLAMO_H_ */
+Index: xserver/hw/kdrive/glamo/glamo_dma.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ xserver/hw/kdrive/glamo/glamo_dma.c 2007-09-26 17:45:16.000000000 +0800
+@@ -0,0 +1,410 @@
++/*
++ * Copyright © 2007 OpenMoko, Inc.
++ *
++ * This driver is based on Xati,
++ * Copyright © 2004 Eric Anholt
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting documentation, and
++ * that the name of the copyright holders not be used in advertising or
++ * publicity pertaining to distribution of the software without specific,
++ * written prior permission. The copyright holders make no representations
++ * about the suitability of this software for any purpose. It is provided "as
++ * is" without express or implied warranty.
++ *
++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
++ * OF THIS SOFTWARE.
++ */
++
++#include <sys/time.h>
++
++#include "glamo.h"
++#include "glamo-regs.h"
++#include "glamo_dma.h"
++#include "glamo_draw.h"
++
++#ifdef USE_DRI
++#include "radeon_common.h"
++#include "glamo_sarea.h"
++#endif /* USE_DRI */
++
++#define DEBUG_FIFO 1
++
++#if DEBUG_FIFO
++static void
++GLAMODebugFifo(GLAMOScreenInfo *glamos)
++{
++ GLAMOCardInfo *glamoc = glamos->glamoc;
++ char *mmio = glamoc->reg_base;
++ CARD32 offset;
++
++ ErrorF("GLAMO_REG_CQ_STATUS: 0x%04x\n",
++ MMIO_IN16(mmio, GLAMO_REG_CQ_STATUS));
++
++ offset = MMIO_IN16(mmio, GLAMO_REG_CQ_WRITE_ADDRL);
++ offset |= (MMIO_IN16(mmio, GLAMO_REG_CQ_WRITE_ADDRH) << 16) & 0x7;
++ ErrorF("GLAMO_REG_CQ_WRITE_ADDR: 0x%08x\n", (unsigned int) offset);
++
++ offset = MMIO_IN16(mmio, GLAMO_REG_CQ_READ_ADDRL);
++ offset |= (MMIO_IN16(mmio, GLAMO_REG_CQ_READ_ADDRH) << 16) & 0x7;
++ ErrorF("GLAMO_REG_CQ_READ_ADDR: 0x%08x\n", (unsigned int) offset);
++}
++#endif
++
++void
++GLAMOEngineReset(ScreenPtr pScreen, enum glamo_engine engine)
++{
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++ CARD32 reg;
++ CARD16 mask;
++ char *mmio = glamoc->reg_base;
++
++ if (!mmio)
++ return;
++
++ switch (engine) {
++ case GLAMO_ENGINE_ISP:
++ reg = GLAMO_REG_CLOCK_ISP;
++ mask = GLAMO_CLOCK_ISP2_RESET;
++ break;
++ case GLAMO_ENGINE_CQ:
++ reg = GLAMO_REG_CLOCK_2D;
++ mask = GLAMO_CLOCK_2D_CQ_RESET;
++ break;
++ case GLAMO_ENGINE_2D:
++ reg = GLAMO_REG_CLOCK_2D;
++ mask = GLAMO_CLOCK_2D_RESET;
++ break;
++ }
++
++ MMIOSetBitMask(mmio, reg, mask, 0xffff);
++ usleep(1000);
++ MMIOSetBitMask(mmio, reg, mask, 0);
++ usleep(1000);
++}
++
++void
++GLAMOEngineDisable(ScreenPtr pScreen, enum glamo_engine engine)
++{
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++ char *mmio = glamoc->reg_base;
++
++ if (!mmio)
++ return;
++
++ return;
++}
++
++void
++GLAMOEngineEnable(ScreenPtr pScreen, enum glamo_engine engine)
++{
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++ char *mmio = glamoc->reg_base;
++
++ if (!mmio)
++ return;
++
++ switch (engine) {
++ case GLAMO_ENGINE_ISP:
++ MMIOSetBitMask(mmio, GLAMO_REG_CLOCK_ISP,
++ GLAMO_CLOCK_ISP_EN_M2CLK |
++ GLAMO_CLOCK_ISP_EN_I1CLK,
++ 0xffff);
++ MMIOSetBitMask(mmio, GLAMO_REG_CLOCK_GEN5_2,
++ GLAMO_CLOCK_GEN52_EN_DIV_ICLK,
++ 0xffff);
++ MMIOSetBitMask(mmio, GLAMO_REG_CLOCK_GEN5_1,
++ GLAMO_CLOCK_GEN51_EN_DIV_JCLK,
++ 0xffff);
++ MMIOSetBitMask(mmio, GLAMO_REG_HOSTBUS(2),
++ GLAMO_HOSTBUS2_MMIO_EN_ISP,
++ 0xffff);
++ break;
++ case GLAMO_ENGINE_CQ:
++ MMIOSetBitMask(mmio, GLAMO_REG_CLOCK_2D,
++ GLAMO_CLOCK_2D_EN_M6CLK,
++ 0xffff);
++ MMIOSetBitMask(mmio, GLAMO_REG_HOSTBUS(2),
++ GLAMO_HOSTBUS2_MMIO_EN_CQ,
++ 0xffff);
++ MMIOSetBitMask(mmio, GLAMO_REG_CLOCK_GEN5_1,
++ GLAMO_CLOCK_GEN51_EN_DIV_MCLK,
++ 0xffff);
++ break;
++ case GLAMO_ENGINE_2D:
++ MMIOSetBitMask(mmio, GLAMO_REG_CLOCK_2D,
++ GLAMO_CLOCK_2D_EN_M7CLK |
++ GLAMO_CLOCK_2D_EN_GCLK |
++ GLAMO_CLOCK_2D_DG_M7CLK |
++ GLAMO_CLOCK_2D_DG_GCLK,
++ 0xffff);
++ MMIOSetBitMask(mmio, GLAMO_REG_HOSTBUS(2),
++ GLAMO_HOSTBUS2_MMIO_EN_2D,
++ 0xffff);
++ MMIOSetBitMask(mmio, GLAMO_REG_CLOCK_GEN5_1,
++ GLAMO_CLOCK_GEN51_EN_DIV_GCLK,
++ 0xffff);
++ break;
++ }
++}
++
++void
++GLAMOWaitIdle(GLAMOScreenInfo *glamos)
++{
++ GLAMOCardInfo *glamoc = glamos->glamoc;
++ char *mmio = glamoc->reg_base;
++ CARD16 status;
++ TIMEOUT_LOCALS;
++
++ if (glamos->indirectBuffer != NULL)
++ GLAMOFlushIndirect(glamos, 0);
++
++#ifdef USE_DRI
++ if (glamos->using_dri) {
++ int ret = 0;
++ int cmd = (glamoc->is_3362 ? DRM_RADEON_CP_IDLE :
++ DRM_R128_CCE_IDLE);
++ WHILE_NOT_TIMEOUT(2) {
++ ret = drmCommandNone(glamoc->drmFd, cmd);
++ if (ret != -EBUSY)
++ break;
++ }
++ if (TIMEDOUT()) {
++ GLAMODebugFifo(glamos);
++ FatalError("Timed out idling CCE (card hung)\n");
++ }
++ if (ret != 0)
++ ErrorF("Failed to idle DMA, returned %d\n", ret);
++ return;
++ }
++#endif
++
++ WHILE_NOT_TIMEOUT(.5) {
++ status = MMIO_IN16(mmio, GLAMO_REG_CQ_STATUS);
++ if ((status & (1 << 2)) && !(status & (1 << 8)))
++ break;
++ }
++ if (TIMEDOUT()) {
++ ErrorF("Timeout idling accelerator, resetting...\n");
++ GLAMOEngineReset(glamos->screen->pScreen, GLAMO_ENGINE_CQ);
++ GLAMODrawSetup(glamos->screen->pScreen);
++ }
++
++#if DEBUG_FIFO
++ ErrorF("Idle?\n");
++ GLAMODebugFifo(glamos);
++#endif
++}
++
++dmaBuf *
++GLAMOGetDMABuffer(GLAMOScreenInfo *glamos)
++{
++ dmaBuf *buf;
++
++ buf = (dmaBuf *)xalloc(sizeof(dmaBuf));
++ if (buf == NULL)
++ return NULL;
++
++#ifdef USE_DRI
++ if (glamos->using_dri) {
++ buf->drmBuf = GLAMODRIGetBuffer(glamos);
++ if (buf->drmBuf == NULL) {
++ xfree(buf);
++ return NULL;
++ }
++ buf->size = buf->drmBuf->total;
++ buf->used = buf->drmBuf->used;
++ buf->address = buf->drmBuf->address;
++ return buf;
++ }
++#endif /* USE_DRI */
++
++ buf->size = glamos->ring_len / 2;
++ buf->address = xalloc(buf->size);
++ if (buf->address == NULL) {
++ xfree(buf);
++ return NULL;
++ }
++ buf->used = 0;
++
++ return buf;
++}
++
++static void
++GLAMODispatchIndirectDMA(GLAMOScreenInfo *glamos)
++{
++ GLAMOCardInfo *glamoc = glamos->glamoc;
++ dmaBuf *buf = glamos->indirectBuffer;
++ char *mmio = glamoc->reg_base;
++ CARD16 *addr;
++ int count, ring_count;
++ TIMEOUT_LOCALS;
++
++ addr = (CARD16 *)((char *)buf->address + glamos->indirectStart);
++ count = (buf->used - glamos->indirectStart) / 2;
++ ring_count = glamos->ring_len / 2;
++
++ WHILE_NOT_TIMEOUT(.5) {
++ if (count <= 0)
++ break;
++
++ glamos->ring_addr[glamos->ring_write++] = *addr++;
++ if (glamos->ring_write >= ring_count)
++ glamos->ring_write = 0;
++
++ while (glamos->ring_write == glamos->ring_read)
++ {
++ glamos->ring_read =
++ MMIO_IN16(mmio, GLAMO_REG_CQ_READ_ADDRL);
++ glamos->ring_read |=
++ (MMIO_IN16(mmio, GLAMO_REG_CQ_READ_ADDRH) & 0x7) << 16;
++ }
++
++ count--;
++ }
++ if (TIMEDOUT()) {
++ ErrorF("Timeout submitting packets, resetting...\n");
++ GLAMOEngineReset(glamos->screen->pScreen, GLAMO_ENGINE_CQ);
++ GLAMODrawSetup(glamos->screen->pScreen);
++ }
++
++ MMIO_OUT16(mmio, GLAMO_REG_CQ_WRITE_ADDRH,
++ (glamos->ring_write >> 15) & 0x7);
++ MMIO_OUT16(mmio, GLAMO_REG_CQ_WRITE_ADDRL,
++ (glamos->ring_write << 1) & 0xffff);
++}
++
++void
++GLAMOFlushIndirect(GLAMOScreenInfo *glamos, Bool discard)
++{
++ dmaBuf *buf = glamos->indirectBuffer;
++
++ if ((glamos->indirectStart == buf->used) && !discard)
++ return;
++
++#if DEBUG_FIFO
++ ErrorF("Dispatching %d DWORDS\n", (buf->used - glamos->indirectStart) /
++ 4);
++#endif
++
++#ifdef USE_DRI
++ if (glamos->using_dri) {
++ buf->drmBuf->used = buf->used;
++ GLAMODRIDispatchIndirect(glamos, discard);
++ if (discard) {
++ buf->drmBuf = GLAMODRIGetBuffer(glamos);
++ buf->size = buf->drmBuf->total;
++ buf->used = buf->drmBuf->used;
++ buf->address = buf->drmBuf->address;
++ glamos->indirectStart = 0;
++ } else {
++ /* Start on a double word boundary */
++ glamos->indirectStart = buf->used = (buf->used + 7) & ~7;
++ }
++ return;
++ }
++#endif /* USE_DRI */
++
++ GLAMODispatchIndirectDMA(glamos);
++
++ buf->used = 0;
++ glamos->indirectStart = 0;
++}
++
++static Bool
++GLAMODMAInit(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++ GLAMOCardInfo(pScreenPriv);
++ char *mmio = glamoc->reg_base;
++ int cq_len = 63;
++
++ glamos->ring_len = (cq_len + 1) * 1024;
++
++ glamos->dma_space = KdOffscreenAlloc(pScreen, glamos->ring_len + 4,
++ 16, TRUE, NULL, NULL);
++ if (!glamos->dma_space)
++ return FALSE;
++
++ glamos->ring_addr = (CARD16 *) (pScreenPriv->screen->memory_base +
++ glamos->dma_space->offset);
++ glamos->ring_read = 0;
++ glamos->ring_write = 0;
++
++ /* make the decoder happy? */
++ glamos->ring_addr[glamos->ring_len / 2] = 0x0;
++ glamos->ring_addr[glamos->ring_len / 2 + 1] = 0x0;
++
++ GLAMOEngineEnable(glamos->screen->pScreen, GLAMO_ENGINE_CQ);
++ GLAMOEngineReset(glamos->screen->pScreen, GLAMO_ENGINE_CQ);
++
++ MMIO_OUT16(mmio, GLAMO_REG_CQ_BASE_ADDRL,
++ glamos->dma_space->offset & 0xffff);
++ MMIO_OUT16(mmio, GLAMO_REG_CQ_BASE_ADDRH,
++ (glamos->dma_space->offset >> 16) & 0x7f);
++ MMIO_OUT16(mmio, GLAMO_REG_CQ_LEN, cq_len);
++
++ MMIO_OUT16(mmio, GLAMO_REG_CQ_WRITE_ADDRH, 0);
++ MMIO_OUT16(mmio, GLAMO_REG_CQ_WRITE_ADDRL, 0);
++ MMIO_OUT16(mmio, GLAMO_REG_CQ_READ_ADDRH, 0);
++ MMIO_OUT16(mmio, GLAMO_REG_CQ_READ_ADDRL, 0);
++ MMIO_OUT16(mmio, GLAMO_REG_CQ_CONTROL,
++ 1 << 12 |
++ 5 << 8 |
++ 8 << 4);
++
++ return TRUE;
++}
++
++void
++GLAMODMASetup(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++
++#ifdef USE_DRI
++ if (glamos->using_dri)
++ GLAMODRIDMAStart(glamos);
++#endif /* USE_DRI */
++
++ if (!glamos->using_dri)
++ GLAMODMAInit(pScreen);
++
++ glamos->indirectBuffer = GLAMOGetDMABuffer(glamos);
++ if (glamos->indirectBuffer == FALSE)
++ FatalError("Failed to allocate DMA buffer.\n");
++
++ if (glamos->using_dri)
++ ErrorF("Initialized DRI DMA\n");
++ else
++ ErrorF("Initialized DMA\n");
++}
++
++void
++GLAMODMATeardown(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++
++ GLAMOWaitIdle(glamos);
++
++#ifdef USE_DRI
++ if (glamos->using_dri)
++ GLAMODRIDMAStop(glamos);
++#endif /* USE_DRI */
++
++ xfree(glamos->indirectBuffer->address);
++ xfree(glamos->indirectBuffer);
++ glamos->indirectBuffer = NULL;
++}
+Index: xserver/hw/kdrive/glamo/glamo_dma.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ xserver/hw/kdrive/glamo/glamo_dma.h 2007-09-25 19:17:53.000000000 +0800
+@@ -0,0 +1,159 @@
++/*
++ * Copyright © 2007 OpenMoko, Inc.
++ *
++ * This driver is based on Xati,
++ * Copyright © 2004 Eric Anholt
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting documentation, and
++ * that the name of the copyright holders not be used in advertising or
++ * publicity pertaining to distribution of the software without specific,
++ * written prior permission. The copyright holders make no representations
++ * about the suitability of this software for any purpose. It is provided "as
++ * is" without express or implied warranty.
++ *
++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
++ * OF THIS SOFTWARE.
++ */
++
++#ifndef _GLAMO_DMA_H_
++#define _GLAMO_DMA_H_
++
++#define CCE_DEBUG 1
++
++#if !CCE_DEBUG
++#define DMA_PACKET0(reg, count) \
++ (reg)
++#else
++#define DMA_PACKET0(reg, count) \
++ (__packet0count = (count), __reg = (reg), \
++ (reg))
++#endif
++#define DMA_PACKET1(reg1, reg2) \
++ (GLAMO_CCE_PACKET1 | \
++ (((reg2) >> 2) << GLAMO_CCE_PACKET1_REG_2_SHIFT) | ((reg1) >> 2))
++#define DMA_PACKET3(type, count) \
++ ((type) | (((count) - 1) << 16))
++
++#if !CCE_DEBUG
++
++#define RING_LOCALS CARD16 *__head; int __count
++#define BEGIN_DMA(n) \
++do { \
++ if ((glamos->indirectBuffer->used + 2 * (n)) > \
++ glamos->indirectBuffer->size) { \
++ GLAMOFlushIndirect(glamos, 1); \
++ } \
++ __head = (CARD16 *)((char *)glamos->indirectBuffer->address + \
++ glamos->indirectBuffer->used); \
++ __count = 0; \
++} while (0)
++#define END_DMA() do { \
++ glamos->indirectBuffer->used += __count * 2; \
++} while (0)
++
++#else
++
++#define RING_LOCALS \
++ CARD16 *__head; int __count, __total, __reg, __packet0count
++#define BEGIN_DMA(n) \
++do { \
++ if ((glamos->indirectBuffer->used + 2 * (n)) > \
++ glamos->indirectBuffer->size) { \
++ GLAMOFlushIndirect(glamos, 1); \
++ } \
++ __head = (CARD16 *)((char *)glamos->indirectBuffer->address + \
++ glamos->indirectBuffer->used); \
++ __count = 0; \
++ __total = n; \
++ __reg = 0; \
++ __packet0count = 0; \
++} while (0)
++#define END_DMA() do { \
++ if (__count != __total) \
++ FatalError("count != total (%d vs %d) at %s:%d\n", \
++ __count, __total, __FILE__, __LINE__); \
++ glamos->indirectBuffer->used += __count * 2; \
++} while (0)
++
++#endif
++
++#define OUT_RING(val) do { \
++ __head[__count++] = (val); \
++} while (0)
++
++#define OUT_RING_REG(reg, val) do { \
++ if (__reg != reg) \
++ FatalError("unexpected reg (0x%x vs 0x%x) at %s:%d\n", \
++ reg, __reg, __FILE__, __LINE__); \
++ if (__packet0count-- <= 0) \
++ FatalError("overrun of packet0 at %s:%d\n", \
++ __FILE__, __LINE__); \
++ __head[__count++] = (val); \
++ __reg += 4; \
++} while (0)
++
++#define OUT_RING_F(x) OUT_RING(GET_FLOAT_BITS(x))
++
++#define OUT_REG(reg, val) \
++do { \
++ OUT_RING(DMA_PACKET0(reg, 1)); \
++ OUT_RING(val); \
++} while (0)
++
++#define TIMEOUT_LOCALS struct timeval _target, _curtime
++
++static inline Bool
++tv_le(struct timeval *tv1, struct timeval *tv2)
++{
++ if (tv1->tv_sec < tv2->tv_sec ||
++ (tv1->tv_sec == tv2->tv_sec && tv1->tv_usec < tv2->tv_usec))
++ return TRUE;
++ else
++ return FALSE;
++}
++
++#define WHILE_NOT_TIMEOUT(_timeout) \
++ gettimeofday(&_target, NULL); \
++ _target.tv_usec += ((_timeout) * 1000000); \
++ _target.tv_sec += _target.tv_usec / 1000000; \
++ _target.tv_usec = _target.tv_usec % 1000000; \
++ while (gettimeofday(&_curtime, NULL), tv_le(&_curtime, &_target))
++
++#define TIMEDOUT() (!tv_le(&_curtime, &_target))
++
++dmaBuf *
++GLAMOGetDMABuffer(GLAMOScreenInfo *glamos);
++
++void
++GLAMOFlushIndirect(GLAMOScreenInfo *glamos, Bool discard);
++
++void
++GLAMODMASetup(ScreenPtr pScreen);
++
++void
++GLAMODMATeardown(ScreenPtr pScreen);
++
++enum glamo_engine {
++ GLAMO_ENGINE_ISP,
++ GLAMO_ENGINE_CQ,
++ GLAMO_ENGINE_2D,
++};
++
++void
++GLAMOEngineEnable(ScreenPtr pScreen, enum glamo_engine engine);
++
++void
++GLAMOEngineDisable(ScreenPtr pScreen, enum glamo_engine engine);
++
++void
++GLAMOEngineReset(ScreenPtr pScreen, enum glamo_engine engine);
++
++#endif /* _GLAMO_DMA_H_ */
+Index: xserver/hw/kdrive/glamo/glamo_draw.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ xserver/hw/kdrive/glamo/glamo_draw.c 2007-09-26 17:46:30.000000000 +0800
+@@ -0,0 +1,522 @@
++/*
++ * Copyright © 2007 OpenMoko, Inc.
++ *
++ * This driver is based on Xati,
++ * Copyright © 2003 Eric Anholt
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting documentation, and
++ * that the name of the copyright holders not be used in advertising or
++ * publicity pertaining to distribution of the software without specific,
++ * written prior permission. The copyright holders make no representations
++ * about the suitability of this software for any purpose. It is provided "as
++ * is" without express or implied warranty.
++ *
++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
++ * OF THIS SOFTWARE.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <kdrive-config.h>
++#endif
++#include "glamo.h"
++#include "glamo-regs.h"
++#include "glamo_dma.h"
++#include "glamo_draw.h"
++#include "kaa.h"
++
++static const CARD8 GLAMOSolidRop[16] = {
++ /* GXclear */ 0x00, /* 0 */
++ /* GXand */ 0xa0, /* src AND dst */
++ /* GXandReverse */ 0x50, /* src AND NOT dst */
++ /* GXcopy */ 0xf0, /* src */
++ /* GXandInverted*/ 0x0a, /* NOT src AND dst */
++ /* GXnoop */ 0xaa, /* dst */
++ /* GXxor */ 0x5a, /* src XOR dst */
++ /* GXor */ 0xfa, /* src OR dst */
++ /* GXnor */ 0x05, /* NOT src AND NOT dst */
++ /* GXequiv */ 0xa5, /* NOT src XOR dst */
++ /* GXinvert */ 0x55, /* NOT dst */
++ /* GXorReverse */ 0xf5, /* src OR NOT dst */
++ /* GXcopyInverted*/ 0x0f, /* NOT src */
++ /* GXorInverted */ 0xaf, /* NOT src OR dst */
++ /* GXnand */ 0x5f, /* NOT src OR NOT dst */
++ /* GXset */ 0xff, /* 1 */
++};
++
++static const CARD8 GLAMOBltRop[16] = {
++ /* GXclear */ 0x00, /* 0 */
++ /* GXand */ 0x88, /* src AND dst */
++ /* GXandReverse */ 0x44, /* src AND NOT dst */
++ /* GXcopy */ 0xcc, /* src */
++ /* GXandInverted*/ 0x22, /* NOT src AND dst */
++ /* GXnoop */ 0xaa, /* dst */
++ /* GXxor */ 0x66, /* src XOR dst */
++ /* GXor */ 0xee, /* src OR dst */
++ /* GXnor */ 0x11, /* NOT src AND NOT dst */
++ /* GXequiv */ 0x99, /* NOT src XOR dst */
++ /* GXinvert */ 0x55, /* NOT dst */
++ /* GXorReverse */ 0xdd, /* src OR NOT dst */
++ /* GXcopyInverted*/ 0x33, /* NOT src */
++ /* GXorInverted */ 0xbb, /* NOT src OR dst */
++ /* GXnand */ 0x77, /* NOT src OR NOT dst */
++ /* GXset */ 0xff, /* 1 */
++};
++
++GLAMOScreenInfo *accel_glamos;
++CARD32 settings, color, src_pitch_offset, dst_pitch_offset;
++
++int sample_count;
++float sample_offsets_x[255];
++float sample_offsets_y[255];
++
++void
++GLAMODrawSetup(ScreenPtr pScreen)
++{
++ GLAMOEngineEnable(pScreen, GLAMO_ENGINE_2D);
++ GLAMOEngineReset(pScreen, GLAMO_ENGINE_2D);
++}
++
++static void
++GLAMOWaitMarker(ScreenPtr pScreen, int marker)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++
++ ENTER_DRAW(0);
++ GLAMOWaitIdle(glamos);
++ LEAVE_DRAW(0);
++}
++
++#if GLAMO_TRACE_DRAW
++void
++GLAMOEnterDraw (PixmapPtr pPix, const char *function)
++{
++ if (pPix != NULL) {
++ KdScreenPriv(pPix->drawable.pScreen);
++ CARD32 offset;
++
++ offset = ((CARD8 *)pPix->devPrivate.ptr -
++ pScreenPriv->screen->memory_base);
++
++ ErrorF ("Enter %s 0x%x (%dx%dx%d/%d)\n", function, (unsigned int) offset,
++ pPix->drawable.width, pPix->drawable.height, pPix->drawable.depth,
++ (unsigned int) pPix->drawable.bitsPerPixel);
++ } else
++ ErrorF ("Enter %s\n", function);
++}
++
++void
++GLAMOLeaveDraw (PixmapPtr pPix, const char *function)
++{
++ if (pPix != NULL) {
++ KdScreenPriv(pPix->drawable.pScreen);
++ CARD32 offset;
++
++ offset = ((CARD8 *)pPix->devPrivate.ptr -
++ pScreenPriv->screen->memory_base);
++
++ ErrorF ("Leave %s 0x%x\n", function, (unsigned int) offset);
++ } else
++ ErrorF ("Leave %s\n", function);
++}
++#endif
++
++static Bool
++GLAMOPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
++{
++ KdScreenPriv(pPix->drawable.pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++ CARD32 offset, pitch;
++ FbBits mask;
++ RING_LOCALS;
++
++ if (pPix->drawable.bitsPerPixel != 16)
++ GLAMO_FALLBACK(("Only 16bpp is supported\n"));
++
++ mask = FbFullMask(16);
++ if ((pm & mask) != mask)
++ GLAMO_FALLBACK(("Can't do planemask 0x%08x\n", (unsigned int) pm));
++
++ accel_glamos = glamos;
++
++ settings = GLAMOSolidRop[alu] << 8;
++ offset = ((CARD8 *) pPix->devPrivate.ptr -
++ pScreenPriv->screen->memory_base);
++ pitch = pPix->devKind;
++
++ ENTER_DRAW(pPix);
++
++ BEGIN_DMA(12);
++ OUT_REG(GLAMO_REG_2D_DST_ADDRL, offset & 0xffff);
++ OUT_REG(GLAMO_REG_2D_DST_ADDRH, (offset >> 16) & 0x7f);
++ OUT_REG(GLAMO_REG_2D_DST_PITCH, pitch);
++ OUT_REG(GLAMO_REG_2D_DST_HEIGHT, pPix->drawable.height);
++ OUT_REG(GLAMO_REG_2D_PAT_FG, fg);
++ OUT_REG(GLAMO_REG_2D_COMMAND2, settings);
++ END_DMA();
++
++ LEAVE_DRAW(pPix);
++
++ return TRUE;
++}
++
++static void
++GLAMOSolid(int x1, int y1, int x2, int y2)
++{
++ ENTER_DRAW(0);
++ GLAMOScreenInfo *glamos = accel_glamos;
++ RING_LOCALS;
++
++ BEGIN_DMA(14);
++ OUT_REG(GLAMO_REG_2D_DST_X, x1);
++ OUT_REG(GLAMO_REG_2D_DST_Y, y1);
++ OUT_REG(GLAMO_REG_2D_RECT_WIDTH, x2 - x1);
++ OUT_REG(GLAMO_REG_2D_RECT_HEIGHT, y2 - y1);
++ OUT_REG(GLAMO_REG_2D_COMMAND3, 0);
++ OUT_REG(GLAMO_REG_2D_ID1, 0);
++ OUT_REG(GLAMO_REG_2D_ID2, 0);
++ END_DMA();
++ LEAVE_DRAW(0);
++}
++
++static void
++GLAMODoneSolid(void)
++{
++ ENTER_DRAW(0);
++ LEAVE_DRAW(0);
++}
++
++static Bool
++GLAMOPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, Pixel pm)
++{
++ KdScreenPriv(pDst->drawable.pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++ CARD32 src_offset, src_pitch;
++ CARD32 dst_offset, dst_pitch;
++ FbBits mask;
++ RING_LOCALS;
++
++ if (pSrc->drawable.bitsPerPixel != 16 ||
++ pDst->drawable.bitsPerPixel != 16)
++ GLAMO_FALLBACK(("Only 16bpp is supported"));
++
++ mask = FbFullMask(16);
++ if ((pm & mask) != mask)
++ GLAMO_FALLBACK(("Can't do planemask 0x%08x", (unsigned int) pm));
++
++ accel_glamos = glamos;
++
++ src_offset = ((CARD8 *) pSrc->devPrivate.ptr -
++ pScreenPriv->screen->memory_base);
++ src_pitch = pSrc->devKind;
++
++ dst_offset = ((CARD8 *) pDst->devPrivate.ptr -
++ pScreenPriv->screen->memory_base);
++ dst_pitch = pDst->devKind;
++
++ settings = GLAMOBltRop[alu] << 8;
++
++ ENTER_DRAW (pDst);
++
++ BEGIN_DMA(16);
++
++ OUT_REG(GLAMO_REG_2D_SRC_ADDRL, src_offset & 0xffff);
++ OUT_REG(GLAMO_REG_2D_SRC_ADDRH, (src_offset >> 16) & 0x7f);
++ OUT_REG(GLAMO_REG_2D_SRC_PITCH, src_pitch);
++
++ OUT_REG(GLAMO_REG_2D_DST_ADDRL, dst_offset & 0xffff);
++ OUT_REG(GLAMO_REG_2D_DST_ADDRH, (dst_offset >> 16) & 0x7f);
++ OUT_REG(GLAMO_REG_2D_DST_PITCH, dst_pitch);
++ OUT_REG(GLAMO_REG_2D_DST_HEIGHT, pDst->drawable.height);
++
++ OUT_REG(GLAMO_REG_2D_COMMAND2, settings);
++
++ END_DMA();
++
++ LEAVE_DRAW(pDst);
++
++ return TRUE;
++}
++
++static void
++GLAMOCopy(int srcX, int srcY, int dstX, int dstY, int w, int h)
++{
++ GLAMOScreenInfo *glamos = accel_glamos;
++ RING_LOCALS;
++
++ BEGIN_DMA(18);
++ OUT_REG(GLAMO_REG_2D_SRC_X, srcX);
++ OUT_REG(GLAMO_REG_2D_SRC_Y, srcY);
++ OUT_REG(GLAMO_REG_2D_DST_X, dstX);
++ OUT_REG(GLAMO_REG_2D_DST_Y, dstY);
++ OUT_REG(GLAMO_REG_2D_RECT_WIDTH, w);
++ OUT_REG(GLAMO_REG_2D_RECT_HEIGHT, h);
++ OUT_REG(GLAMO_REG_2D_COMMAND3, 0);
++ OUT_REG(GLAMO_REG_2D_ID1, 0);
++ OUT_REG(GLAMO_REG_2D_ID2, 0);
++ END_DMA();
++}
++
++static void
++GLAMODoneCopy(void)
++{
++ ENTER_DRAW(0);
++ LEAVE_DRAW(0);
++}
++
++static Bool
++GLAMOUploadToScreen(PixmapPtr pDst, char *src, int src_pitch)
++{
++ int width, height, bpp, i;
++ CARD8 *dst_offset;
++ int dst_pitch;
++
++ dst_offset = (CARD8 *)pDst->devPrivate.ptr;
++ dst_pitch = pDst->devKind;
++ width = pDst->drawable.width;
++ height = pDst->drawable.height;
++ bpp = pDst->drawable.bitsPerPixel;
++ bpp /= 8;
++
++ for (i = 0; i < height; i++)
++ {
++ memcpy(dst_offset, src, width * bpp);
++
++ dst_offset += dst_pitch;
++ src += src_pitch;
++ }
++
++ ErrorF("hostdata upload %d,%d %dbpp\n", width, height, bpp);
++
++ return TRUE;
++}
++
++
++#if 0
++static Bool
++GLAMOUploadToScratch(PixmapPtr pSrc, PixmapPtr pDst)
++{
++ KdScreenPriv(pSrc->drawable.pScreen);
++ GLAMOCardInfo(pScreenPriv);
++ GLAMOScreenInfo(pScreenPriv);
++ int dst_pitch, src_pitch, w, i, size, bytes;
++ unsigned char *dst, *src;
++ RING_LOCALS;
++
++ ENTER_DRAW(pSrc);
++ /* Align width to log 2, useful for R128 composite. This should be a
++ * KAA flag we check for (and supported in kaa.c in general) since many
++ * older bits of hardware are going to want POT pitches.
++ */
++ w = pSrc->drawable.width;
++ if (glamos->kaa.flags & KAA_OFFSCREEN_ALIGN_POT)
++ w = 1 << (GLAMOLog2(w - 1) + 1);
++ dst_pitch = (w * pSrc->drawable.bitsPerPixel / 8 +
++ glamos->kaa.pitchAlign - 1) & ~(glamos->kaa.pitchAlign - 1);
++
++ size = dst_pitch * pSrc->drawable.height;
++ if (size > glamos->scratch_area->size)
++ GLAMO_FALLBACK(("Pixmap too large for scratch (%d,%d)\n",
++ pSrc->drawable.width, pSrc->drawable.height));
++
++ glamos->scratch_next = (glamos->scratch_next + glamos->kaa.offsetAlign - 1) &
++ ~(glamos->kaa.offsetAlign - 1);
++ if (glamos->scratch_next + size > glamos->scratch_area->offset +
++ glamos->scratch_area->size) {
++ /* Only sync when we've used all of the scratch area. */
++ kaaWaitSync(pSrc->drawable.pScreen);
++ glamos->scratch_next = glamos->scratch_area->offset;
++ }
++ memcpy(pDst, pSrc, sizeof(*pDst));
++ pDst->devKind = dst_pitch;
++ pDst->devPrivate.ptr = pScreenPriv->screen->memory_base +
++ glamos->scratch_next;
++ glamos->scratch_next += size;
++
++ src = pSrc->devPrivate.ptr;
++ src_pitch = pSrc->devKind;
++ dst = pDst->devPrivate.ptr;
++ bytes = src_pitch < dst_pitch ? src_pitch : dst_pitch;
++
++ i = pSrc->drawable.height;
++ while (i--) {
++ memcpy(dst, src, bytes);
++ dst += dst_pitch;
++ src += src_pitch;
++ }
++
++ /* Flush the pixel cache */
++ if (glamoc->is_3362) {
++ BEGIN_DMA(4);
++ OUT_REG(RADEON_REG_RB3D_DSTCACHE_CTLSTAT,
++ RADEON_RB3D_DC_FLUSH_ALL);
++ OUT_REG(GLAMO_REG_WAIT_UNTIL, RADEON_WAIT_HOST_IDLECLEAN);
++ END_DMA();
++ } else {
++ BEGIN_DMA(2);
++ OUT_REG(R128_REG_PC_GUI_CTLSTAT, R128_PC_FLUSH_ALL);
++ END_DMA();
++ }
++
++ LEAVE_DRAW(pSrc);
++ return TRUE;
++}
++#endif
++
++static void
++GLAMOBlockHandler(pointer blockData, OSTimePtr timeout, pointer readmask)
++{
++ ScreenPtr pScreen = (ScreenPtr) blockData;
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++
++ /* When the server is going to sleep, make sure that all DMA data has
++ * been flushed.
++ */
++ if (glamos->indirectBuffer)
++ GLAMOFlushIndirect(glamos, 1);
++}
++
++static void
++GLAMOWakeupHandler(pointer blockData, int result, pointer readmask)
++{
++}
++
++Bool
++GLAMODrawInit(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++
++ ErrorF("Screen: %d/%d depth/bpp\n", pScreenPriv->screen->fb[0].depth,
++ pScreenPriv->screen->fb[0].bitsPerPixel);
++
++ RegisterBlockAndWakeupHandlers(GLAMOBlockHandler, GLAMOWakeupHandler,
++ pScreen);
++
++ glamos->using_dri = FALSE;
++#ifdef USE_DRI
++ glamos->using_dri = GLAMODRIScreenInit(pScreen);
++#endif /* USE_DRI */
++
++ memset(&glamos->kaa, 0, sizeof(KaaScreenInfoRec));
++ glamos->kaa.waitMarker = GLAMOWaitMarker;
++ glamos->kaa.PrepareSolid = GLAMOPrepareSolid;
++ glamos->kaa.Solid = GLAMOSolid;
++ glamos->kaa.DoneSolid = GLAMODoneSolid;
++ glamos->kaa.PrepareCopy = GLAMOPrepareCopy;
++ glamos->kaa.Copy = GLAMOCopy;
++ glamos->kaa.DoneCopy = GLAMODoneCopy;
++ /* Other acceleration will be hooked in in DrawEnable depending on
++ * what type of DMA gets initialized.
++ */
++
++ glamos->kaa.flags = KAA_OFFSCREEN_PIXMAPS;
++ glamos->kaa.offsetAlign = 2;
++ glamos->kaa.pitchAlign = 2;
++
++ kaaInitTrapOffsets(8, sample_offsets_x, sample_offsets_y, 0.0, 0.0);
++ sample_count = (1 << 8) - 1;
++
++ if (!kaaDrawInit(pScreen, &glamos->kaa))
++ return FALSE;
++
++ return TRUE;
++}
++
++#if 0
++static void
++GLAMOScratchSave(ScreenPtr pScreen, KdOffscreenArea *area)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++
++ glamos->scratch_area = NULL;
++}
++#endif
++
++void
++GLAMODrawEnable(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++
++ GLAMODMASetup(pScreen);
++ GLAMODrawSetup(pScreen);
++
++ glamos->scratch_area = NULL;
++ glamos->kaa.PrepareBlend = NULL;
++ glamos->kaa.Blend = NULL;
++ glamos->kaa.DoneBlend = NULL;
++ glamos->kaa.CheckComposite = NULL;
++ glamos->kaa.PrepareComposite = NULL;
++ glamos->kaa.Composite = NULL;
++ glamos->kaa.DoneComposite = NULL;
++ glamos->kaa.UploadToScreen = NULL;
++ glamos->kaa.UploadToScratch = NULL;
++
++#ifdef USE_DRI
++ if (glamos->using_dri) {
++ if (!glamoc->is_3362) {
++ /*glamos->kaa.PrepareTrapezoids = R128PrepareTrapezoids;
++ glamos->kaa.Trapezoids = R128Trapezoids;
++ glamos->kaa.DoneTrapezoids = R128DoneTrapezoids;*/
++ } else if (glamoc->is_r100 || glamoc->is_r200) {
++ glamos->kaa.PrepareTrapezoids = RadeonPrepareTrapezoids;
++ glamos->kaa.Trapezoids = RadeonTrapezoids;
++ glamos->kaa.DoneTrapezoids = RadeonDoneTrapezoids;
++ }
++ }
++#endif /* USE_DRI */
++
++ glamos->kaa.UploadToScreen = GLAMOUploadToScreen;
++
++ /* Reserve a scratch area. It'll be used for storing glyph data during
++ * Composite operations, because glyphs aren't in real pixmaps and thus
++ * can't be migrated.
++ */
++#if 0
++ glamos->scratch_area = KdOffscreenAlloc(pScreen, 131072,
++ glamos->kaa.offsetAlign, TRUE, GLAMOScratchSave, glamos);
++ if (glamos->scratch_area != NULL) {
++ glamos->scratch_next = glamos->scratch_area->offset;
++ glamos->kaa.UploadToScratch = GLAMOUploadToScratch;
++ }
++#endif
++
++ kaaMarkSync(pScreen);
++}
++
++void
++GLAMODrawDisable(ScreenPtr pScreen)
++{
++ kaaWaitSync(pScreen);
++ GLAMODMATeardown(pScreen);
++}
++
++void
++GLAMODrawFini(ScreenPtr pScreen)
++{
++#ifdef USE_DRI
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++ if (glamos->using_dri) {
++ GLAMODRICloseScreen(pScreen);
++ glamos->using_dri = FALSE;
++ }
++#endif /* USE_DRI */
++
++ RemoveBlockAndWakeupHandlers(GLAMOBlockHandler, GLAMOWakeupHandler,
++ pScreen);
++
++ kaaDrawFini(pScreen);
++}
++
+Index: xserver/hw/kdrive/glamo/glamo_draw.h
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ xserver/hw/kdrive/glamo/glamo_draw.h 2007-09-25 19:02:01.000000000 +0800
+@@ -0,0 +1,59 @@
++/*
++ * Copyright © 2007 OpenMoko, Inc.
++ *
++ * This driver is based on Xati,
++ * Copyright © 2004 Eric Anholt
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting documentation, and
++ * that the name of the copyright holders not be used in advertising or
++ * publicity pertaining to distribution of the software without specific,
++ * written prior permission. The copyright holders make no representations
++ * about the suitability of this software for any purpose. It is provided "as
++ * is" without express or implied warranty.
++ *
++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
++ * OF THIS SOFTWARE.
++ */
++
++#ifndef _GLAMO_DRAW_H_
++#define _GLAMO_DRAW_H_
++
++void GLAMOWaitIdle(GLAMOScreenInfo *glamos);
++
++#define GLAMO_TRACE_FALL 1
++#define GLAMO_TRACE_DRAW 1
++
++#if GLAMO_TRACE_FALL
++#define GLAMO_FALLBACK(x) \
++do { \
++ ErrorF("%s: ", __FUNCTION__); \
++ ErrorF x; \
++ return FALSE; \
++} while (0)
++#else
++#define GLAMO_FALLBACK(x) return FALSE
++#endif
++
++#if GLAMO_TRACE_DRAW
++#define ENTER_DRAW(pix) GLAMOEnterDraw(pix, __FUNCTION__)
++#define LEAVE_DRAW(pix) GLAMOLeaveDraw(pix, __FUNCTION__)
++
++void
++GLAMOEnterDraw (PixmapPtr pPixmap, const char *function);
++
++void
++GLAMOLeaveDraw (PixmapPtr pPixmap, const char *function);
++#else /* GLAMO_TRACE */
++#define ENTER_DRAW(pix)
++#define LEAVE_DRAW(pix)
++#endif /* !GLAMO_TRACE */
++
++#endif /* _GLAMO_DRAW_H_ */
+Index: xserver/hw/kdrive/glamo/glamo_stub.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ xserver/hw/kdrive/glamo/glamo_stub.c 2007-09-26 17:45:27.000000000 +0800
+@@ -0,0 +1,84 @@
++/*
++ * Copyright © 2007 OpenMoko, Inc.
++ *
++ * This driver is based on Xati,
++ * Copyright © 2003 Eric Anholt
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting documentation, and
++ * that the name of the copyright holders not be used in advertising or
++ * publicity pertaining to distribution of the software without specific,
++ * written prior permission. The copyright holders make no representations
++ * about the suitability of this software for any purpose. It is provided "as
++ * is" without express or implied warranty.
++ *
++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
++ * OF THIS SOFTWARE.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <kdrive-config.h>
++#endif
++#include "glamo.h"
++#include "klinux.h"
++
++void
++InitCard(char *name)
++{
++ KdCardAttr attr;
++
++ attr.io = 0;
++ attr.address[0] = 0x8000000;
++ attr.naddr = 1;
++ KdCardInfoAdd(&GLAMOFuncs, &attr, 0);
++}
++
++void
++InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv)
++{
++ KdInitOutput(pScreenInfo, argc, argv);
++}
++
++void
++InitInput(int argc, char **argv)
++{
++ KdKeyboardInfo *ki;
++
++ KdAddKeyboardDriver(&LinuxKeyboardDriver);
++ KdAddPointerDriver(&LinuxMouseDriver);
++#ifdef TSLIB
++ KdAddPointerDriver(&TsDriver);
++#endif
++
++ ki = KdParseKeyboard("keybd");
++ KdAddKeyboard(ki);
++}
++
++void
++ddxUseMsg (void)
++{
++ KdUseMsg();
++#ifdef KDRIVEVESA
++ vesaUseMsg();
++#endif
++}
++
++int
++ddxProcessArgument(int argc, char **argv, int i)
++{
++ int ret;
++
++#ifdef KDRIVEVESA
++ if (!(ret = vesaProcessArgument (argc, argv, i)))
++#endif
++ ret = KdProcessArgument(argc, argv, i);
++
++ return ret;
++}
+Index: xserver/hw/kdrive/glamo/glamo_video.c
+===================================================================
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ xserver/hw/kdrive/glamo/glamo_video.c 2007-09-26 17:47:55.000000000 +0800
+@@ -0,0 +1,798 @@
++/*
++ * Copyright © 2007 OpenMoko, Inc.
++ *
++ * This driver is based on Xati,
++ * Copyright © 2004 Keith Packard
++ * Copyright © 2005 Eric Anholt
++ *
++ * Permission to use, copy, modify, distribute, and sell this software and its
++ * documentation for any purpose is hereby granted without fee, provided that
++ * the above copyright notice appear in all copies and that both that copyright
++ * notice and this permission notice appear in supporting documentation, and
++ * that the name of the copyright holders not be used in advertising or
++ * publicity pertaining to distribution of the software without specific,
++ * written prior permission. The copyright holders make no representations
++ * about the suitability of this software for any purpose. It is provided "as
++ * is" without express or implied warranty.
++ *
++ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
++ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
++ * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
++ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
++ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
++ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
++ * OF THIS SOFTWARE.
++ */
++
++#ifdef HAVE_CONFIG_H
++#include <kdrive-config.h>
++#endif
++#include "glamo.h"
++#include "glamo_dma.h"
++#include "glamo_draw.h"
++#include "glamo-regs.h"
++#include "kaa.h"
++
++#include <X11/extensions/Xv.h>
++#include "fourcc.h"
++
++#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
++
++static Atom xvBrightness, xvSaturation;
++
++#define IMAGE_MAX_WIDTH 2048
++#define IMAGE_MAX_HEIGHT 2048
++
++static void
++GLAMOStopVideo(KdScreenInfo *screen, pointer data, Bool exit)
++{
++ ScreenPtr pScreen = screen->pScreen;
++ GLAMOPortPrivPtr pPortPriv = (GLAMOPortPrivPtr)data;
++
++ REGION_EMPTY(screen->pScreen, &pPortPriv->clip);
++
++ if (pPortPriv->off_screen) {
++ KdOffscreenFree (pScreen, pPortPriv->off_screen);
++ pPortPriv->off_screen = 0;
++ }
++}
++
++static int
++GLAMOSetPortAttribute(KdScreenInfo *screen, Atom attribute, int value,
++ pointer data)
++{
++ return BadMatch;
++}
++
++static int
++GLAMOGetPortAttribute(KdScreenInfo *screen, Atom attribute, int *value,
++ pointer data)
++{
++ return BadMatch;
++}
++
++static void
++GLAMOQueryBestSize(KdScreenInfo *screen, Bool motion, short vid_w, short vid_h,
++ short drw_w, short drw_h, unsigned int *p_w, unsigned int *p_h,
++ pointer data)
++{
++ *p_w = drw_w;
++ *p_h = drw_h;
++}
++
++/* GLAMOClipVideo -
++
++ Takes the dst box in standard X BoxRec form (top and left
++ edges inclusive, bottom and right exclusive). The new dst
++ box is returned. The source boundaries are given (x1, y1
++ inclusive, x2, y2 exclusive) and returned are the new source
++ boundaries in 16.16 fixed point.
++*/
++
++static void
++GLAMOClipVideo(BoxPtr dst, INT32 *x1, INT32 *x2, INT32 *y1, INT32 *y2,
++ BoxPtr extents, INT32 width, INT32 height)
++{
++ INT32 vscale, hscale, delta;
++ int diff;
++
++ hscale = ((*x2 - *x1) << 16) / (dst->x2 - dst->x1);
++ vscale = ((*y2 - *y1) << 16) / (dst->y2 - dst->y1);
++
++ *x1 <<= 16; *x2 <<= 16;
++ *y1 <<= 16; *y2 <<= 16;
++
++ diff = extents->x1 - dst->x1;
++ if (diff > 0) {
++ dst->x1 = extents->x1;
++ *x1 += diff * hscale;
++ }
++ diff = dst->x2 - extents->x2;
++ if (diff > 0) {
++ dst->x2 = extents->x2;
++ *x2 -= diff * hscale;
++ }
++ diff = extents->y1 - dst->y1;
++ if (diff > 0) {
++ dst->y1 = extents->y1;
++ *y1 += diff * vscale;
++ }
++ diff = dst->y2 - extents->y2;
++ if (diff > 0) {
++ dst->y2 = extents->y2;
++ *y2 -= diff * vscale;
++ }
++
++ if (*x1 < 0) {
++ diff = (- *x1 + hscale - 1)/ hscale;
++ dst->x1 += diff;
++ *x1 += diff * hscale;
++ }
++ delta = *x2 - (width << 16);
++ if (delta > 0) {
++ diff = (delta + hscale - 1)/ hscale;
++ dst->x2 -= diff;
++ *x2 -= diff * hscale;
++ }
++ if (*y1 < 0) {
++ diff = (- *y1 + vscale - 1)/ vscale;
++ dst->y1 += diff;
++ *y1 += diff * vscale;
++ }
++ delta = *y2 - (height << 16);
++ if (delta > 0) {
++ diff = (delta + vscale - 1)/ vscale;
++ dst->y2 -= diff;
++ *y2 -= diff * vscale;
++ }
++}
++
++static void
++GlamoDisplayVideo(KdScreenInfo *screen, GLAMOPortPrivPtr pPortPriv)
++{
++ ScreenPtr pScreen = screen->pScreen;
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++ PixmapPtr pPixmap = pPortPriv->pPixmap;
++ CARD32 dst_offset, dst_pitch;
++ int dstxoff, dstyoff, srcDatatype;
++ RING_LOCALS;
++
++ BoxPtr pBox = REGION_RECTS(&pPortPriv->clip);
++ int nBox = REGION_NUM_RECTS(&pPortPriv->clip);
++
++ dst_offset = ((CARD8 *)pPixmap->devPrivate.ptr -
++ pScreenPriv->screen->memory_base);
++ dst_pitch = pPixmap->devKind;
++
++#ifdef COMPOSITE
++ dstxoff = -pPixmap->screen_x + pPixmap->drawable.x;
++ dstyoff = -pPixmap->screen_y + pPixmap->drawable.y;
++#else
++ dstxoff = 0;
++ dstyoff = 0;
++#endif
++
++ BEGIN_DMA(14);
++ OUT_REG(GLAMO_REG_ISP_YUV2RGB_11, 0x0167);
++ OUT_REG(GLAMO_REG_ISP_YUV2RGB_21, 0x01c5);
++ OUT_REG(GLAMO_REG_ISP_YUV2RGB_32, 0x00b6);
++ OUT_REG(GLAMO_REG_ISP_YUV2RGB_33, 0x0058);
++ OUT_REG(GLAMO_REG_ISP_YUV2RGB_RG, 0xb3 << 8 | 0x89);
++ OUT_REG(GLAMO_REG_ISP_YUV2RGB_B, 0xe2);
++
++ /* TODO weight matrix */
++
++ OUT_REG(GLAMO_REG_ISP_PORT2_EN, GLAMO_ISP_PORT2_EN_DECODE);
++
++ END_DMA();
++
++ if (pPortPriv->id == FOURCC_UYVY)
++ srcDatatype = 3;
++ else
++ srcDatatype = 1;
++
++ BEGIN_DMA(8);
++#if 0
++ OUT_REG(GLAMO_REG_ISP_EN3, GLAMO_ISP_EN3_SCALE_IMPROVE |
++ GLAMO_ISP_EN3_PLANE_MODE |
++ GLAMO_ISP_EN3_YUV_INPUT |
++ GLAMO_ISP_EN3_YUV420);
++ OUT_REG(GLAMO_REG_ISP_PORT1_DEC_EN, GLAMO_ISP_PORT1_EN_OUTPUT);
++
++ OUT_REG(GLAMO_REG_ISP_DEC_SCALEH, 1 << 11);
++ OUT_REG(GLAMO_REG_ISP_DEC_SCALEV, 1 << 11);
++
++ {
++ struct {
++ int src_block_y;
++ int src_block_x;
++ int src_block_h;
++ int src_block_w;
++ int jpeg_out_y;
++ int jpeg_out_x;
++ int fifo_full_cnt;
++ int in_length;
++ int fifo_data_cnt;
++ int in_height;
++ } onfly;
++
++ onfly.src_block_y = 32;
++ onfly.src_block_x = 32;
++ onfly.src_block_h = 36;
++ onfly.src_block_w = 35;
++ onfly.jpeg_out_y = 32;
++ onfly.jpeg_out_x = 32;
++ onfly.fifo_full_cnt = 0;
++ onfly.in_length = onfly.jpeg_out_x + 3;
++ onfly.fifo_data_cnt = onfly.src_block_w * onfly.src_block_h / 2;
++ onfly.in_height = onfly.jpeg_out_y + 2;
++
++ OUT_REG(GLAMO_REG_ISP_ONFLY_MODE1, onfly.src_block_y << 10 | onfly.src_block_x << 2);
++ OUT_REG(GLAMO_REG_ISP_ONFLY_MODE2, onfly.src_block_h << 8 | onfly.src_block_w);
++ OUT_REG(GLAMO_REG_ISP_ONFLY_MODE3, onfly.jpeg_out_y << 8 | onfly.jpeg_out_x);
++ OUT_REG(GLAMO_REG_ISP_ONFLY_MODE4, onfly.fifo_full_cnt << 8 | onfly.in_length);
++ OUT_REG(GLAMO_REG_ISP_ONFLY_MODE5, onfly.fifo_data_cnt << 6 | onfly.in_height);
++ }
++#endif
++
++ OUT_REG(GLAMO_REG_ISP_EN1,
++ GLAMO_ISP_EN1_YUV420 |
++ GLAMO_ISP_EN1_YUV_INPUT |
++ GLAMO_ISP_EN1_YUV_PACK |
++ ((srcDatatype << 4) & 0x7));
++
++ OUT_REG(GLAMO_REG_ISP_PORT1_CAP_EN,
++ GLAMO_ISP_PORT1_EN_OUTPUT);
++
++ OUT_REG(GLAMO_REG_ISP_CAP_PITCH, pPortPriv->src_pitch);
++ OUT_REG(GLAMO_REG_ISP_PORT1_CAP_PITCH, dst_pitch);
++
++ END_DMA();
++
++ while (nBox--) {
++ int srcX, srcY, dstX, dstY, srcw, srch, dstw, dsth;
++ CARD32 srcO, dstO;
++
++ dstX = pBox->x1 + dstxoff;
++ dstY = pBox->y1 + dstyoff;
++ dstw = pBox->x2 - pBox->x1;
++ dsth = pBox->y2 - pBox->y1;
++ srcX = (pBox->x1 - pPortPriv->dst_x1) *
++ pPortPriv->src_w / pPortPriv->dst_w;
++ srcY = (pBox->y1 - pPortPriv->dst_y1) *
++ pPortPriv->src_h / pPortPriv->dst_h;
++ srcw = pPortPriv->src_w - srcX; /* XXX */
++ srch = pPortPriv->src_h - srcY; /* XXX */
++
++ srcO = pPortPriv->src_offset + srcY * pPortPriv->src_pitch + srcX * 2;
++ dstO = dst_offset + dstY * dst_pitch + dstX * 2;
++
++ BEGIN_DMA(18);
++
++ OUT_REG(GLAMO_REG_ISP_CAP_0_ADDRL, srcO & 0xffff);
++ OUT_REG(GLAMO_REG_ISP_CAP_0_ADDRH, (srcO >> 16) & 0x7f);
++ OUT_REG(GLAMO_REG_ISP_CAP_HEIGHT, srch);
++ OUT_REG(GLAMO_REG_ISP_CAP_WIDTH, srcw);
++
++ OUT_REG(GLAMO_REG_ISP_PORT1_CAP_0_ADDRL, dstO & 0xffff);
++ OUT_REG(GLAMO_REG_ISP_PORT1_CAP_0_ADDRH, (dstO >> 16) & 0x7f);
++ OUT_REG(GLAMO_REG_ISP_PORT1_CAP_WIDTH, dstw);
++ OUT_REG(GLAMO_REG_ISP_PORT1_CAP_HEIGHT, dsth);
++
++ /* fire */
++ OUT_REG(GLAMO_REG_ISP_EN1, GLAMO_ISP_EN1_FIRE_ISP);
++ OUT_REG(GLAMO_REG_ISP_EN1, 0);
++
++ END_DMA();
++
++ GLAMOWaitIdle(glamos);
++
++ pBox++;
++ }
++#ifdef DAMAGEEXT
++ /* XXX: Shouldn't this be in kxv.c instead? */
++ DamageDamageRegion(pPortPriv->pDraw, &pPortPriv->clip);
++#endif
++ kaaMarkSync(pScreen);
++}
++
++static void
++GLAMOVideoSave(ScreenPtr pScreen, KdOffscreenArea *area)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++ GLAMOPortPrivPtr pPortPriv = glamos->pAdaptor->pPortPrivates[0].ptr;
++
++ if (pPortPriv->off_screen == area)
++ pPortPriv->off_screen = 0;
++}
++
++static int
++GLAMOPutImage(KdScreenInfo *screen, DrawablePtr pDraw,
++ short src_x, short src_y,
++ short drw_x, short drw_y,
++ short src_w, short src_h,
++ short drw_w, short drw_h,
++ int id,
++ unsigned char *buf,
++ short width,
++ short height,
++ Bool sync,
++ RegionPtr clipBoxes,
++ pointer data)
++{
++ ScreenPtr pScreen = screen->pScreen;
++ KdScreenPriv(pScreen);
++ GLAMOCardInfo(pScreenPriv);
++ GLAMOScreenInfo(pScreenPriv);
++ GLAMOPortPrivPtr pPortPriv = (GLAMOPortPrivPtr)data;
++ char *mmio = glamoc->reg_base;
++ INT32 x1, x2, y1, y2;
++ int randr = RR_Rotate_0 /* XXX */;
++ int srcPitch, srcPitch2, dstPitch;
++ int top, left, npixels, nlines, size;
++ BoxRec dstBox;
++ int dst_width = width, dst_height = height;
++ int rot_x1, rot_y1, rot_x2, rot_y2;
++ int dst_x1, dst_y1, dst_x2, dst_y2;
++ int rot_src_w, rot_src_h, rot_drw_w, rot_drw_h;
++
++ /* Clip */
++ x1 = src_x;
++ x2 = src_x + src_w;
++ y1 = src_y;
++ y2 = src_y + src_h;
++
++ dstBox.x1 = drw_x;
++ dstBox.x2 = drw_x + drw_w;
++ dstBox.y1 = drw_y;
++ dstBox.y2 = drw_y + drw_h;
++
++ GLAMOClipVideo(&dstBox, &x1, &x2, &y1, &y2,
++ REGION_EXTENTS(pScreen, clipBoxes), width, height);
++
++ src_w = (x2 - x1) >> 16;
++ src_h = (y2 - y1) >> 16;
++ drw_w = dstBox.x2 - dstBox.x1;
++ drw_h = dstBox.y2 - dstBox.y1;
++
++ if ((x1 >= x2) || (y1 >= y2))
++ return Success;
++
++ if (mmio == NULL)
++ return BadAlloc;
++
++ if (randr & (RR_Rotate_0|RR_Rotate_180)) {
++ dst_width = width;
++ dst_height = height;
++ rot_src_w = src_w;
++ rot_src_h = src_h;
++ rot_drw_w = drw_w;
++ rot_drw_h = drw_h;
++ } else {
++ dst_width = height;
++ dst_height = width;
++ rot_src_w = src_h;
++ rot_src_h = src_w;
++ rot_drw_w = drw_h;
++ rot_drw_h = drw_w;
++ }
++
++ switch (randr & RR_Rotate_All) {
++ case RR_Rotate_0:
++ default:
++ dst_x1 = dstBox.x1;
++ dst_y1 = dstBox.y1;
++ dst_x2 = dstBox.x2;
++ dst_y2 = dstBox.y2;
++ rot_x1 = x1;
++ rot_y1 = y1;
++ rot_x2 = x2;
++ rot_y2 = y2;
++ break;
++ case RR_Rotate_90:
++ dst_x1 = dstBox.y1;
++ dst_y1 = screen->height - dstBox.x2;
++ dst_x2 = dstBox.y2;
++ dst_y2 = screen->height - dstBox.x1;
++ rot_x1 = y1;
++ rot_y1 = (src_w << 16) - x2;
++ rot_x2 = y2;
++ rot_y2 = (src_w << 16) - x1;
++ break;
++ case RR_Rotate_180:
++ dst_x1 = screen->width - dstBox.x2;
++ dst_y1 = screen->height - dstBox.y2;
++ dst_x2 = screen->width - dstBox.x1;
++ dst_y2 = screen->height - dstBox.y1;
++ rot_x1 = (src_w << 16) - x2;
++ rot_y1 = (src_h << 16) - y2;
++ rot_x2 = (src_w << 16) - x1;
++ rot_y2 = (src_h << 16) - y1;
++ break;
++ case RR_Rotate_270:
++ dst_x1 = screen->width - dstBox.y2;
++ dst_y1 = dstBox.x1;
++ dst_x2 = screen->width - dstBox.y1;
++ dst_y2 = dstBox.x2;
++ rot_x1 = (src_h << 16) - y2;
++ rot_y1 = x1;
++ rot_x2 = (src_h << 16) - y1;
++ rot_y2 = x2;
++ break;
++ }
++
++ switch(id) {
++ case FOURCC_YV12:
++ case FOURCC_I420:
++ dstPitch = ((dst_width << 1) + 15) & ~15;
++ srcPitch = (width + 3) & ~3;
++ srcPitch2 = ((width >> 1) + 3) & ~3;
++ size = dstPitch * dst_height;
++ break;
++ case FOURCC_UYVY:
++ case FOURCC_YUY2:
++ default:
++ dstPitch = ((dst_width << 1) + 15) & ~15;
++ srcPitch = (width << 1);
++ srcPitch2 = 0;
++ size = dstPitch * dst_height;
++ break;
++ }
++
++ if (pPortPriv->off_screen != NULL && size != pPortPriv->size) {
++ KdOffscreenFree(screen->pScreen, pPortPriv->off_screen);
++ pPortPriv->off_screen = 0;
++ }
++
++ if (pPortPriv->off_screen == NULL) {
++ pPortPriv->off_screen = KdOffscreenAlloc(screen->pScreen,
++ size * 2, 64, TRUE, GLAMOVideoSave, pPortPriv);
++ if (pPortPriv->off_screen == NULL)
++ return BadAlloc;
++ }
++
++
++ if (pDraw->type == DRAWABLE_WINDOW)
++ pPortPriv->pPixmap =
++ (*pScreen->GetWindowPixmap)((WindowPtr)pDraw);
++ else
++ pPortPriv->pPixmap = (PixmapPtr)pDraw;
++
++ /* Migrate the pixmap to offscreen if necessary. */
++ if (!kaaPixmapIsOffscreen(pPortPriv->pPixmap))
++ kaaMoveInPixmap(pPortPriv->pPixmap);
++
++ if (!kaaPixmapIsOffscreen(pPortPriv->pPixmap)) {
++ return BadAlloc;
++ }
++
++ pPortPriv->src_offset = pPortPriv->off_screen->offset;
++ pPortPriv->src_addr = (CARD8 *)(pScreenPriv->screen->memory_base +
++ pPortPriv->src_offset);
++ pPortPriv->src_pitch = dstPitch;
++ pPortPriv->size = size;
++ pPortPriv->pDraw = pDraw;
++
++ /* copy data */
++ top = rot_y1 >> 16;
++ left = (rot_x1 >> 16) & ~1;
++ npixels = ((((rot_x2 + 0xffff) >> 16) + 1) & ~1) - left;
++
++ /* Since we're probably overwriting the area that might still be used
++ * for the last PutImage request, wait for idle.
++ */
++ GLAMOWaitIdle(glamos);
++
++ switch(id) {
++ case FOURCC_YV12:
++ case FOURCC_I420:
++ top &= ~1;
++ nlines = ((((rot_y2 + 0xffff) >> 16) + 1) & ~1) - top;
++ /* pack the source as YUY2 to vram */
++ KdXVCopyPlanarData(screen, buf, pPortPriv->src_addr, randr,
++ srcPitch, srcPitch2, dstPitch, rot_src_w, rot_src_h,
++ height, top, left, nlines, npixels, id);
++ break;
++ case FOURCC_UYVY:
++ case FOURCC_YUY2:
++ default:
++ nlines = ((rot_y2 + 0xffff) >> 16) - top;
++ KdXVCopyPackedData(screen, buf, pPortPriv->src_addr, randr,
++ srcPitch, dstPitch, rot_src_w, rot_src_h, top, left,
++ nlines, npixels);
++ break;
++ }
++
++ /* update cliplist */
++ if (!REGION_EQUAL(screen->pScreen, &pPortPriv->clip, clipBoxes)) {
++ REGION_COPY(screen->pScreen, &pPortPriv->clip, clipBoxes);
++ }
++
++ pPortPriv->id = id;
++ pPortPriv->src_x1 = rot_x1;
++ pPortPriv->src_y1 = rot_y1;
++ pPortPriv->src_x2 = rot_x2;
++ pPortPriv->src_y2 = rot_y2;
++ pPortPriv->src_w = rot_src_w;
++ pPortPriv->src_h = rot_src_h;
++ pPortPriv->dst_x1 = dst_x1;
++ pPortPriv->dst_y1 = dst_y1;
++ pPortPriv->dst_x2 = dst_x2;
++ pPortPriv->dst_y2 = dst_y2;
++ pPortPriv->dst_w = rot_drw_w;
++ pPortPriv->dst_h = rot_drw_h;
++
++ GlamoDisplayVideo(screen, pPortPriv);
++
++ return Success;
++}
++
++static int
++GLAMOReputImage(KdScreenInfo *screen, DrawablePtr pDraw, short drw_x, short drw_y,
++ RegionPtr clipBoxes, pointer data)
++{
++ ScreenPtr pScreen = screen->pScreen;
++ GLAMOPortPrivPtr pPortPriv = (GLAMOPortPrivPtr)data;
++ BoxPtr pOldExtents = REGION_EXTENTS(screen->pScreen, &pPortPriv->clip);
++ BoxPtr pNewExtents = REGION_EXTENTS(screen->pScreen, clipBoxes);
++
++ if (pOldExtents->x1 != pNewExtents->x1 ||
++ pOldExtents->x2 != pNewExtents->x2 ||
++ pOldExtents->y1 != pNewExtents->y1 ||
++ pOldExtents->y2 != pNewExtents->y2)
++ return BadMatch;
++
++ if (pDraw->type == DRAWABLE_WINDOW)
++ pPortPriv->pPixmap =
++ (*pScreen->GetWindowPixmap)((WindowPtr)pDraw);
++ else
++ pPortPriv->pPixmap = (PixmapPtr)pDraw;
++
++ if (!kaaPixmapIsOffscreen(pPortPriv->pPixmap))
++ kaaMoveInPixmap(pPortPriv->pPixmap);
++
++ if (!kaaPixmapIsOffscreen(pPortPriv->pPixmap)) {
++ ErrorF("err\n");
++ return BadAlloc;
++ }
++
++
++ /* update cliplist */
++ if (!REGION_EQUAL(screen->pScreen, &pPortPriv->clip, clipBoxes))
++ REGION_COPY(screen->pScreen, &pPortPriv->clip, clipBoxes);
++
++ /* XXX: What do the drw_x and drw_y here mean for us? */
++
++ GlamoDisplayVideo(screen, pPortPriv);
++
++ return Success;
++}
++
++static int
++GLAMOQueryImageAttributes(KdScreenInfo *screen, int id, unsigned short *w,
++ unsigned short *h, int *pitches, int *offsets)
++{
++ int size, tmp;
++
++ if (*w > IMAGE_MAX_WIDTH)
++ *w = IMAGE_MAX_WIDTH;
++ if (*h > IMAGE_MAX_HEIGHT)
++ *h = IMAGE_MAX_HEIGHT;
++
++ *w = (*w + 1) & ~1;
++ if (offsets)
++ offsets[0] = 0;
++
++ switch (id)
++ {
++ case FOURCC_YV12:
++ case FOURCC_I420:
++ *h = (*h + 1) & ~1;
++ size = (*w + 3) & ~3;
++ if (pitches)
++ pitches[0] = size;
++ size *= *h;
++ if (offsets)
++ offsets[1] = size;
++ tmp = ((*w >> 1) + 3) & ~3;
++ if (pitches)
++ pitches[1] = pitches[2] = tmp;
++ tmp *= (*h >> 1);
++ size += tmp;
++ if (offsets)
++ offsets[2] = size;
++ size += tmp;
++ break;
++ case FOURCC_UYVY:
++ case FOURCC_YUY2:
++ default:
++ size = *w << 1;
++ if (pitches)
++ pitches[0] = size;
++ size *= *h;
++ break;
++ }
++
++ return size;
++}
++
++
++/* client libraries expect an encoding */
++static KdVideoEncodingRec DummyEncoding[1] =
++{
++ {
++ 0,
++ "XV_IMAGE",
++ IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT,
++ {1, 1}
++ }
++};
++
++#define NUM_FORMATS 1
++
++static KdVideoFormatRec Formats[NUM_FORMATS] =
++{
++ {16, TrueColor}
++};
++
++#define NUM_ATTRIBUTES 0
++
++static KdAttributeRec Attributes[NUM_ATTRIBUTES] =
++{
++};
++
++#define NUM_IMAGES 4
++
++static KdImageRec Images[NUM_IMAGES] =
++{
++ XVIMAGE_YUY2,
++ XVIMAGE_YV12,
++ XVIMAGE_I420,
++ XVIMAGE_UYVY
++};
++
++static KdVideoAdaptorPtr
++GLAMOSetupImageVideo(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++ KdVideoAdaptorPtr adapt;
++ GLAMOPortPrivPtr pPortPriv;
++ int i;
++
++ glamos->num_texture_ports = 16;
++
++ adapt = xcalloc(1, sizeof(KdVideoAdaptorRec) + glamos->num_texture_ports *
++ (sizeof(GLAMOPortPrivRec) + sizeof(DevUnion)));
++ if (adapt == NULL)
++ return NULL;
++
++ adapt->type = XvWindowMask | XvInputMask | XvImageMask;
++ adapt->flags = VIDEO_CLIP_TO_VIEWPORT;
++ adapt->name = "GLAMO Texture Video";
++ adapt->nEncodings = 1;
++ adapt->pEncodings = DummyEncoding;
++ adapt->nFormats = NUM_FORMATS;
++ adapt->pFormats = Formats;
++ adapt->nPorts = glamos->num_texture_ports;
++ adapt->pPortPrivates = (DevUnion*)(&adapt[1]);
++
++ pPortPriv =
++ (GLAMOPortPrivPtr)(&adapt->pPortPrivates[glamos->num_texture_ports]);
++
++ for (i = 0; i < glamos->num_texture_ports; i++)
++ adapt->pPortPrivates[i].ptr = &pPortPriv[i];
++
++ adapt->nAttributes = NUM_ATTRIBUTES;
++ adapt->pAttributes = Attributes;
++ adapt->pImages = Images;
++ adapt->nImages = NUM_IMAGES;
++ adapt->PutVideo = NULL;
++ adapt->PutStill = NULL;
++ adapt->GetVideo = NULL;
++ adapt->GetStill = NULL;
++ adapt->StopVideo = GLAMOStopVideo;
++ adapt->SetPortAttribute = GLAMOSetPortAttribute;
++ adapt->GetPortAttribute = GLAMOGetPortAttribute;
++ adapt->QueryBestSize = GLAMOQueryBestSize;
++ adapt->PutImage = GLAMOPutImage;
++ adapt->ReputImage = GLAMOReputImage;
++ adapt->QueryImageAttributes = GLAMOQueryImageAttributes;
++
++ /* gotta uninit this someplace */
++ REGION_INIT(pScreen, &pPortPriv->clip, NullBox, 0);
++
++ glamos->pAdaptor = adapt;
++
++ xvBrightness = MAKE_ATOM("XV_BRIGHTNESS");
++ xvSaturation = MAKE_ATOM("XV_SATURGLAMOON");
++
++ return adapt;
++}
++
++static void GLAMOPowerUp(ScreenPtr pScreen)
++{
++ GLAMOEngineEnable(pScreen, GLAMO_ENGINE_ISP);
++ GLAMOEngineReset(pScreen, GLAMO_ENGINE_ISP);
++
++ /* HW_DEBUG_0?? */
++ //MMIOSetBitMask(mmio, REG_ISP(0x102), 0x0020, 0);
++}
++
++static void GLAMOPowerDown(ScreenPtr pScreen)
++{
++ GLAMOEngineReset(pScreen, GLAMO_ENGINE_ISP);
++
++ /* ... and stop the clock */
++}
++
++Bool GLAMOInitVideo(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++ GLAMOCardInfo(pScreenPriv);
++ KdScreenInfo *screen = pScreenPriv->screen;
++ KdVideoAdaptorPtr *adaptors, *newAdaptors = NULL;
++ KdVideoAdaptorPtr newAdaptor = NULL;
++ int num_adaptors;
++
++ glamos->pAdaptor = NULL;
++
++ if (glamoc->reg_base == NULL)
++ return FALSE;
++
++ num_adaptors = KdXVListGenericAdaptors(screen, &adaptors);
++
++ newAdaptor = GLAMOSetupImageVideo(pScreen);
++
++ if (newAdaptor) {
++ GLAMOPowerUp(pScreen);
++
++ if (!num_adaptors) {
++ num_adaptors = 1;
++ adaptors = &newAdaptor;
++ } else {
++ newAdaptors = xalloc((num_adaptors + 1) *
++ sizeof(KdVideoAdaptorPtr *));
++ if (newAdaptors) {
++ memcpy(newAdaptors, adaptors, num_adaptors *
++ sizeof(KdVideoAdaptorPtr));
++ newAdaptors[num_adaptors] = newAdaptor;
++ adaptors = newAdaptors;
++ num_adaptors++;
++ }
++ }
++ }
++
++ if (num_adaptors)
++ KdXVScreenInit(pScreen, adaptors, num_adaptors);
++
++ if (newAdaptors)
++ xfree(newAdaptors);
++
++ return TRUE;
++}
++
++void
++GLAMOFiniVideo(ScreenPtr pScreen)
++{
++ KdScreenPriv(pScreen);
++ GLAMOScreenInfo(pScreenPriv);
++ KdVideoAdaptorPtr adapt = glamos->pAdaptor;
++ GLAMOPortPrivPtr pPortPriv;
++ int i;
++
++ if (!adapt)
++ return;
++
++ GLAMOPowerDown(pScreen);
++
++ for (i = 0; i < glamos->num_texture_ports; i++) {
++ pPortPriv = (GLAMOPortPrivPtr)(&adapt->pPortPrivates[i].ptr);
++ REGION_UNINIT(pScreen, &pPortPriv->clip);
++ }
++ xfree(adapt);
++ glamos->pAdaptor = NULL;
++}
diff --git a/packages/xorg-xserver/xserver-kdrive-common.inc b/packages/xorg-xserver/xserver-kdrive-common.inc
index b0d5e39813..6ea9c8439f 100644
--- a/packages/xorg-xserver/xserver-kdrive-common.inc
+++ b/packages/xorg-xserver/xserver-kdrive-common.inc
@@ -9,6 +9,7 @@ PACKAGES =+ "xserver-kdrive-fbdev \
xserver-kdrive-xephyr \
xserver-kdrive-epson \
xserver-kdrive-ati \
+ xserver-kdrive-glamo \
xserver-kdrive-chips \
xserver-kdrive-i810 \
xserver-kdrive-mach64 \
@@ -32,6 +33,7 @@ DESCRIPTION_xserver-kdrive-epson = "X server from freedesktop.org, supporting Ep
DESCRIPTION_xserver-kdrive-sdl = "X server from freedesktop.org, SDL version"
DESCRIPTION_xserver-kdrive-w100 = "X server from freedesktop.org, supporting the ATI imageon w100 chipset"
DESCRIPTION_xserver-kdrive-ati = "X server from freedesktop.org, supporting ATI devices"
+DESCRIPTION_xserver-kdrive-glamo = "X server from freedesktop.org, supporting Smedia Glamo chipset"
DESCRIPTION_xserver-kdrive-chips = "X server from freedesktop.org, supporting Chips chipsets"
DESCRIPTION_xserver-kdrive-i810 = "X server from freedesktop.org, supporting Intel chipsets"
DESCRIPTION_xserver-kdrive-imageon = "X server from freedesktop.org, supporting the ATI imageon 100 chipset"
@@ -54,6 +56,7 @@ FILES_xserver-kdrive-epson = "${bindir}/Xepson"
FILES_xserver-kdrive-sdl = "${bindir}/Xsdl"
FILES_xserver-kdrive-w100 = "${bindir}/Xw100"
FILES_xserver-kdrive-ati = "${bindir}/Xati"
+FILES_xserver-kdrive-glamo = "${bindir}/Xglamo"
FILES_xserver-kdrive-chips = "${bindir}/Xchips"
FILES_xserver-kdrive-i810 = "${bindir}/Xi810"
FILES_xserver-kdrive-imageon = "${bindir}/Ximageon"
@@ -74,6 +77,7 @@ RDEPENDS_xserver-kdrive-epson = "${PN}"
RDEPENDS_xserver-kdrive-sdl = "${PN}"
RDEPENDS_xserver-kdrive-w100 = "${PN}"
RDEPENDS_xserver-kdrive-ati = "${PN}"
+RDEPENDS_xserver-kdrive-glamo = "${PN}"
RDEPENDS_xserver-kdrive-chips = "${PN}"
RDEPENDS_xserver-kdrive-i810 = "${PN}"
RDEPENDS_xserver-kdrive-mach64 = "${PN}"
diff --git a/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb b/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
index 3cc67078a0..f78bef05ae 100644
--- a/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
+++ b/packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb
@@ -3,7 +3,7 @@ require xserver-kdrive-common.inc
DEPENDS += "libxkbfile libxcalibrate"
PE = "1"
-PR = "r19"
+PR = "r21"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
${KDRIVE_COMMON_PATCHES} \
@@ -21,6 +21,8 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://w100-fix-offscreen-bmp.patch;patch=1 \
file://kdrive-1.3-18bpp.patch;patch=1 \
file://gumstix-kmode.patch;patch=1 \
+ file://smedia-glamo.patch;patch=1 \
+ file://build-glamo.patch;patch=1 \
"
S = "${WORKDIR}/xorg-server-${PV}"
diff --git a/packages/zaurus-updater/akita/updater.sh b/packages/zaurus-updater/akita/updater.sh
index 5399e5254e..ad2c27b012 100644
--- a/packages/zaurus-updater/akita/updater.sh
+++ b/packages/zaurus-updater/akita/updater.sh
@@ -181,53 +181,53 @@ do
/sbin/verchg -v $VTMPNAME $TMPHEAD $MODULEID $MODULESIZE > /dev/null 2>&1
/sbin/verchg -m $MTMPNAME $TMPHEAD $MODULEID $MODULESIZE > /dev/null 2>&1
- if [ "$MODEL" = "SL-C1000" ] && [ $TARGETTYPE = Kernel ]; then
- echo $TARGETFILE':'$DATASIZE'bytes'
- echo ' ' > /tmp/data
- /sbin/nandlogical $LOGOCAL_MTD WRITE 0x60100 16 /tmp/data > /dev/null 2>&1
- /sbin/nandlogical $LOGOCAL_MTD WRITE 0xe0000 $DATASIZE $TARGETFILE > /dev/null 2>&1
- /sbin/nandlogical $LOGOCAL_MTD WRITE 0x21bff0 16 /tmp/data > /dev/null 2>&1
- #loop
- else
- while [ $DATAPOS -lt $DATASIZE ]
- do
- #data create
- bcut -a $DATAPOS -s $ONESIZE -o $TMPDATA $TARGETFILE
- TMPSIZE=`wc -c $TMPDATA`
- TMPSIZE=`echo $TMPSIZE | cut -d' ' -f1`
- DATAPOS=`expr $DATAPOS + $TMPSIZE`
-
- #handle data file
- #echo 'ADDR='$ADDR
- #echo 'SIZE='$TMPSIZE
- #echo 'TMPDATA='$TMPDATA
- if [ $ISLOGICAL = 0 ]
- then
- next_addr=`/sbin/nandcp -a $ADDR $TMPDATA $TARGET_MTD 2>/dev/null | fgrep "mtd address" | cut -d- -f2 | cut -d\( -f1`
- if [ "$next_addr" = "" ]; then
- echo "ERROR:flash write"
- rm $TMPDATA > /dev/null 2>&1
- RESULT=3
- break;
+ if [ "$MODEL" = "SL-C1000" ] && [ $TARGETTYPE = Kernel ]; then
+ echo $TARGETFILE':'$DATASIZE'bytes'
+ echo ' ' > /tmp/data
+ /sbin/nandlogical $LOGOCAL_MTD WRITE 0x60100 16 /tmp/data > /dev/null 2>&1
+ /sbin/nandlogical $LOGOCAL_MTD WRITE 0xe0000 $DATASIZE $TARGETFILE > /dev/null 2>&1
+ /sbin/nandlogical $LOGOCAL_MTD WRITE 0x21bff0 16 /tmp/data > /dev/null 2>&1
+ #loop
+ else
+ while [ $DATAPOS -lt $DATASIZE ]
+ do
+ #data create
+ bcut -a $DATAPOS -s $ONESIZE -o $TMPDATA $TARGETFILE
+ TMPSIZE=`wc -c $TMPDATA`
+ TMPSIZE=`echo $TMPSIZE | cut -d' ' -f1`
+ DATAPOS=`expr $DATAPOS + $TMPSIZE`
+
+ #handle data file
+ #echo 'ADDR='$ADDR
+ #echo 'SIZE='$TMPSIZE
+ #echo 'TMPDATA='$TMPDATA
+ if [ $ISLOGICAL = 0 ]
+ then
+ next_addr=`/sbin/nandcp -a $ADDR $TMPDATA $TARGET_MTD 2>/dev/null | fgrep "mtd address" | cut -d- -f2 | cut -d\( -f1`
+ if [ "$next_addr" = "" ]; then
+ echo "ERROR:flash write"
+ rm $TMPDATA > /dev/null 2>&1
+ RESULT=3
+ break;
+ fi
+ ADDR=$next_addr
+ else
+ /sbin/nandlogical $LOGOCAL_MTD WRITE $ADDR $DATASIZE $TMPDATA > /dev/null 2>&1
+ ADDR=`expr $ADDR + $TMPSIZE`
fi
- ADDR=$next_addr
- else
- /sbin/nandlogical $LOGOCAL_MTD WRITE $ADDR $DATASIZE $TMPDATA > /dev/null 2>&1
- ADDR=`expr $ADDR + $TMPSIZE`
- fi
- rm $TMPDATA > /dev/null 2>&1
+ rm $TMPDATA > /dev/null 2>&1
- #progress
- SPNUM=0
- while [ $SPNUM -lt $PROGSTEP ]
- do
- echo -n '.'
- SPNUM=`expr $SPNUM + 1`
+ #progress
+ SPNUM=0
+ while [ $SPNUM -lt $PROGSTEP ]
+ do
+ echo -n '.'
+ SPNUM=`expr $SPNUM + 1`
+ done
done
- done
- fi
+ fi
echo ''
diff --git a/packages/zaurus-updater/spitz/updater.sh b/packages/zaurus-updater/spitz/updater.sh
deleted file mode 100755
index a748334cc7..0000000000
--- a/packages/zaurus-updater/spitz/updater.sh
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/bin/sh
-
-#
-# Noodles' simpler update script. SL-C3000 only for the moment.
-#
-
-DATAPATH=$1
-TMPPATH=/tmp/update
-TMPDATA=$TMPPATH/tmpdata.bin
-TMPHEAD=$TMPPATH/tmphead.bin
-
-WFLG_KERNEL=0
-WFLG_INITRD=0
-WFLG_HDD=0
-
-RO_MTD_LINE=`cat /proc/mtd | grep "root" | tail -n 1`
-if [ "$RO_MTD_LINE" = "" ]; then
- RO_MTD_LINE=`cat /proc/mtd | grep "\<NAND\>.*\<2\>" | tail -n 1`
-fi
-RO_MTD_NO=`echo $RO_MTD_LINE | cut -d: -f1 | cut -dd -f2`
-RO_MTD_SIZE_HEX=`echo $RO_MTD_LINE | cut -d" " -f2`
-RO_MTD=/dev/mtd$RO_MTD_NO
-RO_MTDBLK=/dev/mtdblock$RO_MTD_NO
-RO_MTD_SIZE=`dc 0x$RO_MTD_SIZE_HEX 1024 /`
-
-RW_MTD_LINE=`cat /proc/mtd | grep "home" | tail -n 1`
-if [ "$RW_MTD_LINE" = "" ]; then
- RW_MTD_LINE=`cat /proc/mtd | grep "\<NAND\>.*\<2\>" | tail -n 1`
-fi
-RW_MTD_NO=`echo $RW_MTD_LINE | cut -d: -f1 | cut -dd -f2`
-RW_MTD_SIZE_HEX=`echo $RW_MTD_LINE | cut -d" " -f2`
-RW_MTD=/dev/mtd$RW_MTD_NO
-RW_MTDBLK=/dev/mtdblock$RW_MTD_NO
-RW_MTD_SIZE=`dc 0x$RW_MTD_SIZE_HEX 1024 /`
-
-LOGOCAL_MTD=/dev/mtd1
-
-VERBLOCK=0x48000
-MVRBLOCK=0x70000
-
-RESULT=0
-
-Cleanup(){
- rm -f $VTMPNAME > /dev/null 2>&1
- rm -f $MTMPNAME > /dev/null 2>&1
- rm $CTRLPATH/* > /dev/null 2>&1
- exit $1
-}
-trap 'Cleanup 1' 1 15
-trap '' 2 3
-
-get_dev_pcmcia()
-{
-while read SOCKET CLASS DRIVER INSTANCE DEVS MAJOR MINOR;
-do
- echo $DEVS
-done
-}
-get_dev_pcmcia_slot()
-{
- grep "^$1" /var/lib/pcmcia/stab | get_dev_pcmcia
-}
-sleep 1
-IDE1=`get_dev_pcmcia_slot 1`
-if [ "$IDE1" = "" ]; then
- echo "Error!! There is no HDD. Now retrying..."
- while [ "$IDE1" = "" ]; do
- IDE1=`get_dev_pcmcia_slot 1`
- done
- echo "Found HDD!!"
-fi
-
-#LINUXFMT=ext2
-LINUXFMT=ext3
-MKE2FSOPT=
-if [ "$LINUXFMT" = "ext3" ]; then
- MKE2FSOPT=-j
-fi
-
-
-### Check model ###
-/sbin/writerominfo
-MODEL=`cat /proc/deviceinfo/product`
-if [ "$MODEL" != "SL-C3000" ] && [ "$MODEL" != "SL-C3100" ] && [ "$MODEL" != "SL-C3200" ]
-then
- echo 'MODEL:'$MODEL
- echo 'ERROR:Invalid model!'
- echo 'Please reset'
- while true
- do
- done
-fi
-
-### Check that we have a valid tar
-for TARNAME in gnu-tar GNU-TAR
-do
- if [ -e $DATAPATH/$TARNAME ]
- then
- TARBIN=$DATAPATH/$TARNAME
- fi
-done
-
-if [ ! -e $TARBIN ]; then
- echo 'Please place a valid copy of tar as "gnu-tar" on your card'
- echo 'Please reset'
- while true
- do
- done
-fi
-
-mkdir -p $TMPPATH > /dev/null 2>&1
-
-cd $DATAPATH/
-
-#
-# First do the kernel.
-#
-for TARGETFILE in zImage.bin zimage.bin ZIMAGE.BIN
-do
- if [ -e $TARGETFILE -a $WFLG_KERNEL = 0 ]
- then
- # Get the size of the kernel.
- DATASIZE=`wc -c $TARGETFILE`
- DATASIZE=`echo $DATASIZE | cut -d' ' -f1`
-
- echo 'Updating kernel.'
- echo $TARGETFILE':'$DATASIZE' bytes'
- /sbin/nandlogical $LOGOCAL_MTD WRITE 0xe0000 $DATASIZE \
- $TARGETFILE > /dev/null 2>&1
-
- WFLG_KERNEL=1
-
- fi
-done
-
-#
-# Now do the initrd.
-#
-for TARGETFILE in initrd.bin INITRD.BIN
-do
- if [ -e $TARGETFILE -a $WFLG_INITRD = 0 ]
- then
- rm -f $TMPPATH/*.bin > /dev/null 2>&1
- DATASIZE=`wc -c $TARGETFILE`
- DATASIZE=`echo $DATASIZE | cut -d' ' -f1`
-
- WFLG_INITRD=1
- echo 'RO file system'
- MODULEID=6
- MODULESIZE=0x500000
- ADDR=0
- TARGET_MTD=$RO_MTD
- DATAPOS=16
- ONESIZE=1048576
- /sbin/bcut -s 16 -o $TMPHEAD $TARGETFILE
-
- echo -n 'Flash erasing...'
- /sbin/eraseall $TARGET_MTD 2> /dev/null > /dev/null
- echo 'done'
-
- echo ''
- echo '0% 100%'
- PROGSTEP=`expr $DATASIZE / $ONESIZE + 1`
- PROGSTEP=`expr 28 / $PROGSTEP`
- if [ $PROGSTEP = 0 ]
- then
- PROGSTEP=1
- fi
-
- #00 means header information
- VTMPNAME=$TMPPATH'/vtmp'`date '+%s'`'.tmp'
- MTMPNAME=$TMPPATH'/mtmp'`date '+%s'`'.tmp'
- /sbin/nandlogical $LOGOCAL_MTD READ $VERBLOCK 0x4000 $VTMPNAME > /dev/null 2>&1
- /sbin/nandlogical $LOGOCAL_MTD READ $MVRBLOCK 0x4000 $MTMPNAME > /dev/null 2>&1
-
- #echo 'found header'
- /sbin/verchg -v $VTMPNAME $TMPHEAD $MODULEID $MODULESIZE > /dev/null 2>&1
- /sbin/verchg -m $MTMPNAME $TMPHEAD $MODULEID $MODULESIZE > /dev/null 2>&1
-
- #loop
- while [ $DATAPOS -lt $DATASIZE ]
- do
- #data create
- bcut -a $DATAPOS -s $ONESIZE -o $TMPDATA $TARGETFILE
- TMPSIZE=`wc -c $TMPDATA`
- TMPSIZE=`echo $TMPSIZE | cut -d' ' -f1`
- DATAPOS=`expr $DATAPOS + $TMPSIZE`
-
- #handle data file
- #echo 'ADDR='$ADDR
- #echo 'SIZE='$TMPSIZE
- next_addr=`/sbin/nandcp -a $ADDR $TMPDATA $TARGET_MTD 2>/dev/null | fgrep "mtd address" | cut -d- -f2 | cut -d\( -f1`
- if [ "$next_addr" = "" ]; then
- echo "ERROR:flash write"
- rm $TMPDATA > /dev/null 2>&1
- RESULT=3
- break;
- fi
- ADDR=$next_addr
-
- rm $TMPDATA > /dev/null 2>&1
-
- #progress
- SPNUM=0
- while [ $SPNUM -lt $PROGSTEP ]
- do
- echo -n '.'
- SPNUM=`expr $SPNUM + 1`
- done
- done
-
- echo ''
-
- #finish
- rm -f $TMPPATH/*.bin > /dev/null 2>&1
-
- if [ $RESULT = 0 ]
- then
- /sbin/nandlogical $LOGOCAL_MTD WRITE $VERBLOCK 0x4000 $VTMPNAME > /dev/null 2>&1
- /sbin/nandlogical $LOGOCAL_MTD WRITE $MVRBLOCK 0x4000 $MTMPNAME > /dev/null 2>&1
-
- rm -f $VTMPNAME > /dev/null 2>&1
- rm -f $MTMPNAME > /dev/null 2>&1
- echo 'Success!'
- else
- echo 'Error!'
- exit $RESULT
- fi
- fi
-done
-
-## HDD image
-for TARGETFILE in hdimage1.tgz HDIMAGE1.TGZ
-do
- if [ -e $TARGETFILE ]; then
- if [ $WFLG_HDD != 0 ]
- then
- continue
- fi
- WFLG_HDD=1
- echo ''
- echo 'HDD RO file system'
- if [ ! -f /hdd1/NotAvailable ]; then
- umount /hdd1
- fi
- echo 'Now formatting...'
- mke2fs $MKE2FSOPT /dev/${IDE1}1 2> /dev/null > /dev/null
- e2fsck -p /dev/${IDE1}1 > /dev/null
- if [ "$?" != "0" ]; then
- echo "Error!"
- exit "$?"
- fi
-
- mount -t $LINUXFMT -o noatime /dev/${IDE1}1 /hdd1
- if [ "$?" != "0" ]; then
- echo "Error!"
- exit "$?"
- fi
-
- cd /hdd1
- echo 'Now extracting...'
- gzip -dc $DATAPATH/$TARGETFILE | $TARBIN xf -
- if [ "$?" != "0" ]; then
- echo "Error!"
- exit "$?"
- fi
-
- echo 'Success!'
-
- #This can be useful for debugging
- #/bin/sh -i
-
- # remount as RO
- cd /
- umount /hdd1
- mount -t $LINUXFMT -o ro,noatime /dev/${IDE1}1 /hdd1
- fi
-done
-
-exit 0
diff --git a/packages/zaurus-updater/zaurus-updater.bb b/packages/zaurus-updater/zaurus-updater.bb
index 9d62bd629e..ec8f16c9bf 100644
--- a/packages/zaurus-updater/zaurus-updater.bb
+++ b/packages/zaurus-updater/zaurus-updater.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "Encrypted shellscript for the Zaurus ROM update"
DEPENDS = "encdec-updater-native"
LICENSE = "zaurus-updater"
-PR = "r8"
+PR = "r9"
PACKAGES = ""
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/packages/zaurus-updater/zaurus-updater/updater.sh b/packages/zaurus-updater/zaurus-updater/updater.sh
index b8ae625d6e..d6e5b7fc15 100644
--- a/packages/zaurus-updater/zaurus-updater/updater.sh
+++ b/packages/zaurus-updater/zaurus-updater/updater.sh
@@ -21,6 +21,12 @@
# - c760/c860 has bigger rootfs - use it
#
+date_log()
+{
+ echo "$LOG: `date`"
+}
+LOG="updater start"; date_log
+
DATAPATH=$1
TMPPATH=/tmp/update
TMPDATA=$TMPPATH/tmpdata.bin
@@ -38,6 +44,8 @@ RO_MTD_NO=`echo $RO_MTD_LINE | cut -d: -f1 | cut -dd -f2`
RO_MTD_SIZE_HEX=`echo $RO_MTD_LINE | cut -d" " -f2`
RO_MTD=/dev/mtd$RO_MTD_NO
+echo "RO_MTD = $RO_MTD"
+
LOGOCAL_MTD=/dev/mtd1
VERBLOCK=0x48000
@@ -159,9 +167,9 @@ do_flashing()
if [ $ISFORMATTED = 0 ]
then
- echo -n 'Flash erasing...'
+ LOG="flash erasing ($TARGET_MTD) start"; date_log
/sbin/eraseall $TARGET_MTD > /dev/null 2>&1
- echo 'done'
+ LOG="flash erasing ($TARGET_MTD) end"; date_log
ISFORMATTED=1
fi
@@ -176,6 +184,7 @@ do_flashing()
if [ -e $TMPHEAD ]
then
+ LOG="nandlogical read start"; date_log
VTMPNAME=$TMPPATH'/vtmp'`date '+%s'`'.tmp'
MTMPNAME=$TMPPATH'/mtmp'`date '+%s'`'.tmp'
/sbin/nandlogical $LOGOCAL_MTD READ $VERBLOCK 0x4000 $VTMPNAME > /dev/null 2>&1
@@ -183,43 +192,44 @@ do_flashing()
/sbin/verchg -v $VTMPNAME $TMPHEAD $MODULEID $MTD_PART_SIZE > /dev/null 2>&1
/sbin/verchg -m $MTMPNAME $TMPHEAD $MODULEID $MTD_PART_SIZE > /dev/null 2>&1
+ LOG="nandlogical read end"; date_log
fi
- #loop
- while [ $DATAPOS -lt $DATASIZE ]
- do
- #data create
- bcut -a $DATAPOS -s $ONESIZE -o $TMPDATA $TARGETFILE
- TMPSIZE=`wc -c $TMPDATA`
- TMPSIZE=`echo $TMPSIZE | cut -d' ' -f1`
- DATAPOS=`expr $DATAPOS + $TMPSIZE`
-
- #handle data file
- if [ $ISLOGICAL = 0 ]
- then
- next_addr=`/sbin/nandcp -a $ADDR $TMPDATA $TARGET_MTD 2>/dev/null | fgrep "mtd address" | cut -d- -f2 | cut -d\( -f1`
- if [ "$next_addr" = "" ]; then
- echo "ERROR: flash write"
- rm $TMPDATA > /dev/null 2>&1
- RESULT=3
- break;
- fi
- ADDR=$next_addr
- else
- /sbin/nandlogical $LOGOCAL_MTD WRITE $ADDR $DATASIZE $TMPDATA > /dev/null 2>&1
- ADDR=`expr $ADDR + $TMPSIZE`
- fi
-
- rm $TMPDATA > /dev/null 2>&1
-
- #progress
- SPNUM=0
- while [ $SPNUM -lt $PROGSTEP ]
- do
- echo -n '.'
- SPNUM=`expr $SPNUM + 1`
- done
- done
+ #loop
+ while [ $DATAPOS -lt $DATASIZE ]
+ do
+ #data create
+ bcut -a $DATAPOS -s $ONESIZE -o $TMPDATA $TARGETFILE
+ TMPSIZE=`wc -c $TMPDATA`
+ TMPSIZE=`echo $TMPSIZE | cut -d' ' -f1`
+ DATAPOS=`expr $DATAPOS + $TMPSIZE`
+
+ #handle data file
+ if [ $ISLOGICAL = 0 ]
+ then
+ next_addr=`/sbin/nandcp -a $ADDR $TMPDATA $TARGET_MTD 2>/dev/null | fgrep "mtd address" | cut -d- -f2 | cut -d\( -f1`
+ if [ "$next_addr" = "" ]; then
+ echo "ERROR: flash write"
+ rm $TMPDATA > /dev/null 2>&1
+ RESULT=3
+ break;
+ fi
+ ADDR=$next_addr
+ else
+ /sbin/nandlogical $LOGOCAL_MTD WRITE $ADDR $DATASIZE $TMPDATA > /dev/null 2>&1
+ ADDR=`expr $ADDR + $TMPSIZE`
+ fi
+
+ rm $TMPDATA > /dev/null 2>&1
+
+ #progress
+ SPNUM=0
+ while [ $SPNUM -lt $PROGSTEP ]
+ do
+ echo -n '.'
+ SPNUM=`expr $SPNUM + 1`
+ done
+ done
echo ''
@@ -230,12 +240,16 @@ do_flashing()
then
if [ -e $VTMPNAME ]
then
+ LOG="nandlogical write2 start"; date_log
/sbin/nandlogical $LOGOCAL_MTD WRITE $VERBLOCK 0x4000 $VTMPNAME > /dev/null 2>&1
+ LOG="nandlogical write2 end"; date_log
rm -f $VTMPNAME > /dev/null 2>&1
fi
if [ -e $MTMPNAME ]
then
+ LOG="nandlogical write3 start"; date_log
/sbin/nandlogical $LOGOCAL_MTD WRITE $MVRBLOCK 0x4000 $MTMPNAME > /dev/null 2>&1
+ LOG="nandlogical write3 end"; date_log
rm -f $MTMPNAME > /dev/null 2>&1
fi
echo 'Done.'
@@ -288,6 +302,8 @@ echo 'MODEL: '$MODEL' ('$ZAURUS')'
mkdir -p $TMPPATH > /dev/null 2>&1
+LOG="updater after model"; date_log
+
cd $DATAPATH/
for TARGETFILE in zimage zImage zImage.bin zimage.bin ZIMAGE ZIMAGE.BIN initrd.bin INITRD.BIN hdimage1.tgz HDIMAGE1.TGZ
@@ -311,7 +327,6 @@ do
then
continue
fi
- echo 'kernel'
FLASHED_KERNEL=1
ISLOGICAL=1
MODULEID=5
@@ -322,7 +337,12 @@ do
ONESIZE=524288
HDTOP=`expr $DATASIZE - 16`
/sbin/bcut -a $HDTOP -s 16 -o $TMPHEAD $TARGETFILE
+ echo "HDTOP=$HDTOP"
+ LOG="updater flashing kernel start"; date_log
+ FLASH_TYPE="kernel"
do_flashing
+ FLASH_TYPE=""
+ LOG="updater flashing kernel end"; date_log
;;
initrd.bin)
@@ -341,7 +361,11 @@ do
DATAPOS=16
ONESIZE=1048576
/sbin/bcut -s 16 -o $TMPHEAD $TARGETFILE
+ LOG="updater flashing rootfs start"; date_log
+ FLASH_TYPE="rootfs"
do_flashing
+ FLASH_TYPE=""
+ LOG="updater flashing rootfs end"; date_log
;;
hdimage1.tgz)
@@ -356,6 +380,8 @@ do
esac
done
+/bin/sh
+
# reboot
exit 0