summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2007-10-18 16:35:01 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2007-10-18 16:35:01 +0000
commit2b94d96062ac7eb6a15445f74e424b7b08e69a63 (patch)
treea4ceb58e4985908f2dd574d498e1e17f38061f5e
parent51d88fa521229df09a9d624618d7e861d765d21a (diff)
parent0ed630ee92d26828b61f1de72dc0b33d2a056123 (diff)
merge of '1d0e13e8c6528e7a7037276e3c01cb21dfa085e4'
and '86581f7de9bc72fe5e21778b4442cc0e59e96fbf'
-rw-r--r--MAINTAINERS2
-rw-r--r--classes/angstrom-mirrors.bbclass2
-rw-r--r--classes/base.bbclass23
-rw-r--r--classes/insane.bbclass2
-rw-r--r--classes/mono.bbclass177
-rw-r--r--classes/package.bbclass22
-rw-r--r--classes/rootfs_deb.bbclass32
-rw-r--r--classes/rootfs_ipk.bbclass6
-rw-r--r--classes/sdk.bbclass3
-rw-r--r--conf/bitbake.conf5
-rw-r--r--conf/checksums.ini947
-rw-r--r--conf/distro/angstrom-2007.1.conf4
-rw-r--r--conf/distro/angstrom-2008.1.conf6
-rw-r--r--conf/distro/generic.conf2
-rw-r--r--conf/distro/include/insane-srcrevs.inc2
-rw-r--r--conf/distro/include/moko-autorev.inc5
-rw-r--r--conf/distro/include/preferred-xorg-versions-X11R7.3.inc2
-rw-r--r--conf/distro/include/sane-srcrevs.inc52
-rw-r--r--conf/distro/include/slugos.inc3
-rw-r--r--conf/distro/openmoko.conf32
-rw-r--r--conf/machine/adsp-bf537-stamp.conf2
-rw-r--r--conf/machine/adzs-bf538f-ezlite.conf3
-rw-r--r--conf/machine/adzs-bf548-ezlite.conf19
-rw-r--r--conf/machine/akita.conf2
-rw-r--r--conf/machine/alix.conf6
-rw-r--r--conf/machine/at91sam9260ek.conf6
-rw-r--r--conf/machine/at91sam9261ek.conf6
-rw-r--r--conf/machine/bd-neon.conf57
-rw-r--r--conf/machine/cm-x270.conf (renamed from conf/machine/compulab-pxa270.conf)26
-rw-r--r--conf/machine/dht-walnut.conf1
-rw-r--r--conf/machine/em-x270.conf68
-rw-r--r--conf/machine/epia.conf3
-rw-r--r--conf/machine/er0100.conf46
-rw-r--r--conf/machine/fic-gta01.conf3
-rw-r--r--conf/machine/fic-gta02.conf6
-rw-r--r--conf/machine/ghi270.conf46
-rw-r--r--conf/machine/guinness.conf2
-rw-r--r--conf/machine/h1910.conf1
-rw-r--r--conf/machine/htcblueangel.conf1
-rw-r--r--conf/machine/htcuniversal.conf1
-rw-r--r--conf/machine/hx4700.conf2
-rw-r--r--conf/machine/i586-generic.conf3
-rw-r--r--conf/machine/i686-generic.conf3
-rw-r--r--conf/machine/include/gumstix.inc6
-rw-r--r--conf/machine/include/motorola-ezx-base.inc3
-rw-r--r--conf/machine/include/zaurus-2.6.inc3
-rw-r--r--conf/machine/magicbox.conf1
-rw-r--r--conf/machine/magician.conf7
-rw-r--r--conf/machine/netvista.conf2
-rw-r--r--conf/machine/palmld.conf1
-rw-r--r--conf/machine/progear.conf2
-rw-r--r--conf/machine/qemux86.conf2
-rw-r--r--conf/machine/rokre2.conf2
-rw-r--r--conf/machine/rokre6.conf2
-rw-r--r--conf/machine/sequoia.conf1
-rw-r--r--conf/machine/spitz.conf2
-rw-r--r--conf/machine/wrap.conf2
-rw-r--r--conf/machine/x86-32-nocona.conf4
-rw-r--r--conf/machine/x86-prescott.conf4
-rw-r--r--conf/machine/x86.conf2
-rw-r--r--contrib/armmon_xfer/.mtn2git_empty (renamed from packages/dbus/dbus-glib-0.72/.mtn2git_empty)0
-rwxr-xr-xcontrib/armmon_xfer/armmon_xfer.py150
-rw-r--r--contrib/mono/.mtn2git_empty (renamed from packages/dbus/dbus-glib-native-0.72/.mtn2git_empty)0
-rw-r--r--contrib/mono/collect-files.py118
-rw-r--r--contrib/mtn2git/.mtn2git_empty (renamed from packages/dbus/dbus-glib/.mtn2git_empty)0
-rwxr-xr-xcontrib/mtn2git/git2mtn.py50
-rw-r--r--contrib/mtn2git/mtn/.mtn2git_empty (renamed from packages/gtk-webcore/midori/.mtn2git_empty)0
-rw-r--r--contrib/mtn2git/mtn/__init__.py6
-rw-r--r--contrib/mtn2git/mtn/authors.py11
-rw-r--r--contrib/mtn2git/mtn/common.py49
-rwxr-xr-xcontrib/mtn2git/mtn/genproxy.py25
-rw-r--r--contrib/mtn2git/mtn/mtn.py419
-rw-r--r--contrib/mtn2git/mtn/utility.py100
-rwxr-xr-xcontrib/mtn2git/mtn2git.py610
-rw-r--r--contrib/mtn2git/status.py47
-rw-r--r--contrib/source-checker/.mtn2git_empty (renamed from packages/linux/compulab-pxa270-2.6.22/.mtn2git_empty)0
-rw-r--r--contrib/source-checker/oe-source-checker.py113
-rw-r--r--packages/alsa/alsa-state.bb3
-rw-r--r--packages/alsa/alsa-state/fic-gta01/gsmspeakerout.state900
-rw-r--r--packages/alsa/alsa-state/fic-gta01/stereoout.state17
-rw-r--r--packages/angstrom/angstrom-version.bb1
-rw-r--r--packages/argtable/.mtn2git_empty (renamed from packages/linux/linux-efika-2.6.20.11/.mtn2git_empty)0
-rw-r--r--packages/argtable/argtable_2.7.bb21
-rw-r--r--packages/atk/atk_1.19.3.bb2
-rw-r--r--packages/atk/atk_1.20.0.bb16
-rw-r--r--packages/avahi/avahi-ui_0.6.21.bb20
-rw-r--r--packages/avahi/mango-lassi_git.bb18
-rw-r--r--packages/base-files/base-files/ghi270/.mtn2git_empty (renamed from packages/nonworking/gutenprint/.mtn2git_empty)0
-rw-r--r--packages/bind/bind-9.3.4-P1/.mtn2git_empty (renamed from packages/opie-usermanager/.mtn2git_empty)0
-rw-r--r--packages/bind/bind-9.3.4-P1/conf.patch301
-rw-r--r--packages/bind/bind-9.3.4-P1/configure.in.patch14
-rw-r--r--packages/bind/bind-9.3.4-P1/so_bsdcompat.patch34
-rw-r--r--packages/bind/bind_9.3.4-P1.bb38
-rw-r--r--packages/binutils/binutils-2.18/binutils-configure-texinfo-version.patch22
-rw-r--r--packages/binutils/binutils_2.18.bb1
-rw-r--r--packages/bluez/bluez-cups-backend_3.20.bb26
-rw-r--r--packages/bluez/bluez-gstreamer-plugin_3.20.bb26
-rw-r--r--packages/bluez/bluez-libs_3.20.bb1
-rw-r--r--packages/bluez/bluez-utils-alsa_3.20.bb24
-rw-r--r--packages/bluez/bluez-utils.inc12
-rw-r--r--packages/bluez/bluez-utils_3.20.bb29
-rw-r--r--packages/bluez/files/ghi270/.mtn2git_empty (renamed from packages/uclibc/uclibc-0.9.29/compulab-pxa270/.mtn2git_empty)0
-rw-r--r--packages/bluez/files/r1000/.mtn2git_empty0
-rw-r--r--packages/busybox/busybox-1.7.2/.mtn2git_empty0
-rw-r--r--packages/busybox/busybox-1.7.2/angstrom/.mtn2git_empty0
-rw-r--r--packages/busybox/busybox-1.7.2/angstrom/defconfig753
-rwxr-xr-xpackages/busybox/busybox-1.7.2/busybox-mdev.sh69
-rw-r--r--packages/busybox/busybox-1.7.2/defconfig647
-rw-r--r--packages/busybox/busybox-1.7.2/udhcpscript.patch17
-rw-r--r--packages/busybox/busybox_1.7.2.bb119
-rw-r--r--packages/dbus/dbus-glib-0.72/cross.patch12
-rw-r--r--packages/dbus/dbus-glib-0.74/.mtn2git_empty0
-rw-r--r--packages/dbus/dbus-glib-0.74/no-examples.patch (renamed from packages/dbus/dbus-glib/no-examples.patch)0
-rw-r--r--packages/dbus/dbus-glib-0.74/no-introspect.patch (renamed from packages/dbus/dbus-glib-0.72/no-introspect.patch)15
-rw-r--r--packages/dbus/dbus-glib-native-0.74/.mtn2git_empty0
-rw-r--r--packages/dbus/dbus-glib-native-0.74/run-with-tmp-session-bus.patch (renamed from packages/dbus/dbus-glib-native-0.72/run-with-tmp-session-bus.patch)0
-rw-r--r--packages/dbus/dbus-glib-native_0.71.bb22
-rw-r--r--packages/dbus/dbus-glib-native_0.74.bb (renamed from packages/dbus/dbus-glib-native_0.72.bb)4
-rw-r--r--packages/dbus/dbus-glib/cross.patch15
-rw-r--r--packages/dbus/dbus-glib/no-introspect.patch17
-rw-r--r--packages/dbus/dbus-glib_0.71.bb29
-rw-r--r--packages/dbus/dbus-glib_0.74.bb (renamed from packages/dbus/dbus-glib_0.72.bb)1
-rw-r--r--packages/dbus/dbus.inc2
-rw-r--r--packages/dbus/dbus_1.0.2.bb2
-rw-r--r--packages/dfu-util/dfu-util-native_svn.bb2
-rw-r--r--packages/dfu-util/dfu-util_svn.bb2
-rw-r--r--packages/directfb/directfb_1.1.0.bb14
-rw-r--r--packages/dropbear/dropbear.inc2
-rw-r--r--packages/ezx/ezxd/ezxd.init6
-rw-r--r--packages/ezx/ezxd_svn.bb2
-rw-r--r--packages/fastcgi/fastcgi_2.4.0.bb4
-rw-r--r--packages/fontconfig/fontconfig_2.4.1.bb7
-rw-r--r--packages/fpdf/.mtn2git_empty0
-rw-r--r--packages/fpdf/fpdf_1.53.bb32
-rw-r--r--packages/gaim/pidgin_2.2.1.bb10
-rw-r--r--packages/gcc/gcc-4.2.2/.mtn2git_empty0
-rw-r--r--packages/gcc/gcc-4.2.2/100-uclibc-conf.patch200
-rw-r--r--packages/gcc/gcc-4.2.2/103-uclibc-conf-noupstream.patch11
-rw-r--r--packages/gcc/gcc-4.2.2/110-arm-eabi.patch27
-rw-r--r--packages/gcc/gcc-4.2.2/200-uclibc-locale.patch2790
-rw-r--r--packages/gcc/gcc-4.2.2/203-uclibc-locale-no__x.patch213
-rw-r--r--packages/gcc/gcc-4.2.2/204-uclibc-locale-wchar_fix.patch48
-rw-r--r--packages/gcc/gcc-4.2.2/205-uclibc-locale-update.patch347
-rw-r--r--packages/gcc/gcc-4.2.2/300-libstdc++-pic.patch46
-rw-r--r--packages/gcc/gcc-4.2.2/301-missing-execinfo_h.patch11
-rw-r--r--packages/gcc/gcc-4.2.2/302-c99-snprintf.patch11
-rw-r--r--packages/gcc/gcc-4.2.2/303-c99-complex-ugly-hack.patch12
-rw-r--r--packages/gcc/gcc-4.2.2/304-index_macro.patch24
-rw-r--r--packages/gcc/gcc-4.2.2/305-libmudflap-susv3-legacy.patch49
-rw-r--r--packages/gcc/gcc-4.2.2/306-libstdc++-namespace.patch36
-rw-r--r--packages/gcc/gcc-4.2.2/307-locale_facets.patch26
-rw-r--r--packages/gcc/gcc-4.2.2/402-libbackend_dep_gcov-iov.h.patch13
-rw-r--r--packages/gcc/gcc-4.2.2/602-sdk-libstdc++-includes.patch20
-rw-r--r--packages/gcc/gcc-4.2.2/740-sh-pr24836.patch25
-rw-r--r--packages/gcc/gcc-4.2.2/800-arm-bigendian.patch67
-rw-r--r--packages/gcc/gcc-4.2.2/801-arm-bigendian-eabi.patch14
-rw-r--r--packages/gcc/gcc-4.2.2/904-flatten-switch-stmt-00.patch153
-rw-r--r--packages/gcc/gcc-4.2.2/README4
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-20000320.patch11
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-32bit-disable.patch85
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-64bit-disable-4.2.0.patch169
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-64bit-disable0.patch47
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-and-or.patch67
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-cfcvt64-disable.patch19
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-cfcvtds-disable.patch32
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-cirrus-bugfixes.patch573
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-compare-geu.patch48
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-compare-unordered.patch98
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-compare-unordered.patch-z-eq98
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-compare.patch400
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-compare.patch-z-eq400
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-dominance.patch12
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754-div.patch139
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754.patch100
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-eabi.patch64
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-floatsi-disable-single.patch38
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-floatsi-disable.patch61
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-floatunsidf.patch37
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-fp_consts.patch13
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-neg.patch30
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-neg2.patch25
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-offset.patch20
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-predicates.patch20
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-predicates2.patch10
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-predicates3.patch116
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-saveregs.patch153
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-scc.patch38
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-truncsi-disable-new.patch33
-rw-r--r--packages/gcc/gcc-4.2.2/arm-crunch-truncsi-disable.patch56
-rw-r--r--packages/gcc/gcc-4.2.2/arm-nolibfloat.patch24
-rw-r--r--packages/gcc/gcc-4.2.2/arm-softfloat.patch16
-rw-r--r--packages/gcc/gcc-4.2.2/arm-thumb-cache.patch29
-rw-r--r--packages/gcc/gcc-4.2.2/arm-thumb.patch64
-rw-r--r--packages/gcc/gcc-4.2.2/cache-amnesia.patch13
-rw-r--r--packages/gcc/gcc-4.2.2/fix-ICE-in-arm_unwind_emit_set.diff18
-rw-r--r--packages/gcc/gcc-4.2.2/gcc41-configure.in.patch22
-rw-r--r--packages/gcc/gcc-4.2.2/ldflags.patch22
-rw-r--r--packages/gcc/gcc-4.2.2/sdk-libstdc++-includes.patch22
-rw-r--r--packages/gcc/gcc-4.2.2/sh3-installfix-fixheaders.patch11
-rw-r--r--packages/gcc/gcc-4.2.2/unbreak-armv4t.patch12
-rw-r--r--packages/gcc/gcc-4.2.2/zecke-no-host-includes.patch31
-rw-r--r--packages/gcc/gcc-4.2.2/zecke-xgcc-cpp.patch12
-rw-r--r--packages/gcc/gcc-cross-initial_4.2.2.bb5
-rw-r--r--packages/gcc/gcc-cross_4.2.1.bb2
-rw-r--r--packages/gcc/gcc-cross_4.2.2.bb20
-rw-r--r--packages/gcc/gcc_4.2.1.bb9
-rw-r--r--packages/gcc/gcc_4.2.2.bb83
-rw-r--r--packages/glib-2.0/glib-2.0-2.14.0/gcc-4.2-inline-fix.patch17
-rw-r--r--packages/glib-2.0/glib-2.0-2.14.1/.mtn2git_empty0
-rw-r--r--packages/glib-2.0/glib-2.0-2.14.1/configure-libtool.patch29
-rw-r--r--packages/glib-2.0/glib-2.0-2.14.1/gcc-4.2-inline-fix.patch17
-rw-r--r--packages/glib-2.0/glib-2.0_2.14.0.bb3
-rw-r--r--packages/glib-2.0/glib-2.0_2.14.1.bb6
-rw-r--r--packages/glibc/glibc_2.3.3+cvs20050221.bb2
-rw-r--r--packages/gnutls/gnutls_1.6.2.bb6
-rw-r--r--packages/gnutls/gnutls_1.6.3.bb2
-rw-r--r--packages/gpe-conf/gpe-conf_0.2.6.bb4
-rwxr-xr-xpackages/gpephone/gpe-session-scripts-phone/phonesession1
-rw-r--r--packages/gpephone/gpe-session-scripts-phone_0.67.bb2
-rwxr-xr-xpackages/gpsd/files/gpsd6
-rw-r--r--packages/gpsd/gpsd_2.28.bb2
-rw-r--r--packages/gpsd/gpsd_2.34.bb2
-rw-r--r--packages/gsm/libgsmd_svn.bb10
-rw-r--r--packages/gstreamer/gst-meta-base_0.10.bb17
-rw-r--r--packages/gstreamer/gst-plugins-ugly/gstmad_16bit.patch109
-rw-r--r--packages/gstreamer/gst-plugins-ugly_0.10.6.bb5
-rw-r--r--packages/gstreamer/gst-plugins.inc2
-rw-r--r--packages/gtk+/gdk-pixbuf-csource-native_2.10.14.bb2
-rw-r--r--packages/gtk+/gtk+-fastscaling_2.10.14.bb14
-rw-r--r--packages/gtk+/gtk+_2.10.14.bb9
-rw-r--r--packages/gtk+/gtk-2.10.inc3
-rw-r--r--packages/gtk-sharp/.mtn2git_empty0
-rw-r--r--packages/gtk-sharp/gtk-sharp.inc11
-rw-r--r--packages/gtk-sharp/gtk-sharp_2.10.2.bb84
-rw-r--r--packages/gtk-webcore/midori/midori.desktop8
-rw-r--r--packages/gtk-webcore/midori_0.0.10.bb11
-rw-r--r--packages/gtk-webcore/midori_0.0.6.bb18
-rw-r--r--packages/gtk-webcore/midori_0.0.8.bb11
-rw-r--r--packages/gtk-webcore/osb-jscore_20070816.bb2
-rw-r--r--packages/gtk-webcore/osb-jscore_svn.bb4
-rw-r--r--packages/gtk-webcore/osb-nrcit_20070816.bb2
-rw-r--r--packages/gtk-webcore/osb-nrcit_svn.bb7
-rw-r--r--packages/gtk-webcore/osb-nrcore_20070816.bb2
-rw-r--r--packages/gtk-webcore/osb-nrcore_svn.bb4
-rw-r--r--packages/gutenprint/.mtn2git_empty0
-rw-r--r--packages/gutenprint/gutenprint-native_5.1.3.bb39
-rw-r--r--packages/gutenprint/gutenprint.inc28
-rw-r--r--packages/gutenprint/gutenprint_5.1.3.bb48
-rw-r--r--packages/gutenprint/ijs_0.35.bb15
-rw-r--r--packages/hal/hal_0.5.9.bb22
-rw-r--r--packages/hal/ohm_git.bb6
-rw-r--r--packages/icu/icu-3.6.inc2
-rw-r--r--packages/images/altboot-console-image.bb (renamed from packages/angstrom/angstrom-altboot-console-image.bb)2
-rw-r--r--packages/images/altboot-x11-image.bb (renamed from packages/angstrom/angstrom-altboot-x11-image.bb)2
-rw-r--r--packages/images/bootmanager-image.bb (renamed from packages/angstrom/angstrom-bootmanager-image.bb)0
-rw-r--r--packages/images/console-image.bb (renamed from packages/angstrom/angstrom-console-image.bb)0
-rw-r--r--packages/images/gateway-image.bb (renamed from packages/angstrom/angstrom-gateway-image.bb)0
-rw-r--r--packages/images/minimal-image-with-mtd-utils.bb (renamed from packages/images/angstrom-minimal-image-with-mtd-utils.bb)2
-rw-r--r--packages/images/minimal-image.bb (renamed from packages/images/angstrom-minimal-image.bb)0
-rw-r--r--packages/images/mokogateway-image.bb (renamed from packages/angstrom/angstrom-mokogateway-image.bb)0
-rw-r--r--packages/images/x11-gpe-image.bb (renamed from packages/angstrom/angstrom-x11-gpe-image.bb)0
-rw-r--r--packages/images/x11-image.bb (renamed from packages/angstrom/angstrom-x11-image.bb)0
-rw-r--r--packages/images/x11-office-image.bb (renamed from packages/angstrom/angstrom-x11-office-image.bb)2
-rw-r--r--packages/images/x11-pimlico-image.bb (renamed from packages/angstrom/angstrom-x11-pimlico-image.bb)0
-rw-r--r--packages/ipkg/files/lonk-link-name.patch38
-rw-r--r--packages/ipkg/ipkg-collateral.bb1
-rw-r--r--packages/ipkg/ipkg_0.99.163.bb3
-rw-r--r--packages/ixp4xx/ixp4xx-npe_2.4.bb5
-rw-r--r--packages/libgcrypt/libgcrypt_1.2.3.bb12
-rw-r--r--packages/libid3tag/libid3tag_0.15.1b.bb (renamed from packages/libid3tag/libid3tag_0.15.0b.bb)3
-rw-r--r--packages/libmad/libmad_0.15.1b.bb2
-rw-r--r--packages/libqpe/libqpe-opie_cvs.bb3
-rw-r--r--packages/libtiff/tiff-3.7.2/.mtn2git_empty0
-rw-r--r--packages/libtiff/tiff-3.7.2/configure.patch20
-rw-r--r--packages/libtiff/tiff_3.7.2.bb5
-rw-r--r--packages/libw100/libw100_svn.bb4
-rw-r--r--packages/lighttpd/lighttpd_1.4.18.bb10
-rw-r--r--packages/linux-libc-headers/linux-libc-headers-2.6.23/.mtn2git_empty0
-rw-r--r--packages/linux-libc-headers/linux-libc-headers-2.6.23/procinfo.h24
-rw-r--r--packages/linux-libc-headers/linux-libc-headers_2.6.23.bb66
-rw-r--r--packages/linux/compulab-pxa270_2.6.16.bb2
-rw-r--r--packages/linux/compulab-pxa270_2.6.22.bb67
-rw-r--r--packages/linux/em-x270-2.6.23/.mtn2git_empty0
-rw-r--r--packages/linux/em-x270-2.6.23/defconfig1354
-rw-r--r--packages/linux/em-x270-2.6.23/em-x270.patch12063
-rw-r--r--packages/linux/em-x270_2.6.23.bb29
-rw-r--r--packages/linux/linux-2.6.21/gumstix-pxa270-mmc.patch33
-rw-r--r--packages/linux/linux-2.6.21/gumstix-verdex/defconfig12
-rw-r--r--packages/linux/linux-2.6.21/mmc-card-detect.patch6
-rw-r--r--packages/linux/linux-2.6.21/pxafb-18bpp-mode.patch17
-rw-r--r--packages/linux/linux-2.6.21/pxafb-definition.patch42
-rw-r--r--packages/linux/linux-2.6.21/smc911x-fixup.patch392
-rw-r--r--packages/linux/linux-2.6.21/tsc2003-config.diff31
-rw-r--r--packages/linux/linux-2.6.21/tsc2003.c557
-rw-r--r--packages/linux/linux-2.6.22/.mtn2git_empty0
-rw-r--r--packages/linux/linux-2.6.22/bd-neon/.mtn2git_empty0
-rw-r--r--packages/linux/linux-2.6.22/bd-neon/defconfig1326
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/.mtn2git_empty0
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/0001-cm-x270-base2.patch (renamed from packages/linux/compulab-pxa270-2.6.22/0001-cm-x270-base2.patch)0
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/0002-cm-x270-match-type.patch (renamed from packages/linux/compulab-pxa270-2.6.22/0002-cm-x270-match-type.patch)0
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/0003-cm-x270-ide.patch (renamed from packages/linux/compulab-pxa270-2.6.22/0003-cm-x270-ide.patch)0
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/0004-cm-x270-it8152.patch (renamed from packages/linux/compulab-pxa270-2.6.22/0004-cm-x270-it8152.patch)0
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/0005-cm-x270-pcmcia.patch (renamed from packages/linux/compulab-pxa270-2.6.22/0005-cm-x270-pcmcia.patch)0
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/0006-ramdisk_load.patch (renamed from packages/linux/compulab-pxa270-2.6.22/0006-ramdisk_load.patch)0
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/0007-mmcsd_large_cards-r0.patch (renamed from packages/linux/compulab-pxa270-2.6.22/0007-mmcsd_large_cards-r0.patch)0
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/0008-cm-x270-nand-simplify-name.patch (renamed from packages/linux/compulab-pxa270-2.6.22/0008-cm-x270-nand-simplify-name.patch)0
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/0009-cursor-fix.patch (renamed from packages/linux/compulab-pxa270-2.6.22/0009-cursor-fix.patch)0
-rw-r--r--packages/linux/linux-2.6.22/cm-x270/defconfig (renamed from packages/linux/compulab-pxa270-2.6.22/defconfig)0
-rw-r--r--packages/linux/linux-2.6.23/.mtn2git_empty0
-rw-r--r--packages/linux/linux-2.6.23/binutils-buildid-arm.patch16
-rw-r--r--packages/linux/linux-2.6.23/cm-x270/.mtn2git_empty0
-rw-r--r--packages/linux/linux-2.6.23/cm-x270/0001-cm-x270-base2.patch2851
-rw-r--r--packages/linux/linux-2.6.23/cm-x270/0002-cm-x270-match-type.patch25
-rw-r--r--packages/linux/linux-2.6.23/cm-x270/0003-cm-x270-ide.patch186
-rw-r--r--packages/linux/linux-2.6.23/cm-x270/0004-cm-x270-it8152.patch496
-rw-r--r--packages/linux/linux-2.6.23/cm-x270/0005-cm-x270-pcmcia.patch228
-rw-r--r--packages/linux/linux-2.6.23/cm-x270/0006-ramdisk_load.patch80
-rw-r--r--packages/linux/linux-2.6.23/cm-x270/0007-mmcsd_large_cards-r0.patch36
-rw-r--r--packages/linux/linux-2.6.23/cm-x270/0008-cm-x270-nand-simplify-name.patch25
-rw-r--r--packages/linux/linux-2.6.23/cm-x270/defconfig1204
-rw-r--r--packages/linux/linux-bd-neon-2.6-2.6.22/.mtn2git_empty0
-rw-r--r--packages/linux/linux-bd-neon-2.6-2.6.22/neon-jffs2-config.patch33
-rw-r--r--packages/linux/linux-bd-neon-2.6_2.6.22.bb48
-rw-r--r--packages/linux/linux-bfin/.mtn2git_empty0
-rw-r--r--packages/linux/linux-bfin/adzs-bf548-ezlite/.mtn2git_empty0
-rw-r--r--packages/linux/linux-bfin/adzs-bf548-ezlite/defconfig1989
-rw-r--r--packages/linux/linux-bfin_svn.bb15
-rw-r--r--packages/linux/linux-efika-2.6.20.20/.mtn2git_empty0
-rw-r--r--packages/linux/linux-efika-2.6.20.20/sched-cfs-v9-v2.6.20.11.patch (renamed from packages/linux/linux-efika-2.6.20.11/sched-cfs-v9-v2.6.20.11.patch)0
-rw-r--r--packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch23
-rw-r--r--packages/linux/linux-efika-2.6.20/defconfig133
-rw-r--r--packages/linux/linux-efika_2.6.20.20.bb (renamed from packages/linux/linux-efika_2.6.20.11.bb)8
-rw-r--r--packages/linux/linux-handhelds-2.6.inc2
-rw-r--r--packages/linux/linux-handhelds-2.6/ghi270/.mtn2git_empty0
-rw-r--r--packages/linux/linux-handhelds-2.6_2.6.21-hh11.bb13
-rw-r--r--packages/linux/linux-handhelds-2.6_2.6.21-hh17.bb11
-rw-r--r--packages/linux/linux-openmoko-devel/defconfig-2.6.23.1 (renamed from packages/linux/linux-openmoko-devel/defconfig)220
-rw-r--r--packages/linux/linux-openmoko-devel/hack-gta02-cpu.patch21
-rw-r--r--packages/linux/linux-openmoko-devel/printascii-2.6.23.patch21
-rw-r--r--packages/linux/linux-openmoko-devel/squashfs-2.6.23.patch4395
-rw-r--r--packages/linux/linux-openmoko-devel_svn+2.6.23.1.bb (renamed from packages/linux/linux-openmoko-devel_svn.bb)27
-rw-r--r--packages/linux/linux-openmoko.inc8
-rw-r--r--packages/linux/linux-openmoko/defconfig-2.6.22.5-fic-gta0113
-rw-r--r--packages/linux/linux-openmoko/defconfig-2.6.22.5-fic-gta0213
-rw-r--r--packages/linux/linux-openmoko_2.6.22.5.bb2
-rw-r--r--packages/linux/linux-rp_2.6.22.bb3
-rw-r--r--packages/linux/linux.inc15
-rw-r--r--packages/linux/linux_2.6.21.bb15
-rw-r--r--packages/linux/linux_2.6.22.bb58
-rw-r--r--packages/linux/linux_2.6.23.bb63
-rw-r--r--packages/llvm/files/.mtn2git_empty0
-rw-r--r--packages/llvm/llvm-gcc4-cross_svn.bb32
-rw-r--r--packages/llvm/llvm-gcc4_svn.bb19
-rw-r--r--packages/llvm/llvm-native_2.1.bb (renamed from packages/llvm/llvm-native_2.0.bb)6
-rw-r--r--packages/llvm/llvm_2.0.bb6
-rw-r--r--packages/lm_sensors/files/prefix-fix.patch14
-rw-r--r--packages/lm_sensors/lmsensors-apps_2.10.1.bb14
-rw-r--r--packages/logrotate/logrotate_3.7.1.bb2
-rw-r--r--packages/maemo3/hildon-1_svn.bb2
-rw-r--r--packages/maemo3/libhildonfm/.mtn2git_empty0
-rw-r--r--packages/maemo3/libhildonfm/hildonfm-ifdef-maemogtk.diff132
-rw-r--r--packages/maemo3/libhildonfm_1.9.41.bb29
-rw-r--r--packages/maemo3/libhildonhelp_1.9.1.bb2
-rw-r--r--packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb6
-rw-r--r--packages/mathomatic/mathomatic_unstable.bb3
-rw-r--r--packages/meta/foonas-packages.bb4
-rw-r--r--packages/meta/meta-toolchain-openmoko.bb5
-rw-r--r--packages/meta/meta-toolchain.bb26
-rw-r--r--packages/meta/openprotium-packages.bb4
-rw-r--r--packages/meta/slugos-native-packages.bb4
-rw-r--r--packages/meta/slugos-native.bb7
-rw-r--r--packages/meta/slugos-packages.bb29
-rw-r--r--packages/meta/unslung-binary-kernel-packages.bb4
-rw-r--r--packages/meta/unslung-packages.bb4
-rw-r--r--packages/mono/README37
-rw-r--r--packages/mono/files/configure-svnr87352.patch21
-rw-r--r--packages/mono/files/genmdesc-cpp.patch22
-rw-r--r--packages/mono/mono-mcs-intermediate.inc60
-rw-r--r--packages/mono/mono-mcs-intermediate_1.2.5.1.bb9
-rw-r--r--packages/mono/mono-mcs-intermediate_svn.bb12
-rw-r--r--packages/mono/mono-native_1.2.2.1.bb5
-rw-r--r--packages/mono/mono-native_1.2.4.bb9
-rw-r--r--packages/mono/mono-native_1.2.5.1.bb4
-rw-r--r--packages/mono/mono.inc17
-rw-r--r--packages/mono/mono_1.2.2.1.bb17
-rw-r--r--packages/mono/mono_1.2.4.bb19
-rw-r--r--packages/mono/mono_1.2.4.inc12
-rw-r--r--packages/mono/mono_1.2.5.1-files.inc1634
-rw-r--r--packages/mono/mono_1.2.5.1.bb76
-rw-r--r--packages/mono/mono_svn.bb95
-rw-r--r--packages/mono/mono_svn.inc15
-rw-r--r--packages/mozilla/minimo_cvs.bb2
-rw-r--r--packages/mplayer/files/mplayer-imageon-svn.patch19
-rw-r--r--packages/mplayer/files/pxa_configure.patch4
-rw-r--r--packages/mplayer/mplayer_svn.bb54
-rw-r--r--packages/mtd/mtd-utils-native.inc6
-rw-r--r--packages/mtd/mtd-utils-native_1.0.0+git.bb1
-rw-r--r--packages/mtd/mtd-utils-tests_1.0.0+git.bb59
-rw-r--r--packages/mtd/mtd-utils_1.0.0+git.bb2
-rw-r--r--packages/musicpd/mpd-alsa_svn.bb57
-rw-r--r--packages/netbase/netbase/ghi270/.mtn2git_empty0
-rw-r--r--packages/nfs-utils/files/uclibc_bzero_fix.patch51
-rw-r--r--packages/nfs-utils/nfs-utils_1.0.6.bb2
-rw-r--r--packages/nonworking/gutenprint/gutenprint_5.0.0.bb22
-rw-r--r--packages/openmoko-panel-plugins/openmoko-panel-bt_svn.bb2
-rw-r--r--packages/openmoko-panel-plugins/openmoko-panel-gsm_svn.bb2
-rw-r--r--packages/openmoko2/libmokojournal2_svn.bb4
-rw-r--r--packages/openmoko2/neod_svn.bb5
-rw-r--r--packages/openmoko2/openmoko-appmanager2_svn.bb10
-rw-r--r--packages/openmoko2/openmoko-common2_svn.bb10
-rw-r--r--packages/openmoko2/openmoko-dates2_svn.bb5
-rw-r--r--packages/openmoko2/openmoko-mediaplayer2_svn.bb4
-rw-r--r--packages/openmoko2/openmoko-session2.bb5
-rw-r--r--packages/openmoko2/openmoko-sound-system2/session2
-rw-r--r--packages/openmoko2/openmoko-sound-system2_0.1.0.bb3
-rw-r--r--packages/openmoko2/openmoko-sound-theme-standard2_svn.bb4
-rw-r--r--packages/openmoko2/openmoko-theme-standard2_svn.bb8
-rw-r--r--packages/openssh/files/sftp-server-nolibcrypto.patch13
-rw-r--r--packages/openssh/openssh_4.6p1.bb8
-rw-r--r--packages/opie-usermanager/opie-usermanager.inc17
-rw-r--r--packages/opie-usermanager/opie-usermanager_1.2.2.bb7
-rw-r--r--packages/opie-usermanager/opie-usermanager_1.2.3.bb6
-rw-r--r--packages/opie-usermanager/opie-usermanager_cvs.bb7
-rw-r--r--packages/portmap/portmap.inc1
-rw-r--r--packages/procps/procps-3.2.7/linux-limits.patch13
-rw-r--r--packages/procps/procps_3.2.7.bb3
-rw-r--r--packages/python/python-2.5-manifest.inc12
-rw-r--r--packages/python/python-pygobject-native_2.12.2.bb3
-rw-r--r--packages/python/python-pygobject-native_2.12.3.bb2
-rw-r--r--packages/python/python-pygobject_2.12.2.bb23
-rw-r--r--packages/python/python-pygtk_2.10.4.bb3
-rw-r--r--packages/qmake/qmake2-native-2.10a/use-lflags-last.patch22
-rw-r--r--packages/qmake/qmake2-native_2.10a.bb1
-rw-r--r--packages/rxvt-unicode/rxvt-unicode_7.9.bb6
-rw-r--r--packages/slugos-init/files/modulefunctions7
-rw-r--r--packages/slugos-init/slugos-init_0.10.bb2
-rw-r--r--packages/sylpheed/claws-mail.inc46
-rw-r--r--packages/sylpheed/claws-mail_2.7.2.bb41
-rw-r--r--packages/sylpheed/claws-mail_2.9.1.bb1
-rw-r--r--packages/sylpheed/claws-mail_3.0.2.bb (renamed from packages/sylpheed/claws-mail_3.0.1.bb)0
-rw-r--r--packages/sylpheed/claws-plugin-gtkhtml2-viewer_0.15.2.bb (renamed from packages/sylpheed/claws-plugin-gtkhtml2-viewer_0.14.1.bb)0
-rw-r--r--packages/sylpheed/claws-plugin-gtkhtml2-viewer_0.15.bb20
-rw-r--r--packages/sylpheed/claws-plugin-maildir_0.24.4.bb20
-rw-r--r--packages/sylpheed/claws-plugin-mailmbox_1.12.4.bb20
-rw-r--r--packages/sylpheed/claws-plugin-mailmbox_1.14.bb (renamed from packages/sylpheed/claws-plugin-mailmbox_1.13.bb)0
-rw-r--r--packages/sylpheed/claws-plugin-rssyl_0.15.bb (renamed from packages/sylpheed/claws-plugin-rssyl_0.13.bb)0
-rw-r--r--packages/tasks/task-base.bb2
-rw-r--r--packages/tasks/task-boot.bb3
-rw-r--r--packages/tasks/task-openmoko.bb4
-rw-r--r--packages/tasks/task-sdk.bb14
-rw-r--r--packages/tasks/task-slugos.bb3
-rw-r--r--packages/tasks/task-toolchain-openmoko-sdk.bb28
-rw-r--r--packages/tslib/tslib-1.0/bd-neon/.mtn2git_empty0
-rw-r--r--packages/tslib/tslib-1.0/bd-neon/ts.conf5
-rw-r--r--packages/tslib/tslib-1.0/bd-neon/tslib.sh6
-rw-r--r--packages/tslib/tslib_1.0.bb2
-rw-r--r--packages/ttf-fonts/ttf-liberation_0.2.bb2
-rw-r--r--packages/uboot/files/makefile-no-dirafter.patch17
-rw-r--r--packages/uboot/u-boot-1.1.2/u-boot-1.1.2-neon.patch19204
-rw-r--r--packages/uboot/u-boot-mkimage-openmoko-native_oe.bb1
-rw-r--r--packages/uboot/u-boot_1.1.2.bb3
-rw-r--r--packages/uboot/uboot-openmoko_1.2.0+gitf34024d4a328e6edd906456da98d2c537155c4f7+svn2943.bb1
-rw-r--r--packages/uboot/uboot-openmoko_svn.bb5
-rw-r--r--packages/uclibc/elf2flt_svn.bb6
-rw-r--r--packages/uclibc/uclibc-0.9.29/cm-x270/.mtn2git_empty0
-rw-r--r--packages/uclibc/uclibc-0.9.29/cm-x270/uClibc.machine (renamed from packages/uclibc/uclibc-0.9.29/compulab-pxa270/uClibc.machine)0
-rw-r--r--packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-001-fix-mmap.patch91
-rw-r--r--packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-conditional-sched_affinity.patch53
-rw-r--r--packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch12
-rw-r--r--packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-fix-internal_function-definition.patch51
-rw-r--r--packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-rm-whitespace.patch86
-rw-r--r--packages/uclibc/uclibc_0.9.29.bb9
-rw-r--r--packages/uicmoc/uicmoc4-native_4.3.1.bb1
-rw-r--r--packages/usbpath/.mtn2git_empty0
-rw-r--r--packages/usbpath/usbpath-native_svn.bb8
-rw-r--r--packages/usbpath/usbpath_svn.bb18
-rw-r--r--packages/vlan/vlan_1.9.bb24
-rw-r--r--packages/vlc/vlc-gpe_0.8.4.bb6
-rw-r--r--packages/webkit/files/WebKit.pri27
-rw-r--r--packages/webkit/files/WebKit.pro17
-rw-r--r--packages/webkit/webkit-gtk_svn.bb17
-rw-r--r--packages/wifistix/.mtn2git_empty0
-rw-r--r--packages/wifistix/wifistix-modules/.mtn2git_empty0
-rw-r--r--packages/wifistix/wifistix-modules/2.6.17-new-pcmcia-layer.patch484
-rw-r--r--packages/wifistix/wifistix-modules/bad-cast.patch13
-rw-r--r--packages/wifistix/wifistix-modules/fix-essid-truncation.patch13
-rw-r--r--packages/wifistix/wifistix-modules/install-properly.patch14
-rw-r--r--packages/wifistix/wifistix-modules/marvell-devicename.patch11
-rw-r--r--packages/wifistix/wifistix-modules/marvell-devicetable.patch25
-rw-r--r--packages/wifistix/wifistix-modules/marvell-gumstix.patch24
-rw-r--r--packages/wifistix/wifistix-modules/no-more-config-h.patch24
-rw-r--r--packages/wifistix/wifistix-modules/realtime-kernel.patch25
-rw-r--r--packages/wifistix/wifistix-modules/sbi-no-inline.patch13
-rw-r--r--packages/wifistix/wifistix-modules/struct-changes.patch13
-rw-r--r--packages/wifistix/wifistix-modules/wifistix.conf4
-rw-r--r--packages/wifistix/wifistix-modules_5.0.16.p0.bb50
-rw-r--r--packages/xorg-xserver/xserver-kdrive-1.2.0/kdrive-imageon.patch9079
-rw-r--r--packages/xorg-xserver/xserver-kdrive-imageon_1.2.0.bb3
-rw-r--r--packages/xorg-xserver/xserver-kdrive/gumstix-kmode.patch23
-rw-r--r--packages/xorg-xserver/xserver-kdrive_1.3.0.0.bb6
-rw-r--r--packages/xserver-common/files/ghi270/.mtn2git_empty0
-rw-r--r--packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/Xserver4
-rw-r--r--packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/xsplash-qvga.ppmbin0 -> 230460 bytes
-rw-r--r--packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/xsplash-vga.ppmbin0 -> 921660 bytes
-rw-r--r--packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb19
-rw-r--r--packages/yaffs2/yaffs2-utils-native_cvs.bb2
-rw-r--r--site/arm-common8
-rw-r--r--site/arm-linux3
-rw-r--r--site/common-glibc3
-rw-r--r--site/common-uclibc3
510 files changed, 65585 insertions, 10388 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 7533c3f8fc..f58a2d8960 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -39,7 +39,7 @@ Mail: cbrake@bec-systems.com
Website: http://bec-systems.com
Interests: Support in OE for single board computers, web application support
Machines: compulab-pxa270, logicpd-pxa270,
-Recipes: mono
+Recipes: mono argtable
Person: Erik Hovland
Mail: erik@hovland.org
diff --git a/classes/angstrom-mirrors.bbclass b/classes/angstrom-mirrors.bbclass
index cd27a8545b..e44a78c983 100644
--- a/classes/angstrom-mirrors.bbclass
+++ b/classes/angstrom-mirrors.bbclass
@@ -1,4 +1,4 @@
MIRRORS_append () {
ftp://.*/.*/ http://www.angstrom-distribution.org/unstable/sources/
-http://.*/.*/ http://www.angstrom-distribution.org/unstable/sources/
+https?$://.*/.*/ http://www.angstrom-distribution.org/unstable/sources/
}
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 999d409914..2cf205fbe9 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -22,6 +22,7 @@ def base_chk_load_parser(config_path):
def base_chk_file(parser, pn, pv, src_uri, localpath, data):
import os, bb
+ no_checksum = False
# Try PN-PV-SRC_URI first and then try PN-SRC_URI
# we rely on the get method to create errors
pn_pv_src = "%s-%s-%s" % (pn,pv,src_uri)
@@ -36,8 +37,7 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data):
md5 = parser.get(src_uri, "md5")
sha256 = parser.get(src_uri, "sha256")
else:
- return False
- #raise Exception("Can not find a section for '%s' '%s' and '%s'" % (pn,pv,src_uri))
+ no_checksum = True
# md5 and sha256 should be valid now
if not os.path.exists(localpath):
@@ -60,6 +60,19 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data):
except OSError:
raise Exception("Executing shasum failed")
+ if no_checksum == True: # we do not have conf/checksums.ini entry
+ try:
+ file = open("%s/checksums.ini" % bb.data.getVar("TMPDIR", data, 1), "a")
+ except:
+ return False
+
+ if not file:
+ raise Exception("Creating checksums.ini failed")
+
+ file.write("[%s]\nmd5=%s\nsha256=%s\n\n" % (src_uri, md5data, shadata))
+ file.close()
+ return False
+
if not md5 == md5data:
bb.note("The MD5Sums did not match. Wanted: '%s' and Got: '%s'" % (md5,md5data))
raise Exception("MD5 Sums do not match. Wanted: '%s' Got: '%s'" % (md5, md5data))
@@ -485,11 +498,9 @@ python base_do_fetch() {
(type,host,path,_,_,_) = bb.decodeurl(url)
uri = "%s://%s%s" % (type,host,path)
try:
- if not base_chk_file(parser, pn, pv,uri, localpath, d):
- if type != "file":
+ if type == "http" or type == "https" or type == "ftp" or type == "ftps":
+ if not base_chk_file(parser, pn, pv,uri, localpath, d):
bb.note("%s-%s: %s has no entry in conf/checksums.ini, not checking URI" % (pn,pv,uri))
- else:
- bb.debug("%s-%s: %s has no entry in conf/checksums.ini, not checking URI" % (pn,pv,uri))
except Exception:
raise bb.build.FuncFailed("Checksum of '%s' failed" % uri)
}
diff --git a/classes/insane.bbclass b/classes/insane.bbclass
index 83f8c43bba..3fb2d04a81 100644
--- a/classes/insane.bbclass
+++ b/classes/insane.bbclass
@@ -42,7 +42,7 @@ def package_qa_get_machine_dict():
"i486": ( 3, 0, 0, True, True),
"i586": ( 3, 0, 0, True, True),
"i686": ( 3, 0, 0, True, True),
- "x64_64": (62, 0, 0, True, False),
+ "x86_64": (62, 0, 0, True, False),
"ia64": (50, 0, 0, True, False),
"alpha": (36902, 0, 0, True, False),
"hppa": (15, 3, 0, False, True),
diff --git a/classes/mono.bbclass b/classes/mono.bbclass
new file mode 100644
index 0000000000..ccb16d9acc
--- /dev/null
+++ b/classes/mono.bbclass
@@ -0,0 +1,177 @@
+def mono_find_provides_and_requires(files, d):
+ provides = []
+ requires = []
+
+ import bb, os, commands
+
+ pathprefix = "export PATH=%s; export LANG=; export LC_ALL=; " % bb.data.getVar('PATH', d, 1)
+ for filename in files:
+ if not filename.endswith(".dll") and not filename.endswith(".exe"):
+ continue
+ if not os.path.isfile(filename) or os.path.islink(filename):
+ continue
+
+ ## Provides
+ name, version = None, None
+
+ ret, result = commands.getstatusoutput("%smonodis --assembly '%s'" % (pathprefix, filename))
+ if ret:
+ bb.error("raw_provides_and_requires: monodis --assembly '%s' failed, dependency information will be inaccurate" % filename)
+ continue
+ for line in result.splitlines():
+ if not ":" in line: continue
+ key, value = line.split(":", 1)
+ if key.strip() == "Name":
+ name = value.strip()
+ elif key.strip() == "Version":
+ version = value.strip()
+ if name is not None and version is not None:
+ if (name, version) not in provides:
+ provides.append( (name, version) )
+
+ ## Requires
+ name, version = None, None
+ ret, result = commands.getstatusoutput("%smonodis --assemblyref '%s'" % (pathprefix, filename))
+ if ret:
+ bb.error("raw_provides_and_requires: monodis --assemblyref '%s' failed, dependency information will be inaccurate" % filename)
+ continue
+ for line in result.splitlines():
+ if not "=" in line: continue
+ key, value = line.split("=", 1)
+ if ":" in key and key.split(":",1)[1].strip() == "Version":
+ version = value.strip()
+ elif key.strip() == "Name":
+ name = value.strip()
+ if name is not None and version is not None:
+ if (name, version) not in requires:
+ requires.append( (name, version) )
+ name, version = None, None
+
+ # Remove everything from requires that's already in provides as it's not actually required
+ # to be provided externally
+ requires = [e for e in requires if not e in provides]
+ return provides, requires
+
+python mono_do_clilibs() {
+ import bb, os, re, os.path
+
+ exclude_clilibs = bb.data.getVar('EXCLUDE_FROM_CLILIBS', d, 0)
+ if exclude_clilibs:
+ bb.note("not generating clilibs")
+ return
+
+ lib_re = re.compile("^lib.*\.so")
+ libdir_re = re.compile(".*/lib$")
+
+ packages = bb.data.getVar('PACKAGES', d, 1)
+
+ workdir = bb.data.getVar('WORKDIR', d, 1)
+ if not workdir:
+ bb.error("WORKDIR not defined")
+ return
+
+ staging = bb.data.getVar('STAGING_DIR', d, 1)
+ if not staging:
+ bb.error("STAGING_DIR not defined")
+ return
+
+ pkgdest = bb.data.getVar('PKGDEST', d, 1)
+
+ clilibs_dir = os.path.join(staging, "clilibs")
+ bb.mkdirhier(clilibs_dir)
+
+ provides, requires = {}, {}
+ private_libs = bb.data.getVar('PRIVATE_CLILIBS', d, 1)
+ for pkg in packages.split():
+ bb.debug(2, "calculating clilib provides for %s" % pkg)
+
+ files_to_check = []
+ top = os.path.join(pkgdest, pkg)
+ for root, dirs, files in os.walk(top):
+ for file in files:
+ path = os.path.join(root, file)
+ if file.endswith(".exe") or file.endswith(".dll"):
+ files_to_check.append( path )
+ provides[pkg], requires[pkg] = mono_find_provides_and_requires(files_to_check, d)
+ clilibs_file = os.path.join(clilibs_dir, pkg + ".list")
+ if os.path.exists(clilibs_file):
+ os.remove(clilibs_file)
+ if len(provides[pkg]) > 0:
+ fd = open(clilibs_file, 'w')
+ for s in provides[pkg]:
+ fd.write(" ".join(s) + '\n')
+ fd.close()
+
+ clilib_provider = {}
+ list_re = re.compile('^(.*)\.list$')
+ for file in os.listdir(clilibs_dir):
+ m = list_re.match(file)
+ if m:
+ dep_pkg = m.group(1)
+ fd = open(os.path.join(clilibs_dir, file))
+ lines = fd.readlines()
+ fd.close()
+ for l in lines:
+ clilib_provider[tuple(l.rstrip().split())] = dep_pkg
+
+ for pkg in packages.split():
+ bb.debug(2, "calculating clilib requirements for %s" % pkg)
+
+ deps = []
+ for n in requires[pkg]:
+ if n in clilib_provider.keys():
+ dep_pkg = clilib_provider[n]
+
+ if dep_pkg == pkg:
+ continue
+
+ if not dep_pkg in deps:
+ deps.append(dep_pkg)
+ else:
+ bb.note("Couldn't find CLI library provider for %s" % (n,))
+
+ deps_file = os.path.join(pkgdest, pkg + ".clilibdeps")
+ if os.path.exists(deps_file):
+ os.remove(deps_file)
+ if len(deps) > 0:
+ fd = open(deps_file, 'w')
+ for dep in deps:
+ fd.write(dep + '\n')
+ fd.close()
+}
+
+do_mono_stage() {
+ if [ "${INHIBIT_MONO_STAGE}" = "1" ]
+ then
+ return
+ fi
+
+ for package in ${PACKAGES}; do
+ if [ -d "${PKGDEST}/${package}/${libdir}" ]; then
+ cd "${PKGDEST}/${package}/${libdir}"
+ for file in `find . -iname "*.dll"`; do
+ cp --parent -fpPR "${file}" "${STAGING_LIBDIR}/"
+ done
+ fi
+ done
+}
+addtask mono_stage after do_package before do_populate_staging
+
+def mono_after_parse(d):
+ import bb
+ # Insert mono_do_clilibs into PACKAGEFUNCS
+ # Needs to be called after populate_packages, but before read_shlibdeps
+ PACKAGEFUNCS = bb.data.getVar("PACKAGEFUNCS", d, 1)
+ if PACKAGEFUNCS:
+ PACKAGEFUNCS = PACKAGEFUNCS.split()
+ if "read_shlibdeps" in PACKAGEFUNCS:
+ i = PACKAGEFUNCS.index("read_shlibdeps")
+ PACKAGEFUNCS.insert(i, "mono_do_clilibs")
+ elif "populate_packages" in PACKAGEFUNCS:
+ i = PACKAGEFUNCS.index("populate_packages")
+ PACKAGEFUNCS.insert(i+1, "mono_do_clilibs")
+ bb.data.setVar("PACKAGEFUNCS", " ".join(PACKAGEFUNCS), d)
+
+python () {
+ mono_after_parse(d)
+}
diff --git a/classes/package.bbclass b/classes/package.bbclass
index 516cae823d..b114049b8e 100644
--- a/classes/package.bbclass
+++ b/classes/package.bbclass
@@ -793,20 +793,14 @@ python read_shlibdeps () {
packages = bb.data.getVar('PACKAGES', d, 1).split()
for pkg in packages:
rdepends = explode_deps(bb.data.getVar('RDEPENDS_' + pkg, d, 0) or bb.data.getVar('RDEPENDS', d, 0) or "")
- shlibsfile = bb.data.expand("${PKGDEST}/" + pkg + ".shlibdeps", d)
- if os.access(shlibsfile, os.R_OK):
- fd = file(shlibsfile)
- lines = fd.readlines()
- fd.close()
- for l in lines:
- rdepends.append(l.rstrip())
- pcfile = bb.data.expand("${PKGDEST}/" + pkg + ".pcdeps", d)
- if os.access(pcfile, os.R_OK):
- fd = file(pcfile)
- lines = fd.readlines()
- fd.close()
- for l in lines:
- rdepends.append(l.rstrip())
+ for extension in ".shlibdeps", ".pcdeps", ".clilibdeps":
+ depsfile = bb.data.expand("${PKGDEST}/" + pkg + extension, d)
+ if os.access(depsfile, os.R_OK):
+ fd = file(depsfile)
+ lines = fd.readlines()
+ fd.close()
+ for l in lines:
+ rdepends.append(l.rstrip())
bb.data.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends), d)
}
diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass
index d3e5832251..5571f699e7 100644
--- a/classes/rootfs_deb.bbclass
+++ b/classes/rootfs_deb.bbclass
@@ -10,8 +10,8 @@ fakeroot rootfs_deb_do_rootfs () {
mkdir -p ${IMAGE_ROOTFS}/var/dpkg/info
mkdir -p ${IMAGE_ROOTFS}/var/dpkg/updates
- rm -f ${STAGING_DIR}/etc/apt/sources.list.rev
- rm -f ${STAGING_DIR}/etc/apt/preferences
+ rm -f ${STAGING_DIR}${sysconfdir}/apt/sources.list.rev
+ rm -f ${STAGING_DIR}${sysconfdir}/apt/preferences
> ${IMAGE_ROOTFS}/var/dpkg/status
> ${IMAGE_ROOTFS}/var/dpkg/available
# > ${STAGING_DIR}/var/dpkg/status
@@ -28,21 +28,21 @@ fakeroot rootfs_deb_do_rootfs () {
apt-ftparchive packages . | bzip2 > Packages.bz2
echo "Label: $arch" > Release
- echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_DIR}/etc/apt/sources.list.rev
+ echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_DIR}${sysconfdir}/apt/sources.list.rev
(echo "Package: *"
echo "Pin: release l=$arch"
echo "Pin-Priority: $((800 + $priority))"
- echo) >> ${STAGING_DIR}/etc/apt/preferences
+ echo) >> ${STAGING_DIR}${sysconfdir}/apt/preferences
priority=$(expr $priority + 5)
done
- tac ${STAGING_DIR}/etc/apt/sources.list.rev > ${STAGING_DIR}/etc/apt/sources.list
+ tac ${STAGING_DIR}${sysconfdir}/apt/sources.list.rev > ${STAGING_DIR}${sysconfdir}/apt/sources.list
- cat "${STAGING_DIR}/etc/apt/apt.conf.sample" \
+ cat "${STAGING_DIR}${sysconfdir}/apt/apt.conf.sample" \
| sed -e 's#Architecture ".*";#Architecture "${TARGET_ARCH}";#' \
- > "${STAGING_DIR}/etc/apt/apt-rootfs.conf"
+ > "${STAGING_DIR}${sysconfdir}/apt/apt-rootfs.conf"
- export APT_CONFIG="${STAGING_DIR}/etc/apt/apt-rootfs.conf"
+ export APT_CONFIG="${STAGING_DIR}${sysconfdir}/apt/apt-rootfs.conf"
export D=${IMAGE_ROOTFS}
export OFFLINE_ROOT=${IMAGE_ROOTFS}
export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
@@ -112,17 +112,17 @@ fakeroot rootfs_deb_do_rootfs () {
if [ -e ${IMAGE_ROOTFS}/usr/dpkg/alternatives ]; then
rmdir ${IMAGE_ROOTFS}/usr/dpkg/alternatives
fi
- if [ ! -e ${IMAGE_ROOTFS}/usr/lib/ipkg ] ; then
- mkdir -p ${IMAGE_ROOTFS}/usr/lib/ipkg
+ if [ ! -e ${IMAGE_ROOTFS}${libdir}/ipkg ] ; then
+ mkdir -p ${IMAGE_ROOTFS}${libdir}/ipkg
fi
- if [ ! -e ${IMAGE_ROOTFS}/etc/ipkg ] ; then
- mkdir -p ${IMAGE_ROOTFS}/etc/ipkg
+ if [ ! -e ${IMAGE_ROOTFS}${sysconfdir}/ipkg ] ; then
+ mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ipkg
fi
- ln -sf /usr/lib/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
- ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}/usr/lib/ipkg/info
- ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}/usr/lib/ipkg/status
+ ln -sf ${libdir}/ipkg/alternatives ${IMAGE_ROOTFS}/usr/dpkg/alternatives
+ ln -sf /usr/dpkg/info ${IMAGE_ROOTFS}${libdir}/ipkg/info
+ ln -sf /usr/dpkg/status ${IMAGE_ROOTFS}${libdir}/ipkg/status
${ROOTFS_POSTPROCESS_COMMAND}
@@ -150,6 +150,6 @@ rootfs_deb_log_check() {
}
remove_packaging_data_files() {
- rm -rf ${IMAGE_ROOTFS}/usr/lib/ipkg/
+ rm -rf ${IMAGE_ROOTFS}${libdir}/ipkg/
rm -rf ${IMAGE_ROOTFS}/usr/dpkg/
}
diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass
index 6babee30a2..c6e2099e7c 100644
--- a/classes/rootfs_ipk.bbclass
+++ b/classes/rootfs_ipk.bbclass
@@ -39,8 +39,8 @@ fakeroot rootfs_ipk_do_rootfs () {
export D=${IMAGE_ROOTFS}
export OFFLINE_ROOT=${IMAGE_ROOTFS}
export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS}
- mkdir -p ${IMAGE_ROOTFS}/etc/ipkg/
- grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}/etc/ipkg/arch.conf
+ mkdir -p ${IMAGE_ROOTFS}${sysconfdir}/ipkg/
+ grep "^arch" ${IPKGCONF_TARGET} >${IMAGE_ROOTFS}${sysconfdir}/ipkg/arch.conf
for i in ${IMAGE_ROOTFS}${libdir}/ipkg/info/*.preinst; do
if [ -f $i ] && ! sh $i; then
@@ -82,5 +82,5 @@ rootfs_ipk_log_check() {
}
remove_packaging_data_files() {
- rm -rf ${IMAGE_ROOTFS}/usr/lib/ipkg/
+ rm -rf ${IMAGE_ROOTFS}${libdir}/ipkg/
}
diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass
index 8067798000..441da77bd0 100644
--- a/classes/sdk.bbclass
+++ b/classes/sdk.bbclass
@@ -21,6 +21,7 @@ exec_prefix = "${prefix}"
base_prefix = "${exec_prefix}"
FILES_${PN} = "${prefix}"
-FILES_${PN}-dbg += "${prefix}/bin/.debug \
+FILES_${PN}-dbg += "${prefix}/.debug \
+ ${prefix}/bin/.debug \
${prefix}/sbin/.debug \
"
diff --git a/conf/bitbake.conf b/conf/bitbake.conf
index 5d06cff32b..046b107936 100644
--- a/conf/bitbake.conf
+++ b/conf/bitbake.conf
@@ -210,7 +210,7 @@ IMAGE_LINK_NAME = "${IMAGE_BASENAME}-${MACHINE}"
IMAGE_CMD = ""
IMAGE_CMD_jffs2 = "mkfs.jffs2 -x lzo --root=${IMAGE_ROOTFS} --faketime --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 ${EXTRA_IMAGECMD}"
-IMAGE_CMD_yaffs2 = "mkyaffs2image ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.yaffs2 ${EXTRA_IMAGECMD}"
+IMAGE_CMD_yaffs2 = "mkyaffs2image 1 ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.yaffs2 ${EXTRA_IMAGECMD}"
IMAGE_CMD_cramfs = "mkcramfs ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.cramfs ${EXTRA_IMAGECMD}"
IMAGE_CMD_ext2 = "genext2fs -b ${IMAGE_ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}"
IMAGE_CMD_ext2.gz = "rm -rf ${DEPLOY_DIR_IMAGE}/tmp.gz && mkdir ${DEPLOY_DIR_IMAGE}/tmp.gz; genext2fs -b ${IMAGE_ROOTFS_SIZE} -d ${IMAGE_ROOTFS} ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2 ${EXTRA_IMAGECMD}; gzip -f -9 ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2; mv ${DEPLOY_DIR_IMAGE}/tmp.gz/${IMAGE_NAME}.rootfs.ext2.gz ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.ext2.gz; rmdir ${DEPLOY_DIR_IMAGE}/tmp.gz"
@@ -485,7 +485,8 @@ require conf/sanity.conf
DL_DIR ?= "${TMPDIR}/downloads"
IMAGE_FSTYPES ?= "jffs2"
PCMCIA_MANAGER ?= "pcmcia-cs"
-MACHINE_TASK_PROVIDER ?= "task-base"
+DEFAULT_TASK_PROVIDER ?= "task-base"
+MACHINE_TASK_PROVIDER ?= "${DEFAULT_TASK_PROVIDER}"
IMAGE_ROOTFS_SIZE_ext2 ?= "65536"
IMAGE_ROOTFS_SIZE_ext2.gz ?= "65536"
IMAGE_ROOTFS_SIZE_ext3 ?= "65536"
diff --git a/conf/checksums.ini b/conf/checksums.ini
index 27b9e87e92..81b64d4668 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -219,8 +219,8 @@ md5=b5174b59e4a050fb462af5dbf28ebba3
sha256=45299a4db47c9c08c3649d4f62b211ae79ef5143360c264a40371a728f6ad99b
[ftp://ftp.debian.org/debian/pool/main/f/fakechroot/fakechroot_2.5.orig.tar.gz]
-md5=e2d4dd31f06c116685d0bdbccef84d00
-sha256=8961b4d552493bf0a00cbee21010fdf5344ebd7f29f304349c8c5023218c0227
+md5=b885951b98f4316f9686699e9853513d
+sha256=990cd830ea362ba2cb88ca7b59cd3f4d115a054621450b5cf211cadebed23ee0
[ftp://ftp.debian.org/debian/pool/main/f/fetchmail/fetchmail_6.2.5.orig.tar.gz]
md5=9956b30139edaa4f5f77c4d0dbd80225
@@ -399,8 +399,8 @@ md5=a556eef04aeb574ac8ab0dd8c868fcab
sha256=ceaa67f19a1c5462f5e739fcd3b53dd42b0173d9deee579c55e5088801559e43
[ftp://ftp.freebsd.org/pub/FreeBSD//ports/packages/archivers/rpm2cpio-1.2_2.tbz]
-md5=801fd27c30c2e68ab4f193f15f81abb3
-sha256=ecfcc4b5b6658f07eb01cee4d081e8a127b95c9b50a6dc94b622c09522545c53
+md5=d4950dc6918ca79a4abab306b6188512
+sha256=5ec970d34b4e22feea0333dae3b5f5ee0e38295d89e306b4929b910f4a2aae25
[ftp://ftp.freeciv.org/freeciv/stable/freeciv-1.14.1.tar.bz2]
md5=d328f65e7fca5252f27161f5f9e97a03
@@ -1286,10 +1286,6 @@ sha256=025655971eef7f76ece9754346d6eb4e2dd44ddf569c4c84de27836aa24b04a3
md5=9519eccf0638c9962f73a7b20da77e0e
sha256=8fdbc7da376b22796879d6e3b756f71a8800ed1b35fc88aa76cddffd6f1fd883
-[ftp://ftp.trolltech.com/pub/qt/source/qtopia-core-opensource-src-4.3.1.tar.gz]
-md5=8b2f59b22f1cfbcd86234867e432cae3
-sha256=73975dca4c345f1e41558ef8704532a1525d96a9b149d6f6729eb24c372bb577
-
[ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-base-0.17.tar.gz]
md5=1f0193358e92559ec0f598b09ccbc0ec
sha256=16dd81625ebfc8f5dcb0dfd2e6bac223aad325a9405d66a556fe349446b3c332
@@ -1695,8 +1691,8 @@ md5=1884607cdebaf730737cb99b2909219b
sha256=639f8bd48c58b1fa4f24a65bc8aa3e53219e7d48726e63e7c40f0701d1d89b9c
[http://cheeseshop.python.org/packages/source/F/FormEncode/FormEncode-0.4.tar.gz]
-md5=bc5d1f77f9548a1c8c22e5ec1692e799
-sha256=042ed2bb4b15bbc1f1457447cd3ce0c14b339671ebfd3f68b4174e0aa039c043
+md5=797852a19505f7d919db96dd994d0484
+sha256=2c0de0243ce1853bf62ed9b2da122472b6682a117843af0cce4b4cf9588194ff
[http://cheeseshop.python.org/packages/source/S/SQLObject/SQLObject-0.7.0.tar.gz]
md5=dccb921b5df6a15312b56630ac4ac205
@@ -3363,8 +3359,8 @@ md5=c572e7842fe36348f5b2972c1025a75a
sha256=138d2e59569f76f1a5d35bd5d85e7006eeebc4f48cd3dac902e2824ed50c3d80
[http://downloads.sourceforge.net/shfs/shfs-0.35.tar.gz]
-md5=f250003d998daea29af6bf81b5e7a1b4
-sha256=34cfa1df400b07d553488a3ab24bc445127b44fb2e8e6f4868f34ce9b3a7c3b8
+md5=016f49d71bc32eee2b5d11fc1600cfbe
+sha256=0d48ffe4d801180c15466f20aaa5802adb9d22067e8941e051dc3c64717ec3c2
[http://downloads.sourceforge.net/slotsig/slotsig-0.6.tar.bz2]
md5=dfe9f5d3f17075ec23eb923899ac5f24
@@ -3874,10 +3870,6 @@ sha256=13f59a7cd5190983412689495c399444cf73c1ced0813149e4480c8848bb9f17
md5=40a93def0f37f1577c5edc638fcb35a5
sha256=6e932e73818697ea9ec8909bed535a87ba34651031bbbedb63a42e4cdc423284
-[http://freedesktop.org/Software/desktop-file-utils/releases/desktop-file-utils-0.6.tar.gz]
-md5=0d6b6d4fa861f73e0b4225e93077578f
-sha256=64c05a48e91850627cfaa7314d4b4b847547bc4333fa9345994fa49c79276f3d
-
[http://freedesktop.org/Software/startup-notification/releases/startup-notification-0.5.tar.gz]
md5=c7a96f4615b07ed847061b0a9a0be989
sha256=7d2f388f7b50fc5c929ef173c2df900c588329ab07c16184dee3745a26ac54ae
@@ -6342,10 +6334,6 @@ sha256=deb6530d40ecad2b849d68912500e6d03bab4ac63de7a97340d05af1d7cf0ad4
md5=5d139b1fb16f0e93f0c84290ad2aaff8
sha256=dd4d680ce95e586a1bbe767e1a7b25e1c53f842b8be6cf4e30e89cfa8232dd90
-[http://libtomcrypt.org/files/crypt-0.97b.tar.bz2]
-md5=ae5f51ac4dd94404a51d3b4601cab6d1
-sha256=68959ec2463ff0936db670370f50818bfdfc5bd3399f8547d04e6ac688529147
-
[http://links.twibright.com/download/links-2.1pre26.tar.bz2]
md5=841af2540c789e254b8465e07e24c684
sha256=c89f10d42be2a0be8a017e1084897b1aabc5bca76817e9dab43b758dff051c56
@@ -6738,10 +6726,6 @@ sha256=741577b91c091fc9d6732b57732bdafb85739c65cd65194e506e1d01425bda56
md5=d227a37a8a7b036eed44e4278db45735
sha256=fcee22d7e31a936cde4672ac318ffabb9d39b7fc3b74de391bdade1419c59dfd
-[http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool-1.0.x/rrdtool-1.0.49.tar.gz]
-md5=fbe492dbf3d68abb1d86c2322e7ed44a
-sha256=20acb0aa347f1629c4d5529ab8afbe4986fe820555049af3f905653300e5ea74
-
[http://people.openezx.org/ao2/fbgrab_network_mode.diff]
md5=71bf1218c52a6e4a1f38406748285255
sha256=e8cf4fe15d7e99e86016db3ddc1f403c35c49f40c4d37209d76cd5785c541aa8
@@ -6750,10 +6734,6 @@ sha256=e8cf4fe15d7e99e86016db3ddc1f403c35c49f40c4d37209d76cd5785c541aa8
md5=002e9d7d85a2f0e6261b6bf501c53a3e
sha256=f399428e0e191233b4dcead88afbe78a26cc16bd9a47e305f6dd3299e011ef18
-[http://people.redhat.com/dcantrel/dhcdbd/dhcdbd-2.0.tar.bz2]
-md5=c3ae0208e6815491612bbd8586482ffe
-sha256=514bec6c457d3d503b5c0ba2e84db2c4da44857b5092bd00f2ff9a8e62351e88
-
[http://people.redhat.com/jvdias/dhcdbd/dhcdbd-1.14.tar.gz]
md5=1180dee7a51a4384d55768650634cf93
sha256=e5facfcab28377d32fd4c70aa1fe0820d3dba4abdfc48bd15eda712c8815e505
@@ -7043,8 +7023,8 @@ md5=79ea8c9cfa4025e93fb12d98befd37b6
sha256=9d5e27f290bbb954d512f37912d39a94ae03536a7ba3ef4dacec4df5f2476f47
[http://releases.0x539.de/obby/obby-0.4.1.tar.gz]
-md5=84c35d0cc6b603442e5ba0083fc1b8bb
-sha256=c297862f85270b388e3b5668ad897025fa46b91eac5bd2495efb131de572a9bc
+md5=b79146369fc76a61d6d4056a937c71c8
+sha256=b69a259795762881a5384072085bb501d77c6fb974e0b7a16ca573565ffe3629
[http://releases.chipx86.com/libsexy/libsexy/libsexy-0.1.10.tar.gz]
md5=c009b0c89e5cf91dba17261f4cccfc4c
@@ -7242,10 +7222,6 @@ sha256=f62081c6f8a70a35fb0b5b210329f6bba7f5e506e9b809e23ceba21a2c35278e
md5=4dbdbe9a85c8f7f98dd0ee015a3c7b4f
sha256=3b732ed179dd34c17d1ba17867b60a36f20d82a3f0eca7b084fcb5396aa2b30c
-[http://roadmap.digitalomaha.net/maps/usdir.rdm.tgz]
-md5=7b407c7ff5a38216f85d648365d81894
-sha256=bfa16a53bf481178f0b1bb51fadf539e96312fc3b84f1e54c650d2bae6f1eccb
-
[http://rohanpm.net/files/inotify-tools-2.1.tar.gz]
md5=8053f441fc3fe0f0c73cf483399da17b
sha256=84a111a6a979152cd25b60825b4945da4b167f19fb9ec115f9c59b4b49927547
@@ -7639,8 +7615,8 @@ md5=efa6dc867cec4b38febab2f0fe24a4d2
sha256=fed674a5ae64cb65328eecc752403e5e75e9ce486c19d86c5fa633afb23e0969
[http://subversion.tigris.org/downloads/subversion-1.3.1.tar.bz2]
-md5=cdb0c533b6983e8e1d447e277403e5bf
-sha256=efda6906a11a7fce514f400a5235b290efbe3458309bf8f547a2d49e10c56b1e
+md5=07b95963968ae345541ca99d0e7bf082
+sha256=4f10334d72266815ff427eb25e0e574efcc684dcf01e0229b7d02f63b068d39d
[http://subversion.tigris.org/downloads/subversion-1.4.0.tar.bz2]
md5=f0c5fef69fccfb12ef6c8598f484ed0e
@@ -8375,8 +8351,8 @@ md5=94d5223445deb1ed95973424d4958386
sha256=148bc83e4ab6e87a6f26b60efdffc1258752a42079783e6f2b080f287e8b15fc
[http://www.galago-project.org/files/releases/source/libnotify/libnotify-0.4.2.tar.gz]
-md5=ab588f9ce651feddab6a8225c102d24c
-sha256=e5bce6201e04fda4badcfb265405133ecbc26d413f2f4e0efd3053ad2845c022
+md5=25585318503079a513af7064bb59c04d
+sha256=9e95499badd1b0da67b1422caa4198dbe61c961300b7001173eace18b8b2c38e
[http://www.galago-project.org/files/releases/source/libnotify/libnotify-0.4.3.tar.gz]
md5=5c81a26b461b2abd4c02a918b8486539
@@ -8398,38 +8374,6 @@ sha256=a187976c1957a7a0e17014ed97cbb4341f6898d5f60301f1b0c37e52188ebd13
md5=67ed02dcea21e93f5e123bb0d322898a
sha256=00f2b73fea5eff79ae26338928187f956427421bc70ddab0ab63fe5a58112b87
-[http://www.geda.seul.org/devel/20050820/geda-20050820.tar.gz]
-md5=e8d903d84515cc518e545b6f2e3d7a9d
-sha256=8e46a48d581f8b835f305bb17ffbb7776d53b9214113524819e96be842f9db98
-
-[http://www.geda.seul.org/devel/20050820/geda-gattrib-20050820.tar.gz]
-md5=6ff8e6343b621199dde7fcd9a7ff264a
-sha256=c3b2751303d18c5d685b2d2c380065a93dab17a233657a6d1a09d9f2da64800f
-
-[http://www.geda.seul.org/devel/20050820/geda-gnetlist-20050820.tar.gz]
-md5=bac5aa2529ddb5398ce9e1d09a6e6f8c
-sha256=33f9d862d92c0fb0b56268b73ed43083a84ed9eed15043e0eb6064991a210b69
-
-[http://www.geda.seul.org/devel/20050820/geda-gschem-20050820.tar.gz]
-md5=8ac2387999ec98016c3b004c95fab424
-sha256=166abaa8b0c98e6c826a7c7273b7ddfb57f82be9929e4afbf00e0e3de5d45ef9
-
-[http://www.geda.seul.org/devel/20050820/geda-gsymcheck-20050820.tar.gz]
-md5=c339abc4956987852b948c44118b2e2f
-sha256=3526fd4c30f351c3d548cb2632eda150eb632846b1273349aa2061d0400f9816
-
-[http://www.geda.seul.org/devel/20050820/geda-symbols-20050820.tar.gz]
-md5=a05c9bb11a31c246be3c9a799685bb0e
-sha256=0534ccda5d9136a120abd18ebe3bccd3dbcc6414ec321ad2fd5f9258389ae13d
-
-[http://www.geda.seul.org/devel/20050820/geda-utils-20050820.tar.gz]
-md5=6555466492f3273dbefb772bd4ffd486
-sha256=8140ff430e89c8564efabbc24da0d9b2858d5ac5e982dab9923eaf3b46a8aacb
-
-[http://www.geda.seul.org/devel/20050820/libgeda-20050820.tar.gz]
-md5=356182f379af726045a70de3024c7e6d
-sha256=c2fdec2c186c11aac2f941dc238ee89f51412707bd7c952e02faefa70e38d700
-
[http://www.gelhaus.net/zaurus/sliderulez-0.92.tar.gz]
md5=9b48fc595d7291fa8edddfafba2cb7a9
sha256=28a6af2d1490374de26084e346bbd227586c0f6232dcf4cfebf80413adc7d932
@@ -8682,10 +8626,6 @@ sha256=f9271db0ab5bd4cdc2e09d6185320c2041f62b1e64ba7fb78cab28d104ec7d79
md5=a13e49376594c51fbfa74067f8d14d45
sha256=e3ed263ee98971674f3f3cf55e42b7f2e79755b0f931f8a105676108185e8010
-[http://www.kflog.org/fileadmin/user_upload/cumulus_snapshots/cumulus-snapshot.tbz]
-md5=854fd2826d96367999e5c252e16afbf5
-sha256=b82fbb74475244f2631247feaa77be49da3b8fd8ecc5cc9e9103f1d3227e01bf
-
[http://www.kismetwireless.net/code/kismet-2005-04-R1.tar.gz]
md5=19b4f192eb11a418ed3f6bf65c1226af
sha256=921fcd3033ecfd97d33cad2d940c0a5e5bbf8cb36fd7a62646fd486993a5a96f
@@ -9014,10 +8954,6 @@ sha256=c1c5b5ab3431896502c9275daeb47610fb2a840faa6d580e140909a3f4ef7391
md5=eca63798136caeeaf7fd4b24c3e10783
sha256=88b11a3e89db847e1db51e6f2b0c69e2afa0035fb4a47f523d264765eedb2958
-[http://www.panix.com/~gesslein/am.tgz]
-md5=f7e4a6e3a214a82b035d0f69ae4bbc13
-sha256=988cce287562f67466ab512b7beef26e793d90c2a0793321c9f404e20d7a4423
-
[http://www.pdaxrom.org/download/1.1.0beta4/src/mb-applet-tasks-1.0.0.tar.bz2]
md5=3442d374f459c607395fd56998a6d7b0
sha256=ae72570a433f4e928c4b424dde003c5035fee765fad23c8df76f4062d67c53a0
@@ -9058,10 +8994,6 @@ sha256=f8766c44291aac92b2b4abc762e1b11e3504dd9f2a855fdde371b5abd730fe9f
md5=c389d3ffba0e69a179de2ec650f1fdcc
sha256=6f0145ab1802092308adeb8dfa285f58e104f0822fa266e5ec97e9d27f0e1923
-[http://www.portaudio.com/archives/pa_snapshot_v19.tar.gz]
-md5=016e68eb361d542f8bfc2ef1a7bd6c95
-sha256=31909921a3c00d0ab13e0137541531415648c7bd51802f5ca9a3b11a0d1bd9f0
-
[http://www.povray.org/redirect/www.povray.org/ftp/pub/povray/Official/Unix/povray-3.6.1.tar.bz2]
md5=b5789bb7eeaed0809c5c82d0efda571d
sha256=4e8a7fecd44807343b6867e1f2440aa0e09613d6d69a7385ac48f4e5e7737a73
@@ -11910,11 +11842,850 @@ sha256=4c3f7374e1faa54c705f7c139e992bb7d3492e9dc62aca5b1e24e5a43bb0f132
md5=3d0f372fb213e09b8d04826f3a0bc2eb
sha256=9bb7412a03a76da4219215d2f92addf71305ab3fcc7d9315bb6f9c41fbe851fd
-[http://mono.ximian.com/monobuild/preview/sources/mono/mono-1.2.5.tar.bz2]
-md5=e34320c97d768191217424af64de380a
-sha256=f8e9efccbccbe1326a0a2579eb86651cf65e0937a38fae1afaec2269208d24a1
+[http://0pointer.de/lennart/projects/libdaemon/libdaemon-0.12.tar.gz]
+md5=76596823cc1a6d1cdf7779b782ff0ee6
+sha256=39e7c9f8644d1af310d076c1a5cc648040033e4724e7edfd85eb983ad88336d0
+
+[http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-0.7.tar.gz]
+md5=f384fb230145f90fb75df1e33062583f
+sha256=3c45afef8390d8eae65e1415f7de159b7fdcef649218238a6cac8e9952fde7d5
+
+[http://0pointer.de/lennart/projects/pulseaudio/pulseaudio-0.9.6.tar.gz]
+md5=669d52a70fb9a7a83c2507005bfa2a6f
+sha256=b7a5f14eb8cf7076f1df8fb78d4a05c83e1e655474688c48364fa1b96f478d64
+
+[http://avahi.org/download/avahi-0.6.20.tar.gz]
+md5=6acdff79afa2631f765f3bbbc3e25a74
+sha256=89ae5fd08018679b80cee201e1c1350d86db73bdcf6718aabb4bd3ea86f93ec9
+
+[http://bluez.sourceforge.net/download/bluez-hcidump-1.40.tar.gz]
+md5=c5793b79c3e7fea3a367c08c26c8e23c
+sha256=00dbb7513115d2fcdb7ca3bd777e4bc38e5ed80964fec2d1454e4acadc950094
+
+[http://bluez.sourceforge.net/download/bluez-libs-3.18.tar.gz]
+md5=9e091f2ce00b906c4c456fff24e69e55
+sha256=fe6de9ccfab9e9fbdbe1a2cbe4a9ea771d1a2efc7f2122a2350214394587ff39
+
+[http://bluez.sourceforge.net/download/bluez-utils-3.18.tar.gz]
+md5=2b6b4d519b8f75ef3990122934e660ba
+sha256=f8f242c6835ae826bf1f4eaee6c50d47d6208715e45450ba42c1769094c3f296
+
+[http://burtonini.com/temp/libgtkstylus-0.5.tar.gz]
+md5=fa1c82cd9fd2fafd7ff10d78eb5781c5
+sha256=383e0a22a537f653b8d41688277560f95678a042967198085ec7caa1a5cc2f4c
+
+[http://cairographics.org/releases/cairo-1.4.10.tar.gz]
+md5=5598a5e500ad922e37b159dee72fc993
+sha256=594e78a66044898c321e378d47faf43b665b23ba638834d2787e344ba13e5132
+
+[http://core.fluendo.com/gstreamer/src/gst-fluendo-mp3/gst-fluendo-mp3-0.10.2.tar.bz2]
+md5=f3c32e0bc3ec1be461ce43e407a6a67f
+sha256=cba1eac94de8de8c181c6c60dfc59f8069d388761aba71bcd8c48b8ba9b2edf5
+
+[http://core.fluendo.com/gstreamer/src/gst-fluendo-mpegdemux/gst-fluendo-mpegdemux-0.10.7.tar.bz2]
+md5=ee93b63fb9a7a3081c3d68fdd83949be
+sha256=8e6e078161d9cc020ac9a403c3e7c0f124684c994d66b01895b147bf618bdc13
+
+[http://curl.haxx.se/download/curl-7.16.2.tar.bz2]
+md5=37a1de15c4300ca9413d39d2bcea9b36
+sha256=2e833e81d43f6294e5bd0d1776d68bd147bdab31e86c7544dc1462e44db9bfa2
+
+[http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-0.74.tar.gz]
+md5=0923d825a0aff2e4eb23338b630286fb
+sha256=e870d8cd619834eda066e37fe69b441d629f9ad3a871ef2854fbbcd753b3abe2
+
+[http://download.gnome.org/sources/atk/1.18/atk-1.18.0.tar.bz2]
+md5=9fc33ec48fd32933f7f630479dfad667
+sha256=be2d537642a43b5a1e85a2d0f813167b8585781ff83203a4f68206c3ecd6a315
+
+[http://download.gnome.org/sources/gcalctool/5.8/gcalctool-5.8.17.tar.gz]
+md5=dd9d4f326d7d925a5ad9fbb1c5b32142
+sha256=8806e7696eeee62f2df21135fc488ba99f7d55dfd2a40bb9615e2edd95391589
+
+[http://downloads.sourceforge.net/freetype/freetype-2.3.5.tar.bz2]
+md5=65234327c5ac46ee00ebda15995d4c1c
+sha256=1b357a3a1106c78c80dfd25e3854c3faa9a3dfc7063a4a1e5404e70c241d677e
+
+[http://downloads.sourceforge.net/libpng/libpng-1.2.16.tar.bz2]
+md5=7a1ca4f49bcffdec60d50f48460642bd
+sha256=3a14200862cf4fe59fd66340364537d9973b032b7831b7fe33eb827baebc0019
+
+[http://downloads.sourceforge.net/linux-usb/usbutils-0.72.tar.gz]
+md5=ee345fe605ffcfce843dae4aed81122b
+sha256=00385353242173b878413e0423c1dddcbbb50a3cadc3bb9d0a6adcf335794423
+
+[http://downloads.sourceforge.net/mission-control/telepathy-mission-control-4.31.tar.gz]
+md5=75c59f2c0f990326fc1b66c0bc762c43
+sha256=926a8c047bd43a1fc21539c2ec5b9bf00426083ffe18c2db8c44964b80286b6a
+
+[http://downloads.sourceforge.net/oprofile/oprofile-0.9.3.tar.gz]
+md5=bb91e4d5bd45ff0d5c3e6214653422b7
+sha256=4f86ab165dabcc7bc4008710a66fa0ed391c083e2a8bdf8a8f5bf11c0244b2cb
+
+[http://downloads.sourceforge.net/pcmanfm/pcmanfm-0.3.2.2.tar.gz]
+md5=e735c8effc941912b5253a31d4136417
+sha256=601c607115befa22567c7dae3399416787a549daaefcb03820851dcd8d8b4d50
+
+[http://downloads.sourceforge.net/scons/scons-0.96.1.tar.gz]
+md5=45b1c346edd8a0970210aeb1e82557c9
+sha256=67ea186c1c6270178da0c3411f8c94fcb6a070eb68c3d43f08f282b0728d0c7d
+
+[http://downloads.sourceforge.net/sylpheed-claws/claws-mail-2.9.1.tar.bz2]
+md5=c0e2718d4bcd932709a6e1bcc910c47a
+sha256=056500e4f61f28791390270636ef279c326b090c8634c15faa59497fb3086c8b
+
+[http://downloads.sourceforge.net/wbxmllib/wbxml2-0.9.2.tar.gz]
+md5=67a48fd9b69db8818a4dca5375c7993a
+sha256=cb4909d8753dff7f6ac90a62a61ed1ae68e49ead2dbc60c22673c55bb0e14a36
+
+[http://downloads.us.xiph.org/releases/speex/speex-1.2beta2.tar.gz]
+md5=5480fa53a7451603ecb57ff815c87ac0
+sha256=e57573e86276972080b5d82746d0968492859f35eaa265e79b5cfb130b26e3da
+
+[http://folks.o-hand.com/dodji/0xdeadbabe/ffmpeg_xine.tar.bz2]
+md5=e67e1c2eb134d2fba50a524188b6a3b4
+sha256=61ba89c0deaaf324485b2bf480fdb90941b74e2c47b4810e34f530b77005bb8c
+
+[http://folks.o-hand.com/dodji/0xdeadbabe/multimedia-2007-06-08.tar.bz2]
+md5=d6a679845dd48cb343abbde0f668d5bf
+sha256=c7bc72443c17b5c169d43475ddd35d8ab78689d38a196b268f3b404fef718861
+
+[http://folks.o-hand.com/dodji/0xdeadbabe/xine.tgz]
+md5=8b78ce490cde6eb3c586656e9bc5ead8
+sha256=86402c93b332c44b4e79c568137257d567de1f95cd5f6f6e5433b7e67b40050a
+
+[http://fontconfig.org/release/fontconfig-2.4.2.tar.gz]
+md5=f035852f521b54677f2b5c9e2f6d54a4
+sha256=63a3d6413182817b91eea327b58c243f1865acfc40bef61fc52d2b0431341363
+
+[http://freedesktop.org/~david/dist/hal-0.5.9.1.tar.gz]
+md5=6a40f49f964e64358e53652038f3059f
+sha256=5dc5cf08502510a00cecd6e04ef006a74ba7ed4b31d25187b5efadd70a78733b
+
+[http://freedesktop.org/~hadess/shared-mime-info-0.22.tar.bz2]
+md5=b3b4b45ef3f76f720fd0c389f131dd4c
+sha256=d933caa25caacd57dc8b37f68d222acec3ba3c9d076828d34f006499f6301fb2
+
+[http://ftp.funet.fi/pub/CPAN/src/perl-5.8.8.tar.gz]
+md5=b8c118d4360846829beb30b02a6b91a7
+sha256=e15d499321e003d12ed183601e37ee7ba5f64b278d1de30149ce01bd4a3f234d
+
+[http://ftp.gnome.org/pub/GNOME/sources/empathy/0.9/empathy-0.9.tar.bz2]
+md5=74c7255a56ffa8e37147a1a0cfe40565
+sha256=51eab13f16c48433035e84b8eb6c66afbbf3e48199323d25f4f9a09c8047d078
+
+[http://ftp.gnome.org/pub/GNOME/sources/evince/2.20/evince-2.20.0.tar.bz2]
+md5=f9414b4dbfdff9a8f7f2f146a351e05a
+sha256=30dbad09953d92e48cc27681d601d0a55e30dc8e82a89c173098187bd7b35e61
+
+[http://ftp.gnome.org/pub/GNOME/sources/gail/1.20/gail-1.20.0.tar.bz2]
+md5=697f83db831816946bb8944b8d34ec17
+sha256=2e547b33a1f0abffb1a9860e5dc09330fbf6fbb45b7fe90dc5d12cea5fbe829e
+
+[http://ftp.gnome.org/pub/GNOME/sources/glib/2.14/glib-2.14.1.tar.bz2]
+md5=196d7944a8ddc1f7c3d1e9c7146dd560
+sha256=6f36ca624a12dce03cdea59c9eb900eda49ea2f463b329737eb9f2a8f3ac144d
+
+[http://ftp.gnome.org/pub/GNOME/sources/gnome-common/2.20/gnome-common-2.20.0.tar.bz2]
+md5=89e47677fb72695c75d2cefac84ff9f1
+sha256=0e807cfe74a684c494a0949b7f96d231660f323253a89053e3ec32c4f518c8d9
+
+[http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/0.12/gnome-doc-utils-0.12.0.tar.bz2]
+md5=5934c08d12407d8233416343cd73df24
+sha256=6bb8ec068558e380aff1e3f0aa130b52161ad68f8d495fce45c55783bbba9076
+
+[http://ftp.gnome.org/pub/GNOME/sources/gnome-keyring/2.20/gnome-keyring-2.20.tar.bz2]
+md5=f37c71974323cc79f59e274d97110047
+sha256=70752dc8b33930655b82392e4f149f93bedf6cbc640b30dcfcf986d43470b306
+
+[http://ftp.gnome.org/pub/GNOME/sources/gnome-mime-data/2.18/gnome-mime-data-2.18.0.tar.bz2]
+md5=541858188f80090d12a33b5a7c34d42c
+sha256=37196b5b37085bbcd45c338c36e26898fe35dd5975295f69f48028b1e8436fd7
+
+[http://ftp.gnome.org/pub/GNOME/sources/gnome-vfs/2.18/gnome-vfs-2.18.1.tar.bz2]
+md5=bf4a6d95180d05981893e5d021c6695c
+sha256=098d920cb7d4a50e245deaafabfd8e06b86c88771d56be567597c09c09207f5e
+
+[http://ftp.gnome.org/pub/GNOME/sources/gtk-engines/2.10/gtk-engines-2.10.2.tar.bz2]
+md5=01de081b24d7b5d92093cad5c5e4b8c7
+sha256=9c72b0b3a42c2db05e245706d2345e5d529775ddaf029864fc1dc22ae0a190ef
+
+[http://ftp.gnome.org/pub/GNOME/sources/intltool/0.36/intltool-0.36.1.tar.bz2]
+md5=1822943ce6745596b2510d2b425cb90d
+sha256=b27763c368ceb6744bf687ba371566697a2828d11b576cd4ac853f0a582b0845
+
+[http://ftp.gnome.org/pub/GNOME/sources/libart_lgpl/2.3/libart_lgpl-2.3.19.tar.bz2]
+md5=ac885805d1918026a18b560f4015bc66
+sha256=46d66be76f962cd6f921011c60409c1d5070db4b01619e6d3e5093705665e7a7
+
+[http://ftp.gnome.org/pub/GNOME/sources/libglade/2.6/libglade-2.6.2.tar.bz2]
+md5=da4f9d1c6cd1337f6ef5e2db768d8557
+sha256=7c79a2afaef4fd6726bad0530e29d2bc19689e07720a05c3ad32012e5aed3138
+
+[http://ftp.gnome.org/pub/GNOME/sources/libgnomecanvas/2.14/libgnomecanvas-2.14.0.tar.bz2]
+md5=516c46fb4a1401b05cfef58c350fbd3d
+sha256=5ceadd704327c2967868b3c0c81b5e600e1c6fd4f8efcbaaf89f9b18aa8bb5cf
+
+[http://ftp.gnome.org/pub/GNOME/sources/libgsf/1.14/libgsf-1.14.5.tar.bz2]
+md5=0c1a70ca77aef5706544c1b4082a632a
+sha256=54a1432c73e2df93dfe16bd6c11eb56c949da0967479be2e31e2c08ea0ee1901
+
+[http://ftp.gnome.org/pub/GNOME/sources/librsvg/2.18/librsvg-2.18.2.tar.bz2]
+md5=4691ad687281e943260021272c28043e
+sha256=ff30a5f1a99c61caebcdce9f59417b3f7a0dbed15c6786368f4a4a1d05c67eb1
+
+[http://ftp.gnome.org/pub/GNOME/sources/libsoup/2.2/libsoup-2.2.100.tar.bz2]
+md5=936e29d705aab0483b9a5b8860f68c13
+sha256=fa9f33e96a11133adbfd10538d95ed9704e582ef334c0a119a2a0bfca302877d
+
+[http://ftp.gnome.org/pub/GNOME/sources/pango/1.18/pango-1.18.1.tar.bz2]
+md5=282dcff56292359f6a5c75be0b4fe3df
+sha256=420e3508c74873f9b4c106d7c4d1b0800c138e8f3c07d1ec57aa5995f126899b
+
+[http://ftp.gnome.org/pub/GNOME/sources/vte/0.16/vte-0.16.8.tar.bz2]
+md5=65344de3023c41c8dda2b35a415bf969
+sha256=1dc06ad4224c18061b000de0435b81b7c249215da4163edecb62a8d46090098f
+
+[http://ftp.gnome.org/pub/gnome/sources/gtk-engines/2.6/gtk-engines-2.6.11.tar.bz2]
+md5=0fbcfcf59b8e057ad5994fcacef52494
+sha256=bff6180fee848d0d59b7df0a89cf3c8a78d7fd9a2e6861ed6d0e03f4cd48efc0
+
+[http://ftp.imendio.com/pub/imendio/loudmouth/src/loudmouth-1.2.3.tar.gz]
+md5=64daa4872972b85230b8746655ef5427
+sha256=e0daa5f5113d03f515aa918ec8b67b0cae5a21eff5e81e224d94f69174430743
+
+[http://ftp.mozilla.org/pub/mozilla.org/js/js-1.5.tar.gz]
+md5=863bb6462f4ce535399a7c6276ae6776
+sha256=ef72a154320c9949f8de0732e8dbfa186b83feb0a5e890d90807757de9998585
+
+[http://ftp.musicbrainz.org/pub/musicbrainz/libmusicbrainz-2.1.3.tar.gz]
+md5=330cb7e3da57d7a4800bdc22e4608c51
+sha256=e9e3f157c5c75acef702da9b41c17daa7ea7bb8d0952e6c6960f26980497477e
+
+[http://gstreamer.freedesktop.org/src/gst-ffmpeg/gst-ffmpeg-0.10.1.tar.bz2]
+md5=e21aef9a84d67dea9a68c1379781f763
+sha256=a2c877c38d057875c7dfbf1803030c5cc9707020b77f91673500d6ea8d858607
+
+[http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.5.tar.bz2]
+md5=395f3ed705928e77e5620cccf11a8cff
+sha256=9ac7eb27c9975d4cd24cd3da9b457e69790e4a8cbec75077f0f42fc8b0060eed
+
+[http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-0.10.14.tar.bz2]
+md5=ef9bcc88c84e47684a901da339a7c6b3
+sha256=ffd88d23227f54aae30fdc0ef60ea8eaffe8cc03c069b234ed23c4ea82dcff46
+
+[http://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-0.10.6.tar.bz2]
+md5=25f111360c2930705b91b4fcf93ae5c5
+sha256=9e9cd6a5e134c29400b9dc302e523684dca55d0f7f11eb4b06535b24e5032d66
+
+[http://gstreamer.freedesktop.org/src/gst-plugins-ugly/gst-plugins-ugly-0.10.6.tar.bz2]
+md5=f1016148ecbfba968c0ef1773066988b
+sha256=9c514d4002fb2a2efc5c60e009c330be2ee05c28649d73de3aa45530161c2c62
+
+[http://gstreamer.freedesktop.org/src/gstreamer/gstreamer-0.10.14.tar.bz2]
+md5=eb83767c877990c8a7540693d196c822
+sha256=e684179e63262c7271dbc50e64ead205cae013daac7264d8effbf60fed3f2438
+
+[http://hostap.epitest.fi/releases/wpa_supplicant-0.5.8.tar.gz]
+md5=7bb22f2bcdeed54b3fb5407d6d8bc9bb
+sha256=2f9755e2e3f96d26380857ef95be7765e6e276f6b53194c70633c027485d67f0
+
+[http://icon-theme.freedesktop.org/releases/hicolor-icon-theme-0.10.tar.gz]
+md5=3534f7b8e59785c7d5bfa923e85510a7
+sha256=9d73af8f61240fbb3c522321582cd693c5b81ef344067a3949f0aa624610adee
+
+[http://kernel.org/pub/linux/utils/kernel/hotplug/udev-115.tar.gz]
+md5=3ee465beef2d19c212fdb52d9a89d62e
+sha256=07b29dfdd2d63090c76df04c2dcde323640708c5a06b346cb299c0aba4351a3e
+
+[http://ltt.polymtl.ca/lttng/ltt-control-0.42-16072007.tar.gz]
+md5=52f8a4fbae3ecf8aeab44d5e2550547a
+sha256=31341e33c2aa2d2c453a41d215445084a121fc627a5f43f31280de421a2b9e28
+
+[http://ltt.polymtl.ca/packages/LinuxTraceToolkitViewer-0.8.83-13062007.tar.gz]
+md5=c712a3c0feaf66ad926a1b4b013a2adb
+sha256=fa6ad3a400be3070eaea23813113a396877d289d5cb02692fb3e59fe1fa2670e
+
+[http://math.mit.edu/~auroux/software/xournal/xournal-0.2.tar.gz]
+md5=db62deddcbf4dc7d52b7da405e61ed0d
+sha256=be1c24d49086a2b45462fb17deb8142533616182d728fd826a30bc32a87ed087
+
+[http://monkey.org/~provos/libevent-1.3d.tar.gz]
+md5=664a429247e7737162bd667e166b2761
+sha256=444c89dc9362ba849a537169e03a217fddde1a5e15392ad705ac1dfad5cb345a
+
+[http://neil.brown.name/portmap/portmap-6.0.tgz]
+md5=ac108ab68bf0f34477f8317791aaf1ff
+sha256=02c820d39f3e6e729d1bea3287a2d8a6c684f1006fb9612f97dcad4a281d41de
+
+[http://pimlico-project.org/sources/contacts/contacts-0.7.tar.gz]
+md5=2117d9c96ce0d142eca957450794d876
+sha256=44549dcc5aa1aff1c62d0cf2a86412468f1498ecd3e846d278552ee50662242d
+
+[http://pimlico-project.org/sources/tasks/tasks-0.12.tar.gz]
+md5=a2926370099899e578082702328e55ee
+sha256=f9b99636f86c2747f84fa918b949152491ee92594a7f1e83418589e83f8d1e4a
+
+[http://pkgconfig.freedesktop.org/releases/pkg-config-0.22.tar.gz]
+md5=fd5c547e9d66ba49bc735ccb8c791f2a
+sha256=7e0761b47d604847006e7c6caa9b9cf044530a516ff84395450edcfa3c2febe6
+
+[http://pokylinux.org/releases/sato/matchbox-theme-sato-0.1.tar.gz]
+md5=72ae272ef7803141a3dcb69e670cff97
+sha256=5b59f9646edbfb907a309332db3bd6fa7080dc1fe24df549480cfae7d974a3fb
+
+[http://pokylinux.org/releases/sato/sato-engine-0.1.tar.gz]
+md5=d1b84ec5c510195d653dca518180d9bb
+sha256=0d16625a56ff1fa5c17dda5ce51bcfa82d349848b5a1df8f845d819f51260e23
+
+[http://pokylinux.org/releases/sato/sato-icon-theme-0.1.tar.gz]
+md5=c9a9117454dafa41fe28cc3f829a87e7
+sha256=23b753434625e2b2206bf77045cf16f72086bb84a2339b5058481270643200fe
+
+[http://poppler.freedesktop.org/poppler-0.6.tar.gz]
+md5=96883867572aa1e55e979ec75369c562
+sha256=ef4bb8fd1bb4dffd5dc689509bf3e33260774550425ee78995a8d0297f76bfae
+
+[http://projects.o-hand.com/matchbox/sources/optional-dependencies/Xsettings-client-0.10.tar.gz]
+md5=c14aa9db6c097e0306dac97fb7da1add
+sha256=f274a4bc969ae192994a856b7f786c6fce96bae77f96c1c2b71dd97599e06e43
+
+[http://telepathy.freedesktop.org/releases/libtelepathy/libtelepathy-0.0.55.tar.gz]
+md5=2cbbbeaf97c154a7fb9b088b95deb70e
+sha256=53e8740a3a36ece8078b371b95c79646dc69f0ad3ee2665e5fb659412c0baf35
+
+[http://telepathy.freedesktop.org/releases/telepathy-gabble/telepathy-gabble-0.5.10.tar.gz]
+md5=f3ad7ac1240593033299ccbf86fbc475
+sha256=3c4eb81c9d516937565a295beb0e98ab5c2a04864a0a5c8cef32916c63056b05
+
+[http://telepathy.freedesktop.org/releases/telepathy-glib/telepathy-glib-0.5.10.tar.gz]
+md5=18b6cae979e438628a1032ff1f12b38e
+sha256=f779fbfd30ddc80e15c39f42fc9877725e829dfa19101c3762d6ae809760a3a9
+
+[http://tmrc.mit.edu/mirror/twisted/Twisted/2.5/Twisted-2.5.0.tar.bz2]
+md5=56df2ae66db57932515a491c03bf514f
+sha256=f3b2df3f4483752a42f1a775a1163da1f9e91bf5f19d302abc93544aca20d2cd
+
+[http://www.citi.umich.edu/projects/nfsv4/linux/libnfsidmap/libnfsidmap-0.20.tar.gz]
+md5=9233cb77876eb642374a0d2bcaba1170
+sha256=c2ae0a07d863536261b8a0562f3f77aa224fa1f413d85d824a765d00e37c5de4
+
+[http://www.claws-mail.org/downloads/plugins/gtkhtml2_viewer-0.15.tar.gz]
+md5=64d0040925043c0a5d9a8add76a0f98c
+sha256=99ce4d10541d964d809036970f53579813bb563495070ab09c742cc1e2cdef38
+
+[http://www.claws-mail.org/downloads/plugins/mailmbox-1.13.tar.gz]
+md5=13a91cfd9b26182edbbdcd2a0d27c80f
+sha256=e41470fbea5322aabdca21b3ee7ebc2b3ddb1638d25902ee96fcb10698b35dd4
+
+[http://www.claws-mail.org/downloads/plugins/rssyl-0.13.tar.gz]
+md5=f25df2d1bc2d99536eba334778804632
+sha256=413523cd8ebd4429c192c5cab7a85d017655b32f21a9c261169597180889b370
+
+[http://www.flumotion.net/src/flumotion/flumotion-0.4.1.tar.bz2]
+md5=85563f1167a3265cf61c8886c318dda7
+sha256=a24640d8ca9c485d7611880193f18e5ae62af07e3b9464904f3602277f1d4097
+
+[http://www.freedesktop.org/software/startup-notification/releases/startup-notification-0.9.tar.gz]
+md5=5480d3af709523ec70e0e04692744f2d
+sha256=c2fa09f9a49d8b319e79638e49e967c682df8726006e03059b1ffca5ab82099c
+
+[http://www.galago-project.org/files/releases/source/galago-daemon/galago-daemon-0.5.1.tar.gz]
+md5=fdb81f938f86f380b127158ebb542279
+sha256=db42a0d1d0f8b069ea5ac1203207f9178f25ac1367f4910bd48547f5be1db4c2
+
+[http://www.galago-project.org/files/releases/source/libgalago/libgalago-0.5.2.tar.gz]
+md5=7ec92f2ecba1309ac4b71b4b4d8d0a0d
+sha256=9b7c9845e2f661dbf5c2595e67bc7afd48f090ac2c033726c89d7f0e90791dfa
+
+[http://www.greenwoodsoftware.com/less/less-406.tar.gz]
+md5=c6062663b5be92dfcdfd6300ba0811e4
+sha256=5cb93fa75cce38f472ac91503bdd56c601037551cda3f999447773dfa1279130
+
+[http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/wireless_tools.29.pre21.tar.gz]
+md5=953774d6a34050bae4ef3bfa731f6653
+sha256=90714813bcf0552cd9afe3d270de168ec41b91ed3105766c8cedf32d4724f3a9
+
+[http://www.hpl.hp.com/research/linux/atomic_ops/download/libatomic_ops-1.2.tar.gz]
+md5=1b65e48271c81e3fa2d7a9a69bab7504
+sha256=a3d8768aa8fd2f6ae79be2d756b3a6b48816b3889ae906be3d5ffb2de5a5c781
+
+[http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2]
+md5=2cc2fd4d521dc5d7cfce0d8a9d1b3472
+sha256=d4e67c0935ffb2a4158234bff92cc791b83177866009fc9b2214104e0038dbdb
+
+[http://www.kernel.org/pub/software/scm/git/git-1.5.3.tar.bz2]
+md5=798e5784670e0a3e0daaea048e60851d
+sha256=aeef281072cf3e045b73e7047bd9830a71128b828920b3d389a5b7b7cbd0beff
+
+[http://www.mega-nerd.com/libsndfile/libsndfile-1.0.17.tar.gz]
+md5=2d126c35448503f6dbe33934d9581f6b
+sha256=1792e4e60386b450ef8ec07c756e8f3ecfe96ebda7d0b09148da5f436d065ef2
+
+[http://www.oberhumer.com/opensource/lzo/download/lzo-2.02.tar.gz]
+md5=6760e5819f4238328709bf93bf10071c
+sha256=a2fbecb4dd7c1dab498e3d8b5a0e574e6b8be09c63329b0d29c6fa9adb4a2fc5
+
+[http://www.red-bean.com/~proski/firmware/Latest-prism.tar.bz2]
+md5=fdf22cdcfb70f15c89676ef0ebc9dfa8
+sha256=dbe5d8a0ac16a7953b3b2d34841dabd2b3071a2f66585ff25a538bd2ad1513ca
+
+[http://www.redhat.com/f/fonts/liberation-fonts-ttf-3.tar.gz]
+md5=77728078a17e39f7c242b42c3bf6feb8
+sha256=174cf27c57612971434ec8cc4a52bfd37bad8408e9b9219539c6d5113df6ff8f
+
+[http://www.rpsys.net/openzaurus/patches/archive/hx2750_base-r29.patch]
+md5=362aa4d1318108a3515510ea1bbe31a1
+sha256=66b557a709a87a6d90c5a1d6d385b1bb5a725144b3f6a3c7c466c48702f4ad87
+
+[http://www.rpsys.net/openzaurus/patches/archive/hx2750_bl-r9.patch]
+md5=ebb78f58e9c84c73b90e9cbdde5f89d6
+sha256=7578448fc2adbfc820158b2467dbb127ab012b3a97ad95366d8d1af002defbce
+
+[http://www.rpsys.net/openzaurus/patches/archive/hx2750_pcmcia-r2.patch]
+md5=f61363f48e8fbc1086dd3a9c66385a32
+sha256=f3ab5ae2056960612886adce53ed46f4b5516744b1394f40c85cedbf0ec2e29e
+
+[http://www.rpsys.net/openzaurus/patches/archive/hx2750_test1-r7.patch]
+md5=1d102d122b9697b9bdbd209349af1645
+sha256=359a3839deeba78534bba50c3a2929736d823c3cdb7164a910226c4559ae97a2
+
+[http://www.rpsys.net/openzaurus/patches/archive/input_power-r9.patch]
+md5=1bd8229ec73078c5d7025d28774bc866
+sha256=fb86683341f1d09471d9301c43e77c0c50cc1cc8e2462e282d50951ca017daa3
+
+[http://www.rpsys.net/openzaurus/patches/archive/integrator_rgb-r1.patch]
+md5=15a09026135382c716a11633344ba3c4
+sha256=49521feb1a6e2bc9b355e93b3251e3c74ebe2327eb89c6e681347464e81e3664
+
+[http://www.rpsys.net/openzaurus/patches/archive/locomo_kbd_tweak-r1.patch]
+md5=6c0d60bcc357365af056baa812c45960
+sha256=830ef8c4b65ed34954afc2581447fd0a9afcf5f9de354772352c8da54dceb676
+
+[http://www.rpsys.net/openzaurus/patches/archive/logo_oh-r1.patch.bz2]
+md5=959b91235cb2ebd45c5f3dc755c744fa
+sha256=d56a238d3378012c965f25c12b136bd380f9faf27a6b5f08e79c252a724129a5
+
+[http://www.rpsys.net/openzaurus/patches/archive/logo_oz-r2.patch.bz2]
+md5=851ae2974a18f7e87e65274be88d37c0
+sha256=69f9aa82c7e3c7792f6428199033120bf02c6be42f5c02b9f74ba072e8488a7c
+
+[http://www.rpsys.net/openzaurus/patches/archive/lzo_crypto-r2.patch]
+md5=29162001c88d9dbe0ccb25103a1aefb4
+sha256=0b68f2d73dc54404d29015455ba84021a925aa2cfb6f1fe75705fe2268b2e2e8
+
+[http://www.rpsys.net/openzaurus/patches/archive/lzo_jffs2-r3.patch]
+md5=ef03ab6e24b5f365b7040213f0046e62
+sha256=c7a4c68192d54ff0d4c1b0dc87459b950f685125528d9c8d127e8996b6094c62
+
+[http://www.rpsys.net/openzaurus/patches/archive/lzo_jffs2_lzomode-r1.patch]
+md5=ca58d9992106f5131539ff0d9a6b824b
+sha256=9e2e57632135cdcf9e72743b94d69d0cab002cccdb63f8e3e368f40bfa0b3af2
+
+[http://www.rpsys.net/openzaurus/patches/archive/lzo_jffs2_sysfs-r1.patch]
+md5=a8b75ef4190dfc0afcfa8789d3e4c64c
+sha256=3fed945b590db46a902fa434054b967dd1bf4af1ee5f5643e00d1d66a9d69543
+
+[http://www.rpsys.net/openzaurus/patches/archive/mmcsd_large_cards-r1.patch]
+md5=9b69a1f5951ebd26d5b29ac326c5c414
+sha256=8de4e1a8696c2f47ed1b9009498b4f89ba9dd3fbda6083531ef40c35ce001996
+
+[http://www.rpsys.net/openzaurus/patches/archive/pm_changes-r1.patch]
+md5=e10058b52841d138630b69b954bea0b9
+sha256=779561c658ccb190f3a2cd7626e4a229834c5f9b093be8f7a06bbfaf12121b9c
+
+[http://www.rpsys.net/openzaurus/patches/archive/poodle_pm-r4.patch]
+md5=cf3e0ca3f9e8e0cab03700fde9143617
+sha256=a5781c8a4c0c71224b23f1c4155609baeee0eca8ce7cd34c1c969a65d6c6bab2
+
+[http://www.rpsys.net/openzaurus/patches/archive/pxa-linking-bug.patch]
+md5=ce6d8a7a25cc1c9593417746bcf84ca0
+sha256=24aac1d158095007a10a47e38320a1618fab2d536f19caff94f4dd0ab29f306b
+
+[http://www.rpsys.net/openzaurus/patches/archive/pxa25x_cpufreq-r2.patch]
+md5=c076ac1f2368d9e8399e64a3adf3a036
+sha256=34358aa53caaf393af550d9771f02f144eafabb7518e84d872427dc297e493b4
+
+[http://www.rpsys.net/openzaurus/patches/archive/pxa27x_overlay-r6.patch]
+md5=929218c453c881fe5b3d94c65eb6fe7a
+sha256=f93eddd05d690599c85510372729c28e0d2f25619fb36aef22318bdf863b46a9
+
+[http://www.rpsys.net/openzaurus/patches/archive/pxa_cf_initorder_hack-r1.patch]
+md5=b67218e773a236631b41a1718049bbc7
+sha256=f6ddc6636b2a8e4392dab43fdcfd9521e2d7f9022e56c39ecee66d50a94bdc98
+
+[http://www.rpsys.net/openzaurus/patches/archive/pxa_keys-r7.patch]
+md5=6cb642dc01dc93a99fac3f4894a432c7
+sha256=f6dc5a05456a6d4abb9e8b80df70aefac6f8764d04e079aa4c4c5b45cd0ff9bc
+
+[http://www.rpsys.net/openzaurus/patches/archive/sharpsl_pm_fixes1-r0.patch]
+md5=aeea5a2614fd8f9ae7d729d1ea1dddba
+sha256=1bd129c7a68537533c77267992eaf490ff64bcc3d01c6f4b51343b8f266ae99e
+
+[http://www.rpsys.net/openzaurus/patches/archive/tsc2101-r16.patch]
+md5=28d2b552a3d416c35119bc3f459c0c1a
+sha256=c2bed5d4ec064e0ac9c73c046e545dfad5ebfce3c84bdade1323a9f7a5265056
+
+[http://www.rpsys.net/openzaurus/patches/archive/usb_add_epalloc-r3.patch]
+md5=7a9ff02fa652daa8fd518c1a6f95162c
+sha256=dbc5d6921136711f08c197284ec67dc77232559e2e31429f8a30a1a102bd07f7
+
+[http://www.rpsys.net/openzaurus/patches/archive/usb_pxa27x_udc-r6.patch]
+md5=b70762567efcf7c2645268cce520497c
+sha256=7bd4d2230fa1ed83021382697335bb81410b0611937f5225aad6594f04a356ba
+
+[http://www.rpsys.net/openzaurus/patches/archive/w100_extaccel-r1.patch]
+md5=1f046a5bfb11b320a84da6af9df976d0
+sha256=1be8f5179f37a56094ae712f9561b86bb4cd40cb5c55d7dbc680f34b77d0b1cf
+
+[http://www.rpsys.net/openzaurus/patches/archive/w100_extmem-r1.patch]
+md5=a17be90788c4ccd6ee8253659b9321f8
+sha256=56dfd5365848095793faa31ee1cf753c10891dd076944d3533b05c6547965134
+
+[http://www.sqlite.org/sqlite-3.4.2.tar.gz]
+md5=2feec9b429f9298c9f288420c8b449f8
+sha256=0ad86c4b26cd687122b158bf848f0a07d7cd644033d15c4f43b6d643bd74cd81
+
+[http://www.zope.org/Products/Zope3/3.3.1/Zope-3.3.1.tgz]
+md5=3c28888c51cc0a9e853c0f3032370bf9
+sha256=6189999de3190e4b0d5110490567d9f7ef92379ea555f738fc741d49d0807be3
+
+[http://xorg.freedesktop.org/releases/individual/app/x11perf-1.4.1.tar.bz2]
+md5=fd06c8b8e3572a0e14af65a49e0dd7d1
+sha256=c81819618ec596fda55b950ef80f2ee02e5ce149ea99f1f741cedb459b4d3064
+
+[http://xorg.freedesktop.org/releases/individual/app/xev-1.0.2.tar.bz2]
+md5=e3008eb0655da3026c162a5597d70869
+sha256=cac2771b67942d9a00b46532176feb18b2f82c434e0f6ece578d95953ef33053
+
+[http://xorg.freedesktop.org/releases/individual/app/xhost-1.0.2.tar.bz2]
+md5=f746aba36f075ae4cae313d849a94f4e
+sha256=edab2cc49d230f58e54c0f7b83fd726fec5fc31356668a11589649f19ba90db6
+
+[http://xorg.freedesktop.org/releases/individual/app/xinit-1.0.4.tar.bz2]
+md5=9df52a504dc04313a6650fae364ae04a
+sha256=1e7056db4441ccb0dff0f77503e3fd49a370aecdecf95ce6066116ca8244bf52
+
+[http://xorg.freedesktop.org/releases/individual/app/xrandr-1.2.2.tar.bz2]
+md5=c6ec9dc42396e3b3a2da932f3feca6ec
+sha256=632f3ff492a07f8279807ffbafe4f89af069bb0e7b4934b3ddf7379509aa9303
+
+[http://xorg.freedesktop.org/releases/individual/app/xrdb-1.0.3.tar.bz2]
+md5=380b2ef545306354cc150834de567be7
+sha256=a4a3b8cd821adc201a072f8c0214d73ee6a7e7b898de90e18f7d89a4453fb12c
+
+[http://xorg.freedesktop.org/releases/individual/app/xset-1.0.2.tar.bz2]
+md5=1b781a0802c7b8fb9619a6665607b3f0
+sha256=ce1e17c513a4499526e648a59c39ba01777c99c86093433cf392f27654b795c9
+
+[http://xorg.freedesktop.org/releases/individual/app/xvinfo-1.0.1.tar.bz2]
+md5=0a5bd8e43de6eb8ff5b5bc673204401d
+sha256=439b3c7ad96fc7b1ef9156c716e10b607883a9a58b777f8dc02f03284eb33fb3
+
+[http://xorg.freedesktop.org/releases/individual/lib/libAppleWM-1.0.0.tar.bz2]
+md5=48a403c45be2206ee900729ced3a0e62
+sha256=ecd2ff407a418eb4ac673f48b4d0a9c5b6860a13cef7211a32fe8f3d3db0407e
+
+[http://xorg.freedesktop.org/releases/individual/lib/libFS-1.0.0.tar.bz2]
+md5=dfd5de47e232db0891410bec8ee6707b
+sha256=2f18f9fa0e18a3eab3c154ba820ad64b5c6ee364e147524055a553a130ccfdde
+
+[http://xorg.freedesktop.org/releases/individual/lib/libICE-1.0.3.tar.bz2]
+md5=071f96648ac25c8e87a3de11a7de2d8a
+sha256=ffd46270dae30cad147d73559142a701a8ff8d0658f4abfb2341edefabb8161d
+
+[http://xorg.freedesktop.org/releases/individual/lib/libSM-1.0.3.tar.bz2]
+md5=184cbf502b3cd5d7ba5f9d1290a99606
+sha256=57f42d3557effe452cd348362977ff90fa61009885c23b3aca8cb0219b5dec04
+
+[http://xorg.freedesktop.org/releases/individual/lib/libWindowsWM-1.0.0.tar.bz2]
+md5=337b379fd00a67345b083100c4e6ba95
+sha256=6ad87266173d21ba7e0e4506db0c094769fd58c3f0b741b37f30c297deec166a
+
+[http://xorg.freedesktop.org/releases/individual/lib/libX11-1.1.2.tar.bz2]
+md5=710bf38a9477a5a1b235bc94f1d0593c
+sha256=b77e4fd2bbd4092e7e78d0964760ad8ab160caccd4bc6d7d0c87a23febaea85e
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXTrap-1.0.0.tar.bz2]
+md5=1e2d966b5b2b89910e418bb0f78e10de
+sha256=cfd12ce675bd5cdeac3720582741fe81a99343bef475d440cb34a7f2cdfe34ba
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXaw-1.0.3.tar.bz2]
+md5=ee215536ea78798268ab3a444d10135a
+sha256=45ca55bdac904a07b8118618c65ddb5bf8826e626c4c927e3c2508c58e231514
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXcomposite-0.4.0.tar.bz2]
+md5=7e95395dea89be21bae929b9b7f16641
+sha256=7db759e82dd1f68094e4c4d257025f7893dafb2913ed249e00cbe18fa13c7510
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXdamage-1.1.1.tar.bz2]
+md5=ac0ce6b0063a9858c8f24ddb4c60487d
+sha256=0102754db23952a1c3adf7881bbf191f91ca3e3d183e1b0179452bce932fae2e
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXext-1.0.3.tar.bz2]
+md5=1bf6fa1c26f9957d7cc0bd90b038dfa6
+sha256=2d706baf206d1cb422c8e0ceb6c5a8546bc3f0587cf090eba51e75a295d9c3f0
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXfont-1.3.0.tar.bz2]
+md5=d1d3fa170d74b066f1f23ca8574e7c90
+sha256=07567b9880f28d1a404389c024a185419bfe81136aef3d9eda52407f34c3d3dd
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXi-1.1.2.tar.bz2]
+md5=9c4dd85f3e2a75bfb60bd288502bc288
+sha256=4deda13613f03e4524d3cf0ac14b9e20be5044d415cb8478713ecbe47f4de862
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXinerama-1.0.2.tar.bz2]
+md5=f6fb08eafd3c2909d515f1a07bfca8fd
+sha256=d245d7ae4c766ecbc4e5cc2666e2e78198d8386dbaa06b35c3d1b1457ee5d03d
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXp-1.0.0.tar.bz2]
+md5=0f4ac39108c1ae8c443cdfac259b58fa
+sha256=7e64b1550ce85b05762e960459ac676a0406c786756b200ff29c57f84bce9cae
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXprintAppUtil-1.0.1.tar.bz2]
+md5=d2de510570aa6714681109b2ba178365
+sha256=24606446003379dbf499ef57e9294ce622c0f7f8a8f10834db61dc59ef690aa5
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXprintUtil-1.0.1.tar.bz2]
+md5=22584f1aab1deba253949b562d1f0f45
+sha256=72b6ae0420b9601f55be147e8d068f670b951ae73a81423ba25be5875d826e6c
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXrandr-1.2.1.tar.bz2]
+md5=5860360f5b038cc728f388f875ce525d
+sha256=2d2df642eb8e0527936cdf4ed1c096f69df53e9b95e2532c8ed0cabd06a45407
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXt-1.0.5.tar.bz2]
+md5=f3bdd67785ace8cd0b23249e9d8c9975
+sha256=43c472ada59a04428a463225cd4cd42cb81bc43eb687cc1890f2f1c81a3e9cf4
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXtst-1.0.2.tar.bz2]
+md5=032d5c1d3914fc0224837328c88aef96
+sha256=eef98ad3d35254384c3714cd63826fc2009f9b394f2b489718aba9be7be0a10b
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXv-1.0.3.tar.bz2]
+md5=f1c4109fa804aeaf7188b66c5cdd9f57
+sha256=f87ae65be39a3c26dc3c87159d9126daf2af1b8c5e7f2ffc38b9f72b9236261b
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXxf86dga-1.0.1.tar.bz2]
+md5=5b0e752c71a23e9d1290cad44a7c7c75
+sha256=8c68f429942b1258cff0fb27505645a463690374ecf318ae660ff4cde7a03db9
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXxf86misc-1.0.1.tar.bz2]
+md5=7cee0df63903cef7f7a3fb68cdd99eef
+sha256=2122d67d49aaa06eeaeb3db173ea8a7048f3b52665e5135874bc5cadada91289
+
+[http://xorg.freedesktop.org/releases/individual/lib/libXxf86vm-1.0.1.tar.bz2]
+md5=8de1ca6c55aaad7d8cae19b4f0b3da32
+sha256=e08fc2c1611c422f751ed02810491b45bf7faa4207d762a11f11815263c9285a
+
+[http://xorg.freedesktop.org/releases/individual/lib/libdmx-1.0.2.tar.bz2]
+md5=4d866967210d06098fc9f302ed4c79b1
+sha256=fa3ff31a543f7cea04762c08f48b418e75230de8b4dfdf9d2d3ae9e2af26b9c4
+
+[http://xorg.freedesktop.org/releases/individual/lib/liblbxutil-1.0.1.tar.bz2]
+md5=b73cbd5bc3cd268722a624a5f1318fde
+sha256=94c31c7090106d3a95e2a7c083961efca1321b970118fe103ab06e5d927b7258
+
+[http://xorg.freedesktop.org/releases/individual/lib/liboldX-1.0.1.tar.bz2]
+md5=6b81ffe486d76c380d08f92285758d84
+sha256=1091d301f5e28f84e5d755a5cde9d2f7edb82b799d051522751874571e10340f
+
+[http://xorg.freedesktop.org/releases/individual/lib/libxkbui-1.0.2.tar.bz2]
+md5=1143e456f7429e18e88f2eadb2f2b6b1
+sha256=20c23101d63234ee5f6d696dfa069b29c6c58e39eff433bcd7705b50b3ffa214
+
+[http://xorg.freedesktop.org/releases/individual/lib/pixman-0.9.5.tar.bz2]
+md5=f9fea77e46ec7a3a16e925e137f146e7
+sha256=a9d4545b5dfc018cdd33fd21bc73c3f1b3c9c207f1bb6843606cc180eb10c6c8
+
+[http://xorg.freedesktop.org/releases/individual/proto/applewmproto-1.0.3.tar.bz2]
+md5=d5d7c69837cc7dcbf2aa181ff423ab20
+sha256=a938c07ea331359f379802c50c33aa0307b913f742ad74087d45e7fb2a1f4d50
+
+[http://xorg.freedesktop.org/releases/individual/proto/bigreqsproto-1.0.2.tar.bz2]
+md5=95c29d9d10bf2868996c0c47a3b9a8dc
+sha256=30da0098a24578e645193464526cc4d5c2c7fecaf476d1b9dabe68118850adee
+
+[http://xorg.freedesktop.org/releases/individual/proto/compositeproto-0.4.tar.bz2]
+md5=6281344d656d4e0c8e9db4918efe3d1d
+sha256=6013d1ca63b2b7540f6f99977090812b899852acfbd9df123b5ebaa911e30003
+
+[http://xorg.freedesktop.org/releases/individual/proto/dmxproto-2.2.2.tar.bz2]
+md5=d80acad88411e7944b9b085463d53302
+sha256=aaa6d9c9d5ec58f733ca4d7413c541413482bce666217267e5bf88442e35fce2
+
+[http://xorg.freedesktop.org/releases/individual/proto/evieext-1.0.2.tar.bz2]
+md5=2507b5d0f4b2848147fbddd155aa6cfe
+sha256=0b85113a9770083715927f9c7a7d0ab354c8a508a91cb6e8e11130851494d125
+
+[http://xorg.freedesktop.org/releases/individual/proto/fixesproto-4.0.tar.bz2]
+md5=8b298cc3424597f8138c7faf7763dce9
+sha256=b3fe971ccc8152db6c78da7117c31fc4cd2fcb2b6a4df3db0f8fed13d4ceb08f
+
+[http://xorg.freedesktop.org/releases/individual/proto/fontcacheproto-0.1.2.tar.bz2]
+md5=60df6b625074a9790e28543dcea71651
+sha256=48063ed49b200927376645f9ffe65faa39af84d59ba6f60f2abb2f9c6fa3d9f9
+
+[http://xorg.freedesktop.org/releases/individual/proto/fontsproto-2.0.2.tar.bz2]
+md5=c946f166107b016a21cc7a02e1132724
+sha256=83bd547131aa11a232717a0f06d3c6cd58a0b2f6d541660bbe9ebf43073a8b7b
+
+[http://xorg.freedesktop.org/releases/individual/proto/inputproto-1.4.2.tar.bz2]
+md5=e2c4cf4c2ad59d1e27f09381f6b4a3c3
+sha256=62ba68a056daa89f5b21a02b27f6a4c858933e1c5547c9d16985d9ed182014e6
+
+[http://xorg.freedesktop.org/releases/individual/proto/printproto-1.0.3.tar.bz2]
+md5=0f4e7982c6d4ec3b2cf38502dd1293a3
+sha256=8b375f8cda83dfc7d84be44af41eedd484d0e2499acbd19bdca5b4056dec7235
+
+[http://xorg.freedesktop.org/releases/individual/proto/recordproto-1.13.2.tar.bz2]
+md5=0ed4706564a34fc2aff724aa16d3ff00
+sha256=04e77a8b14f373a1825bbe0116cd0db8b2c5dee17b34ba9bddd27e576609cff9
+
+[http://xorg.freedesktop.org/releases/individual/proto/renderproto-0.9.2.tar.bz2]
+md5=28fbe8a59ebd31f098b90ec64f3d133a
+sha256=7754dfbbb1e3818f28720fa9647b8a593e9d54626a7896771c2bfac7f75e2726
+
+[http://xorg.freedesktop.org/releases/individual/proto/resourceproto-1.0.2.tar.bz2]
+md5=b823b314e37eb19dae1f297951d2e933
+sha256=0c33d6fceef5483001459bdc934b5831502250b27f1f4ad370ab044f8ab53487
+
+[http://xorg.freedesktop.org/releases/individual/proto/scrnsaverproto-1.1.0.tar.bz2]
+md5=5d551850e6f4acdf49a13f4eb3a5bbfa
+sha256=db09abf73cc339c05c0488639731794372a4770cfca76c2645f503f9fccd478f
+
+[http://xorg.freedesktop.org/releases/individual/proto/trapproto-3.4.3.tar.bz2]
+md5=3b713239e5e6b269b31cb665563358df
+sha256=ff32a0d3bc696cadc3457be9c85e9818af2b6daa2f159188bb01aad7e932a0e1
+
+[http://xorg.freedesktop.org/releases/individual/proto/videoproto-2.2.2.tar.bz2]
+md5=44292d74a9a3c94b1ecb9d77a0da83e8
+sha256=ab088478830cd30c2fe34fb7f44ffd4d177af7711c225c24676d3e9e9f24780c
+
+[http://xorg.freedesktop.org/releases/individual/proto/windowswmproto-1.0.3.tar.bz2]
+md5=ed5416cf7e2ba6e66641c88f12768c0c
+sha256=780d249696bb2de7acabded90a465a62cd6cbda3b7f0ccff6ebfdf0d8180f151
+
+[http://xorg.freedesktop.org/releases/individual/proto/xcmiscproto-1.1.2.tar.bz2]
+md5=fde0b050901f024b19159cdacdcfbd20
+sha256=b2807e96a9d632b7bbf1782a43095de51f3feae3d2e25374d3df00c6c68792ab
+
+[http://xorg.freedesktop.org/releases/individual/proto/xextproto-7.0.2.tar.bz2]
+md5=242388ab65dde3a3dd313eeee265e429
+sha256=53f3039ae769b08bd139d4474a7debe0b6f24048e7c514c835c8a1880f11e0d9
+
+[http://xorg.freedesktop.org/releases/individual/proto/xf86bigfontproto-1.1.2.tar.bz2]
+md5=a318c1e86123832d7b0c95fc7d47ef35
+sha256=01b475b5b27709a738db6f94ce2ded37f5db0792e8d9318069ecf1690a15f124
+
+[http://xorg.freedesktop.org/releases/individual/proto/xf86dgaproto-2.0.2.tar.bz2]
+md5=461aa291a23e8cf387b70f3efa71b05c
+sha256=3ee1db2481ea222269bd201eef4d0e5d8ca4dbdb5eeb4852cf1efc42d4269b60
+
+[http://xorg.freedesktop.org/releases/individual/proto/xf86driproto-2.0.3.tar.bz2]
+md5=e4a282cfd708b8892fca4425fee9cd7b
+sha256=111c469a24374803b08104c725d8318760b226cedccd12b199c83d1b2756b8d6
+
+[http://xorg.freedesktop.org/releases/individual/proto/xf86miscproto-0.9.2.tar.bz2]
+md5=acae8edeb05a406f7f60bcbb218a8f1d
+sha256=aaab4cbf19c73ded4785ba69cdd7ae23aaf103c7040559283f85fc1237dad6e6
+
+[http://xorg.freedesktop.org/releases/individual/proto/xf86rushproto-1.1.2.tar.bz2]
+md5=b6a96ffdae084e27487a58314008b000
+sha256=07d9b237541f2d6313b5b28f5335d987a766b36c87b133f77cc48f31d969a3ae
+
+[http://xorg.freedesktop.org/releases/individual/proto/xf86vidmodeproto-2.2.2.tar.bz2]
+md5=f00844a63d6e76b69eb0eb5e41eed843
+sha256=07152f990cc79ec5931989decc4a90b1919147e98ff6fcfe39507a9d3fc4d96e
+
+[http://xorg.freedesktop.org/releases/individual/proto/xineramaproto-1.1.2.tar.bz2]
+md5=1cc292c562962ad0ad3a253cae68c632
+sha256=e8a62b1cafbcfc3b9fed147612ed4320233d0c9d6de30c991c2cd0c691c40910
+
+[http://xorg.freedesktop.org/releases/individual/proto/xproxymanagementprotocol-1.0.2.tar.bz2]
+md5=d28007a50976204960fc1fc07b4ca093
+sha256=c45176d002c85c142ac52774680f5325d330c5ecc32d4d6a056d85ee039a0cbc
+
+[http://xorg.freedesktop.org/releases/individual/util/gccmakedep-1.0.2.tar.gz]
+md5=fc49f45251c1336fe1dad5dba1c83fcd
+sha256=fdd3963294e80b27416f902a5c029c033d321f03310d3cafa3afb62b50ddce92
+
+[http://xorg.freedesktop.org/releases/individual/util/imake-1.0.2.tar.gz]
+md5=b5c3a719d60a14ca2378dc1259ee60df
+sha256=8008b4366ab96abfdac2c91808b79ec2cc5649966b41cfb07b14b6fbd798651c
+
+[http://xorg.freedesktop.org/releases/individual/util/lndir-1.0.1.tar.gz]
+md5=1a53ddd7e1804abe8f3d9799a88b6aa8
+sha256=89bff89702ebf2e5cc2268d79d5a27c62190c5a85ab080935d4425d3e309bc57
+
+[http://xorg.freedesktop.org/releases/individual/util/makedepend-1.0.1.tar.gz]
+md5=90f5f3b987497a481b94d49372f17dce
+sha256=0a4a0d4e2613b0cd4321e55fd4741788b728736fc8a517996e2015fa49862e61
+
+[http://xorg.freedesktop.org/releases/individual/util/xorg-cf-files-1.0.2.tar.gz]
+md5=f96f44b87132afd2fff677a8c89166dd
+sha256=4edcaf61ad8b4bef65169af2b98d3992be07260f90cca65128dc523d6935bdd8
+
+[http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.3.0.0.tar.bz2]
+md5=a51a7d482e3c689394755bb17bda8526
+sha256=93c656f142f37607c15372dd24c5de9eab82cd79c5d60449174a928d345c2975
+
+[ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.14.tar.bz2]
+md5=1ef39fb723f9209109134d6f4860cb21
+sha256=01e693daf4c0e2af2e10082a635559d390f9127556a86d25105abfa646a9b0a3
+
+[ftp://ftp.alsa-project.org/pub/oss-lib/alsa-oss-1.0.14.tar.bz2]
+md5=a24475b978982ff8cb2f25be793c6b83
+sha256=c8feb3eb9d4255a4aff7ca839555293c237c1b2f034c118127e826843c6f0184
+
+[ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.14.tar.bz2]
+md5=6d3009c157ac6fc803696d6590a48366
+sha256=307d630f0ed15e7e92fa35dc0c961737fa9aed22bd7a4a6054a72f85145fa5cb
+
+[ftp://ftp.gnu.org/gnu/binutils/binutils-2.18.tar.bz2]
+md5=9d22ee4dafa3a194457caf4706f9cf01
+sha256=487a33a452f0edcf1f8bb8fc23dff5c7a82edec3f3f8b65632b6c945e961ee9b
+
+[ftp://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz]
+md5=1ba8e147aff5e79bd2bfb983d86b53d5
+sha256=815ce53853fbf6493617f467389b799208b1ec98296b95be44a683f8bcfd7c47
+
+[ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-2.10.14.tar.bz2]
+md5=018d7dd0fa7de01cfdb77c7c55e7ba26
+sha256=d02344239d048390ba02fcfd7de4f9efc0dfb51e7b06dfa46a6314d666ea4de2
+
+[ftp://ftp.pl.debian.org/pub/debian/pool/main/a/apt/apt_0.7.3.tar.gz]
+md5=e2e6e23f43bfdf135b923205659dfaf1
+sha256=d3a71446234e567a24740b02abe5bc6c695836343df6139eb7c03ec11871e710
+
+[ftp://ftp.pl.debian.org/pub/debian/pool/main/b/blktool/blktool_4.orig.tar.gz]
+md5=62edc09c9908107e69391c87f4f3fd40
+sha256=b1e6d5912546d2a4b704ec65c2b9664aa3b4663e7d800e06803330335a2cb764
+
+[ftp://ftp.pl.debian.org/pub/debian/pool/main/d/dpkg/dpkg_1.13.24.tar.gz]
+md5=d8ec0b2bf86d5277fb50f8d391c0dd4a
+sha256=8b1ed52659c5f6723f37bf1122508d7f1b82e064aa9db04d18d726bde34c2713
+
+[ftp://ftp.pl.debian.org/pub/debian/pool/main/f/fakeroot/fakeroot_1.7.1.tar.gz]
+md5=3654bbbf01deeb0d804df194e1b1a2b3
+sha256=52b31fa70151b97ef871d44ad9214e90279f7cbd95144c6b40da49079ed0f1ce
+
+[ftp://ftp.pl.debian.org/pub/debian/pool/main/p/prelink/prelink_0.0.20061027.orig.tar.gz]
+md5=9b01aae72da2bb262f29392597847545
+sha256=e70697c0c23da6b82b330c7db41537ee00dd770da87c92591682f486ab8d1752
+
+[ftp://ftp.samba.org/pub/ppp/ppp-2.4.3.tar.gz]
+md5=848f6c3cafeb6074ffeb293c3af79b7c
+sha256=1e0fddb5f53613dd14ab10b25435e88092fed1eff09b4ac4448d5be01f3b0b11
+
+[ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_4.78.tar.bz2]
+md5=00360ce2b62de3015fa7e0f8f92179a8
+sha256=898db51a4016efca7d408163578443238373773357949e1b4978e26807a1fb2b
-[http://downloads.sourceforge.net/navit/navit-0.0.1.tar.gz]
-md5=521fbc102a804f7c26d4240b3f970380
-sha256=d79151209bf6b2d470773968b62258c56313bf857cda8ef27f8e321dd1a9d084
+[ftp://xmlsoft.org/libxml2/libxml2-2.6.29.tar.gz]
+md5=8b99b6e8b08e838438d9e6b639d79ebd
+sha256=e34a19e0b9d7ac03874acffd624f181c85a98fb976dc84411d6cd1bdda965992
+[ftp://xmlsoft.org/libxml2/libxslt-1.1.20.tar.gz]
+md5=4ea2dc22a23bf2aa570f868aa86357f8
+sha256=ce92f00031c885e04cb65ea76c4675b07aa98af9607572fb0d68180c34bf5346
diff --git a/conf/distro/angstrom-2007.1.conf b/conf/distro/angstrom-2007.1.conf
index 9b3c3fed11..d291fbd3ac 100644
--- a/conf/distro/angstrom-2007.1.conf
+++ b/conf/distro/angstrom-2007.1.conf
@@ -217,7 +217,7 @@ MACHINE_KERNEL_VERSION = "2.6"
PCMCIA_MANAGER = "pcmciautils"
#Preferred version for the kernel on various machines
-PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh16"
+PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.21-hh17"
RDEPENDS_kernel-base_hx4700 = ""
RDEPENDS_kernel-base_htcuniversal = ""
@@ -312,7 +312,7 @@ PREFERRED_VERSION_glibc-initial ?= "2.5"
PREFERRED_VERSION_busybox = "1.2.1"
PREFERRED_VERSION_dbus ?= "1.0.2"
-PREFERRED_VERSION_dbus-glib ?= "0.72"
+PREFERRED_VERSION_dbus-glib ?= "0.74"
PREFERRED_VERSION_wpa-supplicant = "0.5.5"
diff --git a/conf/distro/angstrom-2008.1.conf b/conf/distro/angstrom-2008.1.conf
index 60557325a9..046c63ad54 100644
--- a/conf/distro/angstrom-2008.1.conf
+++ b/conf/distro/angstrom-2008.1.conf
@@ -42,3 +42,9 @@ PREFERRED_VERSION_gtk+ = "2.12.0"
PREFERRED_VERSION_glib-2.0 = "2.14.0"
PREFERRED_VERSION_pango = "1.18.1"
+# prefer newest for speed and fun
+PREFERRED_VERSION_udev = "115"
+
+# Our patched-to-hell busybox 1.2.1 is getting old and unmaintanable
+PREFERRED_VERSION_busybox = "1.7.2"
+
diff --git a/conf/distro/generic.conf b/conf/distro/generic.conf
index a9d667372f..7ab7818393 100644
--- a/conf/distro/generic.conf
+++ b/conf/distro/generic.conf
@@ -74,7 +74,7 @@ require conf/distro/include/sane-srcdates.inc
#
PREFERRED_PROVIDER_virtual/libx11 ?= "diet-x11"
PREFERRED_PROVIDER_tslib ?= "tslib"
-require conf/distro/include/preferred-xorg-versions-X11R7.1.inc
+require conf/distro/include/preferred-xorg-versions-X11R7.2.inc
#
# GPE
diff --git a/conf/distro/include/insane-srcrevs.inc b/conf/distro/include/insane-srcrevs.inc
index ae1ec5fb9c..96fd84a6fd 100644
--- a/conf/distro/include/insane-srcrevs.inc
+++ b/conf/distro/include/insane-srcrevs.inc
@@ -79,5 +79,7 @@ SRCREV_pn-sphyrna ?= "${AUTOREV}"
SRCREV_pn-webkit-gtk ?= "${AUTOREV}"
SRCREV_pn-xoo ?= "${AUTOREV}"
SRCREV_pn-mplayer ?= "${AUTOREV}"
+SRCREV_pn-usbpath ?= "${AUTOREV}"
+SRCREV_pn-usbpath-native ?= "${AUTOREV}"
SRCREV ?= "${AUTOREV}"
diff --git a/conf/distro/include/moko-autorev.inc b/conf/distro/include/moko-autorev.inc
index c4d478ccde..5c80cf0c20 100644
--- a/conf/distro/include/moko-autorev.inc
+++ b/conf/distro/include/moko-autorev.inc
@@ -61,3 +61,8 @@ SRCREV_pn-openocd ?= "${AUTOREV}"
SRCREV_pn-openocd-native ?= "${AUTOREV}"
SRCREV_pn-uboot-openmoko ?= "${AUTOREV}"
+SRCREV_pn-dfu-util ?= "${AUTOREV}"
+SRCREV_pn-dfu-util-native ?= "${AUTOREV}"
+SRCREV_pn-usbpath ?= "${AUTOREV}"
+SRCREV_pn-usbpath-native ?= "${AUTOREV}"
+
diff --git a/conf/distro/include/preferred-xorg-versions-X11R7.3.inc b/conf/distro/include/preferred-xorg-versions-X11R7.3.inc
index 19ee48174d..d7e19284bc 100644
--- a/conf/distro/include/preferred-xorg-versions-X11R7.3.inc
+++ b/conf/distro/include/preferred-xorg-versions-X11R7.3.inc
@@ -71,7 +71,7 @@ PREFERRED_VERSION_xcursorgen ?= "1.0.2"
PREFERRED_VERSION_xdbedizzy ?= "1.0.2"
PREFERRED_VERSION_xditview ?= "1.0.1"
PREFERRED_VERSION_xdm ?= "1.1.6"
-PREFERRED_VERSION_xdpyinfo ?= "1.0.1"
+PREFERRED_VERSION_xdpyinfo ?= "1.0.2"
PREFERRED_VERSION_xdriinfo ?= "1.0.2"
PREFERRED_VERSION_xedit ?= "1.0.2"
PREFERRED_VERSION_xev ?= "1.0.1"
diff --git a/conf/distro/include/sane-srcrevs.inc b/conf/distro/include/sane-srcrevs.inc
index afd281b42a..1c094a12e4 100644
--- a/conf/distro/include/sane-srcrevs.inc
+++ b/conf/distro/include/sane-srcrevs.inc
@@ -5,7 +5,7 @@
# This will miss recipes that have skippackage set (e.g. uclibc)
-SRCREV_pn-bfin-uclibc ?= "1806"
+SRCREV_pn-bfin-uclibc ?= "1857"
SRCREV_pn-dfu-util ?= "2866"
SRCREV_pn-dfu-util-native ?= "2866"
SRCREV_pn-eglibc ?= "3531"
@@ -17,23 +17,25 @@ SRCREV_pn-fbgrab-viewer-native ?= "1943"
SRCREV_pn-fstests ?= "204"
SRCREV_pn-gconf-dbus ?= "606"
SRCREV_pn-gnuradio ?= "6377"
-SRCREV_pn-hildon-1 ?= "13708"
-SRCREV_pn-libgsmd ?= "2957"
+SRCREV_pn-hildon-1 ?= "14173"
+SRCREV_pn-libgsmd ?= "3074"
SRCREV_pn-libmokogsmd2 ?= "2950"
-SRCREV_pn-libmokojournal2 ?= "2780"
+SRCREV_pn-libmokojournal2 ?= "3118"
SRCREV_pn-libmokopanelui2 ?= "2958"
-SRCREV_pn-libmokoui2 ?= "3053"
+SRCREV_pn-libmokoui2 ?= "3111"
SRCREV_pn-libowl ?= "277"
SRCREV_pn-libxosd ?= "627"
+SRCREV_pn-linux-bfin ?= "3731"
SRCREV_pn-linux-hackndev-2.6 ?= "1308"
SRCREV_pn-llvm-gcc4 ?= "374"
SRCREV_pn-llvm-gcc4-cross ?= "374"
SRCREV_pn-maemo-mapper ?= "108"
SRCREV_pn-matchbox-desktop-2 ?= "1649"
-SRCREV_pn-matchbox-keyboard ?= "1675"
-SRCREV_pn-matchbox-keyboard-inputmethod ?= "1675"
+SRCREV_pn-matchbox-keyboard ?= "1739"
+SRCREV_pn-matchbox-keyboard-inputmethod ?= "1739"
SRCREV_pn-matchbox-panel-2 ?= "1626"
-SRCREV_pn-moko-gtk-engine ?= "3058"
+SRCREV_pn-moko-gtk-engine ?= "3146"
+SRCREV_pn-mpd-alsa ?= "6952"
SRCREV_pn-neod ?= "2956"
SRCREV_pn-oh-puzzles ?= "22"
SRCREV_pn-osb-browser ?= "125"
@@ -41,27 +43,28 @@ SRCREV_pn-osb-jscore ?= "117"
SRCREV_pn-osb-nrcit ?= "125"
SRCREV_pn-osb-nrcore ?= "126"
SRCREV_pn-openmoko-appmanager ?= "1851"
-SRCREV_pn-openmoko-browser2 ?= "3031"
+SRCREV_pn-openmoko-appmanager2 ?= "3090"
+SRCREV_pn-openmoko-browser2 ?= "3082"
SRCREV_pn-openmoko-calculator ?= "2404"
SRCREV_pn-openmoko-calculator2 ?= "2789"
SRCREV_pn-openmoko-common ?= "397"
SRCREV_pn-openmoko-common2 ?= "2679"
SRCREV_pn-openmoko-contacts ?= "2298"
-SRCREV_pn-openmoko-contacts2 ?= "335"
+SRCREV_pn-openmoko-contacts2 ?= "358"
SRCREV_pn-openmoko-dates ?= "467"
-SRCREV_pn-openmoko-dates2 ?= "563"
+SRCREV_pn-openmoko-dates2 ?= "617"
SRCREV_pn-openmoko-dialer ?= "2811"
-SRCREV_pn-openmoko-dialer2 ?= "2976"
-SRCREV_pn-openmoko-feedreader2 ?= "2944"
+SRCREV_pn-openmoko-dialer2 ?= "3182"
+SRCREV_pn-openmoko-feedreader2 ?= "3080"
SRCREV_pn-openmoko-finger-demo ?= "1671"
SRCREV_pn-openmoko-firststart2 ?= "2873"
SRCREV_pn-openmoko-footer ?= "2354"
SRCREV_pn-openmoko-icon-theme-standard ?= "2232"
-SRCREV_pn-openmoko-icon-theme-standard2 ?= "2967"
-SRCREV_pn-openmoko-icon-theme-standard2-qvga ?= "2967"
+SRCREV_pn-openmoko-icon-theme-standard2 ?= "3066"
+SRCREV_pn-openmoko-icon-theme-standard2-qvga ?= "3066"
SRCREV_pn-openmoko-keyboard ?= "1631"
SRCREV_pn-openmoko-libs ?= "2367"
-SRCREV_pn-openmoko-mediaplayer2 ?= "2952"
+SRCREV_pn-openmoko-mediaplayer2 ?= "3208"
SRCREV_pn-openmoko-messages ?= "2276"
SRCREV_pn-openmoko-panel-battery ?= "2897"
SRCREV_pn-openmoko-panel-bt ?= "2896"
@@ -69,7 +72,7 @@ SRCREV_pn-openmoko-panel-clock ?= "2567"
SRCREV_pn-openmoko-panel-demo ?= "1622"
SRCREV_pn-openmoko-panel-demo-simple ?= "1328"
SRCREV_pn-openmoko-panel-gps ?= "2900"
-SRCREV_pn-openmoko-panel-gsm ?= "2936"
+SRCREV_pn-openmoko-panel-gsm ?= "3185"
SRCREV_pn-openmoko-panel-mainmenu ?= "2567"
SRCREV_pn-openmoko-panel-usb ?= "2893"
SRCREV_pn-openmoko-session ?= "152"
@@ -79,14 +82,14 @@ SRCREV_pn-openmoko-stylus-demo ?= "2324"
SRCREV_pn-openmoko-stylus-demo-simple ?= "1818"
SRCREV_pn-openmoko-taskmanager ?= "1663"
SRCREV_pn-openmoko-tasks ?= "320"
-SRCREV_pn-openmoko-tasks2 ?= "320"
+SRCREV_pn-openmoko-tasks2 ?= "343"
SRCREV_pn-openmoko-terminal2 ?= "2972"
SRCREV_pn-openmoko-theme-standard ?= "2370"
SRCREV_pn-openmoko-theme-standard-qvga ?= "2370"
-SRCREV_pn-openmoko-theme-standard2 ?= "2964"
+SRCREV_pn-openmoko-theme-standard2 ?= "3044"
SRCREV_pn-openmoko-theme-standard2-qvga ?= "2964"
-SRCREV_pn-openmoko-today ?= "2556"
-SRCREV_pn-openmoko-today2 ?= "2955"
+SRCREV_pn-openmoko-today ?= "3056"
+SRCREV_pn-openmoko-today2 ?= "3180"
SRCREV_pn-openmoko-today2-folders ?= "2680"
SRCREV_pn-openocd ?= "206"
SRCREV_pn-openocd-native ?= "206"
@@ -94,7 +97,12 @@ SRCREV_pn-psplash ?= "249"
SRCREV_pn-settings-daemon ?= "1615"
SRCREV_pn-sjf2410-linux-native ?= "933"
SRCREV_pn-sphyrna ?= "44"
-SRCREV_pn-webkit-gtk ?= "25615"
+SRCREV_pn-webkit-gtk ?= "26079"
SRCREV_pn-xoo ?= "1623"
SRCREV_pn-mplayer ?= "24587"
+SRCREV_pn-networkmanager ?= "2887"
+SRCREV_pn-networkmanager-applet ?= "200"
+SRCREV_pn-libw100 ?= "47"
+SRCREV_pn-usbpath ?= "3108"
+SRCREV_pn-usbpath-native ?= "3108"
diff --git a/conf/distro/include/slugos.inc b/conf/distro/include/slugos.inc
index eabb2d7def..652373a3eb 100644
--- a/conf/distro/include/slugos.inc
+++ b/conf/distro/include/slugos.inc
@@ -161,3 +161,6 @@ PREFERRED_PROVIDER_gdk-pixbuf-loader-tga ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-wbmp ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-xbm ?= "gtk+"
PREFERRED_PROVIDER_gdk-pixbuf-loader-xpm ?= "gtk+"
+
+require conf/distro/include/sane-srcdates.inc
+require conf/distro/include/sane-srcrevs.inc
diff --git a/conf/distro/openmoko.conf b/conf/distro/openmoko.conf
index 8657b1140a..3adc4a9d5e 100644
--- a/conf/distro/openmoko.conf
+++ b/conf/distro/openmoko.conf
@@ -11,7 +11,7 @@ require conf/distro/angstrom-2007.1.conf
#
DISTRO = "openmoko"
DISTRO_NAME = "OpenMoko"
-DISTRO_VERSION = "P1-September-Snapshot-${DATE}"
+DISTRO_VERSION = "P1-Snapshot-${DATE}"
#DISTRO_TYPE = "release"
DISTRO_TYPE = "debug"
@@ -19,7 +19,7 @@ OVERRIDES = "local:${MACHINE}:${DISTRO}:angstrom:${TARGET_OS}:${TARGET_ARCH}:bui
CVS_TARBALL_STASH = "http://downloads.openmoko.org/sources/"
-PREMIRRORS = "(ftp|http)://.*/.*/ http://downloads.openmoko.org/sources/"
+PREMIRRORS = "(ftp|https?)$://.*/.*/ http://downloads.openmoko.org/sources/"
FEED_URIS = "\
snapshot-all##http://buildhost.openmoko.org/snapshots/2007.08/ipk/all \
@@ -39,3 +39,31 @@ require conf/distro/include/preferred-openmoko-versions.inc
# Bleeding-edge developers should add the following line to their local.conf:
# require conf/distro/include/moko-autorev.inc
+# override the PACKAGE_ARCH of certain packages for openmoko distro
+#
+# Same kernel runs on both these machines
+PACKAGE_ARCH_pn-linux-openmoko_fic-gta01 = "${MACHINE_CLASS}"
+PACKAGE_ARCH_pn-linux-openmoko_fic-gta02 = "${MACHINE_CLASS}"
+# Same touchscreen on both these machines
+PACKAGE_ARCH_pn-pointercal_fic-gta01 = "${MACHINE_CLASS}"
+PACKAGE_ARCH_pn-pointercal_fic-gta02 = "${MACHINE_CLASS}"
+SRC_URI_OVERRIDES_PACKAGE_ARCH_pn-pointercal_fic-gta01 = "0"
+SRC_URI_OVERRIDES_PACKAGE_ARCH_pn-pointercal_fic-gta02 = "0"
+# Same kernel so same usb
+PACKAGE_ARCH_pn-usb-gadget-mode_fic-gta01 = "${MACHINE_CLASS}"
+PACKAGE_ARCH_pn-usb-gadget-mode_fic-gta02 = "${MACHINE_CLASS}"
+# same kernel so same keymaps
+PACKAGE_ARCH_pn-keymaps_fic-gta01 = "${MACHINE_CLASS}"
+PACKAGE_ARCH_pn-keymaps_fic-gta02 = "${MACHINE_CLASS}"
+# neod knows about both machines
+PACKAGE_ARCH_pn-neod_fic-gta01 = "${MACHINE_CLASS}"
+PACKAGE_ARCH_pn-neod_fic-gta02 = "${MACHINE_CLASS}"
+
+# Select packge versions we wash to use.
+PREFERRED_PROVIDER_gtk+ = "gtk+-fastscaling"
+PREFERRED_VERSION_gtk+-fastscaling = "2.10.14"
+
+# deploy gta01 and gta02 in ${MACHINE_CLASS} directory
+DEPLOY_DIR_IMAGE_fic-gta01 = "${DEPLOY_DIR}/images/${MACHINE_CLASS}"
+DEPLOY_DIR_IMAGE_fic-gta02 = "${DEPLOY_DIR}/images/${MACHINE_CLASS}"
+
diff --git a/conf/machine/adsp-bf537-stamp.conf b/conf/machine/adsp-bf537-stamp.conf
index 2a8fd640e7..2bbbf48666 100644
--- a/conf/machine/adsp-bf537-stamp.conf
+++ b/conf/machine/adsp-bf537-stamp.conf
@@ -5,7 +5,7 @@
TARGET_ARCH = "bfin"
-PREFERRED_PROVIDER_virtual/kernel = "linux"
+PREFERRED_PROVIDER_virtual/kernel = "linux-bfin"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
#don't try to access tty1
diff --git a/conf/machine/adzs-bf538f-ezlite.conf b/conf/machine/adzs-bf538f-ezlite.conf
index 5078789402..9548b22b90 100644
--- a/conf/machine/adzs-bf538f-ezlite.conf
+++ b/conf/machine/adzs-bf538f-ezlite.conf
@@ -2,10 +2,9 @@
#@Name: Analog Devices blackfin platfrom
#@DESCRIPTION: ADSP-BF538(F) EZ-KIT Board (http://www.analog.com/en/epHSProd/0,,BF538-HARDWARE,00.html)
-
TARGET_ARCH = "bfin"
-PREFERRED_PROVIDER_virtual/kernel = "linux"
+PREFERRED_PROVIDER_virtual/kernel = "linux-bfin"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
#don't try to access tty1
diff --git a/conf/machine/adzs-bf548-ezlite.conf b/conf/machine/adzs-bf548-ezlite.conf
new file mode 100644
index 0000000000..35c9217339
--- /dev/null
+++ b/conf/machine/adzs-bf548-ezlite.conf
@@ -0,0 +1,19 @@
+#@TYPE: Machine
+#@Name: Analog Devices blackfin platfrom
+#@DESCRIPTION: ADSP-BF548 EZ-LITE KIT Board (http://www.analog.com/en/epHSProd/0,,BF548-HARDWARE,00.html)
+
+TARGET_ARCH = "bfin"
+
+KERNEL_IMAGETYPE = "vmlinux"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux-bfin"
+PREFERRED_PROVIDER_xserver = "xserver-kdrive"
+
+#don't try to access tty1
+USE_VT = "0"
+
+MACHINE_FEATURES = "kernel26 alsa ext2 usbhost usbgadget screen"
+
+# used by sysvinit_2
+SERIAL_CONSOLE = "115200"
+
diff --git a/conf/machine/akita.conf b/conf/machine/akita.conf
index 06d5946523..0f5eaca9cc 100644
--- a/conf/machine/akita.conf
+++ b/conf/machine/akita.conf
@@ -6,6 +6,8 @@ require conf/machine/include/zaurus-2.6.inc
require conf/machine/include/zaurus-clamshell.inc
PACKAGE_EXTRA_ARCHS += "iwmmxt"
+MACHINE_FEATURES += "iwmmxt"
+
IMAGE_FSTYPES ?= "jffs2"
ROOT_FLASH_SIZE = "58"
diff --git a/conf/machine/alix.conf b/conf/machine/alix.conf
index 29af29a3b8..3c50ef561b 100644
--- a/conf/machine/alix.conf
+++ b/conf/machine/alix.conf
@@ -1,6 +1,6 @@
#@TYPE: Machine
#@NAME: Alix
-#@DESCRIPTION: Machine configuration for PC Engines Alix1c board
+#@DESCRIPTION: Machine.inciguration for PC Engines Alix1c board
#
# http://pcengines.ch/alix1c.htm
@@ -15,9 +15,9 @@ OLDEST_KERNEL = "2.6.17"
GLIBC_ADDONS = "nptl"
GLIBC_EXTRA_OECONF = "--with-tls"
-MACHINE_FEATURES = "kernel26 usbhost ext2 pci screen alsa acpi"
+MACHINE_FEATURES = "kernel26 usbhost ext2 pci screen alsa acpi x86"
-require conf/machine/include/tune-geodelx.conf
+require.inc/machine/include/tune-geodelx.inc
IMAGE_FSTYPES += "tar.gz"
diff --git a/conf/machine/at91sam9260ek.conf b/conf/machine/at91sam9260ek.conf
index e8903a960a..07616915aa 100644
--- a/conf/machine/at91sam9260ek.conf
+++ b/conf/machine/at91sam9260ek.conf
@@ -1,6 +1,6 @@
#@TYPE: Machine
#@Name: Atmel AT91SAM9260EK Development Platform
-#@DESCRIPTION: Machine configuration for the at91sam9260ek development board with a at91sam9260 processor
+#@DESCRIPTION: Machine.inciguration for the at91sam9260ek development board with a at91sam9260 processor
TARGET_ARCH = "arm"
PACKAGE_EXTRA_ARCHS = "armv4t armv5te"
@@ -8,6 +8,8 @@ PACKAGE_EXTRA_ARCHS = "armv4t armv5te"
PREFERRED_PROVIDER_virtual/kernel = "linux"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
+KERNEL_IMAGETYPE = "uImage"
+
#don't try to access tty1
USE_VT = "0"
@@ -17,4 +19,4 @@ MACHINE_FEATURES = "kernel26 alsa ext2 usbhost usbgadget"
SERIAL_CONSOLE = "115200 ttyS0"
EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x20000 -n"
-require conf/machine/include/tune-arm926ejs.conf
+require conf/machine/include/tune-arm926ejs.inc
diff --git a/conf/machine/at91sam9261ek.conf b/conf/machine/at91sam9261ek.conf
index 489575cd2b..b6ccd7ef0d 100644
--- a/conf/machine/at91sam9261ek.conf
+++ b/conf/machine/at91sam9261ek.conf
@@ -1,6 +1,6 @@
#@TYPE: Machine
#@Name: Atmel AT91SAM9261EK Development Platform
-#@DESCRIPTION: Machine configuration for the at91sam9261ek development board with a at91sam9261 processor
+#@DESCRIPTION: Machine.inciguration for the at91sam9261ek development board with a at91sam9261 processor
TARGET_ARCH = "arm"
PACKAGE_EXTRA_ARCHS = "armv4t armv5te"
@@ -8,6 +8,8 @@ PACKAGE_EXTRA_ARCHS = "armv4t armv5te"
PREFERRED_PROVIDER_virtual/kernel = "linux"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
+KERNEL_IMAGETYPE = "uImage"
+
#don't try to access tty1
USE_VT = "0"
@@ -17,4 +19,4 @@ MACHINE_FEATURES = "kernel26 alsa ext2 usbhost usbgadget screen touchscreen"
SERIAL_CONSOLE = "115200 ttyS0"
EXTRA_IMAGECMD_jffs2 = "--pad --little-endian --eraseblock=0x20000 -n"
-require conf/machine/include/tune-arm926ejs.conf
+require conf/machine/include/tune-arm926ejs.inc
diff --git a/conf/machine/bd-neon.conf b/conf/machine/bd-neon.conf
new file mode 100644
index 0000000000..fe7ff724fd
--- /dev/null
+++ b/conf/machine/bd-neon.conf
@@ -0,0 +1,57 @@
+#@TYPE: Machine
+#@NAME: Boundary Devices NEON
+#@DESCRIPTION: Machine configuration for the Boundary Devices NEON board
+
+#
+# Hardware-based properties
+#
+TARGET_ARCH = "arm"
+PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te"
+
+# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm.
+require conf/machine/include/tune-xscale.inc
+
+# Uncomment this to use iwmmxt optimizations. Remove the above xscale stuff first
+#require conf/machine/include/tune-iwmmxt.inc
+
+ROOT_FLASH_SIZE = "60"
+VOLATILE_STORAGE_SIZE = "128"
+GUI_MACHINE_CLASS = "bigscreen"
+MACHINE_FEATURES = "kernel26 touchscreen apm alsa usbgadget screen uboot"
+
+#
+# Software/packages selection
+#
+PREFERRED_PROVIDER_virtual/kernel = "linux"
+PERFERRED_VERSION_linux = "2.6.22"
+
+MODUTILS = "26"
+XSERVER = "xserver-kdrive-fbdev"
+
+PREFERRED_VERSION_u-boot = "1.1.2"
+
+EXTRA_IMAGEDEPENDS =" mtd-utils"
+
+MACHINE_EXTRA_RDEPENDS = " mtd-utils"
+MACHINE_EXTRA_RRECOMMENDS = " kernel-modules kernel-module-nls-cp437 \
+ kernel-module-nls-iso8859-1 \
+ kernel-module-nls-utf8 \
+ kernel-module-af-key \
+ kernel-module-i2c-pxa"
+
+EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 -n"
+EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x40000 --pad=32243712; sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
+ -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs-summary.jffs2 \
+ -e 128KiB -p"
+
+#
+# Modules autoload and other boot properties
+#
+module_autoload_evdev = "evdev"
+module_autoload_mmc_block = "mmc_block"
+module_autoload_snd-pcm-oss = "snd-pcm-oss"
+module_autoload_snd-mixer-oss = "snd-mixer-oss"
+
+#module_autoload_g_ether = "g_ether"
+
+SERIAL_CONSOLE = "115200 ttyS0"
diff --git a/conf/machine/compulab-pxa270.conf b/conf/machine/cm-x270.conf
index ff0eb42a11..2522897042 100644
--- a/conf/machine/compulab-pxa270.conf
+++ b/conf/machine/cm-x270.conf
@@ -1,13 +1,14 @@
#@TYPE: Machine
-#@Name: Compulab PXA270 system
-#@DESCRIPTION: Machine configuration for Compulab PXA270 system
+#@Name: Compulab cm-x270
+#@DESCRIPTION: Machine configuration for Compulab cm-x270 computer module
#OLDEST_KERNEL = "2.6.16"
TARGET_ARCH = "arm"
-PREFERRED_VERSION_compulab-pxa270 = "2.6.22"
GUI_MACHINE_CLASS ?= "bigscreen"
-PREFERRED_PROVIDER_virtual/kernel = "${MACHINE}"
-PACKAGE_EXTRA_ARCHS = "armv4 armv5te"
+PREFERRED_PROVIDER_virtual/kernel = "linux"
+PREFERRED_VERSION_linux = "2.6.23"
+
+PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te iwmmxt"
require conf/machine/include/tune-xscale.inc
@@ -16,12 +17,19 @@ require conf/machine/include/tune-xscale.inc
# the following line to your local.conf:
# CMX270_CONSOLE_SERIAL_PORT = "ttyS0"
+# NAND flash eraseblock size
+# most of the older cm-x270 modules are populated with NAND flash
+# that have 128KiB eraseblocks. Recently, a user encounted
+# a device that has 16KiB eraseblocks. The following define
+# can be overridden in local.conf if you have one of these devices.
+CMX270_NAND_ERASEBLOCK_SIZE ?= "0x20000"
+
# the following is for the cm-x270 L module
CMX270_CONSOLE_SERIAL_PORT ?= "ttyS1"
# used by sysvinit_2 package, so rebuild this
# package if you change the SERIAL_CONSOLE setting
-# the following is the for the cm-x270 L module
+# the following is the port for the cm-x270 L module
# I think the W module would use ttyS0, but has
# not been tested. This can be overwritten in
# local.conf
@@ -31,16 +39,16 @@ SERIAL_CONSOLE ?= "38400 ${CMX270_CONSOLE_SERIAL_PORT}"
ROOT_FLASH_SIZE ?= "32"
# for NAND flash.
-EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=0x20000 --pad --no-cleanmarkers;\
+EXTRA_IMAGECMD_jffs2 = "--little-endian --eraseblock=${CMX270_NAND_ERASEBLOCK_SIZE} --pad --no-cleanmarkers;\
sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
-o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs-summary.jffs2 \
- -e 0x20000 -p; \
+ -e ${CMX270_NAND_ERASEBLOCK_SIZE} -p; \
cd ${DEPLOY_DIR_IMAGE}; \
rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.rootfs-summary.jffs2; \
ln -s ${IMAGE_NAME}.rootfs-summary.jffs2 ${IMAGE_LINK_NAME}.rootfs-summary.jffs2 \
"
-MACHINE_FEATURES = "kernel26 pcmcia usbhost usbgadget pcmcia touchscreen alsa"
+MACHINE_FEATURES = "kernel26 pcmcia usbhost usbgadget pcmcia touchscreen alsa iwmmxt"
# to program the compulab NAND flash, the following scheme is suggested. Create
# a small rootfs that can fit in NOR flash using the following config:
diff --git a/conf/machine/dht-walnut.conf b/conf/machine/dht-walnut.conf
index ead6a83282..c31aecd550 100644
--- a/conf/machine/dht-walnut.conf
+++ b/conf/machine/dht-walnut.conf
@@ -11,7 +11,6 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-${MACHINE}"
UBOOT_ENTRYPOINT = "0"
MACHINE_FEATURES = "kernel26 ext2"
-MACHINE_TASK_PROVIDER = "task-base"
TARGET_CPU = "405"
OLDEST_KERNEL = "2.6.18"
diff --git a/conf/machine/em-x270.conf b/conf/machine/em-x270.conf
new file mode 100644
index 0000000000..95ba519d3b
--- /dev/null
+++ b/conf/machine/em-x270.conf
@@ -0,0 +1,68 @@
+#@TYPE: Machine
+#@NAME: EM-X270
+#@DESCRIPTION: Machine configuration for the CompuLab EM-X270 with a pxa27x CPU
+
+#
+# Hardware-based properties
+#
+TARGET_ARCH = "arm"
+GUI_MACHINE_CLASS ?= "bigscreen"
+
+PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te iwmmxt "
+PREFERRED_PROVIDER_virtual/kernel = "${MACHINE}"
+
+# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm.
+#require conf/machine/include/tune-xscale.inc
+
+# Uncomment this to use iwmmxt optimizations. Remove the above xscale stuff first
+# require conf/machine/include/tune-iwmmxt.inc
+
+require conf/machine/include/tune-xscale.inc
+
+ROOT_FLASH_SIZE = "128"
+IMAGE_CMD_jffs2 = " \
+/usr/sbin/mkfs.jffs2 --root=${IMAGE_ROOTFS} \
+ --output=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
+ --eraseblock=0x20000 --pad --faketime -n; \
+/usr/sbin/sumtool -i ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 \
+ -o ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs-summary.jffs2 \
+ -e 0x20000 -p; \
+ cd ${DEPLOY_DIR_IMAGE}; \
+ rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2; \
+ ln -fs ${IMAGE_NAME}.rootfs-summary.jffs2 \
+ ${IMAGE_LINK_NAME}.rootfs-summary.jffs2 \
+"
+
+#VOLATILE_STORAGE_SIZE = "128"
+MACHINE_DISPLAY_WIDTH_PIXELS ?= "480"
+MACHINE_DISPLAY_HEIGHT_PIXELS ?= "640"
+MACHINE_FEATURES = "kernel26 touchscreen apm alsa bluetooth wifi usbhost usbgadget screen phone "
+
+#
+# Software/packages selection
+#
+
+#PCMCIA_MANAGER = "pcmciautils"
+PREFERRED_VERSION_em-x270 = "2.6.23"
+MODUTILS = "26"
+PREFERRED_PROVIDER_xserver = "xserver-kdrive"
+
+#PREFERRED_VERSION_orinoco-modules = "0.15rc1"
+
+MACHINE_EXTRA_RDEPENDS = ""
+MACHINE_EXTRA_RRECOMMENDS = "kernel-module-nls-cp437 \
+ kernel-module-nls-iso8859-1 \
+ kernel-module-nls-utf8 \
+ "
+
+#
+# Modules autoload and other boot properties
+#
+module_autoload_evdev = "evdev"
+module_autoload_mmc_block = "mmc_block"
+module_autoload_pxa27x_udc = "pxa27x_udc"
+
+#FIXME: this should be controlled by a userspace utility later.
+module_autoload_g_ether = "g_ether"
+
+SERIAL_CONSOLE = "115200 ttyS0"
diff --git a/conf/machine/epia.conf b/conf/machine/epia.conf
index 0750e4d646..b423f83f00 100644
--- a/conf/machine/epia.conf
+++ b/conf/machine/epia.conf
@@ -12,7 +12,6 @@ GLIBC_EXTRA_OECONF = "--with-tls"
IMAGE_FSTYPES = "ext2.gz"
-MACHINE_FEATURES = "kernel26 screen keyboard pci ushbost acpi ext2"
-MACHINE_TASK_PROVIDER = "task-base"
+MACHINE_FEATURES = "kernel26 screen keyboard pci ushbost acpi ext2 x86"
require conf/machine/include/tune-c3.inc
diff --git a/conf/machine/er0100.conf b/conf/machine/er0100.conf
new file mode 100644
index 0000000000..211091d929
--- /dev/null
+++ b/conf/machine/er0100.conf
@@ -0,0 +1,46 @@
+#@TYPE: Machine
+#@NAME: iRex Iliad e-ink reader
+#@DESCRIPTION: Machine configuration for the iRex Iliad e-ink reader
+
+#
+# Hardware-based properties
+#
+
+# CPU: Intel (now Marvell) PXA255
+
+TARGET_ARCH = "arm"
+PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te"
+
+# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm.
+require conf/machine/include/tune-xscale.inc
+
+# Fix us:
+
+#ROOT_FLASH_SIZE = "80"
+#VOLATILE_STORAGE_SIZE = "64"
+MACHINE_GUI_CLASS = "bigscreen"
+MACHINE_DISPLAY_WIDTH_PIXELS = "768"
+MACHINE_DISPLAY_HEIGHT_PIXELS = "1024"
+MACHINE_FEATURES = "kernel24 touchscreen apm alsa pcmcia wifi usbgadget usbhost screen"
+
+#
+# Software/packages selection
+#
+PREFERRED_PROVIDER_virtual/kernel = "linux-er0100"
+PCMCIA_MANAGER = "pcmcia-cs"
+MODUTILS = "24"
+XSERVER = "xserver-kdrive-fbdev"
+
+
+#
+# Modules autoload and other boot properties
+#
+module_autoload_evdev = "evdev"
+module_autoload_pcmcia = "pcmcia"
+
+#FIXME: this should be controlled by a userspace utility later.
+module_autoload_g_ether = "g_ether"
+
+USE_VT = "0"
+SERIAL_CONSOLE = "-L ttyS2 115200 vt100"
+
diff --git a/conf/machine/fic-gta01.conf b/conf/machine/fic-gta01.conf
index ffd3584da6..bd14df5814 100644
--- a/conf/machine/fic-gta01.conf
+++ b/conf/machine/fic-gta01.conf
@@ -5,7 +5,8 @@
#-----------------------------------------------------------------------------
TARGET_ARCH = "arm"
-PACKAGE_EXTRA_ARCHS = "armv4t"
+MACHINE_CLASS = "neo1973"
+PACKAGE_EXTRA_ARCHS = "armv4t ${MACHINE_CLASS}"
PREFERRED_PROVIDER_virtual/kernel = "linux-openmoko"
UBOOT_ENTRYPOINT = "30008000"
diff --git a/conf/machine/fic-gta02.conf b/conf/machine/fic-gta02.conf
index 99eb9f0832..1760424fc8 100644
--- a/conf/machine/fic-gta02.conf
+++ b/conf/machine/fic-gta02.conf
@@ -5,7 +5,8 @@
#-----------------------------------------------------------------------------
TARGET_ARCH = "arm"
-PACKAGE_EXTRA_ARCHS = "armv4t"
+MACHINE_CLASS = "neo1973"
+PACKAGE_EXTRA_ARCHS = "armv4t ${MACHINE_CLASS}"
PREFERRED_PROVIDER_virtual/kernel = "linux-openmoko"
UBOOT_ENTRYPOINT = "30008000"
@@ -44,3 +45,6 @@ EXTRA_IMAGEDEPENDS += "sjf2410-linux-native dfu-util-native"
# tune for S3C24x0
include conf/machine/include/tune-arm920t.inc
+
+# build YAFFS2
+IMAGE_FSTYPES ?= "jffs2 yaffs2"
diff --git a/conf/machine/ghi270.conf b/conf/machine/ghi270.conf
new file mode 100644
index 0000000000..3536485cab
--- /dev/null
+++ b/conf/machine/ghi270.conf
@@ -0,0 +1,46 @@
+#@TYPE: Machine
+#@NAME: GHI270 / DuraMax H / DuraMaxHG
+#@DESCRIPTION: Machine configuration for the GHI270 platform with a pxa27x CPU
+
+#
+# Hardware-based properties
+#
+TARGET_ARCH = "arm"
+PACKAGE_EXTRA_ARCHS = "armv4 armv4t armv5te iwmmxt "
+
+# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm.
+require conf/machine/include/tune-xscale.inc
+
+# Uncomment this to use iwmmxt optimizations. Remove the above xscale stuff first
+#require conf/machine/include/tune-iwmmxt.inc
+
+EXTRA_IMAGECMD_jffs2_ghi270 = "-p -n -e 16KiB"
+
+ROOT_FLASH_SIZE = "64"
+VOLATILE_STORAGE_SIZE = "64"
+MACHINE_GUI_CLASS = "smallscreen"
+MACHINE_DISPLAY_WIDTH_PIXELS = "240"
+MACHINE_DISPLAY_HEIGHT_PIXELS = "320"
+MACHINE_FEATURES = "kernel26 touchscreen apm alsa pcmcia bluetooth irda wifi usbgadget screen"
+
+#
+# Software/packages selection
+#
+PREFERRED_PROVIDER_virtual/kernel = "linux-handhelds-2.6"
+PREFERRED_VERSION_linux-handhelds-2.6 = "2.6.21-hh11"
+
+PCMCIA_MANAGER = "pcmciautils"
+MODUTILS = "26"
+
+#PREFERRED_VERSION_xserver-kdrive = "1.3.0.0"
+
+#PREFERRED_VERSION_orinoco-modules = "0.15rc1"
+
+#
+# Modules autoload and other boot properties
+#
+
+#FIXME: this should be controlled by a userspace utility later.
+module_autoload_g_ether = "g_ether"
+
+SERIAL_CONSOLE = "115200 ttySA0"
diff --git a/conf/machine/guinness.conf b/conf/machine/guinness.conf
index 626e755b1f..f17451556f 100644
--- a/conf/machine/guinness.conf
+++ b/conf/machine/guinness.conf
@@ -17,7 +17,7 @@ OLDEST_KERNEL = "2.6.17"
GLIBC_ADDONS = "nptl"
GLIBC_EXTRA_OECONF = "--with-tls"
-MACHINE_FEATURES = "kernel26 usbhost ext2 pci acpi screen"
+MACHINE_FEATURES = "kernel26 usbhost ext2 pci acpi screen x86"
#require conf/machine/include/tune-athlonmp.inc
diff --git a/conf/machine/h1910.conf b/conf/machine/h1910.conf
index 2dac4b48af..15390d2d56 100644
--- a/conf/machine/h1910.conf
+++ b/conf/machine/h1910.conf
@@ -21,7 +21,6 @@ MACHINE_FEATURES = "kernel26 touchscreen apm alsa irda usbgadget screen"
# Software/packages selection
#
PREFERRED_PROVIDER_virtual/kernel = "linux-handhelds-2.6"
-PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.16-hh9"
PCMCIA_MANAGER = "pcmciautils"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
diff --git a/conf/machine/htcblueangel.conf b/conf/machine/htcblueangel.conf
index 6aa1885293..44454f3902 100644
--- a/conf/machine/htcblueangel.conf
+++ b/conf/machine/htcblueangel.conf
@@ -21,7 +21,6 @@ MACHINE_FEATURES = "kernel26 touchscreen apm alsa irda bluetooth wifi usbgadget
# Software/packages selection
#
PREFERRED_PROVIDER_virtual/kernel = "linux-handhelds-2.6"
-PREFERRED_VERSION_linux-handhelds-2.6 ?= "2.6.19-hh8"
PCMCIA_MANAGER = "pcmciautils"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
diff --git a/conf/machine/htcuniversal.conf b/conf/machine/htcuniversal.conf
index 634b388f96..c3e7cf710e 100644
--- a/conf/machine/htcuniversal.conf
+++ b/conf/machine/htcuniversal.conf
@@ -18,6 +18,7 @@ MACHINE_GUI_CLASS = "bigscreen"
MACHINE_DISPLAY_WIDTH_PIXELS = "480"
MACHINE_DISPLAY_HEIGHT_PIXELS = "640"
MACHINE_FEATURES = "kernel26 apm alsa irda usbgadget usbhost keyboard touchscreen screen wifi bluetooth phone"
+MACHINE_FEATURES += "iwmmxt"
#
# Software/packages selection
diff --git a/conf/machine/hx4700.conf b/conf/machine/hx4700.conf
index 141470b5a4..87e03a7bdd 100644
--- a/conf/machine/hx4700.conf
+++ b/conf/machine/hx4700.conf
@@ -20,6 +20,7 @@ MACHINE_GUI_CLASS = "bigscreen"
MACHINE_DISPLAY_WIDTH_PIXELS = "480"
MACHINE_DISPLAY_HEIGHT_PIXELS = "640"
MACHINE_FEATURES = "kernel26 touchscreen apm alsa pcmcia bluetooth irda wifi usbgadget screen"
+MACHINE_FEATURES += "iwmmxt"
#
# Software/packages selection
@@ -29,7 +30,6 @@ PCMCIA_MANAGER = "pcmciautils"
MODUTILS = "26"
XSERVER = "xserver-kdrive-w100"
-PREFERRED_VERSION_xserver-kdrive = "1.2.0"
PREFERRED_VERSION_orinoco-modules = "0.15rc1"
diff --git a/conf/machine/i586-generic.conf b/conf/machine/i586-generic.conf
index 0ef522441b..f2a1869b99 100644
--- a/conf/machine/i586-generic.conf
+++ b/conf/machine/i586-generic.conf
@@ -19,9 +19,8 @@ GLIBC_EXTRA_OECONF = "--with-tls"
IMAGE_FSTYPES = "ext2.gz"
-MACHINE_FEATURES = "kernel26 screen keyboard pci ushbost acpi ext2"
+MACHINE_FEATURES = "kernel26 screen keyboard pci ushbost acpi ext2 x86"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-MACHINE_TASK_PROVIDER = "task-base"
#tune for pentium cpu
diff --git a/conf/machine/i686-generic.conf b/conf/machine/i686-generic.conf
index 8ff87553ba..5399316cd5 100644
--- a/conf/machine/i686-generic.conf
+++ b/conf/machine/i686-generic.conf
@@ -18,9 +18,8 @@ GLIBC_EXTRA_OECONF = "--with-tls"
IMAGE_FSTYPES = "ext2.gz"
-MACHINE_FEATURES = "kernel26 screen keyboard pci ushbost acpi ext2"
+MACHINE_FEATURES = "kernel26 screen keyboard pci ushbost acpi ext2 x86"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-MACHINE_TASK_PROVIDER = "task-base"
#tune for pentium pro cpu
require conf/machine/include/tune-pentiumpro.inc
diff --git a/conf/machine/include/gumstix.inc b/conf/machine/include/gumstix.inc
index 4f66f92cf0..fc5fd4e136 100644
--- a/conf/machine/include/gumstix.inc
+++ b/conf/machine/include/gumstix.inc
@@ -13,6 +13,7 @@ module_autoload_mmc_block = "mmc_block"
module_autoload_gumstix_gadget = "gumstix_gadget"
module_autoload_g_ether = "g_ether"
module_autoload_smc91x = "smc91x"
+module_autoload_smc911x = "smc911x"
UBOOT_ENTRYPOINT = "a0008000"
@@ -33,8 +34,9 @@ MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS = "kernel-module-unix \
kernel-module-rtc-sysfs \
kernel-module-smc91x \
kernel-module-gumstix-smc91x \
- "
-
+ kernel-module-smc911x \
+ kernel-module-gumstix-smc911x \
+ "
# used by sysvinit_2
SERIAL_CONSOLE = "115200 ttyS0 vt100"
diff --git a/conf/machine/include/motorola-ezx-base.inc b/conf/machine/include/motorola-ezx-base.inc
index 3912d8fc9b..87571c0db0 100644
--- a/conf/machine/include/motorola-ezx-base.inc
+++ b/conf/machine/include/motorola-ezx-base.inc
@@ -12,6 +12,9 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-ezx"
#mtd3: 00020000 00020000 "Logo"
MACHINE_FEATURES = "kernel26 touchscreen apm alsa bluetooth usbgadget usbhost keyboard screen"
+MACHINE_FEATURES += "iwmmxt"
+
+
MACHINE_DISPLAY_WIDTH_PIXELS = "240"
MACHINE_DISPLAY_HEIGHT_PIXELS = "320"
MACHINE_DISPLAY_ORIENTATION = "0"
diff --git a/conf/machine/include/zaurus-2.6.inc b/conf/machine/include/zaurus-2.6.inc
index 979a6bd484..4bcd36e2ab 100644
--- a/conf/machine/include/zaurus-2.6.inc
+++ b/conf/machine/include/zaurus-2.6.inc
@@ -21,7 +21,8 @@ include conf/machine/include/tune-xscale.inc
SERIAL_CONSOLE = "115200 ttyS0"
PREFERRED_PROVIDER_virtual/kernel = "linux-rp"
-PREFERRED_PROVIDER_xserver = "xserver-kdrive"
+PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
+
PCMCIA_MANAGER ?= "pcmciautils"
diff --git a/conf/machine/magicbox.conf b/conf/machine/magicbox.conf
index 178c242056..9839b6d69e 100644
--- a/conf/machine/magicbox.conf
+++ b/conf/machine/magicbox.conf
@@ -12,7 +12,6 @@ PACKAGE_EXTRA_ARCHS = "ppc405"
PREFERRED_PROVIDER_virtual/kernel = "linux-${MACHINE}"
MACHINE_FEATURES = "kernel26"
-MACHINE_TASK_PROVIDER = "task-base"
TARGET_CPU = "405"
OLDEST_KERNEL = "2.6.18"
diff --git a/conf/machine/magician.conf b/conf/machine/magician.conf
index 60cc9af3d1..900b24b751 100644
--- a/conf/machine/magician.conf
+++ b/conf/machine/magician.conf
@@ -14,12 +14,16 @@ require conf/machine/include/tune-xscale.inc
# Uncomment this to use iwmmxt optimizations. Remove the above xscale stuff first
#require conf/machine/include/tune-iwmmxt.inc
-ROOT_FLASH_SIZE = "80"
+ROOT_FLASH_SIZE = "60"
VOLATILE_STORAGE_SIZE = "64"
MACHINE_GUI_CLASS = "smallscreen"
MACHINE_DISPLAY_WIDTH_PIXELS = "240"
MACHINE_DISPLAY_HEIGHT_PIXELS = "320"
+MACHINE_DISPLAY_ORIENTATION = "0"
+MACHINE_DISPLAY_PPI = "142"
MACHINE_FEATURES = "alsa apm bluetooth irda kernel26 phone screen touchscreen usbgadget usbhost"
+MACHINE_FEATURES += "iwmmxt"
+
#
# We don't support jffs2 installations (yet).
@@ -32,6 +36,7 @@ IMAGE_FSTYPES = "tar.bz2"
PREFERRED_PROVIDER_virtual/kernel = "linux-handhelds-2.6"
MODUTILS = "26"
XSERVER = "xserver-kdrive-fbdev"
+PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
PREFERRED_VERSION_orinoco-modules = "0.15rc1"
diff --git a/conf/machine/netvista.conf b/conf/machine/netvista.conf
index 8d6cd2d220..3ee97a447e 100644
--- a/conf/machine/netvista.conf
+++ b/conf/machine/netvista.conf
@@ -15,7 +15,7 @@ KERNEL_IMAGETYPE = "bzImage"
# BOOTSTRAP_EXTRA_RDEPENDS = "kernel pciutils udev kernel-modules"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-MACHINE_FEATURES = "kernel26 pci usbhost ext2 screen keyboard irda apm alsa"
+MACHINE_FEATURES = "kernel26 pci usbhost ext2 screen keyboard irda apm alsa x86"
ROOT_FLASH_SIZE = "64"
GUI_MACHINE_CLASS = "bigscreen"
diff --git a/conf/machine/palmld.conf b/conf/machine/palmld.conf
index 2f92eb4158..bbeaf3a4a2 100644
--- a/conf/machine/palmld.conf
+++ b/conf/machine/palmld.conf
@@ -10,6 +10,7 @@ MACHINE_GUI_CLASS = "bigscreen"
MACHINE_DISPLAY_WIDTH_PIXELS = "320"
MACHINE_DISPLAY_HEIGHT_PIXELS = "480"
MACHINE_FEATURES += "pcmcia wifi"
+MACHINE_FEATURES += "iwmmxt"
MACHINE_EXTRA_RRECOMMENDS += "\
diff --git a/conf/machine/progear.conf b/conf/machine/progear.conf
index ffa7dad468..2a8c009b10 100644
--- a/conf/machine/progear.conf
+++ b/conf/machine/progear.conf
@@ -15,7 +15,7 @@ OLDEST_KERNEL = "2.6.17"
GLIBC_ADDONS = "nptl"
GLIBC_EXTRA_OECONF = "--with-tls"
-MACHINE_FEATURES = "kernel26 usbhost ext2 pci pcmcia screen alsa irda acpi screen touchscreen"
+MACHINE_FEATURES = "kernel26 usbhost ext2 pci pcmcia screen alsa irda acpi screen touchscreen x86"
IMAGE_FSTYPES = "tar.gz"
diff --git a/conf/machine/qemux86.conf b/conf/machine/qemux86.conf
index 2378a9990e..fe811ba54e 100644
--- a/conf/machine/qemux86.conf
+++ b/conf/machine/qemux86.conf
@@ -7,6 +7,8 @@ PACKAGE_EXTRA_ARCHS = "x86"
require conf/machine/include/qemu.inc
+MACHINE_FEATURES += "x86"
+
KERNEL_IMAGETYPE = "bzImage"
SERIAL_CONSOLE = "115200 ttyS0"
diff --git a/conf/machine/rokre2.conf b/conf/machine/rokre2.conf
index 621e95f166..1a99c877ce 100644
--- a/conf/machine/rokre2.conf
+++ b/conf/machine/rokre2.conf
@@ -6,3 +6,5 @@ require conf/machine/include/motorola-ezx-base.inc
# there is no touchscreen
MACHINE_FEATURES = "kernel26 apm alsa bluetooth usbgadget usbhost keyboard screen"
+MACHINE_FEATURES += "iwmmxt"
+
diff --git a/conf/machine/rokre6.conf b/conf/machine/rokre6.conf
index 7b20091140..044a65c9fa 100644
--- a/conf/machine/rokre6.conf
+++ b/conf/machine/rokre6.conf
@@ -4,5 +4,3 @@
require conf/machine/include/motorola-ezx-base.inc
-# there is no touchscreen
-MACHINE_FEATURES = "kernel26 apm alsa bluetooth usbgadget usbhost keyboard screen"
diff --git a/conf/machine/sequoia.conf b/conf/machine/sequoia.conf
index 72f0a8feb2..b391f4e277 100644
--- a/conf/machine/sequoia.conf
+++ b/conf/machine/sequoia.conf
@@ -11,7 +11,6 @@ PACKAGE_EXTRA_ARCHS = "all ${MACHINE} ppc ppc440e"
PREFERRED_PROVIDER_virtual/kernel = "linux-${MACHINE}"
MACHINE_FEATURES = "kernel26 usbhost"
-MACHINE_TASK_PROVIDER = "task-base"
#don't try to access tty1
USE_VT = "0"
diff --git a/conf/machine/spitz.conf b/conf/machine/spitz.conf
index 3199065606..32060d090c 100644
--- a/conf/machine/spitz.conf
+++ b/conf/machine/spitz.conf
@@ -5,6 +5,8 @@
require conf/machine/include/zaurus-2.6.inc
require conf/machine/include/zaurus-clamshell.inc
+MACHINE_FEATURES += "iwmmxt"
+
PIVOTBOOT_EXTRA_RDEPENDS += "pivotinit ${PCMCIA_MANAGER}"
PACKAGE_EXTRA_ARCHS += "iwmmxt"
diff --git a/conf/machine/wrap.conf b/conf/machine/wrap.conf
index d73c80214c..92720043f2 100644
--- a/conf/machine/wrap.conf
+++ b/conf/machine/wrap.conf
@@ -22,7 +22,7 @@ USE_DEVFS = "0"
IMAGE_FSTYPE ?= "tar.gz"
# Things to include in the fs image
-MACHINE_FEATURES = "kernel26 pci ext2"
+MACHINE_FEATURES = "kernel26 pci ext2 x86"
# The kernel and grub need to installed to boot from flash
MACHINE_EXTRA_RDEPENDS = "kernel grub"
diff --git a/conf/machine/x86-32-nocona.conf b/conf/machine/x86-32-nocona.conf
index ad5badf84a..20b5a11770 100644
--- a/conf/machine/x86-32-nocona.conf
+++ b/conf/machine/x86-32-nocona.conf
@@ -17,7 +17,7 @@ GLIBC_EXTRA_OECONF = "--with-tls"
IMAGE_FSTYPES = "ext2.gz"
-MACHINE_FEATURES = "kernel26 screen keyboard pci ushbost acpi ext2"
+MACHINE_FEATURES = "kernel26 screen keyboard pci ushbost acpi ext2 x86"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-MACHINE_TASK_PROVIDER = "task-base"
+
diff --git a/conf/machine/x86-prescott.conf b/conf/machine/x86-prescott.conf
index b4021a6496..6a91bc39fb 100644
--- a/conf/machine/x86-prescott.conf
+++ b/conf/machine/x86-prescott.conf
@@ -16,7 +16,7 @@ GLIBC_EXTRA_OECONF = "--with-tls"
IMAGE_FSTYPES = "ext2.gz"
-MACHINE_FEATURES = "kernel26 screen keyboard pci ushbost acpi ext2"
+MACHINE_FEATURES = "kernel26 screen keyboard pci ushbost acpi ext2 x86"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-MACHINE_TASK_PROVIDER = "task-base"
+
diff --git a/conf/machine/x86.conf b/conf/machine/x86.conf
index 51757e950c..c35e7ad389 100644
--- a/conf/machine/x86.conf
+++ b/conf/machine/x86.conf
@@ -13,7 +13,7 @@ KERNEL_IMAGETYPE = "bzImage"
# BOOTSTRAP_EXTRA_RDEPENDS = "kernel pciutils udev kernel-modules"
MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
-MACHINE_FEATURES = "kernel26 pci usbhost ext2 screen"
+MACHINE_FEATURES = "kernel26 pci usbhost ext2 screen x86"
udevdir = "/dev"
OLDEST_KERNEL = "2.6.17"
diff --git a/packages/dbus/dbus-glib-0.72/.mtn2git_empty b/contrib/armmon_xfer/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/dbus/dbus-glib-0.72/.mtn2git_empty
+++ b/contrib/armmon_xfer/.mtn2git_empty
diff --git a/contrib/armmon_xfer/armmon_xfer.py b/contrib/armmon_xfer/armmon_xfer.py
new file mode 100755
index 0000000000..d7a9b7281d
--- /dev/null
+++ b/contrib/armmon_xfer/armmon_xfer.py
@@ -0,0 +1,150 @@
+#!/usr/bin/python
+
+# Small utility to upload kernel and/or ramdisk to
+# the compulab board through the ARMmon firmware.
+# Requires pyserial : http://pyserial.sourceforge.net
+# author: Tobias Pflug
+
+import sys, os, serial, getopt, atexit, re
+
+# regular expression to match valid IPv4 addresses
+ipv4_regex = r"\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b"
+
+def wait_flash_complete():
+ while 1:
+ data = s.readline()
+ if quiet != 1:
+ print data,
+ if data.split(" ")[0] == "Finished":
+ break
+
+def test_armmon():
+ # write some nonsense to the monitor and
+ # check if armmon replies accordingly
+ s.write("nonsense\n")
+ s.timeout=2
+ s.read(len("nonsense\n")+1)
+ data = s.read(len("Illegal"))
+ if data.split(" ")[0] != "Illegal":
+ sys.exit("Error: ARMmon not responding. Linux running maybe?")
+ s.timeout=None
+ s.flushInput()
+ s.flushOutput()
+
+
+def usage():
+ sys.stderr.write("""USAGE: %s [options] <server ip>
+ armmon_xfer - data upload tool for cmx270/ARMmon
+
+ options:
+ -p, --port=PORT: serial port, default='/dev/ttyUSB0'
+ -k, --kernel=KERNEL: upload and flash kernel image KERNEL
+ -r, --ramdisk=RAMDISK: upload and flash ramdisk image RAMDISK
+ -b, --bootos: boot Linux
+ -R, --reboot: reboot cmx270
+ -q, --quiet be quiet, little output
+ -h, --help: print this help screen
+
+""" % (sys.argv[0],))
+
+if __name__ == '__main__':
+
+ port = "/dev/ttyUSB0"
+ baud = 38400
+ kernel = None
+ ramdisk = None
+ boot = None
+ reboot = None
+ quiet = None
+ tftp_ip = None
+
+ if len(sys.argv) < 2:
+ usage()
+ sys.exit(0)
+
+ # parse command line
+
+ try:
+ opts, args = getopt.getopt(sys.argv[1:],
+ "p:k:r:bRhq",
+ ["port=", "kernel=","ramdisk=","bootos","reboot","help","quiet"]
+ )
+ except getopt.GetoptError:
+ usage()
+ sys.exit(2)
+
+ for o, a in opts:
+ if o in ("-h","--help"):
+ usage()
+ sys.exit()
+ elif o in ("-k","--kernel"):
+ kernel = a
+ elif o in ("-r","--ramdisk"):
+ ramdisk = a
+ elif o in ("-b","--bootos"):
+ boot = 1
+ elif o in ("-R","--reboot"):
+ reboot = 1
+ elif o in ("-p","--port"):
+ port = o
+ elif o in ("-q","--quiet"):
+ quiet = 1
+
+ # check for arguments and validate IP address
+ # when required by commands
+ if len(args)>0 and re.match(ipv4_regex,args[0]):
+ tftp_ip = args[0]
+ else:
+ if kernel or ramdisk:
+ sys.exit("Error: invalid IP address!")
+
+ try:
+ s = serial.Serial('/dev/ttyUSB0',38400)
+ except:
+ sys.stderr.write("Error: Could not open port: %s\n" % (port))
+ sys.exit(1)
+
+ # test if armmon is responding on bogus input
+ test_armmon()
+
+ # carry out commands
+
+ if reboot:
+ print "Rebooting compulab ..."
+ s.write("reboot\n")
+ s.write("y\n")
+ s.write("y\n")
+ s.close()
+ sys.exit(0)
+
+ if kernel:
+ print "Downloading kernel ..."
+ cmd = "download kernel tftp %s %s\n" % (kernel,tftp_ip)
+ s.write(cmd)
+ data = s.readline()
+ data = s.readline()
+
+ print "Flashing kernel ..."
+ cmd = "flash kernel\n"
+ s.write(cmd)
+ wait_flash_complete()
+
+
+ if ramdisk:
+ print "Downloading ramdisk ..."
+ cmd = "download ramdisk tftp %s %s\n" % (ramdisk,tftp_ip)
+ s.write(cmd)
+ s.readline()
+ s.readline()
+
+ print "Flashing ramdisk ..."
+ cmd = "flash ramdisk\n"
+ s.write(cmd)
+ wait_flash_complete()
+
+ if boot:
+ print "Booting Linux ..."
+ s.write("bootos\n")
+
+ s.close()
+ sys.exit(0)
diff --git a/packages/dbus/dbus-glib-native-0.72/.mtn2git_empty b/contrib/mono/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/dbus/dbus-glib-native-0.72/.mtn2git_empty
+++ b/contrib/mono/.mtn2git_empty
diff --git a/contrib/mono/collect-files.py b/contrib/mono/collect-files.py
new file mode 100644
index 0000000000..c353667b19
--- /dev/null
+++ b/contrib/mono/collect-files.py
@@ -0,0 +1,118 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+## This utility takes the debian directory from an unpacked debian mono source
+## tree (e.g. apt-get source mono), parses the *.install files and generates a
+## bitbake include file with the file and package lists. It tries to handle -dbg
+## packages by creating additional glob patterns for *.mdb and */.debug/*. Most
+## of these will not match, but that's fine (I think).
+## -- Henryk Plötz <henryk@openmoko.org>
+##
+##The output looks like:
+##FILES_mono-jit-dbg = "/usr/bin/mono*.mdb \
+## /usr/bin/mono*/*.mdb"
+##FILES_mono-jit = "/usr/bin/mono"
+##FILES_mono-gac-dbg = "/usr/bin/gacutil*.mdb \
+## /usr/bin/gacutil*/*.mdb \
+## /usr/lib/mono/1.0/gacutil.exe*.mdb \
+## /usr/lib/mono/1.0/gacutil.exe*/*.mdb"
+##FILES_mono-gac = "/usr/bin/gacutil \
+## /usr/lib/mono/1.0/gacutil.exe"
+## ...
+##PACKAGES = "mono-jit-dbg \
+## mono-jit \
+## mono-gac-dbg \
+## mono-gac \
+## ...
+
+import os, sys, re
+
+def collect_paths(dir):
+ paths = {}
+
+ os.chdir(dir)
+ for filename in os.listdir("."):
+ if filename.endswith(".install"):
+ fp = file(filename, "r")
+ lines = fp.readlines()
+ fp.close()
+
+ contents = []
+ for line in lines:
+ line = line.strip()
+ if line.startswith("#"): continue
+ if line == "": continue
+
+ lineparts = line.split()
+ if lineparts[0].startswith("debian/tmp"):
+ pattern = lineparts[0][ len("debian/tmp"): ]
+ if len(lineparts) == 2:
+ if not pattern.startswith(lineparts[1]):
+ print >>sys.stderr, "Warning: Apparently I don't fully understand the format in file %s" % filename
+ elif len(lineparts) > 2:
+ print >>sys.stderr, "Warning: Apparently I don't fully understand the format in file %s" % filename
+
+ contents.append( pattern )
+ else:
+ print >>sys.stderr, "Note: Ignoring %s in %s" % (lineparts, filename)
+
+ paths[ filename[ :-len(".install") ] ] = contents
+
+ return paths
+
+def collect_packages(paths):
+ # These packages should be populated first (e.g. because their files will otherwise end up
+ # in other packages)
+ PACKAGES_FIRST = ("mono-jit", "mono-gac", "mono-mjs", "mono-gmcs", "mono-utils", "mono-doc")
+ # These should be populated last (because their spec is very broad)
+ PACKAGES_LAST = ("mono-mcs", "libmono-system1.0-cil", "libmono-system2.0-cil", "libmono1.0-cil", "libmono2.0-cil")
+ first = []
+ last = []
+ packages = paths.keys()
+ for packagename in PACKAGES_FIRST + PACKAGES_LAST:
+ if packagename in packages:
+ packages.remove(packagename)
+ if packagename in PACKAGES_FIRST:
+ first.append(packagename)
+ else:
+ last.append(packagename)
+ packagenames = first + packages + last
+
+ return packagenames, paths
+
+def debugify(packagenames, paths):
+ pnames = []
+ for pkg in packagenames:
+ if not pkg.endswith("-dbg"):
+ result = []
+ for path in paths[pkg]:
+ if not path.endswith("*"):
+ result.append(path + "*.mdb")
+ result.append(path + "*/*.mdb")
+ else:
+ result.append(path + ".mdb")
+ result.append(path + "/*.mdb")
+ if path.endswith("/"):
+ result.append(path + ".debug/")
+ result.append(path + "../.debug/")
+ paths[pkg + "-dbg"] = result
+ pnames.append(pkg + "-dbg")
+ pnames.append(pkg)
+ return pnames, paths
+
+if __name__ == "__main__":
+ packagenames, paths = collect_packages( collect_paths(".") )
+ packagenames, paths = debugify(packagenames, paths)
+
+ print "# This is a generated file, please do not edit directly"
+ print "# Use collect-files.py instead. -- Henryk <henryk@openmoko.org>"
+
+ packages = []
+ for pkg in packagenames:
+ if not paths[pkg]: continue
+
+ print 'FILES_%s = "%s"' % (pkg, " \\\n\t".join(paths[pkg]))
+ packages.append(pkg)
+
+ print
+ print 'PACKAGES = "%s"' % (" \\\n\t".join(packages))
diff --git a/packages/dbus/dbus-glib/.mtn2git_empty b/contrib/mtn2git/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/dbus/dbus-glib/.mtn2git_empty
+++ b/contrib/mtn2git/.mtn2git_empty
diff --git a/contrib/mtn2git/git2mtn.py b/contrib/mtn2git/git2mtn.py
new file mode 100755
index 0000000000..99681a9ca2
--- /dev/null
+++ b/contrib/mtn2git/git2mtn.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+
+"""
+ Copyright (C) 2006, 2007 Holger Hans Peter Freyther
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+"""
+
+#############
+#
+# Use: This tool can merge one git-branch back to one branch in monotone
+#
+# Discussion:
+# Merging from git to a monotone branch. Currently I see two modes which
+# should be supported.
+#
+# a) linear development. Only a couple of changes are done on top of the
+# branch and nothing get merged. In this case we can merge everything
+# back and each rev gets a cert with the branch.
+# This should be possible using programs like git-rebase.
+# b) we have merges inside our git-rev-list history. This means we need to
+# merge every revision and can't attach any branch certs to the revision.
+# And once we are done with this we will create a propagate like commit
+# entry and we can give that new revision a cert with the branch name.
+#
+# This means working in git is treated like a branch!
+#
+# One difficulty is with git. This propagate like commit will create a new revision
+# in monotone but none in git as both trees/manifests are the same. So what we have
+# to make sure is to use the latest mtn revision for a given mark/git revision. This
+# is where mtn2git.py needs to help. We will save a list of mtn revisions that have the
+# same git version and then will read every of them and check the branch certs and will
+# use the one matching our target branch!
+#############
diff --git a/packages/gtk-webcore/midori/.mtn2git_empty b/contrib/mtn2git/mtn/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/gtk-webcore/midori/.mtn2git_empty
+++ b/contrib/mtn2git/mtn/.mtn2git_empty
diff --git a/contrib/mtn2git/mtn/__init__.py b/contrib/mtn2git/mtn/__init__.py
new file mode 100644
index 0000000000..e7424ccd3d
--- /dev/null
+++ b/contrib/mtn2git/mtn/__init__.py
@@ -0,0 +1,6 @@
+from mtn import Automate, Operations
+
+__all__ = [
+ "Automate",
+ "Operations"
+ ]
diff --git a/contrib/mtn2git/mtn/authors.py b/contrib/mtn2git/mtn/authors.py
new file mode 100644
index 0000000000..90542a02da
--- /dev/null
+++ b/contrib/mtn2git/mtn/authors.py
@@ -0,0 +1,11 @@
+authors='''Authors:
+Grahame Bowland <grahame@angrygoats.net>
+
+Contributors:
+Matt Johnston <matt@ucc.asn.au>
+Nathaniel Smith <njs@pobox.com>
+Bruce Stephens <monotone@cenderis.demon.co.uk>
+Lapo Luchini <lapo@lapo.it>
+David Reiss <davidn@gmail.com>
+
+'''
diff --git a/contrib/mtn2git/mtn/common.py b/contrib/mtn2git/mtn/common.py
new file mode 100644
index 0000000000..1bbf6031c9
--- /dev/null
+++ b/contrib/mtn2git/mtn/common.py
@@ -0,0 +1,49 @@
+
+import datetime
+import time
+import fcntl
+import os
+import signal
+import traceback
+import sys
+
+def parse_timecert(value):
+ return apply(datetime.datetime, time.strptime(value, "%Y-%m-%dT%H:%M:%S")[:6])
+
+def set_nonblocking(fd):
+ fl = fcntl.fcntl(fd, fcntl.F_GETFL)
+ fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NDELAY)
+
+def terminate_popen3(process):
+ print >> sys.stderr, ("[%s] stopping process: %s" % (os.getpid(), process.pid))
+ try:
+ process.tochild.close()
+ process.fromchild.close()
+ process.childerr.close()
+ if process.poll() == -1:
+ # the process is still running, so kill it.
+ os.kill(process.pid, signal.SIGKILL)
+ process.wait()
+ except:
+ print >> sys.stderr, ("%s failed_to_stop %s (%s)" % (os.getpid(), process.pid, traceback.format_exc()))
+
+def ago(event):
+ def plural(v, singular, plural):
+ if v == 1:
+ return "%d %s" % (v, singular)
+ else:
+ return "%d %s" % (v, plural)
+ now = datetime.datetime.utcnow()
+ ago = now - event
+ if ago.days > 0:
+ rv = "%s" % (plural(ago.days, "day", "days"))
+ elif ago.seconds > 3600:
+ hours = ago.seconds / 3600
+ minutes = (ago.seconds - (hours * 3600)) / 60
+ rv = "%s" % (plural(hours, "hour", "hours"))
+ else:
+ minutes = ago.seconds / 60
+ seconds = (ago.seconds - (minutes * 60))
+ rv = "%s" % (plural(minutes, "minute", "minutes"))
+ return rv
+
diff --git a/contrib/mtn2git/mtn/genproxy.py b/contrib/mtn2git/mtn/genproxy.py
new file mode 100755
index 0000000000..5ba67eefd6
--- /dev/null
+++ b/contrib/mtn2git/mtn/genproxy.py
@@ -0,0 +1,25 @@
+#!/usr/bin/env python
+
+class GeneratorProxy(object):
+ def __init__(self, generator):
+ self.generator = generator
+ def __iter__(self):
+ return self
+ def next(self):
+ return self.generator.next()
+
+class Seedy(GeneratorProxy):
+ def __del__(self):
+ print "testing"
+
+def test():
+ yield 2
+ yield 3
+ yield 4
+
+if __name__ == '__main__':
+ a = test()
+ b = Seedy(test())
+ for i in b:
+ print i
+ \ No newline at end of file
diff --git a/contrib/mtn2git/mtn/mtn.py b/contrib/mtn2git/mtn/mtn.py
new file mode 100644
index 0000000000..aa086d78d4
--- /dev/null
+++ b/contrib/mtn2git/mtn/mtn.py
@@ -0,0 +1,419 @@
+
+import os
+import re
+import fcntl
+import pipes
+import select
+import threading
+import popen2
+from common import set_nonblocking, terminate_popen3
+from traceback import format_exc
+import genproxy
+import sys
+
+# regular expressions that are of general use when
+# validating monotone output
+def group_compile(r):
+ return re.compile('('+r+')')
+
+hex_re = r'[A-Fa-f0-9]*'
+hex_re_c = group_compile(hex_re)
+revision_re = r'[A-Fa-f0-9]{40}'
+revision_re_c = group_compile(revision_re)
+name_re = r'^[\S]+'
+name_re_c = group_compile(name_re)
+
+class MonotoneException(Exception):
+ pass
+
+class Revision(str):
+ def __init__(self, v):
+ # special case that must be handled: empty (initial) revision ID ''
+ str.__init__(v)
+ self.obj_type = "revision"
+ if v != '' and not revision_re_c.match(self):
+ raise MonotoneException("Not a valid revision ID: %s" % (v))
+ def abbrev(self):
+ return '[' + self[:8] + '..]'
+
+class Author(str):
+ def __init__(self, v):
+ str.__init__(v)
+ self.obj_type = "author"
+
+class Runner:
+ def __init__(self, monotone, database):
+ self.base_command = [monotone, "--db=%s" % pipes.quote(database)]
+
+packet_header_re = re.compile(r'^(\d+):(\d+):([lm]):(\d+):')
+
+class Automate(Runner):
+ """Runs commands via a particular monotone process. This
+ process is started the first time run() is called, and
+ stopped when this class instance is deleted or the stop()
+ method is called.
+
+ If an error occurs, the monotone process may need to be
+ stopped and a new one created.
+ """
+ def __init__(self, *args, **kwargs):
+ Runner.__init__(*[self] + list(args), **kwargs)
+ self.lock = threading.Lock()
+ self.process = None
+
+ def stop(self):
+ if not self.process:
+ return
+ terminate_popen3(self.process)
+ self.process = None
+
+ def __process_required(self):
+ if self.process != None:
+ return
+ to_run = self.base_command + ['automate', 'stdio']
+ self.process = popen2.Popen3(to_run, capturestderr=True)
+ # breaks down with toposort and a lot of input
+ #map (set_nonblocking, [ self.process.fromchild,
+ # self.process.tochild,
+ # self.process.childerr ])
+ map (set_nonblocking, [ self.process.fromchild,
+ self.process.childerr ])
+
+ def run(self, *args, **kwargs):
+ print >> sys.stderr, (("automate is running:", args, kwargs))
+
+ lock = self.lock
+ stop = self.stop
+ class CleanRequest(genproxy.GeneratorProxy):
+ def __init__(self, *args, **kwargs):
+ genproxy.GeneratorProxy.__init__(self, *args, **kwargs)
+
+ # nb; this used to be False, but True seems to behave more sensibly.
+ # in particular, if someone holds down Refresh sometimes the code
+ # gets here before __del__ is called on the previous iterator,
+ # causing a pointless error to occur
+ if not lock.acquire(True):
+ # I've checked; this exception does _not_ cause __del__ to run, so
+ # we don't accidentally unlock a lock below
+ raise MonotoneException("Automate request cannot be called: it is already locked! This indicates a logic error in ViewMTN; please report.")
+
+ def __del__(self):
+ def read_any_unread_output():
+ try:
+ # this'll raise StopIteration if we're done
+ self.next()
+ # okay, we're not done..
+ print >> sys.stderr, ("warning: Automate output not completely read; reading manually.")
+ for stanza in self:
+ pass
+ except StopIteration:
+ pass
+
+ try:
+ read_any_unread_output()
+ lock.release()
+ except:
+ print >> sys.stderr, ("exception cleaning up after Automation; calling stop()!")
+ stop()
+
+ return CleanRequest(self.__run(*args, **kwargs))
+
+ def __run(self, command, args):
+ enc = "l%d:%s" % (len(command), command)
+ enc += ''.join(["%d:%s" % (len(x), x) for x in args]) + 'e'
+
+ # number of tries to get a working mtn going..
+ for i in xrange(2):
+ self.__process_required()
+ try:
+ self.process.tochild.write(enc)
+ self.process.tochild.flush()
+ break
+ except:
+ # mtn has died underneath the automate; restart it
+ print >> sys.stderr, ("exception writing to child process; attempting restart: %s" % format_exc())
+ self.stop()
+
+ import sys
+ def read_result_packets():
+ buffer = ""
+ while True:
+ r_stdin, r_stdout, r_stderr = select.select([self.process.fromchild], [], [], None)
+ if not r_stdin and not r_stdout and not r_stderr:
+ break
+
+ if self.process.fromchild in r_stdin:
+ data = self.process.fromchild.read()
+ if data == "":
+ break
+ buffer += data
+
+ # loop, trying to get complete packets out of our buffer
+ complete, in_packet = False, False
+ while not complete and buffer != '':
+ if not in_packet:
+ m = packet_header_re.match(buffer)
+ if not m:
+ break
+ in_packet = True
+ cmdnum, errnum, pstate, length = m.groups()
+ errnum = int(errnum)
+ length = int(length)
+ header_length = m.end(m.lastindex) + 1 # the '1' is the colon
+
+ if len(buffer) < length + header_length:
+ # not enough data read from client yet; go round
+ break
+ else:
+ result = buffer[header_length:header_length+length]
+ buffer = buffer[header_length+length:]
+ complete = pstate == 'l'
+ in_packet = False
+ yield errnum, complete, result
+
+ if complete:
+ break
+
+ # get our response, and yield() it back one line at a time
+ code_max = -1
+ data_buf = ''
+ for code, is_last, data in read_result_packets():
+ if code and code > code_max:
+ code_max = code
+ data_buf += data
+ while True:
+ nl_idx = data_buf.find('\n')
+ if nl_idx == -1:
+ break
+ yield data_buf[:nl_idx+1]
+ data_buf = data_buf[nl_idx+1:]
+ # left over data?
+ if data_buf:
+ yield data_buf
+ if code_max > 0:
+ raise MonotoneException("error code %d in automate packet." % (code_max))
+
+class Standalone(Runner):
+ """Runs commands by running monotone. One monotone process
+ per command"""
+
+ def run(self, command, args):
+ # as we pass popen3 as sequence, it executes monotone with these
+ # arguments - and does not pass them through the shell according
+ # to help(os.popen3)
+# print(("standalone is running:", command, args))
+ to_run = self.base_command + [command] + args
+ process = popen2.Popen3(to_run, capturestderr=True)
+ for line in process.fromchild:
+ yield line
+ stderr_data = process.childerr.read()
+ if len(stderr_data) > 0:
+ raise MonotoneException("data on stderr for command '%s': %s" % (command,
+ stderr_data))
+ terminate_popen3(process)
+
+class MtnObject:
+ def __init__(self, obj_type):
+ self.obj_type = obj_type
+
+class Tag(MtnObject):
+ def __init__(self, name, revision, author, branches):
+ MtnObject.__init__(self, "tag")
+ self.name, self.revision, self.author, self.branches = name, Revision(revision), author, branches
+
+class Branch(MtnObject):
+ def __init__(self, name):
+ MtnObject.__init__(self, "branch")
+ self.name = name
+
+class File(MtnObject):
+ def __init__(self, name, in_revision):
+ MtnObject.__init__(self, "file")
+ self.name = name
+ self.in_revision = in_revision
+
+class Dir(MtnObject):
+ def __init__(self, name, in_revision):
+ MtnObject.__init__(self, "dir")
+ self.name = name
+ self.in_revision = in_revision
+
+basic_io_name_tok = re.compile(r'^(\S+)')
+
+def basic_io_from_stream(gen):
+ # all of these x_consume functions return parsed string
+ # token to add to stanza, name of next consume function to call
+ # new value of line (eg. with consumed tokens removed)
+
+ def hex_consume(line):
+ m = hex_re_c.match(line[1:])
+ if line[0] != '[' or not m:
+ raise MonotoneException("This is not a hex token: %s" % line)
+ end_of_match = m.end(m.lastindex)
+ if line[end_of_match+1] != ']':
+ raise MonotoneException("Hex token ends in character other than ']': %s" % line)
+ return Revision(m.groups()[0]), choose_consume, line[end_of_match+2:]
+
+ def name_consume(line):
+ m = name_re_c.match(line)
+ if not m:
+ raise MonotoneException("Not a name: %s" % line)
+ end_of_match = m.end(m.lastindex)
+ return m.groups()[0], choose_consume, line[end_of_match:]
+
+ def choose_consume(line):
+ line = line.lstrip()
+ if line == '':
+ consumer = choose_consume
+ elif line[0] == '[':
+ consumer = hex_consume
+ elif line[0] == '"':
+ consumer = string_consume
+ else:
+ consumer = name_consume
+ return None, consumer, line
+
+ class StringState:
+ def __init__(self):
+ self.in_escape = False
+ self.has_started = False
+ self.has_ended = False
+ self.value = ''
+
+ def string_consume(line, state=None):
+ if not state:
+ state = StringState()
+
+ if not state.has_started:
+ if line[0] != '"':
+ raise MonotoneException("Not a string: %s" % line)
+ line = line[1:]
+ state.has_started = True
+
+ idx = 0
+ for idx, c in enumerate(line):
+ if state.in_escape:
+ if c != '\\' and c != '"':
+ raise MonotoneException("Invalid escape code: %s in %s\n" % (c, line))
+ state.value += c
+ state.in_escape = False
+ else:
+ if c == '\\':
+ state.in_escape = True
+ elif c == '"':
+ state.has_ended = True
+ break
+ else:
+ state.value += c
+
+ if state.has_ended:
+ return state.value, choose_consume, line[idx+1:]
+ else:
+ return (None,
+ lambda s: string_consume(s, state),
+ line[idx+1:])
+
+ consumer = choose_consume
+ current_stanza = []
+ for line in gen:
+ # if we're not in an actual consumer (which we shouldn't be, unless
+ # we're parsing some sort of multi-line token) and we have a blank
+ # line, it indicates the end of any current stanza
+ if (consumer == choose_consume) and (line == '' or line == '\n') and current_stanza:
+ yield current_stanza
+ current_stanza = []
+ continue
+
+ while line != '' and line != '\n':
+ new_token, consumer, line = consumer(line)
+ if new_token != None:
+ current_stanza.append(new_token)
+ if current_stanza:
+ yield current_stanza
+
+class Operations:
+ def __init__(self, runner_args):
+ self.standalone = apply(Standalone, runner_args)
+ self.automate = apply(Automate, runner_args)
+
+ def tags(self):
+ for stanza in basic_io_from_stream(self.automate.run('tags', [])):
+ if stanza[0] == 'tag':
+ branches = []
+ for branch in stanza[7:]:
+ branches.append(Branch(branch))
+ yield Tag(stanza[1], stanza[3], stanza[5], branches)
+
+ def branches(self):
+ for line in (t.strip() for t in self.automate.run('branches', [])):
+ if not line:
+ continue
+ yield apply(Branch, (line,))
+
+ def graph(self):
+ for line in self.automate.run('graph', []):
+ yield line
+
+ def parents(self, revision):
+ if revision != "":
+ for line in (t.strip() for t in self.automate.run('parents', [revision])):
+ if not line:
+ continue
+ yield apply(Revision, (line,))
+
+ def ancestry_difference(self, new_rev, old_revs):
+ """
+ new_rev a single new revision number
+ old_revs a list of revisions
+ """
+ if new_rev != "":
+ for line in (t.strip() for t in self.automate.run('ancestry_difference', [new_rev]+old_revs)):
+ if not line:
+ continue
+ yield apply(Revision, (line,))
+
+ def children(self, revision):
+ if revision != "":
+ for line in (t.strip() for t in self.automate.run('children', [revision])):
+ if not line:
+ continue
+ yield apply(Revision, (line,))
+
+ def toposort(self, revisions):
+ for line in (t.strip() for t in self.automate.run('toposort', revisions)):
+ if not line:
+ continue
+ yield apply(Revision, (line,))
+
+ def heads(self, branch):
+ for line in (t.strip() for t in self.automate.run('heads', [branch])):
+ if not line:
+ continue
+ yield apply(Revision, (line,))
+
+ def get_content_changed(self, revision, path):
+ for stanza in basic_io_from_stream(self.automate.run('get_content_changed', [revision, path])):
+ yield stanza
+
+ def get_revision(self, revision):
+ for stanza in basic_io_from_stream(self.automate.run('get_revision', [revision])):
+ yield stanza
+
+ def get_manifest_of(self, revision):
+ for stanza in basic_io_from_stream(self.automate.run('get_manifest_of', [revision])):
+ yield stanza
+
+ def get_file(self, fileid):
+ for stanza in self.automate.run('get_file', [fileid]):
+ yield stanza
+
+ def certs(self, revision):
+ for stanza in basic_io_from_stream(self.automate.run('certs', [revision])):
+ yield stanza
+
+ def diff(self, revision_from, revision_to, files=[]):
+ args = ['-r', revision_from, '-r', revision_to] + files
+ for line in self.standalone.run('diff', args):
+ yield line
+
+
diff --git a/contrib/mtn2git/mtn/utility.py b/contrib/mtn2git/mtn/utility.py
new file mode 100644
index 0000000000..c7345c5d1e
--- /dev/null
+++ b/contrib/mtn2git/mtn/utility.py
@@ -0,0 +1,100 @@
+
+import popen2
+import select
+import fcntl
+import os
+
+def set_nonblocking(fd):
+ fl = fcntl.fcntl(fd, fcntl.F_GETFL)
+ fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NDELAY)
+
+def run_command(command, timeout=None, to_child=None):
+ "returns a tuple of (was_timeout, exit_code, data_read)"
+ p = popen2.Popen3(command, capturestderr=True)
+ set_nonblocking(p.fromchild)
+ set_nonblocking(p.childerr)
+ fromchild_read = ""
+ childerr_read = ""
+ was_timeout = False
+ if to_child != None:
+ p.tochild.write(to_child)
+ p.tochild.close()
+ while 1:
+ ro, rw, re = select.select([p.fromchild], [], [p.childerr], timeout)
+ if not ro and not rw and not re:
+ was_timeout = True
+ break
+ if p.fromchild in ro:
+ recv = p.fromchild.read()
+ if recv == "": break
+ fromchild_read += recv
+ if p.childerr in re:
+ recv = p.childerr.read()
+ if recv == "": break
+ childerr_read += recv
+ if not was_timeout:
+ # check for any data we might have missed (due to a premature break)
+ # (if there isn't anything we just get a IOError, which we don't mind
+ try: fromchild_read += p.fromchild.read()
+ except IOError: pass
+ try: childerr_read += p.childerr.read()
+ except IOError: pass
+ p.fromchild.close()
+ # if there wasn't a timeout, the program should have exited; in which case we should wait() for it
+ # otherwise, it might be hung, so the parent should wait for it.
+ # (wrap in a try: except: just in case some other thread happens to wait() and grab ours; god wrapping
+ # python around UNIX is horrible sometimes)
+ exitcode = None
+ try:
+ if not was_timeout: exitcode = p.wait() >> 8
+ except: pass
+ return { 'run_command' : command,
+ 'timeout' : was_timeout,
+ 'exitcode' : exitcode,
+ 'fromchild' : fromchild_read,
+ 'childerr' : childerr_read }
+
+def iter_command(command, timeout=None):
+ p = popen2.Popen3(command, capturestderr=True)
+ set_nonblocking(p.fromchild)
+ set_nonblocking(p.childerr)
+ fromchild_read = ""
+ childerr_read = ""
+ was_timeout = False
+ while 1:
+ ro, rw, re = select.select([p.fromchild], [], [p.childerr], timeout)
+ if not ro and not rw and not re:
+ was_timeout = True
+ break
+ if p.fromchild in ro:
+ recv = p.fromchild.read()
+ if recv == "": break
+ fromchild_read += recv
+ while 1:
+ nl = fromchild_read.find('\n')
+ if nl == -1: break
+ yield fromchild_read[:nl]
+ fromchild_read = fromchild_read[nl+1:]
+ if p.childerr in re:
+ recv = p.childerr.read()
+ if recv == "": break
+ childerr_read += recv
+ if not was_timeout:
+ # check for any data we might have missed (due to a premature break)
+ # (if there isn't anything we just get a IOError, which we don't mind
+ try: fromchild_read += p.fromchild.read()
+ except IOError: pass
+ try: childerr_read += p.childerr.read()
+ except IOError: pass
+ p.fromchild.close()
+ p.tochild.close()
+ # yield anything left over
+ to_yield = fromchild_read.split('\n')
+ while len(to_yield): yield to_yield.pop()
+ # call wait()
+ try:
+ if not was_timeout: p.wait()
+ except: pass
+ if len(childerr_read): raise Exception("data on stderr (command is %s)" % command, childerr_read)
+ if was_timeout: raise Exception("command timeout")
+
diff --git a/contrib/mtn2git/mtn2git.py b/contrib/mtn2git/mtn2git.py
new file mode 100755
index 0000000000..cda4f39fca
--- /dev/null
+++ b/contrib/mtn2git/mtn2git.py
@@ -0,0 +1,610 @@
+#!/usr/bin/env python
+
+"""
+ Copyright (C) 2006, 2007 Holger Hans Peter Freyther
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+"""
+
+####
+# TODO:
+# -tag handling
+# -work with n-merges
+#
+# DISCUSSION:
+# -For some reason the get_revision information might be inaccurate
+# and I should consider just comparing the manifests.
+# I would use the manifests of the parents and consider all files deleted
+# and then remove every dir/file that is inside the new manifest from this
+# list.
+# Benefits:
+# - 1:1 match of the manifest regardles of get_revision information
+# - Renaming is handled by git anyway
+# Downsides:
+# - The size of the import will grow.
+#
+
+import mtn
+import os
+import sys
+import datetime
+import email.Utils
+
+import status
+
+
+def get_mark(revision):
+ """
+ Get a mark for a specific revision. If the revision is known the former
+ mark will be returned. Otherwise a new mark will be allocated and stored
+ to the mark file.
+ """
+ if revision in status.marks:
+ return status.marks[revision]
+ status.last_mark += 1
+ status.marks[revision] = status.last_mark
+ print >> status.mark_file, "%d: %s" % (status.last_mark, revision)
+ return status.last_mark
+
+def has_mark(revision):
+ return revision in status.marks
+
+
+def mark_empty_revision(revision, parent):
+ """Git does not like empty merges, just skip the revision"""
+ # TODO, FIXME, XXX, We might want to add a reset cmd here
+ print >> sys.stderr, "Found an empty revision, skipping '%s'" % revision
+ parent_mark = status.marks[parent]
+ status.marks[revision] = parent_mark
+
+ # There is another mtn revision that is using this mark!
+ if not parent_mark in status.same_revisions:
+ status.same_revisions[parent_mark] = []
+ status.same_revisions[parent_mark].append(revision)
+
+
+def get_branch_name(revision):
+ """
+ TODO for unnamed branches (e.g. as we lack the certs) we might want to follow
+ the parents until we end up at a item with a branch name and then use the last
+ item without a name...
+ """
+ if "branch" in revision:
+ branch = revision["branch"]
+ else:
+ #branch = "initial-%s" % revision["revision"]
+ branch = "mtn-unnamed-branch"
+ return branch
+
+def reset_git(ops, revision):
+ """
+ Find the name of the branch of this revision
+ """
+ branch = get_branch_name(revision)
+
+ cmd = []
+ cmd += ["reset refs/heads/%s" % branch]
+ cmd += ["from :%s" % get_mark(revision["revision"])]
+ cmd += [""]
+ print "\n".join(cmd)
+
+def filter_renamed(manifest, renamed):
+ """
+ If we base from a revision that has already done
+ the move, git-fast-import will complain that the file
+ has been already moved
+ """
+ if len(renamed) == 0:
+ return renamed
+
+ for line in manifest:
+ if line[0] == "file":
+ renamed = filter(lambda (to,from_,manifest): to != line[1], renamed)
+
+ return renamed
+
+def get_git_date(revision):
+ """
+ Convert the "date" cert of monotone to a time understandable by git. No timezone
+ conversions are done.
+ """
+ dt = datetime.datetime.strptime(revision["date"], "%Y-%m-%dT%H:%M:%S").strftime("%a, %d %b %Y %H:%M:%S +0000")
+ return dt
+
+def recursively_delete(ops, manifest, revision, dir_name, to_delete):
+ """
+ Recursively delete all files that dir_name inside the name
+ """
+ for line in manifest:
+ if line[0] == "dir" or line[0] == "file":
+ if line[1].startswith(dir_name):
+ print >> sys.stderr, "Deleting '%s'" % line[1]
+ to_delete.add((line[1], revision))
+ elif line[0] in ["format_version"]:
+ assert(line[1] == "1")
+ else:
+ print >> sys.stderr, line[0]
+ assert(False)
+
+ return to_delete
+
+def recursively_rename(ops, manifest, revision, old_name, new_name, to_add_dirs, to_add_files, to_remove_items, files_deleted, files_sticky):
+ """
+ mtn has a rename command and can rename entrie directories. For git we will have to do the recursive renaming
+ ourselves. Basicly we will get all files and replace old_name with new_name but only:
+
+ If the file of the old_manifest is not in our to be deleted list
+ """
+ old_dir = old_name + "/"
+ for line in manifest:
+ if line[1].startswith(old_dir) or line[1] == old_name:
+ already_handled = False
+ for (deleted,_) in files_deleted:
+ if line[1] == deleted:
+ already_handled = True
+ break
+
+ # Don't rename files that should be in the same directory
+ if line[1] in files_sticky:
+ already_handled = True
+
+ if already_handled:
+ pass
+ elif line[0] == "file":
+ print >> sys.stderr, "Will add '%s' old: '%s' new: '%s' => result: '%s'" % (line[1], old_name, new_name, line[1].replace(old_name, new_name, 1))
+ to_add_files.add((line[1].replace(old_name, new_name, 1), None, revision))
+ elif line[0] == "dir":
+ to_add_dirs.add((line[1].replace(old_name, new_name, 1), revision))
+ elif line[0] in ["format_version"]:
+ assert(line[1] == "1")
+ else:
+ print >> sys.stderr, line[0]
+ assert(False)
+
+ return (to_add_files, to_add_dirs)
+
+#
+# We need to recursively rename the directories. Now the difficult part is to undo certain operations.
+#
+# e.g we rename the whole dir and then rename a file back. We could revive a directory that was marked
+# for deletion.
+#
+# rename "weird/two/three"
+# to "unweird/four"
+#
+# rename "weird/two/three/four"
+# to "weird/two/three"
+#
+# Here we would schedule weird/two/three for deletion but then revive it again. So three does not
+# get copied to unweird/four/three
+# """
+def recursively_rename_directories(ops, manifests, rename_commands, files_deleted, files_moved_sticky):
+ to_add_directories = set()
+ to_add_files = set()
+ to_remove_items = set()
+
+ for (old_name, new_name, old_revision) in rename_commands:
+ # Check if we have the above case and rename a more specific directory
+ # and then we will alter the result...
+ inner_rename = False
+ for (other_old_name, other_new_name, other_rev) in rename_commands:
+ if old_name.startswith(other_old_name + "/") and other_old_name != old_name:
+ inner_rename = True
+ print >> sys.stderr, "Inner rename detected", old_name, other_old_name
+ # Fixup the renaming
+ def rename(filename, filerev, rev, would_be_new_name):
+ if filename.startswith(would_be_new_name + "/"):
+ return filename.replace(would_be_new_name, new_name, 1), filerev, rev
+ return filename, filerev, rev
+
+ would_be_new_name = other_new_name + "/" + old_name[len(other_old_name)+1:]
+ to_remove_items = set(filter(lambda (item,_): item != new_name, to_remove_items))
+ to_add_directories = set(filter(lambda (item,_): item != would_be_new_name, to_add_directories))
+ to_add_directories.add((new_name, old_revision))
+ to_add_files = set(map(lambda (fn, fr, r): rename(fn, fr, r, would_be_new_name), to_add_files))
+
+ if not inner_rename:
+ to_remove_items.add((old_name, old_revision))
+ recursively_delete(ops, manifests[old_revision], old_revision, old_name + "/", to_remove_items)
+ recursively_rename(ops, manifests[old_revision], old_revision, old_name, new_name, to_add_directories, to_add_files, to_remove_items, files_deleted, files_moved_sticky)
+
+ return (to_add_directories, to_add_files, to_remove_items)
+
+
+def build_tree(manifest):
+ dirs = {}
+ files = {}
+ for line in manifest:
+ if line[0] == "file":
+ files[line[1]] = (line[3],line[4:])
+ elif line[0] == "dir":
+ dirs[line[1]] = 1
+ elif line[0] != "format_version":
+ print >> sys.stderr, line[0]
+ assert(False)
+ return (dirs,files)
+
+def compare_with_manifest(all_added, all_modified, all_deleted, new_manifest, old_manifests):
+ """
+ Sanity check that the difference between the old and the new manifest is the one
+ we have in all_added, all_modified, all_deleted
+ """
+ old_trees = {}
+ really_added = {}
+ really_modified = {}
+ really_removed = {}
+
+ current_dirs, current_files = build_tree(new_manifest)
+
+ for parent in old_manifests.keys():
+ old_trees[parent] = build_tree(old_manifests[parent])
+
+ print >> sys.stderr, len(old_manifests)
+
+def fast_import(ops, revision):
+ """Import a revision into git using git-fast-import.
+
+ First convert the revision to something git-fast-import
+ can understand
+ """
+ assert("revision" in revision)
+ assert("author" in revision)
+ assert("committer" in revision)
+ assert("parent" in revision)
+
+
+ branch = get_branch_name(revision)
+
+ # Okay: We sometimes have merged where the old manifest is the new one
+ # I have no idea how this can happen but there are at least two examples in the
+ # net.venge.monotone history.
+ # The problem ist git-fast-import will not let us create the same manifest again.
+ # So if we are in a merge, propagation and the old manifest is the new one we will
+ # do a git-reset.
+ # Examples in the mtn history: 6dc36d2cba722f500c06f33e225367461059d90e, dc661f0c25ee96a5a5cf5b5b60deafdf8ccaf286
+ # and 7b8331681bf77cd8329662dbffed0311765e7547, 13b1a1e617a362c5735002937fead98d788737f7
+ # aa05aa9171bac92766b769bbb703287f53e08693 is a merge of the same manifest...
+ # so we will just go with one of the two revisions..
+ # We will have the same manifest if we propagate something from one branch to another. git does
+ # not have a special revision showing that copy but will only change the head.
+ # We will do the same and reset the branch to this revision.
+ for parent in revision["parent"]:
+ manifest_version = parse_revision(ops, parent)["manifest"]
+ if manifest_version == revision["manifest"]:
+ mark_empty_revision(revision["revision"], parent)
+ reset_git(ops, revision)
+ return
+
+ # Use the manifest to find dirs and files
+ manifest = [line for line in ops.get_manifest_of(revision["revision"])]
+ manifests = {}
+ dirs = {}
+ for parent in revision["parent"]:
+ manifests[parent] = [line for line in ops.get_manifest_of(parent)]
+ for line in manifests[parent]:
+ if line[0] == "dir":
+ if not parent in dirs:
+ dirs[parent] = {}
+ dirs[parent][line[1]] = 1
+
+ # We can not just change the mode of a file but we need to modifiy the whole file. We
+ # will simply add it to the modified list and ask to retrieve the status from the manifest
+ for (file, attribute, value, rev) in revision["set_attributes"]:
+ if attribute == "mtn:execute":
+ revision["modified"].append((file, None, rev))
+ for (file, attribute, rev) in revision["clear_attributes"]:
+ if attribute == "mtn:execute":
+ revision["modified"].append((file, None, rev))
+
+
+
+ cmd = []
+ cmd += ["commit refs/heads/%s" % branch]
+ cmd += ["mark :%s" % get_mark(revision["revision"])]
+ cmd += ["author <%s> %s" % (revision["author"], get_git_date(revision))]
+ cmd += ["committer <%s> %s" % (revision["committer"], get_git_date(revision))]
+ cmd += ["data %d" % len(revision["changelog"])]
+ cmd += ["%s" % revision["changelog"]]
+
+ # Emulation for renaming. We will split them into two lists
+ file_renamed_del = set()
+ file_renamed_new = set()
+ file_moved_sticky = set()
+
+ if len(revision["parent"]) != 0:
+ cmd += ["from :%s" % get_mark(revision["parent"][0])]
+ renamed = revision["renamed"]
+
+ to_rename_directories = []
+ for (new_name, old_name, old_revision) in renamed:
+ # 24cba5923360fef7c5cc81d51000e30b90355eb9 is a rev where src == dest but the
+ # directory got renamed, so this means this file got added to the new directory
+ # TODO, XXX, FIXME check if this can be done for directories as well
+ if new_name == old_name and not old_name in dirs[old_revision]:
+ print >> sys.stderr, "Bogus rename in %s (%s, %s)?" % (revision["revision"], new_name, old_name)
+ file_moved_sticky.add(old_name)
+
+ # Check if the old_name was a directory in the old manifest
+ # If we rename a directory we will need to recursively remove and recursively
+ # add...
+ # Add the '/' otherwise we might rename the wrong directory which shares the
+ # same prefix.
+ # fca159c5c00ae4158c289f5aabce995378d4e41b is quite funny. It renames a directory
+ # and then renames another directory within the renamed one and in the worse case
+ # we will revive a deleted directory, file...
+ elif old_name in dirs[old_revision]:
+ print >> sys.stderr, "Detected directory rename '%s' => '%s'" % (old_name, new_name)
+ assert(old_revision in manifests)
+ to_rename_directories.append((old_name, new_name, old_revision))
+ else:
+ print >> sys.stderr, "Renaming %s => %s" % (old_name, new_name)
+ file_renamed_new.add((new_name, None, revision["revision"]))
+ file_renamed_del.add((old_name, old_revision))
+
+ # The first parent is our from.
+ for parent in revision["parent"][1:]:
+ cmd += ["merge :%s" % get_mark(parent)]
+
+ # Do the renaming now
+ (renamed_dirs, renamed_new, renamed_old) = recursively_rename_directories(ops, manifests, to_rename_directories, file_renamed_del.union(set(revision["removed"])), file_moved_sticky)
+
+ # Sanity check, don't remove anything we modify
+ all_added = set(revision["added_dirs"]).union(renamed_dirs)
+ all_modifications = set(revision["modified"]).union(set(revision["added_files"])).union(renamed_new).union(file_renamed_new)
+ all_deleted = set(revision["removed"]).union(renamed_old).union(file_renamed_del)
+ all_deleted_new = all_deleted
+
+ # Check if we delete and add at the same time
+ for (deleted,rev) in all_deleted:
+ for (added,_) in all_added:
+ if added == deleted:
+ print >> sys.stderr, "Added and Deleted", added, deleted
+ all_deleted_new = set(filter(lambda (dele,_): dele != added, all_deleted_new))
+ assert((added,rev) not in all_deleted_new)
+
+ for (modified,_,_) in all_modifications:
+ if modified == deleted:
+ print >> sys.stderr, "Modified and Deleted", modified, deleted
+ all_deleted_new = set(filter(lambda (dele,_): dele != modified, all_deleted_new))
+ assert((modified,rev) not in all_deleted_new)
+
+ # Filtered list of to be deleted items
+ all_deleted = all_deleted_new
+
+ # Check if we delete but the manifest has a file like this
+ for line in manifest:
+ if line[0] == "dir" or line[0] == "file":
+ for (deleted,rev) in all_deleted:
+ if line[1] == deleted:
+ # 91da98265a39c93946e00adf5d7bf92b341de847 of mtn has a delete + rename
+ print >> sys.stderr, "Trying to delete a file which is in the new manifest", line[1], deleted
+ assert(False)
+
+ compare_with_manifest(all_added, all_modifications, all_deleted, manifest, manifests)
+
+ for (dir_name, rev) in all_added:
+ cmd += ["M 644 inline %s" % os.path.join(dir_name, ".mtn2git_empty")]
+ cmd += ["data <<EOF"]
+ cmd += ["EOF"]
+ cmd += [""]
+
+ for (file_name, file_revision, rev) in all_modifications:
+ (mode, file) = get_file_and_mode(ops, manifest, file_name, file_revision, revision["revision"])
+ cmd += ["M %d inline %s" % (mode, file_name)]
+ cmd += ["data %d" % len(file)]
+ cmd += ["%s" % file]
+
+ for (path, rev) in all_deleted:
+ assert(rev in dirs)
+ if path in dirs[rev]:
+ cmd += ["D %s" % os.path.join(path, ".mtn2git_empty")]
+ else:
+ cmd += ["D %s" % path]
+
+ cmd += [""]
+ print "\n".join(cmd)
+
+
+def is_trusted(operations, revision):
+ for cert in operations.certs(revision):
+ if cert[0] != 'key' or cert[3] != 'ok' or cert[8] != 'trust' or cert[9] != 'trusted':
+ print >> sys.stderr, "Cert untrusted?, this must be bad", cert
+ return False
+ return True
+
+def get_file_and_mode(operations, manifest, file_name, _file_revision, rev = None):
+ mode = 644
+
+ file_revision = None
+ for line in manifest:
+ if line[0] == "file" and line[1] == file_name:
+ assert(line[1] == file_name)
+ assert(line[2] == "content")
+
+ if _file_revision:
+ assert(line[3] == _file_revision)
+ file_revision = line[3]
+
+ attributes = line[4:]
+ assert(len(attributes) % 3 == 0)
+ if len(attributes) >= 3:
+ for i in range(0, len(attributes)%3+1):
+ if attributes[i] == "attr" and attributes[i+1] == "mtn:execute" and attributes[i+2] == "true":
+ mode = 755
+ break
+
+ assert(file_revision)
+ file = "".join([file for file in operations.get_file(file_revision)])
+ return (mode, file)
+
+ print >> sys.stderr, file_name, rev
+ assert(False)
+
+
+def parse_revision(operations, revision):
+ """
+ Parse a revision as of mtn automate get_revision
+
+ Return a tuple with the current version, a list of parents,
+ a list of operations and their revision
+ """
+ if not is_trusted(operations, revision):
+ raise Exception("Revision %s is not trusted!" % revision)
+
+ # The order of certain operations, e.g rename matter so don't use a set
+ revision_description = {}
+ revision_description["revision"] = revision
+ revision_description["added_dirs"] = []
+ revision_description["added_files"] = []
+ revision_description["removed"] = []
+ revision_description["modified"] = []
+ revision_description["renamed"] = []
+ revision_description["set_attributes"] = []
+ revision_description["clear_attributes"] = []
+
+ old_rev = None
+
+ for line in operations.get_revision(revision):
+ if line[0] == "format_version":
+ assert(line[1] == "1")
+ elif line[0] == "old_revision":
+ if not "parent" in revision_description:
+ revision_description["parent"] = []
+ if len(line[1]) != 0:
+ revision_description["parent"].append(line[1])
+ old_rev = line[1]
+ elif line[0] == "new_manifest":
+ revision_description["manifest"] = line[1]
+ elif line[0] == "rename":
+ revision_description["renamed"].append((line[3], line[1], old_rev))
+ elif line[0] == "patch":
+ revision_description["modified"].append((line[1], line[5], old_rev))
+ elif line[0] == "delete":
+ revision_description["removed"].append((line[1], old_rev))
+ elif line[0] == "add_dir":
+ revision_description["added_dirs"].append((line[1], old_rev))
+ elif line[0] == "add_file":
+ revision_description["added_files"].append((line[1], line[3], old_rev))
+ elif line[0] == "clear":
+ revision_description["clear_attributes"].append((line[1], line[3], old_rev))
+ elif line[0] == "set":
+ revision_description["set_attributes"].append((line[1], line[3], line[5], old_rev))
+ else:
+ print >> sys.stderr, line
+ assert(False)
+
+ for cert in operations.certs(revision):
+ # Known cert names used by mtn, we can ignore them as they can't be converted to git
+ if cert[5] in ["suspend", "testresult", "file-comment", "comment", "release-candidate"]:
+ pass
+ elif cert[5] in ["author", "changelog", "date", "branch", "tag"]:
+ revision_description[cert[5]] = cert[7]
+ if cert[5] == "author":
+ revision_description["committer"] = cert[1]
+ else:
+ print >> sys.stderr, "Unknown Cert: Ignoring", cert[5], cert[7]
+ assert(False)
+
+ return revision_description
+
+
+def tests(ops, revs):
+ """Load a bunch of revisions and exit"""
+ for rev in revs:
+ print >> sys.stderr, rev
+ fast_import(ops, parse_revision(ops, rev))
+
+ sys.exit()
+
+def main(mtn_cli, db, rev):
+ if not db:
+ print >> sys.stderr, "You need to specifiy a monotone db"
+ sys.exit()
+
+ ops = mtn.Operations([mtn_cli, db])
+
+ # Double rename in mtn
+ #tests(ops, ["fca159c5c00ae4158c289f5aabce995378d4e41b"])
+
+ # Rename and remove in OE
+ #tests(ops, ["74db43a4ad2bccd5f2fd59339e4ece0092f8dcb0"])
+
+ # Rename + Dele
+ #tests(ops, ["91da98265a39c93946e00adf5d7bf92b341de847"])
+
+ # Issue with renaming in OE
+ #tests(ops, ["c81294b86c62ee21791776732f72f4646f402445"])
+
+ # Unterminated inner renames
+ #tests(ops, ["d813a779ef7157f88dade0b8ccef32f28ff34a6e", "4d027b6bcd69e7eb5b64b2e720c9953d5378d845", "af5ffd789f2852e635aa4af88b56a893b7a83a79"])
+
+ # Broken rename in OE. double replacing of the directory command
+ #tests(ops, ["11f85aab185581dcbff7dce29e44f7c1f0572a27"])
+
+ if rev:
+ tests(ops, [rev])
+ sys.exit()
+
+ branches = [branch.name for branch in ops.branches()]
+ ops.automate.stop()
+
+ all_revs = []
+ for branch in branches:
+ heads = [head for head in ops.heads(branch)]
+ if branch in status.former_heads:
+ old_heads = status.former_heads[branch]
+ else:
+ old_heads = []
+
+ for head in heads:
+ all_revs += ops.ancestry_difference(head, old_heads)
+ status.former_heads[branch] = heads
+
+ sorted_revs = [rev for rev in ops.toposort(all_revs)]
+ for rev in sorted_revs:
+ if has_mark(rev):
+ print >> sys.stderr, "Already having commit '%s'" % rev
+ else:
+ print >> sys.stderr, "Going to import revision ", rev
+ fast_import(ops, parse_revision(ops, rev))
+
+
+if __name__ == "__main__":
+ import optparse
+ parser = optparse.OptionParser()
+ parser.add_option("-d", "--db", dest="database",
+ help="The monotone database to use")
+ parser.add_option("-m", "--marks", dest="marks", default="mtn2git-marks",
+ help="The marks allocated by the mtn2git command")
+ parser.add_option("-t", "--mtn", dest="mtn", default="mtn",
+ help="The name of the mtn command to use")
+ parser.add_option("-s", "--status", dest="status", default="mtn2git.status.v2",
+ help="The status file as used by %prog")
+ parser.add_option("-r", "--revision", dest="rev", default=None,
+ help="Import a single revision to help debugging.")
+
+ (options,_) = parser.parse_args(sys.argv)
+ status.mark_file = file(options.marks, "a")
+
+ try:
+ status.load(options.status)
+ except IOError:
+ print >> sys.stderr, "Failed to open the status file"
+ main(options.mtn, options.database, options.rev)
+ status.store(options.status)
diff --git a/contrib/mtn2git/status.py b/contrib/mtn2git/status.py
new file mode 100644
index 0000000000..47d06b51fd
--- /dev/null
+++ b/contrib/mtn2git/status.py
@@ -0,0 +1,47 @@
+"""
+ Copyright (C) 2006, 2007 Holger Hans Peter Freyther
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+"""
+
+import pickle
+
+marks = {}
+last_mark = 0
+mark_file = None
+former_heads = {}
+same_revisions = {}
+
+def load(status_name):
+ global marks, last_mark, mark_file, former_heads, same_revisions
+ file = open(status_name, "rb")
+ marks = pickle.load(file)
+ last_mark = pickle.load(file)
+ former_heads = pickle.load(file)
+ same_revisions = pickle.load(file)
+ file.close()
+
+def store(status_name):
+ global marks, last_mark, mark_file, former_heads, same_revisions
+ file = open(status_name, "wb")
+ pickle.dump(marks, file)
+ pickle.dump(last_mark, file)
+ pickle.dump(former_heads, file)
+ pickle.dump(same_revisions, file)
+ file.close()
diff --git a/packages/linux/compulab-pxa270-2.6.22/.mtn2git_empty b/contrib/source-checker/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/linux/compulab-pxa270-2.6.22/.mtn2git_empty
+++ b/contrib/source-checker/.mtn2git_empty
diff --git a/contrib/source-checker/oe-source-checker.py b/contrib/source-checker/oe-source-checker.py
new file mode 100644
index 0000000000..9ac147b00b
--- /dev/null
+++ b/contrib/source-checker/oe-source-checker.py
@@ -0,0 +1,113 @@
+#!/usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+
+# Copyright (C) 2007 OpenedHand
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+#
+# OpenEmbedded source checksums checker
+#
+# This script parse conf/checksums.ini and check does files contained in
+# source archive are the same as the one used to generate checksums.
+#
+# Run it:
+#
+# oe-source-checker.py path-to-conf/checksums.ini path-to-sources
+#
+#
+# How to deal with output:
+#
+# 1. download each failed entry
+# 2. check md5 and sha256 of file
+# 3. correct checksums.ini if needed
+# 4. share changes
+#
+
+
+import sys
+
+if len(sys.argv) < 3:
+ print """
+ OpenEmbedded source checker script require two arguments:
+
+ 1. location of conf/checksums.ini
+ 2. path to DL_DIR (without "/" at the end)
+ """
+ sys.exit(0)
+
+import ConfigParser, os, itertools
+
+checksums_parser = ConfigParser.ConfigParser()
+checksums_parser.read(sys.argv[1])
+
+parsespin = itertools.cycle( r'|/-\\' )
+
+item = 1;
+files_total = len(checksums_parser.sections())
+files_checked = 0
+files_good = 0
+files_wrong = []
+
+for source in checksums_parser.sections():
+ archive = source.split("/")[-1]
+ localpath = os.path.join(sys.argv[2], archive)
+ md5 = checksums_parser.get(source, "md5")
+ sha = checksums_parser.get(source, "sha256")
+
+ if os.isatty(sys.stdout.fileno()):
+ sys.stdout.write("\rChecking files: %s (%04d/%04d) [%2d %%]" % ( parsespin.next(), item, files_total, item*100/files_total ) )
+ sys.stdout.flush()
+ item += 1
+
+ try:
+ os.stat(localpath)
+ except:
+ continue
+
+ files_checked += 1
+ file_ok = True
+
+ try:
+ md5pipe = os.popen('md5sum ' + localpath)
+ md5data = (md5pipe.readline().split() or [ "" ])[0]
+ md5pipe.close()
+
+ if md5 != md5data:
+ file_ok = False
+
+ shapipe = os.popen("oe_sha256sum " + localpath)
+ shadata = (shapipe.readline().split() or [ "" ])[0]
+ shapipe.close()
+
+ if shadata != "" and sha != shadata:
+ file_ok = False
+
+ if file_ok:
+ files_good += 1
+ else:
+ files_wrong += [ [md5, md5data, sha, shadata, archive, source] ]
+ except:
+ pass
+
+print "\nChecked %d files. %d was OK and %d had wrong checksums." % (files_checked, files_good, len(files_wrong))
+
+if len(files_wrong) > 0:
+
+ print "\n"
+
+ for wrong_file in files_wrong:
+ print "%s [%s] is wrong" % ( wrong_file[4], wrong_file[5])
+ print "md5: %s instead of %s" % (wrong_file[1], wrong_file[0])
+ print "sha: %s instead of %s" % (wrong_file[3], wrong_file[2])
diff --git a/packages/alsa/alsa-state.bb b/packages/alsa/alsa-state.bb
index 1bac841a6e..d51df961a1 100644
--- a/packages/alsa/alsa-state.bb
+++ b/packages/alsa/alsa-state.bb
@@ -8,7 +8,7 @@ DESCRIPTION = "Default ALSA configuration"
LICENSE = "GPL"
RRECOMMENDS_alsa-state = "alsa-states"
PV = "0.1.0"
-PR = "r3"
+PR = "r5"
SRC_URI = " \
file://asoundrc \
@@ -21,6 +21,7 @@ SRC_URI_append_fic-gta01 = " \
file://gsmbluetooth.state \
file://gsmhandset.state \
file://gsmheadset.state \
+ file://gsmspeakerout.state \
file://stereoout.state"
inherit update-rc.d
diff --git a/packages/alsa/alsa-state/fic-gta01/gsmspeakerout.state b/packages/alsa/alsa-state/fic-gta01/gsmspeakerout.state
new file mode 100644
index 0000000000..950f7e1379
--- /dev/null
+++ b/packages/alsa/alsa-state/fic-gta01/gsmspeakerout.state
@@ -0,0 +1,900 @@
+state.neo1973 {
+ control.1 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 2
+ comment.range '0 - 255'
+ iface MIXER
+ name 'PCM Volume'
+ value.0 255
+ value.1 255
+ }
+ control.2 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 2
+ comment.range '0 - 255'
+ iface MIXER
+ name 'ADC Capture Volume'
+ value.0 0
+ value.1 0
+ }
+ control.3 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 2
+ comment.range '0 - 127'
+ iface MIXER
+ name 'Headphone Playback Volume'
+ value.0 121
+ value.1 121
+ }
+ control.4 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 2
+ comment.range '0 - 127'
+ iface MIXER
+ name 'Speaker Playback Volume'
+ value.0 121
+ value.1 121
+ }
+ control.5 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 127'
+ iface MIXER
+ name 'Mono Playback Volume'
+ value 111
+ }
+ control.6 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 2
+ comment.range '0 - 7'
+ iface MIXER
+ name 'Bypass Playback Volume'
+ value.0 5
+ value.1 5
+ }
+ control.7 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 2
+ comment.range '0 - 7'
+ iface MIXER
+ name 'Sidetone Playback Volume'
+ value.0 1
+ value.1 1
+ }
+ control.8 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 2
+ comment.range '0 - 7'
+ iface MIXER
+ name 'Voice Playback Volume'
+ value.0 2
+ value.1 2
+ }
+ control.9 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 2
+ iface MIXER
+ name 'Headphone Playback ZC Switch'
+ value.0 false
+ value.1 false
+ }
+ control.10 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 2
+ iface MIXER
+ name 'Speaker Playback ZC Switch'
+ value.0 false
+ value.1 false
+ }
+ control.11 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 7'
+ iface MIXER
+ name 'Mono Bypass Playback Volume'
+ value 5
+ }
+ control.12 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 7'
+ iface MIXER
+ name 'Mono Sidetone Playback Volume'
+ value 6
+ }
+ control.13 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 7'
+ iface MIXER
+ name 'Mono Voice Playback Volume'
+ value 6
+ }
+ control.14 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Mono Playback ZC Switch'
+ value false
+ }
+ control.15 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'Linear Control'
+ comment.item.1 'Adaptive Boost'
+ iface MIXER
+ name 'Bass Boost'
+ value 'Linear Control'
+ }
+ control.16 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 '130Hz @ 48kHz'
+ comment.item.1 '200Hz @ 48kHz'
+ comment.item.2 '100Hz @ 16kHz'
+ comment.item.3 '400Hz @ 48kHz'
+ comment.item.4 '100Hz @ 8kHz'
+ comment.item.5 '200Hz @ 8kHz'
+ iface MIXER
+ name 'Bass Filter'
+ value '130Hz @ 48kHz'
+ }
+ control.17 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 15'
+ iface MIXER
+ name 'Bass Volume'
+ value 0
+ }
+ control.18 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 15'
+ iface MIXER
+ name 'Treble Volume'
+ value 7
+ }
+ control.19 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 '8kHz'
+ comment.item.1 '4kHz'
+ iface MIXER
+ name 'Treble Cut-off'
+ value '8kHz'
+ }
+ control.20 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 2
+ comment.range '0 - 7'
+ iface MIXER
+ name 'Sidetone Capture Volume'
+ value.0 0
+ value.1 0
+ }
+ control.21 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 7'
+ iface MIXER
+ name 'Voice Sidetone Capture Volume'
+ value 0
+ }
+ control.22 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 2
+ comment.range '0 - 63'
+ iface MIXER
+ name 'Capture Volume'
+ value.0 0
+ value.1 0
+ }
+ control.23 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 2
+ iface MIXER
+ name 'Capture ZC Switch'
+ value.0 false
+ value.1 false
+ }
+ control.24 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 2
+ iface MIXER
+ name 'Capture Switch'
+ value.0 false
+ value.1 false
+ }
+ control.25 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 '3.4Hz @ 48kHz'
+ comment.item.1 '82Hz @ 16k'
+ comment.item.2 '82Hz @ 8kHz'
+ comment.item.3 '170Hz @ 8kHz'
+ iface MIXER
+ name 'Capture Filter Select'
+ value '3.4Hz @ 48kHz'
+ }
+ control.26 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 HiFi
+ comment.item.1 Voice
+ iface MIXER
+ name 'Capture Filter Cut-off'
+ value Voice
+ }
+ control.27 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Capture Filter Switch'
+ value true
+ }
+ control.28 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 7'
+ iface MIXER
+ name 'ALC Capture Target Volume'
+ value 5
+ }
+ control.29 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 7'
+ iface MIXER
+ name 'ALC Capture Max Volume'
+ value 7
+ }
+ control.30 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 Off
+ comment.item.1 Right
+ comment.item.2 Left
+ comment.item.3 Stereo
+ iface MIXER
+ name 'ALC Capture Function'
+ value Off
+ }
+ control.31 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'ALC Capture ZC Switch'
+ value false
+ }
+ control.32 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 15'
+ iface MIXER
+ name 'ALC Capture Hold Time'
+ value 15
+ }
+ control.33 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 15'
+ iface MIXER
+ name 'ALC Capture Decay Time'
+ value 12
+ }
+ control.34 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 15'
+ iface MIXER
+ name 'ALC Capture Attack Time'
+ value 5
+ }
+ control.35 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 31'
+ iface MIXER
+ name 'ALC Capture NG Threshold'
+ value 0
+ }
+ control.36 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'Constant PGA Gain'
+ comment.item.1 'Mute ADC Output'
+ iface MIXER
+ name 'ALC Capture NG Type'
+ value 'Constant PGA Gain'
+ }
+ control.37 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'ALC Capture NG Switch'
+ value false
+ }
+ control.38 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 Capture
+ comment.item.1 Playback
+ iface MIXER
+ name '3D Function'
+ value Capture
+ }
+ control.39 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 '2.2kHz'
+ comment.item.1 '1.5kHz'
+ iface MIXER
+ name '3D Upper Cut-off'
+ value '2.2kHz'
+ }
+ control.40 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 '200Hz'
+ comment.item.1 '500Hz'
+ iface MIXER
+ name '3D Lower Cut-off'
+ value '200Hz'
+ }
+ control.41 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 15'
+ iface MIXER
+ name '3D Volume'
+ value 0
+ }
+ control.42 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name '3D Switch'
+ value false
+ }
+ control.43 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Capture 6dB Attenuate'
+ value false
+ }
+ control.44 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Playback 6dB Attenuate'
+ value false
+ }
+ control.45 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 None
+ comment.item.1 '32kHz'
+ comment.item.2 '44.1kHz'
+ comment.item.3 '48kHz'
+ iface MIXER
+ name De-emphasis
+ value None
+ }
+ control.46 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 Stereo
+ comment.item.1 Left
+ comment.item.2 Right
+ comment.item.3 Mono
+ iface MIXER
+ name 'Playback Mono Mix'
+ value Stereo
+ }
+ control.47 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'Non Inverted'
+ comment.item.1 Inverted
+ iface MIXER
+ name 'Playback Phase'
+ value Inverted
+ }
+ control.48 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 3'
+ iface MIXER
+ name 'Mic2 Capture Volume'
+ value 0
+ }
+ control.49 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 3'
+ iface MIXER
+ name 'Mic1 Capture Volume'
+ value 0
+ }
+ control.50 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'DAI 0'
+ comment.item.1 'DAI 1'
+ comment.item.2 'DAI 2'
+ comment.item.3 'DAI 3'
+ iface MIXER
+ name 'DAI Mode'
+ value 'DAI 0'
+ }
+ control.51 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 Stereo
+ comment.item.1 'Left ADC'
+ comment.item.2 'Right ADC'
+ comment.item.3 'Channel Swap'
+ iface MIXER
+ name 'ADC Data Select'
+ value Stereo
+ }
+ control.52 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'Mic 1'
+ comment.item.1 'Mic 2'
+ comment.item.2 'Mic 3'
+ iface MIXER
+ name 'Mic Selection Mux'
+ value 'Mic 1'
+ }
+ control.53 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'RXP - RXN'
+ comment.item.1 'RXP + RXN'
+ comment.item.2 RXP
+ comment.item.3 RXN
+ iface MIXER
+ name 'Rx Mixer'
+ value 'RXP - RXN'
+ }
+ control.54 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'Line 1 + 2'
+ comment.item.1 'Line 1 - 2'
+ comment.item.2 'Line 1'
+ comment.item.3 'Line 2'
+ iface MIXER
+ name 'Line Mixer'
+ value 'Line 1 + 2'
+ }
+ control.55 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'Line Mix'
+ comment.item.1 'Rx Mix'
+ iface MIXER
+ name 'Line Mono Mux'
+ value 'Line Mix'
+ }
+ control.56 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'Line 2'
+ comment.item.1 'Rx Mix'
+ iface MIXER
+ name 'Line Right Mux'
+ value 'Rx Mix'
+ }
+ control.57 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'Line 1'
+ comment.item.1 'Rx Mix'
+ iface MIXER
+ name 'Line Left Mux'
+ value 'Rx Mix'
+ }
+ control.58 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'ALC Mixer Line Capture Switch'
+ value false
+ }
+ control.59 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'ALC Mixer Mic2 Capture Switch'
+ value false
+ }
+ control.60 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'ALC Mixer Mic1 Capture Switch'
+ value false
+ }
+ control.61 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'ALC Mixer Rx Capture Switch'
+ value false
+ }
+ control.62 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'Left PGA'
+ comment.item.1 'Mic 1'
+ comment.item.2 'Mic 2'
+ comment.item.3 'Right PGA'
+ iface MIXER
+ name 'Mic Sidetone Mux'
+ value 'Mic 1'
+ }
+ control.63 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 PGA
+ comment.item.1 'Line or RXP-RXN'
+ comment.item.2 Sidetone
+ iface MIXER
+ name 'Capture Right Mux'
+ value PGA
+ }
+ control.64 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 PGA
+ comment.item.1 'Line or RXP-RXN'
+ comment.item.2 Line
+ iface MIXER
+ name 'Capture Left Mux'
+ value PGA
+ }
+ control.65 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 Stereo
+ comment.item.1 'Analogue Mix Left'
+ comment.item.2 'Analogue Mix Right'
+ comment.item.3 'Digital Mono Mix'
+ iface MIXER
+ name 'Capture Right Mixer'
+ value Stereo
+ }
+ control.66 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 Stereo
+ comment.item.1 'Analogue Mix Left'
+ comment.item.2 'Analogue Mix Right'
+ comment.item.3 'Digital Mono Mix'
+ iface MIXER
+ name 'Capture Left Mixer'
+ value Stereo
+ }
+ control.67 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Playback Mixer Voice Capture Sw'
+ value false
+ }
+ control.68 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Playback Mixer Left Capture Swi'
+ value false
+ }
+ control.69 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Playback Mixer Right Capture Sw'
+ value false
+ }
+ control.70 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 VREF
+ comment.item.1 'Capture ST'
+ comment.item.2 LOUT2
+ iface MIXER
+ name 'Out4 Mux'
+ value VREF
+ }
+ control.71 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 VREF
+ comment.item.1 ROUT2
+ comment.item.2 'Left + Right'
+ iface MIXER
+ name 'Out3 Mux'
+ value VREF
+ }
+ control.72 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 'Inverted Mono 1'
+ comment.item.1 Left
+ comment.item.2 Right
+ comment.item.3 'Left + Right'
+ iface MIXER
+ name 'Mono 2 Mux'
+ value 'Inverted Mono 1'
+ }
+ control.73 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Mono Mixer Left Playback Switch'
+ value false
+ }
+ control.74 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Mono Mixer Right Playback Switc'
+ value false
+ }
+ control.75 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Mono Mixer Voice Playback Switc'
+ value false
+ }
+ control.76 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Mono Mixer Sidetone Playback Sw'
+ value true
+ }
+ control.77 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Mono Mixer Bypass Playback Swit'
+ value false
+ }
+ control.78 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Right Mixer Voice Playback Swit'
+ value false
+ }
+ control.79 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Right Mixer Sidetone Playback S'
+ value false
+ }
+ control.80 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Right Mixer Right Playback Swit'
+ value false
+ }
+ control.81 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Right Mixer Bypass Playback Swi'
+ value true
+ }
+ control.82 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Left Mixer Voice Playback Switc'
+ value false
+ }
+ control.83 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Left Mixer Sidetone Playback Sw'
+ value false
+ }
+ control.84 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Left Mixer Left Playback Switch'
+ value false
+ }
+ control.85 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Left Mixer Bypass Playback Swit'
+ value true
+ }
+ control.86 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 31'
+ iface MIXER
+ name 'Amp Left Playback Volume'
+ value 31
+ }
+ control.87 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 31'
+ iface MIXER
+ name 'Amp Right Playback Volume'
+ value 31
+ }
+ control.88 {
+ comment.access 'read write'
+ comment.type INTEGER
+ comment.count 1
+ comment.range '0 - 31'
+ iface MIXER
+ name 'Amp Mono Playback Volume'
+ value 9
+ }
+ control.89 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 Off
+ comment.item.1 'Call Speaker'
+ comment.item.2 'Stereo Speakers'
+ comment.item.3 'Stereo Speakers + Headphones'
+ comment.item.4 Headphones
+ iface MIXER
+ name 'Amp Mode'
+ value 'Stereo Speakers'
+ }
+ control.90 {
+ comment.access 'read write'
+ comment.type ENUMERATED
+ comment.count 1
+ comment.item.0 Off
+ comment.item.1 'GSM Handset'
+ comment.item.2 'GSM Headset'
+ comment.item.3 'GSM Bluetooth'
+ comment.item.4 Speakers
+ comment.item.5 Headphones
+ comment.item.6 'Capture Handset'
+ comment.item.7 'Capture Headset'
+ comment.item.8 'Capture Bluetooth'
+ iface MIXER
+ name 'Neo Mode'
+ value 'GSM Handset'
+ }
+ control.91 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Amp Spk 3D Playback Switch'
+ value false
+ }
+ control.92 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Amp HP 3d Playback Switch'
+ value false
+ }
+ control.93 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Amp Fast Wakeup Playback Switch'
+ value false
+ }
+ control.94 {
+ comment.access 'read write'
+ comment.type BOOLEAN
+ comment.count 1
+ iface MIXER
+ name 'Amp Earpiece 6dB Playback Switch'
+ value false
+ }
+}
diff --git a/packages/alsa/alsa-state/fic-gta01/stereoout.state b/packages/alsa/alsa-state/fic-gta01/stereoout.state
index c27b78bb27..84117065a4 100644
--- a/packages/alsa/alsa-state/fic-gta01/stereoout.state
+++ b/packages/alsa/alsa-state/fic-gta01/stereoout.state
@@ -6,8 +6,8 @@ state.neo1973 {
comment.range '0 - 255'
iface MIXER
name 'PCM Volume'
- value.0 255
- value.1 255
+ value.0 230
+ value.1 230
}
control.2 {
comment.access 'read write'
@@ -159,7 +159,7 @@ state.neo1973 {
comment.access 'read write'
comment.type INTEGER
comment.count 1
- comment.range '0 - 7'
+ comment.range '0 - 15'
iface MIXER
name 'Bass Volume'
value 0
@@ -168,7 +168,7 @@ state.neo1973 {
comment.access 'read write'
comment.type INTEGER
comment.count 1
- comment.range '0 - 7'
+ comment.range '0 - 15'
iface MIXER
name 'Treble Volume'
value 7
@@ -815,7 +815,7 @@ state.neo1973 {
comment.range '0 - 31'
iface MIXER
name 'Amp Left Playback Volume'
- value 21
+ value 22
}
control.87 {
comment.access 'read write'
@@ -824,7 +824,7 @@ state.neo1973 {
comment.range '0 - 31'
iface MIXER
name 'Amp Right Playback Volume'
- value 21
+ value 22
}
control.88 {
comment.access 'read write'
@@ -858,6 +858,9 @@ state.neo1973 {
comment.item.3 'GSM Bluetooth'
comment.item.4 Speakers
comment.item.5 Headphones
+ comment.item.6 'Capture Handset'
+ comment.item.7 'Capture Headset'
+ comment.item.8 'Capture Bluetooth'
iface MIXER
name 'Neo Mode'
value Headphones
@@ -868,7 +871,7 @@ state.neo1973 {
comment.count 1
iface MIXER
name 'Amp Spk 3D Playback Switch'
- value false
+ value true
}
control.92 {
comment.access 'read write'
diff --git a/packages/angstrom/angstrom-version.bb b/packages/angstrom/angstrom-version.bb
index 32f3f01635..c4ea6e2a21 100644
--- a/packages/angstrom/angstrom-version.bb
+++ b/packages/angstrom/angstrom-version.bb
@@ -1,5 +1,6 @@
PV = "${DISTRO_VERSION}"
PR = "r1"
+PE = "1"
PACKAGES = "${PN}"
PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/packages/linux/linux-efika-2.6.20.11/.mtn2git_empty b/packages/argtable/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/linux/linux-efika-2.6.20.11/.mtn2git_empty
+++ b/packages/argtable/.mtn2git_empty
diff --git a/packages/argtable/argtable_2.7.bb b/packages/argtable/argtable_2.7.bb
new file mode 100644
index 0000000000..ee3e6bd70a
--- /dev/null
+++ b/packages/argtable/argtable_2.7.bb
@@ -0,0 +1,21 @@
+DESCRIPTION = "Argtable is an ANSI C library for parsing GNU style command line options."
+SECTION = "libs"
+LICENSE = "LGPL"
+HOMEPAGE = "http://argtable.sourceforge.net/"
+
+PR = "r1"
+
+DEPENDS = "libtool-cross"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/argtable/argtable2-7.tar.gz"
+
+S = ${WORKDIR}/argtable2-7
+
+inherit autotools
+
+do_stage () {
+ oe_libinstall -a -so libargtable2 ${STAGING_LIBDIR}
+ install -m 0644 src/argtable2.h ${STAGING_INCDIR}
+}
+
+
diff --git a/packages/atk/atk_1.19.3.bb b/packages/atk/atk_1.19.3.bb
index beef4ce97a..52136682d7 100644
--- a/packages/atk/atk_1.19.3.bb
+++ b/packages/atk/atk_1.19.3.bb
@@ -1,7 +1,5 @@
require atk.inc
-DEFAULT_PREFERENCE = "-1"
-
SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/atk/1.19/atk-${PV}.tar.bz2"
do_stage () {
diff --git a/packages/atk/atk_1.20.0.bb b/packages/atk/atk_1.20.0.bb
new file mode 100644
index 0000000000..e2733d5b87
--- /dev/null
+++ b/packages/atk/atk_1.20.0.bb
@@ -0,0 +1,16 @@
+DESCRIPTION = "An accessibility toolkit for GNOME."
+SECTION = "x11/libs"
+PRIORITY = "optional"
+LICENSE = "LGPL"
+
+DEPENDS = "glib-2.0 gtk-doc"
+
+SRC_URI = "http://download.gnome.org/sources/atk/1.20/${PN}-${PV}.tar.bz2"
+
+inherit autotools pkgconfig
+
+EXTRA_OECONF = "--disable-glibtest"
+
+do_stage () {
+ autotools_stage_all
+}
diff --git a/packages/avahi/avahi-ui_0.6.21.bb b/packages/avahi/avahi-ui_0.6.21.bb
new file mode 100644
index 0000000000..1159b8ead4
--- /dev/null
+++ b/packages/avahi/avahi-ui_0.6.21.bb
@@ -0,0 +1,20 @@
+require avahi.inc
+PR = "r0"
+
+DEPENDS += "avahi gtk+"
+
+SRC_URI += "file://dbus-pre-1.1.1-support.patch;patch=1"
+AVAHI_GTK = "--enable-gtk"
+
+S = "${WORKDIR}/avahi-${PV}"
+
+do_stage() {
+ install -d ${STAGING_INCDIR}/avahi-ui
+ cp ${S}/avahi-ui/*.h ${STAGING_INCDIR}/avahi-ui/
+ oe_libinstall -C avahi-ui -a -so libavahi-ui ${STAGING_LIBDIR}
+}
+
+PACKAGES = "${PN} ${PN}-dbg"
+
+FILES_${PN} = "${libdir}/libavahi-ui*.so.*"
+FILES_${PN}-dbg = "${libdir}/.debug/libavah-ui*"
diff --git a/packages/avahi/mango-lassi_git.bb b/packages/avahi/mango-lassi_git.bb
new file mode 100644
index 0000000000..99fd617ec9
--- /dev/null
+++ b/packages/avahi/mango-lassi_git.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Input sharing, the avahi way"
+DEPENDS = "avahi-ui libglade libnotify"
+
+PV = "0.0+git${SRCDATE}"
+
+SRC_URI = "git://git.0pointer.de/repos/mango-lassi.git/;protocol=http"
+
+
+S = "${WORKDIR}/${PN}"
+
+do_compile_prepend() {
+ export CFLAGS="-Wall -Wextra -W -O0 -g -pipe -Wno-unused-parameter `pkg-config --cflags dbus-glib-1 glib-2.0 gtk+-2.0 xtst avahi-ui avahi-glib avahi-client libnotify libglade-2.0` `pkg-config --libs dbus-glib-1 glib-2.0 gtk+-2.0 xtst avahi-glib avahi-client avahi-ui libnotify libglade-2.0`"
+}
+
+do_install() {
+ install -d ${D}${bindir}
+ install -m 755 mango-lassi ${D}${bindir}
+}
diff --git a/packages/nonworking/gutenprint/.mtn2git_empty b/packages/base-files/base-files/ghi270/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/nonworking/gutenprint/.mtn2git_empty
+++ b/packages/base-files/base-files/ghi270/.mtn2git_empty
diff --git a/packages/opie-usermanager/.mtn2git_empty b/packages/bind/bind-9.3.4-P1/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/opie-usermanager/.mtn2git_empty
+++ b/packages/bind/bind-9.3.4-P1/.mtn2git_empty
diff --git a/packages/bind/bind-9.3.4-P1/conf.patch b/packages/bind/bind-9.3.4-P1/conf.patch
new file mode 100644
index 0000000000..202c5319e1
--- /dev/null
+++ b/packages/bind/bind-9.3.4-P1/conf.patch
@@ -0,0 +1,301 @@
+diff -urN bind-9.3.1.orig/conf/db.0 bind-9.3.1/conf/db.0
+--- bind-9.3.1.orig/conf/db.0 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/db.0 2005-07-10 22:14:00.000000000 +0200
+@@ -0,0 +1,12 @@
++;
++; BIND reverse data file for broadcast zone
++;
++$TTL 604800
++@ IN SOA localhost. root.localhost. (
++ 1 ; Serial
++ 604800 ; Refresh
++ 86400 ; Retry
++ 2419200 ; Expire
++ 604800 ) ; Negative Cache TTL
++;
++@ IN NS localhost.
+diff -urN bind-9.3.1.orig/conf/db.127 bind-9.3.1/conf/db.127
+--- bind-9.3.1.orig/conf/db.127 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/db.127 2005-07-10 22:14:00.000000000 +0200
+@@ -0,0 +1,13 @@
++;
++; BIND reverse data file for local loopback interface
++;
++$TTL 604800
++@ IN SOA localhost. root.localhost. (
++ 1 ; Serial
++ 604800 ; Refresh
++ 86400 ; Retry
++ 2419200 ; Expire
++ 604800 ) ; Negative Cache TTL
++;
++@ IN NS localhost.
++1.0.0 IN PTR localhost.
+diff -urN bind-9.3.1.orig/conf/db.empty bind-9.3.1/conf/db.empty
+--- bind-9.3.1.orig/conf/db.empty 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/db.empty 2005-07-10 22:14:00.000000000 +0200
+@@ -0,0 +1,14 @@
++; BIND reverse data file for empty rfc1918 zone
++;
++; DO NOT EDIT THIS FILE - it is used for multiple zones.
++; Instead, copy it, edit named.conf, and use that copy.
++;
++$TTL 86400
++@ IN SOA localhost. root.localhost. (
++ 1 ; Serial
++ 604800 ; Refresh
++ 86400 ; Retry
++ 2419200 ; Expire
++ 86400 ) ; Negative Cache TTL
++;
++@ IN NS localhost.
+diff -urN bind-9.3.1.orig/conf/db.local bind-9.3.1/conf/db.local
+--- bind-9.3.1.orig/conf/db.local 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/db.local 2005-07-10 22:14:00.000000000 +0200
+@@ -0,0 +1,13 @@
++;
++; BIND data file for local loopback interface
++;
++$TTL 604800
++@ IN SOA localhost. root.localhost. (
++ 1 ; Serial
++ 604800 ; Refresh
++ 86400 ; Retry
++ 2419200 ; Expire
++ 604800 ) ; Negative Cache TTL
++;
++@ IN NS localhost.
++@ IN A 127.0.0.1
+diff -urN bind-9.3.1.orig/conf/db.root bind-9.3.1/conf/db.root
+--- bind-9.3.1.orig/conf/db.root 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/db.root 2005-07-10 22:14:00.000000000 +0200
+@@ -0,0 +1,45 @@
++
++; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net.
++;; global options: printcmd
++;; Got answer:
++;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18944
++;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13
++
++;; QUESTION SECTION:
++;. IN NS
++
++;; ANSWER SECTION:
++. 518400 IN NS A.ROOT-SERVERS.NET.
++. 518400 IN NS B.ROOT-SERVERS.NET.
++. 518400 IN NS C.ROOT-SERVERS.NET.
++. 518400 IN NS D.ROOT-SERVERS.NET.
++. 518400 IN NS E.ROOT-SERVERS.NET.
++. 518400 IN NS F.ROOT-SERVERS.NET.
++. 518400 IN NS G.ROOT-SERVERS.NET.
++. 518400 IN NS H.ROOT-SERVERS.NET.
++. 518400 IN NS I.ROOT-SERVERS.NET.
++. 518400 IN NS J.ROOT-SERVERS.NET.
++. 518400 IN NS K.ROOT-SERVERS.NET.
++. 518400 IN NS L.ROOT-SERVERS.NET.
++. 518400 IN NS M.ROOT-SERVERS.NET.
++
++;; ADDITIONAL SECTION:
++A.ROOT-SERVERS.NET. 3600000 IN A 198.41.0.4
++B.ROOT-SERVERS.NET. 3600000 IN A 192.228.79.201
++C.ROOT-SERVERS.NET. 3600000 IN A 192.33.4.12
++D.ROOT-SERVERS.NET. 3600000 IN A 128.8.10.90
++E.ROOT-SERVERS.NET. 3600000 IN A 192.203.230.10
++F.ROOT-SERVERS.NET. 3600000 IN A 192.5.5.241
++G.ROOT-SERVERS.NET. 3600000 IN A 192.112.36.4
++H.ROOT-SERVERS.NET. 3600000 IN A 128.63.2.53
++I.ROOT-SERVERS.NET. 3600000 IN A 192.36.148.17
++J.ROOT-SERVERS.NET. 3600000 IN A 192.58.128.30
++K.ROOT-SERVERS.NET. 3600000 IN A 193.0.14.129
++L.ROOT-SERVERS.NET. 3600000 IN A 198.32.64.12
++M.ROOT-SERVERS.NET. 3600000 IN A 202.12.27.33
++
++;; Query time: 81 msec
++;; SERVER: 198.41.0.4#53(a.root-servers.net.)
++;; WHEN: Sun Feb 1 11:27:14 2004
++;; MSG SIZE rcvd: 436
++
+diff -urN bind-9.3.1.orig/conf/named.conf bind-9.3.1/conf/named.conf
+--- bind-9.3.1.orig/conf/named.conf 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/named.conf 2005-07-10 22:33:46.000000000 +0200
+@@ -0,0 +1,49 @@
++// This is the primary configuration file for the BIND DNS server named.
++//
++// If you are just adding zones, please do that in /etc/bind/named.conf.local
++
++include "/etc/bind/named.conf.options";
++
++// prime the server with knowledge of the root servers
++zone "." {
++ type hint;
++ file "/etc/bind/db.root";
++};
++
++// be authoritative for the localhost forward and reverse zones, and for
++// broadcast zones as per RFC 1912
++
++zone "localhost" {
++ type master;
++ file "/etc/bind/db.local";
++};
++
++zone "127.in-addr.arpa" {
++ type master;
++ file "/etc/bind/db.127";
++};
++
++zone "0.in-addr.arpa" {
++ type master;
++ file "/etc/bind/db.0";
++};
++
++zone "255.in-addr.arpa" {
++ type master;
++ file "/etc/bind/db.255";
++};
++
++// zone "com" { type delegation-only; };
++// zone "net" { type delegation-only; };
++
++// From the release notes:
++// Because many of our users are uncomfortable receiving undelegated answers
++// from root or top level domains, other than a few for whom that behaviour
++// has been trusted and expected for quite some length of time, we have now
++// introduced the "root-delegations-only" feature which applies delegation-only
++// logic to all top level domains, and to the root domain. An exception list
++// should be specified, including "MUSEUM" and "DE", and any other top level
++// domains from whom undelegated responses are expected and trusted.
++// root-delegation-only exclude { "DE"; "MUSEUM"; };
++
++include "/etc/bind/named.conf.local";
+diff -urN bind-9.3.1.orig/conf/named.conf.local bind-9.3.1/conf/named.conf.local
+--- bind-9.3.1.orig/conf/named.conf.local 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/named.conf.local 2005-07-10 22:14:06.000000000 +0200
+@@ -0,0 +1,8 @@
++//
++// Do any local configuration here
++//
++
++// Consider adding the 1918 zones here, if they are not used in your
++// organization
++//include "/etc/bind/zones.rfc1918";
++
+diff -urN bind-9.3.1.orig/conf/named.conf.options bind-9.3.1/conf/named.conf.options
+--- bind-9.3.1.orig/conf/named.conf.options 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/named.conf.options 2005-07-10 22:14:06.000000000 +0200
+@@ -0,0 +1,24 @@
++options {
++ directory "/var/cache/bind";
++
++ // If there is a firewall between you and nameservers you want
++ // to talk to, you might need to uncomment the query-source
++ // directive below. Previous versions of BIND always asked
++ // questions using port 53, but BIND 8.1 and later use an unprivileged
++ // port by default.
++
++ // query-source address * port 53;
++
++ // If your ISP provided one or more IP addresses for stable
++ // nameservers, you probably want to use them as forwarders.
++ // Uncomment the following block, and insert the addresses replacing
++ // the all-0's placeholder.
++
++ // forwarders {
++ // 0.0.0.0;
++ // };
++
++ auth-nxdomain no; # conform to RFC1035
++
++};
++
+diff -urN bind-9.3.1.orig/conf/zones.rfc1918 bind-9.3.1/conf/zones.rfc1918
+--- bind-9.3.1.orig/conf/zones.rfc1918 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/conf/zones.rfc1918 2005-07-10 22:14:10.000000000 +0200
+@@ -0,0 +1,20 @@
++zone "10.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++
++zone "16.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "17.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "18.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "19.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "20.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "21.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "22.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "23.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "24.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "25.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "26.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "27.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "28.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "29.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "30.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
++
++zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; };
+diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d
+--- bind-9.3.1.orig/init.d 1970-01-01 01:00:00.000000000 +0100
++++ bind-9.3.1/init.d 2005-07-10 23:09:58.000000000 +0200
+@@ -0,0 +1,63 @@
++#!/bin/sh
++
++PATH=/sbin:/bin:/usr/sbin:/usr/bin
++
++# for a chrooted server: "-u bind -t /var/lib/named"
++# Don't modify this line, change or create /etc/default/bind9.
++OPTIONS=""
++
++test -f /etc/default/bind9 && . /etc/default/bind9
++
++test -x /usr/sbin/rndc || exit 0
++
++case "$1" in
++ start)
++ echo -n "Starting domain name service: named"
++
++ modprobe capability >/dev/null 2>&1 || true
++
++ # dirs under /var/run can go away on reboots.
++ mkdir -p /var/run/bind/run
++ mkdir -p /var/cache/bind
++ chmod 775 /var/run/bind/run
++ chown root:bind /var/run/bind/run >/dev/null 2>&1 || true
++
++ if [ ! -x /usr/sbin/named ]; then
++ echo "named binary missing - not starting"
++ exit 1
++ fi
++ if start-stop-daemon --start --quiet --exec /usr/sbin/named \
++ --pidfile /var/run/bind/run/named.pid -- $OPTIONS; then
++ if [ -x /sbin/resolvconf ] ; then
++ echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo
++ fi
++ fi
++ echo "."
++ ;;
++
++ stop)
++ echo -n "Stopping domain name service: named"
++ if [ -x /sbin/resolvconf ]; then
++ /sbin/resolvconf -d lo
++ fi
++ /usr/sbin/rndc stop
++ echo "."
++ ;;
++
++ reload)
++ /usr/sbin/rndc reload
++ ;;
++
++ restart|force-reload)
++ $0 stop
++ sleep 2
++ $0 start
++ ;;
++
++ *)
++ echo "Usage: /etc/init.d/bind {start|stop|reload|restart|force-reload}" >&2
++ exit 1
++ ;;
++esac
++
++exit 0
diff --git a/packages/bind/bind-9.3.4-P1/configure.in.patch b/packages/bind/bind-9.3.4-P1/configure.in.patch
new file mode 100644
index 0000000000..78ae9271c6
--- /dev/null
+++ b/packages/bind/bind-9.3.4-P1/configure.in.patch
@@ -0,0 +1,14 @@
+--- bind-9.3.1/configure.in.orig 2005-07-10 21:21:18.000000000 +0200
++++ bind-9.3.1/configure.in 2005-07-10 21:24:31.000000000 +0200
+@@ -1414,7 +1414,10 @@
+ [AC_MSG_RESULT(no)
+ ISC_EXTRA_OBJS="$ISC_EXTRA_OBJS inet_ntop.$O"
+ ISC_EXTRA_SRCS="$ISC_EXTRA_SRCS inet_ntop.c"
+- ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"])
++ ISC_PLATFORM_NEEDNTOP="#define ISC_PLATFORM_NEEDNTOP 1"],
++
++ [AC_MSG_RESULT(assuming target platform has working inet_ntop)
++ ISC_PLATFORM_NEEDNTOP="#undef ISC_PLATFORM_NEEDNTOP"])
+
+
+ # On NetBSD 1.4.2 and maybe others, inet_pton() incorrectly accepts
diff --git a/packages/bind/bind-9.3.4-P1/so_bsdcompat.patch b/packages/bind/bind-9.3.4-P1/so_bsdcompat.patch
new file mode 100644
index 0000000000..415156afb7
--- /dev/null
+++ b/packages/bind/bind-9.3.4-P1/so_bsdcompat.patch
@@ -0,0 +1,34 @@
+--- bind-9.3.1/lib/isc/unix/socket.c~ 2004-11-18 21:31:16.000000000 +0000
++++ bind-9.3.1/lib/isc/unix/socket.c 2005-11-07 13:34:28.000000000 +0000
+@@ -1344,7 +1344,7 @@
+ {
+ isc_socket_t *sock = NULL;
+ isc_result_t ret;
+-#if defined(USE_CMSG) || defined(SO_BSDCOMPAT)
++#if defined(USE_CMSG)
+ int on = 1;
+ #endif
+ char strbuf[ISC_STRERRORSIZE];
+@@ -1429,7 +1429,7 @@
+ return (ISC_R_UNEXPECTED);
+ }
+
+-#ifdef SO_BSDCOMPAT
++/* #ifdef SO_BSDCOMPAT
+ if (setsockopt(sock->fd, SOL_SOCKET, SO_BSDCOMPAT,
+ (void *)&on, sizeof(on)) < 0) {
+ isc__strerror(errno, strbuf, sizeof(strbuf));
+@@ -1439,9 +1439,9 @@
+ isc_msgcat_get(isc_msgcat, ISC_MSGSET_GENERAL,
+ ISC_MSG_FAILED, "failed"),
+ strbuf);
+- /* Press on... */
++
+ }
+-#endif
++#endif */
+
+ #if defined(USE_CMSG)
+ if (type == isc_sockettype_udp) {
+
+
diff --git a/packages/bind/bind_9.3.4-P1.bb b/packages/bind/bind_9.3.4-P1.bb
new file mode 100644
index 0000000000..59d2599a13
--- /dev/null
+++ b/packages/bind/bind_9.3.4-P1.bb
@@ -0,0 +1,38 @@
+DESCRIPTION = "ISC Internet Domain Name Server"
+SECTION = "console/network"
+HOMEPAGE = "http://www.isc.org/sw/bind/"
+LICENSE = "BSD"
+PR = "r0"
+
+DEPENDS = "openssl"
+
+SRC_URI = "ftp://ftp.isc.org/isc/bind9/9.3.4-P1/bind-9.3.4-P1.tar.gz \
+ file://conf.patch;patch=1 \
+ file://configure.in.patch;patch=1 \
+ file://so_bsdcompat.patch;patch=1 \
+ "
+
+EXTRA_OECONF = " --enable-ipv6=no --with-randomdev=/dev/random --disable-threads --sysconfdir=/etc/bind --localstatedir=/var --prefix=/usr"
+inherit autotools update-rc.d
+
+INITSCRIPT_NAME = "bind"
+INITSCRIPT_PARAMS = "defaults"
+
+do_install_append() {
+ rm "${D}/usr/bin/nslookup"
+ install -d "${D}/etc/bind"
+ install -d "${D}/etc/init.d"
+ install -m 644 ${S}/conf/* "${D}/etc/bind"
+ install -m 755 "${S}/init.d" "${D}/etc/init.d/bind"
+}
+
+CONFFILES_${PN} = " \
+ ${sysconfdir}/bind/named.conf \
+ ${sysconfdir}/bind/named.conf.local \
+ ${sysconfdir}/bind/named.conf.options \
+ ${sysconfdir}/bind/db.0 \
+ ${sysconfdir}/bind/db.127 \
+ ${sysconfdir}/bind/db.empty \
+ ${sysconfdir}/bind/db.local \
+ ${sysconfdir}/bind/db.root \
+ "
diff --git a/packages/binutils/binutils-2.18/binutils-configure-texinfo-version.patch b/packages/binutils/binutils-2.18/binutils-configure-texinfo-version.patch
new file mode 100644
index 0000000000..dd21aed862
--- /dev/null
+++ b/packages/binutils/binutils-2.18/binutils-configure-texinfo-version.patch
@@ -0,0 +1,22 @@
+--- binutils-2.18/configure.orig 2007-10-11 21:09:27.000000000 -0700
++++ binutils-2.18/configure 2007-10-11 21:10:20.000000000 -0700
+@@ -6128,7 +6128,7 @@ case " $build_configdirs " in
+ # For an installed makeinfo, we require it to be from texinfo 4.4 or
+ # higher, else we use the "missing" dummy.
+ if ${MAKEINFO} --version \
+- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
++ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
+ :
+ else
+ MAKEINFO="$MISSING makeinfo"
+--- binutils-2.18/configure.ac.orig 2007-10-11 21:10:54.000000000 -0700
++++ binutils-2.18/configure.ac 2007-10-11 21:11:13.000000000 -0700
+@@ -2403,7 +2403,7 @@ changequote(,)
+ # For an installed makeinfo, we require it to be from texinfo 4.4 or
+ # higher, else we use the "missing" dummy.
+ if ${MAKEINFO} --version \
+- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[4-9]|[5-9])' >/dev/null 2>&1; then
++ | egrep 'texinfo[^0-9]*(4\.([6-9]|[1-9][0-9])|[5-9]|[1-9][0-9])' >/dev/null 2>&1; then
+ :
+ else
+ MAKEINFO="$MISSING makeinfo"
diff --git a/packages/binutils/binutils_2.18.bb b/packages/binutils/binutils_2.18.bb
index a9b4d995b2..78000c7af6 100644
--- a/packages/binutils/binutils_2.18.bb
+++ b/packages/binutils/binutils_2.18.bb
@@ -3,6 +3,7 @@ require binutils.inc
SRC_URI = "\
${GNU_MIRROR}/binutils/binutils-${PV}.tar.bz2 \
file://binutils-2.16.91.0.6-objcopy-rename-errorcode.patch;patch=1 \
+ file://binutils-configure-texinfo-version.patch;patch=1 \
file://binutils-uclibc-100-uclibc-conf.patch;patch=1 \
file://110-arm-eabi-conf.patch;patch=1 \
file://binutils-uclibc-300-001_ld_makefile_patch.patch;patch=1 \
diff --git a/packages/bluez/bluez-cups-backend_3.20.bb b/packages/bluez/bluez-cups-backend_3.20.bb
new file mode 100644
index 0000000000..64884fa904
--- /dev/null
+++ b/packages/bluez/bluez-cups-backend_3.20.bb
@@ -0,0 +1,26 @@
+require bluez-utils3.inc
+
+DEPENDS += "cups"
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --disable-alsa \
+ --enable-cups \
+ --enable-glib \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${libdir}/cups/backend/bluetooth"
+RDEPENDS_${PN} = "cups" \ No newline at end of file
diff --git a/packages/bluez/bluez-gstreamer-plugin_3.20.bb b/packages/bluez/bluez-gstreamer-plugin_3.20.bb
new file mode 100644
index 0000000000..c5a1a9acee
--- /dev/null
+++ b/packages/bluez/bluez-gstreamer-plugin_3.20.bb
@@ -0,0 +1,26 @@
+require bluez-utils3.inc
+
+DEPENDS += "gstreamer gst-plugins-base "
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --enable-alsa \
+ --disable-cups \
+ --enable-glib \
+ --enable-gstreamer \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+PACKAGES = "${PN}"
+
+FILES_${PN} = "${libdir}/gstreamer-0.10/libgstbluetooth.so"
diff --git a/packages/bluez/bluez-libs_3.20.bb b/packages/bluez/bluez-libs_3.20.bb
new file mode 100644
index 0000000000..6ddf62a4fb
--- /dev/null
+++ b/packages/bluez/bluez-libs_3.20.bb
@@ -0,0 +1 @@
+require bluez-libs.inc
diff --git a/packages/bluez/bluez-utils-alsa_3.20.bb b/packages/bluez/bluez-utils-alsa_3.20.bb
new file mode 100644
index 0000000000..e2f48fba49
--- /dev/null
+++ b/packages/bluez/bluez-utils-alsa_3.20.bb
@@ -0,0 +1,24 @@
+require bluez-utils3.inc
+
+DEPENDS += "alsa-lib"
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --disable-hid2hci \
+ --enable-alsa \
+ --disable-cups \
+ --enable-glib \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+PACKAGES = "${PN}"
+FILES_${PN} = "${libdir}/alsa-lib/libasound*"
diff --git a/packages/bluez/bluez-utils.inc b/packages/bluez/bluez-utils.inc
index 8a8766cbf8..4d2ce6505e 100644
--- a/packages/bluez/bluez-utils.inc
+++ b/packages/bluez/bluez-utils.inc
@@ -12,6 +12,8 @@ SRC_URI = "http://bluez.sourceforge.net/download/bluez-utils-${PV}.tar.gz \
file://hcid.conf \
file://hciattach-ti-bts.patch;patch=1 \
file://handle-eintr.patch;patch=1;status=applied"
+SRC_URI_append_r1000 = " file://hciattach.sh"
+SRC_URI_append_ghi270 = " file://hciattach.sh"
# Almost all serial CF cards w/ manfid 0x0000,0x0000 seem to use the bcs protocol
# Let's default to that instead of 'any' until further notice...
@@ -43,6 +45,16 @@ do_install_append() {
install -m 0755 ${S}/daemon/.libs/passkey-agent ${D}${base_bindir}/
}
+do_install_append_r1000() {
+ install -d ${D}${sysconfdir} ${D}${sysconfdir}/bluetooth
+ install -m 0755 ${WORKDIR}/hciattach.sh ${D}${sysconfdir}/bluetooth/hciattach
+}
+
+do_install_append_ghi270() {
+ install -d ${D}${sysconfdir} ${D}${sysconfdir}/bluetooth
+ install -m 0755 ${WORKDIR}/hciattach.sh ${D}${sysconfdir}/bluetooth/hciattach
+}
+
CONFFILES_${PN} = "${sysconfdir}/bluetooth/hcid.conf ${sysconfdir}/bluetooth/rfcomm.conf \
${sysconfdir}/default/bluetooth"
diff --git a/packages/bluez/bluez-utils_3.20.bb b/packages/bluez/bluez-utils_3.20.bb
new file mode 100644
index 0000000000..48f147aa69
--- /dev/null
+++ b/packages/bluez/bluez-utils_3.20.bb
@@ -0,0 +1,29 @@
+require bluez-utils3.inc
+
+# see bluez-utils3.inc for the explanation of these option
+EXTRA_OECONF = " \
+ --enable-bccmd \
+ --enable-hid2hci \
+ --disable-alsa \
+ --disable-cups \
+ --enable-glib \
+ --disable-sdpd \
+ --enable-network \
+ --enable-serial \
+ --enable-input \
+ --enable-audio \
+ --enable-echo \
+ --enable-configfile \
+ --enable-initscripts \
+ --enable-test \
+ "
+
+CONFFILES_${PN} = " \
+ ${sysconfdir}/bluetooth/hcid.conf \
+ ${sysconfdir}/default/bluetooth \
+ "
+
+CONFFILES_${PN}-compat = " \
+ ${sysconfdir}/bluetooth/rfcomm.conf \
+ "
+
diff --git a/packages/uclibc/uclibc-0.9.29/compulab-pxa270/.mtn2git_empty b/packages/bluez/files/ghi270/.mtn2git_empty
index e69de29bb2..e69de29bb2 100644
--- a/packages/uclibc/uclibc-0.9.29/compulab-pxa270/.mtn2git_empty
+++ b/packages/bluez/files/ghi270/.mtn2git_empty
diff --git a/packages/bluez/files/r1000/.mtn2git_empty b/packages/bluez/files/r1000/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/bluez/files/r1000/.mtn2git_empty
diff --git a/packages/busybox/busybox-1.7.2/.mtn2git_empty b/packages/busybox/busybox-1.7.2/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/busybox/busybox-1.7.2/.mtn2git_empty
diff --git a/packages/busybox/busybox-1.7.2/angstrom/.mtn2git_empty b/packages/busybox/busybox-1.7.2/angstrom/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/busybox/busybox-1.7.2/angstrom/.mtn2git_empty
diff --git a/packages/busybox/busybox-1.7.2/angstrom/defconfig b/packages/busybox/busybox-1.7.2/angstrom/defconfig
new file mode 100644
index 0000000000..19cfafab2c
--- /dev/null
+++ b/packages/busybox/busybox-1.7.2/angstrom/defconfig
@@ -0,0 +1,753 @@
+#
+# Automatically generated make config: don't edit
+# Busybox version: 1.7.2
+# Fri Oct 12 19:00:27 2007
+#
+CONFIG_HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+# CONFIG_NITPICK is not set
+# CONFIG_DESKTOP is not set
+# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
+CONFIG_SHOW_USAGE=y
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+CONFIG_FEATURE_COMPRESS_USAGE=y
+# CONFIG_FEATURE_INSTALLER is not set
+CONFIG_LOCALE_SUPPORT=y
+CONFIG_GETOPT_LONG=y
+CONFIG_FEATURE_DEVPTS=y
+# CONFIG_FEATURE_CLEAN_UP is not set
+CONFIG_FEATURE_PIDFILE=y
+CONFIG_FEATURE_SUID=y
+CONFIG_FEATURE_SUID_CONFIG=y
+CONFIG_FEATURE_SUID_CONFIG_QUIET=y
+# CONFIG_SELINUX is not set
+# CONFIG_FEATURE_PREFER_APPLETS is not set
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+CONFIG_FEATURE_SYSLOG=y
+CONFIG_FEATURE_HAVE_RPC=y
+
+#
+# Build Options
+#
+# CONFIG_STATIC is not set
+# CONFIG_BUILD_LIBBUSYBOX is not set
+# CONFIG_FEATURE_FULL_LIBBUSYBOX is not set
+# CONFIG_FEATURE_SHARED_BUSYBOX is not set
+CONFIG_LFS=y
+CONFIG_BUILD_AT_ONCE=y
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_WERROR is not set
+CONFIG_NO_DEBUG_LIB=y
+# CONFIG_DMALLOC is not set
+# CONFIG_EFENCE is not set
+# CONFIG_INCLUDE_SUSv2 is not set
+
+#
+# Installation Options
+#
+# CONFIG_INSTALL_NO_USR is not set
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+# CONFIG_INSTALL_APPLET_DONT is not set
+CONFIG_PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+CONFIG_PASSWORD_MINLEN=6
+CONFIG_MD5_SIZE_VS_SPEED=2
+CONFIG_FEATURE_FAST_TOP=y
+# CONFIG_FEATURE_ETC_NETWORKS is not set
+CONFIG_FEATURE_EDITING=y
+CONFIG_FEATURE_EDITING_MAX_LEN=1024
+# CONFIG_FEATURE_EDITING_FANCY_KEYS is not set
+# CONFIG_FEATURE_EDITING_VI is not set
+CONFIG_FEATURE_EDITING_HISTORY=15
+CONFIG_FEATURE_EDITING_SAVEHISTORY=y
+CONFIG_FEATURE_TAB_COMPLETION=y
+CONFIG_FEATURE_USERNAME_COMPLETION=y
+CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
+CONFIG_MONOTONIC_SYSCALL=y
+CONFIG_IOCTL_HEX2STR_ERROR=y
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+CONFIG_AR=y
+# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
+CONFIG_BUNZIP2=y
+CONFIG_CPIO=y
+# CONFIG_DPKG is not set
+# CONFIG_DPKG_DEB is not set
+# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
+CONFIG_GUNZIP=y
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+CONFIG_GZIP=y
+# CONFIG_RPM2CPIO is not set
+# CONFIG_RPM is not set
+# CONFIG_FEATURE_RPM_BZ2 is not set
+CONFIG_TAR=y
+CONFIG_FEATURE_TAR_CREATE=y
+CONFIG_FEATURE_TAR_BZIP2=y
+# CONFIG_FEATURE_TAR_LZMA is not set
+CONFIG_FEATURE_TAR_FROM=y
+CONFIG_FEATURE_TAR_GZIP=y
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+# CONFIG_UNCOMPRESS is not set
+# CONFIG_UNLZMA is not set
+# CONFIG_FEATURE_LZMA_FAST is not set
+CONFIG_UNZIP=y
+
+#
+# Common options for cpio and tar
+#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+# CONFIG_FEATURE_DEB_TAR_GZ is not set
+# CONFIG_FEATURE_DEB_TAR_BZ2 is not set
+# CONFIG_FEATURE_DEB_TAR_LZMA is not set
+
+#
+# Coreutils
+#
+CONFIG_BASENAME=y
+# CONFIG_CAL is not set
+CONFIG_CAT=y
+# CONFIG_CATV is not set
+CONFIG_CHGRP=y
+CONFIG_CHMOD=y
+CONFIG_CHOWN=y
+CONFIG_CHROOT=y
+# CONFIG_CKSUM is not set
+# CONFIG_COMM is not set
+CONFIG_CP=y
+CONFIG_CUT=y
+CONFIG_DATE=y
+# CONFIG_FEATURE_DATE_ISOFMT is not set
+CONFIG_DD=y
+CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+CONFIG_DF=y
+CONFIG_DIRNAME=y
+# CONFIG_DOS2UNIX is not set
+# CONFIG_UNIX2DOS is not set
+CONFIG_DU=y
+CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
+CONFIG_ECHO=y
+CONFIG_FEATURE_FANCY_ECHO=y
+CONFIG_ENV=y
+CONFIG_FEATURE_ENV_LONG_OPTIONS=y
+# CONFIG_EXPAND is not set
+# CONFIG_FEATURE_EXPAND_LONG_OPTIONS is not set
+CONFIG_EXPR=y
+# CONFIG_EXPR_MATH_SUPPORT_64 is not set
+CONFIG_FALSE=y
+# CONFIG_FOLD is not set
+CONFIG_HEAD=y
+# CONFIG_FEATURE_FANCY_HEAD is not set
+# CONFIG_HOSTID is not set
+CONFIG_ID=y
+# CONFIG_INSTALL is not set
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+# CONFIG_LENGTH is not set
+CONFIG_LN=y
+CONFIG_LOGNAME=y
+CONFIG_LS=y
+CONFIG_FEATURE_LS_FILETYPES=y
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_FEATURE_LS_SORTFILES=y
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+CONFIG_FEATURE_LS_USERNAME=y
+CONFIG_FEATURE_LS_COLOR=y
+# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
+CONFIG_MD5SUM=y
+CONFIG_MKDIR=y
+CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
+CONFIG_MKFIFO=y
+CONFIG_MKNOD=y
+CONFIG_MV=y
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+# CONFIG_NICE is not set
+CONFIG_NOHUP=y
+CONFIG_OD=y
+# CONFIG_PRINTENV is not set
+CONFIG_PRINTF=y
+CONFIG_PWD=y
+CONFIG_READLINK=y
+CONFIG_FEATURE_READLINK_FOLLOW=y
+CONFIG_REALPATH=y
+CONFIG_RM=y
+CONFIG_RMDIR=y
+CONFIG_SEQ=y
+# CONFIG_SHA1SUM is not set
+CONFIG_SLEEP=y
+CONFIG_FEATURE_FANCY_SLEEP=y
+CONFIG_SORT=y
+CONFIG_FEATURE_SORT_BIG=y
+# CONFIG_SPLIT is not set
+# CONFIG_FEATURE_SPLIT_FANCY is not set
+# CONFIG_STAT is not set
+# CONFIG_FEATURE_STAT_FORMAT is not set
+CONFIG_STTY=y
+# CONFIG_SUM is not set
+CONFIG_SYNC=y
+CONFIG_TAIL=y
+CONFIG_FEATURE_FANCY_TAIL=y
+CONFIG_TEE=y
+# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+CONFIG_TEST=y
+# CONFIG_FEATURE_TEST_64 is not set
+CONFIG_TOUCH=y
+CONFIG_TR=y
+CONFIG_FEATURE_TR_CLASSES=y
+# CONFIG_FEATURE_TR_EQUIV is not set
+CONFIG_TRUE=y
+CONFIG_TTY=y
+CONFIG_UNAME=y
+# CONFIG_UNEXPAND is not set
+# CONFIG_FEATURE_UNEXPAND_LONG_OPTIONS is not set
+CONFIG_UNIQ=y
+CONFIG_USLEEP=y
+# CONFIG_UUDECODE is not set
+# CONFIG_UUENCODE is not set
+CONFIG_WC=y
+# CONFIG_FEATURE_WC_LARGE is not set
+CONFIG_WHO=y
+CONFIG_WHOAMI=y
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
+
+#
+# Common options for ls, more and telnet
+#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum
+#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+CONFIG_CHVT=y
+CONFIG_CLEAR=y
+CONFIG_DEALLOCVT=y
+CONFIG_DUMPKMAP=y
+CONFIG_LOADFONT=y
+CONFIG_LOADKMAP=y
+CONFIG_OPENVT=y
+CONFIG_RESET=y
+# CONFIG_RESIZE is not set
+# CONFIG_FEATURE_RESIZE_PRINT is not set
+CONFIG_SETCONSOLE=y
+# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
+# CONFIG_SETKEYCODES is not set
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+CONFIG_MKTEMP=y
+# CONFIG_PIPE_PROGRESS is not set
+CONFIG_RUN_PARTS=y
+# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
+# CONFIG_FEATURE_RUN_PARTS_FANCY is not set
+CONFIG_START_STOP_DAEMON=y
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+CONFIG_AWK=y
+CONFIG_FEATURE_AWK_MATH=y
+# CONFIG_CMP is not set
+CONFIG_DIFF=y
+CONFIG_FEATURE_DIFF_BINARY=y
+CONFIG_FEATURE_DIFF_DIR=y
+# CONFIG_FEATURE_DIFF_MINIMAL is not set
+# CONFIG_ED is not set
+CONFIG_PATCH=y
+CONFIG_SED=y
+CONFIG_VI=y
+CONFIG_FEATURE_VI_MAX_LEN=1024
+CONFIG_FEATURE_VI_COLON=y
+CONFIG_FEATURE_VI_YANKMARK=y
+CONFIG_FEATURE_VI_SEARCH=y
+CONFIG_FEATURE_VI_USE_SIGNALS=y
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+# CONFIG_FEATURE_VI_READONLY is not set
+# CONFIG_FEATURE_VI_SETOPTS is not set
+# CONFIG_FEATURE_VI_SET is not set
+CONFIG_FEATURE_VI_WIN_RESIZE=y
+CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
+CONFIG_FEATURE_ALLOW_EXEC=y
+
+#
+# Finding Utilities
+#
+CONFIG_FIND=y
+CONFIG_FEATURE_FIND_PRINT0=y
+CONFIG_FEATURE_FIND_MTIME=y
+CONFIG_FEATURE_FIND_MMIN=y
+CONFIG_FEATURE_FIND_PERM=y
+CONFIG_FEATURE_FIND_TYPE=y
+CONFIG_FEATURE_FIND_XDEV=y
+CONFIG_FEATURE_FIND_MAXDEPTH=y
+CONFIG_FEATURE_FIND_NEWER=y
+# CONFIG_FEATURE_FIND_INUM is not set
+CONFIG_FEATURE_FIND_EXEC=y
+CONFIG_FEATURE_FIND_USER=y
+CONFIG_FEATURE_FIND_GROUP=y
+CONFIG_FEATURE_FIND_NOT=y
+CONFIG_FEATURE_FIND_DEPTH=y
+CONFIG_FEATURE_FIND_PAREN=y
+CONFIG_FEATURE_FIND_SIZE=y
+CONFIG_FEATURE_FIND_PRUNE=y
+# CONFIG_FEATURE_FIND_DELETE is not set
+CONFIG_FEATURE_FIND_PATH=y
+CONFIG_FEATURE_FIND_REGEX=y
+# CONFIG_FEATURE_FIND_CONTEXT is not set
+CONFIG_GREP=y
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_FEATURE_GREP_CONTEXT=y
+CONFIG_XARGS=y
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set
+# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set
+# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set
+
+#
+# Init Utilities
+#
+# CONFIG_INIT is not set
+# CONFIG_DEBUG_INIT is not set
+# CONFIG_FEATURE_USE_INITTAB is not set
+# CONFIG_FEATURE_INIT_SCTTY is not set
+# CONFIG_FEATURE_INIT_SYSLOG is not set
+# CONFIG_FEATURE_EXTRA_QUIET is not set
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+# CONFIG_FEATURE_INITRD is not set
+# CONFIG_HALT is not set
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+# CONFIG_FEATURE_SHADOWPASSWDS is not set
+# CONFIG_USE_BB_SHADOW is not set
+# CONFIG_USE_BB_PWD_GRP is not set
+# CONFIG_ADDGROUP is not set
+# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set
+# CONFIG_DELGROUP is not set
+# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set
+# CONFIG_ADDUSER is not set
+# CONFIG_DELUSER is not set
+# CONFIG_GETTY is not set
+CONFIG_FEATURE_UTMP=y
+# CONFIG_FEATURE_WTMP is not set
+# CONFIG_LOGIN is not set
+# CONFIG_PAM is not set
+# CONFIG_LOGIN_SCRIPTS is not set
+# CONFIG_FEATURE_NOLOGIN is not set
+# CONFIG_FEATURE_SECURETTY is not set
+# CONFIG_PASSWD is not set
+# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set
+# CONFIG_CRYPTPW is not set
+# CONFIG_CHPASSWD is not set
+# CONFIG_SU is not set
+# CONFIG_FEATURE_SU_SYSLOG is not set
+# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set
+# CONFIG_SULOGIN is not set
+# CONFIG_VLOCK is not set
+
+#
+# Linux Ext2 FS Progs
+#
+CONFIG_CHATTR=y
+CONFIG_FSCK=y
+# CONFIG_LSATTR is not set
+
+#
+# Linux Module Utilities
+#
+CONFIG_INSMOD=y
+# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
+# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
+# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
+CONFIG_RMMOD=y
+CONFIG_LSMOD=y
+# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
+CONFIG_MODPROBE=y
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+CONFIG_FEATURE_MODPROBE_FANCY_ALIAS=y
+
+#
+# Options common to multiple modutils
+#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+# CONFIG_FEATURE_2_4_MODULES is not set
+CONFIG_FEATURE_2_6_MODULES=y
+# CONFIG_FEATURE_QUERY_MODULE_INTERFACE is not set
+
+#
+# Linux System Utilities
+#
+CONFIG_DMESG=y
+CONFIG_FEATURE_DMESG_PRETTY=y
+CONFIG_FBSET=y
+CONFIG_FEATURE_FBSET_FANCY=y
+CONFIG_FEATURE_FBSET_READMODE=y
+# CONFIG_FDFLUSH is not set
+# CONFIG_FDFORMAT is not set
+CONFIG_FDISK=y
+CONFIG_FDISK_SUPPORT_LARGE_DISKS=y
+CONFIG_FEATURE_FDISK_WRITABLE=y
+# CONFIG_FEATURE_AIX_LABEL is not set
+# CONFIG_FEATURE_SGI_LABEL is not set
+# CONFIG_FEATURE_SUN_LABEL is not set
+# CONFIG_FEATURE_OSF_LABEL is not set
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+# CONFIG_FREERAMDISK is not set
+CONFIG_FSCK_MINIX=y
+CONFIG_MKFS_MINIX=y
+
+#
+# Minix filesystem support
+#
+CONFIG_FEATURE_MINIX2=y
+# CONFIG_GETOPT is not set
+CONFIG_HEXDUMP=y
+CONFIG_HWCLOCK=y
+CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
+CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
+# CONFIG_IPCRM is not set
+# CONFIG_IPCS is not set
+CONFIG_LOSETUP=y
+# CONFIG_MDEV is not set
+# CONFIG_FEATURE_MDEV_CONF is not set
+# CONFIG_FEATURE_MDEV_EXEC is not set
+# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set
+CONFIG_MKSWAP=y
+# CONFIG_FEATURE_MKSWAP_V0 is not set
+CONFIG_MORE=y
+CONFIG_FEATURE_USE_TERMIOS=y
+CONFIG_MOUNT=y
+CONFIG_FEATURE_MOUNT_NFS=y
+# CONFIG_FEATURE_MOUNT_CIFS is not set
+CONFIG_FEATURE_MOUNT_FLAGS=y
+CONFIG_FEATURE_MOUNT_FSTAB=y
+CONFIG_PIVOT_ROOT=y
+CONFIG_RDATE=y
+# CONFIG_READPROFILE is not set
+# CONFIG_SETARCH is not set
+CONFIG_SWAPONOFF=y
+CONFIG_SWITCH_ROOT=y
+CONFIG_UMOUNT=y
+# CONFIG_FEATURE_UMOUNT_ALL is not set
+
+#
+# Common options for mount/umount
+#
+CONFIG_FEATURE_MOUNT_LOOP=y
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+# CONFIG_ADJTIMEX is not set
+# CONFIG_BBCONFIG is not set
+# CONFIG_CHRT is not set
+# CONFIG_CROND is not set
+# CONFIG_DEBUG_CROND_OPTION is not set
+# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
+# CONFIG_CRONTAB is not set
+CONFIG_DC=y
+# CONFIG_DEVFSD is not set
+# CONFIG_DEVFSD_MODLOAD is not set
+# CONFIG_DEVFSD_FG_NP is not set
+# CONFIG_DEVFSD_VERBOSE is not set
+# CONFIG_FEATURE_DEVFS is not set
+# CONFIG_EJECT is not set
+# CONFIG_LAST is not set
+CONFIG_LESS=y
+CONFIG_FEATURE_LESS_MAXLINES=9999999
+CONFIG_FEATURE_LESS_BRACKETS=y
+CONFIG_FEATURE_LESS_FLAGS=y
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+# CONFIG_FEATURE_LESS_MARKS is not set
+# CONFIG_FEATURE_LESS_REGEXP is not set
+# CONFIG_HDPARM is not set
+# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
+# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
+# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
+# CONFIG_MAKEDEVS is not set
+# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
+# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
+# CONFIG_MOUNTPOINT is not set
+# CONFIG_MT is not set
+# CONFIG_RAIDAUTORUN is not set
+# CONFIG_READAHEAD is not set
+# CONFIG_RUNLEVEL is not set
+# CONFIG_RX is not set
+CONFIG_STRINGS=y
+# CONFIG_SETSID is not set
+# CONFIG_TASKSET is not set
+# CONFIG_FEATURE_TASKSET_FANCY is not set
+CONFIG_TIME=y
+# CONFIG_TTYSIZE is not set
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+CONFIG_FEATURE_IPV6=y
+# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set
+# CONFIG_ARP is not set
+# CONFIG_ARPING is not set
+# CONFIG_DNSD is not set
+# CONFIG_ETHER_WAKE is not set
+# CONFIG_FAKEIDENTD is not set
+# CONFIG_FTPGET is not set
+# CONFIG_FTPPUT is not set
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+CONFIG_HOSTNAME=y
+# CONFIG_HTTPD is not set
+# CONFIG_FEATURE_HTTPD_USE_SENDFILE is not set
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+# CONFIG_FEATURE_HTTPD_CGI is not set
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
+# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set
+CONFIG_IFCONFIG=y
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+CONFIG_FEATURE_IFCONFIG_HW=y
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+CONFIG_IFUPDOWN=y
+CONFIG_IFUPDOWN_IFSTATE_PATH="/var/run/ifstate"
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+# CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN is not set
+CONFIG_FEATURE_IFUPDOWN_IFCONFIG_BUILTIN=y
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+CONFIG_FEATURE_IFUPDOWN_IPV6=y
+CONFIG_FEATURE_IFUPDOWN_MAPPING=y
+# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set
+# CONFIG_INETD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
+# CONFIG_FEATURE_INETD_RPC is not set
+CONFIG_IP=y
+CONFIG_FEATURE_IP_ADDRESS=y
+CONFIG_FEATURE_IP_LINK=y
+CONFIG_FEATURE_IP_ROUTE=y
+CONFIG_FEATURE_IP_TUNNEL=y
+# CONFIG_FEATURE_IP_RULE is not set
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+# CONFIG_IPADDR is not set
+# CONFIG_IPLINK is not set
+# CONFIG_IPROUTE is not set
+# CONFIG_IPTUNNEL is not set
+# CONFIG_IPRULE is not set
+# CONFIG_IPCALC is not set
+# CONFIG_FEATURE_IPCALC_FANCY is not set
+# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
+# CONFIG_NAMEIF is not set
+CONFIG_NC=y
+# CONFIG_NC_SERVER is not set
+# CONFIG_NC_EXTRA is not set
+CONFIG_NETSTAT=y
+# CONFIG_FEATURE_NETSTAT_WIDE is not set
+CONFIG_NSLOOKUP=y
+CONFIG_PING=y
+CONFIG_PING6=y
+# CONFIG_PSCAN is not set
+CONFIG_FEATURE_FANCY_PING=y
+CONFIG_ROUTE=y
+# CONFIG_SLATTACH is not set
+CONFIG_TELNET=y
+# CONFIG_FEATURE_TELNET_TTYPE is not set
+CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+# CONFIG_TELNETD is not set
+# CONFIG_FEATURE_TELNETD_STANDALONE is not set
+CONFIG_TFTP=y
+CONFIG_FEATURE_TFTP_GET=y
+CONFIG_FEATURE_TFTP_PUT=y
+# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
+# CONFIG_DEBUG_TFTP is not set
+CONFIG_TRACEROUTE=y
+# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
+# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
+# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
+CONFIG_APP_UDHCPD=y
+# CONFIG_APP_DHCPRELAY is not set
+CONFIG_APP_DUMPLEASES=y
+# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set
+CONFIG_APP_UDHCPC=y
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+# CONFIG_FEATURE_RFC3397 is not set
+# CONFIG_VCONFIG is not set
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_LONG_OPTIONS=y
+# CONFIG_ZCIP is not set
+
+#
+# Process Utilities
+#
+CONFIG_FREE=y
+CONFIG_FUSER=y
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+# CONFIG_KILLALL5 is not set
+# CONFIG_NMETER is not set
+CONFIG_PIDOF=y
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+CONFIG_PS=y
+CONFIG_FEATURE_PS_WIDE=y
+CONFIG_RENICE=y
+CONFIG_BB_SYSCTL=y
+CONFIG_TOP=y
+CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
+CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
+# CONFIG_FEATURE_TOP_DECIMALS is not set
+CONFIG_UPTIME=y
+CONFIG_WATCH=y
+
+#
+# Shells
+#
+CONFIG_FEATURE_SH_IS_ASH=y
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+# CONFIG_FEATURE_SH_IS_LASH is not set
+# CONFIG_FEATURE_SH_IS_MSH is not set
+# CONFIG_FEATURE_SH_IS_NONE is not set
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+CONFIG_ASH_JOB_CONTROL=y
+# CONFIG_ASH_READ_NCHARS is not set
+# CONFIG_ASH_READ_TIMEOUT is not set
+CONFIG_ASH_ALIAS=y
+CONFIG_ASH_MATH_SUPPORT=y
+# CONFIG_ASH_MATH_SUPPORT_64 is not set
+CONFIG_ASH_GETOPTS=y
+# CONFIG_ASH_BUILTIN_ECHO is not set
+CONFIG_ASH_BUILTIN_TEST=y
+# CONFIG_ASH_CMDCMD is not set
+# CONFIG_ASH_MAIL is not set
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+CONFIG_ASH_EXPAND_PRMT=y
+# CONFIG_HUSH is not set
+# CONFIG_HUSH_HELP is not set
+# CONFIG_HUSH_INTERACTIVE is not set
+# CONFIG_HUSH_JOB is not set
+# CONFIG_HUSH_TICK is not set
+# CONFIG_HUSH_IF is not set
+# CONFIG_HUSH_LOOPS is not set
+# CONFIG_LASH is not set
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+CONFIG_FEATURE_SH_EXTRA_QUIET=y
+# CONFIG_FEATURE_SH_STANDALONE is not set
+# CONFIG_CTTYHACK is not set
+
+#
+# System Logging Utilities
+#
+CONFIG_SYSLOGD=y
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+CONFIG_FEATURE_REMOTE_LOG=y
+CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
+CONFIG_LOGREAD=y
+CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
+CONFIG_KLOGD=y
+CONFIG_LOGGER=y
+
+#
+# Runit Utilities
+#
+# CONFIG_RUNSV is not set
+# CONFIG_RUNSVDIR is not set
+# CONFIG_SV is not set
+# CONFIG_SVLOGD is not set
+# CONFIG_CHPST is not set
+# CONFIG_SETUIDGID is not set
+# CONFIG_ENVUIDGID is not set
+# CONFIG_ENVDIR is not set
+# CONFIG_SOFTLIMIT is not set
+# CONFIG_CHCON is not set
+# CONFIG_FEATURE_CHCON_LONG_OPTIONS is not set
+# CONFIG_GETENFORCE is not set
+# CONFIG_GETSEBOOL is not set
+# CONFIG_LOAD_POLICY is not set
+# CONFIG_MATCHPATHCON is not set
+# CONFIG_RESTORECON is not set
+# CONFIG_RUNCON is not set
+# CONFIG_FEATURE_RUNCON_LONG_OPTIONS is not set
+# CONFIG_SELINUXENABLED is not set
+# CONFIG_SETENFORCE is not set
+# CONFIG_SETFILES is not set
+# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set
+
+#
+# ipsvd utilities
+#
+# CONFIG_TCPSVD is not set
+# CONFIG_UDPSVD is not set
diff --git a/packages/busybox/busybox-1.7.2/busybox-mdev.sh b/packages/busybox/busybox-1.7.2/busybox-mdev.sh
new file mode 100755
index 0000000000..9744322fa9
--- /dev/null
+++ b/packages/busybox/busybox-1.7.2/busybox-mdev.sh
@@ -0,0 +1,69 @@
+#!/bin/sh
+MDEV=/sbin/mdev
+DESC="Busybox mdev setup"
+
+# Complain if thing's aren't right
+if [ ! -e /proc/filesystems ]; then
+ echo "mdev requires a mounted procfs, not started."
+ exit 1
+fi
+
+if ! grep -q '[[:space:]]tmpfs$' /proc/filesystems; then
+ echo "mdev requires tmpfs support, not started."
+ exit 1
+fi
+
+if [ ! -d /sys/class/ ]; then
+ echo "mdev requires a mounted sysfs, not started."
+ exit 1
+fi
+
+if [ ! -e /proc/sys/kernel/hotplug ]; then
+ echo "mdev requires hotplug support, not started."
+ exit 1
+fi
+
+# We need to unmount /dev/pts/ and remount it later over the tmpfs
+if mountpoint -q /dev/pts/; then
+ umount -l /dev/pts/
+fi
+
+if mountpoint -q /dev/shm/; then
+ umount -l /dev/shm/
+fi
+
+# Create tmpfs for /dev
+echo "Creating tmpfs at /dev"
+mount -t tmpfs tmpfs /dev -o size=800k
+
+# Register mdev as hotplug event helper
+echo "$MDEV" > /proc/sys/kernel/hotplug
+
+# Populate /dev from /sys info
+echo "Populating /dev using mdev"
+$MDEV -s
+
+# Touch .udev to inform scripts that /dev needs no further setup
+touch /dev/.udev
+
+# Mount devpts
+TTYGRP=5
+TTYMODE=620
+mkdir -m 755 -p /dev/pts
+if [ ! -e /dev/ptmx ]; then
+ mknod -m 666 /dev/ptmx c 5 2
+fi
+mount -t devpts devpts /dev/pts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
+
+# Make shm directory
+mkdir -m 755 -p /dev/shm
+
+# Make extraneous links
+ln -sf /proc/self/fd /dev/fd
+ln -sf /proc/self/fd/0 /dev/stdin
+ln -sf /proc/self/fd/1 /dev/stdout
+ln -sf /proc/self/fd/2 /dev/stderr
+ln -sf /proc/kcore /dev/core
+ln -sf /proc/asound/oss/sndstat /dev/sndstat
+
+exit 0
diff --git a/packages/busybox/busybox-1.7.2/defconfig b/packages/busybox/busybox-1.7.2/defconfig
new file mode 100644
index 0000000000..7308eead76
--- /dev/null
+++ b/packages/busybox/busybox-1.7.2/defconfig
@@ -0,0 +1,647 @@
+#
+# Automatically generated make config: don't edit
+#
+HAVE_DOT_CONFIG=y
+
+#
+# Busybox Settings
+#
+
+#
+# General Configuration
+#
+# CONFIG_NITPICK is not set
+# CONFIG_FEATURE_BUFFERS_USE_MALLOC is not set
+# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set
+# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set
+CONFIG_SHOW_USAGE=y
+# CONFIG_FEATURE_VERBOSE_USAGE is not set
+# CONFIG_FEATURE_COMPRESS_USAGE is not set
+# CONFIG_FEATURE_INSTALLER is not set
+CONFIG_LOCALE_SUPPORT=y
+CONFIG_GETOPT_LONG=y
+CONFIG_FEATURE_DEVPTS=y
+# CONFIG_FEATURE_CLEAN_UP is not set
+# CONFIG_FEATURE_SUID is not set
+# CONFIG_FEATURE_SUID_CONFIG is not set
+# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set
+# CONFIG_SELINUX is not set
+CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
+
+#
+# Build Options
+#
+# CONFIG_STATIC is not set
+# CONFIG_BUILD_LIBBUSYBOX is not set
+# CONFIG_FEATURE_FULL_LIBBUSYBOX is not set
+# CONFIG_FEATURE_SHARED_BUSYBOX is not set
+CONFIG_LFS=y
+USING_CROSS_COMPILER=y
+CROSS_COMPILER_PREFIX="arm-angstrom-linux-gnueabi-"
+CONFIG_BUILD_AT_ONCE=y
+
+#
+# Debugging Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_PESSIMIZE is not set
+# CONFIG_NO_DEBUG_LIB is not set
+# CONFIG_DMALLOC is not set
+# CONFIG_EFENCE is not set
+CONFIG_DEBUG_YANK_SUSv2=y
+
+#
+# Installation Options
+#
+# CONFIG_INSTALL_NO_USR is not set
+CONFIG_INSTALL_APPLET_SYMLINKS=y
+# CONFIG_INSTALL_APPLET_HARDLINKS is not set
+# CONFIG_INSTALL_APPLET_DONT is not set
+PREFIX="./_install"
+
+#
+# Busybox Library Tuning
+#
+CONFIG_MD5_SIZE_VS_SPEED=2
+
+#
+# Applets
+#
+
+#
+# Archival Utilities
+#
+CONFIG_AR=y
+# CONFIG_FEATURE_AR_LONG_FILENAMES is not set
+CONFIG_BUNZIP2=y
+CONFIG_CPIO=y
+# CONFIG_DPKG is not set
+# CONFIG_DPKG_DEB is not set
+# CONFIG_FEATURE_DPKG_DEB_EXTRACT_ONLY is not set
+CONFIG_GUNZIP=y
+# CONFIG_FEATURE_GUNZIP_UNCOMPRESS is not set
+CONFIG_GZIP=y
+# CONFIG_RPM2CPIO is not set
+# CONFIG_RPM is not set
+CONFIG_TAR=y
+CONFIG_FEATURE_TAR_CREATE=y
+CONFIG_FEATURE_TAR_BZIP2=y
+# CONFIG_FEATURE_TAR_LZMA is not set
+CONFIG_FEATURE_TAR_FROM=y
+CONFIG_FEATURE_TAR_GZIP=y
+# CONFIG_FEATURE_TAR_COMPRESS is not set
+# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set
+CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
+# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set
+# CONFIG_UNCOMPRESS is not set
+# CONFIG_UNLZMA is not set
+# CONFIG_FEATURE_LZMA_FAST is not set
+CONFIG_UNZIP=y
+
+#
+# Common options for cpio and tar
+#
+# CONFIG_FEATURE_UNARCHIVE_TAPE is not set
+# CONFIG_FEATURE_DEB_TAR_GZ is not set
+# CONFIG_FEATURE_DEB_TAR_BZ2 is not set
+# CONFIG_FEATURE_DEB_TAR_LZMA is not set
+
+#
+# Coreutils
+#
+CONFIG_BASENAME=y
+# CONFIG_CAL is not set
+CONFIG_CAT=y
+# CONFIG_CATV is not set
+CONFIG_CHGRP=y
+CONFIG_CHMOD=y
+CONFIG_CHOWN=y
+CONFIG_CHROOT=y
+# CONFIG_CKSUM is not set
+# CONFIG_CMP is not set
+# CONFIG_COMM is not set
+CONFIG_CP=y
+CONFIG_CUT=y
+CONFIG_DATE=y
+# CONFIG_FEATURE_DATE_ISOFMT is not set
+CONFIG_DD=y
+CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
+# CONFIG_FEATURE_DD_IBS_OBS is not set
+CONFIG_DF=y
+CONFIG_DIFF=y
+CONFIG_FEATURE_DIFF_BINARY=y
+CONFIG_FEATURE_DIFF_DIR=y
+# CONFIG_FEATURE_DIFF_MINIMAL is not set
+CONFIG_DIRNAME=y
+# CONFIG_DOS2UNIX is not set
+# CONFIG_UNIX2DOS is not set
+CONFIG_DU=y
+CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
+CONFIG_ECHO=y
+CONFIG_FEATURE_FANCY_ECHO=y
+CONFIG_ENV=y
+CONFIG_FEATURE_ENV_LONG_OPTIONS=y
+CONFIG_EXPR=y
+# CONFIG_EXPR_MATH_SUPPORT_64 is not set
+CONFIG_FALSE=y
+# CONFIG_FOLD is not set
+CONFIG_HEAD=y
+# CONFIG_FEATURE_FANCY_HEAD is not set
+# CONFIG_HOSTID is not set
+CONFIG_ID=y
+# CONFIG_INSTALL is not set
+# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set
+# CONFIG_LENGTH is not set
+CONFIG_LN=y
+CONFIG_LOGNAME=y
+CONFIG_LS=y
+CONFIG_FEATURE_LS_FILETYPES=y
+CONFIG_FEATURE_LS_FOLLOWLINKS=y
+CONFIG_FEATURE_LS_RECURSIVE=y
+CONFIG_FEATURE_LS_SORTFILES=y
+CONFIG_FEATURE_LS_TIMESTAMPS=y
+CONFIG_FEATURE_LS_USERNAME=y
+CONFIG_FEATURE_LS_COLOR=y
+# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set
+CONFIG_MD5SUM=y
+CONFIG_MKDIR=y
+CONFIG_FEATURE_MKDIR_LONG_OPTIONS=y
+CONFIG_MKFIFO=y
+CONFIG_MKNOD=y
+CONFIG_MV=y
+# CONFIG_FEATURE_MV_LONG_OPTIONS is not set
+# CONFIG_NICE is not set
+CONFIG_NOHUP=y
+CONFIG_OD=y
+# CONFIG_PRINTENV is not set
+CONFIG_PRINTF=y
+CONFIG_PWD=y
+CONFIG_REALPATH=y
+CONFIG_RM=y
+CONFIG_RMDIR=y
+CONFIG_SEQ=y
+# CONFIG_SHA1SUM is not set
+CONFIG_SLEEP=y
+CONFIG_FEATURE_FANCY_SLEEP=y
+CONFIG_SORT=y
+CONFIG_FEATURE_SORT_BIG=y
+# CONFIG_STAT is not set
+# CONFIG_FEATURE_STAT_FORMAT is not set
+CONFIG_STTY=y
+# CONFIG_SUM is not set
+CONFIG_SYNC=y
+CONFIG_TAIL=y
+CONFIG_FEATURE_FANCY_TAIL=y
+CONFIG_TEE=y
+# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set
+CONFIG_TEST=y
+# CONFIG_FEATURE_TEST_64 is not set
+CONFIG_TOUCH=y
+CONFIG_TR=y
+CONFIG_FEATURE_TR_CLASSES=y
+# CONFIG_FEATURE_TR_EQUIV is not set
+CONFIG_TRUE=y
+CONFIG_TTY=y
+CONFIG_UNAME=y
+CONFIG_UNIQ=y
+CONFIG_USLEEP=y
+# CONFIG_UUDECODE is not set
+# CONFIG_UUENCODE is not set
+CONFIG_WATCH=y
+CONFIG_WC=y
+CONFIG_WHO=y
+CONFIG_WHOAMI=y
+CONFIG_YES=y
+
+#
+# Common options for cp and mv
+#
+# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set
+
+#
+# Common options for ls, more and telnet
+#
+CONFIG_FEATURE_AUTOWIDTH=y
+
+#
+# Common options for df, du, ls
+#
+CONFIG_FEATURE_HUMAN_READABLE=y
+
+#
+# Common options for md5sum, sha1sum
+#
+CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
+
+#
+# Console Utilities
+#
+CONFIG_CHVT=y
+CONFIG_CLEAR=y
+CONFIG_DEALLOCVT=y
+CONFIG_DUMPKMAP=y
+CONFIG_LOADFONT=y
+CONFIG_LOADKMAP=y
+CONFIG_OPENVT=y
+CONFIG_RESET=y
+CONFIG_SETCONSOLE=y
+# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set
+# CONFIG_SETKEYCODES is not set
+# CONFIG_SETLOGCONS is not set
+
+#
+# Debian Utilities
+#
+CONFIG_MKTEMP=y
+# CONFIG_PIPE_PROGRESS is not set
+CONFIG_READLINK=y
+CONFIG_FEATURE_READLINK_FOLLOW=y
+CONFIG_RUN_PARTS=y
+# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set
+CONFIG_START_STOP_DAEMON=y
+CONFIG_FEATURE_START_STOP_DAEMON_FANCY=y
+CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=y
+CONFIG_WHICH=y
+
+#
+# Editors
+#
+CONFIG_AWK=y
+CONFIG_FEATURE_AWK_MATH=y
+# CONFIG_ED is not set
+CONFIG_PATCH=y
+CONFIG_SED=y
+CONFIG_VI=y
+CONFIG_FEATURE_VI_COLON=y
+CONFIG_FEATURE_VI_YANKMARK=y
+CONFIG_FEATURE_VI_SEARCH=y
+CONFIG_FEATURE_VI_USE_SIGNALS=y
+# CONFIG_FEATURE_VI_DOT_CMD is not set
+# CONFIG_FEATURE_VI_READONLY is not set
+# CONFIG_FEATURE_VI_SETOPTS is not set
+# CONFIG_FEATURE_VI_SET is not set
+CONFIG_FEATURE_VI_WIN_RESIZE=y
+CONFIG_FEATURE_VI_OPTIMIZE_CURSOR=y
+
+#
+# Finding Utilities
+#
+CONFIG_FIND=y
+CONFIG_FEATURE_FIND_PRINT0=y
+CONFIG_FEATURE_FIND_MTIME=y
+CONFIG_FEATURE_FIND_MMIN=y
+CONFIG_FEATURE_FIND_PERM=y
+CONFIG_FEATURE_FIND_TYPE=y
+CONFIG_FEATURE_FIND_XDEV=y
+CONFIG_FEATURE_FIND_NEWER=y
+# CONFIG_FEATURE_FIND_INUM is not set
+CONFIG_FEATURE_FIND_EXEC=y
+CONFIG_GREP=y
+CONFIG_FEATURE_GREP_EGREP_ALIAS=y
+CONFIG_FEATURE_GREP_FGREP_ALIAS=y
+CONFIG_FEATURE_GREP_CONTEXT=y
+CONFIG_XARGS=y
+# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set
+# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set
+# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set
+# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set
+
+#
+# Init Utilities
+#
+# CONFIG_INIT is not set
+# CONFIG_DEBUG_INIT is not set
+# CONFIG_FEATURE_USE_INITTAB is not set
+# CONFIG_FEATURE_INIT_SCTTY is not set
+# CONFIG_FEATURE_EXTRA_QUIET is not set
+# CONFIG_FEATURE_INIT_COREDUMPS is not set
+# CONFIG_FEATURE_INITRD is not set
+# CONFIG_HALT is not set
+# CONFIG_MESG is not set
+
+#
+# Login/Password Management Utilities
+#
+# CONFIG_FEATURE_SHADOWPASSWDS is not set
+# CONFIG_USE_BB_SHADOW is not set
+# CONFIG_USE_BB_PWD_GRP is not set
+# CONFIG_ADDGROUP is not set
+# CONFIG_DELGROUP is not set
+# CONFIG_ADDUSER is not set
+# CONFIG_DELUSER is not set
+# CONFIG_GETTY is not set
+CONFIG_FEATURE_UTMP=y
+# CONFIG_FEATURE_WTMP is not set
+# CONFIG_LOGIN is not set
+# CONFIG_FEATURE_SECURETTY is not set
+# CONFIG_PASSWD is not set
+# CONFIG_SU is not set
+# CONFIG_SULOGIN is not set
+# CONFIG_VLOCK is not set
+
+#
+# Linux Ext2 FS Progs
+#
+CONFIG_CHATTR=y
+CONFIG_E2FSCK=y
+CONFIG_FSCK=y
+# CONFIG_LSATTR is not set
+CONFIG_MKE2FS=y
+# CONFIG_TUNE2FS is not set
+# CONFIG_E2LABEL is not set
+# CONFIG_FINDFS is not set
+
+#
+# Linux Module Utilities
+#
+CONFIG_INSMOD=y
+# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set
+# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set
+# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set
+# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set
+# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set
+CONFIG_RMMOD=y
+CONFIG_LSMOD=y
+# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set
+CONFIG_MODPROBE=y
+CONFIG_FEATURE_MODPROBE_MULTIPLE_OPTIONS=y
+
+#
+# Options common to multiple modutils
+#
+CONFIG_FEATURE_CHECK_TAINTED_MODULE=y
+# CONFIG_FEATURE_2_4_MODULES is not set
+CONFIG_FEATURE_2_6_MODULES=y
+# CONFIG_FEATURE_QUERY_MODULE_INTERFACE is not set
+
+#
+# Linux System Utilities
+#
+CONFIG_DMESG=y
+CONFIG_FBSET=y
+CONFIG_FEATURE_FBSET_FANCY=y
+CONFIG_FEATURE_FBSET_READMODE=y
+# CONFIG_FDFLUSH is not set
+# CONFIG_FDFORMAT is not set
+CONFIG_FDISK=y
+FDISK_SUPPORT_LARGE_DISKS=y
+CONFIG_FEATURE_FDISK_WRITABLE=y
+# CONFIG_FEATURE_AIX_LABEL is not set
+# CONFIG_FEATURE_SGI_LABEL is not set
+# CONFIG_FEATURE_SUN_LABEL is not set
+# CONFIG_FEATURE_OSF_LABEL is not set
+# CONFIG_FEATURE_FDISK_ADVANCED is not set
+# CONFIG_FREERAMDISK is not set
+CONFIG_FSCK_MINIX=y
+CONFIG_MKFS_MINIX=y
+
+#
+# Minix filesystem support
+#
+CONFIG_FEATURE_MINIX2=y
+# CONFIG_GETOPT is not set
+CONFIG_HEXDUMP=y
+CONFIG_HWCLOCK=y
+CONFIG_FEATURE_HWCLOCK_LONG_OPTIONS=y
+CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=y
+# CONFIG_IPCRM is not set
+# CONFIG_IPCS is not set
+CONFIG_LOSETUP=y
+# CONFIG_MDEV is not set
+# CONFIG_FEATURE_MDEV_CONF is not set
+# CONFIG_FEATURE_MDEV_EXEC is not set
+CONFIG_MKSWAP=y
+# CONFIG_FEATURE_MKSWAP_V0 is not set
+CONFIG_MORE=y
+CONFIG_FEATURE_USE_TERMIOS=y
+CONFIG_MOUNT=y
+CONFIG_FEATURE_MOUNT_NFS=y
+CONFIG_PIVOT_ROOT=y
+CONFIG_RDATE=y
+# CONFIG_READPROFILE is not set
+# CONFIG_SETARCH is not set
+CONFIG_SWAPONOFF=y
+# CONFIG_SWITCH_ROOT is not set
+CONFIG_UMOUNT=y
+# CONFIG_FEATURE_UMOUNT_ALL is not set
+
+#
+# Common options for mount/umount
+#
+CONFIG_FEATURE_MOUNT_LOOP=y
+# CONFIG_FEATURE_MTAB_SUPPORT is not set
+
+#
+# Miscellaneous Utilities
+#
+# CONFIG_ADJTIMEX is not set
+# CONFIG_BBCONFIG is not set
+# CONFIG_CROND is not set
+# CONFIG_DEBUG_CROND_OPTION is not set
+# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set
+# CONFIG_CRONTAB is not set
+CONFIG_DC=y
+# CONFIG_DEVFSD is not set
+# CONFIG_DEVFSD_MODLOAD is not set
+# CONFIG_DEVFSD_FG_NP is not set
+# CONFIG_DEVFSD_VERBOSE is not set
+# CONFIG_FEATURE_DEVFS is not set
+# CONFIG_EJECT is not set
+# CONFIG_LAST is not set
+CONFIG_LESS=y
+CONFIG_FEATURE_LESS_BRACKETS=y
+CONFIG_FEATURE_LESS_FLAGS=y
+# CONFIG_FEATURE_LESS_FLAGCS is not set
+# CONFIG_FEATURE_LESS_MARKS is not set
+# CONFIG_FEATURE_LESS_REGEXP is not set
+# CONFIG_HDPARM is not set
+# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set
+# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set
+# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set
+# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set
+# CONFIG_MAKEDEVS is not set
+# CONFIG_FEATURE_MAKEDEVS_LEAF is not set
+# CONFIG_FEATURE_MAKEDEVS_TABLE is not set
+# CONFIG_MOUNTPOINT is not set
+# CONFIG_MT is not set
+# CONFIG_RUNLEVEL is not set
+# CONFIG_RX is not set
+CONFIG_STRINGS=y
+# CONFIG_SETSID is not set
+# CONFIG_TASKSET is not set
+CONFIG_TIME=y
+# CONFIG_WATCHDOG is not set
+
+#
+# Networking Utilities
+#
+CONFIG_FEATURE_IPV6=y
+# CONFIG_ARPING is not set
+# CONFIG_DNSD is not set
+# CONFIG_ETHER_WAKE is not set
+# CONFIG_FAKEIDENTD is not set
+# CONFIG_FTPGET is not set
+# CONFIG_FTPPUT is not set
+# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set
+CONFIG_HOSTNAME=y
+# CONFIG_HTTPD is not set
+# CONFIG_FEATURE_HTTPD_WITHOUT_INETD is not set
+# CONFIG_FEATURE_HTTPD_RELOAD_CONFIG_SIGHUP is not set
+# CONFIG_FEATURE_HTTPD_SETUID is not set
+# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set
+# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_MIME_TYPES is not set
+# CONFIG_FEATURE_HTTPD_CGI is not set
+# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set
+# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set
+# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set
+CONFIG_IFCONFIG=y
+CONFIG_FEATURE_IFCONFIG_STATUS=y
+# CONFIG_FEATURE_IFCONFIG_SLIP is not set
+# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set
+CONFIG_FEATURE_IFCONFIG_HW=y
+# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set
+CONFIG_IFUPDOWN=y
+# CONFIG_FEATURE_IFUPDOWN_IP is not set
+CONFIG_FEATURE_IFUPDOWN_IP_BUILTIN=y
+CONFIG_FEATURE_IFUPDOWN_IPV4=y
+CONFIG_FEATURE_IFUPDOWN_IPV6=y
+# CONFIG_FEATURE_IFUPDOWN_IPX is not set
+CONFIG_FEATURE_IFUPDOWN_MAPPING=y
+# CONFIG_INETD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set
+# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set
+# CONFIG_FEATURE_INETD_RPC is not set
+CONFIG_IP=y
+CONFIG_FEATURE_IP_ADDRESS=y
+CONFIG_FEATURE_IP_LINK=y
+CONFIG_FEATURE_IP_ROUTE=y
+CONFIG_FEATURE_IP_TUNNEL=y
+# CONFIG_FEATURE_IP_SHORT_FORMS is not set
+# CONFIG_IPADDR is not set
+# CONFIG_IPLINK is not set
+# CONFIG_IPROUTE is not set
+# CONFIG_IPTUNNEL is not set
+# CONFIG_IPCALC is not set
+# CONFIG_FEATURE_IPCALC_FANCY is not set
+# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set
+# CONFIG_NAMEIF is not set
+CONFIG_NC=y
+# CONFIG_NC_GAPING_SECURITY_HOLE is not set
+CONFIG_NETSTAT=y
+CONFIG_NSLOOKUP=y
+CONFIG_PING=y
+CONFIG_FEATURE_FANCY_PING=y
+CONFIG_PING6=y
+CONFIG_FEATURE_FANCY_PING6=y
+CONFIG_ROUTE=y
+CONFIG_TELNET=y
+# CONFIG_FEATURE_TELNET_TTYPE is not set
+CONFIG_FEATURE_TELNET_AUTOLOGIN=y
+# CONFIG_TELNETD is not set
+# CONFIG_FEATURE_TELNETD_INETD is not set
+CONFIG_TFTP=y
+CONFIG_FEATURE_TFTP_GET=y
+CONFIG_FEATURE_TFTP_PUT=y
+# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set
+# CONFIG_DEBUG_TFTP is not set
+CONFIG_TRACEROUTE=y
+# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set
+# CONFIG_FEATURE_TRACEROUTE_SOURCE_ROUTE is not set
+# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set
+
+#
+# udhcp Server/Client
+#
+CONFIG_APP_UDHCPD=y
+CONFIG_APP_UDHCPC=y
+CONFIG_APP_DUMPLEASES=y
+CONFIG_FEATURE_UDHCP_SYSLOG=y
+# CONFIG_FEATURE_UDHCP_DEBUG is not set
+# CONFIG_VCONFIG is not set
+CONFIG_WGET=y
+CONFIG_FEATURE_WGET_STATUSBAR=y
+CONFIG_FEATURE_WGET_AUTHENTICATION=y
+CONFIG_FEATURE_WGET_IP6_LITERAL=y
+CONFIG_FEATURE_WGET_LONG_OPTIONS=y
+# CONFIG_ZCIP is not set
+
+#
+# Process Utilities
+#
+CONFIG_FREE=y
+CONFIG_FUSER=y
+CONFIG_KILL=y
+CONFIG_KILLALL=y
+CONFIG_PIDOF=y
+# CONFIG_FEATURE_PIDOF_SINGLE is not set
+# CONFIG_FEATURE_PIDOF_OMIT is not set
+CONFIG_PS=y
+CONFIG_FEATURE_PS_WIDE=y
+CONFIG_RENICE=y
+CONFIG_BB_SYSCTL=y
+CONFIG_TOP=y
+CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
+CONFIG_UPTIME=y
+
+#
+# Shells
+#
+CONFIG_FEATURE_SH_IS_ASH=y
+# CONFIG_FEATURE_SH_IS_HUSH is not set
+# CONFIG_FEATURE_SH_IS_LASH is not set
+# CONFIG_FEATURE_SH_IS_MSH is not set
+# CONFIG_FEATURE_SH_IS_NONE is not set
+CONFIG_ASH=y
+
+#
+# Ash Shell Options
+#
+CONFIG_ASH_JOB_CONTROL=y
+# CONFIG_ASH_READ_NCHARS is not set
+# CONFIG_ASH_READ_TIMEOUT is not set
+CONFIG_ASH_ALIAS=y
+CONFIG_ASH_MATH_SUPPORT=y
+# CONFIG_ASH_MATH_SUPPORT_64 is not set
+CONFIG_ASH_GETOPTS=y
+# CONFIG_ASH_BUILTIN_ECHO is not set
+CONFIG_ASH_BUILTIN_TEST=y
+# CONFIG_ASH_CMDCMD is not set
+# CONFIG_ASH_MAIL is not set
+CONFIG_ASH_OPTIMIZE_FOR_SIZE=y
+# CONFIG_ASH_RANDOM_SUPPORT is not set
+CONFIG_ASH_EXPAND_PRMT=y
+# CONFIG_HUSH is not set
+# CONFIG_LASH is not set
+# CONFIG_MSH is not set
+
+#
+# Bourne Shell Options
+#
+CONFIG_FEATURE_SH_EXTRA_QUIET=y
+# CONFIG_FEATURE_SH_STANDALONE_SHELL is not set
+CONFIG_FEATURE_COMMAND_EDITING=y
+# CONFIG_FEATURE_COMMAND_EDITING_VI is not set
+CONFIG_FEATURE_COMMAND_HISTORY=63
+# CONFIG_FEATURE_COMMAND_SAVEHISTORY is not set
+CONFIG_FEATURE_COMMAND_TAB_COMPLETION=y
+# CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION is not set
+CONFIG_FEATURE_SH_FANCY_PROMPT=y
+
+#
+# System Logging Utilities
+#
+CONFIG_SYSLOGD=y
+CONFIG_FEATURE_ROTATE_LOGFILE=y
+CONFIG_FEATURE_REMOTE_LOG=y
+CONFIG_FEATURE_IPC_SYSLOG=y
+CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=16
+CONFIG_LOGREAD=y
+CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=y
+CONFIG_KLOGD=y
+CONFIG_LOGGER=y
diff --git a/packages/busybox/busybox-1.7.2/udhcpscript.patch b/packages/busybox/busybox-1.7.2/udhcpscript.patch
new file mode 100644
index 0000000000..fc21d440cd
--- /dev/null
+++ b/packages/busybox/busybox-1.7.2/udhcpscript.patch
@@ -0,0 +1,17 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- busybox-1.00-rc3/examples/udhcp/simple.script~udhcpscript
++++ busybox-1.00-rc3/examples/udhcp/simple.script
+@@ -17,8 +17,7 @@
+ /sbin/ifconfig $interface $ip $BROADCAST $NETMASK
+
+ if [ -n "$router" ] ; then
+- echo "deleting routers"
+- while route del default gw 0.0.0.0 dev $interface ; do
++ while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
+ :
+ done
+
diff --git a/packages/busybox/busybox_1.7.2.bb b/packages/busybox/busybox_1.7.2.bb
new file mode 100644
index 0000000000..0963e9bb9d
--- /dev/null
+++ b/packages/busybox/busybox_1.7.2.bb
@@ -0,0 +1,119 @@
+require busybox.inc
+
+PR = "r1"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.gz \
+ file://busybox-cron \
+ file://busybox-httpd \
+ file://busybox-udhcpd \
+ file://default.script \
+ file://hwclock.sh \
+ file://mount.busybox \
+ file://syslog \
+ file://syslog.conf \
+ file://udhcpscript.patch;patch=1 \
+ file://umount.busybox"
+
+
+SRC_URI += "http://busybox.net/downloads/fixes-1.7.2/busybox-1.7.2-ash.patch;patch=1 \
+ http://busybox.net/downloads/fixes-1.7.2/busybox-1.7.2-iptun.patch;patch=1 \
+ http://busybox.net/downloads/fixes-1.7.2/busybox-1.7.2-logger.patch;patch=1 \
+ http://busybox.net/downloads/fixes-1.7.2/busybox-1.7.2-tail.patch;patch=1 \
+ file://defconfig"
+
+EXTRA_OEMAKE_append = " V=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX}"
+
+do_configure () {
+ install -m 0644 ${WORKDIR}/defconfig ${S}/.config
+ cml1_do_configure
+}
+
+do_compile () {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ base_do_compile
+}
+
+do_install () {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ install -d ${D}${sysconfdir}/init.d
+ oe_runmake "PREFIX=${D}" install
+ cp -pPR ${S}/_install/* ${D}/
+
+ # Move everything to /busybox (not supposed to end up in any package)
+ install -d ${D}/busybox
+ ls ${D} -R
+
+ cp -dPr ${D}${base_bindir} ${D}${base_sbindir} ${D}${prefix} ${D}/busybox/
+ # Move the busybox binary back to /bin
+ install -d ${D}${base_bindir}
+ mv ${D}/busybox${base_bindir}/busybox ${D}${base_bindir}/
+ # Move back the sh symlink
+ test -h ${D}/busybox${base_bindir}/sh && mv ${D}/busybox${base_bindir}/sh ${D}${base_bindir}/
+
+ install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/
+ install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/
+ if grep "CONFIG_CROND=y" ${WORKDIR}/defconfig; then
+ # Move crond back to /usr/sbin/crond
+ install -d ${D}${sbindir}
+ mv ${D}/busybox${sbindir}/crond ${D}${sbindir}/
+
+ install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
+ fi
+ if grep "CONFIG_HTTPD=y" ${WORKDIR}/defconfig; then
+ # Move httpd back to /usr/sbin/httpd
+ install -d ${D}${sbindir}
+ mv ${D}/busybox${sbindir}/httpd ${D}${sbindir}/
+
+ install -m 0755 ${WORKDIR}/busybox-httpd ${D}${sysconfdir}/init.d/
+ install -d ${D}/srv/www
+ fi
+ if grep "CONFIG_APP_UDHCPD=y" ${WORKDIR}/defconfig; then
+ # Move udhcpd back to /usr/sbin/udhcpd
+ install -d ${D}${sbindir}
+ mv ${D}/busybox${sbindir}/udhcpd ${D}${sbindir}/
+
+ install -m 0755 ${WORKDIR}/busybox-udhcpd ${D}${sysconfdir}/init.d/
+ fi
+ if grep "CONFIG_HWCLOCK=y" ${WORKDIR}/defconfig; then
+ # Move hwclock back to /sbin/hwclock
+ install -d ${D}${base_sbindir}
+ mv ${D}/busybox${base_sbindir}/hwclock ${D}${base_sbindir}/
+
+ install -m 0755 ${WORKDIR}/hwclock.sh ${D}${sysconfdir}/init.d/
+ fi
+ if grep "CONFIG_APP_UDHCPC=y" ${WORKDIR}/defconfig; then
+ # Move dhcpc back to /usr/sbin/udhcpc
+ install -d ${D}${base_sbindir}
+ mv ${D}/busybox${base_sbindir}/udhcpc ${D}${base_sbindir}/
+
+ install -d ${D}${sysconfdir}/udhcpc.d
+ install -d ${D}${datadir}/udhcpc
+ install -m 0755 ${S}/examples/udhcp/simple.script ${D}${sysconfdir}/udhcpc.d/50default
+ install -m 0755 ${WORKDIR}/default.script ${D}${datadir}/udhcpc/default.script
+ fi
+
+ install -m 0644 ${S}/busybox.links ${D}${sysconfdir}
+}
+
+pkg_prerm_${PN} () {
+ # This is so you can make busybox commit suicide - removing busybox with no other packages
+ # providing its files, this will make update-alternatives work, but the update-rc.d part
+ # for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
+ tmpdir=`mktemp -d /tmp/busyboxrm-XXXXXX`
+ ln -s /bin/busybox $tmpdir/[
+ ln -s /bin/busybox $tmpdir/test
+ ln -s /bin/busybox $tmpdir/head
+ ln -s /bin/busybox $tmpdir/sh
+ ln -s /bin/busybox $tmpdir/basename
+ ln -s /bin/busybox $tmpdir/echo
+ ln -s /bin/busybox $tmpdir/mv
+ ln -s /bin/busybox $tmpdir/ln
+ ln -s /bin/busybox $tmpdir/dirname
+ ln -s /bin/busybox $tmpdir/rm
+ ln -s /bin/busybox $tmpdir/sed
+ ln -s /bin/busybox $tmpdir/sort
+ export PATH=$PATH:$tmpdir
+ while read link; do case "$link" in /*/*/*) to="../../bin/busybox";; /bin/*) to="busybox";; /*/*) to="../bin/busybox";; esac; bn=`basename $link`; sh /usr/bin/update-alternatives --remove $bn $to; done </etc/busybox.links
+}
diff --git a/packages/dbus/dbus-glib-0.72/cross.patch b/packages/dbus/dbus-glib-0.72/cross.patch
deleted file mode 100644
index b3f41c8507..0000000000
--- a/packages/dbus/dbus-glib-0.72/cross.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: dbus-glib-0.72/configure.ac
-===================================================================
---- dbus-glib-0.72.orig/configure.ac 2006-10-27 10:05:05.000000000 +0200
-+++ dbus-glib-0.72/configure.ac 2006-10-27 10:05:48.000000000 +0200
-@@ -571,6 +571,7 @@
- exit (0);
- ]])],
- [have_abstract_sockets=yes],
-+ [have_abstract_sockets=no],
- [have_abstract_sockets=no])
- AC_LANG_POP(C)
- AC_MSG_RESULT($have_abstract_sockets)
diff --git a/packages/dbus/dbus-glib-0.74/.mtn2git_empty b/packages/dbus/dbus-glib-0.74/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/dbus/dbus-glib-0.74/.mtn2git_empty
diff --git a/packages/dbus/dbus-glib/no-examples.patch b/packages/dbus/dbus-glib-0.74/no-examples.patch
index 483153db74..483153db74 100644
--- a/packages/dbus/dbus-glib/no-examples.patch
+++ b/packages/dbus/dbus-glib-0.74/no-examples.patch
diff --git a/packages/dbus/dbus-glib-0.72/no-introspect.patch b/packages/dbus/dbus-glib-0.74/no-introspect.patch
index 607f0acc9c..9115801f71 100644
--- a/packages/dbus/dbus-glib-0.72/no-introspect.patch
+++ b/packages/dbus/dbus-glib-0.74/no-introspect.patch
@@ -1,8 +1,8 @@
-Index: dbus-glib-0.72/tools/Makefile.am
+Index: dbus-glib-0.73/tools/Makefile.am
===================================================================
---- dbus-glib-0.72.orig/tools/Makefile.am 2006-10-25 21:10:36.000000000 +0200
-+++ dbus-glib-0.72/tools/Makefile.am 2006-10-27 10:07:35.000000000 +0200
-@@ -3,14 +3,8 @@
+--- dbus-glib-0.73.orig/tools/Makefile.am 2006-10-25 21:10:36.000000000 +0200
++++ dbus-glib-0.73/tools/Makefile.am 2006-10-27 10:07:35.000000000 +0200
+@@ -3,9 +3,6 @@
nodist_libdbus_glib_HEADERS = dbus-glib-bindings.h
libdbus_glibdir = $(includedir)/dbus-1.0/dbus
@@ -11,9 +11,4 @@ Index: dbus-glib-0.72/tools/Makefile.am
-
BUILT_SOURCES = dbus-glib-bindings.h dbus-bus-introspect.xml
--dbus-bus-introspect.xml:
-- DBUS_TOP_BUILDDIR=$(top_builddir) dbus-daemon --introspect > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
--
- EXTRA_DIST = run-with-tmp-session-bus.sh session.conf
-
- CLEANFILES = \
+ if USE_INTROSPECT_XML
diff --git a/packages/dbus/dbus-glib-native-0.74/.mtn2git_empty b/packages/dbus/dbus-glib-native-0.74/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/dbus/dbus-glib-native-0.74/.mtn2git_empty
diff --git a/packages/dbus/dbus-glib-native-0.72/run-with-tmp-session-bus.patch b/packages/dbus/dbus-glib-native-0.74/run-with-tmp-session-bus.patch
index ba117d0309..ba117d0309 100644
--- a/packages/dbus/dbus-glib-native-0.72/run-with-tmp-session-bus.patch
+++ b/packages/dbus/dbus-glib-native-0.74/run-with-tmp-session-bus.patch
diff --git a/packages/dbus/dbus-glib-native_0.71.bb b/packages/dbus/dbus-glib-native_0.71.bb
deleted file mode 100644
index 1f5d71da91..0000000000
--- a/packages/dbus/dbus-glib-native_0.71.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-SECTION = "base"
-PR = "r0"
-HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
-DESCRIPTION = "message bus system for applications to talk to one another"
-LICENSE = "GPL"
-
-SRC_URI = "http://freedesktop.org/software/dbus/releases/dbus-glib-${PV}.tar.gz \
- file://cross.patch;patch=1 \
- file://run-with-tmp-session-bus.patch;patch=1"
-
-inherit autotools pkgconfig gettext native
-
-S = "${WORKDIR}/dbus-glib-${PV}"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/dbus-glib"
-DEPENDS = "glib-2.0-native dbus-native"
-
-do_stage() {
- oe_runmake install
- install -d ${STAGING_DATADIR}/dbus
- install -m 0644 tools/dbus-bus-introspect.xml ${STAGING_DATADIR}/dbus
- install -m 0644 tools/dbus-glib-bindings.h ${STAGING_DATADIR}/dbus
-}
diff --git a/packages/dbus/dbus-glib-native_0.72.bb b/packages/dbus/dbus-glib-native_0.74.bb
index 90ecc4e9fe..d76cc043d4 100644
--- a/packages/dbus/dbus-glib-native_0.72.bb
+++ b/packages/dbus/dbus-glib-native_0.74.bb
@@ -1,11 +1,10 @@
SECTION = "base"
-PR = "r1"
+PR = "r0"
HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
DESCRIPTION = "message bus system for applications to talk to one another"
LICENSE = "GPL"
SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
- file://cross.patch;patch=1 \
file://run-with-tmp-session-bus.patch;patch=1"
inherit autotools pkgconfig gettext native
@@ -19,5 +18,4 @@ do_stage() {
install -d ${STAGING_DATADIR}/dbus
install -m 0644 tools/dbus-bus-introspect.xml ${STAGING_DATADIR}/dbus
install -m 0644 tools/dbus-glib-bindings.h ${STAGING_DATADIR}/dbus
- install -m 0755 dbus/.libs/dbus-binding-tool ${STAGING_BINDIR}/
}
diff --git a/packages/dbus/dbus-glib/cross.patch b/packages/dbus/dbus-glib/cross.patch
deleted file mode 100644
index 6d1d9d8e7e..0000000000
--- a/packages/dbus/dbus-glib/cross.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#
-# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher
-#
-
---- dbus-0.20/configure.in~cross
-+++ dbus-0.20/configure.in
-@@ -466,6 +466,7 @@
- exit (0);
- ]])],
- [have_abstract_sockets=yes],
-+ [have_abstract_sockets=no],
- [have_abstract_sockets=no])
- AC_LANG_POP(C)
- AC_MSG_RESULT($have_abstract_sockets)
diff --git a/packages/dbus/dbus-glib/no-introspect.patch b/packages/dbus/dbus-glib/no-introspect.patch
deleted file mode 100644
index 7057a63020..0000000000
--- a/packages/dbus/dbus-glib/no-introspect.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- dbus-glib-0.70/tools/Makefile.am.orig 2006-07-23 15:53:06.000000000 +0200
-+++ dbus-glib-0.70/tools/Makefile.am 2006-07-23 15:53:53.000000000 +0200
-@@ -3,14 +3,8 @@
- nodist_libdbus_glib_HEADERS = dbus-glib-bindings.h
- libdbus_glibdir = $(includedir)/dbus-1.0/dbus
-
--dbus-glib-bindings.h: dbus-bus-introspect.xml $(top_builddir)/dbus/dbus-binding-tool$(EXEEXT)
-- $(top_builddir)/dbus/dbus-binding-tool --mode=glib-client --output=dbus-glib-bindings.h dbus-bus-introspect.xml
--
- BUILT_SOURCES = dbus-glib-bindings.h dbus-bus-introspect.xml
-
--dbus-bus-introspect.xml:
-- DBUS_TOP_BUILDDIR=$(top_builddir) dbus-send --system --print-reply=literal --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.Introspectable.Introspect > dbus-bus-introspect.xml.tmp && mv dbus-bus-introspect.xml.tmp dbus-bus-introspect.xml
--
- EXTRA_DIST = run-with-tmp-session-bus.sh
-
- CLEANFILES = \
diff --git a/packages/dbus/dbus-glib_0.71.bb b/packages/dbus/dbus-glib_0.71.bb
deleted file mode 100644
index 26bc851098..0000000000
--- a/packages/dbus/dbus-glib_0.71.bb
+++ /dev/null
@@ -1,29 +0,0 @@
-SECTION = "base"
-PR = "r0"
-HOMEPAGE = "http://www.freedesktop.org/Software/dbus"
-DESCRIPTION = "message bus system for applications to talk to one another"
-LICENSE = "GPL"
-DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus"
-
-SRC_URI = "http://freedesktop.org/software/dbus/releases/dbus-glib-${PV}.tar.gz \
- file://cross.patch;patch=1 \
- file://no-examples.patch;patch=1 \
- file://no-introspect.patch;patch=1"
-
-inherit autotools pkgconfig gettext
-
-FILES_${PN} = "${libdir}/lib*.so.*"
-FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
-
-do_configure_prepend() {
- install -m 0644 ${STAGING_DIR}/${BUILD_SYS}/share/dbus/dbus-bus-introspect.xml ${S}/tools/
- install -m 0644 ${STAGING_DIR}/${BUILD_SYS}/share/dbus/dbus-glib-bindings.h ${S}/tools/
-}
-
-do_stage () {
- oe_libinstall -so -C dbus libdbus-glib-1 ${STAGING_LIBDIR}
-
- autotools_stage_includes
-}
-
-FILES_${PN}-dev += "${bindir}/dbus-binding-tool"
diff --git a/packages/dbus/dbus-glib_0.72.bb b/packages/dbus/dbus-glib_0.74.bb
index 641f0263a2..3754abb708 100644
--- a/packages/dbus/dbus-glib_0.72.bb
+++ b/packages/dbus/dbus-glib_0.74.bb
@@ -6,7 +6,6 @@ LICENSE = "GPL"
DEPENDS = "expat glib-2.0 virtual/libintl dbus-glib-native dbus"
SRC_URI = "http://dbus.freedesktop.org/releases/dbus-glib/dbus-glib-${PV}.tar.gz \
- file://cross.patch;patch=1 \
file://no-examples.patch;patch=1 \
file://no-introspect.patch;patch=1"
diff --git a/packages/dbus/dbus.inc b/packages/dbus/dbus.inc
index ab139b2afa..93eac00ccd 100644
--- a/packages/dbus/dbus.inc
+++ b/packages/dbus/dbus.inc
@@ -19,7 +19,7 @@ INITSCRIPT_PARAMS = "defaults"
CONFFILES_${PN} = "${sysconfdir}/dbus-1/system.conf ${sysconfdir}/dbus-1/session.conf"
-FILES_${PN} = "${bindir}/dbus-daemon-1 ${bindir}/dbus-launch ${bindir}/dbus-cleanup-sockets ${bindir}/dbus-send ${bindir}/dbus-monitor ${sysconfdir} ${datadir}/dbus-1/services ${libdir}/lib*.so.*"
+FILES_${PN} = "${bindir}/dbus-daemon* ${bindir}/dbus-uuidgen ${bindir}/dbus-launch ${bindir}/dbus-cleanup-sockets ${bindir}/dbus-send ${bindir}/dbus-monitor ${sysconfdir} ${datadir}/dbus-1/services ${libdir}/lib*.so.*"
FILES_${PN}-dev += "${libdir}/dbus-1.0/include ${bindir}/dbus-glib-tool"
pkg_postinst_dbus() {
diff --git a/packages/dbus/dbus_1.0.2.bb b/packages/dbus/dbus_1.0.2.bb
index 62a22254c3..c2b31db782 100644
--- a/packages/dbus/dbus_1.0.2.bb
+++ b/packages/dbus/dbus_1.0.2.bb
@@ -2,7 +2,7 @@ require dbus.inc
DEFAULT_PREFERENCE = "1"
-PR = "r5"
+PR = "r7"
SRC_URI = "http://dbus.freedesktop.org/releases/dbus/dbus-${PV}.tar.gz \
file://tmpdir.patch;patch=1 \
diff --git a/packages/dfu-util/dfu-util-native_svn.bb b/packages/dfu-util/dfu-util-native_svn.bb
index 9bfe4bae2c..457094df9e 100644
--- a/packages/dfu-util/dfu-util-native_svn.bb
+++ b/packages/dfu-util/dfu-util-native_svn.bb
@@ -2,7 +2,7 @@ require dfu-util_${PV}.bb
inherit native
-DEPENDS = "libusb-native"
+DEPENDS = "libusb-native usbpath-native"
do_stage() {
install -d ${STAGING_BINDIR_NATIVE}
diff --git a/packages/dfu-util/dfu-util_svn.bb b/packages/dfu-util/dfu-util_svn.bb
index 9be5b92979..1f34a5bc24 100644
--- a/packages/dfu-util/dfu-util_svn.bb
+++ b/packages/dfu-util/dfu-util_svn.bb
@@ -5,7 +5,7 @@ LICENSE = "GPL"
PV = "0.1+svnr${SRCREV}"
PR = "r0"
-DEPENDS = "libusb"
+DEPENDS = "libusb usbpath"
SRC_URI = "svn://svn.openmoko.org/trunk/src/host/;module=dfu-util;proto=http"
S = "${WORKDIR}/dfu-util"
diff --git a/packages/directfb/directfb_1.1.0.bb b/packages/directfb/directfb_1.1.0.bb
index bbda02e900..84772b6a25 100644
--- a/packages/directfb/directfb_1.1.0.bb
+++ b/packages/directfb/directfb_1.1.0.bb
@@ -7,7 +7,7 @@ SECTION = "libs"
LICENSE = "LGPL"
HOMEPAGE = "http://directfb.org"
DEPENDS = "jpeg libpng freetype zlib tslib"
-PR = "r0"
+PR = "r1"
RV = "1.1-0"
SRC_URI = "http://www.directfb.org/download/DirectFB/DirectFB-${PV}.tar.gz \
@@ -27,6 +27,7 @@ EXTRA_OECONF = "--with-gfxdrivers=none \
--enable-libmpeg3=no \
--enable-freetype=yes \
--enable-sdl=no \
+ --enable-vnc=no \
--disable-x11 \
"
@@ -38,6 +39,13 @@ do_install() {
oe_runmake 'DESTDIR=${D}' install
}
+PACKAGES_DYNAMIC = "directfb-inputdrivers-*"
+
+#python populate_packages_prepend () {
+# import os.path
+# inputdrivers_libdir = bb.data.expand('${libdir}/directfb-${RV}/inputdrivers', d)
+# do_split_packages(d, inputdrivers_libdir, '*.so$', 'directfb-inputdrivers-%s', 'Directfb plugin for %s')
+#}
FILES_directfb-dbg_append = " ${libdir}/directfb-${RV}/*/*/.debug/*.so \
${libdir}/directfb-${RV}/*/.debug/*.so \
"
@@ -50,8 +58,8 @@ FILES_directfb-dev_append = " ${libdir}/directfb-${RV}/systems/*.la \
FILES_directfb_append = " ${libdir}/directfb-${RV}/systems/*.so \
- ${libdir}/directfb-${RV}/inputdrivers/*.so \
- ${libdir}/directfb-${RV}/interfaces/*/*.so \
+ # ${libdir}/directfb-${RV}/inputdrivers/*.so \
+ # ${libdir}/directfb-${RV}/interfaces/*/*.so \
${libdir}/directfb-${RV}/wm/*.so \
${datadir}/directfb-1.1.0 \
"
diff --git a/packages/dropbear/dropbear.inc b/packages/dropbear/dropbear.inc
index a53d2dbb87..acd09d89fc 100644
--- a/packages/dropbear/dropbear.inc
+++ b/packages/dropbear/dropbear.inc
@@ -26,7 +26,7 @@ BINCOMMANDS = "dbclient ssh scp"
EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
do_configure_prepend() {
- if [ "x${DISTRO}" != "xfamiliar" -a "${DISTRO_TYPE}" = "debug" ]; then
+ if [ "x${DISTRO_TYPE}" = "xdebug" ]; then
oenote "WARNING: applying allow-nopw.patch which allows password-less logins!"
patch -p1 < ${WORKDIR}/allow-nopw.patch
fi
diff --git a/packages/ezx/ezxd/ezxd.init b/packages/ezx/ezxd/ezxd.init
index 3e33064166..a345952d1e 100644
--- a/packages/ezx/ezxd/ezxd.init
+++ b/packages/ezx/ezxd/ezxd.init
@@ -42,16 +42,10 @@ start_it_up()
# We need to sleep here because opening the mux devices takes some time
sleep 15
echo "$NAME."
- if [ -d $EVENTDIR ]; then
- run-parts --arg=start $EVENTDIR
- fi
}
shut_it_down()
{
- if [ -d "$EVENTDIR" ]; then
- run-parts --arg=stop $EVENTDIR
- fi
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --pidfile $PIDFILE
diff --git a/packages/ezx/ezxd_svn.bb b/packages/ezx/ezxd_svn.bb
index 8b3390cea9..5493ad2fe8 100644
--- a/packages/ezx/ezxd_svn.bb
+++ b/packages/ezx/ezxd_svn.bb
@@ -4,7 +4,7 @@ SECTION = "devel"
AUTHOR = "Daniel Ribeiro"
PV = "0.0+svnr${SRCREV}"
-PR = "r1"
+PR = "r2"
SRC_URI = "svn://svn.openezx.org/trunk/src/userspace/;module=ezxd;proto=http \
file://ezxd.init \
diff --git a/packages/fastcgi/fastcgi_2.4.0.bb b/packages/fastcgi/fastcgi_2.4.0.bb
index a42949cb96..beada396cd 100644
--- a/packages/fastcgi/fastcgi_2.4.0.bb
+++ b/packages/fastcgi/fastcgi_2.4.0.bb
@@ -1,6 +1,6 @@
LICENSE = "Open Market"
DESCRIPTION = "Fast CGI backend (web server to CGI handler) library"
-PR = "r0"
+PR = "r1"
SRC_URI = "http://www.fastcgi.com/dist/fcgi-${PV}.tar.gz"
@@ -8,6 +8,8 @@ S=${WORKDIR}/fcgi-${PV}
LEAD_SONAME = "libfcgi.so*"
+PARALLEL_MAKE=""
+
inherit autotools pkgconfig
do_stage() {
diff --git a/packages/fontconfig/fontconfig_2.4.1.bb b/packages/fontconfig/fontconfig_2.4.1.bb
index 098939324a..cdfc28fb38 100644
--- a/packages/fontconfig/fontconfig_2.4.1.bb
+++ b/packages/fontconfig/fontconfig_2.4.1.bb
@@ -3,9 +3,9 @@ LICENSE = "BSD"
DESCRIPTION = "A library for configuring and customizing font access."
DEPENDS = "expat freetype freetype-native zlib"
-SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz"
-
-PR = "r0"
+SRC_URI = "http://fontconfig.org/release/fontconfig-${PV}.tar.gz \
+ https://stage.maemo.org/svn/maemo/projects/haf/trunk/fontconfig/device_symbols.h"
+PR = "r1"
PACKAGES =+ "fontconfig-utils-dbg fontconfig-utils "
FILES_fontconfig-utils-dbg = "${bindir}/*.dbg"
@@ -39,6 +39,7 @@ python do_unpack () {
}
do_stage () {
+ cp ${WORKDIR}/device_symbols.h ${S}/fontconfig/
oe_libinstall -so -a -C src libfontconfig ${STAGING_LIBDIR}
install -d ${STAGING_INCDIR}/fontconfig
for i in ${S}/fontconfig/*.h; do install -m 0644 $i ${STAGING_INCDIR}/fontconfig/; done
diff --git a/packages/fpdf/.mtn2git_empty b/packages/fpdf/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/fpdf/.mtn2git_empty
diff --git a/packages/fpdf/fpdf_1.53.bb b/packages/fpdf/fpdf_1.53.bb
new file mode 100644
index 0000000000..5f551672fe
--- /dev/null
+++ b/packages/fpdf/fpdf_1.53.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "Free PDF Creator for PHP"
+SECTION = "libs"
+DEPENDS = ""
+RDEPENDS = "php"
+LICENSE = "FREEWARE"
+PR = "r0"
+
+SRC_URI = "http://www.fpdf.org/en/download/fpdf153.tgz \
+ "
+
+S = "${WORKDIR}/fpdf153"
+do_compile() {
+ :
+}
+
+do_install() {
+ install -d ${D}/usr \
+ ${D}/usr/fpdf \
+ ${D}/usr/fpdf/font \
+ ${D}/usr/fpdf/font/makefont
+
+ install -m 644 ${S}/fpdf.php ${D}/usr/fpdf/
+ install -m 644 ${S}/fpdf.css ${D}/usr/fpdf/
+ install -m 644 ${S}/font/*.php ${D}/usr/fpdf/font/
+ install -m 644 ${S}/font/makefont/* ${D}/usr/fpdf/font/makefont/
+}
+
+FILES_${PN} = "${exec_prefix}/fpdf/*.* \
+ ${exec_prefix}/fpdf/font/*.* \
+ "
+FILES_${PN}-dev = "${exec_prefix}/fpdf/font/makefont/*"
+
diff --git a/packages/gaim/pidgin_2.2.1.bb b/packages/gaim/pidgin_2.2.1.bb
new file mode 100644
index 0000000000..5531880669
--- /dev/null
+++ b/packages/gaim/pidgin_2.2.1.bb
@@ -0,0 +1,10 @@
+require pidgin.inc
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/pidgin/pidgin-${PV}.tar.bz2 \
+ file://sanitize-configure.ac.patch;patch=1 \
+ file://gconf-no-errors.patch;patch=1 \
+ file://pidgin.desktop-set-icon.patch;patch=1 \
+ file://purple-OE-branding.patch;patch=1 \
+ "
+
+PR = "r0"
diff --git a/packages/gcc/gcc-4.2.2/.mtn2git_empty b/packages/gcc/gcc-4.2.2/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/.mtn2git_empty
diff --git a/packages/gcc/gcc-4.2.2/100-uclibc-conf.patch b/packages/gcc/gcc-4.2.2/100-uclibc-conf.patch
new file mode 100644
index 0000000000..4243ff7b91
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/100-uclibc-conf.patch
@@ -0,0 +1,200 @@
+--- gcc/libgomp/configure
++++ gcc/libgomp/configure
+@@ -3771,7 +3771,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/gcc/config/cris/linux.h
++++ gcc/gcc/config/cris/linux.h
+@@ -74,7 +74,11 @@
+ #define CRIS_DEFAULT_CPU_VERSION CRIS_CPU_NG
+
+ #undef CRIS_SUBTARGET_VERSION
+-#define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
++#if UCLIBC_DEFAULT
++# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-uclibc"
++#else
++# define CRIS_SUBTARGET_VERSION " - cris-axis-linux-gnu"
++#endif
+
+ #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+
+--- gcc/libstdc++-v3/configure
++++ gcc/libstdc++-v3/configure
+@@ -4276,7 +4276,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/zlib/configure
++++ gcc/zlib/configure
+@@ -3422,7 +3422,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libobjc/configure
++++ gcc/libobjc/configure
+@@ -3309,7 +3309,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libgfortran/configure
++++ gcc/libgfortran/configure
+@@ -3695,7 +3695,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libmudflap/configure
++++ gcc/libmudflap/configure
+@@ -5378,7 +5378,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/boehm-gc/configure
++++ gcc/boehm-gc/configure
+@@ -4316,7 +4316,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libffi/configure
++++ gcc/libffi/configure
+@@ -3453,7 +3453,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libssp/configure
++++ gcc/libssp/configure
+@@ -4409,7 +4409,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/contrib/regression/objs-gcc.sh
++++ gcc/contrib/regression/objs-gcc.sh
+@@ -105,6 +105,10 @@
+ then
+ make all-gdb all-dejagnu all-ld || exit 1
+ make install-gdb install-dejagnu install-ld || exit 1
++elif [ $H_REAL_TARGET = $H_REAL_HOST -a $H_REAL_TARGET = i686-pc-linux-uclibc ]
++ then
++ make all-gdb all-dejagnu all-ld || exit 1
++ make install-gdb install-dejagnu install-ld || exit 1
+ elif [ $H_REAL_TARGET = $H_REAL_HOST ] ; then
+ make bootstrap || exit 1
+ make install || exit 1
+--- gcc/libjava/classpath/ltconfig
++++ gcc/libjava/classpath/ltconfig
+@@ -603,7 +603,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -1251,7 +1251,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+--- gcc/libjava/classpath/configure
++++ gcc/libjava/classpath/configure
+@@ -4665,7 +4665,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libjava/configure
++++ gcc/libjava/configure
+@@ -5212,7 +5212,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/libtool.m4
++++ gcc/libtool.m4
+@@ -739,7 +739,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+--- gcc/ltconfig
++++ gcc/ltconfig
+@@ -603,7 +603,7 @@
+
+ # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
+ case $host_os in
+-linux-gnu*) ;;
++linux-gnu*|linux-uclibc*) ;;
+ linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
+ esac
+
+@@ -1251,7 +1251,7 @@
+ ;;
+
+ # This must be Linux ELF.
+-linux-gnu*)
++linux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
diff --git a/packages/gcc/gcc-4.2.2/103-uclibc-conf-noupstream.patch b/packages/gcc/gcc-4.2.2/103-uclibc-conf-noupstream.patch
new file mode 100644
index 0000000000..09c9bbecfb
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/103-uclibc-conf-noupstream.patch
@@ -0,0 +1,11 @@
+--- gcc/gcc/config.gcc.uclibc100-sh~ 2006-03-06 20:46:56 +0100
++++ gcc/gcc/config.gcc 2006-03-10 15:02:41 +0100
+@@ -1905,7 +1905,7 @@
+ ;;
+ sh-*-elf* | sh[12346l]*-*-elf* | sh*-*-kaos* | \
+ sh-*-symbianelf* | sh[12346l]*-*-symbianelf* | \
+- sh-*-linux* | sh[346lbe]*-*-linux* | \
++ sh*-*-linux* | sh[346lbe]*-*-linux* | \
+ sh-*-netbsdelf* | shl*-*-netbsdelf* | sh5-*-netbsd* | sh5l*-*-netbsd* | \
+ sh64-*-netbsd* | sh64l*-*-netbsd*)
+ tmake_file="${tmake_file} sh/t-sh sh/t-elf"
diff --git a/packages/gcc/gcc-4.2.2/110-arm-eabi.patch b/packages/gcc/gcc-4.2.2/110-arm-eabi.patch
new file mode 100644
index 0000000000..acebe5308f
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/110-arm-eabi.patch
@@ -0,0 +1,27 @@
+--- gcc-2005q3-1.orig/gcc/config.gcc 2005-10-31 19:02:54.000000000 +0300
++++ gcc-2005q3-1/gcc/config.gcc 2006-01-27 01:09:09.000000000 +0300
+@@ -674,7 +674,7 @@
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="t-slibgcc-elf-ver t-linux arm/t-arm"
+ case ${target} in
+- arm*-*-linux-gnueabi)
++ arm*-*-linux-gnueabi | arm*-*-linux-uclibcgnueabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
+ # The BPABI long long divmod functions return a 128-bit value in
+
+diff -urN gcc-2005q3-2/gcc/config/arm/linux-eabi.h gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h
+--- gcc-2005q3-2/gcc/config/arm/linux-eabi.h 2005-12-07 23:14:16.000000000 +0300
++++ gcc-2005q3-2.new/gcc/config/arm/linux-eabi.h 2006-03-29 19:02:34.000000000 +0400
+@@ -53,7 +53,11 @@
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
+ #undef LINUX_TARGET_INTERPRETER
++#ifdef USE_UCLIBC
++#define LINUX_TARGET_INTERPRETER "/lib/ld-uClibc.so.0"
++#else
+ #define LINUX_TARGET_INTERPRETER "/lib/ld-linux.so.3"
++#endif
+
+ /* At this point, bpabi.h will have clobbered LINK_SPEC. We want to
+ use the GNU/Linux version, not the generic BPABI version. */
diff --git a/packages/gcc/gcc-4.2.2/200-uclibc-locale.patch b/packages/gcc/gcc-4.2.2/200-uclibc-locale.patch
new file mode 100644
index 0000000000..ea21388b75
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/200-uclibc-locale.patch
@@ -0,0 +1,2790 @@
+--- gcc/libstdc++-v3/acinclude.m4
++++ gcc/libstdc++-v3/acinclude.m4
+@@ -1369,7 +1369,7 @@
+ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
+ GLIBCXX_ENABLE(clocale,auto,[@<:@=MODEL@:>@],
+ [use MODEL for target locale package],
+- [permit generic|gnu|ieee_1003.1-2001|yes|no|auto])
++ [permit generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto])
+
+ # Deal with gettext issues. Default to not using it (=no) until we detect
+ # support for it later. Let the user turn it off via --e/d, but let that
+@@ -1385,6 +1385,9 @@
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
++ *-uclibc*)
++ enable_clocale_flag=uclibc
++ ;;
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ AC_EGREP_CPP([_GLIBCXX_ok], [
+ #include <features.h>
+@@ -1528,6 +1531,40 @@
+ CTIME_CC=config/locale/generic/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
++ uclibc)
++ AC_MSG_RESULT(uclibc)
++
++ # Declare intention to use gettext, and add support for specific
++ # languages.
++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++ ALL_LINGUAS="de fr"
++
++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++ AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++ USE_NLS=yes
++ fi
++ # Export the build objects.
++ for ling in $ALL_LINGUAS; do \
++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++ done
++ AC_SUBST(glibcxx_MOFILES)
++ AC_SUBST(glibcxx_POFILES)
++
++ CLOCALE_H=config/locale/uclibc/c_locale.h
++ CLOCALE_CC=config/locale/uclibc/c_locale.cc
++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++ CMESSAGES_H=config/locale/uclibc/messages_members.h
++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++ CMONEY_CC=config/locale/uclibc/monetary_members.cc
++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++ CTIME_H=config/locale/uclibc/time_members.h
++ CTIME_CC=config/locale/uclibc/time_members.cc
++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++ ;;
+ esac
+
+ # This is where the testsuite looks for locale catalogs, using the
+--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
++++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h
+@@ -0,0 +1,63 @@
++// Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*-
++
++// Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++// Written by Jakub Jelinek <jakub@redhat.com>
++
++#include <bits/c++config.h>
++#include <clocale>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning clean this up
++#endif
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++
++extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l;
++extern "C" __typeof(strcoll_l) __strcoll_l;
++extern "C" __typeof(strftime_l) __strftime_l;
++extern "C" __typeof(strtod_l) __strtod_l;
++extern "C" __typeof(strtof_l) __strtof_l;
++extern "C" __typeof(strtold_l) __strtold_l;
++extern "C" __typeof(strxfrm_l) __strxfrm_l;
++extern "C" __typeof(newlocale) __newlocale;
++extern "C" __typeof(freelocale) __freelocale;
++extern "C" __typeof(duplocale) __duplocale;
++extern "C" __typeof(uselocale) __uselocale;
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++extern "C" __typeof(iswctype_l) __iswctype_l;
++extern "C" __typeof(towlower_l) __towlower_l;
++extern "C" __typeof(towupper_l) __towupper_l;
++extern "C" __typeof(wcscoll_l) __wcscoll_l;
++extern "C" __typeof(wcsftime_l) __wcsftime_l;
++extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l;
++extern "C" __typeof(wctype_l) __wctype_l;
++#endif
++
++#endif // GLIBC 2.3 and later
+--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc
+@@ -0,0 +1,160 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8 Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <cerrno> // For errno
++#include <locale>
++#include <stdexcept>
++#include <langinfo.h>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
++#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
++#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
++#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
++#define __strtof_l(S, E, L) strtof((S), (E))
++#define __strtod_l(S, E, L) strtod((S), (E))
++#define __strtold_l(S, E, L) strtold((S), (E))
++#warning should dummy __newlocale check for C|POSIX ?
++#define __newlocale(a, b, c) NULL
++#define __freelocale(a) ((void)0)
++#define __duplocale(a) __c_locale()
++#endif
++
++namespace std
++{
++ template<>
++ void
++ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ float __f = __strtof_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __f;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ template<>
++ void
++ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ double __d = __strtod_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __d;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ template<>
++ void
++ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
++ const __c_locale& __cloc)
++ {
++ if (!(__err & ios_base::failbit))
++ {
++ char* __sanity;
++ errno = 0;
++ long double __ld = __strtold_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __ld;
++ else
++ __err |= ios_base::failbit;
++ }
++ }
++
++ void
++ locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s,
++ __c_locale __old)
++ {
++ __cloc = __newlocale(1 << LC_ALL, __s, __old);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ if (!__cloc)
++ {
++ // This named locale is not supported by the underlying OS.
++ __throw_runtime_error(__N("locale::facet::_S_create_c_locale "
++ "name not valid"));
++ }
++#endif
++ }
++
++ void
++ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
++ {
++ if (_S_get_c_locale() != __cloc)
++ __freelocale(__cloc);
++ }
++
++ __c_locale
++ locale::facet::_S_clone_c_locale(__c_locale& __cloc)
++ { return __duplocale(__cloc); }
++} // namespace std
++
++namespace __gnu_cxx
++{
++ const char* const category_names[6 + _GLIBCXX_NUM_CATEGORIES] =
++ {
++ "LC_CTYPE",
++ "LC_NUMERIC",
++ "LC_TIME",
++ "LC_COLLATE",
++ "LC_MONETARY",
++ "LC_MESSAGES",
++#if _GLIBCXX_NUM_CATEGORIES != 0
++ "LC_PAPER",
++ "LC_NAME",
++ "LC_ADDRESS",
++ "LC_TELEPHONE",
++ "LC_MEASUREMENT",
++ "LC_IDENTIFICATION"
++#endif
++ };
++}
++
++namespace std
++{
++ const char* const* const locale::_S_categories = __gnu_cxx::category_names;
++} // namespace std
+--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h
++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h
+@@ -0,0 +1,117 @@
++// Wrapper for underlying C-language localization -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.8 Standard locale categories.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifndef _C_LOCALE_H
++#define _C_LOCALE_H 1
++
++#pragma GCC system_header
++
++#include <cstring> // get std::strlen
++#include <cstdio> // get std::snprintf or std::sprintf
++#include <clocale>
++#include <langinfo.h> // For codecvt
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this
++#endif
++#ifdef __UCLIBC_HAS_LOCALE__
++#include <iconv.h> // For codecvt using iconv, iconv_t
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#include <libintl.h> // For messages
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning what is _GLIBCXX_C_LOCALE_GNU for
++#endif
++#define _GLIBCXX_C_LOCALE_GNU 1
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix categories
++#endif
++// #define _GLIBCXX_NUM_CATEGORIES 6
++#define _GLIBCXX_NUM_CATEGORIES 0
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++namespace __gnu_cxx
++{
++ extern "C" __typeof(uselocale) __uselocale;
++}
++#endif
++
++namespace std
++{
++#ifdef __UCLIBC_HAS_XLOCALE__
++ typedef __locale_t __c_locale;
++#else
++ typedef int* __c_locale;
++#endif
++
++ // Convert numeric value of type _Tv to string and return length of
++ // string. If snprintf is available use it, otherwise fall back to
++ // the unsafe sprintf which, in general, can be dangerous and should
++ // be avoided.
++ template<typename _Tv>
++ int
++ __convert_from_v(char* __out,
++ const int __size __attribute__ ((__unused__)),
++ const char* __fmt,
++#ifdef __UCLIBC_HAS_XCLOCALE__
++ _Tv __v, const __c_locale& __cloc, int __prec)
++ {
++ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
++#else
++ _Tv __v, const __c_locale&, int __prec)
++ {
++# ifdef __UCLIBC_HAS_LOCALE__
++ char* __old = std::setlocale(LC_ALL, NULL);
++ char* __sav = new char[std::strlen(__old) + 1];
++ std::strcpy(__sav, __old);
++ std::setlocale(LC_ALL, "C");
++# endif
++#endif
++
++ const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++
++#ifdef __UCLIBC_HAS_XCLOCALE__
++ __gnu_cxx::__uselocale(__old);
++#elif defined __UCLIBC_HAS_LOCALE__
++ std::setlocale(LC_ALL, __sav);
++ delete [] __sav;
++#endif
++ return __ret;
++ }
++}
++
++#endif
+--- gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/codecvt_members.cc
+@@ -0,0 +1,306 @@
++// std::codecvt implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2002, 2003 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.5 - Template class codecvt
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++namespace std
++{
++ // Specializations.
++#ifdef _GLIBCXX_USE_WCHAR_T
++ codecvt_base::result
++ codecvt<wchar_t, char, mbstate_t>::
++ do_out(state_type& __state, const intern_type* __from,
++ const intern_type* __from_end, const intern_type*& __from_next,
++ extern_type* __to, extern_type* __to_end,
++ extern_type*& __to_next) const
++ {
++ result __ret = ok;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // wcsnrtombs is *very* fast but stops if encounters NUL characters:
++ // in case we fall back to wcrtomb and then continue, in a loop.
++ // NB: wcsnrtombs is a GNU extension
++ for (__from_next = __from, __to_next = __to;
++ __from_next < __from_end && __to_next < __to_end
++ && __ret == ok;)
++ {
++ const intern_type* __from_chunk_end = wmemchr(__from_next, L'\0',
++ __from_end - __from_next);
++ if (!__from_chunk_end)
++ __from_chunk_end = __from_end;
++
++ __from = __from_next;
++ const size_t __conv = wcsnrtombs(__to_next, &__from_next,
++ __from_chunk_end - __from_next,
++ __to_end - __to_next, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // wcrtomb.
++ for (; __from < __from_next; ++__from)
++ __to_next += wcrtomb(__to_next, *__from, &__tmp_state);
++ __state = __tmp_state;
++ __ret = error;
++ }
++ else if (__from_next && __from_next < __from_chunk_end)
++ {
++ __to_next += __conv;
++ __ret = partial;
++ }
++ else
++ {
++ __from_next = __from_chunk_end;
++ __to_next += __conv;
++ }
++
++ if (__from_next < __from_end && __ret == ok)
++ {
++ extern_type __buf[MB_LEN_MAX];
++ __tmp_state = __state;
++ const size_t __conv = wcrtomb(__buf, *__from_next, &__tmp_state);
++ if (__conv > static_cast<size_t>(__to_end - __to_next))
++ __ret = partial;
++ else
++ {
++ memcpy(__to_next, __buf, __conv);
++ __state = __tmp_state;
++ __to_next += __conv;
++ ++__from_next;
++ }
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++
++ codecvt_base::result
++ codecvt<wchar_t, char, mbstate_t>::
++ do_in(state_type& __state, const extern_type* __from,
++ const extern_type* __from_end, const extern_type*& __from_next,
++ intern_type* __to, intern_type* __to_end,
++ intern_type*& __to_next) const
++ {
++ result __ret = ok;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++ // in case we store a L'\0' and then continue, in a loop.
++ // NB: mbsnrtowcs is a GNU extension
++ for (__from_next = __from, __to_next = __to;
++ __from_next < __from_end && __to_next < __to_end
++ && __ret == ok;)
++ {
++ const extern_type* __from_chunk_end;
++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from_next, '\0',
++ __from_end
++ - __from_next));
++ if (!__from_chunk_end)
++ __from_chunk_end = __from_end;
++
++ __from = __from_next;
++ size_t __conv = mbsnrtowcs(__to_next, &__from_next,
++ __from_chunk_end - __from_next,
++ __to_end - __to_next, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // mbrtowc.
++ for (;; ++__to_next, __from += __conv)
++ {
++ __conv = mbrtowc(__to_next, __from, __from_end - __from,
++ &__tmp_state);
++ if (__conv == static_cast<size_t>(-1)
++ || __conv == static_cast<size_t>(-2))
++ break;
++ }
++ __from_next = __from;
++ __state = __tmp_state;
++ __ret = error;
++ }
++ else if (__from_next && __from_next < __from_chunk_end)
++ {
++ // It is unclear what to return in this case (see DR 382).
++ __to_next += __conv;
++ __ret = partial;
++ }
++ else
++ {
++ __from_next = __from_chunk_end;
++ __to_next += __conv;
++ }
++
++ if (__from_next < __from_end && __ret == ok)
++ {
++ if (__to_next < __to_end)
++ {
++ // XXX Probably wrong for stateful encodings
++ __tmp_state = __state;
++ ++__from_next;
++ *__to_next++ = L'\0';
++ }
++ else
++ __ret = partial;
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_encoding() const throw()
++ {
++ // XXX This implementation assumes that the encoding is
++ // stateless and is either single-byte or variable-width.
++ int __ret = 0;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++ if (MB_CUR_MAX == 1)
++ __ret = 1;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_max_length() const throw()
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++ // XXX Probably wrong for stateful encodings.
++ int __ret = MB_CUR_MAX;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __ret;
++ }
++
++ int
++ codecvt<wchar_t, char, mbstate_t>::
++ do_length(state_type& __state, const extern_type* __from,
++ const extern_type* __end, size_t __max) const
++ {
++ int __ret = 0;
++ state_type __tmp_state(__state);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_codecvt);
++#endif
++
++ // mbsnrtowcs is *very* fast but stops if encounters NUL characters:
++ // in case we advance past it and then continue, in a loop.
++ // NB: mbsnrtowcs is a GNU extension
++
++ // A dummy internal buffer is needed in order for mbsnrtocws to consider
++ // its fourth parameter (it wouldn't with NULL as first parameter).
++ wchar_t* __to = static_cast<wchar_t*>(__builtin_alloca(sizeof(wchar_t)
++ * __max));
++ while (__from < __end && __max)
++ {
++ const extern_type* __from_chunk_end;
++ __from_chunk_end = static_cast<const extern_type*>(memchr(__from, '\0',
++ __end
++ - __from));
++ if (!__from_chunk_end)
++ __from_chunk_end = __end;
++
++ const extern_type* __tmp_from = __from;
++ size_t __conv = mbsnrtowcs(__to, &__from,
++ __from_chunk_end - __from,
++ __max, &__state);
++ if (__conv == static_cast<size_t>(-1))
++ {
++ // In case of error, in order to stop at the exact place we
++ // have to start again from the beginning with a series of
++ // mbrtowc.
++ for (__from = __tmp_from;; __from += __conv)
++ {
++ __conv = mbrtowc(NULL, __from, __end - __from,
++ &__tmp_state);
++ if (__conv == static_cast<size_t>(-1)
++ || __conv == static_cast<size_t>(-2))
++ break;
++ }
++ __state = __tmp_state;
++ __ret += __from - __tmp_from;
++ break;
++ }
++ if (!__from)
++ __from = __from_chunk_end;
++
++ __ret += __from - __tmp_from;
++ __max -= __conv;
++
++ if (__from < __end && __max)
++ {
++ // XXX Probably wrong for stateful encodings
++ __tmp_state = __state;
++ ++__from;
++ ++__ret;
++ --__max;
++ }
++ }
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++
++ return __ret;
++ }
++#endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc
+@@ -0,0 +1,80 @@
++// std::collate implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.4.1.2 collate virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
++#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
++#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
++#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
++#endif
++
++namespace std
++{
++ // These are basically extensions to char_traits, and perhaps should
++ // be put there instead of here.
++ template<>
++ int
++ collate<char>::_M_compare(const char* __one, const char* __two) const
++ {
++ int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++ }
++
++ template<>
++ size_t
++ collate<char>::_M_transform(char* __to, const char* __from,
++ size_t __n) const
++ { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ int
++ collate<wchar_t>::_M_compare(const wchar_t* __one,
++ const wchar_t* __two) const
++ {
++ int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
++ return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
++ }
++
++ template<>
++ size_t
++ collate<wchar_t>::_M_transform(wchar_t* __to, const wchar_t* __from,
++ size_t __n) const
++ { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
++#endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc
+@@ -0,0 +1,300 @@
++// std::ctype implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.1.1.2 ctype virtual functions.
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __wctype_l(S, L) wctype((S))
++#define __towupper_l(C, L) towupper((C))
++#define __towlower_l(C, L) towlower((C))
++#define __iswctype_l(C, M, L) iswctype((C), (M))
++#endif
++
++namespace std
++{
++ // NB: The other ctype<char> specializations are in src/locale.cc and
++ // various /config/os/* files.
++ template<>
++ ctype_byname<char>::ctype_byname(const char* __s, size_t __refs)
++ : ctype<char>(0, false, __refs)
++ {
++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++ {
++ this->_S_destroy_c_locale(this->_M_c_locale_ctype);
++ this->_S_create_c_locale(this->_M_c_locale_ctype, __s);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ this->_M_toupper = this->_M_c_locale_ctype->__ctype_toupper;
++ this->_M_tolower = this->_M_c_locale_ctype->__ctype_tolower;
++ this->_M_table = this->_M_c_locale_ctype->__ctype_b;
++#endif
++ }
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ ctype<wchar_t>::__wmask_type
++ ctype<wchar_t>::_M_convert_to_wmask(const mask __m) const
++ {
++ __wmask_type __ret;
++ switch (__m)
++ {
++ case space:
++ __ret = __wctype_l("space", _M_c_locale_ctype);
++ break;
++ case print:
++ __ret = __wctype_l("print", _M_c_locale_ctype);
++ break;
++ case cntrl:
++ __ret = __wctype_l("cntrl", _M_c_locale_ctype);
++ break;
++ case upper:
++ __ret = __wctype_l("upper", _M_c_locale_ctype);
++ break;
++ case lower:
++ __ret = __wctype_l("lower", _M_c_locale_ctype);
++ break;
++ case alpha:
++ __ret = __wctype_l("alpha", _M_c_locale_ctype);
++ break;
++ case digit:
++ __ret = __wctype_l("digit", _M_c_locale_ctype);
++ break;
++ case punct:
++ __ret = __wctype_l("punct", _M_c_locale_ctype);
++ break;
++ case xdigit:
++ __ret = __wctype_l("xdigit", _M_c_locale_ctype);
++ break;
++ case alnum:
++ __ret = __wctype_l("alnum", _M_c_locale_ctype);
++ break;
++ case graph:
++ __ret = __wctype_l("graph", _M_c_locale_ctype);
++ break;
++ default:
++ __ret = __wmask_type();
++ }
++ return __ret;
++ }
++
++ wchar_t
++ ctype<wchar_t>::do_toupper(wchar_t __c) const
++ { return __towupper_l(__c, _M_c_locale_ctype); }
++
++ const wchar_t*
++ ctype<wchar_t>::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi)
++ {
++ *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
++ ++__lo;
++ }
++ return __hi;
++ }
++
++ wchar_t
++ ctype<wchar_t>::do_tolower(wchar_t __c) const
++ { return __towlower_l(__c, _M_c_locale_ctype); }
++
++ const wchar_t*
++ ctype<wchar_t>::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi)
++ {
++ *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
++ ++__lo;
++ }
++ return __hi;
++ }
++
++ bool
++ ctype<wchar_t>::
++ do_is(mask __m, wchar_t __c) const
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ bool __ret = false;
++ const size_t __bitmasksize = 11;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__m & _M_bit[__bitcur]
++ && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++ {
++ __ret = true;
++ break;
++ }
++ return __ret;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
++ {
++ for (; __lo < __hi; ++__vec, ++__lo)
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ const size_t __bitmasksize = 11;
++ mask __m = 0;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__iswctype_l(*__lo, _M_wmask[__bitcur], _M_c_locale_ctype))
++ __m |= _M_bit[__bitcur];
++ *__vec = __m;
++ }
++ return __hi;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
++ {
++ while (__lo < __hi && !this->do_is(__m, *__lo))
++ ++__lo;
++ return __lo;
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
++ {
++ while (__lo < __hi && this->do_is(__m, *__lo) != 0)
++ ++__lo;
++ return __lo;
++ }
++
++ wchar_t
++ ctype<wchar_t>::
++ do_widen(char __c) const
++ { return _M_widen[static_cast<unsigned char>(__c)]; }
++
++ const char*
++ ctype<wchar_t>::
++ do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
++ {
++ while (__lo < __hi)
++ {
++ *__dest = _M_widen[static_cast<unsigned char>(*__lo)];
++ ++__lo;
++ ++__dest;
++ }
++ return __hi;
++ }
++
++ char
++ ctype<wchar_t>::
++ do_narrow(wchar_t __wc, char __dfault) const
++ {
++ if (__wc >= 0 && __wc < 128 && _M_narrow_ok)
++ return _M_narrow[__wc];
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ const int __c = wctob(__wc);
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return (__c == EOF ? __dfault : static_cast<char>(__c));
++ }
++
++ const wchar_t*
++ ctype<wchar_t>::
++ do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault,
++ char* __dest) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ if (_M_narrow_ok)
++ while (__lo < __hi)
++ {
++ if (*__lo >= 0 && *__lo < 128)
++ *__dest = _M_narrow[*__lo];
++ else
++ {
++ const int __c = wctob(*__lo);
++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++ }
++ ++__lo;
++ ++__dest;
++ }
++ else
++ while (__lo < __hi)
++ {
++ const int __c = wctob(*__lo);
++ *__dest = (__c == EOF ? __dfault : static_cast<char>(__c));
++ ++__lo;
++ ++__dest;
++ }
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ return __hi;
++ }
++
++ void
++ ctype<wchar_t>::_M_initialize_ctype()
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_ctype);
++#endif
++ wint_t __i;
++ for (__i = 0; __i < 128; ++__i)
++ {
++ const int __c = wctob(__i);
++ if (__c == EOF)
++ break;
++ else
++ _M_narrow[__i] = static_cast<char>(__c);
++ }
++ if (__i == 128)
++ _M_narrow_ok = true;
++ else
++ _M_narrow_ok = false;
++ for (size_t __j = 0;
++ __j < sizeof(_M_widen) / sizeof(wint_t); ++__j)
++ _M_widen[__j] = btowc(__j);
++
++ for (size_t __k = 0; __k <= 11; ++__k)
++ {
++ _M_bit[__k] = static_cast<mask>(_ISbit(__k));
++ _M_wmask[__k] = _M_convert_to_wmask(_M_bit[__k]);
++ }
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#endif
++ }
++#endif // _GLIBCXX_USE_WCHAR_T
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc
+@@ -0,0 +1,100 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2 messages virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix gettext stuff
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__dcgettext(const char *domainname,
++ const char *msgid, int category);
++#undef gettext
++#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#else
++#undef gettext
++#define gettext(msgid) (msgid)
++#endif
++
++namespace std
++{
++ // Specializations.
++ template<>
++ string
++ messages<char>::do_get(catalog, int, int, const string& __dfault) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_messages);
++ const char* __msg = const_cast<const char*>(gettext(__dfault.c_str()));
++ __uselocale(__old);
++ return string(__msg);
++#elif defined __UCLIBC_HAS_LOCALE__
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_messages);
++ const char* __msg = gettext(__dfault.c_str());
++ setlocale(LC_ALL, __old);
++ free(__old);
++ return string(__msg);
++#else
++ const char* __msg = gettext(__dfault.c_str());
++ return string(__msg);
++#endif
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ wstring
++ messages<wchar_t>::do_get(catalog, int, int, const wstring& __dfault) const
++ {
++# ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(_M_c_locale_messages);
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ __uselocale(__old);
++ return _M_convert_from_char(__msg);
++# elif defined __UCLIBC_HAS_LOCALE__
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_messages);
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ setlocale(LC_ALL, __old);
++ free(__old);
++ return _M_convert_from_char(__msg);
++# else
++ char* __msg = gettext(_M_convert_to_char(__dfault));
++ return _M_convert_from_char(__msg);
++# endif
++ }
++#endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h
++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h
+@@ -0,0 +1,118 @@
++// std::messages implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.7.1.2 messages functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix prototypes for *textdomain funcs
++#endif
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++extern "C" char *__textdomain(const char *domainname);
++extern "C" char *__bindtextdomain(const char *domainname,
++ const char *dirname);
++#else
++#undef __textdomain
++#undef __bindtextdomain
++#define __textdomain(D) ((void)0)
++#define __bindtextdomain(D,P) ((void)0)
++#endif
++
++ // Non-virtual member functions.
++ template<typename _CharT>
++ messages<_CharT>::messages(size_t __refs)
++ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
++ _M_name_messages(_S_get_c_name())
++ { }
++
++ template<typename _CharT>
++ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
++ size_t __refs)
++ : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
++ _M_name_messages(__s)
++ {
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ _M_name_messages = __tmp;
++ }
++
++ template<typename _CharT>
++ typename messages<_CharT>::catalog
++ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
++ const char* __dir) const
++ {
++ __bindtextdomain(__s.c_str(), __dir);
++ return this->do_open(__s, __loc);
++ }
++
++ // Virtual member functions.
++ template<typename _CharT>
++ messages<_CharT>::~messages()
++ {
++ if (_M_name_messages != _S_get_c_name())
++ delete [] _M_name_messages;
++ _S_destroy_c_locale(_M_c_locale_messages);
++ }
++
++ template<typename _CharT>
++ typename messages<_CharT>::catalog
++ messages<_CharT>::do_open(const basic_string<char>& __s,
++ const locale&) const
++ {
++ // No error checking is done, assume the catalog exists and can
++ // be used.
++ __textdomain(__s.c_str());
++ return 0;
++ }
++
++ template<typename _CharT>
++ void
++ messages<_CharT>::do_close(catalog) const
++ { }
++
++ // messages_byname
++ template<typename _CharT>
++ messages_byname<_CharT>::messages_byname(const char* __s, size_t __refs)
++ : messages<_CharT>(__refs)
++ {
++ if (this->_M_name_messages != locale::facet::_S_get_c_name())
++ delete [] this->_M_name_messages;
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ this->_M_name_messages = __tmp;
++
++ if (std::strcmp(__s, "C") != 0 && std::strcmp(__s, "POSIX") != 0)
++ {
++ this->_S_destroy_c_locale(this->_M_c_locale_messages);
++ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
++ }
++ }
+--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc
+@@ -0,0 +1,692 @@
++// std::moneypunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.6.3.2 moneypunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning optimize this for uclibc
++#warning tailor for stub locale support
++#endif
++
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ // Construct and return valid pattern consisting of some combination of:
++ // space none symbol sign value
++ money_base::pattern
++ money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
++ {
++ pattern __ret;
++
++ // This insanely complicated routine attempts to construct a valid
++ // pattern for use with monyepunct. A couple of invariants:
++
++ // if (__precedes) symbol -> value
++ // else value -> symbol
++
++ // if (__space) space
++ // else none
++
++ // none == never first
++ // space never first or last
++
++ // Any elegant implementations of this are welcome.
++ switch (__posn)
++ {
++ case 0:
++ case 1:
++ // 1 The sign precedes the value and symbol.
++ __ret.field[0] = sign;
++ if (__space)
++ {
++ // Pattern starts with sign.
++ if (__precedes)
++ {
++ __ret.field[1] = symbol;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[1] = value;
++ __ret.field[3] = symbol;
++ }
++ __ret.field[2] = space;
++ }
++ else
++ {
++ // Pattern starts with sign and ends with none.
++ if (__precedes)
++ {
++ __ret.field[1] = symbol;
++ __ret.field[2] = value;
++ }
++ else
++ {
++ __ret.field[1] = value;
++ __ret.field[2] = symbol;
++ }
++ __ret.field[3] = none;
++ }
++ break;
++ case 2:
++ // 2 The sign follows the value and symbol.
++ if (__space)
++ {
++ // Pattern either ends with sign.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[2] = value;
++ }
++ else
++ {
++ __ret.field[0] = value;
++ __ret.field[2] = symbol;
++ }
++ __ret.field[1] = space;
++ __ret.field[3] = sign;
++ }
++ else
++ {
++ // Pattern ends with sign then none.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[1] = value;
++ }
++ else
++ {
++ __ret.field[0] = value;
++ __ret.field[1] = symbol;
++ }
++ __ret.field[2] = sign;
++ __ret.field[3] = none;
++ }
++ break;
++ case 3:
++ // 3 The sign immediately precedes the symbol.
++ if (__precedes)
++ {
++ __ret.field[0] = sign;
++ __ret.field[1] = symbol;
++ if (__space)
++ {
++ __ret.field[2] = space;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[2] = value;
++ __ret.field[3] = none;
++ }
++ }
++ else
++ {
++ __ret.field[0] = value;
++ if (__space)
++ {
++ __ret.field[1] = space;
++ __ret.field[2] = sign;
++ __ret.field[3] = symbol;
++ }
++ else
++ {
++ __ret.field[1] = sign;
++ __ret.field[2] = symbol;
++ __ret.field[3] = none;
++ }
++ }
++ break;
++ case 4:
++ // 4 The sign immediately follows the symbol.
++ if (__precedes)
++ {
++ __ret.field[0] = symbol;
++ __ret.field[1] = sign;
++ if (__space)
++ {
++ __ret.field[2] = space;
++ __ret.field[3] = value;
++ }
++ else
++ {
++ __ret.field[2] = value;
++ __ret.field[3] = none;
++ }
++ }
++ else
++ {
++ __ret.field[0] = value;
++ if (__space)
++ {
++ __ret.field[1] = space;
++ __ret.field[2] = symbol;
++ __ret.field[3] = sign;
++ }
++ else
++ {
++ __ret.field[1] = symbol;
++ __ret.field[2] = sign;
++ __ret.field[3] = none;
++ }
++ }
++ break;
++ default:
++ ;
++ }
++ return __ret;
++ }
++
++ template<>
++ void
++ moneypunct<char, true>::_M_initialize_moneypunct(__c_locale __cloc,
++ const char*)
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<char, true>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = "";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = "";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = "";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ __cloc));
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++ char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++ if (!__nposn)
++ _M_data->_M_negative_sign = "()";
++ else
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ __cloc);
++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++ // _Intl == true
++ _M_data->_M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++ }
++ }
++
++ template<>
++ void
++ moneypunct<char, false>::_M_initialize_moneypunct(__c_locale __cloc,
++ const char*)
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<char, false>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = "";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = "";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = "";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] = money_base::_S_atoms[__i];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP,
++ __cloc));
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ _M_data->_M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ _M_data->_M_positive_sign_size = strlen(_M_data->_M_positive_sign);
++
++ char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++ if (!__nposn)
++ _M_data->_M_negative_sign = "()";
++ else
++ _M_data->_M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN,
++ __cloc);
++ _M_data->_M_negative_sign_size = strlen(_M_data->_M_negative_sign);
++
++ // _Intl == false
++ _M_data->_M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++ _M_data->_M_curr_symbol_size = strlen(_M_data->_M_curr_symbol);
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++ }
++ }
++
++ template<>
++ moneypunct<char, true>::~moneypunct()
++ { delete _M_data; }
++
++ template<>
++ moneypunct<char, false>::~moneypunct()
++ { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ moneypunct<wchar_t, true>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const char*)
++#else
++ const char* __name)
++#endif
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<wchar_t, true>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
++ }
++ else
++ {
++ // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(__cloc);
++#else
++ // Switch to named locale so that mbsrtowcs will work.
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++#endif
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++ const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
++
++ wchar_t* __wcs_ps = 0;
++ wchar_t* __wcs_ns = 0;
++ const char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
++ try
++ {
++ mbstate_t __state;
++ size_t __len = strlen(__cpossign);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ps = new wchar_t[__len];
++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++ _M_data->_M_positive_sign = __wcs_ps;
++ }
++ else
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++ __len = strlen(__cnegsign);
++ if (!__nposn)
++ _M_data->_M_negative_sign = L"()";
++ else if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ns = new wchar_t[__len];
++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++ _M_data->_M_negative_sign = __wcs_ns;
++ }
++ else
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++ // _Intl == true.
++ __len = strlen(__ccurr);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ wchar_t* __wcs = new wchar_t[__len];
++ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++ _M_data->_M_curr_symbol = __wcs;
++ }
++ else
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++ }
++ catch (...)
++ {
++ delete _M_data;
++ _M_data = 0;
++ delete __wcs_ps;
++ delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ __throw_exception_again;
++ }
++
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS,
++ __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ }
++ }
++
++ template<>
++ void
++ moneypunct<wchar_t, false>::_M_initialize_moneypunct(__c_locale __cloc,
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const char*)
++#else
++ const char* __name)
++#endif
++ {
++ if (!_M_data)
++ _M_data = new __moneypunct_cache<wchar_t, false>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = 0;
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = 0;
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = 0;
++ _M_data->_M_frac_digits = 0;
++ _M_data->_M_pos_format = money_base::_S_default_pattern;
++ _M_data->_M_neg_format = money_base::_S_default_pattern;
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < money_base::_S_end; ++__i)
++ _M_data->_M_atoms[__i] =
++ static_cast<wchar_t>(money_base::_S_atoms[__i]);
++ }
++ else
++ {
++ // Named locale.
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __c_locale __old = __uselocale(__cloc);
++#else
++ // Switch to named locale so that mbsrtowcs will work.
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, __name);
++#endif
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be monetary
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# else
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_MONETARY_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++#endif
++ _M_data->_M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++
++ const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
++ const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
++ const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
++
++ wchar_t* __wcs_ps = 0;
++ wchar_t* __wcs_ns = 0;
++ const char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
++ try
++ {
++ mbstate_t __state;
++ size_t __len;
++ __len = strlen(__cpossign);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ps = new wchar_t[__len];
++ mbsrtowcs(__wcs_ps, &__cpossign, __len, &__state);
++ _M_data->_M_positive_sign = __wcs_ps;
++ }
++ else
++ _M_data->_M_positive_sign = L"";
++ _M_data->_M_positive_sign_size = wcslen(_M_data->_M_positive_sign);
++
++ __len = strlen(__cnegsign);
++ if (!__nposn)
++ _M_data->_M_negative_sign = L"()";
++ else if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ __wcs_ns = new wchar_t[__len];
++ mbsrtowcs(__wcs_ns, &__cnegsign, __len, &__state);
++ _M_data->_M_negative_sign = __wcs_ns;
++ }
++ else
++ _M_data->_M_negative_sign = L"";
++ _M_data->_M_negative_sign_size = wcslen(_M_data->_M_negative_sign);
++
++ // _Intl == true.
++ __len = strlen(__ccurr);
++ if (__len)
++ {
++ ++__len;
++ memset(&__state, 0, sizeof(mbstate_t));
++ wchar_t* __wcs = new wchar_t[__len];
++ mbsrtowcs(__wcs, &__ccurr, __len, &__state);
++ _M_data->_M_curr_symbol = __wcs;
++ }
++ else
++ _M_data->_M_curr_symbol = L"";
++ _M_data->_M_curr_symbol_size = wcslen(_M_data->_M_curr_symbol);
++ }
++ catch (...)
++ {
++ delete _M_data;
++ _M_data = 0;
++ delete __wcs_ps;
++ delete __wcs_ns;
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ __throw_exception_again;
++ }
++
++ _M_data->_M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
++ char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
++ char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
++ char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
++ _M_data->_M_pos_format = _S_construct_pattern(__pprecedes, __pspace,
++ __pposn);
++ char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
++ char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
++ _M_data->_M_neg_format = _S_construct_pattern(__nprecedes, __nspace,
++ __nposn);
++
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __uselocale(__old);
++#else
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ }
++ }
++
++ template<>
++ moneypunct<wchar_t, true>::~moneypunct()
++ {
++ if (_M_data->_M_positive_sign_size)
++ delete [] _M_data->_M_positive_sign;
++ if (_M_data->_M_negative_sign_size
++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++ delete [] _M_data->_M_negative_sign;
++ if (_M_data->_M_curr_symbol_size)
++ delete [] _M_data->_M_curr_symbol;
++ delete _M_data;
++ }
++
++ template<>
++ moneypunct<wchar_t, false>::~moneypunct()
++ {
++ if (_M_data->_M_positive_sign_size)
++ delete [] _M_data->_M_positive_sign;
++ if (_M_data->_M_negative_sign_size
++ && wcscmp(_M_data->_M_negative_sign, L"()") != 0)
++ delete [] _M_data->_M_negative_sign;
++ if (_M_data->_M_curr_symbol_size)
++ delete [] _M_data->_M_curr_symbol;
++ delete _M_data;
++ }
++#endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc
+@@ -0,0 +1,160 @@
++// std::numpunct implementation details, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.3.1.2 numpunct virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#define _LIBC
++#include <locale>
++#undef _LIBC
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ template<>
++ void
++ numpunct<char>::_M_initialize_numpunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __numpunct_cache<char>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_use_grouping = false;
++
++ _M_data->_M_decimal_point = '.';
++ _M_data->_M_thousands_sep = ',';
++
++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++ _M_data->_M_atoms_out[__i] = __num_base::_S_atoms_out[__i];
++
++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++ _M_data->_M_atoms_in[__j] = __num_base::_S_atoms_in[__j];
++ }
++ else
++ {
++ // Named locale.
++ _M_data->_M_decimal_point = *(__nl_langinfo_l(DECIMAL_POINT,
++ __cloc));
++ _M_data->_M_thousands_sep = *(__nl_langinfo_l(THOUSANDS_SEP,
++ __cloc));
++
++ // Check for NULL, which implies no grouping.
++ if (_M_data->_M_thousands_sep == '\0')
++ _M_data->_M_grouping = "";
++ else
++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ }
++
++ // NB: There is no way to extact this info from posix locales.
++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++ _M_data->_M_truename = "true";
++ _M_data->_M_truename_size = 4;
++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++ _M_data->_M_falsename = "false";
++ _M_data->_M_falsename_size = 5;
++ }
++
++ template<>
++ numpunct<char>::~numpunct()
++ { delete _M_data; }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ numpunct<wchar_t>::_M_initialize_numpunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __numpunct_cache<wchar_t>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_data->_M_grouping = "";
++ _M_data->_M_grouping_size = 0;
++ _M_data->_M_use_grouping = false;
++
++ _M_data->_M_decimal_point = L'.';
++ _M_data->_M_thousands_sep = L',';
++
++ // Use ctype::widen code without the facet...
++ for (size_t __i = 0; __i < __num_base::_S_oend; ++__i)
++ _M_data->_M_atoms_out[__i] =
++ static_cast<wchar_t>(__num_base::_S_atoms_out[__i]);
++
++ for (size_t __j = 0; __j < __num_base::_S_iend; ++__j)
++ _M_data->_M_atoms_in[__j] =
++ static_cast<wchar_t>(__num_base::_S_atoms_in[__j]);
++ }
++ else
++ {
++ // Named locale.
++ // NB: In the GNU model wchar_t is always 32 bit wide.
++ union { char *__s; wchar_t __w; } __u;
++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
++ _M_data->_M_decimal_point = __u.__w;
++
++ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
++ _M_data->_M_thousands_sep = __u.__w;
++
++ if (_M_data->_M_thousands_sep == L'\0')
++ _M_data->_M_grouping = "";
++ else
++ _M_data->_M_grouping = __nl_langinfo_l(GROUPING, __cloc);
++ _M_data->_M_grouping_size = strlen(_M_data->_M_grouping);
++ }
++
++ // NB: There is no way to extact this info from posix locales.
++ // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
++ _M_data->_M_truename = L"true";
++ _M_data->_M_truename_size = 4;
++ // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
++ _M_data->_M_falsename = L"false";
++ _M_data->_M_falsename_size = 5;
++ }
++
++ template<>
++ numpunct<wchar_t>::~numpunct()
++ { delete _M_data; }
++ #endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc
++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc
+@@ -0,0 +1,406 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get virtual functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++#include <locale>
++#include <bits/c++locale_internal.h>
++
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning tailor for stub locale support
++#endif
++#ifndef __UCLIBC_HAS_XLOCALE__
++#define __nl_langinfo_l(N, L) nl_langinfo((N))
++#endif
++
++namespace std
++{
++ template<>
++ void
++ __timepunct<char>::
++ _M_put(char* __s, size_t __maxlen, const char* __format,
++ const tm* __tm) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ const size_t __len = __strftime_l(__s, __maxlen, __format, __tm,
++ _M_c_locale_timepunct);
++#else
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_timepunct);
++ const size_t __len = strftime(__s, __maxlen, __format, __tm);
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ // Make sure __s is null terminated.
++ if (__len == 0)
++ __s[0] = '\0';
++ }
++
++ template<>
++ void
++ __timepunct<char>::_M_initialize_timepunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __timepunct_cache<char>;
++
++ if (!__cloc)
++ {
++ // "C" locale
++ _M_c_locale_timepunct = _S_get_c_locale();
++
++ _M_data->_M_date_format = "%m/%d/%y";
++ _M_data->_M_date_era_format = "%m/%d/%y";
++ _M_data->_M_time_format = "%H:%M:%S";
++ _M_data->_M_time_era_format = "%H:%M:%S";
++ _M_data->_M_date_time_format = "";
++ _M_data->_M_date_time_era_format = "";
++ _M_data->_M_am = "AM";
++ _M_data->_M_pm = "PM";
++ _M_data->_M_am_pm_format = "";
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = "Sunday";
++ _M_data->_M_day2 = "Monday";
++ _M_data->_M_day3 = "Tuesday";
++ _M_data->_M_day4 = "Wednesday";
++ _M_data->_M_day5 = "Thursday";
++ _M_data->_M_day6 = "Friday";
++ _M_data->_M_day7 = "Saturday";
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = "Sun";
++ _M_data->_M_aday2 = "Mon";
++ _M_data->_M_aday3 = "Tue";
++ _M_data->_M_aday4 = "Wed";
++ _M_data->_M_aday5 = "Thu";
++ _M_data->_M_aday6 = "Fri";
++ _M_data->_M_aday7 = "Sat";
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = "January";
++ _M_data->_M_month02 = "February";
++ _M_data->_M_month03 = "March";
++ _M_data->_M_month04 = "April";
++ _M_data->_M_month05 = "May";
++ _M_data->_M_month06 = "June";
++ _M_data->_M_month07 = "July";
++ _M_data->_M_month08 = "August";
++ _M_data->_M_month09 = "September";
++ _M_data->_M_month10 = "October";
++ _M_data->_M_month11 = "November";
++ _M_data->_M_month12 = "December";
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = "Jan";
++ _M_data->_M_amonth02 = "Feb";
++ _M_data->_M_amonth03 = "Mar";
++ _M_data->_M_amonth04 = "Apr";
++ _M_data->_M_amonth05 = "May";
++ _M_data->_M_amonth06 = "Jun";
++ _M_data->_M_amonth07 = "Jul";
++ _M_data->_M_amonth08 = "Aug";
++ _M_data->_M_amonth09 = "Sep";
++ _M_data->_M_amonth10 = "Oct";
++ _M_data->_M_amonth11 = "Nov";
++ _M_data->_M_amonth12 = "Dec";
++ }
++ else
++ {
++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++ _M_data->_M_date_format = __nl_langinfo_l(D_FMT, __cloc);
++ _M_data->_M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
++ _M_data->_M_time_format = __nl_langinfo_l(T_FMT, __cloc);
++ _M_data->_M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT,
++ __cloc);
++ _M_data->_M_am = __nl_langinfo_l(AM_STR, __cloc);
++ _M_data->_M_pm = __nl_langinfo_l(PM_STR, __cloc);
++ _M_data->_M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = __nl_langinfo_l(DAY_1, __cloc);
++ _M_data->_M_day2 = __nl_langinfo_l(DAY_2, __cloc);
++ _M_data->_M_day3 = __nl_langinfo_l(DAY_3, __cloc);
++ _M_data->_M_day4 = __nl_langinfo_l(DAY_4, __cloc);
++ _M_data->_M_day5 = __nl_langinfo_l(DAY_5, __cloc);
++ _M_data->_M_day6 = __nl_langinfo_l(DAY_6, __cloc);
++ _M_data->_M_day7 = __nl_langinfo_l(DAY_7, __cloc);
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = __nl_langinfo_l(ABDAY_1, __cloc);
++ _M_data->_M_aday2 = __nl_langinfo_l(ABDAY_2, __cloc);
++ _M_data->_M_aday3 = __nl_langinfo_l(ABDAY_3, __cloc);
++ _M_data->_M_aday4 = __nl_langinfo_l(ABDAY_4, __cloc);
++ _M_data->_M_aday5 = __nl_langinfo_l(ABDAY_5, __cloc);
++ _M_data->_M_aday6 = __nl_langinfo_l(ABDAY_6, __cloc);
++ _M_data->_M_aday7 = __nl_langinfo_l(ABDAY_7, __cloc);
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = __nl_langinfo_l(MON_1, __cloc);
++ _M_data->_M_month02 = __nl_langinfo_l(MON_2, __cloc);
++ _M_data->_M_month03 = __nl_langinfo_l(MON_3, __cloc);
++ _M_data->_M_month04 = __nl_langinfo_l(MON_4, __cloc);
++ _M_data->_M_month05 = __nl_langinfo_l(MON_5, __cloc);
++ _M_data->_M_month06 = __nl_langinfo_l(MON_6, __cloc);
++ _M_data->_M_month07 = __nl_langinfo_l(MON_7, __cloc);
++ _M_data->_M_month08 = __nl_langinfo_l(MON_8, __cloc);
++ _M_data->_M_month09 = __nl_langinfo_l(MON_9, __cloc);
++ _M_data->_M_month10 = __nl_langinfo_l(MON_10, __cloc);
++ _M_data->_M_month11 = __nl_langinfo_l(MON_11, __cloc);
++ _M_data->_M_month12 = __nl_langinfo_l(MON_12, __cloc);
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = __nl_langinfo_l(ABMON_1, __cloc);
++ _M_data->_M_amonth02 = __nl_langinfo_l(ABMON_2, __cloc);
++ _M_data->_M_amonth03 = __nl_langinfo_l(ABMON_3, __cloc);
++ _M_data->_M_amonth04 = __nl_langinfo_l(ABMON_4, __cloc);
++ _M_data->_M_amonth05 = __nl_langinfo_l(ABMON_5, __cloc);
++ _M_data->_M_amonth06 = __nl_langinfo_l(ABMON_6, __cloc);
++ _M_data->_M_amonth07 = __nl_langinfo_l(ABMON_7, __cloc);
++ _M_data->_M_amonth08 = __nl_langinfo_l(ABMON_8, __cloc);
++ _M_data->_M_amonth09 = __nl_langinfo_l(ABMON_9, __cloc);
++ _M_data->_M_amonth10 = __nl_langinfo_l(ABMON_10, __cloc);
++ _M_data->_M_amonth11 = __nl_langinfo_l(ABMON_11, __cloc);
++ _M_data->_M_amonth12 = __nl_langinfo_l(ABMON_12, __cloc);
++ }
++ }
++
++#ifdef _GLIBCXX_USE_WCHAR_T
++ template<>
++ void
++ __timepunct<wchar_t>::
++ _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format,
++ const tm* __tm) const
++ {
++#ifdef __UCLIBC_HAS_XLOCALE__
++ __wcsftime_l(__s, __maxlen, __format, __tm, _M_c_locale_timepunct);
++ const size_t __len = __wcsftime_l(__s, __maxlen, __format, __tm,
++ _M_c_locale_timepunct);
++#else
++ char* __old = strdup(setlocale(LC_ALL, NULL));
++ setlocale(LC_ALL, _M_name_timepunct);
++ const size_t __len = wcsftime(__s, __maxlen, __format, __tm);
++ setlocale(LC_ALL, __old);
++ free(__old);
++#endif
++ // Make sure __s is null terminated.
++ if (__len == 0)
++ __s[0] = L'\0';
++ }
++
++ template<>
++ void
++ __timepunct<wchar_t>::_M_initialize_timepunct(__c_locale __cloc)
++ {
++ if (!_M_data)
++ _M_data = new __timepunct_cache<wchar_t>;
++
++#warning wide time stuff
++// if (!__cloc)
++ {
++ // "C" locale
++ _M_c_locale_timepunct = _S_get_c_locale();
++
++ _M_data->_M_date_format = L"%m/%d/%y";
++ _M_data->_M_date_era_format = L"%m/%d/%y";
++ _M_data->_M_time_format = L"%H:%M:%S";
++ _M_data->_M_time_era_format = L"%H:%M:%S";
++ _M_data->_M_date_time_format = L"";
++ _M_data->_M_date_time_era_format = L"";
++ _M_data->_M_am = L"AM";
++ _M_data->_M_pm = L"PM";
++ _M_data->_M_am_pm_format = L"";
++
++ // Day names, starting with "C"'s Sunday.
++ _M_data->_M_day1 = L"Sunday";
++ _M_data->_M_day2 = L"Monday";
++ _M_data->_M_day3 = L"Tuesday";
++ _M_data->_M_day4 = L"Wednesday";
++ _M_data->_M_day5 = L"Thursday";
++ _M_data->_M_day6 = L"Friday";
++ _M_data->_M_day7 = L"Saturday";
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ _M_data->_M_aday1 = L"Sun";
++ _M_data->_M_aday2 = L"Mon";
++ _M_data->_M_aday3 = L"Tue";
++ _M_data->_M_aday4 = L"Wed";
++ _M_data->_M_aday5 = L"Thu";
++ _M_data->_M_aday6 = L"Fri";
++ _M_data->_M_aday7 = L"Sat";
++
++ // Month names, starting with "C"'s January.
++ _M_data->_M_month01 = L"January";
++ _M_data->_M_month02 = L"February";
++ _M_data->_M_month03 = L"March";
++ _M_data->_M_month04 = L"April";
++ _M_data->_M_month05 = L"May";
++ _M_data->_M_month06 = L"June";
++ _M_data->_M_month07 = L"July";
++ _M_data->_M_month08 = L"August";
++ _M_data->_M_month09 = L"September";
++ _M_data->_M_month10 = L"October";
++ _M_data->_M_month11 = L"November";
++ _M_data->_M_month12 = L"December";
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ _M_data->_M_amonth01 = L"Jan";
++ _M_data->_M_amonth02 = L"Feb";
++ _M_data->_M_amonth03 = L"Mar";
++ _M_data->_M_amonth04 = L"Apr";
++ _M_data->_M_amonth05 = L"May";
++ _M_data->_M_amonth06 = L"Jun";
++ _M_data->_M_amonth07 = L"Jul";
++ _M_data->_M_amonth08 = L"Aug";
++ _M_data->_M_amonth09 = L"Sep";
++ _M_data->_M_amonth10 = L"Oct";
++ _M_data->_M_amonth11 = L"Nov";
++ _M_data->_M_amonth12 = L"Dec";
++ }
++#if 0
++ else
++ {
++ _M_c_locale_timepunct = _S_clone_c_locale(__cloc);
++
++ union { char *__s; wchar_t *__w; } __u;
++
++ __u.__s = __nl_langinfo_l(_NL_WD_FMT, __cloc);
++ _M_data->_M_date_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_FMT, __cloc);
++ _M_data->_M_date_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT, __cloc);
++ _M_data->_M_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_T_FMT, __cloc);
++ _M_data->_M_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WD_T_FMT, __cloc);
++ _M_data->_M_date_time_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc);
++ _M_data->_M_date_time_era_format = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WAM_STR, __cloc);
++ _M_data->_M_am = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WPM_STR, __cloc);
++ _M_data->_M_pm = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc);
++ _M_data->_M_am_pm_format = __u.__w;
++
++ // Day names, starting with "C"'s Sunday.
++ __u.__s = __nl_langinfo_l(_NL_WDAY_1, __cloc);
++ _M_data->_M_day1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_2, __cloc);
++ _M_data->_M_day2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_3, __cloc);
++ _M_data->_M_day3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_4, __cloc);
++ _M_data->_M_day4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_5, __cloc);
++ _M_data->_M_day5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_6, __cloc);
++ _M_data->_M_day6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WDAY_7, __cloc);
++ _M_data->_M_day7 = __u.__w;
++
++ // Abbreviated day names, starting with "C"'s Sun.
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_1, __cloc);
++ _M_data->_M_aday1 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_2, __cloc);
++ _M_data->_M_aday2 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_3, __cloc);
++ _M_data->_M_aday3 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_4, __cloc);
++ _M_data->_M_aday4 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_5, __cloc);
++ _M_data->_M_aday5 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_6, __cloc);
++ _M_data->_M_aday6 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABDAY_7, __cloc);
++ _M_data->_M_aday7 = __u.__w;
++
++ // Month names, starting with "C"'s January.
++ __u.__s = __nl_langinfo_l(_NL_WMON_1, __cloc);
++ _M_data->_M_month01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_2, __cloc);
++ _M_data->_M_month02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_3, __cloc);
++ _M_data->_M_month03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_4, __cloc);
++ _M_data->_M_month04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_5, __cloc);
++ _M_data->_M_month05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_6, __cloc);
++ _M_data->_M_month06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_7, __cloc);
++ _M_data->_M_month07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_8, __cloc);
++ _M_data->_M_month08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_9, __cloc);
++ _M_data->_M_month09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_10, __cloc);
++ _M_data->_M_month10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_11, __cloc);
++ _M_data->_M_month11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WMON_12, __cloc);
++ _M_data->_M_month12 = __u.__w;
++
++ // Abbreviated month names, starting with "C"'s Jan.
++ __u.__s = __nl_langinfo_l(_NL_WABMON_1, __cloc);
++ _M_data->_M_amonth01 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_2, __cloc);
++ _M_data->_M_amonth02 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_3, __cloc);
++ _M_data->_M_amonth03 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_4, __cloc);
++ _M_data->_M_amonth04 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_5, __cloc);
++ _M_data->_M_amonth05 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_6, __cloc);
++ _M_data->_M_amonth06 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_7, __cloc);
++ _M_data->_M_amonth07 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_8, __cloc);
++ _M_data->_M_amonth08 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_9, __cloc);
++ _M_data->_M_amonth09 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_10, __cloc);
++ _M_data->_M_amonth10 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_11, __cloc);
++ _M_data->_M_amonth11 = __u.__w;
++ __u.__s = __nl_langinfo_l(_NL_WABMON_12, __cloc);
++ _M_data->_M_amonth12 = __u.__w;
++ }
++#endif // 0
++ }
++#endif
++}
+--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h
++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h
+@@ -0,0 +1,68 @@
++// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
++
++// Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
++//
++// This file is part of the GNU ISO C++ Library. This library is free
++// software; you can redistribute it and/or modify it under the
++// terms of the GNU General Public License as published by the
++// Free Software Foundation; either version 2, or (at your option)
++// any later version.
++
++// This library is distributed in the hope that it will be useful,
++// but WITHOUT ANY WARRANTY; without even the implied warranty of
++// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++// GNU General Public License for more details.
++
++// You should have received a copy of the GNU General Public License along
++// with this library; see the file COPYING. If not, write to the Free
++// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
++// USA.
++
++// As a special exception, you may use this file as part of a free software
++// library without restriction. Specifically, if other files instantiate
++// templates or use macros or inline functions from this file, or you compile
++// this file and link it with other files to produce an executable, this
++// file does not by itself cause the resulting executable to be covered by
++// the GNU General Public License. This exception does not however
++// invalidate any other reasons why the executable file might be covered by
++// the GNU General Public License.
++
++//
++// ISO C++ 14882: 22.2.5.1.2 - time_get functions
++// ISO C++ 14882: 22.2.5.3.2 - time_put functions
++//
++
++// Written by Benjamin Kosnik <bkoz@redhat.com>
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(size_t __refs)
++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(_S_get_c_name())
++ { _M_initialize_timepunct(); }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
++ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(_S_get_c_name())
++ { _M_initialize_timepunct(); }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
++ size_t __refs)
++ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
++ _M_name_timepunct(__s)
++ {
++ char* __tmp = new char[std::strlen(__s) + 1];
++ std::strcpy(__tmp, __s);
++ _M_name_timepunct = __tmp;
++ _M_initialize_timepunct(__cloc);
++ }
++
++ template<typename _CharT>
++ __timepunct<_CharT>::~__timepunct()
++ {
++ if (_M_name_timepunct != _S_get_c_name())
++ delete [] _M_name_timepunct;
++ delete _M_data;
++ _S_destroy_c_locale(_M_c_locale_timepunct);
++ }
+--- gcc/libstdc++-v3/configure
++++ gcc/libstdc++-v3/configure
+@@ -5764,7 +5764,7 @@
+ enableval="$enable_clocale"
+
+ case "$enableval" in
+- generic|gnu|ieee_1003.1-2001|yes|no|auto) ;;
++ generic|gnu|ieee_1003.1-2001|uclibc|yes|no|auto) ;;
+ *) { { echo "$as_me:$LINENO: error: Unknown argument to enable/disable clocale" >&5
+ echo "$as_me: error: Unknown argument to enable/disable clocale" >&2;}
+ { (exit 1); exit 1; }; } ;;
+@@ -5789,6 +5789,9 @@
+ # Default to "generic".
+ if test $enable_clocale_flag = auto; then
+ case ${target_os} in
++ linux-uclibc*)
++ enable_clocale_flag=uclibc
++ ;;
+ linux* | gnu* | kfreebsd*-gnu | knetbsd*-gnu)
+ cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h. */
+@@ -6019,6 +6022,76 @@
+ CTIME_CC=config/locale/generic/time_members.cc
+ CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
+ ;;
++ uclibc)
++ echo "$as_me:$LINENO: result: uclibc" >&5
++echo "${ECHO_T}uclibc" >&6
++
++ # Declare intention to use gettext, and add support for specific
++ # languages.
++ # For some reason, ALL_LINGUAS has to be before AM-GNU-GETTEXT
++ ALL_LINGUAS="de fr"
++
++ # Don't call AM-GNU-GETTEXT here. Instead, assume glibc.
++ # Extract the first word of "msgfmt", so it can be a program name with args.
++set dummy msgfmt; ac_word=$2
++echo "$as_me:$LINENO: checking for $ac_word" >&5
++echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
++if test "${ac_cv_prog_check_msgfmt+set}" = set; then
++ echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++ if test -n "$check_msgfmt"; then
++ ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++ IFS=$as_save_IFS
++ test -z "$as_dir" && as_dir=.
++ for ac_exec_ext in '' $ac_executable_extensions; do
++ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ ac_cv_prog_check_msgfmt="yes"
++ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
++ break 2
++ fi
++done
++done
++
++ test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
++fi
++fi
++check_msgfmt=$ac_cv_prog_check_msgfmt
++if test -n "$check_msgfmt"; then
++ echo "$as_me:$LINENO: result: $check_msgfmt" >&5
++echo "${ECHO_T}$check_msgfmt" >&6
++else
++ echo "$as_me:$LINENO: result: no" >&5
++echo "${ECHO_T}no" >&6
++fi
++
++ if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
++ USE_NLS=yes
++ fi
++ # Export the build objects.
++ for ling in $ALL_LINGUAS; do \
++ glibcxx_MOFILES="$glibcxx_MOFILES $ling.mo"; \
++ glibcxx_POFILES="$glibcxx_POFILES $ling.po"; \
++ done
++
++
++
++ CLOCALE_H=config/locale/uclibc/c_locale.h
++ CLOCALE_CC=config/locale/uclibc/c_locale.cc
++ CCODECVT_CC=config/locale/uclibc/codecvt_members.cc
++ CCOLLATE_CC=config/locale/uclibc/collate_members.cc
++ CCTYPE_CC=config/locale/uclibc/ctype_members.cc
++ CMESSAGES_H=config/locale/uclibc/messages_members.h
++ CMESSAGES_CC=config/locale/uclibc/messages_members.cc
++ CMONEY_CC=config/locale/uclibc/monetary_members.cc
++ CNUMERIC_CC=config/locale/uclibc/numeric_members.cc
++ CTIME_H=config/locale/uclibc/time_members.h
++ CTIME_CC=config/locale/uclibc/time_members.cc
++ CLOCALE_INTERNAL_H=config/locale/uclibc/c++locale_internal.h
++ ;;
+ esac
+
+ # This is where the testsuite looks for locale catalogs, using the
+--- gcc/libstdc++-v3/include/c_compatibility/wchar.h
++++ gcc/libstdc++-v3/include/c_compatibility/wchar.h
+@@ -101,7 +101,9 @@
+ using std::wmemcpy;
+ using std::wmemmove;
+ using std::wmemset;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using std::wcsftime;
++#endif
+
+ #if _GLIBCXX_USE_C99
+ using std::wcstold;
+--- gcc/libstdc++-v3/include/c_std/std_cwchar.h
++++ gcc/libstdc++-v3/include/c_std/std_cwchar.h
+@@ -182,7 +182,9 @@
+ using ::wcscoll;
+ using ::wcscpy;
+ using ::wcscspn;
++#if _GLIBCXX_HAVE_WCSFTIME
+ using ::wcsftime;
++#endif
+ using ::wcslen;
+ using ::wcsncat;
+ using ::wcsncmp;
diff --git a/packages/gcc/gcc-4.2.2/203-uclibc-locale-no__x.patch b/packages/gcc/gcc-4.2.2/203-uclibc-locale-no__x.patch
new file mode 100644
index 0000000000..6ba47003b3
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/203-uclibc-locale-no__x.patch
@@ -0,0 +1,213 @@
+--- gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/c++locale_internal.h 2006-03-10 15:32:37 +0100
+@@ -60,4 +60,49 @@
+ extern "C" __typeof(wctype_l) __wctype_l;
+ #endif
+
++# define __nl_langinfo_l nl_langinfo_l
++# define __strcoll_l strcoll_l
++# define __strftime_l strftime_l
++# define __strtod_l strtod_l
++# define __strtof_l strtof_l
++# define __strtold_l strtold_l
++# define __strxfrm_l strxfrm_l
++# define __newlocale newlocale
++# define __freelocale freelocale
++# define __duplocale duplocale
++# define __uselocale uselocale
++
++# ifdef _GLIBCXX_USE_WCHAR_T
++# define __iswctype_l iswctype_l
++# define __towlower_l towlower_l
++# define __towupper_l towupper_l
++# define __wcscoll_l wcscoll_l
++# define __wcsftime_l wcsftime_l
++# define __wcsxfrm_l wcsxfrm_l
++# define __wctype_l wctype_l
++# endif
++
++#else
++# define __nl_langinfo_l(N, L) nl_langinfo((N))
++# define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
++# define __strtod_l(S, E, L) strtod((S), (E))
++# define __strtof_l(S, E, L) strtof((S), (E))
++# define __strtold_l(S, E, L) strtold((S), (E))
++# define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
++# warning should dummy __newlocale check for C|POSIX ?
++# define __newlocale(a, b, c) NULL
++# define __freelocale(a) ((void)0)
++# define __duplocale(a) __c_locale()
++//# define __uselocale ?
++//
++# ifdef _GLIBCXX_USE_WCHAR_T
++# define __iswctype_l(C, M, L) iswctype((C), (M))
++# define __towlower_l(C, L) towlower((C))
++# define __towupper_l(C, L) towupper((C))
++# define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
++//# define __wcsftime_l(S, M, F, T, L) wcsftime((S), (M), (F), (T))
++# define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
++# define __wctype_l(S, L) wctype((S))
++# endif
++
+ #endif // GLIBC 2.3 and later
+--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:32:37 +0100
+@@ -39,20 +39,6 @@
+ #include <langinfo.h>
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strtol_l(S, E, B, L) strtol((S), (E), (B))
+-#define __strtoul_l(S, E, B, L) strtoul((S), (E), (B))
+-#define __strtoll_l(S, E, B, L) strtoll((S), (E), (B))
+-#define __strtoull_l(S, E, B, L) strtoull((S), (E), (B))
+-#define __strtof_l(S, E, L) strtof((S), (E))
+-#define __strtod_l(S, E, L) strtod((S), (E))
+-#define __strtold_l(S, E, L) strtold((S), (E))
+-#warning should dummy __newlocale check for C|POSIX ?
+-#define __newlocale(a, b, c) NULL
+-#define __freelocale(a) ((void)0)
+-#define __duplocale(a) __c_locale()
+-#endif
+-
+ namespace std
+ {
+ template<>
+--- gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/collate_members.cc 2006-03-10 15:32:37 +0100
+@@ -36,13 +36,6 @@
+ #include <locale>
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __strcoll_l(S1, S2, L) strcoll((S1), (S2))
+-#define __strxfrm_l(S1, S2, N, L) strxfrm((S1), (S2), (N))
+-#define __wcscoll_l(S1, S2, L) wcscoll((S1), (S2))
+-#define __wcsxfrm_l(S1, S2, N, L) wcsxfrm((S1), (S2), (N))
+-#endif
+-
+ namespace std
+ {
+ // These are basically extensions to char_traits, and perhaps should
+--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:32:37 +0100
+@@ -43,10 +43,6 @@
+ #warning tailor for stub locale support
+ #endif
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+-
+ namespace std
+ {
+ // Construct and return valid pattern consisting of some combination of:
+--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:32:37 +0100
+@@ -41,9 +41,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+
+ namespace std
+ {
+--- gcc/libstdc++-v3/config/locale/uclibc/time_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.cc 2006-03-10 15:32:37 +0100
+@@ -40,9 +40,6 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning tailor for stub locale support
+ #endif
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __nl_langinfo_l(N, L) nl_langinfo((N))
+-#endif
+
+ namespace std
+ {
+--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:32:37 +0100
+@@ -38,13 +38,6 @@
+ #undef _LIBC
+ #include <bits/c++locale_internal.h>
+
+-#ifndef __UCLIBC_HAS_XLOCALE__
+-#define __wctype_l(S, L) wctype((S))
+-#define __towupper_l(C, L) towupper((C))
+-#define __towlower_l(C, L) towlower((C))
+-#define __iswctype_l(C, M, L) iswctype((C), (M))
+-#endif
+-
+ namespace std
+ {
+ // NB: The other ctype<char> specializations are in src/locale.cc and
+--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.cc 2006-03-10 15:32:37 +0100
+@@ -39,13 +39,10 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix gettext stuff
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__dcgettext(const char *domainname,
+- const char *msgid, int category);
+ #undef gettext
+-#define gettext(msgid) __dcgettext(NULL, msgid, LC_MESSAGES)
++#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#define gettext(msgid) dcgettext(NULL, msgid, LC_MESSAGES)
+ #else
+-#undef gettext
+ #define gettext(msgid) (msgid)
+ #endif
+
+--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:32:37 +0100
+@@ -36,15 +36,11 @@
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-extern "C" char *__textdomain(const char *domainname);
+-extern "C" char *__bindtextdomain(const char *domainname,
+- const char *dirname);
+-#else
+-#undef __textdomain
+-#undef __bindtextdomain
+-#define __textdomain(D) ((void)0)
+-#define __bindtextdomain(D,P) ((void)0)
++#ifndef __UCLIBC_HAS_GETTEXT_AWARENESS__
++#undef textdomain
++#undef bindtextdomain
++#define textdomain(D) ((void)0)
++#define bindtextdomain(D,P) ((void)0)
+ #endif
+
+ // Non-virtual member functions.
+@@ -70,7 +66,7 @@
+ messages<_CharT>::open(const basic_string<char>& __s, const locale& __loc,
+ const char* __dir) const
+ {
+- __bindtextdomain(__s.c_str(), __dir);
++ bindtextdomain(__s.c_str(), __dir);
+ return this->do_open(__s, __loc);
+ }
+
+@@ -90,7 +86,7 @@
+ {
+ // No error checking is done, assume the catalog exists and can
+ // be used.
+- __textdomain(__s.c_str());
++ textdomain(__s.c_str());
+ return 0;
+ }
+
+--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.h.uclibc200no__x~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-03-10 15:32:37 +0100
+@@ -68,6 +68,7 @@
+ {
+ extern "C" __typeof(uselocale) __uselocale;
+ }
++#define __uselocale uselocale
+ #endif
+
+ namespace std
diff --git a/packages/gcc/gcc-4.2.2/204-uclibc-locale-wchar_fix.patch b/packages/gcc/gcc-4.2.2/204-uclibc-locale-wchar_fix.patch
new file mode 100644
index 0000000000..160ab35bb3
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/204-uclibc-locale-wchar_fix.patch
@@ -0,0 +1,48 @@
+--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:37:27 +0100
+@@ -401,7 +401,7 @@
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+@@ -556,7 +556,7 @@
+ # ifdef __UCLIBC_HAS_XLOCALE__
+ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
+ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
+-# else
++# elif defined __UCLIBC_HAS_LOCALE__
+ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
+ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
+ # endif
+--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_wchar~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:37:27 +0100
+@@ -127,12 +127,25 @@
+ {
+ // Named locale.
+ // NB: In the GNU model wchar_t is always 32 bit wide.
++#ifdef __UCLIBC_MJN3_ONLY__
++#warning fix this... should be numeric
++#endif
++#ifdef __UCLIBC__
++# ifdef __UCLIBC_HAS_XLOCALE__
++ _M_data->_M_decimal_point = __cloc->decimal_point_wc;
++ _M_data->_M_thousands_sep = __cloc->thousands_sep_wc;
++# elif defined __UCLIBC_HAS_LOCALE__
++ _M_data->_M_decimal_point = __global_locale->decimal_point_wc;
++ _M_data->_M_thousands_sep = __global_locale->thousands_sep_wc;
++# endif
++#else
+ union { char *__s; wchar_t __w; } __u;
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc);
+ _M_data->_M_decimal_point = __u.__w;
+
+ __u.__s = __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc);
+ _M_data->_M_thousands_sep = __u.__w;
++#endif
+
+ if (_M_data->_M_thousands_sep == L'\0')
+ _M_data->_M_grouping = "";
diff --git a/packages/gcc/gcc-4.2.2/205-uclibc-locale-update.patch b/packages/gcc/gcc-4.2.2/205-uclibc-locale-update.patch
new file mode 100644
index 0000000000..86b2844554
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/205-uclibc-locale-update.patch
@@ -0,0 +1,347 @@
+--- gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/c_locale.cc 2006-03-10 15:39:14 +0100
+@@ -46,16 +47,13 @@
+ __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- float __f = __strtof_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __f;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ float __f = __strtof_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __f;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ template<>
+@@ -63,16 +61,13 @@
+ __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- double __d = __strtod_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __d;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ double __d = __strtod_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __d;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ template<>
+@@ -80,16 +75,13 @@
+ __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
+ const __c_locale& __cloc)
+ {
+- if (!(__err & ios_base::failbit))
+- {
+- char* __sanity;
+- errno = 0;
+- long double __ld = __strtold_l(__s, &__sanity, __cloc);
+- if (__sanity != __s && errno != ERANGE)
+- __v = __ld;
+- else
+- __err |= ios_base::failbit;
+- }
++ char* __sanity;
++ errno = 0;
++ long double __ld = __strtold_l(__s, &__sanity, __cloc);
++ if (__sanity != __s && errno != ERANGE)
++ __v = __ld;
++ else
++ __err |= ios_base::failbit;
+ }
+
+ void
+@@ -110,7 +102,7 @@
+ void
+ locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
+ {
+- if (_S_get_c_locale() != __cloc)
++ if (__cloc && _S_get_c_locale() != __cloc)
+ __freelocale(__cloc);
+ }
+
+--- gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc.uclibc200_update~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/ctype_members.cc 2006-03-10 15:39:14 +0100
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ namespace std
+@@ -138,20 +143,34 @@
+ ctype<wchar_t>::
+ do_is(mask __m, wchar_t __c) const
+ {
+- // Highest bitmask in ctype_base == 10, but extra in "C"
+- // library for blank.
++ // The case of __m == ctype_base::space is particularly important,
++ // due to its use in many istream functions. Therefore we deal with
++ // it first, exploiting the knowledge that on GNU systems _M_bit[5]
++ // is the mask corresponding to ctype_base::space. NB: an encoding
++ // change would not affect correctness!
+ bool __ret = false;
+- const size_t __bitmasksize = 11;
+- for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
+- if (__m & _M_bit[__bitcur]
+- && __iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
+- {
+- __ret = true;
+- break;
+- }
++ if (__m == _M_bit[5])
++ __ret = __iswctype_l(__c, _M_wmask[5], _M_c_locale_ctype);
++ else
++ {
++ // Highest bitmask in ctype_base == 10, but extra in "C"
++ // library for blank.
++ const size_t __bitmasksize = 11;
++ for (size_t __bitcur = 0; __bitcur <= __bitmasksize; ++__bitcur)
++ if (__m & _M_bit[__bitcur])
++ {
++ if (__iswctype_l(__c, _M_wmask[__bitcur], _M_c_locale_ctype))
++ {
++ __ret = true;
++ break;
++ }
++ else if (__m == _M_bit[__bitcur])
++ break;
++ }
++ }
+ return __ret;
+ }
+-
++
+ const wchar_t*
+ ctype<wchar_t>::
+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
+--- gcc/libstdc++-v3/config/locale/uclibc/messages_members.h.uclibc200_update~ 2006-03-10 15:32:37 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-03-10 15:39:14 +0100
+@@ -47,18 +47,21 @@
+ template<typename _CharT>
+ messages<_CharT>::messages(size_t __refs)
+ : facet(__refs), _M_c_locale_messages(_S_get_c_locale()),
+- _M_name_messages(_S_get_c_name())
++ _M_name_messages(_S_get_c_name())
+ { }
+
+ template<typename _CharT>
+ messages<_CharT>::messages(__c_locale __cloc, const char* __s,
+ size_t __refs)
+- : facet(__refs), _M_c_locale_messages(_S_clone_c_locale(__cloc)),
+- _M_name_messages(__s)
++ : facet(__refs), _M_c_locale_messages(NULL), _M_name_messages(NULL)
+ {
+- char* __tmp = new char[std::strlen(__s) + 1];
+- std::strcpy(__tmp, __s);
++ const size_t __len = std::strlen(__s) + 1;
++ char* __tmp = new char[__len];
++ std::memcpy(__tmp, __s, __len);
+ _M_name_messages = __tmp;
++
++ // Last to avoid leaking memory if new throws.
++ _M_c_locale_messages = _S_clone_c_locale(__cloc);
+ }
+
+ template<typename _CharT>
+--- gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/monetary_members.cc 2006-03-10 15:39:14 +0100
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+@@ -206,7 +211,7 @@
+ }
+ break;
+ default:
+- ;
++ __ret = pattern();
+ }
+ return __ret;
+ }
+--- gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc.uclibc200_update~ 2006-03-10 15:37:27 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/numeric_members.cc 2006-03-10 15:39:14 +0100
+@@ -33,9 +33,14 @@
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+
++#include <features.h>
++#ifdef __UCLIBC_HAS_LOCALE__
+ #define _LIBC
+ #include <locale>
+ #undef _LIBC
++#else
++#include <locale>
++#endif
+ #include <bits/c++locale_internal.h>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+--- gcc/libstdc++-v3/config/locale/uclibc/time_members.h.uclibc200_update~ 2006-03-10 15:06:17 +0100
++++ gcc/libstdc++-v3/config/locale/uclibc/time_members.h 2006-03-10 15:39:14 +0100
+@@ -37,25 +37,33 @@
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+- _M_name_timepunct(_S_get_c_name())
++ _M_name_timepunct(_S_get_c_name())
+ { _M_initialize_timepunct(); }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__cache_type* __cache, size_t __refs)
+ : facet(__refs), _M_data(__cache), _M_c_locale_timepunct(NULL),
+- _M_name_timepunct(_S_get_c_name())
++ _M_name_timepunct(_S_get_c_name())
+ { _M_initialize_timepunct(); }
+
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(__c_locale __cloc, const char* __s,
+ size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+- _M_name_timepunct(__s)
++ _M_name_timepunct(NULL)
+ {
+- char* __tmp = new char[std::strlen(__s) + 1];
+- std::strcpy(__tmp, __s);
++ const size_t __len = std::strlen(__s) + 1;
++ char* __tmp = new char[__len];
++ std::memcpy(__tmp, __s, __len);
+ _M_name_timepunct = __tmp;
+- _M_initialize_timepunct(__cloc);
++
++ try
++ { _M_initialize_timepunct(__cloc); }
++ catch(...)
++ {
++ delete [] _M_name_timepunct;
++ __throw_exception_again;
++ }
+ }
+
+ template<typename _CharT>
+--- gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h.old 2006-09-28 11:39:00.000000000 +0200
++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/c_locale.h 2006-09-28 12:10:41.000000000 +0200
+@@ -39,21 +39,23 @@
+ #pragma GCC system_header
+
+ #include <cstring> // get std::strlen
+-#include <cstdio> // get std::snprintf or std::sprintf
++#include <cstdio> // get std::vsnprintf or std::vsprintf
+ #include <clocale>
+ #include <langinfo.h> // For codecvt
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix this
+ #endif
+-#ifdef __UCLIBC_HAS_LOCALE__
++#ifdef _GLIBCXX_USE_ICONV
+ #include <iconv.h> // For codecvt using iconv, iconv_t
+ #endif
+-#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__
+-#include <libintl.h> // For messages
++#ifdef HAVE_LIBINTL_H
++#include <libintl.h> // For messages
+ #endif
++#include <cstdarg>
+
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning what is _GLIBCXX_C_LOCALE_GNU for
++// psm: used in os/gnu-linux/ctype_noninline.h
+ #endif
+ #define _GLIBCXX_C_LOCALE_GNU 1
+
+@@ -62,7 +64,7 @@
+ #endif
+ // #define _GLIBCXX_NUM_CATEGORIES 6
+ #define _GLIBCXX_NUM_CATEGORIES 0
+-
++
+ #ifdef __UCLIBC_HAS_XLOCALE__
+ namespace __gnu_cxx
+ {
+@@ -79,22 +81,24 @@
+ typedef int* __c_locale;
+ #endif
+
+- // Convert numeric value of type _Tv to string and return length of
+- // string. If snprintf is available use it, otherwise fall back to
+- // the unsafe sprintf which, in general, can be dangerous and should
++ // Convert numeric value of type double to string and return length of
++ // string. If vsnprintf is available use it, otherwise fall back to
++ // the unsafe vsprintf which, in general, can be dangerous and should
+ // be avoided.
+- template<typename _Tv>
+- int
+- __convert_from_v(char* __out,
+- const int __size __attribute__ ((__unused__)),
+- const char* __fmt,
+-#ifdef __UCLIBC_HAS_XCLOCALE__
+- _Tv __v, const __c_locale& __cloc, int __prec)
++ inline int
++ __convert_from_v(const __c_locale&
++#ifndef __UCLIBC_HAS_XCLOCALE__
++ __cloc __attribute__ ((__unused__))
++#endif
++ ,
++ char* __out,
++ const int __size,
++ const char* __fmt, ...)
+ {
++ va_list __args;
++#ifdef __UCLIBC_HAS_XCLOCALE__
+ __c_locale __old = __gnu_cxx::__uselocale(__cloc);
+ #else
+- _Tv __v, const __c_locale&, int __prec)
+- {
+ # ifdef __UCLIBC_HAS_LOCALE__
+ char* __old = std::setlocale(LC_ALL, NULL);
+ char* __sav = new char[std::strlen(__old) + 1];
+@@ -103,7 +107,9 @@
+ # endif
+ #endif
+
+- const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
++ va_start(__args, __fmt);
++ const int __ret = std::vsnprintf(__out, __size, __fmt, __args);
++ va_end(__args);
+
+ #ifdef __UCLIBC_HAS_XCLOCALE__
+ __gnu_cxx::__uselocale(__old);
diff --git a/packages/gcc/gcc-4.2.2/300-libstdc++-pic.patch b/packages/gcc/gcc-4.2.2/300-libstdc++-pic.patch
new file mode 100644
index 0000000000..89d03a85e5
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/300-libstdc++-pic.patch
@@ -0,0 +1,46 @@
+# DP: Build and install libstdc++_pic.a library.
+
+--- gcc-4.1.0/libstdc++-v3/src/Makefile.am 2004-11-15 17:33:05.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.am 2005-04-25 20:05:59.186930896 -0500
+@@ -214,6 +214,10 @@
+ $(OPT_LDFLAGS) $(SECTION_LDFLAGS) $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Added bits to build debug library.
+ if GLIBCXX_BUILD_DEBUG
+ all-local: build_debug
+--- gcc-4.1.0/libstdc++-v3/src/Makefile.in 2005-04-11 19:13:08.000000000 -0500
++++ gcc-4.1.0-patched/libstdc++-v3/src/Makefile.in 2005-04-25 20:12:33.284316275 -0500
+@@ -627,7 +627,7 @@
+
+ install-data-am: install-data-local
+
+-install-exec-am: install-toolexeclibLTLIBRARIES
++install-exec-am: install-toolexeclibLTLIBRARIES install-exec-local
+
+ install-info: install-info-am
+
+@@ -660,6 +660,7 @@
+ distclean-libtool distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-data-local install-exec \
++ install-exec-local \
+ install-exec-am install-info install-info-am install-man \
+ install-strip install-toolexeclibLTLIBRARIES installcheck \
+ installcheck-am installdirs maintainer-clean \
+@@ -745,6 +746,11 @@
+ install_debug:
+ (cd ${debugdir} && $(MAKE) \
+ toolexeclibdir=$(glibcxx_toolexeclibdir)/debug install)
++
++install-exec-local:
++ $(AR) cru libstdc++_pic.a .libs/*.o $(top_builddir)/libsupc++/*.o
++ $(INSTALL_DATA) libstdc++_pic.a $(DESTDIR)$(toolexeclibdir)
++
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+ .NOEXPORT:
diff --git a/packages/gcc/gcc-4.2.2/301-missing-execinfo_h.patch b/packages/gcc/gcc-4.2.2/301-missing-execinfo_h.patch
new file mode 100644
index 0000000000..0e2092f3fb
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/301-missing-execinfo_h.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/boehm-gc/include/gc.h-orig 2005-04-28 22:28:57.000000000 -0500
++++ gcc-4.0.0/boehm-gc/include/gc.h 2005-04-28 22:30:38.000000000 -0500
+@@ -500,7 +500,7 @@
+ #ifdef __linux__
+ # include <features.h>
+ # if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
+- && !defined(__ia64__)
++ && !defined(__ia64__) && !defined(__UCLIBC__)
+ # ifndef GC_HAVE_BUILTIN_BACKTRACE
+ # define GC_HAVE_BUILTIN_BACKTRACE
+ # endif
diff --git a/packages/gcc/gcc-4.2.2/302-c99-snprintf.patch b/packages/gcc/gcc-4.2.2/302-c99-snprintf.patch
new file mode 100644
index 0000000000..dfb22d681b
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/302-c99-snprintf.patch
@@ -0,0 +1,11 @@
+--- gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h-orig 2005-04-29 00:08:41.000000000 -0500
++++ gcc-4.0.0/libstdc++-v3/include/c_std/std_cstdio.h 2005-04-29 00:08:45.000000000 -0500
+@@ -142,7 +142,7 @@
+ using ::vsprintf;
+ }
+
+-#if _GLIBCXX_USE_C99
++#if _GLIBCXX_USE_C99 || defined(__UCLIBC__)
+
+ #undef snprintf
+ #undef vfscanf
diff --git a/packages/gcc/gcc-4.2.2/303-c99-complex-ugly-hack.patch b/packages/gcc/gcc-4.2.2/303-c99-complex-ugly-hack.patch
new file mode 100644
index 0000000000..2ccc80d9bb
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/303-c99-complex-ugly-hack.patch
@@ -0,0 +1,12 @@
+--- gcc-4.0.0/libstdc++-v3/configure-old 2005-04-30 22:04:48.061603912 -0500
++++ gcc-4.0.0/libstdc++-v3/configure 2005-04-30 22:06:13.678588152 -0500
+@@ -7194,6 +7194,9 @@
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h. */
+ #include <complex.h>
++#ifdef __UCLIBC__
++#error ugly hack to make sure configure test fails here for cross until uClibc supports the complex funcs
++#endif
+ int
+ main ()
+ {
diff --git a/packages/gcc/gcc-4.2.2/304-index_macro.patch b/packages/gcc/gcc-4.2.2/304-index_macro.patch
new file mode 100644
index 0000000000..d8e476555d
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/304-index_macro.patch
@@ -0,0 +1,24 @@
+--- gcc-4.1.0/libstdc++-v3/include/ext/rope.mps 2006-03-24 01:49:51 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/rope 2006-03-24 01:49:37 +0100
+@@ -59,6 +59,9 @@
+ #include <bits/allocator.h>
+ #include <ext/hash_fun.h>
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ # ifdef __GC
+ # define __GC_CONST const
+ # else
+--- gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h.mps 2006-03-24 01:50:04 +0100
++++ gcc-4.1.0/libstdc++-v3/include/ext/ropeimpl.h 2006-03-24 01:50:28 +0100
+@@ -53,6 +53,9 @@
+ #include <ext/memory> // For uninitialized_copy_n
+ #include <ext/numeric> // For power
+
++/* cope w/ index defined as macro, SuSv3 proposal */
++#undef index
++
+ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
+
+ using std::size_t;
diff --git a/packages/gcc/gcc-4.2.2/305-libmudflap-susv3-legacy.patch b/packages/gcc/gcc-4.2.2/305-libmudflap-susv3-legacy.patch
new file mode 100644
index 0000000000..374b1f8659
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/305-libmudflap-susv3-legacy.patch
@@ -0,0 +1,49 @@
+Index: gcc-4.2/libmudflap/mf-hooks2.c
+===================================================================
+--- gcc-4.2/libmudflap/mf-hooks2.c (revision 119834)
++++ gcc-4.2/libmudflap/mf-hooks2.c (working copy)
+@@ -427,7 +427,7 @@
+ {
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region");
+- bzero (s, n);
++ memset (s, 0, n);
+ }
+
+
+@@ -437,7 +437,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src");
+ MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest");
+- bcopy (src, dest, n);
++ memmove (dest, src, n);
+ }
+
+
+@@ -447,7 +447,7 @@
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg");
+ MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg");
+- return bcmp (s1, s2, n);
++ return n == 0 ? 0 : memcmp (s1, s2, n);
+ }
+
+
+@@ -456,7 +456,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region");
+- return index (s, c);
++ return strchr (s, c);
+ }
+
+
+@@ -465,7 +465,7 @@
+ size_t n = strlen (s);
+ TRACE ("%s\n", __PRETTY_FUNCTION__);
+ MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region");
+- return rindex (s, c);
++ return strrchr (s, c);
+ }
+
+ /* XXX: stpcpy, memccpy */
diff --git a/packages/gcc/gcc-4.2.2/306-libstdc++-namespace.patch b/packages/gcc/gcc-4.2.2/306-libstdc++-namespace.patch
new file mode 100644
index 0000000000..69587ca63a
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/306-libstdc++-namespace.patch
@@ -0,0 +1,36 @@
+diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h
+--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 13:06:56.000000000 +0100
++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/messages_members.h 2006-12-22 15:23:41.000000000 +0100
+@@ -32,7 +32,8 @@
+ //
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+-
++namespace std
++{
+ #ifdef __UCLIBC_MJN3_ONLY__
+ #warning fix prototypes for *textdomain funcs
+ #endif
+@@ -115,3 +116,4 @@
+ this->_S_create_c_locale(this->_M_c_locale_messages, __s);
+ }
+ }
++}
+diff -rup gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h
+--- gcc-4.2.orig/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 13:06:56.000000000 +0100
++++ gcc-4.2/libstdc++-v3/config/locale/uclibc/time_members.h 2006-12-22 15:20:31.000000000 +0100
+@@ -33,7 +33,8 @@
+ //
+
+ // Written by Benjamin Kosnik <bkoz@redhat.com>
+-
++namespace std
++{
+ template<typename _CharT>
+ __timepunct<_CharT>::__timepunct(size_t __refs)
+ : facet(__refs), _M_data(NULL), _M_c_locale_timepunct(NULL),
+@@ -74,3 +75,4 @@
+ delete _M_data;
+ _S_destroy_c_locale(_M_c_locale_timepunct);
+ }
++}
diff --git a/packages/gcc/gcc-4.2.2/307-locale_facets.patch b/packages/gcc/gcc-4.2.2/307-locale_facets.patch
new file mode 100644
index 0000000000..412f8657dc
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/307-locale_facets.patch
@@ -0,0 +1,26 @@
+This patch fixes a bug into ostream::operator<<(double) due to the wrong size
+passed into the __convert_from_v method. The wrong size is then passed to
+std::snprintf function, that, on uClibc, doens't handle sized 0 buffer.
+
+Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
+
+--- gcc-4.2.1/libstdc++-v3/include/bits/locale_facets.tcc 2006-10-17 18:43:47.000000000 +0200
++++ gcc-4.2.1-st/libstdc++-v3/include/bits/locale_facets.tcc 2007-08-22 18:54:23.000000000 +0200
+@@ -1143,7 +1143,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
+ const int __cs_size = __fixed ? __max_exp + __prec + 4
+ : __max_digits * 2 + __prec;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+- __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, __fbuf,
++ __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, __fbuf,
+ __prec, __v);
+ #endif
+
+@@ -1777,7 +1777,7 @@ _GLIBCXX_BEGIN_LDBL_NAMESPACE
+ // max_exponent10 + 1 for the integer part, + 2 for sign and '\0'.
+ const int __cs_size = numeric_limits<long double>::max_exponent10 + 3;
+ char* __cs = static_cast<char*>(__builtin_alloca(__cs_size));
+- int __len = std::__convert_from_v(_S_get_c_locale(), __cs, 0, "%.*Lf",
++ int __len = std::__convert_from_v(_S_get_c_locale(), __cs, __cs_size, "%.*Lf",
+ 0, __units);
+ #endif
+ string_type __digits(__len, char_type());
diff --git a/packages/gcc/gcc-4.2.2/402-libbackend_dep_gcov-iov.h.patch b/packages/gcc/gcc-4.2.2/402-libbackend_dep_gcov-iov.h.patch
new file mode 100644
index 0000000000..0bf115c45d
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/402-libbackend_dep_gcov-iov.h.patch
@@ -0,0 +1,13 @@
+Index: gcc-4.2/gcc/Makefile.in
+===================================================================
+--- gcc-4.2/gcc/Makefile.in (revision 121758)
++++ gcc-4.2/gcc/Makefile.in (working copy)
+@@ -2658,7 +2658,7 @@ mips-tdump.o : mips-tdump.c $(CONFIG_H)
+ # FIXME: writing proper dependencies for this is a *LOT* of work.
+ libbackend.o : $(OBJS-common:.o=.c) $(out_file) \
+ insn-config.h insn-flags.h insn-codes.h insn-constants.h \
+- insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE)
++ insn-attr.h $(DATESTAMP) $(BASEVER) $(DEVPHASE) gcov-iov.h
+ $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \
+ -DTARGET_NAME=\"$(target_noncanonical)\" \
+ -DLOCALEDIR=\"$(localedir)\" \
diff --git a/packages/gcc/gcc-4.2.2/602-sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.2.2/602-sdk-libstdc++-includes.patch
new file mode 100644
index 0000000000..23fce7544d
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/602-sdk-libstdc++-includes.patch
@@ -0,0 +1,20 @@
+--- gcc-4.1.0/libstdc++-v3/fragment.am 2005-03-21 11:40:14.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/fragment.am 2005-04-25 20:14:39.856251785 -0500
+@@ -21,5 +21,5 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+--- gcc-4.1.0/libstdc++-v3/libmath/Makefile.am 2005-03-21 11:40:18.000000000 -0600
++++ gcc-4.1.0-patched/libstdc++-v3/libmath/Makefile.am 2005-04-25 20:14:39.682280735 -0500
+@@ -35,7 +35,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
diff --git a/packages/gcc/gcc-4.2.2/740-sh-pr24836.patch b/packages/gcc/gcc-4.2.2/740-sh-pr24836.patch
new file mode 100644
index 0000000000..7992282cff
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/740-sh-pr24836.patch
@@ -0,0 +1,25 @@
+http://sourceforge.net/mailarchive/forum.php?thread_id=8959304&forum_id=5348
+http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24836
+
+--- gcc/gcc/configure.ac (revision 106699)
++++ gcc/gcc/configure.ac (working copy)
+@@ -2446,7 +2446,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
+--- gcc/gcc/configure
++++ gcc/gcc/configure
+@@ -14846,7 +14846,7 @@
+ tls_first_minor=14
+ tls_as_opt="-m64 -Aesame --fatal-warnings"
+ ;;
+- sh-*-* | sh[34]-*-*)
++ sh-*-* | sh[34]*-*-*)
+ conftest_s='
+ .section ".tdata","awT",@progbits
+ foo: .long 25
diff --git a/packages/gcc/gcc-4.2.2/800-arm-bigendian.patch b/packages/gcc/gcc-4.2.2/800-arm-bigendian.patch
new file mode 100644
index 0000000000..07c6093379
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/800-arm-bigendian.patch
@@ -0,0 +1,67 @@
+By Lennert Buytenhek <buytenh@wantstofly.org>
+Adds support for arm*b-linux* big-endian ARM targets
+
+See http://gcc.gnu.org/PR16350
+
+--- gcc-4.2.0/gcc/config/arm/linux-elf.h
++++ gcc-4.2.0/gcc/config/arm/linux-elf.h
+@@ -28,19 +28,33 @@
+ #undef TARGET_VERSION
+ #define TARGET_VERSION fputs (" (ARM GNU/Linux with ELF)", stderr);
+
++/*
++ * 'config.gcc' defines TARGET_BIG_ENDIAN_DEFAULT as 1 for arm*b-*
++ * (big endian) configurations.
++ */
++#if TARGET_BIG_ENDIAN_DEFAULT
++#define TARGET_ENDIAN_DEFAULT MASK_BIG_END
++#define TARGET_ENDIAN_OPTION "mbig-endian"
++#define TARGET_LINKER_EMULATION "armelfb_linux"
++#else
++#define TARGET_ENDIAN_DEFAULT 0
++#define TARGET_ENDIAN_OPTION "mlittle-endian"
++#define TARGET_LINKER_EMULATION "armelf_linux"
++#endif
++
+ #undef TARGET_DEFAULT_FLOAT_ABI
+ #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_HARD
+
+ #undef TARGET_DEFAULT
+-#define TARGET_DEFAULT (0)
++#define TARGET_DEFAULT (TARGET_ENDIAN_DEFAULT)
+
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm6
+
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux -p"
++#define SUBTARGET_EXTRA_LINK_SPEC " -m " TARGET_LINKER_EMULATION " -p"
+
+ #undef MULTILIB_DEFAULTS
+ #define MULTILIB_DEFAULTS \
+- { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" }
++ { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" }
+
+ /* Now we define the strings used to build the spec file. */
+ #undef LIB_SPEC
+@@ -61,7 +75,7 @@
+ %{rdynamic:-export-dynamic} \
+ %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "} \
+ -X \
+- %{mbig-endian:-EB}" \
++ %{mbig-endian:-EB} %{mlittle-endian:-EL}" \
+ SUBTARGET_EXTRA_LINK_SPEC
+
+ #undef LINK_SPEC
+--- gcc-4.2.0/gcc/config.gcc.orig 2006-09-22 14:53:41.000000000 +0200
++++ gcc-4.2.0/gcc/config.gcc 2006-09-25 10:45:21.000000000 +0200
+@@ -696,6 +696,11 @@
+ tm_file="dbxelf.h elfos.h linux.h arm/elf.h arm/linux-gas.h arm/linux-elf.h"
+ tmake_file="${tmake_file} t-linux arm/t-arm"
+ case ${target} in
++ arm*b-*)
++ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
++ ;;
++ esac
++ case ${target} in
+ arm*-*-linux-*eabi)
+ tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
+ tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi"
diff --git a/packages/gcc/gcc-4.2.2/801-arm-bigendian-eabi.patch b/packages/gcc/gcc-4.2.2/801-arm-bigendian-eabi.patch
new file mode 100644
index 0000000000..54490fc24f
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/801-arm-bigendian-eabi.patch
@@ -0,0 +1,14 @@
+Index: gcc-4.1.1/gcc/config/arm/linux-eabi.h
+===================================================================
+--- gcc-4.1.1.orig/gcc/config/arm/linux-eabi.h 2007-02-20 14:51:33.416193250 +0100
++++ gcc-4.1.1/gcc/config/arm/linux-eabi.h 2007-02-20 14:52:11.622581000 +0100
+@@ -48,7 +48,8 @@
+ #define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+-#define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
++#define SUBTARGET_EXTRA_LINK_SPEC \
++ " %{mbig-endian:-m armelfb_linux_eabi} %{mlittle-endian:-m armelf_linux_eabi} "
+
+ /* Use ld-linux.so.3 so that it will be possible to run "classic"
+ GNU/Linux binaries on an EABI system. */
diff --git a/packages/gcc/gcc-4.2.2/904-flatten-switch-stmt-00.patch b/packages/gcc/gcc-4.2.2/904-flatten-switch-stmt-00.patch
new file mode 100644
index 0000000000..8fac37c4df
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/904-flatten-switch-stmt-00.patch
@@ -0,0 +1,153 @@
+Hi,
+
+The attached patch makes sure that we create smaller object code for
+simple switch statements. We just make sure to flatten the switch
+statement into an if-else chain, basically.
+
+This fixes a size-regression as compared to gcc-3.4, as can be seen
+below.
+
+2007-04-15 Bernhard Fischer <..>
+
+ * stmt.c (expand_case): Do not create a complex binary tree when
+ optimizing for size but rather use the simple ordered list.
+ (emit_case_nodes): do not emit jumps to the default_label when
+ optimizing for size.
+
+Not regtested so far.
+Comments?
+
+Attached is the test switch.c mentioned below.
+
+$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
+gcc-$i -DCHAIN -Os -o switch-CHAIN-$i.o -c switch.c ;done
+$ for i in 2.95 3.3 3.4 4.0 4.1 4.2.orig-HEAD 4.3.orig-HEAD 4.3-HEAD;do
+gcc-$i -UCHAIN -Os -o switch-$i.o -c switch.c ;done
+
+$ size switch-*.o
+ text data bss dec hex filename
+ 169 0 0 169 a9 switch-2.95.o
+ 115 0 0 115 73 switch-3.3.o
+ 103 0 0 103 67 switch-3.4.o
+ 124 0 0 124 7c switch-4.0.o
+ 124 0 0 124 7c switch-4.1.o
+ 124 0 0 124 7c switch-4.2.orig-HEAD.o
+ 95 0 0 95 5f switch-4.3-HEAD.o
+ 124 0 0 124 7c switch-4.3.orig-HEAD.o
+ 166 0 0 166 a6 switch-CHAIN-2.95.o
+ 111 0 0 111 6f switch-CHAIN-3.3.o
+ 95 0 0 95 5f switch-CHAIN-3.4.o
+ 95 0 0 95 5f switch-CHAIN-4.0.o
+ 95 0 0 95 5f switch-CHAIN-4.1.o
+ 95 0 0 95 5f switch-CHAIN-4.2.orig-HEAD.o
+ 95 0 0 95 5f switch-CHAIN-4.3-HEAD.o
+ 95 0 0 95 5f switch-CHAIN-4.3.orig-HEAD.o
+
+
+Content-Type: text/x-diff; charset=us-ascii
+Content-Disposition: attachment; filename="gcc-4.3.gcc-flatten-switch-stmt.00.diff"
+
+Index: gcc-4.2.0/gcc/stmt.c
+===================================================================
+--- gcc-4.2.0.orig/gcc/stmt.c (revision 123843)
++++ gcc-4.2.0/gcc/stmt.c (working copy)
+@@ -2517,7 +2517,11 @@ expand_case (tree exp)
+ use_cost_table
+ = (TREE_CODE (orig_type) != ENUMERAL_TYPE
+ && estimate_case_costs (case_list));
+- balance_case_nodes (&case_list, NULL);
++ /* When optimizing for size, we want a straight list to avoid
++ jumps as much as possible. This basically creates an if-else
++ chain. */
++ if (!optimize_size)
++ balance_case_nodes (&case_list, NULL);
+ emit_case_nodes (index, case_list, default_label, index_type);
+ emit_jump (default_label);
+ }
+@@ -3075,6 +3079,7 @@ emit_case_nodes (rtx index, case_node_pt
+ {
+ if (!node_has_low_bound (node, index_type))
+ {
++ if (!optimize_size) /* don't jl to the .default_label. */
+ emit_cmp_and_jump_insns (index,
+ convert_modes
+ (mode, imode,
+
+
+Content-Type: text/x-csrc; charset=us-ascii
+Content-Disposition: attachment; filename="switch.c"
+
+int
+commutative_tree_code (int code)
+{
+#define CASE(val, ret) case val:/* __asm__("# val="#val ",ret="#ret);*/ return ret;
+#ifndef CHAIN
+ switch (code)
+ {
+# if 1
+ CASE(1,3)
+ CASE(3,2)
+ CASE(5,8)
+ CASE(7,1)
+ CASE(33,4)
+ CASE(44,9)
+ CASE(55,10)
+ CASE(66,-1)
+ CASE(77,99)
+ CASE(666,0)
+# else
+ case 1:
+ return 3;
+ case 3:
+ return 2;
+ case 5:
+ return 8;
+ case 7:
+ return 1;
+ case 33:
+ return 4;
+ case 44:
+ return 9;
+ case 55:
+ return 10;
+ case 66:
+ return -1;
+ case 77:
+ return 99;
+ case 666:
+ return 0;
+# endif
+ default:
+ break;
+ }
+ return 4711;
+
+#else
+ if (code == 1)
+ return 3;
+ else if (code == 3)
+ return 2;
+ else if (code == 5)
+ return 8;
+ else if (code == 7)
+ return 1;
+ else if (code == 33)
+ return 4;
+ else if (code == 44)
+ return 9;
+ else if (code == 55)
+ return 10;
+ else if (code == 66)
+ return -1;
+ else if (code == 77)
+ return 99;
+ else if (code == 666)
+ return 0;
+ else
+ return 4711;
+#endif
+}
+
+
+--AhhlLboLdkugWU4S--
+
diff --git a/packages/gcc/gcc-4.2.2/README b/packages/gcc/gcc-4.2.2/README
new file mode 100644
index 0000000000..b85840dc20
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/README
@@ -0,0 +1,4 @@
+The numbered patches come from
+http://www.uclibc.org/cgi-bin/viewcvs.cgi/trunk/buildroot/toolchain/gcc/4.1.1/
+Other patches are locally added to fix things (mostly inherited and reapplied
+from gcc 3.4.4 where applicable)
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-20000320.patch b/packages/gcc/gcc-4.2.2/arm-crunch-20000320.patch
new file mode 100644
index 0000000000..3fb0da7670
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-20000320.patch
@@ -0,0 +1,11 @@
+--- gcc-4.1.2/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c.original 2007-06-07 16:33:44.000000000 +1000
++++ gcc-4.1.2/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c 2007-06-07 16:34:05.000000000 +1000
+@@ -49,7 +49,7 @@
+ exit (0);
+
+ c(0x3690000000000000ULL, 0x00000000U);
+-#if (defined __arm__ || defined __thumb__) && ! (defined __ARMEB__ || defined __VFP_FP__)
++#if (defined __arm__ || defined __thumb__) && ! (defined __ARMEB__ || defined __VFP_FP__) && ! (defined __MAVERICK__)
+ /* The ARM always stores FP numbers in big-wordian format,
+ even when running in little-byteian mode. */
+ c(0x0000000136900000ULL, 0x00000001U);
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-32bit-disable.patch b/packages/gcc/gcc-4.2.2/arm-crunch-32bit-disable.patch
new file mode 100644
index 0000000000..88eaee322d
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-32bit-disable.patch
@@ -0,0 +1,85 @@
+--- gcc-4.1.2/gcc/config/arm/cirrus.md-integer 2007-06-15 09:01:37.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/cirrus.md 2007-06-15 09:04:45.000000000 +1000
+@@ -149,7 +149,7 @@
+ (match_operand:SI 1 "cirrus_fp_register" "0")
+ (mult:SI (match_operand:SI 2 "cirrus_fp_register" "v")
+ (match_operand:SI 3 "cirrus_fp_register" "v"))))]
+- "0 && TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "0 && TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfmsc32%?\\t%V0, %V2, %V3"
+ [(set_attr "type" "mav_farith")
+ (set_attr "cirrus" "normal")]
+@@ -305,7 +305,7 @@
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (float:SF (match_operand:SI 1 "s_register_operand" "r")))
+ (clobber (match_scratch:DF 2 "=v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfmv64lr%?\\t%Z2, %1\;cfcvt32s%?\\t%V0, %Y2"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "move")]
+@@ -315,7 +315,7 @@
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (float:DF (match_operand:SI 1 "s_register_operand" "r")))
+ (clobber (match_scratch:DF 2 "=v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfmv64lr%?\\t%Z2, %1\;cfcvt32d%?\\t%V0, %Y2"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "move")]
+@@ -339,7 +339,7 @@
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (fix:SI (fix:SF (match_operand:SF 1 "cirrus_fp_register" "v"))))
+ (clobber (match_scratch:DF 2 "=v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cftruncs32%?\\t%Y2, %V1\;cfmvr64l%?\\t%0, %Z2"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "normal")]
+@@ -349,7 +349,7 @@
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (fix:SI (fix:DF (match_operand:DF 1 "cirrus_fp_register" "v"))))
+ (clobber (match_scratch:DF 2 "=v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cftruncd32%?\\t%Y2, %V1\;cfmvr64l%?\\t%0, %Z2"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "normal")]
+--- gcc-4.1.2/gcc/config/arm/arm.md-trunc 2007-06-15 10:56:13.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-15 11:01:22.000000000 +1000
+@@ -3130,7 +3130,7 @@
+ (float:SF (match_operand:SI 1 "s_register_operand" "")))]
+ "TARGET_ARM && TARGET_HARD_FLOAT"
+ "
+- if (TARGET_MAVERICK)
++ if (TARGET_MAVERICK && 0)
+ {
+ emit_insn (gen_cirrus_floatsisf2 (operands[0], operands[1]));
+ DONE;
+@@ -3142,7 +3142,7 @@
+ (float:DF (match_operand:SI 1 "s_register_operand" "")))]
+ "TARGET_ARM && TARGET_HARD_FLOAT"
+ "
+- if (TARGET_MAVERICK)
++ if (TARGET_MAVERICK && 0)
+ {
+ emit_insn (gen_cirrus_floatsidf2 (operands[0], operands[1]));
+ DONE;
+@@ -3154,7 +3154,7 @@
+ (fix:SI (fix:SF (match_operand:SF 1 "s_register_operand" ""))))]
+ "TARGET_ARM && TARGET_HARD_FLOAT"
+ "
+- if (TARGET_MAVERICK)
++ if (TARGET_MAVERICK && 0)
+ {
+ if (!cirrus_fp_register (operands[0], SImode))
+ operands[0] = force_reg (SImode, operands[0]);
+@@ -3170,7 +3170,7 @@
+ (fix:SI (fix:DF (match_operand:DF 1 "s_register_operand" ""))))]
+ "TARGET_ARM && TARGET_HARD_FLOAT"
+ "
+- if (TARGET_MAVERICK)
++ if (TARGET_MAVERICK && 0)
+ {
+ if (!cirrus_fp_register (operands[1], DFmode))
+ operands[1] = force_reg (DFmode, operands[0]);
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-64bit-disable-4.2.0.patch b/packages/gcc/gcc-4.2.2/arm-crunch-64bit-disable-4.2.0.patch
new file mode 100644
index 0000000000..60b17852bd
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-64bit-disable-4.2.0.patch
@@ -0,0 +1,169 @@
+--- gcc-4.1.2/gcc/config/arm/cirrus.md-integer 2007-06-15 09:01:37.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/cirrus.md 2007-06-15 09:04:45.000000000 +1000
+@@ -34,7 +34,7 @@
+ [(set (match_operand:DI 0 "cirrus_fp_register" "=v")
+ (plus:DI (match_operand:DI 1 "cirrus_fp_register" "v")
+ (match_operand:DI 2 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfadd64%?\\t%V0, %V1, %V2"
+ [(set_attr "type" "mav_farith")
+ (set_attr "cirrus" "normal")]
+@@ -74,7 +74,7 @@
+ [(set (match_operand:DI 0 "cirrus_fp_register" "=v")
+ (minus:DI (match_operand:DI 1 "cirrus_fp_register" "v")
+ (match_operand:DI 2 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfsub64%?\\t%V0, %V1, %V2"
+ [(set_attr "type" "mav_farith")
+ (set_attr "cirrus" "normal")]
+@@ -124,7 +124,7 @@
+ [(set (match_operand:DI 0 "cirrus_fp_register" "=v")
+ (mult:DI (match_operand:DI 2 "cirrus_fp_register" "v")
+ (match_operand:DI 1 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfmul64%?\\t%V0, %V1, %V2"
+ [(set_attr "type" "mav_dmult")
+ (set_attr "cirrus" "normal")]
+@@ -206,7 +206,7 @@
+ [(set (match_operand:DI 0 "cirrus_fp_register" "=v")
+ (ashift:DI (match_operand:DI 1 "cirrus_fp_register" "v")
+ (match_operand:SI 2 "register_operand" "r")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfrshl64%?\\t%V1, %V0, %s2"
+ [(set_attr "cirrus" "normal")]
+ )
+@@ -215,7 +215,7 @@
+ [(set (match_operand:DI 0 "cirrus_fp_register" "=v")
+ (ashift:DI (match_operand:DI 1 "cirrus_fp_register" "v")
+ (match_operand:SI 2 "cirrus_shift_const" "")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfsh64%?\\t%V0, %V1, #%s2"
+ [(set_attr "cirrus" "normal")]
+ )
+@@ -224,7 +224,7 @@
+ [(set (match_operand:DI 0 "cirrus_fp_register" "=v")
+ (ashiftrt:DI (match_operand:DI 1 "cirrus_fp_register" "v")
+ (match_operand:SI 2 "cirrus_shift_const" "")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfsh64%?\\t%V0, %V1, #-%s2"
+ [(set_attr "cirrus" "normal")]
+ )
+@@ -232,7 +232,7 @@
+ (define_insn "*cirrus_absdi2"
+ [(set (match_operand:DI 0 "cirrus_fp_register" "=v")
+ (abs:DI (match_operand:DI 1 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfabs64%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")]
+ )
+@@ -238,11 +238,12 @@
+ )
+
+ ;; This doesn't really clobber ``cc''. Fixme: aldyh.
++;; maybe buggy?
+ (define_insn "*cirrus_negdi2"
+ [(set (match_operand:DI 0 "cirrus_fp_register" "=v")
+ (neg:DI (match_operand:DI 1 "cirrus_fp_register" "v")))
+ (clobber (reg:CC CC_REGNUM))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfneg64%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")]
+ )
+@@ -324,14 +324,14 @@
+ (define_insn "floatdisf2"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (float:SF (match_operand:DI 1 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfcvt64s%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")])
+
+ (define_insn "floatdidf2"
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (float:DF (match_operand:DI 1 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfcvt64d%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")])
+
+@@ -376,7 +376,7 @@
+ (define_insn "*cirrus_arm_movdi"
+ [(set (match_operand:DI 0 "nonimmediate_di_operand" "=r,r,o<>,v,r,v,m,v")
+ (match_operand:DI 1 "di_operand" "rIK,mi,r,r,v,mi,v,v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "*
+ {
+ switch (which_alternative)
+--- gcc-4.1.2/gcc/config/arm/arm.md-64 2007-06-15 11:37:42.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-15 11:40:45.000000000 +1000
+@@ -357,7 +357,7 @@
+ (clobber (reg:CC CC_REGNUM))])]
+ "TARGET_EITHER"
+ "
+- if (TARGET_HARD_FLOAT && TARGET_MAVERICK)
++ if (TARGET_HARD_FLOAT && TARGET_MAVERICK && 0)
+ {
+ if (!cirrus_fp_register (operands[0], DImode))
+ operands[0] = force_reg (DImode, operands[0]);
+@@ -393,7 +393,7 @@
+ (plus:DI (match_operand:DI 1 "s_register_operand" "%0, 0")
+ (match_operand:DI 2 "s_register_operand" "r, 0")))
+ (clobber (reg:CC CC_REGNUM))]
+- "TARGET_ARM && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
++ "TARGET_ARM"
+ "#"
+ "TARGET_ARM && reload_completed"
+ [(parallel [(set (reg:CC_C CC_REGNUM)
+@@ -421,7 +421,7 @@
+ (match_operand:SI 2 "s_register_operand" "r,r"))
+ (match_operand:DI 1 "s_register_operand" "r,0")))
+ (clobber (reg:CC CC_REGNUM))]
+- "TARGET_ARM && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
++ "TARGET_ARM"
+ "#"
+ "TARGET_ARM && reload_completed"
+ [(parallel [(set (reg:CC_C CC_REGNUM)
+@@ -450,7 +450,7 @@
+ (match_operand:SI 2 "s_register_operand" "r,r"))
+ (match_operand:DI 1 "s_register_operand" "r,0")))
+ (clobber (reg:CC CC_REGNUM))]
+- "TARGET_ARM && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
++ "TARGET_ARM"
+ "#"
+ "TARGET_ARM && reload_completed"
+ [(parallel [(set (reg:CC_C CC_REGNUM)
+@@ -838,7 +838,7 @@
+ if (TARGET_HARD_FLOAT && TARGET_MAVERICK
+ && TARGET_ARM
+ && cirrus_fp_register (operands[0], DImode)
+- && cirrus_fp_register (operands[1], DImode))
++ && cirrus_fp_register (operands[1], DImode) && 0)
+ {
+ emit_insn (gen_cirrus_subdi3 (operands[0], operands[1], operands[2]));
+ DONE;
+@@ -2599,7 +2599,7 @@
+ values to iwmmxt regs and back. */
+ FAIL;
+ }
+- else if (!TARGET_REALLY_IWMMXT && !(TARGET_HARD_FLOAT && TARGET_MAVERICK))
++ else if (!TARGET_REALLY_IWMMXT)
+ FAIL;
+ "
+ )
+@@ -4215,7 +4215,6 @@
+ [(set (match_operand:DI 0 "nonimmediate_operand" "=l,l,l,l,>,l, m,*r")
+ (match_operand:DI 1 "general_operand" "l, I,J,>,l,mi,l,*r"))]
+ "TARGET_THUMB
+- && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)
+ && ( register_operand (operands[0], DImode)
+ || register_operand (operands[1], DImode))"
+ "*
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-64bit-disable0.patch b/packages/gcc/gcc-4.2.2/arm-crunch-64bit-disable0.patch
new file mode 100644
index 0000000000..95abf68a60
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-64bit-disable0.patch
@@ -0,0 +1,47 @@
+diff -ruN /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/config/arm/arm.md
+--- /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.md 2006-09-28 03:10:22.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-05-15 09:53:21.000000000 +1000
+@@ -6865,10 +6877,12 @@
+ )
+
+ ;; Cirrus DI compare instruction
++;; This is disabled and left go through ARM core registers, because currently
++;; Crunch coprocessor does only signed comparison.
+ (define_expand "cmpdi"
+ [(match_operand:DI 0 "cirrus_fp_register" "")
+ (match_operand:DI 1 "cirrus_fp_register" "")]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK & 0"
+ "{
+ arm_compare_op0 = operands[0];
+ arm_compare_op1 = operands[1];
+@@ -6879,7 +6893,7 @@
+ [(set (reg:CC CC_REGNUM)
+ (compare:CC (match_operand:DI 0 "cirrus_fp_register" "v")
+ (match_operand:DI 1 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK & 0"
+ "cfcmp64%?\\tr15, %V0, %V1"
+ [(set_attr "type" "mav_farith")
+ (set_attr "cirrus" "compare")]
+@@ -10105,6 +10119,7 @@
+ [(unspec:SI [(match_operand:SI 0 "register_operand" "")] UNSPEC_PROLOGUE_USE)]
+ ""
+ "%@ %0 needed for prologue"
++ [(set_attr "length" "0")]
+ )
+
+
+diff -ruN /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/cirrus.md gcc-4.1.2/gcc/config/arm/cirrus.md
+--- /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/cirrus.md 2005-06-25 11:22:41.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/cirrus.md 2007-05-15 09:55:29.000000000 +1000
+@@ -348,7 +348,8 @@
+ (clobber (match_scratch:DF 2 "=v"))]
+ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
+ "cftruncd32%?\\t%Y2, %V1\;cfmvr64l%?\\t%0, %Z2"
+- [(set_attr "length" "8")]
++ [(set_attr "length" "8")
++ (set_attr "cirrus" "normal")]
+ )
+
+ (define_insn "*cirrus_truncdfsf2"
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-and-or.patch b/packages/gcc/gcc-4.2.2/arm-crunch-and-or.patch
new file mode 100644
index 0000000000..24357d316e
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-and-or.patch
@@ -0,0 +1,67 @@
+--- gcc-4.1.2/gcc/config/arm/arm.md-original 2007-06-13 17:16:38.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-13 17:35:19.000000000 +1000
+@@ -8455,7 +8455,7 @@
+ (and:SI (match_operator:SI 1 "arm_comparison_operator"
+ [(match_operand 3 "cc_register" "") (const_int 0)])
+ (match_operand:SI 2 "s_register_operand" "r")))]
+- "TARGET_ARM"
++ "TARGET_ARM && !TARGET_MAVERICK"
+ "mov%D1\\t%0, #0\;and%d1\\t%0, %2, #1"
+ [(set_attr "conds" "use")
+ (set_attr "length" "8")]
+@@ -8466,7 +8466,7 @@
+ (ior:SI (match_operator:SI 2 "arm_comparison_operator"
+ [(match_operand 3 "cc_register" "") (const_int 0)])
+ (match_operand:SI 1 "s_register_operand" "0,?r")))]
+- "TARGET_ARM"
++ "TARGET_ARM && !TARGET_MAVERICK"
+ "@
+ orr%d2\\t%0, %1, #1
+ mov%D2\\t%0, %1\;orr%d2\\t%0, %1, #1"
+@@ -8734,7 +8734,8 @@
+ (clobber (reg:CC CC_REGNUM))]
+ "TARGET_ARM
+ && (arm_select_dominance_cc_mode (operands[3], operands[6], DOM_CC_X_OR_Y)
+- != CCmode)"
++ != CCmode)
++ && !TARGET_MAVERICK"
+ "#"
+ "TARGET_ARM && reload_completed"
+ [(set (match_dup 7)
+@@ -8765,7 +8766,7 @@
+ (set (match_operand:SI 7 "s_register_operand" "=r")
+ (ior:SI (match_op_dup 3 [(match_dup 1) (match_dup 2)])
+ (match_op_dup 6 [(match_dup 4) (match_dup 5)])))]
+- "TARGET_ARM"
++ "TARGET_ARM && !TARGET_MAVERICK"
+ "#"
+ "TARGET_ARM && reload_completed"
+ [(set (match_dup 0)
+@@ -8790,7 +8791,8 @@
+ (clobber (reg:CC CC_REGNUM))]
+ "TARGET_ARM
+ && (arm_select_dominance_cc_mode (operands[3], operands[6], DOM_CC_X_AND_Y)
+- != CCmode)"
++ != CCmode)
++ && !TARGET_MAVERICK"
+ "#"
+ "TARGET_ARM && reload_completed
+ && (arm_select_dominance_cc_mode (operands[3], operands[6], DOM_CC_X_AND_Y)
+@@ -8823,7 +8825,7 @@
+ (set (match_operand:SI 7 "s_register_operand" "=r")
+ (and:SI (match_op_dup 3 [(match_dup 1) (match_dup 2)])
+ (match_op_dup 6 [(match_dup 4) (match_dup 5)])))]
+- "TARGET_ARM"
++ "TARGET_ARM && !TARGET_MAVERICK"
+ "#"
+ "TARGET_ARM && reload_completed"
+ [(set (match_dup 0)
+@@ -8850,7 +8852,7 @@
+ [(match_operand:SI 4 "s_register_operand" "r,r,r")
+ (match_operand:SI 5 "arm_add_operand" "rIL,rIL,rIL")])))
+ (clobber (reg:CC CC_REGNUM))]
+- "TARGET_ARM
++ "TARGET_ARM && !TARGET_MAVERICK
+ && (arm_select_dominance_cc_mode (operands[3], operands[6], DOM_CC_X_AND_Y)
+ == CCmode)"
+ "#"
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-cfcvt64-disable.patch b/packages/gcc/gcc-4.2.2/arm-crunch-cfcvt64-disable.patch
new file mode 100644
index 0000000000..f9280b18b5
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-cfcvt64-disable.patch
@@ -0,0 +1,19 @@
+--- gcc-4.2.0/gcc/config/arm/cirrus.md-original 2007-06-25 15:32:01.000000000 +1000
++++ gcc-4.2.0/gcc/config/arm/cirrus.md 2007-06-25 15:32:14.000000000 +1000
+@@ -325,14 +325,14 @@
+ (define_insn "floatdisf2"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (float:SF (match_operand:DI 1 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfcvt64s%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")])
+
+ (define_insn "floatdidf2"
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (float:DF (match_operand:DI 1 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfcvt64d%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")])
+
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-cfcvtds-disable.patch b/packages/gcc/gcc-4.2.2/arm-crunch-cfcvtds-disable.patch
new file mode 100644
index 0000000000..ec09ea16a1
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-cfcvtds-disable.patch
@@ -0,0 +1,32 @@
+--- gcc-4.1.2/gcc/config/arm/cirrus.md-cfcvt 2007-06-15 10:06:24.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/cirrus.md 2007-06-15 10:07:21.000000000 +1000
+@@ -355,11 +355,12 @@
+ (set_attr "cirrus" "normal")]
+ )
+
++; appears to be buggy - causes 20000320-1.c to fail in execute/ieee
+ (define_insn "*cirrus_truncdfsf2"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (float_truncate:SF
+ (match_operand:DF 1 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfcvtds%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")]
+ )
+--- gcc-4.1.2/gcc/config/arm/arm.md-truncdfsf2 2007-06-15 10:25:43.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-15 10:27:01.000000000 +1000
+@@ -3181,11 +3181,12 @@
+
+ ;; Truncation insns
+
++;; Maverick Crunch truncdfsf2 is buggy - see cirrus.md
+ (define_expand "truncdfsf2"
+ [(set (match_operand:SF 0 "s_register_operand" "")
+ (float_truncate:SF
+ (match_operand:DF 1 "s_register_operand" "")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ ""
+ )
+
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-cirrus-bugfixes.patch b/packages/gcc/gcc-4.2.2/arm-crunch-cirrus-bugfixes.patch
new file mode 100644
index 0000000000..cb0af8546d
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-cirrus-bugfixes.patch
@@ -0,0 +1,573 @@
+diff -ruN /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.c gcc-4.1.2/gcc/config/arm/arm.c
+--- /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.c 2007-05-09 16:32:29.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.c 2007-05-15 09:39:41.000000000 +1000
+@@ -4,6 +4,7 @@
+ Contributed by Pieter `Tiggr' Schoenmakers (rcpieter@win.tue.nl)
+ and Martin Simmons (@harleqn.co.uk).
+ More major hacks by Richard Earnshaw (rearnsha@arm.com).
++ Cirrus Crunch bugfixes by Vladimir Ivanov (vladit@nucleusys.com)
+
+ This file is part of GCC.
+
+@@ -131,9 +132,17 @@
+ static bool arm_xscale_rtx_costs (rtx, int, int, int *);
+ static bool arm_9e_rtx_costs (rtx, int, int, int *);
+ static int arm_address_cost (rtx);
+-static bool arm_memory_load_p (rtx);
++// static bool arm_memory_load_p (rtx);
+ static bool arm_cirrus_insn_p (rtx);
+-static void cirrus_reorg (rtx);
++// static void cirrus_reorg (rtx);
++static bool arm_mem_access_p (rtx);
++static bool cirrus_dest_regn_p (rtx, int);
++static rtx cirrus_prev_next_mach_insn (rtx, int *, int);
++static rtx cirrus_prev_mach_insn (rtx, int *);
++static rtx cirrus_next_mach_insn (rtx, int *);
++static void cirrus_reorg_branch (rtx);
++static void cirrus_reorg_bug1 (rtx);
++static void cirrus_reorg_bug10_12 (rtx);
+ static void arm_init_builtins (void);
+ static rtx arm_expand_builtin (tree, rtx, rtx, enum machine_mode, int);
+ static void arm_init_iwmmxt_builtins (void);
+@@ -5399,41 +5412,6 @@
+ || TREE_CODE (valtype) == COMPLEX_TYPE));
+ }
+
+-/* Returns TRUE if INSN is an "LDR REG, ADDR" instruction.
+- Use by the Cirrus Maverick code which has to workaround
+- a hardware bug triggered by such instructions. */
+-static bool
+-arm_memory_load_p (rtx insn)
+-{
+- rtx body, lhs, rhs;;
+-
+- if (insn == NULL_RTX || GET_CODE (insn) != INSN)
+- return false;
+-
+- body = PATTERN (insn);
+-
+- if (GET_CODE (body) != SET)
+- return false;
+-
+- lhs = XEXP (body, 0);
+- rhs = XEXP (body, 1);
+-
+- lhs = REG_OR_SUBREG_RTX (lhs);
+-
+- /* If the destination is not a general purpose
+- register we do not have to worry. */
+- if (GET_CODE (lhs) != REG
+- || REGNO_REG_CLASS (REGNO (lhs)) != GENERAL_REGS)
+- return false;
+-
+- /* As well as loads from memory we also have to react
+- to loads of invalid constants which will be turned
+- into loads from the minipool. */
+- return (GET_CODE (rhs) == MEM
+- || GET_CODE (rhs) == SYMBOL_REF
+- || note_invalid_constants (insn, -1, false));
+-}
+-
+ /* Return TRUE if INSN is a Cirrus instruction. */
+ static bool
+ arm_cirrus_insn_p (rtx insn)
+@@ -5452,124 +5433,218 @@
+ return attr != CIRRUS_NOT;
+ }
+
+-/* Cirrus reorg for invalid instruction combinations. */
+-static void
+-cirrus_reorg (rtx first)
++/* Return TRUE if ISN does memory access. */
++static bool
++arm_mem_access_p (rtx insn)
+ {
+- enum attr_cirrus attr;
+- rtx body = PATTERN (first);
+- rtx t;
+- int nops;
++ enum attr_type attr;
+
+- /* Any branch must be followed by 2 non Cirrus instructions. */
+- if (GET_CODE (first) == JUMP_INSN && GET_CODE (body) != RETURN)
+- {
+- nops = 0;
+- t = next_nonnote_insn (first);
++ /* get_attr aborts on USE and CLOBBER. */
++ if (!insn
++ || GET_CODE (insn) != INSN
++ || GET_CODE (PATTERN (insn)) == USE
++ || GET_CODE (PATTERN (insn)) == CLOBBER)
++ return 0;
+
+- if (arm_cirrus_insn_p (t))
+- ++ nops;
++ attr = get_attr_type (insn);
+
+- if (arm_cirrus_insn_p (next_nonnote_insn (t)))
+- ++ nops;
++ return attr == TYPE_LOAD_BYTE
++ || attr == TYPE_LOAD1 || attr == TYPE_LOAD2 || attr == TYPE_LOAD3 || attr == TYPE_LOAD4
++ || attr == TYPE_F_CVT
++ || attr == TYPE_F_MEM_R || attr == TYPE_R_MEM_F || attr == TYPE_F_2_R || attr == TYPE_R_2_F
++ || attr == TYPE_F_LOAD || attr == TYPE_F_LOADS || attr == TYPE_F_LOADD
++ || attr == TYPE_F_STORE || attr == TYPE_F_STORES || attr == TYPE_F_STORED
++ || attr == TYPE_STORE1 || attr == TYPE_STORE2 || attr == TYPE_STORE3 || attr == TYPE_STORE4;
++
++}
+
+- while (nops --)
+- emit_insn_after (gen_nop (), first);
++/* Return TRUE if destination is certain Cirrus register. */
++static bool
++cirrus_dest_regn_p (rtx body, int regn)
++{
++ rtx lhs;
++ int reg;
++ lhs = XEXP (body, 0);
++ if (GET_CODE (lhs) != REG)
++ return 0;
+
+- return;
+- }
++ reg = REGNO (lhs);
++ if (REGNO_REG_CLASS (reg) != CIRRUS_REGS)
++ return 0;
+
+- /* (float (blah)) is in parallel with a clobber. */
+- if (GET_CODE (body) == PARALLEL && XVECLEN (body, 0) > 0)
+- body = XVECEXP (body, 0, 0);
++ return reg == regn;
++}
++
++/* Get previous/next machine instruction during Cirrus workaround scans.
++ Assume worst case (for the purpose of Cirrus workarounds)
++ for JUMP / CALL instructions. */
++static rtx
++cirrus_prev_next_mach_insn (rtx insn, int *len, int next)
++{
++ rtx t;
++ int l = 0;
+
+- if (GET_CODE (body) == SET)
++ /* It seems that we can count only on INSN length. */
++ for ( ; ; )
+ {
+- rtx lhs = XEXP (body, 0), rhs = XEXP (body, 1);
++ if (next)
++ insn = NEXT_INSN (insn);
++ else
++ insn = PREV_INSN (insn);
++ if (!insn)
++ break;
+
+- /* cfldrd, cfldr64, cfstrd, cfstr64 must
+- be followed by a non Cirrus insn. */
+- if (get_attr_cirrus (first) == CIRRUS_DOUBLE)
+- {
+- if (arm_cirrus_insn_p (next_nonnote_insn (first)))
+- emit_insn_after (gen_nop (), first);
++ if (GET_CODE (insn) == INSN)
++ {
++ l = get_attr_length (insn) / 4;
++ if (l)
++ break;
++ }
++ else if (GET_CODE (insn) == JUMP_INSN)
++ {
++ l = 1;
++ t = is_jump_table (insn);
++ if (t)
++ l += get_jump_table_size (t) / 4;
++ break;
++ }
++ else if (GET_CODE (insn) == CALL_INSN)
++ {
++ l = 1;
++ break;
++ }
++ }
+
+- return;
+- }
+- else if (arm_memory_load_p (first))
+- {
+- unsigned int arm_regno;
++ if (len)
++ *len = l;
+
+- /* Any ldr/cfmvdlr, ldr/cfmvdhr, ldr/cfmvsr, ldr/cfmv64lr,
+- ldr/cfmv64hr combination where the Rd field is the same
+- in both instructions must be split with a non Cirrus
+- insn. Example:
+-
+- ldr r0, blah
+- nop
+- cfmvsr mvf0, r0. */
+-
+- /* Get Arm register number for ldr insn. */
+- if (GET_CODE (lhs) == REG)
+- arm_regno = REGNO (lhs);
+- else
+- {
+- gcc_assert (GET_CODE (rhs) == REG);
+- arm_regno = REGNO (rhs);
+- }
++ return insn;
++}
+
+- /* Next insn. */
+- first = next_nonnote_insn (first);
++static rtx
++cirrus_prev_mach_insn (rtx insn, int *len)
++{
++ return cirrus_prev_next_mach_insn (insn, len, 0);
++}
+
+- if (! arm_cirrus_insn_p (first))
+- return;
++static rtx
++cirrus_next_mach_insn (rtx insn, int *len)
++{
++ return cirrus_prev_next_mach_insn (insn, len, 1);
++}
+
+- body = PATTERN (first);
++/* Cirrus reorg for branch slots. */
++static void
++cirrus_reorg_branch (rtx insn)
++{
++ rtx t;
++ int nops, l;
+
+- /* (float (blah)) is in parallel with a clobber. */
+- if (GET_CODE (body) == PARALLEL && XVECLEN (body, 0))
+- body = XVECEXP (body, 0, 0);
+-
+- if (GET_CODE (body) == FLOAT)
+- body = XEXP (body, 0);
+-
+- if (get_attr_cirrus (first) == CIRRUS_MOVE
+- && GET_CODE (XEXP (body, 1)) == REG
+- && arm_regno == REGNO (XEXP (body, 1)))
+- emit_insn_after (gen_nop (), first);
++ /* TODO: handle jump-tables. */
++ t = is_jump_table (insn);
++ if (t)
++ return;
++
++ /* Any branch must be followed by 2 non Cirrus instructions. */
++ t = insn;
++ for (nops = 2; nops > 0; )
++ {
++ if (!cirrus_next_mach_insn (t, 0))
++ {
++ insn = t;
++ break;
++ }
++ t = cirrus_next_mach_insn (t, &l);
++ if (arm_cirrus_insn_p (t))
++ break;
++ nops -= l;
+
+- return;
+- }
+ }
+
+- /* get_attr cannot accept USE or CLOBBER. */
+- if (!first
+- || GET_CODE (first) != INSN
+- || GET_CODE (PATTERN (first)) == USE
+- || GET_CODE (PATTERN (first)) == CLOBBER)
+- return;
++ while (nops-- > 0)
++ emit_insn_after (gen_nop (), insn); /* WARNING: this appears to cause "bad immediate value for offset" errors in the assembler */
++}
+
+- attr = get_attr_cirrus (first);
++/* Cirrus reorg for bug #1 (cirrus + cfcmpxx). */
++static void
++cirrus_reorg_bug1 (rtx insn)
++{
++ rtx body = PATTERN (insn), body2;
++ rtx t;
++ int i, nops, l;
++ enum attr_cirrus attr;
+
+- /* Any coprocessor compare instruction (cfcmps, cfcmpd, ...)
+- must be followed by a non-coprocessor instruction. */
+- if (attr == CIRRUS_COMPARE)
++ /* Check if destination or clobber is Cirrus register. */
++ if (GET_CODE (body) == PARALLEL)
+ {
+- nops = 0;
+-
+- t = next_nonnote_insn (first);
++ for (i = 0; i < XVECLEN (body, 0); i++)
++ {
++ body2 = XVECEXP (body, 0, i);
++ if (GET_CODE (body2) == SET)
++ {
++ if (cirrus_dest_regn_p (body2, LAST_CIRRUS_FP_REGNUM))
++ {
++ nops = 5;
++ goto fix;
++ }
++ }
++ else if (GET_CODE (body2) == CLOBBER)
++ {
++ if (cirrus_dest_regn_p (body2, LAST_CIRRUS_FP_REGNUM))
++ {
++ nops = 4;
++ goto fix;
++ }
++ }
++ }
++ }
++ else if (GET_CODE (body) == SET)
++ {
++ if (cirrus_dest_regn_p (body, LAST_CIRRUS_FP_REGNUM))
++ {
++ nops = 5;
++ goto fix;
++ }
++ }
++ return;
+
+- if (arm_cirrus_insn_p (t))
+- ++ nops;
++fix:
++ t = insn;
++ for ( ; nops > 0; )
++ {
++ t = cirrus_next_mach_insn (t, &l);
++ if (!t)
++ break;
++ if (GET_CODE (t) == JUMP_INSN
++ || GET_CODE (t) == CALL_INSN)
++ {
++ nops -= l;
++ break;
++ }
++ else if (arm_cirrus_insn_p (t))
++ {
++ attr = get_attr_cirrus (t);
++ if (attr == CIRRUS_COMPARE)
++ break;
++ }
++ nops -= l;
++ }
+
+- if (arm_cirrus_insn_p (next_nonnote_insn (t)))
+- ++ nops;
++ while (nops-- > 0)
++ emit_insn_after (gen_nop (), insn); /* WARNING: this appears to cause "bad immediate value for offset" errors in the assembler */
++}
+
+- while (nops --)
+- emit_insn_after (gen_nop (), first);
++/* Cirrus reorg for bugs #10 and #12 (data aborts). */
++static void
++cirrus_reorg_bug10_12 (rtx insn)
++{
++ rtx t;
+
+- return;
+- }
++ t = cirrus_next_mach_insn (insn, 0);
++ if (arm_cirrus_insn_p (t))
++ if (TARGET_CIRRUS_D0 ||
++ get_attr_cirrus (t) == CIRRUS_DOUBLE)
++ emit_insn_after (gen_nop (), insn); /* WARNING: this appears to cause "bad immediate value for offset" errors in the assembler */
+ }
+
+ /* Return TRUE if X references a SYMBOL_REF. */
+@@ -7727,7 +7796,7 @@
+ {
+ Mnode * mp;
+ Mnode * nmp;
+- int align64 = 0;
++ int align64 = 0, stuffnop = 0;
+
+ if (ARM_DOUBLEWORD_ALIGN)
+ for (mp = minipool_vector_head; mp != NULL; mp = mp->next)
+@@ -7742,8 +7811,27 @@
+ ";; Emitting minipool after insn %u; address %ld; align %d (bytes)\n",
+ INSN_UID (scan), (unsigned long) minipool_barrier->address, align64 ? 8 : 4);
+
++ /* Check if branch before minipool is already stuffed with nops. */
++ if (TARGET_CIRRUS_D0 || TARGET_CIRRUS_D1)
++ {
++ rtx t;
++
++ t = prev_active_insn (scan);
++ if (GET_CODE (t) != INSN
++ || PATTERN (t) != const0_rtx)
++ stuffnop = 1;
++ }
+ scan = emit_label_after (gen_label_rtx (), scan);
+ scan = emit_insn_after (align64 ? gen_align_8 () : gen_align_4 (), scan);
++ /* Last instruction was branch, so put two non-Cirrus opcodes. */
++ if (stuffnop)
++ {
++#if TARGET_CIRRUS /* This is doubling up on nops, so I don't think this is a good idea */
++ emit_insn_before (gen_nop (), scan); /* WARNING: this appears to cause "bad immediate value for offset" errors in the assembler */
++ emit_insn_before (gen_nop (), scan); /* WARNING: this appears to cause "bad immediate value for offset" errors in the assembler */
++#endif
++ }
++
+ scan = emit_label_after (minipool_vector_label, scan);
+
+ for (mp = minipool_vector_head; mp != NULL; mp = nmp)
+@@ -8151,15 +8239,38 @@
+ gcc_assert (GET_CODE (insn) == NOTE);
+ minipool_pad = 0;
+
++#if TARGET_CIRRUS /* I think this is a double-up */
++ /* Scan all the insn and fix Cirrus issues. */
++ if (TARGET_CIRRUS_D0 || TARGET_CIRRUS_D1)
++ {
++ rtx t, s;
++
++ for (t = cirrus_next_mach_insn (insn, 0); t; t = cirrus_next_mach_insn (t, 0))
++ if (arm_mem_access_p (t))
++ cirrus_reorg_bug10_12 (t);
++
++ if (TARGET_CIRRUS_D0)
++ for (t = cirrus_next_mach_insn (insn, 0); t; t = cirrus_next_mach_insn (t, 0))
++ if (arm_cirrus_insn_p (t))
++ cirrus_reorg_bug1 (t);
++
++ /* Find last insn. */
++ for (t = insn; ; t = s)
++ {
++ s = cirrus_next_mach_insn (t, 0);
++ if (!s)
++ break;
++ }
++ /* Scan backward and fix branches. - WARNING: appears to cause "bad immediate value for offset" problems! */
++ for ( ; t; t = cirrus_prev_mach_insn (t, 0))
++ if (GET_CODE (t) == JUMP_INSN
++ || GET_CODE (t) == CALL_INSN)
++ cirrus_reorg_branch (t);
++ }
++#endif
+ /* Scan all the insns and record the operands that will need fixing. */
+ for (insn = next_nonnote_insn (insn); insn; insn = next_nonnote_insn (insn))
+ {
+- if (TARGET_CIRRUS_FIX_INVALID_INSNS
+- && (arm_cirrus_insn_p (insn)
+- || GET_CODE (insn) == JUMP_INSN
+- || arm_memory_load_p (insn)))
+- cirrus_reorg (insn);
+-
+ if (GET_CODE (insn) == BARRIER)
+ push_minipool_barrier (insn, address);
+ else if (INSN_P (insn))
+@@ -11755,16 +11910,10 @@
+ || get_attr_conds (this_insn) != CONDS_NOCOND)
+ fail = TRUE;
+
+- /* A conditional cirrus instruction must be followed by
+- a non Cirrus instruction. However, since we
+- conditionalize instructions in this function and by
+- the time we get here we can't add instructions
+- (nops), because shorten_branches() has already been
+- called, we will disable conditionalizing Cirrus
+- instructions to be safe. */
+- if (GET_CODE (scanbody) != USE
+- && GET_CODE (scanbody) != CLOBBER
+- && get_attr_cirrus (this_insn) != CIRRUS_NOT)
++ /* To avoid erratic behaviour, we avoid conditional Cirrus
++ instructions when doing workarounds. */
++ if (arm_cirrus_insn_p(this_insn)
++ && (TARGET_CIRRUS_D0 || TARGET_CIRRUS_D1))
+ fail = TRUE;
+ break;
+
+diff -ruN /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.h gcc-4.1.2/gcc/config/arm/arm.h
+--- /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.h 2005-11-05 01:02:51.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.h 2007-05-15 10:15:05.000000000 +1000
+@@ -5,6 +5,7 @@
+ and Martin Simmons (@harleqn.co.uk).
+ More major hacks by Richard Earnshaw (rearnsha@arm.com)
+ Minor hacks by Nick Clifton (nickc@cygnus.com)
++ Cirrus Crunch fixes by Vladimir Ivanov (vladitx@nucleusys.com)
+
+ This file is part of GCC.
+
+@@ -140,7 +141,9 @@
+ %{msoft-float:%{mhard-float: \
+ %e-msoft-float and -mhard_float may not be used together}} \
+ %{mbig-endian:%{mlittle-endian: \
+- %e-mbig-endian and -mlittle-endian may not be used together}}"
++ %e-mbig-endian and -mlittle-endian may not be used together}} \
++%{mfix-crunch-d0:%{mfix-crunch-d1: \
++ %e-mfix-crunch-d0 and -mfix-crunch-d1 may not be used together}}"
+
+ #ifndef CC1_SPEC
+ #define CC1_SPEC ""
+@@ -179,6 +182,9 @@
+ #define TARGET_HARD_FLOAT_ABI (arm_float_abi == ARM_FLOAT_ABI_HARD)
+ #define TARGET_FPA (arm_fp_model == ARM_FP_MODEL_FPA)
+ #define TARGET_MAVERICK (arm_fp_model == ARM_FP_MODEL_MAVERICK)
++#define TARGET_CIRRUS (arm_arch_cirrus)
++#define TARGET_CIRRUS_D0 0 /* (target_flags & ARM_FLAG_CIRRUS_D0) */
++#define TARGET_CIRRUS_D1 1 /* (target_flags & ARM_FLAG_CIRRUS_D1) */
+ #define TARGET_VFP (arm_fp_model == ARM_FP_MODEL_VFP)
+ #define TARGET_IWMMXT (arm_arch_iwmmxt)
+ #define TARGET_REALLY_IWMMXT (TARGET_IWMMXT && TARGET_ARM)
+diff -ruN /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.opt gcc-4.1.2/gcc/config/arm/arm.opt
+--- /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.opt 2005-11-05 01:02:51.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.opt 2007-05-15 10:09:31.000000000 +1000
+@@ -68,6 +68,14 @@
+ Target Report Mask(CIRRUS_FIX_INVALID_INSNS)
+ Cirrus: Place NOPs to avoid invalid instruction combinations
+
++fix-crunch-d0
++Target Report Mask(ARM_FLAG_CIRRUS_D0)
++Cirrus: workarounds for Crunch coprocessor revision D0
++
++fix-crunch-d1
++Target Report Mask(ARM_FLAG_CIRRUS_D1)
++Cirrus: workarounds for Crunch coprocessor revision D1
++
+ mcpu=
+ Target RejectNegative Joined
+ Specify the name of the target CPU
+diff -ruN /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/doc/invoke.texi gcc-4.1.2/gcc/doc/invoke.texi
+--- /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/doc/invoke.texi 2006-09-26 07:21:58.000000000 +1000
++++ gcc-4.1.2/gcc/doc/invoke.texi 2007-05-15 10:07:04.000000000 +1000
+@@ -408,7 +408,7 @@
+ -msingle-pic-base -mno-single-pic-base @gol
+ -mpic-register=@var{reg} @gol
+ -mnop-fun-dllimport @gol
+--mcirrus-fix-invalid-insns -mno-cirrus-fix-invalid-insns @gol
++-mfix-crunch-d0 -mfix-crunch-d1 @gol
+ -mpoke-function-name @gol
+ -mthumb -marm @gol
+ -mtpcs-frame -mtpcs-leaf-frame @gol
+@@ -7435,17 +7435,12 @@
+ Specify the register to be used for PIC addressing. The default is R10
+ unless stack-checking is enabled, when R9 is used.
+
+-@item -mcirrus-fix-invalid-insns
+-@opindex mcirrus-fix-invalid-insns
+-@opindex mno-cirrus-fix-invalid-insns
+-Insert NOPs into the instruction stream to in order to work around
+-problems with invalid Maverick instruction combinations. This option
+-is only valid if the @option{-mcpu=ep9312} option has been used to
+-enable generation of instructions for the Cirrus Maverick floating
+-point co-processor. This option is not enabled by default, since the
+-problem is only present in older Maverick implementations. The default
+-can be re-enabled by use of the @option{-mno-cirrus-fix-invalid-insns}
+-switch.
++@item -mfix-crunch-d0
++@itemx -mfix-crunch-d1
++@opindex mfix-crunch-d0
++@opindex mfix-crunch-d1
++Enable workarounds for the Cirrus MaverickCrunch coprocessor revisions
++D0 and D1 respectively.
+
+ @item -mpoke-function-name
+ @opindex mpoke-function-name
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-compare-geu.patch b/packages/gcc/gcc-4.2.2/arm-crunch-compare-geu.patch
new file mode 100644
index 0000000000..3d27cc1d9d
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-compare-geu.patch
@@ -0,0 +1,48 @@
+--- gcc-4.1.2/gcc/config/arm/arm.md-original 2007-06-08 06:39:41.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-08 06:41:00.000000000 +1000
+@@ -7125,6 +7125,22 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match GEU for MAVERICK.
++(define_insn "*arm_bgeu"
++ [(set (pc)
++ (if_then_else (geu (match_operand 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_ARM && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++ if (get_attr_cirrus (prev_active_insn(insn)) == CIRRUS_COMPARE)
++ return \"beq\\t%l0\;bvs\\t%l0\"; else return \"bge\\t%l0\;nop\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
+ ; Special pattern to match UNLT for MAVERICK - UGLY since we need to test for Z=0 && V=0.
+ (define_insn "*arm_bunlt"
+ [(set (pc)
+@@ -7240,6 +7256,22 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match reversed GEU for MAVERICK.
++(define_insn "*arm_bgeu_reversed"
++ [(set (pc)
++ (if_then_else (geu (match_operand 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_ARM && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t.+12\;bvs\\t.+8\;b\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "12")]
++)
++
+ ; Special pattern to match reversed UNLT for MAVERICK.
+ (define_insn "*arm_bunlt_reversed"
+ [(set (pc)
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-compare-unordered.patch b/packages/gcc/gcc-4.2.2/arm-crunch-compare-unordered.patch
new file mode 100644
index 0000000000..c4fcdb3746
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-compare-unordered.patch
@@ -0,0 +1,98 @@
+--- gcc-4.1.2/gcc/config/arm/arm.md-original 2007-06-07 14:45:22.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-07 15:13:58.000000000 +1000
+@@ -7001,16 +7001,16 @@
+ (if_then_else (unordered (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNORDERED, arm_compare_op0,
+ arm_compare_op1);"
+ )
+
+ (define_expand "bordered"
+ [(set (pc)
+ (if_then_else (ordered (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (ORDERED, arm_compare_op0,
+ arm_compare_op1);"
+@@ -7141,6 +7141,38 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match UNORDERED for MAVERICK - UGLY since we need to test for Z=0 && N=0.
++(define_insn "*arm_bunordered"
++ [(set (pc)
++ (if_then_else (unordered (match_operand:CCFP 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t.+12\;bmi\\t.+8\;b\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "12")]
++)
++
++; Special pattern to match ORDERED for MAVERICK.
++(define_insn "*arm_bordered"
++ [(set (pc)
++ (if_then_else (ordered (match_operand:CCFP 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t%l0\;bmi\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
+ (define_insn "*arm_cond_branch"
+ [(set (pc)
+ (if_then_else (match_operator 1 "arm_comparison_operator"
+@@ -7224,6 +7256,37 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match reversed UNORDERED for MAVERICK.
++(define_insn "*arm_bunordered_reversed"
++ [(set (pc)
++ (if_then_else (unordered (match_operand:CCFP 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t%l0\;bmi\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
++; Special pattern to match reversed ORDERED for MAVERICK - UGLY since we need to test for Z=0 && N=0.
++(define_insn "*arm_bordered_reversed"
++ [(set (pc)
++ (if_then_else (ordered (match_operand:CCFP 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t.+12\;bmi\\t.+8\;b\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "12")]
++)
+
+ (define_insn "*arm_cond_branch_reversed"
+ [(set (pc)
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-compare-unordered.patch-z-eq b/packages/gcc/gcc-4.2.2/arm-crunch-compare-unordered.patch-z-eq
new file mode 100644
index 0000000000..715fb95086
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-compare-unordered.patch-z-eq
@@ -0,0 +1,98 @@
+--- gcc-4.1.2/gcc/config/arm/arm.md-original 2007-06-07 14:45:22.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-07 15:13:58.000000000 +1000
+@@ -7001,16 +7001,16 @@
+ (if_then_else (unordered (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNORDERED, arm_compare_op0,
+ arm_compare_op1);"
+ )
+
+ (define_expand "bordered"
+ [(set (pc)
+ (if_then_else (ordered (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (ORDERED, arm_compare_op0,
+ arm_compare_op1);"
+@@ -7141,6 +7141,38 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match UNORDERED for MAVERICK - UGLY since we need to test for C=0 && N=0
++(define_insn "*arm_bunordered"
++ [(set (pc)
++ (if_then_else (unordered (match_operand 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"bcs\\t.+12\;bmi\\t.+8\;b\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "12")]
++)
++
++; Special pattern to match ORDERED for MAVERICK.
++(define_insn "*arm_bordered"
++ [(set (pc)
++ (if_then_else (ordered (match_operand 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"bcs\\t%l0\;bmi\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
+ (define_insn "*arm_cond_branch"
+ [(set (pc)
+ (if_then_else (match_operator 1 "arm_comparison_operator"
+@@ -7224,6 +7256,37 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match reversed UNORDERED for MAVERICK.
++(define_insn "*arm_bunordered_reversed"
++ [(set (pc)
++ (if_then_else (unordered (match_operand 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"bcs\\t%l0\;bmi\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
++; Special pattern to match reversed ORDERED for MAVERICK - UGLY since we need to test for C=0 && N=0
++(define_insn "*arm_bordered_reversed"
++ [(set (pc)
++ (if_then_else (ordered (match_operand 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"bcs\\t.+12\;bmi\\t.+8\;b\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "12")]
++)
+
+ (define_insn "*arm_cond_branch_reversed"
+ [(set (pc)
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-compare.patch b/packages/gcc/gcc-4.2.2/arm-crunch-compare.patch
new file mode 100644
index 0000000000..ccbb4854c3
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-compare.patch
@@ -0,0 +1,400 @@
+diff -urN gcc-4.1.2/gcc/config/arm/arm.c ../../../../old-tmp/work/arm-oabi-angstrom-linux/gcc-cross-4.1.2-backup/gcc-4.1.2/gcc/config/arm/arm.c
+--- gcc-4.1.2/gcc/config/arm/arm.c 2007-05-31 12:39:48.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.c 2007-05-29 17:19:38.000000000 +1000
+@@ -11427,26 +11427,53 @@
+ /* These encodings assume that AC=1 in the FPA system control
+ byte. This allows us to handle all cases except UNEQ and
+ LTGT. */
+- switch (comp_code)
+- {
+- case GE: return ARM_GE;
+- case GT: return ARM_GT;
+- case LE: return ARM_LS;
+- case LT: return ARM_MI;
+- case NE: return ARM_NE;
+- case EQ: return ARM_EQ;
+- case ORDERED: return ARM_VC;
+- case UNORDERED: return ARM_VS;
+- case UNLT: return ARM_LT;
+- case UNLE: return ARM_LE;
+- case UNGT: return ARM_HI;
+- case UNGE: return ARM_PL;
+- /* UNEQ and LTGT do not have a representation. */
+- case UNEQ: /* Fall through. */
+- case LTGT: /* Fall through. */
+- default: gcc_unreachable ();
+- }
+-
++ if (!TARGET_MAVERICK)
++ {
++ switch (comp_code)
++ {
++ case GE: return ARM_GE;
++ case GT: return ARM_GT;
++ case LE: return ARM_LS;
++ case LT: return ARM_MI;
++ case NE: return ARM_NE;
++ case EQ: return ARM_EQ;
++ case ORDERED: return ARM_VC;
++ case UNORDERED: return ARM_VS;
++ case UNLT: return ARM_LT;
++ case UNLE: return ARM_LE;
++ case UNGT: return ARM_HI;
++ case UNGE: return ARM_PL;
++ /* UNEQ and LTGT do not have a representation. */
++ case UNEQ: /* Fall through. */
++ case LTGT: /* Fall through. */
++ default: gcc_unreachable ();
++ }
++ }
++ else
++ {
++ /* CIRRUS */
++ switch (comp_code)
++ {
++#if 1
++ case GT: return ARM_VS;
++ case LE: return ARM_LE;
++ case LT: return ARM_LT;
++ case NE: return ARM_NE;
++ case EQ: return ARM_EQ;
++ case UNLE: return ARM_VC;
++ case UNGT: return ARM_GT;
++ case UNGE: return ARM_GE;
++ case UNEQ: return ARM_PL;
++ case LTGT: return ARM_MI;
++ /* These do not have a representation. */
++ case GE: /* Fall through. -UNGE wrong atm */
++ case UNLT: /* Fall through. -LT wrong atm */
++ case ORDERED: /* Fall through. -AL wrong atm */
++ case UNORDERED: /* Fall through. -AL wrong atm */
++#endif
++ default: gcc_unreachable ();
++ }
++ }
+ case CC_SWPmode:
+ switch (comp_code)
+ {
+diff -urN gcc-4.1.2/gcc/config/arm/arm.md ../../../../old-tmp/work/arm-oabi-angstrom-linux/gcc-cross-4.1.2-backup/gcc-4.1.2/gcc/config/arm/arm.md
+--- gcc-4.1.2/gcc/config/arm/arm.md 2007-05-31 12:39:48.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-05-29 15:17:18.000000000 +1000
+@@ -6952,10 +6952,11 @@
+ "operands[1] = arm_gen_compare_reg (LE, arm_compare_op0, arm_compare_op1);"
+ )
+
++;broken on cirrus
+ (define_expand "bge"
+ [(set (pc)
+ (if_then_else (ge (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM"
++ "TARGET_ARM" ;; && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)
+ "operands[1] = arm_gen_compare_reg (GE, arm_compare_op0, arm_compare_op1);"
+@@ -6988,6 +6989,7 @@
+ "operands[1] = arm_gen_compare_reg (LEU, arm_compare_op0, arm_compare_op1);"
+ )
+
++; broken on cirrus?
+ (define_expand "bgeu"
+ [(set (pc)
+ (if_then_else (geu (match_dup 1) (const_int 0))
+@@ -7031,14 +7033,15 @@
+ (if_then_else (ungt (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGT, arm_compare_op0, arm_compare_op1);"
+ )
+
+-(define_expand "bunlt"
++; broken for cirrus
++(define_expand "bunlt"
+ [(set (pc)
+ (if_then_else (unlt (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNLT, arm_compare_op0, arm_compare_op1);"
+@@ -7049,7 +7052,7 @@
+ (if_then_else (unge (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGE, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7058,7 +7061,7 @@
+ (if_then_else (unle (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNLE, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7069,7 +7072,7 @@
+ (if_then_else (uneq (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)" ;; || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNEQ, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7078,7 +7081,7 @@
+ (if_then_else (ltgt (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)" ;; || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (LTGT, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7086,7 +7089,7 @@
+ ;; Patterns to match conditional branch insns.
+ ;;
+
+-; Special pattern to match UNEQ.
++; Special pattern to match UNEQ for FPA and VFP.
+ (define_insn "*arm_buneq"
+ [(set (pc)
+ (if_then_else (uneq (match_operand 1 "cc_register" "") (const_int 0))
+@@ -7102,7 +7105,7 @@
+ (set_attr "length" "8")]
+ )
+
+-; Special pattern to match LTGT.
++; Special pattern to match LTGT for FPA and VFP.
+ (define_insn "*arm_bltgt"
+ [(set (pc)
+ (if_then_else (ltgt (match_operand 1 "cc_register" "") (const_int 0))
+@@ -7118,6 +7121,38 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match GE for MAVERICK.
++(define_insn "*arm_bge"
++ [(set (pc)
++ (if_then_else (ge (match_operand:CCFP 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t%l0\;bvs\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
++; Special pattern to match UNLT for MAVERICK - UGLY since we need to test for Z=0 && V=0.
++(define_insn "*arm_bunlt"
++ [(set (pc)
++ (if_then_else (unlt (match_operand:CCFP 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t.+12\;bvs\\t.+8\;b\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "12")]
++)
++
+ (define_insn "*arm_cond_branch"
+ [(set (pc)
+ (if_then_else (match_operator 1 "arm_comparison_operator"
+@@ -7137,7 +7172,7 @@
+ (set_attr "type" "branch")]
+ )
+
+-; Special pattern to match reversed UNEQ.
++; Special pattern to match reversed UNEQ for FPA and VFP.
+ (define_insn "*arm_buneq_reversed"
+ [(set (pc)
+ (if_then_else (uneq (match_operand 1 "cc_register" "") (const_int 0))
+@@ -7153,7 +7188,7 @@
+ (set_attr "length" "8")]
+ )
+
+-; Special pattern to match reversed LTGT.
++; Special pattern to match reversed LTGT for FPA and VFP.
+ (define_insn "*arm_bltgt_reversed"
+ [(set (pc)
+ (if_then_else (ltgt (match_operand 1 "cc_register" "") (const_int 0))
+@@ -7169,6 +7204,39 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match reversed GE for MAVERICK - UGLY since we need to tst for Z=0 && N=0.
++(define_insn "*arm_bge_reversed"
++ [(set (pc)
++ (if_then_else (ge (match_operand:CCFP 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t.+12\;bvs\\t.+8\;b\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "12")]
++)
++
++; Special pattern to match reversed UNLT for MAVERICK.
++(define_insn "*arm_bunlt_reversed"
++ [(set (pc)
++ (if_then_else (unlt (match_operand:CCFP 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t%l0\;bvs\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
++
+ (define_insn "*arm_cond_branch_reversed"
+ [(set (pc)
+ (if_then_else (match_operator 1 "arm_comparison_operator"
+@@ -7220,8 +7288,9 @@
+ "operands[1] = arm_gen_compare_reg (LE, arm_compare_op0, arm_compare_op1);"
+ )
+
++;; broken for cirrus - definitely
+ (define_expand "sge"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ge:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM"
++ "TARGET_ARM && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (GE, arm_compare_op0, arm_compare_op1);"
+@@ -7227,6 +7296,14 @@
+ "operands[1] = arm_gen_compare_reg (GE, arm_compare_op0, arm_compare_op1);"
+ )
+
++;;; DO NOT add patterns for SGE these can not be represented with MAVERICK
++; (define_expand "sge"
++; [(set (match_operand:SI 0 "s_register_operand" "")
++; (ge:SI (match_dup 1) (const_int 0)))]
++; "TARGET_ARM && (TARGET_MAVERICK)"
++; "gcc_unreachable ();"
++; )
++
+ (define_expand "slt"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (lt:SI (match_dup 1) (const_int 0)))]
+@@ -7248,6 +7325,7 @@
+ "operands[1] = arm_gen_compare_reg (LEU, arm_compare_op0, arm_compare_op1);"
+ )
+
++;; broken for cirrus - maybe
+ (define_expand "sgeu"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (geu:SI (match_dup 1) (const_int 0)))]
+@@ -7255,6 +7333,14 @@
+ "operands[1] = arm_gen_compare_reg (GEU, arm_compare_op0, arm_compare_op1);"
+ )
+
++;;; DO NOT add patterns for SGEU these may not be represented with MAVERICK?
++; (define_expand "sgeu"
++; [(set (match_operand:SI 0 "s_register_operand" "")
++; (ge:SI (match_dup 1) (const_int 0)))]
++; "TARGET_ARM && (TARGET_MAVERICK)"
++; "gcc_unreachable ();"
++; )
++
+ (define_expand "sltu"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ltu:SI (match_dup 1) (const_int 0)))]
+@@ -7281,7 +7367,7 @@
+ (define_expand "sungt"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ungt:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGT, arm_compare_op0,
+ arm_compare_op1);"
+ )
+@@ -7289,23 +7375,32 @@
+ (define_expand "sunge"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unge:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGE, arm_compare_op0,
+ arm_compare_op1);"
+ )
+
++; broken for cirrus
+ (define_expand "sunlt"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unlt:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "operands[1] = arm_gen_compare_reg (UNLT, arm_compare_op0,
+ arm_compare_op1);"
+ )
+
++;;; DO NOT add patterns for SUNLT these can't be represented with MAVERICK
++; (define_expand "sunlt"
++; [(set (match_operand:SI 0 "s_register_operand" "")
++; (unlt:SI (match_dup 1) (const_int 0)))]
++; "TARGET_ARM && (TARGET_MAVERICK)"
++; "gcc_unreachable ();"
++; )
++
+ (define_expand "sunle"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unle:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNLE, arm_compare_op0,
+ arm_compare_op1);"
+ )
+@@ -7371,7 +7466,7 @@
+ enum rtx_code code = GET_CODE (operands[1]);
+ rtx ccreg;
+
+- if (code == UNEQ || code == LTGT)
++ if ((code == UNEQ || code == LTGT) || (TARGET_MAVERICK && (code == GE || code == UNLT || code == ORDERED || code == UNORDERED)))
+ FAIL;
+
+ ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1);
+@@ -7390,7 +7485,8 @@
+ enum rtx_code code = GET_CODE (operands[1]);
+ rtx ccreg;
+
+- if (code == UNEQ || code == LTGT)
++ if ((code == UNEQ || code == LTGT) || (TARGET_MAVERICK && (code == GE || code == UNLT || code == ORDERED || code == UNORDERED)))
++
+ FAIL;
+
+ /* When compiling for SOFT_FLOAT, ensure both arms are in registers.
+@@ -7409,13 +7505,13 @@
+ (if_then_else:DF (match_operand 1 "arm_comparison_operator" "")
+ (match_operand:DF 2 "s_register_operand" "")
+ (match_operand:DF 3 "arm_float_add_operand" "")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "
+ {
+ enum rtx_code code = GET_CODE (operands[1]);
+ rtx ccreg;
+
+- if (code == UNEQ || code == LTGT)
++ if ((code == UNEQ || code == LTGT) || (TARGET_MAVERICK && (code==GE || code == UNLT || code == ORDERED || code == UNORDERED)))
+ FAIL;
+
+ ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1);
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-compare.patch-z-eq b/packages/gcc/gcc-4.2.2/arm-crunch-compare.patch-z-eq
new file mode 100644
index 0000000000..bc40411be4
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-compare.patch-z-eq
@@ -0,0 +1,400 @@
+diff -urN gcc-4.1.2/gcc/config/arm/arm.c ../../../../old-tmp/work/arm-oabi-angstrom-linux/gcc-cross-4.1.2-backup/gcc-4.1.2/gcc/config/arm/arm.c
+--- gcc-4.1.2/gcc/config/arm/arm.c 2007-05-31 12:39:48.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.c 2007-05-29 17:19:38.000000000 +1000
+@@ -11427,26 +11427,53 @@
+ /* These encodings assume that AC=1 in the FPA system control
+ byte. This allows us to handle all cases except UNEQ and
+ LTGT. */
+- switch (comp_code)
+- {
+- case GE: return ARM_GE;
+- case GT: return ARM_GT;
+- case LE: return ARM_LS;
+- case LT: return ARM_MI;
+- case NE: return ARM_NE;
+- case EQ: return ARM_EQ;
+- case ORDERED: return ARM_VC;
+- case UNORDERED: return ARM_VS;
+- case UNLT: return ARM_LT;
+- case UNLE: return ARM_LE;
+- case UNGT: return ARM_HI;
+- case UNGE: return ARM_PL;
+- /* UNEQ and LTGT do not have a representation. */
+- case UNEQ: /* Fall through. */
+- case LTGT: /* Fall through. */
+- default: gcc_unreachable ();
+- }
+-
++ if (!TARGET_MAVERICK)
++ {
++ switch (comp_code)
++ {
++ case GE: return ARM_GE;
++ case GT: return ARM_GT;
++ case LE: return ARM_LS;
++ case LT: return ARM_MI;
++ case NE: return ARM_NE;
++ case EQ: return ARM_EQ;
++ case ORDERED: return ARM_VC;
++ case UNORDERED: return ARM_VS;
++ case UNLT: return ARM_LT;
++ case UNLE: return ARM_LE;
++ case UNGT: return ARM_HI;
++ case UNGE: return ARM_PL;
++ /* UNEQ and LTGT do not have a representation. */
++ case UNEQ: /* Fall through. */
++ case LTGT: /* Fall through. */
++ default: gcc_unreachable ();
++ }
++ }
++ else
++ {
++ /* CIRRUS */
++ switch (comp_code)
++ {
++#if 1
++ case GT: return ARM_VS;
++ case LE: return ARM_LE;
++ case LT: return ARM_LT;
++ case NE: return ARM_NE;
++ case EQ: return ARM_EQ;
++ case UNLE: return ARM_VC;
++ case UNGT: return ARM_GT;
++ case UNGE: return ARM_GE;
++ case UNEQ: return ARM_PL;
++ case LTGT: return ARM_MI;
++ /* These do not have a representation. */
++ case GE: /* Fall through. -UNGE wrong atm */
++ case UNLT: /* Fall through. -LT wrong atm */
++ case ORDERED: /* Fall through. -AL wrong atm */
++ case UNORDERED: /* Fall through. -AL wrong atm */
++#endif
++ default: gcc_unreachable ();
++ }
++ }
+ case CC_SWPmode:
+ switch (comp_code)
+ {
+diff -urN gcc-4.1.2/gcc/config/arm/arm.md ../../../../old-tmp/work/arm-oabi-angstrom-linux/gcc-cross-4.1.2-backup/gcc-4.1.2/gcc/config/arm/arm.md
+--- gcc-4.1.2/gcc/config/arm/arm.md 2007-05-31 12:39:48.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-05-29 15:17:18.000000000 +1000
+@@ -6952,10 +6952,11 @@
+ "operands[1] = arm_gen_compare_reg (LE, arm_compare_op0, arm_compare_op1);"
+ )
+
++;broken on cirrus
+ (define_expand "bge"
+ [(set (pc)
+ (if_then_else (ge (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM"
++ "TARGET_ARM"
+ "operands[1] = arm_gen_compare_reg (GE, arm_compare_op0, arm_compare_op1);"
+@@ -6988,6 +6989,7 @@
+ "operands[1] = arm_gen_compare_reg (LEU, arm_compare_op0, arm_compare_op1);"
+ )
+
++; broken on cirrus?
+ (define_expand "bgeu"
+ [(set (pc)
+ (if_then_else (geu (match_dup 1) (const_int 0))
+@@ -7031,14 +7033,15 @@
+ (if_then_else (ungt (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGT, arm_compare_op0, arm_compare_op1);"
+ )
+
+-(define_expand "bunlt"
++; broken for cirrus
++(define_expand "bunlt"
+ [(set (pc)
+ (if_then_else (unlt (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNLT, arm_compare_op0, arm_compare_op1);"
+@@ -7049,7 +7052,7 @@
+ (if_then_else (unge (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGE, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7058,7 +7061,7 @@
+ (if_then_else (unle (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNLE, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7069,7 +7072,7 @@
+ (if_then_else (uneq (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)" ;; || TARGET_MAVERICK
+ "operands[1] = arm_gen_compare_reg (UNEQ, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7078,7 +7081,7 @@
+ (if_then_else (ltgt (match_dup 1) (const_int 0))
+ (label_ref (match_operand 0 "" ""))
+ (pc)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)" ;; || TARGET_MAVERICK
+ "operands[1] = arm_gen_compare_reg (LTGT, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7086,7 +7089,7 @@
+ ;; Patterns to match conditional branch insns.
+ ;;
+
+-; Special pattern to match UNEQ.
++; Special pattern to match UNEQ for FPA and VFP.
+ (define_insn "*arm_buneq"
+ [(set (pc)
+ (if_then_else (uneq (match_operand 1 "cc_register" "") (const_int 0))
+@@ -7102,7 +7105,7 @@
+ (set_attr "length" "8")]
+ )
+
+-; Special pattern to match LTGT.
++; Special pattern to match LTGT for FPA and VFP.
+ (define_insn "*arm_bltgt"
+ [(set (pc)
+ (if_then_else (ltgt (match_operand 1 "cc_register" "") (const_int 0))
+@@ -7118,6 +7121,38 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match GE for MAVERICK.
++(define_insn "*arm_bge"
++ [(set (pc)
++ (if_then_else (ge (match_operand 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_ARM && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t%l0\;bvs\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
++; Special pattern to match UNLT for MAVERICK.
++(define_insn "*arm_bunlt"
++ [(set (pc)
++ (if_then_else (unlt (match_operand 1 "cc_register" "") (const_int 0))
++ (label_ref (match_operand 0 "" ""))
++ (pc)))]
++ "TARGET_ARM && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"bne\\t%l0\;bvc\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
+ (define_insn "*arm_cond_branch"
+ [(set (pc)
+ (if_then_else (match_operator 1 "arm_comparison_operator"
+@@ -7137,7 +7172,7 @@
+ (set_attr "type" "branch")]
+ )
+
+-; Special pattern to match reversed UNEQ.
++; Special pattern to match reversed UNEQ for FPA and VFP.
+ (define_insn "*arm_buneq_reversed"
+ [(set (pc)
+ (if_then_else (uneq (match_operand 1 "cc_register" "") (const_int 0))
+@@ -7153,7 +7188,7 @@
+ (set_attr "length" "8")]
+ )
+
+-; Special pattern to match reversed LTGT.
++; Special pattern to match reversed LTGT for FPA and VFP.
+ (define_insn "*arm_bltgt_reversed"
+ [(set (pc)
+ (if_then_else (ltgt (match_operand 1 "cc_register" "") (const_int 0))
+@@ -7169,6 +7204,39 @@
+ (set_attr "length" "8")]
+ )
+
++; Special pattern to match reversed GE for MAVERICK.
++(define_insn "*arm_bge_reversed"
++ [(set (pc)
++ (if_then_else (ge (match_operand 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_ARM && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"bne\\t%l0\;bvc\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
++; Special pattern to match reversed UNLT for MAVERICK.
++(define_insn "*arm_bunlt_reversed"
++ [(set (pc)
++ (if_then_else (unlt (match_operand 1 "cc_register" "") (const_int 0))
++ (pc)
++ (label_ref (match_operand 0 "" ""))))]
++ "TARGET_ARM && (TARGET_MAVERICK)"
++ "*
++ gcc_assert (!arm_ccfsm_state);
++
++ return \"beq\\t%l0\;bvs\\t%l0\";
++ "
++ [(set_attr "conds" "jump_clob")
++ (set_attr "length" "8")]
++)
++
++
+ (define_insn "*arm_cond_branch_reversed"
+ [(set (pc)
+ (if_then_else (match_operator 1 "arm_comparison_operator"
+@@ -7220,8 +7288,9 @@
+ "operands[1] = arm_gen_compare_reg (LE, arm_compare_op0, arm_compare_op1);"
+ )
+
++;; broken for cirrus - definitely
+ (define_expand "sge"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ge:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM"
++ "TARGET_ARM && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (GE, arm_compare_op0, arm_compare_op1);"
+@@ -7227,6 +7296,14 @@
+ "operands[1] = arm_gen_compare_reg (GE, arm_compare_op0, arm_compare_op1);"
+ )
+
++;;; DO NOT add patterns for SGE these can not be represented with MAVERICK
++; (define_expand "sge"
++; [(set (match_operand:SI 0 "s_register_operand" "")
++; (ge:SI (match_dup 1) (const_int 0)))]
++; "TARGET_ARM && (TARGET_MAVERICK)"
++; "gcc_unreachable ();"
++; )
++
+ (define_expand "slt"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (lt:SI (match_dup 1) (const_int 0)))]
+@@ -7248,6 +7325,7 @@
+ "operands[1] = arm_gen_compare_reg (LEU, arm_compare_op0, arm_compare_op1);"
+ )
+
++;; broken for cirrus - maybe
+ (define_expand "sgeu"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (geu:SI (match_dup 1) (const_int 0)))]
+@@ -7255,6 +7333,14 @@
+ "operands[1] = arm_gen_compare_reg (GEU, arm_compare_op0, arm_compare_op1);"
+ )
+
++;;; DO NOT add patterns for SGEU these may not be represented with MAVERICK?
++; (define_expand "sgeu"
++; [(set (match_operand:SI 0 "s_register_operand" "")
++; (ge:SI (match_dup 1) (const_int 0)))]
++; "TARGET_ARM && (TARGET_MAVERICK)"
++; "gcc_unreachable ();"
++; )
++
+ (define_expand "sltu"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ltu:SI (match_dup 1) (const_int 0)))]
+@@ -7281,7 +7367,7 @@
+ (define_expand "sungt"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ungt:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGT, arm_compare_op0,
+ arm_compare_op1);"
+ )
+@@ -7289,23 +7375,32 @@
+ (define_expand "sunge"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unge:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNGE, arm_compare_op0,
+ arm_compare_op1);"
+ )
+
++; broken for cirrus
+ (define_expand "sunlt"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unlt:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "operands[1] = arm_gen_compare_reg (UNLT, arm_compare_op0,
+ arm_compare_op1);"
+ )
+
++;;; DO NOT add patterns for SUNLT these can't be represented with MAVERICK
++; (define_expand "sunlt"
++; [(set (match_operand:SI 0 "s_register_operand" "")
++; (unlt:SI (match_dup 1) (const_int 0)))]
++; "TARGET_ARM && (TARGET_MAVERICK)"
++; "gcc_unreachable ();"
++; )
++
+ (define_expand "sunle"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unle:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNLE, arm_compare_op0,
+ arm_compare_op1);"
+ )
+@@ -7371,7 +7466,7 @@
+ enum rtx_code code = GET_CODE (operands[1]);
+ rtx ccreg;
+
+- if (code == UNEQ || code == LTGT)
++ if (code == UNEQ || code == LTGT || code == GE || code == UNLT || code == ORDERED || code == UNORDERED)
+ FAIL;
+
+ ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1);
+@@ -7390,7 +7485,8 @@
+ enum rtx_code code = GET_CODE (operands[1]);
+ rtx ccreg;
+
+- if (code == UNEQ || code == LTGT)
++ if (code == UNEQ || code == LTGT || code == GE || code == UNLT || code == ORDERED || code == UNORDERED)
++
+ FAIL;
+
+ /* When compiling for SOFT_FLOAT, ensure both arms are in registers.
+@@ -7409,13 +7505,13 @@
+ (if_then_else:DF (match_operand 1 "arm_comparison_operator" "")
+ (match_operand:DF 2 "s_register_operand" "")
+ (match_operand:DF 3 "arm_float_add_operand" "")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "
+ {
+ enum rtx_code code = GET_CODE (operands[1]);
+ rtx ccreg;
+
+- if (code == UNEQ || code == LTGT)
++ if (code == UNEQ || code == LTGT || code == GE || code == UNLT || code == ORDERED || code == UNORDERED)
+ FAIL;
+
+ ccreg = arm_gen_compare_reg (code, arm_compare_op0, arm_compare_op1);
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-dominance.patch b/packages/gcc/gcc-4.2.2/arm-crunch-dominance.patch
new file mode 100644
index 0000000000..517ca8d80e
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-dominance.patch
@@ -0,0 +1,12 @@
+--- gcc-4.1.2/gcc/config/arm/arm.c-original 2007-06-13 11:50:10.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.c 2007-06-13 11:50:56.000000000 +1000
+@@ -6556,6 +6556,9 @@
+ enum rtx_code cond1, cond2;
+ int swapped = 0;
+
++ if (TARGET_MAVERICK) // Simple hack for MAVERICK
++ return CCmode;
++
+ /* Currently we will probably get the wrong result if the individual
+ comparisons are not simple. This also ensures that it is safe to
+ reverse a comparison if necessary. */
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754-div.patch b/packages/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754-div.patch
new file mode 100644
index 0000000000..940f4a65ae
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754-div.patch
@@ -0,0 +1,139 @@
+--- gcc-4.1.2/gcc/config/arm/ieee754-df-original.S 2007-06-25 10:22:06.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-25 10:27:17.000000000 +1000
+@@ -717,6 +717,10 @@
+ cmn r4, #(53 + 1)
+ movle xl, #0
+ bicle xh, xh, #0x7fffffff
++#ifdef __MAVERICK__
++ cfmvdlr mvd0, xl
++ cfmvdhr mvd0, xh
++#endif
+ RETLDM "r4, r5, r6" le
+
+ @ Find out proper shift value.
+@@ -738,6 +742,10 @@
+ adc xh, r2, xh, lsr r4
+ orrs lr, lr, r3, lsl #1
+ biceq xl, xl, r3, lsr #31
++#ifdef __MAVERICK__
++ cfmvdlr mvd0, xl
++ cfmvdhr mvd0, xh
++#endif
+ RETLDM "r4, r5, r6"
+
+ @ shift result right of 21 to 31 bits, or left 11 to 1 bits after
+@@ -752,6 +760,10 @@
+ adc xh, xh, #0
+ orrs lr, lr, r3, lsl #1
+ biceq xl, xl, r3, lsr #31
++#ifdef __MAVERICK__
++ cfmvdlr mvd0, xl
++ cfmvdhr mvd0, xh
++#endif
+ RETLDM "r4, r5, r6"
+
+ @ Shift value right of 32 to 64 bits, or 0 to 32 bits after a switch
+@@ -766,6 +778,10 @@
+ add xl, xl, r3, lsr #31
+ orrs lr, lr, r3, lsl #1
+ biceq xl, xl, r3, lsr #31
++#ifdef __MAVERICK__
++ cfmvdlr mvd0, xl
++ cfmvdhr mvd0, xh
++#endif
+ RETLDM "r4, r5, r6"
+
+ @ One or both arguments are denormalized.
+@@ -808,6 +824,10 @@
+ eor xh, xh, yh
+ bic xh, xh, #0x7fffffff
+ mov xl, #0
++#ifdef __MAVERICK__
++ cfmvdlr mvd0, xl
++ cfmvdhr mvd0, xh
++#endif
+ RETLDM "r4, r5, r6"
+
+ 1: @ One or both args are INF or NAN.
+@@ -837,12 +857,20 @@
+ orr xh, xh, #0x7f000000
+ orr xh, xh, #0x00f00000
+ mov xl, #0
++#ifdef __MAVERICK__
++ cfmvdlr mvd0, xl
++ cfmvdhr mvd0, xh
++#endif
+ RETLDM "r4, r5, r6"
+
+ @ Return a quiet NAN.
+ LSYM(Lml_n):
+ orr xh, xh, #0x7f000000
+ orr xh, xh, #0x00f80000
++#ifdef __MAVERICK__
++ cfmvdlr mvd0, xl
++ cfmvdhr mvd0, xh
++#endif
+ RETLDM "r4, r5, r6"
+
+ FUNC_END aeabi_dmul
+--- gcc-4.1.2/gcc/config/arm/ieee754-sf-original.S 2007-06-25 10:18:52.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-25 10:40:25.000000000 +1000
+@@ -518,6 +518,9 @@
+ @ Check if denormalized result is possible, otherwise return signed 0.
+ cmn r2, #(24 + 1)
+ bicle r0, r0, #0x7fffffff
++#ifdef __MAVERICK__
++ cfmvsr mvf0, r0
++#endif
+ RETc(le)
+
+ @ Shift value right, round, etc.
+@@ -530,6 +533,9 @@
+ adc r0, r0, #0
+ orrs r3, r3, ip, lsl #1
+ biceq r0, r0, ip, lsr #31
++#ifdef __MAVERICK__
++ cfmvsr mvf0, r0
++#endif
+ RET
+
+ @ One or both arguments are denormalized.
+@@ -567,6 +573,9 @@
+ LSYM(Lml_z):
+ eor r0, r0, r1
+ bic r0, r0, #0x7fffffff
++#ifdef __MAVERICK__
++ cfmvsr mvf0, r0
++#endif
+ RET
+
+ 1: @ One or both args are INF or NAN.
+@@ -595,12 +604,18 @@
+ and r0, r0, #0x80000000
+ orr r0, r0, #0x7f000000
+ orr r0, r0, #0x00800000
++#ifdef __MAVERICK__
++ cfmvsr mvf0, r0
++#endif
+ RET
+
+ @ Return a quiet NAN.
+ LSYM(Lml_n):
+ orr r0, r0, #0x7f000000
+ orr r0, r0, #0x00c00000
++#ifdef __MAVERICK__
++ cfmvsr mvf0, r0
++#endif
+ RET
+
+ FUNC_END aeabi_fmul
+@@ -677,6 +692,9 @@
+ adds r2, r2, #127
+ rsbgts r3, r2, #255
+ orrgt r0, r0, r2, lsl #23
++#ifdef __MAVERICK__
++ cfmvsr mvf0, r0
++#endif
+ RETc(gt)
+
+ orr r0, r0, #0x00800000
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754.patch b/packages/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754.patch
new file mode 100644
index 0000000000..e4929fa20e
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-eabi-ieee754.patch
@@ -0,0 +1,100 @@
+--- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:06:52.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-07 13:15:49.000000000 +1000
+@@ -42,8 +42,9 @@
+
+
+ @ For FPA, float words are always big-endian.
++@ For MAVERICK, float words are always little-endian.
+ @ For VFP, floats words follow the memory system mode.
+-#if defined(__VFP_FP__) && !defined(__ARMEB__)
++#if ((defined(__VFP_FP__) && !defined(__ARMEB__)) || defined(__MAVERICK__))
+ #define xl r0
+ #define xh r1
+ #define yl r2
+@@ -451,8 +452,13 @@
+
+ orrs r2, r0, r1
+ #if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if defined (__FPA_FP__)
+ mvfeqd f0, #0.0
+ #endif
++#if defined (__MAVERICK__)
++ cfstrd mvd0, #0.0
++#endif
++#endif
+ RETc(eq)
+
+ #if !defined (__VFP_FP__) && !defined(__SOFTFP__)
+@@ -473,8 +479,13 @@
+
+ orrs r2, r0, r1
+ #if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if defined (__FPA_FP__)
+ mvfeqd f0, #0.0
+ #endif
++#if defined (__MAVERICK__)
++ cfstrd mvd0, #0.0
++#endif
++#endif
+ RETc(eq)
+
+ #if !defined (__VFP_FP__) && !defined(__SOFTFP__)
+@@ -526,8 +537,14 @@
+ @ Legacy code expects the result to be returned in f0. Copy it
+ @ there as well.
+ LSYM(f0_ret):
++#if defined (__FPA_FP__)
+ stmfd sp!, {r0, r1}
+ ldfd f0, [sp], #8
++#endif
++#if defined (__MAVERICK__)
++ cfmvdlr mvd0, xl
++ cfmvdhr mvd0, xh
++#endif
+ RETLDM
+
+ #endif
+--- ../gcc-cross-4.1.2-r4-unpatched/gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:06:52.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/ieee754-sf.S 2007-06-07 13:21:43.000000000 +1000
+@@ -302,8 +302,13 @@
+
+ orrs r2, r0, r1
+ #if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if defined (__FPA_FP__)
+ mvfeqs f0, #0.0
+ #endif
++#if defined (__MAVERICK__)
++ cfmvsr mvf0, #0.0
++#endif
++#endif
+ RETc(eq)
+
+ mov r3, #0
+@@ -314,8 +319,13 @@
+
+ orrs r2, r0, r1
+ #if !defined (__VFP_FP__) && !defined(__SOFTFP__)
++#if defined (__FPA_FP__)
+ mvfeqs f0, #0.0
+ #endif
++#if defined (__MAVERICK__)
++ cfmvsr mvf0, #0.0
++#endif
++#endif
+ RETc(eq)
+
+ ands r3, ah, #0x80000000 @ sign bit in r3
+@@ -387,8 +397,13 @@
+ #if !defined (__VFP_FP__) && !defined(__SOFTFP__)
+
+ LSYM(f0_ret):
++#if defined (__FPA_FP__)
+ str r0, [sp, #-4]!
+ ldfs f0, [sp], #4
++#endif
++#if defined (__MAVERICK__)
++ cfmvsr mvf0, r0
++#endif
+ RETLDM
+
+ #endif
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-eabi.patch b/packages/gcc/gcc-4.2.2/arm-crunch-eabi.patch
new file mode 100644
index 0000000000..f8992ed499
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-eabi.patch
@@ -0,0 +1,64 @@
+--- /home/hwilliams/original/gcc-4.1.2/gcc/config/arm/t-linux-eabi 2005-10-10 11:04:31.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/t-linux-eabi 2007-05-15 13:53:05.000000000 +1000
+@@ -1,11 +1,21 @@
+ # These functions are included in shared libraries.
+ TARGET_LIBGCC2_CFLAGS = -fPIC
++TARGET_LIBGCC2_CFLAGS += -mcpu=ep9312 -mfpu=maverick
++LIBGCC2_DEBUG_CFLAGS = -g0
+
+ # We do not build a Thumb multilib for Linux because the definition of
+ # CLEAR_INSN_CACHE in linux-gas.h does not work in Thumb mode.
+ MULTILIB_OPTIONS =
+ MULTILIB_DIRNAMES =
+
++LIB1ASMSRC = arm/lib1funcs.asm
++LIB1ASMFUNCS += _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi
++
++CRTSTUFF_T_CFLAGS += -mcpu=ep9312 -mfpu=maverick
++
+ # Use a version of div0 which raises SIGFPE.
+ LIB1ASMFUNCS := $(filter-out _dvmd_tls,$(LIB1ASMFUNCS)) _dvmd_lnx
+
+diff -ruN arm/elf.h gcc-3.4.3/gcc/config/arm/elf.h
+--- ../gcc-4.1.2-orig/gcc/config/arm/elf.h 2004-02-24 16:25:22.000000000 +0200
++++ gcc-4.1.2/gcc/config/arm/elf.h 2005-02-10 00:31:28.000000000 +0200
+@@ -46,7 +46,7 @@
+
+ #ifndef SUBTARGET_ASM_FLOAT_SPEC
+ #define SUBTARGET_ASM_FLOAT_SPEC "\
+-%{mapcs-float:-mfloat}"
++%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa} %{mcpu=ep9312:-mfpu=maverick}"
+ #endif
+
+ #ifndef ASM_SPEC
+diff -ruN t-linux gcc-4.1.2/gcc/config/arm/t-linux
+--- t-linux 2007-05-09 16:32:28.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/t-linux 2007-05-25 11:02:17.000000000 +1000
+@@ -1,19 +1,22 @@
+ # Just for these, we omit the frame pointer since it makes such a big
+ # difference. It is then pointless adding debugging.
+ TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC
++TARGET_LIBGCC2_CFLAGS += -mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp -D__MAVERICK__
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
+- _call_via_rX \
+- _fixsfsi _fixunssfsi _floatdidf _floatdisf
++ _fixsfsi _fixunssfsi
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
+
+ # EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o
+
++# EXTRA_PARTS = crtbegin.o crtend.o crtbeginS.o crtendS.o
++CRTSTUFF_T_CFLAGS += -mcpu=ep9312 -mfpu=maverick -mfloat-abi=softfp -D__MAVERICK__
++
+ # LIBGCC = stmp-multilib
+ # INSTALL_LIBGCC = install-multilib
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-floatsi-disable-single.patch b/packages/gcc/gcc-4.2.2/arm-crunch-floatsi-disable-single.patch
new file mode 100644
index 0000000000..cdd52244a6
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-floatsi-disable-single.patch
@@ -0,0 +1,38 @@
+--- gcc-4.1.2/gcc/config/arm/cirrus.md-cfcvt 2007-06-25 12:12:39.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/cirrus.md 2007-06-25 12:16:13.000000000 +1000
+@@ -301,13 +301,14 @@
+ )
+
+ ;; Convert Cirrus-SI to Cirrus-SF
++; appears to be buggy
+ (define_insn "cirrus_floatsisf2"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (float:SF (match_operand:SI 1 "s_register_operand" "r")))
+ (clobber (match_scratch:DF 2 "=v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfmv64lr%?\\t%Z2, %1\;cfcvt32s%?\\t%V0, %Y2"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "move")]
+ )
+
+--- gcc-4.1.2/gcc/config/arm/arm.md-cfcvt 2007-06-25 12:16:53.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-25 12:18:20.000000000 +1000
+@@ -3125,14 +3125,15 @@
+
+ ;; Fixed <--> Floating conversion insns
+
++;; Maverick Crunch floatsisf2 is buggy - see cirrus.md
+ (define_expand "floatsisf2"
+ [(set (match_operand:SF 0 "s_register_operand" "")
+ (float:SF (match_operand:SI 1 "s_register_operand" "")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "
+- if (TARGET_MAVERICK)
++ if (TARGET_MAVERICK && 0)
+ {
+ emit_insn (gen_cirrus_floatsisf2 (operands[0], operands[1]));
+ DONE;
+ }
+ ")
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-floatsi-disable.patch b/packages/gcc/gcc-4.2.2/arm-crunch-floatsi-disable.patch
new file mode 100644
index 0000000000..aa54ec3e04
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-floatsi-disable.patch
@@ -0,0 +1,61 @@
+--- gcc-4.1.2/gcc/config/arm/cirrus.md-cfcvt 2007-06-25 12:12:39.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/cirrus.md 2007-06-25 12:16:13.000000000 +1000
+@@ -301,21 +301,23 @@
+ )
+
+ ;; Convert Cirrus-SI to Cirrus-SF
++; appears to be buggy
+ (define_insn "cirrus_floatsisf2"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (float:SF (match_operand:SI 1 "s_register_operand" "r")))
+ (clobber (match_scratch:DF 2 "=v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfmv64lr%?\\t%Z2, %1\;cfcvt32s%?\\t%V0, %Y2"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "move")]
+ )
+
++;appears to be buggy
+ (define_insn "cirrus_floatsidf2"
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (float:DF (match_operand:SI 1 "s_register_operand" "r")))
+ (clobber (match_scratch:DF 2 "=v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfmv64lr%?\\t%Z2, %1\;cfcvt32d%?\\t%V0, %Y2"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "move")]
+--- gcc-4.1.2/gcc/config/arm/arm.md-cfcvt 2007-06-25 12:16:53.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-25 12:18:20.000000000 +1000
+@@ -3125,24 +3125,26 @@
+
+ ;; Fixed <--> Floating conversion insns
+
++;; Maverick Crunch floatsisf2 is buggy - see cirrus.md
+ (define_expand "floatsisf2"
+ [(set (match_operand:SF 0 "s_register_operand" "")
+ (float:SF (match_operand:SI 1 "s_register_operand" "")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "
+- if (TARGET_MAVERICK)
++ if (TARGET_MAVERICK && 0)
+ {
+ emit_insn (gen_cirrus_floatsisf2 (operands[0], operands[1]));
+ DONE;
+ }
+ ")
+
++;; Maverick Crunch floatsidf2 is buggy - see cirrus.md
+ (define_expand "floatsidf2"
+ [(set (match_operand:DF 0 "s_register_operand" "")
+ (float:DF (match_operand:SI 1 "s_register_operand" "")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "
+- if (TARGET_MAVERICK)
++ if (TARGET_MAVERICK && 0)
+ {
+ emit_insn (gen_cirrus_floatsidf2 (operands[0], operands[1]));
+ DONE;
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-floatunsidf.patch b/packages/gcc/gcc-4.2.2/arm-crunch-floatunsidf.patch
new file mode 100644
index 0000000000..2fe2254db9
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-floatunsidf.patch
@@ -0,0 +1,37 @@
+--- gcc-4.1.2/gcc/config/arm/ieee754-df-original.S 2007-06-25 14:05:35.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/ieee754-df.S 2007-06-25 14:08:03.000000000 +1000
+@@ -382,6 +382,8 @@
+ FUNC_END aeabi_dadd
+ FUNC_END adddf3
+
++#ifndef __MAVERICK__ /* THIS IS A BAD HACK */
++
+ ARM_FUNC_START floatunsidf
+ ARM_FUNC_ALIAS aeabi_ui2d floatunsidf
+
+@@ -401,8 +403,14 @@
+ FUNC_END aeabi_ui2d
+ FUNC_END floatunsidf
+
++#endif
++
+ ARM_FUNC_START floatsidf
+ ARM_FUNC_ALIAS aeabi_i2d floatsidf
++#ifdef __MAVERICK__ /* THIS IS A BAD HACK */
++ARM_FUNC_ALIAS floatunsidf floatsidf
++ARM_FUNC_ALIAS aeabi_ui2d floatsidf
++#endif
+
+ teq r0, #0
+ moveq r1, #0
+@@ -418,6 +426,10 @@
+ mov xh, #0
+ b LSYM(Lad_l)
+
++#ifdef __MAVERICK__ /* THIS IS A BAD HACK */
++ FUNC_END aeabi_ui2d floatsidf
++ FUNC_END floatunsidf floatsidf
++#endif
+ FUNC_END aeabi_i2d
+ FUNC_END floatsidf
+
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-fp_consts.patch b/packages/gcc/gcc-4.2.2/arm-crunch-fp_consts.patch
new file mode 100644
index 0000000000..5f289bbebe
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-fp_consts.patch
@@ -0,0 +1,13 @@
+--- gcc-4.1.2/gcc/config/arm/arm.c-original 2007-06-12 16:17:14.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.c 2007-06-12 16:17:28.000000000 +1000
+@@ -5218,7 +5218,9 @@
+ int i;
+ REAL_VALUE_TYPE r;
+
++ if (TARGET_MAVERICK)
++ fp_consts_inited = 0;
+- if (TARGET_VFP)
++ else if (TARGET_VFP)
+ fp_consts_inited = 1;
+ else
+ fp_consts_inited = 8;
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-neg.patch b/packages/gcc/gcc-4.2.2/arm-crunch-neg.patch
new file mode 100644
index 0000000000..f14ae0190e
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-neg.patch
@@ -0,0 +1,30 @@
+WARNING: adding this patch causes copysign1.c and mzero3.c to fail...
+diff -urN gcc-4.1.2/gcc/config/arm/arm.md-original gcc-4.1.2/gcc/config/arm/arm.md
+--- gcc-4.1.2/gcc/config/arm/arm.md-original 2007-06-12 12:48:14.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-12 12:49:53.000000000 +1000
+@@ -2985,14 +2985,14 @@
+ (define_expand "negsf2"
+ [(set (match_operand:SF 0 "s_register_operand" "")
+ (neg:SF (match_operand:SF 1 "s_register_operand" "")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ ""
+ )
+
+ (define_expand "negdf2"
+ [(set (match_operand:DF 0 "s_register_operand" "")
+ (neg:DF (match_operand:DF 1 "s_register_operand" "")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "")
+
+ ;; abssi2 doesn't really clobber the condition codes if a different register
+@@ -4097,7 +4097,7 @@
+ [(set (match_operand:DI 0 "nonimmediate_di_operand" "=r, r, r, r, m")
+ (match_operand:DI 1 "di_operand" "rDa,Db,Dc,mi,r"))]
+ "TARGET_ARM
+- && !(TARGET_HARD_FLOAT && (TARGET_MAVERICK || TARGET_VFP))
++ && !(TARGET_HARD_FLOAT && (TARGET_MAVERICK || TARGET_VFP || TARGET_MAVERICK))
+ && !TARGET_IWMMXT"
+ "*
+ switch (which_alternative)
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-neg2.patch b/packages/gcc/gcc-4.2.2/arm-crunch-neg2.patch
new file mode 100644
index 0000000000..4fd91f3215
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-neg2.patch
@@ -0,0 +1,25 @@
+--- gcc-4.1.2/gcc/config/arm/cirrus.md-original 2007-06-12 17:01:24.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/cirrus.md 2007-06-12 17:03:26.000000000 +1000
+@@ -255,18 +256,20 @@
+ [(set_attr "cirrus" "normal")]
+ )
+
++;; appears to be buggy: neg 0 != -0
+ (define_insn "*cirrus_negsf2"
+ [(set (match_operand:SF 0 "cirrus_fp_register" "=v")
+ (neg:SF (match_operand:SF 1 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfnegs%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")]
+ )
+
++;; appears to be buggy: neg 0 != -0
+ (define_insn "*cirrus_negdf2"
+ [(set (match_operand:DF 0 "cirrus_fp_register" "=v")
+ (neg:DF (match_operand:DF 1 "cirrus_fp_register" "v")))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cfnegd%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")]
+ )
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-offset.patch b/packages/gcc/gcc-4.2.2/arm-crunch-offset.patch
new file mode 100644
index 0000000000..3a40f0d224
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-offset.patch
@@ -0,0 +1,20 @@
+--- gcc-4.1.2/gcc/config/arm/arm.c-original 2007-06-12 14:46:20.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.c 2007-06-12 14:48:06.000000000 +1000
+@@ -3460,7 +3460,7 @@
+
+ use_ldrd = (TARGET_LDRD
+ && (mode == DImode
+- || (mode == DFmode && (TARGET_SOFT_FLOAT || TARGET_VFP))));
++ || (mode == DFmode && (TARGET_SOFT_FLOAT || TARGET_MAVERICK || TARGET_VFP))));
+
+ if (code == POST_INC || code == PRE_DEC
+ || ((code == PRE_INC || code == POST_DEC)
+@@ -3960,7 +3960,7 @@
+ /* VFP addressing modes actually allow greater offsets, but for
+ now we just stick with the lowest common denominator. */
+ if (mode == DImode
+- || ((TARGET_SOFT_FLOAT || TARGET_VFP) && mode == DFmode))
++ || ((TARGET_SOFT_FLOAT || TARGET_MAVERICK || TARGET_VFP) && mode == DFmode))
+ {
+ low_n = n & 0x0f;
+ n &= ~0x0f;
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-predicates.patch b/packages/gcc/gcc-4.2.2/arm-crunch-predicates.patch
new file mode 100644
index 0000000000..4841ff8178
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-predicates.patch
@@ -0,0 +1,20 @@
+diff -urN gcc-4.1.2/gcc/config/arm/predicates.md ../../../../old-tmp/work/arm-oabi-angstrom-linux/gcc-cross-4.1.2-backup/gcc-4.1.2/gcc/config/arm/predicates.md
+--- gcc-4.1.2/gcc/config/arm/predicates.md 2005-09-11 17:38:02.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/predicates.md 2007-05-30 12:15:54.000000000 +1000
+@@ -171,8 +171,14 @@
+ (match_code "eq,ne"))
+
+ ;; True for comparisons other than LTGT or UNEQ.
++(define_special_predicate "arm_comparison_operator"
++; (match_code "eq,ne,le,lt,ge,gt,geu,gtu,leu,ltu,unordered,ordered,unlt,unle,unge,ungt")) ;; original - no LTGT or UNEQ
++; (match_code "eq,ne,le,lt,ge,gt,geu,gtu,leu,ltgt,ltu,unordered,ordered,uneq,unlt,unle,unge,ungt")) ;; everything?
++;; True for comparisons other than GE, GEU, UNLT, unordered or ordered. - Cirrus Version - must include ge?
+-(define_special_predicate "arm_comparison_operator"
++;(define_special_predicate "arm_comparison_operator"
+- (match_code "eq,ne,le,lt,ge,gt,geu,gtu,leu,ltu,unordered,ordered,unlt,unle,unge,ungt"))
++(match_code "eq,ne,le,lt,ge,geu,gt,gtu,leu,ltgt,ltu,uneq,unle,unge,ungt")) ;; bad codes removed?
++;(match_code "eq,ne,le,lt,gt,gtu,leu,ltgt,ltu,uneq,unle,unge,ungt")) ;; bad codes removed + ge / geu removed
++
+
+ (define_special_predicate "minmax_operator"
+ (and (match_code "smin,smax,umin,umax")
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-predicates2.patch b/packages/gcc/gcc-4.2.2/arm-crunch-predicates2.patch
new file mode 100644
index 0000000000..3e01158fe1
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-predicates2.patch
@@ -0,0 +1,10 @@
+--- gcc-4.1.2/gcc/config/arm/predicates.md-original 2007-06-13 12:25:35.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/predicates.md 2007-06-13 12:25:42.000000000 +1000
+@@ -206,7 +206,6 @@
+ || mode == CC_DEQmode
+ || mode == CC_DLEmode
+ || mode == CC_DLTmode
+- || mode == CC_DGEmode
+ || mode == CC_DGTmode
+ || mode == CC_DLEUmode
+ || mode == CC_DLTUmode
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-predicates3.patch b/packages/gcc/gcc-4.2.2/arm-crunch-predicates3.patch
new file mode 100644
index 0000000000..99e1e6c88c
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-predicates3.patch
@@ -0,0 +1,116 @@
+diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md gcc-4.1.2/gcc/config/arm/arm.md
+--- ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:50:53.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-14 11:43:17.000000000 +1000
+@@ -7488,6 +7488,22 @@
+ arm_compare_op1);"
+ )
+
++;(define_expand "suneq"
++; [(set (match_operand:SI 0 "s_register_operand" "")
++; (uneq:SI (match_dup 1) (const_int 0)))]
++; "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
++; "operands[1] = arm_gen_compare_reg (UNEQ, arm_compare_op0,
++; arm_compare_op1);"
++;)
++
++;(define_expand "sltgt"
++; [(set (match_operand:SI 0 "s_register_operand" "")
++; (ltgt:SI (match_dup 1) (const_int 0)))]
++; "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_MAVERICK)"
++; "operands[1] = arm_gen_compare_reg (LTGT, arm_compare_op0,
++; arm_compare_op1);"
++;)
++
+ ;;; DO NOT add patterns for SUNEQ or SLTGT, these can't be represented with
+ ;;; simple ARM instructions.
+ ;
+@@ -10284,13 +10284,73 @@
+ "TARGET_ARM && arm_arch5e"
+ "pld\\t%a0")
+
++;; Special predication pattern for Maverick Crunch floating-point
++
++(define_cond_exec
++ [(match_operator 0 "maverick_comparison_operator"
++ [(match_operand:CCFP 1 "cc_register" "")
++ (const_int 0)])]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ ""
++)
++
++;; Special predication pattern for Maverick Crunch - !CCFP
++
++(define_cond_exec
++ [(match_operator 0 "arm_comparison_operator"
++ [(match_operand:CC_NOOV 1 "cc_register" "")
++ (const_int 0)])]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ ""
++)
++
++(define_cond_exec
++ [(match_operator 0 "arm_comparison_operator"
++ [(match_operand:CC_Z 1 "cc_register" "")
++ (const_int 0)])]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ ""
++)
++
++(define_cond_exec
++ [(match_operator 0 "arm_comparison_operator"
++ [(match_operand:CC_SWP 1 "cc_register" "")
++ (const_int 0)])]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ ""
++)
++
++(define_cond_exec
++ [(match_operator 0 "arm_comparison_operator"
++ [(match_operand:CC_C 1 "cc_register" "")
++ (const_int 0)])]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ ""
++)
++
++(define_cond_exec
++ [(match_operator 0 "arm_comparison_operator"
++ [(match_operand:CC_N 1 "cc_register" "")
++ (const_int 0)])]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ ""
++)
++
++(define_cond_exec
++ [(match_operator 0 "arm_comparison_operator"
++ [(match_operand:CC 1 "cc_register" "")
++ (const_int 0)])]
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ ""
++)
++
+ ;; General predication pattern
+
+ (define_cond_exec
+ [(match_operator 0 "arm_comparison_operator"
+ [(match_operand 1 "cc_register" "")
+ (const_int 0)])]
+- "TARGET_ARM"
++ "TARGET_ARM && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
+ ""
+ )
+
+diff -urN ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/predicates.md gcc-4.1.2/gcc/config/arm/predicates.md
+--- ../gcc-cross-4.1.2-r4/gcc-4.1.2/gcc/config/arm/predicates.md 2005-09-11 17:38:02.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/predicates.md 2007-06-14 11:46:13.000000000 +1000
+@@ -172,7 +172,11 @@
+
+ ;; True for comparisons other than LTGT or UNEQ.
+ (define_special_predicate "arm_comparison_operator"
+ (match_code "eq,ne,le,lt,ge,gt,geu,gtu,leu,ltu,unordered,ordered,unlt,unle,unge,ungt"))
++
++;; True for comparisons other than GE, GEU, UNLT, UNORDERED or ORDERED - TODO add LTGT and UNEQ - needs extra support elsewhere
++(define_special_predicate "maverick_comparison_operator"
++(match_code "eq,ne,le,lt,gt,gtu,leu,ltu,unle,unge,ungt"))
+
+ (define_special_predicate "minmax_operator"
+ (and (match_code "smin,smax,umin,umax")
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-saveregs.patch b/packages/gcc/gcc-4.2.2/arm-crunch-saveregs.patch
new file mode 100644
index 0000000000..531ae86610
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-saveregs.patch
@@ -0,0 +1,153 @@
+diff -ruN /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.c gcc-4.1.2/gcc/config/arm/arm.c
+--- /home/hwilliams/openembedded/build/tmp/work/ep9312-angstrom-linux-gnueabi/gcc-cross-4.1.2-r0/gcc-4.1.2/gcc/config/arm/arm.c 2007-05-09 16:32:29.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.c 2007-05-15 09:39:41.000000000 +1000
+@@ -426,7 +435,7 @@
+ #define FL_STRONG (1 << 8) /* StrongARM */
+ #define FL_ARCH5E (1 << 9) /* DSP extensions to v5 */
+ #define FL_XSCALE (1 << 10) /* XScale */
+-#define FL_CIRRUS (1 << 11) /* Cirrus/DSP. */
++#define FL_CIRRUS (1 << 11) /* Cirrus Crunch coprocessor. */
+ #define FL_ARCH6 (1 << 12) /* Architecture rel 6. Adds
+ media instructions. */
+ #define FL_VFPV2 (1 << 13) /* Vector Floating Point V2. */
+@@ -490,7 +499,7 @@
+ /* Nonzero if this chip is a StrongARM. */
+ int arm_tune_strongarm = 0;
+
+-/* Nonzero if this chip is a Cirrus variant. */
++/* Nonzero if this chip supports Cirrus Crunch coprocessor. */
+ int arm_arch_cirrus = 0;
+
+ /* Nonzero if this chip supports Intel Wireless MMX technology. */
+@@ -1184,7 +1193,8 @@
+ else
+ */
+ if (arm_arch_cirrus)
+- arm_fpu_arch = FPUTYPE_MAVERICK;
++ /* Cirrus crunch coprocessor still requires soft-float division. */
++ arm_fpu_arch = FPUTYPE_MAVERICK;
+ else
+ arm_fpu_arch = FPUTYPE_FPA_EMU2;
+ #endif
+@@ -1567,6 +1577,9 @@
+ if (regs_ever_live[regno] && !call_used_regs[regno])
+ return 0;
+
++ if (TARGET_MAVERICK)
++ return 0;
++
+ if (TARGET_REALLY_IWMMXT)
+ for (regno = FIRST_IWMMXT_REGNUM; regno <= LAST_IWMMXT_REGNUM; regno++)
+ if (regs_ever_live[regno] && ! call_used_regs [regno])
+@@ -9775,7 +9886,19 @@
+ /* This variable is for the Virtual Frame Pointer, not VFP regs. */
+ int vfp_offset = offsets->frame;
+
+- if (arm_fpu_arch == FPUTYPE_FPA_EMU2)
++ if (arm_fpu_arch == FPUTYPE_MAVERICK)
++ {
++ for (reg = LAST_CIRRUS_FP_REGNUM; reg >= FIRST_CIRRUS_FP_REGNUM; reg--)
++ if (regs_ever_live[reg] && !call_used_regs[reg])
++ {
++ floats_offset += 8; /* more problems - futaris? */
++ /* if (TARGET_CIRRUS_D0 || TARGET_CIRRUS_D1) */
++ asm_fprintf (f, "\tnop\n");
++ asm_fprintf (f, "\tcfldrd\tmvd%d, [%r, #-%d]\n",
++ reg - FIRST_CIRRUS_FP_REGNUM, FP_REGNUM, floats_offset - vfp_offset);
++ }
++ }
++ else if (arm_fpu_arch == FPUTYPE_FPA_EMU2)
+ {
+ for (reg = LAST_FPA_REGNUM; reg >= FIRST_FPA_REGNUM; reg--)
+ if (regs_ever_live[reg] && !call_used_regs[reg])
+@@ -9924,7 +10047,18 @@
+ output_add_immediate (operands);
+ }
+
+- if (arm_fpu_arch == FPUTYPE_FPA_EMU2)
++ if (arm_fpu_arch == FPUTYPE_MAVERICK)
++ { /* order changed - futaris */
++ for (reg = FIRST_CIRRUS_FP_REGNUM; reg <= LAST_CIRRUS_FP_REGNUM; reg++)
++ if (regs_ever_live[reg] && !call_used_regs[reg])
++ {
++ /* if (TARGET_CIRRUS_D0 || TARGET_CIRRUS_D1) */
++ asm_fprintf (f, "\tnop\n");
++ asm_fprintf (f, "\tcfldrd\tmvd%u, [%r], #8\n",
++ reg - FIRST_CIRRUS_FP_REGNUM, SP_REGNUM);
++ } /* reg problems - futaris */
++ }
++ else if (arm_fpu_arch == FPUTYPE_FPA_EMU2)
+ {
+ for (reg = FIRST_FPA_REGNUM; reg <= LAST_FPA_REGNUM; reg++)
+ if (regs_ever_live[reg] && !call_used_regs[reg])
+@@ -10429,9 +10563,19 @@
+ if (! IS_VOLATILE (func_type))
+ {
++ /* Space for saved MAVERICK registers. */
++ if (arm_fpu_arch == FPUTYPE_MAVERICK)
++ {
++ for (regno = FIRST_CIRRUS_FP_REGNUM; regno <= LAST_CIRRUS_FP_REGNUM; regno++)
++ if (regs_ever_live[regno] && !call_used_regs[regno])
++ saved += 8; // 8 in 3.4.3 patch - futaris;
++ }
++ else
+ /* Space for saved FPA registers. */
++ {
+ for (regno = FIRST_FPA_REGNUM; regno <= LAST_FPA_REGNUM; regno++)
+ if (regs_ever_live[regno] && ! call_used_regs[regno])
+ saved += 12;
++ }
+
+ /* Space for saved VFP registers. */
+ if (TARGET_HARD_FLOAT && TARGET_VFP)
+@@ -10739,7 +10882,19 @@
+
+ /* Save any floating point call-saved registers used by this
+ function. */
+- if (arm_fpu_arch == FPUTYPE_FPA_EMU2)
++ if (arm_fpu_arch == FPUTYPE_MAVERICK)
++ {
++ for (reg = LAST_CIRRUS_FP_REGNUM; reg >= FIRST_CIRRUS_FP_REGNUM; reg--)
++ if (regs_ever_live[reg] && !call_used_regs[reg])
++ {
++ insn = gen_rtx_PRE_DEC (DFmode, stack_pointer_rtx); /* think these causes problems */
++ insn = gen_rtx_MEM (DFmode, insn);
++ insn = emit_insn (gen_rtx_SET (VOIDmode, insn,
++ gen_rtx_REG (DFmode, reg)));
++ RTX_FRAME_RELATED_P (insn) = 1; saved_regs += 8; /* added by futaris */
++ }
++ }
++ else if (arm_fpu_arch == FPUTYPE_FPA_EMU2)
+ {
+ for (reg = LAST_FPA_REGNUM; reg >= FIRST_FPA_REGNUM; reg--)
+ if (regs_ever_live[reg] && !call_used_regs[reg])
+@@ -15179,6 +15331,9 @@
+ if (IS_FPA_REGNUM (regno))
+ return (TARGET_AAPCS_BASED ? 96 : 16) + regno - FIRST_FPA_REGNUM;
+
++ if (IS_CIRRUS_REGNUM (regno))
++ return 28 + regno - FIRST_CIRRUS_FP_REGNUM;
++
+ if (IS_VFP_REGNUM (regno))
+ return 64 + regno - FIRST_VFP_REGNUM;
+
+--- gcc-4.1.2/gcc/config/arm/arm.md-original 2007-06-28 15:42:36.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-28 15:42:48.000000000 +1000
+@@ -9800,7 +9800,7 @@
+ return arm_output_epilogue (next_nonnote_insn (insn));
+ "
+ ;; Length is absolute worst case
+- [(set_attr "length" "44")
++ [(set_attr "length" "108")
+ (set_attr "type" "block")
+ ;; We don't clobber the conditions, but the potential length of this
+ ;; operation is sufficient to make conditionalizing the sequence
+@@ -9818,7 +9818,7 @@
+ return thumb_unexpanded_epilogue ();
+ "
+ ; Length is absolute worst case
+- [(set_attr "length" "44")
++ [(set_attr "length" "108")
+ (set_attr "type" "block")
+ ;; We don't clobber the conditions, but the potential length of this
+ ;; operation is sufficient to make conditionalizing the sequence
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-scc.patch b/packages/gcc/gcc-4.2.2/arm-crunch-scc.patch
new file mode 100644
index 0000000000..d1330f2543
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-scc.patch
@@ -0,0 +1,38 @@
+--- gcc-4.1.2/gcc/config/arm/arm.md-original 2007-06-13 12:38:06.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-13 12:40:07.000000000 +1000
+@@ -7375,7 +7375,7 @@
+ (define_expand "sge"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ge:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && !(TARGET_HARD_FLOAT && TARGET_MAVERICK)"
++ "TARGET_ARM"
+ "operands[1] = arm_gen_compare_reg (GE, arm_compare_op0, arm_compare_op1);"
+ )
+
+@@ -7434,7 +7434,7 @@
+ (define_expand "sunordered"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unordered:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNORDERED, arm_compare_op0,
+ arm_compare_op1);"
+ )
+@@ -7442,7 +7442,7 @@
+ (define_expand "sordered"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (ordered:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (ORDERED, arm_compare_op0,
+ arm_compare_op1);"
+ )
+@@ -7467,7 +7467,7 @@
+ (define_expand "sunlt"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (unlt:SI (match_dup 1) (const_int 0)))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP || TARGET_MAVERICK)"
+ "operands[1] = arm_gen_compare_reg (UNLT, arm_compare_op0,
+ arm_compare_op1);"
+ )
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-truncsi-disable-new.patch b/packages/gcc/gcc-4.2.2/arm-crunch-truncsi-disable-new.patch
new file mode 100644
index 0000000000..6dea43fa7c
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-truncsi-disable-new.patch
@@ -0,0 +1,33 @@
+--- gcc-4.1.2/gcc/config/arm/cirrus.md-cfcvt 2007-06-25 12:46:22.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/cirrus.md 2007-06-25 12:46:41.000000000 +1000
+@@ -337,13 +337,14 @@
+ "cfcvt64d%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")])
+
++; appears to be buggy
+ (define_insn "cirrus_truncsfsi2"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (fix:SI (fix:SF (match_operand:SF 1 "cirrus_fp_register" "v"))))
+ (clobber (match_scratch:DF 2 "=v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cftruncs32%?\\t%Y2, %V1\;cfmvr64l%?\\t%0, %Z2"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "normal")]
+ )
+
+--- gcc-4.1.2/gcc/config/arm/arm.md-cfcvt 2007-06-25 12:46:56.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-25 12:48:08.000000000 +1000
+@@ -3151,10 +3151,11 @@
+ }
+ ")
+
++; appears to be buggy for MAVERICK
+ (define_expand "fix_truncsfsi2"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (fix:SI (fix:SF (match_operand:SF 1 "s_register_operand" ""))))]
+- "TARGET_ARM && TARGET_HARD_FLOAT"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "
+ if (TARGET_MAVERICK)
+ {
diff --git a/packages/gcc/gcc-4.2.2/arm-crunch-truncsi-disable.patch b/packages/gcc/gcc-4.2.2/arm-crunch-truncsi-disable.patch
new file mode 100644
index 0000000000..a5d791a0a4
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-crunch-truncsi-disable.patch
@@ -0,0 +1,56 @@
+--- gcc-4.1.2/gcc/config/arm/cirrus.md-cfcvt 2007-06-25 12:46:22.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/cirrus.md 2007-06-25 12:46:41.000000000 +1000
+@@ -337,21 +337,23 @@
+ "cfcvt64d%?\\t%V0, %V1"
+ [(set_attr "cirrus" "normal")])
+
++; appears to be buggy
+ (define_insn "cirrus_truncsfsi2"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (fix:SI (fix:SF (match_operand:SF 1 "cirrus_fp_register" "v"))))
+ (clobber (match_scratch:DF 2 "=v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cftruncs32%?\\t%Y2, %V1\;cfmvr64l%?\\t%0, %Z2"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "normal")]
+ )
+
++; appears to be buggy
+ (define_insn "cirrus_truncdfsi2"
+ [(set (match_operand:SI 0 "s_register_operand" "=r")
+ (fix:SI (fix:DF (match_operand:DF 1 "cirrus_fp_register" "v"))))
+ (clobber (match_scratch:DF 2 "=v"))]
+- "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK"
++ "TARGET_ARM && TARGET_HARD_FLOAT && TARGET_MAVERICK && 0"
+ "cftruncd32%?\\t%Y2, %V1\;cfmvr64l%?\\t%0, %Z2"
+ [(set_attr "length" "8")
+ (set_attr "cirrus" "normal")]
+--- gcc-4.1.2/gcc/config/arm/arm.md-cfcvt 2007-06-25 12:46:56.000000000 +1000
++++ gcc-4.1.2/gcc/config/arm/arm.md 2007-06-25 12:48:08.000000000 +1000
+@@ -3151,10 +3151,11 @@
+ }
+ ")
+
++; appears to be buggy for MAVERICK
+ (define_expand "fix_truncsfsi2"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (fix:SI (fix:SF (match_operand:SF 1 "s_register_operand" ""))))]
+- "TARGET_ARM && TARGET_HARD_FLOAT"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "
+ if (TARGET_MAVERICK)
+ {
+@@ -3167,10 +3168,11 @@
+ }
+ ")
+
++; appears to be buggy for MAVERICK
+ (define_expand "fix_truncdfsi2"
+ [(set (match_operand:SI 0 "s_register_operand" "")
+ (fix:SI (fix:DF (match_operand:DF 1 "s_register_operand" ""))))]
+- "TARGET_ARM && TARGET_HARD_FLOAT"
++ "TARGET_ARM && TARGET_HARD_FLOAT && (TARGET_FPA || TARGET_VFP)"
+ "
+ if (TARGET_MAVERICK)
+ {
diff --git a/packages/gcc/gcc-4.2.2/arm-nolibfloat.patch b/packages/gcc/gcc-4.2.2/arm-nolibfloat.patch
new file mode 100644
index 0000000000..c4897c0330
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-nolibfloat.patch
@@ -0,0 +1,24 @@
+# Dimitry Andric <dimitry@andric.com>, 2004-05-01
+#
+# * Removed the extra -lfloat option from LIBGCC_SPEC, since it isn't needed
+# anymore. (The required functions are now in libgcc.)
+#
+# Fixes errors like
+# arm-softfloat-linux-gnu/3.4.0/../../../../arm-softfloat-linux-gnu/bin/ld: cannot find -lfloat
+# collect2: ld returned 1 exit status
+# make[2]: *** [arm-softfloat-linux-gnu/gcc-3.4.0-glibc-2.3.2/build-glibc/iconvdata/ISO8859-1.so] Error 1
+# when building glibc-2.3.3 with gcc-3.4.0 for arm-softfloat
+
+Index: gcc-4.0.2/gcc/config/arm/linux-elf.h
+===================================================================
+--- gcc-4.0.2.orig/gcc/config/arm/linux-elf.h 2005-03-04 16:14:01.000000000 +0000
++++ gcc-4.0.2/gcc/config/arm/linux-elf.h 2005-11-11 18:02:54.000000000 +0000
+@@ -56,7 +56,7 @@
+ %{shared:-lc} \
+ %{!shared:%{profile:-lc_p}%{!profile:-lc}}"
+
+-#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
++#define LIBGCC_SPEC "-lgcc"
+
+ /* Provide a STARTFILE_SPEC appropriate for GNU/Linux. Here we add
+ the GNU/Linux magical crtbegin.o file (see crtstuff.c) which
diff --git a/packages/gcc/gcc-4.2.2/arm-softfloat.patch b/packages/gcc/gcc-4.2.2/arm-softfloat.patch
new file mode 100644
index 0000000000..c86c83ed15
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-softfloat.patch
@@ -0,0 +1,16 @@
+Index: gcc-4.0.2/gcc/config/arm/t-linux
+===================================================================
+--- gcc-4.0.2.orig/gcc/config/arm/t-linux 2004-05-15 12:41:35.000000000 +0000
++++ gcc-4.0.2/gcc/config/arm/t-linux 2005-11-11 16:07:53.000000000 +0000
+@@ -4,7 +4,10 @@
+ LIBGCC2_DEBUG_CFLAGS = -g0
+
+ LIB1ASMSRC = arm/lib1funcs.asm
+-LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx
++LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
++ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
++ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _fixsfsi _fixunssfsi _floatdidf _floatdisf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
+ # MULTILIB_DIRNAMES = hard-float soft-float
diff --git a/packages/gcc/gcc-4.2.2/arm-thumb-cache.patch b/packages/gcc/gcc-4.2.2/arm-thumb-cache.patch
new file mode 100644
index 0000000000..fa63846c8c
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-thumb-cache.patch
@@ -0,0 +1,29 @@
+--- gcc-4.1.1/gcc/config/arm/linux-gas.h- 2005-06-25 03:22:41.000000000 +0200
++++ gcc-4.1.1/gcc/config/arm/linux-gas.h 2006-06-18 10:23:46.000000000 +0200
+@@ -44,6 +44,7 @@
+
+ /* Clear the instruction cache from `beg' to `end'. This makes an
+ inline system call to SYS_cacheflush. */
++#if !defined(__thumb__)
+ #define CLEAR_INSN_CACHE(BEG, END) \
+ { \
+ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
+@@ -53,3 +54,18 @@
+ : "=r" (_beg) \
+ : "0" (_beg), "r" (_end), "r" (_flg)); \
+ }
++#else
++#define CLEAR_INSN_CACHE(BEG, END) \
++{ \
++ register unsigned long _beg __asm ("a1") = (unsigned long) (BEG); \
++ register unsigned long _end __asm ("a2") = (unsigned long) (END); \
++ register unsigned long _flg __asm ("a3") = 0; \
++ register unsigned long _swi __asm ("a4") = 0xf0002; \
++ __asm __volatile ("push {r7}\n" \
++ " mov r7,a4\n" \
++ " swi 0 @ sys_cacheflush\n" \
++ " pop {r7}\n" \
++ : "=r" (_beg) \
++ : "0" (_beg), "r" (_end), "r" (_flg), "r" (_swi)); \
++}
++#endif
diff --git a/packages/gcc/gcc-4.2.2/arm-thumb.patch b/packages/gcc/gcc-4.2.2/arm-thumb.patch
new file mode 100644
index 0000000000..69e2f68cf2
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/arm-thumb.patch
@@ -0,0 +1,64 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- gcc-4.1.1/gcc/config/arm/lib1funcs.asm~gcc
++++ gcc-4.1.1/gcc/config/arm/lib1funcs.asm
+@@ -995,10 +995,24 @@
+ .code 32
+ FUNC_START div0
+
++#if ! defined __thumb__
+ stmfd sp!, {r1, lr}
+ mov r0, #SIGFPE
+ bl SYM(raise) __PLT__
+ RETLDM r1
++#else
++ push {r1, lr}
++ mov r0, #SIGFPE
++ bl SYM(raise) __PLT__
++#if __ARM_ARCH__ > 4
++ pop {r1, pc}
++#else
++ @ on 4T that won't work
++ pop {r1}
++ pop {r3}
++ bx r3
++#endif
++#endif
+
+ FUNC_END div0
+
+@@ -1141,11 +1155,12 @@
+ code here switches to the correct mode before executing the function. */
+
+ .text
+- .align 0
++ .align 1
+ .force_thumb
+
+ .macro call_via register
+ THUMB_FUNC_START _call_via_\register
++ .hidden SYM (_call_via_\register)
+
+ bx \register
+ nop
+@@ -1242,6 +1257,7 @@
+ .code 16
+
+ THUMB_FUNC_START _interwork_call_via_\register
++ .hidden SYM (_interwork_call_via_\register)
+
+ bx pc
+ nop
+--- gcc-4.1.1/gcc/config/arm/t-linux~gcc
++++ gcc-4.1.1/gcc/config/arm/t-linux
+@@ -7,6 +7,7 @@
+ LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
+ _negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
+ _truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
++ _call_via_rX \
+ _fixsfsi _fixunssfsi _floatdidf _floatdisf
+
+ # MULTILIB_OPTIONS = mhard-float/msoft-float
diff --git a/packages/gcc/gcc-4.2.2/cache-amnesia.patch b/packages/gcc/gcc-4.2.2/cache-amnesia.patch
new file mode 100644
index 0000000000..ef7cd111c5
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/cache-amnesia.patch
@@ -0,0 +1,13 @@
+diff --git a/gcc/configure b/gcc/configure
+index 44620ab..6e1830c 100755
+--- a/gcc/configure
++++ b/gcc/configure
+@@ -12272,7 +12272,7 @@ else
+ esac
+ saved_CFLAGS="${CFLAGS}"
+ CC="${CC_FOR_BUILD}" CFLAGS="${CFLAGS_FOR_BUILD}" \
+- ${realsrcdir}/configure \
++ CONFIG_SITE= ${realsrcdir}/configure --cache-file=./other.cache \
+ --enable-languages=${enable_languages-all} \
+ --target=$target_alias --host=$build_alias --build=$build_alias
+ CFLAGS="${saved_CFLAGS}"
diff --git a/packages/gcc/gcc-4.2.2/fix-ICE-in-arm_unwind_emit_set.diff b/packages/gcc/gcc-4.2.2/fix-ICE-in-arm_unwind_emit_set.diff
new file mode 100644
index 0000000000..568e15abff
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/fix-ICE-in-arm_unwind_emit_set.diff
@@ -0,0 +1,18 @@
+--- trunk/gcc/config/arm/arm.c 2006/09/19 13:18:27 117055
++++ trunk/gcc/config/arm/arm.c 2006/09/19 13:19:24 117056
+@@ -15415,6 +15415,15 @@
+ /* Move from sp to reg. */
+ asm_fprintf (asm_out_file, "\t.movsp %r\n", REGNO (e0));
+ }
++ else if (GET_CODE (e1) == PLUS
++ && GET_CODE (XEXP (e1, 0)) == REG
++ && REGNO (XEXP (e1, 0)) == SP_REGNUM
++ && GET_CODE (XEXP (e1, 1)) == CONST_INT)
++ {
++ /* Set reg to offset from sp. */
++ asm_fprintf (asm_out_file, "\t.movsp %r, #%d\n",
++ REGNO (e0), (int)INTVAL(XEXP (e1, 1)));
++ }
+ else
+ abort ();
+ break;
diff --git a/packages/gcc/gcc-4.2.2/gcc41-configure.in.patch b/packages/gcc/gcc-4.2.2/gcc41-configure.in.patch
new file mode 100644
index 0000000000..3d33bcb978
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/gcc41-configure.in.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.4/configure.in.orig 2005-08-09 19:57:51.504323183 -0700
++++ gcc-3.4.4/configure.in 2005-08-09 20:00:12.073168623 -0700
+@@ -1907,7 +1907,7 @@
+ *) gxx_include_dir=${with_gxx_include_dir} ;;
+ esac
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
+--- gcc-3.4.4/configure.orig 2005-08-09 21:02:29.668360660 -0700
++++ gcc-3.4.4/configure 2005-08-09 21:02:50.157649970 -0700
+@@ -2669,7 +2669,7 @@
+ *) gxx_include_dir=${with_gxx_include_dir} ;;
+ esac
+
+-FLAGS_FOR_TARGET=
++FLAGS_FOR_TARGET="$ARCH_FLAGS_FOR_TARGET"
+ case " $target_configdirs " in
+ *" newlib "*)
+ case " $target_configargs " in
diff --git a/packages/gcc/gcc-4.2.2/ldflags.patch b/packages/gcc/gcc-4.2.2/ldflags.patch
new file mode 100644
index 0000000000..9576f60778
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/ldflags.patch
@@ -0,0 +1,22 @@
+--- /tmp/Makefile.in 2006-02-23 20:56:01.399758728 +0100
++++ gcc-4.1-20060217/Makefile.in 2006-02-23 20:56:16.874406224 +0100
+@@ -334,7 +334,7 @@
+ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+-LDFLAGS_FOR_TARGET =
++LDFLAGS_FOR_TARGET = @LDFLAGS@
+ PICFLAG_FOR_TARGET =
+
+ # ------------------------------------
+--- /tmp/Makefile.tpl 2006-02-23 20:50:34.077519272 +0100
++++ gcc-4.1-20060217/Makefile.tpl 2006-02-23 21:04:31.092273688 +0100
+@@ -337,7 +337,7 @@
+ CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
+ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
+ LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
+-LDFLAGS_FOR_TARGET =
++LDFLAGS_FOR_TARGET = @LDFLAGS@
+ PICFLAG_FOR_TARGET =
+
+ # ------------------------------------
diff --git a/packages/gcc/gcc-4.2.2/sdk-libstdc++-includes.patch b/packages/gcc/gcc-4.2.2/sdk-libstdc++-includes.patch
new file mode 100644
index 0000000000..4377c2143b
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/sdk-libstdc++-includes.patch
@@ -0,0 +1,22 @@
+--- gcc-3.4.1/libstdc++-v3/libmath/Makefile.am~ 2003-08-27 22:29:42.000000000 +0100
++++ gcc-3.4.1/libstdc++-v3/libmath/Makefile.am 2004-07-22 16:41:45.152130128 +0100
+@@ -32,7 +32,7 @@
+
+ libmath_la_SOURCES = stubs.c
+
+-AM_CPPFLAGS = $(CANADIAN_INCLUDES)
++AM_CPPFLAGS = $(CANADIAN_INCLUDES) -I$(toplevel_srcdir)/include
+
+ # Only compiling "C" sources in this directory.
+ LIBTOOL = @LIBTOOL@ --tag CC
+--- gcc-3.4.1/libstdc++-v3/fragment.am.old 2004-07-22 18:24:58.024083656 +0100
++++ gcc-3.4.1/libstdc++-v3/fragment.am 2004-07-22 18:24:59.019932264 +0100
+@@ -18,7 +18,7 @@
+ $(WARN_FLAGS) $(WERROR) -fdiagnostics-show-location=once
+
+ # -I/-D flags to pass when compiling.
+-AM_CPPFLAGS = $(GLIBCXX_INCLUDES)
++AM_CPPFLAGS = $(GLIBCXX_INCLUDES) -I$(toplevel_srcdir)/include
+
+
+
diff --git a/packages/gcc/gcc-4.2.2/sh3-installfix-fixheaders.patch b/packages/gcc/gcc-4.2.2/sh3-installfix-fixheaders.patch
new file mode 100644
index 0000000000..a06cd2e075
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/sh3-installfix-fixheaders.patch
@@ -0,0 +1,11 @@
+--- gcc-4.1.1/gcc/Makefile.in_orig 2007-01-31 21:24:23.000000000 +0000
++++ gcc-4.1.1/gcc/Makefile.in 2007-01-31 21:24:43.000000000 +0000
+@@ -3772,8 +3772,6 @@
+ $(INSTALL_SCRIPT) $(mkinstalldirs) \
+ $(DESTDIR)$(itoolsdir)/mkinstalldirs ; \
+ $(INSTALL_SCRIPT) $(srcdir)/fixproto $(DESTDIR)$(itoolsdir)/fixproto ; \
+- $(INSTALL_PROGRAM) build/fix-header$(build_exeext) \
+- $(DESTDIR)$(itoolsdir)/fix-header$(build_exeext) ; \
+ else :; fi
+ echo 'SYSTEM_HEADER_DIR="'"$(SYSTEM_HEADER_DIR)"'"' \
+ > $(DESTDIR)$(itoolsdatadir)/mkheaders.conf
diff --git a/packages/gcc/gcc-4.2.2/unbreak-armv4t.patch b/packages/gcc/gcc-4.2.2/unbreak-armv4t.patch
new file mode 100644
index 0000000000..b3399abfdb
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/unbreak-armv4t.patch
@@ -0,0 +1,12 @@
+diff -urN gcc-4.1.1/gcc/config/arm/linux-eabi.h gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h
+--- gcc-4.1.1/gcc/config/arm/linux-eabi.h 2006-10-22 11:11:49.000000000 -0700
++++ gcc-4.1.1-arm9tdmi/gcc/config/arm/linux-eabi.h 2006-10-24 21:34:01.000000000 -0700
+@@ -45,7 +45,7 @@
+ The ARM10TDMI core is the default for armv5t, so set
+ SUBTARGET_CPU_DEFAULT to achieve this. */
+ #undef SUBTARGET_CPU_DEFAULT
+-#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm10tdmi
++#define SUBTARGET_CPU_DEFAULT TARGET_CPU_arm9tdmi
+
+ #undef SUBTARGET_EXTRA_LINK_SPEC
+ #define SUBTARGET_EXTRA_LINK_SPEC " -m armelf_linux_eabi"
diff --git a/packages/gcc/gcc-4.2.2/zecke-no-host-includes.patch b/packages/gcc/gcc-4.2.2/zecke-no-host-includes.patch
new file mode 100644
index 0000000000..6afb10d6ef
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/zecke-no-host-includes.patch
@@ -0,0 +1,31 @@
+Index: gcc-4.0.2/gcc/c-incpath.c
+===================================================================
+--- gcc-4.0.2.orig/gcc/c-incpath.c 2005-01-23 16:05:27.000000000 +0100
++++ gcc-4.0.2/gcc/c-incpath.c 2006-05-15 21:23:02.000000000 +0200
+@@ -350,6 +350,26 @@
+ p->construct = 0;
+ p->user_supplied_p = user_supplied_p;
+
++#ifdef CROSS_COMPILE
++ /* A common error when cross compiling is including
++ host headers. This code below will try to fail fast
++ for cross compiling. Currently we consider /usr/include,
++ /opt/include and /sw/include as harmful. */
++ {
++ /* printf("Adding Path: %s\n", p->name ); */
++ if( strstr(p->name, "/usr/include" ) == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /usr/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/sw/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /sw/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ } else if( strstr(p->name, "/opt/include") == p->name ) {
++ fprintf(stderr, _("CROSS COMPILE Badness: /opt/include in INCLUDEPATH: %s\n"), p->name);
++ abort();
++ }
++ }
++#endif
++
+ add_cpp_dir_path (p, chain);
+ }
+
diff --git a/packages/gcc/gcc-4.2.2/zecke-xgcc-cpp.patch b/packages/gcc/gcc-4.2.2/zecke-xgcc-cpp.patch
new file mode 100644
index 0000000000..42ec190600
--- /dev/null
+++ b/packages/gcc/gcc-4.2.2/zecke-xgcc-cpp.patch
@@ -0,0 +1,12 @@
+Index: gcc-4.1.1/Makefile.in
+===================================================================
+--- gcc-4.1.1.orig/Makefile.in 2006-08-06 13:32:44.000000000 +0200
++++ gcc-4.1.1/Makefile.in 2006-08-06 13:32:46.000000000 +0200
+@@ -194,6 +194,7 @@
+ AS="$(COMPILER_AS_FOR_TARGET)"; export AS; \
+ CC="$(CC_FOR_TARGET)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
++ CPP="$(CC_FOR_TARGET) -E"; export CCP; \
+ CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
+ CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
diff --git a/packages/gcc/gcc-cross-initial_4.2.2.bb b/packages/gcc/gcc-cross-initial_4.2.2.bb
new file mode 100644
index 0000000000..1c1d094382
--- /dev/null
+++ b/packages/gcc/gcc-cross-initial_4.2.2.bb
@@ -0,0 +1,5 @@
+require gcc-cross_${PV}.bb
+require gcc-cross-initial.inc
+
+EXTRA_OECONF += "--disable-libmudflap \
+ --disable-libssp"
diff --git a/packages/gcc/gcc-cross_4.2.1.bb b/packages/gcc/gcc-cross_4.2.1.bb
index 34f083b111..3272876326 100644
--- a/packages/gcc/gcc-cross_4.2.1.bb
+++ b/packages/gcc/gcc-cross_4.2.1.bb
@@ -5,7 +5,7 @@ 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*
# remember to increment this one too.
-PR = "r7"
+PR = "r9"
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-cross_4.2.2.bb b/packages/gcc/gcc-cross_4.2.2.bb
new file mode 100644
index 0000000000..9025a98f3c
--- /dev/null
+++ b/packages/gcc/gcc-cross_4.2.2.bb
@@ -0,0 +1,20 @@
+require gcc_${PV}.bb
+# path mangling, needed by the cross packaging
+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*
+# remember to increment this one too.
+PR = "r1"
+
+DEPENDS = "virtual/${TARGET_PREFIX}binutils virtual/${TARGET_PREFIX}libc-for-gcc gmp-native mpfr-native"
+PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++"
+
+# cross build
+require gcc3-build-cross.inc
+# cross packaging
+require gcc-package-cross.inc
+
+SRC_URI_append_fail-fast = " file://zecke-no-host-includes.patch;patch=1 "
+
+EXTRA_OECONF += "--disable-libunwind-exceptions --with-mpfr=${STAGING_DIR}/${BUILD_SYS}"
diff --git a/packages/gcc/gcc_4.2.1.bb b/packages/gcc/gcc_4.2.1.bb
index 07f4b0db0c..7bf074de57 100644
--- a/packages/gcc/gcc_4.2.1.bb
+++ b/packages/gcc/gcc_4.2.1.bb
@@ -1,4 +1,4 @@
-PR = "r4"
+PR = "r5"
DESCRIPTION = "The GNU cc and gcc C compilers."
HOMEPAGE = "http://www.gnu.org/software/gcc/"
SECTION = "devel"
@@ -38,6 +38,10 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://unbreak-armv4t.patch;patch=1 \
file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
file://cache-amnesia.patch;patch=1 \
+ file://gfortran.patch;patch=1 \
+"
+
+SRC_URI_append_ep93xx = " \
file://arm-crunch-saveregs.patch;patch=1 \
file://arm-crunch-20000320.patch;patch=1 \
file://arm-crunch-compare.patch;patch=1 \
@@ -55,9 +59,10 @@ SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
file://arm-crunch-truncsi-disable.patch;patch=1 \
file://arm-crunch-cfcvt64-disable.patch;patch=1 \
file://arm-crunch-cirrus-bugfixes.patch;patch=1 \
- file://gfortran.patch;patch=1 \
"
+PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}"
+
SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
#Set the fortran bits
diff --git a/packages/gcc/gcc_4.2.2.bb b/packages/gcc/gcc_4.2.2.bb
new file mode 100644
index 0000000000..f13f218ab5
--- /dev/null
+++ b/packages/gcc/gcc_4.2.2.bb
@@ -0,0 +1,83 @@
+PR = "r0"
+DESCRIPTION = "The GNU cc and gcc C compilers."
+HOMEPAGE = "http://www.gnu.org/software/gcc/"
+SECTION = "devel"
+LICENSE = "GPL"
+
+inherit autotools gettext
+
+require gcc-package.inc
+
+SRC_URI = "ftp://ftp.gnu.org/pub/gnu/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
+ file://100-uclibc-conf.patch;patch=1 \
+ file://103-uclibc-conf-noupstream.patch;patch=1 \
+ file://200-uclibc-locale.patch;patch=1 \
+ file://203-uclibc-locale-no__x.patch;patch=1 \
+ file://204-uclibc-locale-wchar_fix.patch;patch=1 \
+ file://205-uclibc-locale-update.patch;patch=1 \
+ file://300-libstdc++-pic.patch;patch=1 \
+ file://301-missing-execinfo_h.patch;patch=1 \
+ file://302-c99-snprintf.patch;patch=1 \
+ file://303-c99-complex-ugly-hack.patch;patch=1 \
+ file://304-index_macro.patch;patch=1 \
+ file://305-libmudflap-susv3-legacy.patch;patch=1 \
+ file://306-libstdc++-namespace.patch;patch=1 \
+ file://307-locale_facets.patch;patch=1 \
+ file://402-libbackend_dep_gcov-iov.h.patch;patch=1 \
+ file://602-sdk-libstdc++-includes.patch;patch=1 \
+ file://740-sh-pr24836.patch;patch=1 \
+ file://800-arm-bigendian.patch;patch=1 \
+ file://904-flatten-switch-stmt-00.patch;patch=1 \
+ file://arm-nolibfloat.patch;patch=1 \
+ file://arm-softfloat.patch;patch=1 \
+ file://gcc41-configure.in.patch;patch=1 \
+ file://arm-thumb.patch;patch=1 \
+ file://arm-thumb-cache.patch;patch=1 \
+ file://ldflags.patch;patch=1 \
+ file://zecke-xgcc-cpp.patch;patch=1 \
+ file://unbreak-armv4t.patch;patch=1 \
+ file://fix-ICE-in-arm_unwind_emit_set.diff;patch=1 \
+ file://cache-amnesia.patch;patch=1 \
+ file://gfortran.patch;patch=1 \
+"
+
+SRC_URI_append_ep93xx = " \
+ file://arm-crunch-saveregs.patch;patch=1 \
+ file://arm-crunch-20000320.patch;patch=1 \
+ file://arm-crunch-compare.patch;patch=1 \
+ file://arm-crunch-compare-unordered.patch;patch=1 \
+ file://arm-crunch-compare-geu.patch;patch=1 \
+ file://arm-crunch-eabi-ieee754.patch;patch=1 \
+ file://arm-crunch-eabi-ieee754-div.patch;patch=1 \
+ file://arm-crunch-64bit-disable0.patch;patch=1 \
+ file://arm-crunch-offset.patch;patch=1 \
+ file://arm-crunch-fp_consts.patch;patch=1 \
+ file://arm-crunch-neg2.patch;patch=1 \
+ file://arm-crunch-predicates3.patch;patch=1 \
+ file://arm-crunch-cfcvtds-disable.patch;patch=1 \
+ file://arm-crunch-floatsi-disable.patch;patch=1 \
+ file://arm-crunch-truncsi-disable.patch;patch=1 \
+ file://arm-crunch-cfcvt64-disable.patch;patch=1 \
+ file://arm-crunch-cirrus-bugfixes.patch;patch=1 \
+ "
+
+PACKAGE_ARCH_ep93xx = "${MACHINE_ARCH}"
+
+SRC_URI_append_sh3 = " file://sh3-installfix-fixheaders.patch;patch=1 "
+
+#Set the fortran bits
+# 'i,fortran' or '', not 'f77' like gcc3 had
+FORTRAN = ""
+FORTRAN_linux-gnueabi = ",fortran"
+
+#Set the java bits
+JAVA = ""
+JAVA_arm = ""
+
+LANGUAGES = "c,c++${FORTRAN}${JAVA}"
+require gcc3-build.inc
+ARCH_FLAGS_FOR_TARGET=-isystem${STAGING_INCDIR}
+
+
+EXTRA_OECONF += " --disable-libssp --disable-bootstrap "
+
diff --git a/packages/glib-2.0/glib-2.0-2.14.0/gcc-4.2-inline-fix.patch b/packages/glib-2.0/glib-2.0-2.14.0/gcc-4.2-inline-fix.patch
new file mode 100644
index 0000000000..ea2b41e900
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0-2.14.0/gcc-4.2-inline-fix.patch
@@ -0,0 +1,17 @@
+Index: glib-2.12.9/glib/gutils.h
+===================================================================
+--- glib-2.12.9.orig/glib/gutils.h 2007-10-07 19:13:53.000000000 +0200
++++ glib-2.12.9/glib/gutils.h 2007-10-07 19:15:04.000000000 +0200
+@@ -97,7 +97,11 @@
+ # define G_INLINE_FUNC
+ # undef G_CAN_INLINE
+ #elif defined (__GNUC__)
+-# define G_INLINE_FUNC extern inline
++# if defined (__GNUC_GNU_INLINE__)
++# define G_INLINE_FUNC extern __attribute__((gnu_inline)) inline
++# else
++# define G_INLINE_FUNC extern inline
++# endif
+ #elif defined (G_CAN_INLINE)
+ # define G_INLINE_FUNC static inline
+ #else /* can't inline */
diff --git a/packages/glib-2.0/glib-2.0-2.14.1/.mtn2git_empty b/packages/glib-2.0/glib-2.0-2.14.1/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0-2.14.1/.mtn2git_empty
diff --git a/packages/glib-2.0/glib-2.0-2.14.1/configure-libtool.patch b/packages/glib-2.0/glib-2.0-2.14.1/configure-libtool.patch
new file mode 100644
index 0000000000..a52327c8c9
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0-2.14.1/configure-libtool.patch
@@ -0,0 +1,29 @@
+--- glib-2.12.10/configure.in.orig 2006-06-05 13:34:08.000000000 +0100
++++ glib-2.12.10/configure.in 2006-06-05 13:34:36.000000000 +0100
+@@ -1174,7 +1174,7 @@
+ G_MODULE_LDFLAGS=
+ else
+ export SED
+- G_MODULE_LDFLAGS=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
++ G_MODULE_LDFLAGS=`(./$host_alias-libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+ fi
+ dnl G_MODULE_IMPL= don't reset, so cmd-line can override
+ G_MODULE_NEED_USCORE=0
+@@ -1265,7 +1265,7 @@
+ LDFLAGS="$LDFLAGS $G_MODULE_LDFLAGS"
+ dnl *** check for OSF1/5.0 RTLD_GLOBAL brokenness
+ echo "void glib_plugin_test(void) { }" > plugin.c
+- ${SHELL} ./libtool --mode=compile ${CC} -shared \
++ ${SHELL} ./$host_alias-libtool --mode=compile ${CC} -shared \
+ -export-dynamic -o plugin.o plugin.c 2>&1 >/dev/null
+ AC_CACHE_CHECK([for RTLD_GLOBAL brokenness],
+ glib_cv_rtldglobal_broken,[
+@@ -1339,7 +1339,7 @@
+
+ AC_MSG_CHECKING(for the suffix of shared libraries)
+ export SED
+-shrext_cmds=`./libtool --config | grep '^shrext_cmds='`
++shrext_cmds=`./$host_alias-libtool --config | grep '^shrext_cmds='`
+ eval $shrext_cmds
+ module=yes eval std_shrext=$shrext_cmds
+ # chop the initial dot
diff --git a/packages/glib-2.0/glib-2.0-2.14.1/gcc-4.2-inline-fix.patch b/packages/glib-2.0/glib-2.0-2.14.1/gcc-4.2-inline-fix.patch
new file mode 100644
index 0000000000..ea2b41e900
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0-2.14.1/gcc-4.2-inline-fix.patch
@@ -0,0 +1,17 @@
+Index: glib-2.12.9/glib/gutils.h
+===================================================================
+--- glib-2.12.9.orig/glib/gutils.h 2007-10-07 19:13:53.000000000 +0200
++++ glib-2.12.9/glib/gutils.h 2007-10-07 19:15:04.000000000 +0200
+@@ -97,7 +97,11 @@
+ # define G_INLINE_FUNC
+ # undef G_CAN_INLINE
+ #elif defined (__GNUC__)
+-# define G_INLINE_FUNC extern inline
++# if defined (__GNUC_GNU_INLINE__)
++# define G_INLINE_FUNC extern __attribute__((gnu_inline)) inline
++# else
++# define G_INLINE_FUNC extern inline
++# endif
+ #elif defined (G_CAN_INLINE)
+ # define G_INLINE_FUNC static inline
+ #else /* can't inline */
diff --git a/packages/glib-2.0/glib-2.0_2.14.0.bb b/packages/glib-2.0/glib-2.0_2.14.0.bb
index 995efbd119..e4318cd1f0 100644
--- a/packages/glib-2.0/glib-2.0_2.14.0.bb
+++ b/packages/glib-2.0/glib-2.0_2.14.0.bb
@@ -2,4 +2,5 @@ require glib.inc
SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glib/2.14/glib-${PV}.tar.bz2 \
file://glibconfig-sysdefs.h \
- file://configure-libtool.patch;patch=1"
+ file://configure-libtool.patch;patch=1 \
+ file://gcc-4.2-inline-fix.patch;patch=1"
diff --git a/packages/glib-2.0/glib-2.0_2.14.1.bb b/packages/glib-2.0/glib-2.0_2.14.1.bb
new file mode 100644
index 0000000000..e4318cd1f0
--- /dev/null
+++ b/packages/glib-2.0/glib-2.0_2.14.1.bb
@@ -0,0 +1,6 @@
+require glib.inc
+
+SRC_URI = "http://ftp.gnome.org/pub/GNOME/sources/glib/2.14/glib-${PV}.tar.bz2 \
+ file://glibconfig-sysdefs.h \
+ file://configure-libtool.patch;patch=1 \
+ file://gcc-4.2-inline-fix.patch;patch=1"
diff --git a/packages/glibc/glibc_2.3.3+cvs20050221.bb b/packages/glibc/glibc_2.3.3+cvs20050221.bb
index 577e480a45..1bb949665d 100644
--- a/packages/glibc/glibc_2.3.3+cvs20050221.bb
+++ b/packages/glibc/glibc_2.3.3+cvs20050221.bb
@@ -22,7 +22,7 @@ SRC_URI = "cvs://anoncvs@sources.redhat.com/cvs/glibc;module=libc;date=${@bb.dat
file://arm-longlong.patch;patch=1;pnum=0 \
file://arm-machine-gmon.patch;patch=1;pnum=0 \
file://trampoline.patch;patch=1;pnum=0 \
- file://dl-cache-libcmp.patch;patch=1;pnum=0 \
+ file://dl-cache-libcmp.patch;patch=1 \
\
file://etc/ld.so.conf \
file://generate-supported.mk"
diff --git a/packages/gnutls/gnutls_1.6.2.bb b/packages/gnutls/gnutls_1.6.2.bb
deleted file mode 100644
index 68077c0c5a..0000000000
--- a/packages/gnutls/gnutls_1.6.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require gnutls.inc
-PR = "r1"
-
-do_configure_prepend() {
- sed -i "s/2.60/2.59/" ${S}/configure.in
-}
diff --git a/packages/gnutls/gnutls_1.6.3.bb b/packages/gnutls/gnutls_1.6.3.bb
new file mode 100644
index 0000000000..6e0f6000d3
--- /dev/null
+++ b/packages/gnutls/gnutls_1.6.3.bb
@@ -0,0 +1,2 @@
+require gnutls.inc
+PR = "r2"
diff --git a/packages/gpe-conf/gpe-conf_0.2.6.bb b/packages/gpe-conf/gpe-conf_0.2.6.bb
index 1256ce5291..b56b780210 100644
--- a/packages/gpe-conf/gpe-conf_0.2.6.bb
+++ b/packages/gpe-conf/gpe-conf_0.2.6.bb
@@ -4,13 +4,13 @@ PRIORITY = "optional"
LICENSE = "GPL"
DEPENDS = "gtk+ esound audiofile libgpewidget libxsettings libxsettings-client libxrandr"
-RDEPENDS_${PN} = "xst xset ntpdate gpe-login gpe-icons tzdata xrandr"
+RDEPENDS_${PN} = "xst gpe-confd xset ntpdate gpe-icons tzdata xrandr"
RDEPENDS_gpe-conf-panel = "gpe-conf"
RPROVIDES_${PN} += " bl"
RCONFLICTS_${PN} = "bl"
-PR = "r0"
+PR = "r1"
GPE_TARBALL_SUFFIX = "bz2"
diff --git a/packages/gpephone/gpe-session-scripts-phone/phonesession b/packages/gpephone/gpe-session-scripts-phone/phonesession
index 2f573a13fa..524199ee16 100755
--- a/packages/gpephone/gpe-session-scripts-phone/phonesession
+++ b/packages/gpephone/gpe-session-scripts-phone/phonesession
@@ -54,6 +54,7 @@ esdplay /mnt/sd/sounds/startup.wav
# Start SoundServer
soundserver &
+alsactl restore -f /etc/gsmhandset.state
# Run GSM support stuff
diff --git a/packages/gpephone/gpe-session-scripts-phone_0.67.bb b/packages/gpephone/gpe-session-scripts-phone_0.67.bb
index ac867a9c02..62bd5a649b 100644
--- a/packages/gpephone/gpe-session-scripts-phone_0.67.bb
+++ b/packages/gpephone/gpe-session-scripts-phone_0.67.bb
@@ -14,7 +14,7 @@ SRC_URI = "${GPE_MIRROR}/gpe-session-scripts-${PV}.tar.gz \
file://disable-composite.xsettings \
file://standard-apps.patch;patch=1"
-PR = "r9"
+PR = "r10"
S = "${WORKDIR}/gpe-session-scripts-${PV}"
diff --git a/packages/gpsd/files/gpsd b/packages/gpsd/files/gpsd
index 2cf26c5f3a..3a14867f8a 100755
--- a/packages/gpsd/files/gpsd
+++ b/packages/gpsd/files/gpsd
@@ -6,10 +6,6 @@
# description: Gpsd manages access to a serial- or USB-connected GPS
# processname: gpsd
-# If you must specify a non-NMEA driver, uncomment and modify the next line
-#GPSD_OPTS=
-GPS_DEV="/dev/ttyS3"
-
# Source function library.
#. /etc/rc.d/init.d/functions
@@ -39,7 +35,7 @@ start() {
echo "success"
else
# User needs to symlink ${GPS_DEV} to the right thing
- echo "No ${GPS_DEV} device, aborting gpsd startup."
+ echo "No ${GPS_DEV} GPS device, aborting gpsd startup. Check /etc/default/$prog"
fi
RETVAL=$?
echo
diff --git a/packages/gpsd/gpsd_2.28.bb b/packages/gpsd/gpsd_2.28.bb
index d51d088807..c16de2e951 100644
--- a/packages/gpsd/gpsd_2.28.bb
+++ b/packages/gpsd/gpsd_2.28.bb
@@ -1,2 +1,2 @@
require gpsd.inc
-PR = "r3"
+PR = "r4"
diff --git a/packages/gpsd/gpsd_2.34.bb b/packages/gpsd/gpsd_2.34.bb
index 1399dba53b..32cb4b925d 100644
--- a/packages/gpsd/gpsd_2.34.bb
+++ b/packages/gpsd/gpsd_2.34.bb
@@ -1,4 +1,4 @@
require gpsd.inc
-PR = "r4"
+PR = "r5"
diff --git a/packages/gsm/libgsmd_svn.bb b/packages/gsm/libgsmd_svn.bb
index 9aaad58ee6..e07b4acfa9 100644
--- a/packages/gsm/libgsmd_svn.bb
+++ b/packages/gsm/libgsmd_svn.bb
@@ -7,15 +7,15 @@ PV = "0.1+svnr${SRCREV}"
PR = "r31"
SRC_URI = "svn://svn.openmoko.org/trunk/src/target;module=gsm;proto=http \
- file://024_sms-text-in-bracket.patch;patch=1;minrev=2957 \
- file://025_sms-status-report.patch;patch=1;minrev=2957 \
- file://027_phonebook-find-and-read-range-support.patch;patch=1;minrev=2957 \
- file://028_shell-phonebook-find-and-read-range-support.patch;patch=1;minrev=2957 \
+ file://024_sms-text-in-bracket.patch;patch=1;minrev=2957;maxrev=3199 \
+ file://025_sms-status-report.patch;patch=1;minrev=2957;maxrev=3200 \
+ file://027_phonebook-find-and-read-range-support.patch;patch=1;minrev=2957;maxrev=3202 \
+ file://028_shell-phonebook-find-and-read-range-support.patch;patch=1;minrev=2957;maxrev=3203 \
file://0001-Introduce-ports.patch;patch=1;minrev=2957 \
file://0002-Flush-all-pending-commands-before-restarting-the-mod.patch;patch=1;minrev=2957 \
file://0003-Correctly-segment-incoming-usock-data-into-packets.patch;patch=1;minrev=2957 \
file://0004-Handle-read-and-write-return-values.patch;patch=1;minrev=2957 \
- file://0005-Add-ask-ds-option-forSMS.patch;patch=1;minrev=2957 \
+ file://0005-Add-ask-ds-option-forSMS.patch;patch=1;minrev=2957;maxrev=3201 \
file://lgsm_send_fix_return_value.patch;patch=1 \
file://gsmd \
file://default"
diff --git a/packages/gstreamer/gst-meta-base_0.10.bb b/packages/gstreamer/gst-meta-base_0.10.bb
index fbf36b94b0..9dcb1677e8 100644
--- a/packages/gstreamer/gst-meta-base_0.10.bb
+++ b/packages/gstreamer/gst-meta-base_0.10.bb
@@ -1,8 +1,8 @@
# Based on its sibling on Poky which is copyright (C) 2006,2007 OpenedHand LTD
DESCRIPTION = "Gstreamer package groups"
-DEPENDS = "gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly"
-PR = "r5"
+DEPENDS = "gstreamer gst-plugins-base gst-plugins-bad gst-plugins-good gst-plugins-ugly"
+PR = "r8"
PACKAGES = "\
gst-meta-base \
@@ -12,18 +12,23 @@ PACKAGES = "\
ALLOW_EMPTY = "1"
-RDEPENDS_gst-meta-base = "\
+REPENDS_gst-meta-base = "\
gstreamer \
gst-plugin-playbin \
gst-plugin-decodebin \
-# gst-plugin-gnomevfs \
- gst-plugin-alsa \
gst-plugin-volume \
- gst-plugin-ximagesink \
gst-plugin-audioconvert \
gst-plugin-audioresample \
gst-plugin-typefindfunctions \
gst-plugin-videoscale \
+ gst-plugin-autodetect"
+
+RRECOMMENDS_gst-meta-base = "\
+ gst-plugin-gnomevfs \
+ gst-plugin-alsa \
+ gst-plugin-ximagesink \
+ gst-plugin-typefindfunctions \
+ gst-plugin-videoscale \
gst-plugin-ffmpegcolorspace \
gst-plugin-autodetect"
diff --git a/packages/gstreamer/gst-plugins-ugly/gstmad_16bit.patch b/packages/gstreamer/gst-plugins-ugly/gstmad_16bit.patch
new file mode 100644
index 0000000000..1d1eb83484
--- /dev/null
+++ b/packages/gstreamer/gst-plugins-ugly/gstmad_16bit.patch
@@ -0,0 +1,109 @@
+--- gst-plugins-ugly-0.10.6/ext/mad/gstmad.c.orig 2007-06-13 11:21:25.000000000 +0200
++++ gst-plugins-ugly-0.10.6/ext/mad/gstmad.c 2007-09-16 22:45:04.000000000 +0200
+@@ -119,8 +119,8 @@
+ GST_STATIC_CAPS ("audio/x-raw-int, "
+ "endianness = (int) " G_STRINGIFY (G_BYTE_ORDER) ", "
+ "signed = (boolean) true, "
+- "width = (int) 32, "
+- "depth = (int) 32, "
++ "width = (int) 16, "
++ "depth = (int) 16, "
+ "rate = (int) { 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000 }, "
+ "channels = (int) [ 1, 2 ]")
+ );
+@@ -458,7 +458,7 @@
+
+ mad = GST_MAD (GST_PAD_PARENT (pad));
+
+- bytes_per_sample = MAD_NCHANNELS (&mad->frame.header) * 4;
++ bytes_per_sample = MAD_NCHANNELS (&mad->frame.header) << 1;
+
+ switch (src_format) {
+ case GST_FORMAT_BYTES:
+@@ -870,13 +870,11 @@
+ return res;
+ }
+
+-static inline gint32
++static inline gint16
+ scale (mad_fixed_t sample)
+ {
+-#if MAD_F_FRACBITS < 28
+ /* round */
+- sample += (1L << (28 - MAD_F_FRACBITS - 1));
+-#endif
++ sample += (1L << (MAD_F_FRACBITS - 16));
+
+ /* clip */
+ if (sample >= MAD_F_ONE)
+@@ -884,13 +882,8 @@
+ else if (sample < -MAD_F_ONE)
+ sample = -MAD_F_ONE;
+
+-#if MAD_F_FRACBITS < 28
+ /* quantize */
+- sample >>= (28 - MAD_F_FRACBITS);
+-#endif
+-
+- /* convert from 29 bits to 32 bits */
+- return (gint32) (sample << 3);
++ return sample >> (MAD_F_FRACBITS + 1 - 16);
+ }
+
+ /* do we need this function? */
+@@ -1277,8 +1270,8 @@
+ caps = gst_caps_new_simple ("audio/x-raw-int",
+ "endianness", G_TYPE_INT, G_BYTE_ORDER,
+ "signed", G_TYPE_BOOLEAN, TRUE,
+- "width", G_TYPE_INT, 32,
+- "depth", G_TYPE_INT, 32,
++ "width", G_TYPE_INT, 16,
++ "depth", G_TYPE_INT, 16,
+ "rate", G_TYPE_INT, rate, "channels", G_TYPE_INT, nchannels, NULL);
+
+ gst_pad_set_caps (mad->srcpad, caps);
+@@ -1576,7 +1569,7 @@
+ to skip and send the remaining pcm samples */
+
+ GstBuffer *outbuffer = NULL;
+- gint32 *outdata;
++ gint16 *outdata;
+ mad_fixed_t const *left_ch, *right_ch;
+
+ if (mad->need_newsegment) {
+@@ -1594,7 +1587,7 @@
+ /* will attach the caps to the buffer */
+ result =
+ gst_pad_alloc_buffer_and_set_caps (mad->srcpad, 0,
+- nsamples * mad->channels * 4, GST_PAD_CAPS (mad->srcpad),
++ nsamples * mad->channels * 2, GST_PAD_CAPS (mad->srcpad),
+ &outbuffer);
+ if (result != GST_FLOW_OK) {
+ /* Head for the exit, dropping samples as we go */
+@@ -1607,7 +1600,7 @@
+ left_ch = mad->synth.pcm.samples[0];
+ right_ch = mad->synth.pcm.samples[1];
+
+- outdata = (gint32 *) GST_BUFFER_DATA (outbuffer);
++ outdata = (gint16 *) GST_BUFFER_DATA (outbuffer);
+
+ GST_DEBUG ("mad out timestamp %" GST_TIME_FORMAT,
+ GST_TIME_ARGS (time_offset));
+@@ -1621,14 +1614,14 @@
+ gint count = nsamples;
+
+ while (count--) {
+- *outdata++ = scale (*left_ch++) & 0xffffffff;
++ *outdata++ = scale (*left_ch++) & 0xffff;
+ }
+ } else {
+ gint count = nsamples;
+
+ while (count--) {
+- *outdata++ = scale (*left_ch++) & 0xffffffff;
+- *outdata++ = scale (*right_ch++) & 0xffffffff;
++ *outdata++ = scale (*left_ch++) & 0xffff;
++ *outdata++ = scale (*right_ch++) & 0xffff;
+ }
+ }
+
diff --git a/packages/gstreamer/gst-plugins-ugly_0.10.6.bb b/packages/gstreamer/gst-plugins-ugly_0.10.6.bb
index 4caf56e522..9eb6410d09 100644
--- a/packages/gstreamer/gst-plugins-ugly_0.10.6.bb
+++ b/packages/gstreamer/gst-plugins-ugly_0.10.6.bb
@@ -1,6 +1,7 @@
require gst-plugins.inc
DEPENDS += "gst-plugins-base"
-SRC_URI += "file://cross-compile.patch;patch=1"
+SRC_URI += "file://cross-compile.patch;patch=1 \
+ file://gstmad_16bit.patch;patch=1"
-PR = "r0"
+PR = "r1"
diff --git a/packages/gstreamer/gst-plugins.inc b/packages/gstreamer/gst-plugins.inc
index 24eb54a9b4..8e8fd0f1ca 100644
--- a/packages/gstreamer/gst-plugins.inc
+++ b/packages/gstreamer/gst-plugins.inc
@@ -6,7 +6,7 @@ PACKAGES_DYNAMIC = "gst-plugin-*"
SRC_URI = "http://gstreamer.freedesktop.org/src/${PN}/${PN}-${PV}.tar.bz2"
-EXTRA_OECONF = "--disable-aalib --disable-shout2 --disable-sdl --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR} "
+EXTRA_OECONF = "--disable-aalib --disable-shout2 --disable-sdl --disable-cdaudio --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR} "
acpaths = "-I ${S}/common/m4 -I ${S}/m4"
diff --git a/packages/gtk+/gdk-pixbuf-csource-native_2.10.14.bb b/packages/gtk+/gdk-pixbuf-csource-native_2.10.14.bb
index 6fbc7d936f..2896079e8e 100644
--- a/packages/gtk+/gdk-pixbuf-csource-native_2.10.14.bb
+++ b/packages/gtk+/gdk-pixbuf-csource-native_2.10.14.bb
@@ -1,6 +1,6 @@
require gtk+_${PV}.bb
inherit native
-DEPENDS = "jpeg-native libpng-native"
+DEPENDS = "jpeg-native libpng-native gettext-native glib-2.0-native"
S = "${WORKDIR}/gtk+-${PV}"
FILESPATH = "${FILE_DIRNAME}/gdk-pixbuf-csource:${FILE_DIRNAME}/gtk+-${PV}:${FILE_DIRNAME}/files"
SRC_URI += "file://reduce-dependencies.patch;patch=1"
diff --git a/packages/gtk+/gtk+-fastscaling_2.10.14.bb b/packages/gtk+/gtk+-fastscaling_2.10.14.bb
new file mode 100644
index 0000000000..09c78662d9
--- /dev/null
+++ b/packages/gtk+/gtk+-fastscaling_2.10.14.bb
@@ -0,0 +1,14 @@
+require gtk+_${PV}.bb
+
+FILESPATH_prepend = "${FILE_DIRNAME}/gtk+-${PV}:"
+
+DEFAULT_PREFERENCE = "-1"
+
+PROVIDES = "gtk+"
+RPROVIDES_${PN} = "gtk+"
+PR = "r0"
+
+SRC_URI += "file://lower-quality-scaling-in-pixbuf-engine.patch;patch=1"
+
+S = "${WORKDIR}/gtk+-${PV}"
+
diff --git a/packages/gtk+/gtk+_2.10.14.bb b/packages/gtk+/gtk+_2.10.14.bb
index ef783b01f0..3efe492d34 100644
--- a/packages/gtk+/gtk+_2.10.14.bb
+++ b/packages/gtk+/gtk+_2.10.14.bb
@@ -30,12 +30,3 @@ SRC_URI = "ftp://ftp.gtk.org/pub/gtk/v2.10/gtk+-${PV}.tar.bz2 \
require gtk-fpu.inc
EXTRA_OECONF += "${@get_gtk_fpu_setting(bb, d)}"
-# try to squeeze some more performance out of it
-SRC_URI_append_fic-gta01 = " file://lower-quality-scaling-in-pixbuf-engine.patch;patch=1"
-SRC_URI_append_fic-gta02 = " file://lower-quality-scaling-in-pixbuf-engine.patch;patch=1"
-
-# this doesn't seem to work
-SRC_URI_OVERRIDES_PACKAGE_ARCH = "1"
-# let's do it manually then
-PACKAGE_ARCH_fic-gta01 = "fic-gta01"
-PACKAGE_ARCH_fic-gta02 = "fic-gta02"
diff --git a/packages/gtk+/gtk-2.10.inc b/packages/gtk+/gtk-2.10.inc
index c3bbb0232a..3fa5d22a71 100644
--- a/packages/gtk+/gtk-2.10.inc
+++ b/packages/gtk+/gtk-2.10.inc
@@ -52,7 +52,8 @@ do_stage () {
mkdir -p ${STAGING_LIBDIR}/gtk-2.0/include
install -m 0644 gdk/gdkconfig.h ${STAGING_LIBDIR}/gtk-2.0/include/gdkconfig.h
-
+ # Copy over all headers, since the maemo stuff needs access to the private api. *sigh*
+ cp gtk/*.h ${STAGING_INCDIR}/gtk-2.0/gtk/
install -m 0644 m4macros/gtk-2.0.m4 ${STAGING_DATADIR}/aclocal/
}
diff --git a/packages/gtk-sharp/.mtn2git_empty b/packages/gtk-sharp/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gtk-sharp/.mtn2git_empty
diff --git a/packages/gtk-sharp/gtk-sharp.inc b/packages/gtk-sharp/gtk-sharp.inc
new file mode 100644
index 0000000000..1fc9941f2b
--- /dev/null
+++ b/packages/gtk-sharp/gtk-sharp.inc
@@ -0,0 +1,11 @@
+DESCRIPTION = "GTK bindings for mono"
+SECTION = "devel/mono"
+
+DEPENDS = "mono mono-native gtk+ atk pango cairo glib-2.0 libglade "
+RDEPENDS = "mono"
+
+inherit autotools
+
+# For some reason the URL template changes from version to version,
+# therefore use some variables for the directory and extension
+SRC_URI = "http://go-mono.com/sources/gtk-sharp${SDIRVER}/gtk-sharp-${PV}.tar.${SEXT}"
diff --git a/packages/gtk-sharp/gtk-sharp_2.10.2.bb b/packages/gtk-sharp/gtk-sharp_2.10.2.bb
new file mode 100644
index 0000000000..ddb209e15c
--- /dev/null
+++ b/packages/gtk-sharp/gtk-sharp_2.10.2.bb
@@ -0,0 +1,84 @@
+PV = "2.10.2"
+PR = "r1"
+SDIRVER = "210"
+SEXT = "bz2"
+
+inherit mono pkgconfig
+require gtk-sharp.inc
+
+FILES_libgtk2.0-cil = "/usr/lib/libgtksharpglue-2.so \
+ /usr/lib/libgdksharpglue-2.so \
+ /usr/lib/libpangosharpglue-2.so \
+ /usr/lib/mono/gac/gtk-sharp \
+ /usr/lib/mono/gac/gdk-sharp \
+ /usr/lib/mono/gac/atk-sharp \
+ /usr/lib/mono/gac/pango-sharp \
+ /usr/lib/mono/gac/gtk-dotnet \
+ /usr/lib/mono/gtk-sharp-2.0/gtk-sharp.dll \
+ /usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll \
+ /usr/lib/mono/gtk-sharp-2.0/atk-sharp.dll \
+ /usr/lib/mono/gtk-sharp-2.0/pango-sharp.dll \
+ /usr/lib/mono/gtk-sharp-2.0/gtk-dotnet.dll \
+ /usr/lib/mono/gac/policy.2.*.gtk-sharp/ \
+ /usr/lib/mono/gac/policy.2.*.gdk-sharp/ \
+ /usr/lib/mono/gac/policy.2.*.atk-sharp/ \
+ /usr/lib/mono/gac/policy.2.*.pango-sharp/ \
+ /usr/lib/mono/gac/policy.2.*.gtk-dotnet/ \
+ /usr/lib/mono/gtk-sharp-2.0/policy.2.*.gtk-sharp.dll \
+ /usr/lib/mono/gtk-sharp-2.0/policy.2.*.gdk-sharp.dll \
+ /usr/lib/mono/gtk-sharp-2.0/policy.2.*.atk-sharp.dll \
+ /usr/lib/mono/gtk-sharp-2.0/policy.2.*.pango-sharp.dll \
+ /usr/lib/mono/gtk-sharp-2.0/policy.2.*.gtk-dotnet.dll \
+ "
+FILES_libgtk2.0-cil-dev = "/usr/lib/pkgconfig/gtk-sharp-2.0.pc \
+ /usr/lib/pkgconfig/gtk-dotnet-2.0.pc \
+ /usr/share/gapi-2.0/pango-api.xml \
+ /usr/share/gapi-2.0/atk-api.xml \
+ /usr/share/gapi-2.0/gdk-api.xml \
+ /usr/share/gapi-2.0/gtk-api.xml"
+FILES_libgtk2.0-cil-dbg = "/usr/lib/.debug/libgtksharpglue-2.so \
+ /usr/lib/.debug/libgdksharpglue-2.so \
+ /usr/lib/.debug/libpangosharpglue-2.so"
+
+FILES_libglib2.0-cil = "/usr/lib/mono/gac/glib-sharp \
+ /usr/lib/libglibsharpglue-2.so \
+ /usr/lib/mono/gtk-sharp-2.0/glib-sharp.dll \
+ /usr/lib/mono/gac/policy.2.*.glib-sharp/ \
+ /usr/lib/mono/gtk-sharp-2.0/policy.2.*.glib-sharp.dll"
+FILES_libglib2.0-cil-dev = "/usr/lib/pkgconfig/glib-sharp-2.0.pc"
+FILES_libglib2.0-cil-dbg = "/usr/lib/.debug/libglibsharpglue-2.so"
+
+FILES_libglade2.0-cil = "/usr/lib/mono/gac/glade-sharp \
+ /usr/lib/libgladesharpglue-2.so \
+ /usr/lib/mono/gtk-sharp-2.0/glade-sharp.dll \
+ /usr/lib/mono/gac/policy.2.*.glade-sharp/ \
+ /usr/lib/mono/gtk-sharp-2.0/policy.2.*.glade-sharp.dll"
+FILES_libglade2.0-cil-dev = "/usr/lib/pkgconfig/glade-sharp-2.0.pc \
+ /usr/share/gapi-2.0/glade-api.xml"
+FILES_libglade2.0-cil-dbg = "/usr/lib/.debug/libgladesharpglue-2.so"
+
+FILES_gtk-sharp-gapi2 = " \
+ /usr/bin/gapi2-* \
+ /usr/lib/gtk-sharp-2.0/gapi*"
+FILES_gtk-sharp-gapi2-dev = "/usr/lib/pkgconfig/gapi-2.0.pc"
+
+FILES_gtk-sharp2-glue-dev = "/usr/lib/libgtksharpglue-2.la \
+ /usr/lib/libgtksharpglue-2.a \
+ /usr/lib/libpangosharpglue-2.la \
+ /usr/lib/libpangosharpglue-2.a \
+ /usr/lib/libgdksharpglue-2.la \
+ /usr/lib/libgdksharpglue-2.a"
+
+FILES_glade-sharp2-glue-dev = " \
+ /usr/lib/libgladesharpglue-2.la \
+ /usr/lib/libgladesharpglue-2.a"
+
+FILES_glib-sharp2-glue-dev = " \
+ /usr/lib/libglibsharpglue-2.la \
+ /usr/lib/libglibsharpglue-2.a"
+
+PACKAGES = "libgtk2.0-cil libgtk2.0-cil-dev libgtk2.0-cil-dbg \
+ libglib2.0-cil libglib2.0-cil-dev libglib2.0-cil-dbg \
+ libglade2.0-cil libglade2.0-cil-dev libglade2.0-cil-dbg \
+ gtk-sharp-gapi2 gtk-sharp-gapi2-dev \
+ gtk-sharp2-glue-dev glade-sharp2-glue-dev glib-sharp2-glue-dev"
diff --git a/packages/gtk-webcore/midori/midori.desktop b/packages/gtk-webcore/midori/midori.desktop
deleted file mode 100644
index 683b1a343e..0000000000
--- a/packages/gtk-webcore/midori/midori.desktop
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-Name=Midori
-Comment=Webkit based browser
-Exec=midori
-Terminal=false
-Type=Application
-Categories=Application
diff --git a/packages/gtk-webcore/midori_0.0.10.bb b/packages/gtk-webcore/midori_0.0.10.bb
new file mode 100644
index 0000000000..23d0179375
--- /dev/null
+++ b/packages/gtk-webcore/midori_0.0.10.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "Midori is a lightweight web browser."
+LICENSE = "GPLv2"
+
+DEPENDS = "webkit-gtk libsexy"
+
+inherit autotools pkgconfig
+
+SRC_URI = "http://software.twotoasts.de/media/midori/midori-${PV}.tar.gz \
+ "
+
+
diff --git a/packages/gtk-webcore/midori_0.0.6.bb b/packages/gtk-webcore/midori_0.0.6.bb
deleted file mode 100644
index ed0213964f..0000000000
--- a/packages/gtk-webcore/midori_0.0.6.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-DESCRIPTION = "Midori is a lightweight web browser."
-LICENSE = "GPLv2"
-
-DEPENDS = "webkit-gtk libsexy"
-
-inherit autotools pkgconfig
-
-SRC_URI = "http://software.twotoasts.de/media/midori/midori-${PV}.tar.gz \
- file://midori.desktop"
-
-do_install_append() {
- if [ -f ${WORKDIR}/midori.desktop ]; then
- install -d ${D}${datadir}/applications
- install -m 0644 ${WORKDIR}/midori.desktop ${D}${datadir}/applications
- fi
-
-}
-
diff --git a/packages/gtk-webcore/midori_0.0.8.bb b/packages/gtk-webcore/midori_0.0.8.bb
new file mode 100644
index 0000000000..23d0179375
--- /dev/null
+++ b/packages/gtk-webcore/midori_0.0.8.bb
@@ -0,0 +1,11 @@
+DESCRIPTION = "Midori is a lightweight web browser."
+LICENSE = "GPLv2"
+
+DEPENDS = "webkit-gtk libsexy"
+
+inherit autotools pkgconfig
+
+SRC_URI = "http://software.twotoasts.de/media/midori/midori-${PV}.tar.gz \
+ "
+
+
diff --git a/packages/gtk-webcore/osb-jscore_20070816.bb b/packages/gtk-webcore/osb-jscore_20070816.bb
index b5aa879a18..672b0ba0a7 100644
--- a/packages/gtk-webcore/osb-jscore_20070816.bb
+++ b/packages/gtk-webcore/osb-jscore_20070816.bb
@@ -12,7 +12,7 @@ SRC_URI = "cvs://anonymous@gtk-webcore.cvs.sourceforge.net/cvsroot/gtk-webcore;m
file://gcc4-fno-threadsafe-statics-JavaScriptCore.patch;patch=1"
S = "${WORKDIR}/JavaScriptCore"
-DEFAULT_PREFERENCE = "${@['-1', '1'][not bb.data.getVar('PREFERRED_VERSION_gcc-cross', d, 1) or bb.data.getVar('PREFERRED_VERSION_gcc-cross', d, 1).split('.')[0] == '4']}"
+DEFAULT_PREFERENCE = "-1"
inherit autotools pkgconfig
diff --git a/packages/gtk-webcore/osb-jscore_svn.bb b/packages/gtk-webcore/osb-jscore_svn.bb
index c75db61a9a..554ab5b96d 100644
--- a/packages/gtk-webcore/osb-jscore_svn.bb
+++ b/packages/gtk-webcore/osb-jscore_svn.bb
@@ -3,9 +3,7 @@ HOMEPAGE = "http://gtk-webcore.sourceforge.net/"
LICENSE = "GPL"
PRIORITY = "optional"
-DEFAULT_PREFERENCE = "-1"
-
-PV = "0.5.2+svnr${SRCDATE}"
+PV = "0.5.2+svnr${SRCREV}"
PR = "r1"
SRC_URI = "svn://gtk-webcore.svn.sourceforge.net/svnroot/gtk-webcore/trunk;module=JavaScriptCore;proto=https \
diff --git a/packages/gtk-webcore/osb-nrcit_20070816.bb b/packages/gtk-webcore/osb-nrcit_20070816.bb
index 3bfec98924..3441d1d508 100644
--- a/packages/gtk-webcore/osb-nrcit_20070816.bb
+++ b/packages/gtk-webcore/osb-nrcit_20070816.bb
@@ -15,7 +15,7 @@ SRC_URI = "cvs://anonymous@gtk-webcore.cvs.sourceforge.net/cvsroot/gtk-webcore;m
file://gcc4-fno-threadsafe-statics-NRCit.patch;patch=1"
S = "${WORKDIR}/NRCit"
-DEFAULT_PREFERENCE = "${@['-1', '1'][not bb.data.getVar('PREFERRED_VERSION_gcc-cross', d, 1) or bb.data.getVar('PREFERRED_VERSION_gcc-cross', d, 1).split('.')[0] == '4']}"
+DEFAULT_PREFERENCE = "-1"
inherit autotools pkgconfig
diff --git a/packages/gtk-webcore/osb-nrcit_svn.bb b/packages/gtk-webcore/osb-nrcit_svn.bb
index d982c6b595..7ea8b3b6fa 100644
--- a/packages/gtk-webcore/osb-nrcit_svn.bb
+++ b/packages/gtk-webcore/osb-nrcit_svn.bb
@@ -4,19 +4,18 @@ LICENSE = "nokia"
PRIORITY = "optional"
SECTION = "gpe"
-PV = "0.5.2+svnr${SRCDATE}"
+PV = "0.5.2+svnr${SRCREV}"
PR = "r0"
DEPENDS = "curl librsvg osb-nrcore pango"
SRC_URI = "svn://gtk-webcore.svn.sourceforge.net/svnroot/gtk-webcore/trunk;module=NRCit;proto=https \
file://gcc4-fno-threadsafe-statics-NRCit.patch;patch=1"
-S = "${WORKDIR}/NRCit"
-
-DEFAULT_PREFERENCE = "-1"
inherit autotools pkgconfig
+S = "${WORKDIR}/NRCit"
+
EXTRA_OECONF = " --enable-pango "
do_configure () {
diff --git a/packages/gtk-webcore/osb-nrcore_20070816.bb b/packages/gtk-webcore/osb-nrcore_20070816.bb
index 991af8d24d..1c946d05c6 100644
--- a/packages/gtk-webcore/osb-nrcore_20070816.bb
+++ b/packages/gtk-webcore/osb-nrcore_20070816.bb
@@ -11,4 +11,4 @@ SRC_URI = "cvs://anonymous@gtk-webcore.cvs.sourceforge.net/cvsroot/gtk-webcore;m
S = "${WORKDIR}/NRCore"
-DEFAULT_PREFERENCE = "${@['-1', '1'][not bb.data.getVar('PREFERRED_VERSION_gcc-cross', d, 1) or bb.data.getVar('PREFERRED_VERSION_gcc-cross', d, 1).split('.')[0] == '4']}"
+DEFAULT_PREFERENCE = "-1"
diff --git a/packages/gtk-webcore/osb-nrcore_svn.bb b/packages/gtk-webcore/osb-nrcore_svn.bb
index 5ca22d3083..8e0b4b04b6 100644
--- a/packages/gtk-webcore/osb-nrcore_svn.bb
+++ b/packages/gtk-webcore/osb-nrcore_svn.bb
@@ -1,8 +1,6 @@
require osb-nrcore.inc
-DEFAULT_PREFERENCE = "-1"
-
-PV = "0.5.2+svnr${SRCDATE}"
+PV = "0.5.2+svnr${SRCREV}"
PR = "r1"
SRC_URI = "svn://gtk-webcore.svn.sourceforge.net/svnroot/gtk-webcore/trunk;module=NRCore;proto=https \
diff --git a/packages/gutenprint/.mtn2git_empty b/packages/gutenprint/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/gutenprint/.mtn2git_empty
diff --git a/packages/gutenprint/gutenprint-native_5.1.3.bb b/packages/gutenprint/gutenprint-native_5.1.3.bb
new file mode 100644
index 0000000000..4fe56d6c59
--- /dev/null
+++ b/packages/gutenprint/gutenprint-native_5.1.3.bb
@@ -0,0 +1,39 @@
+SECTION = "libs"
+require gutenprint_${PV}.bb
+DEPENDS = ""
+inherit native
+
+EXTRA_OECONF = "\
+ --disable-nls \
+ --disable-gtktest \
+ --enable-cups-ppds \
+ --disable-libgutenprintui \
+ --disable-libgutenprintui2 \
+ --disable-translated-cups-ppds \
+ --with-ghostscript \
+ --enable-cups-level3-ppds \
+ --disable-gimptest \
+ --enable-test \
+ --enable-epson \
+ --with-user-guide \
+ --with-samples \
+ --with-escputil \
+ "
+
+do_configure() {
+ gnu-configize
+ libtoolize --force
+ oe_runconf
+}
+
+
+
+
+do_stage() {
+ autotools_stage_includes
+ install -m 0755 -d ${STAGING_DATADIR}/cups/model
+ install -m 0644 src/cups/ppd/C/*ppd* ${STAGING_DATADIR}/cups/model/
+# oe_libinstall -so -a -C objs libfreetype ${STAGING_LIBDIR}
+}
+
+
diff --git a/packages/gutenprint/gutenprint.inc b/packages/gutenprint/gutenprint.inc
new file mode 100644
index 0000000000..961613036a
--- /dev/null
+++ b/packages/gutenprint/gutenprint.inc
@@ -0,0 +1,28 @@
+DESCRIPTION = "Gutenprint printer drivers"
+HOMEPAGE = "http://gimp-print.sourceforge.net/"
+LICENSE = "GPL"
+
+DEPENDS = "glib-2.0 cups tiff jpeg libpng gutenprint-native espgs"
+
+
+inherit autotools pkgconfig
+PARALLEL_MAKE=""
+
+#EXTRA_OECONF = "\
+# --disable-nls \
+# --disable-gtktest \
+# --enable-cups-ppds \
+# --disable-libgutenprintui \
+# --disable-libgutenprintui2 \
+# --disable-translated-cups-ppds \
+# --with-ghostscript \
+# --enable-cups-level3-ppds \
+# --disable-gimptest \
+# --enable-test \
+# --enable-epson \
+# --with-user-guide \
+# --with-samples \
+# --with-escputil \
+# "
+
+
diff --git a/packages/gutenprint/gutenprint_5.1.3.bb b/packages/gutenprint/gutenprint_5.1.3.bb
new file mode 100644
index 0000000000..8886323da5
--- /dev/null
+++ b/packages/gutenprint/gutenprint_5.1.3.bb
@@ -0,0 +1,48 @@
+require gutenprint.inc
+
+PR = "r1"
+
+DEPENDS = "glib-2.0 ijs ncurses cups tiff jpeg libpng gutenprint-native espgs"
+
+SRC_URI = "${SOURCEFORGE_MIRROR}/gimp-print/gutenprint-5.1.3.tar.bz2"
+S = "${WORKDIR}/gutenprint-${PV}"
+
+
+EXTRA_OECONF = "\
+ --disable-nls \
+ --disable-gtktest \
+# --enable-cups-ppds \
+# this option is disabled here, since the ppds are generated during native build
+ --disable-libgutenprintui \
+ --disable-libgutenprintui2 \
+ --disable-translated-cups-ppds \
+# --with-ghostscript \
+# i MAY have to disable this one as well, since these are probably built in native as well
+ --enable-cups-level3-ppds \
+ --disable-gimptest \
+ --enable-test \
+ --enable-epson \
+ --with-user-guide \
+ --with-samples \
+ --with-escputil \
+ "
+
+do_configure() {
+ gnu-configize
+ libtoolize --force
+ oe_runconf
+}
+
+
+do_install_append() {
+ install -d ${D}${datadir}/cups/model/
+ install -m 644 ${STAGING_DIR}/${BUILD_SYS}/share/cups/model/* ${D}${datadir}/cups/model/
+ cp -pPr ${D}${STAGING_LIBDIR}/* ${D}${libdir}/
+ cp -pPr ${D}${STAGING_DATADIR}/* ${D}${datadir}/
+}
+
+
+FILES_${PN} += "${datadir}/cups/model ${libdir}/cups ${datadir}/cups/calibrate.ppm"
+FILES_${PN}-dbg += "${libdir}/cups/*/.debug"
+
+
diff --git a/packages/gutenprint/ijs_0.35.bb b/packages/gutenprint/ijs_0.35.bb
new file mode 100644
index 0000000000..18407480c9
--- /dev/null
+++ b/packages/gutenprint/ijs_0.35.bb
@@ -0,0 +1,15 @@
+DESCRIPTION = "Inkjet driver from linuxprinting.org"
+LICENSE = "MIT"
+HOMEPAGE = "http://www.linuxprinting.org/ijs/"
+
+SRC_URI = "http://www.linuxprinting.org/ijs/download/ijs-${PV}.tar.bz2"
+
+inherit autotools pkgconfig binconfig lib_package
+
+EXTRA_OECONF = " --enable-shared "
+
+do_stage() {
+ autotools_stage_all
+}
+
+
diff --git a/packages/hal/hal_0.5.9.bb b/packages/hal/hal_0.5.9.bb
index 72d5dc4e2d..03c45623a4 100644
--- a/packages/hal/hal_0.5.9.bb
+++ b/packages/hal/hal_0.5.9.bb
@@ -5,28 +5,28 @@ RDEPENDS += "udev hal-info"
#RDEPENDS_hal-device-manager = "python hal python-pygnome"
RRECOMMENDS = "udev-utils"
-PR = "r2"
+PR = "r3"
SRC_URI += "file://99_hal \
file://20hal \
"
+# machines with pci and acpi get a machine dependant hal
EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
--with-expat=${STAGING_LIBDIR}/.. \
--with-dbus-sys=${sysconfdir}/dbus-1/system.d \
--with-hotplug=${sysconfdir}/hotplug.d \
--disable-docbook-docs \
--disable-policy-kit \
- --disable-acpi --disable-pmu --disable-pci \
- --disable-pci-ids --disable-pnp-ids \
- "
-
-# work around autoconf >2.59 deps...
-do_configure() {
- gnu-configize
- libtoolize --force
- oe_runconf
-}
+ --disable-pmu \
+ --disable-pnp-ids \
+ ${@base_contains('COMBINED_FEATURES', 'pci', '--enable-pci --enable-pci-ids', '--disable-pci --disable-pci-ids',d)} \
+ ${@base_contains('MACHINE_FEATURES', 'acpi', '--enable-acpi', '--disable-acpi',d)} \
+ "
+
+MY_ARCH := "${PACKAGE_ARCH}"
+PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'acpi', '${MACHINE_ARCH}', '${MY_ARCH}',d)}"
+PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'pci', '${MACHINE_ARCH}', '${MY_ARCH}',d)}"
do_install_append() {
install -d ${D}/etc/default/volatiles
diff --git a/packages/hal/ohm_git.bb b/packages/hal/ohm_git.bb
index cd003b4b72..11fbd1c929 100644
--- a/packages/hal/ohm_git.bb
+++ b/packages/hal/ohm_git.bb
@@ -13,7 +13,11 @@ S = "${WORKDIR}/git"
inherit autotools pkgconfig
-EXTRA_OECONF = "--with-distro=debian"
+EXTRA_OECONF = "--with-distro=debian --without-xauth"
+
+do_configure_prepend() {
+ touch gtk-doc.make
+}
do_configure_append() {
rm config.log
diff --git a/packages/icu/icu-3.6.inc b/packages/icu/icu-3.6.inc
index 92176ee7fb..b9031e202a 100644
--- a/packages/icu/icu-3.6.inc
+++ b/packages/icu/icu-3.6.inc
@@ -5,7 +5,7 @@ SRC_URI = "ftp://ftp.software.ibm.com/software/globalization/icu/3.6/icu4c-3_6-s
S = "${WORKDIR}/icu/source"
-inherit autotools pkgconfig
+inherit autotools pkgconfig binconfig
do_configure() {
libtoolize --force
diff --git a/packages/angstrom/angstrom-altboot-console-image.bb b/packages/images/altboot-console-image.bb
index 32a1564afe..ff5984981a 100644
--- a/packages/angstrom/angstrom-altboot-console-image.bb
+++ b/packages/images/altboot-console-image.bb
@@ -1,4 +1,4 @@
-require angstrom-console-image.bb
+require console-image.bb
ANGSTROM_EXTRA_INSTALL += " altboot "
diff --git a/packages/angstrom/angstrom-altboot-x11-image.bb b/packages/images/altboot-x11-image.bb
index ce3fd820c3..d4b129e48c 100644
--- a/packages/angstrom/angstrom-altboot-x11-image.bb
+++ b/packages/images/altboot-x11-image.bb
@@ -1,4 +1,4 @@
-require angstrom-x11-image.bb
+require x11-image.bb
ANGSTROM_EXTRA_INSTALL += " altboot "
export IMAGE_BASENAME = "altboot-x11-image"
diff --git a/packages/angstrom/angstrom-bootmanager-image.bb b/packages/images/bootmanager-image.bb
index d829590188..d829590188 100644
--- a/packages/angstrom/angstrom-bootmanager-image.bb
+++ b/packages/images/bootmanager-image.bb
diff --git a/packages/angstrom/angstrom-console-image.bb b/packages/images/console-image.bb
index 1684716187..1684716187 100644
--- a/packages/angstrom/angstrom-console-image.bb
+++ b/packages/images/console-image.bb
diff --git a/packages/angstrom/angstrom-gateway-image.bb b/packages/images/gateway-image.bb
index ee9d1d97fc..ee9d1d97fc 100644
--- a/packages/angstrom/angstrom-gateway-image.bb
+++ b/packages/images/gateway-image.bb
diff --git a/packages/images/angstrom-minimal-image-with-mtd-utils.bb b/packages/images/minimal-image-with-mtd-utils.bb
index 4fe33e9282..b778300580 100644
--- a/packages/images/angstrom-minimal-image-with-mtd-utils.bb
+++ b/packages/images/minimal-image-with-mtd-utils.bb
@@ -2,7 +2,7 @@
# for creating a small initramfs image in NOR flash that can be used
# to program the NAND flash.
-require angstrom-minimal-image.bb
+require minimal-image.bb
IMAGE_INSTALL += "mtd-utils"
export IMAGE_BASENAME = "minimalist-image-mtdutils"
diff --git a/packages/images/angstrom-minimal-image.bb b/packages/images/minimal-image.bb
index 4b3a4cd835..4b3a4cd835 100644
--- a/packages/images/angstrom-minimal-image.bb
+++ b/packages/images/minimal-image.bb
diff --git a/packages/angstrom/angstrom-mokogateway-image.bb b/packages/images/mokogateway-image.bb
index a8c59f2075..a8c59f2075 100644
--- a/packages/angstrom/angstrom-mokogateway-image.bb
+++ b/packages/images/mokogateway-image.bb
diff --git a/packages/angstrom/angstrom-x11-gpe-image.bb b/packages/images/x11-gpe-image.bb
index ffd401b6a8..ffd401b6a8 100644
--- a/packages/angstrom/angstrom-x11-gpe-image.bb
+++ b/packages/images/x11-gpe-image.bb
diff --git a/packages/angstrom/angstrom-x11-image.bb b/packages/images/x11-image.bb
index e430590a7f..e430590a7f 100644
--- a/packages/angstrom/angstrom-x11-image.bb
+++ b/packages/images/x11-image.bb
diff --git a/packages/angstrom/angstrom-x11-office-image.bb b/packages/images/x11-office-image.bb
index f9dcb8cf43..f6a8d0af1d 100644
--- a/packages/angstrom/angstrom-x11-office-image.bb
+++ b/packages/images/x11-office-image.bb
@@ -19,7 +19,7 @@ IMAGE_INSTALL = "\
abiword \
gnumeric \
cups \
- claws-mail claws-mail claws-plugin-maildir claws-plugin-mailmbox claws-plugin-rssyl \
+ claws-mail claws-mail claws-plugin-mailmbox claws-plugin-rssyl \
midori minimo \
gphoto2 \
${ANGSTROM_EXTRA_INSTALL}"
diff --git a/packages/angstrom/angstrom-x11-pimlico-image.bb b/packages/images/x11-pimlico-image.bb
index c7acedfa0d..c7acedfa0d 100644
--- a/packages/angstrom/angstrom-x11-pimlico-image.bb
+++ b/packages/images/x11-pimlico-image.bb
diff --git a/packages/ipkg/files/lonk-link-name.patch b/packages/ipkg/files/lonk-link-name.patch
new file mode 100644
index 0000000000..14fc73a5ac
--- /dev/null
+++ b/packages/ipkg/files/lonk-link-name.patch
@@ -0,0 +1,38 @@
+--- ipkg-0.99.163/libbb/unarchive.c.orig 2007-10-04 12:39:42.000000000 +0200
++++ ipkg-0.99.163/libbb/unarchive.c 2007-10-04 12:41:28.000000000 +0200
+@@ -595,10 +595,6 @@
+ if (longname) {
+ tar_entry->name = longname;
+ longname = NULL;
+- }
+- else if (linkname) {
+- tar_entry->name = linkname;
+- linkname = NULL;
+ } else
+ #endif
+ if (tar.formated.prefix[0] == 0) {
+@@ -606,6 +602,15 @@
+ } else {
+ tar_entry->name = concat_path_file(tar.formated.prefix, tar.formated.name);
+ }
++
++#ifdef CONFIG_FEATURE_TAR_GNU_EXTENSIONS
++ if (linkname) {
++ tar_entry->link_name = linkname;
++ linkname = NULL;
++ } else
++#endif
++ tar_entry->link_name = strlen(tar.formated.linkname) ?
++ xstrdup(tar.formated.linkname) : NULL;
+
+ // tar_entry->name = xstrdup(tar.formated.name);
+
+@@ -618,8 +623,6 @@
+ tar_entry->gid = strtol(tar.formated.gid, NULL, 8);
+ tar_entry->size = strtol(tar.formated.size, NULL, 8);
+ tar_entry->mtime = strtol(tar.formated.mtime, NULL, 8);
+- tar_entry->link_name = strlen(tar.formated.linkname) ?
+- xstrdup(tar.formated.linkname) : NULL;
+ tar_entry->device = (strtol(tar.formated.devmajor, NULL, 8) << 8) +
+ strtol(tar.formated.devminor, NULL, 8);
+
diff --git a/packages/ipkg/ipkg-collateral.bb b/packages/ipkg/ipkg-collateral.bb
index 244d29d08a..3fd55507e2 100644
--- a/packages/ipkg/ipkg-collateral.bb
+++ b/packages/ipkg/ipkg-collateral.bb
@@ -2,7 +2,6 @@ DESCRIPTION = "ipkg configuration files"
SECTION = "base"
LICENSE = "MIT"
PR = "r7"
-PACKAGE_ARCH = "${MACHINE_ARCH}"
SRC_URI = " \
file://ipkg.conf.comments \
diff --git a/packages/ipkg/ipkg_0.99.163.bb b/packages/ipkg/ipkg_0.99.163.bb
index c5972a7c53..56e25900c1 100644
--- a/packages/ipkg/ipkg_0.99.163.bb
+++ b/packages/ipkg/ipkg_0.99.163.bb
@@ -1,5 +1,5 @@
include ipkg.inc
-PR = "r4"
+PR = "r5"
S = "${WORKDIR}/ipkg-${PV}"
@@ -8,6 +8,7 @@ SRC_URI = "http://www.handhelds.org/pub/packages/ipkg/ipkg-${PV}.tar.gz \
file://is-processing.patch;patch=1 \
file://1-pkg-parse--Optimize-inefficient-parsing.patch;patch=1 \
file://2-pkg-vec--Optimize-gross-inefficiency.patch;patch=1 \
+ file://lonk-link-name.patch;patch=1 \
"
do_stage() {
diff --git a/packages/ixp4xx/ixp4xx-npe_2.4.bb b/packages/ixp4xx/ixp4xx-npe_2.4.bb
index 3eca80e882..71dc71e274 100644
--- a/packages/ixp4xx/ixp4xx-npe_2.4.bb
+++ b/packages/ixp4xx/ixp4xx-npe_2.4.bb
@@ -3,8 +3,9 @@ LICENSE = "Intel Software Licence Agreement"
PR = "r0"
DEPENDS = "ixp4xx-npe-native"
-# You need to download the IPL_ixp400NpeLibrary-3_0.zip file (without crypto) from:
-# http://www.intel.com/design/network/products/npfamily/ixp400_current.htm
+# You need to download the IPL_ixp400NpeLibrary-2_4.zip file (without crypto) from:
+# http://www.intel.com/design/network/products/npfamily/download_ixp400.htm
+# "Intel IXP400 software - NPE microcode (non-crypto)" -> "2.4"
# and put it in your downloads directory so bitbake will find it.
# Make sure you *read* and accept the license - it is not a standard one.
diff --git a/packages/libgcrypt/libgcrypt_1.2.3.bb b/packages/libgcrypt/libgcrypt_1.2.3.bb
index 3cca30a6bb..74205da673 100644
--- a/packages/libgcrypt/libgcrypt_1.2.3.bb
+++ b/packages/libgcrypt/libgcrypt_1.2.3.bb
@@ -3,6 +3,7 @@ SECTION = "libs"
PRIORITY = "optional"
LICENSE = "GPL LGPL FDL"
DEPENDS = "libgpg-error"
+PR = "r1"
# move libgcrypt-config into -dev package
FILES_${PN} = "${libdir}/lib*.so.*"
@@ -17,14 +18,5 @@ EXTRA_OECONF = "--without-pth --disable-asm --with-capabilities"
ARM_INSTRUCTION_SET = "arm"
do_stage() {
- oe_libinstall -so -C src libgcrypt ${STAGING_LIBDIR}
- oe_libinstall -so -C src libgcrypt-pthread ${STAGING_LIBDIR}
- install -m 0755 src/libgcrypt-config ${STAGING_BINDIR_CROSS}/
-
- install -d ${STAGING_INCDIR}/
- for X in gcrypt.h gcrypt-module.h
- do
- install -m 0644 src/${X} ${STAGING_INCDIR}/${X}
- done
-
+ autotools_stage_all
}
diff --git a/packages/libid3tag/libid3tag_0.15.0b.bb b/packages/libid3tag/libid3tag_0.15.1b.bb
index 226a3cca5f..21f2c0f41d 100644
--- a/packages/libid3tag/libid3tag_0.15.0b.bb
+++ b/packages/libid3tag/libid3tag_0.15.1b.bb
@@ -3,9 +3,8 @@ PRIORITY = "optional"
DEPENDS = "zlib"
DESCRIPTION = "Library for interacting with ID3 tags."
LICENSE = "GPL"
-PR = "r2"
-SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libid3tag-${PV}.tar.gz "
+SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libid3tag-${PV}.tar.gz"
S = "${WORKDIR}/libid3tag-${PV}"
inherit autotools
diff --git a/packages/libmad/libmad_0.15.1b.bb b/packages/libmad/libmad_0.15.1b.bb
index 9de296635e..4e486236cd 100644
--- a/packages/libmad/libmad_0.15.1b.bb
+++ b/packages/libmad/libmad_0.15.1b.bb
@@ -4,7 +4,7 @@ PRIORITY = "optional"
DEPENDS = "libid3tag"
LICENSE = "GPL"
-SRC_URI = "ftp://ftp.mars.org/pub/mpeg/libmad-${PV}.tar.gz"
+SRC_URI = "${SOURCEFORGE_MIRROR}/mad/libmad-${PV}.tar.gz"
S = "${WORKDIR}/libmad-${PV}"
inherit autotools
diff --git a/packages/libqpe/libqpe-opie_cvs.bb b/packages/libqpe/libqpe-opie_cvs.bb
index f206529480..10ad8d56ea 100644
--- a/packages/libqpe/libqpe-opie_cvs.bb
+++ b/packages/libqpe/libqpe-opie_cvs.bb
@@ -1,7 +1,6 @@
require ${PN}.inc
-PV = "1.2.2+cvs${SRCDATE}"
-PR = "r10"
+PV = "1.2.3+cvs${SRCDATE}"
SRC_URI = "${HANDHELDS_CVS};module=opie/library \
file://fix-titleheight.patch;patch=1 \
diff --git a/packages/libtiff/tiff-3.7.2/.mtn2git_empty b/packages/libtiff/tiff-3.7.2/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/libtiff/tiff-3.7.2/.mtn2git_empty
diff --git a/packages/libtiff/tiff-3.7.2/configure.patch b/packages/libtiff/tiff-3.7.2/configure.patch
new file mode 100644
index 0000000000..599af6c188
--- /dev/null
+++ b/packages/libtiff/tiff-3.7.2/configure.patch
@@ -0,0 +1,20 @@
+Index: tiff-3.7.2/configure.ac
+===================================================================
+--- tiff-3.7.2.orig/configure.ac 2005-03-15 10:42:19.000000000 -0500
++++ tiff-3.7.2/configure.ac 2007-10-10 12:05:58.000000000 -0400
+@@ -32,7 +32,6 @@
+ AC_CANONICAL_TARGET
+
+ AM_INIT_AUTOMAKE
+-AM_PROG_CC_C_O
+ dnl Do not rebuild generated files every time
+ AM_MAINTAINER_MODE
+
+@@ -55,6 +54,7 @@
+
+ dnl Checks for programs.
+ AC_PROG_CC
++AM_PROG_CC_C_O
+
+ dnl We want warnings. As many warnings as possible.
+ #VL_PROG_CC_WARNINGS()
diff --git a/packages/libtiff/tiff_3.7.2.bb b/packages/libtiff/tiff_3.7.2.bb
index d98974541d..671de80db9 100644
--- a/packages/libtiff/tiff_3.7.2.bb
+++ b/packages/libtiff/tiff_3.7.2.bb
@@ -2,9 +2,10 @@ DESCRIPTION = "This software provides support for the Tag Image File Format (TIF
LICENSE = ""
HOMEPAGE = "http://www.remotesensing.org/libtiff/"
DEPENDS = "zlib jpeg"
-PR = "r2"
+PR = "r3"
-SRC_URI = "http://dl.maptools.org/dl/libtiff/old/tiff-${PV}.tar.gz"
+SRC_URI = "http://dl.maptools.org/dl/libtiff/old/tiff-${PV}.tar.gz \
+ file://configure.patch;patch=1"
inherit autotools
diff --git a/packages/libw100/libw100_svn.bb b/packages/libw100/libw100_svn.bb
index f8d5544625..4f33c625ca 100644
--- a/packages/libw100/libw100_svn.bb
+++ b/packages/libw100/libw100_svn.bb
@@ -1,11 +1,9 @@
DESCRIPTION = "Acceleration library for ATI imageon chipsets (w100 and w3220)"
LICENSE = "GPLv2"
-PV = "0.0.2+svn${SRCDATE}"
+PV = "0.0.2+svn${SRCREV}"
SRC_URI = "svn://libw100.svn.sourceforge.net/svnroot/libw100;module=trunk;proto=https"
-DEFAULT_PREFERENCE = "-1"
-
S = "${WORKDIR}/trunk"
inherit autotools pkgconfig
diff --git a/packages/lighttpd/lighttpd_1.4.18.bb b/packages/lighttpd/lighttpd_1.4.18.bb
index 14a6bd0f25..a83efcaf40 100644
--- a/packages/lighttpd/lighttpd_1.4.18.bb
+++ b/packages/lighttpd/lighttpd_1.4.18.bb
@@ -2,6 +2,7 @@ DESCRIPTION = "Web server"
SECTION = "net"
LICENSE = "BSD"
DEPENDS = "libpcre"
+PR = "r1"
SRC_URI = "http://www.lighttpd.net/download/lighttpd-${PV}.tar.gz \
file://configure.in.patch;patch=1 \
@@ -37,4 +38,11 @@ do_stage() {
autotools_stage_all
}
-FILES_${PN} += "${libdir}/mod_*.so ${sysconfdir} /www"
+FILES_${PN} += "${sysconfdir} /www"
+
+PACKAGES_DYNAMIC = "lighttpd-module-*"
+
+python populate_packages_prepend () {
+ lighttpd_libdir = bb.data.expand('${libdir}', d)
+ do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
+}
diff --git a/packages/linux-libc-headers/linux-libc-headers-2.6.23/.mtn2git_empty b/packages/linux-libc-headers/linux-libc-headers-2.6.23/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux-libc-headers/linux-libc-headers-2.6.23/.mtn2git_empty
diff --git a/packages/linux-libc-headers/linux-libc-headers-2.6.23/procinfo.h b/packages/linux-libc-headers/linux-libc-headers-2.6.23/procinfo.h
new file mode 100644
index 0000000000..8cdf828af8
--- /dev/null
+++ b/packages/linux-libc-headers/linux-libc-headers-2.6.23/procinfo.h
@@ -0,0 +1,24 @@
+/*
+ * linux/include/asm-arm/procinfo.h
+ *
+ * Copyright (C) 1996-1999 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#ifndef __ASM_PROCINFO_H
+#define __ASM_PROCINFO_H
+
+#define HWCAP_SWP 1
+#define HWCAP_HALF 2
+#define HWCAP_THUMB 4
+#define HWCAP_26BIT 8 /* Play it safe */
+#define HWCAP_FAST_MULT 16
+#define HWCAP_FPA 32
+#define HWCAP_VFP 64
+#define HWCAP_EDSP 128
+#define HWCAP_JAVA 256
+#define HWCAP_IWMMXT 512
+#define HWCAP_CRUNCH 1024
+#endif
diff --git a/packages/linux-libc-headers/linux-libc-headers_2.6.23.bb b/packages/linux-libc-headers/linux-libc-headers_2.6.23.bb
new file mode 100644
index 0000000000..43a5cb9ef1
--- /dev/null
+++ b/packages/linux-libc-headers/linux-libc-headers_2.6.23.bb
@@ -0,0 +1,66 @@
+require linux-libc-headers.inc
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS += "unifdef-native"
+PR = "r0"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
+ file://procinfo.h"
+
+S = "${WORKDIR}/linux-${PV}"
+
+set_arch() {
+ case ${TARGET_ARCH} in
+ alpha*) ARCH=alpha ;;
+ arm*) ARCH=arm ;;
+ cris*) ARCH=cris ;;
+ hppa*) ARCH=parisc ;;
+ i*86*) ARCH=i386 ;;
+ ia64*) ARCH=ia64 ;;
+ mips*) ARCH=mips ;;
+ m68k*) ARCH=m68k ;;
+ powerpc*) ARCH=powerpc ;;
+ s390*) ARCH=s390 ;;
+ sh*) ARCH=sh ;;
+ sparc64*) ARCH=sparc64 ;;
+ sparc*) ARCH=sparc ;;
+ x86_64*) ARCH=x86_64 ;;
+ avr32*) ARCH=avr32 ;;
+ bfin*) ARCH=blackfin ;;
+ esac
+}
+
+do_configure() {
+ set_arch
+ oe_runmake allnoconfig ARCH=$ARCH
+}
+
+do_compile () {
+}
+
+do_install() {
+ set_arch
+ oe_runmake headers_install INSTALL_HDR_PATH=${D}/usr ARCH=$ARCH
+}
+
+do_install_append_arm() {
+ cp ${WORKDIR}/procinfo.h ${D}${includedir}/asm/
+}
+
+STAGE_TEMP="${WORKDIR}/temp-staging"
+
+do_stage () {
+ set_arch
+ echo $ARCH
+ rm -rf ${STAGE_TEMP}
+ mkdir -p ${STAGE_TEMP}
+ oe_runmake headers_install INSTALL_HDR_PATH=${STAGE_TEMP}/usr ARCH=$ARCH
+ if [ "$ARCH" = "arm" ]; then
+ cp ${WORKDIR}/procinfo.h ${STAGE_TEMP}${includedir}/asm/
+ fi
+ install -d ${STAGING_INCDIR}
+ rm -rf ${STAGING_INCDIR}/linux ${STAGING_INCDIR}/asm ${STAGING_INCDIR}/asm-generic
+ cp -pfLR ${STAGE_TEMP}${includedir}/linux ${STAGING_INCDIR}/
+ cp -pfLR ${STAGE_TEMP}${includedir}/asm ${STAGING_INCDIR}/
+ cp -pfLR ${STAGE_TEMP}${includedir}/asm-generic ${STAGING_INCDIR}/
+}
diff --git a/packages/linux/compulab-pxa270_2.6.16.bb b/packages/linux/compulab-pxa270_2.6.16.bb
index ce6748149b..bd3135510f 100644
--- a/packages/linux/compulab-pxa270_2.6.16.bb
+++ b/packages/linux/compulab-pxa270_2.6.16.bb
@@ -68,5 +68,5 @@ do_deploy[dirs] = "${S}"
addtask deploy before do_install after do_compile
addtask compulab_image before do_install after do_deploy
-COMPATIBLE_MACHINE = "compulab-pxa270"
+COMPATIBLE_MACHINE = "cm-x270"
diff --git a/packages/linux/compulab-pxa270_2.6.22.bb b/packages/linux/compulab-pxa270_2.6.22.bb
deleted file mode 100644
index 86a7626d8a..0000000000
--- a/packages/linux/compulab-pxa270_2.6.22.bb
+++ /dev/null
@@ -1,67 +0,0 @@
-require linux.inc
-
-SECTION = "kernel"
-DESCRIPTION = "Linux kernel for the Compulab PXA270 system"
-LICENSE = "GPL"
-PR = "r1"
-
-SRC_URI = "ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
- file://0001-cm-x270-base2.patch;patch=1 \
- file://0002-cm-x270-match-type.patch;patch=1 \
- file://0003-cm-x270-ide.patch;patch=1 \
- file://0004-cm-x270-it8152.patch;patch=1 \
- file://0005-cm-x270-pcmcia.patch;patch=1 \
- file://0006-ramdisk_load.patch;patch=1 \
- file://0007-mmcsd_large_cards-r0.patch;patch=1 \
- file://0008-cm-x270-nand-simplify-name.patch;patch=1 \
- file://defconfig \
- "
-
-# file://0009-cursor-fix.patch
-
-
-
-# Note, for 2.6.22, we are no longer using the compulab binary
-# flash driver -- use JFFS2 instead
-# see notes in conf/machine/compulab-pxa270.conf
-
-S = "${WORKDIR}/linux-${PV}"
-
-COMPATIBLE_HOST = 'arm.*-linux'
-COMPATIBLE_MACHINE = "compulab-pxa270"
-
-CMDLINE = "console=${CMX270_CONSOLE_SERIAL_PORT},38400 monitor=8 bpp=16 mem=64M mtdparts=physmap-flash.0:256k(boot)ro,0x180000(kernel),-(root);cm-x270-nand:64m(app),-(data) rdinit=/sbin/init root=mtd3 rootfstype=jffs2"
-
-inherit kernel
-inherit package
-
-ARCH = "arm"
-
-FILES_kernel-image = ""
-
-python do_compulab_image() {
- import os
- import os.path
- import struct
-
- deploy_dir = bb.data.getVar('DEPLOY_DIR_IMAGE', d, 1)
- kernel_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.bin')
- img_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270')
-
- fo = open(img_file, 'wb')
-
- image_data = open(kernel_file, 'rb').read()
-
- # first write size into first 4 bytes
- size_s = struct.pack('i', len(image_data))
-
- # truncate size if we are running on a 64-bit host
- size_s = size_s[:4]
-
- fo.write(size_s)
- fo.write(image_data)
- fo.close()
-}
-
-addtask compulab_image after do_deploy before do_package
-
diff --git a/packages/linux/em-x270-2.6.23/.mtn2git_empty b/packages/linux/em-x270-2.6.23/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/em-x270-2.6.23/.mtn2git_empty
diff --git a/packages/linux/em-x270-2.6.23/defconfig b/packages/linux/em-x270-2.6.23/defconfig
new file mode 100644
index 0000000000..3246136571
--- /dev/null
+++ b/packages/linux/em-x270-2.6.23/defconfig
@@ -0,0 +1,1354 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23-rc9
+# Tue Oct 9 11:19:21 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_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION="-em-x270"
+# 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=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=17
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_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=y
+CONFIG_SLUB_DEBUG=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# 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=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
+#
+# 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 is not set
+# 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=y
+# 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
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_MACH_EM_X270=y
+CONFIG_PXA27x=y
+CONFIG_PXA_PWR_I2C=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_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+# CONFIG_PCI_SYSCALL is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_TICK_ONESHOT is not set
+# CONFIG_NO_HZ is not set
+# CONFIG_HIGH_RES_TIMERS is not set
+# CONFIG_PREEMPT is not set
+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="root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS0,115200"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# CPU Frequency scaling
+#
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_TABLE=y
+# CONFIG_CPU_FREQ_DEBUG is not set
+CONFIG_CPU_FREQ_STAT=y
+# CONFIG_CPU_FREQ_STAT_DETAILS is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=m
+CONFIG_CPU_FREQ_GOV_USERSPACE=m
+CONFIG_CPU_FREQ_GOV_ONDEMAND=m
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
+CONFIG_CPU_FREQ_PXA=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=m
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+CONFIG_PM=y
+CONFIG_PM_LEGACY=y
+# CONFIG_PM_DEBUG is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
+CONFIG_APM_EMULATION=y
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+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=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+CONFIG_NET_SCH_FIFO=y
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# 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 is not set
+CONFIG_BT_BNEP=m
+# CONFIG_BT_BNEP_MC_FILTER is not set
+# CONFIG_BT_BNEP_PROTO_FILTER is not set
+CONFIG_BT_HIDP=m
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BT_HCIUSB=m
+# CONFIG_BT_HCIUSB_SCO is not set
+CONFIG_BT_HCIUART=m
+# CONFIG_BT_HCIUART_H4 is not set
+# CONFIG_BT_HCIUART_BCSP is not set
+CONFIG_BT_HCIBCM203X=m
+CONFIG_BT_HCIBPA10X=m
+CONFIG_BT_HCIBFUSB=m
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+CONFIG_CFG80211=m
+CONFIG_WIRELESS_EXT=y
+CONFIG_MAC80211=m
+# CONFIG_MAC80211_LEDS is not set
+CONFIG_MAC80211_DEBUGFS=y
+# CONFIG_MAC80211_DEBUG 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 is not set
+# CONFIG_IEEE80211_SOFTMAC is not set
+# CONFIG_RFKILL 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_DEBUG_DRIVER is not set
+# CONFIG_DEBUG_DEVRES is not set
+# CONFIG_SYS_HYPERVISOR is not set
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_CONCAT=y
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+CONFIG_MTD_CFI_STAA=y
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x0
+CONFIG_MTD_PHYSMAP_LEN=0x100000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_IMPA7 is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+CONFIG_MTD_NAND_PLATFORM=y
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+CONFIG_MTD_UBI=m
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_UBI_BEB_RESERVE=1
+CONFIG_MTD_UBI_GLUEBI=y
+
+#
+# UBI debugging options
+#
+# CONFIG_MTD_UBI_DEBUG is not set
+# CONFIG_PARPORT is not set
+CONFIG_BLK_DEV=y
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=12000
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_DMA=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+# CONFIG_SCSI_PROC_FS is not set
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_ATA is not set
+# CONFIG_MD 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 is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+CONFIG_DM9000=y
+# CONFIG_SMC911X is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+# CONFIG_PPPOE is not set
+CONFIG_PPPOL2TP=m
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# 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=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_KEYBOARD_PXA27x=y
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_INPUT_MOUSE is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+CONFIG_TOUCHSCREEN_WM97XX=y
+# CONFIG_TOUCHSCREEN_WM9705 is not set
+CONFIG_TOUCHSCREEN_WM9712=y
+# CONFIG_TOUCHSCREEN_WM9713 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+# CONFIG_TOUCHSCREEN_UCB1400 is not set
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=m
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_CHARDEV is not set
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=y
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 is not set
+# CONFIG_SENSORS_TSL2550 is not set
+CONFIG_DA9030=y
+# 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 is not set
+CONFIG_POWER_SUPPLY=y
+# CONFIG_POWER_SUPPLY_DEBUG is not set
+# CONFIG_PDA_POWER is not set
+CONFIG_APM_POWER=y
+# CONFIG_BATTERY_DS2760 is not set
+# CONFIG_BATTERY_EM_X270 is not set
+# CONFIG_HWMON is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=m
+
+#
+# LED drivers
+#
+CONFIG_LEDS_GPIO=m
+CONFIG_LEDS_EM_X270=m
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# CONFIG_DAB is not set
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CORGI=y
+
+#
+# Display device support
+#
+# CONFIG_DISPLAY_SUPPORT is not set
+# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+CONFIG_FB_PXA_PARAMETERS=y
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# System on Chip audio support
+#
+CONFIG_SND_SOC_AC97_BUS=y
+CONFIG_SND_SOC=y
+CONFIG_SND_PXA2XX_SOC=y
+CONFIG_SND_PXA2XX_SOC_AC97=y
+CONFIG_SND_PXA2XX_SOC_EM_X270=y
+
+#
+# SoC Audio support for SuperH
+#
+CONFIG_SND_SOC_WM9712=y
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICE_CLASS is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# 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_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 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_MDC800=m
+CONFIG_USB_MICROTEK=m
+# CONFIG_USB_MON is not set
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=y
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
+
+#
+# SPI RTC drivers
+#
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_CMOS is not set
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_STK17TA8 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_M48T59 is not set
+CONFIG_RTC_DRV_V3020=y
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_SA1100=y
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_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=y
+# 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=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_BIND34 is not set
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+CONFIG_SMB_FS=y
+# CONFIG_SMB_NLS_DEFAULT is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# 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=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SHIRQ is not set
+# CONFIG_DETECT_SOFTLOCKUP is not set
+CONFIG_SCHED_DEBUG=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_TIMER_STATS is not set
+# CONFIG_SLUB_DEBUG_ON is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_MUTEXES is not set
+# CONFIG_DEBUG_LOCK_ALLOC is not set
+# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
+# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_RCU_TORTURE_TEST is not set
+# CONFIG_FAULT_INJECTION is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_MANAGER=m
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+# CONFIG_CRYPTO_CRC32C is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+CONFIG_CRYPTO_HW=y
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/em-x270-2.6.23/em-x270.patch b/packages/linux/em-x270-2.6.23/em-x270.patch
new file mode 100644
index 0000000000..3c28be83c7
--- /dev/null
+++ b/packages/linux/em-x270-2.6.23/em-x270.patch
@@ -0,0 +1,12063 @@
+ arch/arm/Kconfig | 13 +-
+ arch/arm/configs/em_x270_defconfig | 367 +++--
+ arch/arm/mach-pxa/Kconfig | 8 +
+ arch/arm/mach-pxa/Makefile | 9 +-
+ arch/arm/mach-pxa/cpu-pxa.c | 442 ++++++
+ arch/arm/mach-pxa/em-x270-devices.c | 331 +++++
+ arch/arm/mach-pxa/em-x270-lcd.c | 223 +++
+ arch/arm/mach-pxa/em-x270-pm.c | 892 ++++++++++++
+ arch/arm/mach-pxa/em-x270.c | 127 ++-
+ arch/arm/mach-pxa/pwr-i2c.c | 539 +++++++
+ arch/arm/mach-pxa/pxa27x.c | 6 +-
+ arch/arm/mach-pxa/spitz.c | 27 +
+ drivers/i2c/chips/Kconfig | 13 +
+ drivers/i2c/chips/Makefile | 1 +
+ drivers/i2c/chips/da9030.c | 1213 ++++++++++++++++
+ drivers/i2c/chips/da9030.h | 282 ++++
+ drivers/input/touchscreen/Kconfig | 43 +
+ drivers/input/touchscreen/Makefile | 14 +
+ drivers/input/touchscreen/wm9705.c | 360 +++++
+ drivers/input/touchscreen/wm9712.c | 464 ++++++
+ drivers/input/touchscreen/wm9713.c | 461 ++++++
+ drivers/input/touchscreen/wm97xx-core.c | 859 +++++++++++
+ drivers/leds/Kconfig | 6 +
+ drivers/leds/Makefile | 1 +
+ drivers/leds/leds-em-x270.c | 99 ++
+ drivers/mtd/chips/jedec_probe.c | 58 +-
+ drivers/net/dm9000.c | 1 +
+ drivers/power/Kconfig | 6 +
+ drivers/power/Makefile | 1 +
+ drivers/power/em_x270_battery.c | 579 ++++++++
+ drivers/usb/gadget/Kconfig | 20 +
+ drivers/usb/gadget/Makefile | 1 +
+ drivers/usb/gadget/epautoconf.c | 9 +-
+ drivers/usb/gadget/ether.c | 63 +-
+ drivers/usb/gadget/file_storage.c | 11 +-
+ drivers/usb/gadget/pxa27x_udc.c | 2387 +++++++++++++++++++++++++++++++
+ drivers/usb/gadget/pxa27x_udc.h | 298 ++++
+ drivers/usb/gadget/pxa2xx_udc.h | 7 +-
+ drivers/usb/gadget/serial.c | 18 +-
+ drivers/usb/gadget/zero.c | 13 +-
+ drivers/video/backlight/Kconfig | 2 +-
+ include/asm-arm/arch-pxa/pwr-i2c.h | 61 +
+ include/linux/da9030.h | 118 ++
+ include/linux/usb_gadget.h | 23 +-
+ include/linux/wm97xx.h | 291 ++++
+ sound/soc/pxa/Kconfig | 9 +
+ sound/soc/pxa/Makefile | 2 +
+ sound/soc/pxa/em-x270.c | 137 ++
+ 48 files changed, 10742 insertions(+), 173 deletions(-)
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 691aae3..cf1dbc2 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -858,7 +858,7 @@ config KEXEC
+
+ endmenu
+
+-if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX )
++if (ARCH_SA1100 || ARCH_INTEGRATOR || ARCH_OMAP || ARCH_IMX || ARCH_PXA)
+
+ menu "CPU Frequency scaling"
+
+@@ -894,6 +894,15 @@ config CPU_FREQ_IMX
+
+ If in doubt, say N.
+
++config CPU_FREQ_PXA
++ tristate "CPUfreq driver for PXA2xx CPUs"
++ depends on CPU_FREQ && ARCH_PXA
++ default y
++ help
++ Thes enables the CPUfreq driver for PXA2xx CPUs.
++
++ If in doubt, say Y.
++
+ endmenu
+
+ endif
+@@ -1029,6 +1038,8 @@ source "drivers/spi/Kconfig"
+
+ source "drivers/w1/Kconfig"
+
++source "drivers/power/Kconfig"
++
+ source "drivers/hwmon/Kconfig"
+
+ #source "drivers/l3/Kconfig"
+diff --git a/arch/arm/configs/em_x270_defconfig b/arch/arm/configs/em_x270_defconfig
+index 6bea090..3246136 100644
+--- a/arch/arm/configs/em_x270_defconfig
++++ b/arch/arm/configs/em_x270_defconfig
+@@ -1,13 +1,13 @@
+ #
+ # Automatically generated make config: don't edit
+-# Linux kernel version: 2.6.22
+-# Mon Jul 9 15:18:20 2007
++# Linux kernel version: 2.6.23-rc9
++# Tue Oct 9 11:19:21 2007
+ #
+ CONFIG_ARM=y
+ CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+ CONFIG_GENERIC_GPIO=y
+ CONFIG_GENERIC_TIME=y
+-# CONFIG_GENERIC_CLOCKEVENTS is not set
++CONFIG_GENERIC_CLOCKEVENTS=y
+ CONFIG_MMU=y
+ # CONFIG_NO_IOPORT is not set
+ CONFIG_GENERIC_HARDIRQS=y
+@@ -27,25 +27,20 @@ CONFIG_VECTORS_BASE=0xffff0000
+ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+ #
+-# Code maturity level options
++# General setup
+ #
+ CONFIG_EXPERIMENTAL=y
+ CONFIG_BROKEN_ON_SMP=y
+ CONFIG_INIT_ENV_ARG_LIMIT=32
+-
+-#
+-# General setup
+-#
+ CONFIG_LOCALVERSION="-em-x270"
+ # CONFIG_LOCALVERSION_AUTO is not set
+ CONFIG_SWAP=y
+ CONFIG_SYSVIPC=y
+-# CONFIG_IPC_NS is not set
+ CONFIG_SYSVIPC_SYSCTL=y
+ # CONFIG_POSIX_MQUEUE is not set
+ # CONFIG_BSD_PROCESS_ACCT is not set
+ # CONFIG_TASKSTATS is not set
+-# CONFIG_UTS_NS is not set
++# CONFIG_USER_NS is not set
+ # CONFIG_AUDIT is not set
+ CONFIG_IKCONFIG=y
+ CONFIG_IKCONFIG_PROC=y
+@@ -71,34 +66,27 @@ CONFIG_FUTEX=y
+ CONFIG_ANON_INODES=y
+ CONFIG_EPOLL=y
+ CONFIG_SIGNALFD=y
+-CONFIG_TIMERFD=y
+ CONFIG_EVENTFD=y
+ CONFIG_SHMEM=y
+ CONFIG_VM_EVENT_COUNTERS=y
+-CONFIG_SLAB=y
+-# CONFIG_SLUB is not set
++CONFIG_SLUB_DEBUG=y
++# CONFIG_SLAB is not set
++CONFIG_SLUB=y
+ # CONFIG_SLOB is not set
+ CONFIG_RT_MUTEXES=y
+ # CONFIG_TINY_SHMEM is not set
+ CONFIG_BASE_SMALL=0
+-
+-#
+-# Loadable module support
+-#
+ CONFIG_MODULES=y
+ CONFIG_MODULE_UNLOAD=y
+ CONFIG_MODULE_FORCE_UNLOAD=y
+ # CONFIG_MODVERSIONS is not set
+ # CONFIG_MODULE_SRCVERSION_ALL is not set
+ CONFIG_KMOD=y
+-
+-#
+-# Block layer
+-#
+ 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
+@@ -139,6 +127,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
+ # 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=y
+ # CONFIG_ARCH_RPC is not set
+@@ -160,6 +149,15 @@ CONFIG_ARCH_PXA=y
+ # CONFIG_MACH_TRIZEPS4 is not set
+ CONFIG_MACH_EM_X270=y
+ CONFIG_PXA27x=y
++CONFIG_PXA_PWR_I2C=y
++
++#
++# Boot options
++#
++
++#
++# Power management
++#
+
+ #
+ # Processor Type
+@@ -185,6 +183,7 @@ CONFIG_XSCALE_PMU=y
+ #
+ # Bus support
+ #
++# CONFIG_PCI_SYSCALL is not set
+ # CONFIG_ARCH_SUPPORTS_MSI is not set
+
+ #
+@@ -196,8 +195,9 @@ CONFIG_XSCALE_PMU=y
+ # Kernel Features
+ #
+ # CONFIG_TICK_ONESHOT is not set
++# CONFIG_NO_HZ is not set
++# CONFIG_HIGH_RES_TIMERS is not set
+ # CONFIG_PREEMPT is not set
+-# CONFIG_NO_IDLE_HZ is not set
+ CONFIG_HZ=100
+ CONFIG_AEABI=y
+ CONFIG_OABI_COMPAT=y
+@@ -212,6 +212,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
+ 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
+
+ #
+@@ -219,11 +221,28 @@ CONFIG_ALIGNMENT_TRAP=y
+ #
+ CONFIG_ZBOOT_ROM_TEXT=0x0
+ CONFIG_ZBOOT_ROM_BSS=0x0
+-CONFIG_CMDLINE=""
++CONFIG_CMDLINE="root=/dev/mtdblock2 rootfstype=jffs2 console=ttyS0,115200"
+ # CONFIG_XIP_KERNEL is not set
+ # CONFIG_KEXEC is not set
+
+ #
++# CPU Frequency scaling
++#
++CONFIG_CPU_FREQ=y
++CONFIG_CPU_FREQ_TABLE=y
++# CONFIG_CPU_FREQ_DEBUG is not set
++CONFIG_CPU_FREQ_STAT=y
++# CONFIG_CPU_FREQ_STAT_DETAILS is not set
++CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
++# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
++CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
++CONFIG_CPU_FREQ_GOV_POWERSAVE=m
++CONFIG_CPU_FREQ_GOV_USERSPACE=m
++CONFIG_CPU_FREQ_GOV_ONDEMAND=m
++CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
++CONFIG_CPU_FREQ_PXA=y
++
++#
+ # Floating point emulation
+ #
+
+@@ -238,8 +257,8 @@ CONFIG_FPE_NWFPE=y
+ # Userspace binary formats
+ #
+ CONFIG_BINFMT_ELF=y
+-# CONFIG_BINFMT_AOUT is not set
+-# CONFIG_BINFMT_MISC is not set
++CONFIG_BINFMT_AOUT=m
++CONFIG_BINFMT_MISC=m
+
+ #
+ # Power management options
+@@ -247,8 +266,10 @@ CONFIG_BINFMT_ELF=y
+ CONFIG_PM=y
+ CONFIG_PM_LEGACY=y
+ # CONFIG_PM_DEBUG is not set
+-# CONFIG_PM_SYSFS_DEPRECATED is not set
+-CONFIG_APM_EMULATION=m
++CONFIG_PM_SLEEP=y
++CONFIG_SUSPEND_UP_POSSIBLE=y
++CONFIG_SUSPEND=y
++CONFIG_APM_EMULATION=y
+
+ #
+ # Networking
+@@ -316,6 +337,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
+ # QoS and/or fair queueing
+ #
+ # CONFIG_NET_SCHED is not set
++CONFIG_NET_SCH_FIFO=y
+
+ #
+ # Network testing
+@@ -350,9 +372,12 @@ CONFIG_BT_HCIBFUSB=m
+ #
+ # Wireless
+ #
+-# CONFIG_CFG80211 is not set
+-# CONFIG_WIRELESS_EXT is not set
+-# CONFIG_MAC80211 is not set
++CONFIG_CFG80211=m
++CONFIG_WIRELESS_EXT=y
++CONFIG_MAC80211=m
++# CONFIG_MAC80211_LEDS is not set
++CONFIG_MAC80211_DEBUGFS=y
++# CONFIG_MAC80211_DEBUG is not set
+ CONFIG_IEEE80211=m
+ # CONFIG_IEEE80211_DEBUG is not set
+ CONFIG_IEEE80211_CRYPT_WEP=m
+@@ -360,6 +385,7 @@ CONFIG_IEEE80211_CRYPT_CCMP=m
+ # CONFIG_IEEE80211_CRYPT_TKIP is not set
+ # CONFIG_IEEE80211_SOFTMAC is not set
+ # CONFIG_RFKILL is not set
++# CONFIG_NET_9P is not set
+
+ #
+ # Device Drivers
+@@ -374,10 +400,6 @@ CONFIG_FW_LOADER=y
+ # CONFIG_DEBUG_DRIVER is not set
+ # CONFIG_DEBUG_DEVRES is not set
+ # CONFIG_SYS_HYPERVISOR is not set
+-
+-#
+-# Connector - unified userspace <-> kernelspace linker
+-#
+ # CONFIG_CONNECTOR is not set
+ CONFIG_MTD=y
+ # CONFIG_MTD_DEBUG is not set
+@@ -402,11 +424,10 @@ CONFIG_MTD_BLOCK=y
+ #
+ # RAM/ROM/Flash chip drivers
+ #
+-# CONFIG_MTD_CFI is not set
+-# CONFIG_MTD_JEDECPROBE is not set
+-# CONFIG_MTD_CFI_NOSWAP is not set
+-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
++CONFIG_MTD_CFI=y
++CONFIG_MTD_JEDECPROBE=y
++CONFIG_MTD_GEN_PROBE=y
++# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+ CONFIG_MTD_MAP_BANK_WIDTH_1=y
+ CONFIG_MTD_MAP_BANK_WIDTH_2=y
+ CONFIG_MTD_MAP_BANK_WIDTH_4=y
+@@ -417,14 +438,25 @@ CONFIG_MTD_CFI_I1=y
+ CONFIG_MTD_CFI_I2=y
+ # CONFIG_MTD_CFI_I4 is not set
+ # CONFIG_MTD_CFI_I8 is not set
++CONFIG_MTD_CFI_INTELEXT=y
++CONFIG_MTD_CFI_AMDSTD=y
++CONFIG_MTD_CFI_STAA=y
++CONFIG_MTD_CFI_UTIL=y
+ # CONFIG_MTD_RAM is not set
+ # CONFIG_MTD_ROM is not set
+ # CONFIG_MTD_ABSENT is not set
++# CONFIG_MTD_XIP is not set
+
+ #
+ # Mapping drivers for chip access
+ #
+ # CONFIG_MTD_COMPLEX_MAPPINGS is not set
++CONFIG_MTD_PHYSMAP=y
++CONFIG_MTD_PHYSMAP_START=0x0
++CONFIG_MTD_PHYSMAP_LEN=0x100000
++CONFIG_MTD_PHYSMAP_BANKWIDTH=2
++# CONFIG_MTD_ARM_INTEGRATOR is not set
++# CONFIG_MTD_IMPA7 is not set
+ # CONFIG_MTD_SHARP_SL is not set
+ # CONFIG_MTD_PLATRAM is not set
+
+@@ -457,21 +489,17 @@ CONFIG_MTD_NAND_PLATFORM=y
+ #
+ # UBI - Unsorted block images
+ #
+-# CONFIG_MTD_UBI is not set
++CONFIG_MTD_UBI=m
++CONFIG_MTD_UBI_WL_THRESHOLD=4096
++CONFIG_MTD_UBI_BEB_RESERVE=1
++CONFIG_MTD_UBI_GLUEBI=y
+
+ #
+-# Parallel port support
++# UBI debugging options
+ #
++# CONFIG_MTD_UBI_DEBUG is not set
+ # CONFIG_PARPORT is not set
+-
+-#
+-# Plug and Play support
+-#
+-# CONFIG_PNPACPI is not set
+-
+-#
+-# Block devices
+-#
++CONFIG_BLK_DEV=y
+ # CONFIG_BLK_DEV_COW_COMMON is not set
+ CONFIG_BLK_DEV_LOOP=y
+ # CONFIG_BLK_DEV_CRYPTOLOOP is not set
+@@ -490,6 +518,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+ #
+ # CONFIG_RAID_ATTRS is not set
+ CONFIG_SCSI=y
++CONFIG_SCSI_DMA=y
+ # CONFIG_SCSI_TGT is not set
+ # CONFIG_SCSI_NETLINK is not set
+ # CONFIG_SCSI_PROC_FS is not set
+@@ -519,36 +548,23 @@ CONFIG_SCSI_WAIT_SCAN=m
+ # CONFIG_SCSI_SPI_ATTRS is not set
+ # CONFIG_SCSI_FC_ATTRS is not set
+ # CONFIG_SCSI_ISCSI_ATTRS is not set
+-# CONFIG_SCSI_SAS_ATTRS is not set
+ # CONFIG_SCSI_SAS_LIBSAS is not set
+-
+-#
+-# SCSI low-level drivers
+-#
++CONFIG_SCSI_LOWLEVEL=y
+ # CONFIG_ISCSI_TCP is not set
+ # CONFIG_SCSI_DEBUG is not set
+ # CONFIG_ATA is not set
+-
+-#
+-# Multi-device support (RAID and LVM)
+-#
+ # CONFIG_MD is not set
+-
+-#
+-# Network device support
+-#
+ 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 is not set
+ # CONFIG_PHYLIB is not set
+-
+-#
+-# Ethernet (10 or 100Mbit)
+-#
+ CONFIG_NET_ETHERNET=y
+ CONFIG_MII=y
++# CONFIG_AX88796 is not set
+ # CONFIG_SMC91X is not set
+ CONFIG_DM9000=y
+ # CONFIG_SMC911X is not set
+@@ -571,16 +587,22 @@ CONFIG_DM9000=y
+ # CONFIG_USB_USBNET_MII is not set
+ # CONFIG_USB_USBNET is not set
+ # CONFIG_WAN is not set
+-# CONFIG_PPP is not set
++CONFIG_PPP=m
++# CONFIG_PPP_MULTILINK is not set
++# CONFIG_PPP_FILTER is not set
++CONFIG_PPP_ASYNC=m
++CONFIG_PPP_SYNC_TTY=m
++CONFIG_PPP_DEFLATE=m
++CONFIG_PPP_BSDCOMP=m
++CONFIG_PPP_MPPE=m
++# CONFIG_PPPOE is not set
++CONFIG_PPPOL2TP=m
+ # CONFIG_SLIP is not set
++CONFIG_SLHC=m
+ # CONFIG_SHAPER is not set
+ # CONFIG_NETCONSOLE is not set
+ # CONFIG_NETPOLL is not set
+ # CONFIG_NET_POLL_CONTROLLER is not set
+-
+-#
+-# ISDN subsystem
+-#
+ # CONFIG_ISDN is not set
+
+ #
+@@ -612,16 +634,21 @@ CONFIG_INPUT_KEYBOARD=y
+ # CONFIG_KEYBOARD_XTKBD is not set
+ # CONFIG_KEYBOARD_NEWTON is not set
+ # CONFIG_KEYBOARD_STOWAWAY is not set
+-CONFIG_KEYBOARD_PXA27x=m
++CONFIG_KEYBOARD_PXA27x=y
+ # CONFIG_KEYBOARD_GPIO is not set
+ # CONFIG_INPUT_MOUSE is not set
+ # CONFIG_INPUT_JOYSTICK is not set
+ # CONFIG_INPUT_TABLET is not set
+ CONFIG_INPUT_TOUCHSCREEN=y
++# CONFIG_TOUCHSCREEN_FUJITSU is not set
+ # CONFIG_TOUCHSCREEN_GUNZE is not set
+ # CONFIG_TOUCHSCREEN_ELO is not set
+ # CONFIG_TOUCHSCREEN_MTOUCH is not set
+ # CONFIG_TOUCHSCREEN_MK712 is not set
++CONFIG_TOUCHSCREEN_WM97XX=y
++# CONFIG_TOUCHSCREEN_WM9705 is not set
++CONFIG_TOUCHSCREEN_WM9712=y
++# CONFIG_TOUCHSCREEN_WM9713 is not set
+ # CONFIG_TOUCHSCREEN_PENMOUNT is not set
+ # CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+ # CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+@@ -660,58 +687,91 @@ CONFIG_SERIAL_PXA_CONSOLE=y
+ CONFIG_SERIAL_CORE=y
+ CONFIG_SERIAL_CORE_CONSOLE=y
+ CONFIG_UNIX98_PTYS=y
+-CONFIG_LEGACY_PTYS=y
+-CONFIG_LEGACY_PTY_COUNT=256
+-
+-#
+-# IPMI
+-#
++# CONFIG_LEGACY_PTYS is not set
+ # CONFIG_IPMI_HANDLER is not set
+ # CONFIG_WATCHDOG is not set
+ CONFIG_HW_RANDOM=m
+ # CONFIG_NVRAM is not set
+ # CONFIG_R3964 is not set
+ # CONFIG_RAW_DRIVER is not set
++# CONFIG_TCG_TPM is not set
++CONFIG_I2C=y
++CONFIG_I2C_BOARDINFO=y
++# CONFIG_I2C_CHARDEV is not set
+
+ #
+-# TPM devices
++# I2C Algorithms
+ #
+-# CONFIG_TCG_TPM is not set
+-# CONFIG_I2C is not set
++# CONFIG_I2C_ALGOBIT is not set
++# CONFIG_I2C_ALGOPCF is not set
++# CONFIG_I2C_ALGOPCA is not set
+
+ #
+-# SPI support
++# I2C Hardware Bus support
+ #
+-# CONFIG_SPI is not set
+-# CONFIG_SPI_MASTER is not set
++# CONFIG_I2C_GPIO is not set
++CONFIG_I2C_PXA=y
++# CONFIG_I2C_PXA_SLAVE is not set
++# CONFIG_I2C_OCORES is not set
++# CONFIG_I2C_PARPORT_LIGHT is not set
++# CONFIG_I2C_SIMTEC is not set
++# CONFIG_I2C_TAOS_EVM is not set
++# CONFIG_I2C_STUB is not set
++# CONFIG_I2C_TINY_USB is not set
+
+ #
+-# Dallas's 1-wire bus
++# Miscellaneous I2C Chip support
+ #
+-# CONFIG_W1 is not set
+-# CONFIG_HWMON is not set
++# CONFIG_SENSORS_DS1337 is not set
++# CONFIG_SENSORS_DS1374 is not set
++# CONFIG_DS1682 is not set
++# CONFIG_SENSORS_EEPROM is not set
++# CONFIG_SENSORS_PCF8574 is not set
++# CONFIG_SENSORS_PCA9539 is not set
++# CONFIG_SENSORS_PCF8591 is not set
++# CONFIG_SENSORS_MAX6875 is not set
++# CONFIG_SENSORS_TSL2550 is not set
++CONFIG_DA9030=y
++# 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
+
+ #
+-# Misc devices
++# SPI support
+ #
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++# CONFIG_W1 is not set
++CONFIG_POWER_SUPPLY=y
++# CONFIG_POWER_SUPPLY_DEBUG is not set
++# CONFIG_PDA_POWER is not set
++CONFIG_APM_POWER=y
++# CONFIG_BATTERY_DS2760 is not set
++# CONFIG_BATTERY_EM_X270 is not set
++# CONFIG_HWMON is not set
++CONFIG_MISC_DEVICES=y
++# CONFIG_EEPROM_93CX6 is not set
+
+ #
+ # Multifunction device drivers
+ #
+ # CONFIG_MFD_SM501 is not set
+-
+-#
+-# LED devices
+-#
+-# CONFIG_NEW_LEDS is not set
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=m
+
+ #
+ # LED drivers
+ #
++CONFIG_LEDS_GPIO=m
++CONFIG_LEDS_EM_X270=m
+
+ #
+ # LED Triggers
+ #
++CONFIG_LEDS_TRIGGERS=y
++CONFIG_LEDS_TRIGGER_TIMER=m
++CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+
+ #
+ # Multimedia devices
+@@ -723,13 +783,17 @@ CONFIG_HW_RANDOM=m
+ #
+ # Graphics support
+ #
+-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++CONFIG_BACKLIGHT_LCD_SUPPORT=y
++CONFIG_LCD_CLASS_DEVICE=y
++CONFIG_BACKLIGHT_CLASS_DEVICE=y
++CONFIG_BACKLIGHT_CORGI=y
+
+ #
+ # Display device support
+ #
+ # CONFIG_DISPLAY_SUPPORT is not set
+ # CONFIG_VGASTATE is not set
++CONFIG_VIDEO_OUTPUT_CONTROL=m
+ CONFIG_FB=y
+ # CONFIG_FIRMWARE_EDID is not set
+ # CONFIG_FB_DDC is not set
+@@ -752,7 +816,7 @@ CONFIG_FB_DEFERRED_IO=y
+ #
+ # CONFIG_FB_S1D13XXX is not set
+ CONFIG_FB_PXA=y
+-# CONFIG_FB_PXA_PARAMETERS is not set
++CONFIG_FB_PXA_PARAMETERS=y
+ # CONFIG_FB_MBX is not set
+ # CONFIG_FB_VIRTUAL is not set
+
+@@ -762,6 +826,7 @@ CONFIG_FB_PXA=y
+ # CONFIG_VGA_CONSOLE is not set
+ CONFIG_DUMMY_CONSOLE=y
+ CONFIG_FRAMEBUFFER_CONSOLE=y
++# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+ # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+ # CONFIG_FONTS is not set
+ CONFIG_FONT_8x8=y
+@@ -774,18 +839,18 @@ CONFIG_LOGO_LINUX_CLUT224=y
+ #
+ # Sound
+ #
+-CONFIG_SOUND=m
++CONFIG_SOUND=y
+
+ #
+ # Advanced Linux Sound Architecture
+ #
+-CONFIG_SND=m
+-CONFIG_SND_TIMER=m
+-CONFIG_SND_PCM=m
++CONFIG_SND=y
++CONFIG_SND_TIMER=y
++CONFIG_SND_PCM=y
+ # CONFIG_SND_SEQUENCER is not set
+ CONFIG_SND_OSSEMUL=y
+-CONFIG_SND_MIXER_OSS=m
+-CONFIG_SND_PCM_OSS=m
++CONFIG_SND_MIXER_OSS=y
++CONFIG_SND_PCM_OSS=y
+ CONFIG_SND_PCM_OSS_PLUGINS=y
+ # CONFIG_SND_DYNAMIC_MINORS is not set
+ CONFIG_SND_SUPPORT_OLD_API=y
+@@ -817,17 +882,23 @@ CONFIG_SND_PXA2XX_AC97=m
+ #
+ # System on Chip audio support
+ #
+-# CONFIG_SND_SOC is not set
++CONFIG_SND_SOC_AC97_BUS=y
++CONFIG_SND_SOC=y
++CONFIG_SND_PXA2XX_SOC=y
++CONFIG_SND_PXA2XX_SOC_AC97=y
++CONFIG_SND_PXA2XX_SOC_EM_X270=y
+
+ #
+-# Open Sound System
++# SoC Audio support for SuperH
+ #
+-# CONFIG_SOUND_PRIME is not set
+-CONFIG_AC97_BUS=m
++CONFIG_SND_SOC_WM9712=y
+
+ #
+-# HID Devices
++# Open Sound System
+ #
++# CONFIG_SOUND_PRIME is not set
++CONFIG_AC97_BUS=y
++CONFIG_HID_SUPPORT=y
+ CONFIG_HID=y
+ # CONFIG_HID_DEBUG is not set
+
+@@ -838,10 +909,7 @@ CONFIG_USB_HID=y
+ # CONFIG_USB_HIDINPUT_POWERBOOK is not set
+ # CONFIG_HID_FF is not set
+ # CONFIG_USB_HIDDEV is not set
+-
+-#
+-# USB support
+-#
++CONFIG_USB_SUPPORT=y
+ CONFIG_USB_ARCH_HAS_HCD=y
+ CONFIG_USB_ARCH_HAS_OHCI=y
+ # CONFIG_USB_ARCH_HAS_EHCI is not set
+@@ -855,6 +923,7 @@ CONFIG_USB_DEVICEFS=y
+ # CONFIG_USB_DEVICE_CLASS is not set
+ # CONFIG_USB_DYNAMIC_MINORS is not set
+ # CONFIG_USB_SUSPEND is not set
++# CONFIG_USB_PERSIST is not set
+ # CONFIG_USB_OTG is not set
+
+ #
+@@ -866,12 +935,13 @@ CONFIG_USB_OHCI_HCD=y
+ # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
+ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
+ # CONFIG_USB_SL811_HCD is not set
++# CONFIG_USB_R8A66597_HCD is not set
+
+ #
+ # USB Device Class drivers
+ #
+-# CONFIG_USB_ACM is not set
+-# CONFIG_USB_PRINTER is not set
++CONFIG_USB_ACM=m
++CONFIG_USB_PRINTER=m
+
+ #
+ # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+@@ -896,8 +966,8 @@ CONFIG_USB_STORAGE=y
+ #
+ # USB Imaging devices
+ #
+-# CONFIG_USB_MDC800 is not set
+-# CONFIG_USB_MICROTEK is not set
++CONFIG_USB_MDC800=m
++CONFIG_USB_MICROTEK=m
+ # CONFIG_USB_MON is not set
+
+ #
+@@ -940,25 +1010,25 @@ CONFIG_USB_STORAGE=y
+ # USB Gadget Support
+ #
+ # CONFIG_USB_GADGET is not set
+-CONFIG_MMC=m
++CONFIG_MMC=y
+ # CONFIG_MMC_DEBUG is not set
+-# CONFIG_MMC_UNSAFE_RESUME is not set
++CONFIG_MMC_UNSAFE_RESUME=y
+
+ #
+ # MMC/SD Card Drivers
+ #
+-CONFIG_MMC_BLOCK=m
++CONFIG_MMC_BLOCK=y
++CONFIG_MMC_BLOCK_BOUNCE=y
+
+ #
+ # MMC/SD Host Controller Drivers
+ #
+-CONFIG_MMC_PXA=m
+-
+-#
+-# Real Time Clock
+-#
++CONFIG_MMC_PXA=y
+ CONFIG_RTC_LIB=y
+-CONFIG_RTC_CLASS=m
++CONFIG_RTC_CLASS=y
++CONFIG_RTC_HCTOSYS=y
++CONFIG_RTC_HCTOSYS_DEVICE="rtc1"
++# CONFIG_RTC_DEBUG is not set
+
+ #
+ # RTC interfaces
+@@ -972,6 +1042,15 @@ CONFIG_RTC_INTF_DEV=y
+ #
+ # I2C RTC drivers
+ #
++# CONFIG_RTC_DRV_DS1307 is not set
++# CONFIG_RTC_DRV_DS1672 is not set
++# CONFIG_RTC_DRV_MAX6900 is not set
++# CONFIG_RTC_DRV_RS5C372 is not set
++# CONFIG_RTC_DRV_ISL1208 is not set
++# CONFIG_RTC_DRV_X1205 is not set
++# CONFIG_RTC_DRV_PCF8563 is not set
++# CONFIG_RTC_DRV_PCF8583 is not set
++# CONFIG_RTC_DRV_M41T80 is not set
+
+ #
+ # SPI RTC drivers
+@@ -982,14 +1061,29 @@ CONFIG_RTC_INTF_DEV=y
+ #
+ # 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_V3020=m
++# CONFIG_RTC_DRV_M48T59 is not set
++CONFIG_RTC_DRV_V3020=y
+
+ #
+ # on-CPU RTC drivers
+ #
+-CONFIG_RTC_DRV_SA1100=m
++CONFIG_RTC_DRV_SA1100=y
++
++#
++# DMA Engine support
++#
++# CONFIG_DMA_ENGINE is not set
++
++#
++# DMA Clients
++#
++
++#
++# DMA Devices
++#
+
+ #
+ # File systems
+@@ -1098,7 +1192,6 @@ CONFIG_SMB_FS=y
+ # CONFIG_NCP_FS is not set
+ # CONFIG_CODA_FS is not set
+ # CONFIG_AFS_FS is not set
+-# CONFIG_9P_FS is not set
+
+ #
+ # Partition Types
+@@ -1167,20 +1260,22 @@ CONFIG_NLS_UTF8=y
+ CONFIG_ENABLE_MUST_CHECK=y
+ CONFIG_MAGIC_SYSRQ=y
+ # CONFIG_UNUSED_SYMBOLS is not set
+-# CONFIG_DEBUG_FS is not set
++CONFIG_DEBUG_FS=y
+ # CONFIG_HEADERS_CHECK is not set
+ CONFIG_DEBUG_KERNEL=y
+ # CONFIG_DEBUG_SHIRQ is not set
+ # CONFIG_DETECT_SOFTLOCKUP is not set
++CONFIG_SCHED_DEBUG=y
+ # CONFIG_SCHEDSTATS is not set
+ # CONFIG_TIMER_STATS is not set
+-# CONFIG_DEBUG_SLAB is not set
++# CONFIG_SLUB_DEBUG_ON is not set
+ # CONFIG_DEBUG_RT_MUTEXES is not set
+ # CONFIG_RT_MUTEX_TESTER is not set
+ # CONFIG_DEBUG_SPINLOCK is not set
+ # CONFIG_DEBUG_MUTEXES is not set
+ # CONFIG_DEBUG_LOCK_ALLOC is not set
+ # CONFIG_PROVE_LOCKING is not set
++# CONFIG_LOCK_STAT is not set
+ # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
+ # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+ # CONFIG_DEBUG_KOBJECT is not set
+@@ -1202,10 +1297,6 @@ CONFIG_DEBUG_LL=y
+ #
+ # CONFIG_KEYS is not set
+ # CONFIG_SECURITY is not set
+-
+-#
+-# Cryptographic options
+-#
+ CONFIG_CRYPTO=y
+ CONFIG_CRYPTO_ALGAPI=m
+ CONFIG_CRYPTO_BLKCIPHER=m
+@@ -1215,7 +1306,7 @@ CONFIG_CRYPTO_MANAGER=m
+ # CONFIG_CRYPTO_NULL is not set
+ # CONFIG_CRYPTO_MD4 is not set
+ # CONFIG_CRYPTO_MD5 is not set
+-# CONFIG_CRYPTO_SHA1 is not set
++CONFIG_CRYPTO_SHA1=m
+ # CONFIG_CRYPTO_SHA256 is not set
+ # CONFIG_CRYPTO_SHA512 is not set
+ # CONFIG_CRYPTO_WP512 is not set
+@@ -1243,19 +1334,17 @@ CONFIG_CRYPTO_ARC4=m
+ # CONFIG_CRYPTO_CRC32C is not set
+ # CONFIG_CRYPTO_CAMELLIA is not set
+ # CONFIG_CRYPTO_TEST is not set
+-
+-#
+-# Hardware crypto devices
+-#
++CONFIG_CRYPTO_HW=y
+
+ #
+ # Library routines
+ #
+ CONFIG_BITREVERSE=y
+-# CONFIG_CRC_CCITT is not set
++CONFIG_CRC_CCITT=m
+ # CONFIG_CRC16 is not set
+ # CONFIG_CRC_ITU_T is not set
+ CONFIG_CRC32=y
++# CONFIG_CRC7 is not set
+ # CONFIG_LIBCRC32C is not set
+ CONFIG_ZLIB_INFLATE=y
+ CONFIG_ZLIB_DEFLATE=y
+diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
+index 5ebec6d..2957cb9 100644
+--- a/arch/arm/mach-pxa/Kconfig
++++ b/arch/arm/mach-pxa/Kconfig
+@@ -148,4 +148,12 @@ config PXA_SSP
+ tristate
+ help
+ Enable support for PXA2xx SSP ports
++
++config PXA_PWR_I2C
++ bool "Simple Power I2C interface"
++ depends on PXA27x
++ help
++ Enable support for PXA27x Power I2C interface. This driver
++ enables very simple blocking access to Power I2C, which
++ might be useful for early access to Power Management ICs.
+ endif
+diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
+index 7d6ab5c..2d7a431 100644
+--- a/arch/arm/mach-pxa/Makefile
++++ b/arch/arm/mach-pxa/Makefile
+@@ -18,7 +18,7 @@ obj-$(CONFIG_PXA_SHARP_Cxx00) += spitz.o corgi_ssp.o corgi_lcd.o sharpsl_pm.o sp
+ obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o
+ obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o
+ obj-$(CONFIG_MACH_TOSA) += tosa.o
+-obj-$(CONFIG_MACH_EM_X270) += em-x270.o
++obj-$(CONFIG_MACH_EM_X270) += em-x270.o em-x270-pm.o em-x270-lcd.o em-x270-devices.o
+
+ # Support for blinky lights
+ led-y := leds.o
+@@ -29,9 +29,16 @@ led-$(CONFIG_MACH_TRIZEPS4) += leds-trizeps4.o
+
+ obj-$(CONFIG_LEDS) += $(led-y)
+
++# CPU Frequency scaling
++obj-$(CONFIG_CPU_FREQ_PXA) += cpu-pxa.o
++
+ # Misc features
+ obj-$(CONFIG_PM) += pm.o sleep.o
+ obj-$(CONFIG_PXA_SSP) += ssp.o
++obj-$(CONFIG_PXA_PWR_I2C) += pwr-i2c.o
++
++#obj-m += da9030_asm.o
++#da9030_asm-y += da9030.o da9030_c.o
+
+ ifeq ($(CONFIG_PXA27x),y)
+ obj-$(CONFIG_PM) += standby.o
+diff --git a/arch/arm/mach-pxa/cpu-pxa.c b/arch/arm/mach-pxa/cpu-pxa.c
+new file mode 100644
+index 0000000..7fa9703
+--- /dev/null
++++ b/arch/arm/mach-pxa/cpu-pxa.c
+@@ -0,0 +1,442 @@
++/*
++ * linux/arch/arm/mach-pxa/cpu-pxa.c
++ *
++ * Copyright (C) 2002,2003 Intrinsyc Software
++ *
++ * 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
++ *
++ * History:
++ * 31-Jul-2002 : Initial version [FB]
++ * 29-Jan-2003 : added PXA255 support [FB]
++ * 20-Apr-2003 : ported to v2.5 (Dustin McIntire, Sensoria Corp.)
++ * 11-Jan-2006 : v2.6, support for PXA27x processor up to 624MHz (Bill Reese, Hewlett Packard)
++ *
++ * Note:
++ * This driver may change the memory bus clock rate, but will not do any
++ * platform specific access timing changes... for example if you have flash
++ * memory connected to CS0, you will need to register a platform specific
++ * notifier which will adjust the memory access strobes to maintain a
++ * minimum strobe width.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/sched.h>
++#include <linux/init.h>
++#include <linux/cpufreq.h>
++
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++
++/*
++ * This comes from generic.h in this directory.
++ */
++extern unsigned int get_clk_frequency_khz(int info);
++
++#define DEBUG 0
++
++#ifdef DEBUG
++ static unsigned int freq_debug = DEBUG;
++ module_param(freq_debug, int, 0644);
++ MODULE_PARM_DESC(freq_debug, "Set the debug messages to on=1/off=0");
++#else
++ #define freq_debug 0
++#endif
++
++typedef struct
++{
++ unsigned int khz; /* CPU frequency */
++ unsigned int membus; /* memory bus frequency */
++ unsigned int cccr; /* new CCLKCFG setting */
++ unsigned int div2; /* alter memory controller settings to divide by 2 */
++ unsigned int cclkcfg; /* new CCLKCFG setting */
++} pxa_freqs_t;
++
++/* Define the refresh period in mSec for the SDRAM and the number of rows */
++#define SDRAM_TREF 64 /* standard 64ms SDRAM */
++#if defined(CONFIG_MACH_H4700) || defined(CONFIG_ARCH_H2200) || defined(CONFIG_MACH_MAGICIAN)
++#define SDRAM_ROWS 8192 /* hx4700 uses 2 64Mb DRAMs, 8912 rows */
++#else
++#define SDRAM_ROWS 4096 /* 64MB=8192 32MB=4096 */
++#endif
++#define MDREFR_DRI(x) (((x*SDRAM_TREF/SDRAM_ROWS - 31)/32))
++
++#define CCLKCFG_TURBO 0x1
++#define CCLKCFG_FCS 0x2
++#define CCLKCFG_HALFTURBO 0x4
++#define CCLKCFG_FASTBUS 0x8
++#ifdef CONFIG_ARCH_H5400
++/* H5400's SAMCOP chip does not like when K2DB2 touched */
++#define MDREFR_DB2_MASK (MDREFR_K1DB2)
++#else
++#define MDREFR_DB2_MASK (MDREFR_K2DB2 | MDREFR_K1DB2)
++#endif
++#define MDREFR_DRI_MASK 0xFFF
++#define PXA25x_CCLKCFG CCLKCFG_TURBO | CCLKCFG_FCS
++
++/*
++ * For the PXA27x:
++ * Control variables are A, L, 2N for CCCR; B, HT, T for CLKCFG.
++ *
++ * A = 0 => memory controller clock from table 3-7,
++ * A = 1 => memory controller clock = system bus clock
++ * Run mode frequency = 13 MHz * L
++ * Turbo mode frequency = 13 MHz * L * N
++ * System bus frequency = 13 MHz * L / (B + 1)
++ * System initialized by bootldr to:
++ *
++ * In CCCR:
++ * A = 1
++ * L = 16 oscillator to run mode ratio
++ * 2N = 6 2 * (turbo mode to run mode ratio)
++ *
++ * In CCLKCFG:
++ * B = 1 Fast bus mode
++ * HT = 0 Half-Turbo mode
++ * T = 1 Turbo mode
++ *
++ * For now, just support some of the combinations in table 3-7 of
++ * PXA27x Processor Family Developer's Manual to simplify frequency
++ * change sequences.
++ *
++ * Specify 2N in the PXA27x_CCCR macro, not N!
++ */
++#define PXA27x_CCCR(A, L, N2) (A << 25 | N2 << 7 | L)
++#define PXA27x_CCLKCFG(B, HT, T) (B << 3 | HT << 2 | CCLKCFG_FCS | T)
++
++#define PXA25x_CCCR(L, M, N) (L << 0 | M << 5 | N << 7)
++
++/*
++ * Valid frequency assignments
++ */
++static pxa_freqs_t pxa2xx_freqs[] =
++{
++ /* CPU MEMBUS CCCR DIV2 */
++#if defined(CONFIG_PXA25x)
++#if defined(CONFIG_PXA25x_ALTERNATE_FREQS)
++ { 99500, 99500, PXA25x_CCCR(1, 1, 2), 1, PXA25x_CCLKCFG}, /* run=99, turbo= 99, PXbus=50, SDRAM=50 */
++ {199100, 99500, PXA25x_CCCR(1, 1, 4), 0, PXA25x_CCLKCFG}, /* run=99, turbo=199, PXbus=50, SDRAM=99 */
++ {298500, 99500, PXA25x_CCCR(1, 1, 6), 0, PXA25x_CCLKCFG}, /* run=99, turbo=287, PXbus=50, SDRAM=99 */
++ {298600, 99500, PXA25x_CCCR(1, 2, 3), 0, PXA25x_CCLKCFG}, /* run=199, turbo=287, PXbus=99, SDRAM=99 */
++ {398100, 99500, PXA25x_CCCR(1, 2, 4), 0, PXA25x_CCLKCFG} /* run=199, turbo=398, PXbus=99, SDRAM=99 */
++#else
++ { 99500, 99500, PXA25x_CCCR(1, 1, 2), 1, PXA25x_CCLKCFG}, /* run= 99, turbo= 99, PXbus=50, SDRAM=50 */
++ {132700, 132700, PXA25x_CCCR(3, 1, 2), 1, PXA25x_CCLKCFG}, /* run=133, turbo=133, PXbus=66, SDRAM=66 */
++ {199100, 99500, PXA25x_CCCR(1, 2, 2), 0, PXA25x_CCLKCFG}, /* run=199, turbo=199, PXbus=99, SDRAM=99 */
++ {265400, 132700, PXA25x_CCCR(3, 2, 2), 1, PXA25x_CCLKCFG}, /* run=265, turbo=265, PXbus=133, SDRAM=66 */
++ {331800, 165900, PXA25x_CCCR(5, 2, 2), 1, PXA25x_CCLKCFG}, /* run=331, turbo=331, PXbus=166, SDRAM=83 */
++ {398100, 99500, PXA25x_CCCR(1, 3, 2), 0, PXA25x_CCLKCFG} /* run=398, turbo=398, PXbus=196, SDRAM=99 */
++#endif
++#elif defined(CONFIG_PXA27x)
++ {104000, 104000, PXA27x_CCCR(1, 8, 2), 0, PXA27x_CCLKCFG(1, 0, 1)},
++ {156000, 104000, PXA27x_CCCR(1, 8, 6), 0, PXA27x_CCLKCFG(1, 1, 1)},
++ {208000, 208000, PXA27x_CCCR(0, 16, 2), 1, PXA27x_CCLKCFG(0, 0, 1)},
++ {312000, 208000, PXA27x_CCCR(1, 16, 3), 1, PXA27x_CCLKCFG(1, 0, 1)},
++ {416000, 208000, PXA27x_CCCR(1, 16, 4), 1, PXA27x_CCLKCFG(1, 0, 1)},
++ {520000, 208000, PXA27x_CCCR(1, 16, 5), 1, PXA27x_CCLKCFG(1, 0, 1)},
++/* {624000, 208000, PXA27x_CCCR(1, 16, 6), 1, PXA27x_CCLKCFG(1, 0, 1)} */
++#endif
++};
++#define NUM_FREQS (sizeof(pxa2xx_freqs)/sizeof(pxa_freqs_t))
++
++static struct cpufreq_frequency_table pxa2xx_freq_table[NUM_FREQS+1];
++
++/* Return the memory clock rate for a given cpu frequency. */
++int pxa_cpufreq_memclk(int cpu_khz)
++{
++ int i;
++ int freq_mem = 0;
++
++ for (i = 0; i < NUM_FREQS; i++) {
++ if (pxa2xx_freqs[i].khz == cpu_khz) {
++ freq_mem = pxa2xx_freqs[i].membus;
++ break;
++ }
++ }
++
++ return freq_mem;
++}
++EXPORT_SYMBOL(pxa_cpufreq_memclk);
++
++
++/* find a valid frequency point */
++static int pxa_verify_policy(struct cpufreq_policy *policy)
++{
++ int ret;
++
++ ret=cpufreq_frequency_table_verify(policy, pxa2xx_freq_table);
++
++ if(freq_debug) {
++ printk("Verified CPU policy: %dKhz min to %dKhz max\n",
++ policy->min, policy->max);
++ }
++
++ return ret;
++}
++
++static int pxa_set_target(struct cpufreq_policy *policy,
++ unsigned int target_freq,
++ unsigned int relation)
++{
++ int idx;
++ cpumask_t cpus_allowed, allowedcpuset;
++ int cpu = policy->cpu;
++ struct cpufreq_freqs freqs;
++ unsigned long flags;
++ unsigned int unused;
++ unsigned int preset_mdrefr, postset_mdrefr, cclkcfg;
++
++ if(freq_debug) {
++ printk ("CPU PXA: target freq %d\n", target_freq);
++ printk ("CPU PXA: relation %d\n", relation);
++ }
++
++ /*
++ * Save this threads cpus_allowed mask.
++ */
++ cpus_allowed = current->cpus_allowed;
++
++ /*
++ * Bind to the specified CPU. When this call returns,
++ * we should be running on the right CPU.
++ */
++ cpus_clear (allowedcpuset);
++ cpu_set (cpu, allowedcpuset);
++ set_cpus_allowed(current, allowedcpuset);
++ BUG_ON(cpu != smp_processor_id());
++
++ /* Lookup the next frequency */
++ if (cpufreq_frequency_table_target(policy, pxa2xx_freq_table,
++ target_freq, relation, &idx)) {
++ return -EINVAL;
++ }
++
++ freqs.old = policy->cur;
++ freqs.new = pxa2xx_freqs[idx].khz;
++ freqs.cpu = policy->cpu;
++ if(freq_debug) {
++ printk(KERN_INFO "Changing CPU frequency to %d Mhz, (SDRAM %d Mhz)\n",
++ freqs.new/1000, (pxa2xx_freqs[idx].div2) ?
++ (pxa2xx_freqs[idx].membus/2000) :
++ (pxa2xx_freqs[idx].membus/1000));
++ }
++
++ /*
++ * Tell everyone what we're about to do...
++ * you should add a notify client with any platform specific
++ * Vcc changing capability
++ */
++ cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
++
++ /* Calculate the next MDREFR. If we're slowing down the SDRAM clock
++ * we need to preset the smaller DRI before the change. If we're speeding
++ * up we need to set the larger DRI value after the change.
++ */
++ preset_mdrefr = postset_mdrefr = MDREFR;
++ if((MDREFR & MDREFR_DRI_MASK) > MDREFR_DRI(pxa2xx_freqs[idx].membus)) {
++ preset_mdrefr = (preset_mdrefr & ~MDREFR_DRI_MASK) |
++ MDREFR_DRI(pxa2xx_freqs[idx].membus);
++ }
++ postset_mdrefr = (postset_mdrefr & ~MDREFR_DRI_MASK) |
++ MDREFR_DRI(pxa2xx_freqs[idx].membus);
++
++ /* If we're dividing the memory clock by two for the SDRAM clock, this
++ * must be set prior to the change. Clearing the divide must be done
++ * after the change.
++ */
++ if(pxa2xx_freqs[idx].div2) {
++ /*
++ * Potentially speeding up memory clock, so slow down the memory
++ * before speeding up the clock.
++ */
++ preset_mdrefr |= MDREFR_DB2_MASK | MDREFR_K0DB4;
++ preset_mdrefr &= ~MDREFR_K0DB2;
++
++ postset_mdrefr |= MDREFR_DB2_MASK | MDREFR_K0DB4;
++ postset_mdrefr &= ~MDREFR_K0DB2;
++ } else {
++ /*
++ * Potentially slowing down memory clock. Wait until after the change
++ * to speed up the memory.
++ */
++ postset_mdrefr &= ~MDREFR_DB2_MASK;
++ postset_mdrefr &= ~MDREFR_K0DB4;
++ postset_mdrefr |= MDREFR_K0DB2;
++ }
++
++ cclkcfg = pxa2xx_freqs[idx].cclkcfg;
++
++ if (freq_debug) {
++ printk (KERN_INFO "CPU PXA writing 0x%08x to CCCR\n",
++ pxa2xx_freqs[idx].cccr);
++ printk (KERN_INFO "CPU PXA writing 0x%08x to CCLKCFG\n",
++ pxa2xx_freqs[idx].cclkcfg);
++ printk (KERN_INFO "CPU PXA writing 0x%08x to MDREFR before change\n",
++ preset_mdrefr);
++ printk (KERN_INFO "CPU PXA writing 0x%08x to MDREFR after change\n",
++ postset_mdrefr);
++ }
++
++ local_irq_save(flags);
++
++ /* Set new the CCCR */
++ CCCR = pxa2xx_freqs[idx].cccr;
++
++ /*
++ * Should really set both of PMCR[xIDAE] while changing the core frequency
++ */
++
++ /*
++ * TODO: On the PXA27x: If we're setting half-turbo mode and changing the
++ * core frequency at the same time we must split it up into two operations.
++ * The current values in the pxa2xx_freqs table don't do this, so the code
++ * is unimplemented.
++ */
++
++ __asm__ __volatile__(" \
++ ldr r4, [%1] ; /* load MDREFR */ \
++ b 2f ; \
++ .align 5 ; \
++1: \
++ str %3, [%1] ; /* preset the MDREFR */ \
++ mcr p14, 0, %2, c6, c0, 0 ; /* set CCLKCFG[FCS] */ \
++ str %4, [%1] ; /* postset the MDREFR */ \
++ \
++ b 3f ; \
++2: b 1b ; \
++3: nop ; \
++ "
++ : "=&r" (unused)
++ : "r" (&MDREFR), "r" (cclkcfg), \
++ "r" (preset_mdrefr), "r" (postset_mdrefr)
++ : "r4", "r5");
++ local_irq_restore(flags);
++
++ if (freq_debug) {
++ printk (KERN_INFO "CPU PXA Frequency change successful\n");
++ printk (KERN_INFO "CPU PXA new CCSR 0x%08x\n", CCSR);
++ }
++
++ /*
++ * Restore the CPUs allowed mask.
++ */
++ set_cpus_allowed(current, cpus_allowed);
++
++ /*
++ * Tell everyone what we've just done...
++ * you should add a notify client with any platform specific
++ * SDRAM refresh timer adjustments
++ */
++ cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
++
++ return 0;
++}
++
++static int pxa_cpufreq_init(struct cpufreq_policy *policy)
++{
++ cpumask_t cpus_allowed, allowedcpuset;
++ unsigned int cpu = policy->cpu;
++ int i;
++ unsigned int cclkcfg;
++
++ cpus_allowed = current->cpus_allowed;
++
++ cpus_clear (allowedcpuset);
++ cpu_set (cpu, allowedcpuset);
++ set_cpus_allowed(current, allowedcpuset);
++ BUG_ON(cpu != smp_processor_id());
++
++ /* set default governor and cpuinfo */
++ policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
++ policy->cpuinfo.transition_latency = 1000; /* FIXME: 1 ms, assumed */
++ policy->cur = get_clk_frequency_khz(0); /* current freq */
++
++ /* Generate the cpufreq_frequency_table struct */
++ for(i=0;i<NUM_FREQS;i++) {
++ pxa2xx_freq_table[i].frequency = pxa2xx_freqs[i].khz;
++ pxa2xx_freq_table[i].index = i;
++ }
++ pxa2xx_freq_table[i].frequency = CPUFREQ_TABLE_END;
++
++ /*
++ * Set the policy's minimum and maximum frequencies from the tables
++ * just constructed. This sets cpuinfo.mxx_freq, min and max.
++ */
++ cpufreq_frequency_table_cpuinfo (policy, pxa2xx_freq_table);
++
++ set_cpus_allowed(current, cpus_allowed);
++ printk(KERN_INFO "PXA CPU frequency change support initialized\n");
++
++ if (freq_debug) {
++ printk (KERN_INFO "PXA CPU initial CCCR 0x%08x\n", CCCR);
++ asm
++ (
++ "mrc p14, 0, %0, c6, c0, 0 ; /* read CCLKCFG from CP14 */ "
++ : "=r" (cclkcfg) :
++ );
++ printk ("PXA CPU initial CCLKCFG 0x%08x\n", cclkcfg);
++ printk ("PXA CPU initial MDREFR 0x%08x\n", MDREFR);
++ }
++
++ return 0;
++}
++
++static unsigned int pxa_cpufreq_get(unsigned int cpu)
++{
++ cpumask_t cpumask_saved;
++ unsigned int cur_freq;
++
++ cpumask_saved = current->cpus_allowed;
++ set_cpus_allowed(current, cpumask_of_cpu(cpu));
++ BUG_ON(cpu != smp_processor_id());
++
++ cur_freq = get_clk_frequency_khz(0);
++
++ set_cpus_allowed(current, cpumask_saved);
++
++ return cur_freq;
++}
++
++static struct cpufreq_driver pxa_cpufreq_driver = {
++ .verify = pxa_verify_policy,
++ .target = pxa_set_target,
++ .init = pxa_cpufreq_init,
++ .get = pxa_cpufreq_get,
++#if defined(CONFIG_PXA25x)
++ .name = "PXA25x",
++#elif defined(CONFIG_PXA27x)
++ .name = "PXA27x",
++#endif
++};
++
++static int __init pxa_cpu_init(void)
++{
++ return cpufreq_register_driver(&pxa_cpufreq_driver);
++}
++
++static void __exit pxa_cpu_exit(void)
++{
++ cpufreq_unregister_driver(&pxa_cpufreq_driver);
++}
++
++
++MODULE_AUTHOR ("Intrinsyc Software Inc.");
++MODULE_DESCRIPTION ("CPU frequency changing driver for the PXA architecture");
++MODULE_LICENSE("GPL");
++module_init(pxa_cpu_init);
++module_exit(pxa_cpu_exit);
++
+diff --git a/arch/arm/mach-pxa/em-x270-devices.c b/arch/arm/mach-pxa/em-x270-devices.c
+new file mode 100644
+index 0000000..d142930
+--- /dev/null
++++ b/arch/arm/mach-pxa/em-x270-devices.c
+@@ -0,0 +1,331 @@
++/*
++ * Support for CompuLab EM-X270 platfrom specific device
++ * initialization, and per-device power management functions.
++ *
++ * Copyright (C) 2007 CompuLab, Ltd.
++ * Author: Mike Rapoport <mike@compulab.co.il>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/sysfs.h>
++#include <linux/ctype.h>
++#include <linux/delay.h>
++#include <linux/da9030.h>
++#include <linux/interrupt.h>
++#include <linux/irq.h>
++
++#include "../../../drivers/i2c/chips/da9030.h"
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++
++struct em_x270_dev_data {
++ int (*is_on)(struct device *dev);
++ int (*set_on)(struct device *dev, int on);
++ int (*get_opts)(struct device *dev,
++ struct device_attribute *attr,
++ char *buf);
++ int (*set_opts)(struct device *dev, int opts);
++};
++
++static void em_x270_dev_release(struct device * dev)
++{
++
++}
++
++static ssize_t em_x270_dev_pm_show(struct device *dev,
++ struct device_attribute *attr,
++ char *buf)
++{
++ struct em_x270_dev_data *pm_data = dev->platform_data;
++ int is_on = pm_data->is_on(dev);
++
++ return sprintf(buf, "%d\n", is_on);
++}
++
++static ssize_t em_x270_dev_pm_store(struct device *dev,
++ struct device_attribute *attr,
++ const char *buf, size_t count)
++{
++ char *endp;
++ int on = simple_strtoul(buf, &endp, 0);
++ size_t size = endp - buf;
++ struct em_x270_dev_data *pm_data = dev->platform_data;
++
++ pr_info("%s: %s\n", __FUNCTION__, buf);
++
++ if (*endp && isspace(*endp))
++ size++;
++ if (size != count)
++ return -EINVAL;
++
++ pm_data->set_on(dev, on);
++
++ return count;
++}
++
++static DEVICE_ATTR(pwr_on, S_IWUSR | S_IRUGO,
++ em_x270_dev_pm_show, em_x270_dev_pm_store);
++
++static int gprs_is_on(struct device *dev)
++{
++ return !!(pxa_gpio_get_value(20));
++}
++
++static int gprs_set_on(struct device *dev, int on)
++{
++ pr_info("%s: on = %d\n", __FUNCTION__, on);
++ if (on) {
++ pxa_gpio_mode(20 | GPIO_OUT | GPIO_DFLT_HIGH);
++ mdelay(500);
++ pxa_gpio_set_value(82, 0);
++ mdelay(500);
++ pxa_gpio_mode(82 | GPIO_OUT | GPIO_DFLT_HIGH);
++ mdelay(1000);
++ pxa_gpio_set_value(82, 0);
++ }
++ else {
++ pxa_gpio_set_value(20, 0);
++ pxa_gpio_mode(20 | GPIO_OUT);
++ }
++
++ return 0;
++}
++
++static struct em_x270_dev_data em_x270_gprs_data = {
++ .is_on = gprs_is_on,
++ .set_on = gprs_set_on,
++};
++
++static struct platform_device em_x270_gprs = {
++ .name = "gprs",
++ .id = -1,
++ .dev = {
++ .platform_data = &em_x270_gprs_data,
++ .release = em_x270_dev_release,
++ },
++};
++
++static int is_wlan_on;
++
++static int wlan_is_on(struct device *dev)
++{
++ return is_wlan_on;
++}
++
++static int wlan_set_on(struct device *dev, int on)
++{
++ if (on) {
++ /* WLAN power-up sequence */
++ /* Mask LDO17 and LDO19 tolerance events */
++ da9030_set_reg(IRQ_MASK_C,
++ IRQ_MASK_C_LDO19 | IRQ_MASK_C_LDO17);
++
++ /* Force I2C control over LDO17, LDO19 */
++ da9030_set_reg(SLEEP_CONTROL,
++ APP_SLEEP_CTL_BYPASS_LDO19 |
++ APP_SLEEP_CTL_BYPASS_LDO17);
++
++ /* Turn off LDO17 and LDO19 */
++ da9030_set_reg(REG_CONTROL_1_17,
++ RC1_LDO16_EN | RC1_LDO15_EN |
++ RC1_LDO11_EN | RC1_LDO10_EN | RC1_BUCK2_EN);
++ da9030_set_reg(REG_CONTROL_2_18, RC2_SIMCP_EN | RC2_LDO18_EN);
++
++ /* Set LDO17 voltage to 3V (VCC_WLAN_IO) */
++ da9030_set_reg(LDO_17_SIMCP0, LDO_17_SIMCP0_LDO17_3V);
++ mdelay(200);
++
++ /* Turn WLAN RF power on */
++ pxa_gpio_mode(115 | GPIO_OUT | GPIO_DFLT_HIGH);
++
++ /* Turn LDO17 on */
++ da9030_set_reg(REG_CONTROL_1_17,
++ RC1_LDO17_EN| RC1_LDO16_EN | RC1_LDO15_EN |
++ RC1_LDO11_EN | RC1_LDO10_EN | RC1_BUCK2_EN);
++ mdelay(200);
++
++ /* Turn on LDO19 */
++ da9030_set_reg(REG_CONTROL_2_18,
++ RC2_SIMCP_EN | RC2_LDO18_EN | RC2_LDO19_EN);
++
++ }
++ else {
++ /* FIXME: implement BGW shutdown */
++ }
++ is_wlan_on = on;
++
++ return 0;
++}
++
++static struct em_x270_dev_data em_x270_wlan_data = {
++ .is_on = wlan_is_on,
++ .set_on = wlan_set_on,
++};
++
++static struct platform_device em_x270_wlan = {
++ .name = "wlan",
++ .id = -1,
++ .dev = {
++ .platform_data = &em_x270_wlan_data,
++ .release = em_x270_dev_release,
++ },
++};
++
++static int gps_is_on(struct device *dev)
++{
++ int val = da9030_get_reg(REG_CONTROL_1_97);
++ return !!(val & RC3_LDO3_EN);
++}
++
++static int gps_set_on(struct device *dev, int on)
++{
++ int val = da9030_get_reg(REG_CONTROL_1_97);
++
++ if (on)
++ val |= RC3_LDO3_EN;
++ else
++ val &= ~RC3_LDO3_EN;
++ da9030_set_reg(REG_CONTROL_1_97, val);
++
++ return 0;
++}
++
++static struct em_x270_dev_data em_x270_gps_data = {
++ .is_on = gps_is_on,
++ .set_on = gps_set_on,
++};
++
++static struct platform_device em_x270_gps = {
++ .name = "gps",
++ .id = -1,
++ .dev = {
++ .platform_data = &em_x270_gps_data,
++ .release = em_x270_dev_release,
++ },
++};
++
++static int usb_mode;
++static int usb_host_is_on(struct device *dev)
++{
++ return usb_mode;
++}
++
++static int usb_host_set_on(struct device *dev, int on)
++{
++ if (on) {
++ da9030_set_reg(MISC_CONTROLB, MISCB_SESSION_VALID_ENABLE);
++ da9030_set_reg(USBPUMP,
++ USB_PUMP_EN_USBVEP |
++ USB_PUMP_EN_USBVE |
++ USB_PUMP_USBVE);
++
++ /* enable port 2 transiever */
++ UP2OCR = UP2OCR_HXS | UP2OCR_HXOE;
++ usb_mode = 1;
++ }
++ else {
++ UP2OCR = UP2OCR_DPPUE | UP2OCR_DPPUBE | UP2OCR_HXOE;
++ da9030_set_reg(USBPUMP,
++ USB_PUMP_EN_USBVEP | USB_PUMP_EN_USBVE);
++ usb_mode = 0;
++ }
++
++ return 0;
++}
++
++static struct em_x270_dev_data em_x270_usb_host_data = {
++ .is_on = usb_host_is_on,
++ .set_on = usb_host_set_on,
++};
++
++static struct platform_device em_x270_usb_host = {
++ .name = "usb_host",
++ .id = -1,
++ .dev = {
++ .platform_data = &em_x270_usb_host_data,
++ .release = em_x270_dev_release,
++ },
++};
++
++static struct platform_device *em_x270_devices[] = {
++ &em_x270_gprs,
++ &em_x270_wlan,
++ &em_x270_gps,
++ &em_x270_usb_host,
++};
++
++static struct work_struct usb_work;
++static void usb_worker(struct work_struct *work)
++{
++ usb_host_set_on(NULL, !pxa_gpio_get_value(21));
++}
++
++static irqreturn_t usb_irq_handler(int irq, void *regs)
++{
++ schedule_work(&usb_work);
++
++ pr_info("%s\n", __FUNCTION__);
++ return IRQ_HANDLED;
++}
++
++static int em_x270_devices_init(void)
++{
++ int i, ret;
++
++ for (i = 0; i < ARRAY_SIZE(em_x270_devices); i++ ) {
++ ret = platform_device_register(em_x270_devices[i]);
++ if (ret) {
++ dev_dbg(&em_x270_devices[i]->dev,
++ "Registration failed: %d\n", ret);
++ continue;
++ }
++
++ ret = device_create_file(&em_x270_devices[i]->dev,
++ &dev_attr_pwr_on);
++ if (ret) {
++ dev_dbg(&em_x270_devices[i]->dev,
++ "PWR_ON attribute failed: %d\n", ret);
++ }
++
++ dev_dbg(&em_x270_devices[i]->dev,
++ "Registered PWR ON attribute\n");
++ }
++
++ /* setup USB detection irq */
++ INIT_WORK(&usb_work, usb_worker);
++ set_irq_type(IRQ_GPIO(21), IRQT_BOTHEDGE);
++ ret = request_irq(IRQ_GPIO(21), usb_irq_handler, IRQF_DISABLED,
++ "usb detect", 0);
++ if (ret) {
++ pr_info("USB device detection disabled\n");
++ }
++ else {
++ schedule_work(&usb_work);
++ }
++
++ return 0;
++}
++
++static void em_x270_devices_exit(void)
++{
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(em_x270_devices); i++ ) {
++ device_remove_file(&em_x270_devices[i]->dev,
++ &dev_attr_pwr_on);
++ platform_device_unregister(em_x270_devices[i]);
++ }
++}
++
++late_initcall(em_x270_devices_init);
++module_exit(em_x270_devices_exit);
++
++MODULE_AUTHOR("Mike Rapoport");
++MODULE_DESCRIPTION("Support for platfrom specific device attributes for EM-X270");
++MODULE_LICENSE("GPL");
+diff --git a/arch/arm/mach-pxa/em-x270-lcd.c b/arch/arm/mach-pxa/em-x270-lcd.c
+new file mode 100644
+index 0000000..437efe1
+--- /dev/null
++++ b/arch/arm/mach-pxa/em-x270-lcd.c
+@@ -0,0 +1,223 @@
++/*
++ * LCD initialization and backlight managemnet for EM-X270
++ *
++ * Copyright (C) 2007 CompuLab, Ltd.
++ * Author: Igor Vaisbein <igor@compulab.co.il>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/da9030.h>
++#include <linux/delay.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/sharpsl.h>
++#include <asm/arch/ssp.h>
++
++#include "devices.h"
++
++#define GPIO87_nPCE_2 87 /* Card Enable for Card Space (PXA27x) */
++#define GPIO87_nPCE_2_MD (87 | GPIO_ALT_FN_1_IN)
++#define GPIO87_USB3_1_MD (87 | GPIO_ALT_FN_3_IN)
++#define GPIO87_SSPTXD2_MD (87 | GPIO_ALT_FN_1_OUT)
++#define GPIO87_SSFRM2_MD (87 | GPIO_ALT_FN_3_OUT)
++
++#define LCCR4 __REG(0x44000010)
++
++#define TD035STEE1_LCD_ID 0x2008
++
++static void em_x270_set_bl_intensity(int intensity)
++{
++ da9030_set_wled((intensity != 0), intensity);
++}
++
++struct corgibl_machinfo em_x270_bl_machinfo = {
++ .max_intensity = 0x7,
++ .default_intensity = 0x3,
++ .limit_mask = 0x1,
++ .set_bl_intensity = em_x270_set_bl_intensity,
++};
++
++static void em_x270_bl_release(struct device * dev)
++{
++
++}
++
++static struct platform_device em_x270_bl = {
++ .name = "corgi-bl",
++ .dev = {
++ .release = em_x270_bl_release,
++ .parent = &pxa_device_fb.dev,
++ .platform_data = &em_x270_bl_machinfo,
++ },
++ .id = -1,
++};
++
++/*
++ * Helper functions to access LCD throuhg SPI interface
++ */
++static void set_ssp_9bit(void)
++{
++ int temp;
++ SSCR0 = 0xFF208;
++ SSCR0 = 0xFF288;
++ SSCR1 = 0x40000018;
++
++ while (SSSR & 0x8)
++ temp = SSDR;
++}
++
++static void set_ssp_18bit(void)
++{
++ int temp;
++ SSCR0 = 0x1FF201;
++ SSCR0 = 0x1FF281;
++ SSCR1 = 0x40000018;
++ while (SSSR & 0x8)
++ temp = SSDR;
++}
++
++static void set_ssp_rcv(void)
++{
++ int temp;
++ SSCR0 = 0x1FF20F;
++ SSCR0 = 0x1FF28F;
++ SSCR1 = 0x40000018;
++ while (SSSR & 0x8)
++ temp = SSDR;
++}
++
++static void send_ssp_9bit(unsigned int value)
++{
++ int temp;
++ SSDR = (value);
++
++ asm volatile ("mcr p15, 0, r0, c7, c10, 4":::"r0");
++
++ if (!(SSSR & 0x4))
++ while ((SSSR & 0xf00) == 0)
++ ;
++
++ while ((SSSR & 0xf00) != 0)
++ ;
++ while (SSSR & 0x10)
++ ;
++ while (SSSR & 0x8)
++ temp = SSDR;
++}
++
++static void send_ssp_18bit(unsigned int value)
++{
++ int temp;
++ SSDR = (value);
++
++ asm volatile ("mcr p15, 0, r0, c7, c10, 4":::"r0");
++
++ if (!(SSSR & 0x4))
++ while ((SSSR & 0xf00) == 0)
++ ;
++
++ while ((SSSR & 0xf00) != 0)
++ ;
++ while (SSSR & 0x10)
++ ;
++ while (SSSR & 0x8)
++ temp = SSDR;
++}
++
++static unsigned int rcv_ssp_18bit(void)
++{
++ SSDR = ((0x04) << 23);
++ asm volatile ("mcr p15, 0, r0, c7, c10, 4":::"r0");
++ if (!(SSSR & 0x4))
++ while ((SSSR & 0xf00) == 0)
++ ;
++ while ((SSSR & 0xf00) != 0)
++ ;
++ while (SSSR & 0x10)
++ ;
++ return SSDR;
++}
++
++/* LCD init sequence */
++int em_x270_lcd_detect(void)
++{
++ unsigned int data;
++
++ /* Reset the LCD module */
++ pxa_gpio_mode(GPIO87_nPCE_2 | GPIO_OUT);
++ GPCR(GPIO87_nPCE_2) |= GPIO_bit(GPIO87_nPCE_2);
++ mdelay(75);
++ GPSR(GPIO87_nPCE_2) |= GPIO_bit(GPIO87_nPCE_2);
++ mdelay(70);
++
++ /* TD035STEE1 LCD_SSP initialization commands */
++ set_ssp_9bit();
++ send_ssp_9bit(0x000);
++ mdelay(5);
++
++ send_ssp_9bit(0x000);
++ mdelay(5);
++
++ send_ssp_9bit(0x000);
++ mdelay(5);
++
++ set_ssp_18bit();
++ send_ssp_18bit(0x17980);
++ mdelay(5);
++
++ send_ssp_18bit(0x17F10);
++ mdelay(5);
++
++ set_ssp_9bit();
++ send_ssp_9bit(0x011);
++ mdelay(50);
++
++ send_ssp_9bit(0x029);
++ mdelay(10);
++
++ set_ssp_rcv();
++
++ /* Check for LCD ID, to enable the back-light */
++ data = rcv_ssp_18bit();
++
++ if ((data & 0xFFFF) != TD035STEE1_LCD_ID)
++ return -ENODEV;
++
++ /* enable backlight */
++ da9030_set_wled(1, 2);
++ return 0;
++}
++
++static int em_x270_lcd_init(void)
++{
++ int ret;
++ pr_debug("%s\n", __FUNCTION__);
++ ret = em_x270_lcd_detect();
++ if (ret)
++ return ret;
++
++ /* make sure we keep LCCR4 with PCD=0 */
++ LCCR4 = 0x0;
++
++ return platform_device_register(&em_x270_bl);
++}
++
++static void em_x270_lcd_exit(void)
++{
++ pr_debug("%s\n", __FUNCTION__);
++ platform_device_unregister(&em_x270_bl);
++}
++
++late_initcall(em_x270_lcd_init);
++module_exit(em_x270_lcd_exit);
++
++MODULE_DESCRIPTION("EM-X270 backlight and LCD initialization driver");
++MODULE_AUTHOR("Mike Rapoport");
++MODULE_LICENSE("GPL");
+diff --git a/arch/arm/mach-pxa/em-x270-pm.c b/arch/arm/mach-pxa/em-x270-pm.c
+new file mode 100644
+index 0000000..55ba4cd
+--- /dev/null
++++ b/arch/arm/mach-pxa/em-x270-pm.c
+@@ -0,0 +1,892 @@
++/*
++ * Support for CompuLab EM-X270 platform power management
++ *
++ * Copyright (C) 2007 CompuLab, Ltd.
++ * Author: Mike Rapoport <mike@compulab.co.il>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/sysfs.h>
++#include <linux/pm.h>
++#include <linux/da9030.h>
++#include <linux/interrupt.h>
++#include <linux/irq.h>
++#include <linux/delay.h>
++#include <linux/ctype.h>
++
++#include <linux/apm-emulation.h>
++#include <linux/platform_device.h>
++#include <linux/power_supply.h>
++
++#include <linux/debugfs.h>
++#include <linux/seq_file.h>
++
++#include "../../../drivers/i2c/chips/da9030.h"
++
++#include <asm/arch/pm.h>
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pwr-i2c.h>
++
++#define DA9030_ADDR 0x92
++
++#define EM_X270_BATCHK_TIME_SUSPEND (10*60) /* 10 min */
++
++#define VOLTAGE_MAX_DESIGN 4200000 /* 4.2V in uV */
++#define VOLTAGE_MIN_DESIGN 3000000 /* 3V in uV */
++
++#define REG2VOLT(x) ((((x) * 2650) >> 8) + 2650)
++#define VOLT2REG(x) ((((x) - 2650) << 8) / 2650)
++
++#define REG2CURR(x) ((((x) * 24000) >> 8) / 15)
++
++#define VCHARGE_MIN_THRESHOLD VOLT2REG(3200)
++#define VCHARGE_MAX_THRESHOLD VOLT2REG(5500)
++
++#define VBAT_LOW_THRESHOLD VOLT2REG(3600)
++#define VBAT_CRIT_THRESHOLD VOLT2REG(3400)
++
++#define VBAT_CHARGE_START VOLT2REG(4100)
++#define VBAT_CHARGE_STOP VOLT2REG(4200)
++#define VBAT_CHARGE_RESTART VOLT2REG(4000)
++
++#define TBAT_LOW_THRESHOLD 197 /* 0oC */
++#define TBAT_HIGH_THRESHOLD 78 /* 45oC */
++#define TBAT_RESUME_THRESHOLD 100 /* 35oC */
++
++struct em_x270_charger;
++
++struct em_x270_charger_ops {
++ void (*get_status)(struct em_x270_charger *charger);
++ void (*set_charge)(struct em_x270_charger *charger, int on);
++
++ s32 (*da9030_get_reg)(u32 reg);
++ s32 (*da9030_set_reg)(u32 reg, u8 val);
++};
++
++struct em_x270_charger {
++ struct device *dev;
++
++ struct power_supply bat;
++ struct da9030_adc_res adc;
++ struct delayed_work work;
++
++ int interval;
++
++ int da9030_status;
++ int da9030_fault;
++ int mA;
++ int mV;
++ int is_on;
++
++ struct em_x270_charger_ops *ops;
++
++#ifdef CONFIG_DEBUG_FS
++ struct dentry *debug_file;
++#endif
++};
++
++static struct em_x270_charger *the_charger;
++
++static unsigned short tbat_readings[] = {
++ 300, 244, 200, 178, 163, 152, 144, 137, 131,
++ 126, 122, 118, 114, 111, 108, 105, 103, 101,
++ 98, 96, 94, 93, 91, 89, 88, 86, 85,
++ 83, 82, 81, 79, 78, 77, 76, 75, 74,
++ 73, 72, 71, 70, 69, 68, 67, 67, 66,
++ 65, 64, 63, 63, 62, 61, 60, 60, 59,
++ 58, 58, 57, 57, 56, 55, 55, 54, 53,
++ 53, 52, 52, 51, 51, 50, 50, 49, 49,
++ 48, 48, 47, 47, 46, 46, 45, 45, 44,
++ 44, 43, 43, 42, 42, 41, 41, 41, 40,
++ 40, 39, 39, 38, 38, 38, 37, 37, 36,
++ 36, 35, 35, 35, 34, 34, 34, 33, 33,
++ 32, 32, 32, 31, 31, 30, 30, 30, 29,
++ 29, 29, 28, 28, 28, 27, 27, 26, 26,
++ 26, 25, 25, 25, 24, 24, 24, 23, 23,
++ 23, 22, 22, 21, 21, 21, 20, 20, 20,
++ 19, 19, 19, 18, 18, 18, 17, 17, 17,
++ 16, 16, 16, 15, 15, 14, 14, 14, 13,
++ 13, 13, 12, 12, 12, 11, 11, 11, 10,
++ 10, 10, 9, 9, 8, 8, 8, 7, 7,
++ 7, 6, 6, 5, 5, 5, 4, 4, 3,
++ 3, 3, 2, 2, 1, 1, 1, 0, 0,
++ -1, -1, -1, -2, -2, -3, -3, -4, -4,
++ -5, -5, -6, -6, -6, -7, -7, -8, -9,
++ -9, -10, -10, -11, -11, -12, -12, -13, -14,
++ -14, -15, -16, -16, -17, -18, -18, -19, -20,
++ -21, -21, -22, -23, -24, -25, -26, -27, -28,
++ -30, -31, -32, -34, -35, -37, -39, -41, -44,
++ -47, -50, -56, -64,
++};
++
++static inline int usb_host_on(void)
++{
++ return !pxa_gpio_get_value(21);
++}
++
++#ifdef CONFIG_DEBUG_FS
++
++static int debug_show(struct seq_file *s, void *data)
++{
++ struct em_x270_charger *charger = s->private;
++
++ seq_printf(s, "charger is %s\n", charger->is_on ? "on" : "off");
++ if (charger->da9030_status & CHRG_CHARGER_ENABLE) {
++ seq_printf(s, "iset = %dmA, vset = %dmV\n",
++ charger->mA, charger->mV);
++ }
++
++ seq_printf(s, "vbat_res = %d (%dmV)\n",
++ charger->adc.vbat_res, REG2VOLT(charger->adc.vbat_res));
++ seq_printf(s, "vbatmin_res = %d (%dmV)\n",
++ charger->adc.vbatmin_res,
++ REG2VOLT(charger->adc.vbatmin_res));
++ seq_printf(s, "vbatmintxon = %d (%dmV)\n",
++ charger->adc.vbatmintxon,
++ REG2VOLT(charger->adc.vbatmintxon));
++ seq_printf(s, "ichmax_res = %d (%dmA)\n",
++ charger->adc.ichmax_res,
++ REG2CURR(charger->adc.ichmax_res));
++ seq_printf(s, "ichmin_res = %d (%dmA)\n",
++ charger->adc.ichmin_res,
++ REG2CURR(charger->adc.ichmin_res));
++ seq_printf(s, "ichaverage_res = %d (%dmA)\n",
++ charger->adc.ichaverage_res,
++ REG2CURR(charger->adc.ichaverage_res));
++ seq_printf(s, "vchmax_res = %d (%dmV)\n",
++ charger->adc.vchmax_res,
++ REG2VOLT(charger->adc.vchmax_res));
++ seq_printf(s, "vchmin_res = %d (%dmV)\n",
++ charger->adc.vchmin_res,
++ REG2VOLT(charger->adc.vchmin_res));
++ seq_printf(s, "tbat_res = %d (%doC)\n", charger->adc.tbat_res,
++ tbat_readings[charger->adc.tbat_res]);
++ seq_printf(s, "adc_in4_res = %d\n", charger->adc.adc_in4_res);
++ seq_printf(s, "adc_in5_res = %d\n", charger->adc.adc_in5_res);
++
++ return 0;
++}
++
++static int debug_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, debug_show, inode->i_private);
++}
++
++static const struct file_operations debug_fops = {
++ .open = debug_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static struct dentry* em_x270_create_debugfs(struct em_x270_charger *charger)
++{
++ charger->debug_file = debugfs_create_file("charger", 0666, 0, charger,
++ &debug_fops);
++ return charger->debug_file;
++}
++
++static void em_x270_remove_debugfs(struct em_x270_charger *charger)
++{
++ debugfs_remove(charger->debug_file);
++}
++#else
++#define em_x270_create_debugfs(x) NULL
++#define em_x270_remove_debugfs(x) do {} while(0)
++#endif
++
++/*********************************************************************/
++/* DA9030 access functions for suspend/resume */
++#define DA_ADDR 0x49
++static inline s32 __da9030_get_reg(u32 reg)
++{
++ pr_info("%s: reg = %d\n", __FUNCTION__, reg);
++ return pxa_pwr_i2c_reg_read(DA_ADDR, reg);
++}
++
++static inline s32 __da9030_set_reg(u32 reg, u8 val)
++{
++ pr_info("%s: reg = %d, val = %d\n", __FUNCTION__, reg, val);
++ return pxa_pwr_i2c_reg_write(DA_ADDR, reg, val);
++}
++
++/*********************************************************************/
++/* helpers for charger state monnitor. Different version for stready
++ * state and suspended system
++ */
++static void em_x270_get_charger_status(struct em_x270_charger *charger)
++{
++ da9030_get_charger(&charger->is_on, &charger->mA, &charger->mV);
++ da9030_read_adc(&charger->adc);
++ charger->da9030_status = da9030_get_status();
++ charger->da9030_fault = da9030_get_fault_log();
++}
++
++static void em_x270_set_charge(struct em_x270_charger *charger, int on)
++{
++ if (on) {
++ pr_debug("%s: enabling charger\n", __FUNCTION__);
++ da9030_set_thresholds(TBAT_HIGH_THRESHOLD,
++ TBAT_RESUME_THRESHOLD,
++ TBAT_LOW_THRESHOLD,
++ VBAT_LOW_THRESHOLD);
++ da9030_set_reg(CCTR_CONTROL, CCTR_SET_8MIN);
++ da9030_set_charger(1, 1000, 4200);
++ da9030_set_led(3, 1, 0, 0, 0);
++ charger->is_on = 1;
++ }
++ else {
++ /* disable charger */
++ pr_debug("%s: disabling charger\n", __FUNCTION__);
++ da9030_set_charger(0, 0, 0);
++ da9030_set_led(3, 0, 0, 0, 0);
++ charger->is_on = 0;
++ }
++}
++
++static void em_x270_get_charger_status_suspend(struct em_x270_charger *charger)
++{
++ s32 val;
++
++ val = __da9030_get_reg(CHARGE_CONTROL);
++ charger->is_on = (val & CHRG_CHARGER_ENABLE) ? 1 : 0;
++ charger->mA = ((val >> 3) & 0xf) * 100;
++ charger->mV = (val & 0x7) * 50 + 4000;
++
++ charger->adc.vbat_res = __da9030_get_reg(VBAT_RES);
++ charger->adc.vchmax_res = __da9030_get_reg(VCHMAX_RES);
++ charger->adc.vchmin_res = __da9030_get_reg(VCHMIN_RES);
++ charger->adc.tbat_res = __da9030_get_reg(TBAT_RES);
++
++ charger->da9030_status = __da9030_get_reg(STATUS);
++ charger->da9030_fault = __da9030_get_reg(FAULT_LOG);
++}
++
++static void em_x270_set_charge_suspend(struct em_x270_charger *charger, int on)
++{
++ if (on) {
++ u8 val = 0;
++ int mA = 1000;
++ int mV = 4200;
++
++ pr_debug("%s: enabling charger\n", __FUNCTION__);
++ val = CHRG_CHARGER_ENABLE;
++ val |= (mA / 100) << 3;
++ val |= (mV - 4000) / 50;
++
++ __da9030_set_reg(CCTR_CONTROL, CCTR_SET_8MIN);
++ __da9030_set_reg(VBATMON, VBAT_LOW_THRESHOLD);
++ __da9030_set_reg(CHARGE_CONTROL, val);
++ charger->is_on = 1;
++ }
++ else {
++ /* disable charger */
++ pr_debug("%s: disabling charger\n", __FUNCTION__);
++ __da9030_set_reg(CHARGE_CONTROL, 0);
++ charger->is_on = 0;
++ }
++}
++
++static struct em_x270_charger_ops em_x270_charger_ops = {
++ .get_status = em_x270_get_charger_status,
++ .set_charge = em_x270_set_charge,
++ .da9030_get_reg = da9030_get_reg,
++ .da9030_set_reg = da9030_set_reg,
++};
++
++static struct em_x270_charger_ops em_x270_charger_ops_suspend = {
++ .get_status = em_x270_get_charger_status_suspend,
++ .set_charge = em_x270_set_charge_suspend,
++ .da9030_get_reg = __da9030_get_reg,
++ .da9030_set_reg = __da9030_set_reg,
++};
++
++/*********************************************************************/
++/* charging state machine */
++static void em_x270_check_charger_state(struct em_x270_charger *charger)
++{
++ charger->ops->get_status(charger);
++
++/* we wake or boot with external power on */
++ if (!charger->is_on) {
++ if ((charger->da9030_status & STATUS_CHDET) &&
++ (!usb_host_on()) &&
++ (charger->adc.vbat_res < VBAT_CHARGE_START)) {
++ pr_debug("%s: vbat_res <= 4100\n", __FUNCTION__);
++ charger->ops->set_charge(charger, 1);
++ }
++ }
++ else {
++ if (charger->adc.vbat_res >= VBAT_CHARGE_STOP) {
++ pr_debug("%s: vbat_res >= 4200\n", __FUNCTION__);
++ charger->ops->set_charge(charger, 0);
++ charger->ops->da9030_set_reg(VBATMON,
++ VBAT_CHARGE_RESTART);
++ }
++ else if (charger->adc.vbat_res > VBAT_LOW_THRESHOLD) {
++ /* we are charging and passed LOW_THRESH,
++ so upate DA9030 VBAT threshold
++ */
++ pr_debug("%s: vbat_res >= %d\n", __FUNCTION__,
++ REG2VOLT(VBAT_LOW_THRESHOLD));
++ charger->ops->da9030_set_reg(VBATMON,
++ VBAT_LOW_THRESHOLD);
++ }
++ if (charger->adc.vchmax_res > VCHARGE_MAX_THRESHOLD ||
++ charger->adc.vchmin_res < VCHARGE_MIN_THRESHOLD ||
++ /* Tempreture readings are negative */
++ charger->adc.tbat_res < TBAT_HIGH_THRESHOLD ||
++ charger->adc.tbat_res > TBAT_LOW_THRESHOLD ) {
++ /* disable charger */
++ pr_info("%s: thresholds fail\n", __FUNCTION__);
++ charger->ops->set_charge(charger, 0);
++ }
++ }
++}
++
++static void em_x270_charging_monitor(struct work_struct *work)
++{
++ struct em_x270_charger *charger;
++
++ charger = container_of(work, struct em_x270_charger, work.work);
++
++ em_x270_check_charger_state(charger);
++
++ /* reschedule for the next time */
++ schedule_delayed_work(&charger->work, charger->interval);
++}
++
++void em_x270_battery_release(struct device * dev)
++{
++}
++
++struct em_x270_battery_thresh {
++ int voltage;
++ int percentage;
++};
++
++static struct em_x270_battery_thresh vbat_ranges[] = {
++ { 150, 100},
++ { 149, 99},
++ { 148, 98},
++ { 147, 98},
++ { 146, 97},
++ { 145, 96},
++ { 144, 96},
++ { 143, 95},
++ { 142, 94},
++ { 141, 93},
++ { 140, 92},
++ { 139, 91},
++ { 138, 90},
++ { 137, 90},
++ { 136, 89},
++ { 135, 88},
++ { 134, 88},
++ { 133, 87},
++ { 132, 86},
++ { 131, 85},
++ { 130, 83},
++ { 129, 82},
++ { 128, 81},
++ { 127, 81},
++ { 126, 80},
++ { 125, 75},
++ { 124, 74},
++ { 123, 73},
++ { 122, 70},
++ { 121, 66},
++ { 120, 65},
++ { 119, 64},
++ { 118, 64},
++ { 117, 63},
++ { 116, 59},
++ { 115, 58},
++ { 114, 57},
++ { 113, 57},
++ { 112, 56},
++ { 111, 50},
++ { 110, 49},
++ { 109, 49},
++ { 108, 48},
++ { 107, 48},
++ { 106, 33},
++ { 105, 32},
++ { 104, 32},
++ { 103, 32},
++ { 102, 31},
++ { 101, 16},
++ { 100, 15},
++ { 99, 15},
++ { 98, 15},
++ { 97, 10},
++ { 96, 9},
++ { 95, 7},
++ { 94, 3},
++ { 93, 0},
++};
++
++static enum power_supply_property em_x270_bat_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_HEALTH,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_CURRENT_AVG,
++ POWER_SUPPLY_PROP_CAPACITY, /* in percents! */
++ POWER_SUPPLY_PROP_TEMP,
++ POWER_SUPPLY_PROP_MANUFACTURER,
++ POWER_SUPPLY_PROP_MODEL_NAME,
++};
++
++static void em_x270_bat_check_status(struct em_x270_charger *charger,
++ union power_supply_propval *val)
++{
++ /* FIXME: below code is very crude approximation of actual
++ states, we need to take into account voltage and current
++ measurements to determine actual charger state */
++ if (charger->da9030_status & STATUS_CHDET) {
++ if (!usb_host_on()) {
++ if (charger->is_on) {
++ val->intval = POWER_SUPPLY_STATUS_CHARGING;
++ }
++ else {
++ val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
++ }
++ }
++ }
++ else {
++ val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
++ }
++}
++
++static void em_x270_bat_check_health(struct em_x270_charger *charger,
++ union power_supply_propval *val)
++{
++ if (charger->da9030_fault & FAULT_LOG_OVER_TEMP) {
++ val->intval = POWER_SUPPLY_HEALTH_OVERHEAT;
++ }
++ else if (charger->da9030_fault & FAULT_LOG_VBAT_OVER) {
++ val->intval = POWER_SUPPLY_HEALTH_OVERVOLTAGE;
++ }
++ else {
++ val->intval = POWER_SUPPLY_HEALTH_GOOD;
++ }
++}
++
++static int vbat_interpolate(int reg)
++{
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(vbat_ranges); i++ )
++ if (vbat_ranges[i].voltage == reg) {
++ pr_debug("%s: voltage = %d, percentage = %d\n",
++ __FUNCTION__, vbat_ranges[i].voltage,
++ vbat_ranges[i].percentage);
++ return vbat_ranges[i].percentage;
++ }
++
++ return 0;
++}
++
++static int em_x270_bat_get_property(struct power_supply *psy,
++ enum power_supply_property psp,
++ union power_supply_propval *val)
++{
++ u32 reg;
++ struct em_x270_charger *charger;
++ charger = container_of(psy, struct em_x270_charger, bat);
++
++ switch(psp) {
++ case POWER_SUPPLY_PROP_STATUS:
++ em_x270_bat_check_status(charger, val);
++ break;
++ case POWER_SUPPLY_PROP_HEALTH:
++ em_x270_bat_check_health(charger, val);
++ break;
++ case POWER_SUPPLY_PROP_TECHNOLOGY:
++ val->intval = POWER_SUPPLY_TECHNOLOGY_LIPO;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
++ val->intval = VOLTAGE_MAX_DESIGN;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
++ val->intval = VOLTAGE_MIN_DESIGN;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_NOW:
++ reg = charger->adc.vbat_res;
++ /* V = (reg / 256) * 2.65 + 2.65 (V) */
++ val->intval = ((reg * 2650000) >> 8) + 2650000;
++ break;
++ case POWER_SUPPLY_PROP_CURRENT_AVG:
++ reg = charger->adc.ichaverage_res;
++ val->intval = reg; /* reg */
++ break;
++ case POWER_SUPPLY_PROP_CAPACITY:
++ reg = charger->adc.vbat_res;
++ val->intval = vbat_interpolate(reg);
++ break;
++ case POWER_SUPPLY_PROP_TEMP:
++ reg = charger->adc.tbat_res;
++ val->intval = tbat_readings[reg];
++ break;
++ case POWER_SUPPLY_PROP_MANUFACTURER:
++ val->strval = "MaxPower";
++ pr_debug("%s: MFG = %s\n", __FUNCTION__, val->strval);
++ break;
++ case POWER_SUPPLY_PROP_MODEL_NAME:
++ val->strval = "LP555597P6H-FPS";
++ pr_debug("%s: MODEL = %s\n", __FUNCTION__, val->strval);
++ break;
++ default: break;
++ }
++
++ return 0;
++}
++
++static void em_x270_setup_battery(struct power_supply *bat)
++{
++ bat->name = "em-x270-battery";
++ bat->type = POWER_SUPPLY_TYPE_BATTERY;
++ bat->properties = em_x270_bat_props;
++ bat->num_properties = ARRAY_SIZE(em_x270_bat_props);
++ bat->get_property = em_x270_bat_get_property;
++ bat->use_for_apm = 1;
++};
++
++static void em_x270_chiover_callback(int event, void *_charger)
++{
++ /* disable charger */
++ struct em_x270_charger *charger = _charger;
++/* pr_info("%s\n", __FUNCTION__); */
++ em_x270_set_charge(charger, 0);
++}
++
++static void em_x270_tbat_callback(int event, void *_charger)
++{
++ /* disable charger */
++ struct em_x270_charger *charger = _charger;
++/* pr_info("%s\n", __FUNCTION__); */
++ em_x270_set_charge(charger, 0);
++}
++
++static void em_x270_vbat_callback(int event, void *_charger)
++{
++ struct em_x270_charger *charger = _charger;
++ da9030_read_adc(&charger->adc);
++
++ if (!charger->is_on) {
++ if (charger->adc.vbat_res < VBAT_LOW_THRESHOLD) {
++ /* set VBAT threshold for critical */
++ da9030_set_reg(VBATMON, VBAT_CRIT_THRESHOLD);
++ da9030_set_reg(VBATMON_1, VBAT_CRIT_THRESHOLD);
++ apm_queue_event(APM_LOW_BATTERY);
++ }
++ else if (charger->adc.vbat_res < VBAT_CRIT_THRESHOLD) {
++ /* notify the system of battery critical */
++ apm_queue_event(APM_CRITICAL_SUSPEND);
++ }
++ }
++}
++
++static void em_x270_chdet_callback(int event, void *_charger)
++{
++ struct em_x270_charger *charger = _charger;
++ int status = da9030_get_status();
++ pr_info("%s\n", __FUNCTION__);
++
++/* em_x270_check_charger_state(charger); */
++
++ /* check if we have "real" charger or our own USB pump */
++ if (!usb_host_on())
++ em_x270_set_charge(charger, !!(status & CHRG_CHARGER_ENABLE));
++}
++
++static int em_x270_battery_probe(struct platform_device *pdev)
++{
++ struct em_x270_charger *charger;
++
++ pr_debug("%s\n", __FUNCTION__);
++ charger = kzalloc(sizeof(*charger), GFP_KERNEL);
++ if (charger == NULL) {
++ return -ENOMEM;
++ }
++
++ the_charger = charger;
++
++ charger->dev = &pdev->dev;
++
++ charger->ops = &em_x270_charger_ops;
++
++ charger->interval = 10 * HZ; /* 10 seconds between monotor runs */
++ em_x270_setup_battery(&charger->bat);
++
++ platform_set_drvdata(pdev, charger);
++
++ da9030_enable_adc();
++
++ INIT_DELAYED_WORK(&charger->work, em_x270_charging_monitor);
++ schedule_delayed_work(&charger->work, charger->interval);
++
++ charger->debug_file = em_x270_create_debugfs(charger);
++
++ em_x270_setup_battery(&charger->bat);
++
++ da9030_register_callback(DA9030_IRQ_CHDET,
++ em_x270_chdet_callback,
++ charger);
++ da9030_register_callback(DA9030_IRQ_VBATMON,
++ em_x270_vbat_callback,
++ charger);
++
++ /* critical condition events */
++ da9030_register_callback(DA9030_IRQ_CHIOVER,
++ em_x270_chiover_callback,
++ charger);
++ da9030_register_callback(DA9030_IRQ_TBAT,
++ em_x270_tbat_callback,
++ charger);
++
++ da9030_set_thresholds(TBAT_HIGH_THRESHOLD,
++ TBAT_RESUME_THRESHOLD,
++ TBAT_LOW_THRESHOLD,
++ VBAT_LOW_THRESHOLD);
++
++ power_supply_register(&pdev->dev, &charger->bat);
++
++ return 0;
++}
++
++static int em_x270_battery_remove(struct platform_device *dev)
++{
++ struct em_x270_charger *charger = platform_get_drvdata(dev);
++
++ pr_debug("%s\n", __FUNCTION__);
++ em_x270_remove_debugfs(charger);
++ cancel_delayed_work(&charger->work);
++ power_supply_unregister(&charger->bat);
++
++ kfree(charger);
++ the_charger = NULL;
++
++ return 0;
++}
++
++static int em_x270_battery_suspend(struct platform_device *pdev,
++ pm_message_t state)
++{
++ pr_info("%s\n", __FUNCTION__);
++ da9030_set_reg(REG_CONTROL_1_97, RC3_BUCK_EN | RC3_LDO6_EN);
++ da9030_set_reg(REG_CONTROL_2_98, 0);
++ da9030_set_reg(REG_CONTROL_2_18,RC2_LDO18_EN);
++ da9030_set_reg(REG_CONTROL_1_17,
++ RC1_LDO16_EN | RC1_LDO15_EN | RC1_BUCK2_EN);
++ da9030_set_reg(WLED_CONTROL, 0);
++
++ da9030_set_reg(LED_1_CONTROL, 0);
++ da9030_set_reg(LED_4_CONTROL, 0);
++
++ return 0;
++}
++
++extern int em_x270_lcd_detect(void);
++static int em_x270_battery_resume(struct platform_device *pdev)
++{
++ pr_info("%s\n", __FUNCTION__);
++
++ da9030_set_reg(LED_1_CONTROL, 0xff);
++ da9030_set_reg(LED_4_CONTROL, 0xff);
++
++ da9030_set_reg(REG_CONTROL_1_97,
++ RC3_BUCK_EN | RC3_LDO1_EN | RC3_LDO2_EN |
++ RC3_LDO3_EN | RC3_LDO6_EN | RC3_LDO7_EN);
++ da9030_set_reg(REG_CONTROL_2_98,
++ RC4_SIMCP_ENABLE | RC4_LDO11_EN |
++ RC4_LDO9_EN | RC4_LDO8_EN);
++ da9030_set_reg(REG_CONTROL_2_18,
++ RC2_SIMCP_EN | RC2_LDO18_EN | RC2_LDO19_EN);
++ da9030_set_reg(REG_CONTROL_1_17,
++ RC1_LDO17_EN| RC1_LDO16_EN | RC1_LDO15_EN |
++ RC1_LDO11_EN | RC1_LDO10_EN | RC1_BUCK2_EN);
++
++ if (em_x270_lcd_detect() != 0)
++ pr_info("%s: LCD resume failed\n", __FUNCTION__);
++
++ return 0;
++}
++
++static struct platform_driver em_x270_battery_driver = {
++ .driver = {
++ .name = "em-x270-battery",
++ .owner = THIS_MODULE,
++ },
++ .probe = em_x270_battery_probe,
++ .remove = em_x270_battery_remove,
++
++ .suspend_late = em_x270_battery_suspend,
++ .resume_early = em_x270_battery_resume,
++};
++
++/**************************************************************************/
++/* global patform power management */
++/**************************************************************************/
++/* suspend/resume button */
++static irqreturn_t em_x270_suspend_irq(int irq, void *data)
++{
++ apm_queue_event(APM_USER_SUSPEND);
++ return IRQ_HANDLED;
++}
++
++static void em_x270_goto_sleep(suspend_state_t state,
++ unsigned long alarm_time,
++ unsigned int alarm_enable)
++{
++ pr_info("%s\n", __FUNCTION__);
++
++ the_charger->ops = &em_x270_charger_ops_suspend;
++
++ RTSR &= RTSR_ALE;
++ RTAR = RCNR + EM_X270_BATCHK_TIME_SUSPEND;
++
++ pxa_pm_enter(state);
++}
++
++static int em_x270_enter_suspend(unsigned long alarm_time,
++ unsigned int alarm_enable)
++{
++ s32 status = 0;
++ s32 event_a, event_b;
++ int ret;
++ int retry = 10;
++ pr_info("%s\n", __FUNCTION__);
++
++ /* make sure power I2C state is consistent */
++ PWRICR &= ~ICR_IUE;
++
++ if ((PEDR & PWER_GPIO1)) {
++ /* button pressed */
++ /* clear pending event to avoid interrupt*/
++ PEDR &= ~PWER_GPIO1;
++ GEDR0 &= ~GPIO_bit(1);
++
++ ret = 0;
++ }
++ else if ((PEDR & PWER_RTC)) {
++ PEDR &= ~PWER_RTC;
++ pr_debug("%s: timer alarm\n", __FUNCTION__);
++ em_x270_check_charger_state(the_charger);
++ ret = 1;
++ }
++ else if ((PEDR & PWER_GPIO0)) {
++ PEDR &= ~PWER_GPIO0;
++ GEDR0 &= ~GPIO_bit(0);
++
++ /* we woke up because of DA9030 event */
++ do {
++ status = the_charger->ops->da9030_get_reg(STATUS);
++ udelay(1000);
++ } while (status < 0 && retry--);
++
++ the_charger->da9030_status = status;
++ event_a = the_charger->ops->da9030_get_reg(EVENT_A);
++ event_b = the_charger->ops->da9030_get_reg(EVENT_B);
++
++ pr_info("%s: DA9030 wakeup: status: %x, ev_a: %x, ev_b: %x\n",
++ __FUNCTION__, the_charger->da9030_status,
++ event_a, event_b);
++
++/* if ((the_charger->da9030_status & STATUS_CHDET)) { */
++ if (event_a & EVENT_A_CHDET) {
++ pr_info("%s: EVENT_A_CHDET\n", __FUNCTION__);
++ em_x270_check_charger_state(the_charger);
++ }
++ else {
++ pr_info("%s: What the hell?\n", __FUNCTION__);
++ }
++
++ ret = 1;
++ }
++ else {
++ /* wake up is not DA9030, so continue and let battery
++ driver check the charger state */
++ ret = 0;
++ }
++
++ /* get back to sleep */
++ if (ret)
++ em_x270_goto_sleep(PM_SUSPEND_MEM, alarm_time, alarm_enable);
++
++ return ret;
++}
++
++static int em_x270_pm_enter(suspend_state_t state)
++{
++ unsigned long alarm_time = RTAR;
++ unsigned int alarm_status = ((RTSR & RTSR_ALE) != 0);
++
++ /* pre-suspend */
++ pr_info("suspending emma\n");
++ pxa_gpio_mode(38 | GPIO_OUT | GPIO_DFLT_HIGH);
++
++ em_x270_goto_sleep(state, alarm_time, alarm_status);
++
++ /* check if we were resumed because of charger events */
++ while (em_x270_enter_suspend(alarm_time, alarm_status))
++ {}
++
++ /* make sure power I2C state is consistent */
++ PWRICR &= ~ICR_IUE;
++
++ /* resume */
++ pr_info("emma is resumed\n");
++ the_charger->ops = &em_x270_charger_ops;
++
++ return 0;
++}
++
++static struct pm_ops em_x270_pm_ops = {
++ .enter = em_x270_pm_enter,
++ .valid = pm_valid_only_mem,
++};
++
++static int em_x270_pm_init(void)
++{
++ int ret;
++ pm_set_ops(&em_x270_pm_ops);
++
++ set_irq_type(IRQ_GPIO(1), IRQT_RISING);
++
++ ret = platform_driver_register(&em_x270_battery_driver);
++ if (ret)
++ return ret;
++
++ ret = request_irq(IRQ_GPIO(1), em_x270_suspend_irq, IRQF_DISABLED,
++ "suspend button", 0);
++ if (ret) {
++ platform_driver_unregister(&em_x270_battery_driver);
++ }
++
++ return ret;
++}
++
++static void em_x270_pm_exit(void)
++{
++ free_irq(IRQ_GPIO(1), em_x270_suspend_irq);
++ platform_driver_unregister(&em_x270_battery_driver);
++}
++
++/* make sure I2C is already running */
++late_initcall(em_x270_pm_init);
++module_exit(em_x270_pm_exit);
++
++MODULE_DESCRIPTION("EM-X270 power manager");
++MODULE_AUTHOR("Mike Rapoport");
++MODULE_LICENSE("GPL");
+diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c
+index 3d0ad50..402d792 100644
+--- a/arch/arm/mach-pxa/em-x270.c
++++ b/arch/arm/mach-pxa/em-x270.c
+@@ -18,20 +18,26 @@
+ #include <linux/mtd/nand.h>
+ #include <linux/mtd/partitions.h>
+
+-#include <asm/mach-types.h>
++#include <linux/i2c.h>
++#include <linux/input.h>
+
++#include <asm/mach-types.h>
+ #include <asm/mach/arch.h>
+
+ #include <asm/arch/pxa-regs.h>
+ #include <asm/arch/pxafb.h>
+ #include <asm/arch/ohci.h>
+ #include <asm/arch/mmc.h>
++#include <asm/arch/pxa27x_keyboard.h>
+ #include <asm/arch/bitfield.h>
+
++#include <asm/arch/udc.h>
++
++#include <asm/arch/sharpsl.h>
++
+ #include "generic.h"
+
+ /* GPIO IRQ usage */
+-#define EM_X270_MMC_PD (105)
+ #define EM_X270_ETHIRQ IRQ_GPIO(41)
+ #define EM_X270_MMC_IRQ IRQ_GPIO(13)
+
+@@ -213,6 +219,68 @@ static struct platform_device em_x270_nand = {
+ }
+ };
+
++/* DA9030 */
++static struct i2c_board_info em_x270_pmic_info = {
++ .driver_name = "da9030",
++ .type = "pmic",
++ .addr = 0x49,
++ .irq = IRQ_GPIO(0),
++};
++
++/* Keypad */
++/* The Demo KeyPad has the following mapping:
++ * (0,0) (1,2) (2,1)
++ * (0,2) (1,1) (2,0)
++ * (0,1) (1,0) (2,2)
++ */
++static struct pxa27x_keyboard_platform_data em_x270_kbd = {
++ .nr_rows = 3,
++ .nr_cols = 3,
++ .keycodes = {
++ { /* row 0 */
++ -1,
++ -1,
++ KEY_LEFT,
++ },
++ { /* row 1 */
++ KEY_UP,
++ KEY_ENTER,
++ KEY_DOWN
++ },
++ { /* row 2 */
++ KEY_RIGHT,
++ -1,
++ -1
++ },
++ },
++ .gpio_modes = {
++ (100 | GPIO_ALT_FN_1_IN),
++ (101 | GPIO_ALT_FN_1_IN),
++ (102 | GPIO_ALT_FN_1_IN),
++ (103 | GPIO_ALT_FN_2_OUT),
++ (104 | GPIO_ALT_FN_2_OUT),
++ (105 | GPIO_ALT_FN_2_OUT),
++ },
++};
++
++static struct platform_device em_x270_pxa_keypad = {
++ .name = "pxa27x-keyboard",
++ .id = -1,
++ .dev = {
++ .platform_data = &em_x270_kbd,
++ },
++};
++
++static struct platform_device em_x270_battery_device = {
++ .name = "em-x270-battery",
++ .id = -1,
++};
++
++static struct platform_device em_x270_led_device = {
++ .name = "em-x270-led",
++ .id = -1,
++};
++
+ /* platform devices */
+ static struct platform_device *platform_devices[] __initdata = {
+ &em_x270_dm9k,
+@@ -220,6 +288,9 @@ static struct platform_device *platform_devices[] __initdata = {
+ &em_x270_ts,
+ &em_x270_rtc,
+ &em_x270_nand,
++ &em_x270_pxa_keypad,
++ &em_x270_battery_device,
++ &em_x270_led_device,
+ };
+
+
+@@ -241,6 +312,33 @@ static struct pxaohci_platform_data em_x270_ohci_platform_data = {
+ .init = em_x270_ohci_init,
+ };
+
++/*
++ * USB Client (Gadget/UDC)
++ */
++static void em_x270_udc_command(int cmd)
++{
++ switch(cmd) {
++ case PXA2XX_UDC_CMD_CONNECT:
++ UP2OCR = UP2OCR_HXOE | UP2OCR_DMPUE | UP2OCR_DMPUBE;
++ break;
++ case PXA2XX_UDC_CMD_DISCONNECT:
++/* UP2OCR = UP2OCR_HXS | UP2OCR_HXOE; */
++ //UP2OCR = UP2OCR_HXOE | UP2OCR_DMPUE | UP2OCR_DMPUBE;
++ break;
++ }
++}
++
++static int em_x270_udc_detect(void)
++{
++ return 1;
++}
++
++static struct pxa2xx_udc_mach_info em_x270_udc_info __initdata = {
++ .udc_is_connected = em_x270_udc_detect,
++ .udc_command = em_x270_udc_command,
++};
++
++
+
+ static int em_x270_mci_init(struct device *dev,
+ irq_handler_t em_x270_detect_int,
+@@ -256,9 +354,6 @@ static int em_x270_mci_init(struct device *dev,
+ pxa_gpio_mode(GPIO110_MMCDAT2_MD);
+ pxa_gpio_mode(GPIO111_MMCDAT3_MD);
+
+- /* EM-X270 uses GPIO13 as SD power enable */
+- pxa_gpio_mode(EM_X270_MMC_PD | GPIO_OUT);
+-
+ err = request_irq(EM_X270_MMC_IRQ, em_x270_detect_int,
+ IRQF_DISABLED | IRQF_TRIGGER_FALLING,
+ "MMC card detect", data);
+@@ -313,12 +408,19 @@ static struct pxafb_mach_info em_x270_lcd = {
+ .num_modes = 1,
+ .cmap_inverse = 0,
+ .cmap_static = 0,
+- .lccr0 = LCCR0_PAS,
+- .lccr3 = LCCR3_PixClkDiv(0x01) | LCCR3_Acb(0xff),
++
++ .lccr0 = LCCR0_Act,
++ .lccr3 = LCCR3_PixFlEdg,
+ };
+
+ static void __init em_x270_init(void)
+ {
++ /* register PMIC */
++ i2c_register_board_info(1, &em_x270_pmic_info, 1);
++
++ /* setup DA9030 irq */
++ set_irq_type(IRQ_GPIO(0), IRQT_FALLING);
++
+ /* setup LCD */
+ set_pxa_fb_info(&em_x270_lcd);
+
+@@ -329,6 +431,8 @@ static void __init em_x270_init(void)
+ pxa_set_mci_info(&em_x270_mci_platform_data);
+ pxa_set_ohci_info(&em_x270_ohci_platform_data);
+
++ pxa_set_udc_info(&em_x270_udc_info);
++
+ /* setup STUART GPIOs */
+ pxa_gpio_mode(GPIO46_STRXD_MD);
+ pxa_gpio_mode(GPIO47_STTXD_MD);
+@@ -341,9 +445,16 @@ static void __init em_x270_init(void)
+
+ /* Setup interrupt for dm9000 */
+ set_irq_type(EM_X270_ETHIRQ, IRQT_RISING);
++
++ PCFR = 0x6;
++ PSLR = 0xff400000;
++ PMCR = 0x00000005;
++ PWER = 0x80000003;
++ PFER = 0x00000003;
++ PRER = 0x00000000;
+ }
+
+-MACHINE_START(EM_X270, "Compulab EM-x270")
++MACHINE_START(EM_X270, "Compulab EM-X270")
+ .boot_params = 0xa0000100,
+ .phys_io = 0x40000000,
+ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
+diff --git a/arch/arm/mach-pxa/pwr-i2c.c b/arch/arm/mach-pxa/pwr-i2c.c
+new file mode 100644
+index 0000000..8a501c4
+--- /dev/null
++++ b/arch/arm/mach-pxa/pwr-i2c.c
+@@ -0,0 +1,539 @@
++/*
++ * (C) Copyrihgt 2007 CompuLab, Ltd.
++ * Mike Rapoport <mike@compulab.co.il>
++ * Adaptation of U-Boot I2C driver for PXA.
++ *
++ * (C) Copyright 2000
++ * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
++ *
++ * (C) Copyright 2000 Sysgo Real-Time Solutions, GmbH <www.elinos.com>
++ * Marius Groeger <mgroeger@sysgo.de>
++ *
++ * (C) Copyright 2003 Pengutronix e.K.
++ * Robert Schwebel <r.schwebel@pengutronix.de>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ * Back ported to the 8xx platform (from the 8260 platform) by
++ * Murray.Jensen@cmst.csiro.au, 27-Jan-01.
++ */
++
++/* #define DEBUG */
++
++#include <linux/kernel.h>
++#include <linux/delay.h>
++#include <linux/module.h>
++#include <linux/jiffies.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pwr-i2c.h>
++
++#define I2C_ICR_INIT (ICR_BEIE | ICR_IRFIE | ICR_ITEIE | ICR_GCD | ICR_SCLE)
++#define I2C_ISR_INIT 0x7FF
++
++/* Shall the current transfer have a start/stop condition? */
++#define I2C_COND_NORMAL 0
++#define I2C_COND_START 1
++#define I2C_COND_STOP 2
++
++/* Shall the current transfer be ack/nacked or being waited for it? */
++#define I2C_ACKNAK_WAITACK 1
++#define I2C_ACKNAK_SENDACK 2
++#define I2C_ACKNAK_SENDNAK 4
++
++/* Specify who shall transfer the data (master or slave) */
++#define I2C_READ 0
++#define I2C_WRITE 1
++
++/* All transfers are described by this data structure */
++struct i2c_msg {
++ u8 condition;
++ u8 acknack;
++ u8 direction;
++ u8 data;
++};
++
++/**
++ * pxa_pwr_i2c_transfer: - reset the host controller
++ *
++ */
++/* static void pxa_pwr_i2c_reset(void) */
++/* { */
++/* int i; */
++
++/* /\* CKEN |= CKEN_PWRI2C; *\/ */
++/* /\* PWRICR |= PCFR_PI2C_EN; *\/ */
++
++/* /\* /\\* delay 250ms *\\/ *\/ */
++/* /\* for (i = 0; i < 250; i++) *\/ */
++/* /\* udelay(1000); *\/ */
++
++/* /\* PWRICR &= ~(ICR_MA | ICR_START | ICR_STOP); *\/ */
++/* /\* PWRICR |= ICR_UR; *\/ */
++/* /\* PWRISR = 0x7ff; *\/ */
++
++/* /\* PWRICR &= ~ICR_UR; *\/ */
++/* /\* PWRICR = ICR_GCD | ICR_SCLE; *\/ */
++/* /\* PWRICR |= ICR_IUE; *\/ */
++/* /\* PWRICR |= 0x8000; *\/ */
++
++/* /\* udelay(1000); *\/ */
++
++/* return; */
++
++/* PWRICR &= ~ICR_IUE; /\* disable unit *\/ */
++/* PWRICR |= ICR_UR; /\* reset the unit *\/ */
++/* udelay(100); */
++/* PWRICR &= ~ICR_IUE; /\* disable unit *\/ */
++
++/* CKEN |= CKEN_PWRI2C; */
++/* PCFR |= PCFR_PI2C_EN; */
++
++/* PWRICR = I2C_ICR_INIT; /\* set control register values *\/ */
++/* PWRISR = I2C_ISR_INIT; /\* set clear interrupt bits *\/ */
++/* PWRICR |= ICR_IUE; /\* enable unit *\/ */
++/* udelay(100); */
++/* } */
++
++static void pwr_i2c_abort()
++{
++ unsigned long timeout = 250000;
++ unsigned long time = 0;
++
++ while ((time < timeout) && (PWRIBMR & 0x1) == 0) {
++ unsigned long icr = PWRICR;
++
++ icr &= ~ICR_START;
++ icr |= ICR_ACKNAK | ICR_STOP | ICR_TB;
++
++ PWRICR = icr;
++
++ udelay(1000);
++ time += 1000;
++ }
++
++ PWRICR &= ~(ICR_MA | ICR_START | ICR_STOP);
++}
++
++static void pxa_pwr_i2c_reset(void)
++{
++ pr_debug("Resetting I2C Controller Unit\n");
++
++ /* abort any transfer currently under way */
++ pwr_i2c_abort();
++
++ /* reset according to 9.8 */
++ PWRICR = ICR_UR;
++ PWRISR = I2C_ISR_INIT;
++ PWRISR &= ~ICR_UR;
++
++ /* set control register values */
++ PWRICR = I2C_ICR_INIT;
++
++ /* enable unit */
++ PWRICR |= ICR_IUE;
++ udelay(100);
++
++/* CKEN |= CKEN_PWRI2C; */
++/* PCFR |= PCFR_PI2C_EN; */
++}
++
++/**
++ * i2c_isr_set_cleared: - wait until certain bits of the I2C status register
++ * are set and cleared
++ *
++ * @return: 1 in case of success, 0 means timeout (no match within 10 ms).
++ */
++static int pxa_pwr_i2c_isr_set_cleared(unsigned long set_mask,
++ unsigned long cleared_mask)
++{
++ int timeout = 10000;
++
++ while (((PWRISR & set_mask) != set_mask)
++ || ((PWRISR & cleared_mask) != 0)) {
++ udelay(10);
++ if (timeout-- < 0)
++ return 0;
++ }
++
++ return 1;
++}
++
++/**
++ * pxa_pwr_i2c_transfer: - Transfer one byte over the i2c bus
++ *
++ * This function can tranfer a byte over the i2c bus in both directions.
++ * It is used by the public API functions.
++ *
++ * @return: 0: transfer successful
++ * -EINVAL: message is empty
++ * -ETIMEDOUT: transmit timeout
++ * -E: ACK missing
++ * -ETIMEDOUT: receive timeout
++ * -EINVAL: illegal parameters
++ * -EBUSY: bus is busy and couldn't be aquired
++ */
++int pxa_pwr_i2c_transfer(struct i2c_msg *msg)
++{
++ int ret;
++
++ if (!msg)
++ goto transfer_error_msg_empty;
++
++ switch (msg->direction) {
++ case I2C_WRITE:
++ /* check if bus is not busy */
++/* if (!pxa_pwr_i2c_isr_set_cleared(0, (ISR_IBB | ISR_UB))) */
++/* goto transfer_error_bus_busy; */
++
++ /* start transmission */
++ PWRICR &= ~ICR_START;
++ PWRICR &= ~ICR_STOP;
++ PWRIDBR = msg->data;
++ if (msg->condition == I2C_COND_START)
++ PWRICR |= ICR_START;
++ if (msg->condition == I2C_COND_STOP)
++ PWRICR |= ICR_STOP;
++ if (msg->acknack == I2C_ACKNAK_SENDNAK)
++ PWRICR |= ICR_ACKNAK;
++ if (msg->acknack == I2C_ACKNAK_SENDACK)
++ PWRICR &= ~ICR_ACKNAK;
++ PWRICR &= ~ICR_ALDIE;
++ PWRICR |= ICR_TB;
++
++ /* transmit register empty? */
++ if (!pxa_pwr_i2c_isr_set_cleared(ISR_ITE, 0))
++ goto transfer_error_transmit_timeout;
++
++ /* clear 'transmit empty' state */
++ PWRISR |= ISR_ITE;
++
++ /* wait for ACK from slave */
++ if (msg->acknack == I2C_ACKNAK_WAITACK)
++ if (!pxa_pwr_i2c_isr_set_cleared(0, ISR_ACKNAK))
++ goto transfer_error_ack_missing;
++ break;
++ case I2C_READ:
++ /* check if bus is not busy */
++/* if (!pxa_pwr_i2c_isr_set_cleared(0, ISR_IBB)) */
++/* goto transfer_error_bus_busy; */
++
++ /* start receive */
++ PWRICR &= ~ICR_START;
++ PWRICR &= ~ICR_STOP;
++ if (msg->condition == I2C_COND_START)
++ PWRICR |= ICR_START;
++ if (msg->condition == I2C_COND_STOP)
++ PWRICR |= ICR_STOP;
++ if (msg->acknack == I2C_ACKNAK_SENDNAK)
++ PWRICR |= ICR_ACKNAK;
++ if (msg->acknack == I2C_ACKNAK_SENDACK)
++ PWRICR &= ~ICR_ACKNAK;
++ PWRICR &= ~ICR_ALDIE;
++ PWRICR |= ICR_TB;
++
++ /* receive register full? */
++ if (!pxa_pwr_i2c_isr_set_cleared(ISR_IRF, 0))
++ goto transfer_error_receive_timeout;
++
++ msg->data = PWRIDBR;
++
++ /* clear 'receive empty' state */
++ PWRISR |= ISR_IRF;
++
++ break;
++ default:
++ goto transfer_error_illegal_param;
++
++ }
++
++ return 0;
++
++transfer_error_msg_empty:
++ pr_debug("%s: error: 'msg' is empty\n", __FUNCTION__);
++ ret = -1;
++ goto i2c_transfer_finish;
++
++transfer_error_transmit_timeout:
++ pr_debug("%s: error: transmit timeout\n", __FUNCTION__);
++ ret = -2;
++ goto i2c_transfer_finish;
++
++transfer_error_ack_missing:
++ pr_debug("%s: error: ACK missing\n", __FUNCTION__);
++ ret = -3;
++ goto i2c_transfer_finish;
++
++transfer_error_receive_timeout:
++ pr_debug("%s: error: receive timeout\n", __FUNCTION__);
++ ret = -4;
++ goto i2c_transfer_finish;
++
++transfer_error_illegal_param:
++ pr_debug("%s: error: illegal parameters\n", __FUNCTION__);
++ ret = -5;
++ goto i2c_transfer_finish;
++
++transfer_error_bus_busy:
++ pr_debug("%s: error: bus is busy\n", __FUNCTION__);
++ ret = -6;
++ goto i2c_transfer_finish;
++
++i2c_transfer_finish:
++ pr_debug("%s: ISR: 0x%04x\n", __FUNCTION__, ISR);
++ return ret;
++}
++
++/* ------------------------------------------------------------------------ */
++/* API Functions */
++/* ------------------------------------------------------------------------ */
++/**
++ * i2c_probe: - Test if a chip answers for a given i2c address
++ *
++ * @chip: address of the chip which is searched for
++ * @return: 0 if a chip was found, -1 otherwhise
++ */
++int pxa_pwr_i2c_probe(u8 chip)
++{
++ struct i2c_msg msg;
++ int ret;
++
++ pxa_pwr_i2c_reset();
++
++ msg.condition = I2C_COND_START;
++ msg.acknack = I2C_ACKNAK_WAITACK;
++ msg.direction = I2C_WRITE;
++ msg.data = (chip << 1) + 1;
++ if ((ret = pxa_pwr_i2c_transfer(&msg)))
++ return ret;
++
++ msg.condition = I2C_COND_STOP;
++ msg.acknack = I2C_ACKNAK_SENDNAK;
++ msg.direction = I2C_READ;
++ msg.data = 0x00;
++ if ((ret = pxa_pwr_i2c_transfer(&msg)))
++ return ret;
++
++ return 0;
++}
++
++/**
++ * i2c_read: - Read multiple bytes from an i2c device
++ *
++ * The higher level routines take into account that this function is only
++ * called with len < page length of the device (see configuration file)
++ *
++ * @chip: address of the chip which is to be read
++ * @addr: i2c data address within the chip
++ * @alen: length of the i2c data address (1..2 bytes)
++ * @buffer: where to write the data
++ * @len: how much byte do we want to read
++ * @return: 0 in case of success
++ */
++int pxa_pwr_i2c_read(u8 chip, uint addr, int alen, u8 * buffer, int len)
++{
++ struct i2c_msg msg;
++ u8 addr_bytes[3]; /* lowest...highest byte of data address */
++ int ret;
++
++ pr_debug("%s(chip=0x%02x, addr=0x%02x, alen=0x%02x, len=0x%02x)\n",
++ __FUNCTION__, chip, addr, alen, len);
++
++ pxa_pwr_i2c_reset();
++
++ /* dummy chip address write */
++ pr_debug("%s: dummy chip address write\n", __FUNCTION__);
++ msg.condition = I2C_COND_START;
++ msg.acknack = I2C_ACKNAK_WAITACK;
++ msg.direction = I2C_WRITE;
++ msg.data = (chip << 1);
++ msg.data &= 0xFE;
++ if ((ret = pxa_pwr_i2c_transfer(&msg)))
++ return ret;
++
++ /*
++ * send memory address bytes;
++ * alen defines how much bytes we have to send.
++ */
++ /*addr &= ((1 << CFG_EEPROM_PAGE_WRITE_BITS)-1); */
++ addr_bytes[0] = (u8) ((addr >> 0) & 0x000000FF);
++ addr_bytes[1] = (u8) ((addr >> 8) & 0x000000FF);
++ addr_bytes[2] = (u8) ((addr >> 16) & 0x000000FF);
++
++ while (--alen >= 0) {
++ pr_debug("%s: send memory word address byte %1d\n",
++ __FUNCTION__, alen);
++ msg.condition = I2C_COND_NORMAL;
++ msg.acknack = I2C_ACKNAK_WAITACK;
++ msg.direction = I2C_WRITE;
++ msg.data = addr_bytes[alen];
++ if ((ret = pxa_pwr_i2c_transfer(&msg)))
++ return ret;
++ }
++
++ /* start read sequence */
++ pr_debug("%s: start read sequence\n", __FUNCTION__);
++ msg.condition = I2C_COND_START;
++ msg.acknack = I2C_ACKNAK_WAITACK;
++ msg.direction = I2C_WRITE;
++ msg.data = (chip << 1);
++ msg.data |= 0x01;
++ if ((ret = pxa_pwr_i2c_transfer(&msg)))
++ return ret;
++
++ /* read bytes; send NACK at last byte */
++ while (len--) {
++ if (len == 0) {
++ msg.condition = I2C_COND_STOP;
++ msg.acknack = I2C_ACKNAK_SENDNAK;
++ } else {
++ msg.condition = I2C_COND_NORMAL;
++ msg.acknack = I2C_ACKNAK_SENDACK;
++ }
++
++ msg.direction = I2C_READ;
++ msg.data = 0x00;
++ if ((ret = pxa_pwr_i2c_transfer(&msg)))
++ return ret;
++
++ *buffer = msg.data;
++ pr_debug("%s: reading byte (0x%08x)=0x%02x\n",
++ __FUNCTION__, (unsigned int)buffer, *buffer);
++ buffer++;
++ }
++
++ pxa_pwr_i2c_reset();
++ return 0;
++}
++
++/**
++ * i2c_write: - Write multiple bytes to an i2c device
++ *
++ * The higher level routines take into account that this function is only
++ * called with len < page length of the device (see configuration file)
++ *
++ * @chip: address of the chip which is to be written
++ * @addr: i2c data address within the chip
++ * @alen: length of the i2c data address (1..2 bytes)
++ * @buffer: where to find the data to be written
++ * @len: how much byte do we want to read
++ * @return: 0 in case of success
++ */
++int pxa_pwr_i2c_write(u8 chip, uint addr, int alen, u8 * buffer, int len)
++{
++ struct i2c_msg msg;
++ u8 addr_bytes[3]; /* lowest...highest byte of data address */
++ int ret;
++
++ pr_debug("%s(chip=0x%02x, addr=0x%02x, alen=0x%02x, len=0x%02x)\n",
++ __FUNCTION__, chip, addr, alen, len);
++
++ pxa_pwr_i2c_reset();
++
++ /* chip address write */
++ pr_debug("%s: chip address write\n", __FUNCTION__);
++ msg.condition = I2C_COND_START;
++ msg.acknack = I2C_ACKNAK_WAITACK;
++ msg.direction = I2C_WRITE;
++ msg.data = (chip << 1);
++ msg.data &= 0xFE;
++ if ((ret = pxa_pwr_i2c_transfer(&msg)))
++ return ret;
++
++ /*
++ * send memory address bytes;
++ * alen defines how much bytes we have to send.
++ */
++ addr_bytes[0] = (u8) ((addr >> 0) & 0x000000FF);
++ addr_bytes[1] = (u8) ((addr >> 8) & 0x000000FF);
++ addr_bytes[2] = (u8) ((addr >> 16) & 0x000000FF);
++
++ while (--alen >= 0) {
++ pr_debug("%s: send memory word address\n", __FUNCTION__);
++ msg.condition = I2C_COND_NORMAL;
++ msg.acknack = I2C_ACKNAK_WAITACK;
++ msg.direction = I2C_WRITE;
++ msg.data = addr_bytes[alen];
++ if ((ret = pxa_pwr_i2c_transfer(&msg)))
++ return ret;
++ }
++
++ /* write bytes; send NACK at last byte */
++ while (len--) {
++ pr_debug("%s: writing byte (0x%08x)=0x%02x\n",
++ __FUNCTION__, (unsigned int)buffer, *buffer);
++
++ if (len == 0)
++ msg.condition = I2C_COND_STOP;
++ else
++ msg.condition = I2C_COND_NORMAL;
++
++ msg.acknack = I2C_ACKNAK_WAITACK;
++ msg.direction = I2C_WRITE;
++ msg.data = *(buffer++);
++
++ if ((ret = pxa_pwr_i2c_transfer(&msg)))
++ return ret;
++ }
++
++ pxa_pwr_i2c_reset();
++ return 0;
++}
++
++/**
++ * pxa_pwr_i2c_reg_read: - Read single byte from an i2c device
++ *
++ * @chip: address of the chip which is to be read
++ * @reg: i2c data address within the chip
++ * @return: data in case of success, negative error code otherwise
++ */
++s32 pxa_pwr_i2c_reg_read(u8 chip, u8 reg)
++{
++ char buf;
++ int ret;
++
++ pr_debug("%s(chip=0x%02x, reg=0x%02x)\n", __FUNCTION__, chip, reg);
++ ret = pxa_pwr_i2c_read(chip, reg, 1, &buf, 1);
++ if (ret == 0)
++ ret = buf;
++
++ return ret;
++}
++
++/**
++ * pxa_pwr_i2c_reg_write: - Write multiple bytes to an i2c device
++ *
++ * The higher level routines take into account that this function is only
++ * called with len < page length of the device (see configuration file)
++ *
++ * @chip: address of the chip which is to be written
++ * @reg: i2c data address within the chip
++ * @return: 0 in case of success, negative error code otherwise
++ */
++s32 pxa_pwr_i2c_reg_write(u8 chip, u8 reg, u8 val)
++{
++ pr_debug("%s(chip=0x%02x, reg=0x%02x, val=0x%02x)\n",
++ __FUNCTION__, chip, reg, val);
++ return pxa_pwr_i2c_write(chip, reg, 1, &val, 1);
++}
++
++MODULE_DESCRIPTION("PXA Power I2C");
++MODULE_AUTHOR("Mike Rapoport");
++MODULE_LICENSE("GPL");
+diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
+index 203371a..36b695f 100644
+--- a/arch/arm/mach-pxa/pxa27x.c
++++ b/arch/arm/mach-pxa/pxa27x.c
+@@ -243,7 +243,11 @@ void pxa27x_cpu_pm_enter(suspend_state_t state)
+ case PM_SUSPEND_MEM:
+ /* set resume return address */
+ PSPR = virt_to_phys(pxa_cpu_resume);
+- pxa27x_cpu_suspend(PWRMODE_SLEEP);
++#ifdef CONFIG_MACH_EM_X270
++ pxa27x_cpu_suspend(PWRMODE_DEEPSLEEP);
++#else
++ pxa27x_cpu_suspend(PWRMODE_SLEEP);
++#endif
+ break;
+ }
+ }
+diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
+index bae47e1..a16e532 100644
+--- a/arch/arm/mach-pxa/spitz.c
++++ b/arch/arm/mach-pxa/spitz.c
+@@ -349,6 +349,32 @@ static struct pxamci_platform_data spitz_mci_platform_data = {
+
+
+ /*
++ * USB Client (Gadget/UDC)
++ */
++static void spitz_udc_command(int cmd)
++{
++ switch(cmd) {
++ case PXA2XX_UDC_CMD_CONNECT:
++ UP2OCR = UP2OCR_HXOE | UP2OCR_DMPUE | UP2OCR_DMPUBE;
++ break;
++ case PXA2XX_UDC_CMD_DISCONNECT:
++ //UP2OCR = UP2OCR_HXOE | UP2OCR_DMPUE | UP2OCR_DMPUBE;
++ break;
++ }
++}
++
++static int spitz_udc_detect(void)
++{
++ return 1;
++}
++
++static struct pxa2xx_udc_mach_info spitz_udc_info __initdata = {
++ .udc_is_connected = spitz_udc_detect,
++ .udc_command = spitz_udc_command,
++};
++
++
++/*
+ * USB Host (OHCI)
+ */
+ static int spitz_ohci_init(struct device *dev)
+@@ -499,6 +525,7 @@ static void __init common_init(void)
+ pxa_gpio_mode(SPITZ_GPIO_HSYNC | GPIO_IN);
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
++ pxa_set_udc_info(&spitz_udc_info);
+ pxa_set_mci_info(&spitz_mci_platform_data);
+ pxa_set_ohci_info(&spitz_ohci_platform_data);
+ pxa_set_ficp_info(&spitz_ficp_platform_data);
+diff --git a/drivers/i2c/chips/Kconfig b/drivers/i2c/chips/Kconfig
+index 2e1c24f..f80f2b1 100644
+--- a/drivers/i2c/chips/Kconfig
++++ b/drivers/i2c/chips/Kconfig
+@@ -163,4 +163,17 @@ config MENELAUS
+ and other features that are often used in portable devices like
+ cell phones and PDAs.
+
++config DA9030
++ tristate "Dialog Semiconductor DA9030 power management chip"
++ depends on EXPERIMENTAL && EMBEDDED
++ help
++ If you say yes here you get support for the Dialog
++ Semiconductor DA9030 power management chip.
++ This includes voltage regulators, lithium ion/polymer battery
++ charging, and other features that are often used in portable
++ devices like PDAs, cell phones and cameras.
++
++ This driver can also be built as a module. If so, the module
++ will be called da9030.
++
+ endmenu
+diff --git a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile
+index ca924e1..69f545c 100644
+--- a/drivers/i2c/chips/Makefile
++++ b/drivers/i2c/chips/Makefile
+@@ -15,6 +15,7 @@ obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
+ obj-$(CONFIG_TPS65010) += tps65010.o
+ obj-$(CONFIG_MENELAUS) += menelaus.o
+ obj-$(CONFIG_SENSORS_TSL2550) += tsl2550.o
++obj-$(CONFIG_DA9030) += da9030.o
+
+ ifeq ($(CONFIG_I2C_DEBUG_CHIP),y)
+ EXTRA_CFLAGS += -DDEBUG
+diff --git a/drivers/i2c/chips/da9030.c b/drivers/i2c/chips/da9030.c
+new file mode 100644
+index 0000000..9791272
+--- /dev/null
++++ b/drivers/i2c/chips/da9030.c
+@@ -0,0 +1,1213 @@
++/*
++ * Dialog Semiconductor DA9030 power management IC driver
++ *
++ * Copyright (C) 2007 Compulab, Ltd.
++ * Mike Rapoport <mike@compulab.co.il>
++ *
++ * Some parts based on menelaus.c:
++ * Copyright (C) 2004 Texas Instruments, Inc.
++ * Copyright (C) 2005, 2006 Nokia Corporation
++ *
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file COPYING in the main directory of this archive for
++ * more details.
++ */
++
++#include <linux/module.h>
++#include <linux/ctype.h>
++#include <linux/uaccess.h>
++#include <linux/i2c.h>
++#include <linux/irq.h>
++#include <linux/interrupt.h>
++#include <linux/da9030.h>
++#include <linux/kernel_stat.h>
++#include <linux/random.h>
++#include <linux/mutex.h>
++
++#include <linux/debugfs.h>
++#include <linux/seq_file.h>
++
++#include "da9030.h"
++
++#define DRIVER_NAME "da9030"
++
++static unsigned short normal_i2c[] = { 0x49, I2C_CLIENT_END };
++
++I2C_CLIENT_INSMOD;
++
++struct da9030 {
++ struct mutex lock;
++ struct i2c_client *client;
++
++ struct work_struct event_work;
++
++ /* there are 24 interrupts */
++ void (*callbacks[24])(int event, void *data);
++ void *callbacks_data[24];
++
++ struct dentry *debug_file;
++};
++
++/* I hardly believe there can be more than 1 such chip in the system,
++ so keeping its global instance won't really hurt */
++static struct da9030 *the_da9030;
++
++unsigned char defined_regs[] = {
++ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a,
++ 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b,
++ 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
++ 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a,
++ 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b,
++ 0x50, 0x51,
++ 0x60, 0x61, 0x62, 0x63,
++ 0x80, 0x81,
++ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b,
++ 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6,
++ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba,
++};
++
++static inline int is_reg_valid(u32 reg)
++{
++ int i;
++ for (i = 0; i < ARRAY_SIZE(defined_regs); i++)
++ if (reg == defined_regs[i])
++ return 1;
++
++ return 0;
++}
++
++s32 da9030_get_reg(u32 reg)
++{
++ if (!is_reg_valid(reg))
++ return -EINVAL;
++
++ return i2c_smbus_read_byte_data(the_da9030->client, reg);
++}
++EXPORT_SYMBOL(da9030_get_reg);
++
++s32 da9030_set_reg(u32 reg, u8 val)
++{
++ if (!is_reg_valid(reg))
++ return -EINVAL;
++
++ return i2c_smbus_write_byte_data(the_da9030->client, reg, val);
++}
++EXPORT_SYMBOL(da9030_set_reg);
++
++static s32 da9030_update_reg_bits(u32 reg, int bits, int shift, int val)
++{
++ int ret;
++ int new_val;
++
++ mutex_lock(&the_da9030->lock);
++ ret = da9030_get_reg(reg);
++ if (ret < 0)
++ goto out;
++
++ new_val = reg & ~(((1 << bits) - 1) << shift);
++ new_val |= (val << shift);
++
++ ret = da9030_set_reg(reg, new_val);
++ mutex_unlock(&the_da9030->lock);
++
++out:
++ return ret;
++}
++
++int da9030_get_status(void)
++{
++ s32 ret;
++
++ mutex_lock(&the_da9030->lock);
++ ret = da9030_get_reg(STATUS);
++ mutex_unlock(&the_da9030->lock);
++
++ return ret;
++}
++EXPORT_SYMBOL(da9030_get_status);
++
++int da9030_get_fault_log(void)
++{
++ s32 ret;
++
++ mutex_lock(&the_da9030->lock);
++ ret = da9030_get_reg(FAULT_LOG);
++ mutex_unlock(&the_da9030->lock);
++
++ return ret;
++}
++EXPORT_SYMBOL(da9030_get_fault_log);
++
++void da9030_read_adc(struct da9030_adc_res *adc)
++{
++ mutex_lock(&the_da9030->lock);
++
++ adc->vbat_res = da9030_get_reg(VBAT_RES);
++ adc->vbatmin_res = da9030_get_reg(VBATMIN_RES);
++ adc->vbatmintxon = da9030_get_reg(VBATMINTXON_RES);
++ adc->ichmax_res = da9030_get_reg(ICHMAX_RES);
++ adc->ichmin_res = da9030_get_reg(ICHMIN_RES);
++ adc->ichaverage_res = da9030_get_reg(ICHAVERAGE_RES);
++ adc->vchmax_res = da9030_get_reg(VCHMAX_RES);
++ adc->vchmin_res = da9030_get_reg(VCHMIN_RES);
++ adc->tbat_res = da9030_get_reg(TBAT_RES);
++ adc->adc_in4_res = da9030_get_reg(ADC_IN4_RES);
++ adc->adc_in5_res = da9030_get_reg(ADC_IN5_RES);
++
++ mutex_unlock(&the_da9030->lock);
++}
++EXPORT_SYMBOL(da9030_read_adc);
++
++void da9030_enable_adc(void)
++{
++ /* enable automatic A/D measurements */
++ mutex_lock(&the_da9030->lock);
++
++ da9030_set_reg(ADC_MAN_CONTROL,
++ ADC_LDO_INT_ENABLE | ADC_TBATREF_ENABLE);
++ da9030_set_reg(ADC_MAN_CONTROL_1,
++ ADC_LDO_INT_ENABLE | ADC_TBATREF_ENABLE);
++ da9030_set_reg(ADC_AUTO_CONTROL_1,
++ ADC_TBAT_ENABLE | ADC_VBAT_IN_TXON | ADC_VCH_ENABLE |
++ ADC_ICH_ENABLE | ADC_VBAT_ENABLE |
++ ADC_AUTO_SLEEP_ENABLE);
++ da9030_set_reg(ADC_AUTO_CONTROL,
++ ADC_TBAT_ENABLE | ADC_VBAT_IN_TXON | ADC_VCH_ENABLE |
++ ADC_ICH_ENABLE | ADC_VBAT_ENABLE |
++ ADC_AUTO_SLEEP_ENABLE);
++
++ mutex_unlock(&the_da9030->lock);
++}
++EXPORT_SYMBOL(da9030_enable_adc);
++
++void da9030_set_wled(int on, unsigned int brightness)
++{
++ u8 val;
++
++ mutex_lock(&the_da9030->lock);
++
++ if (on)
++ val = WLED_CP_ENABLE | (brightness & 0x7);
++ else
++ val = da9030_get_reg(WLED_CONTROL) & ~WLED_CP_ENABLE;
++
++ da9030_set_reg(WLED_CONTROL, val);
++
++ mutex_unlock(&the_da9030->lock);
++}
++EXPORT_SYMBOL(da9030_set_wled);
++
++int da9030_set_charger(int on, unsigned int mA, unsigned int mV)
++{
++ int ret;
++ u8 val = 0;
++ if (on) {
++ if (mA >= 1500 || mV < 4000 || mV > 4350)
++ return -EINVAL;
++
++ val = CHRG_CHARGER_ENABLE;
++ val |= (mA / 100) << 3;
++ val |= (mV - 4000) / 50;
++ }
++
++ mutex_lock(&the_da9030->lock);
++ ret = da9030_set_reg(CHARGE_CONTROL, val);
++ mutex_unlock(&the_da9030->lock);
++
++ return ret;
++}
++EXPORT_SYMBOL(da9030_set_charger);
++
++void da9030_get_charger(int *on, unsigned int *mA, unsigned int *mV)
++{
++ s32 val;
++
++ mutex_lock(&the_da9030->lock);
++
++ val = da9030_get_reg(CHARGE_CONTROL);
++
++ mutex_unlock(&the_da9030->lock);
++
++ if (on)
++ *on = (val & CHRG_CHARGER_ENABLE) ? 1 : 0;
++
++ if (mA)
++ *mA = ((val >> 3) & 0xf) * 100;
++
++ if (mV)
++ *mV = (val & 0x7) * 50 + 4000;
++}
++EXPORT_SYMBOL(da9030_get_charger);
++
++int da9030_set_led(int led, int on,
++ enum da9030_led_rate rate,
++ enum da9030_led_duty_cycle duty,
++ enum da9030_led_pwm_chop pwm_chop)
++{
++ int reg;
++ int ret;
++
++ u8 val = 0;
++
++ if (led > 4)
++ return -EINVAL;
++
++ reg = LED_1_CONTROL + led;
++ if (on) {
++ val = LED_ENABLE;
++ val |= (rate & 0x3) << 5;
++ val |= (duty & 0x3) << 3;
++ val |= (pwm_chop & 0x7);
++ }
++
++ mutex_lock(&the_da9030->lock);
++ ret = da9030_set_reg(reg, val);
++ mutex_unlock(&the_da9030->lock);
++
++ return ret;
++}
++EXPORT_SYMBOL(da9030_set_led);
++
++void da9030_set_thresholds(unsigned int tbathighp, unsigned int tbathighn,
++ unsigned int tbatlow, unsigned int vbatmon)
++{
++ mutex_lock(&the_da9030->lock);
++
++ da9030_set_reg(TBATHIGHP, tbathighp);
++ da9030_set_reg(TBATHIGHN, tbathighn);
++ da9030_set_reg(TBATLOW, tbatlow);
++ da9030_set_reg(VBATMONTXON, vbatmon);
++ da9030_set_reg(VBATMON, vbatmon);
++
++ da9030_set_reg(TBATHIGHP_1, tbathighp);
++ da9030_set_reg(TBATHIGHN_1, tbathighn);
++ da9030_set_reg(TBATLOW_1, tbatlow);
++ da9030_set_reg(VBATMONTXMON_1, vbatmon);
++ da9030_set_reg(VBATMON_1, vbatmon);
++
++ mutex_unlock(&the_da9030->lock);
++}
++EXPORT_SYMBOL(da9030_set_thresholds);
++
++struct da9030_vtg_value {
++ u16 vtg;
++ u16 val;
++};
++
++struct da9030_vtg_value da9030_vtg_1V8_3V2[] = {
++ {1800, 0x0},
++ {1900, 0x1},
++ {2000, 0x2},
++ {2100, 0x3},
++ {2200, 0x4},
++ {2300, 0x5},
++ {2400, 0x6},
++ {2500, 0x7},
++ {2600, 0x8},
++ {2700, 0x9},
++ {2800, 0xa},
++ {2900, 0xb},
++ {3000, 0xc},
++ {3100, 0xd},
++ {3200, 0xe},
++ {3200, 0xf},
++};
++
++struct da9030_vtg_value da9030_vtg_1V1_2V65[] = {
++ {1100, 0x0},
++ {1150, 0x1},
++ {1200, 0x2},
++ {1250, 0x3},
++ {1300, 0x4},
++ {1350, 0x5},
++ {1400, 0x6},
++ {1450, 0x7},
++ {1500, 0x8},
++ {1550, 0x9},
++ {1600, 0xa},
++ {1650, 0xb},
++ {1700, 0xc},
++ {1750, 0xd},
++ {1800, 0xe},
++ {1850, 0xf},
++ {1900, 0x10},
++ {1950, 0x11},
++ {2000, 0x12},
++ {2050, 0x13},
++ {2100, 0x14},
++ {2150, 0x15},
++ {2200, 0x16},
++ {2250, 0x17},
++ {2300, 0x18},
++ {2350, 0x19},
++ {2400, 0x1a},
++ {2450, 0x1b},
++ {2500, 0x1c},
++ {2550, 0x1d},
++ {2600, 0x1e},
++ {2650, 0x1f},
++};
++
++struct da9030_vtg_value da9030_vtg_2V76_2V94[] = {
++ {2760, 0x7},
++ {2790, 0x6},
++ {2820, 0x5},
++ {2850, 0x4},
++ {2850, 0x3},
++ {2880, 0x1},
++ {2910, 0x2},
++ {2940, 0x3},
++};
++
++struct da9030_vtg_value da9030_vtg_0V85_1V625[] = {
++ {850, 0x0},
++ {875, 0x1},
++ {900, 0x2},
++ {925, 0x3},
++ {950, 0x4},
++ {975, 0x5},
++ {1000, 0x6},
++ {1025, 0x7},
++ {1050, 0x8},
++ {1075, 0x9},
++ {1100, 0xa},
++ {1125, 0xb},
++ {1150, 0xc},
++ {1175, 0xd},
++ {1200, 0xe},
++ {1225, 0xf},
++ {1250, 0x10},
++ {1275, 0x11},
++ {1300, 0x12},
++ {1325, 0x13},
++ {1350, 0x14},
++ {1375, 0x15},
++ {1400, 0x16},
++ {1425, 0x17},
++ {1450, 0x18},
++ {1475, 0x19},
++ {1500, 0x1a},
++ {1525, 0x1b},
++ {1550, 0x1c},
++ {1575, 0x1d},
++ {1600, 0x1e},
++ {1625, 0x1f},
++};
++
++struct ldo_param {
++ u8 reg;
++ u8 shift;
++ u8 bits;
++};
++
++struct da9030_ldo {
++ const char *name;
++
++ struct ldo_param vtg;
++ struct ldo_param sleep;
++ struct ldo_param lock;
++
++ /* several LDOs have two enable/disable bits */
++ struct ldo_param enable[2];
++
++ struct da9030_vtg_value *values;
++ int values_count;
++};
++
++static struct da9030_ldo da9030_ldos[] = {
++ [0] = {
++ .name = "LDO1",
++ .vtg = {
++ .reg = LDO_1,
++ .shift = 0,
++ .bits = 5,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_97,
++ .shift = 1,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = LDO_1,
++ .shift = 5,
++ .bits = 2,
++ },
++ .lock = {
++ .reg = REG_SLEEP_CONTROL1,
++ .shift = 0,
++ .bits = 2,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [1] = {
++ .name = "LDO2",
++ .vtg = {
++ .reg = LDO_2_3,
++ .shift = 0,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_97,
++ .shift = 2,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = REG_SLEEP_CONTROL1,
++ .shift = 2,
++ .bits = 2,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [2] = {
++ .name = "LDO3",
++ .vtg = {
++ .reg = LDO_2_3,
++ .shift = 4,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_97,
++ .shift = 3,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = REG_SLEEP_CONTROL1,
++ .shift = 4,
++ .bits = 2,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [3] = {
++ .name = "LDO4",
++ .vtg = {
++ .reg = LDO_4_5,
++ .shift = 0,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_97,
++ .shift = 4,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = REG_SLEEP_CONTROL1,
++ .shift = 6,
++ .bits = 2,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [4] = {
++ .name = "LDO5",
++ .vtg = {
++ .reg = LDO_4_5,
++ .shift = 4,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_97,
++ .shift = 5,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = REG_SLEEP_CONTROL2,
++ .shift = 0,
++ .bits = 2,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [5] = {
++ .name = "LDO6",
++ .vtg = {
++ .reg = LDO_6_SIMCP,
++ .shift = 0,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_97,
++ .shift = 6,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [6] = {
++ .name = "LDO7",
++ .vtg = {
++ .reg = LDO_7_8,
++ .shift = 0,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_97,
++ .shift = 7,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = REG_SLEEP_CONTROL2,
++ .shift = 2,
++ .bits = 2,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [7] = {
++ .name = "LDO8",
++ .vtg = {
++ .reg = LDO_7_8,
++ .shift = 4,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_2_98,
++ .shift = 0,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = REG_SLEEP_CONTROL2,
++ .shift = 4,
++ .bits = 2,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [8] = {
++ .name = "LDO9",
++ .vtg = {
++ .reg = LDO_9_12,
++ .shift = 0,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_2_98,
++ .shift = 1,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = REG_SLEEP_CONTROL2,
++ .shift = 6,
++ .bits = 2,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [9] = {
++ .name = "LDO10",
++ .vtg = {
++ .reg = LDO_10_11,
++ .shift = 0,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_17,
++ .shift = 1,
++ .bits = 1,
++ },
++ .enable[1] = {
++ .reg = REG_CONTROL_2_98,
++ .shift = 2,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [10] = {
++ .name = "LDO11",
++ .vtg = {
++ .reg = LDO_10_11,
++ .shift = 4,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_17,
++ .shift = 2,
++ .bits = 1,
++ },
++ .enable[1] = {
++ .reg = REG_CONTROL_2_98,
++ .shift = 3,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [11] = {
++ .name = "LDO12",
++ .vtg = {
++ .reg = LDO_9_12,
++ .shift = 4,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_2_98,
++ .shift = 4,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = REG_SLEEP_CONTROL3,
++ .shift = 0,
++ .bits = 2,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [12] = {
++ .name = "LDO13",
++ .vtg = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_17,
++ .shift = 3,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .values = NULL,
++ .values_count = 0,
++ },
++ [13] = {
++ .name = "LDO14",
++ .vtg = {
++ .reg = LDO_14_16,
++ .shift = 0,
++ .bits = 3,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_17, /* FIXME: or 2_98? */
++ .shift = 4,
++ .bits = 1,
++ },
++ .enable[1] = {
++ .reg = REG_CONTROL_2_98, /* FIXME: or 2_98? */
++ .shift = 5,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .values = da9030_vtg_2V76_2V94,
++ .values_count = ARRAY_SIZE(da9030_vtg_2V76_2V94),
++ },
++ [14] = {
++ .name = "LDO15",
++ .vtg = {
++ .reg = LDO_15,
++ .shift = 0,
++ .bits = 5,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_17,
++ .shift = 5,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .lock = {
++ .reg = LDO_15,
++ .shift = 5,
++ .bits = 3,
++ },
++ .values = da9030_vtg_1V1_2V65,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V1_2V65),
++ },
++ [15] = {
++ .name = "LDO16",
++ .vtg = {
++ .reg = LDO_14_16,
++ .shift = 3,
++ .bits = 5,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_17,
++ .shift = 6,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .values = da9030_vtg_1V1_2V65,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V1_2V65),
++ },
++ [16] = {
++ .name = "LDO17",
++ .vtg = {
++ .reg = LDO_17_SIMCP0,
++ .shift = 0,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_1_17,
++ .shift = 7,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [17] = {
++ .name = "LDO18",
++ .vtg = {
++ .reg = LDO_18_19,
++ .shift = 0,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_2_18,
++ .shift = 2,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++ [18] = {
++ .name = "LDO19",
++ .vtg = {
++ .reg = LDO_18_19,
++ .shift = 4,
++ .bits = 4,
++ },
++ .enable[0] = {
++ .reg = REG_CONTROL_2_18,
++ .shift = 1,
++ .bits = 1,
++ },
++ .sleep = {
++ .reg = 0,
++ .shift = 0,
++ .bits = 0,
++ },
++ .values = da9030_vtg_1V8_3V2,
++ .values_count = ARRAY_SIZE(da9030_vtg_1V8_3V2),
++ },
++};
++
++static int da9030_get_vtg_value(int vtg, const struct da9030_vtg_value *tbl,
++ int n)
++{
++ int i;
++
++ for (i = 0; i < n; i++, tbl++)
++ if (tbl->vtg == vtg)
++ return tbl->val;
++ return -EINVAL;
++}
++
++static int da9030_set_ldo_volt(struct da9030_ldo *ldo, unsigned int mV)
++{
++ int val;
++
++ val = da9030_get_vtg_value(mV, ldo->values, ldo->values_count);
++ if (val < 0)
++ return val;
++
++ return da9030_update_reg_bits(ldo->vtg.reg, ldo->vtg.bits,
++ ldo->vtg.shift, val);
++}
++
++static int da9030_enable_ldo(struct da9030_ldo *ldo, int enable)
++{
++ int ret;
++
++ ret = da9030_update_reg_bits(ldo->enable[0].reg, ldo->enable[1].bits,
++ ldo->enable[0].shift, enable);
++
++ if (ret < 0)
++ return ret;
++
++ if (unlikely(ldo->enable[1].reg != 0))
++ ret = da9030_update_reg_bits(ldo->enable[1].reg,
++ ldo->enable[1].bits,
++ ldo->enable[1].shift, enable);
++
++ return ret;
++}
++
++static int da9030_set_ldo_sleep(struct da9030_ldo *ldo,
++ enum da9030_ldo_sleep_mode sleep_mode)
++{
++ return da9030_update_reg_bits(ldo->sleep.reg, ldo->sleep.bits,
++ ldo->sleep.shift, sleep_mode);
++}
++
++int da9030_set_ldo(int ldo_num, int on, unsigned int mV,
++ enum da9030_ldo_sleep_mode sleep_mode)
++{
++ struct da9030_ldo *ldo;
++ int ret;
++
++ if (ldo_num < 0 || ldo_num > ARRAY_SIZE(da9030_ldos))
++ return -EINVAL;
++
++ ldo = &da9030_ldos[ldo_num];
++
++ ret = da9030_set_ldo_volt(ldo, mV);
++ if (ret < 0)
++ return ret;
++
++ ret = da9030_enable_ldo(ldo, on);
++ if (ret < 0)
++ return ret;
++
++ ret = da9030_set_ldo_sleep(ldo, sleep_mode);
++ if (ret < 0)
++ return ret;
++
++ return 0;
++}
++EXPORT_SYMBOL(da9030_set_ldo);
++
++int da9030_set_buck(int buck, int on, unsigned int mV, int flags)
++{
++ /* FIXME: implement */
++ return 0;
++}
++EXPORT_SYMBOL(da9030_set_buck);
++
++static void da9030_disable_irq(unsigned int irq)
++{
++ int reg, val;
++
++ if (irq < 8) {
++ reg = IRQ_MASK_A;
++ val = 1 << irq;
++ } else if (irq < 16) {
++ reg = IRQ_MASK_B;
++ val = 1 << (irq - 8);
++ } else {
++ reg = IRQ_MASK_C;
++ val = 1 << (irq - 16);
++ }
++
++ i2c_smbus_write_byte_data(
++ the_da9030->client, reg,
++ i2c_smbus_read_byte_data(the_da9030->client, reg) | val);
++}
++
++static void da9030_enable_irq(unsigned int irq)
++{
++ int reg, val;
++
++ if (irq < 8) {
++ reg = IRQ_MASK_A;
++ val = 1 << irq;
++ } else if (irq < 16) {
++ reg = IRQ_MASK_B;
++ val = 1 << (irq - 8);
++ } else {
++ reg = IRQ_MASK_C;
++ val = 1 << (irq - 16);
++ }
++
++ i2c_smbus_write_byte_data(
++ the_da9030->client, reg,
++ i2c_smbus_read_byte_data(the_da9030->client, reg) & ~val);
++}
++
++int da9030_register_callback(int event,
++ void (*callback)(int event, void *data),
++ void *data)
++{
++ int ret;
++
++ if (event < 0 || event > 23)
++ return -EINVAL;
++
++ mutex_lock(&the_da9030->lock);
++ if (the_da9030->callbacks[event])
++ ret = -EBUSY;
++ else {
++ the_da9030->callbacks[event] = callback;
++ the_da9030->callbacks_data[event] = data;
++ da9030_enable_irq(event);
++ ret = 0;
++ }
++ mutex_unlock(&the_da9030->lock);
++
++ return ret;
++}
++EXPORT_SYMBOL(da9030_register_callback);
++
++void da9030_unregister_callback(int event)
++{
++ mutex_lock(&the_da9030->lock);
++
++ da9030_disable_irq(event);
++ the_da9030->callbacks[event] = NULL;
++ the_da9030->callbacks_data[event] = 0;
++
++ mutex_unlock(&the_da9030->lock);
++}
++EXPORT_SYMBOL(da9030_unregister_callback);
++
++#ifdef CONFIG_DEBUG_FS
++#define MAX_BUF 256
++
++static int da9030_debug_show(struct seq_file *s, void *data)
++{
++ int i, res = 0;
++ struct da9030 *da9030 = s->private;
++ struct i2c_client *client = da9030->client;
++
++ seq_printf(s, "DA9030 state: da = %p, cl = %p, s->private = %p\n",
++ da9030, client, s->private);
++
++ for (i = 0; i < ARRAY_SIZE(defined_regs); i++) {
++ res = i2c_smbus_read_byte_data(client, defined_regs[i]);
++ seq_printf(s, "%02x %x\n", defined_regs[i], res);
++ }
++ return 0;
++}
++
++static int da9030_debug_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, da9030_debug_show, inode->i_private);
++}
++
++ssize_t da9030_debug_write(struct file *f, const char __user *buf, size_t len,
++ loff_t *off)
++{
++ char buffer[MAX_BUF];
++ int reg, val;
++ char *endp;
++ struct da9030 *da9030 = ((struct seq_file *)f->private_data)->private;
++ struct i2c_client *client = da9030->client;
++
++ if (len > MAX_BUF) {
++ printk(KERN_INFO "%s: large buffer\n", __FUNCTION__);
++ len = MAX_BUF;
++ }
++
++ if (copy_from_user(buffer, buf, len)) {
++ printk(KERN_INFO "%s: copy_from_user failed\n", __FUNCTION__);
++ return -EFAULT;
++ }
++ buffer[len] = '\0';
++
++ reg = simple_strtoul(buffer, &endp, 0);
++ while (endp && isspace(*endp))
++ endp++;
++
++ val = simple_strtoul(endp, 0, 0);
++
++ i2c_smbus_write_byte_data(client, reg, val);
++
++ return len;
++}
++
++static const struct file_operations debug_fops = {
++ .open = da9030_debug_open,
++ .read = seq_read,
++ .write = da9030_debug_write,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static struct dentry *da9030_create_debugfs(struct da9030 *da9030)
++{
++ da9030->debug_file = debugfs_create_file("da9030", 0666, 0, da9030,
++ &debug_fops);
++ return da9030->debug_file;
++}
++
++static void da9030_remove_debugfs(struct da9030 *da9030)
++{
++ debugfs_remove(da9030->debug_file);
++}
++#else
++#define da9030_create_debugfs(x) NULL
++#define da9030_remove_debugfs(x) do {} while (0)
++#endif
++
++static irqreturn_t da9030_irq(int irq, void *_da9030)
++{
++ struct da9030 *da9030 = _da9030;
++
++ (void)schedule_work(&da9030->event_work);
++
++ return IRQ_HANDLED;
++}
++
++static void da9030_irq_worker(struct work_struct *work)
++{
++ struct da9030 *da9030 = container_of(work, struct da9030, event_work);
++ void (*callback)(int event, void *data);
++ u32 pending = 0;
++ u32 mask = 0;
++ int i;
++
++ while (1) {
++ pending = (i2c_smbus_read_byte_data(da9030->client,
++ EVENT_A)) |
++ ((i2c_smbus_read_byte_data(da9030->client,
++ EVENT_B)) << 8) |
++ ((i2c_smbus_read_byte_data(da9030->client,
++ EVENT_C)) << 16);
++
++ mask = (i2c_smbus_read_byte_data(da9030->client,
++ IRQ_MASK_A)) |
++ ((i2c_smbus_read_byte_data(da9030->client,
++ IRQ_MASK_B)) << 8) |
++ ((i2c_smbus_read_byte_data(da9030->client,
++ IRQ_MASK_C)) << 16);
++ pending &= ~mask;
++
++ if (!pending)
++ return;
++
++ while (pending) {
++ i = __ffs(pending);
++ callback = da9030->callbacks[i];
++ if (callback)
++ callback(i, da9030->callbacks_data[i]);
++ pending &= ~(1 << i);
++ }
++ }
++}
++
++static inline void da9030_disable_interrupts(struct da9030 *da9030)
++{
++ /* clear pending interruts */
++ (void)i2c_smbus_read_byte_data(da9030->client, EVENT_A);
++ (void)i2c_smbus_read_byte_data(da9030->client, EVENT_B);
++ (void)i2c_smbus_read_byte_data(da9030->client, EVENT_C);
++
++ /* disable interrupts */
++ i2c_smbus_write_byte_data(da9030->client, IRQ_MASK_A, 0xff);
++ i2c_smbus_write_byte_data(da9030->client, IRQ_MASK_B, 0xff);
++ i2c_smbus_write_byte_data(da9030->client, IRQ_MASK_C, 0xff);
++}
++
++static int da9030_probe(struct i2c_client *client)
++{
++ int ret;
++ struct da9030 *da9030;
++
++ if (the_da9030) {
++ dev_dbg(&client->dev, "only one %s for now\n",
++ DRIVER_NAME);
++ return -ENODEV;
++ }
++
++ ret = i2c_smbus_read_byte_data(client, CHIP_ID);
++
++ dev_info(&client->dev, "initialized chip revision %x\n", ret);
++
++ da9030 = kzalloc(sizeof(struct da9030), GFP_KERNEL);
++ if (da9030 == NULL) {
++ dev_err(&client->dev, "insufficient memory\n");
++ return -ENOMEM;
++ }
++ the_da9030 = da9030;
++ da9030->client = client;
++
++ mutex_init(&the_da9030->lock);
++
++ da9030_disable_interrupts(da9030);
++ INIT_WORK(&da9030->event_work, da9030_irq_worker);
++
++ ret = request_irq(client->irq, da9030_irq,
++ IRQF_DISABLED, DRIVER_NAME, da9030);
++
++ if (ret) {
++ kfree(da9030);
++ dev_err(&client->dev,
++ "failed to allocate irq %d\n",
++ client->irq);
++ return ret;
++ }
++
++ i2c_set_clientdata(client, da9030);
++
++ da9030->debug_file = da9030_create_debugfs(da9030);
++
++ return 0;
++}
++
++/* static int da9030_detach_adapter(struct i2c_adapter *a) */
++static int da9030_remove(struct i2c_client *client)
++{
++ struct da9030 *da9030 = i2c_get_clientdata(client);
++
++ da9030_remove_debugfs(da9030);
++
++ free_irq(da9030->client->irq, da9030);
++ kfree(da9030);
++ i2c_set_clientdata(client, NULL);
++ the_da9030 = NULL;
++
++ return 0;
++}
++
++static struct i2c_driver da9030_driver = {
++ .driver = {
++ .name = "da9030",
++ .owner = THIS_MODULE,
++ },
++
++ .probe = da9030_probe,
++ .remove = da9030_remove,
++};
++
++static int da9030_init(void)
++{
++ i2c_add_driver(&da9030_driver);
++ return 0;
++}
++
++static void da9030_exit(void)
++{
++ i2c_del_driver(&da9030_driver);
++}
++
++/* NOTE: this MUST be initialized before the other parts of the system
++ * that rely on it ... but after the i2c bus on which this relies.
++ * That is, much earlier than on PC-type systems, which don't often use
++ * I2C as a core system bus.
++ */
++subsys_initcall(da9030_init);
++module_exit(da9030_exit);
++
++MODULE_DESCRIPTION("DA9030 power manager driver");
++MODULE_AUTHOR("Mike Rapoport, Compulab");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/i2c/chips/da9030.h b/drivers/i2c/chips/da9030.h
+new file mode 100644
+index 0000000..4163156
+--- /dev/null
++++ b/drivers/i2c/chips/da9030.h
+@@ -0,0 +1,282 @@
++/* DA9030 Register definintions */
++
++#define CHIP_ID 0x00
++
++#define EVENT_A 0x01
++#define EVENT_A_CHIOVER (1 << 7)
++#define EVENT_A_VBAT_MON_TXON (1 << 6)
++#define EVENT_A_VBAT_MON (1 << 5)
++#define EVENT_A_TBAT (1 << 4)
++#define EVENT_A_CHDET (1 << 3)
++#define EVENT_A_EXTON (1 << 2)
++#define EVENT_A_PWREN1 (1 << 1)
++#define EVENT_A_ONKEY_N (1 << 0)
++
++#define EVENT_B 0x02
++#define EVENT_B_WDOG_INT (1 << 7)
++#define EVENT_B_SRP_DETECT (1 << 6)
++#define EVENT_B_SESSION_VALID (1 << 5)
++#define EVENT_B_VBUS_VALID_4_0 (1 << 4)
++#define EVENT_B_VBUS_VALID_4_4 (1 << 3)
++#define EVENT_B_ADC_READY (1 << 2)
++#define EVENT_B_CCTO (1 << 1)
++#define EVENT_B_TCTO (1 << 0)
++
++#define EVENT_C 0x03
++#define EVENT_C_ADC_IN5 (1 << 7)
++#define EVENT_C_ADC_IN4 (1 << 6)
++#define EVENT_C_BUCK2 (1 << 5)
++#define EVENT_C_LDO19 (1 << 4)
++#define EVENT_C_LDO18 (1 << 3)
++#define EVENT_C_LDO17 (1 << 2)
++#define EVENT_C_LDO16 (1 << 1)
++#define EVENT_C_LDO15 (1 << 0)
++
++#define STATUS 0x04
++#define STATUS_MCLK_DETECT (1 << 7)
++#define STATUS_VBAT_MON_TXON (1 << 6)
++#define STATUS_VBAT_MON (1 << 5)
++#define STATUS_TBAT (1 << 4)
++#define STATUS_CHDET (1 << 3)
++#define STATUS_EXTON (1 << 2)
++#define STATUS_PWREN1 (1 << 1)
++#define STATUS_ONKEY_N (1 << 0)
++
++#define IRQ_MASK_A 0x05
++#define IRQ_MASK_A_CHIOVER (1 << 7)
++#define IRQ_MASK_A_VBAT_MON_TXON (1 << 6)
++#define IRQ_MASK_A_VBAT_MON (1 << 5)
++#define IRQ_MASK_A_TBAT (1 << 4)
++#define IRQ_MASK_A_CHDET (1 << 3)
++#define IRQ_MASK_A_EXTON (1 << 2)
++#define IRQ_MASK_A_PWREN1 (1 << 1)
++#define IRQ_MASK_A_ONKEY_N (1 << 0)
++
++#define IRQ_MASK_B 0x06
++#define IRQ_MASK_B_WDOG_INT (1 << 7)
++#define IRQ_MASK_B_SRP_DETECT (1 << 6)
++#define IRQ_MASK_B_SESSION_VALID (1 << 5)
++#define IRQ_MASK_B_VBUS_VALID_4_0 (1 << 4)
++#define IRQ_MASK_B_VBUS_VALID_4_4 (1 << 3)
++#define IRQ_MASK_B_ADC_READY (1 << 2)
++#define IRQ_MASK_B_CCTO (1 << 1)
++#define IRQ_MASK_B_TCTO (1 << 0)
++
++#define IRQ_MASK_C 0x07
++#define IRQ_MASK_C_ADC_IN5 (1 << 7)
++#define IRQ_MASK_C_ADC_IN4 (1 << 6)
++#define IRQ_MASK_C_BUCK2 (1 << 5)
++#define IRQ_MASK_C_LDO19 (1 << 4)
++#define IRQ_MASK_C_LDO18 (1 << 3)
++#define IRQ_MASK_C_LDO17 (1 << 2)
++#define IRQ_MASK_C_LDO16 (1 << 1)
++#define IRQ_MASK_C_LDO15 (1 << 0)
++
++#define SYS_CTRL_A 0x08
++#define SYS_CONTROL_A_SLEEP_N_PIN_ENABLE 0x1
++#define SYS_CONTROL_A_SHUT_DOWN (1<<1)
++#define SYS_CONTROL_A_HWRES_ENABLE (1<<2)
++#define SYS_CONTROL_A_WDOG_ACTION (1<<3)
++#define SYS_CONTROL_A_WATCHDOG (1<<7)
++
++#define SYS_CONTROL_B 0x09
++#define SYS_CLTR_B_SLEEP_13MHZ_EN (1 << 4)
++#define SYS_CLTR_B_AUTO_CLK_SWITCH (1 << 3)
++
++#define FAULT_LOG 0x0a
++#define FAULT_LOG_OVER_TEMP (1 << 7)
++#define FAULT_LOG_VBAT_OVER (1 << 4)
++
++#define LDO_10_11 0x10
++#define LDO_10_11_LDO10_3V (0xc)
++#define LDO_10_11_LDO11_3V2 (0xe << 4)
++
++#define LDO_15 0x11
++#define LDO_14_16 0x12
++#define LDO_18_19 0x13
++#define LDO_18_19_LDO18_3V2 (0xe)
++
++#define LDO_17_SIMCP0 0x14
++#define LDO_17_SIMCP0_LDO17_3V 0x0F
++
++#define BUCK_2_DVC1 0x15
++#define BUCK_2_GO (1 << 7)
++#define BUCK_2_SLEEP (1 << 6)
++#define BUCK_2_TRIM_1V5 (0x1a)
++
++#define BUCK_2_DVC2 0x16
++
++#define REG_CONTROL_1_17 0x17
++#define RC1_LDO17_EN (1 << 7)
++#define RC1_LDO16_EN (1 << 6)
++#define RC1_LDO15_EN (1 << 5)
++#define RC1_LDO14_EN (1 << 4)
++#define RC1_LDO13_EN (1 << 3)
++#define RC1_LDO11_EN (1 << 2)
++#define RC1_LDO10_EN (1 << 1)
++#define RC1_BUCK2_EN (1 << 0)
++
++#define REG_CONTROL_2_18 0x18
++#define RC2_SIMCP_EN (1 << 6)
++#define RC2_LDO19_EN (1 << 1)
++#define RC2_LDO18_EN (1 << 0)
++
++#define REG_CONTROL_3_
++
++#define USBPUMP 0x19
++#define USB_PUMP_EN_USBVEP (1 << 7)
++#define USB_PUMP_EN_USBVE (1 << 6)
++#define USB_PUMP_SPR_DETECT (1 << 5)
++#define USB_PUMP_SESSION_VALID (1 << 4)
++#define USB_PUMP_VBUS_VALID_4_0 (1 << 3)
++#define USB_PUMP_VBUS_VALID_4_4 (1 << 2)
++#define USB_PUMP_USBVEP (1 << 1)
++#define USB_PUMP_USBVE (1 << 0)
++
++#define SLEEP_CONTROL 0x1a
++#define APP_SLEEP_CTL_PWR_EN (1 << 7)
++#define APP_SLEEP_CTL_SYS_EN (1 << 6)
++#define APP_SLEEP_CTL_BYPASS_LDO19 (1 << 2)
++#define APP_SLEEP_CTL_BYPASS_LDO18 (1 << 1)
++#define APP_SLEEP_CTL_BYPASS_LDO17 (1 << 0)
++
++#define STARTUP_CONTROL 0x1b
++#define STARTUP_CTL_LDO11_PWR_SYS (1 << 3)
++#define STARTUP_CTL_LDO10_PWR_SYS (1 << 2)
++#define STARTUP_CTL_LDO11_START (1 << 1)
++#define STARTUP_CTL_LDO10_START (1 << 0)
++
++#define LED_1_CONTROL 0x20
++#define LED_2_CONTROL 0x21
++#define LED_3_CONTROL 0x22
++#define LED_4_CONTROL 0x23
++#define LEDPC_CONTROL 0x24
++#define LED_ENABLE (1 << 7)
++
++#define WLED_CONTROL 0x25
++#define WLED_CP_ENABLE (1 << 6)
++#define WLED_ISET_10 (3)
++
++#define MISC_CONTROLA 0x26
++#define MISC_CONTROLB 0x27
++#define MISCB_SESSION_VALID_ENABLE (1 << 3)
++#define MISCB_USB_INT_RISING (1 << 2)
++#define MISCB_I2C_ADDRESS (1 << 1)
++#define MISCB_STARTUP_SEQUENCE (1 << 0)
++
++#define CHARGE_CONTROL 0x28
++#define CHRG_CHARGER_ENABLE (1 << 7)
++
++#define CCTR_CONTROL 0x29
++#define CCTR_SET_8MIN 0x01
++
++#define TCTR_CONTROL 0x2a
++#define CHARGE_PULSE 0x2b
++
++#define ADC_MAN_CONTROL 0x30
++
++#define ADC_AUTO_CONTROL 0x31
++#define ADC_IN5_EN (1 << 7)
++#define ADC_IN4_EN (1 << 6)
++#define ADC_TBAT_ENABLE (1 << 5)
++#define ADC_VBAT_IN_TXON (1 << 4)
++#define ADC_VCH_ENABLE (1 << 3)
++#define ADC_ICH_ENABLE (1 << 2)
++#define ADC_VBAT_ENABLE (1 << 1)
++#define ADC_AUTO_SLEEP_ENABLE (1 << 0)
++
++#define VBATMON 0x32
++#define VBATMONTXON 0x33
++#define TBATHIGHP 0x34
++#define TBATHIGHN 0x35
++#define TBATLOW 0x36
++#define ADC_IN4_MIN 0x37
++#define ADC_IN4_MAX 0x38
++#define ADC_IN5_MIN 0x39
++#define ADC_IN5_MAX 0x3a
++
++#define VBAT_RES 0x41
++#define VBATMIN_RES 0x42
++#define VBATMINTXON 0x43
++#define ICHMAX_RES 0x44
++#define ICHMIN_RES 0x45
++#define ICHAVERAGE_RES 0x46
++#define VCHMAX_RES 0x47
++#define VCHMIN_RES 0x48
++#define TBAT_RES 0x49
++#define ADC_IN4_RES 0x4a
++#define ADC_IN5_RES 0x4b
++
++#define LDO_1 0x90
++#define LDO_1_UNLOCK (0x5 << 5)
++#define LDO_1_TRIM_3V (0x12)
++
++#define LDO_2_3 0x91
++#define LDO_2_3_LDO2_3V2 (0xe << 4)
++#define LDO_2_3_LDO3_3V (0xc)
++
++#define LDO_4_5 0x92
++#define LDO_6_SIMCP 0x93
++#define LDO_6_SIMCP_LDO6_3V2 (0xe)
++
++#define LDO_7_8 0x94
++#define LDO_9_12 0x95
++#define BUCK 0x96
++#define REG_CONTROL_1_97 0x97
++#define RC3_LDO7_EN (1 << 7)
++#define RC3_LDO6_EN (1 << 6)
++#define RC3_LDO5_EN (1 << 5)
++#define RC3_LDO4_EN (1 << 4)
++#define RC3_LDO3_EN (1 << 3)
++#define RC3_LDO2_EN (1 << 2)
++#define RC3_LDO1_EN (1 << 1)
++#define RC3_BUCK_EN (1 << 0)
++
++#define REG_CONTROL_2_98 0x98
++#define RC4_SLEEP (1 << 7)
++#define RC4_SIMCP_ENABLE (1 << 6)
++#define RC4_LDO14_EN (1 << 5)
++#define RC4_LDO12_EN (1 << 4)
++#define RC4_LDO11_EN (1 << 3)
++#define RC4_LDO10_EN (1 << 2)
++#define RC4_LDO9_EN (1 << 1)
++#define RC4_LDO8_EN (1 << 0)
++
++#define REG_SLEEP_CONTROL1 0x99
++#define REG_SLEEP_CONTROL2 0x9a
++#define REG_SLEEP_CONTROL3 0x9b
++
++#define ADC_MAN_CONTROL_1 0xa0
++#define ADC_DEBOUNCE_VBATMON_TXON (1 << 7)
++#define ADC_DEBOUNCE_VBATMON (1 << 6)
++#define ADC_TBATREF_ENABLE (1 << 5)
++#define ADC_LDO_INT_ENABLE (1 << 4)
++#define ADC_MAN_CONV (1 << 3)
++#define ADC_MUX_VBAT (0)
++
++#define ADC_AUTO_CONTROL_1 0xa1
++#define ADC_IN5_EN (1 << 7)
++#define ADC_IN4_EN (1 << 6)
++#define ADC_TBAT_ENABLE (1 << 5)
++#define ADC_VBAT_IN_TXON (1 << 4)
++#define ADC_VCH_ENABLE (1 << 3)
++#define ADC_ICH_ENABLE (1 << 2)
++#define ADC_VBAT_ENABLE (1 << 1)
++#define ADC_AUTO_SLEEP_ENABLE (1 << 0)
++
++#define VBATMON_1 0xa2
++#define VBATMONTXMON_1 0xa3
++#define TBATHIGHP_1 0xa4
++#define TBATHIGHN_1 0xa5
++#define TBATLOW_1 0xa6
++#define MAN_RES 0xb0
++#define VBAT_RES_1 0xb1
++#define VBATMIN_RES_1 0xb2
++#define VBATMINTXON_RES 0xb3
++#define ICHMAX_RES_1 0xb4
++#define ICHMIN_RES_1 0xb5
++#define ICHAVERAGE_RES_1 0xb6
++#define VCHMAX_RES_1 0xb7
++#define VCHMIN_RES_1 0xb8
++#define TBAT_RES_1 0xb9
++#define ADC_IN4_RES_1 0xba
+diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
+index f929fcd..174ea2e 100644
+--- a/drivers/input/touchscreen/Kconfig
++++ b/drivers/input/touchscreen/Kconfig
+@@ -126,6 +126,49 @@ config TOUCHSCREEN_HP600
+ To compile this driver as a module, choose M here: the
+ module will be called hp680_ts_input.
+
++config TOUCHSCREEN_WM97XX
++ tristate "Support for WM97xx AC97 touchscreen controllers"
++ depends AC97_BUS
++
++choice
++ prompt "WM97xx codec type"
++ depends TOUCHSCREEN_WM97XX
++
++config TOUCHSCREEN_WM9705
++ bool "WM9705 Touchscreen interface support"
++ depends on TOUCHSCREEN_WM97XX
++ help
++ Say Y here if you have the wm9705 touchscreen.
++
++ If unsure, say N.
++
++ To compile this driver as a module, choose M here: the
++ module will be called wm9705.
++
++config TOUCHSCREEN_WM9712
++ bool "WM9712 Touchscreen interface support"
++ depends on TOUCHSCREEN_WM97XX
++ help
++ Say Y here if you have the wm9712 touchscreen.
++
++ If unsure, say N.
++
++ To compile this driver as a module, choose M here: the
++ module will be called wm9712.
++
++config TOUCHSCREEN_WM9713
++ bool "WM9713 Touchscreen interface support"
++ depends on TOUCHSCREEN_WM97XX
++ help
++ Say Y here if you have the wm9713 touchscreen.
++
++ If unsure, say N.
++
++ To compile this driver as a module, choose M here: the
++ module will be called wm9713.
++
++endchoice
++
+ config TOUCHSCREEN_PENMOUNT
+ tristate "Penmount serial touchscreen"
+ select SERIO
+diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
+index 5de8933..3a059b1 100644
+--- a/drivers/input/touchscreen/Makefile
++++ b/drivers/input/touchscreen/Makefile
+@@ -3,6 +3,7 @@
+ #
+
+ # Each configuration option enables a list of files.
++wm97xx-ts-objs := wm97xx-core.o
+
+ obj-$(CONFIG_TOUCHSCREEN_ADS7846) += ads7846.o
+ obj-$(CONFIG_TOUCHSCREEN_BITSY) += h3600_ts_input.o
+@@ -18,3 +19,16 @@ obj-$(CONFIG_TOUCHSCREEN_PENMOUNT) += penmount.o
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHRIGHT) += touchright.o
+ obj-$(CONFIG_TOUCHSCREEN_TOUCHWIN) += touchwin.o
+ obj-$(CONFIG_TOUCHSCREEN_UCB1400) += ucb1400_ts.o
++obj-$(CONFIG_TOUCHSCREEN_WM97XX) += wm97xx-ts.o
++
++ifeq ($(CONFIG_TOUCHSCREEN_WM9713),y)
++wm97xx-ts-objs += wm9713.o
++endif
++
++ifeq ($(CONFIG_TOUCHSCREEN_WM9712),y)
++wm97xx-ts-objs += wm9712.o
++endif
++
++ifeq ($(CONFIG_TOUCHSCREEN_WM9705),y)
++wm97xx-ts-objs += wm9705.o
++endif
+diff --git a/drivers/input/touchscreen/wm9705.c b/drivers/input/touchscreen/wm9705.c
+new file mode 100644
+index 0000000..1dae63d
+--- /dev/null
++++ b/drivers/input/touchscreen/wm9705.c
+@@ -0,0 +1,360 @@
++/*
++ * wm9705.c -- Codec driver for Wolfson WM9705 AC97 Codec.
++ *
++ * Copyright 2003, 2004, 2005, 2006 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * 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.
++ *
++ * Revision history
++ * 6th Sep 2006 Mike Arthur <linux@wolfsonmicro.com>
++ * Added pre and post sample calls.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/bitops.h>
++#include <linux/wm97xx.h>
++
++#define TS_NAME "wm97xx"
++#define WM9705_VERSION "0.62"
++#define DEFAULT_PRESSURE 0xb0c0
++
++/*
++ * Debug
++ */
++#if 0
++#define dbg(format, arg...) printk(KERN_DEBUG TS_NAME ": " format "\n" , ## arg)
++#else
++#define dbg(format, arg...)
++#endif
++#define err(format, arg...) printk(KERN_ERR TS_NAME ": " format "\n" , ## arg)
++#define info(format, arg...) printk(KERN_INFO TS_NAME ": " format "\n" , ## arg)
++#define warn(format, arg...) printk(KERN_WARNING TS_NAME ": " format "\n" , ## arg)
++
++/*
++ * Module parameters
++ */
++
++/*
++ * Set current used for pressure measurement.
++ *
++ * Set pil = 2 to use 400uA
++ * pil = 1 to use 200uA and
++ * pil = 0 to disable pressure measurement.
++ *
++ * This is used to increase the range of values returned by the adc
++ * when measureing touchpanel pressure.
++ */
++static int pil = 0;
++module_param(pil, int, 0);
++MODULE_PARM_DESC(pil, "Set current used for pressure measurement.");
++
++/*
++ * Set threshold for pressure measurement.
++ *
++ * Pen down pressure below threshold is ignored.
++ */
++static int pressure = DEFAULT_PRESSURE & 0xfff;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Set threshold for pressure measurement.");
++
++/*
++ * Set adc sample delay.
++ *
++ * For accurate touchpanel measurements, some settling time may be
++ * required between the switch matrix applying a voltage across the
++ * touchpanel plate and the ADC sampling the signal.
++ *
++ * This delay can be set by setting delay = n, where n is the array
++ * position of the delay in the array delay_table below.
++ * Long delays > 1ms are supported for completeness, but are not
++ * recommended.
++ */
++static int delay = 4;
++module_param(delay, int, 0);
++MODULE_PARM_DESC(delay, "Set adc sample delay.");
++
++/*
++ * Pen detect comparator threshold.
++ *
++ * 0 to Vmid in 15 steps, 0 = use zero power comparator with Vmid threshold
++ * i.e. 1 = Vmid/15 threshold
++ * 15 = Vmid/1 threshold
++ *
++ * Adjust this value if you are having problems with pen detect not
++ * detecting any down events.
++ */
++static int pdd = 8;
++module_param(pdd, int, 0);
++MODULE_PARM_DESC(pdd, "Set pen detect comparator threshold");
++
++/*
++ * Set adc mask function.
++ *
++ * Sources of glitch noise, such as signals driving an LCD display, may feed
++ * through to the touch screen plates and affect measurement accuracy. In
++ * order to minimise this, a signal may be applied to the MASK pin to delay or
++ * synchronise the sampling.
++ *
++ * 0 = No delay or sync
++ * 1 = High on pin stops conversions
++ * 2 = Edge triggered, edge on pin delays conversion by delay param (above)
++ * 3 = Edge triggered, edge on pin starts conversion after delay param
++ */
++static int mask = 0;
++module_param(mask, int, 0);
++MODULE_PARM_DESC(mask, "Set adc mask function.");
++
++/*
++ * ADC sample delay times in uS
++ */
++static const int delay_table[] = {
++ 21, // 1 AC97 Link frames
++ 42, // 2
++ 84, // 4
++ 167, // 8
++ 333, // 16
++ 667, // 32
++ 1000, // 48
++ 1333, // 64
++ 2000, // 96
++ 2667, // 128
++ 3333, // 160
++ 4000, // 192
++ 4667, // 224
++ 5333, // 256
++ 6000, // 288
++ 0 // No delay, switch matrix always on
++};
++
++/*
++ * Delay after issuing a POLL command.
++ *
++ * The delay is 3 AC97 link frames + the touchpanel settling delay
++ */
++static inline void poll_delay(int d)
++{
++ udelay (3 * AC97_LINK_FRAME + delay_table [d]);
++}
++
++/*
++ * set up the physical settings of the WM9705
++ */
++static void init_wm9705_phy(struct wm97xx* wm)
++{
++ u16 dig1 = 0, dig2 = WM97XX_RPR;
++
++ /*
++ * mute VIDEO and AUX as they share X and Y touchscreen
++ * inputs on the WM9705
++ */
++ wm97xx_reg_write(wm, AC97_AUX, 0x8000);
++ wm97xx_reg_write(wm, AC97_VIDEO, 0x8000);
++
++ /* touchpanel pressure current*/
++ if (pil == 2) {
++ dig2 |= WM9705_PIL;
++ dbg("setting pressure measurement current to 400uA.");
++ } else if (pil)
++ dbg("setting pressure measurement current to 200uA.");
++ if(!pil)
++ pressure = 0;
++
++ /* polling mode sample settling delay */
++ if (delay!=4) {
++ if (delay < 0 || delay > 15) {
++ dbg("supplied delay out of range.");
++ delay = 4;
++ }
++ }
++ dig1 &= 0xff0f;
++ dig1 |= WM97XX_DELAY(delay);
++ dbg("setting adc sample delay to %d u Secs.", delay_table[delay]);
++
++ /* WM9705 pdd */
++ dig2 |= (pdd & 0x000f);
++ dbg("setting pdd to Vmid/%d", 1 - (pdd & 0x000f));
++
++ /* mask */
++ dig2 |= ((mask & 0x3) << 4);
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++}
++
++static int wm9705_digitiser_ioctl(struct wm97xx* wm, int cmd)
++{
++ switch(cmd) {
++ case WM97XX_DIG_START:
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, wm->dig[2] | WM97XX_PRP_DET_DIG);
++ wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); /* dummy read */
++ break;
++ case WM97XX_DIG_STOP:
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, wm->dig[2] & ~WM97XX_PRP_DET_DIG);
++ break;
++ case WM97XX_AUX_PREPARE:
++ memcpy(wm->dig_save, wm->dig, sizeof(wm->dig));
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, 0);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, WM97XX_PRP_DET_DIG);
++ break;
++ case WM97XX_DIG_RESTORE:
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, wm->dig_save[1]);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, wm->dig_save[2]);
++ break;
++ case WM97XX_PHY_INIT:
++ init_wm9705_phy(wm);
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++static inline int is_pden (struct wm97xx* wm)
++{
++ return wm->dig[2] & WM9705_PDEN;
++}
++
++/*
++ * Read a sample from the WM9705 adc in polling mode.
++ */
++static int wm9705_poll_sample (struct wm97xx* wm, int adcsel, int *sample)
++{
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (adcsel & 0x8000)
++ adcsel = ((adcsel & 0x7fff) + 3) << 12;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(adcsel);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, adcsel | WM97XX_POLL | WM97XX_DELAY(delay));
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay (delay);
++
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER1) & WM97XX_POLL) && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dbg ("adc sample timeout");
++ return RC_PENUP;
++ }
++
++ *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(adcsel);
++
++ /* check we have correct sample */
++ if ((*sample & WM97XX_ADCSEL_MASK) != adcsel) {
++ dbg ("adc wrong sample, read %x got %x", adcsel,
++ *sample & WM97XX_ADCSEL_MASK);
++ return RC_PENUP;
++ }
++
++ if (!(*sample & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++
++ return RC_VALID;
++}
++
++/*
++ * Sample the WM9705 touchscreen in polling mode
++ */
++static int wm9705_poll_touch(struct wm97xx* wm, struct wm97xx_data *data)
++{
++ int rc;
++
++ if ((rc = wm9705_poll_sample(wm, WM97XX_ADCSEL_X, &data->x)) != RC_VALID)
++ return rc;
++ if ((rc = wm9705_poll_sample(wm, WM97XX_ADCSEL_Y, &data->y)) != RC_VALID)
++ return rc;
++ if (pil) {
++ if ((rc = wm9705_poll_sample(wm, WM97XX_ADCSEL_PRES, &data->p)) != RC_VALID)
++ return rc;
++ } else
++ data->p = DEFAULT_PRESSURE;
++
++ return RC_VALID;
++}
++
++/*
++ * Enable WM9705 continuous mode, i.e. touch data is streamed across an AC97 slot
++ */
++static int wm9705_acc_enable (struct wm97xx* wm, int enable)
++{
++ u16 dig1, dig2;
++ int ret = 0;
++
++ dig1 = wm->dig[1];
++ dig2 = wm->dig[2];
++
++ if (enable) {
++ /* continous mode */
++ if (wm->mach_ops->acc_startup && (ret = wm->mach_ops->acc_startup(wm)) < 0)
++ return ret;
++ dig1 &= ~(WM97XX_CM_RATE_MASK | WM97XX_ADCSEL_MASK |
++ WM97XX_DELAY_MASK | WM97XX_SLT_MASK);
++ dig1 |= WM97XX_CTC | WM97XX_COO | WM97XX_SLEN |
++ WM97XX_DELAY (delay) |
++ WM97XX_SLT (wm->acc_slot) |
++ WM97XX_RATE (wm->acc_rate);
++ if (pil)
++ dig1 |= WM97XX_ADCSEL_PRES;
++ dig2 |= WM9705_PDEN;
++ } else {
++ dig1 &= ~(WM97XX_CTC | WM97XX_COO | WM97XX_SLEN);
++ dig2 &= ~WM9705_PDEN;
++ if (wm->mach_ops->acc_shutdown)
++ wm->mach_ops->acc_shutdown(wm);
++ }
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++ return ret;
++}
++
++struct wm97xx_codec_drv wm97xx_codec = {
++ .id = WM9705_ID2,
++ .name = "wm9705",
++ .poll_sample = wm9705_poll_sample,
++ .poll_touch = wm9705_poll_touch,
++ .acc_enable = wm9705_acc_enable,
++ .digitiser_ioctl = wm9705_digitiser_ioctl,
++};
++
++EXPORT_SYMBOL_GPL(wm97xx_codec);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com");
++MODULE_DESCRIPTION("WM9705 Touch Screen Driver");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/input/touchscreen/wm9712.c b/drivers/input/touchscreen/wm9712.c
+new file mode 100644
+index 0000000..99433e9
+--- /dev/null
++++ b/drivers/input/touchscreen/wm9712.c
+@@ -0,0 +1,464 @@
++/*
++ * wm9712.c -- Codec driver for Wolfson WM9712 AC97 Codecs.
++ *
++ * Copyright 2003, 2004, 2005, 2006 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * 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.
++ *
++ * Revision history
++ * 4th Jul 2005 Initial version.
++ * 6th Sep 2006 Mike Arthur <linux@wolfsonmicro.com>
++ * Added pre and post sample calls.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/bitops.h>
++#include <linux/wm97xx.h>
++
++#define TS_NAME "wm97xx"
++#define WM9712_VERSION "0.61"
++#define DEFAULT_PRESSURE 0xb0c0
++
++/*
++ * Debug
++ */
++#if 0
++#define dbg(format, arg...) printk(KERN_DEBUG TS_NAME ": " format "\n" , ## arg)
++#else
++#define dbg(format, arg...)
++#endif
++#define err(format, arg...) printk(KERN_ERR TS_NAME ": " format "\n" , ## arg)
++#define info(format, arg...) printk(KERN_INFO TS_NAME ": " format "\n" , ## arg)
++#define warn(format, arg...) printk(KERN_WARNING TS_NAME ": " format "\n" , ## arg)
++
++/*
++ * Module parameters
++ */
++
++/*
++ * Set internal pull up for pen detect.
++ *
++ * Pull up is in the range 1.02k (least sensitive) to 64k (most sensitive)
++ * i.e. pull up resistance = 64k Ohms / rpu.
++ *
++ * Adjust this value if you are having problems with pen detect not
++ * detecting any down event.
++ */
++static int rpu = 8;
++module_param(rpu, int, 0);
++MODULE_PARM_DESC(rpu, "Set internal pull up resitor for pen detect.");
++
++/*
++ * Set current used for pressure measurement.
++ *
++ * Set pil = 2 to use 400uA
++ * pil = 1 to use 200uA and
++ * pil = 0 to disable pressure measurement.
++ *
++ * This is used to increase the range of values returned by the adc
++ * when measureing touchpanel pressure.
++ */
++static int pil = 0;
++module_param(pil, int, 0);
++MODULE_PARM_DESC(pil, "Set current used for pressure measurement.");
++
++/*
++ * Set threshold for pressure measurement.
++ *
++ * Pen down pressure below threshold is ignored.
++ */
++static int pressure = DEFAULT_PRESSURE & 0xfff;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Set threshold for pressure measurement.");
++
++/*
++ * Set adc sample delay.
++ *
++ * For accurate touchpanel measurements, some settling time may be
++ * required between the switch matrix applying a voltage across the
++ * touchpanel plate and the ADC sampling the signal.
++ *
++ * This delay can be set by setting delay = n, where n is the array
++ * position of the delay in the array delay_table below.
++ * Long delays > 1ms are supported for completeness, but are not
++ * recommended.
++ */
++static int delay = 3;
++module_param(delay, int, 0);
++MODULE_PARM_DESC(delay, "Set adc sample delay.");
++
++/*
++ * Set five_wire = 1 to use a 5 wire touchscreen.
++ *
++ * NOTE: Five wire mode does not allow for readback of pressure.
++ */
++static int five_wire;
++module_param(five_wire, int, 0);
++MODULE_PARM_DESC(five_wire, "Set to '1' to use 5-wire touchscreen.");
++
++/*
++ * Set adc mask function.
++ *
++ * Sources of glitch noise, such as signals driving an LCD display, may feed
++ * through to the touch screen plates and affect measurement accuracy. In
++ * order to minimise this, a signal may be applied to the MASK pin to delay or
++ * synchronise the sampling.
++ *
++ * 0 = No delay or sync
++ * 1 = High on pin stops conversions
++ * 2 = Edge triggered, edge on pin delays conversion by delay param (above)
++ * 3 = Edge triggered, edge on pin starts conversion after delay param
++ */
++static int mask = 0;
++module_param(mask, int, 0);
++MODULE_PARM_DESC(mask, "Set adc mask function.");
++
++/*
++ * Coordinate Polling Enable.
++ *
++ * Set to 1 to enable coordinate polling. e.g. x,y[,p] is sampled together
++ * for every poll.
++ */
++static int coord = 0;
++module_param(coord, int, 0);
++MODULE_PARM_DESC(coord, "Polling coordinate mode");
++
++/*
++ * ADC sample delay times in uS
++ */
++static const int delay_table[] = {
++ 21, // 1 AC97 Link frames
++ 42, // 2
++ 84, // 4
++ 167, // 8
++ 333, // 16
++ 667, // 32
++ 1000, // 48
++ 1333, // 64
++ 2000, // 96
++ 2667, // 128
++ 3333, // 160
++ 4000, // 192
++ 4667, // 224
++ 5333, // 256
++ 6000, // 288
++ 0 // No delay, switch matrix always on
++};
++
++/*
++ * Delay after issuing a POLL command.
++ *
++ * The delay is 3 AC97 link frames + the touchpanel settling delay
++ */
++static inline void poll_delay(int d)
++{
++ udelay (3 * AC97_LINK_FRAME + delay_table [d]);
++}
++
++/*
++ * set up the physical settings of the WM9712
++ */
++static void init_wm9712_phy(struct wm97xx* wm)
++{
++ u16 dig1 = 0;
++ u16 dig2 = WM97XX_RPR | WM9712_RPU(1);
++
++ /* WM9712 rpu */
++ if (rpu) {
++ dig2 &= 0xffc0;
++ dig2 |= WM9712_RPU(rpu);
++ dbg("setting pen detect pull-up to %d Ohms",64000 / rpu);
++ }
++
++ /* touchpanel pressure current*/
++ if (pil == 2) {
++ dig2 |= WM9712_PIL;
++ dbg("setting pressure measurement current to 400uA.");
++ } else if (pil)
++ dbg("setting pressure measurement current to 200uA.");
++ if(!pil)
++ pressure = 0;
++
++ /* WM9712 five wire */
++ if (five_wire) {
++ dig2 |= WM9712_45W;
++ dbg("setting 5-wire touchscreen mode.");
++ }
++
++ /* polling mode sample settling delay */
++ if (delay < 0 || delay > 15) {
++ dbg("supplied delay out of range.");
++ delay = 4;
++ }
++ dig1 &= 0xff0f;
++ dig1 |= WM97XX_DELAY(delay);
++ dbg("setting adc sample delay to %d u Secs.", delay_table[delay]);
++
++ /* mask */
++ dig2 |= ((mask & 0x3) << 6);
++ if (mask) {
++ u16 reg;
++ /* Set GPIO4 as Mask Pin*/
++ reg = wm97xx_reg_read(wm, AC97_MISC_AFE);
++ wm97xx_reg_write(wm, AC97_MISC_AFE, reg | WM97XX_GPIO_4);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_CFG);
++ wm97xx_reg_write(wm, AC97_GPIO_CFG, reg | WM97XX_GPIO_4);
++ }
++
++ /* wait - coord mode */
++ if(coord)
++ dig2 |= WM9712_WAIT;
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++}
++
++static int wm9712_digitiser_ioctl(struct wm97xx* wm, int cmd)
++{
++ u16 dig2 = wm->dig[2];
++
++ switch(cmd) {
++ case WM97XX_DIG_START:
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2 | WM97XX_PRP_DET_DIG);
++ wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); /* dummy read */
++ break;
++ case WM97XX_DIG_STOP:
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2 & ~WM97XX_PRP_DET_DIG);
++ break;
++ case WM97XX_AUX_PREPARE:
++ memcpy(wm->dig_save, wm->dig, sizeof(wm->dig));
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, 0);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, WM97XX_PRP_DET_DIG);
++ break;
++ case WM97XX_DIG_RESTORE:
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, wm->dig_save[1]);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, wm->dig_save[2]);
++ break;
++ case WM97XX_PHY_INIT:
++ init_wm9712_phy(wm);
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++static inline int is_pden (struct wm97xx* wm)
++{
++ return wm->dig[2] & WM9712_PDEN;
++}
++
++/*
++ * Read a sample from the WM9712 adc in polling mode.
++ */
++static int wm9712_poll_sample (struct wm97xx* wm, int adcsel, int *sample)
++{
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (adcsel & 0x8000)
++ adcsel = ((adcsel & 0x7fff) + 3) << 12;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(adcsel);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, adcsel | WM97XX_POLL | WM97XX_DELAY(delay));
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay (delay);
++
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER1) & WM97XX_POLL) && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dbg ("adc sample timeout");
++ return RC_PENUP;
++ }
++
++ *sample = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(adcsel);
++
++ /* check we have correct sample */
++ if ((*sample & WM97XX_ADCSEL_MASK) != adcsel) {
++ dbg ("adc wrong sample, read %x got %x", adcsel,
++ *sample & WM97XX_ADCSEL_MASK);
++ return RC_PENUP;
++ }
++
++ if (!(*sample & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++
++ return RC_VALID;
++}
++
++/*
++ * Read a coord from the WM9712 adc in polling mode.
++ */
++static int wm9712_poll_coord (struct wm97xx* wm, struct wm97xx_data *data)
++{
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1,
++ WM97XX_COO | WM97XX_POLL | WM97XX_DELAY(delay));
++
++ /* wait 3 AC97 time slots + delay for conversion and read x */
++ poll_delay(delay);
++ data->x = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER1) & WM97XX_POLL) && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dbg ("adc sample timeout");
++ return RC_PENUP;
++ }
++
++ /* read back y data */
++ data->y = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (pil)
++ data->p = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ else
++ data->p = DEFAULT_PRESSURE;
++
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++
++ /* check we have correct sample */
++ if (!(data->x & WM97XX_ADCSEL_X) || !(data->y & WM97XX_ADCSEL_Y))
++ goto err;
++ if(pil && !(data->p & WM97XX_ADCSEL_PRES))
++ goto err;
++
++ if (!(data->x & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++ return RC_VALID;
++err:
++ return RC_PENUP;
++}
++
++/*
++ * Sample the WM9712 touchscreen in polling mode
++ */
++static int wm9712_poll_touch(struct wm97xx* wm, struct wm97xx_data *data)
++{
++ int rc;
++
++ if(coord) {
++ if((rc = wm9712_poll_coord(wm, data)) != RC_VALID)
++ return rc;
++ } else {
++ if ((rc = wm9712_poll_sample(wm, WM97XX_ADCSEL_X, &data->x)) != RC_VALID)
++ return rc;
++
++ if ((rc = wm9712_poll_sample(wm, WM97XX_ADCSEL_Y, &data->y)) != RC_VALID)
++ return rc;
++
++ if (pil && !five_wire) {
++ if ((rc = wm9712_poll_sample(wm, WM97XX_ADCSEL_PRES, &data->p)) != RC_VALID)
++ return rc;
++ } else
++ data->p = DEFAULT_PRESSURE;
++ }
++ return RC_VALID;
++}
++
++/*
++ * Enable WM9712 continuous mode, i.e. touch data is streamed across an AC97 slot
++ */
++static int wm9712_acc_enable (struct wm97xx* wm, int enable)
++{
++ u16 dig1, dig2;
++ int ret = 0;
++
++ dig1 = wm->dig[1];
++ dig2 = wm->dig[2];
++
++ if (enable) {
++ /* continous mode */
++ if (wm->mach_ops->acc_startup && (ret = wm->mach_ops->acc_startup(wm)) < 0)
++ return ret;
++ dig1 &= ~(WM97XX_CM_RATE_MASK | WM97XX_ADCSEL_MASK |
++ WM97XX_DELAY_MASK | WM97XX_SLT_MASK);
++ dig1 |= WM97XX_CTC | WM97XX_COO | WM97XX_SLEN |
++ WM97XX_DELAY (delay) |
++ WM97XX_SLT (wm->acc_slot) |
++ WM97XX_RATE (wm->acc_rate);
++ if (pil)
++ dig1 |= WM97XX_ADCSEL_PRES;
++ dig2 |= WM9712_PDEN;
++ } else {
++ dig1 &= ~(WM97XX_CTC | WM97XX_COO | WM97XX_SLEN);
++ dig2 &= ~WM9712_PDEN;
++ if (wm->mach_ops->acc_shutdown)
++ wm->mach_ops->acc_shutdown(wm);
++ }
++
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER1, dig1);
++ wm97xx_reg_write(wm, AC97_WM97XX_DIGITISER2, dig2);
++ return 0;
++}
++
++struct wm97xx_codec_drv wm97xx_codec = {
++ .id = WM9712_ID2,
++ .name = "wm9712",
++ .poll_sample = wm9712_poll_sample,
++ .poll_touch = wm9712_poll_touch,
++ .acc_enable = wm9712_acc_enable,
++ .digitiser_ioctl = wm9712_digitiser_ioctl,
++};
++
++EXPORT_SYMBOL_GPL(wm97xx_codec);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com");
++MODULE_DESCRIPTION("WM9712 Touch Screen Driver");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c
+new file mode 100644
+index 0000000..42f5f30
+--- /dev/null
++++ b/drivers/input/touchscreen/wm9713.c
+@@ -0,0 +1,461 @@
++/*
++ * wm9713.c -- Codec touch driver for Wolfson WM9713 AC97 Codec.
++ *
++ * Copyright 2003, 2004, 2005, 2006 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * 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.
++ *
++ * Revision history
++ * 6th Sep 2006 Mike Arthur <linux@wolfsonmicro.com>
++ * Added pre and post sample calls.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/input.h>
++#include <linux/delay.h>
++#include <linux/bitops.h>
++#include <linux/wm97xx.h>
++
++#define TS_NAME "wm97xx"
++#define WM9713_VERSION "0.53"
++#define DEFAULT_PRESSURE 0xb0c0
++
++/*
++ * Debug
++ */
++#if 0
++#define dbg(format, arg...) printk(KERN_DEBUG TS_NAME ": " format "\n" , ## arg)
++#else
++#define dbg(format, arg...)
++#endif
++#define err(format, arg...) printk(KERN_ERR TS_NAME ": " format "\n" , ## arg)
++#define info(format, arg...) printk(KERN_INFO TS_NAME ": " format "\n" , ## arg)
++#define warn(format, arg...) printk(KERN_WARNING TS_NAME ": " format "\n" , ## arg)
++
++/*
++ * Module parameters
++ */
++
++/*
++ * Set internal pull up for pen detect.
++ *
++ * Pull up is in the range 1.02k (least sensitive) to 64k (most sensitive)
++ * i.e. pull up resistance = 64k Ohms / rpu.
++ *
++ * Adjust this value if you are having problems with pen detect not
++ * detecting any down event.
++ */
++static int rpu = 8;
++module_param(rpu, int, 0);
++MODULE_PARM_DESC(rpu, "Set internal pull up resitor for pen detect.");
++
++/*
++ * Set current used for pressure measurement.
++ *
++ * Set pil = 2 to use 400uA
++ * pil = 1 to use 200uA and
++ * pil = 0 to disable pressure measurement.
++ *
++ * This is used to increase the range of values returned by the adc
++ * when measureing touchpanel pressure.
++ */
++static int pil = 0;
++module_param(pil, int, 0);
++MODULE_PARM_DESC(pil, "Set current used for pressure measurement.");
++
++/*
++ * Set threshold for pressure measurement.
++ *
++ * Pen down pressure below threshold is ignored.
++ */
++static int pressure = DEFAULT_PRESSURE & 0xfff;
++module_param(pressure, int, 0);
++MODULE_PARM_DESC(pressure, "Set threshold for pressure measurement.");
++
++/*
++ * Set adc sample delay.
++ *
++ * For accurate touchpanel measurements, some settling time may be
++ * required between the switch matrix applying a voltage across the
++ * touchpanel plate and the ADC sampling the signal.
++ *
++ * This delay can be set by setting delay = n, where n is the array
++ * position of the delay in the array delay_table below.
++ * Long delays > 1ms are supported for completeness, but are not
++ * recommended.
++ */
++static int delay = 4;
++module_param(delay, int, 0);
++MODULE_PARM_DESC(delay, "Set adc sample delay.");
++
++/*
++ * Set adc mask function.
++ *
++ * Sources of glitch noise, such as signals driving an LCD display, may feed
++ * through to the touch screen plates and affect measurement accuracy. In
++ * order to minimise this, a signal may be applied to the MASK pin to delay or
++ * synchronise the sampling.
++ *
++ * 0 = No delay or sync
++ * 1 = High on pin stops conversions
++ * 2 = Edge triggered, edge on pin delays conversion by delay param (above)
++ * 3 = Edge triggered, edge on pin starts conversion after delay param
++ */
++static int mask = 0;
++module_param(mask, int, 0);
++MODULE_PARM_DESC(mask, "Set adc mask function.");
++
++/*
++ * Coordinate Polling Enable.
++ *
++ * Set to 1 to enable coordinate polling. e.g. x,y[,p] is sampled together
++ * for every poll.
++ */
++static int coord = 0;
++module_param(coord, int, 0);
++MODULE_PARM_DESC(coord, "Polling coordinate mode");
++
++/*
++ * ADC sample delay times in uS
++ */
++static const int delay_table[] = {
++ 21, // 1 AC97 Link frames
++ 42, // 2
++ 84, // 4
++ 167, // 8
++ 333, // 16
++ 667, // 32
++ 1000, // 48
++ 1333, // 64
++ 2000, // 96
++ 2667, // 128
++ 3333, // 160
++ 4000, // 192
++ 4667, // 224
++ 5333, // 256
++ 6000, // 288
++ 0 // No delay, switch matrix always on
++};
++
++/*
++ * Delay after issuing a POLL command.
++ *
++ * The delay is 3 AC97 link frames + the touchpanel settling delay
++ */
++static inline void poll_delay(int d)
++{
++ udelay (3 * AC97_LINK_FRAME + delay_table [d]);
++}
++
++/*
++ * set up the physical settings of the WM9713
++ */
++static void init_wm9713_phy(struct wm97xx* wm)
++{
++ u16 dig1 = 0, dig2, dig3;
++
++ /* default values */
++ dig2 = WM97XX_DELAY(4) | WM97XX_SLT(5);
++ dig3= WM9712_RPU(1);
++
++ /* rpu */
++ if (rpu) {
++ dig3 &= 0xffc0;
++ dig3 |= WM9712_RPU(rpu);
++ info("setting pen detect pull-up to %d Ohms",64000 / rpu);
++ }
++
++ /* touchpanel pressure */
++ if (pil == 2) {
++ dig3 |= WM9712_PIL;
++ info("setting pressure measurement current to 400uA.");
++ } else if (pil)
++ info ("setting pressure measurement current to 200uA.");
++ if(!pil)
++ pressure = 0;
++
++ /* sample settling delay */
++ if (delay < 0 || delay > 15) {
++ info ("supplied delay out of range.");
++ delay = 4;
++ info("setting adc sample delay to %d u Secs.", delay_table[delay]);
++ }
++ dig2 &= 0xff0f;
++ dig2 |= WM97XX_DELAY(delay);
++
++ /* mask */
++ dig3 |= ((mask & 0x3) << 4);
++ if(coord)
++ dig3 |= WM9713_WAIT;
++
++ wm->misc = wm97xx_reg_read(wm, 0x5a);
++
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, dig1);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, dig2);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, dig3);
++ wm97xx_reg_write(wm, AC97_GPIO_STICKY, 0x0);
++}
++
++static int wm9713_digitiser_ioctl(struct wm97xx* wm, int cmd)
++{
++ u16 val = 0;
++
++ switch(cmd){
++ case WM97XX_DIG_START:
++ val = wm97xx_reg_read(wm, AC97_EXTENDED_MID);
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, val & 0x7fff);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig[2] | WM97XX_PRP_DET_DIG);
++ wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD); /* dummy read */
++ break;
++ case WM97XX_DIG_STOP:
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig[2] & ~WM97XX_PRP_DET_DIG);
++ val = wm97xx_reg_read(wm, AC97_EXTENDED_MID);
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, val | 0x8000);
++ break;
++ case WM97XX_AUX_PREPARE:
++ memcpy(wm->dig_save, wm->dig, sizeof(wm->dig));
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, 0);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, 0);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, WM97XX_PRP_DET_DIG);
++ break;
++ case WM97XX_DIG_RESTORE:
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, wm->dig_save[0]);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, wm->dig_save[1]);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig_save[2]);
++ break;
++ case WM97XX_PHY_INIT:
++ init_wm9713_phy(wm);
++ break;
++ default:
++ return -EINVAL;
++ }
++ return 0;
++}
++
++static inline int is_pden (struct wm97xx* wm)
++{
++ return wm->dig[2] & WM9713_PDEN;
++}
++
++/*
++ * Read a sample from the WM9713 adc in polling mode.
++ */
++static int wm9713_poll_sample (struct wm97xx* wm, int adcsel, int *sample)
++{
++ u16 dig1;
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ if (adcsel & 0x8000)
++ adcsel = 1 << ((adcsel & 0x7fff) + 3);
++
++ dig1 = wm97xx_reg_read(wm, AC97_WM9713_DIG1);
++ dig1 &= ~WM9713_ADCSEL_MASK;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(adcsel);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, dig1 | adcsel |WM9713_POLL);
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay(delay);
++
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM9713_DIG1) & WM9713_POLL) && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dbg ("adc sample timeout");
++ return RC_PENUP;
++ }
++
++ *sample =wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(adcsel);
++
++ /* check we have correct sample */
++ if ((*sample & WM97XX_ADCSRC_MASK) != ffs(adcsel >> 1) << 12) {
++ dbg ("adc wrong sample, read %x got %x", adcsel,
++ *sample & WM97XX_ADCSRC_MASK);
++ return RC_PENUP;
++ }
++
++ if (!(*sample & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++
++ return RC_VALID;
++}
++
++/*
++ * Read a coordinate from the WM9713 adc in polling mode.
++ */
++static int wm9713_poll_coord (struct wm97xx* wm, struct wm97xx_data *data)
++{
++ u16 dig1;
++ int timeout = 5 * delay;
++
++ if (!wm->pen_probably_down) {
++ u16 data = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (!(data & WM97XX_PEN_DOWN))
++ return RC_PENUP;
++ wm->pen_probably_down = 1;
++ }
++
++ /* set up digitiser */
++ dig1 = wm97xx_reg_read(wm, AC97_WM9713_DIG1);
++ dig1 &= ~WM9713_ADCSEL_MASK;
++ if(pil)
++ dig1 |= WM97XX_ADCSEL_PRES;
++
++ if (wm->mach_ops && wm->mach_ops->pre_sample)
++ wm->mach_ops->pre_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, dig1 | WM9713_POLL | WM9713_COO);
++
++ /* wait 3 AC97 time slots + delay for conversion */
++ poll_delay(delay);
++ data->x = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ /* wait for POLL to go low */
++ while ((wm97xx_reg_read(wm, AC97_WM9713_DIG1) & WM9713_POLL) && timeout) {
++ udelay(AC97_LINK_FRAME);
++ timeout--;
++ }
++
++ if (timeout <= 0) {
++ /* If PDEN is set, we can get a timeout when pen goes up */
++ if (is_pden(wm))
++ wm->pen_probably_down = 0;
++ else
++ dbg ("adc sample timeout");
++ return RC_PENUP;
++ }
++
++ /* read back data */
++ data->y = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ if (pil)
++ data->p = wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD);
++ else
++ data->p = DEFAULT_PRESSURE;
++
++ if (wm->mach_ops && wm->mach_ops->post_sample)
++ wm->mach_ops->post_sample(WM97XX_ADCSEL_X | WM97XX_ADCSEL_Y);
++
++ /* check we have correct sample */
++ if (!(data->x & WM97XX_ADCSEL_X) || !(data->y & WM97XX_ADCSEL_Y))
++ goto err;
++ if(pil && !(data->p & WM97XX_ADCSEL_PRES))
++ goto err;
++
++ if (!(data->x & WM97XX_PEN_DOWN)) {
++ wm->pen_probably_down = 0;
++ return RC_PENUP;
++ }
++ return RC_VALID;
++err:
++ return RC_PENUP;
++}
++
++/*
++ * Sample the WM9713 touchscreen in polling mode
++ */
++static int wm9713_poll_touch(struct wm97xx* wm, struct wm97xx_data *data)
++{
++ int rc;
++
++ if(coord) {
++ if((rc = wm9713_poll_coord(wm, data)) != RC_VALID)
++ return rc;
++ } else {
++ if ((rc = wm9713_poll_sample(wm, WM9713_ADCSEL_X, &data->x)) != RC_VALID)
++ return rc;
++ if ((rc = wm9713_poll_sample(wm, WM9713_ADCSEL_Y, &data->y)) != RC_VALID)
++ return rc;
++ if (pil) {
++ if ((rc = wm9713_poll_sample(wm, WM9713_ADCSEL_PRES, &data->p)) != RC_VALID)
++ return rc;
++ } else
++ data->p = DEFAULT_PRESSURE;
++ }
++ return RC_VALID;
++}
++
++/*
++ * Enable WM9713 continuous mode, i.e. touch data is streamed across an AC97 slot
++ */
++static int wm9713_acc_enable (struct wm97xx* wm, int enable)
++{
++ u16 dig1, dig2, dig3;
++ int ret = 0;
++
++ dig1 = wm->dig[0];
++ dig2 = wm->dig[1];
++ dig3 = wm->dig[2];
++
++ if (enable) {
++ /* continous mode */
++ if (wm->mach_ops->acc_startup &&
++ (ret = wm->mach_ops->acc_startup(wm)) < 0)
++ return ret;
++
++ dig1 &= ~WM9713_ADCSEL_MASK;
++ dig1 |= WM9713_CTC | WM9713_COO | WM9713_ADCSEL_X | WM9713_ADCSEL_Y;
++ if (pil)
++ dig1 |= WM9713_ADCSEL_PRES;
++ dig2 &= ~(WM97XX_DELAY_MASK | WM97XX_SLT_MASK | WM97XX_CM_RATE_MASK);
++ dig2 |= WM97XX_SLEN | WM97XX_DELAY (delay) |
++ WM97XX_SLT (wm->acc_slot) | WM97XX_RATE (wm->acc_rate);
++ dig3 |= WM9713_PDEN;
++ } else {
++ dig1 &= ~(WM9713_CTC | WM9713_COO);
++ dig2 &= ~WM97XX_SLEN;
++ dig3 &= ~WM9713_PDEN;
++ if (wm->mach_ops->acc_shutdown)
++ wm->mach_ops->acc_shutdown(wm);
++ }
++
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, dig1);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, dig2);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, dig3);
++ return ret;
++}
++
++struct wm97xx_codec_drv wm97xx_codec = {
++ .id = WM9713_ID2,
++ .name = "wm9713",
++ .poll_sample = wm9713_poll_sample,
++ .poll_touch = wm9713_poll_touch,
++ .acc_enable = wm9713_acc_enable,
++ .digitiser_ioctl = wm9713_digitiser_ioctl,
++};
++
++EXPORT_SYMBOL_GPL(wm97xx_codec);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com");
++MODULE_DESCRIPTION("WM9713 Touch Screen Driver");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c
+new file mode 100644
+index 0000000..87179d2
+--- /dev/null
++++ b/drivers/input/touchscreen/wm97xx-core.c
+@@ -0,0 +1,859 @@
++/*
++ * wm97xx-core.c -- Touch screen driver core for Wolfson WM9705, WM9712
++ * and WM9713 AC97 Codecs.
++ *
++ * Copyright 2003, 2004, 2005, 2006 Wolfson Microelectronics PLC.
++ * Author: Liam Girdwood
++ * liam.girdwood@wolfsonmicro.com or linux@wolfsonmicro.com
++ * Parts Copyright : Ian Molton <spyro@f2s.com>
++ * Andrew Zabolotny <zap@homelink.ru>
++ * Russell King <rmk@arm.linux.org.uk>
++ *
++ * 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.
++ *
++ * Notes:
++ *
++ * Features:
++ * - supports WM9705, WM9712, WM9713
++ * - polling mode
++ * - continuous mode (arch-dependent)
++ * - adjustable rpu/dpp settings
++ * - adjustable pressure current
++ * - adjustable sample settle delay
++ * - 4 and 5 wire touchscreens (5 wire is WM9712 only)
++ * - pen down detection
++ * - battery monitor
++ * - sample AUX adc's
++ * - power management
++ * - codec GPIO
++ * - codec event notification
++ * Todo
++ * - Support for async sampling control for noisy LCD's.
++ *
++ * Revision history
++ * 7th May 2003 Initial version.
++ * 6th June 2003 Added non module support and AC97 registration.
++ * 18th June 2003 Added AUX adc sampling.
++ * 23rd June 2003 Did some minimal reformatting, fixed a couple of
++ * codec_mutexing bugs and noted a race to fix.
++ * 24th June 2003 Added power management and fixed race condition.
++ * 10th July 2003 Changed to a misc device.
++ * 31st July 2003 Moved TS_EVENT and TS_CAL to wm97xx.h
++ * 8th Aug 2003 Added option for read() calling wm97xx_sample_touch()
++ * because some ac97_read/ac_97_write call schedule()
++ * 7th Nov 2003 Added Input touch event interface, stanley.cai@intel.com
++ * 13th Nov 2003 Removed h3600 touch interface, added interrupt based
++ * pen down notification and implemented continous mode
++ * on XScale arch.
++ * 16th Nov 2003 Ian Molton <spyro@f2s.com>
++ * Modified so that it suits the new 2.6 driver model.
++ * 25th Jan 2004 Andrew Zabolotny <zap@homelink.ru>
++ * Implemented IRQ-driven pen down detection, implemented
++ * the private API meant to be exposed to platform-specific
++ * drivers, reorganized the driver so that it supports
++ * an arbitrary number of devices.
++ * 1st Feb 2004 Moved continuous mode handling to a separate
++ * architecture-dependent file. For now only PXA
++ * built-in AC97 controller is supported (pxa-ac97-wm97xx.c).
++ * 11th Feb 2004 Reduced CPU usage by keeping a cached copy of both
++ * digitizer registers instead of reading them every time.
++ * A reorganization of the whole code for better
++ * error handling.
++ * 17th Apr 2004 Added BMON support.
++ * 17th Nov 2004 Added codec GPIO, codec event handling (real and virtual
++ * GPIOs) and 2.6 power management.
++ * 29th Nov 2004 Added WM9713 support.
++ * 4th Jul 2005 Moved codec specific code out to seperate files.
++ * 6th Sep 2006 Mike Arthur <linux@wolfsonmicro.com>
++ * Added bus interface.
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/version.h>
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/delay.h>
++#include <linux/string.h>
++#include <linux/proc_fs.h>
++#include <linux/pm.h>
++#include <linux/interrupt.h>
++#include <linux/bitops.h>
++#include <linux/workqueue.h>
++#include <linux/device.h>
++#include <linux/freezer.h>
++#include <linux/wm97xx.h>
++#include <asm/uaccess.h>
++#include <asm/io.h>
++
++#include <asm/arch/irqs.h>
++
++#define TS_NAME "wm97xx"
++#define WM_CORE_VERSION "0.64"
++#define DEFAULT_PRESSURE 0xb0c0
++
++
++/*
++ * Touchscreen absolute values
++ *
++ * These parameters are used to help the input layer discard out of
++ * range readings and reduce jitter etc.
++ *
++ * o min, max:- indicate the min and max values your touch screen returns
++ * o fuzz:- use a higher number to reduce jitter
++ *
++ * The default values correspond to Mainstone II in QVGA mode
++ *
++ * Please read
++ * Documentation/input/input-programming.txt for more details.
++ */
++
++static int abs_x[3] = {350,3900,5};
++module_param_array(abs_x, int, NULL, 0);
++MODULE_PARM_DESC(abs_x, "Touchscreen absolute X min, max, fuzz");
++
++static int abs_y[3] = {320,3750,40};
++module_param_array(abs_y, int, NULL, 0);
++MODULE_PARM_DESC(abs_y, "Touchscreen absolute Y min, max, fuzz");
++
++static int abs_p[3] = {0,150,4};
++module_param_array(abs_p, int, NULL, 0);
++MODULE_PARM_DESC(abs_p, "Touchscreen absolute Pressure min, max, fuzz");
++
++/*
++ * Debug
++ */
++#if 0
++#define dbg(format, arg...) printk(KERN_DEBUG TS_NAME ": " format "\n" , ## arg)
++#else
++#define dbg(format, arg...)
++#endif
++#define err(format, arg...) printk(KERN_ERR TS_NAME ": " format "\n" , ## arg)
++#define info(format, arg...) printk(KERN_INFO TS_NAME ": " format "\n" , ## arg)
++#define warn(format, arg...) printk(KERN_WARNING TS_NAME ": " format "\n" , ## arg)
++
++/*
++ * wm97xx IO access, all IO locking done by AC97 layer
++ */
++int wm97xx_reg_read(struct wm97xx *wm, u16 reg)
++{
++ if (wm->ac97)
++ return wm->ac97->bus->ops->read(wm->ac97, reg);
++ else
++ return -1;
++}
++EXPORT_SYMBOL_GPL(wm97xx_reg_read);
++
++void wm97xx_reg_write(struct wm97xx *wm, u16 reg, u16 val)
++{
++ /* cache digitiser registers */
++ if(reg >= AC97_WM9713_DIG1 && reg <= AC97_WM9713_DIG3)
++ wm->dig[(reg - AC97_WM9713_DIG1) >> 1] = val;
++
++ /* cache gpio regs */
++ if(reg >= AC97_GPIO_CFG && reg <= AC97_MISC_AFE)
++ wm->gpio[(reg - AC97_GPIO_CFG) >> 1] = val;
++
++ /* wm9713 irq reg */
++ if(reg == 0x5a)
++ wm->misc = val;
++
++ if (wm->ac97)
++ wm->ac97->bus->ops->write(wm->ac97, reg, val);
++}
++EXPORT_SYMBOL_GPL(wm97xx_reg_write);
++
++/**
++ * wm97xx_read_aux_adc - Read the aux adc.
++ * @wm: wm97xx device.
++ * @adcsel: codec ADC to be read
++ *
++ * Reads the selected AUX ADC.
++ */
++
++int wm97xx_read_aux_adc(struct wm97xx *wm, u16 adcsel)
++{
++ int power_adc = 0, auxval;
++ u16 power = 0;
++
++ /* get codec */
++ mutex_lock(&wm->codec_mutex);
++
++ /* When the touchscreen is not in use, we may have to power up the AUX ADC
++ * before we can use sample the AUX inputs->
++ */
++ if (wm->id == WM9713_ID2 &&
++ (power = wm97xx_reg_read(wm, AC97_EXTENDED_MID)) & 0x8000) {
++ power_adc = 1;
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, power & 0x7fff);
++ }
++
++ /* Prepare the codec for AUX reading */
++ wm->codec->digitiser_ioctl(wm, WM97XX_AUX_PREPARE);
++
++ /* Turn polling mode on to read AUX ADC */
++ wm->pen_probably_down = 1;
++ wm->codec->poll_sample(wm, adcsel, &auxval);
++
++ if (power_adc)
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, power | 0x8000);
++
++ wm->codec->digitiser_ioctl(wm, WM97XX_DIG_RESTORE);
++
++ wm->pen_probably_down = 0;
++
++ mutex_unlock(&wm->codec_mutex);
++ return auxval & 0xfff;
++}
++EXPORT_SYMBOL_GPL(wm97xx_read_aux_adc);
++
++/**
++ * wm97xx_get_gpio - Get the status of a codec GPIO.
++ * @wm: wm97xx device.
++ * @gpio: gpio
++ *
++ * Get the status of a codec GPIO pin
++ */
++
++wm97xx_gpio_status_t wm97xx_get_gpio(struct wm97xx *wm, u32 gpio)
++{
++ u16 status;
++ wm97xx_gpio_status_t ret;
++
++ mutex_lock(&wm->codec_mutex);
++ status = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++
++ if (status & gpio)
++ ret = WM97XX_GPIO_HIGH;
++ else
++ ret = WM97XX_GPIO_LOW;
++
++ mutex_unlock(&wm->codec_mutex);
++ return ret;
++}
++EXPORT_SYMBOL_GPL(wm97xx_get_gpio);
++
++/**
++ * wm97xx_set_gpio - Set the status of a codec GPIO.
++ * @wm: wm97xx device.
++ * @gpio: gpio
++ *
++ *
++ * Set the status of a codec GPIO pin
++ */
++
++void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio,
++ wm97xx_gpio_status_t status)
++{
++ u16 reg;
++
++ mutex_lock(&wm->codec_mutex);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++
++ if (status & WM97XX_GPIO_HIGH)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ if (wm->id == WM9712_ID2)
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg << 1);
++ else
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, reg);
++ mutex_unlock(&wm->codec_mutex);
++}
++EXPORT_SYMBOL_GPL(wm97xx_set_gpio);
++
++/*
++ * Codec GPIO pin configuration, this set's pin direction, polarity,
++ * stickyness and wake up.
++ */
++void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio, wm97xx_gpio_dir_t dir,
++ wm97xx_gpio_pol_t pol, wm97xx_gpio_sticky_t sticky,
++ wm97xx_gpio_wake_t wake)
++{
++ u16 reg;
++
++ mutex_lock(&wm->codec_mutex);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
++
++ if (pol == WM97XX_GPIO_POL_HIGH)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, reg);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_STICKY);
++
++ if (sticky == WM97XX_GPIO_STICKY)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_STICKY, reg);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP);
++
++ if (wake == WM97XX_GPIO_WAKE)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_WAKEUP, reg);
++ reg = wm97xx_reg_read(wm, AC97_GPIO_CFG);
++
++ if (dir == WM97XX_GPIO_IN)
++ reg |= gpio;
++ else
++ reg &= ~gpio;
++
++ wm97xx_reg_write(wm, AC97_GPIO_CFG, reg);
++ mutex_unlock(&wm->codec_mutex);
++}
++EXPORT_SYMBOL_GPL(wm97xx_config_gpio);
++
++/*
++ * Handle a pen down interrupt.
++ */
++static void wm97xx_pen_irq_worker(struct work_struct *w)
++{
++/* struct wm97xx *wm = (struct wm97xx *) ptr; */
++ struct wm97xx *wm = container_of(w, struct wm97xx, pen_event_work);
++
++ /* do we need to enable the touch panel reader */
++ if (wm->id == WM9705_ID2) {
++ if (wm97xx_reg_read(wm, AC97_WM97XX_DIGITISER_RD) & WM97XX_PEN_DOWN)
++ wm->pen_is_down = 1;
++ else
++ wm->pen_is_down = 0;
++ wake_up_interruptible(&wm->pen_irq_wait);
++ } else {
++ u16 status, pol;
++ mutex_lock(&wm->codec_mutex);
++ status = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++ pol = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
++
++ if (WM97XX_GPIO_13 & pol & status) {
++ wm->pen_is_down = 1;
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, pol & ~WM97XX_GPIO_13);
++ } else {
++ wm->pen_is_down = 0;
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, pol | WM97XX_GPIO_13);
++ }
++
++ if (wm->id == WM9712_ID2)
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, (status & ~WM97XX_GPIO_13) << 1);
++ else
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, status & ~WM97XX_GPIO_13);
++ mutex_unlock(&wm->codec_mutex);
++ wake_up_interruptible(&wm->pen_irq_wait);
++ }
++
++ if (!wm->pen_is_down && wm->mach_ops && wm->mach_ops->acc_enabled)
++ wm->mach_ops->acc_pen_up(wm);
++ enable_irq(wm->pen_irq);
++}
++
++/*
++ * Codec PENDOWN irq handler
++ *
++ * We have to disable the codec interrupt in the handler because it can
++ * take upto 1ms to clear the interrupt source. The interrupt is then enabled
++ * again in the slow handler when the source has been cleared.
++ */
++static irqreturn_t wm97xx_pen_interrupt(int irq, void *dev_id)
++{
++ struct wm97xx *wm = (struct wm97xx *) dev_id;
++ disable_irq(wm->pen_irq);
++ queue_work(wm->pen_irq_workq, &wm->pen_event_work);
++ return IRQ_HANDLED;
++}
++
++/*
++ * initialise pen IRQ handler and workqueue
++ */
++static int wm97xx_init_pen_irq(struct wm97xx *wm)
++{
++ u16 reg;
++
++ INIT_WORK(&wm->pen_event_work, wm97xx_pen_irq_worker/* , wm */);
++ if ((wm->pen_irq_workq =
++ create_singlethread_workqueue("kwm97pen")) == NULL) {
++ err("could not create pen irq work queue");
++ wm->pen_irq = 0;
++ return -EINVAL;
++ }
++
++
++ wm->pen_irq = IRQ_GPIO(90);
++ if (request_irq (wm->pen_irq, wm97xx_pen_interrupt, SA_SHIRQ, "wm97xx-pen", wm)) {
++ err("could not register codec pen down interrupt, will poll for pen down");
++ destroy_workqueue(wm->pen_irq_workq);
++ wm->pen_irq = 0;
++ return -EINVAL;
++ }
++
++ /* enable PEN down on wm9712/13 */
++ if (wm->id != WM9705_ID2) {
++ reg = wm97xx_reg_read(wm, AC97_MISC_AFE);
++ wm97xx_reg_write(wm, AC97_MISC_AFE, reg & 0xfffb);
++ reg = wm97xx_reg_read(wm, 0x5a);
++ wm97xx_reg_write(wm, 0x5a, reg & ~0x0001);
++ }
++
++ return 0;
++}
++
++/* Private struct for communication between struct wm97xx_tshread
++ * and wm97xx_read_samples */
++struct ts_state {
++ int sleep_time;
++ int min_sleep_time;
++};
++
++static int wm97xx_read_samples(struct wm97xx *wm, struct ts_state *state)
++{
++ struct wm97xx_data data;
++ int rc;
++
++ mutex_lock(&wm->codec_mutex);
++
++ if (wm->mach_ops && wm->mach_ops->acc_enabled)
++ rc = wm->mach_ops->acc_pen_down(wm);
++ else
++ rc = wm->codec->poll_touch(wm, &data);
++
++ if (rc & RC_PENUP) {
++ if (wm->pen_is_down) {
++ wm->pen_is_down = 0;
++ dbg("pen up");
++ input_report_abs(wm->input_dev, ABS_PRESSURE, 0);
++ input_sync(wm->input_dev);
++ } else if (!(rc & RC_AGAIN)) {
++ /* We need high frequency updates only while pen is down,
++ * the user never will be able to touch screen faster than
++ * a few times per second... On the other hand, when the
++ * user is actively working with the touchscreen we don't
++ * want to lose the quick response. So we will slowly
++ * increase sleep time after the pen is up and quicky
++ * restore it to ~one task switch when pen is down again.
++ */
++ if (state->sleep_time < HZ / 10)
++ state->sleep_time++;
++ }
++
++ } else if (rc & RC_VALID) {
++ dbg("pen down: x=%x:%d, y=%x:%d, pressure=%x:%d\n",
++ data.x >> 12, data.x & 0xfff, data.y >> 12,
++ data.y & 0xfff, data.p >> 12, data.p & 0xfff);
++ input_report_abs(wm->input_dev, ABS_X, data.x & 0xfff);
++ input_report_abs(wm->input_dev, ABS_Y, data.y & 0xfff);
++ input_report_abs(wm->input_dev, ABS_PRESSURE, data.p & 0xfff);
++ input_sync(wm->input_dev);
++ wm->pen_is_down = 1;
++ state->sleep_time = state->min_sleep_time;
++ } else if (rc & RC_PENDOWN) {
++ dbg("pen down");
++ wm->pen_is_down = 1;
++ state->sleep_time = state->min_sleep_time;
++ }
++
++ mutex_unlock(&wm->codec_mutex);
++ return rc;
++}
++
++/*
++* The touchscreen sample reader thread.
++*/
++static int wm97xx_ts_read(void *data)
++{
++ int rc;
++ struct ts_state state;
++ struct wm97xx *wm = (struct wm97xx *) data;
++
++ /* set up thread context */
++ wm->ts_task = current;
++ daemonize("kwm97xxts");
++
++ if (wm->codec == NULL) {
++ wm->ts_task = NULL;
++ printk(KERN_ERR "codec is NULL, bailing\n");
++ }
++
++ complete(&wm->ts_init);
++ wm->pen_is_down = 0;
++ state.min_sleep_time = HZ >= 100 ? HZ / 100 : 1;
++ if (state.min_sleep_time < 1)
++ state.min_sleep_time = 1;
++ state.sleep_time = state.min_sleep_time;
++
++ /* touch reader loop */
++ while (wm->ts_task) {
++ do {
++ try_to_freeze();
++ rc = wm97xx_read_samples(wm, &state);
++ } while (rc & RC_AGAIN);
++ if (!wm->pen_is_down && wm->pen_irq) {
++ /* Nice, we don't have to poll for pen down event */
++ wait_event_interruptible(wm->pen_irq_wait, wm->pen_is_down);
++ } else {
++ set_task_state(current, TASK_INTERRUPTIBLE);
++ schedule_timeout(state.sleep_time);
++ }
++ }
++ complete_and_exit(&wm->ts_exit, 0);
++}
++
++/**
++ * wm97xx_ts_input_open - Open the touch screen input device.
++ * @idev: Input device to be opened.
++ *
++ * Called by the input sub system to open a wm97xx touchscreen device.
++ * Starts the touchscreen thread and touch digitiser.
++ */
++static int wm97xx_ts_input_open(struct input_dev *idev)
++{
++ int ret = 0;
++ struct wm97xx *wm = (struct wm97xx *) idev->private;
++
++ mutex_lock(&wm->codec_mutex);
++ /* first time opened ? */
++ if (wm->ts_use_count++ == 0) {
++ /* start touchscreen thread */
++ init_completion(&wm->ts_init);
++ init_completion(&wm->ts_exit);
++ ret = kernel_thread(wm97xx_ts_read, wm, CLONE_KERNEL);
++
++ if (ret >= 0) {
++ wait_for_completion(&wm->ts_init);
++ if (wm->ts_task == NULL)
++ ret = -EINVAL;
++ } else {
++ mutex_unlock(&wm->codec_mutex);
++ return ret;
++ }
++
++ /* start digitiser */
++ if (wm->mach_ops && wm->mach_ops->acc_enabled)
++ wm->codec->acc_enable(wm, 1);
++ wm->codec->digitiser_ioctl(wm, WM97XX_DIG_START);
++
++ /* init pen down/up irq handling */
++ if (wm->pen_irq) {
++ wm97xx_init_pen_irq(wm);
++
++ if (wm->pen_irq == 0) {
++ /* we failed to get an irq for pen down events,
++ * so we resort to polling. kickstart the reader */
++ wm->pen_is_down = 1;
++ wake_up_interruptible(&wm->pen_irq_wait);
++ }
++ }
++ }
++
++ mutex_unlock(&wm->codec_mutex);
++ return 0;
++}
++
++/**
++ * wm97xx_ts_input_close - Close the touch screen input device.
++ * @idev: Input device to be closed.
++ *
++ * Called by the input sub system to close a wm97xx touchscreen device.
++ * Kills the touchscreen thread and stops the touch digitiser.
++ */
++
++static void wm97xx_ts_input_close(struct input_dev *idev)
++{
++ struct wm97xx *wm = (struct wm97xx *) idev->private;
++
++ mutex_lock(&wm->codec_mutex);
++ if (--wm->ts_use_count == 0) {
++ /* destroy workqueues and free irqs */
++ if (wm->pen_irq) {
++ free_irq(wm->pen_irq, wm);
++ destroy_workqueue(wm->pen_irq_workq);
++ }
++
++ /* kill thread */
++ if (wm->ts_task) {
++ wm->ts_task = NULL;
++ wm->pen_is_down = 1;
++ mutex_unlock(&wm->codec_mutex);
++ wake_up_interruptible(&wm->pen_irq_wait);
++ wait_for_completion(&wm->ts_exit);
++ wm->pen_is_down = 0;
++ mutex_lock(&wm->codec_mutex);
++ }
++
++ /* stop digitiser */
++ wm->codec->digitiser_ioctl(wm, WM97XX_DIG_STOP);
++ if (wm->mach_ops && wm->mach_ops->acc_enabled)
++ wm->codec->acc_enable(wm, 0);
++ }
++ mutex_unlock(&wm->codec_mutex);
++}
++
++/*
++ * Bus interface to allow for client drivers codec access
++ * e.g. battery monitor
++ */
++static int wm97xx_bus_match(struct device *dev, struct device_driver *drv)
++{
++ return !(strcmp(dev->bus_id,drv->name));
++}
++
++/*
++ * The AC97 audio driver will do all the Codec suspend and resume
++ * tasks. This is just for anything machine specific or extra.
++ */
++static int wm97xx_bus_suspend(struct device *dev, pm_message_t state)
++{
++ int ret = 0;
++
++ if (dev->driver && dev->driver->suspend)
++ ret = dev->driver->suspend(dev, state);
++
++ return ret;
++}
++
++static int wm97xx_bus_resume(struct device *dev)
++{
++ int ret = 0;
++
++ if (dev->driver && dev->driver->resume)
++ ret = dev->driver->resume(dev);
++
++ return ret;
++}
++
++struct bus_type wm97xx_bus_type = {
++ .name = "wm97xx",
++ .match = wm97xx_bus_match,
++ .suspend = wm97xx_bus_suspend,
++ .resume = wm97xx_bus_resume,
++};
++EXPORT_SYMBOL_GPL(wm97xx_bus_type);
++
++static void wm97xx_release(struct device *dev)
++{
++ kfree(dev);
++}
++
++static int wm97xx_probe(struct device *dev)
++{
++ struct wm97xx* wm;
++ int ret = 0, id = 0;
++
++ if (!(wm = kzalloc(sizeof(struct wm97xx), GFP_KERNEL)))
++ return -ENOMEM;
++ mutex_init(&wm->codec_mutex);
++
++ init_waitqueue_head(&wm->pen_irq_wait);
++ wm->dev = dev;
++ dev->driver_data = wm;
++ wm->ac97 = to_ac97_t(dev);
++
++ /* check that we have a supported codec */
++ if ((id = wm97xx_reg_read(wm, AC97_VENDOR_ID1)) != WM97XX_ID1) {
++ err("could not find a wm97xx, found a %x instead\n", id);
++ kfree(wm);
++ return -ENODEV;
++ }
++
++ wm->id = wm97xx_reg_read(wm, AC97_VENDOR_ID2);
++ if(wm->id != wm97xx_codec.id) {
++ err("could not find a the selected codec, please build for wm97%2x", wm->id & 0xff);
++ kfree(wm);
++ return -ENODEV;
++ }
++
++ if((wm->input_dev = input_allocate_device()) == NULL) {
++ kfree(wm);
++ return -ENOMEM;
++ }
++
++ /* set up touch configuration */
++ info("detected a wm97%2x codec", wm->id & 0xff);
++ wm->input_dev->name = "wm97xx touchscreen";
++ wm->input_dev->open = wm97xx_ts_input_open;
++ wm->input_dev->close = wm97xx_ts_input_close;
++ set_bit(EV_ABS, wm->input_dev->evbit);
++ set_bit(ABS_X, wm->input_dev->absbit);
++ set_bit(ABS_Y, wm->input_dev->absbit);
++ set_bit(ABS_PRESSURE, wm->input_dev->absbit);
++ wm->input_dev->absmax[ABS_X] = abs_x[1];
++ wm->input_dev->absmax[ABS_Y] = abs_y[1];
++ wm->input_dev->absmax[ABS_PRESSURE] = abs_p[1];
++ wm->input_dev->absmin[ABS_X] = abs_x[0];
++ wm->input_dev->absmin[ABS_Y] = abs_y[0];
++ wm->input_dev->absmin[ABS_PRESSURE] = abs_p[0];
++ wm->input_dev->absfuzz[ABS_X] = abs_x[2];
++ wm->input_dev->absfuzz[ABS_Y] = abs_y[2];
++ wm->input_dev->absfuzz[ABS_PRESSURE] = abs_p[2];
++ wm->input_dev->private = wm;
++ wm->codec = &wm97xx_codec;
++ if((ret = input_register_device(wm->input_dev)) < 0) {
++ kfree(wm);
++ return -ENOMEM;
++ }
++
++ /* set up physical characteristics */
++ wm->codec->digitiser_ioctl(wm, WM97XX_PHY_INIT);
++
++ /* load gpio cache */
++ wm->gpio[0] = wm97xx_reg_read(wm, AC97_GPIO_CFG);
++ wm->gpio[1] = wm97xx_reg_read(wm, AC97_GPIO_POLARITY);
++ wm->gpio[2] = wm97xx_reg_read(wm, AC97_GPIO_STICKY);
++ wm->gpio[3] = wm97xx_reg_read(wm, AC97_GPIO_WAKEUP);
++ wm->gpio[4] = wm97xx_reg_read(wm, AC97_GPIO_STATUS);
++ wm->gpio[5] = wm97xx_reg_read(wm, AC97_MISC_AFE);
++
++ /* register our battery device */
++ if (!(wm->battery_dev = kzalloc(sizeof(struct device), GFP_KERNEL))) {
++ ret = -ENOMEM;
++ goto batt_err;
++ }
++ wm->battery_dev->bus = &wm97xx_bus_type;
++ strcpy(wm->battery_dev->bus_id,"wm97xx-battery");
++ wm->battery_dev->driver_data = wm;
++ wm->battery_dev->parent = dev;
++ wm->battery_dev->release = wm97xx_release;
++ if((ret = device_register(wm->battery_dev)) < 0)
++ goto batt_reg_err;
++
++ /* register our extended touch device (for machine specific extensions) */
++ if (!(wm->touch_dev = kzalloc(sizeof(struct device), GFP_KERNEL))) {
++ ret = -ENOMEM;
++ goto touch_err;
++ }
++ wm->touch_dev->bus = &wm97xx_bus_type;
++ strcpy(wm->touch_dev->bus_id,"wm97xx-touchscreen");
++ wm->touch_dev->driver_data = wm;
++ wm->touch_dev->parent = dev;
++ wm->touch_dev->release = wm97xx_release;
++ if((ret = device_register(wm->touch_dev)) < 0)
++ goto touch_reg_err;
++
++ return ret;
++
++touch_reg_err:
++ kfree(wm->touch_dev);
++touch_err:
++ device_unregister(wm->battery_dev);
++batt_reg_err:
++ kfree(wm->battery_dev);
++batt_err:
++ input_unregister_device(wm->input_dev);
++ kfree(wm);
++ return ret;
++}
++
++static int wm97xx_remove(struct device *dev)
++{
++ struct wm97xx *wm = dev_get_drvdata(dev);
++
++ /* Stop touch reader thread */
++ if (wm->ts_task) {
++ wm->ts_task = NULL;
++ wm->pen_is_down = 1;
++ wake_up_interruptible(&wm->pen_irq_wait);
++ wait_for_completion(&wm->ts_exit);
++ }
++ device_unregister(wm->battery_dev);
++ device_unregister(wm->touch_dev);
++ input_unregister_device(wm->input_dev);
++
++ kfree(wm);
++ return 0;
++}
++
++#ifdef CONFIG_PM
++int wm97xx_resume(struct device* dev)
++{
++ struct wm97xx *wm = dev_get_drvdata(dev);
++
++ /* restore digitiser and gpio's */
++ if(wm->id == WM9713_ID2) {
++ wm97xx_reg_write(wm, AC97_WM9713_DIG1, wm->dig[0]);
++ wm97xx_reg_write(wm, 0x5a, wm->misc);
++ if(wm->ts_use_count) {
++ u16 reg = wm97xx_reg_read(wm, AC97_EXTENDED_MID) & 0x7fff;
++ wm97xx_reg_write(wm, AC97_EXTENDED_MID, reg);
++ }
++ }
++
++ wm97xx_reg_write(wm, AC97_WM9713_DIG2, wm->dig[1]);
++ wm97xx_reg_write(wm, AC97_WM9713_DIG3, wm->dig[2]);
++
++ wm97xx_reg_write(wm, AC97_GPIO_CFG, wm->gpio[0]);
++ wm97xx_reg_write(wm, AC97_GPIO_POLARITY, wm->gpio[1]);
++ wm97xx_reg_write(wm, AC97_GPIO_STICKY, wm->gpio[2]);
++ wm97xx_reg_write(wm, AC97_GPIO_WAKEUP, wm->gpio[3]);
++ wm97xx_reg_write(wm, AC97_GPIO_STATUS, wm->gpio[4]);
++ wm97xx_reg_write(wm, AC97_MISC_AFE, wm->gpio[5]);
++
++ return 0;
++}
++
++#else
++#define wm97xx_resume NULL
++#endif
++
++/*
++ * Machine specific operations
++ */
++int wm97xx_register_mach_ops(struct wm97xx *wm, struct wm97xx_mach_ops *mach_ops)
++{
++ mutex_lock(&wm->codec_mutex);
++ if(wm->mach_ops) {
++ mutex_unlock(&wm->codec_mutex);
++ return -EINVAL;
++ }
++ wm->mach_ops = mach_ops;
++ mutex_unlock(&wm->codec_mutex);
++ return 0;
++}
++EXPORT_SYMBOL_GPL(wm97xx_register_mach_ops);
++
++void wm97xx_unregister_mach_ops(struct wm97xx *wm)
++{
++ mutex_lock(&wm->codec_mutex);
++ wm->mach_ops = NULL;
++ mutex_unlock(&wm->codec_mutex);
++}
++EXPORT_SYMBOL_GPL(wm97xx_unregister_mach_ops);
++
++static struct device_driver wm97xx_driver = {
++ .name = "ac97",
++ .bus = &ac97_bus_type,
++ .owner = THIS_MODULE,
++ .probe = wm97xx_probe,
++ .remove = wm97xx_remove,
++ .resume = wm97xx_resume,
++};
++
++static int __init wm97xx_init(void)
++{
++ int ret;
++
++ info("version %s liam.girdwood@wolfsonmicro.com", WM_CORE_VERSION);
++ if((ret = bus_register(&wm97xx_bus_type)) < 0)
++ return ret;
++ return driver_register(&wm97xx_driver);
++}
++
++static void __exit wm97xx_exit(void)
++{
++ driver_unregister(&wm97xx_driver);
++ bus_unregister(&wm97xx_bus_type);
++}
++
++module_init(wm97xx_init);
++module_exit(wm97xx_exit);
++
++/* Module information */
++MODULE_AUTHOR("Liam Girdwood, liam.girdwood@wolfsonmicro.com, www.wolfsonmicro.com");
++MODULE_DESCRIPTION("WM97xx Core - Touch Screen / AUX ADC / GPIO Driver");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
+index 4468cb3..01b4828 100644
+--- a/drivers/leds/Kconfig
++++ b/drivers/leds/Kconfig
+@@ -101,6 +101,12 @@ config LEDS_GPIO
+ outputs. To be useful the particular board must have LEDs
+ and they must be connected to the GPIO lines.
+
++config LEDS_EM_X270
++ tristate "LED Support for the CompuLab EM-X270"
++ depends on LEDS_CLASS && MACH_EM_X270
++ help
++ This option enables support for the LEDs on CompuLab EM-X270.
++
+ comment "LED Triggers"
+
+ config LEDS_TRIGGERS
+diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
+index f8995c9..6d3941e 100644
+--- a/drivers/leds/Makefile
++++ b/drivers/leds/Makefile
+@@ -17,6 +17,7 @@ obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
+ obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
+ obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o
+ obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o
++obj-$(CONFIG_LEDS_EM_X270) += leds-em-x270.o
+
+ # LED Triggers
+ obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
+diff --git a/drivers/leds/leds-em-x270.c b/drivers/leds/leds-em-x270.c
+new file mode 100644
+index 0000000..485e7da
+--- /dev/null
++++ b/drivers/leds/leds-em-x270.c
+@@ -0,0 +1,99 @@
++/*
++ * LED Triggers Core
++ *
++ * Copyright 2007 CompuLab, Ltd.
++ * Author: Mike Rapoport <mike@compulab.co.il>
++ *
++ * Based on Corgi leds driver:
++ * Copyright 2005-2006 Openedhand Ltd.
++ * Author: Richard Purdie <rpurdie@openedhand.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++#include <linux/da9030.h>
++
++static void em_x270_led_orange_set(struct led_classdev *led_cdev,
++ enum led_brightness value)
++{
++ int on = 1;
++ int pwm_chop = 0;
++
++ pr_info("%s: value = %d\n", __FUNCTION__, value);
++ if (value == LED_OFF)
++ on = 0;
++ else if (value == LED_HALF)
++ pwm_chop = 4;
++
++ da9030_set_led(3, on, 0, 0, pwm_chop);
++}
++
++static struct led_classdev em_x270_orange_led = {
++ .name = "em_x270:orange",
++ .default_trigger = "em-x270-battery.0-charging-or-full",
++ .brightness_set = em_x270_led_orange_set,
++};
++
++#ifdef CONFIG_PM
++static int em_x270_led_suspend(struct platform_device *dev, pm_message_t state)
++{
++#ifdef CONFIG_LEDS_TRIGGERS
++ if (em_x270_orange_led.trigger && strcmp(em_x270_orange_led.trigger->name, "em-x270-battery-charging-or-full"))
++#endif
++ led_classdev_suspend(&em_x270_orange_led);
++ return 0;
++}
++
++static int em_x270_led_resume(struct platform_device *dev)
++{
++ led_classdev_resume(&em_x270_orange_led);
++ return 0;
++}
++#endif
++
++static int em_x270_led_probe(struct platform_device *pdev)
++{
++ return led_classdev_register(&pdev->dev, &em_x270_orange_led);
++}
++
++static int em_x270_led_remove(struct platform_device *pdev)
++{
++ led_classdev_unregister(&em_x270_orange_led);
++ return 0;
++}
++
++static struct platform_driver em_x270_led_driver = {
++ .probe = em_x270_led_probe,
++ .remove = em_x270_led_remove,
++#ifdef CONFIG_PM
++ .suspend = em_x270_led_suspend,
++ .resume = em_x270_led_resume,
++#endif
++ .driver = {
++ .name = "em-x270-led",
++ },
++};
++
++static int __init em_x270_led_init(void)
++{
++ return platform_driver_register(&em_x270_led_driver);
++}
++
++static void __exit em_x270_led_exit(void)
++{
++ platform_driver_unregister(&em_x270_led_driver);
++}
++
++module_init(em_x270_led_init);
++module_exit(em_x270_led_exit);
++
++MODULE_AUTHOR("Mike Rapoport <mike@compulab.co.il>");
++MODULE_DESCRIPTION("EX-X270 LED driver");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/mtd/chips/jedec_probe.c b/drivers/mtd/chips/jedec_probe.c
+index 58e561e..7050e71 100644
+--- a/drivers/mtd/chips/jedec_probe.c
++++ b/drivers/mtd/chips/jedec_probe.c
+@@ -38,7 +38,7 @@
+ #define MANUFACTURER_ST 0x0020
+ #define MANUFACTURER_TOSHIBA 0x0098
+ #define MANUFACTURER_WINBOND 0x00da
+-
++#define CONTINUATION_CODE 0x007f
+
+ /* AMD */
+ #define AM29DL800BB 0x22C8
+@@ -68,6 +68,10 @@
+ #define AT49BV32X 0x00C8
+ #define AT49BV32XT 0x00C9
+
++/* Eon */
++#define EN29SL800BB 0x226B
++#define EN29SL800BT 0x22EA
++
+ /* Fujitsu */
+ #define MBM29F040C 0x00A4
+ #define MBM29LV650UE 0x22D7
+@@ -632,6 +636,40 @@ static const struct amd_flash_info jedec_table[] = {
+ ERASEINFO(0x02000,8)
+ }
+ }, {
++ .mfr_id = 0x1c,
++ .dev_id = EN29SL800BT,
++ .name = "Eon EN29SL800BT",
++ .uaddr = {
++ [0] = MTD_UADDR_0x0555_0x02AA, /* x8 */
++ [1] = MTD_UADDR_0x0555_0x02AA, /* x16 */
++ },
++ .DevSize = SIZE_1MiB,
++ .CmdSet = P_ID_AMD_STD,
++ .NumEraseRegions= 4,
++ .regions = {
++ ERASEINFO(0x10000, 15),
++ ERASEINFO(0x08000, 1),
++ ERASEINFO(0x02000, 2),
++ ERASEINFO(0x04000, 1),
++ }
++ }, {
++ .mfr_id = 0x1c,
++ .dev_id = EN29SL800BB,
++ .name = "Eon EN29SL800BB",
++ .uaddr = {
++ [0] = MTD_UADDR_0x0555_0x02AA, /* x8 */
++ [1] = MTD_UADDR_0x0555_0x02AA, /* x16 */
++ },
++ .DevSize = SIZE_1MiB,
++ .CmdSet = P_ID_AMD_STD,
++ .NumEraseRegions= 4,
++ .regions = {
++ ERASEINFO(0x04000, 1),
++ ERASEINFO(0x02000, 2),
++ ERASEINFO(0x08000, 1),
++ ERASEINFO(0x10000, 15),
++ }
++ }, {
+ .mfr_id = MANUFACTURER_FUJITSU,
+ .dev_id = MBM29F040C,
+ .name = "Fujitsu MBM29F040C",
+@@ -1769,9 +1807,21 @@ static inline u32 jedec_read_mfr(struct map_info *map, __u32 base,
+ {
+ map_word result;
+ unsigned long mask;
+- u32 ofs = cfi_build_cmd_addr(0, cfi_interleave(cfi), cfi->device_type);
+- mask = (1 << (cfi->device_type * 8)) -1;
+- result = map_read(map, base + ofs);
++ int bank = 0;
++
++ /* According to JEDEC "Standard Manufacturer's Identification Code"
++ * (http://www.jedec.org/download/search/jep106W.pdf)
++ * several first banks can contain 0x7f instead of actual ID
++ */
++ do {
++ u32 ofs = cfi_build_cmd_addr(0 + (bank << 8),
++ cfi_interleave(cfi),
++ cfi->device_type);
++ mask = (1 << (cfi->device_type * 8)) -1;
++ result = map_read(map, base + ofs);
++ bank++;
++ } while ((result.x[0] & mask) == CONTINUATION_CODE);
++
+ return result.x[0] & mask;
+ }
+
+diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
+index 738aa59..88dbbdf 100644
+--- a/drivers/net/dm9000.c
++++ b/drivers/net/dm9000.c
+@@ -546,6 +546,7 @@ dm9000_probe(struct platform_device *pdev)
+
+ if (id_val != DM9000_ID) {
+ printk("%s: wrong id: 0x%08x\n", CARDNAME, id_val);
++ ret = -ENODEV;
+ goto release;
+ }
+
+diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
+index 58c806e..3a16d9c 100644
+--- a/drivers/power/Kconfig
++++ b/drivers/power/Kconfig
+@@ -49,4 +49,10 @@ config BATTERY_OLPC
+ help
+ Say Y to enable support for the battery on the OLPC laptop.
+
++config BATTERY_EM_X270
++ tristate "EM-X270 battery"
++ depends on DA9030 && MACH_EM_X270
++ help
++ Say Y here to enable support for battery on EM-X270.
++
+ endif # POWER_SUPPLY
+diff --git a/drivers/power/Makefile b/drivers/power/Makefile
+index 6413ded..dc9585e 100644
+--- a/drivers/power/Makefile
++++ b/drivers/power/Makefile
+@@ -20,3 +20,4 @@ obj-$(CONFIG_APM_POWER) += apm_power.o
+ obj-$(CONFIG_BATTERY_DS2760) += ds2760_battery.o
+ obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o
+ obj-$(CONFIG_BATTERY_OLPC) += olpc_battery.o
++obj-$(CONFIG_BATTERY_EM_X270) += em_x270_battery.o
+diff --git a/drivers/power/em_x270_battery.c b/drivers/power/em_x270_battery.c
+new file mode 100644
+index 0000000..2630c68
+--- /dev/null
++++ b/drivers/power/em_x270_battery.c
+@@ -0,0 +1,579 @@
++/*
++ * Power managemnet implementation for EM-X270
++ *
++ * Copyright (C) 2007 CompuLab, Ltd.
++ * Author: Mike Rapoport <mike@compulab.co.il>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#define DEBUG
++
++#include <linux/module.h>
++#include <linux/platform_device.h>
++#include <linux/pda_power.h>
++#include <linux/apm-emulation.h>
++#include <linux/da9030.h>
++#include <linux/power_supply.h>
++#include <linux/pm.h>
++
++#include <linux/debugfs.h>
++#include <linux/seq_file.h>
++
++#include "../i2c/chips/da9030.h"
++
++#define VOLTAGE_MAX_DESIGN 4200000 /* 4.2V in uV */
++#define VOLTAGE_MIN_DESIGN 3000000 /* 3V in uV */
++
++/* #define VCHARGE_MIN_THRESHOLD 72 /\* 4.5V *\/ */
++
++#define VCHARGE_MIN_THRESHOLD 60 /* ?.?V */
++#define VCHARGE_MAX_THRESHOLD 89 /* 5.5V */
++#define TBAT_LOW_THRESHOLD 197 /* 0oC */
++#define TBAT_HIGH_THRESHOLD 78 /* 45oC */
++#define TBAT_RESUME_THRESHOLD 100 /* 35oC */
++#define VBAT_LOW_THRESHOLD 82 /* 3.498V */
++#define VBAT_CRIT_THRESHOLD 62 /* 3.291V */
++
++struct da9030_charger {
++ struct device *dev;
++
++ struct power_supply bat;
++ struct da9030_adc_res adc;
++ struct delayed_work work;
++
++ int interval;
++ int status;
++ int mA;
++ int mV;
++
++ int is_charging:1;
++
++#ifdef CONFIG_DEBUG_FS
++ struct dentry *debug_file;
++#endif
++};
++
++static unsigned short tbat_readings[] = {
++ 300, 244, 200, 178, 163, 152, 144, 137, 131,
++ 126, 122, 118, 114, 111, 108, 105, 103, 101,
++ 98, 96, 94, 93, 91, 89, 88, 86, 85,
++ 83, 82, 81, 79, 78, 77, 76, 75, 74,
++ 73, 72, 71, 70, 69, 68, 67, 67, 66,
++ 65, 64, 63, 63, 62, 61, 60, 60, 59,
++ 58, 58, 57, 57, 56, 55, 55, 54, 53,
++ 53, 52, 52, 51, 51, 50, 50, 49, 49,
++ 48, 48, 47, 47, 46, 46, 45, 45, 44,
++ 44, 43, 43, 42, 42, 41, 41, 41, 40,
++ 40, 39, 39, 38, 38, 38, 37, 37, 36,
++ 36, 35, 35, 35, 34, 34, 34, 33, 33,
++ 32, 32, 32, 31, 31, 30, 30, 30, 29,
++ 29, 29, 28, 28, 28, 27, 27, 26, 26,
++ 26, 25, 25, 25, 24, 24, 24, 23, 23,
++ 23, 22, 22, 21, 21, 21, 20, 20, 20,
++ 19, 19, 19, 18, 18, 18, 17, 17, 17,
++ 16, 16, 16, 15, 15, 14, 14, 14, 13,
++ 13, 13, 12, 12, 12, 11, 11, 11, 10,
++ 10, 10, 9, 9, 8, 8, 8, 7, 7,
++ 7, 6, 6, 5, 5, 5, 4, 4, 3,
++ 3, 3, 2, 2, 1, 1, 1, 0, 0,
++ -1, -1, -1, -2, -2, -3, -3, -4, -4,
++ -5, -5, -6, -6, -6, -7, -7, -8, -9,
++ -9, -10, -10, -11, -11, -12, -12, -13, -14,
++ -14, -15, -16, -16, -17, -18, -18, -19, -20,
++ -21, -21, -22, -23, -24, -25, -26, -27, -28,
++ -30, -31, -32, -34, -35, -37, -39, -41, -44,
++ -47, -50, -56, -64,
++};
++
++#ifdef CONFIG_DEBUG_FS
++
++#define REG2VOLT(x) ((((x) * 2650) >> 8) + 2650)
++
++static int debug_show(struct seq_file *s, void *data)
++{
++ struct da9030_charger *charger = s->private;
++
++ seq_printf(s, "charger is %s\n",
++ charger->status & CHRG_CHARGER_ENABLE ? "on" : "off");
++ if (charger->status & CHRG_CHARGER_ENABLE) {
++ seq_printf(s, "iset = %dmA, vset = %dmV\n",
++ charger->mA, charger->mV);
++ }
++
++ seq_printf(s, "vbat_res = %d (%dmV)\n",
++ charger->adc.vbat_res, REG2VOLT(charger->adc.vbat_res));
++ seq_printf(s, "vbatmin_res = %d (%dmV)\n",
++ charger->adc.vbatmin_res,
++ REG2VOLT(charger->adc.vbatmin_res));
++ seq_printf(s, "vbatmintxon = %d (%dmV)\n",
++ charger->adc.vbatmintxon,
++ REG2VOLT(charger->adc.vbatmintxon));
++ seq_printf(s, "ichmax_res = %d\n", charger->adc.ichmax_res);
++ seq_printf(s, "ichmin_res = %d\n", charger->adc.ichmin_res);
++ seq_printf(s, "ichaverage_res = %d\n", charger->adc.ichaverage_res);
++ seq_printf(s, "vchmax_res = %d (%dmV)\n",
++ charger->adc.vchmax_res,
++ REG2VOLT(charger->adc.vchmax_res));
++ seq_printf(s, "vchmin_res = %d (%dmV)\n",
++ charger->adc.vchmin_res,
++ REG2VOLT(charger->adc.vchmin_res));
++ seq_printf(s, "tbat_res = %d (%doC\n", charger->adc.tbat_res,
++ tbat_readings[charger->adc.tbat_res]);
++ seq_printf(s, "adc_in4_res = %d\n", charger->adc.adc_in4_res);
++ seq_printf(s, "adc_in5_res = %d\n", charger->adc.adc_in5_res);
++
++ return 0;
++}
++
++static int debug_open(struct inode *inode, struct file *file)
++{
++ return single_open(file, debug_show, inode->i_private);
++}
++
++static const struct file_operations debug_fops = {
++ .open = debug_open,
++ .read = seq_read,
++ .llseek = seq_lseek,
++ .release = single_release,
++};
++
++static struct dentry* da9030_create_debugfs(struct da9030_charger *charger)
++{
++ charger->debug_file = debugfs_create_file("charger", 0666, 0, charger,
++ &debug_fops);
++ return charger->debug_file;
++}
++
++static void da9030_remove_debugfs(struct da9030_charger *charger)
++{
++ debugfs_remove(charger->debug_file);
++}
++#else
++#define da9030_create_debugfs(x) NULL
++#define da9030_remove_debugfs(x) do {} while(0)
++#endif
++
++static void da9030_set_charge(struct da9030_charger *charger, int on)
++{
++/* int status = da9030_get_status(); */
++ if (on) {
++ pr_debug("%s: enabling charger\n", __FUNCTION__);
++ da9030_set_thresholds(TBAT_HIGH_THRESHOLD,
++ TBAT_RESUME_THRESHOLD,
++ TBAT_LOW_THRESHOLD);
++ da9030_set_charger(1, 1000, 4200);
++ charger->is_charging = 1;
++ }
++ else {
++ /* disable charger */
++ pr_debug("%s: disabling charger\n", __FUNCTION__);
++ da9030_set_charger(0, 0, 0);
++ charger->is_charging = 0;
++ }
++}
++
++static void da9030_charging_monitor(struct work_struct *work)
++{
++ struct da9030_charger *charger;
++ int is_on;
++ unsigned int mA, mV;
++
++ charger = container_of(work, struct da9030_charger, work.work);
++
++ da9030_get_charger(&is_on, &mA, &mV);
++ da9030_read_adc(&charger->adc);
++
++ charger->status = da9030_get_status();
++ charger->mA = mA;
++ charger->mV = mV;
++
++ /* we wake or boot with external power on */
++ if (!is_on && (charger->status & STATUS_CHDET)) {
++ da9030_set_charge(charger, 1);
++ return;
++ }
++
++ if (is_on) {
++/* pr_info("%s: mA = %d, mV = %d\n", __FUNCTION__, mA, mV); */
++/* pr_info("%s: vchmin_res = %d, vchmax_res = %d\n", */
++/* __FUNCTION__, charger->adc.vchmin_res, */
++/* charger->adc.vchmax_res); */
++/* pr_info("%s: tbat_res = %d\n", */
++/* __FUNCTION__, charger->adc.tbat_res); */
++ if (charger->adc.vbat_res > VBAT_LOW_THRESHOLD) {
++ /* update VBAT threshlods ? */
++ da9030_set_reg(VBATMON, VBAT_LOW_THRESHOLD);
++ }
++ if (charger->adc.vchmax_res > VCHARGE_MAX_THRESHOLD ||
++ charger->adc.vchmin_res < VCHARGE_MIN_THRESHOLD ||
++ /* Tempreture readings are negative */
++ charger->adc.tbat_res < TBAT_HIGH_THRESHOLD ||
++ charger->adc.tbat_res > TBAT_LOW_THRESHOLD) {
++ /* disable charger */
++ da9030_set_charge(charger, 0);
++ }
++ }
++
++ /* reschedule for the next time */
++ schedule_delayed_work(&charger->work, charger->interval);
++}
++
++void da9030_battery_release(struct device * dev)
++{
++}
++
++static void da9030_external_power_changed(struct power_supply *psy)
++{
++/* struct da9030_charger *charger; */
++
++/* charger = container_of(psy, struct da9030_charger, bat); */
++/* pr_info("%s:\n", __FUNCTION__); */
++/* da9030_set_charge(charger); */
++}
++
++struct da9030_battery_thresh {
++ int voltage;
++ int percentage;
++};
++
++static struct da9030_battery_thresh vbat_ranges[] = {
++ { 150, 100},
++ { 149, 99},
++ { 148, 98},
++ { 147, 98},
++ { 146, 97},
++ { 145, 96},
++ { 144, 96},
++ { 143, 95},
++ { 142, 94},
++ { 141, 93},
++ { 140, 92},
++ { 139, 91},
++ { 138, 90},
++ { 137, 90},
++ { 136, 89},
++ { 135, 88},
++ { 134, 88},
++ { 133, 87},
++ { 132, 86},
++ { 131, 85},
++ { 130, 83},
++ { 129, 82},
++ { 128, 81},
++ { 127, 81},
++ { 126, 80},
++ { 125, 75},
++ { 124, 74},
++ { 123, 73},
++ { 122, 70},
++ { 121, 66},
++ { 120, 65},
++ { 119, 64},
++ { 118, 64},
++ { 117, 63},
++ { 116, 59},
++ { 115, 58},
++ { 114, 57},
++ { 113, 57},
++ { 112, 56},
++ { 111, 50},
++ { 110, 49},
++ { 109, 49},
++ { 108, 48},
++ { 107, 48},
++ { 106, 33},
++ { 105, 32},
++ { 104, 32},
++ { 103, 32},
++ { 102, 31},
++ { 101, 16},
++ { 100, 15},
++ { 99, 15},
++ { 98, 15},
++ { 97, 10},
++ { 96, 9},
++ { 95, 7},
++ { 94, 3},
++ { 93, 0},
++};
++
++static enum power_supply_property da9030_bat_props[] = {
++ POWER_SUPPLY_PROP_STATUS,
++ POWER_SUPPLY_PROP_HEALTH,
++ POWER_SUPPLY_PROP_TECHNOLOGY,
++ POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
++ POWER_SUPPLY_PROP_VOLTAGE_NOW,
++ POWER_SUPPLY_PROP_CURRENT_AVG,
++ POWER_SUPPLY_PROP_CAPACITY, /* in percents! */
++ POWER_SUPPLY_PROP_TEMP,
++ POWER_SUPPLY_PROP_MANUFACTURER,
++ POWER_SUPPLY_PROP_MODEL_NAME,
++};
++
++static void da9030_bat_check_status(union power_supply_propval *val)
++{
++ int charger_on;
++ int status = da9030_get_status();
++
++ da9030_get_charger(&charger_on, 0, 0);
++
++ /* FIXME: below code is very crude approximation of actual
++ states, we need to take into account voltage and current
++ measurements to determine actual charger state */
++ if (status & STATUS_CHDET) {
++ if (charger_on) {
++ val->intval = POWER_SUPPLY_STATUS_CHARGING;
++ }
++ else {
++ val->intval = POWER_SUPPLY_STATUS_NOT_CHARGING;
++ }
++ }
++ else {
++ val->intval = POWER_SUPPLY_STATUS_DISCHARGING;
++ }
++}
++
++static void da9030_bat_check_health(union power_supply_propval *val)
++{
++ int fault_log = da9030_get_fault_log();
++
++ if (fault_log & FAULT_LOG_OVER_TEMP) {
++ val->intval = POWER_SUPPLY_HEALTH_OVERHEAT;
++ }
++ else if (fault_log & FAULT_LOG_VBAT_OVER) {
++ val->intval = POWER_SUPPLY_HEALTH_OVERVOLTAGE;
++ }
++ else {
++ val->intval = POWER_SUPPLY_HEALTH_GOOD;
++ }
++}
++
++static int vbat_interpolate(int reg)
++{
++ int i;
++
++ for (i = 0; i < ARRAY_SIZE(vbat_ranges); i++ )
++ if (vbat_ranges[i].voltage == reg) {
++ pr_debug("%s: voltage = %d, percentage = %d\n",
++ __FUNCTION__, vbat_ranges[i].voltage,
++ vbat_ranges[i].percentage);
++ return vbat_ranges[i].percentage;
++ }
++
++ return 0;
++}
++
++static int da9030_bat_get_property(struct power_supply *psy,
++ enum power_supply_property psp,
++ union power_supply_propval *val)
++{
++ u32 reg;
++ struct da9030_charger *charger;
++ charger = container_of(psy, struct da9030_charger, bat);
++
++ switch(psp) {
++ case POWER_SUPPLY_PROP_STATUS:
++ da9030_bat_check_status(val);
++ break;
++ case POWER_SUPPLY_PROP_HEALTH:
++ da9030_bat_check_health(val);
++ break;
++ case POWER_SUPPLY_PROP_TECHNOLOGY:
++ val->intval = POWER_SUPPLY_TECHNOLOGY_LIPO;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN:
++ val->intval = VOLTAGE_MAX_DESIGN;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN:
++ val->intval = VOLTAGE_MIN_DESIGN;
++ break;
++ case POWER_SUPPLY_PROP_VOLTAGE_NOW:
++ reg = charger->adc.vbat_res;
++ /* V = (reg / 256) * 2.65 + 2.65 (V) */
++ val->intval = ((reg * 2650000) >> 8) + 2650000;
++ break;
++ case POWER_SUPPLY_PROP_CURRENT_AVG:
++ reg = charger->adc.ichaverage_res;
++ val->intval = reg; /* reg */
++ break;
++ case POWER_SUPPLY_PROP_CAPACITY:
++ reg = charger->adc.vbat_res;
++ val->intval = vbat_interpolate(reg);
++ break;
++ case POWER_SUPPLY_PROP_TEMP:
++ reg = charger->adc.tbat_res;
++ val->intval = tbat_readings[reg];
++ break;
++ case POWER_SUPPLY_PROP_MANUFACTURER:
++ val->strval = "MaxPower";
++ pr_debug("%s: MFG = %s\n", __FUNCTION__, val->strval);
++ break;
++ case POWER_SUPPLY_PROP_MODEL_NAME:
++ val->strval = "LP555597P6H-FPS";
++ pr_debug("%s: MODEL = %s\n", __FUNCTION__, val->strval);
++ break;
++ default: break;
++ }
++
++ return 0;
++}
++
++static void da9030_setup_battery(struct power_supply *bat)
++{
++ bat->name = "em-x270-battery";
++ bat->type = POWER_SUPPLY_TYPE_BATTERY;
++ bat->properties = da9030_bat_props;
++ bat->num_properties = ARRAY_SIZE(da9030_bat_props);
++ bat->get_property = da9030_bat_get_property;
++ bat->use_for_apm = 1;
++ bat->external_power_changed = da9030_external_power_changed;
++};
++
++static void da9030_chiover_callback(int event, void *_charger)
++{
++ /* disable charger */
++ struct da9030_charger *charger = _charger;
++ da9030_set_charge(charger, 0);
++}
++
++static void da9030_tbat_callback(int event, void *_charger)
++{
++ /* disable charger */
++ struct da9030_charger *charger = _charger;
++ da9030_set_charge(charger, 0);
++}
++
++static void da9030_vbat_callback(int event, void *_charger)
++{
++ struct da9030_charger *charger = _charger;
++ da9030_read_adc(&charger->adc);
++
++ if (charger->is_charging) {
++ if (charger->adc.vbat_res < VBAT_LOW_THRESHOLD) {
++ /* set VBAT threshold for critical */
++ da9030_set_reg(VBATMON, VBAT_CRIT_THRESHOLD);
++ }
++ else if (charger->adc.vbat_res < VBAT_CRIT_THRESHOLD) {
++ /* notify the system of battery critical */
++ apm_queue_event(APM_CRITICAL_SUSPEND);
++ }
++ }
++}
++
++static void da9030_ccto_callback(int event, void *_charger)
++{
++ /* x3 */
++}
++
++static void da9030_tcto_callback(int event, void *_charger)
++{
++ /* x3 */
++}
++
++static void da9030_chdet_callback(int event, void *_charger)
++{
++ struct da9030_charger *charger = _charger;
++ int status = da9030_get_status();
++ da9030_set_charge(charger, !!(status & CHRG_CHARGER_ENABLE));
++}
++
++static int da9030_battery_probe(struct platform_device *pdev)
++{
++ struct da9030_charger *charger;
++
++ pr_debug("%s\n", __FUNCTION__);
++ charger = kzalloc(sizeof(*charger), GFP_KERNEL);
++ if (charger == NULL) {
++ return -ENOMEM;
++ }
++
++ charger->dev = &pdev->dev;
++
++ charger->interval = 10 * HZ; /* 10 seconds between monotor runs */
++ da9030_setup_battery(&charger->bat);
++
++ platform_set_drvdata(pdev, charger);
++
++ da9030_enable_adc();
++
++ INIT_DELAYED_WORK(&charger->work, da9030_charging_monitor);
++ schedule_delayed_work(&charger->work, charger->interval);
++
++ charger->debug_file = da9030_create_debugfs(charger);
++
++ da9030_setup_battery(&charger->bat);
++
++ da9030_register_callback(DA9030_IRQ_CHDET,
++ da9030_chdet_callback,
++ charger);
++ da9030_register_callback(DA9030_IRQ_VBATMON,
++ da9030_vbat_callback,
++ charger);
++
++ /* critical condition events */
++ da9030_register_callback(DA9030_IRQ_CHIOVER,
++ da9030_chiover_callback,
++ charger);
++ da9030_register_callback(DA9030_IRQ_TBAT,
++ da9030_tbat_callback,
++ charger);
++
++ /* timer events */
++ da9030_register_callback(DA9030_IRQ_TCTO,
++ da9030_tcto_callback,
++ charger);
++ da9030_register_callback(DA9030_IRQ_CCTO,
++ da9030_ccto_callback,
++ charger);
++
++ power_supply_register(&pdev->dev, &charger->bat);
++
++ return 0;
++}
++
++static int da9030_battery_remove(struct platform_device *dev)
++{
++ struct da9030_charger *charger = platform_get_drvdata(dev);
++
++ pr_debug("%s\n", __FUNCTION__);
++ da9030_remove_debugfs(charger);
++ cancel_delayed_work(&charger->work);
++ power_supply_unregister(&charger->bat);
++ kfree(charger);
++ return 0;
++}
++
++static struct platform_driver da9030_battery_driver = {
++ .driver = {
++ .name = "da9030-battery",
++ .owner = THIS_MODULE,
++ },
++ .probe = da9030_battery_probe,
++ .remove = da9030_battery_remove,
++};
++
++static int da9030_battery_init(void)
++{
++ pr_debug("%s\n", __FUNCTION__);
++
++ return platform_driver_register(&da9030_battery_driver);
++}
++
++static void da9030_battery_exit(void)
++{
++ pr_debug("%s\n", __FUNCTION__);
++
++ platform_driver_unregister(&da9030_battery_driver);
++}
++
++module_init(da9030_battery_init);
++module_exit(da9030_battery_exit);
++
++MODULE_DESCRIPTION("DA9030 charger driver");
++MODULE_AUTHOR("Mike Rapoport");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
+index 767aed5..4c44a7a 100644
+--- a/drivers/usb/gadget/Kconfig
++++ b/drivers/usb/gadget/Kconfig
+@@ -195,6 +195,26 @@ config USB_M66592
+ default USB_GADGET
+ select USB_GADGET_SELECTED
+
++config USB_GADGET_PXA27X
++ boolean "PXA 27x"
++ depends on ARCH_PXA && PXA27x
++ help
++ Intel's PXA 27x series XScale ARM-5TE processors include
++ an integrated full speed USB 1.1 device controller.
++
++ It has 23 endpoints, as well as endpoint zero (for control
++ transfers).
++
++ Say "y" to link the driver statically, or "m" to build a
++ dynamically linked module called "pxa27x_udc" and force all
++ gadget drivers to also be dynamically linked.
++
++config USB_PXA27X
++ tristate
++ depends on USB_GADGET_PXA27X
++ default USB_GADGET
++ select USB_GADGET_SELECTED
++
+ config USB_GADGET_GOKU
+ boolean "Toshiba TC86C001 'Goku-S'"
+ depends on PCI
+diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
+index 1bc0f03..b8743bf 100644
+--- a/drivers/usb/gadget/Makefile
++++ b/drivers/usb/gadget/Makefile
+@@ -9,6 +9,7 @@ obj-$(CONFIG_USB_DUMMY_HCD) += dummy_hcd.o
+ obj-$(CONFIG_USB_NET2280) += net2280.o
+ obj-$(CONFIG_USB_AMD5536UDC) += amd5536udc.o
+ obj-$(CONFIG_USB_PXA2XX) += pxa2xx_udc.o
++obj-$(CONFIG_USB_PXA27X) += pxa27x_udc.o
+ obj-$(CONFIG_USB_GOKU) += goku_udc.o
+ obj-$(CONFIG_USB_OMAP) += omap_udc.o
+ obj-$(CONFIG_USB_LH7A40X) += lh7a40x_udc.o
+diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
+index 3aa46cf..d7d5550 100644
+--- a/drivers/usb/gadget/epautoconf.c
++++ b/drivers/usb/gadget/epautoconf.c
+@@ -228,14 +228,19 @@ find_ep (struct usb_gadget *gadget, const char *name)
+ *
+ * On failure, this returns a null endpoint descriptor.
+ */
+-struct usb_ep * __devinit usb_ep_autoconfig (
++struct usb_ep * usb_ep_autoconfig (
+ struct usb_gadget *gadget,
+- struct usb_endpoint_descriptor *desc
++ struct usb_endpoint_descriptor *desc,
++ struct usb_endpoint_config *epconfig, int numconfigs
+ )
+ {
+ struct usb_ep *ep;
+ u8 type;
+
++ /* Use device specific ep allocation code if provided */
++ if (gadget->ops->ep_alloc)
++ return gadget->ops->ep_alloc(gadget, desc, epconfig, numconfigs);
++
+ type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
+
+ /* First, apply chip-specific "best usage" knowledge.
+diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
+index 593e235..87aa9fb 100644
+--- a/drivers/usb/gadget/ether.c
++++ b/drivers/usb/gadget/ether.c
+@@ -1350,6 +1350,10 @@ static void rndis_response_complete (struct usb_ep *ep, struct usb_request *req)
+ /* done sending after USB_CDC_GET_ENCAPSULATED_RESPONSE */
+ }
+
++#ifdef CONFIG_USB_GADGET_PXA27X
++int write_ep0_zlp(void);
++#endif
++
+ static void rndis_command_complete (struct usb_ep *ep, struct usb_request *req)
+ {
+ struct eth_dev *dev = ep->driver_data;
+@@ -1360,6 +1364,10 @@ static void rndis_command_complete (struct usb_ep *ep, struct usb_request *req)
+ status = rndis_msg_parser (dev->rndis_config, (u8 *) req->buf);
+ if (status < 0)
+ ERROR(dev, "%s: rndis parse error %d\n", __FUNCTION__, status);
++
++#ifdef CONFIG_USB_GADGET_PXA27X
++ write_ep0_zlp();
++#endif
+ spin_unlock(&dev->lock);
+ }
+
+@@ -2287,7 +2295,8 @@ eth_bind (struct usb_gadget *gadget)
+ struct eth_dev *dev;
+ struct net_device *net;
+ u8 cdc = 1, zlp = 1, rndis = 1;
+- struct usb_ep *in_ep, *out_ep, *status_ep = NULL;
++ struct usb_ep *in_ep = NULL , *out_ep = NULL, *status_ep = NULL;
++ struct usb_endpoint_config ep_config[2];
+ int status = -ENOMEM;
+ int gcnum;
+
+@@ -2386,7 +2395,30 @@ eth_bind (struct usb_gadget *gadget)
+
+ /* all we really need is bulk IN/OUT */
+ usb_ep_autoconfig_reset (gadget);
+- in_ep = usb_ep_autoconfig (gadget, &fs_source_desc);
++
++ ep_config[0].config = DEV_CONFIG_VALUE;
++#if defined(DEV_CONFIG_CDC)
++ ep_config[0].interface = data_intf.bInterfaceNumber;
++ ep_config[0].altinterface = data_intf.bAlternateSetting;
++#else /* DEV_CONFIG_SUBSET */
++ ep_config[0].interface = subset_data_intf.bInterfaceNumber;
++ ep_config[0].altinterface = subset_data_intf.bAlternateSetting;
++#endif
++
++#ifdef CONFIG_USB_ETH_RNDIS
++ ep_config[1].config = DEV_RNDIS_CONFIG_VALUE;
++#ifdef CONFIG_USB_GADGET_PXA27X
++ ep_config[1].interface = 0;
++#else
++ ep_config[1].interface = rndis_data_intf.bInterfaceNumber;
++#endif
++ ep_config[1].altinterface = rndis_data_intf.bAlternateSetting;
++
++ in_ep = usb_ep_autoconfig(gadget, &fs_source_desc, &ep_config[0], 2);
++#else
++ in_ep = usb_ep_autoconfig(gadget, &fs_source_desc, &ep_config[0], 1);
++#endif
++
+ if (!in_ep) {
+ autoconf_fail:
+ dev_err (&gadget->dev,
+@@ -2396,7 +2428,12 @@ autoconf_fail:
+ }
+ in_ep->driver_data = in_ep; /* claim */
+
+- out_ep = usb_ep_autoconfig (gadget, &fs_sink_desc);
++#ifdef CONFIG_USB_ETH_RNDIS
++ out_ep = usb_ep_autoconfig(gadget, &fs_sink_desc, &ep_config[0], 2);
++#else
++ out_ep = usb_ep_autoconfig(gadget, &fs_sink_desc, &ep_config[0], 1);
++#endif
++
+ if (!out_ep)
+ goto autoconf_fail;
+ out_ep->driver_data = out_ep; /* claim */
+@@ -2406,7 +2443,25 @@ autoconf_fail:
+ * Since some hosts expect one, try to allocate one anyway.
+ */
+ if (cdc || rndis) {
+- status_ep = usb_ep_autoconfig (gadget, &fs_status_desc);
++#ifdef DEV_CONFIG_CDC
++ ep_config[0].config = DEV_CONFIG_VALUE;
++ ep_config[0].interface = control_intf.bInterfaceNumber;
++ ep_config[0].altinterface = control_intf.bAlternateSetting;
++#endif
++#ifdef CONFIG_USB_ETH_RNDIS
++ ep_config[1].config = DEV_RNDIS_CONFIG_VALUE;
++ ep_config[1].interface = rndis_control_intf.bInterfaceNumber;
++ ep_config[1].altinterface = rndis_control_intf.bAlternateSetting;
++#endif
++
++#if defined(DEV_CONFIG_CDC) && defined(CONFIG_USB_ETH_RNDIS)
++ status_ep = usb_ep_autoconfig(gadget, &fs_status_desc, &ep_config[0], 2);
++#elif defined(CONFIG_USB_ETH_RNDIS)
++ status_ep = usb_ep_autoconfig(gadget, &fs_status_desc, &ep_config[1], 1);
++#else
++ status_ep = usb_ep_autoconfig(gadget, &fs_status_desc, &ep_config[0], 1);
++#endif
++
+ if (status_ep) {
+ status_ep->driver_data = status_ep; /* claim */
+ } else if (rndis) {
+diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
+index 965ad7b..b9cd8c9 100644
+--- a/drivers/usb/gadget/file_storage.c
++++ b/drivers/usb/gadget/file_storage.c
+@@ -3841,6 +3841,7 @@ static int __init fsg_bind(struct usb_gadget *gadget)
+ struct usb_ep *ep;
+ struct usb_request *req;
+ char *pathbuf, *p;
++ struct usb_endpoint_config ep_config;
+
+ fsg->gadget = gadget;
+ set_gadget_data(gadget, fsg);
+@@ -3911,21 +3912,25 @@ static int __init fsg_bind(struct usb_gadget *gadget)
+ }
+
+ /* Find all the endpoints we will use */
++ ep_config.config = CONFIG_VALUE;
++ ep_config.interface = intf_desc.bInterfaceNumber;
++ ep_config.altinterface = intf_desc.bAlternateSetting;
++
+ usb_ep_autoconfig_reset(gadget);
+- ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc);
++ ep = usb_ep_autoconfig(gadget, &fs_bulk_in_desc, &ep_config, 1);
+ if (!ep)
+ goto autoconf_fail;
+ ep->driver_data = fsg; // claim the endpoint
+ fsg->bulk_in = ep;
+
+- ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc);
++ ep = usb_ep_autoconfig(gadget, &fs_bulk_out_desc, &ep_config, 1);
+ if (!ep)
+ goto autoconf_fail;
+ ep->driver_data = fsg; // claim the endpoint
+ fsg->bulk_out = ep;
+
+ if (transport_is_cbi()) {
+- ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc);
++ ep = usb_ep_autoconfig(gadget, &fs_intr_in_desc, &ep_config, 1);
+ if (!ep)
+ goto autoconf_fail;
+ ep->driver_data = fsg; // claim the endpoint
+diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/pxa27x_udc.c
+new file mode 100644
+index 0000000..d4270d4
+--- /dev/null
++++ b/drivers/usb/gadget/pxa27x_udc.c
+@@ -0,0 +1,2387 @@
++/*
++ * Handles the Intel 27x USB Device Controller (UDC)
++ *
++ * Copyright (C) 2002 Intrinsyc, Inc. (Frank Becker)
++ * Copyright (C) 2003 Robert Schwebel, Pengutronix
++ * Copyright (C) 2003 Benedikt Spranger, Pengutronix
++ * Copyright (C) 2003 David Brownell
++ * Copyright (C) 2003 Joshua Wise
++ * Copyright (C) 2004 Intel Corporation
++ * Copyright (C) 2005 SDG Systems, LLC (Aric Blumer)
++ * Copyright (C) 2005-2006 Openedhand Ltd. (Richard Purdie)
++ *
++ * 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
++ *
++ */
++
++#undef DEBUG
++//#define DEBUG 1
++//#define VERBOSE DBG_VERBOSE
++
++#include <linux/module.h>
++#include <linux/kernel.h>
++#include <linux/ioport.h>
++#include <linux/types.h>
++#include <linux/version.h>
++#include <linux/errno.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++#include <linux/sched.h>
++#include <linux/slab.h>
++#include <linux/init.h>
++#include <linux/timer.h>
++#include <linux/list.h>
++#include <linux/interrupt.h>
++#include <linux/proc_fs.h>
++#include <linux/mm.h>
++#include <linux/device.h>
++#include <linux/dma-mapping.h>
++
++#include <asm/byteorder.h>
++#include <asm/dma.h>
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/system.h>
++#include <asm/mach-types.h>
++#include <asm/unaligned.h>
++#include <asm/hardware.h>
++#include <asm/arch/pxa-regs.h>
++
++#include <linux/usb/ch9.h>
++#include <linux/usb_gadget.h>
++
++#include <asm/arch/udc.h>
++
++/*
++ * This driver handles the USB Device Controller (UDC) in Intel's PXA 27x
++ * series processors.
++ *
++ * Such controller drivers work with a gadget driver. The gadget driver
++ * returns descriptors, implements configuration and data protocols used
++ * by the host to interact with this device, and allocates endpoints to
++ * the different protocol interfaces. The controller driver virtualizes
++ * usb hardware so that the gadget drivers will be more portable.
++ *
++ * This UDC hardware wants to implement a bit too much USB protocol. The
++ * biggest issue is that the endpoints have to be setup before the controller
++ * can be enabled and each endpoint can only have one configuration, interface
++ * and alternative interface number. Once enabled, these cannot be changed
++ * without a controller reset.
++ *
++ * Intel Errata #22 mentions issues when changing alternate interface.
++ * The exact meaning of this remains uncertain as gadget drivers using alternate
++ * interfaces such as CDC-Ethernet appear to work...
++ */
++
++#define DRIVER_VERSION "01-01-2006"
++#define DRIVER_DESC "PXA 27x USB Device Controller driver"
++
++static const char driver_name [] = "pxa27x_udc";
++
++static const char ep0name [] = "ep0";
++
++
++#define USE_DMA
++//#undef USE_DMA
++
++#ifdef CONFIG_PROC_FS
++#define UDC_PROC_FILE
++#endif
++
++#include "pxa27x_udc.h"
++
++#ifdef USE_DMA
++static int use_dma = 1;
++module_param(use_dma, bool, 0);
++MODULE_PARM_DESC(use_dma, "true to use dma");
++
++static void dma_nodesc_handler(int dmach, void *_ep);
++static void kick_dma(struct pxa27x_ep *ep, struct pxa27x_request *req);
++
++#define DMASTR " (dma support)"
++
++#else /* !USE_DMA */
++#define DMASTR " (pio only)"
++#endif
++
++#define UDCISR0_IR0 0x3
++#define UDCISR_INT_MASK (UDC_INT_FIFOERROR | UDC_INT_PACKETCMP)
++#define UDCICR_INT_MASK UDCISR_INT_MASK
++
++#define UDCCSR_MASK (UDCCSR_FST | UDCCSR_DME)
++
++static void pxa27x_ep_fifo_flush(struct usb_ep *ep);
++static void nuke(struct pxa27x_ep *, int status);
++static void udc_init_ep(struct pxa27x_udc *dev);
++
++
++/*
++ * Endpoint Functions
++ */
++static void pio_irq_enable(int ep_num)
++{
++ if (ep_num < 16)
++ UDCICR0 |= 3 << (ep_num * 2);
++ else {
++ ep_num -= 16;
++ UDCICR1 |= 3 << (ep_num * 2);
++ }
++}
++
++static void pio_irq_disable(int ep_num)
++{
++ ep_num &= 0xf;
++ if (ep_num < 16)
++ UDCICR0 &= ~(3 << (ep_num * 2));
++ else {
++ ep_num -= 16;
++ UDCICR1 &= ~(3 << (ep_num * 2));
++ }
++}
++
++/* The UDCCR reg contains mask and interrupt status bits,
++ * so using '|=' isn't safe as it may ack an interrupt.
++ */
++#define UDCCR_MASK_BITS (UDCCR_OEN | UDCCR_UDE)
++
++static inline void udc_set_mask_UDCCR(int mask)
++{
++ UDCCR = (UDCCR & UDCCR_MASK_BITS) | (mask & UDCCR_MASK_BITS);
++}
++
++static inline void udc_clear_mask_UDCCR(int mask)
++{
++ UDCCR = (UDCCR & UDCCR_MASK_BITS) & ~(mask & UDCCR_MASK_BITS);
++}
++
++static inline void udc_ack_int_UDCCR(int mask)
++{
++ /* udccr contains the bits we dont want to change */
++ __u32 udccr = UDCCR & UDCCR_MASK_BITS;
++
++ UDCCR = udccr | (mask & ~UDCCR_MASK_BITS);
++}
++
++/*
++ * Endpoint enable/disable
++ *
++ * Not much to do here as the ep_alloc function sets up most things. Once
++ * enabled, not much of the pxa27x configuration can be changed.
++ *
++ */
++static int pxa27x_ep_enable(struct usb_ep *_ep, const struct usb_endpoint_descriptor *desc)
++{
++ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep);
++ struct pxa27x_ep *ep = virt_ep->pxa_ep;
++ struct pxa27x_udc *dev;
++
++ if (!_ep || !desc || _ep->name == ep0name
++ || desc->bDescriptorType != USB_DT_ENDPOINT
++ || ep->fifo_size < le16_to_cpu(desc->wMaxPacketSize)) {
++ dev_err(ep->dev->dev, "%s, bad ep or descriptor\n", __FUNCTION__);
++ return -EINVAL;
++ }
++
++ /* xfer types must match, except that interrupt ~= bulk */
++ if( ep->ep_type != USB_ENDPOINT_XFER_BULK
++ && desc->bmAttributes != USB_ENDPOINT_XFER_INT) {
++ dev_err(ep->dev->dev, "%s, %s type mismatch\n", __FUNCTION__, _ep->name);
++ return -EINVAL;
++ }
++
++ /* hardware _could_ do smaller, but driver doesn't */
++ if ((desc->bmAttributes == USB_ENDPOINT_XFER_BULK
++ && le16_to_cpu (desc->wMaxPacketSize)
++ != BULK_FIFO_SIZE)
++ || !desc->wMaxPacketSize) {
++ dev_err(ep->dev->dev, "%s, bad %s maxpacket\n", __FUNCTION__, _ep->name);
++ return -ERANGE;
++ }
++
++ dev = ep->dev;
++ if (!dev->driver || dev->gadget.speed == USB_SPEED_UNKNOWN) {
++ dev_err(ep->dev->dev, "%s, bogus device state\n", __FUNCTION__);
++ return -ESHUTDOWN;
++ }
++
++ ep->desc = desc;
++ ep->dma = -1;
++ ep->stopped = 0;
++ ep->pio_irqs = ep->dma_irqs = 0;
++ ep->usb_ep->maxpacket = le16_to_cpu(desc->wMaxPacketSize);
++
++ /* flush fifo (mostly for OUT buffers) */
++ pxa27x_ep_fifo_flush(_ep);
++
++ /* ... reset halt state too, if we could ... */
++
++#ifdef USE_DMA
++ /* for (some) bulk and ISO endpoints, try to get a DMA channel and
++ * bind it to the endpoint. otherwise use PIO.
++ */
++ dev_dbg(ep->dev->dev, "%s: called attributes=%d\n", __FUNCTION__, ep->ep_type);
++ switch (ep->ep_type) {
++ case USB_ENDPOINT_XFER_ISOC:
++ if (le16_to_cpu(desc->wMaxPacketSize) % 32)
++ break;
++ // fall through
++ case USB_ENDPOINT_XFER_BULK:
++ if (!use_dma || !ep->reg_drcmr)
++ break;
++ ep->dma = pxa_request_dma((char *)_ep->name, (le16_to_cpu(desc->wMaxPacketSize) > 64)
++ ? DMA_PRIO_MEDIUM : DMA_PRIO_LOW, dma_nodesc_handler, ep);
++ if (ep->dma >= 0) {
++ *ep->reg_drcmr = DRCMR_MAPVLD | ep->dma;
++ dev_dbg(ep->dev->dev, "%s using dma%d\n", _ep->name, ep->dma);
++ }
++ default:
++ break;
++ }
++#endif
++ DBG(DBG_VERBOSE, "enabled %s\n", _ep->name);
++ return 0;
++}
++
++static int pxa27x_ep_disable(struct usb_ep *_ep)
++{
++ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep);
++ struct pxa27x_ep *ep = virt_ep->pxa_ep;
++ unsigned long flags;
++
++ if (!_ep || !ep->desc) {
++ dev_err(ep->dev->dev, "%s, %s not enabled\n", __FUNCTION__,
++ _ep ? _ep->name : NULL);
++ return -EINVAL;
++ }
++ local_irq_save(flags);
++ nuke(ep, -ESHUTDOWN);
++
++#ifdef USE_DMA
++ if (ep->dma >= 0) {
++ *ep->reg_drcmr = 0;
++ pxa_free_dma(ep->dma);
++ ep->dma = -1;
++ }
++#endif
++
++ /* flush fifo (mostly for IN buffers) */
++ pxa27x_ep_fifo_flush(_ep);
++
++ ep->desc = 0;
++ ep->stopped = 1;
++
++ local_irq_restore(flags);
++ DBG(DBG_VERBOSE, "%s disabled\n", _ep->name);
++ return 0;
++}
++
++
++
++/* for the pxa27x, these can just wrap kmalloc/kfree. gadget drivers
++ * must still pass correctly initialized endpoints, since other controller
++ * drivers may care about how it's currently set up (dma issues etc).
++ */
++
++/*
++ * pxa27x_ep_alloc_request - allocate a request data structure
++ */
++static struct usb_request *
++pxa27x_ep_alloc_request(struct usb_ep *_ep, unsigned gfp_flags)
++{
++ struct pxa27x_request *req;
++
++ req = kzalloc(sizeof *req, gfp_flags);
++ if (!req)
++ return 0;
++
++ INIT_LIST_HEAD(&req->queue);
++ return &req->req;
++}
++
++
++/*
++ * pxa27x_ep_free_request - deallocate a request data structure
++ */
++static void
++pxa27x_ep_free_request(struct usb_ep *_ep, struct usb_request *_req)
++{
++ struct pxa27x_request *req;
++
++ req = container_of(_req, struct pxa27x_request, req);
++ WARN_ON(!list_empty(&req->queue));
++ kfree(req);
++}
++
++
++/*-------------------------------------------------------------------------*/
++
++/*
++ * done - retire a request; caller blocked irqs
++ */
++static void done(struct pxa27x_ep *ep, struct pxa27x_request *req, int status)
++{
++ list_del_init(&req->queue);
++ if (likely (req->req.status == -EINPROGRESS))
++ req->req.status = status;
++ else
++ status = req->req.status;
++
++ if (status && status != -ESHUTDOWN)
++ DBG(DBG_VERBOSE, "complete %s req %p stat %d len %u/%u\n",
++ ep->usb_ep->name, &req->req, status,
++ req->req.actual, req->req.length);
++
++ /* don't modify queue heads during completion callback */
++ req->req.complete(ep->usb_ep, &req->req);
++}
++
++
++static inline void ep0_idle(struct pxa27x_udc *dev)
++{
++ dev->ep0state = EP0_IDLE;
++}
++
++static int write_packet(volatile u32 *uddr, struct pxa27x_request *req, unsigned max)
++{
++ u32 *buf;
++ int length, count, remain;
++
++ buf = (u32*)(req->req.buf + req->req.actual);
++ prefetch(buf);
++
++ /* how big will this packet be? */
++ length = min(req->req.length - req->req.actual, max);
++ req->req.actual += length;
++
++ remain = length & 0x3;
++ count = length & ~(0x3);
++
++ //dev_dbg(ep->dev->dev, "Length %d, Remain %d, Count %d\n",length, remain, count);
++
++ while (likely(count)) {
++ //dev_dbg(ep->dev->dev, "Sending:0x%x\n", *buf);
++ *uddr = *buf++;
++ count -= 4;
++ }
++
++ if (remain) {
++ volatile u8* reg=(u8*)uddr;
++ char *rd =(u8*)buf;
++
++ while (remain--) {
++ *reg=*rd++;
++ }
++ }
++
++ return length;
++}
++
++/*
++ * write to an IN endpoint fifo, as many packets as possible.
++ * irqs will use this to write the rest later.
++ * caller guarantees at least one packet buffer is ready (or a zlp).
++ */
++static int
++write_fifo(struct pxa27x_ep *ep, struct pxa27x_request *req)
++{
++ unsigned max;
++
++ max = le16_to_cpu(ep->desc->wMaxPacketSize);
++ do {
++ int count, is_last, is_short;
++
++ //dev_dbg(ep->dev->dev, "write_fifo7 %x\n", *ep->reg_udccsr);
++
++ if (*ep->reg_udccsr & UDCCSR_PC) {
++ //dev_dbg(ep->dev->dev, "Transmit Complete\n");
++ *ep->reg_udccsr = UDCCSR_PC | (*ep->reg_udccsr & UDCCSR_MASK);
++ }
++
++ if (*ep->reg_udccsr & UDCCSR_TRN) {
++ //dev_dbg(ep->dev->dev, "Clearing Underrun\n");
++ *ep->reg_udccsr = UDCCSR_TRN | (*ep->reg_udccsr & UDCCSR_MASK);
++ }
++ //dev_dbg(ep->dev->dev, "write_fifo8 %x\n", *ep->reg_udccsr);
++
++ count = write_packet(ep->reg_udcdr, req, max);
++
++ /* last packet is usually short (or a zlp) */
++ if (unlikely (count != max))
++ is_last = is_short = 1;
++ else {
++ if (likely(req->req.length != req->req.actual)
++ || req->req.zero)
++ is_last = 0;
++ else
++ is_last = 1;
++ /* interrupt/iso maxpacket may not fill the fifo */
++ is_short = unlikely (max < ep->fifo_size);
++ }
++
++ //dev_dbg(ep->dev->dev, "write_fifo0 %x\n", *ep->reg_udccsr);
++
++ dev_dbg(ep->dev->dev, "wrote %s count:%d bytes%s%s %d left %p\n",
++ ep->usb_ep->name, count,
++ is_last ? "/L" : "", is_short ? "/S" : "",
++ req->req.length - req->req.actual, &req->req);
++
++ /* let loose that packet. maybe try writing another one,
++ * double buffering might work.
++ */
++
++ if (is_short)
++ *ep->reg_udccsr = UDCCSR_SP | (*ep->reg_udccsr & UDCCSR_MASK);
++
++ dev_dbg(ep->dev->dev, "write_fifo0.5 %x\n", *ep->reg_udccsr);
++
++ /* requests complete when all IN data is in the FIFO */
++ if (is_last) {
++ done(ep, req, 0);
++ if (list_empty(&ep->queue) || unlikely(ep->dma >= 0)) {
++ pio_irq_disable(ep->pxa_ep_num);
++ //dev_dbg(ep->dev->dev, "write_fifo1 %x\n", *ep->reg_udccsr);
++#ifdef USE_DMA
++ /* unaligned data and zlps couldn't use dma */
++ if (unlikely(!list_empty(&ep->queue))) {
++ req = list_entry(ep->queue.next,
++ struct pxa27x_request, queue);
++ kick_dma(ep,req);
++ return 0;
++ }
++#endif
++ }
++ //dev_dbg(ep->dev->dev, "write_fifo2 %x\n", *ep->reg_udccsr);
++ return 1;
++ }
++
++ // TODO experiment: how robust can fifo mode tweaking be?
++ // double buffering is off in the default fifo mode, which
++ // prevents TFS from being set here.
++
++ } while (*ep->reg_udccsr & UDCCSR_FS);
++ //dev_dbg(ep->dev->dev, "write_fifo2 %x\n", *ep->reg_udccsr);
++ return 0;
++}
++
++/* caller asserts req->pending (ep0 irq status nyet cleared); starts
++ * ep0 data stage. these chips want very simple state transitions.
++ */
++static inline
++void ep0start(struct pxa27x_udc *dev, u32 flags, const char *tag)
++{
++ UDCCSR0 = flags|UDCCSR0_SA|UDCCSR0_OPC;
++ UDCISR0 = UDCICR_INT(0, UDC_INT_FIFOERROR | UDC_INT_PACKETCMP);
++ dev->req_pending = 0;
++ DBG(DBG_VERY_NOISY, "%s %s, %02x/%02x\n",
++ __FUNCTION__, tag, UDCCSR0, flags);
++}
++
++static int
++write_ep0_fifo(struct pxa27x_ep *ep, struct pxa27x_request *req)
++{
++ unsigned count;
++ int is_short;
++
++ count = write_packet(&UDCDR0, req, EP0_FIFO_SIZE);
++ ep->dev->stats.write.bytes += count;
++
++ /* last packet "must be" short (or a zlp) */
++ is_short = (count != EP0_FIFO_SIZE);
++
++ DBG(DBG_VERY_NOISY, "ep0in %d bytes %d left %p\n", count,
++ req->req.length - req->req.actual, &req->req);
++
++ if (unlikely (is_short)) {
++ if (ep->dev->req_pending)
++ ep0start(ep->dev, UDCCSR0_IPR, "short IN");
++ else
++ UDCCSR0 = UDCCSR0_IPR;
++
++ count = req->req.length;
++ done(ep, req, 0);
++ ep0_idle(ep->dev);
++#if 0
++ /* This seems to get rid of lost status irqs in some cases:
++ * host responds quickly, or next request involves config
++ * change automagic, or should have been hidden, or ...
++ *
++ * FIXME get rid of all udelays possible...
++ */
++ if (count >= EP0_FIFO_SIZE) {
++ count = 100;
++ do {
++ if ((UDCCSR0 & UDCCSR0_OPC) != 0) {
++ /* clear OPC, generate ack */
++ UDCCSR0 = UDCCSR0_OPC;
++ break;
++ }
++ count--;
++ udelay(1);
++ } while (count);
++ }
++#endif
++ } else if (ep->dev->req_pending)
++ ep0start(ep->dev, 0, "IN");
++ return is_short;
++}
++
++
++/*
++ * read_fifo - unload packet(s) from the fifo we use for usb OUT
++ * transfers and put them into the request. caller should have made
++ * sure there's at least one packet ready.
++ *
++ * returns true if the request completed because of short packet or the
++ * request buffer having filled (and maybe overran till end-of-packet).
++ */
++static int read_fifo(struct pxa27x_ep *ep, struct pxa27x_request *req)
++{
++ for (;;) {
++ u32 *buf;
++ int bufferspace, count, is_short;
++
++ /* make sure there's a packet in the FIFO.*/
++ if (unlikely ((*ep->reg_udccsr & UDCCSR_PC) == 0))
++ break;
++ buf =(u32*) (req->req.buf + req->req.actual);
++ prefetchw(buf);
++ bufferspace = req->req.length - req->req.actual;
++
++ /* read all bytes from this packet */
++ if (likely (*ep->reg_udccsr & UDCCSR_BNE)) {
++ count = 0x3ff & *ep->reg_udcbcr;
++ req->req.actual += min(count, bufferspace);
++ } else /* zlp */
++ count = 0;
++
++ is_short = (count < ep->usb_ep->maxpacket);
++ dev_dbg(ep->dev->dev, "read %s udccsr:%02x, count:%d bytes%s req %p %d/%d\n",
++ ep->usb_ep->name, *ep->reg_udccsr, count,
++ is_short ? "/S" : "",
++ &req->req, req->req.actual, req->req.length);
++
++ count = min(count, bufferspace);
++ while (likely (count > 0)) {
++ *buf++ = *ep->reg_udcdr;
++ count -= 4;
++ }
++ dev_dbg(ep->dev->dev, "Buf:0x%p\n", req->req.buf);
++
++ *ep->reg_udccsr = UDCCSR_PC;
++ /* RPC/RSP/RNE could now reflect the other packet buffer */
++
++ /* completion */
++ if (is_short || req->req.actual == req->req.length) {
++ done(ep, req, 0);
++ if (list_empty(&ep->queue))
++ pio_irq_disable(ep->pxa_ep_num);
++ return 1;
++ }
++
++ /* finished that packet. the next one may be waiting... */
++ }
++ return 0;
++}
++
++/*
++ * special ep0 version of the above. no UBCR0 or double buffering; status
++ * handshaking is magic. most device protocols don't need control-OUT.
++ * CDC vendor commands (and RNDIS), mass storage CB/CBI, and some other
++ * protocols do use them.
++ */
++static int read_ep0_fifo(struct pxa27x_ep *ep, struct pxa27x_request *req)
++{
++ u32 *buf, word;
++ unsigned bufferspace;
++
++ buf = (u32*) (req->req.buf + req->req.actual);
++ bufferspace = req->req.length - req->req.actual;
++
++ while (UDCCSR0 & UDCCSR0_RNE) {
++ word = UDCDR0;
++
++ if (unlikely (bufferspace == 0)) {
++ /* this happens when the driver's buffer
++ * is smaller than what the host sent.
++ * discard the extra data.
++ */
++ if (req->req.status != -EOVERFLOW)
++ dev_info(ep->dev->dev, "%s overflow\n", ep->usb_ep->name);
++ req->req.status = -EOVERFLOW;
++ } else {
++ *buf++ = word;
++ req->req.actual += 4;
++ bufferspace -= 4;
++ }
++ }
++
++ UDCCSR0 = UDCCSR0_OPC ;
++
++ /* completion */
++ if (req->req.actual >= req->req.length)
++ return 1;
++
++ /* finished that packet. the next one may be waiting... */
++ return 0;
++}
++
++#ifdef USE_DMA
++
++#define MAX_IN_DMA ((DCMD_LENGTH + 1) - BULK_FIFO_SIZE)
++static void kick_dma(struct pxa27x_ep *ep, struct pxa27x_request *req)
++{
++ u32 dcmd = 0;
++ u32 len = req->req.length;
++ u32 buf = req->req.dma;
++ u32 fifo = io_v2p((u32)ep->reg_udcdr);
++
++ buf += req->req.actual;
++ len -= req->req.actual;
++ ep->dma_con = 0;
++
++ DMSG("%s: req:0x%p length:%d, actual:%d dma:%d\n",
++ __FUNCTION__, &req->req, req->req.length,
++ req->req.actual,ep->dma);
++
++ /* no-descriptor mode can be simple for bulk-in, iso-in, iso-out */
++ DCSR(ep->dma) = DCSR_NODESC;
++ if (buf & 0x3)
++ DALGN |= 1 << ep->dma;
++ else
++ DALGN &= ~(1 << ep->dma);
++
++ if (ep->dir_in) {
++ DSADR(ep->dma) = buf;
++ DTADR(ep->dma) = fifo;
++ if (len > MAX_IN_DMA) {
++ len= MAX_IN_DMA;
++ ep->dma_con =1 ;
++ } else if (len >= ep->usb_ep->maxpacket) {
++ if ((ep->dma_con = (len % ep->usb_ep->maxpacket) != 0))
++ len = ep->usb_ep->maxpacket;
++ }
++ dcmd = len | DCMD_BURST32 | DCMD_WIDTH4 | DCMD_ENDIRQEN
++ | DCMD_FLOWTRG | DCMD_INCSRCADDR;
++ } else {
++ DSADR(ep->dma) = fifo;
++ DTADR(ep->dma) = buf;
++ dcmd = len | DCMD_BURST32 | DCMD_WIDTH4 | DCMD_ENDIRQEN
++ | DCMD_FLOWSRC | DCMD_INCTRGADDR;
++ }
++ *ep->reg_udccsr = UDCCSR_DME;
++ DCMD(ep->dma) = dcmd;
++ DCSR(ep->dma) = DCSR_NODESC | DCSR_EORIRQEN \
++ | ((ep->dir_in) ? DCSR_STOPIRQEN : 0);
++ *ep->reg_drcmr = ep->dma | DRCMR_MAPVLD;
++ DCSR(ep->dma) |= DCSR_RUN;
++}
++
++static void cancel_dma(struct pxa27x_ep *ep)
++{
++ struct pxa27x_request *req;
++ u32 tmp;
++
++ if (DCSR(ep->dma) == 0 || list_empty(&ep->queue))
++ return;
++
++ DMSG("hehe dma:%d,dcsr:0x%x\n", ep->dma, DCSR(ep->dma));
++ DCSR(ep->dma) = 0;
++ while ((DCSR(ep->dma) & DCSR_STOPSTATE) == 0)
++ cpu_relax();
++
++ req = list_entry(ep->queue.next, struct pxa27x_request, queue);
++ tmp = DCMD(ep->dma) & DCMD_LENGTH;
++ req->req.actual = req->req.length - tmp;
++
++ /* the last tx packet may be incomplete, so flush the fifo.
++ * FIXME correct req.actual if we can
++ */
++ *ep->reg_udccsr = UDCCSR_FEF;
++}
++
++static void dma_nodesc_handler(int dmach, void *_ep)
++{
++ struct pxa27x_ep *ep = _ep;
++ struct pxa27x_request *req, *req_next;
++ u32 dcsr, tmp, completed;
++
++ local_irq_disable();
++
++ req = list_entry(ep->queue.next, struct pxa27x_request, queue);
++
++ DMSG("%s, buf:0x%p\n",__FUNCTION__, req->req.buf);
++
++ ep->dma_irqs++;
++ ep->dev->stats.irqs++;
++
++ completed = 0;
++
++ dcsr = DCSR(dmach);
++ DCSR(ep->dma) &= ~DCSR_RUN;
++
++ if (dcsr & DCSR_BUSERR) {
++ DCSR(dmach) = DCSR_BUSERR;
++ dev_err(ep->dev->dev, "DMA Bus Error\n");
++ req->req.status = -EIO;
++ completed = 1;
++ } else if (dcsr & DCSR_ENDINTR) {
++ DCSR(dmach) = DCSR_ENDINTR;
++ if (ep->dir_in) {
++ tmp = req->req.length - req->req.actual;
++ /* Last packet is a short one*/
++ if (tmp < ep->usb_ep->maxpacket) {
++ int count = 0;
++
++ *ep->reg_udccsr = UDCCSR_SP | \
++ (*ep->reg_udccsr & UDCCSR_MASK);
++ /*Wait for packet out */
++ while( (count++ < 10000) && \
++ !(*ep->reg_udccsr & UDCCSR_FS));
++ if (count >= 10000)
++ DMSG("Failed to send packet\n");
++ else
++ DMSG("%s: short packet sent len:%d,"
++ "length:%d,actual:%d\n", __FUNCTION__,
++ tmp, req->req.length, req->req.actual);
++ req->req.actual = req->req.length;
++ completed = 1;
++ /* There are still packets to transfer */
++ } else if ( ep->dma_con) {
++ DMSG("%s: more packets,length:%d,actual:%d\n",
++ __FUNCTION__,req->req.length,
++ req->req.actual);
++ req->req.actual += ep->usb_ep->maxpacket;
++ completed = 0;
++ } else {
++ DMSG("%s: no more packets,length:%d,"
++ "actual:%d\n", __FUNCTION__,
++ req->req.length, req->req.actual);
++ req->req.actual = req->req.length;
++ completed = 1;
++ }
++ } else {
++ req->req.actual = req->req.length;
++ completed = 1;
++ }
++ } else if (dcsr & DCSR_EORINTR) { //Only happened in OUT DMA
++ int remain,udccsr ;
++
++ DCSR(dmach) = DCSR_EORINTR;
++ remain = DCMD(dmach) & DCMD_LENGTH;
++ req->req.actual = req->req.length - remain;
++
++ udccsr = *ep->reg_udccsr;
++ if (udccsr & UDCCSR_SP) {
++ *ep->reg_udccsr = UDCCSR_PC | (udccsr & UDCCSR_MASK);
++ completed = 1;
++ }
++ DMSG("%s: length:%d actual:%d\n",
++ __FUNCTION__, req->req.length, req->req.actual);
++ } else
++ DMSG("%s: Others dma:%d DCSR:0x%x DCMD:0x%x\n",
++ __FUNCTION__, dmach, DCSR(dmach), DCMD(dmach));
++
++ if (likely(completed)) {
++ if (req->queue.next != &ep->queue) {
++ req_next = list_entry(req->queue.next,
++ struct pxa27x_request, queue);
++ kick_dma(ep, req_next);
++ }
++ done(ep, req, 0);
++ } else {
++ kick_dma(ep, req);
++ }
++
++ local_irq_enable();
++}
++
++#endif
++/*-------------------------------------------------------------------------*/
++
++static int
++pxa27x_ep_queue(struct usb_ep *_ep, struct usb_request *_req, unsigned gfp_flags)
++{
++ struct pxa27x_virt_ep *virt_ep;
++ struct pxa27x_ep *ep;
++ struct pxa27x_request *req;
++ struct pxa27x_udc *dev;
++ unsigned long flags;
++
++ virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep);
++ ep = virt_ep->pxa_ep;
++
++ req = container_of(_req, struct pxa27x_request, req);
++ if (unlikely (!_req || !_req->complete || !_req->buf||
++ !list_empty(&req->queue))) {
++ DMSG("%s, bad params\n", __FUNCTION__);
++ return -EINVAL;
++ }
++
++ if (unlikely (!_ep || (!ep->desc && _ep->name != ep0name))) {
++ DMSG("%s, bad ep\n", __FUNCTION__);
++ return -EINVAL;
++ }
++
++ DMSG("%s, ep point %d is queue\n", __FUNCTION__, ep->ep_num);
++
++ dev = ep->dev;
++ if (unlikely (!dev->driver
++ || dev->gadget.speed == USB_SPEED_UNKNOWN)) {
++ DMSG("%s, bogus device state\n", __FUNCTION__);
++ return -ESHUTDOWN;
++ }
++
++ /* iso is always one packet per request, that's the only way
++ * we can report per-packet status. that also helps with dma.
++ */
++ if (unlikely (ep->ep_type == USB_ENDPOINT_XFER_ISOC
++ && req->req.length > le16_to_cpu
++ (ep->desc->wMaxPacketSize)))
++ return -EMSGSIZE;
++
++#ifdef USE_DMA
++ // FIXME caller may already have done the dma mapping
++ if (ep->dma >= 0) {
++ _req->dma = dma_map_single(dev->dev, _req->buf, _req->length,
++ (ep->dir_in) ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
++ }
++#endif
++
++ DBG(DBG_NOISY, "%s queue req %p, len %d buf %p\n",
++ _ep->name, _req, _req->length, _req->buf);
++
++ local_irq_save(flags);
++
++ _req->status = -EINPROGRESS;
++ _req->actual = 0;
++
++ /* kickstart this i/o queue? */
++ if (list_empty(&ep->queue) && !ep->stopped) {
++ if (ep->desc == 0 /* ep0 */) {
++ unsigned length = _req->length;
++
++ switch (dev->ep0state) {
++ case EP0_IN_DATA_PHASE:
++ dev->stats.write.ops++;
++ if (write_ep0_fifo(ep, req))
++ req = 0;
++ break;
++
++ case EP0_OUT_DATA_PHASE:
++ dev->stats.read.ops++;
++ if (dev->req_pending)
++ ep0start(dev, UDCCSR0_IPR, "OUT");
++ if (length == 0 || ((UDCCSR0 & UDCCSR0_RNE) != 0
++ && read_ep0_fifo(ep, req))) {
++ ep0_idle(dev);
++ done(ep, req, 0);
++ req = 0;
++ }
++ break;
++ case EP0_NO_ACTION:
++ ep0_idle(dev);
++ req=0;
++ break;
++ default:
++ DMSG("ep0 i/o, odd state %d\n", dev->ep0state);
++ local_irq_restore (flags);
++ return -EL2HLT;
++ }
++#ifdef USE_DMA
++ /* either start dma or prime pio pump */
++ } else if (ep->dma >= 0) {
++ kick_dma(ep, req);
++#endif
++ /* can the FIFO can satisfy the request immediately? */
++ } else if (ep->dir_in && (*ep->reg_udccsr & UDCCSR_FS) != 0
++ && write_fifo(ep, req)) {
++ req = 0;
++ } else if ((*ep->reg_udccsr & UDCCSR_FS) != 0
++ && read_fifo(ep, req)) {
++ req = 0;
++ }
++ DMSG("req:%p,ep->desc:%p,ep->dma:%d\n", req, ep->desc, ep->dma);
++ if (likely (req && ep->desc) && ep->dma < 0)
++ pio_irq_enable(ep->pxa_ep_num);
++ }
++
++ /* pio or dma irq handler advances the queue. */
++ if (likely (req != 0))
++ list_add_tail(&req->queue, &ep->queue);
++ local_irq_restore(flags);
++
++ return 0;
++}
++
++
++/*
++ * nuke - dequeue ALL requests
++ */
++static void nuke(struct pxa27x_ep *ep, int status)
++{
++ struct pxa27x_request *req;
++
++ /* called with irqs blocked */
++#ifdef USE_DMA
++ if (ep->dma >= 0 && !ep->stopped)
++ cancel_dma(ep);
++#endif
++ while (!list_empty(&ep->queue)) {
++ req = list_entry(ep->queue.next, struct pxa27x_request, queue);
++ done(ep, req, status);
++ }
++ if (ep->desc)
++ pio_irq_disable(ep->pxa_ep_num);
++}
++
++
++/* dequeue JUST ONE request */
++static int pxa27x_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
++{
++ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep);
++ struct pxa27x_ep *ep = virt_ep->pxa_ep;
++ struct pxa27x_request *req;
++ unsigned long flags;
++
++ if (!_ep || _ep->name == ep0name)
++ return -EINVAL;
++
++ local_irq_save(flags);
++
++ /* make sure it's actually queued on this endpoint */
++ list_for_each_entry(req, &ep->queue, queue) {
++ if (&req->req == _req)
++ break;
++ }
++ if (&req->req != _req) {
++ local_irq_restore(flags);
++ return -EINVAL;
++ }
++
++#ifdef USE_DMA
++ if (ep->dma >= 0 && ep->queue.next == &req->queue && !ep->stopped) {
++ cancel_dma(ep);
++ done(ep, req, -ECONNRESET);
++ /* restart i/o */
++ if (!list_empty(&ep->queue)) {
++ req = list_entry(ep->queue.next,
++ struct pxa27x_request, queue);
++ kick_dma(ep, req);
++ }
++ } else
++#endif
++ done(ep, req, -ECONNRESET);
++
++ local_irq_restore(flags);
++ return 0;
++}
++
++/*-------------------------------------------------------------------------*/
++
++static int pxa27x_ep_set_halt(struct usb_ep *_ep, int value)
++{
++ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep);
++ struct pxa27x_ep *ep = virt_ep->pxa_ep;
++ unsigned long flags;
++
++ DMSG("%s is called\n", __FUNCTION__);
++ if (unlikely (!_ep || (!ep->desc && _ep->name != ep0name))
++ || ep->ep_type == USB_ENDPOINT_XFER_ISOC) {
++ DMSG("%s, bad ep\n", __FUNCTION__);
++ return -EINVAL;
++ }
++ if (value == 0) {
++ /* this path (reset toggle+halt) is needed to implement
++ * SET_INTERFACE on normal hardware. but it can't be
++ * done from software on the PXA UDC, and the hardware
++ * forgets to do it as part of SET_INTERFACE automagic.
++ */
++ DMSG("only host can clear %s halt\n", _ep->name);
++ return -EROFS;
++ }
++
++ local_irq_save(flags);
++
++ if (ep->dir_in && ((*ep->reg_udccsr & UDCCSR_FS) == 0
++ || !list_empty(&ep->queue))) {
++ local_irq_restore(flags);
++ return -EAGAIN;
++ }
++
++ /* FST bit is the same for control, bulk in, bulk out, interrupt in */
++ *ep->reg_udccsr = UDCCSR_FST|UDCCSR_FEF;
++
++ /* ep0 needs special care */
++ if (!ep->desc) {
++ start_watchdog(ep->dev);
++ ep->dev->req_pending = 0;
++ ep->dev->ep0state = EP0_STALL;
++
++ /* and bulk/intr endpoints like dropping stalls too */
++ } else {
++ unsigned i;
++ for (i = 0; i < 1000; i += 20) {
++ if (*ep->reg_udccsr & UDCCSR_SST)
++ break;
++ udelay(20);
++ }
++ }
++ local_irq_restore(flags);
++
++ DBG(DBG_VERBOSE, "%s halt\n", _ep->name);
++ return 0;
++}
++
++static int pxa27x_ep_fifo_status(struct usb_ep *_ep)
++{
++ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep);
++ struct pxa27x_ep *ep = virt_ep->pxa_ep;
++
++ if (!_ep) {
++ DMSG("%s, bad ep\n", __FUNCTION__);
++ return -ENODEV;
++ }
++ /* pxa can't report unclaimed bytes from IN fifos */
++ if (ep->dir_in)
++ return -EOPNOTSUPP;
++ if (ep->dev->gadget.speed == USB_SPEED_UNKNOWN
++ || (*ep->reg_udccsr & UDCCSR_FS) == 0)
++ return 0;
++ else
++ return (*ep->reg_udcbcr & 0xfff) + 1;
++}
++
++static void pxa27x_ep_fifo_flush(struct usb_ep *_ep)
++{
++ struct pxa27x_virt_ep *virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep);
++ struct pxa27x_ep *ep = virt_ep->pxa_ep;
++
++ DMSG("pxa27x_ep_fifo_flush\n");
++
++ if (!_ep || _ep->name == ep0name || !list_empty(&ep->queue)) {
++ DMSG("%s, bad ep\n", __FUNCTION__);
++ return;
++ }
++
++ /* toggle and halt bits stay unchanged */
++
++ /* for OUT, just read and discard the FIFO contents. */
++ if (!ep->dir_in) {
++ while (((*ep->reg_udccsr) & UDCCSR_BNE) != 0)
++ (void) *ep->reg_udcdr;
++ return;
++ }
++
++ /* most IN status is the same, but ISO can't stall */
++ *ep->reg_udccsr = UDCCSR_PC|UDCCSR_FST|UDCCSR_TRN
++ | (ep->ep_type == USB_ENDPOINT_XFER_ISOC)
++ ? 0 : UDCCSR_SST;
++}
++
++
++static struct usb_ep_ops pxa27x_ep_ops = {
++ .enable = pxa27x_ep_enable,
++ .disable = pxa27x_ep_disable,
++
++ .alloc_request = pxa27x_ep_alloc_request,
++ .free_request = pxa27x_ep_free_request,
++
++ .queue = pxa27x_ep_queue,
++ .dequeue = pxa27x_ep_dequeue,
++
++ .set_halt = pxa27x_ep_set_halt,
++ .fifo_status = pxa27x_ep_fifo_status,
++ .fifo_flush = pxa27x_ep_fifo_flush,
++};
++
++
++/* ---------------------------------------------------------------------------
++ * device-scoped parts of the api to the usb controller hardware
++ * ---------------------------------------------------------------------------
++ */
++
++static inline unsigned int validate_fifo_size(u8 bmAttributes)
++{
++ switch (bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
++ case USB_ENDPOINT_XFER_CONTROL:
++ return EP0_FIFO_SIZE;
++ break;
++ case USB_ENDPOINT_XFER_ISOC:
++ return ISO_FIFO_SIZE;
++ break;
++ case USB_ENDPOINT_XFER_BULK:
++ return BULK_FIFO_SIZE;
++ break;
++ case USB_ENDPOINT_XFER_INT:
++ return INT_FIFO_SIZE;
++ break;
++ default:
++ break;
++ }
++}
++
++static void pxa27x_ep_free(struct usb_gadget *gadget, struct usb_ep *_ep)
++{
++ struct pxa27x_udc *dev = the_controller;
++ struct pxa27x_virt_ep *virt_ep;
++ int i;
++
++ virt_ep = container_of(_ep, struct pxa27x_virt_ep, usb_ep);
++
++ for (i = 1; i < UDC_EP_NUM; i++) {
++ if (dev->ep[i].usb_ep == &virt_ep->usb_ep) {
++ if (dev->ep[i].desc) {
++ virt_ep->pxa_ep = &dev->ep[i];
++ pxa27x_ep_disable(&virt_ep->usb_ep);
++ }
++ dev->ep[i].usb_ep = NULL;
++ }
++ }
++
++ if (!list_empty(&virt_ep->usb_ep.ep_list))
++ list_del_init(&virt_ep->usb_ep.ep_list);
++
++ kfree(virt_ep->usb_ep.name);
++ kfree(virt_ep);
++}
++
++static void pxa27x_ep_freeall(struct usb_gadget *gadget)
++{
++ struct pxa27x_udc *dev = the_controller;
++ int i;
++
++ for (i = 1; i < UDC_EP_NUM; i++) {
++ if(dev->ep[i].usb_ep)
++ pxa27x_ep_free(gadget, dev->ep[i].usb_ep);
++ }
++}
++
++#define NAME_SIZE 18
++
++static int pxa27x_find_free_ep(struct pxa27x_udc *dev)
++{
++ int i;
++ for (i = 1; i < UDC_EP_NUM; i++) {
++ if(!dev->ep[i].assigned)
++ return i;
++ }
++ return -1;
++}
++
++/*
++ * Endpoint Allocation/Configuration
++ *
++ * pxa27x endpoint configuration is fixed when the device is enabled. Any pxa
++ * endpoint is only active in one configuration, interface and alternate
++ * interface combination so to support gadget drivers, we map one usb_ep to
++ * one of several pxa ep's. One pxa endpoint is assigned per configuration
++ * combination.
++ */
++static struct usb_ep* pxa27x_ep_alloc(struct usb_gadget *gadget, struct usb_endpoint_descriptor *desc,
++ struct usb_endpoint_config *epconfig, int configs)
++{
++ struct pxa27x_udc *dev = the_controller;
++ struct pxa27x_virt_ep *virt_ep;
++ unsigned int i, fifo_size;
++ char *name;
++
++ if (unlikely(configs < 1)) {
++ dev_err(dev->dev, "%s: Error in config data\n", __FUNCTION__);
++ return NULL;
++ }
++
++ virt_ep = kmalloc(sizeof(struct pxa27x_virt_ep), GFP_KERNEL);
++ name = kmalloc(NAME_SIZE, GFP_KERNEL);
++ if (!virt_ep || !name) {
++ dev_err(dev->dev, "%s: -ENOMEM\n", __FUNCTION__);
++ kfree(name);
++ kfree(virt_ep);
++ return NULL;
++ }
++
++ if (!(desc->wMaxPacketSize)) {
++ fifo_size = validate_fifo_size(desc->bmAttributes);
++ desc->wMaxPacketSize = fifo_size;
++ } else {
++ fifo_size = desc->wMaxPacketSize;
++ }
++
++ DMSG("pxa27x_ep_alloc: bLength: %d, bDescriptorType: %x, bEndpointAddress: %x,\n"
++ " bmAttributes: %x, wMaxPacketSize: %d\n", desc->bLength,
++ desc->bDescriptorType, desc->bEndpointAddress, desc->bmAttributes,
++ desc->wMaxPacketSize);
++
++ if (!(desc->bEndpointAddress & 0xF))
++ desc->bEndpointAddress |= dev->ep_num;
++
++ for (i = 0; i < configs; i++)
++ {
++ struct pxa27x_ep *pxa_ep;
++ int j;
++
++ DMSG("pxa27x_ep_alloc: config: %d, interface: %d, altinterface: %x,\n",
++ epconfig->config, epconfig->interface, epconfig->altinterface);
++
++ j = pxa27x_find_free_ep(dev);
++
++ if (unlikely(j < 0)) {
++ dev_err(dev->dev, "pxa27x_ep_alloc: Failed to find a spare endpoint\n");
++ pxa27x_ep_free(gadget, &virt_ep->usb_ep);
++ return NULL;
++ }
++
++ pxa_ep = &dev->ep[j];
++
++ if (i == 0)
++ virt_ep->pxa_ep = pxa_ep;
++
++ pxa_ep->assigned = 1;
++ pxa_ep->ep_num = dev->ep_num;
++ pxa_ep->pxa_ep_num = j;
++ pxa_ep->usb_ep = &virt_ep->usb_ep;
++ pxa_ep->dev = dev;
++ pxa_ep->desc = desc;
++ pxa_ep->pio_irqs = pxa_ep->dma_irqs = 0;
++ pxa_ep->dma = -1;
++
++ pxa_ep->fifo_size = fifo_size;
++ pxa_ep->dir_in = (desc->bEndpointAddress & USB_DIR_IN) ? 1 : 0;
++ pxa_ep->ep_type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
++ pxa_ep->stopped = 1;
++ pxa_ep->dma_con = 0;
++ pxa_ep->config = epconfig->config;
++ pxa_ep->interface = epconfig->interface;
++ pxa_ep->aisn = epconfig->altinterface;
++
++ pxa_ep->reg_udccsr = &UDCCSR0 + j;
++ pxa_ep->reg_udcbcr = &UDCBCR0 + j;
++ pxa_ep->reg_udcdr = &UDCDR0 + j ;
++ pxa_ep->reg_udccr = &UDCCRA - 1 + j;
++#ifdef USE_DMA
++ pxa_ep->reg_drcmr = &DRCMR24 + j;
++#endif
++
++ /* Configure UDCCR */
++ *pxa_ep->reg_udccr = ((pxa_ep->config << UDCCONR_CN_S) & UDCCONR_CN)
++ | ((pxa_ep->interface << UDCCONR_IN_S) & UDCCONR_IN)
++ | ((pxa_ep->aisn << UDCCONR_AISN_S) & UDCCONR_AISN)
++ | ((dev->ep_num << UDCCONR_EN_S) & UDCCONR_EN)
++ | ((pxa_ep->ep_type << UDCCONR_ET_S) & UDCCONR_ET)
++ | ((pxa_ep->dir_in) ? UDCCONR_ED : 0)
++ | ((min(pxa_ep->fifo_size, (unsigned)desc->wMaxPacketSize) << UDCCONR_MPS_S ) & UDCCONR_MPS)
++ | UDCCONR_EE;
++// | UDCCONR_DE | UDCCONR_EE;
++
++
++
++#ifdef USE_DMA
++ /* Only BULK use DMA */
++ if ((pxa_ep->ep_type & USB_ENDPOINT_XFERTYPE_MASK)\
++ == USB_ENDPOINT_XFER_BULK)
++ *pxa_ep->reg_udccsr = UDCCSR_DME;
++#endif
++
++ DMSG("UDCCR: 0x%p is 0x%x\n", pxa_ep->reg_udccr,*pxa_ep->reg_udccr);
++
++ epconfig++;
++ }
++
++ /* Fill ep name*/
++ switch (desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) {
++ case USB_ENDPOINT_XFER_BULK:
++ sprintf(name, "ep%d%s-bulk", dev->ep_num,
++ ((desc->bEndpointAddress & USB_DIR_IN) ? "in":"out"));
++ break;
++ case USB_ENDPOINT_XFER_INT:
++ sprintf(name, "ep%d%s-intr", dev->ep_num,
++ ((desc->bEndpointAddress & USB_DIR_IN) ? "in":"out"));
++ break;
++ default:
++ sprintf(name, "ep%d%s", dev->ep_num,
++ ((desc->bEndpointAddress & USB_DIR_IN) ? "in":"out"));
++ break;
++ }
++
++ virt_ep->desc = desc;
++ virt_ep->usb_ep.name = name;
++ virt_ep->usb_ep.ops = &pxa27x_ep_ops;
++ virt_ep->usb_ep.maxpacket = min((ushort)fifo_size, desc->wMaxPacketSize);
++
++ list_add_tail(&virt_ep->usb_ep.ep_list, &gadget->ep_list);
++
++ dev->ep_num++;
++ return &virt_ep->usb_ep;
++}
++
++static int pxa27x_udc_get_frame(struct usb_gadget *_gadget)
++{
++ return (UDCFNR & 0x7FF);
++}
++
++static int pxa27x_udc_wakeup(struct usb_gadget *_gadget)
++{
++ /* host may not have enabled remote wakeup */
++ if ((UDCCR & UDCCR_DWRE) == 0)
++ return -EHOSTUNREACH;
++ udc_set_mask_UDCCR(UDCCR_UDR);
++ return 0;
++}
++
++static const struct usb_gadget_ops pxa27x_udc_ops = {
++ .ep_alloc = pxa27x_ep_alloc,
++ .get_frame = pxa27x_udc_get_frame,
++ .wakeup = pxa27x_udc_wakeup,
++ // current versions must always be self-powered
++};
++
++
++/*-------------------------------------------------------------------------*/
++
++#ifdef UDC_PROC_FILE
++
++static const char proc_node_name [] = "driver/udc";
++
++static int
++udc_proc_read(char *page, char **start, off_t off, int count,
++ int *eof, void *_dev)
++{
++ char *buf = page;
++ struct pxa27x_udc *dev = _dev;
++ char *next = buf;
++ unsigned size = count;
++ unsigned long flags;
++ int i, t;
++ u32 tmp;
++
++ if (off != 0)
++ return 0;
++
++ local_irq_save(flags);
++
++ /* basic device status */
++ t = scnprintf(next, size, DRIVER_DESC "\n"
++ "%s version: %s\nGadget driver: %s\n",
++ driver_name, DRIVER_VERSION DMASTR,
++ dev->driver ? dev->driver->driver.name : "(none)");
++ size -= t;
++ next += t;
++
++ /* registers for device and ep0 */
++ t = scnprintf(next, size,
++ "uicr %02X.%02X, usir %02X.%02x, ufnr %02X\n",
++ UDCICR1, UDCICR0, UDCISR1, UDCISR0, UDCFNR);
++ size -= t;
++ next += t;
++
++ tmp = UDCCR;
++ t = scnprintf(next, size,"udccr %02X =%s%s%s%s%s%s%s%s%s%s, con=%d,inter=%d,altinter=%d\n", tmp,
++ (tmp & UDCCR_OEN) ? " oen":"",
++ (tmp & UDCCR_AALTHNP) ? " aalthnp":"",
++ (tmp & UDCCR_AHNP) ? " rem" : "",
++ (tmp & UDCCR_BHNP) ? " rstir" : "",
++ (tmp & UDCCR_DWRE) ? " dwre" : "",
++ (tmp & UDCCR_SMAC) ? " smac" : "",
++ (tmp & UDCCR_EMCE) ? " emce" : "",
++ (tmp & UDCCR_UDR) ? " udr" : "",
++ (tmp & UDCCR_UDA) ? " uda" : "",
++ (tmp & UDCCR_UDE) ? " ude" : "",
++ (tmp & UDCCR_ACN) >> UDCCR_ACN_S,
++ (tmp & UDCCR_AIN) >> UDCCR_AIN_S,
++ (tmp & UDCCR_AAISN)>> UDCCR_AAISN_S );
++
++ size -= t;
++ next += t;
++
++ tmp = UDCCSR0;
++ t = scnprintf(next, size,
++ "udccsr0 %02X =%s%s%s%s%s%s%s\n", tmp,
++ (tmp & UDCCSR0_SA) ? " sa" : "",
++ (tmp & UDCCSR0_RNE) ? " rne" : "",
++ (tmp & UDCCSR0_FST) ? " fst" : "",
++ (tmp & UDCCSR0_SST) ? " sst" : "",
++ (tmp & UDCCSR0_DME) ? " dme" : "",
++ (tmp & UDCCSR0_IPR) ? " ipr" : "",
++ (tmp & UDCCSR0_OPC) ? " opc" : "");
++ size -= t;
++ next += t;
++
++ if (!dev->driver)
++ goto done;
++
++ t = scnprintf(next, size, "ep0 IN %lu/%lu, OUT %lu/%lu\nirqs %lu\n\n",
++ dev->stats.write.bytes, dev->stats.write.ops,
++ dev->stats.read.bytes, dev->stats.read.ops,
++ dev->stats.irqs);
++ size -= t;
++ next += t;
++
++ /* dump endpoint queues */
++ for (i = 0; i < UDC_EP_NUM; i++) {
++ struct pxa27x_ep *ep = &dev->ep [i];
++ struct pxa27x_request *req;
++ int t;
++
++ if (i != 0) {
++ const struct usb_endpoint_descriptor *d;
++
++ d = ep->desc;
++ if (!d)
++ continue;
++ tmp = *dev->ep [i].reg_udccsr;
++ t = scnprintf(next, size,
++ "%d max %d %s udccs %02x udccr:0x%x\n",
++ i, le16_to_cpu (d->wMaxPacketSize),
++ (ep->dma >= 0) ? "dma" : "pio", tmp,
++ *dev->ep[i].reg_udccr);
++ /* TODO translate all five groups of udccs bits! */
++
++ } else /* ep0 should only have one transfer queued */
++ t = scnprintf(next, size, "ep0 max 16 pio irqs %lu\n",
++ ep->pio_irqs);
++ if (t <= 0 || t > size)
++ goto done;
++ size -= t;
++ next += t;
++
++ if (list_empty(&ep->queue)) {
++ t = scnprintf(next, size, "\t(nothing queued)\n");
++ if (t <= 0 || t > size)
++ goto done;
++ size -= t;
++ next += t;
++ continue;
++ }
++ list_for_each_entry(req, &ep->queue, queue) {
++#ifdef USE_DMA
++ if (ep->dma >= 0 && req->queue.prev == &ep->queue)
++ t = scnprintf(next, size, "\treq %p len %d/%d "
++ "buf %p (dma%d dcmd %08x)\n",
++ &req->req, req->req.actual,
++ req->req.length, req->req.buf,
++ ep->dma, DCMD(ep->dma)
++ /* low 13 bits == bytes-to-go */);
++ else
++#endif
++ t = scnprintf(next, size,
++ "\treq %p len %d/%d buf %p\n",
++ &req->req, req->req.actual,
++ req->req.length, req->req.buf);
++ if (t <= 0 || t > size)
++ goto done;
++ size -= t;
++ next += t;
++ }
++ }
++
++done:
++ local_irq_restore(flags);
++ *eof = 1;
++ return count - size;
++}
++
++#define create_proc_files() \
++ create_proc_read_entry(proc_node_name, 0, NULL, udc_proc_read, dev)
++#define remove_proc_files() \
++ remove_proc_entry(proc_node_name, NULL)
++
++#else /* !UDC_PROC_FILE */
++#define create_proc_files() do {} while (0)
++#define remove_proc_files() do {} while (0)
++
++#endif /* UDC_PROC_FILE */
++
++/* "function" sysfs attribute */
++static ssize_t show_function(struct device *_dev, struct device_attribute *attr, char *buf)
++{
++ struct pxa27x_udc *dev = dev_get_drvdata(_dev);
++
++ if (!dev->driver || !dev->driver->function
++ || strlen(dev->driver->function) > PAGE_SIZE)
++ return 0;
++ return scnprintf(buf, PAGE_SIZE, "%s\n", dev->driver->function);
++}
++static DEVICE_ATTR(function, S_IRUGO, show_function, NULL);
++
++/*-------------------------------------------------------------------------*/
++
++/*
++ * udc_disable - disable USB device controller
++ */
++static void udc_disable(struct pxa27x_udc *dev)
++{
++ UDCICR0 = UDCICR1 = 0x00000000;
++
++ udc_clear_mask_UDCCR(UDCCR_UDE);
++
++ /* Disable clock for USB device */
++ pxa_set_cken(CKEN_USB, 0);
++
++ ep0_idle(dev);
++ dev->gadget.speed = USB_SPEED_UNKNOWN;
++ dev->mach->udc_command(PXA2XX_UDC_CMD_DISCONNECT);
++}
++
++
++/*
++ * udc_reinit - initialize software state
++ */
++static void udc_reinit(struct pxa27x_udc *dev)
++{
++ u32 i;
++
++ dev->ep0state = EP0_IDLE;
++
++ /* basic endpoint records init */
++ for (i = 0; i < UDC_EP_NUM; i++) {
++ struct pxa27x_ep *ep = &dev->ep[i];
++
++ ep->stopped = 0;
++ ep->pio_irqs = ep->dma_irqs = 0;
++ }
++ dev->configuration = 0;
++ dev->interface = 0;
++ dev->alternate = 0;
++ /* the rest was statically initialized, and is read-only */
++}
++
++/* until it's enabled, this UDC should be completely invisible
++ * to any USB host.
++ */
++static void udc_enable(struct pxa27x_udc *dev)
++{
++ udc_clear_mask_UDCCR(UDCCR_UDE);
++
++ /* Enable clock for USB device */
++ pxa_set_cken(CKEN_USB, 1);
++
++ UDCICR0 = UDCICR1 = 0;
++
++ ep0_idle(dev);
++ dev->gadget.speed = USB_SPEED_FULL;
++ dev->stats.irqs = 0;
++
++ udc_set_mask_UDCCR(UDCCR_UDE);
++ udelay(2);
++ if (UDCCR & UDCCR_EMCE)
++ dev_err(dev->dev, "There are error in configuration, udc disabled\n");
++
++ /* caller must be able to sleep in order to cope
++ * with startup transients.
++ */
++ msleep(100);
++
++ /* enable suspend/resume and reset irqs */
++ UDCICR1 = UDCICR1_IECC | UDCICR1_IERU | UDCICR1_IESU | UDCICR1_IERS;
++
++ /* enable ep0 irqs */
++ UDCICR0 = UDCICR_INT(0,UDCICR_INT_MASK);
++
++ DMSG("Connecting\n");
++ /* RPFIXME */
++ UP2OCR = UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE;
++ //dev->mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
++}
++
++
++/* when a driver is successfully registered, it will receive
++ * control requests including set_configuration(), which enables
++ * non-control requests. then usb traffic follows until a
++ * disconnect is reported. then a host may connect again, or
++ * the driver might get unbound.
++ */
++int usb_gadget_register_driver(struct usb_gadget_driver *driver)
++{
++ struct pxa27x_udc *dev = the_controller;
++ int retval;
++
++ if (!driver || driver->speed != USB_SPEED_FULL || !driver->bind
++ || !driver->unbind || !driver->disconnect || !driver->setup)
++ return -EINVAL;
++ if (!dev)
++ return -ENODEV;
++ if (dev->driver)
++ return -EBUSY;
++
++ udc_disable(dev);
++ udc_init_ep(dev);
++ udc_reinit(dev);
++
++ /* first hook up the driver ... */
++ dev->driver = driver;
++ dev->gadget.dev.driver = &driver->driver;
++ dev->ep_num = 1;
++
++ retval = device_add(&dev->gadget.dev);
++ if (retval) {
++ DMSG("device_add error %d\n", retval);
++ goto add_fail;
++ }
++ retval = driver->bind(&dev->gadget);
++ if (retval) {
++ DMSG("bind to driver %s --> error %d\n",
++ driver->driver.name, retval);
++ goto bind_fail;
++ }
++ retval = device_create_file(dev->dev, &dev_attr_function);
++ if (retval) {
++ DMSG("device_create_file failed: %d\n", retval);
++ goto create_file_fail;
++ }
++
++ /* ... then enable host detection and ep0; and we're ready
++ * for set_configuration as well as eventual disconnect.
++ * NOTE: this shouldn't power up until later.
++ */
++ DMSG("registered gadget driver '%s'\n", driver->driver.name);
++ udc_enable(dev);
++ dump_state(dev);
++ return 0;
++
++create_file_fail:
++ driver->unbind(&dev->gadget);
++bind_fail:
++ device_del(&dev->gadget.dev);
++add_fail:
++ dev->driver = 0;
++ dev->gadget.dev.driver = 0;
++ return retval;
++}
++EXPORT_SYMBOL(usb_gadget_register_driver);
++
++static void
++stop_activity(struct pxa27x_udc *dev, struct usb_gadget_driver *driver)
++{
++ int i;
++
++ DMSG("Trace path 1\n");
++ /* don't disconnect drivers more than once */
++ if (dev->gadget.speed == USB_SPEED_UNKNOWN)
++ driver = 0;
++ dev->gadget.speed = USB_SPEED_UNKNOWN;
++
++ /* prevent new request submissions, kill any outstanding requests */
++ for (i = 0; i < UDC_EP_NUM; i++) {
++ struct pxa27x_ep *ep = &dev->ep[i];
++
++ ep->stopped = 1;
++ nuke(ep, -ESHUTDOWN);
++ }
++ del_timer_sync(&dev->timer);
++
++ /* report disconnect; the driver is already quiesced */
++ if (driver)
++ driver->disconnect(&dev->gadget);
++
++ /* re-init driver-visible data structures */
++ udc_reinit(dev);
++}
++
++int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
++{
++ struct pxa27x_udc *dev = the_controller;
++
++ if (!dev)
++ return -ENODEV;
++ if (!driver || driver != dev->driver)
++ return -EINVAL;
++
++ local_irq_disable();
++ udc_disable(dev);
++ stop_activity(dev, driver);
++ local_irq_enable();
++
++ driver->unbind(&dev->gadget);
++ pxa27x_ep_freeall(&dev->gadget);
++ dev->driver = 0;
++
++ device_del(&dev->gadget.dev);
++ device_remove_file(dev->dev, &dev_attr_function);
++
++ DMSG("unregistered gadget driver '%s'\n", driver->driver.name);
++ dump_state(dev);
++ return 0;
++}
++EXPORT_SYMBOL(usb_gadget_unregister_driver);
++
++
++/*-------------------------------------------------------------------------*/
++
++static inline void clear_ep_state(struct pxa27x_udc *dev)
++{
++ unsigned i;
++
++ /* hardware SET_{CONFIGURATION,INTERFACE} automagic resets endpoint
++ * fifos, and pending transactions mustn't be continued in any case.
++ */
++ for (i = 1; i < UDC_EP_NUM; i++)
++ nuke(&dev->ep[i], -ECONNABORTED);
++}
++
++static void udc_watchdog(unsigned long _dev)
++{
++ struct pxa27x_udc *dev = (void *)_dev;
++
++ local_irq_disable();
++ if (dev->ep0state == EP0_STALL
++ && (UDCCSR0 & UDCCSR0_FST) == 0
++ && (UDCCSR0 & UDCCSR0_SST) == 0) {
++ UDCCSR0 = UDCCSR0_FST|UDCCSR0_FTF;
++ DBG(DBG_VERBOSE, "ep0 re-stall\n");
++ start_watchdog(dev);
++ }
++ local_irq_enable();
++}
++
++static void handle_ep0(struct pxa27x_udc *dev)
++{
++ u32 udccsr0 = UDCCSR0;
++ struct pxa27x_ep *ep = &dev->ep[0];
++ struct pxa27x_request *req;
++ union {
++ struct usb_ctrlrequest r;
++ u8 raw[8];
++ u32 word[2];
++ } u;
++
++ if (list_empty(&ep->queue))
++ req = 0;
++ else
++ req = list_entry(ep->queue.next, struct pxa27x_request, queue);
++
++ /* clear stall status */
++ if (udccsr0 & UDCCSR0_SST) {
++ nuke(ep, -EPIPE);
++ UDCCSR0 = UDCCSR0_SST;
++ del_timer(&dev->timer);
++ ep0_idle(dev);
++ }
++
++ /* previous request unfinished? non-error iff back-to-back ... */
++ if ((udccsr0 & UDCCSR0_SA) != 0 && dev->ep0state != EP0_IDLE) {
++ nuke(ep, 0);
++ del_timer(&dev->timer);
++ ep0_idle(dev);
++ }
++
++ switch (dev->ep0state) {
++ case EP0_NO_ACTION:
++ dev_info(dev->dev, "%s: Busy\n", __FUNCTION__);
++ /*Fall through */
++ case EP0_IDLE:
++ /* late-breaking status? */
++ udccsr0 = UDCCSR0;
++
++ /* start control request? */
++ if (likely((udccsr0 & (UDCCSR0_OPC|UDCCSR0_SA|UDCCSR0_RNE))
++ == (UDCCSR0_OPC|UDCCSR0_SA|UDCCSR0_RNE))) {
++ int i;
++
++ nuke(ep, -EPROTO);
++ /* read SETUP packet */
++ for (i = 0; i < 2; i++) {
++ if (unlikely(!(UDCCSR0 & UDCCSR0_RNE))) {
++bad_setup:
++ DMSG("SETUP %d!\n", i);
++ goto stall;
++ }
++ u.word [i] = UDCDR0;
++ }
++ if (unlikely((UDCCSR0 & UDCCSR0_RNE) != 0))
++ goto bad_setup;
++
++ le16_to_cpus(&u.r.wValue);
++ le16_to_cpus(&u.r.wIndex);
++ le16_to_cpus(&u.r.wLength);
++
++ DBG(DBG_VERBOSE, "SETUP %02x.%02x v%04x i%04x l%04x\n",
++ u.r.bRequestType, u.r.bRequest,
++ u.r.wValue, u.r.wIndex, u.r.wLength);
++ /* cope with automagic for some standard requests. */
++ dev->req_std = (u.r.bRequestType & USB_TYPE_MASK)
++ == USB_TYPE_STANDARD;
++ dev->req_config = 0;
++ dev->req_pending = 1;
++#if 0
++ switch (u.r.bRequest) {
++ /* hardware was supposed to hide this */
++ case USB_REQ_SET_CONFIGURATION:
++ case USB_REQ_SET_INTERFACE:
++ case USB_REQ_SET_ADDRESS:
++ dev_err(dev->dev, "Should not come here\n");
++ break;
++ }
++
++#endif
++ if (u.r.bRequestType & USB_DIR_IN)
++ dev->ep0state = EP0_IN_DATA_PHASE;
++ else
++ dev->ep0state = EP0_OUT_DATA_PHASE;
++ i = dev->driver->setup(&dev->gadget, &u.r);
++
++ if (i < 0) {
++ /* hardware automagic preventing STALL... */
++ if (dev->req_config) {
++ /* hardware sometimes neglects to tell
++ * tell us about config change events,
++ * so later ones may fail...
++ */
++ WARN("config change %02x fail %d?\n",
++ u.r.bRequest, i);
++ return;
++ /* TODO experiment: if has_cfr,
++ * hardware didn't ACK; maybe we
++ * could actually STALL!
++ */
++ }
++ DBG(DBG_VERBOSE, "protocol STALL, "
++ "%02x err %d\n", UDCCSR0, i);
++stall:
++ /* the watchdog timer helps deal with cases
++ * where udc seems to clear FST wrongly, and
++ * then NAKs instead of STALLing.
++ */
++ ep0start(dev, UDCCSR0_FST|UDCCSR0_FTF, "stall");
++ start_watchdog(dev);
++ dev->ep0state = EP0_STALL;
++
++ /* deferred i/o == no response yet */
++ } else if (dev->req_pending) {
++ if (likely(dev->ep0state == EP0_IN_DATA_PHASE
++ || dev->req_std || u.r.wLength))
++ ep0start(dev, 0, "defer");
++ else
++ ep0start(dev, UDCCSR0_IPR, "defer/IPR");
++ }
++
++ /* expect at least one data or status stage irq */
++ return;
++
++ } else {
++ /* some random early IRQ:
++ * - we acked FST
++ * - IPR cleared
++ * - OPC got set, without SA (likely status stage)
++ */
++ UDCCSR0 = udccsr0 & (UDCCSR0_SA|UDCCSR0_OPC);
++ }
++ break;
++ case EP0_IN_DATA_PHASE: /* GET_DESCRIPTOR etc */
++ if (udccsr0 & UDCCSR0_OPC) {
++ UDCCSR0 = UDCCSR0_OPC|UDCCSR0_FTF;
++ DBG(DBG_VERBOSE, "ep0in premature status\n");
++ if (req)
++ done(ep, req, 0);
++ ep0_idle(dev);
++ } else /* irq was IPR clearing */ {
++ if (req) {
++ /* this IN packet might finish the request */
++ (void) write_ep0_fifo(ep, req);
++ } /* else IN token before response was written */
++ }
++ break;
++ case EP0_OUT_DATA_PHASE: /* SET_DESCRIPTOR etc */
++ if (udccsr0 & UDCCSR0_OPC) {
++ if (req) {
++ /* this OUT packet might finish the request */
++ if (read_ep0_fifo(ep, req))
++ done(ep, req, 0);
++ /* else more OUT packets expected */
++ } /* else OUT token before read was issued */
++ } else /* irq was IPR clearing */ {
++ DBG(DBG_VERBOSE, "ep0out premature status\n");
++ if (req)
++ done(ep, req, 0);
++ ep0_idle(dev);
++ }
++ break;
++ case EP0_STALL:
++ UDCCSR0 = UDCCSR0_FST;
++ break;
++ }
++ UDCISR0 = UDCISR_INT(0, UDCISR_INT_MASK);
++}
++
++
++static void handle_ep(struct pxa27x_ep *ep)
++{
++ struct pxa27x_request *req;
++ int completed;
++ u32 udccsr=0;
++
++ DMSG("%s is called\n", __FUNCTION__);
++ do {
++ completed = 0;
++ if (likely (!list_empty(&ep->queue))) {
++ req = list_entry(ep->queue.next,
++ struct pxa27x_request, queue);
++ } else
++ req = 0;
++
++// udccsr = *ep->reg_udccsr;
++ DMSG("%s: req:%p, udcisr0:0x%x udccsr %p:0x%x\n", __FUNCTION__,
++ req, UDCISR0, ep->reg_udccsr, *ep->reg_udccsr);
++ if (unlikely(ep->dir_in)) {
++ udccsr = (UDCCSR_SST | UDCCSR_TRN) & *ep->reg_udccsr;
++ if (unlikely (udccsr))
++ *ep->reg_udccsr = udccsr;
++
++ if (req && likely ((*ep->reg_udccsr & UDCCSR_FS) != 0))
++ completed = write_fifo(ep, req);
++
++ } else {
++ udccsr = (UDCCSR_SST | UDCCSR_TRN) & *ep->reg_udccsr;
++ if (unlikely(udccsr))
++ *ep->reg_udccsr = udccsr;
++
++ /* fifos can hold packets, ready for reading... */
++ if (likely(req)) {
++ completed = read_fifo(ep, req);
++ } else {
++ pio_irq_disable (ep->pxa_ep_num);
++ //*ep->reg_udccsr = UDCCSR_FEF;
++ DMSG("%s: no req for out data\n",
++ __FUNCTION__);
++ }
++ }
++ ep->pio_irqs++;
++ } while (completed);
++}
++
++static void pxa27x_update_eps(struct pxa27x_udc *dev)
++{
++ struct pxa27x_virt_ep *virt_ep;
++ int i;
++
++ for (i = 1; i < UDC_EP_NUM; i++) {
++ if(!dev->ep[i].assigned || !dev->ep[i].usb_ep)
++ continue;
++ virt_ep = container_of(dev->ep[i].usb_ep, struct pxa27x_virt_ep, usb_ep);
++
++ DMSG("%s, Updating eps %d:%d, %d:%d, %d:%d, %p,%p\n", __FUNCTION__, dev->ep[i].config, dev->configuration
++ ,dev->ep[i].interface, dev->interface, dev->ep[i].aisn, dev->alternate, virt_ep->pxa_ep, &dev->ep[i]);
++
++ if(dev->ep[i].config == dev->configuration && virt_ep->pxa_ep != &dev->ep[i]) {
++ if ((dev->ep[i].interface == dev->interface &&
++ dev->ep[i].aisn == dev->alternate) || virt_ep->pxa_ep->config != dev->configuration) {
++
++ if (virt_ep->pxa_ep->desc) {
++ DMSG("%s, Changing end point to %d (en/dis)\n", __FUNCTION__, i);
++ pxa27x_ep_disable(&virt_ep->usb_ep);
++ virt_ep->pxa_ep = &dev->ep[i];
++ pxa27x_ep_enable(&virt_ep->usb_ep, virt_ep->desc);
++ } else {
++ DMSG("%s, Changing end point to %d (no en/dis)\n", __FUNCTION__, i);
++ virt_ep->pxa_ep = &dev->ep[i];
++ }
++ }
++ }
++ }
++}
++
++static void pxa27x_change_configuration(struct pxa27x_udc *dev)
++{
++ struct usb_ctrlrequest req ;
++
++ pxa27x_update_eps(dev);
++
++ req.bRequestType = 0;
++ req.bRequest = USB_REQ_SET_CONFIGURATION;
++ req.wValue = dev->configuration;
++ req.wIndex = 0;
++ req.wLength = 0;
++
++ dev->ep0state = EP0_NO_ACTION;
++ dev->driver->setup(&dev->gadget, &req);
++}
++
++static void pxa27x_change_interface(struct pxa27x_udc *dev)
++{
++ struct usb_ctrlrequest req;
++
++ pxa27x_update_eps(dev);
++
++ req.bRequestType = USB_RECIP_INTERFACE;
++ req.bRequest = USB_REQ_SET_INTERFACE;
++ req.wValue = dev->alternate;
++ req.wIndex = dev->interface;
++ req.wLength = 0;
++
++ dev->ep0state = EP0_NO_ACTION;
++ dev->driver->setup(&dev->gadget, &req);
++}
++
++/*
++ * pxa27x_udc_irq - interrupt handler
++ *
++ * avoid delays in ep0 processing. the control handshaking isn't always
++ * under software control (pxa250c0 and the pxa255 are better), and delays
++ * could cause usb protocol errors.
++ */
++static irqreturn_t pxa27x_udc_irq(int irq, void *_dev)
++{
++ struct pxa27x_udc *dev = _dev;
++ int handled;
++
++ dev->stats.irqs++;
++
++ DBG(DBG_VERBOSE, "Interrupt, UDCISR0:0x%08x, UDCISR1:0x%08x, "
++ "UDCCR:0x%08x\n", UDCISR0, UDCISR1, UDCCR);
++ do {
++ u32 udcir = UDCISR1 & 0xF8000000;
++
++ handled = 0;
++
++ /* SUSpend Interrupt Request */
++ if (unlikely(udcir & UDCISR1_IRSU)) {
++ UDCISR1 = UDCISR1_IRSU;
++ handled = 1;
++ DBG(DBG_VERBOSE, "USB suspend\n");
++ if (dev->gadget.speed != USB_SPEED_UNKNOWN
++ && dev->driver
++ && dev->driver->suspend)
++ dev->driver->suspend(&dev->gadget);
++ ep0_idle(dev);
++ }
++
++ /* RESume Interrupt Request */
++ if (unlikely(udcir & UDCISR1_IRRU)) {
++ UDCISR1 = UDCISR1_IRRU;
++ handled = 1;
++ DBG(DBG_VERBOSE, "USB resume\n");
++
++ if (dev->gadget.speed != USB_SPEED_UNKNOWN
++ && dev->driver
++ && dev->driver->resume)
++ dev->driver->resume(&dev->gadget);
++ }
++
++ if (unlikely(udcir & UDCISR1_IRCC)) {
++ unsigned config, interface, alternate;
++
++ handled = 1;
++ DBG(DBG_VERBOSE, "USB SET_CONFIGURATION or "
++ "SET_INTERFACE command received\n");
++
++ config = (UDCCR & UDCCR_ACN) >> UDCCR_ACN_S;
++
++ if (dev->configuration != config) {
++ dev->configuration = config;
++ pxa27x_change_configuration(dev) ;
++ }
++
++ interface = (UDCCR & UDCCR_AIN) >> UDCCR_AIN_S;
++ alternate = (UDCCR & UDCCR_AAISN) >> UDCCR_AAISN_S;
++
++ if ((dev->interface != interface) || (dev->alternate != alternate)) {
++ dev->interface = interface;
++ dev->alternate = alternate;
++ pxa27x_change_interface(dev);
++ }
++
++ UDCCR |= UDCCR_SMAC;
++
++ UDCISR1 = UDCISR1_IRCC;
++ DMSG("%s: con:%d,inter:%d,alt:%d\n",
++ __FUNCTION__, config,interface, alternate);
++ }
++
++ /* ReSeT Interrupt Request - USB reset */
++ if (unlikely(udcir & UDCISR1_IRRS)) {
++ UDCISR1 = UDCISR1_IRRS;
++ handled = 1;
++
++ if ((UDCCR & UDCCR_UDA) == 0) {
++ DBG(DBG_VERBOSE, "USB reset start\n");
++
++ /* reset driver and endpoints,
++ * in case that's not yet done
++ */
++ stop_activity(dev, dev->driver);
++ }
++ INFO("USB reset\n");
++ dev->gadget.speed = USB_SPEED_FULL;
++ memset(&dev->stats, 0, sizeof dev->stats);
++
++ } else {
++ u32 udcisr0 = UDCISR0 ;
++ u32 udcisr1 = UDCISR1 & 0xFFFF;
++ int i;
++
++ if (unlikely (!udcisr0 && !udcisr1))
++ continue;
++
++ DBG(DBG_VERY_NOISY, "irq %02x.%02x\n", udcisr1,udcisr0);
++
++ /* control traffic */
++ if (udcisr0 & UDCISR0_IR0) {
++ dev->ep[0].pio_irqs++;
++ handle_ep0(dev);
++ handled = 1;
++ }
++
++ udcisr0 >>= 2;
++ /* endpoint data transfers */
++ for (i = 1; udcisr0!=0 && i < 16; udcisr0>>=2,i++) {
++ UDCISR0 = UDCISR_INT(i, UDCISR_INT_MASK);
++
++ if (udcisr0 & UDC_INT_FIFOERROR)
++ dev_err(dev->dev, " Endpoint %d Fifo error\n", i);
++ if (udcisr0 & UDC_INT_PACKETCMP) {
++ handle_ep(&dev->ep[i]);
++ handled = 1;
++ }
++
++ }
++
++ for (i = 0; udcisr1!=0 && i < 8; udcisr1 >>= 2, i++) {
++ UDCISR1 = UDCISR_INT(i, UDCISR_INT_MASK);
++
++ if (udcisr1 & UDC_INT_FIFOERROR) {
++ dev_err(dev->dev, "Endpoint %d fifo error\n", (i+16));
++ }
++
++ if (udcisr1 & UDC_INT_PACKETCMP) {
++ handle_ep(&dev->ep[i+16]);
++ handled = 1;
++ }
++ }
++ }
++
++ /* we could also ask for 1 msec SOF (SIR) interrupts */
++
++ } while (handled);
++ return IRQ_HANDLED;
++}
++
++int write_ep0_zlp(void)
++{
++ UDCCSR0 = UDCCSR0_IPR;
++ return 0;
++}
++EXPORT_SYMBOL(write_ep0_zlp);
++
++static void udc_init_ep(struct pxa27x_udc *dev)
++{
++ int i;
++
++ INIT_LIST_HEAD(&dev->gadget.ep_list);
++ INIT_LIST_HEAD(&dev->gadget.ep0->ep_list);
++
++ for (i = 0; i < UDC_EP_NUM; i++) {
++ struct pxa27x_ep *ep = &dev->ep[i];
++
++ ep->dma = -1;
++ if (i != 0) {
++ memset(ep, 0, sizeof(*ep));
++ }
++ INIT_LIST_HEAD(&ep->queue);
++ }
++}
++
++/*-------------------------------------------------------------------------*/
++
++static void nop_release(struct device *dev)
++{
++ DMSG("%s %s\n", __FUNCTION__, dev->bus_id);
++}
++
++/* this uses load-time allocation and initialization (instead of
++ * doing it at run-time) to save code, eliminate fault paths, and
++ * be more obviously correct.
++ */
++
++static struct pxa27x_udc memory = {
++ .gadget = {
++ .ops = &pxa27x_udc_ops,
++ .ep0 = &memory.virt_ep0.usb_ep,
++ .name = driver_name,
++ .dev = {
++ .bus_id = "gadget",
++ .release = nop_release,
++ },
++ },
++
++ /* control endpoint */
++ .virt_ep0 = {
++ .pxa_ep = &memory.ep[0],
++ .usb_ep = {
++ .name = ep0name,
++ .ops = &pxa27x_ep_ops,
++ .maxpacket = EP0_FIFO_SIZE,
++ },
++ },
++
++ .ep[0] = {
++ .usb_ep = &memory.virt_ep0.usb_ep,
++ .dev = &memory,
++ .reg_udccsr = &UDCCSR0,
++ .reg_udcdr = &UDCDR0,
++ },
++};
++
++static int __init pxa27x_udc_probe(struct platform_device *_dev)
++{
++ struct pxa27x_udc *dev = &memory;
++ int retval;
++
++ /* other non-static parts of init */
++ dev->dev = &_dev->dev;
++ dev->mach = _dev->dev.platform_data;
++
++ /* RPFIXME */
++ UP2OCR = UP2OCR_HXOE | UP2OCR_DPPUE | UP2OCR_DPPUBE;
++
++ init_timer(&dev->timer);
++ dev->timer.function = udc_watchdog;
++ dev->timer.data = (unsigned long) dev;
++
++ device_initialize(&dev->gadget.dev);
++ dev->gadget.dev.parent = &_dev->dev;
++ dev->gadget.dev.dma_mask = _dev->dev.dma_mask;
++
++ the_controller = dev;
++ platform_set_drvdata(_dev, dev);
++
++ udc_disable(dev);
++ udc_init_ep(dev);
++ udc_reinit(dev);
++
++ /* irq setup after old hardware state is cleaned up */
++ retval = request_irq(IRQ_USB, pxa27x_udc_irq,
++ SA_INTERRUPT, driver_name, dev);
++ if (retval != 0) {
++ dev_err(dev->dev, "%s: can't get irq %i, err %d\n",
++ driver_name, IRQ_USB, retval);
++ return -EBUSY;
++ }
++ dev->got_irq = 1;
++
++ create_proc_files();
++
++ return 0;
++}
++
++static int pxa27x_udc_remove(struct platform_device *_dev)
++{
++ struct pxa27x_udc *dev = platform_get_drvdata(_dev);
++
++ udc_disable(dev);
++ remove_proc_files();
++ usb_gadget_unregister_driver(dev->driver);
++
++ pxa27x_ep_freeall(&dev->gadget);
++
++ if (dev->got_irq) {
++ free_irq(IRQ_USB, dev);
++ dev->got_irq = 0;
++ }
++ platform_set_drvdata(_dev, 0);
++ the_controller = 0;
++ return 0;
++}
++
++#ifdef CONFIG_PM
++static void pxa27x_udc_shutdown(struct platform_device *_dev)
++{
++ struct pxa27x_udc *dev = platform_get_drvdata(_dev);
++
++ udc_disable(dev);
++}
++
++static int pxa27x_udc_suspend(struct platform_device *_dev, pm_message_t state)
++{
++ int i;
++ struct pxa27x_udc *dev = platform_get_drvdata(_dev);
++
++ DMSG("%s is called\n", __FUNCTION__);
++
++ dev->udccsr0 = UDCCSR0;
++ for(i=1; (i<UDC_EP_NUM); i++) {
++ if (dev->ep[i].assigned) {
++ struct pxa27x_ep *ep = &dev->ep[i];
++ ep->udccsr_value = *ep->reg_udccsr;
++ ep->udccr_value = *ep->reg_udccr;
++ DMSG("EP%d, udccsr:0x%x, udccr:0x%x\n",
++ i, *ep->reg_udccsr, *ep->reg_udccr);
++ }
++ }
++
++ udc_clear_mask_UDCCR(UDCCR_UDE);
++ pxa_set_cken(CKEN_USB, 0);
++
++ return 0;
++}
++
++static int pxa27x_udc_resume(struct platform_device *_dev)
++{
++ int i;
++ struct pxa27x_udc *dev = platform_get_drvdata(_dev);
++
++ DMSG("%s is called\n", __FUNCTION__);
++ UDCCSR0 = dev->udccsr0 & (UDCCSR0_FST | UDCCSR0_DME);
++ for (i=1; i < UDC_EP_NUM; i++) {
++ if (dev->ep[i].assigned) {
++ struct pxa27x_ep *ep = &dev->ep[i];
++ *ep->reg_udccsr = ep->udccsr_value;
++ *ep->reg_udccr = ep->udccr_value;
++ DMSG("EP%d, udccsr:0x%x, udccr:0x%x\n",
++ i, *ep->reg_udccsr, *ep->reg_udccr);
++ }
++ }
++
++ udc_enable(dev);
++
++ /* OTGPH bit is set when sleep mode is entered.
++ * it indicates that OTG pad is retaining its state.
++ * Upon exit from sleep mode and before clearing OTGPH,
++ * Software must configure the USB OTG pad, UDC, and UHC
++ * to the state they were in before entering sleep mode.*/
++ PSSR |= PSSR_OTGPH;
++
++ return 0;
++}
++#endif
++
++/*-------------------------------------------------------------------------*/
++
++static struct platform_driver udc_driver = {
++ .driver = {
++ .name = "pxa2xx-udc",
++ },
++ .probe = pxa27x_udc_probe,
++ .remove = pxa27x_udc_remove,
++#ifdef CONFIG_PM
++ .shutdown = pxa27x_udc_shutdown,
++ .suspend = pxa27x_udc_suspend,
++ .resume = pxa27x_udc_resume
++#endif
++};
++
++static int __init udc_init(void)
++{
++ printk(KERN_INFO "%s: version %s\n", driver_name, DRIVER_VERSION);
++ return platform_driver_register(&udc_driver);
++}
++module_init(udc_init);
++
++static void __exit udc_exit(void)
++{
++ platform_driver_unregister(&udc_driver);
++}
++module_exit(udc_exit);
++
++MODULE_DESCRIPTION(DRIVER_DESC);
++MODULE_AUTHOR("Frank Becker, Robert Schwebel, David Brownell");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/usb/gadget/pxa27x_udc.h b/drivers/usb/gadget/pxa27x_udc.h
+new file mode 100644
+index 0000000..d4377cf
+--- /dev/null
++++ b/drivers/usb/gadget/pxa27x_udc.h
+@@ -0,0 +1,298 @@
++/*
++ * linux/drivers/usb/gadget/pxa27x_udc.h
++ * Intel PXA27x on-chip full speed USB device controller
++ *
++ * Copyright (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>, Pengutronix
++ * Copyright (C) 2003 David Brownell
++ * Copyright (C) 2004 Intel Corporation
++ *
++ * 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
++ */
++
++#ifndef __LINUX_USB_GADGET_PXA27X_H
++#define __LINUX_USB_GADGET_PXA27X_H
++
++#include <linux/types.h>
++
++struct pxa27x_udc;
++
++struct pxa27x_ep {
++ struct pxa27x_udc *dev;
++ struct usb_ep *usb_ep;
++ const struct usb_endpoint_descriptor *desc;
++
++ struct list_head queue;
++ unsigned long pio_irqs;
++ unsigned long dma_irqs;
++
++ unsigned pxa_ep_num;
++ int dma;
++ unsigned fifo_size;
++ unsigned ep_type;
++
++ unsigned stopped : 1;
++ unsigned dma_con : 1;
++ unsigned dir_in : 1;
++ unsigned assigned : 1;
++
++ unsigned ep_num;
++ unsigned config;
++ unsigned interface;
++ unsigned aisn;
++ /* UDCCSR = UDC Control/Status Register for this EP
++ * UBCR = UDC Byte Count Remaining (contents of OUT fifo)
++ * UDCDR = UDC Endpoint Data Register (the fifo)
++ * UDCCR = UDC Endpoint Configuration Registers
++ * DRCM = DMA Request Channel Map
++ */
++ volatile u32 *reg_udccsr;
++ volatile u32 *reg_udcbcr;
++ volatile u32 *reg_udcdr;
++ volatile u32 *reg_udccr;
++#ifdef USE_DMA
++ volatile u32 *reg_drcmr;
++#define drcmr(n) .reg_drcmr = & DRCMR ## n ,
++#else
++#define drcmr(n)
++#endif
++
++#ifdef CONFIG_PM
++ unsigned udccsr_value;
++ unsigned udccr_value;
++#endif
++};
++
++struct pxa27x_virt_ep {
++ struct usb_ep usb_ep;
++ const struct usb_endpoint_descriptor *desc;
++ struct pxa27x_ep *pxa_ep;
++};
++
++struct pxa27x_request {
++ struct usb_request req;
++ struct list_head queue;
++};
++
++enum ep0_state {
++ EP0_IDLE,
++ EP0_IN_DATA_PHASE,
++ EP0_OUT_DATA_PHASE,
++// EP0_END_XFER,
++ EP0_STALL,
++ EP0_NO_ACTION
++};
++
++#define EP0_FIFO_SIZE ((unsigned)16)
++#define BULK_FIFO_SIZE ((unsigned)64)
++#define ISO_FIFO_SIZE ((unsigned)256)
++#define INT_FIFO_SIZE ((unsigned)8)
++
++struct udc_stats {
++ struct ep0stats {
++ unsigned long ops;
++ unsigned long bytes;
++ } read, write;
++ unsigned long irqs;
++};
++
++#define UDC_EP_NUM 24
++
++
++struct pxa27x_udc {
++ struct usb_gadget gadget;
++ struct usb_gadget_driver *driver;
++
++ enum ep0_state ep0state;
++ struct udc_stats stats;
++ unsigned got_irq : 1,
++ has_cfr : 1,
++ req_pending : 1,
++ req_std : 1,
++ req_config : 1;
++
++#define start_watchdog(dev) mod_timer(&dev->timer, jiffies + (HZ/200))
++ struct timer_list timer;
++
++ struct device *dev;
++ struct pxa2xx_udc_mach_info *mach;
++ u64 dma_mask;
++ struct pxa27x_virt_ep virt_ep0;
++ struct pxa27x_ep ep[UDC_EP_NUM];
++ unsigned int ep_num;
++
++ unsigned configuration,
++ interface,
++ alternate;
++#ifdef CONFIG_PM
++ unsigned udccsr0;
++#endif
++};
++
++static struct pxa27x_udc *the_controller;
++
++#if 0
++/*-------------------------------------------------------------------------*/
++
++
++/* one GPIO should be used to detect host disconnect */
++static inline int is_usb_connected(void)
++{
++ if (!the_controller->mach->udc_is_connected)
++ return 1;
++ return the_controller->mach->udc_is_connected();
++}
++
++/* one GPIO should force the host to see this device (or not) */
++static inline void make_usb_disappear(void)
++{
++ if (!the_controller->mach->udc_command)
++ return;
++ the_controller->mach->udc_command(PXA27X_UDC_CMD_DISCONNECT);
++}
++
++static inline void let_usb_appear(void)
++{
++ if (!the_controller->mach->udc_command)
++ return;
++ the_controller->mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
++}
++#endif
++
++/*-------------------------------------------------------------------------*/
++
++/*
++ * Debugging support vanishes in non-debug builds. DBG_NORMAL should be
++ * mostly silent during normal use/testing, with no timing side-effects.
++ */
++#define DBG_NORMAL 1 /* error paths, device state transitions */
++#define DBG_VERBOSE 2 /* add some success path trace info */
++#define DBG_NOISY 3 /* ... even more: request level */
++#define DBG_VERY_NOISY 4 /* ... even more: packet level */
++
++#ifdef DEBUG
++static const char *state_name[] = {
++ "EP0_IDLE",
++ "EP0_IN_DATA_PHASE", "EP0_OUT_DATA_PHASE",
++ "EP0_END_XFER", "EP0_STALL"
++};
++
++#define DMSG(stuff...) printk(KERN_ERR "udc: " stuff)
++
++#ifdef VERBOSE
++# define UDC_DEBUG DBG_VERBOSE
++#else
++# define UDC_DEBUG DBG_NORMAL
++#endif
++
++static void __attribute__ ((__unused__))
++dump_udccr(const char *label)
++{
++ u32 udccr = UDCCR;
++ DMSG("%s 0x%08x =%s%s%s%s%s%s%s%s%s%s, con=%d,inter=%d,altinter=%d\n",
++ label, udccr,
++ (udccr & UDCCR_OEN) ? " oen":"",
++ (udccr & UDCCR_AALTHNP) ? " aalthnp":"",
++ (udccr & UDCCR_AHNP) ? " rem" : "",
++ (udccr & UDCCR_BHNP) ? " rstir" : "",
++ (udccr & UDCCR_DWRE) ? " dwre" : "",
++ (udccr & UDCCR_SMAC) ? " smac" : "",
++ (udccr & UDCCR_EMCE) ? " emce" : "",
++ (udccr & UDCCR_UDR) ? " udr" : "",
++ (udccr & UDCCR_UDA) ? " uda" : "",
++ (udccr & UDCCR_UDE) ? " ude" : "",
++ (udccr & UDCCR_ACN) >> UDCCR_ACN_S,
++ (udccr & UDCCR_AIN) >> UDCCR_AIN_S,
++ (udccr & UDCCR_AAISN)>> UDCCR_AAISN_S );
++}
++
++static void __attribute__ ((__unused__))
++dump_udccsr0(const char *label)
++{
++ u32 udccsr0 = UDCCSR0;
++
++ DMSG("%s %s 0x%08x =%s%s%s%s%s%s%s\n",
++ label, state_name[the_controller->ep0state], udccsr0,
++ (udccsr0 & UDCCSR0_SA) ? " sa" : "",
++ (udccsr0 & UDCCSR0_RNE) ? " rne" : "",
++ (udccsr0 & UDCCSR0_FST) ? " fst" : "",
++ (udccsr0 & UDCCSR0_SST) ? " sst" : "",
++ (udccsr0 & UDCCSR0_DME) ? " dme" : "",
++ (udccsr0 & UDCCSR0_IPR) ? " ipr" : "",
++ (udccsr0 & UDCCSR0_OPC) ? " opr" : "");
++}
++
++static void __attribute__ ((__unused__))
++dump_state(struct pxa27x_udc *dev)
++{
++ unsigned i;
++
++ DMSG("%s, udcicr %02X.%02X, udcsir %02X.%02x, udcfnr %02X\n",
++ state_name[dev->ep0state],
++ UDCICR1, UDCICR0, UDCISR1, UDCISR0, UDCFNR);
++ dump_udccr("udccr");
++
++ if (!dev->driver) {
++ DMSG("no gadget driver bound\n");
++ return;
++ } else
++ DMSG("ep0 driver '%s'\n", dev->driver->driver.name);
++
++
++ dump_udccsr0 ("udccsr0");
++ DMSG("ep0 IN %lu/%lu, OUT %lu/%lu\n",
++ dev->stats.write.bytes, dev->stats.write.ops,
++ dev->stats.read.bytes, dev->stats.read.ops);
++
++ for (i = 1; i < UDC_EP_NUM; i++) {
++ if (dev->ep[i].assigned)
++ DMSG ("udccs%d = %02x\n", i, *dev->ep->reg_udccsr);
++ }
++}
++
++#if 0
++static void dump_regs(u8 ep)
++{
++ DMSG("EP:%d UDCCSR:0x%08x UDCBCR:0x%08x\n UDCCR:0x%08x\n",
++ ep,UDCCSN(ep), UDCBCN(ep), UDCCN(ep));
++}
++static void dump_req (struct pxa27x_request *req)
++{
++ struct usb_request *r = &req->req;
++
++ DMSG("%s: buf:0x%08x length:%d dma:0x%08x actual:%d\n",
++ __FUNCTION__, (unsigned)r->buf, r->length,
++ r->dma, r->actual);
++}
++#endif
++
++#else
++
++#define DMSG(stuff...) do{}while(0)
++
++#define dump_udccr(x) do{}while(0)
++#define dump_udccsr0(x) do{}while(0)
++#define dump_state(x) do{}while(0)
++
++#define UDC_DEBUG ((unsigned)4)
++
++#endif
++
++#define DBG(lvl, stuff...) do{if ((lvl) <= UDC_DEBUG) DMSG(stuff);}while(0)
++
++#define WARN(stuff...) printk(KERN_WARNING "udc: " stuff)
++#define INFO(stuff...) printk(KERN_INFO "udc: " stuff)
++
++
++#endif /* __LINUX_USB_GADGET_PXA27X_H */
+diff --git a/drivers/usb/gadget/pxa2xx_udc.h b/drivers/usb/gadget/pxa2xx_udc.h
+index 0e5d0e6..9483a49 100644
+--- a/drivers/usb/gadget/pxa2xx_udc.h
++++ b/drivers/usb/gadget/pxa2xx_udc.h
+@@ -206,7 +206,8 @@ dump_state(struct pxa2xx_udc *dev)
+ unsigned i;
+
+ DMSG("%s %s, uicr %02X.%02X, usir %02X.%02x, ufnr %02X.%02X\n",
+- is_usb_connected() ? "host " : "disconnected",
++ //is_usb_connected() ? "host " : "disconnected",
++ "host ",
+ state_name[dev->ep0state],
+ UICR1, UICR0, USIR1, USIR0, UFNRH, UFNRL);
+ dump_udccr("udccr");
+@@ -223,8 +224,8 @@ dump_state(struct pxa2xx_udc *dev)
+ } else
+ DMSG("ep0 driver '%s'\n", dev->driver->driver.name);
+
+- if (!is_usb_connected())
+- return;
++ //if (!is_usb_connected())
++ // return;
+
+ dump_udccs0 ("udccs0");
+ DMSG("ep0 IN %lu/%lu, OUT %lu/%lu\n",
+diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
+index ce4d2e0..5dac23f 100644
+--- a/drivers/usb/gadget/serial.c
++++ b/drivers/usb/gadget/serial.c
+@@ -1356,6 +1356,7 @@ static int __init gs_bind(struct usb_gadget *gadget)
+ struct usb_ep *ep;
+ struct gs_dev *dev;
+ int gcnum;
++ struct usb_endpoint_config ep_config[2];
+
+ /* Some controllers can't support CDC ACM:
+ * - sh doesn't support multiple interfaces or configs;
+@@ -1376,22 +1377,33 @@ static int __init gs_bind(struct usb_gadget *gadget)
+ __constant_cpu_to_le16(GS_VERSION_NUM|0x0099);
+ }
+
++ ep_config[0].config = GS_BULK_CONFIG_ID;
++ ep_config[0].interface = gs_bulk_interface_desc.bInterfaceNumber;
++ ep_config[0].altinterface = gs_bulk_interface_desc.bAlternateSetting;
++ ep_config[1].config = GS_ACM_CONFIG_ID;
++ ep_config[1].interface = gs_data_interface_desc.bInterfaceNumber;
++ ep_config[1].altinterface = gs_data_interface_desc.bAlternateSetting;
++
+ usb_ep_autoconfig_reset(gadget);
+
+- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc);
++ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_in_desc, &ep_config[0], 2);
+ if (!ep)
+ goto autoconf_fail;
+ EP_IN_NAME = ep->name;
+ ep->driver_data = ep; /* claim the endpoint */
+
+- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc);
++ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_out_desc, &ep_config[0], 2);
+ if (!ep)
+ goto autoconf_fail;
+ EP_OUT_NAME = ep->name;
+ ep->driver_data = ep; /* claim the endpoint */
+
+ if (use_acm) {
+- ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc);
++ ep_config[0].config = GS_ACM_CONFIG_ID;
++ ep_config[0].interface = gs_control_interface_desc.bInterfaceNumber;
++ ep_config[0].altinterface = gs_control_interface_desc.bAlternateSetting;
++
++ ep = usb_ep_autoconfig(gadget, &gs_fullspeed_notify_desc, &ep_config[0], 1);
+ if (!ep) {
+ printk(KERN_ERR "gs_bind: cannot run ACM on %s\n", gadget->name);
+ goto autoconf_fail;
+diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c
+index fcfe869..1e40d46 100644
+--- a/drivers/usb/gadget/zero.c
++++ b/drivers/usb/gadget/zero.c
+@@ -1142,6 +1142,7 @@ zero_bind (struct usb_gadget *gadget)
+ struct zero_dev *dev;
+ struct usb_ep *ep;
+ int gcnum;
++ struct usb_endpoint_config ep_config[2];
+
+ /* FIXME this can't yet work right with SH ... it has only
+ * one configuration, numbered one.
+@@ -1154,7 +1155,15 @@ zero_bind (struct usb_gadget *gadget)
+ * but there may also be important quirks to address.
+ */
+ usb_ep_autoconfig_reset (gadget);
+- ep = usb_ep_autoconfig (gadget, &fs_source_desc);
++
++ ep_config[0].config = CONFIG_SOURCE_SINK;
++ ep_config[0].interface = source_sink_intf.bInterfaceNumber;
++ ep_config[0].altinterface = source_sink_intf.bAlternateSetting;
++ ep_config[1].config = CONFIG_LOOPBACK;
++ ep_config[1].interface = loopback_intf.bInterfaceNumber;
++ ep_config[1].altinterface = loopback_intf.bAlternateSetting;
++
++ ep = usb_ep_autoconfig(gadget, &fs_source_desc, &ep_config[0], 2);
+ if (!ep) {
+ autoconf_fail:
+ printk (KERN_ERR "%s: can't autoconfigure on %s\n",
+@@ -1164,7 +1173,7 @@ autoconf_fail:
+ EP_IN_NAME = ep->name;
+ ep->driver_data = ep; /* claim */
+
+- ep = usb_ep_autoconfig (gadget, &fs_sink_desc);
++ ep = usb_ep_autoconfig(gadget, &fs_sink_desc, &ep_config[0], 2);
+ if (!ep)
+ goto autoconf_fail;
+ EP_OUT_NAME = ep->name;
+diff --git a/drivers/video/backlight/Kconfig b/drivers/video/backlight/Kconfig
+index 2580f5f..12e4b91 100644
+--- a/drivers/video/backlight/Kconfig
++++ b/drivers/video/backlight/Kconfig
+@@ -40,7 +40,7 @@ config BACKLIGHT_CLASS_DEVICE
+
+ config BACKLIGHT_CORGI
+ tristate "Sharp Corgi Backlight Driver (SL Series)"
+- depends on BACKLIGHT_CLASS_DEVICE && PXA_SHARPSL
++ depends on BACKLIGHT_CLASS_DEVICE && (PXA_SHARPSL || MACH_EM_X270)
+ default y
+ help
+ If you have a Sharp Zaurus SL-C7xx, SL-Cxx00 or SL-6000x say y to enable the
+diff --git a/include/asm-arm/arch-pxa/pwr-i2c.h b/include/asm-arm/arch-pxa/pwr-i2c.h
+new file mode 100644
+index 0000000..6bad486
+--- /dev/null
++++ b/include/asm-arm/arch-pxa/pwr-i2c.h
+@@ -0,0 +1,61 @@
++/*
++ * (C) Copyright 2007 CompuLab, Ltd
++ * Mike Rapoport <mike@compulab.co.il>
++ *
++ * Simple Power I2C interface for PXA processors.
++ * Based on U-Boot PXA I2C driver.
++ *
++ * 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
++ *
++ */
++
++#ifndef __PXA_PWR_I2C_H__
++#define __PXA_PWR_I2C_H__
++
++/*
++ * Configuration items.
++ */
++#define I2C_RXTX_LEN 128 /* maximum tx/rx buffer length */
++
++/*
++ * Probe the given I2C chip address. Returns 0 if a chip responded,
++ * not 0 on failure.
++ */
++extern int pxa_pwr_i2c_probe(u8 chip);
++
++/*
++ * Read/Write interface:
++ * chip: I2C chip address, range 0..127
++ * addr: Memory (register) address within the chip
++ * alen: Number of bytes to use for addr (typically 1, 2 for larger
++ * memories, 0 for register type devices with only one
++ * register)
++ * buffer: Where to read/write the data
++ * len: How many bytes to read/write
++ *
++ * Returns: 0 on success, not 0 on failure
++ */
++extern int pxa_pwr_i2c_read(u8 chip, uint addr, int alen, u8 *buffer, int len);
++extern int pxa_pwr_i2c_write(u8 chip, uint addr, int alen,
++ u8 *buffer, int len);
++
++/*
++ * Utility routines to read/write registers.
++ */
++extern s32 pxa_pwr_i2c_reg_read (u8 chip, u8 reg);
++extern s32 pxa_pwr_i2c_reg_write(u8 chip, u8 reg, u8 val);
++
++#endif /* __PXA_PWR_I2C_H___ */
+diff --git a/include/linux/da9030.h b/include/linux/da9030.h
+new file mode 100644
+index 0000000..6eb89e2
+--- /dev/null
++++ b/include/linux/da9030.h
+@@ -0,0 +1,118 @@
++#ifndef _DA9030_H
++#define _DA9030_H
++
++/* DA9030 has 24 possible interrupts */
++#define DA9030_IRQ_COUNT 24
++
++/* EVENT A */
++#define DA9030_IRQ_ONKEY_EN 0
++#define DA9030_IRQ_PWREN1 1
++#define DA9030_IRQ_EXTON 2
++#define DA9030_IRQ_CHDET 3
++#define DA9030_IRQ_TBAT 4
++#define DA9030_IRQ_VBATMON 5
++#define DA9030_IRQ_VBATMONTXON 6
++#define DA9030_IRQ_CHIOVER 7
++
++/* EVENT B */
++#define DA9030_IRQ_TCTO 8
++#define DA9030_IRQ_CCTO 9
++#define DA9030_IRQ_ADC_READY 10
++#define DA9030_IRQ_VBUS_4_4 11
++#define DA9030_IRQ_VBUS_4_0 12
++#define DA9030_IRQ_SESSION_VALID 13
++#define DA9030_IRQ_SRP_DETECT 14
++#define DA9030_IRQ_WDOG_INTR 15
++
++/* EVENT C */
++#define DA9030_IRQ_LDO15 16
++#define DA9030_IRQ_LDO16 17
++#define DA9030_IRQ_LDO17 18
++#define DA9030_IRQ_LDO18 19
++#define DA9030_IRQ_LDO19 20
++#define DA9030_IRQ_BUCK2 21
++#define DA9030_IRQ_ADC_IN4 22
++#define DA9030_IRQ_ADC_IN5 23
++
++enum da9030_ldo_sleep_mode {
++ DA9030_LDO_SLEEP_KEEP = 0x0,
++ DA9030_LDO_SLEEP_SHUT_DOWN = 0x1,
++ DA9030_LDO_SLEEP_POWER_UP = 0x2,
++ DA9030_LDO_SLEEP_HIGH_Z = 0x3,
++};
++
++enum da9030_led_rate {
++ DA9030_LED_RATE_ON = 0x0,
++ DA9030_LED_RATE_0_52 = 0x1,
++ DA9030_LED_RATE_1_05 = 0x2,
++ DA9030_LED_RATE_2_1 = 0x3,
++};
++
++enum da9030_led_duty_cycle {
++ DA9030_LED_DUTY_1_16 = 0x0,
++ DA9030_LED_DUTY_1_8 = 0x1,
++ DA9030_LED_DUTY_1_4 = 0x2,
++ DA9030_LED_DUTY_1_2 = 0x3,
++};
++
++enum da9030_led_pwm_chop {
++ DA9030_LED_PWM_8_8 = 0x0,
++ DA9030_LED_PWM_7_8 = 0x1,
++ DA9030_LED_PWM_6_8 = 0x2,
++ DA9030_LED_PWM_5_8 = 0x3,
++ DA9030_LED_PWM_4_8 = 0x4,
++ DA9030_LED_PWM_3_8 = 0x5,
++ DA9030_LED_PWM_2_8 = 0x6,
++ DA9030_LED_PWM_1_8 = 0x7,
++};
++
++struct da9030_adc_res {
++ int vbat_res;
++ int vbatmin_res;
++ int vbatmintxon;
++ int ichmax_res;
++ int ichmin_res;
++ int ichaverage_res;
++ int vchmax_res;
++ int vchmin_res;
++ int tbat_res;
++ int adc_in4_res;
++ int adc_in5_res;
++};
++
++extern int da9030_get_status(void);
++extern int da9030_get_fault_log(void);
++
++extern void da9030_enable_adc(void);
++extern void da9030_read_adc(struct da9030_adc_res *adc);
++
++extern void da9030_set_wled(int on, unsigned int brightness);
++
++extern int da9030_set_led(int led, int on,
++ enum da9030_led_rate rate,
++ enum da9030_led_duty_cycle duty,
++ enum da9030_led_pwm_chop pwm_chop);
++
++extern int da9030_set_charger(int on, unsigned int mA, unsigned int mV);
++extern void da9030_get_charger(int *on, unsigned int *mA, unsigned int *mV);
++
++extern int da9030_set_ldo(int ldo, int on, unsigned int mV,
++ enum da9030_ldo_sleep_mode sleep_mode);
++extern int da9030_set_buck(int buck, int on, unsigned int mV, int flags);
++
++extern void da9030_set_thresholds(unsigned int tbathighp,
++ unsigned int tbathighn,
++ unsigned int tbatlow,
++ unsigned int vbatmon);
++
++extern int da9030_register_callback(int event,
++ void (*callback)(int event, void *data),
++ void *data);
++extern void da9030_unregister_callback(int event);
++
++/* Keep these for now, although they are unsafe. When I'll see what
++ other methods are needed from DA9030, I'll remove these */
++extern s32 da9030_get_reg(u32 reg);
++extern s32 da9030_set_reg(u32 reg, u8 val);
++
++#endif
+diff --git a/include/linux/usb_gadget.h b/include/linux/usb_gadget.h
+index 4f59b2a..792c568 100644
+--- a/include/linux/usb_gadget.h
++++ b/include/linux/usb_gadget.h
+@@ -397,10 +397,28 @@ usb_ep_fifo_flush (struct usb_ep *ep)
+
+ struct usb_gadget;
+
++/**
++ * struct usb_endpoint_config - possible configurations of a given endpoint
++ * @config: the configuration number
++ * @interface: the interface number
++ * @altinterface: the altinterface number
++ *
++ * Used as an array to pass information about the possible configurations
++ * of a given endpoint to the bus controller.
++ */
++struct usb_endpoint_config {
++ u8 config;
++ u8 interface;
++ u8 altinterface;
++};
++
+ /* the rest of the api to the controller hardware: device operations,
+ * which don't involve endpoints (or i/o).
+ */
+ struct usb_gadget_ops {
++ struct usb_ep* (*ep_alloc)(struct usb_gadget *,
++ struct usb_endpoint_descriptor *,
++ struct usb_endpoint_config *, int);
+ int (*get_frame)(struct usb_gadget *);
+ int (*wakeup)(struct usb_gadget *);
+ int (*set_selfpowered) (struct usb_gadget *, int is_selfpowered);
+@@ -824,7 +842,10 @@ int usb_gadget_config_buf(const struct usb_config_descriptor *config,
+ /* utility wrapping a simple endpoint selection policy */
+
+ extern struct usb_ep *usb_ep_autoconfig (struct usb_gadget *,
+- struct usb_endpoint_descriptor *) __devinit;
++ struct usb_endpoint_descriptor *,
++ struct usb_endpoint_config *,
++ int numconfigs
++);
+
+ extern void usb_ep_autoconfig_reset (struct usb_gadget *) __devinit;
+
+diff --git a/include/linux/wm97xx.h b/include/linux/wm97xx.h
+new file mode 100644
+index 0000000..354e533
+--- /dev/null
++++ b/include/linux/wm97xx.h
+@@ -0,0 +1,291 @@
++
++/*
++ * Register bits and API for Wolfson WM97xx series of codecs
++ */
++
++#ifndef _LINUX_WM97XX_H
++#define _LINUX_WM97XX_H
++
++#include <sound/driver.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/ac97_codec.h>
++#include <sound/initval.h>
++#include <linux/types.h>
++#include <linux/list.h>
++#include <linux/input.h> /* Input device layer */
++
++/*
++ * WM97xx AC97 Touchscreen registers
++ */
++#define AC97_WM97XX_DIGITISER1 0x76
++#define AC97_WM97XX_DIGITISER2 0x78
++#define AC97_WM97XX_DIGITISER_RD 0x7a
++#define AC97_WM9713_DIG1 0x74
++#define AC97_WM9713_DIG2 AC97_WM97XX_DIGITISER1
++#define AC97_WM9713_DIG3 AC97_WM97XX_DIGITISER2
++
++/*
++ * WM97xx register bits
++ */
++#define WM97XX_POLL 0x8000 /* initiate a polling measurement */
++#define WM97XX_ADCSEL_X 0x1000 /* x coord measurement */
++#define WM97XX_ADCSEL_Y 0x2000 /* y coord measurement */
++#define WM97XX_ADCSEL_PRES 0x3000 /* pressure measurement */
++#define WM97XX_ADCSEL_MASK 0x7000
++#define WM97XX_COO 0x0800 /* enable coordinate mode */
++#define WM97XX_CTC 0x0400 /* enable continuous mode */
++#define WM97XX_CM_RATE_93 0x0000 /* 93.75Hz continuous rate */
++#define WM97XX_CM_RATE_187 0x0100 /* 187.5Hz continuous rate */
++#define WM97XX_CM_RATE_375 0x0200 /* 375Hz continuous rate */
++#define WM97XX_CM_RATE_750 0x0300 /* 750Hz continuous rate */
++#define WM97XX_CM_RATE_8K 0x00f0 /* 8kHz continuous rate */
++#define WM97XX_CM_RATE_12K 0x01f0 /* 12kHz continuous rate */
++#define WM97XX_CM_RATE_24K 0x02f0 /* 24kHz continuous rate */
++#define WM97XX_CM_RATE_48K 0x03f0 /* 48kHz continuous rate */
++#define WM97XX_CM_RATE_MASK 0x03f0
++#define WM97XX_RATE(i) (((i & 3) << 8) | ((i & 4) ? 0xf0 : 0))
++#define WM97XX_DELAY(i) ((i << 4) & 0x00f0) /* sample delay times */
++#define WM97XX_DELAY_MASK 0x00f0
++#define WM97XX_SLEN 0x0008 /* slot read back enable */
++#define WM97XX_SLT(i) ((i - 5) & 0x7) /* touchpanel slot selection (5-11) */
++#define WM97XX_SLT_MASK 0x0007
++#define WM97XX_PRP_DETW 0x4000 /* pen detect on, digitiser off, wake up */
++#define WM97XX_PRP_DET 0x8000 /* pen detect on, digitiser off, no wake up */
++#define WM97XX_PRP_DET_DIG 0xc000 /* pen detect on, digitiser on */
++#define WM97XX_RPR 0x2000 /* wake up on pen down */
++#define WM97XX_PEN_DOWN 0x8000 /* pen is down */
++#define WM97XX_ADCSRC_MASK 0x7000 /* ADC source mask */
++
++#define WM97XX_AUX_ID1 0x8001
++#define WM97XX_AUX_ID2 0x8002
++#define WM97XX_AUX_ID3 0x8003
++#define WM97XX_AUX_ID4 0x8004
++
++
++/* WM9712 Bits */
++#define WM9712_45W 0x1000 /* set for 5-wire touchscreen */
++#define WM9712_PDEN 0x0800 /* measure only when pen down */
++#define WM9712_WAIT 0x0200 /* wait until adc is read before next sample */
++#define WM9712_PIL 0x0100 /* current used for pressure measurement. set 400uA else 200uA */
++#define WM9712_MASK_HI 0x0040 /* hi on mask pin (47) stops conversions */
++#define WM9712_MASK_EDGE 0x0080 /* rising/falling edge on pin delays sample */
++#define WM9712_MASK_SYNC 0x00c0 /* rising/falling edge on mask initiates sample */
++#define WM9712_RPU(i) (i&0x3f) /* internal pull up on pen detect (64k / rpu) */
++#define WM9712_PD(i) (0x1 << i) /* power management */
++
++/* WM9712 Registers */
++#define AC97_WM9712_POWER 0x24
++#define AC97_WM9712_REV 0x58
++
++/* WM9705 Bits */
++#define WM9705_PDEN 0x1000 /* measure only when pen is down */
++#define WM9705_PINV 0x0800 /* inverts sense of pen down output */
++#define WM9705_BSEN 0x0400 /* BUSY flag enable, pin47 is 1 when busy */
++#define WM9705_BINV 0x0200 /* invert BUSY (pin47) output */
++#define WM9705_WAIT 0x0100 /* wait until adc is read before next sample */
++#define WM9705_PIL 0x0080 /* current used for pressure measurement. set 400uA else 200uA */
++#define WM9705_PHIZ 0x0040 /* set PHONE and PCBEEP inputs to high impedance */
++#define WM9705_MASK_HI 0x0010 /* hi on mask stops conversions */
++#define WM9705_MASK_EDGE 0x0020 /* rising/falling edge on pin delays sample */
++#define WM9705_MASK_SYNC 0x0030 /* rising/falling edge on mask initiates sample */
++#define WM9705_PDD(i) (i & 0x000f) /* pen detect comparator threshold */
++
++
++/* WM9713 Bits */
++#define WM9713_PDPOL 0x0400 /* Pen down polarity */
++#define WM9713_POLL 0x0200 /* initiate a polling measurement */
++#define WM9713_CTC 0x0100 /* enable continuous mode */
++#define WM9713_ADCSEL_X 0x0002 /* X measurement */
++#define WM9713_ADCSEL_Y 0x0004 /* Y measurement */
++#define WM9713_ADCSEL_PRES 0x0008 /* Pressure measurement */
++#define WM9713_COO 0x0001 /* enable coordinate mode */
++#define WM9713_PDEN 0x0800 /* measure only when pen down */
++#define WM9713_ADCSEL_MASK 0x00fe /* ADC selection mask */
++#define WM9713_WAIT 0x0200 /* coordinate wait */
++
++/* AUX ADC ID's */
++#define TS_COMP1 0x0
++#define TS_COMP2 0x1
++#define TS_BMON 0x2
++#define TS_WIPER 0x3
++
++/* ID numbers */
++#define WM97XX_ID1 0x574d
++#define WM9712_ID2 0x4c12
++#define WM9705_ID2 0x4c05
++#define WM9713_ID2 0x4c13
++
++/* Codec GPIO's */
++#define WM97XX_MAX_GPIO 16
++#define WM97XX_GPIO_1 (1 << 1)
++#define WM97XX_GPIO_2 (1 << 2)
++#define WM97XX_GPIO_3 (1 << 3)
++#define WM97XX_GPIO_4 (1 << 4)
++#define WM97XX_GPIO_5 (1 << 5)
++#define WM97XX_GPIO_6 (1 << 6)
++#define WM97XX_GPIO_7 (1 << 7)
++#define WM97XX_GPIO_8 (1 << 8)
++#define WM97XX_GPIO_9 (1 << 9)
++#define WM97XX_GPIO_10 (1 << 10)
++#define WM97XX_GPIO_11 (1 << 11)
++#define WM97XX_GPIO_12 (1 << 12)
++#define WM97XX_GPIO_13 (1 << 13)
++#define WM97XX_GPIO_14 (1 << 14)
++#define WM97XX_GPIO_15 (1 << 15)
++
++
++#define AC97_LINK_FRAME 21 /* time in uS for AC97 link frame */
++
++
++/*---------------- Return codes from sample reading functions ---------------*/
++
++/* More data is available; call the sample gathering function again */
++#define RC_AGAIN 0x00000001
++/* The returned sample is valid */
++#define RC_VALID 0x00000002
++/* The pen is up (the first RC_VALID without RC_PENUP means pen is down) */
++#define RC_PENUP 0x00000004
++/* The pen is down (RC_VALID implies RC_PENDOWN, but sometimes it is helpful
++ to tell the handler that the pen is down but we don't know yet his coords,
++ so the handler should not sleep or wait for pendown irq) */
++#define RC_PENDOWN 0x00000008
++
++/* The wm97xx driver provides a private API for writing platform-specific
++ * drivers.
++ */
++
++/* The structure used to return arch specific sampled data into */
++struct wm97xx_data {
++ int x;
++ int y;
++ int p;
++};
++
++/* Codec GPIO status
++ */
++typedef enum {
++ WM97XX_GPIO_HIGH,
++ WM97XX_GPIO_LOW
++} wm97xx_gpio_status_t;
++
++/* Codec GPIO direction
++ */
++typedef enum {
++ WM97XX_GPIO_IN,
++ WM97XX_GPIO_OUT
++} wm97xx_gpio_dir_t;
++
++/* Codec GPIO polarity
++ */
++typedef enum {
++ WM97XX_GPIO_POL_HIGH,
++ WM97XX_GPIO_POL_LOW
++} wm97xx_gpio_pol_t;
++
++/* Codec GPIO sticky
++ */
++typedef enum {
++ WM97XX_GPIO_STICKY,
++ WM97XX_GPIO_NOTSTICKY
++} wm97xx_gpio_sticky_t;
++
++/* Codec GPIO wake
++ */
++typedef enum {
++ WM97XX_GPIO_WAKE,
++ WM97XX_GPIO_NOWAKE
++} wm97xx_gpio_wake_t;
++
++
++/*
++ * Digitiser ioctl commands
++ */
++#define WM97XX_DIG_START 0x1
++#define WM97XX_DIG_STOP 0x2
++#define WM97XX_PHY_INIT 0x3
++#define WM97XX_AUX_PREPARE 0x4
++#define WM97XX_DIG_RESTORE 0x5
++
++struct wm97xx;
++extern struct wm97xx_codec_drv wm97xx_codec;
++
++/*
++ * Codec driver interface - allows mapping to WM9705/12/13 and newer codecs
++ */
++struct wm97xx_codec_drv {
++ u16 id;
++ char *name;
++ int (*poll_sample) (struct wm97xx *, int adcsel, int *sample); /* read 1 sample */
++ int (*poll_touch) (struct wm97xx *, struct wm97xx_data *); /* read X,Y,[P] in poll */
++ int (*digitiser_ioctl) (struct wm97xx *, int cmd);
++ int (*acc_enable) (struct wm97xx *, int enable);
++};
++
++
++/* Machine specific and accelerated touch operations */
++struct wm97xx_mach_ops {
++
++ /* accelerated touch readback - coords are transmited on AC97 link */
++ int acc_enabled;
++ void (*acc_pen_up) (struct wm97xx *);
++ int (*acc_pen_down) (struct wm97xx *);
++ int (*acc_startup) (struct wm97xx *);
++ void (*acc_shutdown) (struct wm97xx *);
++
++ /* pre and post sample - can be used to minimise any analog noise */
++ void (*pre_sample) (int); /* function to run before sampling */
++ void (*post_sample) (int); /* function to run after sampling */
++};
++
++struct wm97xx {
++ u16 dig[3], id, gpio[6], misc; /* Cached codec registers */
++ u16 dig_save[3]; /* saved during aux reading */
++ struct wm97xx_codec_drv *codec; /* attached codec driver*/
++ struct input_dev* input_dev; /* touchscreen input device */
++ struct snd_ac97 *ac97; /* ALSA codec access */
++ struct device *dev; /* ALSA device */
++ struct device *battery_dev;
++ struct device *touch_dev;
++ struct wm97xx_mach_ops *mach_ops;
++ struct mutex codec_mutex;
++ struct completion ts_init;
++ struct completion ts_exit;
++ struct task_struct *ts_task;
++ unsigned int pen_irq; /* Pen IRQ number in use */
++ wait_queue_head_t pen_irq_wait; /* Pen IRQ wait queue */
++ struct workqueue_struct *pen_irq_workq;
++ struct work_struct pen_event_work;
++ u16 acc_slot; /* AC97 slot used for acc touch data */
++ u16 acc_rate; /* acc touch data rate */
++ unsigned int ts_use_count;
++ unsigned pen_is_down:1; /* Pen is down */
++ unsigned aux_waiting:1; /* aux measurement waiting */
++ unsigned pen_probably_down:1; /* used in polling mode */
++};
++
++/* Codec GPIO access (not supported on WM9705)
++ * This can be used to set/get codec GPIO and Virtual GPIO status.
++ */
++wm97xx_gpio_status_t wm97xx_get_gpio(struct wm97xx *wm, u32 gpio);
++void wm97xx_set_gpio(struct wm97xx *wm, u32 gpio,
++ wm97xx_gpio_status_t status);
++void wm97xx_config_gpio(struct wm97xx *wm, u32 gpio,
++ wm97xx_gpio_dir_t dir,
++ wm97xx_gpio_pol_t pol,
++ wm97xx_gpio_sticky_t sticky,
++ wm97xx_gpio_wake_t wake);
++
++/* codec AC97 IO access */
++int wm97xx_reg_read(struct wm97xx *wm, u16 reg);
++void wm97xx_reg_write(struct wm97xx *wm, u16 reg, u16 val);
++
++/* aux adc readback */
++int wm97xx_read_aux_adc(struct wm97xx *wm, u16 adcsel);
++
++/* machine ops */
++int wm97xx_register_mach_ops(struct wm97xx *, struct wm97xx_mach_ops *);
++void wm97xx_unregister_mach_ops(struct wm97xx *);
++
++extern struct bus_type wm97xx_bus_type;
++#endif
+diff --git a/sound/soc/pxa/Kconfig b/sound/soc/pxa/Kconfig
+index a83e229..89b5730 100644
+--- a/sound/soc/pxa/Kconfig
++++ b/sound/soc/pxa/Kconfig
+@@ -53,3 +53,12 @@ config SND_PXA2XX_SOC_TOSA
+ help
+ Say Y if you want to add support for SoC audio on Sharp
+ Zaurus SL-C6000x models (Tosa).
++
++config SND_PXA2XX_SOC_EM_X270
++ tristate "SoC Audio support for CompuLab EM-x270"
++ depends on SND_PXA2XX_SOC && MACH_EM_X270
++ select SND_PXA2XX_SOC_AC97
++ select SND_SOC_WM9712
++ help
++ Say Y if you want to add support for SoC audio on
++ CompuLab EM-x270.
+diff --git a/sound/soc/pxa/Makefile b/sound/soc/pxa/Makefile
+index 78e0d6b..32375ac 100644
+--- a/sound/soc/pxa/Makefile
++++ b/sound/soc/pxa/Makefile
+@@ -12,9 +12,11 @@ snd-soc-corgi-objs := corgi.o
+ snd-soc-poodle-objs := poodle.o
+ snd-soc-tosa-objs := tosa.o
+ snd-soc-spitz-objs := spitz.o
++snd-soc-em-x270-objs := em-x270.o
+
+ obj-$(CONFIG_SND_PXA2XX_SOC_CORGI) += snd-soc-corgi.o
+ obj-$(CONFIG_SND_PXA2XX_SOC_POODLE) += snd-soc-poodle.o
+ obj-$(CONFIG_SND_PXA2XX_SOC_TOSA) += snd-soc-tosa.o
+ obj-$(CONFIG_SND_PXA2XX_SOC_SPITZ) += snd-soc-spitz.o
++obj-$(CONFIG_SND_PXA2XX_SOC_EM_X270) += snd-soc-em-x270.o
+
+diff --git a/sound/soc/pxa/em-x270.c b/sound/soc/pxa/em-x270.c
+new file mode 100644
+index 0000000..9e891d0
+--- /dev/null
++++ b/sound/soc/pxa/em-x270.c
+@@ -0,0 +1,137 @@
++/*
++ * em-x270.c -- SoC audio for EM-X270
++ *
++ * Copyright 2007 CompuLab, Ltd.
++ *
++ * Author: Mike Rapoport <mike@compulab.co.il>
++ *
++ * Copied from tosa.c:
++ * Copyright 2005 Wolfson Microelectronics PLC.
++ * Copyright 2005 Openedhand Ltd.
++ *
++ * Authors: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
++ * Richard Purdie <richard@openedhand.com>
++ *
++ * This program is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License as published by the
++ * Free Software Foundation; either version 2 of the License, or (at your
++ * option) any later version.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/moduleparam.h>
++#include <linux/device.h>
++
++#include <sound/driver.h>
++#include <sound/core.h>
++#include <sound/pcm.h>
++#include <sound/soc.h>
++#include <sound/soc-dapm.h>
++
++#include <asm/mach-types.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/hardware.h>
++#include <asm/arch/audio.h>
++
++#include "../codecs/wm9712.h"
++#include "pxa2xx-pcm.h"
++#include "pxa2xx-ac97.h"
++
++static struct snd_soc_machine em_x270;
++
++#define EM_X270_HP 0
++#define EM_X270_MIC_INT 1
++#define EM_X270_HEADSET 2
++#define EM_X270_HP_OFF 3
++#define EM_X270_SPK_ON 0
++#define EM_X270_SPK_OFF 1
++
++
++static struct snd_soc_ops em_x270_ops = {
++};
++
++static const struct snd_kcontrol_new em_x270_controls[] = {
++};
++
++static int em_x270_ac97_init(struct snd_soc_codec *codec)
++{
++ int i, err;
++
++ /* add em_x270 specific controls */
++ for (i = 0; i < ARRAY_SIZE(em_x270_controls); i++) {
++ err = snd_ctl_add(codec->card,
++ snd_soc_cnew(&em_x270_controls[i],codec, NULL));
++ if (err < 0)
++ return err;
++ }
++
++ snd_soc_dapm_sync_endpoints(codec);
++ return 0;
++}
++
++static struct snd_soc_dai_link em_x270_dai[] = {
++ {
++ .name = "AC97",
++ .stream_name = "AC97 HiFi",
++ .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_HIFI],
++ .codec_dai = &wm9712_dai[WM9712_DAI_AC97_HIFI],
++ .init = em_x270_ac97_init,
++ .ops = &em_x270_ops,
++ },
++ {
++ .name = "AC97 Aux",
++ .stream_name = "AC97 Aux",
++ .cpu_dai = &pxa_ac97_dai[PXA2XX_DAI_AC97_AUX],
++ .codec_dai = &wm9712_dai[WM9712_DAI_AC97_AUX],
++ .ops = &em_x270_ops,
++ },
++};
++
++static struct snd_soc_machine em_x270 = {
++ .name = "EM-X270",
++ .dai_link = em_x270_dai,
++ .num_links = ARRAY_SIZE(em_x270_dai),
++};
++
++static struct snd_soc_device em_x270_snd_devdata = {
++ .machine = &em_x270,
++ .platform = &pxa2xx_soc_platform,
++ .codec_dev = &soc_codec_dev_wm9712,
++};
++
++static struct platform_device *em_x270_snd_device;
++
++static int __init em_x270_init(void)
++{
++ int ret;
++
++ if (!machine_is_em_x270())
++ return -ENODEV;
++
++ em_x270_snd_device = platform_device_alloc("soc-audio", -1);
++ if (!em_x270_snd_device)
++ return -ENOMEM;
++
++ platform_set_drvdata(em_x270_snd_device, &em_x270_snd_devdata);
++ em_x270_snd_devdata.dev = &em_x270_snd_device->dev;
++ ret = platform_device_add(em_x270_snd_device);
++
++ if (ret)
++ platform_device_put(em_x270_snd_device);
++
++ return ret;
++}
++
++static void __exit em_x270_exit(void)
++{
++ platform_device_unregister(em_x270_snd_device);
++}
++
++module_init(em_x270_init);
++module_exit(em_x270_exit);
++
++/* Module information */
++MODULE_AUTHOR("Mike Rapoport");
++MODULE_DESCRIPTION("ALSA SoC EM-X270");
++MODULE_LICENSE("GPL");
diff --git a/packages/linux/em-x270_2.6.23.bb b/packages/linux/em-x270_2.6.23.bb
new file mode 100644
index 0000000000..a9d6ee7905
--- /dev/null
+++ b/packages/linux/em-x270_2.6.23.bb
@@ -0,0 +1,29 @@
+require linux.inc
+
+SECTION = "kernel"
+DESCRIPTION = "Linux kernel for the Compulab EM-X270 system"
+LICENSE = "GPL"
+DEPENDS = "uboot-utils"
+PR = "r0"
+
+KERNEL_IMAGETYPE = "uImage"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
+ file://em-x270.patch;patch=1 \
+ file://defconfig \
+ "
+
+S = "${WORKDIR}/linux-${PV}"
+
+COMPATIBLE_HOST = 'arm.*-linux'
+COMPATIBLE_MACHINE = "em-x270"
+
+inherit kernel
+inherit package
+
+ARCH = "arm"
+
+FILES_kernel-image = ""
+
+S = "${WORKDIR}/linux-${PV}"
+
diff --git a/packages/linux/linux-2.6.21/gumstix-pxa270-mmc.patch b/packages/linux/linux-2.6.21/gumstix-pxa270-mmc.patch
new file mode 100644
index 0000000000..59d97809d1
--- /dev/null
+++ b/packages/linux/linux-2.6.21/gumstix-pxa270-mmc.patch
@@ -0,0 +1,33 @@
+Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
+===================================================================
+--- linux-2.6.21gum.orig/arch/arm/mach-pxa/gumstix.c
++++ linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
+@@ -33,8 +33,9 @@
+
+ static struct pxamci_platform_data gumstix_mci_platform_data;
+
+-static int gumstix_mci_init(struct device *dev, irqreturn_t (*gumstix_detect_int)(int, void *, struct pt_regs *), void *data)
++static int gumstix_mci_init(struct device *dev, irq_handler_t gumstix_detect_int, void *data)
+ {
++#ifndef CONFIG_ARCH_GUMSTIX_VERDEX
+ int err;
+
+ pxa_gpio_mode(GPIO6_MMCCLK_MD);
+@@ -55,6 +56,17 @@ static int gumstix_mci_init(struct devic
+ }
+
+ err = set_irq_type(GUMSTIX_IRQ_GPIO_nSD_DETECT, IRQT_BOTHEDGE);
++#else
++ // Setup GPIOs for MMC on the 120-pin connector
++ // There is no card detect on a uSD connector so no interrupt to register
++ // There is no WP detect GPIO line either
++ pxa_gpio_mode(GPIO92_MMCDAT0_MD);
++ pxa_gpio_mode(GPIO112_MMCCMD_MD);
++ pxa_gpio_mode(GPIO110_MMCDAT2_MD);
++ pxa_gpio_mode(GPIO111_MMCDAT3_MD);
++ pxa_gpio_mode(GPIO109_MMCDAT1_MD);
++ pxa_gpio_mode(GPIO32_MMCCLK_MD);
++#endif
+
+ return 0;
+ }
diff --git a/packages/linux/linux-2.6.21/gumstix-verdex/defconfig b/packages/linux/linux-2.6.21/gumstix-verdex/defconfig
index 9107cd0d7c..3057d62d5e 100644
--- a/packages/linux/linux-2.6.21/gumstix-verdex/defconfig
+++ b/packages/linux/linux-2.6.21/gumstix-verdex/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.21
-# Thu Sep 13 14:49:02 2007
+# Mon Oct 8 11:22:41 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -219,7 +219,7 @@ CONFIG_ALIGNMENT_HANDLING=0x2
#
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="console=ttyS0,115200n8 root=1f01 rootfstype=jffs2"
+CONFIG_CMDLINE=""
# CONFIG_XIP_KERNEL is not set
CONFIG_KEXEC=y
@@ -828,7 +828,8 @@ CONFIG_MII=m
CONFIG_SMC91X=m
CONFIG_SMC91X_GUMSTIX=m
# CONFIG_DM9000 is not set
-# CONFIG_SMC911X is not set
+CONFIG_SMC911X=m
+CONFIG_SMC911X_GUMSTIX=m
#
# Ethernet (1000 Mbit)
@@ -1057,6 +1058,8 @@ CONFIG_I2C_PXA_SLAVE=y
# CONFIG_SENSORS_PCA9539 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_MAX6875 is not set
+CONFIG_SENSORS_TSC2003=m
+CONFIG_SENSORS_TSC2003_SYSFS=m
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
@@ -1137,6 +1140,9 @@ CONFIG_FB_PXA=y
# CONFIG_FB_PXA_SHARP_LQ043_PSP is not set
CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C=y
# CONFIG_FB_PXA_NONEOFTHEABOVE is not set
+# CONFIG_FB_PXA_LCD_QVGA is not set
+CONFIG_FB_PXA_LCD_VGA=y
+CONFIG_FB_PXA_OVERLAY=y
CONFIG_FB_PXA_PARAMETERS=y
# CONFIG_FB_MBX is not set
# CONFIG_FB_VIRTUAL is not set
diff --git a/packages/linux/linux-2.6.21/mmc-card-detect.patch b/packages/linux/linux-2.6.21/mmc-card-detect.patch
index 9a853b4df8..26dd970e3b 100644
--- a/packages/linux/linux-2.6.21/mmc-card-detect.patch
+++ b/packages/linux/linux-2.6.21/mmc-card-detect.patch
@@ -2,7 +2,7 @@ Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
===================================================================
--- linux-2.6.21gum.orig/arch/arm/mach-pxa/gumstix.c
+++ linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
-@@ -29,19 +29,51 @@
+@@ -29,19 +29,55 @@
#include "generic.h"
@@ -38,9 +38,13 @@ Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
+static int gumstix_mci_get_ro(struct device *dev)
+{
++#ifdef CONFIG_ARCH_GUMSTIX_VERDEX
++ return 0; // microSD is always writable on verdex
++#else
+ int ro;
+ ro = GPLR(GUMSTIX_GPIO_nSD_WP) & GPIO_bit(GUMSTIX_GPIO_nSD_WP);
+ return ro;
++#endif
+}
+
+static void gumstix_mci_exit(struct device *dev, void *data)
diff --git a/packages/linux/linux-2.6.21/pxafb-18bpp-mode.patch b/packages/linux/linux-2.6.21/pxafb-18bpp-mode.patch
index 3643b402e5..c9849d22f4 100644
--- a/packages/linux/linux-2.6.21/pxafb-18bpp-mode.patch
+++ b/packages/linux/linux-2.6.21/pxafb-18bpp-mode.patch
@@ -154,7 +154,7 @@ Index: linux-2.6.21gum/drivers/video/pxafb.c
case '-':
namelen = i;
if (!bpp_specified && !yres_specified) {
-@@ -1227,6 +1268,18 @@ static int __init pxafb_parse_options(st
+@@ -1227,12 +1268,29 @@ static int __init pxafb_parse_options(st
}
if (bpp_specified)
switch (bpp) {
@@ -173,6 +173,17 @@ Index: linux-2.6.21gum/drivers/video/pxafb.c
case 1:
case 2:
case 4:
+ case 8:
+ case 16:
+ inf->modes[0].bpp = bpp;
++ if(nonstd_specified) {
++ dev_err(dev, "Depth %d requires nonstd to *not* be specified\n",bpp);
++ } else {
++ inf->modes[0].nonstd = 0;
++ }
+ dev_info(dev, "overriding bit depth: %d\n", bpp);
+ break;
+ default:
Index: linux-2.6.21gum/include/asm-arm/arch-pxa/pxa-regs.h
===================================================================
--- linux-2.6.21gum.orig/include/asm-arm/arch-pxa/pxa-regs.h
@@ -217,7 +228,7 @@ Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
===================================================================
--- linux-2.6.21gum.orig/arch/arm/mach-pxa/gumstix.c
+++ linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
-@@ -100,7 +100,8 @@ static struct pxafb_mode_info gumstix_fb
+@@ -116,7 +116,8 @@ static struct pxafb_mode_info gumstix_fb
.pixclock = 110000,
.xres = 480,
.yres = 272,
@@ -227,7 +238,7 @@ Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
.hsync_len = 41,
.left_margin = 2,
.right_margin = 2,
-@@ -139,7 +140,8 @@ static struct pxafb_mode_info gumstix_fb
+@@ -144,7 +145,8 @@ static struct pxafb_mode_info gumstix_fb
.vsync_len = 10, // VLW from datasheet: 10 typ
.upper_margin = 2, // VBP - VLW from datasheet: 12 - 10 = 2
.lower_margin = 4, // VFP from datasheet: 4 typ
diff --git a/packages/linux/linux-2.6.21/pxafb-definition.patch b/packages/linux/linux-2.6.21/pxafb-definition.patch
index 2a782c6143..56369fd788 100644
--- a/packages/linux/linux-2.6.21/pxafb-definition.patch
+++ b/packages/linux/linux-2.6.21/pxafb-definition.patch
@@ -10,10 +10,26 @@ Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
#include <asm/arch/gumstix.h>
#include "generic.h"
-@@ -86,6 +87,95 @@ static struct platform_device gum_audio_
+@@ -86,6 +87,89 @@ static struct platform_device gum_audio_
.id = -1,
};
++
++#if defined(CONFIG_FB_PXA_SHARP_LQ043_PSP) || defined(CONFIG_FB_PXA_SAMSUNG_LTE430WQ_F0C)
++static void gumstix_lcd_backlight(int on_or_off)
++{
++ if(on_or_off)
++ {
++ pxa_gpio_mode(17 | GPIO_IN);
++ } else {
++ GPCR(17) = GPIO_bit(17);
++ pxa_gpio_mode(17 | GPIO_OUT);
++ GPCR(17) = GPIO_bit(17);
++ }
++}
++#endif
++
++
+#ifdef CONFIG_FB_PXA_ALPS_CDOLLAR
+static struct pxafb_mode_info gumstix_fb_mode = {
+ .pixclock = 300000,
@@ -50,17 +66,6 @@ Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
+ .sync = 0, // Hsync and Vsync both active low
+};
+
-+static void gumstix_lcd_backlight(int on_or_off)
-+{
-+ pxa_gpio_mode(17 | GPIO_OUT);
-+ if(on_or_off)
-+ {
-+ GPSR(17) = GPIO_bit(17);
-+ } else {
-+ GPCR(17) = GPIO_bit(17);
-+ }
-+}
-+
+static struct pxafb_mach_info gumstix_fb_info = {
+ .modes = &gumstix_fb_mode,
+ .num_modes = 1,
@@ -83,17 +88,6 @@ Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
+ .sync = 0, // Hsync and Vsync both active low
+};
+
-+static void gumstix_lcd_backlight(int on_or_off)
-+{
-+ pxa_gpio_mode(17 | GPIO_OUT);
-+ if(on_or_off)
-+ {
-+ GPSR(17) = GPIO_bit(17);
-+ } else {
-+ GPCR(17) = GPIO_bit(17);
-+ }
-+}
-+
+static struct pxafb_mach_info gumstix_fb_info = {
+ .modes = &gumstix_fb_mode,
+ .num_modes = 1,
@@ -106,7 +100,7 @@ Index: linux-2.6.21gum/arch/arm/mach-pxa/gumstix.c
static struct platform_device *devices[] __initdata = {
&gum_audio_device,
};
-@@ -94,6 +184,9 @@ static void __init gumstix_init(void)
+@@ -94,6 +178,9 @@ static void __init gumstix_init(void)
{
pxa_set_mci_info(&gumstix_mci_platform_data);
pxa_set_udc_info(&gumstix_udc_info);
diff --git a/packages/linux/linux-2.6.21/smc911x-fixup.patch b/packages/linux/linux-2.6.21/smc911x-fixup.patch
new file mode 100644
index 0000000000..c0b7574d3a
--- /dev/null
+++ b/packages/linux/linux-2.6.21/smc911x-fixup.patch
@@ -0,0 +1,392 @@
+Index: linux-2.6.21gum/drivers/net/smc911x.c
+===================================================================
+--- linux-2.6.21gum.orig/drivers/net/smc911x.c
++++ linux-2.6.21gum/drivers/net/smc911x.c
+@@ -76,6 +76,7 @@ static const char version[] =
+ #include <linux/etherdevice.h>
+ #include <linux/skbuff.h>
+
++#include <linux/irq.h>
+ #include <asm/io.h>
+ #include <asm/irq.h>
+
+@@ -303,14 +304,14 @@ static void smc911x_reset(struct net_dev
+ SMC_SET_AFC_CFG(lp->afc_cfg);
+
+
+- /* Set to LED outputs */
+- SMC_SET_GPIO_CFG(0x70070000);
++ /* Set to LED outputs and configure EEPROM pins as GP outputs */
++ SMC_SET_GPIO_CFG(GPIO_CFG_LED1_EN_ | GPIO_CFG_LED2_EN_ | 1 << 20);
+
+ /*
+- * Deassert IRQ for 1*10us for edge type interrupts
++ * Deassert IRQ for 22*10us for edge type interrupts
+ * and drive IRQ pin push-pull
+ */
+- SMC_SET_IRQ_CFG( (1 << 24) | INT_CFG_IRQ_EN_ | INT_CFG_IRQ_TYPE_ );
++ SMC_SET_IRQ_CFG( (22 << 24) | INT_CFG_IRQ_EN_ | INT_CFG_IRQ_TYPE_ );
+
+ /* clear anything saved */
+ if (lp->pending_tx_skb != NULL) {
+@@ -413,7 +414,7 @@ static inline void smc911x_drop_pkt(stru
+ if (fifo_count <= 4) {
+ /* Manually dump the packet data */
+ while (fifo_count--)
+- SMC_GET_RX_FIFO();
++ (void)SMC_GET_RX_FIFO();
+ } else {
+ /* Fast forward through the bad packet */
+ SMC_SET_RX_DP_CTRL(RX_DP_CTRL_FFWD_BUSY_);
+@@ -499,7 +500,7 @@ static inline void smc911x_rcv(struct n
+ SMC_SET_RX_CFG(RX_CFG_RX_END_ALGN4_ | ((2<<8) & RX_CFG_RXDOFF_));
+ SMC_PULL_DATA(data, pkt_len+2+3);
+
+- DBG(SMC_DEBUG_PKTS, "%s: Received packet\n", dev->name,);
++ DBG(SMC_DEBUG_PKTS, "%s: Received packet\n", dev->name);
+ PRINT_PKT(data, ((pkt_len - 4) <= 64) ? pkt_len - 4 : 64);
+ dev->last_rx = jiffies;
+ skb->dev = dev;
+@@ -900,6 +901,7 @@ static void smc911x_phy_powerdown(struct
+ unsigned long ioaddr = dev->base_addr;
+ unsigned int bmcr;
+
++ DBG(SMC_DEBUG_FUNC, "%s: --> %s\n", dev->name, __FUNCTION__);
+ /* Enter Link Disable state */
+ SMC_GET_PHY_BMCR(phy, bmcr);
+ bmcr |= BMCR_PDOWN;
+@@ -925,6 +927,7 @@ static void smc911x_phy_check_media(stru
+
+ if (mii_check_media(&lp->mii, netif_msg_link(lp), init)) {
+ /* duplex state has changed */
++ DBG(SMC_DEBUG_MISC, "%s: duplex state has changed\n", dev->name);
+ SMC_GET_PHY_BMCR(phyaddr, bmcr);
+ SMC_GET_MAC_CR(cr);
+ if (lp->mii.full_duplex) {
+@@ -960,6 +963,7 @@ static void smc911x_phy_configure(struct
+ int my_phy_caps; /* My PHY capabilities */
+ int my_ad_caps; /* My Advertised capabilities */
+ int status;
++ int bmcr;
+ unsigned long flags;
+
+ DBG(SMC_DEBUG_FUNC, "%s: --> %s()\n", dev->name, __FUNCTION__);
+@@ -1033,9 +1037,12 @@ static void smc911x_phy_configure(struct
+
+ DBG(SMC_DEBUG_MISC, "%s: phy caps=0x%04x\n", dev->name, my_phy_caps);
+ DBG(SMC_DEBUG_MISC, "%s: phy advertised caps=0x%04x\n", dev->name, my_ad_caps);
++ DBG(SMC_DEBUG_MISC, "%s: phy advertised readback caps=0x%04x\n", dev->name, status);
+
+ /* Restart auto-negotiation process in order to advertise my caps */
+- SMC_SET_PHY_BMCR(phyaddr, BMCR_ANENABLE | BMCR_ANRESTART);
++ SMC_GET_PHY_BMCR(phyaddr, bmcr);
++ bmcr |= BMCR_ANENABLE | BMCR_ANRESTART;
++ SMC_SET_PHY_BMCR(phyaddr, bmcr);
+
+ smc911x_phy_check_media(dev, 1);
+
+@@ -1888,6 +1895,39 @@ static int __init smc911x_findirq(unsign
+ return probe_irq_off(cookie);
+ }
+
++static inline unsigned int is_gumstix_oui(u8 *addr)
++{
++ return (addr[0] == 0x00 && addr[1] == 0x15 && addr[2] == 0xC9);
++}
++
++/**
++ * gen_serial_ether_addr - Generate software assigned Ethernet address
++ * based on the system_serial number
++ * @addr: Pointer to a six-byte array containing the Ethernet address
++ *
++ * Generate an Ethernet address (MAC) that is not multicast
++ * and has the local assigned bit set, keyed on the system_serial
++ */
++static inline void gen_serial_ether_addr(u8 *addr)
++{
++ static u8 ether_serial_digit = 0;
++ addr [0] = system_serial_high >> 8;
++ addr [1] = system_serial_high;
++ addr [2] = system_serial_low >> 24;
++ addr [3] = system_serial_low >> 16;
++ addr [4] = system_serial_low >> 8;
++ addr [5] = (system_serial_low & 0xc0) | /* top bits are from system serial */
++ (1 << 4) | /* 2 bits identify interface type 1=ether, 2=usb, 3&4 undef */
++ ((ether_serial_digit++) & 0x0f); /* 15 possible interfaces of each type */
++
++ if(!is_gumstix_oui(addr))
++ {
++ addr [0] &= 0xfe; /* clear multicast bit */
++ addr [0] |= 0x02; /* set local assignment bit (IEEE802) */
++ }
++}
++
++
+ /*
+ * Function: smc911x_probe(unsigned long ioaddr)
+ *
+@@ -2116,15 +2156,13 @@ static int __init smc911x_probe(struct n
+ #endif
+ printk("\n");
+ if (!is_valid_ether_addr(dev->dev_addr)) {
+- printk("%s: Invalid ethernet MAC address. Please "
+- "set using ifconfig\n", dev->name);
+- } else {
+- /* Print the Ethernet address */
+- printk("%s: Ethernet addr: ", dev->name);
+- for (i = 0; i < 5; i++)
+- printk("%2.2x:", dev->dev_addr[i]);
+- printk("%2.2x\n", dev->dev_addr[5]);
++ gen_serial_ether_addr(dev->dev_addr);
+ }
++ /* Print the Ethernet address */
++ printk("%s: Ethernet addr: ", dev->name);
++ for (i = 0; i < 5; i++)
++ printk("%2.2x:", dev->dev_addr[i]);
++ printk("%2.2x\n", dev->dev_addr[5]);
+
+ if (lp->phy_type == 0) {
+ PRINTK("%s: No PHY found\n", dev->name);
+@@ -2300,8 +2338,15 @@ static struct platform_driver smc911x_dr
+ },
+ };
+
++#ifdef CONFIG_ARCH_GUMSTIX
++extern void gumstix_smc911x_load(void);
++#endif
++
+ static int __init smc911x_init(void)
+ {
++#ifdef CONFIG_ARCH_GUMSTIX
++ gumstix_smc911x_load();
++#endif
+ return platform_driver_register(&smc911x_driver);
+ }
+
+Index: linux-2.6.21gum/drivers/net/gumstix-smc911x.c
+===================================================================
+--- /dev/null
++++ linux-2.6.21gum/drivers/net/gumstix-smc911x.c
+@@ -0,0 +1,148 @@
++/*
++ * Gumstix SMC911x chip intialization driver
++ *
++ * Author: Craig Hughes
++ * Created: December 9, 2004
++ * Copyright: (C) 2004 Craig Hughes
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/ioport.h>
++#include <linux/device.h>
++#include <linux/platform_device.h>
++#include <linux/delay.h>
++
++#include <asm/hardware.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/delay.h>
++
++#include <asm/arch/gumstix.h>
++
++#define SMC_DEBUG 9
++#include <asm/io.h>
++#include "smc911x.h"
++
++static struct resource gumstix_smc911x0_resources[] = {
++ [0] = {
++ .name = "smc911x-regs",
++ .start = PXA_CS1_PHYS,
++ .end = PXA_CS1_PHYS + 0x000fffff,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = GUMSTIX_ETH0_IRQ,
++ .end = GUMSTIX_ETH0_IRQ,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct resource gumstix_smc911x1_resources[] = {
++ [0] = {
++ .name = "smc911x-regs",
++ .start = PXA_CS2_PHYS,
++ .end = PXA_CS2_PHYS + 0x000fffff,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = GUMSTIX_ETH1_IRQ,
++ .end = GUMSTIX_ETH1_IRQ,
++ .flags = IORESOURCE_IRQ,
++ },
++};
++
++static struct platform_device gumstix_smc911x0_device = {
++ .name = "smc911x",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(gumstix_smc911x0_resources),
++ .resource = gumstix_smc911x0_resources,
++};
++
++static struct platform_device gumstix_smc911x1_device = {
++ .name = "smc911x",
++ .id = 1,
++ .num_resources = ARRAY_SIZE(gumstix_smc911x1_resources),
++ .resource = gumstix_smc911x1_resources,
++};
++
++static struct platform_device *smc911x_devices[] = {
++ &gumstix_smc911x0_device,
++ &gumstix_smc911x1_device,
++};
++
++/* First we're going to test if there's a 2nd SMC911x, and if not, then we'll free up those resources and the GPIO lines
++ * that it would otherwise use. We have no choice but to probe by doing:
++ * Set nCS2 to CS2 mode
++ * Set the reset line to GPIO out mode, and pull it high, then drop it low (to trigger reset)
++ * Read from the memory space to check for the sentinel sequence identifying a likely SMC911x device
++ */
++int __init gumstix_smc911x_init(void)
++{
++ unsigned int val, num_devices=ARRAY_SIZE(smc911x_devices);
++ void *ioaddr;
++
++ /* Set up nPWE */
++ pxa_gpio_mode(GPIO49_nPWE_MD);
++
++ pxa_gpio_mode(GPIO78_nCS_2_MD);
++ // If either if statement fails, then we'll drop out and turn_off_eth1,
++ // if both succeed, then we'll skip that and just proceed with 2 cards
++ if(request_mem_region(gumstix_smc911x1_resources[1].start, SMC911X_IO_EXTENT, "smc911x probe"))
++ {
++ ioaddr = ioremap(gumstix_smc911x1_resources[1].start, SMC911X_IO_EXTENT);
++ val = SMC_GET_PN();
++ iounmap(ioaddr);
++ release_mem_region(gumstix_smc911x1_resources[1].start, SMC911X_IO_EXTENT);
++ if (CHIP_9115 == val ||
++ CHIP_9116 == val ||
++ CHIP_9117 == val ||
++ CHIP_9118 == val ) {
++ goto proceed;
++ }
++ }
++
++turn_off_eth1:
++ // This is apparently not an SMC911x
++ // So, let's decrement the number of devices to request, and reset the GPIO lines to GPIO IN mode
++ num_devices--;
++ smc911x_devices[1] = NULL;
++ pxa_gpio_mode(78 | GPIO_IN);
++
++proceed:
++ pxa_gpio_mode(GPIO15_nCS_1_MD);
++
++ if(smc911x_devices[1]) pxa_gpio_mode(GPIO_GUMSTIX_ETH1_RST_MD);
++ pxa_gpio_mode(GPIO_GUMSTIX_ETH0_RST_MD);
++
++ if(smc911x_devices[1]) GPCR(GPIO_GUMSTIX_ETH1_RST) = GPIO_bit(GPIO_GUMSTIX_ETH1_RST);
++ GPCR(GPIO_GUMSTIX_ETH0_RST) = GPIO_bit(GPIO_GUMSTIX_ETH0_RST);
++ msleep(500); // Hold RESET for at least 200µ
++
++ if(smc911x_devices[1]) GPSR(GPIO_GUMSTIX_ETH1_RST) = GPIO_bit(GPIO_GUMSTIX_ETH1_RST);
++ GPSR(GPIO_GUMSTIX_ETH0_RST) = GPIO_bit(GPIO_GUMSTIX_ETH0_RST);
++ msleep(50);
++
++ return platform_add_devices(smc911x_devices, num_devices);
++}
++
++void __exit gumstix_smc911x_exit(void)
++{
++ if(smc911x_devices[1] != NULL) platform_device_unregister(&gumstix_smc911x1_device);
++ platform_device_unregister(&gumstix_smc911x0_device);
++}
++
++void gumstix_smc911x_load(void) {}
++EXPORT_SYMBOL(gumstix_smc911x_load);
++
++module_init(gumstix_smc911x_init);
++module_exit(gumstix_smc911x_exit);
++
++MODULE_LICENSE("GPL");
++MODULE_AUTHOR("Craig Hughes <craig@gumstix.com>");
++MODULE_DESCRIPTION("Gumstix board SMC911x chip initialization driver");
++MODULE_VERSION("1:0.1");
+Index: linux-2.6.21gum/drivers/net/Kconfig
+===================================================================
+--- linux-2.6.21gum.orig/drivers/net/Kconfig
++++ linux-2.6.21gum/drivers/net/Kconfig
+@@ -897,6 +897,13 @@ config SMC911X
+ called smc911x. If you want to compile it as a module, say M
+ here and read <file:Documentation/modules.txt>
+
++config SMC911X_GUMSTIX
++ tristate
++ default m if SMC911X=m
++ default y if SMC911X=y
++ depends on SMC911X && ARCH_GUMSTIX
++
++
+ config NET_VENDOR_RACAL
+ bool "Racal-Interlan (Micom) NI cards"
+ depends on NET_ETHERNET && ISA
+Index: linux-2.6.21gum/drivers/net/Makefile
+===================================================================
+--- linux-2.6.21gum.orig/drivers/net/Makefile
++++ linux-2.6.21gum/drivers/net/Makefile
+@@ -201,6 +201,7 @@ obj-$(CONFIG_PASEMI_MAC) += pasemi_mac.o
+ obj-$(CONFIG_MACB) += macb.o
+
+ obj-$(CONFIG_SMC91X_GUMSTIX) += gumstix-smc91x.o
++obj-$(CONFIG_SMC911X_GUMSTIX) += gumstix-smc911x.o
+ obj-$(CONFIG_ARM) += arm/
+ obj-$(CONFIG_DEV_APPLETALK) += appletalk/
+ obj-$(CONFIG_TR) += tokenring/
+Index: linux-2.6.21gum/include/asm-arm/arch-pxa/gumstix.h
+===================================================================
+--- linux-2.6.21gum.orig/include/asm-arm/arch-pxa/gumstix.h
++++ linux-2.6.21gum/include/asm-arm/arch-pxa/gumstix.h
+@@ -52,7 +52,7 @@
+ #define GPIO_GUMSTIX_ETH0_RST 80
+ #define GPIO_GUMSTIX_ETH0 36
+ #else
+-#define GPIO_GUMSTIX_ETH0_RST 32
++#define GPIO_GUMSTIX_ETH0_RST 107
+ #define GPIO_GUMSTIX_ETH0 99
+ #endif
+ #define GPIO_GUMSTIX_ETH1_RST 52
+Index: linux-2.6.21gum/drivers/net/smc911x.h
+===================================================================
+--- linux-2.6.21gum.orig/drivers/net/smc911x.h
++++ linux-2.6.21gum/drivers/net/smc911x.h
+@@ -33,7 +33,9 @@
+ * Use the DMA feature on PXA chips
+ */
+ #ifdef CONFIG_ARCH_PXA
++#ifndef CONFIG_SMC911X_GUMSTIX
+ #define SMC_USE_PXA_DMA 1
++#endif
+ #define SMC_USE_16BIT 0
+ #define SMC_USE_32BIT 1
+ #endif
+@@ -46,13 +48,13 @@
+ #if SMC_USE_16BIT
+ #define SMC_inb(a, r) readb((a) + (r))
+ #define SMC_inw(a, r) readw((a) + (r))
+-#define SMC_inl(a, r) ((SMC_inw(a, r) & 0xFFFF)+(SMC_inw(a+2, r)<<16))
++#define SMC_inl(a, r) ((SMC_inw(a, r) & 0xFFFF)+(SMC_inw((a)+2, r)<<16))
+ #define SMC_outb(v, a, r) writeb(v, (a) + (r))
+ #define SMC_outw(v, a, r) writew(v, (a) + (r))
+ #define SMC_outl(v, a, r) \
+ do{ \
+- writel(v & 0xFFFF, (a) + (r)); \
+- writel(v >> 16, (a) + (r) + 2); \
++ writel((v) & 0xFFFF, (a) + (r)); \
++ writel((v) >> 16, (a) + (r) + 2); \
+ } while (0)
+ #define SMC_insl(a, r, p, l) readsw((short*)((a) + (r)), p, l*2)
+ #define SMC_outsl(a, r, p, l) writesw((short*)((a) + (r)), p, l*2)
diff --git a/packages/linux/linux-2.6.21/tsc2003-config.diff b/packages/linux/linux-2.6.21/tsc2003-config.diff
new file mode 100644
index 0000000000..ccad5ed696
--- /dev/null
+++ b/packages/linux/linux-2.6.21/tsc2003-config.diff
@@ -0,0 +1,31 @@
+--- /tmp/Kconfig 2007-10-07 14:13:14.000000000 +0200
++++ linux-2.6.21/drivers/i2c/chips/Kconfig 2007-10-07 14:13:56.902045000 +0200
+@@ -125,4 +125,18 @@
+ This driver can also be built as a module. If so, the module
+ will be called max6875.
+
++config SENSORS_TSC2003
++ tristate "TI TSC2003"
++ depends on I2C && EXPERIMENTAL
++ default n
++ help
++ Driver for TI tsc2003 touchscreen and sensor chip/
++
++config SENSORS_TSC2003_SYSFS
++ tristate "TI TSC2003 sysfs interface
++ depends on SENSORS_TSC2003
++ default n
++ help
++ Enabled the sysfs interface for tsc2003
++
+ endmenu
+--- /tmp/Makefile 2007-10-07 14:14:14.000000000 +0200
++++ linux-2.6.21/drivers/i2c/chips/Makefile 2007-10-07 14:14:20.072045000 +0200
+@@ -12,6 +12,7 @@
+ obj-$(CONFIG_SENSORS_PCF8591) += pcf8591.o
+ obj-$(CONFIG_ISP1301_OMAP) += isp1301_omap.o
+ obj-$(CONFIG_TPS65010) += tps65010.o
++obj-$(CONFIG_SENSORS_TSC2003) += tsc2003.o
+
+ ifeq ($(CONFIG_I2C_DEBUG_CHIP),y)
+ EXTRA_CFLAGS += -DDEBUG
diff --git a/packages/linux/linux-2.6.21/tsc2003.c b/packages/linux/linux-2.6.21/tsc2003.c
new file mode 100644
index 0000000000..8d7e5b3f78
--- /dev/null
+++ b/packages/linux/linux-2.6.21/tsc2003.c
@@ -0,0 +1,557 @@
+/*
+ * linux/drivers/i2c/chips/tsc2003.c
+ *
+ * Copyright (C) 2005 Bill Gatliff <bgat at billgatliff.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Driver for TI's TSC2003 I2C Touch Screen Controller
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/i2c.h>
+#include <linux/string.h>
+#include <linux/bcd.h>
+#include <linux/list.h>
+#include <linux/device.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/input.h>
+#include <linux/platform_device.h>
+#include <asm/delay.h>
+#include <linux/delay.h>
+
+#include <asm/arch/gpio.h>
+
+#define DRIVER_NAME "tsc2003"
+
+enum tsc2003_pd {
+ PD_POWERDOWN = 0, /* penirq */
+ PD_IREFOFF_ADCON = 1, /* no penirq */
+ PD_IREFON_ADCOFF = 2, /* penirq */
+ PD_IREFON_ADCON = 3, /* no penirq */
+ PD_PENIRQ_ARM = PD_IREFON_ADCOFF,
+ PD_PENIRQ_DISARM = PD_IREFON_ADCON,
+};
+
+enum tsc2003_m {
+ M_12BIT = 0,
+ M_8BIT = 1
+};
+
+enum tsc2003_cmd {
+ MEAS_TEMP0 = 0,
+ MEAS_VBAT1 = 1,
+ MEAS_IN1 = 2,
+ MEAS_TEMP1 = 4,
+ MEAS_VBAT2 = 5,
+ MEAS_IN2 = 6,
+ ACTIVATE_NX_DRIVERS = 8,
+ ACTIVATE_NY_DRIVERS = 9,
+ ACTIVATE_YNX_DRIVERS = 10,
+ MEAS_XPOS = 12,
+ MEAS_YPOS = 13,
+ MEAS_Z1POS = 14,
+ MEAS_Z2POS = 15
+};
+
+#define TSC2003_CMD(cn,pdn,m) (((cn) << 4) | ((pdn) << 2) | ((m) << 1))
+
+#define ADC_MAX ((1 << 12) - 1)
+
+struct tsc2003_data {
+ struct i2c_client *client;
+ struct input_dev *idev;
+ struct timer_list penirq_timer;
+ struct semaphore sem;
+ struct task_struct *tstask;
+ struct completion tstask_completion;
+ enum tsc2003_pd pd;
+ enum tsc2003_m m;
+ int vbat1;
+ int vbat2;
+ int temp0;
+ int temp1;
+ int in1;
+ int in2;
+};
+
+static int tsc2003_i2c_detect (struct i2c_adapter *adapter, int address,
+ int kind);
+
+static inline int tsc2003_command (struct tsc2003_data *data,
+ enum tsc2003_cmd cmd,
+ enum tsc2003_pd pd)
+{
+ char c;
+ int ret;
+ down(&data->sem);
+ c = TSC2003_CMD(cmd, pd, data->m);
+ ret = i2c_master_send(data->client, &c, 1);
+ up(&data->sem);
+ return ret;
+}
+
+static int tsc2003_read (struct tsc2003_data *data,
+ enum tsc2003_cmd cmd,
+ enum tsc2003_pd pd,
+ int *val)
+{
+ char c;
+ char d[2];
+ int ret;
+
+ c = TSC2003_CMD(cmd, pd, data->m);
+ ret = i2c_master_send(data->client, &c, 1);
+
+ udelay(20);
+ ret = i2c_master_recv(data->client, d, data->m == M_12BIT ? 2 : 1);
+
+ if (val)
+ {
+ *val = d[0];
+ *val <<= 4;
+ if (data->m == M_12BIT)
+ *val += (d[1] >> 4);
+ }
+
+#if defined(CONFIG_I2C_DEBUG_CHIP)
+ printk(KERN_ERR "%s: val[%x] = %d\n",
+ __FUNCTION__, cmd, (((int)d[0]) << 8) + d[1]);
+#endif
+
+ return 0;
+ if (!ret) ret = -ENODEV;
+ return ret;
+}
+
+static inline int tsc2003_read_temp0 (struct tsc2003_data *d, enum
+ tsc2003_pd pd, int *t)
+{
+ return tsc2003_read(d, MEAS_TEMP0, pd, t);
+}
+
+static inline int tsc2003_read_temp1 (struct tsc2003_data *d, enum
+ tsc2003_pd pd, int *t)
+{
+ return tsc2003_read(d, MEAS_TEMP1, pd, t);
+}
+
+static inline int tsc2003_read_xpos (struct tsc2003_data *d, enum
+ tsc2003_pd pd, int *x)
+{
+ return tsc2003_read(d, MEAS_XPOS, pd, x);
+}
+
+static inline int tsc2003_read_ypos (struct tsc2003_data *d, enum
+ tsc2003_pd pd, int *y)
+{
+ return tsc2003_read(d, MEAS_YPOS, pd, y);
+}
+
+static inline int tsc2003_read_pressure (struct tsc2003_data *d, enum
+ tsc2003_pd pd, int *p)
+{
+ return tsc2003_read(d, MEAS_Z1POS, pd, p);
+}
+
+static inline int tsc2003_read_in1 (struct tsc2003_data *d, enum
+ tsc2003_pd pd, int *t)
+{
+ return tsc2003_read(d, MEAS_IN1, pd, t);
+}
+
+static inline int tsc2003_read_in2 (struct tsc2003_data *d, enum
+ tsc2003_pd pd, int *t)
+{
+ return tsc2003_read(d, MEAS_IN2, pd, t);
+}
+
+static inline int tsc2003_read_vbat1 (struct tsc2003_data *d, enum
+ tsc2003_pd pd, int *t)
+{
+ return tsc2003_read(d, MEAS_VBAT1, pd, t);
+}
+
+static inline int tsc2003_read_vbat2 (struct tsc2003_data *d, enum
+ tsc2003_pd pd, int *t)
+{
+ return tsc2003_read(d, MEAS_VBAT2, pd, t);
+}
+
+static inline int tsc2003_powerdown (struct tsc2003_data *d)
+{
+ /* we don't have a distinct powerdown command,
+ so do a benign read with the PD bits cleared */
+ return tsc2003_read(d, MEAS_IN1, PD_POWERDOWN, 0);
+}
+
+void tsc2003_init_client (struct i2c_client *client)
+{
+ struct tsc2003_data *data = i2c_get_clientdata(client);
+
+ data->pd = PD_PENIRQ_DISARM;
+ data->m = M_8BIT;
+ return;
+}
+
+static int tsc2003ts_thread (void *v)
+{
+ struct tsc2003_data *d = v;
+ struct task_struct *tsk = current;
+ int pendown=0;
+
+ d->tstask = tsk;
+
+ daemonize(DRIVER_NAME "tsd");
+ allow_signal(SIGKILL);
+
+ complete(&d->tstask_completion);
+
+ printk(KERN_INFO "%s: address 0x%x\n",
+ __FUNCTION__, d->client->addr);
+
+ while (!signal_pending(tsk))
+ {
+ unsigned int x, y, p;
+
+ tsc2003_read_xpos(d, PD_PENIRQ_DISARM, &x);
+ tsc2003_read_ypos(d, PD_PENIRQ_DISARM, &y);
+ tsc2003_read_pressure(d, PD_PENIRQ_DISARM, &p);
+
+ /* non-X-Y driver read to avoid glitch in penirq (errata?) */
+ if (p > 100) {
+ pendown = 1;
+ input_report_abs(d->idev, ABS_X, x);
+ input_report_abs(d->idev, ABS_Y, y);
+ input_report_abs(d->idev, ABS_PRESSURE, p);
+ input_report_key(d->idev, BTN_TOUCH, 1);
+ input_sync(d->idev);
+ } else if (pendown == 1) {
+ pendown = 0;
+ input_report_key(d->idev, BTN_TOUCH, 0);
+ input_report_abs(d->idev, ABS_PRESSURE, 0);
+ input_sync(d->idev);
+ }
+ schedule_timeout_interruptible(msecs_to_jiffies(10));
+ }
+
+ d->tstask = NULL;
+ complete_and_exit(&d->tstask_completion, 0);
+}
+
+static int tsc2003_idev_open (struct input_dev *idev)
+{
+ struct tsc2003_data *d = idev->private;
+ int ret = 0;
+
+ if (down_interruptible(&d->sem))
+ return -EINTR;
+
+ if (d->tstask)
+ panic(DRIVER_NAME "tsd already running (!). abort.");
+
+ init_completion(&d->tstask_completion);
+
+ ret = kernel_thread(tsc2003ts_thread, d, CLONE_KERNEL);
+ if (ret >= 0) {
+ wait_for_completion(&d->tstask_completion);
+ ret = 0;
+ }
+
+ up(&d->sem);
+
+ return ret;
+}
+
+static void tsc2003_idev_close (struct input_dev *idev)
+{
+ struct tsc2003_data *d = idev->private;
+ down_interruptible(&d->sem);
+ if (d->tstask)
+ {
+ send_sig(SIGKILL, d->tstask, 1);
+ wait_for_completion(&d->tstask_completion);
+ }
+ up(&d->sem);
+ return;
+}
+
+#if defined(CONFIG_SYSFS) && defined(CONFIG_SENSORS_TSC2003_SYSFS)
+static ssize_t show_addr (struct device *dev, char *buf)
+{
+ struct tsc2003_data *d = container_of(dev->driver, struct
+ tsc2003_data, driver);
+ return sprintf(buf, "%d\n", d->client.addr);
+}
+static DEVICE_ATTR(addr, S_IRUGO, show_addr, NULL);
+
+static ssize_t show_vbat1 (struct device *dev, char *buf)
+{
+ struct tsc2003_data *d = container_of(dev->driver, struct
+ tsc2003_data, driver);
+ return sprintf(buf, "%d\n", d->vbat1);
+}
+static DEVICE_ATTR(vbat1, S_IRUGO, show_vbat1, NULL);
+
+static ssize_t show_vbat2 (struct device *dev, char *buf)
+{
+ struct tsc2003_data *d = container_of(dev->driver, struct
+ tsc2003_data, driver);
+ return sprintf(buf, "%d\n", d->vbat2);
+}
+static DEVICE_ATTR(vbat2, S_IRUGO, show_vbat2, NULL);
+
+static ssize_t show_in1 (struct device *dev, char *buf)
+{
+ struct tsc2003_data *d = container_of(dev->driver, struct
+ tsc2003_data, driver);
+ return sprintf(buf, "%d\n", d->in1);
+}
+static DEVICE_ATTR(in1, S_IRUGO, show_in1, NULL);
+
+static ssize_t show_in2 (struct device *dev, char *buf)
+{
+ struct tsc2003_data *d = container_of(dev->driver, struct
+ tsc2003_data, driver);
+ return sprintf(buf, "%d\n", d->in2);
+}
+static DEVICE_ATTR(in2, S_IRUGO, show_in2, NULL);
+
+static ssize_t show_temp0 (struct device *dev, char *buf)
+{
+ struct tsc2003_data *d = container_of(dev->driver, struct
+ tsc2003_data, driver);
+ return sprintf(buf, "%d\n", d->temp0);
+}
+static DEVICE_ATTR(temp0, S_IRUGO, show_temp0, NULL);
+
+static ssize_t show_temp1 (struct device *dev, char *buf)
+{
+ struct tsc2003_data *d = container_of(dev->driver, struct
+ tsc2003_data, driver);
+ return sprintf(buf, "%d\n", d->temp1);
+}
+static DEVICE_ATTR(temp1, S_IRUGO, show_temp1, NULL);
+
+#warning "TODO: this daemon sometimes hangs the touchscreen daemon"
+#warning "TODO: under periods of heavy touch screen activity."
+#warning "TODO: Use with caution until the bug is squashed."
+static int tsc2003s_thread (void *v)
+{
+ struct tsc2003_data *d = v;
+
+ daemonize(DRIVER_NAME "sd");
+ allow_signal(SIGKILL);
+
+ printk(KERN_INFO "%s: address 0x%x\n",
+ __FUNCTION__, d->client.addr);
+
+ while (!signal_pending(current))
+ {
+ if (!down_interruptible(&d->sem))
+ {
+ if (!timer_pending(&d->penirq_timer))
+ {
+ tsc2003_read_vbat1(d, d->pd, &d->vbat1);
+ tsc2003_read_vbat2(d, d->pd, &d->vbat2);
+ tsc2003_read_in1(d, d->pd, &d->in1);
+ tsc2003_read_in2(d, d->pd, &d->in2);
+ tsc2003_read_temp0(d, d->pd, &d->temp0);
+ tsc2003_read_temp1(d, d->pd, &d->temp1);
+ }
+ up(&d->sem);
+ }
+ set_task_state(current, TASK_INTERRUPTIBLE);
+ schedule_timeout(5 * HZ);
+ }
+ do_exit(0);
+}
+#endif
+
+static int tsc2003_driver_register (struct tsc2003_data *data)
+{
+ int ret = 0;
+
+ init_MUTEX(&data->sem);
+
+ data->idev = input_allocate_device();
+ if(!data->idev)
+ {
+ return -ENOMEM;
+ }
+ data->idev->private = data;
+ data->idev->name = DRIVER_NAME;
+ data->idev->evbit[0] = BIT(EV_ABS);
+ data->idev->open = tsc2003_idev_open;
+ data->idev->close = tsc2003_idev_close;
+ data->idev->absbit[LONG(ABS_X)] = BIT(ABS_X);
+ data->idev->absbit[LONG(ABS_Y)] = BIT(ABS_Y);
+ data->idev->absbit[LONG(ABS_PRESSURE)] = BIT(ABS_PRESSURE);
+ input_set_abs_params(data->idev, ABS_X, 0, ADC_MAX, 0, 0);
+ input_set_abs_params(data->idev, ABS_Y, 0, ADC_MAX, 0, 0);
+
+ ret = input_register_device(data->idev);
+ if(ret)
+ {
+ input_free_device(data->idev);
+ return ret;
+ }
+ return ret;
+}
+
+/* Magic definition of all other variables and things */
+static unsigned short normal_i2c[] = {0x48, 0x49, 0x4a, 0x48b, I2C_CLIENT_END };
+
+I2C_CLIENT_INSMOD;
+
+static int tsc2003_i2c_attach_adapter(struct i2c_adapter *adapter)
+{
+ return i2c_probe(adapter, &addr_data, tsc2003_i2c_detect);
+}
+
+static int tsc2003_i2c_detach_client(struct i2c_client *client)
+{
+ struct tsc2003_data *data=i2c_get_clientdata(client);
+ int err;
+
+ input_unregister_device(data->idev);
+
+ err = i2c_detach_client(client);
+ if (err) {
+ dev_err(&client->dev, "Client deregistration failed, "
+ "client not detached.\n");
+ return err;
+ }
+
+ return 0;
+}
+
+static struct i2c_driver tsc2003_i2c_driver = {
+ .driver = {
+ .owner = THIS_MODULE,
+ .name = DRIVER_NAME,
+ },
+ .attach_adapter = tsc2003_i2c_attach_adapter,
+ .detach_client = tsc2003_i2c_detach_client,
+ .command = NULL
+};
+
+static struct i2c_client client_template = {
+ .name = "TSC2003",
+ .driver = &tsc2003_i2c_driver,
+};
+
+static int tsc2003_i2c_detect (struct i2c_adapter *adap, int addr,
+ int kind)
+{
+ struct i2c_client *i2c;
+ int ret;
+ struct tsc2003_data *data;
+
+ client_template.adapter = adap;
+ client_template.addr = addr;
+
+ printk(KERN_INFO "tsc2003 i2c touch screen controller\n");
+ printk(KERN_INFO "Bill Gatliff <bgat at billgatliff.com>\n");
+
+ i2c = kmemdup(&client_template, sizeof(client_template), GFP_KERNEL);
+ if (i2c == NULL){
+ return -ENOMEM;
+ }
+
+ data = kcalloc(1, sizeof(*data), GFP_KERNEL);
+ if (!data) {
+ ret = -ENOMEM;
+ goto err;
+ }
+ data->client = i2c;
+ i2c_set_clientdata(i2c, data);
+
+ ret = i2c_attach_client(i2c);
+
+ if (ret < 0) {
+ printk("failed to attach codec at addr %x\n", addr);
+ goto err;
+ }
+
+ tsc2003_init_client(i2c);
+
+ tsc2003_powerdown(data);
+
+ ret = tsc2003_driver_register(data);
+ if(ret < 0) {
+ printk("driver_register failed\n");
+ goto err;
+ }
+
+ return ret;
+
+err:
+ kfree(i2c);
+ return ret;
+}
+
+#define tsc2003_suspend NULL
+#define tsc2003_resume NULL
+
+static int __devinit tsc2003_probe(struct platform_device *dev)
+{
+ int ret;
+
+ ret=i2c_add_driver(&tsc2003_i2c_driver);
+ if(ret)
+ return ret;
+
+#if defined(CONFIG_SYSFS) && defined(CONFIG_SENSORS_TSC2003_SYSFS)
+ ret = kernel_thread(tsc2003s_thread, d, CLONE_KERNEL);
+ if (ret >= 0)
+ ret = 0;
+
+ device_create_file(dev, &dev_attr_addr);
+ device_create_file(dev, &dev_attr_vbat1);
+ device_create_file(dev, &dev_attr_vbat2);
+ device_create_file(dev, &dev_attr_in1);
+ device_create_file(dev, &dev_attr_in2);
+ device_create_file(dev, &dev_attr_temp0);
+ device_create_file(dev, &dev_attr_temp1);
+#endif
+ return 0;
+}
+
+static int __devexit tsc2003_remove(struct platform_device *dev)
+{
+ i2c_del_driver(&tsc2003_i2c_driver);
+ return 0;
+}
+
+static struct platform_driver tsc2003_driver = {
+ .probe = tsc2003_probe,
+ .remove = __devexit_p(tsc2003_remove),
+ .suspend = tsc2003_suspend,
+ .resume = tsc2003_resume,
+ .driver = {
+ .name = "tsc2003",
+ },
+};
+
+static int __init tsc2003_init(void)
+{
+ return platform_driver_register(&tsc2003_driver);
+}
+
+static void __exit tsc2003_exit(void)
+{
+ platform_driver_unregister(&tsc2003_driver);
+}
+
+MODULE_AUTHOR("Bill Gatliff <bgat at billgatliff.com>");
+MODULE_DESCRIPTION("TSC2003 Touch Screen Controller driver");
+MODULE_LICENSE("GPL");
+
+module_init(tsc2003_init);
+module_exit(tsc2003_exit);
diff --git a/packages/linux/linux-2.6.22/.mtn2git_empty b/packages/linux/linux-2.6.22/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-2.6.22/.mtn2git_empty
diff --git a/packages/linux/linux-2.6.22/bd-neon/.mtn2git_empty b/packages/linux/linux-2.6.22/bd-neon/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-2.6.22/bd-neon/.mtn2git_empty
diff --git a/packages/linux/linux-2.6.22/bd-neon/defconfig b/packages/linux/linux-2.6.22/bd-neon/defconfig
new file mode 100644
index 0000000000..9bd82a5e2d
--- /dev/null
+++ b/packages/linux/linux-2.6.22/bd-neon/defconfig
@@ -0,0 +1,1326 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.19.2
+# Thu May 24 16:14:49 2007
+#
+CONFIG_ARM=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ARCH_MTD_XIP=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+# CONFIG_SWAP is not set
+# CONFIG_SYSVIPC is not set
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_ALL is not set
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# 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_IOP32X is not set
+# CONFIG_ARCH_IOP33X is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PNX4008 is not set
+CONFIG_ARCH_PXA=y
+# 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_OMAP is not set
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_MACH_ARGON is not set
+CONFIG_MACH_NEON=y
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+CONFIG_PXA25x=y
+
+#
+# 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 is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+# CONFIG_PREEMPT is not set
+# CONFIG_NO_IDLE_HZ is not set
+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_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=""
+# CONFIG_XIP_KERNEL is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_ARTHUR is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+# CONFIG_APM is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+# CONFIG_XFRM_USER is not set
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+CONFIG_IEEE80211=y
+CONFIG_IEEE80211_DEBUG=y
+CONFIG_IEEE80211_CRYPT_WEP=y
+CONFIG_IEEE80211_CRYPT_CCMP=y
+CONFIG_IEEE80211_CRYPT_TKIP=y
+CONFIG_IEEE80211_SOFTMAC=y
+CONFIG_IEEE80211_SOFTMAC_DEBUG=y
+CONFIG_WIRELESS_EXT=y
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_FW_LOADER=y
+# CONFIG_DEBUG_DRIVER is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+CONFIG_CONNECTOR=y
+# CONFIG_PROC_EVENTS is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+# CONFIG_MTD_BLOCK is not set
+CONFIG_MTD_BLOCK_RO=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+CONFIG_MTD_CFI_AMDSTD=y
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x0
+CONFIG_MTD_PHYSMAP_LEN=0x2000000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=4
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# 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
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+CONFIG_BLK_DEV_INITRD=y
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Serial ATA (prod) and Parallel ATA (experimental) drivers
+#
+# CONFIG_ATA is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+CONFIG_SMC91X=y
+# CONFIG_DM9000 is not set
+# CONFIG_SMC911X is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+CONFIG_NET_WIRELESS_RTNETLINK=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_HOSTAP is not set
+CONFIG_ZD1211RW=m
+# CONFIG_ZD1211RW_DEBUG is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+CONFIG_INPUT_JOYSTICK=y
+# CONFIG_JOYSTICK_ANALOG is not set
+# CONFIG_JOYSTICK_A3D is not set
+# CONFIG_JOYSTICK_ADI is not set
+# CONFIG_JOYSTICK_COBRA is not set
+# CONFIG_JOYSTICK_GF2K is not set
+# CONFIG_JOYSTICK_GRIP is not set
+# CONFIG_JOYSTICK_GRIP_MP is not set
+# CONFIG_JOYSTICK_GUILLEMOT is not set
+# CONFIG_JOYSTICK_INTERACT is not set
+# CONFIG_JOYSTICK_SIDEWINDER is not set
+# CONFIG_JOYSTICK_TMDC is not set
+# CONFIG_JOYSTICK_IFORCE is not set
+# CONFIG_JOYSTICK_WARRIOR is not set
+# CONFIG_JOYSTICK_MAGELLAN is not set
+# CONFIG_JOYSTICK_SPACEORB is not set
+# CONFIG_JOYSTICK_SPACEBALL is not set
+# CONFIG_JOYSTICK_STINGER is not set
+# CONFIG_JOYSTICK_TWIDJOY is not set
+# CONFIG_JOYSTICK_JOYDUMP is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_PXA_GPIO=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_NOWAYOUT=y
+
+#
+# Watchdog Device Drivers
+#
+# CONFIG_SOFT_WATCHDOG is not set
+CONFIG_SA1100_WATCHDOG=y
+# CONFIG_SA1100_WATCHDOG_TICK is not set
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# SPI support
+#
+# CONFIG_SPI is not set
+# CONFIG_SPI_MASTER is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+
+#
+# Hardware Monitoring support
+#
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_F71805F is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Misc devices
+#
+CONFIG_BD_GENTIMER=y
+# CONFIG_TIFM_CORE is not set
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+# CONFIG_USB_DABUSB is not set
+
+#
+# Graphics support
+#
+CONFIG_FIRMWARE_EDID=y
+CONFIG_FB=y
+# CONFIG_FB_CFB_FILLRECT is not set
+# CONFIG_FB_CFB_COPYAREA is not set
+# CONFIG_FB_CFB_IMAGEBLIT is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_PXA is not set
+# CONFIG_FB_MBX is not set
+CONFIG_FB_SM501=y
+CONFIG_FB_SM501MEM=y
+CONFIG_FB_SM501YUV=y
+CONFIG_FB_SM501ALPHA=y
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FONTS=y
+# CONFIG_FONT_8x8 is not set
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_7x14 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+# CONFIG_FONT_10x18 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+# CONFIG_SND_SEQUENCER is not set
+CONFIG_SND_OSSEMUL=y
+CONFIG_SND_MIXER_OSS=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_PCM_OSS_PLUGINS=y
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SND_DEBUG=y
+# CONFIG_SND_DEBUG_DETECT is not set
+# CONFIG_SND_PCM_XRUN_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=y
+CONFIG_SND_AC97_BUS=y
+# 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
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=y
+CONFIG_SND_PXA2XX_AC97=y
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# Multimedia Capabilities Port drivers
+#
+CONFIG_UCB1400_TS=y
+# CONFIG_UCB1400_TS_FIVE_WIRE is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_BANDWIDTH is not set
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_ISP116X_HCD is not set
+CONFIG_USB_OHCI_SM501=y
+# CONFIG_USB_SL811_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+CONFIG_USB_PRINTER=y
+
+#
+# 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 is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+CONFIG_USB_LIBUSUAL=y
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+CONFIG_USB_HIDINPUT=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+CONFIG_USB_HIDDEV=y
+# CONFIG_USB_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_ACECAD is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+# CONFIG_USB_TOUCHSCREEN is not set
+# CONFIG_USB_YEALINK is not set
+# CONFIG_USB_XPAD is not set
+# CONFIG_USB_ATI_REMOTE is not set
+# CONFIG_USB_ATI_REMOTE2 is not set
+# CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+CONFIG_USB_PEGASUS=y
+CONFIG_USB_RTL8150=y
+# CONFIG_USB_USBNET_MII is not set
+# CONFIG_USB_USBNET 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 is not set
+# CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ARK3116 is not set
+# CONFIG_USB_SERIAL_BELKIN is not set
+# CONFIG_USB_SERIAL_WHITEHEAT is not set
+# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
+# CONFIG_USB_SERIAL_CP2101 is not set
+# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
+# CONFIG_USB_SERIAL_EMPEG is not set
+# CONFIG_USB_SERIAL_FTDI_SIO is not set
+# CONFIG_USB_SERIAL_FUNSOFT is not set
+# CONFIG_USB_SERIAL_VISOR is not set
+# CONFIG_USB_SERIAL_IPAQ is not set
+# CONFIG_USB_SERIAL_IR is not set
+# CONFIG_USB_SERIAL_EDGEPORT is not set
+# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
+# CONFIG_USB_SERIAL_GARMIN is not set
+# CONFIG_USB_SERIAL_IPW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
+CONFIG_USB_SERIAL_KEYSPAN=m
+# CONFIG_USB_SERIAL_KEYSPAN_MPR is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28 is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+# CONFIG_USB_SERIAL_KEYSPAN_USA18X is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QW is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA19QI is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49W is not set
+# CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set
+# CONFIG_USB_SERIAL_KLSI is not set
+# CONFIG_USB_SERIAL_KOBIL_SCT is not set
+# CONFIG_USB_SERIAL_MCT_U232 is not set
+# CONFIG_USB_SERIAL_MOS7720 is not set
+# CONFIG_USB_SERIAL_MOS7840 is not set
+# CONFIG_USB_SERIAL_NAVMAN is not set
+# CONFIG_USB_SERIAL_PL2303 is not set
+# CONFIG_USB_SERIAL_HP4X is not set
+# CONFIG_USB_SERIAL_SAFE is not set
+# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
+# CONFIG_USB_SERIAL_TI is not set
+# CONFIG_USB_SERIAL_CYBERJACK is not set
+# CONFIG_USB_SERIAL_XIRCOM is not set
+# CONFIG_USB_SERIAL_OPTION is not set
+# CONFIG_USB_SERIAL_OMNINET is not set
+CONFIG_USB_EZUSB=y
+CONFIG_AT91SAM7X=m
+CONFIG_AT91SAM7X_SERIAL=m
+CONFIG_AT91SAM7X_FLASH=m
+CONFIG_AT91SAM7X_FRAM=m
+CONFIG_AT91SAM7X_ETHER=m
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+CONFIG_USB_GADGET_PXA2XX=y
+CONFIG_USB_PXA2XX=y
+CONFIG_USB_PXA2XX_SMALL=y
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+# CONFIG_USB_ZERO is not set
+# CONFIG_USB_ETH is not set
+# CONFIG_USB_GADGETFS is not set
+# CONFIG_USB_FILE_STORAGE is not set
+CONFIG_USB_G_SERIAL=y
+# CONFIG_USB_MIDI_GADGET is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_PXA=y
+# CONFIG_MMC_TIFM_SD is not set
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# 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_JFFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+CONFIG_JFFS2_SUMMARY=y
+CONFIG_CRAMFS=y
+# 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=y
+# CONFIG_NFS_V3 is not set
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+# CONFIG_RPCSEC_GSS_KRB5 is not set
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# Profiling support
+#
+CONFIG_PROFILING=y
+CONFIG_OPROFILE=y
+
+#
+# Kernel hacking
+#
+CONFIG_PRINTK_TIME=y
+CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_KERNEL=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_DETECT_SOFTLOCKUP=y
+# CONFIG_SCHEDSTATS is not set
+# CONFIG_DEBUG_SLAB is not set
+# CONFIG_DEBUG_RT_MUTEXES is not set
+# CONFIG_RT_MUTEX_TESTER is not set
+CONFIG_DEBUG_SPINLOCK=y
+CONFIG_DEBUG_MUTEXES=y
+CONFIG_DEBUG_RWSEMS=y
+CONFIG_DEBUG_SPINLOCK_SLEEP=y
+# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
+# CONFIG_DEBUG_KOBJECT is not set
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_FS is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_LIST is not set
+CONFIG_FRAME_POINTER=y
+CONFIG_FORCED_INLINING=y
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_RCU_TORTURE_TEST is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEBUG_WAITQ=y
+CONFIG_DEBUG_ERRORS=y
+CONFIG_DEBUG_LL=y
+# CONFIG_DEBUG_ICEDCC is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=y
+CONFIG_CRYPTO_BLKCIPHER=y
+CONFIG_CRYPTO_MANAGER=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+CONFIG_CRYPTO_ECB=y
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=y
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=y
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+CONFIG_CRYPTO_MICHAEL_MIC=y
+CONFIG_CRYPTO_CRC32C=y
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_PLIST=y
diff --git a/packages/linux/linux-2.6.22/cm-x270/.mtn2git_empty b/packages/linux/linux-2.6.22/cm-x270/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-2.6.22/cm-x270/.mtn2git_empty
diff --git a/packages/linux/compulab-pxa270-2.6.22/0001-cm-x270-base2.patch b/packages/linux/linux-2.6.22/cm-x270/0001-cm-x270-base2.patch
index 9a635c5cbc..9a635c5cbc 100644
--- a/packages/linux/compulab-pxa270-2.6.22/0001-cm-x270-base2.patch
+++ b/packages/linux/linux-2.6.22/cm-x270/0001-cm-x270-base2.patch
diff --git a/packages/linux/compulab-pxa270-2.6.22/0002-cm-x270-match-type.patch b/packages/linux/linux-2.6.22/cm-x270/0002-cm-x270-match-type.patch
index 68da30191c..68da30191c 100644
--- a/packages/linux/compulab-pxa270-2.6.22/0002-cm-x270-match-type.patch
+++ b/packages/linux/linux-2.6.22/cm-x270/0002-cm-x270-match-type.patch
diff --git a/packages/linux/compulab-pxa270-2.6.22/0003-cm-x270-ide.patch b/packages/linux/linux-2.6.22/cm-x270/0003-cm-x270-ide.patch
index 0ff115efc8..0ff115efc8 100644
--- a/packages/linux/compulab-pxa270-2.6.22/0003-cm-x270-ide.patch
+++ b/packages/linux/linux-2.6.22/cm-x270/0003-cm-x270-ide.patch
diff --git a/packages/linux/compulab-pxa270-2.6.22/0004-cm-x270-it8152.patch b/packages/linux/linux-2.6.22/cm-x270/0004-cm-x270-it8152.patch
index 274eaf24d8..274eaf24d8 100644
--- a/packages/linux/compulab-pxa270-2.6.22/0004-cm-x270-it8152.patch
+++ b/packages/linux/linux-2.6.22/cm-x270/0004-cm-x270-it8152.patch
diff --git a/packages/linux/compulab-pxa270-2.6.22/0005-cm-x270-pcmcia.patch b/packages/linux/linux-2.6.22/cm-x270/0005-cm-x270-pcmcia.patch
index 7dceff5c9d..7dceff5c9d 100644
--- a/packages/linux/compulab-pxa270-2.6.22/0005-cm-x270-pcmcia.patch
+++ b/packages/linux/linux-2.6.22/cm-x270/0005-cm-x270-pcmcia.patch
diff --git a/packages/linux/compulab-pxa270-2.6.22/0006-ramdisk_load.patch b/packages/linux/linux-2.6.22/cm-x270/0006-ramdisk_load.patch
index aa25dd9bfc..aa25dd9bfc 100644
--- a/packages/linux/compulab-pxa270-2.6.22/0006-ramdisk_load.patch
+++ b/packages/linux/linux-2.6.22/cm-x270/0006-ramdisk_load.patch
diff --git a/packages/linux/compulab-pxa270-2.6.22/0007-mmcsd_large_cards-r0.patch b/packages/linux/linux-2.6.22/cm-x270/0007-mmcsd_large_cards-r0.patch
index 90e66b5308..90e66b5308 100644
--- a/packages/linux/compulab-pxa270-2.6.22/0007-mmcsd_large_cards-r0.patch
+++ b/packages/linux/linux-2.6.22/cm-x270/0007-mmcsd_large_cards-r0.patch
diff --git a/packages/linux/compulab-pxa270-2.6.22/0008-cm-x270-nand-simplify-name.patch b/packages/linux/linux-2.6.22/cm-x270/0008-cm-x270-nand-simplify-name.patch
index c07f049e56..c07f049e56 100644
--- a/packages/linux/compulab-pxa270-2.6.22/0008-cm-x270-nand-simplify-name.patch
+++ b/packages/linux/linux-2.6.22/cm-x270/0008-cm-x270-nand-simplify-name.patch
diff --git a/packages/linux/compulab-pxa270-2.6.22/0009-cursor-fix.patch b/packages/linux/linux-2.6.22/cm-x270/0009-cursor-fix.patch
index 08b0db36b0..08b0db36b0 100644
--- a/packages/linux/compulab-pxa270-2.6.22/0009-cursor-fix.patch
+++ b/packages/linux/linux-2.6.22/cm-x270/0009-cursor-fix.patch
diff --git a/packages/linux/compulab-pxa270-2.6.22/defconfig b/packages/linux/linux-2.6.22/cm-x270/defconfig
index 63bc69533f..63bc69533f 100644
--- a/packages/linux/compulab-pxa270-2.6.22/defconfig
+++ b/packages/linux/linux-2.6.22/cm-x270/defconfig
diff --git a/packages/linux/linux-2.6.23/.mtn2git_empty b/packages/linux/linux-2.6.23/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-2.6.23/.mtn2git_empty
diff --git a/packages/linux/linux-2.6.23/binutils-buildid-arm.patch b/packages/linux/linux-2.6.23/binutils-buildid-arm.patch
new file mode 100644
index 0000000000..68e35e89e1
--- /dev/null
+++ b/packages/linux/linux-2.6.23/binutils-buildid-arm.patch
@@ -0,0 +1,16 @@
+---
+ arch/arm/kernel/vmlinux.lds.S | 1 +
+ 1 file changed, 1 insertion(+)
+
+Index: linux-2.6.22/arch/arm/kernel/vmlinux.lds.S
+===================================================================
+--- linux-2.6.22.orig/arch/arm/kernel/vmlinux.lds.S 2007-09-11 18:32:29.000000000 +0200
++++ linux-2.6.22/arch/arm/kernel/vmlinux.lds.S 2007-09-11 18:33:42.000000000 +0200
+@@ -94,6 +94,7 @@
+ TEXT_TEXT
+ SCHED_TEXT
+ LOCK_TEXT
++ *(.note.*)
+ #ifdef CONFIG_MMU
+ *(.fixup)
+ #endif
diff --git a/packages/linux/linux-2.6.23/cm-x270/.mtn2git_empty b/packages/linux/linux-2.6.23/cm-x270/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-2.6.23/cm-x270/.mtn2git_empty
diff --git a/packages/linux/linux-2.6.23/cm-x270/0001-cm-x270-base2.patch b/packages/linux/linux-2.6.23/cm-x270/0001-cm-x270-base2.patch
new file mode 100644
index 0000000000..dc68ce9d43
--- /dev/null
+++ b/packages/linux/linux-2.6.23/cm-x270/0001-cm-x270-base2.patch
@@ -0,0 +1,2851 @@
+From 299199b0cf17d0247a58af6ccd6cf6b859c60e9a Mon Sep 17 00:00:00 2001
+From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
+Date: Fri, 20 Jul 2007 18:55:59 -0400
+Subject: [PATCH] cm-x270-base2
+
+---
+ arch/arm/Kconfig | 8 +-
+ arch/arm/configs/cm_x270_defconfig | 1567 +++++++++++++++++++++++++++++++++++
+ arch/arm/mach-pxa/Kconfig | 6 +
+ arch/arm/mach-pxa/Makefile | 7 +
+ arch/arm/mach-pxa/cm-x270.c | 821 ++++++++++++++++++
+ drivers/leds/Kconfig | 6 +
+ drivers/leds/Makefile | 1 +
+ drivers/leds/leds-cm-x270.c | 126 +++
+ drivers/net/Kconfig | 8 +
+ drivers/net/dm9000.c | 6 +
+ include/asm-arm/arch-pxa/cm-x270.h | 71 ++
+ include/asm-arm/arch-pxa/hardware.h | 11 +
+ include/asm-arm/arch-pxa/irqs.h | 20 +
+ include/asm-arm/memory.h | 10 +
+ 14 files changed, 2667 insertions(+), 1 deletions(-)
+ create mode 100644 arch/arm/configs/cm_x270_defconfig
+ create mode 100644 arch/arm/mach-pxa/cm-x270.c
+ create mode 100644 drivers/leds/leds-cm-x270.c
+ create mode 100644 include/asm-arm/arch-pxa/cm-x270.h
+
+diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
+index 691aae3..b9a2b11 100644
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -534,7 +534,7 @@ config ISA_DMA_API
+ bool
+
+ config PCI
+- bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX || ARCH_KS8695
++ bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB || ARCH_IXP4XX || ARCH_KS8695 || MACH_ARMCORE
+ help
+ Find out whether you have a PCI motherboard. PCI is the name of a
+ bus system, i.e. the way the CPU talks to the other stuff inside
+@@ -555,6 +555,12 @@ config PCI_HOST_VIA82C505
+ depends on PCI && ARCH_SHARK
+ default y
+
++config PCI_HOST_ITE8152
++ bool
++ depends on PCI && MACH_ARMCORE
++ default y
++ select DMABOUNCE
++
+ source "drivers/pci/Kconfig"
+
+ source "drivers/pcmcia/Kconfig"
+diff --git a/arch/arm/configs/cm_x270_defconfig b/arch/arm/configs/cm_x270_defconfig
+new file mode 100644
+index 0000000..f728363
+--- /dev/null
++++ b/arch/arm/configs/cm_x270_defconfig
+@@ -0,0 +1,1567 @@
++#
++# Automatically generated make config: don't edit
++# Linux kernel version: 2.6.21-rc4
++# Wed Apr 4 16:42:03 2007
++#
++CONFIG_ARM=y
++CONFIG_SYS_SUPPORTS_APM_EMULATION=y
++CONFIG_GENERIC_GPIO=y
++CONFIG_GENERIC_TIME=y
++CONFIG_MMU=y
++# CONFIG_NO_IOPORT is not set
++CONFIG_GENERIC_HARDIRQS=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_ARCH_MTD_XIP=y
++CONFIG_VECTORS_BASE=0xffff0000
++CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
++
++#
++# Code maturity level options
++#
++CONFIG_EXPERIMENTAL=y
++CONFIG_BROKEN_ON_SMP=y
++CONFIG_INIT_ENV_ARG_LIMIT=32
++
++#
++# General setup
++#
++CONFIG_LOCALVERSION=""
++# CONFIG_LOCALVERSION_AUTO is not set
++CONFIG_SWAP=y
++CONFIG_SYSVIPC=y
++# CONFIG_IPC_NS is not set
++CONFIG_SYSVIPC_SYSCTL=y
++# CONFIG_POSIX_MQUEUE is not set
++# CONFIG_BSD_PROCESS_ACCT is not set
++# CONFIG_TASKSTATS is not set
++# CONFIG_UTS_NS is not set
++# CONFIG_AUDIT is not set
++CONFIG_IKCONFIG=y
++CONFIG_IKCONFIG_PROC=y
++CONFIG_SYSFS_DEPRECATED=y
++# CONFIG_RELAY is not set
++CONFIG_BLK_DEV_INITRD=y
++CONFIG_INITRAMFS_SOURCE=""
++CONFIG_CC_OPTIMIZE_FOR_SIZE=y
++CONFIG_SYSCTL=y
++CONFIG_EMBEDDED=y
++CONFIG_UID16=y
++CONFIG_SYSCTL_SYSCALL=y
++CONFIG_KALLSYMS=y
++# CONFIG_KALLSYMS_ALL is not set
++# CONFIG_KALLSYMS_EXTRA_PASS is not set
++CONFIG_HOTPLUG=y
++CONFIG_PRINTK=y
++CONFIG_BUG=y
++CONFIG_ELF_CORE=y
++CONFIG_BASE_FULL=y
++CONFIG_FUTEX=y
++CONFIG_EPOLL=y
++CONFIG_SHMEM=y
++CONFIG_SLAB=y
++CONFIG_VM_EVENT_COUNTERS=y
++CONFIG_RT_MUTEXES=y
++# CONFIG_TINY_SHMEM is not set
++CONFIG_BASE_SMALL=0
++# CONFIG_SLOB is not set
++
++#
++# Loadable module support
++#
++CONFIG_MODULES=y
++CONFIG_MODULE_UNLOAD=y
++CONFIG_MODULE_FORCE_UNLOAD=y
++# CONFIG_MODVERSIONS is not set
++# CONFIG_MODULE_SRCVERSION_ALL is not set
++CONFIG_KMOD=y
++
++#
++# Block layer
++#
++CONFIG_BLOCK=y
++# CONFIG_LBD is not set
++# CONFIG_BLK_DEV_IO_TRACE is not set
++# CONFIG_LSF is not set
++
++#
++# IO Schedulers
++#
++CONFIG_IOSCHED_NOOP=y
++CONFIG_IOSCHED_AS=y
++CONFIG_IOSCHED_DEADLINE=y
++CONFIG_IOSCHED_CFQ=y
++CONFIG_DEFAULT_AS=y
++# CONFIG_DEFAULT_DEADLINE is not set
++# CONFIG_DEFAULT_CFQ is not set
++# CONFIG_DEFAULT_NOOP is not set
++CONFIG_DEFAULT_IOSCHED="anticipatory"
++
++#
++# 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_IOP32X is not set
++# CONFIG_ARCH_IOP33X is not set
++# CONFIG_ARCH_IOP13XX is not set
++# CONFIG_ARCH_IXP4XX is not set
++# CONFIG_ARCH_IXP2000 is not set
++# CONFIG_ARCH_IXP23XX is not set
++# CONFIG_ARCH_L7200 is not set
++# CONFIG_ARCH_NS9XXX is not set
++# CONFIG_ARCH_PNX4008 is not set
++CONFIG_ARCH_PXA=y
++# 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_OMAP is not set
++CONFIG_DMABOUNCE=y
++
++#
++# Intel PXA2xx Implementations
++#
++# CONFIG_ARCH_LUBBOCK is not set
++# CONFIG_MACH_LOGICPD_PXA270 is not set
++# CONFIG_MACH_MAINSTONE is not set
++# CONFIG_ARCH_PXA_IDP is not set
++# CONFIG_PXA_SHARPSL is not set
++# CONFIG_MACH_TRIZEPS4 is not set
++CONFIG_MACH_ARMCORE=y
++CONFIG_PXA27x=y
++
++#
++# 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_DCACHE_DISABLE is not set
++# CONFIG_OUTER_CACHE is not set
++CONFIG_IWMMXT=y
++CONFIG_XSCALE_PMU=y
++
++#
++# Bus support
++#
++CONFIG_PCI=y
++CONFIG_PCI_HOST_ITE8152=y
++# CONFIG_PCI_DEBUG is not set
++
++#
++# PCCARD (PCMCIA/CardBus) support
++#
++CONFIG_PCCARD=y
++# CONFIG_PCMCIA_DEBUG is not set
++CONFIG_PCMCIA=m
++# CONFIG_PCMCIA_LOAD_CIS is not set
++CONFIG_PCMCIA_IOCTL=y
++CONFIG_CARDBUS=y
++
++#
++# PC-card bridges
++#
++# CONFIG_YENTA is not set
++# CONFIG_PD6729 is not set
++# CONFIG_I82092 is not set
++CONFIG_PCMCIA_PXA2XX=m
++
++#
++# Kernel Features
++#
++# CONFIG_PREEMPT is not set
++# CONFIG_NO_IDLE_HZ is not set
++CONFIG_HZ=100
++# CONFIG_AEABI is not set
++# 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_ALIGNMENT_TRAP=y
++
++#
++# Boot options
++#
++CONFIG_ZBOOT_ROM_TEXT=0x0
++CONFIG_ZBOOT_ROM_BSS=0x0
++CONFIG_CMDLINE=""
++# CONFIG_XIP_KERNEL is not set
++# CONFIG_KEXEC is not set
++
++#
++# Floating point emulation
++#
++
++#
++# At least one emulation must be selected
++#
++CONFIG_FPE_NWFPE=y
++# CONFIG_FPE_NWFPE_XP is not set
++# CONFIG_FPE_FASTFPE is not set
++
++#
++# Userspace binary formats
++#
++CONFIG_BINFMT_ELF=y
++# CONFIG_BINFMT_AOUT is not set
++# CONFIG_BINFMT_MISC is not set
++# CONFIG_ARTHUR is not set
++
++#
++# Power management options
++#
++CONFIG_PM=y
++# CONFIG_PM_LEGACY is not set
++# CONFIG_PM_DEBUG is not set
++# CONFIG_PM_SYSFS_DEPRECATED is not set
++# CONFIG_APM_EMULATION is not set
++
++#
++# Networking
++#
++CONFIG_NET=y
++
++#
++# Networking options
++#
++# CONFIG_NETDEBUG is not set
++CONFIG_PACKET=y
++# CONFIG_PACKET_MMAP is not set
++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=y
++CONFIG_IP_PNP_DHCP=y
++CONFIG_IP_PNP_BOOTP=y
++# CONFIG_IP_PNP_RARP is not set
++# CONFIG_NET_IPIP is not set
++# CONFIG_NET_IPGRE is not set
++# CONFIG_ARPD is not set
++# CONFIG_SYN_COOKIES is not set
++# CONFIG_INET_AH is not set
++# CONFIG_INET_ESP is not set
++# CONFIG_INET_IPCOMP is not set
++# CONFIG_INET_XFRM_TUNNEL is not set
++# CONFIG_INET_TUNNEL is not set
++CONFIG_INET_XFRM_MODE_TRANSPORT=y
++CONFIG_INET_XFRM_MODE_TUNNEL=y
++CONFIG_INET_XFRM_MODE_BEET=y
++CONFIG_INET_DIAG=y
++CONFIG_INET_TCP_DIAG=y
++# CONFIG_TCP_CONG_ADVANCED is not set
++CONFIG_TCP_CONG_CUBIC=y
++CONFIG_DEFAULT_TCP_CONG="cubic"
++# CONFIG_TCP_MD5SIG is not set
++# CONFIG_IPV6 is not set
++# CONFIG_INET6_XFRM_TUNNEL is not set
++# CONFIG_INET6_TUNNEL is not set
++# CONFIG_NETWORK_SECMARK is not set
++# CONFIG_NETFILTER is not set
++
++#
++# DCCP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_DCCP is not set
++
++#
++# SCTP Configuration (EXPERIMENTAL)
++#
++# CONFIG_IP_SCTP is not set
++
++#
++# TIPC Configuration (EXPERIMENTAL)
++#
++# CONFIG_TIPC is not set
++# CONFIG_ATM is not set
++# CONFIG_BRIDGE is not set
++# CONFIG_VLAN_8021Q is not set
++# CONFIG_DECNET is not set
++# CONFIG_LLC2 is not set
++# CONFIG_IPX is not set
++# CONFIG_ATALK is not set
++# CONFIG_X25 is not set
++# CONFIG_LAPB is not set
++# CONFIG_ECONET is not set
++# CONFIG_WAN_ROUTER is not set
++
++#
++# QoS and/or fair queueing
++#
++# CONFIG_NET_SCHED is not set
++
++#
++# Network testing
++#
++# CONFIG_NET_PKTGEN is not set
++# CONFIG_HAMRADIO is not set
++# CONFIG_IRDA is not set
++# CONFIG_BT 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 is not set
++# CONFIG_IEEE80211_SOFTMAC is not set
++CONFIG_WIRELESS_EXT=y
++
++#
++# Device Drivers
++#
++
++#
++# Generic Driver Options
++#
++CONFIG_STANDALONE=y
++CONFIG_PREVENT_FIRMWARE_BUILD=y
++CONFIG_FW_LOADER=y
++# CONFIG_DEBUG_DRIVER is not set
++# CONFIG_DEBUG_DEVRES is not set
++# CONFIG_SYS_HYPERVISOR is not set
++
++#
++# Connector - unified userspace <-> kernelspace linker
++#
++# CONFIG_CONNECTOR is not set
++
++#
++# Memory Technology Devices (MTD)
++#
++CONFIG_MTD=m
++# CONFIG_MTD_DEBUG is not set
++# CONFIG_MTD_CONCAT is not set
++CONFIG_MTD_PARTITIONS=y
++# CONFIG_MTD_REDBOOT_PARTS is not set
++# CONFIG_MTD_AFS_PARTS is not set
++
++#
++# User Modules And Translation Layers
++#
++CONFIG_MTD_CHAR=m
++CONFIG_MTD_BLKDEVS=m
++CONFIG_MTD_BLOCK=m
++# CONFIG_MTD_BLOCK_RO is not set
++# CONFIG_FTL is not set
++# CONFIG_NFTL is not set
++# CONFIG_INFTL is not set
++# CONFIG_RFD_FTL is not set
++# CONFIG_SSFDC is not set
++
++#
++# RAM/ROM/Flash chip drivers
++#
++# CONFIG_MTD_CFI is not set
++# CONFIG_MTD_JEDECPROBE is not set
++CONFIG_MTD_MAP_BANK_WIDTH_1=y
++CONFIG_MTD_MAP_BANK_WIDTH_2=y
++CONFIG_MTD_MAP_BANK_WIDTH_4=y
++# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
++# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
++CONFIG_MTD_CFI_I1=y
++CONFIG_MTD_CFI_I2=y
++# CONFIG_MTD_CFI_I4 is not set
++# CONFIG_MTD_CFI_I8 is not set
++# CONFIG_MTD_RAM is not set
++# CONFIG_MTD_ROM is not set
++# CONFIG_MTD_ABSENT is not set
++# CONFIG_MTD_OBSOLETE_CHIPS is not set
++
++#
++# Mapping drivers for chip access
++#
++# CONFIG_MTD_COMPLEX_MAPPINGS is not set
++# CONFIG_MTD_SHARP_SL 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
++
++#
++# NAND Flash Device Drivers
++#
++CONFIG_MTD_NAND=m
++# CONFIG_MTD_NAND_VERIFY_WRITE is not set
++# CONFIG_MTD_NAND_ECC_SMC is not set
++# CONFIG_MTD_NAND_H1900 is not set
++CONFIG_MTD_NAND_IDS=m
++# CONFIG_MTD_NAND_DISKONCHIP is not set
++# CONFIG_MTD_NAND_SHARPSL is not set
++# CONFIG_MTD_NAND_CAFE is not set
++CONFIG_MTD_NAND_CM_X270=m
++# CONFIG_MTD_NAND_NANDSIM is not set
++
++#
++# OneNAND Flash Device Drivers
++#
++# CONFIG_MTD_ONENAND is not set
++
++#
++# Parallel port support
++#
++# CONFIG_PARPORT is not set
++
++#
++# Plug and Play support
++#
++# CONFIG_PNPACPI is not set
++
++#
++# Block devices
++#
++# CONFIG_BLK_CPQ_DA is not set
++# CONFIG_BLK_CPQ_CISS_DA is not set
++# CONFIG_BLK_DEV_DAC960 is not set
++# CONFIG_BLK_DEV_UMEM is not set
++# CONFIG_BLK_DEV_COW_COMMON is not set
++CONFIG_BLK_DEV_LOOP=y
++# CONFIG_BLK_DEV_CRYPTOLOOP is not set
++# CONFIG_BLK_DEV_NBD is not set
++# CONFIG_BLK_DEV_SX8 is not set
++# CONFIG_BLK_DEV_UB is not set
++CONFIG_BLK_DEV_RAM=y
++CONFIG_BLK_DEV_RAM_COUNT=16
++CONFIG_BLK_DEV_RAM_SIZE=12000
++CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
++# CONFIG_CDROM_PKTCDVD is not set
++# CONFIG_ATA_OVER_ETH is not set
++
++#
++# ATA/ATAPI/MFM/RLL support
++#
++CONFIG_IDE=m
++CONFIG_IDE_MAX_HWIFS=4
++CONFIG_BLK_DEV_IDE=m
++
++#
++# Please see Documentation/ide.txt for help/info on IDE drives
++#
++# CONFIG_BLK_DEV_IDE_SATA is not set
++CONFIG_BLK_DEV_IDEDISK=m
++# CONFIG_IDEDISK_MULTI_MODE is not set
++CONFIG_BLK_DEV_IDECS=m
++# CONFIG_BLK_DEV_DELKIN is not set
++CONFIG_BLK_DEV_IDECD=m
++# CONFIG_BLK_DEV_IDETAPE is not set
++# CONFIG_BLK_DEV_IDEFLOPPY is not set
++# CONFIG_BLK_DEV_IDESCSI is not set
++# CONFIG_IDE_TASK_IOCTL is not set
++
++#
++# IDE chipset support/bugfixes
++#
++# CONFIG_IDE_GENERIC is not set
++# CONFIG_BLK_DEV_IDEPCI is not set
++# CONFIG_IDE_ARM is not set
++CONFIG_BLK_DEV_IDE_CM_X270=m
++# CONFIG_BLK_DEV_IDEDMA is not set
++# CONFIG_BLK_DEV_HD is not set
++
++#
++# SCSI device support
++#
++# CONFIG_RAID_ATTRS is not set
++CONFIG_SCSI=y
++# CONFIG_SCSI_TGT is not set
++# CONFIG_SCSI_NETLINK is not set
++# CONFIG_SCSI_PROC_FS is not set
++
++#
++# SCSI support type (disk, tape, CD-ROM)
++#
++CONFIG_BLK_DEV_SD=y
++# CONFIG_CHR_DEV_ST is not set
++# CONFIG_CHR_DEV_OSST is not set
++# CONFIG_BLK_DEV_SR is not set
++# CONFIG_CHR_DEV_SG is not set
++# CONFIG_CHR_DEV_SCH is not set
++
++#
++# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
++#
++# CONFIG_SCSI_MULTI_LUN is not set
++# CONFIG_SCSI_CONSTANTS is not set
++# CONFIG_SCSI_LOGGING is not set
++# CONFIG_SCSI_SCAN_ASYNC is not set
++
++#
++# SCSI Transports
++#
++# CONFIG_SCSI_SPI_ATTRS is not set
++# CONFIG_SCSI_FC_ATTRS is not set
++# CONFIG_SCSI_ISCSI_ATTRS is not set
++# CONFIG_SCSI_SAS_ATTRS is not set
++# CONFIG_SCSI_SAS_LIBSAS is not set
++
++#
++# SCSI low-level drivers
++#
++# CONFIG_ISCSI_TCP is not set
++# 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_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
++
++#
++# PCMCIA SCSI adapter support
++#
++# CONFIG_PCMCIA_AHA152X is not set
++# CONFIG_PCMCIA_FDOMAIN is not set
++# CONFIG_PCMCIA_NINJA_SCSI is not set
++# CONFIG_PCMCIA_QLOGIC is not set
++# CONFIG_PCMCIA_SYM53C500 is not set
++
++#
++# Serial ATA (prod) and Parallel ATA (experimental) drivers
++#
++# CONFIG_ATA is not set
++
++#
++# Multi-device support (RAID and LVM)
++#
++# CONFIG_MD 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_IEEE1394 is not set
++
++#
++# I2O device support
++#
++# CONFIG_I2O is not set
++
++#
++# Network device support
++#
++CONFIG_NETDEVICES=y
++# CONFIG_DUMMY is not set
++# CONFIG_BONDING is not set
++# CONFIG_EQUALIZER is not set
++# CONFIG_TUN is not set
++
++#
++# ARCnet devices
++#
++# CONFIG_ARCNET is not set
++
++#
++# PHY device support
++#
++# CONFIG_PHYLIB is not set
++
++#
++# Ethernet (10 or 100Mbit)
++#
++CONFIG_NET_ETHERNET=y
++CONFIG_MII=y
++# 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=y
++CONFIG_DM9000_NOEPROM=y
++# CONFIG_SMC911X is not set
++
++#
++# Tulip family network device support
++#
++# 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=m
++# CONFIG_8139TOO_PIO is not set
++# CONFIG_8139TOO_TUNE_TWISTER is not set
++# CONFIG_8139TOO_8129 is not set
++# CONFIG_8139_OLD_RX_RESET 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
++
++#
++# Ethernet (1000 Mbit)
++#
++# 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 is not set
++# CONFIG_TIGON3 is not set
++# CONFIG_BNX2 is not set
++# CONFIG_QLA3XXX is not set
++# CONFIG_ATL1 is not set
++
++#
++# Ethernet (10000 Mbit)
++#
++# CONFIG_CHELSIO_T1 is not set
++# CONFIG_CHELSIO_T3 is not set
++# CONFIG_IXGB is not set
++# CONFIG_S2IO is not set
++# CONFIG_MYRI10GE is not set
++# CONFIG_NETXEN_NIC is not set
++
++#
++# Token Ring devices
++#
++# CONFIG_TR is not set
++
++#
++# Wireless LAN (non-hamradio)
++#
++CONFIG_NET_RADIO=y
++# CONFIG_NET_WIRELESS_RTNETLINK is not set
++
++#
++# Obsolete Wireless cards support (pre-802.11)
++#
++# CONFIG_STRIP is not set
++# CONFIG_PCMCIA_WAVELAN is not set
++# CONFIG_PCMCIA_NETWAVE is not set
++
++#
++# Wireless 802.11 Frequency Hopping cards support
++#
++# CONFIG_PCMCIA_RAYCS is not set
++
++#
++# Wireless 802.11b ISA/PCI cards support
++#
++# CONFIG_IPW2100 is not set
++# CONFIG_IPW2200 is not set
++# CONFIG_HERMES is not set
++# CONFIG_ATMEL is not set
++
++#
++# Wireless 802.11b Pcmcia/Cardbus cards support
++#
++# CONFIG_AIRO_CS is not set
++# CONFIG_PCMCIA_WL3501 is not set
++
++#
++# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
++#
++# CONFIG_PRISM54 is not set
++# CONFIG_USB_ZD1201 is not set
++# CONFIG_HOSTAP is not set
++CONFIG_NET_WIRELESS=y
++
++#
++# PCMCIA network device support
++#
++CONFIG_NET_PCMCIA=y
++# CONFIG_PCMCIA_3C589 is not set
++# CONFIG_PCMCIA_3C574 is not set
++# CONFIG_PCMCIA_FMVJ18X is not set
++CONFIG_PCMCIA_PCNET=m
++# CONFIG_PCMCIA_NMCLAN is not set
++# CONFIG_PCMCIA_SMC91C92 is not set
++# CONFIG_PCMCIA_XIRC2PS is not set
++# CONFIG_PCMCIA_AXNET is not set
++
++#
++# Wan interfaces
++#
++# CONFIG_WAN is not set
++# CONFIG_FDDI is not set
++# CONFIG_HIPPI is not set
++# CONFIG_PPP is not set
++# CONFIG_SLIP is not set
++# CONFIG_NET_FC is not set
++# CONFIG_SHAPER is not set
++# CONFIG_NETCONSOLE is not set
++# CONFIG_NETPOLL is not set
++# CONFIG_NET_POLL_CONTROLLER is not set
++
++#
++# ISDN subsystem
++#
++# CONFIG_ISDN is not set
++
++#
++# Input device support
++#
++CONFIG_INPUT=y
++# CONFIG_INPUT_FF_MEMLESS 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_TOUCHSCREEN=y
++# CONFIG_TOUCHSCREEN_GUNZE is not set
++# CONFIG_TOUCHSCREEN_ELO is not set
++# CONFIG_TOUCHSCREEN_MTOUCH is not set
++# CONFIG_TOUCHSCREEN_MK712 is not set
++# CONFIG_TOUCHSCREEN_PENMOUNT is not set
++# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
++# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
++CONFIG_TOUCHSCREEN_UCB1400=m
++# CONFIG_INPUT_MISC is not set
++
++#
++# Hardware I/O ports
++#
++# CONFIG_SERIO is not set
++# CONFIG_GAMEPORT is not set
++
++#
++# Character devices
++#
++CONFIG_VT=y
++CONFIG_VT_CONSOLE=y
++CONFIG_HW_CONSOLE=y
++# CONFIG_VT_HW_CONSOLE_BINDING is not set
++# CONFIG_SERIAL_NONSTANDARD is not set
++
++#
++# Serial drivers
++#
++# CONFIG_SERIAL_8250 is not set
++
++#
++# Non-8250 serial port support
++#
++CONFIG_SERIAL_PXA=y
++CONFIG_SERIAL_PXA_CONSOLE=y
++CONFIG_SERIAL_CORE=y
++CONFIG_SERIAL_CORE_CONSOLE=y
++# CONFIG_SERIAL_JSM is not set
++CONFIG_UNIX98_PTYS=y
++CONFIG_LEGACY_PTYS=y
++CONFIG_LEGACY_PTY_COUNT=256
++
++#
++# IPMI
++#
++# CONFIG_IPMI_HANDLER is not set
++
++#
++# Watchdog Cards
++#
++# CONFIG_WATCHDOG is not set
++CONFIG_HW_RANDOM=m
++# CONFIG_NVRAM is not set
++# CONFIG_DTLK is not set
++# CONFIG_R3964 is not set
++# CONFIG_APPLICOM is not set
++# CONFIG_DRM is not set
++
++#
++# PCMCIA character devices
++#
++# CONFIG_SYNCLINK_CS is not set
++# CONFIG_CARDMAN_4000 is not set
++# CONFIG_CARDMAN_4040 is not set
++# CONFIG_RAW_DRIVER is not set
++
++#
++# TPM devices
++#
++# CONFIG_TCG_TPM is not set
++
++#
++# I2C support
++#
++# CONFIG_I2C is not set
++
++#
++# SPI support
++#
++# CONFIG_SPI is not set
++# CONFIG_SPI_MASTER is not set
++
++#
++# Dallas's 1-wire bus
++#
++# CONFIG_W1 is not set
++
++#
++# Hardware Monitoring support
++#
++# CONFIG_HWMON is not set
++# CONFIG_HWMON_VID is not set
++
++#
++# Misc devices
++#
++# CONFIG_SGI_IOC4 is not set
++# CONFIG_TIFM_CORE is not set
++
++#
++# Multifunction device drivers
++#
++# CONFIG_MFD_SM501 is not set
++
++#
++# LED devices
++#
++CONFIG_NEW_LEDS=y
++CONFIG_LEDS_CLASS=y
++
++#
++# LED drivers
++#
++CONFIG_LEDS_CM_X270=y
++
++#
++# LED Triggers
++#
++CONFIG_LEDS_TRIGGERS=y
++# CONFIG_LEDS_TRIGGER_TIMER is not set
++# CONFIG_LEDS_TRIGGER_IDE_DISK is not set
++CONFIG_LEDS_TRIGGER_HEARTBEAT=y
++
++#
++# Multimedia devices
++#
++# CONFIG_VIDEO_DEV is not set
++
++#
++# Digital Video Broadcasting Devices
++#
++# CONFIG_DVB is not set
++# CONFIG_USB_DABUSB is not set
++
++#
++# Graphics support
++#
++# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
++CONFIG_FB=y
++# CONFIG_FIRMWARE_EDID is not set
++# CONFIG_FB_DDC is not set
++CONFIG_FB_CFB_FILLRECT=y
++CONFIG_FB_CFB_COPYAREA=y
++CONFIG_FB_CFB_IMAGEBLIT=y
++# CONFIG_FB_SVGALIB is not set
++# CONFIG_FB_MACMODES is not set
++# CONFIG_FB_BACKLIGHT is not set
++# CONFIG_FB_MODE_HELPERS is not set
++# CONFIG_FB_TILEBLITTING is not set
++
++#
++# Frambuffer hardware drivers
++#
++# CONFIG_FB_CIRRUS is not set
++# CONFIG_FB_PM2 is not set
++# CONFIG_FB_CYBER2000 is not set
++# CONFIG_FB_ASILIANT is not set
++# CONFIG_FB_IMSTT is not set
++# CONFIG_FB_S1D13XXX is not set
++# CONFIG_FB_NVIDIA is not set
++# CONFIG_FB_RIVA is not set
++# CONFIG_FB_MATROX is not set
++# CONFIG_FB_RADEON is not set
++# CONFIG_FB_ATY128 is not set
++# CONFIG_FB_ATY is not set
++# CONFIG_FB_S3 is not set
++# CONFIG_FB_SAVAGE is not set
++# CONFIG_FB_SIS is not set
++# CONFIG_FB_NEOMAGIC is not set
++# CONFIG_FB_KYRO is not set
++# CONFIG_FB_3DFX is not set
++# CONFIG_FB_VOODOO1 is not set
++# CONFIG_FB_TRIDENT is not set
++CONFIG_FB_PXA=y
++# CONFIG_FB_PXA_PARAMETERS is not set
++CONFIG_FB_MBX=m
++# CONFIG_FB_VIRTUAL is not set
++
++#
++# Console display driver support
++#
++# CONFIG_VGA_CONSOLE is not set
++CONFIG_DUMMY_CONSOLE=y
++CONFIG_FRAMEBUFFER_CONSOLE=y
++# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
++# CONFIG_FONTS is not set
++CONFIG_FONT_8x8=y
++CONFIG_FONT_8x16=y
++
++#
++# Logo configuration
++#
++CONFIG_LOGO=y
++CONFIG_LOGO_LINUX_MONO=y
++CONFIG_LOGO_LINUX_VGA16=y
++CONFIG_LOGO_LINUX_CLUT224=y
++
++#
++# Sound
++#
++CONFIG_SOUND=m
++
++#
++# Advanced Linux Sound Architecture
++#
++CONFIG_SND=m
++CONFIG_SND_TIMER=m
++CONFIG_SND_PCM=m
++# CONFIG_SND_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_AC97_CODEC=m
++# 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
++# CONFIG_SND_AC97_POWER_SAVE is not set
++
++#
++# ALSA ARM devices
++#
++CONFIG_SND_PXA2XX_PCM=m
++CONFIG_SND_PXA2XX_AC97=m
++
++#
++# USB devices
++#
++# CONFIG_SND_USB_AUDIO is not set
++
++#
++# PCMCIA devices
++#
++# CONFIG_SND_VXPOCKET is not set
++# CONFIG_SND_PDAUDIOCF is not set
++
++#
++# SoC audio support
++#
++# CONFIG_SND_SOC is not set
++
++#
++# Open Sound System
++#
++# CONFIG_SOUND_PRIME is not set
++CONFIG_AC97_BUS=m
++
++#
++# HID Devices
++#
++CONFIG_HID=y
++# CONFIG_HID_DEBUG is not set
++
++#
++# USB support
++#
++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_DYNAMIC_MINORS is not set
++# CONFIG_USB_SUSPEND is not set
++# CONFIG_USB_OTG is not set
++
++#
++# USB Host Controller Drivers
++#
++# CONFIG_USB_EHCI_HCD is not set
++# CONFIG_USB_ISP116X_HCD is not set
++CONFIG_USB_OHCI_HCD=y
++# 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 is not set
++# CONFIG_USB_SL811_HCD is not set
++
++#
++# USB Device Class drivers
++#
++# CONFIG_USB_ACM is not set
++# CONFIG_USB_PRINTER is not set
++
++#
++# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
++#
++
++#
++# may also be needed; see USB_STORAGE Help for more information
++#
++CONFIG_USB_STORAGE=y
++# CONFIG_USB_STORAGE_DEBUG is not set
++# CONFIG_USB_STORAGE_DATAFAB is not set
++# CONFIG_USB_STORAGE_FREECOM is not set
++# CONFIG_USB_STORAGE_DPCM is not set
++# CONFIG_USB_STORAGE_USBAT is not set
++# CONFIG_USB_STORAGE_SDDR09 is not set
++# CONFIG_USB_STORAGE_SDDR55 is not set
++# CONFIG_USB_STORAGE_JUMPSHOT is not set
++# CONFIG_USB_STORAGE_ALAUDA is not set
++# CONFIG_USB_STORAGE_KARMA is not set
++# CONFIG_USB_LIBUSUAL is not set
++
++#
++# USB Input Devices
++#
++CONFIG_USB_HID=y
++# CONFIG_USB_HIDINPUT_POWERBOOK is not set
++# CONFIG_HID_FF is not set
++# CONFIG_USB_HIDDEV is not set
++# CONFIG_USB_AIPTEK is not set
++# CONFIG_USB_WACOM is not set
++# CONFIG_USB_ACECAD is not set
++# CONFIG_USB_KBTAB is not set
++# CONFIG_USB_POWERMATE is not set
++# CONFIG_USB_TOUCHSCREEN is not set
++# CONFIG_USB_YEALINK is not set
++# CONFIG_USB_XPAD is not set
++# CONFIG_USB_ATI_REMOTE is not set
++# CONFIG_USB_ATI_REMOTE2 is not set
++# CONFIG_USB_KEYSPAN_REMOTE is not set
++# CONFIG_USB_APPLETOUCH is not set
++# CONFIG_USB_GTCO is not set
++
++#
++# USB Imaging devices
++#
++# CONFIG_USB_MDC800 is not set
++# CONFIG_USB_MICROTEK is not set
++
++#
++# USB Network Adapters
++#
++# CONFIG_USB_CATC is not set
++# CONFIG_USB_KAWETH is not set
++# CONFIG_USB_PEGASUS is not set
++# CONFIG_USB_RTL8150 is not set
++# CONFIG_USB_USBNET_MII is not set
++# CONFIG_USB_USBNET is not set
++CONFIG_USB_MON=y
++
++#
++# USB port drivers
++#
++
++#
++# USB Serial Converter support
++#
++# CONFIG_USB_SERIAL is not set
++
++#
++# USB Miscellaneous drivers
++#
++# CONFIG_USB_EMI62 is not set
++# CONFIG_USB_EMI26 is not set
++# CONFIG_USB_ADUTUX is not set
++# CONFIG_USB_AUERSWALD is not set
++# CONFIG_USB_RIO500 is not set
++# CONFIG_USB_LEGOTOWER is not set
++# CONFIG_USB_LCD is not set
++# CONFIG_USB_BERRY_CHARGE is not set
++# CONFIG_USB_LED is not set
++# CONFIG_USB_CYPRESS_CY7C63 is not set
++# CONFIG_USB_CYTHERM is not set
++# CONFIG_USB_PHIDGET is not set
++# CONFIG_USB_IDMOUSE is not set
++# CONFIG_USB_FTDI_ELAN is not set
++# CONFIG_USB_APPLEDISPLAY is not set
++# CONFIG_USB_LD is not set
++# CONFIG_USB_TRANCEVIBRATOR is not set
++# CONFIG_USB_IOWARRIOR is not set
++# CONFIG_USB_TEST is not set
++
++#
++# USB DSL modem support
++#
++
++#
++# USB Gadget Support
++#
++# CONFIG_USB_GADGET is not set
++
++#
++# MMC/SD Card support
++#
++CONFIG_MMC=m
++# CONFIG_MMC_DEBUG is not set
++CONFIG_MMC_BLOCK=m
++CONFIG_MMC_PXA=m
++# CONFIG_MMC_SDHCI is not set
++# CONFIG_MMC_TIFM_SD is not set
++
++#
++# Real Time Clock
++#
++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
++
++#
++# RTC drivers
++#
++# CONFIG_RTC_DRV_CMOS is not set
++# CONFIG_RTC_DRV_DS1553 is not set
++# CONFIG_RTC_DRV_DS1742 is not set
++# CONFIG_RTC_DRV_M48T86 is not set
++CONFIG_RTC_DRV_SA1100=y
++# CONFIG_RTC_DRV_TEST is not set
++CONFIG_RTC_DRV_V3020=y
++
++#
++# File systems
++#
++CONFIG_EXT2_FS=y
++# CONFIG_EXT2_FS_XATTR is not set
++# CONFIG_EXT2_FS_XIP is not set
++CONFIG_EXT3_FS=y
++CONFIG_EXT3_FS_XATTR=y
++# CONFIG_EXT3_FS_POSIX_ACL is not set
++# CONFIG_EXT3_FS_SECURITY is not set
++# CONFIG_EXT4DEV_FS is not set
++CONFIG_JBD=y
++# CONFIG_JBD_DEBUG is not set
++CONFIG_FS_MBCACHE=y
++# CONFIG_REISERFS_FS is not set
++# CONFIG_JFS_FS is not set
++# CONFIG_FS_POSIX_ACL is not set
++# CONFIG_XFS_FS is not set
++# CONFIG_GFS2_FS is not set
++# CONFIG_OCFS2_FS is not set
++# CONFIG_MINIX_FS is not set
++# CONFIG_ROMFS_FS is not set
++CONFIG_INOTIFY=y
++CONFIG_INOTIFY_USER=y
++# CONFIG_QUOTA is not set
++CONFIG_DNOTIFY=y
++# CONFIG_AUTOFS_FS is not set
++# CONFIG_AUTOFS4_FS is not set
++# CONFIG_FUSE_FS is not set
++
++#
++# CD-ROM/DVD Filesystems
++#
++# CONFIG_ISO9660_FS is not set
++# CONFIG_UDF_FS is not set
++
++#
++# DOS/FAT/NT Filesystems
++#
++CONFIG_FAT_FS=y
++CONFIG_MSDOS_FS=y
++CONFIG_VFAT_FS=y
++CONFIG_FAT_DEFAULT_CODEPAGE=437
++CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
++# CONFIG_NTFS_FS is not set
++
++#
++# Pseudo filesystems
++#
++CONFIG_PROC_FS=y
++CONFIG_PROC_SYSCTL=y
++CONFIG_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 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=y
++CONFIG_NFS_V3=y
++# CONFIG_NFS_V3_ACL is not set
++# CONFIG_NFS_V4 is not set
++# CONFIG_NFS_DIRECTIO is not set
++# CONFIG_NFSD is not set
++CONFIG_ROOT_NFS=y
++CONFIG_LOCKD=y
++CONFIG_LOCKD_V4=y
++CONFIG_NFS_COMMON=y
++CONFIG_SUNRPC=y
++# CONFIG_RPCSEC_GSS_KRB5 is not set
++# CONFIG_RPCSEC_GSS_SPKM3 is not set
++CONFIG_SMB_FS=y
++# CONFIG_SMB_NLS_DEFAULT is not set
++# CONFIG_CIFS is not set
++# CONFIG_NCP_FS is not set
++# CONFIG_CODA_FS is not set
++# CONFIG_AFS_FS is not set
++# CONFIG_9P_FS is not set
++
++#
++# Partition Types
++#
++# CONFIG_PARTITION_ADVANCED is not set
++CONFIG_MSDOS_PARTITION=y
++
++#
++# Native Language Support
++#
++CONFIG_NLS=y
++CONFIG_NLS_DEFAULT="iso8859-1"
++CONFIG_NLS_CODEPAGE_437=y
++# CONFIG_NLS_CODEPAGE_737 is not set
++# CONFIG_NLS_CODEPAGE_775 is not set
++# CONFIG_NLS_CODEPAGE_850 is not set
++# CONFIG_NLS_CODEPAGE_852 is not set
++# CONFIG_NLS_CODEPAGE_855 is not set
++# CONFIG_NLS_CODEPAGE_857 is not set
++# CONFIG_NLS_CODEPAGE_860 is not set
++# CONFIG_NLS_CODEPAGE_861 is not set
++# CONFIG_NLS_CODEPAGE_862 is not set
++# CONFIG_NLS_CODEPAGE_863 is not set
++# CONFIG_NLS_CODEPAGE_864 is not set
++# CONFIG_NLS_CODEPAGE_865 is not set
++# CONFIG_NLS_CODEPAGE_866 is not set
++# CONFIG_NLS_CODEPAGE_869 is not set
++# CONFIG_NLS_CODEPAGE_936 is not set
++# CONFIG_NLS_CODEPAGE_950 is not set
++# CONFIG_NLS_CODEPAGE_932 is not set
++# CONFIG_NLS_CODEPAGE_949 is not set
++# CONFIG_NLS_CODEPAGE_874 is not set
++# CONFIG_NLS_ISO8859_8 is not set
++# CONFIG_NLS_CODEPAGE_1250 is not set
++# CONFIG_NLS_CODEPAGE_1251 is not set
++# CONFIG_NLS_ASCII is not set
++CONFIG_NLS_ISO8859_1=y
++# CONFIG_NLS_ISO8859_2 is not set
++# CONFIG_NLS_ISO8859_3 is not set
++# CONFIG_NLS_ISO8859_4 is not set
++# CONFIG_NLS_ISO8859_5 is not set
++# CONFIG_NLS_ISO8859_6 is not set
++# CONFIG_NLS_ISO8859_7 is not set
++# CONFIG_NLS_ISO8859_9 is not set
++# CONFIG_NLS_ISO8859_13 is not set
++# CONFIG_NLS_ISO8859_14 is not set
++# CONFIG_NLS_ISO8859_15 is not set
++# CONFIG_NLS_KOI8_R is not set
++# CONFIG_NLS_KOI8_U is not set
++# CONFIG_NLS_UTF8 is not set
++
++#
++# 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=y
++# CONFIG_UNUSED_SYMBOLS is not set
++# CONFIG_DEBUG_FS is not set
++# CONFIG_HEADERS_CHECK is not set
++CONFIG_DEBUG_KERNEL=y
++# CONFIG_DEBUG_SHIRQ is not set
++CONFIG_LOG_BUF_SHIFT=17
++# CONFIG_DETECT_SOFTLOCKUP is not set
++# CONFIG_SCHEDSTATS is not set
++# CONFIG_TIMER_STATS is not set
++# CONFIG_DEBUG_SLAB is not set
++# CONFIG_DEBUG_RT_MUTEXES is not set
++# CONFIG_RT_MUTEX_TESTER is not set
++# CONFIG_DEBUG_SPINLOCK is not set
++# CONFIG_DEBUG_MUTEXES is not set
++# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
++# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
++# CONFIG_DEBUG_KOBJECT is not set
++# CONFIG_DEBUG_BUGVERBOSE is not set
++CONFIG_DEBUG_INFO=y
++# CONFIG_DEBUG_VM is not set
++# CONFIG_DEBUG_LIST is not set
++CONFIG_FRAME_POINTER=y
++CONFIG_FORCED_INLINING=y
++# CONFIG_RCU_TORTURE_TEST is not set
++# CONFIG_FAULT_INJECTION is not set
++CONFIG_DEBUG_USER=y
++CONFIG_DEBUG_ERRORS=y
++CONFIG_DEBUG_LL=y
++# CONFIG_DEBUG_ICEDCC is not set
++
++#
++# Security options
++#
++# CONFIG_KEYS is not set
++# CONFIG_SECURITY is not set
++
++#
++# Cryptographic options
++#
++CONFIG_CRYPTO=y
++CONFIG_CRYPTO_ALGAPI=m
++CONFIG_CRYPTO_BLKCIPHER=m
++CONFIG_CRYPTO_MANAGER=m
++# CONFIG_CRYPTO_HMAC is not set
++# CONFIG_CRYPTO_XCBC is not set
++# CONFIG_CRYPTO_NULL is not set
++# CONFIG_CRYPTO_MD4 is not set
++# CONFIG_CRYPTO_MD5 is not set
++# CONFIG_CRYPTO_SHA1 is not set
++# CONFIG_CRYPTO_SHA256 is not set
++# CONFIG_CRYPTO_SHA512 is not set
++# CONFIG_CRYPTO_WP512 is not set
++# CONFIG_CRYPTO_TGR192 is not set
++# CONFIG_CRYPTO_GF128MUL is not set
++CONFIG_CRYPTO_ECB=m
++CONFIG_CRYPTO_CBC=m
++CONFIG_CRYPTO_PCBC=m
++# CONFIG_CRYPTO_LRW is not set
++# CONFIG_CRYPTO_DES is not set
++# CONFIG_CRYPTO_FCRYPT is not set
++# CONFIG_CRYPTO_BLOWFISH is not set
++# CONFIG_CRYPTO_TWOFISH is not set
++# CONFIG_CRYPTO_SERPENT is not set
++CONFIG_CRYPTO_AES=m
++# CONFIG_CRYPTO_CAST5 is not set
++# CONFIG_CRYPTO_CAST6 is not set
++# CONFIG_CRYPTO_TEA is not set
++CONFIG_CRYPTO_ARC4=m
++# CONFIG_CRYPTO_KHAZAD is not set
++# CONFIG_CRYPTO_ANUBIS is not set
++# CONFIG_CRYPTO_DEFLATE is not set
++# CONFIG_CRYPTO_MICHAEL_MIC is not set
++# CONFIG_CRYPTO_CRC32C is not set
++# CONFIG_CRYPTO_CAMELLIA is not set
++# CONFIG_CRYPTO_TEST is not set
++
++#
++# Hardware crypto devices
++#
++
++#
++# Library routines
++#
++CONFIG_BITREVERSE=y
++# CONFIG_CRC_CCITT is not set
++# CONFIG_CRC16 is not set
++CONFIG_CRC32=y
++# CONFIG_LIBCRC32C is not set
++CONFIG_PLIST=y
++CONFIG_HAS_IOMEM=y
++CONFIG_HAS_IOPORT=y
+diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig
+index 5ebec6d..e126926 100644
+--- a/arch/arm/mach-pxa/Kconfig
++++ b/arch/arm/mach-pxa/Kconfig
+@@ -40,6 +40,12 @@ config MACH_TRIZEPS4
+ config MACH_EM_X270
+ bool "CompuLab EM-x270 platform"
+ select PXA27x
++ select IWMMXT
++
++config MACH_ARMCORE
++ bool "CompuLab CM-X270 modules"
++ select PXA27x
++ select IWMMXT
+
+ endchoice
+
+diff --git a/arch/arm/mach-pxa/Makefile b/arch/arm/mach-pxa/Makefile
+index 7d6ab5c..b369289 100644
+--- a/arch/arm/mach-pxa/Makefile
++++ b/arch/arm/mach-pxa/Makefile
+@@ -19,6 +19,7 @@ obj-$(CONFIG_MACH_AKITA) += akita-ioexp.o
+ obj-$(CONFIG_MACH_POODLE) += poodle.o corgi_ssp.o
+ obj-$(CONFIG_MACH_TOSA) += tosa.o
+ obj-$(CONFIG_MACH_EM_X270) += em-x270.o
++obj-$(CONFIG_MACH_ARMCORE) += cm-x270.o
+
+ # Support for blinky lights
+ led-y := leds.o
+@@ -26,6 +27,8 @@ led-$(CONFIG_ARCH_LUBBOCK) += leds-lubbock.o
+ led-$(CONFIG_MACH_MAINSTONE) += leds-mainstone.o
+ led-$(CONFIG_ARCH_PXA_IDP) += leds-idp.o
+ led-$(CONFIG_MACH_TRIZEPS4) += leds-trizeps4.o
++# FIXME: use driver/leds instead
++led-$(CONFIG_MACH_ARMCORE) += leds-cm-x270.o
+
+ obj-$(CONFIG_LEDS) += $(led-y)
+
+@@ -36,3 +39,7 @@ obj-$(CONFIG_PXA_SSP) += ssp.o
+ ifeq ($(CONFIG_PXA27x),y)
+ obj-$(CONFIG_PM) += standby.o
+ endif
++
++ifeq ($(CONFIG_PCI),y)
++obj-$(CONFIG_MACH_ARMCORE) += cm-x270-pci.o
++endif
+diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c
+new file mode 100644
+index 0000000..7b4e288
+--- /dev/null
++++ b/arch/arm/mach-pxa/cm-x270.c
+@@ -0,0 +1,821 @@
++/*
++ * linux/arch/arm/mach-pxa/cm-x270.c
++ *
++ * Copyright (C) 2007 CompuLab, Ltd.
++ * Mike Rapoport <mike@compulab.co.il>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/pm.h>
++#include <linux/fb.h>
++#include <linux/platform_device.h>
++#include <linux/sysdev.h>
++#include <linux/dm9000.h>
++#include <linux/rtc-v3020.h>
++#include <linux/serial_8250.h>
++#include <video/mbxfb.h>
++
++#include <asm/types.h>
++#include <asm/setup.h>
++#include <asm/memory.h>
++#include <asm/mach-types.h>
++#include <asm/hardware.h>
++#include <asm/irq.h>
++#include <asm/io.h>
++#include <asm/delay.h>
++
++#include <asm/mach/arch.h>
++#include <asm/mach/map.h>
++#include <asm/mach/irq.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/pxafb.h>
++#include <asm/arch/ohci.h>
++#include <asm/arch/mmc.h>
++#include <asm/arch/bitfield.h>
++#include <asm/arch/cm-x270.h>
++
++#include <asm/hardware/it8152.h>
++
++#include "generic.h"
++
++#define RTC_PHYS_BASE (PXA_CS1_PHYS + (5 << 22))
++#define DM9000_PHYS_BASE (PXA_CS1_PHYS + (6 << 22))
++
++static struct resource cmx270_dm9k_resource[] = {
++ [0] = {
++ .start = DM9000_PHYS_BASE,
++ .end = DM9000_PHYS_BASE + 4,
++ .flags = IORESOURCE_MEM,
++ },
++ [1] = {
++ .start = DM9000_PHYS_BASE + 8,
++ .end = DM9000_PHYS_BASE + 8 + 500,
++ .flags = IORESOURCE_MEM,
++ },
++ [2] = {
++ .start = CMX270_ETHIRQ,
++ .end = CMX270_ETHIRQ,
++ .flags = IORESOURCE_IRQ,
++ }
++};
++
++/* for the moment we limit ourselves to 32bit IO until some
++ * better IO routines can be written and tested
++ */
++static struct dm9000_plat_data cmx270_dm9k_platdata = {
++ .flags = DM9000_PLATF_32BITONLY,
++};
++
++/* Ethernet device */
++static struct platform_device cmx270_device_dm9k = {
++ .name = "dm9000",
++ .id = 0,
++ .num_resources = ARRAY_SIZE(cmx270_dm9k_resource),
++ .resource = cmx270_dm9k_resource,
++ .dev = {
++ .platform_data = &cmx270_dm9k_platdata,
++ }
++};
++
++/* audio device */
++static struct platform_device cmx270_audio_device = {
++ .name = "pxa2xx-ac97",
++ .id = -1,
++};
++
++/* touchscreen controller */
++static struct platform_device cmx270_ts_device = {
++ .name = "ucb1x00-ts",
++ .id = -1,
++};
++
++/* RTC */
++static struct resource cmx270_v3020_resource[] = {
++ [0] = {
++ .start = RTC_PHYS_BASE,
++ .end = RTC_PHYS_BASE + 4,
++ .flags = IORESOURCE_MEM,
++ },
++};
++
++struct v3020_platform_data cmx270_v3020_pdata = {
++ .leftshift = 16,
++};
++
++static struct platform_device cmx270_rtc_device = {
++ .name = "v3020",
++ .num_resources = ARRAY_SIZE(cmx270_v3020_resource),
++ .resource = cmx270_v3020_resource,
++ .id = -1,
++ .dev = {
++ .platform_data = &cmx270_v3020_pdata,
++ }
++};
++
++/*
++ * CM-X270 LEDs
++ */
++static struct platform_device cmx270led_device = {
++ .name = "cm-x270-led",
++ .id = -1,
++};
++
++/* 2700G graphics */
++static u64 fb_dma_mask = ~(u64)0;
++
++static struct resource cmx270_2700G_resource[] = {
++ /* frame buffer memory including ODFB and External SDRAM */
++ [0] = {
++ .start = MARATHON_PHYS,
++ .end = MARATHON_PHYS + 0x02000000,
++ .flags = IORESOURCE_MEM,
++ },
++ /* Marathon registers */
++ [1] = {
++ .start = MARATHON_PHYS + 0x03fe0000,
++ .end = MARATHON_PHYS + 0x03ffffff,
++ .flags = IORESOURCE_MEM,
++ },
++};
++
++static unsigned long save_lcd_regs[10];
++
++static int cmx270_marathon_probe(struct fb_info *fb)
++{
++ /* save PXA-270 pin settings before enabling 2700G */
++ save_lcd_regs[0] = GPDR1;
++ save_lcd_regs[1] = GPDR2;
++ save_lcd_regs[2] = GAFR1_U;
++ save_lcd_regs[3] = GAFR2_L;
++ save_lcd_regs[4] = GAFR2_U;
++
++ /* Disable PXA-270 on-chip controller driving pins */
++ GPDR1 &= ~(0xfc000000);
++ GPDR2 &= ~(0x00c03fff);
++ GAFR1_U &= ~(0xfff00000);
++ GAFR2_L &= ~(0x0fffffff);
++ GAFR2_U &= ~(0x0000f000);
++ return 0;
++}
++
++static int cmx270_marathon_remove(struct fb_info *fb)
++{
++ GPDR1 = save_lcd_regs[0];
++ GPDR2 = save_lcd_regs[1];
++ GAFR1_U = save_lcd_regs[2];
++ GAFR2_L = save_lcd_regs[3];
++ GAFR2_U = save_lcd_regs[4];
++ return 0;
++}
++
++static struct mbxfb_platform_data cmx270_2700G_data = {
++ .xres = {
++ .min = 240,
++ .max = 1200,
++ .defval = 640,
++ },
++ .yres = {
++ .min = 240,
++ .max = 1200,
++ .defval = 480,
++ },
++ .bpp = {
++ .min = 16,
++ .max = 32,
++ .defval = 16,
++ },
++ .memsize = 8*1024*1024,
++ .probe = cmx270_marathon_probe,
++ .remove = cmx270_marathon_remove,
++};
++
++static struct platform_device cmx270_2700G = {
++ .name = "mbx-fb",
++ .dev = {
++ .platform_data = &cmx270_2700G_data,
++ .dma_mask = &fb_dma_mask,
++ .coherent_dma_mask = 0xffffffff,
++ },
++ .num_resources = ARRAY_SIZE(cmx270_2700G_resource),
++ .resource = cmx270_2700G_resource,
++ .id = -1,
++};
++
++/* platform devices */
++static struct platform_device *platform_devices[] __initdata = {
++ &cmx270_device_dm9k,
++ &cmx270_audio_device,
++ &cmx270_rtc_device,
++ &cmx270_2700G,
++ &cmx270led_device,
++};
++
++#ifdef CONFIG_PCI
++/*
++ * Install handler for IT8152 IRQ. Yes, yes... we are way down the IRQ
++ * cascade which is not good for IRQ latency, but the hardware has been
++ * designed that way...
++ */
++static inline void cmx270_irq(int irq, struct pt_regs *regs)
++{
++ struct irq_desc *desc;
++ desc = irq_desc + irq;
++ desc_handle_irq(irq, desc);
++}
++
++static void cmx270_irq_demux(unsigned int irq, struct irqdesc *desc,
++ struct pt_regs *regs)
++{
++ unsigned long pdcnimr, ldcnimr;
++ int pdcnirr, ldcnir;
++
++ /* clear our parent irq */
++ GEDR(GPIO_IT8152_IRQ) = GPIO_bit(GPIO_IT8152_IRQ);
++
++ /* read pending IRQs in the chip registers and clear them */
++ pdcnirr = IT8152_INTC_PDCNIRR;
++ ldcnir = IT8152_INTC_LDCNIRR;
++ IT8152_INTC_PDCNIRR = ~pdcnirr;
++ IT8152_INTC_LDCNIRR = ~ldcnir;
++
++ /* mask ITE irqs */
++ pdcnimr = IT8152_INTC_PDCNIMR;
++ ldcnimr = IT8152_INTC_LDCNIMR;
++ IT8152_INTC_PDCNIMR = 0xffff;
++ IT8152_INTC_LDCNIMR = 0xffff;
++
++ pdcnirr &= (PCISERR_BIT | H2PTADR_BIT | H2PMAR_BIT |
++ PCI_INTD_BIT | PCI_INTC_BIT | PCI_INTB_BIT | PCI_INTA_BIT |
++ USB_INT_BIT | CDMA_INT_BIT);
++
++ ldcnir &= ITESER_BIT;
++
++ IT8152_INTC_PDCNIRR = ~pdcnirr;
++ IT8152_INTC_LDCNIRR = ~ldcnir;
++
++ /* are there interrupts pending ? */
++ if( (pdcnirr | ldcnir) ) {
++ if (pdcnirr) {
++ if( pdcnirr & PCISERR_BIT )
++ cmx270_irq(PCISERR, regs);
++ if( pdcnirr & H2PTADR_BIT )
++ cmx270_irq(H2PTADR, regs);
++ if( pdcnirr & H2PMAR_BIT )
++ cmx270_irq(H2PMAR, regs);
++ if( pdcnirr & PCI_INTA_BIT )
++ cmx270_irq(PCI_INTA, regs);
++ if( pdcnirr & PCI_INTB_BIT )
++ cmx270_irq(PCI_INTB, regs);
++ if( pdcnirr & PCI_INTC_BIT )
++ cmx270_irq(PCI_INTC, regs);
++ if( pdcnirr & PCI_INTD_BIT )
++ cmx270_irq(PCI_INTD, regs);
++ if( pdcnirr & USB_INT_BIT )
++ cmx270_irq(USB_INT, regs);
++ if( pdcnirr & CDMA_INT_BIT )
++ cmx270_irq(CDMA_INT, regs);
++ }
++ if(ldcnir) {
++ if( ldcnir & ITESER_BIT )
++ cmx270_irq(IRQ_ITESER, regs);
++ }
++ }
++
++ /* re-enable ITE interrupts */
++ IT8152_INTC_PDCNIMR = pdcnimr;
++ IT8152_INTC_LDCNIMR = ldcnimr;
++}
++#else
++unsigned long it8152_base_address = CMX270_IT8152_VIRT;
++#endif
++
++/* #define CMX270_FLASH_VIRT (CMX270_IDE104_VIRT + PXA_CS_SIZE - (8<<20)) */
++/* Map PCI companion and IDE/General Purpose CS statically */
++static struct map_desc cmx270_io_desc[] __initdata = {
++ [0] = { /* IDE/general purpose space */
++ .virtual = CMX270_IDE104_VIRT,
++ .pfn = __phys_to_pfn(CMX270_IDE104_PHYS),
++ .length = PXA_CS_SIZE - (8<<20),
++ .type = MT_DEVICE
++ },
++ [1] = { /* PCI bridge */
++ .virtual = CMX270_IT8152_VIRT,
++ .pfn = __phys_to_pfn(CMX270_IT8152_PHYS),
++ .length = PXA_CS_SIZE,
++ .type = MT_DEVICE
++ },
++};
++
++/*
++ Display definitions
++ keep these for backwards compatibility, although symbolic names (as
++ e.g. in lpd270.c) looks better
++ */
++#define MTYPE_STN320x240 0
++#define MTYPE_TFT640x480 1
++#define MTYPE_CRT640x480 2
++#define MTYPE_CRT800x600 3
++#define MTYPE_TFT320x240 6
++#define MTYPE_STN640x480 7
++
++static struct pxafb_mode_info generic_stn_320x240_mode = {
++ .pixclock = 76923,
++ .bpp = 8,
++ .xres = 320,
++ .yres = 240,
++ .hsync_len = 3,
++ .vsync_len = 2,
++ .left_margin = 3,
++ .upper_margin = 0,
++ .right_margin = 3,
++ .lower_margin = 0,
++ .sync = (FB_SYNC_HOR_HIGH_ACT |
++ FB_SYNC_VERT_HIGH_ACT),
++ .cmap_greyscale = 0,
++};
++
++static struct pxafb_mach_info generic_stn_320x240 = {
++ .modes = &generic_stn_320x240_mode,
++ .num_modes = 1,
++ .lccr0 = 0,
++ .lccr3 = (LCCR3_PixClkDiv(0x03) |
++ LCCR3_Acb(0xff) |
++ LCCR3_PCP),
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++};
++
++static struct pxafb_mode_info generic_tft_640x480_mode = {
++ .pixclock = 38461,
++ .bpp = 8,
++ .xres = 640,
++ .yres = 480,
++ .hsync_len = 60,
++ .vsync_len = 2,
++ .left_margin = 70,
++ .upper_margin = 10,
++ .right_margin = 70,
++ .lower_margin = 5,
++ .sync = 0,
++ .cmap_greyscale = 0,
++};
++
++static struct pxafb_mach_info generic_tft_640x480 = {
++ .modes = &generic_tft_640x480_mode,
++ .num_modes = 1,
++ .lccr0 = (LCCR0_PAS),
++ .lccr3 = (LCCR3_PixClkDiv(0x01) |
++ LCCR3_Acb(0xff) |
++ LCCR3_PCP),
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++};
++
++static struct pxafb_mode_info generic_crt_640x480_mode = {
++ .pixclock = 38461,
++ .bpp = 8,
++ .xres = 640,
++ .yres = 480,
++ .hsync_len = 63,
++ .vsync_len = 2,
++ .left_margin = 81,
++ .upper_margin = 33,
++ .right_margin = 16,
++ .lower_margin = 10,
++ .sync = (FB_SYNC_HOR_HIGH_ACT |
++ FB_SYNC_VERT_HIGH_ACT),
++ .cmap_greyscale = 0,
++};
++
++static struct pxafb_mach_info generic_crt_640x480 = {
++ .modes = &generic_crt_640x480_mode,
++ .num_modes = 1,
++ .lccr0 = (LCCR0_PAS),
++ .lccr3 = (LCCR3_PixClkDiv(0x01) |
++ LCCR3_Acb(0xff)),
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++};
++
++static struct pxafb_mode_info generic_crt_800x600_mode = {
++ .pixclock = 28846,
++ .bpp = 8,
++ .xres = 800,
++ .yres = 600,
++ .hsync_len = 63,
++ .vsync_len = 2,
++ .left_margin = 26,
++ .upper_margin = 21,
++ .right_margin = 26,
++ .lower_margin = 11,
++ .sync = (FB_SYNC_HOR_HIGH_ACT |
++ FB_SYNC_VERT_HIGH_ACT),
++ .cmap_greyscale = 0,
++};
++
++static struct pxafb_mach_info generic_crt_800x600 = {
++ .modes = &generic_crt_800x600_mode,
++ .num_modes = 1,
++ .lccr0 = (LCCR0_PAS),
++ .lccr3 = (LCCR3_PixClkDiv(0x02) |
++ LCCR3_Acb(0xff)),
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++};
++
++static struct pxafb_mode_info generic_tft_320x240_mode = {
++ .pixclock = 134615,
++ .bpp = 16,
++ .xres = 320,
++ .yres = 240,
++ .hsync_len = 63,
++ .vsync_len = 7,
++ .left_margin = 75,
++ .upper_margin = 0,
++ .right_margin = 15,
++ .lower_margin = 15,
++ .sync = 0,
++ .cmap_greyscale = 0,
++};
++
++static struct pxafb_mach_info generic_tft_320x240 = {
++ .modes = &generic_tft_320x240_mode,
++ .num_modes = 1,
++ .lccr0 = (LCCR0_PAS),
++ .lccr3 = (LCCR3_PixClkDiv(0x06) |
++ LCCR3_Acb(0xff) |
++ LCCR3_PCP),
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++};
++
++static struct pxafb_mode_info generic_stn_640x480_mode = {
++ .pixclock = 57692,
++ .bpp = 8,
++ .xres = 640,
++ .yres = 480,
++ .hsync_len = 4,
++ .vsync_len = 2,
++ .left_margin = 10,
++ .upper_margin = 5,
++ .right_margin = 10,
++ .lower_margin = 5,
++ .sync = (FB_SYNC_HOR_HIGH_ACT |
++ FB_SYNC_VERT_HIGH_ACT),
++ .cmap_greyscale = 0,
++};
++
++static struct pxafb_mach_info generic_stn_640x480 = {
++ .modes = &generic_stn_640x480_mode,
++ .num_modes = 1,
++ .lccr0 = 0,
++ .lccr3 = (LCCR3_PixClkDiv(0x02) |
++ LCCR3_Acb(0xff)),
++ .cmap_inverse = 0,
++ .cmap_static = 0,
++};
++
++static struct pxafb_mach_info *cmx270_display = &generic_crt_640x480;
++
++static int __init cmx270_set_display(char *str)
++{
++ int disp_type = simple_strtol(str, NULL, 0);
++ switch (disp_type) {
++ case MTYPE_STN320x240:
++ cmx270_display = &generic_stn_320x240;
++ break;
++ case MTYPE_TFT640x480:
++ cmx270_display = &generic_tft_640x480;
++ break;
++ case MTYPE_CRT640x480:
++ cmx270_display = &generic_crt_640x480;
++ break;
++ case MTYPE_CRT800x600:
++ cmx270_display = &generic_crt_800x600;
++ break;
++ case MTYPE_TFT320x240:
++ cmx270_display = &generic_tft_320x240;
++ break;
++ case MTYPE_STN640x480:
++ cmx270_display = &generic_stn_640x480;
++ break;
++ default: /* fallback to CRT 640x480 */
++ cmx270_display = &generic_crt_640x480;
++ break;
++ }
++ return 1;
++}
++
++__setup("monitor=", cmx270_set_display);
++
++/* PXA27x OHCI controller setup */
++static int cmx270_ohci_init(struct device *dev)
++{
++ /* Set the Power Control Polarity Low */
++ UHCHR = (UHCHR | UHCHR_PCPL) &
++ ~(UHCHR_SSEP1 | UHCHR_SSEP2 | UHCHR_SSE);
++
++ return 0;
++}
++
++static struct pxaohci_platform_data cmx270_ohci_platform_data = {
++ .port_mode = PMM_PERPORT_MODE,
++ .init = cmx270_ohci_init,
++};
++
++
++static int cmx270_mci_init(struct device *dev, irq_handler_t cmx270_detect_int, void *data)
++{
++ int err;
++
++ /*
++ * setup GPIO for PXA27x MMC controller
++ */
++ pxa_gpio_mode(GPIO32_MMCCLK_MD);
++ pxa_gpio_mode(GPIO112_MMCCMD_MD);
++ pxa_gpio_mode(GPIO92_MMCDAT0_MD);
++ pxa_gpio_mode(GPIO109_MMCDAT1_MD);
++ pxa_gpio_mode(GPIO110_MMCDAT2_MD);
++ pxa_gpio_mode(GPIO111_MMCDAT3_MD);
++
++ /* SB-X270 uses GPIO105 as SD power enable */
++ pxa_gpio_mode(105 | GPIO_OUT);
++
++ /* card detect IRQ on GPIO 83 */
++ pxa_gpio_mode(IRQ_TO_GPIO(CMX270_MMC_IRQ));
++ set_irq_type(CMX270_MMC_IRQ, IRQT_FALLING);
++
++ err = request_irq(CMX270_MMC_IRQ, cmx270_detect_int, SA_INTERRUPT,
++ "MMC card detect", data);
++ if (err) {
++ printk(KERN_ERR "cmx270_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
++ return -1;
++ }
++
++ return 0;
++}
++
++static void cmx270_mci_setpower(struct device *dev, unsigned int vdd)
++{
++ struct pxamci_platform_data* p_d = dev->platform_data;
++
++ if (( 1 << vdd) & p_d->ocr_mask) {
++ printk(KERN_DEBUG "%s: on\n", __FUNCTION__);
++ GPCR(105) = GPIO_bit(105);
++ } else {
++ GPSR(105) = GPIO_bit(105);
++ printk(KERN_DEBUG "%s: off\n", __FUNCTION__);
++ }
++}
++
++static void cmx270_mci_exit(struct device *dev, void *data)
++{
++ free_irq(CMX270_MMC_IRQ, data);
++}
++
++static struct pxamci_platform_data cmx270_mci_platform_data = {
++ .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
++ .init = cmx270_mci_init,
++ .setpower = cmx270_mci_setpower,
++ .exit = cmx270_mci_exit,
++};
++
++#ifdef CONFIG_PM
++/* extern struct subsystem power_subsys; */
++static unsigned long sleep_save_ite[10];
++static unsigned long sleep_save_msc[10];
++
++static int cmx270_suspend(struct sys_device *dev, pm_message_t state)
++{
++#ifdef CONFIG_PCI
++ /* save ITE state */
++ sleep_save_ite[0] = IT8152_INTC_PDCNIMR;
++ sleep_save_ite[1] = IT8152_INTC_LPCNIMR;
++ sleep_save_ite[2] = IT8152_INTC_LPNIAR;
++
++ /* Clear ITE IRQ's */
++ IT8152_INTC_PDCNIRR = 0;
++ IT8152_INTC_LPCNIRR = 0;
++#endif
++
++ /* save MSC registers */
++ sleep_save_msc[0] = MSC0;
++ sleep_save_msc[1] = MSC1;
++ sleep_save_msc[2] = MSC2;
++
++ /* setup power saving mode registers */
++ PCFR = 0x0;
++ PSLR = 0xff400000;
++ PMCR = 0x00000005;
++ PWER = 0x80000000;
++ PFER = 0x00000000;
++ PRER = 0x00000000;
++ PGSR0 = 0xC0018800;
++ PGSR1 = 0x004F0002;
++ PGSR2 = 0x6021C000;
++ PGSR3 = 0x00020000;
++
++ return 0;
++}
++
++static int cmx270_resume(struct sys_device *dev)
++{
++#ifdef CONFIG_PCI
++ /* restore IT8152 state */
++ IT8152_INTC_PDCNIMR = sleep_save_ite[0];
++ IT8152_INTC_LPCNIMR = sleep_save_ite[1];
++ IT8152_INTC_LPNIAR = sleep_save_ite[2];
++#endif
++
++ /* restore MSC registers */
++ MSC0 = sleep_save_msc[0];
++ MSC1 = sleep_save_msc[1];
++ MSC2 = sleep_save_msc[2];
++
++ return 0;
++}
++
++static struct sysdev_class cmx270_pm_sysclass = {
++ set_kset_name("pm"),
++ .resume = cmx270_resume,
++ .suspend = cmx270_suspend,
++};
++
++static struct sys_device cmx270_pm_device = {
++ .cls = &cmx270_pm_sysclass,
++};
++
++static int __init cmx270_pm_init(void)
++{
++ int error;
++ error = sysdev_class_register(&cmx270_pm_sysclass);
++ if (error == 0)
++ error = sysdev_register(&cmx270_pm_device);
++ return error;
++}
++#else
++static int __init cmx270_pm_init(void) { return 0; }
++#endif
++
++static void __init cmx270_init(void)
++{
++ cmx270_pm_init();
++
++ set_pxa_fb_info(cmx270_display);
++
++ /* register CM-X270 platform devices */
++ platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
++
++ /* set MCI and OHCI platform parameters */
++ pxa_set_mci_info(&cmx270_mci_platform_data);
++ pxa_set_ohci_info(&cmx270_ohci_platform_data);
++
++ /* This enables the STUART */
++ pxa_gpio_mode(GPIO46_STRXD_MD);
++ pxa_gpio_mode(GPIO47_STTXD_MD);
++
++ /* This enables the BTUART */
++ pxa_gpio_mode(GPIO42_BTRXD_MD);
++ pxa_gpio_mode(GPIO43_BTTXD_MD);
++ pxa_gpio_mode(GPIO44_BTCTS_MD);
++ pxa_gpio_mode(GPIO45_BTRTS_MD);
++}
++
++#ifdef CONFIG_PCI
++static void cmx270_mask_irq(unsigned int irq)
++{
++ switch(irq) {
++ case IT8152_IRQ(0):
++ IT8152_INTC_PDCNIMR |= PCISERR_BIT;
++ break;
++ case IT8152_IRQ(1):
++ IT8152_INTC_PDCNIMR |= H2PTADR_BIT;
++ break;
++ case IT8152_IRQ(2):
++ IT8152_INTC_PDCNIMR |= H2PMAR_BIT;
++ break;
++ case IT8152_IRQ(3):
++ IT8152_INTC_PDCNIMR |= PCI_INTA_BIT;
++ break;
++ case IT8152_IRQ(4):
++ IT8152_INTC_PDCNIMR |= PCI_INTB_BIT;
++ break;
++ case IT8152_IRQ(5):
++ IT8152_INTC_PDCNIMR |= PCI_INTC_BIT;
++ break;
++ case IT8152_IRQ(6):
++ IT8152_INTC_PDCNIMR |= PCI_INTD_BIT;
++ break;
++ case IT8152_IRQ(7):
++ IT8152_INTC_PDCNIMR |= USB_INT_BIT;
++ break;
++ case IT8152_IRQ(9):
++ IT8152_INTC_PDCNIMR |= CDMA_INT_BIT;
++ break;
++ case IT8152_IRQ(10):
++ IT8152_INTC_LDCNIMR |= ITESER_BIT;
++ break;
++ }
++}
++
++static void cmx270_unmask_irq(unsigned int irq)
++{
++ switch(irq) {
++ case IT8152_IRQ(0):
++ IT8152_INTC_PDCNIMR &= (~PCISERR_BIT);
++ break;
++ case IT8152_IRQ(1):
++ IT8152_INTC_PDCNIMR &= (~H2PTADR_BIT);
++ break;
++ case IT8152_IRQ(2):
++ IT8152_INTC_PDCNIMR &= (~H2PMAR_BIT);
++ break;
++ case IT8152_IRQ(3):
++ IT8152_INTC_PDCNIMR &= (~PCI_INTA_BIT);
++ break;
++ case IT8152_IRQ(4):
++ IT8152_INTC_PDCNIMR &= (~PCI_INTB_BIT);
++ break;
++ case IT8152_IRQ(5):
++ IT8152_INTC_PDCNIMR &= (~PCI_INTC_BIT);
++ break;
++ case IT8152_IRQ(6):
++ IT8152_INTC_PDCNIMR &= (~PCI_INTD_BIT);
++ break;
++ case IT8152_IRQ(7):
++ IT8152_INTC_PDCNIMR &= (~USB_INT_BIT);
++ break;
++ case IT8152_IRQ(9):
++ IT8152_INTC_PDCNIMR &= (~CDMA_INT_BIT);
++ break;
++ case IT8152_IRQ(10):
++ IT8152_INTC_LDCNIMR &= (~ITESER_BIT);
++ break;
++ }
++}
++
++static struct irq_chip cmx270_irq_chip = {
++ .ack = cmx270_mask_irq,
++ .mask = cmx270_mask_irq,
++ .unmask = cmx270_unmask_irq,
++};
++#endif
++
++static void __init cmx270_init_irq(void)
++{
++ int irq;
++
++ pxa27x_init_irq();
++
++ IT8152_INTC_PDCNIMR = 0xffff;
++
++#ifdef CONFIG_PCI
++ /* Disable and clear IRQ's for ITE8152 */
++ IT8152_INTC_PDCNIMR = 0xffff;
++ IT8152_INTC_PDCNIRR = 0;
++ IT8152_INTC_LPCNIMR = 0xffff;
++ IT8152_INTC_LPCNIRR = 0;
++ IT8152_INTC_LDCNIMR = 0xffff;
++ IT8152_INTC_LDCNIRR = 0;
++
++ for(irq = IT8152_IRQ(0); irq <= IT8152_IRQ_MAX; irq++) {
++ set_irq_chip(irq, &cmx270_irq_chip);
++ set_irq_handler(irq, handle_level_irq);
++ set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
++ }
++
++ /* INTC signal from IT8152 is connected to GPIO0 */
++ pxa_gpio_mode(IRQ_GPIO_IT8152_IRQ);
++ set_irq_chained_handler(IRQ_GPIO_IT8152_IRQ, cmx270_irq_demux);
++ set_irq_type(IRQ_GPIO_IT8152_IRQ, IRQT_RISING);
++#endif
++
++ /* Setup interrupt for dm9000 */
++ pxa_gpio_mode(IRQ_TO_GPIO(CMX270_ETHIRQ));
++ set_irq_type(CMX270_ETHIRQ, IRQT_RISING);
++
++ /* Setup interrupt for 2700G */
++ pxa_gpio_mode(IRQ_TO_GPIO(CMX270_GFXIRQ));
++ set_irq_type(CMX270_GFXIRQ, IRQT_FALLING);
++}
++
++static void __init cmx270_map_io(void)
++{
++ pxa_map_io();
++ iotable_init(cmx270_io_desc, ARRAY_SIZE(cmx270_io_desc));
++}
++
++
++MACHINE_START(ARMCORE, "Compulab CM-x270")
++ .boot_params = 0xa0000100,
++ .phys_io = 0x40000000,
++ .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
++ .map_io = cmx270_map_io,
++ .init_irq = cmx270_init_irq,
++ .timer = &pxa_timer,
++ .init_machine = cmx270_init,
++MACHINE_END
+diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
+index 4468cb3..02b04e2 100644
+--- a/drivers/leds/Kconfig
++++ b/drivers/leds/Kconfig
+@@ -87,6 +87,12 @@ config LEDS_H1940
+ help
+ This option enables support for the LEDs on the h1940.
+
++config LEDS_CM_X270
++ tristate "LED Support for the CM-X270 LEDs"
++ depends on LEDS_CLASS && MACH_ARMCORE
++ help
++ This option enables support for the CM-X270 LEDs.
++
+ config LEDS_COBALT
+ tristate "LED Support for Cobalt Server front LED"
+ depends on LEDS_CLASS && MIPS_COBALT
+diff --git a/drivers/leds/Makefile b/drivers/leds/Makefile
+index f8995c9..12a860c 100644
+--- a/drivers/leds/Makefile
++++ b/drivers/leds/Makefile
+@@ -17,6 +17,7 @@ obj-$(CONFIG_LEDS_WRAP) += leds-wrap.o
+ obj-$(CONFIG_LEDS_H1940) += leds-h1940.o
+ obj-$(CONFIG_LEDS_COBALT) += leds-cobalt.o
+ obj-$(CONFIG_LEDS_GPIO) += leds-gpio.o
++obj-$(CONFIG_LEDS_CM_X270) += leds-cm-x270.o
+
+ # LED Triggers
+ obj-$(CONFIG_LEDS_TRIGGER_TIMER) += ledtrig-timer.o
+diff --git a/drivers/leds/leds-cm-x270.c b/drivers/leds/leds-cm-x270.c
+new file mode 100644
+index 0000000..63b7e9e
+--- /dev/null
++++ b/drivers/leds/leds-cm-x270.c
+@@ -0,0 +1,126 @@
++/*
++ * drivers/leds/leds-cm-x270.c
++ *
++ * Copyright 2007 CompuLab Ltd.
++ * Author: Mike Rapoport <mike@compulab.co.il>
++ *
++ * Based on leds-corgi.c
++ * Author: Richard Purdie <rpurdie@openedhand.com>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/platform_device.h>
++#include <linux/leds.h>
++
++#include <asm/arch/hardware.h>
++#include <asm/arch/pxa-regs.h>
++
++#define GPIO_RED_LED (93)
++#define GPIO_GREEN_LED (94)
++
++#define CMX270_RED_ON() GPCR(GPIO_RED_LED) = GPIO_bit(GPIO_RED_LED)
++#define CMX270_RED_OFF() GPSR(GPIO_RED_LED) = GPIO_bit(GPIO_RED_LED)
++#define CMX270_GREEN_ON() GPCR(GPIO_GREEN_LED) = GPIO_bit(GPIO_GREEN_LED)
++#define CMX270_GREEN_OFF() GPSR(GPIO_GREEN_LED) = GPIO_bit(GPIO_GREEN_LED)
++
++
++static void cmx270_red_set(struct led_classdev *led_cdev, enum led_brightness value)
++{
++ if (value)
++ CMX270_RED_ON();
++ else
++ CMX270_RED_OFF();
++}
++
++static void cmx270_green_set(struct led_classdev *led_cdev, enum led_brightness value)
++{
++ if (value)
++ CMX270_GREEN_ON();
++ else
++ CMX270_GREEN_OFF();
++}
++
++static struct led_classdev cmx270_red_led = {
++ .name = "cm-x270:red",
++ .default_trigger = "nand-disk",
++ .brightness_set = cmx270_red_set,
++};
++
++static struct led_classdev cmx270_green_led = {
++ .name = "cm-x270:green",
++ .default_trigger = "heartbeat",
++ .brightness_set = cmx270_green_set,
++};
++
++#ifdef CONFIG_PM
++static int cmx270led_suspend(struct platform_device *dev, pm_message_t state)
++{
++ led_classdev_suspend(&cmx270_red_led);
++ led_classdev_suspend(&cmx270_green_led);
++ return 0;
++}
++
++static int cmx270led_resume(struct platform_device *dev)
++{
++ led_classdev_resume(&cmx270_red_led);
++ led_classdev_resume(&cmx270_green_led);
++ return 0;
++}
++#endif
++
++static int cmx270led_probe(struct platform_device *pdev)
++{
++ int ret;
++
++ ret = led_classdev_register(&pdev->dev, &cmx270_red_led);
++ if (ret < 0)
++ return ret;
++
++ ret = led_classdev_register(&pdev->dev, &cmx270_green_led);
++ if (ret < 0)
++ led_classdev_unregister(&cmx270_red_led);
++
++ return ret;
++}
++
++static int cmx270led_remove(struct platform_device *pdev)
++{
++ led_classdev_unregister(&cmx270_red_led);
++ led_classdev_unregister(&cmx270_green_led);
++ return 0;
++}
++
++static struct platform_driver cmx270led_driver = {
++ .probe = cmx270led_probe,
++ .remove = cmx270led_remove,
++#ifdef CONFIG_PM
++ .suspend = cmx270led_suspend,
++ .resume = cmx270led_resume,
++#endif
++ .driver = {
++ .name = "cm-x270-led",
++ },
++};
++
++static int __init cmx270led_init(void)
++{
++ return platform_driver_register(&cmx270led_driver);
++}
++
++static void __exit cmx270led_exit(void)
++{
++ platform_driver_unregister(&cmx270led_driver);
++}
++
++module_init(cmx270led_init);
++module_exit(cmx270led_exit);
++
++MODULE_AUTHOR("Richard Purdie <rpurdie@openedhand.com>");
++MODULE_DESCRIPTION("Corgi LED driver");
++MODULE_LICENSE("GPL");
+diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
+index c551925..b34f875 100644
+--- a/drivers/net/Kconfig
++++ b/drivers/net/Kconfig
+@@ -940,6 +940,14 @@ config DM9000
+ <file:Documentation/networking/net-modules.txt>. The module will be
+ called dm9000.
+
++config DM9000_NOEPROM
++ bool "DM9000 without EEPROM attached"
++ depends on DM9000
++ ---help---
++ Select this option if you have DM9000 chipset without EEPROM
++ containing the MAC address. In this case MAC address should
++ be set either by the bootloader or using ifconfig
++
+ config SMC911X
+ tristate "SMSC LAN911[5678] support"
+ select CRC32
+diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
+index 738aa59..2371c6b 100644
+--- a/drivers/net/dm9000.c
++++ b/drivers/net/dm9000.c
+@@ -577,6 +577,7 @@ dm9000_probe(struct platform_device *pdev)
+ db->mii.mdio_read = dm9000_phy_read;
+ db->mii.mdio_write = dm9000_phy_write;
+
++#ifndef CONFIG_DM9000_NOEPROM
+ /* Read SROM content */
+ for (i = 0; i < 64; i++)
+ ((u16 *) db->srom)[i] = read_srom_word(db, i);
+@@ -584,6 +585,11 @@ dm9000_probe(struct platform_device *pdev)
+ /* Set Node Address */
+ for (i = 0; i < 6; i++)
+ ndev->dev_addr[i] = db->srom[i];
++#else
++ /* The Node Address was set by bootloader */
++ for (i=0; i<6; i++)
++ ndev->dev_addr[i] = ior(db, 0x10+i);
++#endif
+
+ if (!is_valid_ether_addr(ndev->dev_addr)) {
+ /* try reading from mac */
+diff --git a/include/asm-arm/arch-pxa/cm-x270.h b/include/asm-arm/arch-pxa/cm-x270.h
+new file mode 100644
+index 0000000..24613a5
+--- /dev/null
++++ b/include/asm-arm/arch-pxa/cm-x270.h
+@@ -0,0 +1,71 @@
++/*
++ * linux/include/asm/arch-pxa/armcore.h
++ *
++ * Compulab Ltd., 2003
++ *
++ * ARMCore registers
++ */
++
++
++#define CMX270_CS1_PHYS (PXA_CS1_PHYS)
++#define MARATHON_PHYS (PXA_CS2_PHYS)
++#define CMX270_IDE104_PHYS (PXA_CS3_PHYS)
++#define CMX270_IT8152_PHYS (PXA_CS4_PHYS)
++
++#define PXA_CS_SIZE (64*1024*1024)
++
++/* Virtual map */
++
++#define CMX270_VIRT_BASE (0xe8000000)
++
++#define CMX270_IT8152_VIRT (CMX270_VIRT_BASE)
++#define CMX270_IDE104_VIRT (CMX270_IT8152_VIRT + PXA_CS_SIZE)
++
++
++/* GPIO related definitions */
++#define GPIO_IT8152_IRQ (22)
++#define GPIO_RED_LED (93)
++#define GPIO_GREEN_LED (94)
++
++
++#define IRQ_GPIO_IT8152_IRQ IRQ_GPIO(GPIO_IT8152_IRQ)
++#define PME_IRQ IRQ_GPIO(0)
++#define CMX270_IDE_IRQ IRQ_GPIO(100)
++#define CMX270_GPIRQ1 IRQ_GPIO(101)
++#define CMX270_TOUCHIRQ IRQ_GPIO(96)
++#define CMX270_ETHIRQ IRQ_GPIO(10)
++#define CMX270_GFXIRQ IRQ_GPIO(95)
++#define CMX270_NANDIRQ IRQ_GPIO(89)
++#define CMX270_MMC_IRQ IRQ_GPIO(83)
++
++/* LED macros */
++#define CMX270_RED_ON() GPCR(GPIO_RED_LED) = GPIO_bit(GPIO_RED_LED)
++#define CMX270_RED_OFF() GPSR(GPIO_RED_LED) = GPIO_bit(GPIO_RED_LED)
++#define CMX270_GREEN_ON() GPCR(GPIO_GREEN_LED) = GPIO_bit(GPIO_GREEN_LED)
++#define CMX270_GREEN_OFF() GPSR(GPIO_GREEN_LED) = GPIO_bit(GPIO_GREEN_LED)
++
++/* PCMCIA related definitions */
++#define PCC_DETECT(x) (GPLR(84 - (x)) & GPIO_bit(84 - (x)))
++#define PCC_READY(x) (GPLR(82 - (x)) & GPIO_bit(81 - (x)))
++
++#define PCMCIA_S0_CD_VALID IRQ_GPIO(84)
++#define PCMCIA_S0_CD_VALID_EDGE GPIO_BOTH_EDGES
++
++#define PCMCIA_S1_CD_VALID IRQ_GPIO(83)
++#define PCMCIA_S1_CD_VALID_EDGE GPIO_BOTH_EDGES
++
++#define PCMCIA_S0_RDYINT IRQ_GPIO(82)
++#define PCMCIA_S1_RDYINT IRQ_GPIO(81)
++
++#define PCMCIA_RESET_GPIO 53
++
++
++
++
++
++
++
++
++
++
++
+diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h
+index 3861217..beb240e 100644
+--- a/include/asm-arm/arch-pxa/hardware.h
++++ b/include/asm-arm/arch-pxa/hardware.h
+@@ -126,4 +126,15 @@ extern unsigned int get_lcdclk_frequency_10khz(void);
+
+ #endif
+
++#if defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
++#define HAVE_ARCH_PCI_SET_DMA_MASK
++#ifndef __ASSEMBLY__
++extern unsigned long armcore_pcibios_min_io;
++extern unsigned long armcore_pcibios_min_mem;
++#endif
++#define PCIBIOS_MIN_IO (armcore_pcibios_min_io)
++#define PCIBIOS_MIN_MEM (armcore_pcibios_min_mem)
++#define pcibios_assign_all_busses() 1
++#endif
++
+ #endif /* _ASM_ARCH_HARDWARE_H */
+diff --git a/include/asm-arm/arch-pxa/irqs.h b/include/asm-arm/arch-pxa/irqs.h
+index a07fe0f..efb3d42 100644
+--- a/include/asm-arm/arch-pxa/irqs.h
++++ b/include/asm-arm/arch-pxa/irqs.h
+@@ -216,3 +216,23 @@
+ #define IRQ_LOCOMO_GPIO_BASE (IRQ_BOARD_START + 1)
+ #define IRQ_LOCOMO_LT_BASE (IRQ_BOARD_START + 2)
+ #define IRQ_LOCOMO_SPI_BASE (IRQ_BOARD_START + 3)
++
++/* ITE8152 irqs on CM-x2xx */
++#ifdef CONFIG_MACH_ARMCORE
++#define IT8152_IRQ(x) (IRQ_BOARD_START + (x))
++#define PCISERR IT8152_IRQ(0)
++#define H2PTADR IT8152_IRQ(1)
++#define H2PMAR IT8152_IRQ(2)
++#define PCI_INTA IT8152_IRQ(3)
++#define PCI_INTB IT8152_IRQ(4)
++#define PCI_INTC IT8152_IRQ(5)
++#define PCI_INTD IT8152_IRQ(6)
++#define USB_INT IT8152_IRQ(7)
++#define AUDIO_INT IT8152_IRQ(8)
++#define CDMA_INT IT8152_IRQ(9)
++#define IRQ_ITESER IT8152_IRQ(10)
++#define IT8152_IRQ_MAX IT8152_IRQ(10)
++
++#undef NR_IRQS
++#define NR_IRQS IT8152_IRQ_MAX+1
++#endif
+diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h
+index d9bfb39..83db3cb 100644
+--- a/include/asm-arm/memory.h
++++ b/include/asm-arm/memory.h
+@@ -141,6 +141,16 @@
+ * allocations. This must be the smallest DMA mask in the system,
+ * so a successful GFP_DMA allocation will always satisfy this.
+ */
++
++#ifdef CONFIG_PCI_HOST_ITE8152
++void it8152_adjust_zones(int node, unsigned long *size, unsigned long *holes);
++
++#define arch_adjust_zones(node, size, holes) \
++ it8152_adjust_zones(node, size, holes)
++
++#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_64M - 1)
++#endif
++
+ #ifndef ISA_DMA_THRESHOLD
+ #define ISA_DMA_THRESHOLD (0xffffffffULL)
+ #endif
+--
+1.5.2.5
+
diff --git a/packages/linux/linux-2.6.23/cm-x270/0002-cm-x270-match-type.patch b/packages/linux/linux-2.6.23/cm-x270/0002-cm-x270-match-type.patch
new file mode 100644
index 0000000000..981cef9207
--- /dev/null
+++ b/packages/linux/linux-2.6.23/cm-x270/0002-cm-x270-match-type.patch
@@ -0,0 +1,25 @@
+From d4e9090a5ff36090402d0c336804f061f391f5de Mon Sep 17 00:00:00 2001
+From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
+Date: Fri, 20 Jul 2007 18:58:27 -0400
+Subject: [PATCH] cm-x270-match-type
+
+---
+ arch/arm/boot/compressed/head-xscale.S | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S
+index 236bbe5..7ae9de1 100644
+--- a/arch/arm/boot/compressed/head-xscale.S
++++ b/arch/arm/boot/compressed/head-xscale.S
+@@ -48,3 +48,8 @@ __XScale_start:
+ str r1, [r0, #0x18]
+ #endif
+
++#if defined(CONFIG_MACH_ARMCORE)
++ mov r7, #(MACH_TYPE_ARMCORE & 0xFF00)
++ add r7, r7, #(MACH_TYPE_ARMCORE & 0xFF)
++#endif
++
+--
+1.5.2.5
+
diff --git a/packages/linux/linux-2.6.23/cm-x270/0003-cm-x270-ide.patch b/packages/linux/linux-2.6.23/cm-x270/0003-cm-x270-ide.patch
new file mode 100644
index 0000000000..5c5c39499c
--- /dev/null
+++ b/packages/linux/linux-2.6.23/cm-x270/0003-cm-x270-ide.patch
@@ -0,0 +1,186 @@
+From c07ab3ce1c18437c480c3cec96da210434629c74 Mon Sep 17 00:00:00 2001
+From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
+Date: Fri, 20 Jul 2007 18:59:39 -0400
+Subject: [PATCH] cm-x270-ide
+
+---
+ drivers/ide/Kconfig | 8 +++
+ drivers/ide/arm/Makefile | 1 +
+ drivers/ide/arm/cm-x270-ide.c | 135 +++++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 144 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/ide/arm/cm-x270-ide.c
+
+diff --git a/drivers/ide/Kconfig b/drivers/ide/Kconfig
+index 4200251..ab3a29e 100644
+--- a/drivers/ide/Kconfig
++++ b/drivers/ide/Kconfig
+@@ -866,6 +866,14 @@ config BLK_DEV_IDE_BAST
+ Say Y here if you want to support the onboard IDE channels on the
+ Simtec BAST or the Thorcom VR1000
+
++config BLK_DEV_IDE_CM_X270
++ tristate "CompuLab CM-X270 IDE support"
++ depends on ARM && (MACH_ARMCORE)
++ help
++ Say Y here if you want to support the onboard IDE channels on the
++ CompuLab CM-X270 module
++
++
+ config BLK_DEV_GAYLE
+ bool "Amiga Gayle IDE interface support"
+ depends on AMIGA
+diff --git a/drivers/ide/arm/Makefile b/drivers/ide/arm/Makefile
+index 6a78f07..e5cadb7 100644
+--- a/drivers/ide/arm/Makefile
++++ b/drivers/ide/arm/Makefile
+@@ -2,5 +2,6 @@
+ obj-$(CONFIG_BLK_DEV_IDE_ICSIDE) += icside.o
+ obj-$(CONFIG_BLK_DEV_IDE_RAPIDE) += rapide.o
+ obj-$(CONFIG_BLK_DEV_IDE_BAST) += bast-ide.o
++obj-$(CONFIG_BLK_DEV_IDE_CM_X270) += cm-x270-ide.o
+
+ EXTRA_CFLAGS := -Idrivers/ide
+diff --git a/drivers/ide/arm/cm-x270-ide.c b/drivers/ide/arm/cm-x270-ide.c
+new file mode 100644
+index 0000000..a8b15aa
+--- /dev/null
++++ b/drivers/ide/arm/cm-x270-ide.c
+@@ -0,0 +1,135 @@
++/* linux/drivers/ide/arm/cm-x270-ide.c
++ *
++ * Copyright (c) 2006 CompuLab, Ltd
++ * Mike Rapoport <mike@compulab.co.il>
++ *
++ * Based on linux/drivers/ide/arm/bast-ide.c
++ * Copyright (c) 2003-2004 Simtec Electronics
++ * Ben Dooks <ben@simtec.co.uk>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ */
++
++#include <linux/module.h>
++#include <linux/errno.h>
++#include <linux/ide.h>
++#include <linux/init.h>
++#include <linux/irq.h>
++
++#include <asm/mach-types.h>
++
++#include <asm/io.h>
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/cm-x270.h>
++
++#define CMX270_SB270_IDECS0_VIRT (CMX270_IDE104_VIRT + (1<<24) + (1<<25))
++#define CMX270_SB270_IDECS1_VIRT (CMX270_IDE104_VIRT + (1<<25))
++#define CMX270_ATX_IDECS0_VIRT (CMX270_IDE104_VIRT + (1<<25))
++#define CMX270_ATX_IDECS1_VIRT (CMX270_IDE104_VIRT + (1<<25) + (1<<22))
++
++/* list of registered interfaces */
++static ide_hwif_t *ifs[1];
++
++static int __init
++cmx270_ide_register(unsigned int base, unsigned int aux, int irq,
++ ide_hwif_t **hwif)
++{
++ hw_regs_t hw;
++
++ memset(&hw, 0, sizeof(hw));
++
++ if(!base || !aux) return -EINVAL;
++
++ printk(KERN_DEBUG "%s: base = %08x, aux = %08x\n", __FUNCTION__,
++ base, aux);
++
++ /* Different mappings for local bus IDE and PCMCIA IDE */
++ if(base == CMX270_SB270_IDECS0_VIRT) {
++ hw.io_ports[IDE_DATA_OFFSET] = base + 0;
++ hw.io_ports[IDE_ERROR_OFFSET] = base + (0x1<<3);
++ hw.io_ports[IDE_NSECTOR_OFFSET]= base + (0x2<<3);
++ hw.io_ports[IDE_SECTOR_OFFSET]= base + (0x3<<3);
++ hw.io_ports[IDE_LCYL_OFFSET]= base + (0x4<<3);
++ hw.io_ports[IDE_HCYL_OFFSET]= base + (0x5<<3);
++ hw.io_ports[IDE_SELECT_OFFSET]= base + (0x6<<3);
++ hw.io_ports[IDE_STATUS_OFFSET]= base + (0x7<<3);
++ hw.io_ports[IDE_CONTROL_OFFSET] = aux+(0x6<<3);
++ }
++ else if (base == CMX270_ATX_IDECS0_VIRT) { /* atx base */
++ hw.io_ports[IDE_DATA_OFFSET] = base + 0;
++ hw.io_ports[IDE_ERROR_OFFSET] = base + 8;
++ hw.io_ports[IDE_NSECTOR_OFFSET]= base + 2;
++ hw.io_ports[IDE_SECTOR_OFFSET]= base + 10;
++ hw.io_ports[IDE_LCYL_OFFSET]= base + 4;
++ hw.io_ports[IDE_HCYL_OFFSET]= base + 12;
++ hw.io_ports[IDE_SELECT_OFFSET]= base + 6; //6;
++ hw.io_ports[IDE_STATUS_OFFSET]= base + 14;
++ hw.io_ports[IDE_CONTROL_OFFSET] = (aux+0x6);
++ } else {
++ printk(KERN_DEBUG "%s: registering wrong IDE i/f\n", __FUNCTION__);
++ hw.io_ports[IDE_DATA_OFFSET] = base + 8;
++ hw.io_ports[IDE_ERROR_OFFSET] = base + 13;
++ hw.io_ports[IDE_NSECTOR_OFFSET] = base + 2;
++ hw.io_ports[IDE_SECTOR_OFFSET] = base + 3;
++ hw.io_ports[IDE_LCYL_OFFSET] = base + 4;
++ hw.io_ports[IDE_HCYL_OFFSET] = base + 5;
++ hw.io_ports[IDE_SELECT_OFFSET] = base + 6;
++ hw.io_ports[IDE_STATUS_OFFSET] = base + 7;
++ hw.io_ports[IDE_CONTROL_OFFSET] = aux;
++ }
++
++ hw.irq = irq;
++
++ return ide_register_hw(&hw, hwif);
++}
++
++static int __init cmx270_ide_init(void)
++{
++ int retval = 0;
++
++ if (!(machine_is_armcore()))
++ goto out;
++
++ printk("CM-X270: initializing IDE interface\n");
++
++ MSC1 = 0x7ffc7ff4;
++
++ /* Interrupts on rising edge: lines are inverted before they get to
++ the PXA */
++ pxa_gpio_mode(IRQ_TO_GPIO(CMX270_IDE_IRQ));
++
++ /* try SB-X270 */
++ set_irq_type(CMX270_IDE_IRQ, IRQ_TYPE_EDGE_RISING);
++ retval = cmx270_ide_register(CMX270_SB270_IDECS0_VIRT,
++ CMX270_SB270_IDECS1_VIRT,
++ CMX270_IDE_IRQ, &ifs[0]);
++ if (retval >= 0) {
++ printk(KERN_DEBUG "%s: found IDE interface on SB-X270\n",
++ __FUNCTION__);
++ goto out;
++ }
++
++ /* SB-X270 detection failed, try ATX */
++ set_irq_type(CMX270_IDE_IRQ, IRQ_TYPE_EDGE_FALLING);
++ retval = cmx270_ide_register(CMX270_ATX_IDECS0_VIRT,
++ CMX270_ATX_IDECS1_VIRT,
++ CMX270_IDE_IRQ, &ifs[0]);
++
++ if ( retval >= 0 ) {
++ printk(KERN_DEBUG "%s: found IDE interface on ATX\n",
++ __FUNCTION__);
++ goto out;
++ }
++
++ out:
++ return retval;
++}
++
++module_init(cmx270_ide_init);
++
++MODULE_AUTHOR("CompuLab");
++MODULE_LICENSE("GPL");
++MODULE_DESCRIPTION("CompuLab CM-X270 IDE driver");
+--
+1.5.2.5
+
diff --git a/packages/linux/linux-2.6.23/cm-x270/0004-cm-x270-it8152.patch b/packages/linux/linux-2.6.23/cm-x270/0004-cm-x270-it8152.patch
new file mode 100644
index 0000000000..8235c2948f
--- /dev/null
+++ b/packages/linux/linux-2.6.23/cm-x270/0004-cm-x270-it8152.patch
@@ -0,0 +1,496 @@
+From 09963a3271b9da8e937e64774fe81454b35d31fd Mon Sep 17 00:00:00 2001
+From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
+Date: Fri, 20 Jul 2007 19:00:07 -0400
+Subject: [PATCH] cm-x270-it8152
+
+---
+ arch/arm/common/Makefile | 1 +
+ arch/arm/common/it8152.c | 272 +++++++++++++++++++++++++++++++++++++
+ arch/arm/kernel/bios32.c | 28 ++++-
+ include/asm-arm/hardware/it8152.h | 104 ++++++++++++++
+ include/asm-arm/pci.h | 7 +
+ include/linux/pci_ids.h | 1 +
+ 6 files changed, 410 insertions(+), 3 deletions(-)
+ create mode 100644 arch/arm/common/it8152.c
+ create mode 100644 include/asm-arm/hardware/it8152.h
+
+diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
+index e1289a2..3d0b9fa 100644
+--- a/arch/arm/common/Makefile
++++ b/arch/arm/common/Makefile
+@@ -17,3 +17,4 @@ obj-$(CONFIG_SHARPSL_PM) += sharpsl_pm.o
+ obj-$(CONFIG_SHARP_SCOOP) += scoop.o
+ obj-$(CONFIG_ARCH_IXP2000) += uengine.o
+ obj-$(CONFIG_ARCH_IXP23XX) += uengine.o
++obj-$(CONFIG_PCI_HOST_ITE8152) += it8152.o
+diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
+new file mode 100644
+index 0000000..8563610
+--- /dev/null
++++ b/arch/arm/common/it8152.c
+@@ -0,0 +1,272 @@
++/*
++ * arch/arm/common/it8152.c: PCI functions for IT8152
++ *
++ * Compulab Ltd, 2002-2006
++ *
++ * The DMA bouncing is taken from arch/arm/mach-ixp4xx/common-pci.c
++ * (see this file for respective copyrights)
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ */
++
++#include <linux/sched.h>
++#include <linux/kernel.h>
++#include <linux/pci.h>
++#include <linux/ptrace.h>
++#include <linux/interrupt.h>
++#include <linux/mm.h>
++#include <linux/slab.h>
++#include <linux/init.h>
++#include <linux/ioport.h>
++#include <asm/mach/map.h>
++
++
++#include <asm/io.h>
++#include <asm/irq.h>
++#include <asm/system.h>
++#include <asm/mach/pci.h>
++#include <asm/hardware/it8152.h>
++
++#define MAX_SLOTS 21
++
++static unsigned long
++it8152_pci_dev_base_address(struct pci_bus *bus, unsigned int devfn)
++{
++ unsigned long addr = 0;
++
++ if (bus->number == 0) {
++ if (devfn < PCI_DEVFN(MAX_SLOTS, 0))
++ addr = (devfn << 8);
++ } else
++ addr = (bus->number << 16) | (devfn << 8);
++
++ return addr;
++}
++
++static int
++it8152_pci_read_config(struct pci_bus *bus, unsigned int devfn, int where,
++ int size, u32 *value)
++{
++ unsigned long addr = it8152_pci_dev_base_address(bus, devfn);
++ u32 v;
++ int shift;
++
++#ifdef CONFIG_MACH_ARMCORE
++ if(devfn!=0) IT8152_GPIO_GPLR=0x00;
++#endif
++ shift = (where & 3);
++
++ IT8152_PCI_CFG_ADDR = (addr + where);
++ v = (IT8152_PCI_CFG_DATA >> (8 * (shift)));
++
++ *value = v;
++
++#ifdef CONFIG_MACH_ARMCORE
++ if(devfn!=0) IT8152_GPIO_GPLR=0x20;
++#endif
++
++ return PCIBIOS_SUCCESSFUL;
++}
++
++
++static int
++it8152_pci_write_config(struct pci_bus *bus, unsigned int devfn, int where,
++ int size, u32 value)
++{
++ unsigned long addr = it8152_pci_dev_base_address(bus, devfn);
++ u32 v, vtemp, mask=0;
++ int shift;
++
++#ifdef CONFIG_MACH_ARMCORE
++ if(devfn!=0) IT8152_GPIO_GPLR=0x00;
++#endif
++
++ if(size==1) mask=0xff;
++ if(size==2) mask=0xffff;
++
++ shift = (where & 3);
++
++ IT8152_PCI_CFG_ADDR = addr + where;
++ vtemp = IT8152_PCI_CFG_DATA;
++
++ if(mask) vtemp &= ~(mask << (8 * shift));
++ else vtemp = 0;
++
++ v = (value << (8 * shift));
++ IT8152_PCI_CFG_ADDR = addr + where;
++ IT8152_PCI_CFG_DATA = (v | vtemp);
++
++#ifdef CONFIG_MACH_ARMCORE
++ if(devfn!=0) IT8152_GPIO_GPLR=0x20;
++#endif
++
++ return PCIBIOS_SUCCESSFUL;
++}
++
++static struct pci_ops it8152_ops = {
++ .read = it8152_pci_read_config,
++ .write = it8152_pci_write_config,
++};
++
++static struct resource it8152_io = {
++ .name = "IT8152 PCI I/O region",
++ .flags = IORESOURCE_IO,
++};
++
++static struct resource it8152_mem1 = {
++ .name = "First IT8152 PCI memory region",
++ .start = 0x10000000,
++ .end = 0x13e00000,
++ .flags = IORESOURCE_MEM,
++};
++
++/*
++ * The following functions are needed for DMA bouncing.
++ * ITE8152 chip can addrees up to 64MByte, so all the devices
++ * connected to ITE8152 (PCI and USB) should have limited DMA window
++ */
++
++/*
++ * Setup DMA mask to 64MB on devices connected to ITE8152. Ignore all
++ * other devices.
++ */
++static int it8152_pci_platform_notify(struct device *dev)
++{
++ if ( dev->bus == &pci_bus_type ) {
++ if ( dev->dma_mask )
++ *dev->dma_mask = (SZ_64M - 1) | PHYS_OFFSET;
++ dev->coherent_dma_mask = (SZ_64M - 1) | PHYS_OFFSET;
++ dmabounce_register_dev(dev, 2048, 4096);
++ }
++ return 0;
++}
++
++static int it8152_pci_platform_notify_remove(struct device *dev)
++{
++ if ( dev->bus == &pci_bus_type ) {
++ dmabounce_unregister_dev(dev);
++ }
++ return 0;
++}
++
++int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
++{
++ dev_dbg(dev, "%s: dma_addr %08x, size %08x\n",
++ __FUNCTION__, dma_addr, size);
++ return (dev->bus == &pci_bus_type ) &&
++ ((dma_addr + size - PHYS_OFFSET) >= SZ_64M);
++}
++
++/*
++ * Only first 64MB of memory can be accessed via PCI.
++ * We use GFP_DMA to allocate safe buffers to do map/unmap.
++ * This is really ugly and we need a better way of specifying
++ * DMA-capable regions of memory.
++ */
++void __init it8152_adjust_zones(int node, unsigned long *zone_size,
++ unsigned long *zhole_size)
++{
++ unsigned int sz = SZ_64M >> PAGE_SHIFT;
++
++ /*
++ * Only adjust if > 64M on current system
++ */
++ if (node || (zone_size[0] <= sz))
++ return;
++
++ zone_size[1] = zone_size[0] - sz;
++ zone_size[0] = sz;
++ zhole_size[1] = zhole_size[0];
++ zhole_size[0] = 0;
++}
++
++/*
++ * We override these so we properly do dmabounce otherwise drivers
++ * are able to set the dma_mask to 0xffffffff and we can no longer
++ * trap bounces. :(
++ *
++ * We just return true on everyhing except for < 64MB in which case
++ * we will fail miseralby and die since we can't handle that case.
++ */
++int
++pci_set_dma_mask(struct pci_dev *dev, u64 mask)
++{
++ printk(KERN_INFO "===> %s: %s %x\n", __FUNCTION__, dev->dev.bus_id, mask);
++ if (mask >= PHYS_OFFSET + SZ_64M - 1 )
++ return 0;
++
++ return -EIO;
++}
++
++int
++pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
++{
++ printk(KERN_INFO "===> %s: %s %x\n", __FUNCTION__, dev->dev.bus_id, mask);
++ if (mask >= PHYS_OFFSET + SZ_64M - 1 )
++ return 0;
++
++ return -EIO;
++}
++
++EXPORT_SYMBOL(pci_set_dma_mask);
++EXPORT_SYMBOL(pci_set_consistent_dma_mask);
++
++
++int __init it8152_pci_setup(int nr, struct pci_sys_data *sys)
++{
++ it8152_io.start = IT8152_IO_BASE + 0x12000;
++ it8152_io.end = IT8152_IO_BASE + 0x100000;
++
++ if (request_resource(&ioport_resource, &it8152_io)) {
++ printk(KERN_ERR "PCI: unable to allocate IO region\n");
++ return -EBUSY;
++ }
++ if (request_resource(&iomem_resource, &it8152_mem1)) {
++ printk(KERN_ERR "PCI: unable to allocate memory region\n");
++ return -EBUSY;
++ }
++
++ sys->resource[0] = &it8152_io;
++ sys->resource[1] = &it8152_mem1;
++
++ if (platform_notify || platform_notify_remove) {
++ printk(KERN_ERR "PCI: Can't use platform_notify\n");
++ return -EBUSY;
++ }
++
++ platform_notify = it8152_pci_platform_notify;
++ platform_notify_remove = it8152_pci_platform_notify_remove;
++
++ return 1;
++}
++
++/*
++ * If we set up a device for bus mastering, we need to check the latency
++ * timer as we don't have even crappy BIOSes to set it properly.
++ * The implementation is from arch/i386/pci/i386.c
++ */
++unsigned int pcibios_max_latency = 255;
++
++void pcibios_set_master(struct pci_dev *dev)
++{
++ u8 lat;
++
++ pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
++ if (lat < 16)
++ lat = (64 <= pcibios_max_latency) ? 64 : pcibios_max_latency;
++ else if (lat > pcibios_max_latency)
++ lat = pcibios_max_latency;
++ else
++ return;
++ printk(KERN_DEBUG "PCI: Setting latency timer of device %s to %d\n", pci_name(dev), lat);
++ pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat);
++}
++
++
++struct pci_bus * __init it8152_pci_scan_bus(int nr, struct pci_sys_data *sys)
++{
++ return pci_scan_bus(nr, &it8152_ops, sys);
++}
++
+diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
+index a2dd930..4dc5de4 100644
+--- a/arch/arm/kernel/bios32.c
++++ b/arch/arm/kernel/bios32.c
+@@ -279,6 +279,25 @@ static void __devinit pci_fixup_cy82c693(struct pci_dev *dev)
+ }
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, pci_fixup_cy82c693);
+
++static void __init pci_fixup_it8152(struct pci_dev *dev)
++{
++ int i;
++ /* fixup for ITE 8152 devices */
++ /* FIXME: add defines for class 0x68000 and 0x80103 */
++ if ((dev->class >> 8) == PCI_CLASS_BRIDGE_HOST ||
++ dev->class == 0x68000 ||
++ dev->class == 0x80103) {
++ for (i = 0; i < PCI_NUM_RESOURCES; i++) {
++ dev->resource[i].start = 0;
++ dev->resource[i].end = 0;
++ dev->resource[i].flags = 0;
++ }
++ }
++}
++DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8152, pci_fixup_it8152);
++
++
++
+ void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
+ {
+ if (debug_pci)
+@@ -292,9 +311,12 @@ void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
+ */
+ static inline int pdev_bad_for_parity(struct pci_dev *dev)
+ {
+- return (dev->vendor == PCI_VENDOR_ID_INTERG &&
+- (dev->device == PCI_DEVICE_ID_INTERG_2000 ||
+- dev->device == PCI_DEVICE_ID_INTERG_2010));
++ return ((dev->vendor == PCI_VENDOR_ID_INTERG &&
++ (dev->device == PCI_DEVICE_ID_INTERG_2000 ||
++ dev->device == PCI_DEVICE_ID_INTERG_2010)) ||
++ (dev->vendor == PCI_VENDOR_ID_ITE &&
++ dev->device == PCI_DEVICE_ID_ITE_8152));
++
+ }
+
+ /*
+diff --git a/include/asm-arm/hardware/it8152.h b/include/asm-arm/hardware/it8152.h
+new file mode 100644
+index 0000000..d28210d
+--- /dev/null
++++ b/include/asm-arm/hardware/it8152.h
+@@ -0,0 +1,104 @@
++/*
++ * arch/arm/mach-pxa/it8152.h
++ *
++ * Compulab Ltd., 2006
++ *
++ * ITE 8152 companion chip definitions
++ */
++
++
++/* #define CMX270_IT8152_VIRT (CMX270_VIRT_BASE) */
++
++
++extern unsigned long it8152_base_address;
++
++#define IT8152_IO_BASE (it8152_base_address + 0x03e00000)
++#define IT8152_CFGREG_BASE (it8152_base_address + 0x03f00000)
++
++/* #define IRQ_GPIO_IT8152_IRQ IRQ_GPIO(GPIO_IT8152_IRQ) */
++
++#define IT8152_SHORT_IO(x) (*((volatile unsigned short *)(IT8152_CFGREG_BASE+(x))))
++#define IT8152_LONG_IO(x) (*((volatile unsigned long *)(IT8152_CFGREG_BASE+(x))))
++
++
++#define IT8152_PCI_MEMBASE (*((volatile unsigned long *)(it8152_base_address)))
++/* #define IT8152_PCI_IOBASE (*((volatile unsigned long *)(it8152_base_address + 0x3e00000))) */
++
++#define IT8152_PCI_IACK (*((volatile unsigned long *)(it8152_base_address + 0x3f00808)))
++#define IT8152_PCI_CFG_ADDR (*((volatile unsigned long *)(it8152_base_address + 0x3f00800)))
++#define IT8152_PCI_CFG_DATA (*((volatile unsigned long *)(it8152_base_address + 0x3f00804)))
++
++#define IT_BUSNUM_SHF 16
++#define IT_DEVNUM_SHF 11
++#define IT_FUNCNUM_SHF 8
++#define IT_REGNUM_SHF 2
++
++/* Power management & PLL registers */
++#define IT8152_PMPLL_DSR IT8152_LONG_IO(0x00)
++#define IT8152_PMPLL_DSSR IT8152_LONG_IO(0x04)
++#define IT8152_PMPLL_PLLCR IT8152_LONG_IO(0x20)
++#define IT8152_PMPLL_MFSR IT8152_LONG_IO(0x24)
++
++/* Memory controller */
++#define IT8152_MC_REG_OFFSET 0x100
++
++#define IT8152_MC_SDCR IT8152_LONG_IO(IT8152_MC_REG_OFFSET + 0x00)
++#define IT8152_MC_PCICR IT8152_LONG_IO(IT8152_MC_REG_OFFSET + 0x04)
++
++/* Interrupt related definitions */
++#define IT8152_INTC_REG_OFFSET 0x300
++
++#define IT8152_INTC_LDCNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x00)
++#define IT8152_INTC_LDPNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x04)
++#define IT8152_INTC_LDCNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x08)
++#define IT8152_INTC_LDPNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x0C)
++#define IT8152_INTC_LDNITR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x10)
++#define IT8152_INTC_LDNIAR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x14)
++#define IT8152_INTC_LPCNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x20)
++#define IT8152_INTC_LPPNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x24)
++#define IT8152_INTC_LPCNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x28)
++#define IT8152_INTC_LPPNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x2C)
++#define IT8152_INTC_LPNITR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x30)
++#define IT8152_INTC_LPNIAR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x34)
++#define IT8152_INTC_PDCNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x40)
++#define IT8152_INTC_PDPNIRR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x44)
++#define IT8152_INTC_PDCNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x48)
++#define IT8152_INTC_PDPNIMR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x4C)
++#define IT8152_INTC_PDNITR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x50)
++#define IT8152_INTC_PDNIAR IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0x54)
++#define IT8152_INTC_INTC_TYPER IT8152_LONG_IO(IT8152_INTC_REG_OFFSET + 0xFC)
++
++#define IT8152_UART_BASE IT8152_LONG_IO(0x200)
++
++#define IT8152_GPIO_REG_OFFSET 0x500
++
++#define IT8152_GPIO_GPLR IT8152_LONG_IO(IT8152_GPIO_REG_OFFSET)
++#define IT8152_GPIO_GPCR12 IT8152_LONG_IO(IT8152_GPIO_REG_OFFSET + 0x04)
++#define IT8152_GPIO_GPCR34 IT8152_LONG_IO(IT8152_GPIO_REG_OFFSET + 0x08)
++
++
++/* Interrupt bit definitions */
++#define PCISERR_BIT (1<<14)
++#define H2PTADR_BIT (1<<13)
++#define H2PMAR_BIT (1<<12)
++#define PCI_INTD_BIT (1<<11)
++#define PCI_INTC_BIT (1<<10)
++#define PCI_INTB_BIT (1<<9)
++#define PCI_INTA_BIT (1<<8)
++#define CDMA_INT_BIT (1<<2)
++#define USB_INT_BIT (1<<1)
++#define AUDIO_INT_BIT (1<<0)
++
++/* IT8152 UART */
++#define ITESER_BIT (1<<5)
++
++
++
++
++
++
++
++
++
++
++
+diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h
+index ed3f898..75feb15 100644
+--- a/include/asm-arm/pci.h
++++ b/include/asm-arm/pci.h
+@@ -8,10 +8,17 @@
+
+ #define pcibios_scan_all_fns(a, b) 0
+
++#ifdef CONFIG_PCI_HOST_ITE8152
++/* ITE bridge requires setting latency timer to avoid early bus access
++ termination by PIC bus mater devices
++*/
++extern void pcibios_set_master(struct pci_dev *dev);
++#else
+ static inline void pcibios_set_master(struct pci_dev *dev)
+ {
+ /* No special bus mastering setup handling */
+ }
++#endif
+
+ static inline void pcibios_penalize_isa_irq(int irq, int active)
+ {
+diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
+index 55f307f..357390d 100644
+--- a/include/linux/pci_ids.h
++++ b/include/linux/pci_ids.h
+@@ -1629,6 +1629,7 @@
+ #define PCI_DEVICE_ID_ITE_8211 0x8211
+ #define PCI_DEVICE_ID_ITE_8212 0x8212
+ #define PCI_DEVICE_ID_ITE_8213 0x8213
++#define PCI_DEVICE_ID_ITE_8152 0x8152
+ #define PCI_DEVICE_ID_ITE_8872 0x8872
+ #define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886
+
+--
+1.5.2.5
+
diff --git a/packages/linux/linux-2.6.23/cm-x270/0005-cm-x270-pcmcia.patch b/packages/linux/linux-2.6.23/cm-x270/0005-cm-x270-pcmcia.patch
new file mode 100644
index 0000000000..e1653063fd
--- /dev/null
+++ b/packages/linux/linux-2.6.23/cm-x270/0005-cm-x270-pcmcia.patch
@@ -0,0 +1,228 @@
+From 3066303d1e7d8e847de2e46cf3ed04a103715e17 Mon Sep 17 00:00:00 2001
+From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
+Date: Fri, 20 Jul 2007 19:01:27 -0400
+Subject: [PATCH] cm-x270-pcmcia
+
+---
+ drivers/pcmcia/Makefile | 1 +
+ drivers/pcmcia/pxa2xx_cm_x270.c | 198 +++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 199 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/pcmcia/pxa2xx_cm_x270.c
+
+diff --git a/drivers/pcmcia/Makefile b/drivers/pcmcia/Makefile
+index 4276965..353d5b7 100644
+--- a/drivers/pcmcia/Makefile
++++ b/drivers/pcmcia/Makefile
+@@ -69,4 +69,5 @@ sa1100_cs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o
+ pxa2xx_cs-$(CONFIG_ARCH_LUBBOCK) += pxa2xx_lubbock.o sa1111_generic.o
+ pxa2xx_cs-$(CONFIG_MACH_MAINSTONE) += pxa2xx_mainstone.o
+ pxa2xx_cs-$(CONFIG_PXA_SHARPSL) += pxa2xx_sharpsl.o
++pxa2xx_cs-$(CONFIG_MACH_ARMCORE) += pxa2xx_cm_x270.o
+
+diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c
+new file mode 100644
+index 0000000..25e369f
+--- /dev/null
++++ b/drivers/pcmcia/pxa2xx_cm_x270.c
+@@ -0,0 +1,198 @@
++/*
++ * linux/drivers/pcmcia/pxa/pxa_armcore.c
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
++ * Compulab Ltd., 2003
++ *
++ */
++
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/platform_device.h>
++#include <linux/irq.h>
++
++#include <pcmcia/ss.h>
++#include <asm/delay.h>
++#include <asm/hardware.h>
++
++#include <asm/arch/pxa-regs.h>
++#include <asm/arch/cm-x270.h>
++
++#include "soc_common.h"
++
++
++static struct pcmcia_irqs irqs[] = {
++ { 0, PCMCIA_S0_CD_VALID, "PCMCIA0 CD" },
++ { 1, PCMCIA_S1_CD_VALID, "PCMCIA1 CD" },
++};
++
++
++static int
++cmx270_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
++{
++ int return_val=0;
++
++ GPSR(GPIO48_nPOE) = GPIO_bit(GPIO48_nPOE) |
++ GPIO_bit(GPIO49_nPWE) |
++ GPIO_bit(GPIO50_nPIOR) |
++ GPIO_bit(GPIO51_nPIOW) |
++ GPIO_bit(GPIO85_nPCE_1) |
++ GPIO_bit(GPIO54_nPCE_2);
++
++ pxa_gpio_mode(GPIO48_nPOE_MD);
++ pxa_gpio_mode(GPIO49_nPWE_MD);
++ pxa_gpio_mode(GPIO50_nPIOR_MD);
++ pxa_gpio_mode(GPIO51_nPIOW_MD);
++ pxa_gpio_mode(GPIO85_nPCE_1_MD);
++ pxa_gpio_mode(GPIO54_nPCE_2_MD);
++ //pxa_gpio_mode(GPIO79_pSKTSEL_MD); /* REVISIT: s/b dependent on num sockets (on ATX base not routed)*/
++ pxa_gpio_mode(GPIO55_nPREG_MD);
++ pxa_gpio_mode(GPIO56_nPWAIT_MD);
++ pxa_gpio_mode(GPIO57_nIOIS16_MD);
++
++ // Reset signal
++ GPDR(GPIO53_nPCE_2) |= GPIO_bit(GPIO53_nPCE_2);
++ GPCR(GPIO53_nPCE_2) = GPIO_bit(GPIO53_nPCE_2);
++
++ GPDR(IRQ_TO_GPIO(PCMCIA_S0_CD_VALID)) &= ~GPIO_bit(IRQ_TO_GPIO(PCMCIA_S0_CD_VALID));
++ GPDR(IRQ_TO_GPIO(PCMCIA_S1_CD_VALID)) &= ~GPIO_bit(IRQ_TO_GPIO(PCMCIA_S1_CD_VALID));
++
++ set_irq_type(PCMCIA_S0_CD_VALID, IRQ_TYPE_EDGE_BOTH);
++ set_irq_type(PCMCIA_S1_CD_VALID, IRQ_TYPE_EDGE_BOTH);
++
++ //irq's for slots:
++ GPDR(IRQ_TO_GPIO(PCMCIA_S0_RDYINT)) &= ~GPIO_bit(IRQ_TO_GPIO(PCMCIA_S0_RDYINT));
++ GPDR(IRQ_TO_GPIO(PCMCIA_S1_RDYINT)) &= ~GPIO_bit(IRQ_TO_GPIO(PCMCIA_S1_RDYINT));
++
++ set_irq_type(PCMCIA_S0_RDYINT, IRQ_TYPE_EDGE_FALLING);
++ set_irq_type(PCMCIA_S1_RDYINT, IRQ_TYPE_EDGE_FALLING);
++
++ skt->irq = (skt->nr == 0) ? PCMCIA_S0_RDYINT : PCMCIA_S1_RDYINT;
++ return_val = soc_pcmcia_request_irqs(skt, irqs, ARRAY_SIZE(irqs));
++
++ return return_val;
++}
++
++
++static void cmx270_pcmcia_shutdown(struct soc_pcmcia_socket *skt)
++{
++ soc_pcmcia_free_irqs(skt, irqs, ARRAY_SIZE(irqs));
++
++ set_irq_type(IRQ_TO_GPIO(PCMCIA_S0_CD_VALID), IRQ_TYPE_NONE);
++ set_irq_type(IRQ_TO_GPIO(PCMCIA_S1_CD_VALID), IRQ_TYPE_NONE);
++
++ set_irq_type(IRQ_TO_GPIO(PCMCIA_S0_RDYINT), IRQ_TYPE_NONE);
++ set_irq_type(IRQ_TO_GPIO(PCMCIA_S1_RDYINT), IRQ_TYPE_NONE);
++}
++
++
++static void cmx270_pcmcia_socket_state(struct soc_pcmcia_socket *skt,
++ struct pcmcia_state *state)
++{
++
++ state->detect = (PCC_DETECT(skt->nr) == 0) ? 1 : 0;
++ state->ready = (PCC_READY(skt->nr) == 0) ? 0 : 1;
++ state->bvd1 = 1;
++ state->bvd2 = 1;
++ state->vs_3v = 0;
++ state->vs_Xv = 0;
++ state->wrprot = 0; /* not available */
++
++}
++
++
++static int
++cmx270_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
++ const socket_state_t *state)
++{
++
++ GPSR(GPIO49_nPWE) = GPIO_bit(GPIO49_nPWE);
++ pxa_gpio_mode(GPIO49_nPWE | GPIO_OUT);
++ //pxa_gpio_mode(GPIO79_pSKTSEL_MD | GPIO_OUT); /* For 2-socket mode */
++
++ switch(skt->nr){
++ case 0:
++ if(state->flags & SS_RESET) {
++ //GPCR(GPIO79_pSKTSEL) = GPIO_bit(GPIO79_pSKTSEL); /* For 2-socket mode */
++ //udelay(1);
++ GPCR(GPIO49_nPWE) = GPIO_bit(GPIO49_nPWE);
++ GPSR(GPIO53_nPCE_2) = GPIO_bit(GPIO53_nPCE_2);
++ udelay(10);
++ GPCR(GPIO53_nPCE_2) = GPIO_bit(GPIO53_nPCE_2);
++ GPSR(GPIO49_nPWE) = GPIO_bit(GPIO49_nPWE);
++ }
++ break;
++ case 1:
++ if(state->flags & SS_RESET) {
++ //GPCR(GPIO79_pSKTSEL) = GPIO_bit(GPIO79_pSKTSEL); /* For 2-socket mode */
++ //udelay(1);
++ GPCR(GPIO49_nPWE) = GPIO_bit(GPIO49_nPWE);
++ GPSR(GPIO53_nPCE_2) = GPIO_bit(GPIO53_nPCE_2);
++ udelay(10);
++ GPCR(GPIO53_nPCE_2) = GPIO_bit(GPIO53_nPCE_2);
++ GPSR(GPIO49_nPWE) = GPIO_bit(GPIO49_nPWE);
++ }
++ break;
++ }
++
++ pxa_gpio_mode(GPIO49_nPWE_MD);
++ //pxa_gpio_mode(GPIO79_pSKTSEL_MD); /* For 2-socket mode */
++
++
++ return 0;
++}
++
++static void cmx270_pcmcia_socket_init(struct soc_pcmcia_socket *skt)
++{
++}
++
++static void cmx270_pcmcia_socket_suspend(struct soc_pcmcia_socket *skt)
++{
++}
++
++
++static struct pcmcia_low_level cmx270_pcmcia_ops = {
++ .owner = THIS_MODULE,
++ .hw_init = cmx270_pcmcia_hw_init,
++ .hw_shutdown = cmx270_pcmcia_shutdown,
++ .socket_state = cmx270_pcmcia_socket_state,
++ .configure_socket = cmx270_pcmcia_configure_socket,
++ .socket_init = cmx270_pcmcia_socket_init,
++ .socket_suspend = cmx270_pcmcia_socket_suspend,
++ .nr = 2,
++};
++
++static struct platform_device *cmx270_pcmcia_device;
++
++static int __init cmx270_pcmcia_init(void)
++{
++ int ret;
++
++ cmx270_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
++
++ if (!cmx270_pcmcia_device)
++ return -ENOMEM;
++
++ cmx270_pcmcia_device->dev.platform_data = &cmx270_pcmcia_ops;
++
++ printk ("Registering cm-x270 PCMCIA interface.\n");
++ ret = platform_device_add(cmx270_pcmcia_device);
++
++ if (ret)
++ platform_device_put(cmx270_pcmcia_device);
++
++ return ret;
++}
++
++static void __exit cmx270_pcmcia_exit(void)
++{
++ platform_device_unregister(cmx270_pcmcia_device);
++}
++
++module_init(cmx270_pcmcia_init);
++module_exit(cmx270_pcmcia_exit);
++
++MODULE_LICENSE("GPL");
+--
+1.5.2.5
+
diff --git a/packages/linux/linux-2.6.23/cm-x270/0006-ramdisk_load.patch b/packages/linux/linux-2.6.23/cm-x270/0006-ramdisk_load.patch
new file mode 100644
index 0000000000..24599e58d0
--- /dev/null
+++ b/packages/linux/linux-2.6.23/cm-x270/0006-ramdisk_load.patch
@@ -0,0 +1,80 @@
+From cbad8cd18463f3b696a8a7df059825f42b497ccd Mon Sep 17 00:00:00 2001
+From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
+Date: Fri, 20 Jul 2007 19:01:50 -0400
+Subject: [PATCH] ramdisk_load
+
+---
+ arch/arm/mach-pxa/cm-x270.c | 6 ++++++
+ include/asm-arm/arch-pxa/cm-x270.h | 2 ++
+ init/initramfs.c | 16 ++++++++++++++++
+ 3 files changed, 24 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c
+index 7b4e288..598eef1 100644
+--- a/arch/arm/mach-pxa/cm-x270.c
++++ b/arch/arm/mach-pxa/cm-x270.c
+@@ -308,6 +308,12 @@ static struct map_desc cmx270_io_desc[] __initdata = {
+ .length = PXA_CS_SIZE,
+ .type = MT_DEVICE
+ },
++ [2] = { /* NOR flash */
++ .virtual = CMX270_FLASH_VIRT,
++ .pfn = __phys_to_pfn(PXA_CS0_PHYS),
++ .length = (8<<20), /* up to 8 MByte flash */
++ .type = MT_DEVICE
++ },
+ };
+
+ /*
+diff --git a/include/asm-arm/arch-pxa/cm-x270.h b/include/asm-arm/arch-pxa/cm-x270.h
+index 24613a5..aad152e 100644
+--- a/include/asm-arm/arch-pxa/cm-x270.h
++++ b/include/asm-arm/arch-pxa/cm-x270.h
+@@ -20,7 +20,9 @@
+
+ #define CMX270_IT8152_VIRT (CMX270_VIRT_BASE)
+ #define CMX270_IDE104_VIRT (CMX270_IT8152_VIRT + PXA_CS_SIZE)
++#define CMX270_FLASH_VIRT (CMX270_IDE104_VIRT + PXA_CS_SIZE)
+
++#define CMX270_FLASH_RAMDISK_VIRT (CMX270_FLASH_VIRT + 0x1c0000)
+
+ /* GPIO related definitions */
+ #define GPIO_IT8152_IRQ (22)
+diff --git a/init/initramfs.c b/init/initramfs.c
+index 1db02a0..d875fbc 100644
+--- a/init/initramfs.c
++++ b/init/initramfs.c
+@@ -7,6 +7,9 @@
+ #include <linux/string.h>
+ #include <linux/syscalls.h>
+
++// HACK for compulab cm-x270
++#include <asm/arch/cm-x270.h>
++
+ static __initdata char *message;
+ static void __init error(char *x)
+ {
+@@ -550,7 +553,20 @@ static int __init populate_rootfs(void)
+ #ifdef CONFIG_BLK_DEV_INITRD
+ if (initrd_start) {
+ #ifdef CONFIG_BLK_DEV_RAM
++
++ /* hack to make initramfs work because the
++ * compulab BL does not zero out the
++ * initrd memory. This only seems to affect loading
++ * initramfs (cpio.gz) archives. Does not seem to
++ * affect ramdisks.
++ */
++ int initrd_size = *(int *)(CMX270_FLASH_RAMDISK_VIRT);
+ int fd;
++
++ initrd_end = initrd_start + initrd_size;
++ //printk("CLIFF: initrd_start = 0x%x\n", initrd_start);
++ //printk("CLIFF: initrd_end = 0x%x\n", initrd_end);
++
+ printk(KERN_INFO "checking if image is initramfs...");
+ err = unpack_to_rootfs((char *)initrd_start,
+ initrd_end - initrd_start, 1);
+--
+1.5.2.5
+
diff --git a/packages/linux/linux-2.6.23/cm-x270/0007-mmcsd_large_cards-r0.patch b/packages/linux/linux-2.6.23/cm-x270/0007-mmcsd_large_cards-r0.patch
new file mode 100644
index 0000000000..0f53fb445e
--- /dev/null
+++ b/packages/linux/linux-2.6.23/cm-x270/0007-mmcsd_large_cards-r0.patch
@@ -0,0 +1,36 @@
+From 9fb3d9729cf908539a769b701d66c708658eff97 Mon Sep 17 00:00:00 2001
+From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
+Date: Fri, 20 Jul 2007 19:02:55 -0400
+Subject: [PATCH] mmcsd_large_cards-r0
+
+---
+ drivers/mmc/card/block.c | 6 ++++++
+ 1 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
+index 93fe2e5..7ce961f 100644
+--- a/drivers/mmc/card/block.c
++++ b/drivers/mmc/card/block.c
+@@ -408,6 +408,7 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
+ {
+ struct mmc_blk_data *md;
+ int devidx, ret;
++ unsigned long cap;
+
+ devidx = find_first_zero_bit(dev_use, MMC_NUM_MINORS);
+ if (devidx >= MMC_NUM_MINORS)
+@@ -471,6 +472,11 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card)
+
+ sprintf(md->disk->disk_name, "mmcblk%d", devidx);
+
++ if (card->csd.read_blkbits > 9)
++ md->block_bits = 9;
++ else
++ md->block_bits = card->csd.read_blkbits;
++
+ blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits);
+
+ if (!mmc_card_sd(card) && mmc_card_blockaddr(card)) {
+--
+1.5.2.5
+
diff --git a/packages/linux/linux-2.6.23/cm-x270/0008-cm-x270-nand-simplify-name.patch b/packages/linux/linux-2.6.23/cm-x270/0008-cm-x270-nand-simplify-name.patch
new file mode 100644
index 0000000000..58ed2a276b
--- /dev/null
+++ b/packages/linux/linux-2.6.23/cm-x270/0008-cm-x270-nand-simplify-name.patch
@@ -0,0 +1,25 @@
+From 3069f49137668b467ba820ed55076df953127582 Mon Sep 17 00:00:00 2001
+From: Cliff Brake <cbrake@happy.dev.bec-systems.com>
+Date: Fri, 20 Jul 2007 19:04:12 -0400
+Subject: [PATCH] cm-x270-nand-simplify-name
+
+---
+ drivers/mtd/nand/cmx270_nand.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/cmx270_nand.c
+index cb663ef..3654ce4 100644
+--- a/drivers/mtd/nand/cmx270_nand.c
++++ b/drivers/mtd/nand/cmx270_nand.c
+@@ -191,6 +191,8 @@ static int cmx270_init(void)
+ cmx270_nand_mtd->owner = THIS_MODULE;
+ cmx270_nand_mtd->priv = this;
+
++ cmx270_nand_mtd->name = "cm-x270-nand";
++
+ /* insert callbacks */
+ this->IO_ADDR_R = cmx270_nand_io;
+ this->IO_ADDR_W = cmx270_nand_io;
+--
+1.5.2.5
+
diff --git a/packages/linux/linux-2.6.23/cm-x270/defconfig b/packages/linux/linux-2.6.23/cm-x270/defconfig
new file mode 100644
index 0000000000..273de85b0a
--- /dev/null
+++ b/packages/linux/linux-2.6.23/cm-x270/defconfig
@@ -0,0 +1,1204 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23
+# Thu Oct 11 15:47:57 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_ARCH_MTD_XIP=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="-cm-x270"
+# 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=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=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=y
+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 is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+CONFIG_BLOCK=y
+# CONFIG_LBD is not set
+# CONFIG_BLK_DEV_IO_TRACE is not set
+# CONFIG_LSF is not set
+# CONFIG_BLK_DEV_BSG is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+# CONFIG_DEFAULT_AS is not set
+# CONFIG_DEFAULT_DEADLINE is not set
+CONFIG_DEFAULT_CFQ=y
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="cfq"
+
+#
+# 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 is not set
+# 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=y
+# 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
+
+#
+# Intel PXA2xx Implementations
+#
+# CONFIG_ARCH_LUBBOCK is not set
+# CONFIG_MACH_LOGICPD_PXA270 is not set
+# CONFIG_MACH_MAINSTONE is not set
+# CONFIG_ARCH_PXA_IDP is not set
+# CONFIG_PXA_SHARPSL is not set
+# CONFIG_MACH_TRIZEPS4 is not set
+# CONFIG_MACH_EM_X270 is not set
+CONFIG_MACH_ARMCORE=y
+CONFIG_PXA27x=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_DCACHE_DISABLE is not set
+# CONFIG_OUTER_CACHE is not set
+CONFIG_IWMMXT=y
+CONFIG_XSCALE_PMU=y
+
+#
+# Bus support
+#
+# CONFIG_PCI is not set
+# CONFIG_PCI_SYSCALL is not set
+# 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 is not set
+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="console=ttyS1,38400 monitor=8 bpp=16 mem=64M mtdparts=physmap-flash.0:256k(boot)ro,0x180000(kernel),-(root);cm-x270-nand:64m(app),-(data) rdinit=/sbin/init root=mtd3 rootfstype=jffs2"
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_KEXEC is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+# CONFIG_FPE_NWFPE 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 is not set
+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=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_IP_DCCP is not set
+# CONFIG_IP_SCTP is not set
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+# CONFIG_CFG80211 is not set
+# CONFIG_WIRELESS_EXT is not set
+# CONFIG_MAC80211 is not set
+# CONFIG_IEEE80211 is not set
+# CONFIG_RFKILL 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 is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# 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 is not set
+# 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 is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CFI_AMDSTD=y
+# 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
+# CONFIG_MTD_XIP is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x0
+CONFIG_MTD_PHYSMAP_LEN=0x400000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_SHARP_SL is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_H1900 is not set
+CONFIG_MTD_NAND_IDS=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_SHARPSL is not set
+CONFIG_MTD_NAND_CM_X270=y
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM 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_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_CRYPTOLOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+# 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 is not set
+# CONFIG_CHR_DEV_OSST is not set
+# CONFIG_BLK_DEV_SR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+CONFIG_SCSI_LOWLEVEL=y
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+# CONFIG_ATA is not set
+# CONFIG_MD 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 is not set
+# CONFIG_PHYLIB is not set
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_AX88796 is not set
+# CONFIG_SMC91X is not set
+CONFIG_DM9000=y
+CONFIG_DM9000_NOEPROM=y
+# CONFIG_SMC911X is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+# CONFIG_WLAN_80211 is not set
+
+#
+# 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 is not set
+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 is not set
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+# CONFIG_INPUT_FF_MEMLESS is not set
+# CONFIG_INPUT_POLLDEV is not set
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_PXA27x is not set
+# CONFIG_KEYBOARD_GPIO is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_PS2_ALPS is not set
+# CONFIG_MOUSE_PS2_LOGIPS2PP is not set
+# CONFIG_MOUSE_PS2_SYNAPTICS is not set
+# CONFIG_MOUSE_PS2_LIFEBOOK is not set
+# CONFIG_MOUSE_PS2_TRACKPOINT is not set
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
+# CONFIG_TOUCHSCREEN_GUNZE is not set
+# CONFIG_TOUCHSCREEN_ELO is not set
+# CONFIG_TOUCHSCREEN_MTOUCH is not set
+# CONFIG_TOUCHSCREEN_MK712 is not set
+# CONFIG_TOUCHSCREEN_PENMOUNT is not set
+# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
+# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
+CONFIG_TOUCHSCREEN_UCB1400=m
+# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
+# CONFIG_INPUT_MISC is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_PXA=y
+CONFIG_SERIAL_PXA_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=m
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=m
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_PXA=m
+# CONFIG_I2C_PXA_SLAVE is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_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 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ABITUGURU3 is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_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_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_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+
+#
+# LED drivers
+#
+CONFIG_LEDS_CM_X270=y
+# CONFIG_LEDS_GPIO is not set
+
+#
+# LED Triggers
+#
+# CONFIG_LEDS_TRIGGERS is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+# CONFIG_DVB_CORE is not set
+# 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 is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_S1D13XXX is not set
+CONFIG_FB_PXA=y
+CONFIG_FB_PXA_PARAMETERS=y
+# CONFIG_FB_MBX is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+
+#
+# ALSA ARM devices
+#
+CONFIG_SND_PXA2XX_PCM=m
+CONFIG_SND_PXA2XX_AC97=m
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_CAIAQ is not set
+
+#
+# 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_AC97_BUS=m
+CONFIG_HID_SUPPORT=y
+CONFIG_HID=y
+# CONFIG_HID_DEBUG is not set
+
+#
+# USB Input Devices
+#
+CONFIG_USB_HID=y
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
+# CONFIG_HID_FF is not set
+# CONFIG_USB_HIDDEV is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ARCH_HAS_HCD=y
+CONFIG_USB_ARCH_HAS_OHCI=y
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# 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_ISP116X_HCD is not set
+CONFIG_USB_OHCI_HCD=y
+# 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_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
+
+#
+# USB Device Class drivers
+#
+# CONFIG_USB_ACM is not set
+# CONFIG_USB_PRINTER is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
+#
+CONFIG_USB_STORAGE=y
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+CONFIG_USB_MON=y
+
+#
+# USB port drivers
+#
+
+#
+# USB Serial Converter support
+#
+# CONFIG_USB_SERIAL is not set
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+# CONFIG_USB_GADGET is not set
+CONFIG_MMC=m
+# CONFIG_MMC_DEBUG is not set
+# CONFIG_MMC_UNSAFE_RESUME is not set
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=m
+CONFIG_MMC_BLOCK_BOUNCE=y
+
+#
+# MMC/SD Host Controller Drivers
+#
+CONFIG_MMC_PXA=m
+CONFIG_RTC_LIB=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT2_FS_XIP is not set
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_FS_POSIX_ACL is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_GFS2_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_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=y
+# 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 is not set
+# CONFIG_NFSD is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# 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_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+# CONFIG_CRC7 is not set
+# CONFIG_LIBCRC32C is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_DMA=y
diff --git a/packages/linux/linux-bd-neon-2.6-2.6.22/.mtn2git_empty b/packages/linux/linux-bd-neon-2.6-2.6.22/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-bd-neon-2.6-2.6.22/.mtn2git_empty
diff --git a/packages/linux/linux-bd-neon-2.6-2.6.22/neon-jffs2-config.patch b/packages/linux/linux-bd-neon-2.6-2.6.22/neon-jffs2-config.patch
new file mode 100644
index 0000000000..958eda0200
--- /dev/null
+++ b/packages/linux/linux-bd-neon-2.6-2.6.22/neon-jffs2-config.patch
@@ -0,0 +1,33 @@
+--- linux-2.6.22/arch/arm/configs/neon_defconfig-o 2007-08-23 19:49:52.000000000 +0200
++++ linux-2.6.22/arch/arm/configs/neon_defconfig 2007-08-23 19:50:16.000000000 +0200
+@@ -171,7 +171,8 @@
+ # CONFIG_PREEMPT is not set
+ # CONFIG_NO_IDLE_HZ is not set
+ CONFIG_HZ=100
+-# CONFIG_AEABI is not set
++CONFIG_AEABI=y
++CONFIG_OABI_COMPAT=y
+ # CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+ CONFIG_SELECT_MEMORY_MODEL=y
+ CONFIG_FLATMEM_MANUAL=y
+@@ -1131,7 +1132,7 @@
+ CONFIG_PROC_FS=y
+ CONFIG_PROC_SYSCTL=y
+ CONFIG_SYSFS=y
+-# CONFIG_TMPFS is not set
++CONFIG_TMPFS=y
+ # CONFIG_HUGETLB_PAGE is not set
+ CONFIG_RAMFS=y
+ # CONFIG_CONFIGFS_FS is not set
+@@ -1147,7 +1148,10 @@
+ # CONFIG_BFS_FS is not set
+ # CONFIG_EFS_FS is not set
+ # CONFIG_JFFS_FS is not set
+-# CONFIG_JFFS2_FS is not set
++CONFIG_JFFS2_FS=y
++CONFIG_JFFS2_FS_DEBUG=0
++CONFIG_JFFS2_FS_WRITEBUFFER=y
++CONFIG_JFFS2_SUMMARY=y
+ CONFIG_CRAMFS=y
+ # CONFIG_VXFS_FS is not set
+ # CONFIG_HPFS_FS is not set
diff --git a/packages/linux/linux-bd-neon-2.6_2.6.22.bb b/packages/linux/linux-bd-neon-2.6_2.6.22.bb
new file mode 100644
index 0000000000..6d2472935f
--- /dev/null
+++ b/packages/linux/linux-bd-neon-2.6_2.6.22.bb
@@ -0,0 +1,48 @@
+DESCRIPTION = "2.6 Linux Kernel for Boundary Devices NEON Board"
+SECTION = "kernel"
+HOMEPAGE = "N/A"
+LICENSE = "GPL"
+DEPENDS += "uboot-utils"
+
+PR = "r1"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.22.tar.bz2 \
+ http://www.boundarydevices.com/boundary-2.6.22-2007-07-22.patch.bz2;patch=1 \
+ file://neon-jffs2-config.patch;patch=1"
+
+S = "${WORKDIR}/linux-2.6.22"
+
+inherit kernel
+
+KERNEL_IMAGETYPE = "zImage"
+FILES_kernel-image = ""
+ALLOW_EMPTY = "1"
+
+do_configure() {
+ cp arch/arm/configs/neon_defconfig .config || die "No default configuration for ${MACHINE} available."
+
+# if [ "${TARGET_OS}" == "linux-gnueabi" -o "${TARGET_OS}" == "linux-uclibcgnueabi" ]; then
+# echo "CONFIG_AEABI=y" >> ${S}/.config
+# echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
+# else
+# echo "# CONFIG_AEABI is not set" >> ${S}/.config
+# echo "# CONFIG_OABI_COMPAT is not set" >> ${S}/.config
+# fi
+
+ yes '' | oe_runmake oldconfig
+}
+
+do_deploy() {
+ install -d ${DEPLOY_DIR_IMAGE}
+ install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}.bin
+ tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib
+ ${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
+ rm -f linux.bin.gz
+ gzip -9 linux.bin
+ ${STAGING_BINDIR_NATIVE}/mkimage -A arm -O linux -T kernel -C gzip -a a0008000 -e a0008000 -n "Boundary Devices NEON" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin
+ rm -f linux.bin.gz
+}
+
+do_deploy[dirs] = "${S}"
+
+addtask deploy before do_package after do_install
diff --git a/packages/linux/linux-bfin/.mtn2git_empty b/packages/linux/linux-bfin/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-bfin/.mtn2git_empty
diff --git a/packages/linux/linux-bfin/adzs-bf548-ezlite/.mtn2git_empty b/packages/linux/linux-bfin/adzs-bf548-ezlite/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-bfin/adzs-bf548-ezlite/.mtn2git_empty
diff --git a/packages/linux/linux-bfin/adzs-bf548-ezlite/defconfig b/packages/linux/linux-bfin/adzs-bf548-ezlite/defconfig
new file mode 100644
index 0000000000..43efcb02d5
--- /dev/null
+++ b/packages/linux/linux-bfin/adzs-bf548-ezlite/defconfig
@@ -0,0 +1,1989 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.22.10
+# Tue Oct 16 11:16:52 2007
+#
+# CONFIG_MMU is not set
+# CONFIG_FPU is not set
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_BLACKFIN=y
+CONFIG_ZONE_DMA=y
+CONFIG_BFIN=y
+CONFIG_SEMAPHORE_SLEEPERS=y
+CONFIG_GENERIC_FIND_NEXT_BIT=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_GENERIC_IRQ_PROBE=y
+# CONFIG_GENERIC_TIME is not set
+CONFIG_GENERIC_GPIO=y
+CONFIG_FORCE_MAX_ZONEORDER=14
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_IRQCHIP_DEMUX_GPIO=y
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=n
+CONFIG_SYSVIPC=y
+# CONFIG_IPC_NS is not set
+CONFIG_SYSVIPC_SYSCTL=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_UTS_NS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_SYSFS_DEPRECATED=y
+# CONFIG_RELAY is not set
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SYSCTL=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL_SYSCALL=y
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+# CONFIG_ELF_CORE is not set
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_ANON_INODES=y
+CONFIG_EPOLL=y
+CONFIG_SIGNALFD=y
+CONFIG_EVENTFD=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_SLUB_DEBUG=y
+CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3
+CONFIG_NP2=y
+# CONFIG_SLAB is not set
+CONFIG_SLUB=y
+# CONFIG_SLOB is not set
+CONFIG_RT_MUTEXES=y
+CONFIG_TINY_SHMEM=y
+CONFIG_BASE_SMALL=0
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+CONFIG_BLOCK=y
+CONFIG_LBD=y
+# CONFIG_BLK_DEV_IO_TRACE is not set
+CONFIG_LSF=y
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+# CONFIG_IOSCHED_DEADLINE is not set
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+# CONFIG_PREEMPT_NONE is not set
+# CONFIG_PREEMPT_VOLUNTARY is not set
+CONFIG_PREEMPT=y
+CONFIG_PREEMPT_BKL=y
+
+#
+# Blackfin Processor Options
+#
+
+#
+# Processor and Board Settings
+#
+# CONFIG_BF522 is not set
+# CONFIG_BF525 is not set
+# CONFIG_BF527 is not set
+# CONFIG_BF531 is not set
+# CONFIG_BF532 is not set
+# CONFIG_BF533 is not set
+# CONFIG_BF534 is not set
+# CONFIG_BF536 is not set
+# CONFIG_BF537 is not set
+# CONFIG_BF542 is not set
+# CONFIG_BF544 is not set
+CONFIG_BF548=y
+# CONFIG_BF549 is not set
+# CONFIG_BF561 is not set
+# CONFIG_BF_REV_0_0 is not set
+# CONFIG_BF_REV_0_1 is not set
+# CONFIG_BF_REV_0_2 is not set
+# CONFIG_BF_REV_0_3 is not set
+# CONFIG_BF_REV_0_4 is not set
+# CONFIG_BF_REV_0_5 is not set
+CONFIG_BF_REV_ANY=y
+# CONFIG_BF_REV_NONE is not set
+CONFIG_BF54x=y
+CONFIG_BFIN_SINGLE_CORE=y
+# CONFIG_BFIN527_EZKIT is not set
+# CONFIG_BFIN533_EZKIT is not set
+# CONFIG_BFIN533_STAMP is not set
+# CONFIG_BFIN537_STAMP is not set
+# CONFIG_BFIN533_BLUETECHNIX_CM is not set
+# CONFIG_BFIN537_BLUETECHNIX_CM is not set
+CONFIG_BFIN548_EZKIT=y
+# CONFIG_BFIN561_BLUETECHNIX_CM is not set
+# CONFIG_BFIN561_EZKIT is not set
+# CONFIG_BFIN561_TEPLA is not set
+# CONFIG_PNAV10 is not set
+# CONFIG_GENERIC_BOARD is not set
+CONFIG_IRQ_PLL_WAKEUP=7
+CONFIG_IRQ_RTC=8
+CONFIG_IRQ_SPORT0_RX=9
+CONFIG_IRQ_SPORT0_TX=9
+CONFIG_IRQ_SPORT1_RX=9
+CONFIG_IRQ_SPORT1_TX=9
+CONFIG_IRQ_UART0_RX=10
+CONFIG_IRQ_UART0_TX=10
+CONFIG_IRQ_UART1_RX=10
+CONFIG_IRQ_UART1_TX=10
+CONFIG_IRQ_CNT=8
+CONFIG_IRQ_USB_INT0=11
+CONFIG_IRQ_USB_INT1=11
+CONFIG_IRQ_USB_INT2=11
+CONFIG_IRQ_USB_DMA=11
+CONFIG_IRQ_TIMER0=11
+CONFIG_IRQ_TIMER1=11
+CONFIG_IRQ_TIMER2=11
+CONFIG_IRQ_TIMER3=11
+CONFIG_IRQ_TIMER4=11
+CONFIG_IRQ_TIMER5=11
+CONFIG_IRQ_TIMER6=11
+CONFIG_IRQ_TIMER7=11
+CONFIG_IRQ_TIMER8=11
+CONFIG_IRQ_TIMER9=11
+CONFIG_IRQ_TIMER10=11
+
+#
+# BF548 Specific Configuration
+#
+# CONFIG_DEB_DMA_URGENT is not set
+
+#
+# Interrupt Priority Assignment
+#
+
+#
+# Priority
+#
+CONFIG_IRQ_DMAC0_ERR=7
+CONFIG_IRQ_EPPI0_ERR=7
+CONFIG_IRQ_SPORT0_ERR=7
+CONFIG_IRQ_SPORT1_ERR=7
+CONFIG_IRQ_SPI0_ERR=7
+CONFIG_IRQ_UART0_ERR=7
+CONFIG_IRQ_EPPI0=8
+CONFIG_IRQ_SPI0=10
+CONFIG_IRQ_PINT0=12
+CONFIG_IRQ_PINT1=12
+CONFIG_IRQ_MDMAS0=13
+CONFIG_IRQ_MDMAS1=13
+CONFIG_IRQ_WATCHDOG=13
+CONFIG_IRQ_DMAC1_ERR=7
+CONFIG_IRQ_SPORT2_ERR=7
+CONFIG_IRQ_SPORT3_ERR=7
+CONFIG_IRQ_MXVR_DATA=7
+CONFIG_IRQ_SPI1_ERR=7
+CONFIG_IRQ_SPI2_ERR=7
+CONFIG_IRQ_UART1_ERR=7
+CONFIG_IRQ_UART2_ERR=7
+CONFIG_IRQ_CAN0_ERR=7
+CONFIG_IRQ_SPORT2_RX=9
+CONFIG_IRQ_SPORT2_TX=9
+CONFIG_IRQ_SPORT3_RX=9
+CONFIG_IRQ_SPORT3_TX=9
+CONFIG_IRQ_EPPI1=9
+CONFIG_IRQ_EPPI2=9
+CONFIG_IRQ_SPI1=10
+CONFIG_IRQ_SPI2=10
+CONFIG_IRQ_ATAPI_RX=10
+CONFIG_IRQ_ATAPI_TX=10
+CONFIG_IRQ_TWI0=11
+CONFIG_IRQ_TWI1=11
+CONFIG_IRQ_CAN0_RX=11
+CONFIG_IRQ_CAN0_TX=11
+CONFIG_IRQ_MDMAS2=13
+CONFIG_IRQ_MDMAS3=13
+CONFIG_IRQ_MXVR_ERR=11
+CONFIG_IRQ_MXVR_MSG=11
+CONFIG_IRQ_MXVR_PKT=11
+CONFIG_IRQ_EPPI1_ERR=7
+CONFIG_IRQ_EPPI2_ERR=7
+CONFIG_IRQ_UART3_ERR=7
+CONFIG_IRQ_HOST_ERR=7
+CONFIG_IRQ_PIXC_ERR=7
+CONFIG_IRQ_NFC_ERR=7
+CONFIG_IRQ_ATAPI_ERR=7
+CONFIG_IRQ_CAN1_ERR=7
+CONFIG_IRQ_HS_DMA_ERR=7
+CONFIG_IRQ_PIXC_IN0=8
+CONFIG_IRQ_PIXC_IN1=8
+CONFIG_IRQ_PIXC_OUT=8
+CONFIG_IRQ_SDH=8
+CONFIG_IRQ_KEY=8
+CONFIG_IRQ_CAN1_RX=11
+CONFIG_IRQ_CAN1_TX=11
+CONFIG_IRQ_SDH_MASK0=11
+CONFIG_IRQ_SDH_MASK1=11
+CONFIG_IRQ_OTPSEC=11
+CONFIG_IRQ_PINT2=11
+CONFIG_IRQ_PINT3=11
+
+#
+# Pin Interrupt to Port Assignment
+#
+
+#
+# Assignment
+#
+CONFIG_PINTx_REASSIGN=y
+CONFIG_PINT0_ASSIGN=0x00000101
+CONFIG_PINT1_ASSIGN=0x01010000
+CONFIG_PINT2_ASSIGN=0x07000101
+CONFIG_PINT3_ASSIGN=0x02020303
+
+#
+# Board customizations
+#
+# CONFIG_CMDLINE_BOOL is not set
+
+#
+# Clock/PLL Setup
+#
+CONFIG_CLKIN_HZ=25000000
+# CONFIG_BFIN_KERNEL_CLOCK is not set
+CONFIG_MIN_VCO_HZ=50000000
+CONFIG_MAX_SCLK_HZ=133000000
+CONFIG_MIN_SCLK_HZ=27000000
+
+#
+# Kernel Timer/Scheduler
+#
+# CONFIG_HZ_100 is not set
+# CONFIG_HZ_250 is not set
+CONFIG_HZ_300=y
+# CONFIG_HZ_1000 is not set
+CONFIG_HZ=300
+
+#
+# Memory Setup
+#
+CONFIG_MEM_SIZE=64
+CONFIG_MEM_ADD_WIDTH=10
+CONFIG_BOOT_LOAD=0x1000
+CONFIG_BFIN_SCRATCH_REG_RETN=y
+# CONFIG_BFIN_SCRATCH_REG_RETE is not set
+# CONFIG_BFIN_SCRATCH_REG_CYCLES is not set
+
+#
+# Blackfin Kernel Optimizations
+#
+
+#
+# Memory Optimizations
+#
+CONFIG_I_ENTRY_L1=y
+CONFIG_EXCPT_IRQ_SYSC_L1=y
+CONFIG_DO_IRQ_L1=y
+CONFIG_CORE_TIMER_IRQ_L1=y
+CONFIG_IDLE_L1=y
+# CONFIG_SCHEDULE_L1 is not set
+CONFIG_ARITHMETIC_OPS_L1=y
+CONFIG_ACCESS_OK_L1=y
+# CONFIG_MEMSET_L1 is not set
+# CONFIG_MEMCPY_L1 is not set
+# CONFIG_SYS_BFIN_SPINLOCK_L1 is not set
+# CONFIG_IP_CHECKSUM_L1 is not set
+CONFIG_CACHELINE_ALIGNED_L1=y
+# CONFIG_SYSCALL_TAB_L1 is not set
+# CONFIG_CPLB_SWITCH_TAB_L1 is not set
+CONFIG_RAMKERNEL=y
+# CONFIG_ROMKERNEL 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=4
+# CONFIG_RESOURCES_64BIT is not set
+CONFIG_ZONE_DMA_FLAG=1
+CONFIG_LARGE_ALLOCS=y
+CONFIG_BFIN_DMA_5XX=y
+# CONFIG_DMA_UNCACHED_2M is not set
+CONFIG_DMA_UNCACHED_1M=y
+# CONFIG_DMA_UNCACHED_NONE is not set
+
+#
+# Cache Support
+#
+CONFIG_BFIN_ICACHE=y
+CONFIG_BFIN_DCACHE=y
+# CONFIG_BFIN_DCACHE_BANKA is not set
+# CONFIG_BFIN_ICACHE_LOCK is not set
+# CONFIG_BFIN_WB is not set
+CONFIG_BFIN_WT=y
+CONFIG_L1_MAX_PIECE=16
+
+#
+# Asynchonous Memory Configuration
+#
+
+#
+# EBIU_AMGCTL Global Control
+#
+CONFIG_C_AMCKEN=y
+# CONFIG_C_AMBEN is not set
+# CONFIG_C_AMBEN_B0 is not set
+# CONFIG_C_AMBEN_B0_B1 is not set
+# CONFIG_C_AMBEN_B0_B1_B2 is not set
+CONFIG_C_AMBEN_ALL=y
+
+#
+# EBIU_AMBCTL Control
+#
+CONFIG_BANK_0=0x7BB0
+CONFIG_BANK_1=0x5554
+CONFIG_BANK_2=0x7BB0
+CONFIG_BANK_3=0x99B3
+
+#
+# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
+#
+# CONFIG_PCI is not set
+# CONFIG_ARCH_SUPPORTS_MSI is not set
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF_FDPIC=y
+CONFIG_BINFMT_FLAT=y
+CONFIG_BINFMT_ZFLAT=y
+CONFIG_BINFMT_SHARED_FLAT=y
+CONFIG_BINFMT_MISC=m
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_UNIX=y
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
+# CONFIG_XFRM_SUB_POLICY is not set
+# CONFIG_XFRM_MIGRATE is not set
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+# CONFIG_IP_PNP_BOOTP is not set
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+CONFIG_SYN_COOKIES=y
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+CONFIG_INET_TUNNEL=m
+CONFIG_INET_XFRM_MODE_TRANSPORT=y
+CONFIG_INET_XFRM_MODE_TUNNEL=y
+CONFIG_INET_XFRM_MODE_BEET=y
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_CUBIC=y
+CONFIG_DEFAULT_TCP_CONG="cubic"
+# CONFIG_TCP_MD5SIG is not set
+# CONFIG_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=y
+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 is not set
+# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_NETLABEL 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_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 is not set
+# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_MARK=m
+CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
+CONFIG_NETFILTER_XT_TARGET_NFLOG=m
+# CONFIG_NETFILTER_XT_TARGET_NOTRACK 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_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_HASHLIMIT=m
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_NF_CONNTRACK_IPV4=m
+CONFIG_NF_CONNTRACK_PROC_COMPAT=y
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_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 is not set
+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=m
+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 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 is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+CONFIG_NET_SCH_FIFO=y
+CONFIG_NET_CLS_ROUTE=y
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# 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_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 is not set
+# CONFIG_BT_HCIBPA10X is not set
+# CONFIG_BT_HCIBFUSB is not set
+# CONFIG_BT_HCIVHCI is not set
+# CONFIG_AF_RXRPC is not set
+
+#
+# Wireless
+#
+CONFIG_CFG80211=m
+CONFIG_WIRELESS_EXT=y
+CONFIG_MAC80211=m
+# CONFIG_MAC80211_LEDS is not set
+# CONFIG_MAC80211_DEBUGFS is not set
+# CONFIG_MAC80211_DEBUG is not set
+CONFIG_IEEE80211=m
+# CONFIG_IEEE80211_DEBUG is not set
+CONFIG_IEEE80211_CRYPT_WEP=m
+CONFIG_IEEE80211_CRYPT_CCMP=m
+CONFIG_IEEE80211_CRYPT_TKIP=m
+CONFIG_IEEE80211_SOFTMAC=m
+# CONFIG_IEEE80211_SOFTMAC_DEBUG is not set
+# CONFIG_RFKILL is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLKDEVS=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+# CONFIG_SSFDC is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+# CONFIG_MTD_MW320D is not set
+CONFIG_MTD_CFI_UTIL=y
+CONFIG_MTD_RAM=y
+# 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=y
+CONFIG_MTD_PHYSMAP_START=0x20000000
+CONFIG_MTD_PHYSMAP_LEN=0x400000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_BF5xx is not set
+# CONFIG_MTD_UCLINUX is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+CONFIG_MTD_NAND=y
+# CONFIG_MTD_NAND_VERIFY_WRITE is not set
+# CONFIG_MTD_NAND_ECC_SMC is not set
+# CONFIG_MTD_NAND_MUSEUM_IDS is not set
+# CONFIG_MTD_NAND_BFIN is not set
+CONFIG_MTD_NAND_IDS=y
+CONFIG_MTD_NAND_BF5XX=y
+CONFIG_MTD_NAND_BF5XX_HWECC=y
+# CONFIG_MTD_NAND_DISKONCHIP is not set
+# CONFIG_MTD_NAND_NANDSIM is not set
+# CONFIG_MTD_NAND_PLATFORM is not set
+# CONFIG_MTD_ONENAND is not set
+
+#
+# UBI - Unsorted block images
+#
+# CONFIG_MTD_UBI is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNPACPI is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_UB is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# Misc devices
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+CONFIG_SCSI=y
+# CONFIG_SCSI_TGT is not set
+# CONFIG_SCSI_NETLINK is not set
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=y
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+# CONFIG_CHR_DEV_SG is not set
+# CONFIG_CHR_DEV_SCH is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
+
+#
+# SCSI Transports
+#
+# CONFIG_SCSI_SPI_ATTRS is not set
+# CONFIG_SCSI_FC_ATTRS is not set
+# CONFIG_SCSI_ISCSI_ATTRS is not set
+# CONFIG_SCSI_SAS_ATTRS is not set
+# CONFIG_SCSI_SAS_LIBSAS is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_ISCSI_TCP is not set
+# CONFIG_SCSI_DEBUG is not set
+CONFIG_ATA=y
+# CONFIG_ATA_NONSTANDARD is not set
+# CONFIG_PATA_PLATFORM is not set
+CONFIG_PATA_BF54X=y
+CONFIG_PATA_BF54X_DMA=y
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_SMC91X is not set
+CONFIG_SMSC911X=y
+# CONFIG_DM9000 is not set
+CONFIG_NETDEV_1000=y
+CONFIG_NETDEV_10000=y
+
+#
+# Wireless LAN
+#
+# CONFIG_WLAN_PRE80211 is not set
+CONFIG_WLAN_80211=y
+# CONFIG_LIBERTAS is not set
+# CONFIG_HERMES is not set
+# CONFIG_USB_ZD1201 is not set
+# CONFIG_HOSTAP is not set
+# CONFIG_ZD1211RW is not set
+
+#
+# USB Network Adapters
+#
+# CONFIG_USB_CATC is not set
+# CONFIG_USB_KAWETH is not set
+# CONFIG_USB_PEGASUS is not set
+# CONFIG_USB_RTL8150 is not set
+# CONFIG_USB_USBNET_MII is not set
+# CONFIG_USB_USBNET is not set
+# CONFIG_WAN is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+CONFIG_PPP_FILTER=y
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPP_MPPE=m
+CONFIG_PPPOE=m
+# CONFIG_SLIP is not set
+CONFIG_SLHC=m
+CONFIG_SHAPER=m
+CONFIG_NETCONSOLE=m
+CONFIG_NETPOLL=y
+# CONFIG_NETPOLL_TRAP is not set
+CONFIG_NET_POLL_CONTROLLER=y
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+CONFIG_INPUT_FF_MEMLESS=m
+# 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=m
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_STOWAWAY is not set
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_KEYBOARD_BFIN is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_APPLETOUCH is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TABLET is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_ADS7846=m
+CONFIG_TOUCHSCREEN_AD7877=m
+CONFIG_TOUCHSCREEN_GUNZE=m
+CONFIG_TOUCHSCREEN_ELO=m
+CONFIG_TOUCHSCREEN_MTOUCH=m
+CONFIG_TOUCHSCREEN_MK712=m
+CONFIG_TOUCHSCREEN_PENMOUNT=m
+CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
+CONFIG_TOUCHSCREEN_TOUCHWIN=m
+CONFIG_TOUCHSCREEN_UCB1400=m
+CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
+CONFIG_TOUCHSCREEN_USB_EGALAX=y
+CONFIG_TOUCHSCREEN_USB_PANJIT=y
+CONFIG_TOUCHSCREEN_USB_3M=y
+CONFIG_TOUCHSCREEN_USB_ITM=y
+CONFIG_TOUCHSCREEN_USB_ETURBO=y
+CONFIG_TOUCHSCREEN_USB_GUNZE=y
+CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_ATI_REMOTE is not set
+# CONFIG_INPUT_ATI_REMOTE2 is not set
+# CONFIG_INPUT_KEYSPAN_REMOTE is not set
+# CONFIG_INPUT_POWERMATE is not set
+# CONFIG_INPUT_YEALINK is not set
+# CONFIG_INPUT_UINPUT is not set
+# CONFIG_BF53X_PFBUTTONS is not set
+# CONFIG_TWI_KEYPAD is not set
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+# CONFIG_AD9960 is not set
+# CONFIG_SPI_ADC_BF533 is not set
+# CONFIG_BF5xx_PFLAGS is not set
+# CONFIG_BF5xx_PPIFCD is not set
+# CONFIG_BF5xx_TIMERS is not set
+# CONFIG_BF5xx_PPI is not set
+# CONFIG_BFIN_SPORT is not set
+# CONFIG_BFIN_TIMER_LATENCY is not set
+# CONFIG_TWI_LCD is not set
+# CONFIG_AD5304 is not set
+# CONFIG_BF5xx_TEA5764 is not set
+# CONFIG_BF5xx_FBDMA is not set
+# CONFIG_VT is not set
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+# CONFIG_SERIAL_8250 is not set
+
+#
+# Non-8250 serial port support
+#
+CONFIG_SERIAL_BFIN=y
+CONFIG_SERIAL_BFIN_CONSOLE=y
+# CONFIG_SERIAL_BFIN_DMA is not set
+CONFIG_SERIAL_BFIN_PIO=y
+# CONFIG_SERIAL_BFIN_UART0 is not set
+CONFIG_SERIAL_BFIN_UART1=y
+# CONFIG_BFIN_UART1_CTSRTS is not set
+# CONFIG_SERIAL_BFIN_UART2 is not set
+# CONFIG_SERIAL_BFIN_UART3 is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+# CONFIG_SERIAL_BFIN_SPORT is not set
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# CAN, the car bus and industrial fieldbus
+#
+# CONFIG_CAN4LINUX is not set
+
+#
+# IPMI
+#
+# 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_BFIN_WDT=y
+
+#
+# USB-based Watchdog Cards
+#
+# CONFIG_USBPCWATCHDOG is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_GEN_RTC is not set
+# CONFIG_R3964 is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_BLACKFIN_GPIO is not set
+CONFIG_I2C_BLACKFIN_TWI=y
+CONFIG_I2C_BLACKFIN_TWI_CLK_KHZ=50
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_TINY_USB is not set
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_SENSORS_AD5252 is not set
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8575 is not set
+# CONFIG_SENSORS_PCA9543 is not set
+# CONFIG_SENSORS_PCA9539 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_MAX6875 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=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BFIN=y
+# CONFIG_SPI_BITBANG is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_AT25 is not set
+# CONFIG_SPI_SPIDEV is not set
+
+#
+# Dallas's 1-wire bus
+#
+# CONFIG_W1 is not set
+CONFIG_HWMON=y
+# CONFIG_HWMON_VID is not set
+# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_AD7418 is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1029 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ADM9240 is not set
+# CONFIG_SENSORS_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_LM70 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_MAX1619 is not set
+# CONFIG_SENSORS_MAX6650 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_PC87427 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_SMSC47M192 is not set
+# CONFIG_SENSORS_SMSC47B397 is not set
+# CONFIG_SENSORS_VT1211 is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83791D is not set
+# CONFIG_SENSORS_W83792D is not set
+# CONFIG_SENSORS_W83793 is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+# CONFIG_SENSORS_W83627EHF is not set
+# CONFIG_HWMON_DEBUG_CHIP is not set
+
+#
+# Multifunction device drivers
+#
+# CONFIG_MFD_SM501 is not set
+
+#
+# Multimedia devices
+#
+CONFIG_VIDEO_DEV=m
+CONFIG_VIDEO_V4L1=y
+CONFIG_VIDEO_V4L1_COMPAT=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_CAPTURE_DRIVERS=y
+# CONFIG_VIDEO_ADV_DEBUG is not set
+CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_CPIA2 is not set
+# CONFIG_VIDEO_SAA5246A is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+CONFIG_V4L_USB_DRIVERS=y
+# CONFIG_VIDEO_PVRUSB2 is not set
+# CONFIG_VIDEO_EM28XX is not set
+# CONFIG_VIDEO_USBVISION is not set
+# CONFIG_USB_VICAM is not set
+# CONFIG_USB_IBMCAM is not set
+# CONFIG_USB_KONICAWC is not set
+# CONFIG_USB_QUICKCAM_MESSENGER is not set
+# CONFIG_USB_ET61X251 is not set
+# CONFIG_VIDEO_OVCAMCHIP is not set
+# CONFIG_USB_W9968CF is not set
+# CONFIG_USB_OV511 is not set
+# CONFIG_USB_SE401 is not set
+# CONFIG_USB_SN9C102 is not set
+# CONFIG_USB_STV680 is not set
+# CONFIG_USB_ZC0301 is not set
+# CONFIG_USB_PWC is not set
+# CONFIG_USB_ZR364XX is not set
+# CONFIG_VIDEO_BLACKFIN_CAM is not set
+# CONFIG_VIDEO_BLACKFIN_MT9M001 is not set
+
+#
+# CMOS Camera Sensor Selection
+#
+CONFIG_RADIO_ADAPTERS=y
+# CONFIG_USB_DSBR is not set
+CONFIG_DVB_CORE=m
+CONFIG_DVB_CORE_ATTACH=y
+CONFIG_DVB_CAPTURE_DRIVERS=y
+
+#
+# Supported USB Adapters
+#
+# CONFIG_DVB_USB is not set
+# CONFIG_DVB_TTUSB_BUDGET is not set
+# CONFIG_DVB_TTUSB_DEC is not set
+# CONFIG_DVB_CINERGYT2 is not set
+
+#
+# Supported FlexCopII (B2C2) Adapters
+#
+# CONFIG_DVB_B2C2_FLEXCOP is not set
+
+#
+# Supported DVB Frontends
+#
+
+#
+# Customise DVB Frontends
+#
+# CONFIG_DVB_FE_CUSTOMISE is not set
+
+#
+# DVB-S (satellite) frontends
+#
+# CONFIG_DVB_STV0299 is not set
+# CONFIG_DVB_CX24110 is not set
+# CONFIG_DVB_CX24123 is not set
+# CONFIG_DVB_TDA8083 is not set
+# CONFIG_DVB_MT312 is not set
+# CONFIG_DVB_VES1X93 is not set
+# CONFIG_DVB_S5H1420 is not set
+# CONFIG_DVB_TDA10086 is not set
+
+#
+# DVB-T (terrestrial) frontends
+#
+# CONFIG_DVB_SP8870 is not set
+# CONFIG_DVB_SP887X is not set
+# CONFIG_DVB_CX22700 is not set
+# CONFIG_DVB_CX22702 is not set
+# CONFIG_DVB_L64781 is not set
+# CONFIG_DVB_TDA1004X is not set
+# CONFIG_DVB_NXT6000 is not set
+# CONFIG_DVB_MT352 is not set
+# CONFIG_DVB_ZL10353 is not set
+# CONFIG_DVB_DIB3000MB is not set
+# CONFIG_DVB_DIB3000MC is not set
+# CONFIG_DVB_DIB7000M is not set
+# CONFIG_DVB_DIB7000P is not set
+
+#
+# DVB-C (cable) frontends
+#
+# CONFIG_DVB_VES1820 is not set
+# CONFIG_DVB_TDA10021 is not set
+# CONFIG_DVB_TDA10023 is not set
+# CONFIG_DVB_STV0297 is not set
+
+#
+# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
+#
+# CONFIG_DVB_NXT200X is not set
+# CONFIG_DVB_OR51211 is not set
+# CONFIG_DVB_OR51132 is not set
+# CONFIG_DVB_BCM3510 is not set
+# CONFIG_DVB_LGDT330X is not set
+
+#
+# Tuners/PLL support
+#
+# CONFIG_DVB_PLL is not set
+# CONFIG_DVB_TDA826X is not set
+# CONFIG_DVB_TDA827X is not set
+# CONFIG_DVB_TUNER_QT1010 is not set
+# CONFIG_DVB_TUNER_MT2060 is not set
+
+#
+# Miscellaneous devices
+#
+# CONFIG_DVB_LNBP21 is not set
+# CONFIG_DVB_ISL6421 is not set
+# CONFIG_DVB_TUA6100 is not set
+CONFIG_DAB=y
+CONFIG_USB_DABUSB=m
+
+#
+# Graphics support
+#
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_LCD_CLASS_DEVICE=m
+
+#
+# Display device support
+#
+CONFIG_DISPLAY_SUPPORT=m
+
+#
+# Display hardware drivers
+#
+# CONFIG_VGASTATE is not set
+CONFIG_FB=y
+CONFIG_FIRMWARE_EDID=y
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_TILEBLITTING=y
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_BFIN_7171 is not set
+# CONFIG_FB_BFIN_7393 is not set
+CONFIG_FB_BF54X_LQ043=y
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+# CONFIG_LOGO is not set
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+CONFIG_AC97_BUS=m
+
+#
+# HID Devices
+#
+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 is not set
+
+#
+# USB HID Boot Protocol drivers
+#
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+CONFIG_USB=m
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+CONFIG_USB_DEVICE_CLASS=y
+# CONFIG_USB_DYNAMIC_MINORS is not set
+# CONFIG_USB_OTG is not set
+
+#
+# USB Host Controller Drivers
+#
+CONFIG_USB_ISP116X_HCD=m
+# CONFIG_USB_ISP1362_HCD is not set
+CONFIG_USB_ISP1760_HCD=m
+CONFIG_USB_SL811_HCD=m
+CONFIG_USB_BF54x_HCD=m
+# CONFIG_USB_MUSB_HDRC 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=m
+# CONFIG_USB_STORAGE_DEBUG is not set
+# CONFIG_USB_STORAGE_DATAFAB is not set
+# CONFIG_USB_STORAGE_FREECOM is not set
+# CONFIG_USB_STORAGE_DPCM is not set
+# CONFIG_USB_STORAGE_USBAT is not set
+# CONFIG_USB_STORAGE_SDDR09 is not set
+# CONFIG_USB_STORAGE_SDDR55 is not set
+# CONFIG_USB_STORAGE_JUMPSHOT is not set
+# CONFIG_USB_STORAGE_ALAUDA is not set
+# CONFIG_USB_STORAGE_ONETOUCH is not set
+# CONFIG_USB_STORAGE_KARMA is not set
+# CONFIG_USB_LIBUSUAL is not set
+
+#
+# USB Imaging devices
+#
+# CONFIG_USB_MDC800 is not set
+# CONFIG_USB_MICROTEK is not set
+CONFIG_USB_MON=y
+
+#
+# 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=m
+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_HP4X=m
+CONFIG_USB_SERIAL_SAFE=m
+# CONFIG_USB_SERIAL_SAFE_PADDED is not set
+CONFIG_USB_SERIAL_SIERRAWIRELESS=m
+CONFIG_USB_SERIAL_TI=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+# CONFIG_USB_SERIAL_OPTION is not set
+CONFIG_USB_SERIAL_OMNINET=m
+CONFIG_USB_SERIAL_DEBUG=m
+CONFIG_USB_EZUSB=y
+
+#
+# USB Miscellaneous drivers
+#
+# CONFIG_USB_EMI62 is not set
+# CONFIG_USB_EMI26 is not set
+# CONFIG_USB_ADUTUX is not set
+# CONFIG_USB_AUERSWALD is not set
+# CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
+# CONFIG_USB_LCD is not set
+# CONFIG_USB_BERRY_CHARGE is not set
+# CONFIG_USB_LED is not set
+# CONFIG_USB_CYPRESS_CY7C63 is not set
+# CONFIG_USB_CYTHERM is not set
+# CONFIG_USB_PHIDGET is not set
+# CONFIG_USB_IDMOUSE is not set
+# CONFIG_USB_FTDI_ELAN is not set
+# CONFIG_USB_APPLEDISPLAY is not set
+# CONFIG_USB_LD is not set
+# CONFIG_USB_TRANCEVIBRATOR is not set
+# CONFIG_USB_IOWARRIOR is not set
+# CONFIG_USB_TEST is not set
+
+#
+# USB DSL modem support
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_FSL_USB2 is not set
+CONFIG_USB_GADGET_NET2272=y
+CONFIG_USB_NET2272=m
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+CONFIG_USB_GADGET_DUALSPEED=y
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+CONFIG_USB_FILE_STORAGE_TEST=y
+CONFIG_USB_G_SERIAL=m
+# CONFIG_USB_MIDI_GADGET is not set
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_UNSAFE_RESUME=y
+
+#
+# MMC/SD Card Drivers
+#
+CONFIG_MMC_BLOCK=y
+
+#
+# MMC/SD Host Controller Drivers
+#
+# CONFIG_SDH_BFIN is not set
+# CONFIG_SPI_MMC is not set
+
+#
+# LED devices
+#
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=m
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=m
+CONFIG_LEDS_TRIGGER_HEARTBEAT=m
+
+#
+# InfiniBand support
+#
+
+#
+# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
+#
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+# CONFIG_RTC_DEBUG is not set
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
+# CONFIG_RTC_DRV_TEST is not set
+
+#
+# I2C RTC drivers
+#
+# CONFIG_RTC_DRV_DS1307 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_MAX6900 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+
+#
+# SPI RTC drivers
+#
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+
+#
+# Platform RTC drivers
+#
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# on-CPU RTC drivers
+#
+CONFIG_RTC_DRV_BFIN=y
+
+#
+# DMA Engine support
+#
+CONFIG_DMA_ENGINE=y
+
+#
+# DMA Clients
+#
+CONFIG_NET_DMA=y
+
+#
+# DMA Devices
+#
+
+#
+# PBX support
+#
+# CONFIG_PBX is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+# CONFIG_EXT2_FS_POSIX_ACL is not set
+# CONFIG_EXT2_FS_SECURITY is not set
+CONFIG_EXT3_FS=m
+CONFIG_EXT3_FS_XATTR=y
+# CONFIG_EXT3_FS_POSIX_ACL is not set
+# CONFIG_EXT3_FS_SECURITY is not set
+# CONFIG_EXT4DEV_FS is not set
+CONFIG_JBD=m
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_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 is not set
+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 is not set
+CONFIG_VFAT_FS=m
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_SYSCTL=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_TMPFS_POSIX_ACL is not set
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+CONFIG_CONFIGFS_FS=m
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_YAFFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+CONFIG_JFFS2_SUMMARY=y
+# CONFIG_JFFS2_FS_XATTR is not set
+CONFIG_JFFS2_COMPRESSION_OPTIONS=y
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_JFFS2_CMODE_NONE is not set
+CONFIG_JFFS2_CMODE_PRIORITY=y
+# CONFIG_JFFS2_CMODE_SIZE is not set
+# CONFIG_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=y
+CONFIG_NFSD=m
+CONFIG_NFSD_V2_ACL=y
+CONFIG_NFSD_V3=y
+CONFIG_NFSD_V3_ACL=y
+CONFIG_NFSD_V4=y
+CONFIG_NFSD_TCP=y
+CONFIG_LOCKD=m
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=m
+CONFIG_NFS_ACL_SUPPORT=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=y
+# CONFIG_CIFS_STATS2 is not set
+# CONFIG_CIFS_WEAK_PW_HASH is not set
+CONFIG_CIFS_XATTR=y
+# CONFIG_CIFS_POSIX is not set
+# CONFIG_CIFS_DEBUG2 is not set
+# CONFIG_CIFS_EXPERIMENTAL is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS=m
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# 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=y
+# CONFIG_UNUSED_SYMBOLS is not set
+CONFIG_DEBUG_FS=y
+# CONFIG_HEADERS_CHECK is not set
+# CONFIG_DEBUG_KERNEL is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+CONFIG_DEBUG_MMRS=y
+CONFIG_DEBUG_HUNT_FOR_ZERO=y
+CONFIG_DEBUG_BFIN_HWTRACE_ON=y
+CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y
+# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set
+# CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set
+CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0
+# CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set
+# CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set
+CONFIG_EARLY_PRINTK=y
+CONFIG_CPLB_INFO=y
+CONFIG_ACCESS_CHECK=y
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+CONFIG_SECURITY=y
+# CONFIG_SECURITY_NETWORK is not set
+CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY_ROOTPLUG is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ALGAPI=m
+CONFIG_CRYPTO_BLKCIPHER=m
+CONFIG_CRYPTO_HASH=m
+CONFIG_CRYPTO_MANAGER=m
+CONFIG_CRYPTO_HMAC=m
+# CONFIG_CRYPTO_XCBC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=m
+CONFIG_CRYPTO_SHA1=m
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+CONFIG_CRYPTO_ECB=m
+CONFIG_CRYPTO_CBC=m
+CONFIG_CRYPTO_PCBC=m
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+CONFIG_CRYPTO_DES=m
+# CONFIG_CRYPTO_FCRYPT is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+CONFIG_CRYPTO_AES=m
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+CONFIG_CRYPTO_ARC4=m
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+CONFIG_CRYPTO_DEFLATE=m
+CONFIG_CRYPTO_MICHAEL_MIC=m
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_CAMELLIA is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+CONFIG_BITREVERSE=y
+CONFIG_CRC_CCITT=m
+# CONFIG_CRC16 is not set
+# CONFIG_CRC_ITU_T is not set
+CONFIG_CRC32=y
+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/linux-bfin_svn.bb b/packages/linux/linux-bfin_svn.bb
new file mode 100644
index 0000000000..ee5b04910f
--- /dev/null
+++ b/packages/linux/linux-bfin_svn.bb
@@ -0,0 +1,15 @@
+require linux.inc
+
+PV = "2.6.22.10+svnr${SRCREV}"
+
+SRC_URI = "svn://sources.blackfin.uclinux.org/linux-kernel/;module=trunk \
+ file://defconfig \
+ "
+
+S = "${WORKDIR}/trunk"
+
+do_configure_prepend() {
+ rm localversion.adi || true
+}
+
+
diff --git a/packages/linux/linux-efika-2.6.20.20/.mtn2git_empty b/packages/linux/linux-efika-2.6.20.20/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-efika-2.6.20.20/.mtn2git_empty
diff --git a/packages/linux/linux-efika-2.6.20.11/sched-cfs-v9-v2.6.20.11.patch b/packages/linux/linux-efika-2.6.20.20/sched-cfs-v9-v2.6.20.11.patch
index 29071a99ac..29071a99ac 100644
--- a/packages/linux/linux-efika-2.6.20.11/sched-cfs-v9-v2.6.20.11.patch
+++ b/packages/linux/linux-efika-2.6.20.20/sched-cfs-v9-v2.6.20.11.patch
diff --git a/packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch b/packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch
new file mode 100644
index 0000000000..bd6fb98f61
--- /dev/null
+++ b/packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch
@@ -0,0 +1,23 @@
+2.6.20.20 with CFS fails to compile for powerpc, because this arch already has
+its assembly-optimized __div64_32() implementation, so linking fails due to
+two symbols.
+
+The same issue appeared on the s390 arch, so this patch is inspired by it.
+
+http://lkml.org/lkml/2007/4/11/24
+
+Leon 'likewise' Woestenberg <leonw@mailcan.com>
+
+Index: linux-2.6.20/lib/div64.c
+===================================================================
+--- linux-2.6.20.orig/lib/div64.c 2007-10-07 16:19:38.000000000 +0200
++++ linux-2.6.20/lib/div64.c 2007-10-07 16:20:15.000000000 +0200
+@@ -23,7 +23,7 @@
+ /* Not needed on 64bit architectures */
+ #if BITS_PER_LONG == 32
+
+-uint32_t __div64_32(uint64_t *n, uint32_t base)
++uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
+ {
+ uint64_t rem = *n;
+ uint64_t b = base;
diff --git a/packages/linux/linux-efika-2.6.20/defconfig b/packages/linux/linux-efika-2.6.20/defconfig
index fb7c9109bf..c68d7f1d1c 100644
--- a/packages/linux/linux-efika-2.6.20/defconfig
+++ b/packages/linux/linux-efika-2.6.20/defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.20
-# Tue Feb 27 05:45:18 2007
+# Linux kernel version: 2.6.20.20-cfs-v22
+# Sun Oct 7 15:39:14 2007
#
# CONFIG_PPC64 is not set
CONFIG_PPC32=y
@@ -53,6 +53,7 @@ CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
#
@@ -69,6 +70,8 @@ CONFIG_POSIX_MQUEUE=y
# CONFIG_UTS_NS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
+CONFIG_FAIR_GROUP_SCHED=y
+CONFIG_FAIR_USER_SCHED=y
# CONFIG_SYSFS_DEPRECATED is not set
# CONFIG_RELAY is not set
CONFIG_INITRAMFS_SOURCE=""
@@ -165,9 +168,10 @@ CONFIG_USE_MDIO=y
# CONFIG_HZ_300 is not set
CONFIG_HZ_1000=y
CONFIG_HZ=1000
-CONFIG_PREEMPT_NONE=y
+# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
+CONFIG_PREEMPT=y
+CONFIG_PREEMPT_BKL=y
CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_MISC=y
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
@@ -186,8 +190,13 @@ CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_PROC_DEVICETREE=y
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE="console=ttyS0,9600 console=ttyPSC0,115200"
-# CONFIG_PM is not set
-CONFIG_SECCOMP=y
+CONFIG_PM=y
+# CONFIG_PM_LEGACY is not set
+CONFIG_PM_DEBUG=y
+# CONFIG_DISABLE_CONSOLE_SUSPEND is not set
+# CONFIG_PM_SYSFS_DEPRECATED is not set
+# CONFIG_SOFTWARE_SUSPEND is not set
+# CONFIG_SECCOMP is not set
CONFIG_ISA_DMA_API=y
#
@@ -1118,7 +1127,115 @@ CONFIG_LOGO=y
#
# Sound
#
-# CONFIG_SOUND is not set
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+CONFIG_SND=m
+CONFIG_SND_TIMER=m
+CONFIG_SND_PCM=m
+# CONFIG_SND_SEQUENCER is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+CONFIG_SND_DEBUG=y
+# CONFIG_SND_DEBUG_DETECT is not set
+CONFIG_SND_PCM_XRUN_DEBUG=y
+
+#
+# Generic devices
+#
+CONFIG_SND_AC97_CODEC=m
+# 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_ALS4000 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
+# CONFIG_SND_AC97_POWER_SAVE is not set
+
+#
+# ALSA PowerMac devices
+#
+
+#
+# ALSA PPC devices
+#
+CONFIG_SND_PPC_MPC52xx_AC97=m
+
+#
+# USB devices
+#
+# CONFIG_SND_USB_AUDIO is not set
+# CONFIG_SND_USB_USX2Y is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+CONFIG_AC97_BUS=m
#
# HID Devices
@@ -1140,6 +1257,7 @@ CONFIG_USB=y
CONFIG_USB_DEVICEFS=y
CONFIG_USB_BANDWIDTH=y
CONFIG_USB_DYNAMIC_MINORS=y
+# CONFIG_USB_SUSPEND is not set
# CONFIG_USB_OTG is not set
#
@@ -1183,7 +1301,6 @@ CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
-# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_LIBUSUAL is not set
diff --git a/packages/linux/linux-efika_2.6.20.11.bb b/packages/linux/linux-efika_2.6.20.20.bb
index 2113b27be9..b8877fa5c3 100644
--- a/packages/linux/linux-efika_2.6.20.11.bb
+++ b/packages/linux/linux-efika_2.6.20.20.bb
@@ -41,12 +41,12 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2 \
file://0032-POWERPC-EFIKA-Adds-missing-interrupts-from-bestcomm-node.txt;p=1;patch=1 \
file://0033-EFIKA-fullduplex-prpl_aln.txt;p=1;patch=1 \
file://v4l.diff;p=1;patch=1 \
- http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.20.11.bz2;p=1;patch=1 \
- file://sched-cfs-v9-v2.6.20.11.patch;p=1;patch=1 \
+ http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.20.20.bz2;p=1;patch=1 \
+ http://people.redhat.com/mingo/cfs-scheduler/sched-cfs-v2.6.20.20-v22.patch;p=1;patch=1 \
+ file://weaken-div64_32-symbol.patch;patch=1 \
file://defconfig \
"
-
S = "${WORKDIR}/linux-2.6.20"
inherit kernel
@@ -71,8 +71,6 @@ do_stage_append () {
cp -a include/asm-ppc ${STAGING_KERNEL_DIR}/include/
}
-
-
do_deploy() {
install -d ${DEPLOY_DIR_IMAGE}
install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${MACHINE}-${DATETIME}
diff --git a/packages/linux/linux-handhelds-2.6.inc b/packages/linux/linux-handhelds-2.6.inc
index 47c32a4a24..d2256b5f27 100644
--- a/packages/linux/linux-handhelds-2.6.inc
+++ b/packages/linux/linux-handhelds-2.6.inc
@@ -3,7 +3,7 @@ DESCRIPTION = "handhelds.org Linux kernel 2.6 for PocketPCs and other consumer h
LICENSE = "GPL"
COMPATIBLE_HOST = "arm.*-linux"
-COMPATIBLE_MACHINE ?= '(asus620|asus730|aximx50|aximx50v|h1910|h2200|h3600|h3800|h3900|h4000|h5000|htcalpine|htcapache|htcblueangel|htchermes|htchimalaya|htcuniversal|htcwallaby|hx4700|looxc550|jornada56x|magician|rx1950|rx3000)'
+COMPATIBLE_MACHINE ?= '(asus620|asus730|aximx50|aximx50v|h1910|h2200|h3600|h3800|h3900|h4000|h5000|htcalpine|htcapache|htcblueangel|htchermes|htchimalaya|htcsable|htcuniversal|htcwallaby|hx4700|ghi270|looxc550|jornada56x|magician|rx1950|rx3000)'
# SRC_URI *must* be overriden in includer, but this is a good reference
SRC_URI ?= "${HANDHELDS_CVS};module=linux/kernel26;tag=${@'K' + bb.data.getVar('PV',d,1).replace('.', '-')} \
diff --git a/packages/linux/linux-handhelds-2.6/ghi270/.mtn2git_empty b/packages/linux/linux-handhelds-2.6/ghi270/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/linux/linux-handhelds-2.6/ghi270/.mtn2git_empty
diff --git a/packages/linux/linux-handhelds-2.6_2.6.21-hh11.bb b/packages/linux/linux-handhelds-2.6_2.6.21-hh11.bb
new file mode 100644
index 0000000000..7e3f93c92e
--- /dev/null
+++ b/packages/linux/linux-handhelds-2.6_2.6.21-hh11.bb
@@ -0,0 +1,13 @@
+SECTION = "kernel"
+DESCRIPTION = "handhelds.org Linux kernel 2.6 for PocketPCs and other consumer handheld devices."
+LICENSE = "GPL"
+PR = "r1"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "${HANDHELDS_CVS};module=linux/kernel26;tag=${@'K' + bb.data.getVar('PV',d,1).replace('.', '-')} \
+ file://defconfig"
+
+SRC_URI_append_ghi270 = " file://ghi270-hh11.patch;patch=1"
+
+require linux-handhelds-2.6.inc
diff --git a/packages/linux/linux-handhelds-2.6_2.6.21-hh17.bb b/packages/linux/linux-handhelds-2.6_2.6.21-hh17.bb
new file mode 100644
index 0000000000..275602762d
--- /dev/null
+++ b/packages/linux/linux-handhelds-2.6_2.6.21-hh17.bb
@@ -0,0 +1,11 @@
+SECTION = "kernel"
+DESCRIPTION = "handhelds.org Linux kernel 2.6 for PocketPCs and other consumer handheld devices."
+LICENSE = "GPL"
+PR = "r2"
+
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI = "${HANDHELDS_CVS};module=linux/kernel26;tag=${@'K' + bb.data.getVar('PV',d,1).replace('.', '-')} \
+ file://defconfig"
+
+require linux-handhelds-2.6.inc
diff --git a/packages/linux/linux-openmoko-devel/defconfig b/packages/linux/linux-openmoko-devel/defconfig-2.6.23.1
index f7274016c8..2419f90981 100644
--- a/packages/linux/linux-openmoko-devel/defconfig
+++ b/packages/linux/linux-openmoko-devel/defconfig-2.6.23.1
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22.1
-# Thu Jul 26 22:01:38 2007
+# Linux kernel version: 2.6.23-rc9
+# Tue Oct 9 15:27:11 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -26,26 +26,21 @@ CONFIG_VECTORS_BASE=0xffff0000
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
#
-# Code maturity level options
+# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_BROKEN_ON_SMP=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
CONFIG_LOCALVERSION="-moko11"
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
CONFIG_SYSVIPC_SYSCTL=y
# CONFIG_POSIX_MQUEUE is not set
# CONFIG_BSD_PROCESS_ACCT is not set
# CONFIG_TASKSTATS is not set
-# CONFIG_UTS_NS is not set
+# CONFIG_USER_NS is not set
# CONFIG_AUDIT is not set
# CONFIG_IKCONFIG is not set
CONFIG_LOG_BUF_SHIFT=14
@@ -70,7 +65,6 @@ CONFIG_FUTEX=y
CONFIG_ANON_INODES=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_VM_EVENT_COUNTERS=y
@@ -80,24 +74,17 @@ CONFIG_SLAB=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_KMOD=y
-
-#
-# Block layer
-#
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
@@ -138,6 +125,7 @@ CONFIG_DEFAULT_IOSCHED="deadline"
# 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
@@ -149,14 +137,25 @@ CONFIG_ARCH_S3C2410=y
# CONFIG_ARCH_OMAP is not set
CONFIG_PLAT_S3C24XX=y
CONFIG_CPU_S3C244X=y
-# CONFIG_S3C2410_BOOT_WATCHDOG is not set
-CONFIG_S3C2410_BOOT_ERROR_RESET=y
-CONFIG_S3C2410_PM_DEBUG=y
-# CONFIG_S3C2410_PM_CHECK is not set
-CONFIG_S3C2410_LOWLEVEL_UART_PORT=0
CONFIG_S3C2410_DMA=y
# CONFIG_S3C2410_DMA_DEBUG is not set
CONFIG_MACH_SMDK=y
+CONFIG_PLAT_S3C=y
+CONFIG_CPU_LLSERIAL_S3C2410=y
+CONFIG_CPU_LLSERIAL_S3C2440=y
+
+#
+# Boot options
+#
+# CONFIG_S3C_BOOT_WATCHDOG is not set
+# CONFIG_S3C_BOOT_ERROR_RESET is not set
+
+#
+# Power management
+#
+CONFIG_S3C2410_PM_DEBUG=y
+# CONFIG_S3C2410_PM_CHECK is not set
+CONFIG_S3C_LOWLEVEL_UART_PORT=0
#
# S3C2400 Machines
@@ -200,6 +199,7 @@ CONFIG_ARCH_S3C2440=y
CONFIG_SMDK2440_CPU2440=y
CONFIG_MACH_HXD8=y
CONFIG_MACH_NEO1973_GTA02=y
+CONFIG_CPU_S3C2442=y
#
# S3C2442 Machines
@@ -237,6 +237,7 @@ CONFIG_ARM_THUMB=y
#
# Bus support
#
+# CONFIG_PCI_SYSCALL is not set
# CONFIG_ARCH_SUPPORTS_MSI is not set
#
@@ -251,7 +252,8 @@ CONFIG_ARM_THUMB=y
CONFIG_PREEMPT=y
CONFIG_NO_IDLE_HZ=y
CONFIG_HZ=200
-# CONFIG_AEABI is not set
+CONFIG_AEABI=y
+CONFIG_OABI_COMPAT=y
# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
@@ -263,6 +265,8 @@ CONFIG_FLAT_NODE_MEM_MAP=y
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
#
@@ -270,7 +274,7 @@ CONFIG_ALIGNMENT_TRAP=y
#
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_CMDLINE="ip=192.168.1.2:192.168.1.10:192.168.1.10:255.255.255.0:ezx:usb0:off"
+CONFIG_CMDLINE="unused -- bootloader passes ATAG list"
# CONFIG_XIP_KERNEL is not set
CONFIG_KEXEC=y
@@ -282,6 +286,7 @@ CONFIG_KEXEC=y
# At least one emulation must be selected
#
CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
# CONFIG_FPE_FASTFPE is not set
#
@@ -290,7 +295,6 @@ CONFIG_FPE_NWFPE=y
CONFIG_BINFMT_ELF=y
# CONFIG_BINFMT_AOUT is not set
# CONFIG_BINFMT_MISC is not set
-# CONFIG_ARTHUR is not set
#
# Power management options
@@ -298,8 +302,11 @@ CONFIG_BINFMT_ELF=y
CONFIG_PM=y
CONFIG_PM_LEGACY=y
CONFIG_PM_DEBUG=y
+# CONFIG_PM_VERBOSE is not set
CONFIG_DISABLE_CONSOLE_SUSPEND=y
-# CONFIG_PM_SYSFS_DEPRECATED is not set
+CONFIG_PM_SLEEP=y
+CONFIG_SUSPEND_UP_POSSIBLE=y
+CONFIG_SUSPEND=y
CONFIG_APM_EMULATION=y
#
@@ -388,6 +395,7 @@ 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 is not set
CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m
@@ -408,6 +416,7 @@ CONFIG_NETFILTER_XT_TARGET_NFLOG=m
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
# CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
+CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
CONFIG_NETFILTER_XT_MATCH_DCCP=m
@@ -429,6 +438,7 @@ 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=m
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
#
@@ -547,6 +557,7 @@ CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_HFSC=m
CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RR=m
CONFIG_NET_SCH_RED=m
CONFIG_NET_SCH_SFQ=m
CONFIG_NET_SCH_TEQL=m
@@ -574,7 +585,6 @@ CONFIG_NET_CLS_RSVP6=m
# CONFIG_NET_CLS_ACT is not set
# CONFIG_NET_CLS_POLICE is not set
# CONFIG_NET_CLS_IND is not set
-CONFIG_NET_ESTIMATOR=y
#
# Network testing
@@ -613,6 +623,7 @@ CONFIG_FIB_RULES=y
# CONFIG_MAC80211 is not set
# CONFIG_IEEE80211 is not set
# CONFIG_RFKILL is not set
+# CONFIG_NET_9P is not set
#
# Device Drivers
@@ -627,10 +638,6 @@ CONFIG_FW_LOADER=m
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
CONFIG_CONNECTOR=m
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
@@ -712,20 +719,8 @@ CONFIG_MTD_NAND_S3C2410_CLKSTOP=y
# UBI - Unsorted block images
#
# CONFIG_MTD_UBI is not set
-
-#
-# Parallel port support
-#
# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNPACPI is not set
-
-#
-# Block devices
-#
+CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=m
# CONFIG_BLK_DEV_CRYPTOLOOP is not set
@@ -744,6 +739,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
#
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=m
+CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y
@@ -774,19 +770,11 @@ CONFIG_SCSI_WAIT_SCAN=m
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
-# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
-
-#
-# SCSI low-level drivers
-#
+CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_ATA is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
CONFIG_MD=y
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_DM=m
@@ -797,22 +785,17 @@ CONFIG_DM_SNAPSHOT=m
# CONFIG_DM_ZERO is not set
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
-
-#
-# Network device support
-#
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_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
CONFIG_NET_ETHERNET=y
CONFIG_MII=m
+# CONFIG_AX88796 is not set
# CONFIG_SMC91X is not set
# CONFIG_DM9000 is not set
CONFIG_NET_PCI=y
@@ -861,16 +844,13 @@ CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_MPPE=m
# CONFIG_PPPOE is not set
+# CONFIG_PPPOL2TP is not set
# CONFIG_SLIP is not set
CONFIG_SLHC=m
# CONFIG_SHAPER is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
# CONFIG_ISDN is not set
#
@@ -910,10 +890,12 @@ CONFIG_INPUT_MOUSE=y
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MOUSE_GPIO is not set
# CONFIG_INPUT_JOYSTICK is not set
# CONFIG_INPUT_TABLET is not set
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_ADS7846 is not set
+# CONFIG_TOUCHSCREEN_FUJITSU is not set
CONFIG_TOUCHSCREEN_S3C2410=y
# CONFIG_TOUCHSCREEN_S3C2410_DEBUG is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
@@ -959,10 +941,6 @@ CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
# CONFIG_LEGACY_PTYS is not set
-
-#
-# IPMI
-#
# CONFIG_IPMI_HANDLER is not set
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -981,10 +959,6 @@ CONFIG_S3C2410_WATCHDOG=m
# CONFIG_NVRAM is not set
# CONFIG_R3964 is not set
# CONFIG_RAW_DRIVER is not set
-
-#
-# TPM devices
-#
# CONFIG_TCG_TPM is not set
# CONFIG_TS0710_MUX is not set
CONFIG_I2C=y
@@ -1006,6 +980,7 @@ CONFIG_I2C_CHARDEV=y
# CONFIG_I2C_PARPORT_LIGHT is not set
CONFIG_I2C_S3C2410=y
# CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_STUB is not set
# CONFIG_I2C_TINY_USB is not set
@@ -1014,6 +989,7 @@ CONFIG_I2C_S3C2410=y
#
# CONFIG_SENSORS_DS1337 is not set
# CONFIG_SENSORS_DS1374 is not set
+# CONFIG_DS1682 is not set
# CONFIG_SENSORS_EEPROM is not set
CONFIG_SENSORS_PCF50606=y
CONFIG_SENSORS_PCF50633=y
@@ -1021,6 +997,7 @@ CONFIG_SENSORS_PCF50633=y
# 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_SENSORS_TSL256X=m
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
@@ -1046,15 +1023,13 @@ CONFIG_SPI_S3C24XX_GPIO=y
#
# CONFIG_SPI_AT25 is not set
# CONFIG_SPI_SPIDEV is not set
+# CONFIG_SPI_TLE62X0 is not set
CONFIG_SPI_SLAVE_JBT6K74=y
-
-#
-# Dallas's 1-wire bus
-#
# CONFIG_W1 is not set
CONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
# CONFIG_SENSORS_ABITUGURU is not set
+# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
@@ -1082,13 +1057,16 @@ CONFIG_HWMON=y
# 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_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_VT1211 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
@@ -1098,27 +1076,21 @@ CONFIG_HWMON=y
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
+CONFIG_MISC_DEVICES=y
+# CONFIG_EEPROM_93CX6 is not set
#
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set
-
-#
-# LED devices
-#
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
#
# LED drivers
#
-CONFIG_LEDS_S3C24XX=m
-CONFIG_LEDS_GTA01=y
+CONFIG_LEDS_S3C24XX=y
+# CONFIG_LEDS_GPIO is not set
#
# LED Triggers
@@ -1139,8 +1111,8 @@ CONFIG_DAB=y
# Graphics support
#
CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
CONFIG_BACKLIGHT_GTA01=y
#
@@ -1148,6 +1120,7 @@ CONFIG_BACKLIGHT_GTA01=y
#
# CONFIG_DISPLAY_SUPPORT is not set
# CONFIG_VGASTATE is not set
+CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_FB=y
# CONFIG_FIRMWARE_EDID is not set
# CONFIG_FB_DDC is not set
@@ -1183,6 +1156,7 @@ CONFIG_FB_GLAMO_SPI=y
# CONFIG_VGA_CONSOLE is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_FONTS=y
# CONFIG_FONT_8x8 is not set
@@ -1195,10 +1169,11 @@ CONFIG_FONT_6x11=y
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
-# CONFIG_LOGO is not set
+CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
+# CONFIG_LOGO_OPENMOKO_CLUT224 is not set
#
# Sound
@@ -1246,23 +1221,20 @@ CONFIG_SND_USB_AUDIO=m
# System on Chip audio support
#
CONFIG_SND_SOC=y
-CONFIG_SND_S3C24XX_SOC=m
-CONFIG_SND_S3C24XX_SOC_I2S=m
-CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753=m
+CONFIG_SND_S3C24XX_SOC=y
+CONFIG_SND_S3C24XX_SOC_I2S=y
+CONFIG_SND_S3C24XX_SOC_NEO1973_WM8753=y
#
# SoC Audio support for SuperH
#
-CONFIG_SND_SOC_WM8753=m
+CONFIG_SND_SOC_WM8753=y
#
# Open Sound System
#
# CONFIG_SOUND_PRIME is not set
-
-#
-# HID Devices
-#
+CONFIG_HID_SUPPORT=y
CONFIG_HID=y
# CONFIG_HID_DEBUG is not set
@@ -1279,10 +1251,7 @@ CONFIG_USB_HID=m
#
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set
-
-#
-# USB support
-#
+CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
# CONFIG_USB_ARCH_HAS_EHCI is not set
@@ -1296,6 +1265,7 @@ CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_DYNAMIC_MINORS is not set
# CONFIG_USB_SUSPEND is not set
+# CONFIG_USB_PERSIST is not set
# CONFIG_USB_OTG is not set
#
@@ -1307,6 +1277,7 @@ CONFIG_USB_OHCI_HCD=m
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
# CONFIG_USB_SL811_HCD is not set
+# CONFIG_USB_R8A66597_HCD is not set
#
# USB Device Class drivers
@@ -1389,6 +1360,7 @@ CONFIG_USB_SERIAL_MOS7720=m
CONFIG_USB_SERIAL_MOS7840=m
CONFIG_USB_SERIAL_NAVMAN=m
CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_OTI6858=m
CONFIG_USB_SERIAL_HP4X=m
CONFIG_USB_SERIAL_SAFE=m
CONFIG_USB_SERIAL_SAFE_PADDED=y
@@ -1432,11 +1404,14 @@ CONFIG_USB_IOWARRIOR=m
# USB Gadget Support
#
CONFIG_USB_GADGET=y
+# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_AMD5536UDC is not set
# CONFIG_USB_GADGET_FSL_USB2 is not set
# CONFIG_USB_GADGET_NET2280 is not set
# CONFIG_USB_GADGET_PXA2XX is not set
+# CONFIG_USB_GADGET_M66592 is not set
# CONFIG_USB_GADGET_GOKU is not set
# CONFIG_USB_GADGET_LH7A40X is not set
# CONFIG_USB_GADGET_OMAP is not set
@@ -1461,15 +1436,12 @@ CONFIG_MMC_UNSAFE_RESUME=y
# MMC/SD Card Drivers
#
CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_BOUNCE=y
#
# MMC/SD Host Controller Drivers
#
CONFIG_MMC_S3C=y
-
-#
-# Real Time Clock
-#
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
@@ -1496,6 +1468,7 @@ CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_M41T80 is not set
#
# SPI RTC drivers
@@ -1508,8 +1481,10 @@ CONFIG_RTC_INTF_DEV=y
#
# 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
#
@@ -1518,6 +1493,19 @@ CONFIG_RTC_INTF_DEV=y
CONFIG_RTC_DRV_S3C=m
#
+# DMA Engine support
+#
+# CONFIG_DMA_ENGINE is not set
+
+#
+# DMA Clients
+#
+
+#
+# DMA Devices
+#
+
+#
# File systems
#
CONFIG_EXT2_FS=m
@@ -1586,6 +1574,7 @@ CONFIG_CONFIGFS_FS=m
# CONFIG_EFS_FS is not set
CONFIG_YAFFS_FS=y
CONFIG_YAFFS_YAFFS1=y
+# CONFIG_YAFFS_9BYTE_TAGS is not set
# CONFIG_YAFFS_DOES_ECC is not set
CONFIG_YAFFS_YAFFS2=y
CONFIG_YAFFS_AUTO_YAFFS2=y
@@ -1647,7 +1636,6 @@ CONFIG_CIFS_WEAK_PW_HASH=y
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
#
# Partition Types
@@ -1721,6 +1709,7 @@ CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_DETECT_SOFTLOCKUP=y
+CONFIG_SCHED_DEBUG=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_TIMER_STATS is not set
# CONFIG_DEBUG_SLAB is not set
@@ -1731,6 +1720,7 @@ CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_PROVE_LOCKING is not set
+# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
# CONFIG_DEBUG_KOBJECT is not set
@@ -1746,18 +1736,14 @@ CONFIG_FORCED_INLINING=y
CONFIG_DEBUG_ERRORS=y
CONFIG_DEBUG_LL=y
# CONFIG_DEBUG_ICEDCC is not set
-CONFIG_DEBUG_S3C2410_PORT=y
-CONFIG_DEBUG_S3C2410_UART=0
+CONFIG_DEBUG_S3C_PORT=y
+CONFIG_DEBUG_S3C_UART=2
#
# Security options
#
# CONFIG_KEYS is not set
# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
CONFIG_CRYPTO=y
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_BLKCIPHER=y
@@ -1797,10 +1783,7 @@ CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_CRC32C=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_TEST=m
-
-#
-# Hardware crypto devices
-#
+CONFIG_CRYPTO_HW=y
#
# Library routines
@@ -1810,6 +1793,7 @@ CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
# 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
diff --git a/packages/linux/linux-openmoko-devel/hack-gta02-cpu.patch b/packages/linux/linux-openmoko-devel/hack-gta02-cpu.patch
new file mode 100644
index 0000000000..ef4e939640
--- /dev/null
+++ b/packages/linux/linux-openmoko-devel/hack-gta02-cpu.patch
@@ -0,0 +1,21 @@
+Index: linux-2.6.22/arch/arm/mach-s3c2440/Kconfig
+===================================================================
+--- linux-2.6.22.orig/arch/arm/mach-s3c2440/Kconfig
++++ linux-2.6.22/arch/arm/mach-s3c2440/Kconfig
+@@ -69,14 +69,14 @@
+
+ config MACH_HXD8
+ bool "FIC HXD8"
+- select CPU_S3C2440
++ select CPU_S3C2442
+ select SENSORS_PCF50606
+ help
+ Say Y here if you are using the FIC Neo1973 GSM Phone
+
+ config MACH_NEO1973_GTA02
+ bool "FIC Neo1973 GSM Phone (GTA02 Hardware)"
+- select CPU_S3C2440
++ select CPU_S3C2442
+ select SENSORS_PCF50633
+ help
+ Say Y here if you are using the FIC Neo1973 GSM Phone
diff --git a/packages/linux/linux-openmoko-devel/printascii-2.6.23.patch b/packages/linux/linux-openmoko-devel/printascii-2.6.23.patch
new file mode 100644
index 0000000000..4818ac6bfc
--- /dev/null
+++ b/packages/linux/linux-openmoko-devel/printascii-2.6.23.patch
@@ -0,0 +1,21 @@
+Index: linux-2.6.22/kernel/printk.c
+===================================================================
+--- linux-2.6.22.orig/kernel/printk.c
++++ linux-2.6.22/kernel/printk.c
+@@ -519,6 +519,8 @@
+ /* cpu currently holding logbuf_lock */
+ static volatile unsigned int printk_cpu = UINT_MAX;
+
++extern void printascii(const char *);
++
+ asmlinkage int vprintk(const char *fmt, va_list args)
+ {
+ unsigned long flags;
+@@ -541,6 +543,7 @@
+
+ /* Emit the output into the temporary buffer */
+ printed_len = vscnprintf(printk_buf, sizeof(printk_buf), fmt, args);
++ printascii(printk_buf);
+
+ /*
+ * Copy the output into log_buf. If the caller didn't provide
diff --git a/packages/linux/linux-openmoko-devel/squashfs-2.6.23.patch b/packages/linux/linux-openmoko-devel/squashfs-2.6.23.patch
new file mode 100644
index 0000000000..f4457a8715
--- /dev/null
+++ b/packages/linux/linux-openmoko-devel/squashfs-2.6.23.patch
@@ -0,0 +1,4395 @@
+Index: linux-2.6.22/fs/Kconfig
+===================================================================
+--- linux-2.6.22.orig/fs/Kconfig
++++ linux-2.6.22/fs/Kconfig
+@@ -1368,6 +1368,71 @@
+
+ If unsure, say N.
+
++config SQUASHFS
++ tristate "SquashFS 3.2 - Squashed file system support"
++ select ZLIB_INFLATE
++ help
++ Saying Y here includes support for SquashFS 3.2 (a Compressed Read-Only File
++ System). Squashfs is a highly compressed read-only filesystem for Linux.
++ It uses zlib compression to compress both files, inodes and directories.
++ Inodes in the system are very small and all blocks are packed to minimise
++ data overhead. Block sizes greater than 4K are supported up to a maximum of 64K.
++ SquashFS 3.1 supports 64 bit filesystems and files (larger than 4GB), full
++ uid/gid information, hard links and timestamps.
++
++ Squashfs is intended for general read-only filesystem use, for archival
++ use (i.e. in cases where a .tar.gz file may be used), and in embedded
++ systems where low overhead is needed. Further information and filesystem tools
++ are available from http://squashfs.sourceforge.net.
++
++ If you want to compile this as a module ( = code which can be
++ inserted in and removed from the running kernel whenever you want),
++ say M here and read <file:Documentation/modules.txt>. The module
++ will be called squashfs. Note that the root file system (the one
++ containing the directory /) cannot be compiled as a module.
++
++ If unsure, say N.
++
++config SQUASHFS_EMBEDDED
++
++ bool "Additional options for memory-constrained systems"
++ depends on SQUASHFS
++ default n
++ help
++ Saying Y here allows you to specify cache sizes and how Squashfs
++ allocates memory. This is only intended for memory constrained
++ systems.
++
++ If unsure, say N.
++
++config SQUASHFS_FRAGMENT_CACHE_SIZE
++ int "Number of fragments cached" if SQUASHFS_EMBEDDED
++ depends on SQUASHFS
++ default "3"
++ help
++ By default SquashFS caches the last 3 fragments read from
++ the filesystem. Increasing this amount may mean SquashFS
++ has to re-read fragments less often from disk, at the expense
++ of extra system memory. Decreasing this amount will mean
++ SquashFS uses less memory at the expense of extra reads from disk.
++
++ Note there must be at least one cached fragment. Anything
++ much more than three will probably not make much difference.
++
++config SQUASHFS_VMALLOC
++ bool "Use Vmalloc rather than Kmalloc" if SQUASHFS_EMBEDDED
++ depends on SQUASHFS
++ default n
++ help
++ By default SquashFS uses kmalloc to obtain fragment cache memory.
++ Kmalloc memory is the standard kernel allocator, but it can fail
++ on memory constrained systems. Because of the way Vmalloc works,
++ Vmalloc can succeed when kmalloc fails. Specifying this option
++ will make SquashFS always use Vmalloc to allocate the
++ fragment cache memory.
++
++ If unsure, say N.
++
+ config VXFS_FS
+ tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
+ depends on BLOCK
+Index: linux-2.6.22/fs/Makefile
+===================================================================
+--- linux-2.6.22.orig/fs/Makefile
++++ linux-2.6.22/fs/Makefile
+@@ -72,6 +72,7 @@
+ obj-$(CONFIG_JBD2) += jbd2/
+ obj-$(CONFIG_EXT2_FS) += ext2/
+ obj-$(CONFIG_CRAMFS) += cramfs/
++obj-$(CONFIG_SQUASHFS) += squashfs/
+ obj-$(CONFIG_RAMFS) += ramfs/
+ obj-$(CONFIG_HUGETLBFS) += hugetlbfs/
+ obj-$(CONFIG_CODA_FS) += coda/
+Index: linux-2.6.22/fs/squashfs/inode.c
+===================================================================
+--- /dev/null
++++ linux-2.6.22/fs/squashfs/inode.c
+@@ -0,0 +1,2328 @@
++/*
++ * Squashfs - a compressed read only filesystem for Linux
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * inode.c
++ */
++
++#include <linux/squashfs_fs.h>
++#include <linux/module.h>
++#include <linux/zlib.h>
++#include <linux/fs.h>
++#include <linux/squashfs_fs_sb.h>
++#include <linux/squashfs_fs_i.h>
++#include <linux/buffer_head.h>
++#include <linux/vfs.h>
++#include <linux/vmalloc.h>
++#include <linux/smp_lock.h>
++#include <linux/exportfs.h>
++
++#include "squashfs.h"
++
++static void vfs_read_inode(struct inode *i);
++static struct dentry *squashfs_get_parent(struct dentry *child);
++static int squashfs_read_inode(struct inode *i, squashfs_inode_t inode);
++static int squashfs_statfs(struct dentry *, struct kstatfs *);
++static int squashfs_symlink_readpage(struct file *file, struct page *page);
++static long long read_blocklist(struct inode *inode, int index,
++ int readahead_blks, char *block_list,
++ unsigned short **block_p, unsigned int *bsize);
++static int squashfs_readpage(struct file *file, struct page *page);
++static int squashfs_readpage4K(struct file *file, struct page *page);
++static int squashfs_readdir(struct file *, void *, filldir_t);
++static struct dentry *squashfs_lookup(struct inode *, struct dentry *,
++ struct nameidata *);
++static int squashfs_remount(struct super_block *s, int *flags, char *data);
++static void squashfs_put_super(struct super_block *);
++static int squashfs_get_sb(struct file_system_type *,int, const char *, void *,
++ struct vfsmount *);
++static struct inode *squashfs_alloc_inode(struct super_block *sb);
++static void squashfs_destroy_inode(struct inode *inode);
++static int init_inodecache(void);
++static void destroy_inodecache(void);
++
++static struct file_system_type squashfs_fs_type = {
++ .owner = THIS_MODULE,
++ .name = "squashfs",
++ .get_sb = squashfs_get_sb,
++ .kill_sb = kill_block_super,
++ .fs_flags = FS_REQUIRES_DEV
++};
++
++static const unsigned char squashfs_filetype_table[] = {
++ DT_UNKNOWN, DT_DIR, DT_REG, DT_LNK, DT_BLK, DT_CHR, DT_FIFO, DT_SOCK
++};
++
++static struct super_operations squashfs_super_ops = {
++ .alloc_inode = squashfs_alloc_inode,
++ .destroy_inode = squashfs_destroy_inode,
++ .statfs = squashfs_statfs,
++ .put_super = squashfs_put_super,
++ .remount_fs = squashfs_remount
++};
++
++static struct super_operations squashfs_export_super_ops = {
++ .alloc_inode = squashfs_alloc_inode,
++ .destroy_inode = squashfs_destroy_inode,
++ .statfs = squashfs_statfs,
++ .put_super = squashfs_put_super,
++ .read_inode = vfs_read_inode
++};
++
++static struct export_operations squashfs_export_ops = {
++ .get_parent = squashfs_get_parent
++};
++
++SQSH_EXTERN const struct address_space_operations squashfs_symlink_aops = {
++ .readpage = squashfs_symlink_readpage
++};
++
++SQSH_EXTERN const struct address_space_operations squashfs_aops = {
++ .readpage = squashfs_readpage
++};
++
++SQSH_EXTERN const struct address_space_operations squashfs_aops_4K = {
++ .readpage = squashfs_readpage4K
++};
++
++static const struct file_operations squashfs_dir_ops = {
++ .read = generic_read_dir,
++ .readdir = squashfs_readdir
++};
++
++SQSH_EXTERN struct inode_operations squashfs_dir_inode_ops = {
++ .lookup = squashfs_lookup
++};
++
++
++static struct buffer_head *get_block_length(struct super_block *s,
++ int *cur_index, int *offset, int *c_byte)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ unsigned short temp;
++ struct buffer_head *bh;
++
++ if (!(bh = sb_bread(s, *cur_index)))
++ goto out;
++
++ if (msblk->devblksize - *offset == 1) {
++ if (msblk->swap)
++ ((unsigned char *) &temp)[1] = *((unsigned char *)
++ (bh->b_data + *offset));
++ else
++ ((unsigned char *) &temp)[0] = *((unsigned char *)
++ (bh->b_data + *offset));
++ brelse(bh);
++ if (!(bh = sb_bread(s, ++(*cur_index))))
++ goto out;
++ if (msblk->swap)
++ ((unsigned char *) &temp)[0] = *((unsigned char *)
++ bh->b_data);
++ else
++ ((unsigned char *) &temp)[1] = *((unsigned char *)
++ bh->b_data);
++ *c_byte = temp;
++ *offset = 1;
++ } else {
++ if (msblk->swap) {
++ ((unsigned char *) &temp)[1] = *((unsigned char *)
++ (bh->b_data + *offset));
++ ((unsigned char *) &temp)[0] = *((unsigned char *)
++ (bh->b_data + *offset + 1));
++ } else {
++ ((unsigned char *) &temp)[0] = *((unsigned char *)
++ (bh->b_data + *offset));
++ ((unsigned char *) &temp)[1] = *((unsigned char *)
++ (bh->b_data + *offset + 1));
++ }
++ *c_byte = temp;
++ *offset += 2;
++ }
++
++ if (SQUASHFS_CHECK_DATA(msblk->sblk.flags)) {
++ if (*offset == msblk->devblksize) {
++ brelse(bh);
++ if (!(bh = sb_bread(s, ++(*cur_index))))
++ goto out;
++ *offset = 0;
++ }
++ if (*((unsigned char *) (bh->b_data + *offset)) !=
++ SQUASHFS_MARKER_BYTE) {
++ ERROR("Metadata block marker corrupt @ %x\n",
++ *cur_index);
++ brelse(bh);
++ goto out;
++ }
++ (*offset)++;
++ }
++ return bh;
++
++out:
++ return NULL;
++}
++
++
++SQSH_EXTERN unsigned int squashfs_read_data(struct super_block *s, char *buffer,
++ long long index, unsigned int length,
++ long long *next_index, int srclength)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ struct buffer_head *bh[((SQUASHFS_FILE_MAX_SIZE - 1) >>
++ msblk->devblksize_log2) + 2];
++ unsigned int offset = index & ((1 << msblk->devblksize_log2) - 1);
++ unsigned int cur_index = index >> msblk->devblksize_log2;
++ int bytes, avail_bytes, b = 0, k = 0;
++ unsigned int compressed;
++ unsigned int c_byte = length;
++
++ if (c_byte) {
++ bytes = msblk->devblksize - offset;
++ compressed = SQUASHFS_COMPRESSED_BLOCK(c_byte);
++ c_byte = SQUASHFS_COMPRESSED_SIZE_BLOCK(c_byte);
++
++ TRACE("Block @ 0x%llx, %scompressed size %d, src size %d\n", index, compressed
++ ? "" : "un", (unsigned int) c_byte, srclength);
++
++ if (c_byte > srclength || index < 0 || (index + c_byte) > sblk->bytes_used)
++ goto read_failure;
++
++ if (!(bh[0] = sb_getblk(s, cur_index)))
++ goto block_release;
++
++ for (b = 1; bytes < c_byte; b++) {
++ if (!(bh[b] = sb_getblk(s, ++cur_index)))
++ goto block_release;
++ bytes += msblk->devblksize;
++ }
++ ll_rw_block(READ, b, bh);
++ } else {
++ if (index < 0 || (index + 2) > sblk->bytes_used)
++ goto read_failure;
++
++ if (!(bh[0] = get_block_length(s, &cur_index, &offset,
++ &c_byte)))
++ goto read_failure;
++
++ bytes = msblk->devblksize - offset;
++ compressed = SQUASHFS_COMPRESSED(c_byte);
++ c_byte = SQUASHFS_COMPRESSED_SIZE(c_byte);
++
++ TRACE("Block @ 0x%llx, %scompressed size %d\n", index, compressed
++ ? "" : "un", (unsigned int) c_byte);
++
++ if (c_byte > srclength || (index + c_byte) > sblk->bytes_used)
++ goto read_failure;
++
++ for (b = 1; bytes < c_byte; b++) {
++ if (!(bh[b] = sb_getblk(s, ++cur_index)))
++ goto block_release;
++ bytes += msblk->devblksize;
++ }
++ ll_rw_block(READ, b - 1, bh + 1);
++ }
++
++ if (compressed) {
++ int zlib_err = 0;
++
++ /*
++ * uncompress block
++ */
++
++ mutex_lock(&msblk->read_data_mutex);
++
++ msblk->stream.next_out = buffer;
++ msblk->stream.avail_out = srclength;
++
++ for (bytes = 0; k < b; k++) {
++ avail_bytes = (c_byte - bytes) > (msblk->devblksize - offset) ?
++ msblk->devblksize - offset :
++ c_byte - bytes;
++ wait_on_buffer(bh[k]);
++ if (!buffer_uptodate(bh[k]))
++ goto release_mutex;
++
++ msblk->stream.next_in = bh[k]->b_data + offset;
++ msblk->stream.avail_in = avail_bytes;
++
++ if (k == 0) {
++ zlib_err = zlib_inflateInit(&msblk->stream);
++ if (zlib_err != Z_OK) {
++ ERROR("zlib_inflateInit returned unexpected result 0x%x, srclength %d\n",
++ zlib_err, srclength);
++ goto release_mutex;
++ }
++
++ if (avail_bytes == 0) {
++ offset = 0;
++ brelse(bh[k]);
++ continue;
++ }
++ }
++
++ zlib_err = zlib_inflate(&msblk->stream, Z_NO_FLUSH);
++ if (zlib_err != Z_OK && zlib_err != Z_STREAM_END) {
++ ERROR("zlib_inflate returned unexpected result 0x%x, srclength %d, avail_in %d, avail_out %d\n",
++ zlib_err, srclength, msblk->stream.avail_in, msblk->stream.avail_out);
++ goto release_mutex;
++ }
++
++ bytes += avail_bytes;
++ offset = 0;
++ brelse(bh[k]);
++ }
++
++ if (zlib_err != Z_STREAM_END)
++ goto release_mutex;
++
++ zlib_err = zlib_inflateEnd(&msblk->stream);
++ if (zlib_err != Z_OK) {
++ ERROR("zlib_inflateEnd returned unexpected result 0x%x, srclength %d\n",
++ zlib_err, srclength);
++ goto release_mutex;
++ }
++ bytes = msblk->stream.total_out;
++ mutex_unlock(&msblk->read_data_mutex);
++ } else {
++ int i;
++
++ for(i = 0; i < b; i++) {
++ wait_on_buffer(bh[i]);
++ if(!buffer_uptodate(bh[i]))
++ goto block_release;
++ }
++
++ for (bytes = 0; k < b; k++) {
++ avail_bytes = (c_byte - bytes) > (msblk->devblksize - offset) ?
++ msblk->devblksize - offset :
++ c_byte - bytes;
++ memcpy(buffer + bytes, bh[k]->b_data + offset, avail_bytes);
++ bytes += avail_bytes;
++ offset = 0;
++ brelse(bh[k]);
++ }
++ }
++
++ if (next_index)
++ *next_index = index + c_byte + (length ? 0 :
++ (SQUASHFS_CHECK_DATA(msblk->sblk.flags)
++ ? 3 : 2));
++ return bytes;
++
++release_mutex:
++ mutex_unlock(&msblk->read_data_mutex);
++
++block_release:
++ for (; k < b; k++)
++ brelse(bh[k]);
++
++read_failure:
++ ERROR("sb_bread failed reading block 0x%x\n", cur_index);
++ return 0;
++}
++
++
++SQSH_EXTERN int squashfs_get_cached_block(struct super_block *s, char *buffer,
++ long long block, unsigned int offset,
++ int length, long long *next_block,
++ unsigned int *next_offset)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ int n, i, bytes, return_length = length;
++ long long next_index;
++
++ TRACE("Entered squashfs_get_cached_block [%llx:%x]\n", block, offset);
++
++ while ( 1 ) {
++ for (i = 0; i < SQUASHFS_CACHED_BLKS; i++)
++ if (msblk->block_cache[i].block == block)
++ break;
++
++ mutex_lock(&msblk->block_cache_mutex);
++
++ if (i == SQUASHFS_CACHED_BLKS) {
++ /* read inode header block */
++ for (i = msblk->next_cache, n = SQUASHFS_CACHED_BLKS;
++ n ; n --, i = (i + 1) %
++ SQUASHFS_CACHED_BLKS)
++ if (msblk->block_cache[i].block !=
++ SQUASHFS_USED_BLK)
++ break;
++
++ if (n == 0) {
++ wait_queue_t wait;
++
++ init_waitqueue_entry(&wait, current);
++ add_wait_queue(&msblk->waitq, &wait);
++ set_current_state(TASK_UNINTERRUPTIBLE);
++ mutex_unlock(&msblk->block_cache_mutex);
++ schedule();
++ set_current_state(TASK_RUNNING);
++ remove_wait_queue(&msblk->waitq, &wait);
++ continue;
++ }
++ msblk->next_cache = (i + 1) % SQUASHFS_CACHED_BLKS;
++
++ if (msblk->block_cache[i].block ==
++ SQUASHFS_INVALID_BLK) {
++ if (!(msblk->block_cache[i].data =
++ kmalloc(SQUASHFS_METADATA_SIZE,
++ GFP_KERNEL))) {
++ ERROR("Failed to allocate cache"
++ "block\n");
++ mutex_unlock(&msblk->block_cache_mutex);
++ goto out;
++ }
++ }
++
++ msblk->block_cache[i].block = SQUASHFS_USED_BLK;
++ mutex_unlock(&msblk->block_cache_mutex);
++
++ msblk->block_cache[i].length = squashfs_read_data(s,
++ msblk->block_cache[i].data, block, 0, &next_index, SQUASHFS_METADATA_SIZE);
++ if (msblk->block_cache[i].length == 0) {
++ ERROR("Unable to read cache block [%llx:%x]\n",
++ block, offset);
++ mutex_lock(&msblk->block_cache_mutex);
++ msblk->block_cache[i].block = SQUASHFS_INVALID_BLK;
++ kfree(msblk->block_cache[i].data);
++ wake_up(&msblk->waitq);
++ mutex_unlock(&msblk->block_cache_mutex);
++ goto out;
++ }
++
++ mutex_lock(&msblk->block_cache_mutex);
++ wake_up(&msblk->waitq);
++ msblk->block_cache[i].block = block;
++ msblk->block_cache[i].next_index = next_index;
++ TRACE("Read cache block [%llx:%x]\n", block, offset);
++ }
++
++ if (msblk->block_cache[i].block != block) {
++ mutex_unlock(&msblk->block_cache_mutex);
++ continue;
++ }
++
++ bytes = msblk->block_cache[i].length - offset;
++
++ if (bytes < 1) {
++ mutex_unlock(&msblk->block_cache_mutex);
++ goto out;
++ } else if (bytes >= length) {
++ if (buffer)
++ memcpy(buffer, msblk->block_cache[i].data +
++ offset, length);
++ if (msblk->block_cache[i].length - offset == length) {
++ *next_block = msblk->block_cache[i].next_index;
++ *next_offset = 0;
++ } else {
++ *next_block = block;
++ *next_offset = offset + length;
++ }
++ mutex_unlock(&msblk->block_cache_mutex);
++ goto finish;
++ } else {
++ if (buffer) {
++ memcpy(buffer, msblk->block_cache[i].data +
++ offset, bytes);
++ buffer += bytes;
++ }
++ block = msblk->block_cache[i].next_index;
++ mutex_unlock(&msblk->block_cache_mutex);
++ length -= bytes;
++ offset = 0;
++ }
++ }
++
++finish:
++ return return_length;
++out:
++ return 0;
++}
++
++
++static int get_fragment_location(struct super_block *s, unsigned int fragment,
++ long long *fragment_start_block,
++ unsigned int *fragment_size)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ long long start_block =
++ msblk->fragment_index[SQUASHFS_FRAGMENT_INDEX(fragment)];
++ int offset = SQUASHFS_FRAGMENT_INDEX_OFFSET(fragment);
++ struct squashfs_fragment_entry fragment_entry;
++
++ if (msblk->swap) {
++ struct squashfs_fragment_entry sfragment_entry;
++
++ if (!squashfs_get_cached_block(s, (char *) &sfragment_entry,
++ start_block, offset,
++ sizeof(sfragment_entry), &start_block,
++ &offset))
++ goto out;
++ SQUASHFS_SWAP_FRAGMENT_ENTRY(&fragment_entry, &sfragment_entry);
++ } else
++ if (!squashfs_get_cached_block(s, (char *) &fragment_entry,
++ start_block, offset,
++ sizeof(fragment_entry), &start_block,
++ &offset))
++ goto out;
++
++ *fragment_start_block = fragment_entry.start_block;
++ *fragment_size = fragment_entry.size;
++
++ return 1;
++
++out:
++ return 0;
++}
++
++
++SQSH_EXTERN void release_cached_fragment(struct squashfs_sb_info *msblk, struct
++ squashfs_fragment_cache *fragment)
++{
++ mutex_lock(&msblk->fragment_mutex);
++ fragment->locked --;
++ wake_up(&msblk->fragment_wait_queue);
++ mutex_unlock(&msblk->fragment_mutex);
++}
++
++
++SQSH_EXTERN struct squashfs_fragment_cache *get_cached_fragment(struct super_block
++ *s, long long start_block,
++ int length)
++{
++ int i, n;
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ while ( 1 ) {
++ mutex_lock(&msblk->fragment_mutex);
++
++ for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS &&
++ msblk->fragment[i].block != start_block; i++);
++
++ if (i == SQUASHFS_CACHED_FRAGMENTS) {
++ for (i = msblk->next_fragment, n =
++ SQUASHFS_CACHED_FRAGMENTS; n &&
++ msblk->fragment[i].locked; n--, i = (i + 1) %
++ SQUASHFS_CACHED_FRAGMENTS);
++
++ if (n == 0) {
++ wait_queue_t wait;
++
++ init_waitqueue_entry(&wait, current);
++ add_wait_queue(&msblk->fragment_wait_queue,
++ &wait);
++ set_current_state(TASK_UNINTERRUPTIBLE);
++ mutex_unlock(&msblk->fragment_mutex);
++ schedule();
++ set_current_state(TASK_RUNNING);
++ remove_wait_queue(&msblk->fragment_wait_queue,
++ &wait);
++ continue;
++ }
++ msblk->next_fragment = (msblk->next_fragment + 1) %
++ SQUASHFS_CACHED_FRAGMENTS;
++
++ if (msblk->fragment[i].data == NULL)
++ if (!(msblk->fragment[i].data = SQUASHFS_ALLOC
++ (SQUASHFS_FILE_MAX_SIZE))) {
++ ERROR("Failed to allocate fragment "
++ "cache block\n");
++ mutex_unlock(&msblk->fragment_mutex);
++ goto out;
++ }
++
++ msblk->fragment[i].block = SQUASHFS_INVALID_BLK;
++ msblk->fragment[i].locked = 1;
++ mutex_unlock(&msblk->fragment_mutex);
++
++ if (!(msblk->fragment[i].length = squashfs_read_data(s,
++ msblk->fragment[i].data,
++ start_block, length, NULL, sblk->block_size))) {
++ ERROR("Unable to read fragment cache block "
++ "[%llx]\n", start_block);
++ msblk->fragment[i].locked = 0;
++ smp_mb();
++ goto out;
++ }
++
++ mutex_lock(&msblk->fragment_mutex);
++ msblk->fragment[i].block = start_block;
++ TRACE("New fragment %d, start block %lld, locked %d\n",
++ i, msblk->fragment[i].block,
++ msblk->fragment[i].locked);
++ mutex_unlock(&msblk->fragment_mutex);
++ break;
++ }
++
++ msblk->fragment[i].locked++;
++ mutex_unlock(&msblk->fragment_mutex);
++ TRACE("Got fragment %d, start block %lld, locked %d\n", i,
++ msblk->fragment[i].block,
++ msblk->fragment[i].locked);
++ break;
++ }
++
++ return &msblk->fragment[i];
++
++out:
++ return NULL;
++}
++
++
++static void squashfs_new_inode(struct squashfs_sb_info *msblk, struct inode *i,
++ struct squashfs_base_inode_header *inodeb)
++{
++ i->i_ino = inodeb->inode_number;
++ i->i_mtime.tv_sec = inodeb->mtime;
++ i->i_atime.tv_sec = inodeb->mtime;
++ i->i_ctime.tv_sec = inodeb->mtime;
++ i->i_uid = msblk->uid[inodeb->uid];
++ i->i_mode = inodeb->mode;
++ i->i_size = 0;
++ if (inodeb->guid == SQUASHFS_GUIDS)
++ i->i_gid = i->i_uid;
++ else
++ i->i_gid = msblk->guid[inodeb->guid];
++}
++
++
++static squashfs_inode_t squashfs_inode_lookup(struct super_block *s, int ino)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ long long start = msblk->inode_lookup_table[SQUASHFS_LOOKUP_BLOCK(ino - 1)];
++ int offset = SQUASHFS_LOOKUP_BLOCK_OFFSET(ino - 1);
++ squashfs_inode_t inode;
++
++ TRACE("Entered squashfs_inode_lookup, inode_number = %d\n", ino);
++
++ if (msblk->swap) {
++ squashfs_inode_t sinode;
++
++ if (!squashfs_get_cached_block(s, (char *) &sinode, start, offset,
++ sizeof(sinode), &start, &offset))
++ goto out;
++ SQUASHFS_SWAP_INODE_T((&inode), &sinode);
++ } else if (!squashfs_get_cached_block(s, (char *) &inode, start, offset,
++ sizeof(inode), &start, &offset))
++ goto out;
++
++ TRACE("squashfs_inode_lookup, inode = 0x%llx\n", inode);
++
++ return inode;
++
++out:
++ return SQUASHFS_INVALID_BLK;
++}
++
++
++static void vfs_read_inode(struct inode *i)
++{
++ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
++ squashfs_inode_t inode = squashfs_inode_lookup(i->i_sb, i->i_ino);
++
++ TRACE("Entered vfs_read_inode\n");
++
++ if(inode != SQUASHFS_INVALID_BLK)
++ (msblk->read_inode)(i, inode);
++}
++
++
++static struct dentry *squashfs_get_parent(struct dentry *child)
++{
++ struct inode *i = child->d_inode;
++ struct inode *parent = iget(i->i_sb, SQUASHFS_I(i)->u.s2.parent_inode);
++ struct dentry *rv;
++
++ TRACE("Entered squashfs_get_parent\n");
++
++ if(parent == NULL) {
++ rv = ERR_PTR(-EACCES);
++ goto out;
++ }
++
++ rv = d_alloc_anon(parent);
++ if(rv == NULL)
++ rv = ERR_PTR(-ENOMEM);
++
++out:
++ return rv;
++}
++
++
++SQSH_EXTERN struct inode *squashfs_iget(struct super_block *s, squashfs_inode_t inode, unsigned int inode_number)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct inode *i = iget_locked(s, inode_number);
++
++ TRACE("Entered squashfs_iget\n");
++
++ if(i && (i->i_state & I_NEW)) {
++ (msblk->read_inode)(i, inode);
++ unlock_new_inode(i);
++ }
++
++ return i;
++}
++
++
++static int squashfs_read_inode(struct inode *i, squashfs_inode_t inode)
++{
++ struct super_block *s = i->i_sb;
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ long long block = SQUASHFS_INODE_BLK(inode) +
++ sblk->inode_table_start;
++ unsigned int offset = SQUASHFS_INODE_OFFSET(inode);
++ long long next_block;
++ unsigned int next_offset;
++ union squashfs_inode_header id, sid;
++ struct squashfs_base_inode_header *inodeb = &id.base,
++ *sinodeb = &sid.base;
++
++ TRACE("Entered squashfs_read_inode\n");
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *) sinodeb, block,
++ offset, sizeof(*sinodeb), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_BASE_INODE_HEADER(inodeb, sinodeb,
++ sizeof(*sinodeb));
++ } else
++ if (!squashfs_get_cached_block(s, (char *) inodeb, block,
++ offset, sizeof(*inodeb), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ squashfs_new_inode(msblk, i, inodeb);
++
++ switch(inodeb->inode_type) {
++ case SQUASHFS_FILE_TYPE: {
++ unsigned int frag_size;
++ long long frag_blk;
++ struct squashfs_reg_inode_header *inodep = &id.reg;
++ struct squashfs_reg_inode_header *sinodep = &sid.reg;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_REG_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ frag_blk = SQUASHFS_INVALID_BLK;
++ if (inodep->fragment != SQUASHFS_INVALID_FRAG &&
++ !get_fragment_location(s,
++ inodep->fragment, &frag_blk, &frag_size))
++ goto failed_read;
++
++ i->i_nlink = 1;
++ i->i_size = inodep->file_size;
++ i->i_fop = &generic_ro_fops;
++ i->i_mode |= S_IFREG;
++ i->i_blocks = ((i->i_size - 1) >> 9) + 1;
++ SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk;
++ SQUASHFS_I(i)->u.s1.fragment_size = frag_size;
++ SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->u.s1.block_list_start = next_block;
++ SQUASHFS_I(i)->offset = next_offset;
++ if (sblk->block_size > 4096)
++ i->i_data.a_ops = &squashfs_aops;
++ else
++ i->i_data.a_ops = &squashfs_aops_4K;
++
++ TRACE("File inode %x:%x, start_block %llx, "
++ "block_list_start %llx, offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->start_block, next_block,
++ next_offset);
++ break;
++ }
++ case SQUASHFS_LREG_TYPE: {
++ unsigned int frag_size;
++ long long frag_blk;
++ struct squashfs_lreg_inode_header *inodep = &id.lreg;
++ struct squashfs_lreg_inode_header *sinodep = &sid.lreg;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_LREG_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ frag_blk = SQUASHFS_INVALID_BLK;
++ if (inodep->fragment != SQUASHFS_INVALID_FRAG &&
++ !get_fragment_location(s,
++ inodep->fragment, &frag_blk, &frag_size))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_size = inodep->file_size;
++ i->i_fop = &generic_ro_fops;
++ i->i_mode |= S_IFREG;
++ i->i_blocks = ((i->i_size - 1) >> 9) + 1;
++ SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk;
++ SQUASHFS_I(i)->u.s1.fragment_size = frag_size;
++ SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->u.s1.block_list_start = next_block;
++ SQUASHFS_I(i)->offset = next_offset;
++ if (sblk->block_size > 4096)
++ i->i_data.a_ops = &squashfs_aops;
++ else
++ i->i_data.a_ops = &squashfs_aops_4K;
++
++ TRACE("File inode %x:%x, start_block %llx, "
++ "block_list_start %llx, offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->start_block, next_block,
++ next_offset);
++ break;
++ }
++ case SQUASHFS_DIR_TYPE: {
++ struct squashfs_dir_inode_header *inodep = &id.dir;
++ struct squashfs_dir_inode_header *sinodep = &sid.dir;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_DIR_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_size = inodep->file_size;
++ i->i_op = &squashfs_dir_inode_ops;
++ i->i_fop = &squashfs_dir_ops;
++ i->i_mode |= S_IFDIR;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->offset = inodep->offset;
++ SQUASHFS_I(i)->u.s2.directory_index_count = 0;
++ SQUASHFS_I(i)->u.s2.parent_inode = inodep->parent_inode;
++
++ TRACE("Directory inode %x:%x, start_block %x, offset "
++ "%x\n", SQUASHFS_INODE_BLK(inode),
++ offset, inodep->start_block,
++ inodep->offset);
++ break;
++ }
++ case SQUASHFS_LDIR_TYPE: {
++ struct squashfs_ldir_inode_header *inodep = &id.ldir;
++ struct squashfs_ldir_inode_header *sinodep = &sid.ldir;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_LDIR_INODE_HEADER(inodep,
++ sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_size = inodep->file_size;
++ i->i_op = &squashfs_dir_inode_ops;
++ i->i_fop = &squashfs_dir_ops;
++ i->i_mode |= S_IFDIR;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->offset = inodep->offset;
++ SQUASHFS_I(i)->u.s2.directory_index_start = next_block;
++ SQUASHFS_I(i)->u.s2.directory_index_offset =
++ next_offset;
++ SQUASHFS_I(i)->u.s2.directory_index_count =
++ inodep->i_count;
++ SQUASHFS_I(i)->u.s2.parent_inode = inodep->parent_inode;
++
++ TRACE("Long directory inode %x:%x, start_block %x, "
++ "offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->start_block, inodep->offset);
++ break;
++ }
++ case SQUASHFS_SYMLINK_TYPE: {
++ struct squashfs_symlink_inode_header *inodep =
++ &id.symlink;
++ struct squashfs_symlink_inode_header *sinodep =
++ &sid.symlink;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_SYMLINK_INODE_HEADER(inodep,
++ sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_size = inodep->symlink_size;
++ i->i_op = &page_symlink_inode_operations;
++ i->i_data.a_ops = &squashfs_symlink_aops;
++ i->i_mode |= S_IFLNK;
++ SQUASHFS_I(i)->start_block = next_block;
++ SQUASHFS_I(i)->offset = next_offset;
++
++ TRACE("Symbolic link inode %x:%x, start_block %llx, "
++ "offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ next_block, next_offset);
++ break;
++ }
++ case SQUASHFS_BLKDEV_TYPE:
++ case SQUASHFS_CHRDEV_TYPE: {
++ struct squashfs_dev_inode_header *inodep = &id.dev;
++ struct squashfs_dev_inode_header *sinodep = &sid.dev;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_DEV_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_mode |= (inodeb->inode_type ==
++ SQUASHFS_CHRDEV_TYPE) ? S_IFCHR :
++ S_IFBLK;
++ init_special_inode(i, i->i_mode,
++ old_decode_dev(inodep->rdev));
++
++ TRACE("Device inode %x:%x, rdev %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->rdev);
++ break;
++ }
++ case SQUASHFS_FIFO_TYPE:
++ case SQUASHFS_SOCKET_TYPE: {
++ struct squashfs_ipc_inode_header *inodep = &id.ipc;
++ struct squashfs_ipc_inode_header *sinodep = &sid.ipc;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_IPC_INODE_HEADER(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_nlink = inodep->nlink;
++ i->i_mode |= (inodeb->inode_type == SQUASHFS_FIFO_TYPE)
++ ? S_IFIFO : S_IFSOCK;
++ init_special_inode(i, i->i_mode, 0);
++ break;
++ }
++ default:
++ ERROR("Unknown inode type %d in squashfs_iget!\n",
++ inodeb->inode_type);
++ goto failed_read1;
++ }
++
++ return 1;
++
++failed_read:
++ ERROR("Unable to read inode [%llx:%x]\n", block, offset);
++
++failed_read1:
++ make_bad_inode(i);
++ return 0;
++}
++
++
++static int read_inode_lookup_table(struct super_block *s)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ unsigned int length = SQUASHFS_LOOKUP_BLOCK_BYTES(sblk->inodes);
++
++ TRACE("In read_inode_lookup_table, length %d\n", length);
++
++ /* Allocate inode lookup table */
++ if (!(msblk->inode_lookup_table = kmalloc(length, GFP_KERNEL))) {
++ ERROR("Failed to allocate inode lookup table\n");
++ return 0;
++ }
++
++ if (!squashfs_read_data(s, (char *) msblk->inode_lookup_table,
++ sblk->lookup_table_start, length |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length)) {
++ ERROR("unable to read inode lookup table\n");
++ return 0;
++ }
++
++ if (msblk->swap) {
++ int i;
++ long long block;
++
++ for (i = 0; i < SQUASHFS_LOOKUP_BLOCKS(sblk->inodes); i++) {
++ SQUASHFS_SWAP_LOOKUP_BLOCKS((&block),
++ &msblk->inode_lookup_table[i], 1);
++ msblk->inode_lookup_table[i] = block;
++ }
++ }
++
++ return 1;
++}
++
++
++static int read_fragment_index_table(struct super_block *s)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ unsigned int length = SQUASHFS_FRAGMENT_INDEX_BYTES(sblk->fragments);
++
++ if(length == 0)
++ return 1;
++
++ /* Allocate fragment index table */
++ if (!(msblk->fragment_index = kmalloc(length, GFP_KERNEL))) {
++ ERROR("Failed to allocate fragment index table\n");
++ return 0;
++ }
++
++ if (!squashfs_read_data(s, (char *) msblk->fragment_index,
++ sblk->fragment_table_start, length |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, length)) {
++ ERROR("unable to read fragment index table\n");
++ return 0;
++ }
++
++ if (msblk->swap) {
++ int i;
++ long long fragment;
++
++ for (i = 0; i < SQUASHFS_FRAGMENT_INDEXES(sblk->fragments); i++) {
++ SQUASHFS_SWAP_FRAGMENT_INDEXES((&fragment),
++ &msblk->fragment_index[i], 1);
++ msblk->fragment_index[i] = fragment;
++ }
++ }
++
++ return 1;
++}
++
++
++static int supported_squashfs_filesystem(struct squashfs_sb_info *msblk, int silent)
++{
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ msblk->read_inode = squashfs_read_inode;
++ msblk->read_blocklist = read_blocklist;
++ msblk->read_fragment_index_table = read_fragment_index_table;
++
++ if (sblk->s_major == 1) {
++ if (!squashfs_1_0_supported(msblk)) {
++ SERROR("Major/Minor mismatch, Squashfs 1.0 filesystems "
++ "are unsupported\n");
++ SERROR("Please recompile with "
++ "Squashfs 1.0 support enabled\n");
++ return 0;
++ }
++ } else if (sblk->s_major == 2) {
++ if (!squashfs_2_0_supported(msblk)) {
++ SERROR("Major/Minor mismatch, Squashfs 2.0 filesystems "
++ "are unsupported\n");
++ SERROR("Please recompile with "
++ "Squashfs 2.0 support enabled\n");
++ return 0;
++ }
++ } else if(sblk->s_major != SQUASHFS_MAJOR || sblk->s_minor >
++ SQUASHFS_MINOR) {
++ SERROR("Major/Minor mismatch, trying to mount newer %d.%d "
++ "filesystem\n", sblk->s_major, sblk->s_minor);
++ SERROR("Please update your kernel\n");
++ return 0;
++ }
++
++ return 1;
++}
++
++
++static int squashfs_fill_super(struct super_block *s, void *data, int silent)
++{
++ struct squashfs_sb_info *msblk;
++ struct squashfs_super_block *sblk;
++ int i;
++ char b[BDEVNAME_SIZE];
++ struct inode *root;
++
++ TRACE("Entered squashfs_read_superblock\n");
++
++ if (!(s->s_fs_info = kmalloc(sizeof(struct squashfs_sb_info),
++ GFP_KERNEL))) {
++ ERROR("Failed to allocate superblock\n");
++ goto failure;
++ }
++ memset(s->s_fs_info, 0, sizeof(struct squashfs_sb_info));
++ msblk = s->s_fs_info;
++ if (!(msblk->stream.workspace = vmalloc(zlib_inflate_workspacesize()))) {
++ ERROR("Failed to allocate zlib workspace\n");
++ goto failure;
++ }
++ sblk = &msblk->sblk;
++
++ msblk->devblksize = sb_min_blocksize(s, BLOCK_SIZE);
++ msblk->devblksize_log2 = ffz(~msblk->devblksize);
++
++ mutex_init(&msblk->read_data_mutex);
++ mutex_init(&msblk->read_page_mutex);
++ mutex_init(&msblk->block_cache_mutex);
++ mutex_init(&msblk->fragment_mutex);
++ mutex_init(&msblk->meta_index_mutex);
++
++ init_waitqueue_head(&msblk->waitq);
++ init_waitqueue_head(&msblk->fragment_wait_queue);
++
++ sblk->bytes_used = sizeof(struct squashfs_super_block);
++ if (!squashfs_read_data(s, (char *) sblk, SQUASHFS_START,
++ sizeof(struct squashfs_super_block) |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, sizeof(struct squashfs_super_block))) {
++ SERROR("unable to read superblock\n");
++ goto failed_mount;
++ }
++
++ /* Check it is a SQUASHFS superblock */
++ msblk->swap = 0;
++ if ((s->s_magic = sblk->s_magic) != SQUASHFS_MAGIC) {
++ if (sblk->s_magic == SQUASHFS_MAGIC_SWAP) {
++ struct squashfs_super_block ssblk;
++
++ WARNING("Mounting a different endian SQUASHFS "
++ "filesystem on %s\n", bdevname(s->s_bdev, b));
++
++ SQUASHFS_SWAP_SUPER_BLOCK(&ssblk, sblk);
++ memcpy(sblk, &ssblk, sizeof(struct squashfs_super_block));
++ msblk->swap = 1;
++ } else {
++ SERROR("Can't find a SQUASHFS superblock on %s\n",
++ bdevname(s->s_bdev, b));
++ goto failed_mount;
++ }
++ }
++
++ /* Check the MAJOR & MINOR versions */
++ if(!supported_squashfs_filesystem(msblk, silent))
++ goto failed_mount;
++
++ /* Check the filesystem does not extend beyond the end of the
++ block device */
++ if(sblk->bytes_used < 0 || sblk->bytes_used > i_size_read(s->s_bdev->bd_inode))
++ goto failed_mount;
++
++ /* Check the root inode for sanity */
++ if (SQUASHFS_INODE_OFFSET(sblk->root_inode) > SQUASHFS_METADATA_SIZE)
++ goto failed_mount;
++
++ TRACE("Found valid superblock on %s\n", bdevname(s->s_bdev, b));
++ TRACE("Inodes are %scompressed\n",
++ SQUASHFS_UNCOMPRESSED_INODES
++ (sblk->flags) ? "un" : "");
++ TRACE("Data is %scompressed\n",
++ SQUASHFS_UNCOMPRESSED_DATA(sblk->flags)
++ ? "un" : "");
++ TRACE("Check data is %s present in the filesystem\n",
++ SQUASHFS_CHECK_DATA(sblk->flags) ?
++ "" : "not");
++ TRACE("Filesystem size %lld bytes\n", sblk->bytes_used);
++ TRACE("Block size %d\n", sblk->block_size);
++ TRACE("Number of inodes %d\n", sblk->inodes);
++ if (sblk->s_major > 1)
++ TRACE("Number of fragments %d\n", sblk->fragments);
++ TRACE("Number of uids %d\n", sblk->no_uids);
++ TRACE("Number of gids %d\n", sblk->no_guids);
++ TRACE("sblk->inode_table_start %llx\n", sblk->inode_table_start);
++ TRACE("sblk->directory_table_start %llx\n", sblk->directory_table_start);
++ if (sblk->s_major > 1)
++ TRACE("sblk->fragment_table_start %llx\n",
++ sblk->fragment_table_start);
++ TRACE("sblk->uid_start %llx\n", sblk->uid_start);
++
++ s->s_flags |= MS_RDONLY;
++ s->s_op = &squashfs_super_ops;
++
++ /* Init inode_table block pointer array */
++ if (!(msblk->block_cache = kmalloc(sizeof(struct squashfs_cache) *
++ SQUASHFS_CACHED_BLKS, GFP_KERNEL))) {
++ ERROR("Failed to allocate block cache\n");
++ goto failed_mount;
++ }
++
++ for (i = 0; i < SQUASHFS_CACHED_BLKS; i++)
++ msblk->block_cache[i].block = SQUASHFS_INVALID_BLK;
++
++ msblk->next_cache = 0;
++
++ /* Allocate read_page block */
++ if (!(msblk->read_page = kmalloc(sblk->block_size, GFP_KERNEL))) {
++ ERROR("Failed to allocate read_page block\n");
++ goto failed_mount;
++ }
++
++ /* Allocate uid and gid tables */
++ if (!(msblk->uid = kmalloc((sblk->no_uids + sblk->no_guids) *
++ sizeof(unsigned int), GFP_KERNEL))) {
++ ERROR("Failed to allocate uid/gid table\n");
++ goto failed_mount;
++ }
++ msblk->guid = msblk->uid + sblk->no_uids;
++
++ if (msblk->swap) {
++ unsigned int suid[sblk->no_uids + sblk->no_guids];
++
++ if (!squashfs_read_data(s, (char *) &suid, sblk->uid_start,
++ ((sblk->no_uids + sblk->no_guids) *
++ sizeof(unsigned int)) |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, (sblk->no_uids + sblk->no_guids) * sizeof(unsigned int))) {
++ ERROR("unable to read uid/gid table\n");
++ goto failed_mount;
++ }
++
++ SQUASHFS_SWAP_DATA(msblk->uid, suid, (sblk->no_uids +
++ sblk->no_guids), (sizeof(unsigned int) * 8));
++ } else
++ if (!squashfs_read_data(s, (char *) msblk->uid, sblk->uid_start,
++ ((sblk->no_uids + sblk->no_guids) *
++ sizeof(unsigned int)) |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, (sblk->no_uids + sblk->no_guids) * sizeof(unsigned int))) {
++ ERROR("unable to read uid/gid table\n");
++ goto failed_mount;
++ }
++
++
++ if (sblk->s_major == 1 && squashfs_1_0_supported(msblk))
++ goto allocate_root;
++
++ if (!(msblk->fragment = kmalloc(sizeof(struct squashfs_fragment_cache) *
++ SQUASHFS_CACHED_FRAGMENTS, GFP_KERNEL))) {
++ ERROR("Failed to allocate fragment block cache\n");
++ goto failed_mount;
++ }
++
++ for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++) {
++ msblk->fragment[i].locked = 0;
++ msblk->fragment[i].block = SQUASHFS_INVALID_BLK;
++ msblk->fragment[i].data = NULL;
++ }
++
++ msblk->next_fragment = 0;
++
++ /* Allocate and read fragment index table */
++ if (msblk->read_fragment_index_table(s) == 0)
++ goto failed_mount;
++
++ if(sblk->s_major < 3 || sblk->lookup_table_start == SQUASHFS_INVALID_BLK)
++ goto allocate_root;
++
++ /* Allocate and read inode lookup table */
++ if (read_inode_lookup_table(s) == 0)
++ goto failed_mount;
++
++ s->s_op = &squashfs_export_super_ops;
++ s->s_export_op = &squashfs_export_ops;
++
++allocate_root:
++ root = new_inode(s);
++ if ((msblk->read_inode)(root, sblk->root_inode) == 0)
++ goto failed_mount;
++ insert_inode_hash(root);
++
++ if ((s->s_root = d_alloc_root(root)) == NULL) {
++ ERROR("Root inode create failed\n");
++ iput(root);
++ goto failed_mount;
++ }
++
++ TRACE("Leaving squashfs_read_super\n");
++ return 0;
++
++failed_mount:
++ kfree(msblk->inode_lookup_table);
++ kfree(msblk->fragment_index);
++ kfree(msblk->fragment);
++ kfree(msblk->uid);
++ kfree(msblk->read_page);
++ kfree(msblk->block_cache);
++ kfree(msblk->fragment_index_2);
++ vfree(msblk->stream.workspace);
++ kfree(s->s_fs_info);
++ s->s_fs_info = NULL;
++ return -EINVAL;
++
++failure:
++ return -ENOMEM;
++}
++
++
++static int squashfs_statfs(struct dentry *dentry, struct kstatfs *buf)
++{
++ struct squashfs_sb_info *msblk = dentry->d_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ TRACE("Entered squashfs_statfs\n");
++
++ buf->f_type = SQUASHFS_MAGIC;
++ buf->f_bsize = sblk->block_size;
++ buf->f_blocks = ((sblk->bytes_used - 1) >> sblk->block_log) + 1;
++ buf->f_bfree = buf->f_bavail = 0;
++ buf->f_files = sblk->inodes;
++ buf->f_ffree = 0;
++ buf->f_namelen = SQUASHFS_NAME_LEN;
++
++ return 0;
++}
++
++
++static int squashfs_symlink_readpage(struct file *file, struct page *page)
++{
++ struct inode *inode = page->mapping->host;
++ int index = page->index << PAGE_CACHE_SHIFT, length, bytes;
++ long long block = SQUASHFS_I(inode)->start_block;
++ int offset = SQUASHFS_I(inode)->offset;
++ void *pageaddr = kmap(page);
++
++ TRACE("Entered squashfs_symlink_readpage, page index %ld, start block "
++ "%llx, offset %x\n", page->index,
++ SQUASHFS_I(inode)->start_block,
++ SQUASHFS_I(inode)->offset);
++
++ for (length = 0; length < index; length += bytes) {
++ if (!(bytes = squashfs_get_cached_block(inode->i_sb, NULL,
++ block, offset, PAGE_CACHE_SIZE, &block,
++ &offset))) {
++ ERROR("Unable to read symbolic link [%llx:%x]\n", block,
++ offset);
++ goto skip_read;
++ }
++ }
++
++ if (length != index) {
++ ERROR("(squashfs_symlink_readpage) length != index\n");
++ bytes = 0;
++ goto skip_read;
++ }
++
++ bytes = (i_size_read(inode) - length) > PAGE_CACHE_SIZE ? PAGE_CACHE_SIZE :
++ i_size_read(inode) - length;
++
++ if (!(bytes = squashfs_get_cached_block(inode->i_sb, pageaddr, block,
++ offset, bytes, &block, &offset)))
++ ERROR("Unable to read symbolic link [%llx:%x]\n", block, offset);
++
++skip_read:
++ memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
++ kunmap(page);
++ flush_dcache_page(page);
++ SetPageUptodate(page);
++ unlock_page(page);
++
++ return 0;
++}
++
++
++struct meta_index *locate_meta_index(struct inode *inode, int index, int offset)
++{
++ struct meta_index *meta = NULL;
++ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
++ int i;
++
++ mutex_lock(&msblk->meta_index_mutex);
++
++ TRACE("locate_meta_index: index %d, offset %d\n", index, offset);
++
++ if(msblk->meta_index == NULL)
++ goto not_allocated;
++
++ for (i = 0; i < SQUASHFS_META_NUMBER; i ++)
++ if (msblk->meta_index[i].inode_number == inode->i_ino &&
++ msblk->meta_index[i].offset >= offset &&
++ msblk->meta_index[i].offset <= index &&
++ msblk->meta_index[i].locked == 0) {
++ TRACE("locate_meta_index: entry %d, offset %d\n", i,
++ msblk->meta_index[i].offset);
++ meta = &msblk->meta_index[i];
++ offset = meta->offset;
++ }
++
++ if (meta)
++ meta->locked = 1;
++
++not_allocated:
++ mutex_unlock(&msblk->meta_index_mutex);
++
++ return meta;
++}
++
++
++struct meta_index *empty_meta_index(struct inode *inode, int offset, int skip)
++{
++ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
++ struct meta_index *meta = NULL;
++ int i;
++
++ mutex_lock(&msblk->meta_index_mutex);
++
++ TRACE("empty_meta_index: offset %d, skip %d\n", offset, skip);
++
++ if(msblk->meta_index == NULL) {
++ if (!(msblk->meta_index = kmalloc(sizeof(struct meta_index) *
++ SQUASHFS_META_NUMBER, GFP_KERNEL))) {
++ ERROR("Failed to allocate meta_index\n");
++ goto failed;
++ }
++ for(i = 0; i < SQUASHFS_META_NUMBER; i++) {
++ msblk->meta_index[i].inode_number = 0;
++ msblk->meta_index[i].locked = 0;
++ }
++ msblk->next_meta_index = 0;
++ }
++
++ for(i = SQUASHFS_META_NUMBER; i &&
++ msblk->meta_index[msblk->next_meta_index].locked; i --)
++ msblk->next_meta_index = (msblk->next_meta_index + 1) %
++ SQUASHFS_META_NUMBER;
++
++ if(i == 0) {
++ TRACE("empty_meta_index: failed!\n");
++ goto failed;
++ }
++
++ TRACE("empty_meta_index: returned meta entry %d, %p\n",
++ msblk->next_meta_index,
++ &msblk->meta_index[msblk->next_meta_index]);
++
++ meta = &msblk->meta_index[msblk->next_meta_index];
++ msblk->next_meta_index = (msblk->next_meta_index + 1) %
++ SQUASHFS_META_NUMBER;
++
++ meta->inode_number = inode->i_ino;
++ meta->offset = offset;
++ meta->skip = skip;
++ meta->entries = 0;
++ meta->locked = 1;
++
++failed:
++ mutex_unlock(&msblk->meta_index_mutex);
++ return meta;
++}
++
++
++void release_meta_index(struct inode *inode, struct meta_index *meta)
++{
++ meta->locked = 0;
++ smp_mb();
++}
++
++
++static int read_block_index(struct super_block *s, int blocks, char *block_list,
++ long long *start_block, int *offset)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ unsigned int *block_listp;
++ int block = 0;
++
++ if (msblk->swap) {
++ char sblock_list[blocks << 2];
++
++ if (!squashfs_get_cached_block(s, sblock_list, *start_block,
++ *offset, blocks << 2, start_block, offset)) {
++ ERROR("Unable to read block list [%llx:%x]\n",
++ *start_block, *offset);
++ goto failure;
++ }
++ SQUASHFS_SWAP_INTS(((unsigned int *)block_list),
++ ((unsigned int *)sblock_list), blocks);
++ } else
++ if (!squashfs_get_cached_block(s, block_list, *start_block,
++ *offset, blocks << 2, start_block, offset)) {
++ ERROR("Unable to read block list [%llx:%x]\n",
++ *start_block, *offset);
++ goto failure;
++ }
++
++ for (block_listp = (unsigned int *) block_list; blocks;
++ block_listp++, blocks --)
++ block += SQUASHFS_COMPRESSED_SIZE_BLOCK(*block_listp);
++
++ return block;
++
++failure:
++ return -1;
++}
++
++
++#define SIZE 256
++
++static inline int calculate_skip(int blocks) {
++ int skip = (blocks - 1) / ((SQUASHFS_SLOTS * SQUASHFS_META_ENTRIES + 1) * SQUASHFS_META_INDEXES);
++ return skip >= 7 ? 7 : skip + 1;
++}
++
++
++static int get_meta_index(struct inode *inode, int index,
++ long long *index_block, int *index_offset,
++ long long *data_block, char *block_list)
++{
++ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ int skip = calculate_skip(i_size_read(inode) >> sblk->block_log);
++ int offset = 0;
++ struct meta_index *meta;
++ struct meta_entry *meta_entry;
++ long long cur_index_block = SQUASHFS_I(inode)->u.s1.block_list_start;
++ int cur_offset = SQUASHFS_I(inode)->offset;
++ long long cur_data_block = SQUASHFS_I(inode)->start_block;
++ int i;
++
++ index /= SQUASHFS_META_INDEXES * skip;
++
++ while ( offset < index ) {
++ meta = locate_meta_index(inode, index, offset + 1);
++
++ if (meta == NULL) {
++ if ((meta = empty_meta_index(inode, offset + 1,
++ skip)) == NULL)
++ goto all_done;
++ } else {
++ if(meta->entries == 0)
++ goto failed;
++ offset = index < meta->offset + meta->entries ? index :
++ meta->offset + meta->entries - 1;
++ meta_entry = &meta->meta_entry[offset - meta->offset];
++ cur_index_block = meta_entry->index_block + sblk->inode_table_start;
++ cur_offset = meta_entry->offset;
++ cur_data_block = meta_entry->data_block;
++ TRACE("get_meta_index: offset %d, meta->offset %d, "
++ "meta->entries %d\n", offset, meta->offset,
++ meta->entries);
++ TRACE("get_meta_index: index_block 0x%llx, offset 0x%x"
++ " data_block 0x%llx\n", cur_index_block,
++ cur_offset, cur_data_block);
++ }
++
++ for (i = meta->offset + meta->entries; i <= index &&
++ i < meta->offset + SQUASHFS_META_ENTRIES; i++) {
++ int blocks = skip * SQUASHFS_META_INDEXES;
++
++ while (blocks) {
++ int block = blocks > (SIZE >> 2) ? (SIZE >> 2) :
++ blocks;
++ int res = read_block_index(inode->i_sb, block,
++ block_list, &cur_index_block,
++ &cur_offset);
++
++ if (res == -1)
++ goto failed;
++
++ cur_data_block += res;
++ blocks -= block;
++ }
++
++ meta_entry = &meta->meta_entry[i - meta->offset];
++ meta_entry->index_block = cur_index_block - sblk->inode_table_start;
++ meta_entry->offset = cur_offset;
++ meta_entry->data_block = cur_data_block;
++ meta->entries ++;
++ offset ++;
++ }
++
++ TRACE("get_meta_index: meta->offset %d, meta->entries %d\n",
++ meta->offset, meta->entries);
++
++ release_meta_index(inode, meta);
++ }
++
++all_done:
++ *index_block = cur_index_block;
++ *index_offset = cur_offset;
++ *data_block = cur_data_block;
++
++ return offset * SQUASHFS_META_INDEXES * skip;
++
++failed:
++ release_meta_index(inode, meta);
++ return -1;
++}
++
++
++static long long read_blocklist(struct inode *inode, int index,
++ int readahead_blks, char *block_list,
++ unsigned short **block_p, unsigned int *bsize)
++{
++ long long block_ptr;
++ int offset;
++ long long block;
++ int res = get_meta_index(inode, index, &block_ptr, &offset, &block,
++ block_list);
++
++ TRACE("read_blocklist: res %d, index %d, block_ptr 0x%llx, offset"
++ " 0x%x, block 0x%llx\n", res, index, block_ptr, offset,
++ block);
++
++ if(res == -1)
++ goto failure;
++
++ index -= res;
++
++ while ( index ) {
++ int blocks = index > (SIZE >> 2) ? (SIZE >> 2) : index;
++ int res = read_block_index(inode->i_sb, blocks, block_list,
++ &block_ptr, &offset);
++ if (res == -1)
++ goto failure;
++ block += res;
++ index -= blocks;
++ }
++
++ if (read_block_index(inode->i_sb, 1, block_list,
++ &block_ptr, &offset) == -1)
++ goto failure;
++ *bsize = *((unsigned int *) block_list);
++
++ return block;
++
++failure:
++ return 0;
++}
++
++
++static int squashfs_readpage(struct file *file, struct page *page)
++{
++ struct inode *inode = page->mapping->host;
++ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ unsigned char *block_list;
++ long long block;
++ unsigned int bsize, i = 0, bytes = 0, byte_offset = 0;
++ int index = page->index >> (sblk->block_log - PAGE_CACHE_SHIFT);
++ void *pageaddr;
++ struct squashfs_fragment_cache *fragment = NULL;
++ char *data_ptr = msblk->read_page;
++
++ int mask = (1 << (sblk->block_log - PAGE_CACHE_SHIFT)) - 1;
++ int start_index = page->index & ~mask;
++ int end_index = start_index | mask;
++
++ TRACE("Entered squashfs_readpage, page index %lx, start block %llx\n",
++ page->index,
++ SQUASHFS_I(inode)->start_block);
++
++ if (!(block_list = kmalloc(SIZE, GFP_KERNEL))) {
++ ERROR("Failed to allocate block_list\n");
++ goto skip_read;
++ }
++
++ if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
++ PAGE_CACHE_SHIFT))
++ goto skip_read;
++
++ if (SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK
++ || index < (i_size_read(inode) >>
++ sblk->block_log)) {
++ if ((block = (msblk->read_blocklist)(inode, index, 1,
++ block_list, NULL, &bsize)) == 0)
++ goto skip_read;
++
++ mutex_lock(&msblk->read_page_mutex);
++
++ if (!(bytes = squashfs_read_data(inode->i_sb, msblk->read_page,
++ block, bsize, NULL, sblk->block_size))) {
++ ERROR("Unable to read page, block %llx, size %x\n", block,
++ bsize);
++ mutex_unlock(&msblk->read_page_mutex);
++ goto skip_read;
++ }
++ } else {
++ if ((fragment = get_cached_fragment(inode->i_sb,
++ SQUASHFS_I(inode)->
++ u.s1.fragment_start_block,
++ SQUASHFS_I(inode)->u.s1.fragment_size))
++ == NULL) {
++ ERROR("Unable to read page, block %llx, size %x\n",
++ SQUASHFS_I(inode)->
++ u.s1.fragment_start_block,
++ (int) SQUASHFS_I(inode)->
++ u.s1.fragment_size);
++ goto skip_read;
++ }
++ bytes = SQUASHFS_I(inode)->u.s1.fragment_offset +
++ (i_size_read(inode) & (sblk->block_size
++ - 1));
++ byte_offset = SQUASHFS_I(inode)->u.s1.fragment_offset;
++ data_ptr = fragment->data;
++ }
++
++ for (i = start_index; i <= end_index && byte_offset < bytes;
++ i++, byte_offset += PAGE_CACHE_SIZE) {
++ struct page *push_page;
++ int avail = (bytes - byte_offset) > PAGE_CACHE_SIZE ?
++ PAGE_CACHE_SIZE : bytes - byte_offset;
++
++ TRACE("bytes %d, i %d, byte_offset %d, available_bytes %d\n",
++ bytes, i, byte_offset, avail);
++
++ push_page = (i == page->index) ? page :
++ grab_cache_page_nowait(page->mapping, i);
++
++ if (!push_page)
++ continue;
++
++ if (PageUptodate(push_page))
++ goto skip_page;
++
++ pageaddr = kmap_atomic(push_page, KM_USER0);
++ memcpy(pageaddr, data_ptr + byte_offset, avail);
++ memset(pageaddr + avail, 0, PAGE_CACHE_SIZE - avail);
++ kunmap_atomic(pageaddr, KM_USER0);
++ flush_dcache_page(push_page);
++ SetPageUptodate(push_page);
++skip_page:
++ unlock_page(push_page);
++ if(i != page->index)
++ page_cache_release(push_page);
++ }
++
++ if (SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK
++ || index < (i_size_read(inode) >>
++ sblk->block_log))
++ mutex_unlock(&msblk->read_page_mutex);
++ else
++ release_cached_fragment(msblk, fragment);
++
++ kfree(block_list);
++ return 0;
++
++skip_read:
++ pageaddr = kmap_atomic(page, KM_USER0);
++ memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
++ kunmap_atomic(pageaddr, KM_USER0);
++ flush_dcache_page(page);
++ SetPageUptodate(page);
++ unlock_page(page);
++
++ kfree(block_list);
++ return 0;
++}
++
++
++static int squashfs_readpage4K(struct file *file, struct page *page)
++{
++ struct inode *inode = page->mapping->host;
++ struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ unsigned char *block_list;
++ long long block;
++ unsigned int bsize, bytes = 0;
++ void *pageaddr;
++
++ TRACE("Entered squashfs_readpage4K, page index %lx, start block %llx\n",
++ page->index,
++ SQUASHFS_I(inode)->start_block);
++
++ if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
++ PAGE_CACHE_SHIFT)) {
++ block_list = NULL;
++ goto skip_read;
++ }
++
++ if (!(block_list = kmalloc(SIZE, GFP_KERNEL))) {
++ ERROR("Failed to allocate block_list\n");
++ goto skip_read;
++ }
++
++ if (SQUASHFS_I(inode)->u.s1.fragment_start_block == SQUASHFS_INVALID_BLK
++ || page->index < (i_size_read(inode) >>
++ sblk->block_log)) {
++ block = (msblk->read_blocklist)(inode, page->index, 1,
++ block_list, NULL, &bsize);
++ if(block == 0)
++ goto skip_read;
++
++ mutex_lock(&msblk->read_page_mutex);
++ bytes = squashfs_read_data(inode->i_sb, msblk->read_page, block,
++ bsize, NULL, sblk->block_size);
++ if (bytes) {
++ pageaddr = kmap_atomic(page, KM_USER0);
++ memcpy(pageaddr, msblk->read_page, bytes);
++ kunmap_atomic(pageaddr, KM_USER0);
++ } else
++ ERROR("Unable to read page, block %llx, size %x\n",
++ block, bsize);
++ mutex_unlock(&msblk->read_page_mutex);
++ } else {
++ struct squashfs_fragment_cache *fragment =
++ get_cached_fragment(inode->i_sb,
++ SQUASHFS_I(inode)->
++ u.s1.fragment_start_block,
++ SQUASHFS_I(inode)-> u.s1.fragment_size);
++ if (fragment) {
++ bytes = i_size_read(inode) & (sblk->block_size - 1);
++ pageaddr = kmap_atomic(page, KM_USER0);
++ memcpy(pageaddr, fragment->data + SQUASHFS_I(inode)->
++ u.s1.fragment_offset, bytes);
++ kunmap_atomic(pageaddr, KM_USER0);
++ release_cached_fragment(msblk, fragment);
++ } else
++ ERROR("Unable to read page, block %llx, size %x\n",
++ SQUASHFS_I(inode)->
++ u.s1.fragment_start_block, (int)
++ SQUASHFS_I(inode)-> u.s1.fragment_size);
++ }
++
++skip_read:
++ pageaddr = kmap_atomic(page, KM_USER0);
++ memset(pageaddr + bytes, 0, PAGE_CACHE_SIZE - bytes);
++ kunmap_atomic(pageaddr, KM_USER0);
++ flush_dcache_page(page);
++ SetPageUptodate(page);
++ unlock_page(page);
++
++ kfree(block_list);
++ return 0;
++}
++
++
++static int get_dir_index_using_offset(struct super_block *s, long long
++ *next_block, unsigned int *next_offset,
++ long long index_start,
++ unsigned int index_offset, int i_count,
++ long long f_pos)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ int i, length = 0;
++ struct squashfs_dir_index index;
++
++ TRACE("Entered get_dir_index_using_offset, i_count %d, f_pos %d\n",
++ i_count, (unsigned int) f_pos);
++
++ f_pos =- 3;
++ if (f_pos == 0)
++ goto finish;
++
++ for (i = 0; i < i_count; i++) {
++ if (msblk->swap) {
++ struct squashfs_dir_index sindex;
++ squashfs_get_cached_block(s, (char *) &sindex,
++ index_start, index_offset,
++ sizeof(sindex), &index_start,
++ &index_offset);
++ SQUASHFS_SWAP_DIR_INDEX(&index, &sindex);
++ } else
++ squashfs_get_cached_block(s, (char *) &index,
++ index_start, index_offset,
++ sizeof(index), &index_start,
++ &index_offset);
++
++ if (index.index > f_pos)
++ break;
++
++ squashfs_get_cached_block(s, NULL, index_start, index_offset,
++ index.size + 1, &index_start,
++ &index_offset);
++
++ length = index.index;
++ *next_block = index.start_block + sblk->directory_table_start;
++ }
++
++ *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE;
++
++finish:
++ return length + 3;
++}
++
++
++static int get_dir_index_using_name(struct super_block *s, long long
++ *next_block, unsigned int *next_offset,
++ long long index_start,
++ unsigned int index_offset, int i_count,
++ const char *name, int size)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ int i, length = 0;
++ struct squashfs_dir_index *index;
++ char *str;
++
++ TRACE("Entered get_dir_index_using_name, i_count %d\n", i_count);
++
++ if (!(str = kmalloc(sizeof(struct squashfs_dir_index) +
++ (SQUASHFS_NAME_LEN + 1) * 2, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_index\n");
++ goto failure;
++ }
++
++ index = (struct squashfs_dir_index *) (str + SQUASHFS_NAME_LEN + 1);
++ strncpy(str, name, size);
++ str[size] = '\0';
++
++ for (i = 0; i < i_count; i++) {
++ if (msblk->swap) {
++ struct squashfs_dir_index sindex;
++ squashfs_get_cached_block(s, (char *) &sindex,
++ index_start, index_offset,
++ sizeof(sindex), &index_start,
++ &index_offset);
++ SQUASHFS_SWAP_DIR_INDEX(index, &sindex);
++ } else
++ squashfs_get_cached_block(s, (char *) index,
++ index_start, index_offset,
++ sizeof(struct squashfs_dir_index),
++ &index_start, &index_offset);
++
++ squashfs_get_cached_block(s, index->name, index_start,
++ index_offset, index->size + 1,
++ &index_start, &index_offset);
++
++ index->name[index->size + 1] = '\0';
++
++ if (strcmp(index->name, str) > 0)
++ break;
++
++ length = index->index;
++ *next_block = index->start_block + sblk->directory_table_start;
++ }
++
++ *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE;
++ kfree(str);
++failure:
++ return length + 3;
++}
++
++
++static int squashfs_readdir(struct file *file, void *dirent, filldir_t filldir)
++{
++ struct inode *i = file->f_dentry->d_inode;
++ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ long long next_block = SQUASHFS_I(i)->start_block +
++ sblk->directory_table_start;
++ int next_offset = SQUASHFS_I(i)->offset, length = 0,
++ dir_count;
++ struct squashfs_dir_header dirh;
++ struct squashfs_dir_entry *dire;
++
++ TRACE("Entered squashfs_readdir [%llx:%x]\n", next_block, next_offset);
++
++ if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto finish;
++ }
++
++ while(file->f_pos < 3) {
++ char *name;
++ int size, i_ino;
++
++ if(file->f_pos == 0) {
++ name = ".";
++ size = 1;
++ i_ino = i->i_ino;
++ } else {
++ name = "..";
++ size = 2;
++ i_ino = SQUASHFS_I(i)->u.s2.parent_inode;
++ }
++ TRACE("Calling filldir(%x, %s, %d, %d, %d, %d)\n",
++ (unsigned int) dirent, name, size, (int)
++ file->f_pos, i_ino,
++ squashfs_filetype_table[1]);
++
++ if (filldir(dirent, name, size,
++ file->f_pos, i_ino,
++ squashfs_filetype_table[1]) < 0) {
++ TRACE("Filldir returned less than 0\n");
++ goto finish;
++ }
++ file->f_pos += size;
++ }
++
++ length = get_dir_index_using_offset(i->i_sb, &next_block, &next_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_start,
++ SQUASHFS_I(i)->u.s2.directory_index_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_count,
++ file->f_pos);
++
++ while (length < i_size_read(i)) {
++ /* read directory header */
++ if (msblk->swap) {
++ struct squashfs_dir_header sdirh;
++
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh,
++ next_block, next_offset, sizeof(sdirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdirh);
++ SQUASHFS_SWAP_DIR_HEADER(&dirh, &sdirh);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &dirh,
++ next_block, next_offset, sizeof(dirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(dirh);
++ }
++
++ dir_count = dirh.count + 1;
++ while (dir_count--) {
++ if (msblk->swap) {
++ struct squashfs_dir_entry sdire;
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ &sdire, next_block, next_offset,
++ sizeof(sdire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdire);
++ SQUASHFS_SWAP_DIR_ENTRY(dire, &sdire);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ dire, next_block, next_offset,
++ sizeof(*dire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(*dire);
++ }
++
++ if (!squashfs_get_cached_block(i->i_sb, dire->name,
++ next_block, next_offset,
++ dire->size + 1, &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += dire->size + 1;
++
++ if (file->f_pos >= length)
++ continue;
++
++ dire->name[dire->size + 1] = '\0';
++
++ TRACE("Calling filldir(%x, %s, %d, %d, %x:%x, %d, %d)\n",
++ (unsigned int) dirent, dire->name,
++ dire->size + 1, (int) file->f_pos,
++ dirh.start_block, dire->offset,
++ dirh.inode_number + dire->inode_number,
++ squashfs_filetype_table[dire->type]);
++
++ if (filldir(dirent, dire->name, dire->size + 1,
++ file->f_pos,
++ dirh.inode_number + dire->inode_number,
++ squashfs_filetype_table[dire->type])
++ < 0) {
++ TRACE("Filldir returned less than 0\n");
++ goto finish;
++ }
++ file->f_pos = length;
++ }
++ }
++
++finish:
++ kfree(dire);
++ return 0;
++
++failed_read:
++ ERROR("Unable to read directory block [%llx:%x]\n", next_block,
++ next_offset);
++ kfree(dire);
++ return 0;
++}
++
++
++static struct dentry *squashfs_lookup(struct inode *i, struct dentry *dentry,
++ struct nameidata *nd)
++{
++ const unsigned char *name = dentry->d_name.name;
++ int len = dentry->d_name.len;
++ struct inode *inode = NULL;
++ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ long long next_block = SQUASHFS_I(i)->start_block +
++ sblk->directory_table_start;
++ int next_offset = SQUASHFS_I(i)->offset, length = 0,
++ dir_count;
++ struct squashfs_dir_header dirh;
++ struct squashfs_dir_entry *dire;
++
++ TRACE("Entered squashfs_lookup [%llx:%x]\n", next_block, next_offset);
++
++ if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto exit_lookup;
++ }
++
++ if (len > SQUASHFS_NAME_LEN)
++ goto exit_lookup;
++
++ length = get_dir_index_using_name(i->i_sb, &next_block, &next_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_start,
++ SQUASHFS_I(i)->u.s2.directory_index_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_count, name,
++ len);
++
++ while (length < i_size_read(i)) {
++ /* read directory header */
++ if (msblk->swap) {
++ struct squashfs_dir_header sdirh;
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh,
++ next_block, next_offset, sizeof(sdirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdirh);
++ SQUASHFS_SWAP_DIR_HEADER(&dirh, &sdirh);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &dirh,
++ next_block, next_offset, sizeof(dirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(dirh);
++ }
++
++ dir_count = dirh.count + 1;
++ while (dir_count--) {
++ if (msblk->swap) {
++ struct squashfs_dir_entry sdire;
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ &sdire, next_block,next_offset,
++ sizeof(sdire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdire);
++ SQUASHFS_SWAP_DIR_ENTRY(dire, &sdire);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ dire, next_block,next_offset,
++ sizeof(*dire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(*dire);
++ }
++
++ if (!squashfs_get_cached_block(i->i_sb, dire->name,
++ next_block, next_offset, dire->size + 1,
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += dire->size + 1;
++
++ if (name[0] < dire->name[0])
++ goto exit_lookup;
++
++ if ((len == dire->size + 1) && !strncmp(name, dire->name, len)) {
++ squashfs_inode_t ino = SQUASHFS_MKINODE(dirh.start_block,
++ dire->offset);
++
++ TRACE("calling squashfs_iget for directory "
++ "entry %s, inode %x:%x, %d\n", name,
++ dirh.start_block, dire->offset,
++ dirh.inode_number + dire->inode_number);
++
++ inode = squashfs_iget(i->i_sb, ino, dirh.inode_number + dire->inode_number);
++
++ goto exit_lookup;
++ }
++ }
++ }
++
++exit_lookup:
++ kfree(dire);
++ if (inode)
++ return d_splice_alias(inode, dentry);
++ d_add(dentry, inode);
++ return ERR_PTR(0);
++
++failed_read:
++ ERROR("Unable to read directory block [%llx:%x]\n", next_block,
++ next_offset);
++ goto exit_lookup;
++}
++
++
++static int squashfs_remount(struct super_block *s, int *flags, char *data)
++{
++ *flags |= MS_RDONLY;
++ return 0;
++}
++
++
++static void squashfs_put_super(struct super_block *s)
++{
++ int i;
++
++ if (s->s_fs_info) {
++ struct squashfs_sb_info *sbi = s->s_fs_info;
++ if (sbi->block_cache)
++ for (i = 0; i < SQUASHFS_CACHED_BLKS; i++)
++ if (sbi->block_cache[i].block !=
++ SQUASHFS_INVALID_BLK)
++ kfree(sbi->block_cache[i].data);
++ if (sbi->fragment)
++ for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS; i++)
++ SQUASHFS_FREE(sbi->fragment[i].data);
++ kfree(sbi->fragment);
++ kfree(sbi->block_cache);
++ kfree(sbi->read_page);
++ kfree(sbi->uid);
++ kfree(sbi->fragment_index);
++ kfree(sbi->fragment_index_2);
++ kfree(sbi->meta_index);
++ vfree(sbi->stream.workspace);
++ kfree(s->s_fs_info);
++ s->s_fs_info = NULL;
++ }
++}
++
++
++static int squashfs_get_sb(struct file_system_type *fs_type, int flags,
++ const char *dev_name, void *data,
++ struct vfsmount *mnt)
++{
++ return get_sb_bdev(fs_type, flags, dev_name, data, squashfs_fill_super,
++ mnt);
++}
++
++
++static int __init init_squashfs_fs(void)
++{
++ int err = init_inodecache();
++ if (err)
++ goto out;
++
++ printk(KERN_INFO "squashfs: version 3.2-r2 (2007/01/15) "
++ "Phillip Lougher\n");
++
++ if ((err = register_filesystem(&squashfs_fs_type)))
++ destroy_inodecache();
++
++out:
++ return err;
++}
++
++
++static void __exit exit_squashfs_fs(void)
++{
++ unregister_filesystem(&squashfs_fs_type);
++ destroy_inodecache();
++}
++
++
++static struct kmem_cache * squashfs_inode_cachep;
++
++
++static struct inode *squashfs_alloc_inode(struct super_block *sb)
++{
++ struct squashfs_inode_info *ei;
++ ei = kmem_cache_alloc(squashfs_inode_cachep, GFP_KERNEL);
++ if (!ei)
++ return NULL;
++ return &ei->vfs_inode;
++}
++
++
++static void squashfs_destroy_inode(struct inode *inode)
++{
++ kmem_cache_free(squashfs_inode_cachep, SQUASHFS_I(inode));
++}
++
++
++static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
++{
++ struct squashfs_inode_info *ei = foo;
++
++ inode_init_once(&ei->vfs_inode);
++}
++
++
++static int __init init_inodecache(void)
++{
++ squashfs_inode_cachep = kmem_cache_create("squashfs_inode_cache",
++ sizeof(struct squashfs_inode_info),
++ 0, SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT,
++ init_once);
++ if (squashfs_inode_cachep == NULL)
++ return -ENOMEM;
++ return 0;
++}
++
++
++static void destroy_inodecache(void)
++{
++ kmem_cache_destroy(squashfs_inode_cachep);
++}
++
++
++module_init(init_squashfs_fs);
++module_exit(exit_squashfs_fs);
++MODULE_DESCRIPTION("squashfs 3.2-r2, a compressed read-only filesystem");
++MODULE_AUTHOR("Phillip Lougher <phillip@lougher.org.uk>");
++MODULE_LICENSE("GPL");
+Index: linux-2.6.22/fs/squashfs/Makefile
+===================================================================
+--- /dev/null
++++ linux-2.6.22/fs/squashfs/Makefile
+@@ -0,0 +1,7 @@
++#
++# Makefile for the linux squashfs routines.
++#
++
++obj-$(CONFIG_SQUASHFS) += squashfs.o
++squashfs-y += inode.o
++squashfs-y += squashfs2_0.o
+Index: linux-2.6.22/fs/squashfs/squashfs2_0.c
+===================================================================
+--- /dev/null
++++ linux-2.6.22/fs/squashfs/squashfs2_0.c
+@@ -0,0 +1,742 @@
++/*
++ * Squashfs - a compressed read only filesystem for Linux
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs2_0.c
++ */
++
++#include <linux/squashfs_fs.h>
++#include <linux/module.h>
++#include <linux/zlib.h>
++#include <linux/fs.h>
++#include <linux/squashfs_fs_sb.h>
++#include <linux/squashfs_fs_i.h>
++
++#include "squashfs.h"
++static int squashfs_readdir_2(struct file *file, void *dirent, filldir_t filldir);
++static struct dentry *squashfs_lookup_2(struct inode *, struct dentry *,
++ struct nameidata *);
++
++static struct file_operations squashfs_dir_ops_2 = {
++ .read = generic_read_dir,
++ .readdir = squashfs_readdir_2
++};
++
++static struct inode_operations squashfs_dir_inode_ops_2 = {
++ .lookup = squashfs_lookup_2
++};
++
++static unsigned char squashfs_filetype_table[] = {
++ DT_UNKNOWN, DT_DIR, DT_REG, DT_LNK, DT_BLK, DT_CHR, DT_FIFO, DT_SOCK
++};
++
++static int read_fragment_index_table_2(struct super_block *s)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ if (!(msblk->fragment_index_2 = kmalloc(SQUASHFS_FRAGMENT_INDEX_BYTES_2
++ (sblk->fragments), GFP_KERNEL))) {
++ ERROR("Failed to allocate uid/gid table\n");
++ return 0;
++ }
++
++ if (SQUASHFS_FRAGMENT_INDEX_BYTES_2(sblk->fragments) &&
++ !squashfs_read_data(s, (char *)
++ msblk->fragment_index_2,
++ sblk->fragment_table_start,
++ SQUASHFS_FRAGMENT_INDEX_BYTES_2
++ (sblk->fragments) |
++ SQUASHFS_COMPRESSED_BIT_BLOCK, NULL, SQUASHFS_FRAGMENT_INDEX_BYTES_2(sblk->fragments))) {
++ ERROR("unable to read fragment index table\n");
++ return 0;
++ }
++
++ if (msblk->swap) {
++ int i;
++ unsigned int fragment;
++
++ for (i = 0; i < SQUASHFS_FRAGMENT_INDEXES_2(sblk->fragments);
++ i++) {
++ SQUASHFS_SWAP_FRAGMENT_INDEXES_2((&fragment),
++ &msblk->fragment_index_2[i], 1);
++ msblk->fragment_index_2[i] = fragment;
++ }
++ }
++
++ return 1;
++}
++
++
++static int get_fragment_location_2(struct super_block *s, unsigned int fragment,
++ long long *fragment_start_block,
++ unsigned int *fragment_size)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ long long start_block =
++ msblk->fragment_index_2[SQUASHFS_FRAGMENT_INDEX_2(fragment)];
++ int offset = SQUASHFS_FRAGMENT_INDEX_OFFSET_2(fragment);
++ struct squashfs_fragment_entry_2 fragment_entry;
++
++ if (msblk->swap) {
++ struct squashfs_fragment_entry_2 sfragment_entry;
++
++ if (!squashfs_get_cached_block(s, (char *) &sfragment_entry,
++ start_block, offset,
++ sizeof(sfragment_entry), &start_block,
++ &offset))
++ goto out;
++ SQUASHFS_SWAP_FRAGMENT_ENTRY_2(&fragment_entry, &sfragment_entry);
++ } else
++ if (!squashfs_get_cached_block(s, (char *) &fragment_entry,
++ start_block, offset,
++ sizeof(fragment_entry), &start_block,
++ &offset))
++ goto out;
++
++ *fragment_start_block = fragment_entry.start_block;
++ *fragment_size = fragment_entry.size;
++
++ return 1;
++
++out:
++ return 0;
++}
++
++
++static void squashfs_new_inode(struct squashfs_sb_info *msblk, struct inode *i,
++ struct squashfs_base_inode_header_2 *inodeb, unsigned int ino)
++{
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ i->i_ino = ino;
++ i->i_mtime.tv_sec = sblk->mkfs_time;
++ i->i_atime.tv_sec = sblk->mkfs_time;
++ i->i_ctime.tv_sec = sblk->mkfs_time;
++ i->i_uid = msblk->uid[inodeb->uid];
++ i->i_mode = inodeb->mode;
++ i->i_nlink = 1;
++ i->i_size = 0;
++ if (inodeb->guid == SQUASHFS_GUIDS)
++ i->i_gid = i->i_uid;
++ else
++ i->i_gid = msblk->guid[inodeb->guid];
++}
++
++
++static int squashfs_read_inode_2(struct inode *i, squashfs_inode_t inode)
++{
++ struct super_block *s = i->i_sb;
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ unsigned int block = SQUASHFS_INODE_BLK(inode) +
++ sblk->inode_table_start;
++ unsigned int offset = SQUASHFS_INODE_OFFSET(inode);
++ unsigned int ino = i->i_ino;
++ long long next_block;
++ unsigned int next_offset;
++ union squashfs_inode_header_2 id, sid;
++ struct squashfs_base_inode_header_2 *inodeb = &id.base,
++ *sinodeb = &sid.base;
++
++ TRACE("Entered squashfs_iget\n");
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *) sinodeb, block,
++ offset, sizeof(*sinodeb), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_BASE_INODE_HEADER_2(inodeb, sinodeb,
++ sizeof(*sinodeb));
++ } else
++ if (!squashfs_get_cached_block(s, (char *) inodeb, block,
++ offset, sizeof(*inodeb), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ squashfs_new_inode(msblk, i, inodeb, ino);
++
++ switch(inodeb->inode_type) {
++ case SQUASHFS_FILE_TYPE: {
++ struct squashfs_reg_inode_header_2 *inodep = &id.reg;
++ struct squashfs_reg_inode_header_2 *sinodep = &sid.reg;
++ long long frag_blk;
++ unsigned int frag_size = 0;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_REG_INODE_HEADER_2(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ frag_blk = SQUASHFS_INVALID_BLK;
++ if (inodep->fragment != SQUASHFS_INVALID_FRAG &&
++ !get_fragment_location_2(s,
++ inodep->fragment, &frag_blk, &frag_size))
++ goto failed_read;
++
++ i->i_size = inodep->file_size;
++ i->i_fop = &generic_ro_fops;
++ i->i_mode |= S_IFREG;
++ i->i_mtime.tv_sec = inodep->mtime;
++ i->i_atime.tv_sec = inodep->mtime;
++ i->i_ctime.tv_sec = inodep->mtime;
++ i->i_blocks = ((i->i_size - 1) >> 9) + 1;
++ SQUASHFS_I(i)->u.s1.fragment_start_block = frag_blk;
++ SQUASHFS_I(i)->u.s1.fragment_size = frag_size;
++ SQUASHFS_I(i)->u.s1.fragment_offset = inodep->offset;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->u.s1.block_list_start = next_block;
++ SQUASHFS_I(i)->offset = next_offset;
++ if (sblk->block_size > 4096)
++ i->i_data.a_ops = &squashfs_aops;
++ else
++ i->i_data.a_ops = &squashfs_aops_4K;
++
++ TRACE("File inode %x:%x, start_block %x, "
++ "block_list_start %llx, offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->start_block, next_block,
++ next_offset);
++ break;
++ }
++ case SQUASHFS_DIR_TYPE: {
++ struct squashfs_dir_inode_header_2 *inodep = &id.dir;
++ struct squashfs_dir_inode_header_2 *sinodep = &sid.dir;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_DIR_INODE_HEADER_2(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_size = inodep->file_size;
++ i->i_op = &squashfs_dir_inode_ops_2;
++ i->i_fop = &squashfs_dir_ops_2;
++ i->i_mode |= S_IFDIR;
++ i->i_mtime.tv_sec = inodep->mtime;
++ i->i_atime.tv_sec = inodep->mtime;
++ i->i_ctime.tv_sec = inodep->mtime;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->offset = inodep->offset;
++ SQUASHFS_I(i)->u.s2.directory_index_count = 0;
++ SQUASHFS_I(i)->u.s2.parent_inode = 0;
++
++ TRACE("Directory inode %x:%x, start_block %x, offset "
++ "%x\n", SQUASHFS_INODE_BLK(inode),
++ offset, inodep->start_block,
++ inodep->offset);
++ break;
++ }
++ case SQUASHFS_LDIR_TYPE: {
++ struct squashfs_ldir_inode_header_2 *inodep = &id.ldir;
++ struct squashfs_ldir_inode_header_2 *sinodep = &sid.ldir;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_LDIR_INODE_HEADER_2(inodep,
++ sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_size = inodep->file_size;
++ i->i_op = &squashfs_dir_inode_ops_2;
++ i->i_fop = &squashfs_dir_ops_2;
++ i->i_mode |= S_IFDIR;
++ i->i_mtime.tv_sec = inodep->mtime;
++ i->i_atime.tv_sec = inodep->mtime;
++ i->i_ctime.tv_sec = inodep->mtime;
++ SQUASHFS_I(i)->start_block = inodep->start_block;
++ SQUASHFS_I(i)->offset = inodep->offset;
++ SQUASHFS_I(i)->u.s2.directory_index_start = next_block;
++ SQUASHFS_I(i)->u.s2.directory_index_offset =
++ next_offset;
++ SQUASHFS_I(i)->u.s2.directory_index_count =
++ inodep->i_count;
++ SQUASHFS_I(i)->u.s2.parent_inode = 0;
++
++ TRACE("Long directory inode %x:%x, start_block %x, "
++ "offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->start_block, inodep->offset);
++ break;
++ }
++ case SQUASHFS_SYMLINK_TYPE: {
++ struct squashfs_symlink_inode_header_2 *inodep =
++ &id.symlink;
++ struct squashfs_symlink_inode_header_2 *sinodep =
++ &sid.symlink;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_SYMLINK_INODE_HEADER_2(inodep,
++ sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_size = inodep->symlink_size;
++ i->i_op = &page_symlink_inode_operations;
++ i->i_data.a_ops = &squashfs_symlink_aops;
++ i->i_mode |= S_IFLNK;
++ SQUASHFS_I(i)->start_block = next_block;
++ SQUASHFS_I(i)->offset = next_offset;
++
++ TRACE("Symbolic link inode %x:%x, start_block %llx, "
++ "offset %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ next_block, next_offset);
++ break;
++ }
++ case SQUASHFS_BLKDEV_TYPE:
++ case SQUASHFS_CHRDEV_TYPE: {
++ struct squashfs_dev_inode_header_2 *inodep = &id.dev;
++ struct squashfs_dev_inode_header_2 *sinodep = &sid.dev;
++
++ if (msblk->swap) {
++ if (!squashfs_get_cached_block(s, (char *)
++ sinodep, block, offset,
++ sizeof(*sinodep), &next_block,
++ &next_offset))
++ goto failed_read;
++ SQUASHFS_SWAP_DEV_INODE_HEADER_2(inodep, sinodep);
++ } else
++ if (!squashfs_get_cached_block(s, (char *)
++ inodep, block, offset,
++ sizeof(*inodep), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ i->i_mode |= (inodeb->inode_type ==
++ SQUASHFS_CHRDEV_TYPE) ? S_IFCHR :
++ S_IFBLK;
++ init_special_inode(i, i->i_mode,
++ old_decode_dev(inodep->rdev));
++
++ TRACE("Device inode %x:%x, rdev %x\n",
++ SQUASHFS_INODE_BLK(inode), offset,
++ inodep->rdev);
++ break;
++ }
++ case SQUASHFS_FIFO_TYPE:
++ case SQUASHFS_SOCKET_TYPE: {
++
++ i->i_mode |= (inodeb->inode_type == SQUASHFS_FIFO_TYPE)
++ ? S_IFIFO : S_IFSOCK;
++ init_special_inode(i, i->i_mode, 0);
++ break;
++ }
++ default:
++ ERROR("Unknown inode type %d in squashfs_iget!\n",
++ inodeb->inode_type);
++ goto failed_read1;
++ }
++
++ return 1;
++
++failed_read:
++ ERROR("Unable to read inode [%x:%x]\n", block, offset);
++
++failed_read1:
++ return 0;
++}
++
++
++static int get_dir_index_using_offset(struct super_block *s, long long
++ *next_block, unsigned int *next_offset,
++ long long index_start,
++ unsigned int index_offset, int i_count,
++ long long f_pos)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ int i, length = 0;
++ struct squashfs_dir_index_2 index;
++
++ TRACE("Entered get_dir_index_using_offset, i_count %d, f_pos %d\n",
++ i_count, (unsigned int) f_pos);
++
++ if (f_pos == 0)
++ goto finish;
++
++ for (i = 0; i < i_count; i++) {
++ if (msblk->swap) {
++ struct squashfs_dir_index_2 sindex;
++ squashfs_get_cached_block(s, (char *) &sindex,
++ index_start, index_offset,
++ sizeof(sindex), &index_start,
++ &index_offset);
++ SQUASHFS_SWAP_DIR_INDEX_2(&index, &sindex);
++ } else
++ squashfs_get_cached_block(s, (char *) &index,
++ index_start, index_offset,
++ sizeof(index), &index_start,
++ &index_offset);
++
++ if (index.index > f_pos)
++ break;
++
++ squashfs_get_cached_block(s, NULL, index_start, index_offset,
++ index.size + 1, &index_start,
++ &index_offset);
++
++ length = index.index;
++ *next_block = index.start_block + sblk->directory_table_start;
++ }
++
++ *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE;
++
++finish:
++ return length;
++}
++
++
++static int get_dir_index_using_name(struct super_block *s, long long
++ *next_block, unsigned int *next_offset,
++ long long index_start,
++ unsigned int index_offset, int i_count,
++ const char *name, int size)
++{
++ struct squashfs_sb_info *msblk = s->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ int i, length = 0;
++ struct squashfs_dir_index_2 *index;
++ char *str;
++
++ TRACE("Entered get_dir_index_using_name, i_count %d\n", i_count);
++
++ if (!(str = kmalloc(sizeof(struct squashfs_dir_index) +
++ (SQUASHFS_NAME_LEN + 1) * 2, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_index\n");
++ goto failure;
++ }
++
++ index = (struct squashfs_dir_index_2 *) (str + SQUASHFS_NAME_LEN + 1);
++ strncpy(str, name, size);
++ str[size] = '\0';
++
++ for (i = 0; i < i_count; i++) {
++ if (msblk->swap) {
++ struct squashfs_dir_index_2 sindex;
++ squashfs_get_cached_block(s, (char *) &sindex,
++ index_start, index_offset,
++ sizeof(sindex), &index_start,
++ &index_offset);
++ SQUASHFS_SWAP_DIR_INDEX_2(index, &sindex);
++ } else
++ squashfs_get_cached_block(s, (char *) index,
++ index_start, index_offset,
++ sizeof(struct squashfs_dir_index_2),
++ &index_start, &index_offset);
++
++ squashfs_get_cached_block(s, index->name, index_start,
++ index_offset, index->size + 1,
++ &index_start, &index_offset);
++
++ index->name[index->size + 1] = '\0';
++
++ if (strcmp(index->name, str) > 0)
++ break;
++
++ length = index->index;
++ *next_block = index->start_block + sblk->directory_table_start;
++ }
++
++ *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE;
++ kfree(str);
++failure:
++ return length;
++}
++
++
++static int squashfs_readdir_2(struct file *file, void *dirent, filldir_t filldir)
++{
++ struct inode *i = file->f_dentry->d_inode;
++ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ long long next_block = SQUASHFS_I(i)->start_block +
++ sblk->directory_table_start;
++ int next_offset = SQUASHFS_I(i)->offset, length = 0,
++ dir_count;
++ struct squashfs_dir_header_2 dirh;
++ struct squashfs_dir_entry_2 *dire;
++
++ TRACE("Entered squashfs_readdir_2 [%llx:%x]\n", next_block, next_offset);
++
++ if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto finish;
++ }
++
++ length = get_dir_index_using_offset(i->i_sb, &next_block, &next_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_start,
++ SQUASHFS_I(i)->u.s2.directory_index_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_count,
++ file->f_pos);
++
++ while (length < i_size_read(i)) {
++ /* read directory header */
++ if (msblk->swap) {
++ struct squashfs_dir_header_2 sdirh;
++
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh,
++ next_block, next_offset, sizeof(sdirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdirh);
++ SQUASHFS_SWAP_DIR_HEADER_2(&dirh, &sdirh);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &dirh,
++ next_block, next_offset, sizeof(dirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(dirh);
++ }
++
++ dir_count = dirh.count + 1;
++ while (dir_count--) {
++ if (msblk->swap) {
++ struct squashfs_dir_entry_2 sdire;
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ &sdire, next_block, next_offset,
++ sizeof(sdire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdire);
++ SQUASHFS_SWAP_DIR_ENTRY_2(dire, &sdire);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ dire, next_block, next_offset,
++ sizeof(*dire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(*dire);
++ }
++
++ if (!squashfs_get_cached_block(i->i_sb, dire->name,
++ next_block, next_offset,
++ dire->size + 1, &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += dire->size + 1;
++
++ if (file->f_pos >= length)
++ continue;
++
++ dire->name[dire->size + 1] = '\0';
++
++ TRACE("Calling filldir(%x, %s, %d, %d, %x:%x, %d)\n",
++ (unsigned int) dirent, dire->name,
++ dire->size + 1, (int) file->f_pos,
++ dirh.start_block, dire->offset,
++ squashfs_filetype_table[dire->type]);
++
++ if (filldir(dirent, dire->name, dire->size + 1,
++ file->f_pos, SQUASHFS_MK_VFS_INODE(
++ dirh.start_block, dire->offset),
++ squashfs_filetype_table[dire->type])
++ < 0) {
++ TRACE("Filldir returned less than 0\n");
++ goto finish;
++ }
++ file->f_pos = length;
++ }
++ }
++
++finish:
++ kfree(dire);
++ return 0;
++
++failed_read:
++ ERROR("Unable to read directory block [%llx:%x]\n", next_block,
++ next_offset);
++ kfree(dire);
++ return 0;
++}
++
++
++static struct dentry *squashfs_lookup_2(struct inode *i, struct dentry *dentry,
++ struct nameidata *nd)
++{
++ const unsigned char *name = dentry->d_name.name;
++ int len = dentry->d_name.len;
++ struct inode *inode = NULL;
++ struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
++ struct squashfs_super_block *sblk = &msblk->sblk;
++ long long next_block = SQUASHFS_I(i)->start_block +
++ sblk->directory_table_start;
++ int next_offset = SQUASHFS_I(i)->offset, length = 0,
++ dir_count;
++ struct squashfs_dir_header_2 dirh;
++ struct squashfs_dir_entry_2 *dire;
++ int sorted = sblk->s_major == 2 && sblk->s_minor >= 1;
++
++ TRACE("Entered squashfs_lookup_2 [%llx:%x]\n", next_block, next_offset);
++
++ if (!(dire = kmalloc(sizeof(struct squashfs_dir_entry) +
++ SQUASHFS_NAME_LEN + 1, GFP_KERNEL))) {
++ ERROR("Failed to allocate squashfs_dir_entry\n");
++ goto exit_loop;
++ }
++
++ if (len > SQUASHFS_NAME_LEN)
++ goto exit_loop;
++
++ length = get_dir_index_using_name(i->i_sb, &next_block, &next_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_start,
++ SQUASHFS_I(i)->u.s2.directory_index_offset,
++ SQUASHFS_I(i)->u.s2.directory_index_count, name,
++ len);
++
++ while (length < i_size_read(i)) {
++ /* read directory header */
++ if (msblk->swap) {
++ struct squashfs_dir_header_2 sdirh;
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &sdirh,
++ next_block, next_offset, sizeof(sdirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdirh);
++ SQUASHFS_SWAP_DIR_HEADER_2(&dirh, &sdirh);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *) &dirh,
++ next_block, next_offset, sizeof(dirh),
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += sizeof(dirh);
++ }
++
++ dir_count = dirh.count + 1;
++ while (dir_count--) {
++ if (msblk->swap) {
++ struct squashfs_dir_entry_2 sdire;
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ &sdire, next_block,next_offset,
++ sizeof(sdire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(sdire);
++ SQUASHFS_SWAP_DIR_ENTRY_2(dire, &sdire);
++ } else {
++ if (!squashfs_get_cached_block(i->i_sb, (char *)
++ dire, next_block,next_offset,
++ sizeof(*dire), &next_block,
++ &next_offset))
++ goto failed_read;
++
++ length += sizeof(*dire);
++ }
++
++ if (!squashfs_get_cached_block(i->i_sb, dire->name,
++ next_block, next_offset, dire->size + 1,
++ &next_block, &next_offset))
++ goto failed_read;
++
++ length += dire->size + 1;
++
++ if (sorted && name[0] < dire->name[0])
++ goto exit_loop;
++
++ if ((len == dire->size + 1) && !strncmp(name,
++ dire->name, len)) {
++ squashfs_inode_t ino =
++ SQUASHFS_MKINODE(dirh.start_block,
++ dire->offset);
++ unsigned int inode_number = SQUASHFS_MK_VFS_INODE(dirh.start_block,
++ dire->offset);
++
++ TRACE("calling squashfs_iget for directory "
++ "entry %s, inode %x:%x, %lld\n", name,
++ dirh.start_block, dire->offset, ino);
++
++ inode = squashfs_iget(i->i_sb, ino, inode_number);
++
++ goto exit_loop;
++ }
++ }
++ }
++
++exit_loop:
++ kfree(dire);
++ d_add(dentry, inode);
++ return ERR_PTR(0);
++
++failed_read:
++ ERROR("Unable to read directory block [%llx:%x]\n", next_block,
++ next_offset);
++ goto exit_loop;
++}
++
++
++int squashfs_2_0_supported(struct squashfs_sb_info *msblk)
++{
++ struct squashfs_super_block *sblk = &msblk->sblk;
++
++ msblk->read_inode = squashfs_read_inode_2;
++ msblk->read_fragment_index_table = read_fragment_index_table_2;
++
++ sblk->bytes_used = sblk->bytes_used_2;
++ sblk->uid_start = sblk->uid_start_2;
++ sblk->guid_start = sblk->guid_start_2;
++ sblk->inode_table_start = sblk->inode_table_start_2;
++ sblk->directory_table_start = sblk->directory_table_start_2;
++ sblk->fragment_table_start = sblk->fragment_table_start_2;
++
++ return 1;
++}
+Index: linux-2.6.22/fs/squashfs/squashfs.h
+===================================================================
+--- /dev/null
++++ linux-2.6.22/fs/squashfs/squashfs.h
+@@ -0,0 +1,87 @@
++/*
++ * Squashfs - a compressed read only filesystem for Linux
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs.h
++ */
++
++#ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY
++#undef CONFIG_SQUASHFS_1_0_COMPATIBILITY
++#endif
++
++#ifdef SQUASHFS_TRACE
++#define TRACE(s, args...) printk(KERN_NOTICE "SQUASHFS: "s, ## args)
++#else
++#define TRACE(s, args...) {}
++#endif
++
++#define ERROR(s, args...) printk(KERN_ERR "SQUASHFS error: "s, ## args)
++
++#define SERROR(s, args...) do { \
++ if (!silent) \
++ printk(KERN_ERR "SQUASHFS error: "s, ## args);\
++ } while(0)
++
++#define WARNING(s, args...) printk(KERN_WARNING "SQUASHFS: "s, ## args)
++
++static inline struct squashfs_inode_info *SQUASHFS_I(struct inode *inode)
++{
++ return list_entry(inode, struct squashfs_inode_info, vfs_inode);
++}
++
++#if defined(CONFIG_SQUASHFS_1_0_COMPATIBILITY ) || defined(CONFIG_SQUASHFS_2_0_COMPATIBILITY)
++#define SQSH_EXTERN
++extern unsigned int squashfs_read_data(struct super_block *s, char *buffer,
++ long long index, unsigned int length,
++ long long *next_index, int srclength);
++extern int squashfs_get_cached_block(struct super_block *s, char *buffer,
++ long long block, unsigned int offset,
++ int length, long long *next_block,
++ unsigned int *next_offset);
++extern void release_cached_fragment(struct squashfs_sb_info *msblk, struct
++ squashfs_fragment_cache *fragment);
++extern struct squashfs_fragment_cache *get_cached_fragment(struct super_block
++ *s, long long start_block,
++ int length);
++extern struct inode *squashfs_iget(struct super_block *s, squashfs_inode_t inode, unsigned int inode_number);
++extern const struct address_space_operations squashfs_symlink_aops;
++extern const struct address_space_operations squashfs_aops;
++extern const struct address_space_operations squashfs_aops_4K;
++extern struct inode_operations squashfs_dir_inode_ops;
++#else
++#define SQSH_EXTERN static
++#endif
++
++#ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY
++extern int squashfs_1_0_supported(struct squashfs_sb_info *msblk);
++#else
++static inline int squashfs_1_0_supported(struct squashfs_sb_info *msblk)
++{
++ return 0;
++}
++#endif
++
++#ifdef CONFIG_SQUASHFS_2_0_COMPATIBILITY
++extern int squashfs_2_0_supported(struct squashfs_sb_info *msblk);
++#else
++static inline int squashfs_2_0_supported(struct squashfs_sb_info *msblk)
++{
++ return 0;
++}
++#endif
+Index: linux-2.6.22/include/linux/squashfs_fs.h
+===================================================================
+--- /dev/null
++++ linux-2.6.22/include/linux/squashfs_fs.h
+@@ -0,0 +1,934 @@
++#ifndef SQUASHFS_FS
++#define SQUASHFS_FS
++
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs_fs.h
++ */
++
++#ifndef CONFIG_SQUASHFS_2_0_COMPATIBILITY
++#define CONFIG_SQUASHFS_2_0_COMPATIBILITY
++#endif
++
++#ifdef CONFIG_SQUASHFS_VMALLOC
++#define SQUASHFS_ALLOC(a) vmalloc(a)
++#define SQUASHFS_FREE(a) vfree(a)
++#else
++#define SQUASHFS_ALLOC(a) kmalloc(a, GFP_KERNEL)
++#define SQUASHFS_FREE(a) kfree(a)
++#endif
++#define SQUASHFS_CACHED_FRAGMENTS CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE
++#define SQUASHFS_MAJOR 3
++#define SQUASHFS_MINOR 0
++#define SQUASHFS_MAGIC 0x73717368
++#define SQUASHFS_MAGIC_SWAP 0x68737173
++#define SQUASHFS_START 0
++
++/* size of metadata (inode and directory) blocks */
++#define SQUASHFS_METADATA_SIZE 8192
++#define SQUASHFS_METADATA_LOG 13
++
++/* default size of data blocks */
++#define SQUASHFS_FILE_SIZE 65536
++#define SQUASHFS_FILE_LOG 16
++
++#define SQUASHFS_FILE_MAX_SIZE 65536
++
++/* Max number of uids and gids */
++#define SQUASHFS_UIDS 256
++#define SQUASHFS_GUIDS 255
++
++/* Max length of filename (not 255) */
++#define SQUASHFS_NAME_LEN 256
++
++#define SQUASHFS_INVALID ((long long) 0xffffffffffff)
++#define SQUASHFS_INVALID_FRAG ((unsigned int) 0xffffffff)
++#define SQUASHFS_INVALID_BLK ((long long) -1)
++#define SQUASHFS_USED_BLK ((long long) -2)
++
++/* Filesystem flags */
++#define SQUASHFS_NOI 0
++#define SQUASHFS_NOD 1
++#define SQUASHFS_CHECK 2
++#define SQUASHFS_NOF 3
++#define SQUASHFS_NO_FRAG 4
++#define SQUASHFS_ALWAYS_FRAG 5
++#define SQUASHFS_DUPLICATE 6
++#define SQUASHFS_EXPORT 7
++
++#define SQUASHFS_BIT(flag, bit) ((flag >> bit) & 1)
++
++#define SQUASHFS_UNCOMPRESSED_INODES(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_NOI)
++
++#define SQUASHFS_UNCOMPRESSED_DATA(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_NOD)
++
++#define SQUASHFS_UNCOMPRESSED_FRAGMENTS(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_NOF)
++
++#define SQUASHFS_NO_FRAGMENTS(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_NO_FRAG)
++
++#define SQUASHFS_ALWAYS_FRAGMENTS(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_ALWAYS_FRAG)
++
++#define SQUASHFS_DUPLICATES(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_DUPLICATE)
++
++#define SQUASHFS_EXPORTABLE(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_EXPORT)
++
++#define SQUASHFS_CHECK_DATA(flags) SQUASHFS_BIT(flags, \
++ SQUASHFS_CHECK)
++
++#define SQUASHFS_MKFLAGS(noi, nod, check_data, nof, no_frag, always_frag, \
++ duplicate_checking, exortable) (noi | (nod << 1) | (check_data << 2) \
++ | (nof << 3) | (no_frag << 4) | (always_frag << 5) | \
++ (duplicate_checking << 6) | (exportable << 7))
++
++/* Max number of types and file types */
++#define SQUASHFS_DIR_TYPE 1
++#define SQUASHFS_FILE_TYPE 2
++#define SQUASHFS_SYMLINK_TYPE 3
++#define SQUASHFS_BLKDEV_TYPE 4
++#define SQUASHFS_CHRDEV_TYPE 5
++#define SQUASHFS_FIFO_TYPE 6
++#define SQUASHFS_SOCKET_TYPE 7
++#define SQUASHFS_LDIR_TYPE 8
++#define SQUASHFS_LREG_TYPE 9
++
++/* 1.0 filesystem type definitions */
++#define SQUASHFS_TYPES 5
++#define SQUASHFS_IPC_TYPE 0
++
++/* Flag whether block is compressed or uncompressed, bit is set if block is
++ * uncompressed */
++#define SQUASHFS_COMPRESSED_BIT (1 << 15)
++
++#define SQUASHFS_COMPRESSED_SIZE(B) (((B) & ~SQUASHFS_COMPRESSED_BIT) ? \
++ (B) & ~SQUASHFS_COMPRESSED_BIT : SQUASHFS_COMPRESSED_BIT)
++
++#define SQUASHFS_COMPRESSED(B) (!((B) & SQUASHFS_COMPRESSED_BIT))
++
++#define SQUASHFS_COMPRESSED_BIT_BLOCK (1 << 24)
++
++#define SQUASHFS_COMPRESSED_SIZE_BLOCK(B) (((B) & \
++ ~SQUASHFS_COMPRESSED_BIT_BLOCK) ? (B) & \
++ ~SQUASHFS_COMPRESSED_BIT_BLOCK : SQUASHFS_COMPRESSED_BIT_BLOCK)
++
++#define SQUASHFS_COMPRESSED_BLOCK(B) (!((B) & SQUASHFS_COMPRESSED_BIT_BLOCK))
++
++/*
++ * Inode number ops. Inodes consist of a compressed block number, and an
++ * uncompressed offset within that block
++ */
++#define SQUASHFS_INODE_BLK(a) ((unsigned int) ((a) >> 16))
++
++#define SQUASHFS_INODE_OFFSET(a) ((unsigned int) ((a) & 0xffff))
++
++#define SQUASHFS_MKINODE(A, B) ((squashfs_inode_t)(((squashfs_inode_t) (A)\
++ << 16) + (B)))
++
++/* Compute 32 bit VFS inode number from squashfs inode number */
++#define SQUASHFS_MK_VFS_INODE(a, b) ((unsigned int) (((a) << 8) + \
++ ((b) >> 2) + 1))
++/* XXX */
++
++/* Translate between VFS mode and squashfs mode */
++#define SQUASHFS_MODE(a) ((a) & 0xfff)
++
++/* fragment and fragment table defines */
++#define SQUASHFS_FRAGMENT_BYTES(A) ((A) * sizeof(struct squashfs_fragment_entry))
++
++#define SQUASHFS_FRAGMENT_INDEX(A) (SQUASHFS_FRAGMENT_BYTES(A) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEX_OFFSET(A) (SQUASHFS_FRAGMENT_BYTES(A) % \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEXES(A) ((SQUASHFS_FRAGMENT_BYTES(A) + \
++ SQUASHFS_METADATA_SIZE - 1) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEX_BYTES(A) (SQUASHFS_FRAGMENT_INDEXES(A) *\
++ sizeof(long long))
++
++/* inode lookup table defines */
++#define SQUASHFS_LOOKUP_BYTES(A) ((A) * sizeof(squashfs_inode_t))
++
++#define SQUASHFS_LOOKUP_BLOCK(A) (SQUASHFS_LOOKUP_BYTES(A) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_LOOKUP_BLOCK_OFFSET(A) (SQUASHFS_LOOKUP_BYTES(A) % \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_LOOKUP_BLOCKS(A) ((SQUASHFS_LOOKUP_BYTES(A) + \
++ SQUASHFS_METADATA_SIZE - 1) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_LOOKUP_BLOCK_BYTES(A) (SQUASHFS_LOOKUP_BLOCKS(A) *\
++ sizeof(long long))
++
++/* cached data constants for filesystem */
++#define SQUASHFS_CACHED_BLKS 8
++
++#define SQUASHFS_MAX_FILE_SIZE_LOG 64
++
++#define SQUASHFS_MAX_FILE_SIZE ((long long) 1 << \
++ (SQUASHFS_MAX_FILE_SIZE_LOG - 2))
++
++#define SQUASHFS_MARKER_BYTE 0xff
++
++/* meta index cache */
++#define SQUASHFS_META_INDEXES (SQUASHFS_METADATA_SIZE / sizeof(unsigned int))
++#define SQUASHFS_META_ENTRIES 31
++#define SQUASHFS_META_NUMBER 8
++#define SQUASHFS_SLOTS 4
++
++struct meta_entry {
++ long long data_block;
++ unsigned int index_block;
++ unsigned short offset;
++ unsigned short pad;
++};
++
++struct meta_index {
++ unsigned int inode_number;
++ unsigned int offset;
++ unsigned short entries;
++ unsigned short skip;
++ unsigned short locked;
++ unsigned short pad;
++ struct meta_entry meta_entry[SQUASHFS_META_ENTRIES];
++};
++
++
++/*
++ * definitions for structures on disk
++ */
++
++typedef long long squashfs_block_t;
++typedef long long squashfs_inode_t;
++
++struct squashfs_super_block {
++ unsigned int s_magic;
++ unsigned int inodes;
++ unsigned int bytes_used_2;
++ unsigned int uid_start_2;
++ unsigned int guid_start_2;
++ unsigned int inode_table_start_2;
++ unsigned int directory_table_start_2;
++ unsigned int s_major:16;
++ unsigned int s_minor:16;
++ unsigned int block_size_1:16;
++ unsigned int block_log:16;
++ unsigned int flags:8;
++ unsigned int no_uids:8;
++ unsigned int no_guids:8;
++ unsigned int mkfs_time /* time of filesystem creation */;
++ squashfs_inode_t root_inode;
++ unsigned int block_size;
++ unsigned int fragments;
++ unsigned int fragment_table_start_2;
++ long long bytes_used;
++ long long uid_start;
++ long long guid_start;
++ long long inode_table_start;
++ long long directory_table_start;
++ long long fragment_table_start;
++ long long lookup_table_start;
++} __attribute__ ((packed));
++
++struct squashfs_dir_index {
++ unsigned int index;
++ unsigned int start_block;
++ unsigned char size;
++ unsigned char name[0];
++} __attribute__ ((packed));
++
++#define SQUASHFS_BASE_INODE_HEADER \
++ unsigned int inode_type:4; \
++ unsigned int mode:12; \
++ unsigned int uid:8; \
++ unsigned int guid:8; \
++ unsigned int mtime; \
++ unsigned int inode_number;
++
++struct squashfs_base_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++} __attribute__ ((packed));
++
++struct squashfs_ipc_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++} __attribute__ ((packed));
++
++struct squashfs_dev_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++ unsigned short rdev;
++} __attribute__ ((packed));
++
++struct squashfs_symlink_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++ unsigned short symlink_size;
++ char symlink[0];
++} __attribute__ ((packed));
++
++struct squashfs_reg_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ squashfs_block_t start_block;
++ unsigned int fragment;
++ unsigned int offset;
++ unsigned int file_size;
++ unsigned short block_list[0];
++} __attribute__ ((packed));
++
++struct squashfs_lreg_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++ squashfs_block_t start_block;
++ unsigned int fragment;
++ unsigned int offset;
++ long long file_size;
++ unsigned short block_list[0];
++} __attribute__ ((packed));
++
++struct squashfs_dir_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++ unsigned int file_size:19;
++ unsigned int offset:13;
++ unsigned int start_block;
++ unsigned int parent_inode;
++} __attribute__ ((packed));
++
++struct squashfs_ldir_inode_header {
++ SQUASHFS_BASE_INODE_HEADER;
++ unsigned int nlink;
++ unsigned int file_size:27;
++ unsigned int offset:13;
++ unsigned int start_block;
++ unsigned int i_count:16;
++ unsigned int parent_inode;
++ struct squashfs_dir_index index[0];
++} __attribute__ ((packed));
++
++union squashfs_inode_header {
++ struct squashfs_base_inode_header base;
++ struct squashfs_dev_inode_header dev;
++ struct squashfs_symlink_inode_header symlink;
++ struct squashfs_reg_inode_header reg;
++ struct squashfs_lreg_inode_header lreg;
++ struct squashfs_dir_inode_header dir;
++ struct squashfs_ldir_inode_header ldir;
++ struct squashfs_ipc_inode_header ipc;
++};
++
++struct squashfs_dir_entry {
++ unsigned int offset:13;
++ unsigned int type:3;
++ unsigned int size:8;
++ int inode_number:16;
++ char name[0];
++} __attribute__ ((packed));
++
++struct squashfs_dir_header {
++ unsigned int count:8;
++ unsigned int start_block;
++ unsigned int inode_number;
++} __attribute__ ((packed));
++
++struct squashfs_fragment_entry {
++ long long start_block;
++ unsigned int size;
++ unsigned int pending;
++} __attribute__ ((packed));
++
++extern int squashfs_uncompress_block(void *d, int dstlen, void *s, int srclen);
++extern int squashfs_uncompress_init(void);
++extern int squashfs_uncompress_exit(void);
++
++/*
++ * macros to convert each packed bitfield structure from little endian to big
++ * endian and vice versa. These are needed when creating or using a filesystem
++ * on a machine with different byte ordering to the target architecture.
++ *
++ */
++
++#define SQUASHFS_SWAP_START \
++ int bits;\
++ int b_pos;\
++ unsigned long long val;\
++ unsigned char *s;\
++ unsigned char *d;
++
++#define SQUASHFS_SWAP_SUPER_BLOCK(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_super_block));\
++ SQUASHFS_SWAP((s)->s_magic, d, 0, 32);\
++ SQUASHFS_SWAP((s)->inodes, d, 32, 32);\
++ SQUASHFS_SWAP((s)->bytes_used_2, d, 64, 32);\
++ SQUASHFS_SWAP((s)->uid_start_2, d, 96, 32);\
++ SQUASHFS_SWAP((s)->guid_start_2, d, 128, 32);\
++ SQUASHFS_SWAP((s)->inode_table_start_2, d, 160, 32);\
++ SQUASHFS_SWAP((s)->directory_table_start_2, d, 192, 32);\
++ SQUASHFS_SWAP((s)->s_major, d, 224, 16);\
++ SQUASHFS_SWAP((s)->s_minor, d, 240, 16);\
++ SQUASHFS_SWAP((s)->block_size_1, d, 256, 16);\
++ SQUASHFS_SWAP((s)->block_log, d, 272, 16);\
++ SQUASHFS_SWAP((s)->flags, d, 288, 8);\
++ SQUASHFS_SWAP((s)->no_uids, d, 296, 8);\
++ SQUASHFS_SWAP((s)->no_guids, d, 304, 8);\
++ SQUASHFS_SWAP((s)->mkfs_time, d, 312, 32);\
++ SQUASHFS_SWAP((s)->root_inode, d, 344, 64);\
++ SQUASHFS_SWAP((s)->block_size, d, 408, 32);\
++ SQUASHFS_SWAP((s)->fragments, d, 440, 32);\
++ SQUASHFS_SWAP((s)->fragment_table_start_2, d, 472, 32);\
++ SQUASHFS_SWAP((s)->bytes_used, d, 504, 64);\
++ SQUASHFS_SWAP((s)->uid_start, d, 568, 64);\
++ SQUASHFS_SWAP((s)->guid_start, d, 632, 64);\
++ SQUASHFS_SWAP((s)->inode_table_start, d, 696, 64);\
++ SQUASHFS_SWAP((s)->directory_table_start, d, 760, 64);\
++ SQUASHFS_SWAP((s)->fragment_table_start, d, 824, 64);\
++ SQUASHFS_SWAP((s)->lookup_table_start, d, 888, 64);\
++}
++
++#define SQUASHFS_SWAP_BASE_INODE_CORE(s, d, n)\
++ SQUASHFS_MEMSET(s, d, n);\
++ SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\
++ SQUASHFS_SWAP((s)->mode, d, 4, 12);\
++ SQUASHFS_SWAP((s)->uid, d, 16, 8);\
++ SQUASHFS_SWAP((s)->guid, d, 24, 8);\
++ SQUASHFS_SWAP((s)->mtime, d, 32, 32);\
++ SQUASHFS_SWAP((s)->inode_number, d, 64, 32);
++
++#define SQUASHFS_SWAP_BASE_INODE_HEADER(s, d, n) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, n)\
++}
++
++#define SQUASHFS_SWAP_IPC_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_ipc_inode_header))\
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++}
++
++#define SQUASHFS_SWAP_DEV_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_dev_inode_header)); \
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++ SQUASHFS_SWAP((s)->rdev, d, 128, 16);\
++}
++
++#define SQUASHFS_SWAP_SYMLINK_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_symlink_inode_header));\
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++ SQUASHFS_SWAP((s)->symlink_size, d, 128, 16);\
++}
++
++#define SQUASHFS_SWAP_REG_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_reg_inode_header));\
++ SQUASHFS_SWAP((s)->start_block, d, 96, 64);\
++ SQUASHFS_SWAP((s)->fragment, d, 160, 32);\
++ SQUASHFS_SWAP((s)->offset, d, 192, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 224, 32);\
++}
++
++#define SQUASHFS_SWAP_LREG_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_lreg_inode_header));\
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 128, 64);\
++ SQUASHFS_SWAP((s)->fragment, d, 192, 32);\
++ SQUASHFS_SWAP((s)->offset, d, 224, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 256, 64);\
++}
++
++#define SQUASHFS_SWAP_DIR_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_dir_inode_header));\
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 128, 19);\
++ SQUASHFS_SWAP((s)->offset, d, 147, 13);\
++ SQUASHFS_SWAP((s)->start_block, d, 160, 32);\
++ SQUASHFS_SWAP((s)->parent_inode, d, 192, 32);\
++}
++
++#define SQUASHFS_SWAP_LDIR_INODE_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE(s, d, \
++ sizeof(struct squashfs_ldir_inode_header));\
++ SQUASHFS_SWAP((s)->nlink, d, 96, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 128, 27);\
++ SQUASHFS_SWAP((s)->offset, d, 155, 13);\
++ SQUASHFS_SWAP((s)->start_block, d, 168, 32);\
++ SQUASHFS_SWAP((s)->i_count, d, 200, 16);\
++ SQUASHFS_SWAP((s)->parent_inode, d, 216, 32);\
++}
++
++#define SQUASHFS_SWAP_DIR_INDEX(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_index));\
++ SQUASHFS_SWAP((s)->index, d, 0, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 32, 32);\
++ SQUASHFS_SWAP((s)->size, d, 64, 8);\
++}
++
++#define SQUASHFS_SWAP_DIR_HEADER(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_header));\
++ SQUASHFS_SWAP((s)->count, d, 0, 8);\
++ SQUASHFS_SWAP((s)->start_block, d, 8, 32);\
++ SQUASHFS_SWAP((s)->inode_number, d, 40, 32);\
++}
++
++#define SQUASHFS_SWAP_DIR_ENTRY(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_entry));\
++ SQUASHFS_SWAP((s)->offset, d, 0, 13);\
++ SQUASHFS_SWAP((s)->type, d, 13, 3);\
++ SQUASHFS_SWAP((s)->size, d, 16, 8);\
++ SQUASHFS_SWAP((s)->inode_number, d, 24, 16);\
++}
++
++#define SQUASHFS_SWAP_FRAGMENT_ENTRY(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_fragment_entry));\
++ SQUASHFS_SWAP((s)->start_block, d, 0, 64);\
++ SQUASHFS_SWAP((s)->size, d, 64, 32);\
++}
++
++#define SQUASHFS_SWAP_INODE_T(s, d) SQUASHFS_SWAP_LONG_LONGS(s, d, 1)
++
++#define SQUASHFS_SWAP_SHORTS(s, d, n) {\
++ int entry;\
++ int bit_position;\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, n * 2);\
++ for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
++ 16)\
++ SQUASHFS_SWAP(s[entry], d, bit_position, 16);\
++}
++
++#define SQUASHFS_SWAP_INTS(s, d, n) {\
++ int entry;\
++ int bit_position;\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, n * 4);\
++ for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
++ 32)\
++ SQUASHFS_SWAP(s[entry], d, bit_position, 32);\
++}
++
++#define SQUASHFS_SWAP_LONG_LONGS(s, d, n) {\
++ int entry;\
++ int bit_position;\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, n * 8);\
++ for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
++ 64)\
++ SQUASHFS_SWAP(s[entry], d, bit_position, 64);\
++}
++
++#define SQUASHFS_SWAP_DATA(s, d, n, bits) {\
++ int entry;\
++ int bit_position;\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, n * bits / 8);\
++ for(entry = 0, bit_position = 0; entry < n; entry++, bit_position += \
++ bits)\
++ SQUASHFS_SWAP(s[entry], d, bit_position, bits);\
++}
++
++#define SQUASHFS_SWAP_FRAGMENT_INDEXES(s, d, n) SQUASHFS_SWAP_LONG_LONGS(s, d, n)
++#define SQUASHFS_SWAP_LOOKUP_BLOCKS(s, d, n) SQUASHFS_SWAP_LONG_LONGS(s, d, n)
++
++#ifdef CONFIG_SQUASHFS_1_0_COMPATIBILITY
++
++struct squashfs_base_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++} __attribute__ ((packed));
++
++struct squashfs_ipc_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++ unsigned int type:4;
++ unsigned int offset:4;
++} __attribute__ ((packed));
++
++struct squashfs_dev_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++ unsigned short rdev;
++} __attribute__ ((packed));
++
++struct squashfs_symlink_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++ unsigned short symlink_size;
++ char symlink[0];
++} __attribute__ ((packed));
++
++struct squashfs_reg_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++ unsigned int mtime;
++ unsigned int start_block;
++ unsigned int file_size:32;
++ unsigned short block_list[0];
++} __attribute__ ((packed));
++
++struct squashfs_dir_inode_header_1 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:4; /* index into uid table */
++ unsigned int guid:4; /* index into guid table */
++ unsigned int file_size:19;
++ unsigned int offset:13;
++ unsigned int mtime;
++ unsigned int start_block:24;
++} __attribute__ ((packed));
++
++#define SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, n) \
++ SQUASHFS_MEMSET(s, d, n);\
++ SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\
++ SQUASHFS_SWAP((s)->mode, d, 4, 12);\
++ SQUASHFS_SWAP((s)->uid, d, 16, 4);\
++ SQUASHFS_SWAP((s)->guid, d, 20, 4);
++
++#define SQUASHFS_SWAP_BASE_INODE_HEADER_1(s, d, n) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, n)\
++}
++
++#define SQUASHFS_SWAP_IPC_INODE_HEADER_1(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
++ sizeof(struct squashfs_ipc_inode_header_1));\
++ SQUASHFS_SWAP((s)->type, d, 24, 4);\
++ SQUASHFS_SWAP((s)->offset, d, 28, 4);\
++}
++
++#define SQUASHFS_SWAP_DEV_INODE_HEADER_1(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
++ sizeof(struct squashfs_dev_inode_header_1));\
++ SQUASHFS_SWAP((s)->rdev, d, 24, 16);\
++}
++
++#define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_1(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
++ sizeof(struct squashfs_symlink_inode_header_1));\
++ SQUASHFS_SWAP((s)->symlink_size, d, 24, 16);\
++}
++
++#define SQUASHFS_SWAP_REG_INODE_HEADER_1(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
++ sizeof(struct squashfs_reg_inode_header_1));\
++ SQUASHFS_SWAP((s)->mtime, d, 24, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 56, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 88, 32);\
++}
++
++#define SQUASHFS_SWAP_DIR_INODE_HEADER_1(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_1(s, d, \
++ sizeof(struct squashfs_dir_inode_header_1));\
++ SQUASHFS_SWAP((s)->file_size, d, 24, 19);\
++ SQUASHFS_SWAP((s)->offset, d, 43, 13);\
++ SQUASHFS_SWAP((s)->mtime, d, 56, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 88, 24);\
++}
++
++#endif
++
++#ifdef CONFIG_SQUASHFS_2_0_COMPATIBILITY
++
++struct squashfs_dir_index_2 {
++ unsigned int index:27;
++ unsigned int start_block:29;
++ unsigned char size;
++ unsigned char name[0];
++} __attribute__ ((packed));
++
++struct squashfs_base_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++} __attribute__ ((packed));
++
++struct squashfs_ipc_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++} __attribute__ ((packed));
++
++struct squashfs_dev_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++ unsigned short rdev;
++} __attribute__ ((packed));
++
++struct squashfs_symlink_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++ unsigned short symlink_size;
++ char symlink[0];
++} __attribute__ ((packed));
++
++struct squashfs_reg_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++ unsigned int mtime;
++ unsigned int start_block;
++ unsigned int fragment;
++ unsigned int offset;
++ unsigned int file_size:32;
++ unsigned short block_list[0];
++} __attribute__ ((packed));
++
++struct squashfs_dir_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++ unsigned int file_size:19;
++ unsigned int offset:13;
++ unsigned int mtime;
++ unsigned int start_block:24;
++} __attribute__ ((packed));
++
++struct squashfs_ldir_inode_header_2 {
++ unsigned int inode_type:4;
++ unsigned int mode:12; /* protection */
++ unsigned int uid:8; /* index into uid table */
++ unsigned int guid:8; /* index into guid table */
++ unsigned int file_size:27;
++ unsigned int offset:13;
++ unsigned int mtime;
++ unsigned int start_block:24;
++ unsigned int i_count:16;
++ struct squashfs_dir_index_2 index[0];
++} __attribute__ ((packed));
++
++union squashfs_inode_header_2 {
++ struct squashfs_base_inode_header_2 base;
++ struct squashfs_dev_inode_header_2 dev;
++ struct squashfs_symlink_inode_header_2 symlink;
++ struct squashfs_reg_inode_header_2 reg;
++ struct squashfs_dir_inode_header_2 dir;
++ struct squashfs_ldir_inode_header_2 ldir;
++ struct squashfs_ipc_inode_header_2 ipc;
++};
++
++struct squashfs_dir_header_2 {
++ unsigned int count:8;
++ unsigned int start_block:24;
++} __attribute__ ((packed));
++
++struct squashfs_dir_entry_2 {
++ unsigned int offset:13;
++ unsigned int type:3;
++ unsigned int size:8;
++ char name[0];
++} __attribute__ ((packed));
++
++struct squashfs_fragment_entry_2 {
++ unsigned int start_block;
++ unsigned int size;
++} __attribute__ ((packed));
++
++#define SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, n)\
++ SQUASHFS_MEMSET(s, d, n);\
++ SQUASHFS_SWAP((s)->inode_type, d, 0, 4);\
++ SQUASHFS_SWAP((s)->mode, d, 4, 12);\
++ SQUASHFS_SWAP((s)->uid, d, 16, 8);\
++ SQUASHFS_SWAP((s)->guid, d, 24, 8);\
++
++#define SQUASHFS_SWAP_BASE_INODE_HEADER_2(s, d, n) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, n)\
++}
++
++#define SQUASHFS_SWAP_IPC_INODE_HEADER_2(s, d) \
++ SQUASHFS_SWAP_BASE_INODE_HEADER_2(s, d, sizeof(struct squashfs_ipc_inode_header_2))
++
++#define SQUASHFS_SWAP_DEV_INODE_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
++ sizeof(struct squashfs_dev_inode_header_2)); \
++ SQUASHFS_SWAP((s)->rdev, d, 32, 16);\
++}
++
++#define SQUASHFS_SWAP_SYMLINK_INODE_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
++ sizeof(struct squashfs_symlink_inode_header_2));\
++ SQUASHFS_SWAP((s)->symlink_size, d, 32, 16);\
++}
++
++#define SQUASHFS_SWAP_REG_INODE_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
++ sizeof(struct squashfs_reg_inode_header_2));\
++ SQUASHFS_SWAP((s)->mtime, d, 32, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 64, 32);\
++ SQUASHFS_SWAP((s)->fragment, d, 96, 32);\
++ SQUASHFS_SWAP((s)->offset, d, 128, 32);\
++ SQUASHFS_SWAP((s)->file_size, d, 160, 32);\
++}
++
++#define SQUASHFS_SWAP_DIR_INODE_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
++ sizeof(struct squashfs_dir_inode_header_2));\
++ SQUASHFS_SWAP((s)->file_size, d, 32, 19);\
++ SQUASHFS_SWAP((s)->offset, d, 51, 13);\
++ SQUASHFS_SWAP((s)->mtime, d, 64, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 96, 24);\
++}
++
++#define SQUASHFS_SWAP_LDIR_INODE_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_SWAP_BASE_INODE_CORE_2(s, d, \
++ sizeof(struct squashfs_ldir_inode_header_2));\
++ SQUASHFS_SWAP((s)->file_size, d, 32, 27);\
++ SQUASHFS_SWAP((s)->offset, d, 59, 13);\
++ SQUASHFS_SWAP((s)->mtime, d, 72, 32);\
++ SQUASHFS_SWAP((s)->start_block, d, 104, 24);\
++ SQUASHFS_SWAP((s)->i_count, d, 128, 16);\
++}
++
++#define SQUASHFS_SWAP_DIR_INDEX_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_index_2));\
++ SQUASHFS_SWAP((s)->index, d, 0, 27);\
++ SQUASHFS_SWAP((s)->start_block, d, 27, 29);\
++ SQUASHFS_SWAP((s)->size, d, 56, 8);\
++}
++#define SQUASHFS_SWAP_DIR_HEADER_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_header_2));\
++ SQUASHFS_SWAP((s)->count, d, 0, 8);\
++ SQUASHFS_SWAP((s)->start_block, d, 8, 24);\
++}
++
++#define SQUASHFS_SWAP_DIR_ENTRY_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_dir_entry_2));\
++ SQUASHFS_SWAP((s)->offset, d, 0, 13);\
++ SQUASHFS_SWAP((s)->type, d, 13, 3);\
++ SQUASHFS_SWAP((s)->size, d, 16, 8);\
++}
++
++#define SQUASHFS_SWAP_FRAGMENT_ENTRY_2(s, d) {\
++ SQUASHFS_SWAP_START\
++ SQUASHFS_MEMSET(s, d, sizeof(struct squashfs_fragment_entry_2));\
++ SQUASHFS_SWAP((s)->start_block, d, 0, 32);\
++ SQUASHFS_SWAP((s)->size, d, 32, 32);\
++}
++
++#define SQUASHFS_SWAP_FRAGMENT_INDEXES_2(s, d, n) SQUASHFS_SWAP_INTS(s, d, n)
++
++/* fragment and fragment table defines */
++#define SQUASHFS_FRAGMENT_BYTES_2(A) (A * sizeof(struct squashfs_fragment_entry_2))
++
++#define SQUASHFS_FRAGMENT_INDEX_2(A) (SQUASHFS_FRAGMENT_BYTES_2(A) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEX_OFFSET_2(A) (SQUASHFS_FRAGMENT_BYTES_2(A) % \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEXES_2(A) ((SQUASHFS_FRAGMENT_BYTES_2(A) + \
++ SQUASHFS_METADATA_SIZE - 1) / \
++ SQUASHFS_METADATA_SIZE)
++
++#define SQUASHFS_FRAGMENT_INDEX_BYTES_2(A) (SQUASHFS_FRAGMENT_INDEXES_2(A) *\
++ sizeof(int))
++
++#endif
++
++#ifdef __KERNEL__
++
++/*
++ * macros used to swap each structure entry, taking into account
++ * bitfields and different bitfield placing conventions on differing
++ * architectures
++ */
++
++#include <asm/byteorder.h>
++
++#ifdef __BIG_ENDIAN
++ /* convert from little endian to big endian */
++#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, \
++ tbits, b_pos)
++#else
++ /* convert from big endian to little endian */
++#define SQUASHFS_SWAP(value, p, pos, tbits) _SQUASHFS_SWAP(value, p, pos, \
++ tbits, 64 - tbits - b_pos)
++#endif
++
++#define _SQUASHFS_SWAP(value, p, pos, tbits, SHIFT) {\
++ b_pos = pos % 8;\
++ val = 0;\
++ s = (unsigned char *)p + (pos / 8);\
++ d = ((unsigned char *) &val) + 7;\
++ for(bits = 0; bits < (tbits + b_pos); bits += 8) \
++ *d-- = *s++;\
++ value = (val >> (SHIFT))/* & ((1 << tbits) - 1)*/;\
++}
++
++#define SQUASHFS_MEMSET(s, d, n) memset(s, 0, n);
++
++#endif
++#endif
+Index: linux-2.6.22/include/linux/squashfs_fs_i.h
+===================================================================
+--- /dev/null
++++ linux-2.6.22/include/linux/squashfs_fs_i.h
+@@ -0,0 +1,45 @@
++#ifndef SQUASHFS_FS_I
++#define SQUASHFS_FS_I
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs_fs_i.h
++ */
++
++struct squashfs_inode_info {
++ long long start_block;
++ unsigned int offset;
++ union {
++ struct {
++ long long fragment_start_block;
++ unsigned int fragment_size;
++ unsigned int fragment_offset;
++ long long block_list_start;
++ } s1;
++ struct {
++ long long directory_index_start;
++ unsigned int directory_index_offset;
++ unsigned int directory_index_count;
++ unsigned int parent_inode;
++ } s2;
++ } u;
++ struct inode vfs_inode;
++};
++#endif
+Index: linux-2.6.22/include/linux/squashfs_fs_sb.h
+===================================================================
+--- /dev/null
++++ linux-2.6.22/include/linux/squashfs_fs_sb.h
+@@ -0,0 +1,74 @@
++#ifndef SQUASHFS_FS_SB
++#define SQUASHFS_FS_SB
++/*
++ * Squashfs
++ *
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Phillip Lougher <phillip@lougher.org.uk>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version 2,
++ * or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
++ *
++ * squashfs_fs_sb.h
++ */
++
++#include <linux/squashfs_fs.h>
++
++struct squashfs_cache {
++ long long block;
++ int length;
++ long long next_index;
++ char *data;
++};
++
++struct squashfs_fragment_cache {
++ long long block;
++ int length;
++ unsigned int locked;
++ char *data;
++};
++
++struct squashfs_sb_info {
++ struct squashfs_super_block sblk;
++ int devblksize;
++ int devblksize_log2;
++ int swap;
++ struct squashfs_cache *block_cache;
++ struct squashfs_fragment_cache *fragment;
++ int next_cache;
++ int next_fragment;
++ int next_meta_index;
++ unsigned int *uid;
++ unsigned int *guid;
++ long long *fragment_index;
++ unsigned int *fragment_index_2;
++ char *read_page;
++ struct mutex read_data_mutex;
++ struct mutex read_page_mutex;
++ struct mutex block_cache_mutex;
++ struct mutex fragment_mutex;
++ struct mutex meta_index_mutex;
++ wait_queue_head_t waitq;
++ wait_queue_head_t fragment_wait_queue;
++ struct meta_index *meta_index;
++ z_stream stream;
++ long long *inode_lookup_table;
++ int (*read_inode)(struct inode *i, squashfs_inode_t \
++ inode);
++ long long (*read_blocklist)(struct inode *inode, int \
++ index, int readahead_blks, char *block_list, \
++ unsigned short **block_p, unsigned int *bsize);
++ int (*read_fragment_index_table)(struct super_block *s);
++};
++#endif
+Index: linux-2.6.22/init/do_mounts_rd.c
+===================================================================
+--- linux-2.6.22.orig/init/do_mounts_rd.c
++++ linux-2.6.22/init/do_mounts_rd.c
+@@ -5,6 +5,7 @@
+ #include <linux/ext2_fs.h>
+ #include <linux/romfs_fs.h>
+ #include <linux/cramfs_fs.h>
++#include <linux/squashfs_fs.h>
+ #include <linux/initrd.h>
+ #include <linux/string.h>
+
+@@ -39,6 +40,7 @@
+ * numbers could not be found.
+ *
+ * We currently check for the following magic numbers:
++ * squashfs
+ * minix
+ * ext2
+ * romfs
+@@ -53,6 +55,7 @@
+ struct ext2_super_block *ext2sb;
+ struct romfs_super_block *romfsb;
+ struct cramfs_super *cramfsb;
++ struct squashfs_super_block *squashfsb;
+ int nblocks = -1;
+ unsigned char *buf;
+
+@@ -64,6 +67,7 @@
+ ext2sb = (struct ext2_super_block *) buf;
+ romfsb = (struct romfs_super_block *) buf;
+ cramfsb = (struct cramfs_super *) buf;
++ squashfsb = (struct squashfs_super_block *) buf;
+ memset(buf, 0xe5, size);
+
+ /*
+@@ -101,6 +105,18 @@
+ goto done;
+ }
+
++ /* squashfs is at block zero too */
++ if (squashfsb->s_magic == SQUASHFS_MAGIC) {
++ printk(KERN_NOTICE
++ "RAMDISK: squashfs filesystem found at block %d\n",
++ start_block);
++ if (squashfsb->s_major < 3)
++ nblocks = (squashfsb->bytes_used_2+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
++ else
++ nblocks = (squashfsb->bytes_used+BLOCK_SIZE-1)>>BLOCK_SIZE_BITS;
++ goto done;
++ }
++
+ /*
+ * Read block 1 to test for minix and ext2 superblock
+ */
diff --git a/packages/linux/linux-openmoko-devel_svn.bb b/packages/linux/linux-openmoko-devel_svn+2.6.23.1.bb
index 6fae5da9ef..e1686eada9 100644
--- a/packages/linux/linux-openmoko-devel_svn.bb
+++ b/packages/linux/linux-openmoko-devel_svn+2.6.23.1.bb
@@ -1,24 +1,34 @@
+require linux.inc
+
DESCRIPTION = "Linux 2.6.x (development) kernel for FIC SmartPhones shipping w/ OpenMoko"
-VANILLA_VERSION = "2.6.22.5"
-PV = "${VANILLA_VERSION}-moko11+svnr${SRCREV}"
+VANILLA_VERSION = "2.6.23"
+#KERNEL_VERSION = "2.6.23-rc9"
+KERNEL_RELEASE = "2.6.23.1"
+
+# If you use a rc, you will need to use this:
+#PV = "${VANILLA_VERSION}+${KERNEL_RELEASE}-moko11+svnr${SRCREV}"
+
+KERNEL_VERSION = "${KERNEL_RELEASE}"
+PV = "${KERNEL_RELEASE}+svnr${SRCREV}"
PR = "r1"
KERNEL_IMAGETYPE = "uImage"
UBOOT_ENTRYPOINT = "30008000"
-require linux.inc
-
##############################################################
# source and patches
#
SRCREV_FORMAT = "patches"
+SRCREV = "3140"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${VANILLA_VERSION}.tar.bz2 \
- svn://svn.openmoko.org/trunk/src/target/kernel;module=patches;proto=http;name=patches \
- file://squashfs.patch;patch=1 \
+ ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${KERNEL_VERSION}.bz2;patch=1 \
+ svn://svn.openmoko.org/branches/src/target/kernel/2.6.23.x;module=patches;proto=http;name=patches \
+ file://squashfs-2.6.23.patch;patch=1 \
file://fix-EVIOCGRAB-semantics-2.6.22.5.patch;patch=1 \
-# file://printascii.patch;patch=1 \
- file://defconfig \
+# file://printascii-2.6.23.patch;patch=1 \
+ file://hack-gta02-cpu.patch;patch=1 \
+ file://defconfig-2.6.23.1 \
file://logo_linux_clut224.ppm"
S = "${WORKDIR}/linux-${VANILLA_VERSION}"
@@ -50,6 +60,7 @@ do_prepatch() {
mv ${WORKDIR}/patches ${S}/patches && cd ${S} && quilt push -av
mv patches patches.openmoko
mv .pc .pc.old
+ mv ${WORKDIR}/defconfig-${KERNEL_VERSION} ${WORKDIR}/defconfig
}
addtask prepatch after do_unpack before do_patch
diff --git a/packages/linux/linux-openmoko.inc b/packages/linux/linux-openmoko.inc
index d6b464c301..e6e41cfc08 100644
--- a/packages/linux/linux-openmoko.inc
+++ b/packages/linux/linux-openmoko.inc
@@ -83,13 +83,13 @@ do_configure() {
#
do_deploy() {
install -d ${DEPLOY_DIR_IMAGE}
- install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}.bin
- tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE}.tgz -C ${D} lib
+ install -m 0644 arch/${ARCH}/boot/${KERNEL_IMAGETYPE} ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE_CLASS}.bin
+ tar -cvzf ${DEPLOY_DIR_IMAGE}/modules-${KERNEL_RELEASE}-${PR}-${MACHINE_CLASS}.tgz -C ${D} lib
${OBJCOPY} -O binary -R .note -R .comment -S vmlinux linux.bin
rm -f linux.bin.gz
gzip -9 linux.bin
- ${STAGING_BINDIR_NATIVE}/uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n "OpenMoko Kernel Image Neo1973(GTA01)" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin
- ln -sf ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE}.bin ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE}-latest.bin
+ ${STAGING_BINDIR_NATIVE}/uboot-mkimage -A arm -O linux -T kernel -C gzip -a 30008000 -e 30008000 -n "OpenMoko Kernel Image Neo1973(GTA01/2)" -d linux.bin.gz ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE_CLASS}.bin
+ ln -sf ${DEPLOY_DIR_IMAGE}/uImage-${PV}-${PR}-${MACHINE_CLASS}.bin ${DEPLOY_DIR_IMAGE}/uImage-${MACHINE_CLASS}-latest.bin
rm -f linux.bin.gz
}
diff --git a/packages/linux/linux-openmoko/defconfig-2.6.22.5-fic-gta01 b/packages/linux/linux-openmoko/defconfig-2.6.22.5-fic-gta01
index 1d12b6ec36..7aa23df77c 100644
--- a/packages/linux/linux-openmoko/defconfig-2.6.22.5-fic-gta01
+++ b/packages/linux/linux-openmoko/defconfig-2.6.22.5-fic-gta01
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22.1
-# Thu Jul 26 22:01:38 2007
+# Linux kernel version: 2.6.22.5
+# Wed Oct 3 13:55:25 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -200,11 +200,12 @@ CONFIG_ARCH_S3C2440=y
CONFIG_SMDK2440_CPU2440=y
CONFIG_MACH_HXD8=y
CONFIG_MACH_NEO1973_GTA02=y
+CONFIG_CPU_S3C2442=y
#
# S3C2442 Machines
#
-# CONFIG_SMDK2440_CPU2442 is not set
+CONFIG_SMDK2440_CPU2442=y
#
# S3C2443 Machines
@@ -282,6 +283,7 @@ CONFIG_KEXEC=y
# At least one emulation must be selected
#
CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
# CONFIG_FPE_FASTFPE is not set
#
@@ -1196,9 +1198,6 @@ CONFIG_FONT_6x11=y
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
# CONFIG_LOGO is not set
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_LINUX_CLUT224 is not set
#
# Sound
@@ -1586,7 +1585,7 @@ CONFIG_CONFIGFS_FS=m
# CONFIG_EFS_FS is not set
CONFIG_YAFFS_FS=y
CONFIG_YAFFS_YAFFS1=y
-# CONFIG_YAFFS_DOES_ECC is not set
+CONFIG_YAFFS_9BYTE_TAGS=y
CONFIG_YAFFS_YAFFS2=y
CONFIG_YAFFS_AUTO_YAFFS2=y
# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
diff --git a/packages/linux/linux-openmoko/defconfig-2.6.22.5-fic-gta02 b/packages/linux/linux-openmoko/defconfig-2.6.22.5-fic-gta02
index 1d12b6ec36..7aa23df77c 100644
--- a/packages/linux/linux-openmoko/defconfig-2.6.22.5-fic-gta02
+++ b/packages/linux/linux-openmoko/defconfig-2.6.22.5-fic-gta02
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22.1
-# Thu Jul 26 22:01:38 2007
+# Linux kernel version: 2.6.22.5
+# Wed Oct 3 13:55:25 2007
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -200,11 +200,12 @@ CONFIG_ARCH_S3C2440=y
CONFIG_SMDK2440_CPU2440=y
CONFIG_MACH_HXD8=y
CONFIG_MACH_NEO1973_GTA02=y
+CONFIG_CPU_S3C2442=y
#
# S3C2442 Machines
#
-# CONFIG_SMDK2440_CPU2442 is not set
+CONFIG_SMDK2440_CPU2442=y
#
# S3C2443 Machines
@@ -282,6 +283,7 @@ CONFIG_KEXEC=y
# At least one emulation must be selected
#
CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
# CONFIG_FPE_FASTFPE is not set
#
@@ -1196,9 +1198,6 @@ CONFIG_FONT_6x11=y
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
# CONFIG_LOGO is not set
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_LINUX_CLUT224 is not set
#
# Sound
@@ -1586,7 +1585,7 @@ CONFIG_CONFIGFS_FS=m
# CONFIG_EFS_FS is not set
CONFIG_YAFFS_FS=y
CONFIG_YAFFS_YAFFS1=y
-# CONFIG_YAFFS_DOES_ECC is not set
+CONFIG_YAFFS_9BYTE_TAGS=y
CONFIG_YAFFS_YAFFS2=y
CONFIG_YAFFS_AUTO_YAFFS2=y
# CONFIG_YAFFS_DISABLE_LAZY_LOAD is not set
diff --git a/packages/linux/linux-openmoko_2.6.22.5.bb b/packages/linux/linux-openmoko_2.6.22.5.bb
index e4608a7565..290f475130 100644
--- a/packages/linux/linux-openmoko_2.6.22.5.bb
+++ b/packages/linux/linux-openmoko_2.6.22.5.bb
@@ -8,4 +8,4 @@ SRC_URI += "file://fix-EVIOCGRAB-semantics-2.6.22.5.patch;patch=1"
VANILLA_VERSION = "2.6.22.5"
MOKOR = "moko11+svnr${SRCREV}"
PV = "${VANILLA_VERSION}-${MOKOR}"
-PR = "r2"
+PR = "r3"
diff --git a/packages/linux/linux-rp_2.6.22.bb b/packages/linux/linux-rp_2.6.22.bb
index b36189d9fb..50ee894ee9 100644
--- a/packages/linux/linux-rp_2.6.22.bb
+++ b/packages/linux/linux-rp_2.6.22.bb
@@ -1,6 +1,6 @@
require linux-rp.inc
-PR = "r9"
+PR = "r10"
# Handy URLs
# git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git;protocol=git;tag=ef7d1b244fa6c94fb76d5f787b8629df64ea4046
@@ -37,6 +37,7 @@ SRC_URI = "http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.22.tar.bz2 \
${RPSRC}/poodle_pm-r4.patch;patch=1 \
${RPSRC}/pxa27x_overlay-r5.patch;patch=1 \
${RPSRC}/w100_extaccel-r1.patch;patch=1 \
+ ${RPSRC}/w100_extmem-r1.patch;patch=1 \
file://hostap-monitor-mode.patch;patch=1 \
file://serial-add-support-for-non-standard-xtals-to-16c950-driver.patch;patch=1 \
${RPSRC}/logo_oh-r0.patch.bz2;patch=1;status=unmergable \
diff --git a/packages/linux/linux.inc b/packages/linux/linux.inc
index 7579481005..6568049113 100644
--- a/packages/linux/linux.inc
+++ b/packages/linux/linux.inc
@@ -18,6 +18,8 @@ DEPENDS_append_fic-gta01 = " u-boot-mkimage-openmoko-native "
DEPENDS_append_fic-gta02 = " u-boot-mkimage-openmoko-native "
+RPSRC = "http://www.rpsys.net/openzaurus/patches/archive"
+
# Specify the commandline for your device
#boot from mmc
@@ -40,7 +42,7 @@ do_configure_prepend() {
#
# oabi / eabi support
#
- if [ "${TARGET_OS}" == "linux-gnueabi" -o "${TARGET_OS}" == "linux-uclibcgnueabi" ]; then
+ if [ "${TARGET_OS}" = "linux-gnueabi" -o "${TARGET_OS}" = "linux-uclibcgnueabi" ]; then
echo "CONFIG_AEABI=y" >> ${S}/.config
echo "CONFIG_OABI_COMPAT=y" >> ${S}/.config
else
@@ -104,11 +106,16 @@ do_install_prepend() {
if test -e arch/${ARCH}/boot/images/uImage ; then
ln -f arch/${ARCH}/boot/images/uImage arch/${ARCH}/boot/uImage
fi
+
+ if test -e arch/${ARCH}/kernel/vmlinux.lds ; then
+ ln -f arch/${ARCH}/kernel/vmlinux.lds arch/${ARCH}/boot/vmlinux
+ fi
}
UBOOT_ENTRYPOINT ?= "20008000"
-KERNEL_IMAGE_BASE_NAME = ${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}
+KERNEL_IMAGE_BASE_NAME = "${KERNEL_IMAGETYPE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
+KERNEL_IMAGE_SYMLINK_NAME = "${KERNEL_IMAGETYPE}-${MACHINE}"
do_deploy() {
install -d ${DEPLOY_DIR_IMAGE}
@@ -128,6 +135,10 @@ do_deploy() {
rm -f linux.bin.gz
fi
fi
+
+ cd ${DEPLOY_DIR_IMAGE}
+ rm -f ${KERNEL_IMAGE_SYMLINK_NAME}.bin
+ ln -sf ${KERNEL_IMAGE_BASE_NAME}.bin ${KERNEL_IMAGE_SYMLINK_NAME}.bin
}
do_deploy[dirs] = "${S}"
diff --git a/packages/linux/linux_2.6.21.bb b/packages/linux/linux_2.6.21.bb
index 0848bcd71a..f2ab2116be 100644
--- a/packages/linux/linux_2.6.21.bb
+++ b/packages/linux/linux_2.6.21.bb
@@ -4,10 +4,12 @@ DEFAULT_PREFERENCE_at91sam9263ek = "-1"
DEFAULT_PREFERENCE_gumstix-connex = "1"
DEFAULT_PREFERENCE_gumstix-verdex = "1"
-PR = "r9"
+PR = "r11"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${PV}.tar.bz2 \
- file://defconfig \
+ file://tsc2003.c \
+ file://tsc2003-config.diff;patch=1 \
+ file://defconfig \
"
SRC_URI_append_simpad = "\
@@ -69,8 +71,15 @@ GUMSTIX_PATCHES = "\
file://uImage-in-own-partition.patch;patch=1 \
file://pxa-regs-fixup.patch;patch=1 \
file://gumstix-fb-logo.patch;patch=1 \
- file://pxafb-18bpp-mode.patch;patch=1 \
+ file://gumstix-pxa270-mmc.patch;patch=1 \
+ ${RPSRC}/pxa27x_overlay-r5.patch;patch=1 \
+ file://smc911x-fixup.patch;patch=1 \
"
SRC_URI_append_gumstix-verdex = "${GUMSTIX_PATCHES}"
SRC_URI_append_gumstix-connex = "${GUMSTIX_PATCHES}"
+
+
+do_configure_prepend() {
+ cp ${WORKDIR}/tsc2003.c ${S}/drivers/i2c/chips/
+}
diff --git a/packages/linux/linux_2.6.22.bb b/packages/linux/linux_2.6.22.bb
index 64b57d3076..03d945adbf 100644
--- a/packages/linux/linux_2.6.22.bb
+++ b/packages/linux/linux_2.6.22.bb
@@ -2,12 +2,64 @@ require linux.inc
# Mark archs/machines that this kernel supports
DEFAULT_PREFERENCE = "-1"
-DEFAULT_PREFERENCE_avr32 = "1"
+DEFAULT_PREFERENCE_cm-x270 = "-1"
+DEFAULT_PREFERENCE_bd-neon = "0"
-PR = "r3"
+PR = "r4"
SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.22.tar.bz2 \
file://defconfig \
"
-SRC_URI_append_avr32 = "http://avr32linux.org/twiki/pub/Main/LinuxPatches/linux-2.6.22.atmel.3.patch.bz2;patch=1"
+SRC_URI_append_cm-x270 = "\
+ file://0001-cm-x270-base2.patch;patch=1 \
+ file://0002-cm-x270-match-type.patch;patch=1 \
+ file://0003-cm-x270-ide.patch;patch=1 \
+ file://0004-cm-x270-it8152.patch;patch=1 \
+ file://0005-cm-x270-pcmcia.patch;patch=1 \
+ file://0006-ramdisk_load.patch;patch=1 \
+ file://0007-mmcsd_large_cards-r0.patch;patch=1 \
+ file://0008-cm-x270-nand-simplify-name.patch;patch=1"
+
+CMDLINE_cm-x270 = "console=${CMX270_CONSOLE_SERIAL_PORT},38400 monitor=8 bpp=16 mem=64M mtdparts=physmap-flash.0:256k(boot)ro,0x180000(kernel),-(root);cm-x270-nand:64m(app),-(data) rdinit=/sbin/init root=mtd3 rootfstype=jffs2"
+
+FILES_kernel-image_cm-x270 = ""
+
+SRC_URI_append_bd-neon = " http://www.boundarydevices.com/boundary-2.6.22-2007-07-22.patch.bz2;patch=1"
+
+python do_compulab_image() {
+ import os
+ import os.path
+ import struct
+
+ machine = bb.data.getVar('MACHINE', d, 1)
+ if machine == "cm-x270":
+ deploy_dir = bb.data.getVar('DEPLOY_DIR_IMAGE', d, 1)
+ kernel_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.bin')
+ img_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270')
+
+ fo = open(img_file, 'wb')
+
+ image_data = open(kernel_file, 'rb').read()
+
+ # first write size into first 4 bytes
+ size_s = struct.pack('i', len(image_data))
+
+ # truncate size if we are running on a 64-bit host
+ size_s = size_s[:4]
+
+ fo.write(size_s)
+ fo.write(image_data)
+ fo.close()
+
+ os.chdir(deploy_dir)
+ link_file = bb.data.expand('${KERNEL_IMAGE_SYMLINK_NAME}', d) + '.cmx270'
+ img_file = bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270'
+ try:
+ os.unlink(link_file)
+ except:
+ pass
+ os.symlink(img_file, link_file)
+}
+
+addtask compulab_image after do_deploy before do_package
diff --git a/packages/linux/linux_2.6.23.bb b/packages/linux/linux_2.6.23.bb
new file mode 100644
index 0000000000..b73e9a71fa
--- /dev/null
+++ b/packages/linux/linux_2.6.23.bb
@@ -0,0 +1,63 @@
+require linux.inc
+
+# Mark archs/machines that this kernel supports
+DEFAULT_PREFERENCE = "-1"
+DEFAULT_PREFERENCE_cm-x270 = "1"
+
+PR = "r0"
+
+SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.23.tar.bz2 \
+ file://binutils-buildid-arm.patch;patch=1 \
+ file://defconfig \
+ "
+
+SRC_URI_append_cm-x270 = "\
+ file://0001-cm-x270-base2.patch;patch=1 \
+ file://0002-cm-x270-match-type.patch;patch=1 \
+ file://0003-cm-x270-ide.patch;patch=1 \
+ file://0004-cm-x270-it8152.patch;patch=1 \
+ file://0005-cm-x270-pcmcia.patch;patch=1 \
+ file://0006-ramdisk_load.patch;patch=1 \
+ file://0007-mmcsd_large_cards-r0.patch;patch=1 \
+ file://0008-cm-x270-nand-simplify-name.patch;patch=1"
+
+CMDLINE_cm-x270 = "console=${CMX270_CONSOLE_SERIAL_PORT},38400 monitor=8 bpp=16 mem=64M mtdparts=physmap-flash.0:256k(boot)ro,0x180000(kernel),-(root);cm-x270-nand:64m(app),-(data) rdinit=/sbin/init root=mtd3 rootfstype=jffs2"
+
+FILES_kernel-image_cm-x270 = ""
+
+python do_compulab_image() {
+ import os
+ import os.path
+ import struct
+
+ machine = bb.data.getVar('MACHINE', d, 1)
+ if machine == "cm-x270":
+ deploy_dir = bb.data.getVar('DEPLOY_DIR_IMAGE', d, 1)
+ kernel_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.bin')
+ img_file = os.path.join(deploy_dir, bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270')
+
+ fo = open(img_file, 'wb')
+
+ image_data = open(kernel_file, 'rb').read()
+
+ # first write size into first 4 bytes
+ size_s = struct.pack('i', len(image_data))
+
+ # truncate size if we are running on a 64-bit host
+ size_s = size_s[:4]
+
+ fo.write(size_s)
+ fo.write(image_data)
+ fo.close()
+
+ os.chdir(deploy_dir)
+ link_file = bb.data.expand('${KERNEL_IMAGE_SYMLINK_NAME}', d) + '.cmx270'
+ img_file = bb.data.expand('${KERNEL_IMAGE_BASE_NAME}', d) + '.cmx270'
+ try:
+ os.unlink(link_file)
+ except:
+ pass
+ os.symlink(img_file, link_file)
+}
+
+addtask compulab_image after do_deploy before do_package
diff --git a/packages/llvm/files/.mtn2git_empty b/packages/llvm/files/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/llvm/files/.mtn2git_empty
diff --git a/packages/llvm/llvm-gcc4-cross_svn.bb b/packages/llvm/llvm-gcc4-cross_svn.bb
new file mode 100644
index 0000000000..9b0e07ab94
--- /dev/null
+++ b/packages/llvm/llvm-gcc4-cross_svn.bb
@@ -0,0 +1,32 @@
+DESCRIPTION = "The Low Level Virtual Machine - gcc4 frontend"
+HOMEPAGE = "http://llvm.org"
+LICENSE = "various"
+
+DEPENDS = "llvm-native"
+
+PV = "2.1+svnr${SRCREV}"
+
+inherit autotools cross
+
+SRC_URI = "svn://anonsvn.opensource.apple.com/svn/llvm/;module=trunk \
+ "
+
+S = "${WORKDIR}/trunk"
+
+EXTRA_OECONF = "--disable-shared \
+ --enable-llvm=/data/build/koen/OE/build/tmp/angstrom/work/i686-linux/llvm-native-2.0-r0/llvm-2.0 \
+ "
+
+do_configure() {
+ gnu-configize
+ libtoolize --force
+ oe_runconf
+}
+
+PARALLEL_MAKE = ""
+
+#oe_runmake gets distracted by GNUMakefiles...
+# we also need to get an install.sh and config-ml.in in gcc/ as well somehow
+do_compile_prepend() {
+ rm -f ${S}/GNUmakefile
+}
diff --git a/packages/llvm/llvm-gcc4_svn.bb b/packages/llvm/llvm-gcc4_svn.bb
new file mode 100644
index 0000000000..599e2ca183
--- /dev/null
+++ b/packages/llvm/llvm-gcc4_svn.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "The Low Level Virtual Machine - gcc4 frontend"
+HOMEPAGE = "http://llvm.org"
+LICENSE = "various"
+
+DEPENDS = "llvm-native"
+
+PV = "2.0+svnr${SRCREV}"
+
+inherit autotools cross
+
+SRC_URI = "svn://anonsvn.opensource.apple.com/svn/llvm/;module=trunk \
+ "
+
+S = "${WORKDIR}/trunk"
+
+EXTRA_OECONF = "--disable-shared \
+ --enable-llvm \
+ "
+
diff --git a/packages/llvm/llvm-native_2.0.bb b/packages/llvm/llvm-native_2.1.bb
index 9507c989cd..6366b9bbbe 100644
--- a/packages/llvm/llvm-native_2.0.bb
+++ b/packages/llvm/llvm-native_2.1.bb
@@ -1,6 +1,6 @@
require llvm.inc
-SRC_URI = "http://llvm.org/releases/2.0/llvm-${PV}.tar.gz"
+SRC_URI = "http://llvm.org/releases/2.1/llvm-${PV}.tar.gz"
inherit native
@@ -10,3 +10,7 @@ S = "${WORKDIR}/llvm-${PV}"
do_stage() {
install -m 755 ${S}/Release/bin/* ${STAGING_BINDIR_NATIVE}/
}
+
+do_rm_work() {
+ :
+}
diff --git a/packages/llvm/llvm_2.0.bb b/packages/llvm/llvm_2.0.bb
new file mode 100644
index 0000000000..7e80f245cc
--- /dev/null
+++ b/packages/llvm/llvm_2.0.bb
@@ -0,0 +1,6 @@
+require llvm.inc
+
+SRC_URI = "http://llvm.org/releases/2.0/llvm-${PV}.tar.gz"
+
+S = "${WORKDIR}/llvm-${PV}"
+
diff --git a/packages/lm_sensors/files/prefix-fix.patch b/packages/lm_sensors/files/prefix-fix.patch
new file mode 100644
index 0000000000..66ec55c150
--- /dev/null
+++ b/packages/lm_sensors/files/prefix-fix.patch
@@ -0,0 +1,14 @@
+Index: lm_sensors-2.10.1/Makefile
+===================================================================
+--- lm_sensors-2.10.1.orig/Makefile 2007-10-07 19:22:51.000000000 +0200
++++ lm_sensors-2.10.1/Makefile 2007-10-07 19:23:13.000000000 +0200
+@@ -74,9 +74,6 @@
+ # everything, set DESTDIR to the extra prefix.
+ DESTDIR :=
+
+-# This is the prefix that will be used for almost all directories below.
+-PREFIX := /usr/local
+-
+ # Your C compiler
+ CC := gcc
+
diff --git a/packages/lm_sensors/lmsensors-apps_2.10.1.bb b/packages/lm_sensors/lmsensors-apps_2.10.1.bb
index 84fe358647..ce188beb64 100644
--- a/packages/lm_sensors/lmsensors-apps_2.10.1.bb
+++ b/packages/lm_sensors/lmsensors-apps_2.10.1.bb
@@ -5,22 +5,26 @@ LICENSE = "GPL"
PR = "r2"
SRC_URI = "http://dl.lm-sensors.org/lm-sensors/releases/lm_sensors-${PV}.tar.gz \
- file://iconv.patch;patch=1 \
file://prefix-fix.patch;patch=1 \
file://add-sysfs-ldflags.patch;patch=1"
+SRC_URI_append_uclibc = "file://iconv.patch;patch=1"
+
S = "${WORKDIR}/lm_sensors-${PV}"
do_compile() {
- oe_runmake LINUX=${STAGING_KERNEL_DIR} EXLDFLAGS="${LDFLAGS}" user PROG_EXTRA=sensors PREFIX=${prefix}
+ oe_runmake LINUX=${STAGING_KERNEL_DIR} EXLDFLAGS="${LDFLAGS}" user PROG_EXTRA=sensors
}
do_install() {
oe_runmake user_install DESTDIR=${D}
- # backward compatibility with older OE packages
- mv ${D}${sbindir}/* ${D}${bindir}
+ install -d ${D}/.usr
+ mv ${D}/* ${D}/.usr
+ mv ${D}/.usr ${D}/usr
+ install -d ${D}${sysconfdir}
+ mv ${D}/usr/etc/sensors.conf ${D}${sysconfdir}
# move manuals into proper place
install -d ${D}${mandir}
rm -rf ${D}${mandir}/*
@@ -28,7 +32,7 @@ do_install() {
# remove perl or bash scripts
rm ${D}${bindir}/*.pl ${D}${bindir}/ddcmon
- rm ${D}${bindir}/fancontrol ${D}${bindir}/pwmconfig ${D}${bindir}/sensors-detect
+ rm ${D}${sbindir}/fancontrol* ${D}${sbindir}/pwmconfig ${D}${sbindir}/sensors-detect
rm ${D}${mandir}/man8/fancontrol.8 ${D}${mandir}/man8/pwmconfig.8 ${D}${mandir}/man8/sensors-detect.8
}
diff --git a/packages/logrotate/logrotate_3.7.1.bb b/packages/logrotate/logrotate_3.7.1.bb
index b903e60201..0a1647e81d 100644
--- a/packages/logrotate/logrotate_3.7.1.bb
+++ b/packages/logrotate/logrotate_3.7.1.bb
@@ -37,4 +37,4 @@ pkg_postrm() {
mv ${sysconfdir}/crontab.no-${PF} ${sysconfdir}/crontab
}
-CONFFILES += "${sysconfdir}/logrotate.conf"
+CONFFILES_${PN} += "${sysconfdir}/logrotate.conf"
diff --git a/packages/maemo3/hildon-1_svn.bb b/packages/maemo3/hildon-1_svn.bb
index c5c01792ca..5105472989 100644
--- a/packages/maemo3/hildon-1_svn.bb
+++ b/packages/maemo3/hildon-1_svn.bb
@@ -3,7 +3,7 @@ LICENSE = "LGPL"
DEPENDS = "gconf-dbus esound gtk+"
-PV = "1.0.12+svnr${SRCREV}"
+PV = "1.0.17+svnr${SRCREV}"
SRC_URI = "svn://stage.maemo.org/svn/maemo/projects/haf/trunk;module=hildon-1;proto=https \
file://buttonbox.patch;patch=1 "
diff --git a/packages/maemo3/libhildonfm/.mtn2git_empty b/packages/maemo3/libhildonfm/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/maemo3/libhildonfm/.mtn2git_empty
diff --git a/packages/maemo3/libhildonfm/hildonfm-ifdef-maemogtk.diff b/packages/maemo3/libhildonfm/hildonfm-ifdef-maemogtk.diff
new file mode 100644
index 0000000000..8d91e1dd65
--- /dev/null
+++ b/packages/maemo3/libhildonfm/hildonfm-ifdef-maemogtk.diff
@@ -0,0 +1,132 @@
+--- /tmp/hildon-file-selection.c 2007-10-02 10:08:17.000000000 +0200
++++ 1_1.9.41/hildon-fm/hildon-file-selection.c 2007-10-02 11:26:58.292045000 +0200
+@@ -2036,6 +2036,7 @@
+ g_object_set(cell, "text", buffer, "sensitive", sensitive, NULL);
+ }
+
++#ifdef USE_MAEMO_GTK
+ static void hildon_file_selection_navigation_pane_context(GtkWidget *
+ widget,
+ gpointer data)
+@@ -2052,6 +2053,7 @@
+ ULOG_DEBUG(__FUNCTION__);
+ g_signal_emit(data, signal_content_pane_context_menu, 0);
+ }
++#endif /* USE_MAEMO_GTK */
+
+ static gboolean hildon_file_selection_on_content_pane_key(GtkWidget *
+ widget,
+@@ -2200,6 +2202,7 @@
+ }
+ }
+
++#ifdef USE_MAEMO_GTK
+ static gboolean
+ tap_and_hold_query (gpointer self, guint signal_id)
+ {
+@@ -2225,6 +2228,8 @@
+ return tap_and_hold_query (self, signal_navigation_pane_context_menu);
+ }
+
++#endif /* USE_MAEMO_GTK */
++
+ static void hildon_file_selection_create_thumbnail_view(HildonFileSelection
+ * self)
+ {
+@@ -2277,7 +2282,7 @@
+ g_signal_connect_object(tree, "key-press-event",
+ G_CALLBACK(hildon_file_selection_on_content_pane_key),
+ self, 0);
+-
++#ifdef USE_MAEMO_GTK
+ gtk_widget_tap_and_hold_setup(GTK_WIDGET(tree), NULL, NULL,
+ GTK_TAP_AND_HOLD_NONE | GTK_TAP_AND_HOLD_NO_INTERNALS);
+ g_signal_connect_object (tree, "tap-and-hold-query",
+@@ -2286,6 +2291,7 @@
+ g_signal_connect_object(tree, "tap-and-hold",
+ G_CALLBACK
+ (hildon_file_selection_content_pane_context), self, 0);
++#endif /* USE_MAEMO_GTK */
+
+ g_signal_connect_object(tree, "notify::has-focus",
+ G_CALLBACK(content_pane_focus), self, 0);
+@@ -2397,7 +2403,7 @@
+ (selection, "changed",
+ G_CALLBACK (hildon_file_selection_content_pane_selection_changed),
+ self, 0);
+-
++#ifdef USE_MAEMO_GTK
+ gtk_widget_tap_and_hold_setup(GTK_WIDGET(tree), NULL, NULL,
+ GTK_TAP_AND_HOLD_NONE | GTK_TAP_AND_HOLD_NO_INTERNALS);
+ g_signal_connect_object (tree, "tap-and-hold-query",
+@@ -2406,7 +2412,7 @@
+ g_signal_connect_object(tree, "tap-and-hold",
+ G_CALLBACK
+ (hildon_file_selection_content_pane_context), self, 0);
+-
++#endif /* USE_MAEMO_GTK */
+ g_signal_connect_object(tree, "key-press-event",
+ G_CALLBACK(hildon_file_selection_on_content_pane_key),
+ self, 0);
+@@ -2492,7 +2498,7 @@
+ g_signal_connect_object(selection, "changed",
+ G_CALLBACK(hildon_file_selection_selection_changed),
+ self, 0);
+-
++#ifdef USE_MAEMO_GTK
+ gtk_widget_tap_and_hold_setup(GTK_WIDGET(self->priv->dir_tree), NULL,
+ NULL, GTK_TAP_AND_HOLD_NONE | GTK_TAP_AND_HOLD_NO_INTERNALS);
+ g_signal_connect_object (self->priv->dir_tree, "tap-and-hold-query",
+@@ -2502,7 +2508,7 @@
+ G_CALLBACK
+ (hildon_file_selection_navigation_pane_context),
+ self, 0);
+-
++#endif /* USE_MAEMO_GTK */
+ g_signal_connect_object(self->priv->dir_tree, "key-press-event",
+ G_CALLBACK
+ (hildon_file_selection_on_navigation_pane_key), self, 0);
+--- /tmp/hildon-file-chooser-dialog.c 2007-10-02 10:14:05.000000000 +0200
++++ 1_1.9.41/hildon-fm/hildon-file-chooser-dialog.c 2007-10-02 11:33:43.132045000 +0200
+@@ -191,7 +191,7 @@
+
+ return (first_digit << 4) | second_digit;
+ }
+-
++#ifdef USE_MAEMO_GTK
+ static void chooser_entry_invalid_input_cb (GtkEntry *entry,
+ GtkInvalidInputType inv_type,
+ gpointer user_data)
+@@ -202,7 +202,7 @@
+ HCS("ckdg_ib_maximum_characters_reached"));
+ }
+ }
+-
++#endif /* USE_MAEMO_GTK */
+ static gchar *
+ g_unescape_uri_string (const char *escaped,
+ int len,
+@@ -1837,8 +1837,9 @@
+ G_PARAM_READWRITE);
+ g_object_class_install_property(gobject_class, PROP_SELECTION_MODE, pspec);
+
+-
++#ifdef USE_MAEMO_GTK
+ hildon_gtk_file_chooser_install_properties(gobject_class);
++#endif
+ }
+
+ static void hildon_file_chooser_dialog_sort_changed(GtkWidget * item,
+@@ -1975,10 +1976,10 @@
+ g_signal_connect( priv->entry_name, "changed",
+ G_CALLBACK( hildon_file_chooser_entry_changed ),
+ self );
+-
++#ifdef USE_MAEMO_GTK
+ g_signal_connect(priv->entry_name, "invalid-input",
+ G_CALLBACK(chooser_entry_invalid_input_cb), self);
+-
++#endif /* USE_MAEMO_GTK */
+ priv->hbox_location = gtk_hbox_new(FALSE, HILDON_MARGIN_DEFAULT);
+ priv->hbox_items = gtk_hbox_new(FALSE, HILDON_MARGIN_DEFAULT);
+ priv->image_location = gtk_image_new();
diff --git a/packages/maemo3/libhildonfm_1.9.41.bb b/packages/maemo3/libhildonfm_1.9.41.bb
new file mode 100644
index 0000000000..de1bb3d9e3
--- /dev/null
+++ b/packages/maemo3/libhildonfm_1.9.41.bb
@@ -0,0 +1,29 @@
+LICENSE = "LGPL"
+DESCRIPTION = "Nokia hildon filemanager library"
+
+DEPENDS = "hildon-thumbnail mce-dev libhildonmime osso-gwconnect hildon-libs osso-thumbnail"
+
+PR = "r0"
+
+SRC_URI = "http://repository.maemo.org/pool/sardine/main/source/libh/libhildonfm/libhildonfm_${PV}.tar.gz \
+ file://hildonfm-ifdef-maemogtk.diff;patch=1 \
+ "
+
+inherit autotools pkgconfig lib_package
+
+S = "${WORKDIR}/1_${PV}"
+
+do_configure_prepend() {
+ # remove Werror from OSSO_CFLAGS
+ sed -i s:-Werror::g configure.ac
+ touch gtk-doc.make
+}
+
+
+PARALLEL_MAKE = ""
+
+do_stage() {
+ autotools_stage_all
+}
+
+
diff --git a/packages/maemo3/libhildonhelp_1.9.1.bb b/packages/maemo3/libhildonhelp_1.9.1.bb
index b04efe2660..43d4c15d2e 100644
--- a/packages/maemo3/libhildonhelp_1.9.1.bb
+++ b/packages/maemo3/libhildonhelp_1.9.1.bb
@@ -1,7 +1,7 @@
LICENSE = "LGPL"
DESCRIPTION = "Nokia hildon help library"
-DEPENDS = "libart libpng jpeg libxml2 gtkhtml-3.8 libosso"
+DEPENDS = "libart-lgpl libpng jpeg libxml2 gtkhtml-3.8 libosso"
PR = "r0"
diff --git a/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb b/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb
index efdaaaa06a..5b6ea4edfa 100644
--- a/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb
+++ b/packages/matchbox-keyboard/matchbox-keyboard-inputmethod_svn.bb
@@ -6,13 +6,11 @@ RPROVIDES_${PN} = matchbox-keyboard
#DEFAULT_PREFERENCE = "-1"
SECTION = "x11"
PV = "0.0+svnr${SRCREV}"
-PR = "r6"
+PR = "r7"
SRC_URI = "svn://svn.o-hand.com/repos/matchbox/trunk;module=matchbox-keyboard;proto=http \
file://smallscreen-fontsize.patch;patch=1 \
- file://matchbox-keyboard-applet.patch;patch=1;pnum=0 \
- file://80matchboxkeyboard \
- file://matchbox-keyboard-hide-delay.patch;patch=1"
+ file://80matchboxkeyboard"
SRC_URI_append_fic-gta01 = " file://fic-gta01-font-size.patch;patch=1"
diff --git a/packages/mathomatic/mathomatic_unstable.bb b/packages/mathomatic/mathomatic_unstable.bb
index 9e327680b2..e717866b4e 100644
--- a/packages/mathomatic/mathomatic_unstable.bb
+++ b/packages/mathomatic/mathomatic_unstable.bb
@@ -2,3 +2,6 @@ require mathomatic.inc
SRC_URI = "http://www.panix.com/~gesslein/am.tgz"
S = "${WORKDIR}/mathomatic-12.4.2"
+
+# source snapshot changes every day
+BROKEN = "1"
diff --git a/packages/meta/foonas-packages.bb b/packages/meta/foonas-packages.bb
index edadb63a1c..2bd8437f13 100644
--- a/packages/meta/foonas-packages.bb
+++ b/packages/meta/foonas-packages.bb
@@ -1,6 +1,6 @@
DESCRIPTION = "Packages that are compatible with FooNAS"
LICENSE = "MIT"
-PR = "r1"
+PR = "r2"
CONFLICTS = "db3"
PROVIDES += "${FOONAS_IMAGENAME}-packages"
@@ -8,6 +8,8 @@ EXCLUDE_FROM_WORLD = "1"
INHIBIT_DEFAULT_DEPS = "1"
ALLOW_EMPTY = "1"
+inherit meta
+
FOONAS_PACKAGES = "\
adns \
alsa-lib \
diff --git a/packages/meta/meta-toolchain-openmoko.bb b/packages/meta/meta-toolchain-openmoko.bb
new file mode 100644
index 0000000000..4e29180d28
--- /dev/null
+++ b/packages/meta/meta-toolchain-openmoko.bb
@@ -0,0 +1,5 @@
+TOOLCHAIN_TARGET_TASK = "task-toolchain-openmoko-sdk"
+RDEPENDS = "${TOOLCHAIN_TARGET_TASK}"
+
+require meta-toolchain.bb
+
diff --git a/packages/meta/meta-toolchain.bb b/packages/meta/meta-toolchain.bb
index a734005819..58a5fb622b 100644
--- a/packages/meta/meta-toolchain.bb
+++ b/packages/meta/meta-toolchain.bb
@@ -100,6 +100,9 @@ do_populate_sdk() {
done
done
+ # add missing link to libgcc_s.so.1
+ # libgcc-dev should be responsible for that, but it's not getting built
+ ln -sf libgcc_s.so.1 ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/libgcc_s.so
# remove unwanted executables
rm -rf ${SDK_OUTPUT}/${prefix}/sbin ${SDK_OUTPUT}/${prefix}/etc
@@ -108,17 +111,20 @@ do_populate_sdk() {
rm -f ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/*.la
# fix pkgconfig data files
- cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/pkgconfig
- for f in *.pc ; do
- sed -i 's%=/usr%=${prefix}/${TARGET_SYS}%g' "$f"
- done
- for f in *.pc ; do
- sed -i 's%${STAGING_DIR}%/usr/local/${TARGET_ARCH}/oe%g' "$f"
- done
-
- mkdir -p ${SDK_DEPLOY}
+ if [ -e ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/pkgconfig ]; then
+ cd ${SDK_OUTPUT}/${prefix}/${TARGET_SYS}/lib/pkgconfig
+ for f in *.pc ; do
+ sed -i 's%=/usr%=${prefix}/${TARGET_SYS}%g' "$f"
+ done
+ for f in *.pc ; do
+ sed -i 's%${STAGING_DIR}%/usr/local/${TARGET_ARCH}/oe%g' "$f"
+ done
+ fi
+
+ # package it up
+ mkdir -p ${SDK_DEPLOY}
cd ${SDK_OUTPUT}
- fakeroot tar cfj ${SDK_DEPLOY}/${DISTRO}-${DISTRO_VERSION}-${TARGET_ARCH}-toolchain.tar.bz2 .
+ fakeroot tar cfj ${SDK_DEPLOY}/${DISTRO}-${DISTRO_VERSION}-${TARGET_ARCH}-${TARGET_OS}-toolchain.tar.bz2 .
}
do_populate_sdk[nostamp] = "1"
diff --git a/packages/meta/openprotium-packages.bb b/packages/meta/openprotium-packages.bb
index 9a1d928a77..afff86639a 100644
--- a/packages/meta/openprotium-packages.bb
+++ b/packages/meta/openprotium-packages.bb
@@ -5,7 +5,7 @@
DESCRIPTION = "Packages that are compatible with the Openprotium on the iomega Storcenter"
HOMEPAGE = "http://www.openprotium.org"
LICENSE = "MIT"
-PR = "r2"
+PR = "r3"
CONFLICTS = "db3"
PROVIDES += "${OPENPROTIUM_IMAGENAME}-packages"
@@ -13,6 +13,8 @@ EXCLUDE_FROM_WORLD = "1"
INHIBIT_DEFAULT_DEPS = "1"
ALLOW_EMPTY = "1"
+inherit meta
+
# The list of packages to build for the slugos DISTRO.
# KEEP IN ALPHABETICAL ORDER
# Do *not* simply comment out a line. That will break. Instead
diff --git a/packages/meta/slugos-native-packages.bb b/packages/meta/slugos-native-packages.bb
index 4505c9979c..1e60e8c8af 100644
--- a/packages/meta/slugos-native-packages.bb
+++ b/packages/meta/slugos-native-packages.bb
@@ -1,13 +1,15 @@
# Only list packages which will not build 'cross' in here.
DESCRIPTION = "Packages that are to be compiled natively for the SlugOS firmware"
LICENSE = "MIT"
-PR = "r1"
+PR = "r2"
INHIBIT_DEFAULT_DEPS = "1"
EXCLUDE_FROM_WORLD = "1"
ALLOW_EMPTY = "1"
PACKAGES = "${PN}"
+inherit meta
+
SLUGOS_NATIVE_PACKAGES = "\
apache \
php-native \
diff --git a/packages/meta/slugos-native.bb b/packages/meta/slugos-native.bb
index 281310a2dd..9dae7e8df3 100644
--- a/packages/meta/slugos-native.bb
+++ b/packages/meta/slugos-native.bb
@@ -5,13 +5,18 @@
#
DESCRIPTION = "Packages that are required for the SlugOS native build environment"
LICENSE = "MIT"
-PR = "r5"
+PR = "r7"
INHIBIT_DEFAULT_DEPS = "1"
EXCLUDE_FROM_WORLD = "1"
ALLOW_EMPTY = "1"
PACKAGES = "${PN}"
+inherit meta
+
+do_package_write_ipk() {
+}
+
# Run-time only (RDEPENDS) stuff - no package explicitly provides
# these targets.
SLUGOS_NATIVE_RT_prepend_linux = "\
diff --git a/packages/meta/slugos-packages.bb b/packages/meta/slugos-packages.bb
index 6b34fc187a..7960be85eb 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 = "r36"
+PR = "r40"
CONFLICTS = "db3"
COMPATIBLE_MACHINE = "nslu2"
@@ -49,6 +49,9 @@ SLUGOS_PACKAGES = "\
coreutils \
cron \
ctorrent \
+ ctrlproxy \
+ cups \
+ curl \
cvs \
cyrus-imapd \
cyrus-sasl \
@@ -79,6 +82,7 @@ SLUGOS_PACKAGES = "\
gdbm \
glib-2.0 \
gnu-config \
+ gphoto2 \
grep \
groff \
gspcav1 \
@@ -114,6 +118,7 @@ SLUGOS_PACKAGES = "\
libxml2 \
linphone \
litestream \
+ logrotate \
lrzsz \
lsof \
lvm2 \
@@ -144,7 +149,6 @@ SLUGOS_PACKAGES = "\
net-tools \
netcat \
netpbm \
- nfs-utils \
nmap \
ntfs-3g \
ntp \
@@ -173,6 +177,7 @@ SLUGOS_PACKAGES = "\
rng-tools \
rsync \
samba \
+ sane-backends \
screen \
sed \
setpwc \
@@ -186,7 +191,6 @@ SLUGOS_PACKAGES = "\
sudo \
sysfsutils \
tar \
- task-mokogateway-everything \
thttpd \
tiff \
timezones \
@@ -207,7 +211,9 @@ SLUGOS_PACKAGES = "\
wireless-tools \
wireshark \
wpa-supplicant \
- wview-sim wview-vpro wview-wxt510 \
+ wview-sim wview-sim-mysql \
+ wview-vpro wview-vpro-mysql \
+ wview-wxt510 wview-wxt510-mysql \
xinetd \
yeaphone \
yp-tools ypbind ypserv \
@@ -219,23 +225,19 @@ SLUGOS_PACKAGES = "\
# Packages currently broken on all platforms
SLUGOS_BROKEN_PACKAGES = "\
bwmon \
- ctrlproxy \
dsniff \
fetchmail \
- libgphoto2 gphoto2 sane-backends \\
lirc-modules lirc \
- logrotate \
madfu \
+ portmap nfs-utils \
openldap \
pvrusb2-mci \
pwc \
qc-usb-messenger \
syslog-ng \
+ openocd task-mokogateway-everything \
task-native-sdk \
- unionfs-modules \
- unionfs-utils \
- wview-sim-mysql wview-vpro-mysql \
- wview-wxt510-mysql \
+ unionfs-modules unionfs-utils \
zd1211 \
"
@@ -250,3 +252,8 @@ DEPENDS = "\
${SLUGOS_EXTRA_PACKAGES} \
package-index \
"
+
+inherit meta
+
+do_package_write_ipk() {
+}
diff --git a/packages/meta/unslung-binary-kernel-packages.bb b/packages/meta/unslung-binary-kernel-packages.bb
index 30fb513627..eb95b847fd 100644
--- a/packages/meta/unslung-binary-kernel-packages.bb
+++ b/packages/meta/unslung-binary-kernel-packages.bb
@@ -1,11 +1,13 @@
DESCRIPTION = "Packages that are compatible with the Unslung binary kernel firmware"
LICENSE = "MIT"
-PR = "r1"
+PR = "r2"
COMPATIBLE_MACHINE = "nslu2"
ALLOW_EMPTY = "1"
PACKAGES = "${PN}"
+inherit meta
+
UNSLUNG_PACKAGES = "\
"
diff --git a/packages/meta/unslung-packages.bb b/packages/meta/unslung-packages.bb
index 707787224e..ca194979e7 100644
--- a/packages/meta/unslung-packages.bb
+++ b/packages/meta/unslung-packages.bb
@@ -1,11 +1,13 @@
DESCRIPTION = "Packages that are compatible with the Unslung firmware"
LICENSE = "MIT"
-PR = "r4"
+PR = "r5"
COMPATIBLE_MACHINE = "nslu2"
ALLOW_EMPTY = "1"
PACKAGES = "${PN}"
+inherit meta
+
UNSLUNG_PACKAGES = "\
"
diff --git a/packages/mono/README b/packages/mono/README
index 39479308b2..eb2fed051f 100644
--- a/packages/mono/README
+++ b/packages/mono/README
@@ -1,10 +1,33 @@
-Mono in OE is still very much a work in progress.
-1.2.4
- - is reported to work on MIPS.
- - has floating point problems on ARM
+Notes on Mono support in OE.
-1.2.5
- - tested on ARM EABI. Floating point issues have been worked around.
+===============================
+Cross Compiling Mono
-There is still a lot of packaging work that needs done to package the mono dll's for installation.
+Cross compiling mono requires a two stage build because the mono mcs directory
+cannot be built while cross compiling (http://www.mono-project.com/Mono:ARM).
+The recommended way to cross compile mono is to
+ 1. do a complete build on the host system, and install.
+ 2. cross compile mono which will only build the native target code and
+ overlay the target binaries on the host install.
+
+The MCS build (step 1) is implemented by the mono-mcs-intermediate* recipe.
+This recipe is very similiar to the native build, except it uses standard
+install prefixes and the install directory is tar'd up, and placed in staging
+for use by the cross build.
+
+During the mono cross build, the first step during the install is to untar
+the install results of the mcs-intermediate build. The cross build install
+then proceeds to overlay the native binaries in the install directory.
+
+================================
+mono.bbclass
+
+Has a function mono_do_clilibs and inserts that function into PACKAGEFUNCS.
+This function calls mono_find_provides_and_requires which finds out (through
+calls to monodis --assembly and monodis --assemblyref) which assemblies are
+provided and required by a particular package. mono_do_clilibs then
+puts the information about provided assemblies into
+${STAGING_DIR}/clilibs/${packagename}.list and information about the
+required packages into ${PKGDEST}/{packagename}.clilibdeps where it
+will later be picked up by read_shlibdeps.
diff --git a/packages/mono/files/configure-svnr87352.patch b/packages/mono/files/configure-svnr87352.patch
new file mode 100644
index 0000000000..021554f35e
--- /dev/null
+++ b/packages/mono/files/configure-svnr87352.patch
@@ -0,0 +1,21 @@
+--- mono/configure.in.orig 2007-10-11 21:05:59.000000000 +0200
++++ mono/configure.in 2007-10-11 23:44:23.000000000 +0200
+@@ -1148,6 +1148,8 @@
+ ], [
+ AC_MSG_RESULT(no)
+ with_tls=pthread
++ ], [
++ AC_MSG_RESULT(yes)
+ ])
+ fi
+
+@@ -1250,6 +1252,9 @@
+ ], [
+ with_sigaltstack=no
+ AC_MSG_RESULT(no)
++ ], [
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_WORKING_SIGALTSTACK)
+ ])
+ fi
+
diff --git a/packages/mono/files/genmdesc-cpp.patch b/packages/mono/files/genmdesc-cpp.patch
new file mode 100644
index 0000000000..56eca8effd
--- /dev/null
+++ b/packages/mono/files/genmdesc-cpp.patch
@@ -0,0 +1,22 @@
+--- mono-1.2.5.1/mono/mini/genmdesc.pl.orig 2007-10-03 21:02:07.000000000 +0200
++++ mono-1.2.5.1/mono/mini/genmdesc.pl 2007-10-03 21:06:16.000000000 +0200
+@@ -36,7 +36,9 @@
+ $i++;
+ }
+ close (OPS);
+- my $cpp = "cpp -undef ";
++ my $cpp = $ENV{"CPP"};
++ $cpp = "cpp" unless defined $cpp;
++ $cpp .= " -undef ";
+ foreach (@defines) {
+ $cpp .= " -U$_";
+ $arch_found = 1 if $arch eq $_;
+@@ -44,7 +46,7 @@
+ die "$arch arch is not supported.\n" unless $arch_found;
+
+ $cpp .= " -D$arch $srcdir/mini-ops.h|";
+- #print "Running: $cpp\n";
++ print "Running: $cpp\n";
+ open (OPS, $cpp) || die "Cannot execute cpp: $!";
+ while (<OPS>) {
+ next unless /MINI_OP\s*\(\s*(\S+?)\s*,\s*"(.*?)"/;
diff --git a/packages/mono/mono-mcs-intermediate.inc b/packages/mono/mono-mcs-intermediate.inc
new file mode 100644
index 0000000000..db74b96ee3
--- /dev/null
+++ b/packages/mono/mono-mcs-intermediate.inc
@@ -0,0 +1,60 @@
+# This is a straw-man recipe for step 1 in the two-step build of
+# mono. Because it's impossible to build the mcs directory
+# in cross-compile mode, this recipe will do a native build,
+# then tar the resulting install tree for usage by the mono
+# package in step 2.
+# See http://www.mono-project.com/Mono:ARM
+
+PR = "r0"
+DEPENDS = "mono-native glib-2.0-native perl-native"
+
+PARALLEL_MAKE = ""
+
+SRC_URI += "file://mono-fix-libdir-path.patch;patch=1"
+
+# Inherit native to set up compiler and paths ...
+inherit native
+# ... but override the target prefix
+prefix = "/usr"
+exec_prefix = "/usr"
+sysconfdir = "/etc"
+# TODO: Where does the mono package get
+# these paths from? Use the same source.
+
+do_fix_libtool_name() {
+ # inherit native will make that all native tools that are being
+ # built are prefixed with something like "i686-linux-",
+ # including libtool. Fix up some hardcoded libtool names:
+ for i in "${S}"/runtime/*-wrapper.in; do
+ sed -e "s/libtool/${BUILD_SYS}-libtool/" -i "${i}"
+ done
+}
+addtask fix_libtool_name after do_patch before do_configure
+
+do_stage() {
+ true
+}
+
+do_install() {
+ oe_runmake 'DESTDIR=${D}' install
+}
+
+do_package() {
+ true
+}
+
+do_populate_staging() {
+ cd ${D}
+ rm -f ${WORKDIR}/mono-mcs-${PV}.tar.gz
+ tar -cvzf ${WORKDIR}/mono-mcs-${PV}.tar.gz .
+ install -d ${STAGING_DIR}/share/mono-mcs
+ cp ${WORKDIR}/mono-mcs-${PV}.tar.gz ${STAGING_DIR}/share/mono-mcs/
+}
+
+do_package_write_ipk() {
+ true
+}
+
+do_package_write() {
+ true
+}
diff --git a/packages/mono/mono-mcs-intermediate_1.2.5.1.bb b/packages/mono/mono-mcs-intermediate_1.2.5.1.bb
new file mode 100644
index 0000000000..f2dbe048d7
--- /dev/null
+++ b/packages/mono/mono-mcs-intermediate_1.2.5.1.bb
@@ -0,0 +1,9 @@
+# This is a straw-man recipe for step 1 in the two-step build of
+# mono. Because it's impossible to build the mcs directory
+# in cross-compile mode, this recipe will do a native build,
+# then tar the resulting install tree for usage by the mono
+# package in step 2.
+# See http://www.mono-project.com/Mono:ARM
+
+require mono_1.2.5.inc
+require mono-mcs-intermediate.inc
diff --git a/packages/mono/mono-mcs-intermediate_svn.bb b/packages/mono/mono-mcs-intermediate_svn.bb
new file mode 100644
index 0000000000..f5dbedd612
--- /dev/null
+++ b/packages/mono/mono-mcs-intermediate_svn.bb
@@ -0,0 +1,12 @@
+# This is a straw-man recipe for step 1 in the two-step build of
+# mono. Because it's impossible to build the mcs directory
+# in cross-compile mode, this recipe will do a native build,
+# then tar the resulting install tree for usage by the mono
+# package in step 2.
+# See http://www.mono-project.com/Mono:ARM
+
+require mono_svn.inc
+require mono-mcs-intermediate.inc
+
+DEFAULT_PREFERENCE = "-1"
+EXTRA_OECONF_append = " --without-tls "
diff --git a/packages/mono/mono-native_1.2.2.1.bb b/packages/mono/mono-native_1.2.2.1.bb
deleted file mode 100644
index 67651ae565..0000000000
--- a/packages/mono/mono-native_1.2.2.1.bb
+++ /dev/null
@@ -1,5 +0,0 @@
-require mono.inc
-
-DEPENDS = "glib-2.0-native"
-
-inherit native
diff --git a/packages/mono/mono-native_1.2.4.bb b/packages/mono/mono-native_1.2.4.bb
deleted file mode 100644
index 9043ccc801..0000000000
--- a/packages/mono/mono-native_1.2.4.bb
+++ /dev/null
@@ -1,9 +0,0 @@
-require mono_1.2.4.inc
-PR = "r2"
-DEPENDS = "glib-2.0-native"
-
-inherit native
-
-do_stage_prepend() {
- install -m 755 ${S}/mono/monoburg/monoburg ${STAGING_BINDIR}
-}
diff --git a/packages/mono/mono-native_1.2.5.1.bb b/packages/mono/mono-native_1.2.5.1.bb
index 09223ddcab..7ac2246b3a 100644
--- a/packages/mono/mono-native_1.2.5.1.bb
+++ b/packages/mono/mono-native_1.2.5.1.bb
@@ -1,9 +1,11 @@
require mono_1.2.5.inc
PR = "r1"
-DEPENDS = "glib-2.0-native"
+DEPENDS = "glib-2.0-native perl-native"
SRC_URI += "file://mono-fix-libdir-path.patch;patch=1"
+PARALLEL_MAKE = ""
+
inherit native
#do_stage_prepend() {
diff --git a/packages/mono/mono.inc b/packages/mono/mono.inc
deleted file mode 100644
index 444427ea4a..0000000000
--- a/packages/mono/mono.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-DESCRIPTION = "Mono Programming Language"
-SECTION = "devel/mono"
-LICENSE = "GPL LGPL X11"
-
-SRC_URI = "http://go-mono.com/sources/mono/mono-${PV}.tar.gz \
- file://cpu-arm.h"
-
-S = "${WORKDIR}/mono-${PV}"
-
-inherit autotools
-
-EXTRA_OECONF = "--disable-mcs-build"
-EXTRA_OECONF_arm = "--without-tls"
-
-do_compile_prepend() {
- cp ${WORKDIR}/cpu-arm.h ${S}/mono/mini/
-}
diff --git a/packages/mono/mono_1.2.2.1.bb b/packages/mono/mono_1.2.2.1.bb
deleted file mode 100644
index 7d7134e2b2..0000000000
--- a/packages/mono/mono_1.2.2.1.bb
+++ /dev/null
@@ -1,17 +0,0 @@
-require mono.inc
-DEPENDS = "mono-native glib-2.0"
-
-PR = "r1"
-
-#We only have a cpu-${arch}.h from arm, so let's mask out non-working architectures
-COMPATIBLE_HOST = "arm.*-linux"
-
-do_install_append() {
- install -d ${D}${libdir}/mono/1.0/
- cp ${S}/mcs/class/lib/monolite/* ${D}${libdir}/mono/1.0/
-}
-
-PACKAGES =+ "mono-dll"
-FILES_mono-dll = "${libdir}/mono/1.0/"
-
-
diff --git a/packages/mono/mono_1.2.4.bb b/packages/mono/mono_1.2.4.bb
deleted file mode 100644
index 13cb463129..0000000000
--- a/packages/mono/mono_1.2.4.bb
+++ /dev/null
@@ -1,19 +0,0 @@
-require mono_1.2.4.inc
-DEPENDS = "mono-native glib-2.0"
-
-PR = "r3"
-SRC_URI += "file://mono-monoburg-Makefile.patch;patch=1 \
- file://mono-mips-endian.patch;patch=1 \
- file://mono-configure.patch;patch=1 \
- file://mono-mini-Makefile.patch;patch=1 \
- "
-
-do_install_append() {
- install -d ${D}${libdir}/mono/1.0/
- cp ${S}/mcs/class/lib/monolite/* ${D}${libdir}/mono/1.0/
-}
-
-PACKAGES =+ "mono-dll"
-FILES_mono-dll = "${libdir}/mono/1.0/"
-
-
diff --git a/packages/mono/mono_1.2.4.inc b/packages/mono/mono_1.2.4.inc
deleted file mode 100644
index b9a721150f..0000000000
--- a/packages/mono/mono_1.2.4.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-DESCRIPTION = "Mono Programming Language"
-SECTION = "devel/mono"
-LICENSE = "GPL LGPL X11"
-
-SRC_URI = "http://go-mono.com/sources/mono/mono-${PV}.tar.bz2"
-
-S = "${WORKDIR}/mono-${PV}"
-
-inherit autotools
-EXTRA_OECONF = "--disable-mcs-build"
-EXTRA_OECONF_arm = "--without-tls"
-EXTRA_OECONF_mipsel = "--without-tls"
diff --git a/packages/mono/mono_1.2.5.1-files.inc b/packages/mono/mono_1.2.5.1-files.inc
new file mode 100644
index 0000000000..3dc580750f
--- /dev/null
+++ b/packages/mono/mono_1.2.5.1-files.inc
@@ -0,0 +1,1634 @@
+# This is a generated file, please do not edit directly
+# Use collect-files.py instead. -- Henryk <henryk@openmoko.org>
+FILES_mono-jit-dbg = "/usr/bin/mono*.mdb \
+ /usr/bin/mono*/*.mdb"
+FILES_mono-jit = "/usr/bin/mono"
+FILES_mono-gac-dbg = "/usr/bin/gacutil*.mdb \
+ /usr/bin/gacutil*/*.mdb \
+ /usr/lib/mono/1.0/gacutil.exe*.mdb \
+ /usr/lib/mono/1.0/gacutil.exe*/*.mdb"
+FILES_mono-gac = "/usr/bin/gacutil \
+ /usr/lib/mono/1.0/gacutil.exe"
+FILES_mono-mjs-dbg = "/usr/bin/mjs*.mdb \
+ /usr/bin/mjs*/*.mdb \
+ /usr/lib/mono/1.0/mjs.exe*.mdb \
+ /usr/lib/mono/1.0/mjs.exe*/*.mdb"
+FILES_mono-mjs = "/usr/bin/mjs \
+ /usr/lib/mono/1.0/mjs.exe*"
+FILES_mono-gmcs-dbg = "/usr/bin/gmcs*.mdb \
+ /usr/bin/gmcs*/*.mdb \
+ /usr/bin/wsdl2*.mdb \
+ /usr/bin/wsdl2*/*.mdb \
+ /usr/bin/monop2*.mdb \
+ /usr/bin/monop2*/*.mdb \
+ /usr/bin/ilasm2*.mdb \
+ /usr/bin/ilasm2*/*.mdb \
+ /usr/bin/resgen2*.mdb \
+ /usr/bin/resgen2*/*.mdb \
+ /usr/bin/mono-api-info2*.mdb \
+ /usr/bin/mono-api-info2*/*.mdb \
+ /usr/bin/mono-service2*.mdb \
+ /usr/bin/mono-service2*/*.mdb \
+ /usr/bin/mkbundle2*.mdb \
+ /usr/bin/mkbundle2*/*.mdb \
+ /usr/bin/xbuild*.mdb \
+ /usr/bin/xbuild*/*.mdb \
+ /usr/bin/sgen*.mdb \
+ /usr/bin/sgen*/*.mdb \
+ /usr/bin/al2*.mdb \
+ /usr/bin/al2*/*.mdb \
+ /usr/bin/httpcfg*.mdb \
+ /usr/bin/httpcfg*/*.mdb \
+ /usr/lib/mono/2.0/*.exe*.mdb \
+ /usr/lib/mono/2.0/*.exe*/*.mdb \
+ /usr/lib/mono/2.0/xbuild.rsp*.mdb \
+ /usr/lib/mono/2.0/xbuild.rsp*/*.mdb \
+ /usr/lib/mono/2.0/MSBuild/*.mdb \
+ /usr/lib/mono/2.0/MSBuild/*/*.mdb \
+ /usr/lib/mono/2.0/MSBuild/.debug/ \
+ /usr/lib/mono/2.0/MSBuild/../.debug/ \
+ /usr/lib/mono/2.0/Microsoft.Build.xsd*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Build.xsd*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.CSharp.targets*.mdb \
+ /usr/lib/mono/2.0/Microsoft.CSharp.targets*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Common.tasks*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Common.tasks*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Common.targets*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Common.targets*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.VisualBasic.targets*.mdb \
+ /usr/lib/mono/2.0/Microsoft.VisualBasic.targets*/*.mdb"
+FILES_mono-gmcs = "/usr/bin/gmcs \
+ /usr/bin/wsdl2 \
+ /usr/bin/monop2 \
+ /usr/bin/ilasm2 \
+ /usr/bin/resgen2 \
+ /usr/bin/mono-api-info2 \
+ /usr/bin/mono-service2 \
+ /usr/bin/mkbundle2 \
+ /usr/bin/xbuild \
+ /usr/bin/sgen \
+ /usr/bin/al2 \
+ /usr/bin/httpcfg \
+ /usr/lib/mono/2.0/*.exe* \
+ /usr/lib/mono/2.0/xbuild.rsp \
+ /usr/lib/mono/2.0/MSBuild/ \
+ /usr/lib/mono/2.0/Microsoft.Build.xsd \
+ /usr/lib/mono/2.0/Microsoft.CSharp.targets \
+ /usr/lib/mono/2.0/Microsoft.Common.tasks \
+ /usr/lib/mono/2.0/Microsoft.Common.targets \
+ /usr/lib/mono/2.0/Microsoft.VisualBasic.targets"
+FILES_mono-utils-dbg = "/usr/bin/pedump*.mdb \
+ /usr/bin/pedump*/*.mdb \
+ /usr/bin/monodis*.mdb \
+ /usr/bin/monodis*/*.mdb \
+ /usr/bin/monograph*.mdb \
+ /usr/bin/monograph*/*.mdb \
+ /usr/bin/mono-find-provides*.mdb \
+ /usr/bin/mono-find-provides*/*.mdb \
+ /usr/bin/mono-find-requires*.mdb \
+ /usr/bin/mono-find-requires*/*.mdb"
+FILES_mono-utils = "/usr/bin/pedump \
+ /usr/bin/monodis \
+ /usr/bin/monograph \
+ /usr/bin/mono-find-provides \
+ /usr/bin/mono-find-requires"
+FILES_libmono-peapi1.0-cil-dbg = "/usr/lib/mono/gac/PEAPI/1.0.*/*.mdb \
+ /usr/lib/mono/gac/PEAPI/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/PEAPI/1.0.*/.debug/ \
+ /usr/lib/mono/gac/PEAPI/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/PEAPI.dll*.mdb \
+ /usr/lib/mono/1.0/PEAPI.dll*/*.mdb"
+FILES_libmono-peapi1.0-cil = "/usr/lib/mono/gac/PEAPI/1.0.*/ \
+ /usr/lib/mono/1.0/PEAPI.dll"
+FILES_libmono-cairo1.0-cil-dbg = "/usr/lib/mono/gac/Mono.Cairo/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Cairo/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Cairo/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Cairo/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Mono.Cairo.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.Cairo.dll*/*.mdb \
+ /usr/lib/pkgconfig/mono-cairo.pc*.mdb \
+ /usr/lib/pkgconfig/mono-cairo.pc*/*.mdb"
+FILES_libmono-cairo1.0-cil = "/usr/lib/mono/gac/Mono.Cairo/1.0.*/ \
+ /usr/lib/mono/1.0/Mono.Cairo.dll \
+ /usr/lib/pkgconfig/mono-cairo.pc"
+FILES_libmono-system-web2.0-cil-dbg = "/usr/lib/mono/gac/System.Web/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Web/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Web/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Web/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Web.Services/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Web.Services/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Web.Services/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Web.Services/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Web.dll*.mdb \
+ /usr/lib/mono/2.0/System.Web.dll*/*.mdb \
+ /usr/lib/mono/2.0/System.Web.Services.dll*.mdb \
+ /usr/lib/mono/2.0/System.Web.Services.dll*/*.mdb"
+FILES_libmono-system-web2.0-cil = "/usr/lib/mono/gac/System.Web/2.0.*/ \
+ /usr/lib/mono/gac/System.Web.Services/2.0.*/ \
+ /usr/lib/mono/2.0/System.Web.dll \
+ /usr/lib/mono/2.0/System.Web.Services.dll"
+FILES_libmono-accessibility2.0-cil-dbg = "/usr/lib/mono/gac/Accessibility/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Accessibility/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Accessibility/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Accessibility/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Accessibility.dll*.mdb \
+ /usr/lib/mono/2.0/Accessibility.dll*/*.mdb"
+FILES_libmono-accessibility2.0-cil = "/usr/lib/mono/gac/Accessibility/2.0.*/ \
+ /usr/lib/mono/2.0/Accessibility.dll"
+FILES_libmono-microsoft7.0-cil-dbg = "/usr/lib/mono/gac/Microsoft.JScript/7.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.JScript/7.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.JScript/7.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.JScript/7.0.*/../.debug/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/7.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.VisualC/7.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.VisualC/7.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/7.0.*/../.debug/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/7.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Vsa/7.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Vsa/7.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/7.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Microsoft.JScript.dll*.mdb \
+ /usr/lib/mono/1.0/Microsoft.JScript.dll*/*.mdb \
+ /usr/lib/mono/1.0/Microsoft.VisualC.dll*.mdb \
+ /usr/lib/mono/1.0/Microsoft.VisualC.dll*/*.mdb \
+ /usr/lib/mono/1.0/Microsoft.Vsa.dll*.mdb \
+ /usr/lib/mono/1.0/Microsoft.Vsa.dll*/*.mdb"
+FILES_libmono-microsoft7.0-cil = "/usr/lib/mono/gac/Microsoft.JScript/7.0.*/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/7.0.*/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/7.0.*/ \
+ /usr/lib/mono/1.0/Microsoft.JScript.dll \
+ /usr/lib/mono/1.0/Microsoft.VisualC.dll \
+ /usr/lib/mono/1.0/Microsoft.Vsa.dll"
+FILES_libmono-winforms2.0-cil-dbg = "/usr/lib/mono/gac/System.Windows.Forms/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Windows.Forms/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Windows.Forms/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Windows.Forms/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Drawing.Design/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Drawing.Design/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Drawing.Design/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Drawing.Design/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Design/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Design/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Design/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Design/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Windows.Forms.dll*.mdb \
+ /usr/lib/mono/2.0/System.Windows.Forms.dll*/*.mdb \
+ /usr/lib/mono/2.0/System.Drawing.Design.dll*.mdb \
+ /usr/lib/mono/2.0/System.Drawing.Design.dll*/*.mdb \
+ /usr/lib/mono/2.0/System.Design.dll*.mdb \
+ /usr/lib/mono/2.0/System.Design.dll*/*.mdb"
+FILES_libmono-winforms2.0-cil = "/usr/lib/mono/gac/System.Windows.Forms/2.0.*/ \
+ /usr/lib/mono/gac/System.Drawing.Design/2.0.*/ \
+ /usr/lib/mono/gac/System.Design/2.0.*/ \
+ /usr/lib/mono/2.0/System.Windows.Forms.dll \
+ /usr/lib/mono/2.0/System.Drawing.Design.dll \
+ /usr/lib/mono/2.0/System.Design.dll"
+FILES_libmono-ldap1.0-cil-dbg = "/usr/lib/mono/gac/Novell.Directory.Ldap/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Novell.Directory.Ldap.dll*.mdb \
+ /usr/lib/mono/1.0/Novell.Directory.Ldap.dll*/*.mdb"
+FILES_libmono-ldap1.0-cil = "/usr/lib/mono/gac/Novell.Directory.Ldap/1.0.*/ \
+ /usr/lib/mono/1.0/Novell.Directory.Ldap.dll"
+FILES_libmono-sharpzip2.84-cil-dbg = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.84.*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.84.*/*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.84.*/.debug/ \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.84.*/../.debug/ \
+ /usr/lib/mono/2.0/ICSharpCode.SharpZipLib.dll*.mdb \
+ /usr/lib/mono/2.0/ICSharpCode.SharpZipLib.dll*/*.mdb"
+FILES_libmono-sharpzip2.84-cil = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.84.*/ \
+ /usr/lib/mono/2.0/ICSharpCode.SharpZipLib.dll"
+FILES_libmono-system-data2.0-cil-dbg = "/usr/lib/mono/gac/System.Data/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Data/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Data/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Data/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Data.dll*.mdb \
+ /usr/lib/mono/2.0/System.Data.dll*/*.mdb"
+FILES_libmono-system-data2.0-cil = "/usr/lib/mono/gac/System.Data/2.0.*/ \
+ /usr/lib/mono/2.0/System.Data.dll"
+FILES_libmono-corlib2.0-cil-dbg = "/usr/lib/mono/gac/I18N*/2.0.*/*.mdb \
+ /usr/lib/mono/gac/I18N*/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/I18N*/2.0.*/.debug/ \
+ /usr/lib/mono/gac/I18N*/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/I18N*.dll*.mdb \
+ /usr/lib/mono/2.0/I18N*.dll*/*.mdb \
+ /usr/lib/mono/2.0/mscorlib.dll*.mdb \
+ /usr/lib/mono/2.0/mscorlib.dll*/*.mdb"
+FILES_libmono-corlib2.0-cil = "/usr/lib/mono/gac/I18N*/2.0.*/ \
+ /usr/lib/mono/2.0/I18N*.dll \
+ /usr/lib/mono/2.0/mscorlib.dll*"
+FILES_libmono-winforms1.0-cil-dbg = "/usr/lib/mono/gac/System.Windows.Forms/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Windows.Forms/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Windows.Forms/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Windows.Forms/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Drawing.Design/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Drawing.Design/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Drawing.Design/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Drawing.Design/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Design/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Design/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Design/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Design/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Windows.Forms.dll*.mdb \
+ /usr/lib/mono/1.0/System.Windows.Forms.dll*/*.mdb \
+ /usr/lib/mono/1.0/System.Drawing.Design.dll*.mdb \
+ /usr/lib/mono/1.0/System.Drawing.Design.dll*/*.mdb \
+ /usr/lib/mono/1.0/System.Design.dll*.mdb \
+ /usr/lib/mono/1.0/System.Design.dll*/*.mdb"
+FILES_libmono-winforms1.0-cil = "/usr/lib/mono/gac/System.Windows.Forms/1.0.*/ \
+ /usr/lib/mono/gac/System.Drawing.Design/1.0.*/ \
+ /usr/lib/mono/gac/System.Design/1.0.*/ \
+ /usr/lib/mono/1.0/System.Windows.Forms.dll \
+ /usr/lib/mono/1.0/System.Drawing.Design.dll \
+ /usr/lib/mono/1.0/System.Design.dll"
+FILES_libmono-microsoft8.0-cil-dbg = "/usr/lib/mono/gac/Microsoft.JScript/8.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.JScript/8.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.JScript/8.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.JScript/8.0.*/../.debug/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/8.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.VisualC/8.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.VisualC/8.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/8.0.*/../.debug/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/8.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Vsa/8.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Vsa/8.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/8.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Microsoft.JScript.dll*.mdb \
+ /usr/lib/mono/2.0/Microsoft.JScript.dll*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.VisualC.dll*.mdb \
+ /usr/lib/mono/2.0/Microsoft.VisualC.dll*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Vsa.dll*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Vsa.dll*/*.mdb"
+FILES_libmono-microsoft8.0-cil = "/usr/lib/mono/gac/Microsoft.JScript/8.0.*/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/8.0.*/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/8.0.*/ \
+ /usr/lib/mono/2.0/Microsoft.JScript.dll \
+ /usr/lib/mono/2.0/Microsoft.VisualC.dll \
+ /usr/lib/mono/2.0/Microsoft.Vsa.dll"
+FILES_libmono-corlib1.0-cil-dbg = "/usr/lib/mono/gac/I18N*/1.0.*/*.mdb \
+ /usr/lib/mono/gac/I18N*/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/I18N*/1.0.*/.debug/ \
+ /usr/lib/mono/gac/I18N*/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/I18N*.dll*.mdb \
+ /usr/lib/mono/1.0/I18N*.dll*/*.mdb \
+ /usr/lib/mono/1.0/mscorlib.dll*.mdb \
+ /usr/lib/mono/1.0/mscorlib.dll*/*.mdb"
+FILES_libmono-corlib1.0-cil = "/usr/lib/mono/gac/I18N*/1.0.*/ \
+ /usr/lib/mono/1.0/I18N*.dll \
+ /usr/lib/mono/1.0/mscorlib.dll*"
+FILES_libmono-system-web1.0-cil-dbg = "/usr/lib/mono/gac/System.Web/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Web/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Web/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Web/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Web.Services/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Web.Services/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Web.Services/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Web.Services/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Web.dll*.mdb \
+ /usr/lib/mono/1.0/System.Web.dll*/*.mdb \
+ /usr/lib/mono/1.0/System.Web.Services.dll*.mdb \
+ /usr/lib/mono/1.0/System.Web.Services.dll*/*.mdb"
+FILES_libmono-system-web1.0-cil = "/usr/lib/mono/gac/System.Web/1.0.*/ \
+ /usr/lib/mono/gac/System.Web.Services/1.0.*/ \
+ /usr/lib/mono/1.0/System.Web.dll \
+ /usr/lib/mono/1.0/System.Web.Services.dll"
+FILES_libmono-system-runtime2.0-cil-dbg = "/usr/lib/mono/gac/System.Runtime.*/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Runtime.*/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Runtime.*/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Runtime.*/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Runtime.*.dll*.mdb \
+ /usr/lib/mono/2.0/System.Runtime.*.dll*/*.mdb"
+FILES_libmono-system-runtime2.0-cil = "/usr/lib/mono/gac/System.Runtime.*/2.0.*/ \
+ /usr/lib/mono/2.0/System.Runtime.*.dll"
+FILES_libmono-cscompmgd8.0-cil-dbg = "/usr/lib/mono/gac/cscompmgd/8.0.*/*.mdb \
+ /usr/lib/mono/gac/cscompmgd/8.0.*/*/*.mdb \
+ /usr/lib/mono/gac/cscompmgd/8.0.*/.debug/ \
+ /usr/lib/mono/gac/cscompmgd/8.0.*/../.debug/ \
+ /usr/lib/mono/2.0/cscompmgd.dll*.mdb \
+ /usr/lib/mono/2.0/cscompmgd.dll*/*.mdb"
+FILES_libmono-cscompmgd8.0-cil = "/usr/lib/mono/gac/cscompmgd/8.0.*/ \
+ /usr/lib/mono/2.0/cscompmgd.dll"
+FILES_libmono-cscompmgd7.0-cil-dbg = "/usr/lib/mono/gac/cscompmgd/7.0.*/*.mdb \
+ /usr/lib/mono/gac/cscompmgd/7.0.*/*/*.mdb \
+ /usr/lib/mono/gac/cscompmgd/7.0.*/.debug/ \
+ /usr/lib/mono/gac/cscompmgd/7.0.*/../.debug/ \
+ /usr/lib/mono/1.0/cscompmgd.dll*.mdb \
+ /usr/lib/mono/1.0/cscompmgd.dll*/*.mdb"
+FILES_libmono-cscompmgd7.0-cil = "/usr/lib/mono/gac/cscompmgd/7.0.*/ \
+ /usr/lib/mono/1.0/cscompmgd.dll"
+FILES_libmono-firebirdsql1.7-cil-dbg = "/usr/lib/mono/gac/FirebirdSql.Data.Firebird/1.7.*/*.mdb \
+ /usr/lib/mono/gac/FirebirdSql.Data.Firebird/1.7.*/*/*.mdb \
+ /usr/lib/mono/gac/FirebirdSql.Data.Firebird/1.7.*/.debug/ \
+ /usr/lib/mono/gac/FirebirdSql.Data.Firebird/1.7.*/../.debug/ \
+ /usr/lib/mono/1.0/FirebirdSql.Data.Firebird.dll*.mdb \
+ /usr/lib/mono/1.0/FirebirdSql.Data.Firebird.dll*/*.mdb"
+FILES_libmono-firebirdsql1.7-cil = "/usr/lib/mono/gac/FirebirdSql.Data.Firebird/1.7.*/ \
+ /usr/lib/mono/1.0/FirebirdSql.Data.Firebird.dll"
+FILES_mono-jay-dbg = "/usr/bin/jay*.mdb \
+ /usr/bin/jay*/*.mdb"
+FILES_mono-jay = "/usr/bin/jay"
+FILES_libmono-data-tds1.0-cil-dbg = "/usr/lib/mono/gac/Mono.Data.Tds/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Tds/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Tds/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.Tds/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Mono.Data.Tds.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.Data.Tds.dll*/*.mdb"
+FILES_libmono-data-tds1.0-cil = "/usr/lib/mono/gac/Mono.Data.Tds/1.0.*/ \
+ /usr/lib/mono/1.0/Mono.Data.Tds.dll"
+FILES_libmono-sqlite1.0-cil-dbg = "/usr/lib/mono/gac/Mono.Data.Sqlite/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Mono.Data.Sqlite.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.Data.Sqlite.dll*/*.mdb \
+ /usr/lib/mono/1.0/Mono.Data.SqliteClient.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.Data.SqliteClient.dll*/*.mdb"
+FILES_libmono-sqlite1.0-cil = "/usr/lib/mono/gac/Mono.Data.Sqlite/1.0.*/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/1.0.*/ \
+ /usr/lib/mono/1.0/Mono.Data.Sqlite.dll \
+ /usr/lib/mono/1.0/Mono.Data.SqliteClient.dll"
+FILES_libmono-relaxng1.0-cil-dbg = "/usr/lib/mono/gac/Commons.Xml.Relaxng/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Commons.Xml.Relaxng.dll*.mdb \
+ /usr/lib/mono/1.0/Commons.Xml.Relaxng.dll*/*.mdb"
+FILES_libmono-relaxng1.0-cil = "/usr/lib/mono/gac/Commons.Xml.Relaxng/1.0.*/ \
+ /usr/lib/mono/1.0/Commons.Xml.Relaxng.dll"
+FILES_libmono-dev-dbg = "/usr/lib/libmono*.a*.mdb \
+ /usr/lib/libmono*.a*/*.mdb \
+ /usr/lib/libMono*.a*.mdb \
+ /usr/lib/libMono*.a*/*.mdb \
+ /usr/lib/libmono*.so*.mdb \
+ /usr/lib/libmono*.so*/*.mdb \
+ /usr/lib/libMonoSupportW.a*.mdb \
+ /usr/lib/libMonoSupportW.a*/*.mdb \
+ /usr/lib/pkgconfig/mono.pc*.mdb \
+ /usr/lib/pkgconfig/mono.pc*/*.mdb \
+ /usr/lib/pkgconfig/dotnet.pc*.mdb \
+ /usr/lib/pkgconfig/dotnet.pc*/*.mdb \
+ /usr/include/*.mdb \
+ /usr/include/*/*.mdb \
+ /usr/include/.debug/ \
+ /usr/include/../.debug/"
+FILES_libmono-dev = "/usr/lib/libmono*.a \
+ /usr/lib/libMono*.a \
+ /usr/lib/libmono*.so \
+ /usr/lib/libMonoSupportW.a \
+ /usr/lib/pkgconfig/mono.pc \
+ /usr/lib/pkgconfig/dotnet.pc \
+ /usr/include/"
+FILES_libmono-accessibility1.0-cil-dbg = "/usr/lib/mono/gac/Accessibility/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Accessibility/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Accessibility/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Accessibility/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Accessibility.dll*.mdb \
+ /usr/lib/mono/1.0/Accessibility.dll*/*.mdb"
+FILES_libmono-accessibility1.0-cil = "/usr/lib/mono/gac/Accessibility/1.0.*/ \
+ /usr/lib/mono/1.0/Accessibility.dll"
+FILES_mono-common-dbg = "/etc/mono*.mdb \
+ /etc/mono*/*.mdb \
+ /usr/share/mono-1.0/mono/cil/cil-opcodes.xml*.mdb \
+ /usr/share/mono-1.0/mono/cil/cil-opcodes.xml*/*.mdb"
+FILES_mono-common = "/etc/mono \
+ /usr/share/mono-1.0/mono/cil/cil-opcodes.xml"
+FILES_libmono-oracle1.0-cil-dbg = "/usr/lib/mono/gac/System.Data.OracleClient/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Data.OracleClient/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Data.OracleClient/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Data.OracleClient/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Data.OracleClient.dll*.mdb \
+ /usr/lib/mono/1.0/System.Data.OracleClient.dll*/*.mdb"
+FILES_libmono-oracle1.0-cil = "/usr/lib/mono/gac/System.Data.OracleClient/1.0.*/ \
+ /usr/lib/mono/1.0/System.Data.OracleClient.dll"
+FILES_libmono-system-data1.0-cil-dbg = "/usr/lib/mono/gac/System.Data/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Data/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Data/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Data/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Data.dll*.mdb \
+ /usr/lib/mono/1.0/System.Data.dll*/*.mdb"
+FILES_libmono-system-data1.0-cil = "/usr/lib/mono/gac/System.Data/1.0.*/ \
+ /usr/lib/mono/1.0/System.Data.dll"
+FILES_libmono-bytefx0.7.6.2-cil-dbg = "/usr/lib/mono/gac/ByteFX.Data/0.7.6.2*/*.mdb \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.2*/*/*.mdb \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.2*/.debug/ \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.2*/../.debug/ \
+ /usr/lib/mono/2.0/ByteFX.Data.dll*.mdb \
+ /usr/lib/mono/2.0/ByteFX.Data.dll*/*.mdb"
+FILES_libmono-bytefx0.7.6.2-cil = "/usr/lib/mono/gac/ByteFX.Data/0.7.6.2*/ \
+ /usr/lib/mono/2.0/ByteFX.Data.dll"
+FILES_libmono0-dbg = "/usr/lib/libmono*.so.*.mdb \
+ /usr/lib/libmono*.so.*/*.mdb \
+ /usr/lib/libMonoPosixHelper.so*.mdb \
+ /usr/lib/libMonoPosixHelper.so*/*.mdb \
+ /usr/lib/libMonoSupportW.so*.mdb \
+ /usr/lib/libMonoSupportW.so*/*.mdb"
+FILES_libmono0 = "/usr/lib/libmono*.so.* \
+ /usr/lib/libMonoPosixHelper.so \
+ /usr/lib/libMonoSupportW.so"
+FILES_libmono-sharpzip0.6-cil-dbg = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.6.*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.6.*/*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.6.*/.debug/ \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.6.*/../.debug/ \
+ /usr/lib/mono/compat-1.0/ICSharpCode.SharpZipLib.dll*.mdb \
+ /usr/lib/mono/compat-1.0/ICSharpCode.SharpZipLib.dll*/*.mdb"
+FILES_libmono-sharpzip0.6-cil = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.6.*/ \
+ /usr/lib/mono/compat-1.0/ICSharpCode.SharpZipLib.dll"
+FILES_libmono-data-tds2.0-cil-dbg = "/usr/lib/mono/gac/Mono.Data.Tds/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Tds/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Tds/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.Tds/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.Data.Tds.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.Data.Tds.dll*/*.mdb"
+FILES_libmono-data-tds2.0-cil = "/usr/lib/mono/gac/Mono.Data.Tds/2.0.*/ \
+ /usr/lib/mono/2.0/Mono.Data.Tds.dll"
+FILES_libmono-system-messaging1.0-cil-dbg = "/usr/lib/mono/gac/System.Messaging/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Messaging/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Messaging/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Messaging/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Messaging.dll*.mdb \
+ /usr/lib/mono/1.0/System.Messaging.dll*/*.mdb"
+FILES_libmono-system-messaging1.0-cil = "/usr/lib/mono/gac/System.Messaging/1.0.*/ \
+ /usr/lib/mono/1.0/System.Messaging.dll"
+FILES_libmono-npgsql1.0-cil-dbg = "/usr/lib/mono/gac/Npgsql/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Npgsql/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Npgsql/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Npgsql/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Npgsql.dll*.mdb \
+ /usr/lib/mono/1.0/Npgsql.dll*/*.mdb"
+FILES_libmono-npgsql1.0-cil = "/usr/lib/mono/gac/Npgsql/1.0.*/ \
+ /usr/lib/mono/1.0/Npgsql.dll"
+FILES_libmono-security2.0-cil-dbg = "/usr/lib/mono/gac/Mono.Security/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Security/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Security/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Security/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.Security.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.Security.dll*/*.mdb"
+FILES_libmono-security2.0-cil = "/usr/lib/mono/gac/Mono.Security/2.0.*/ \
+ /usr/lib/mono/2.0/Mono.Security.dll"
+FILES_libmono-security1.0-cil-dbg = "/usr/lib/mono/gac/Mono.Security/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Security/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Security/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Security/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Mono.Security.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.Security.dll*/*.mdb"
+FILES_libmono-security1.0-cil = "/usr/lib/mono/gac/Mono.Security/1.0.*/ \
+ /usr/lib/mono/1.0/Mono.Security.dll"
+FILES_libmono-bytefx0.7.6.1-cil-dbg = "/usr/lib/mono/gac/ByteFX.Data/0.7.6.1*/*.mdb \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.1*/*/*.mdb \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.1*/.debug/ \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.1*/../.debug/ \
+ /usr/lib/mono/1.0/ByteFX.Data.dll*.mdb \
+ /usr/lib/mono/1.0/ByteFX.Data.dll*/*.mdb"
+FILES_libmono-bytefx0.7.6.1-cil = "/usr/lib/mono/gac/ByteFX.Data/0.7.6.1*/ \
+ /usr/lib/mono/1.0/ByteFX.Data.dll"
+FILES_libmono-microsoft-build2.0-cil-dbg = "/usr/lib/mono/gac/Microsoft.Build.*/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Build.*/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Build.*/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.Build.*/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Microsoft.Build.*.dll*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Build.*.dll*/*.mdb"
+FILES_libmono-microsoft-build2.0-cil = "/usr/lib/mono/gac/Microsoft.Build.*/2.0.*/ \
+ /usr/lib/mono/2.0/Microsoft.Build.*.dll"
+FILES_libmono-system-ldap1.0-cil-dbg = "/usr/lib/mono/gac/System.DirectoryServices/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.DirectoryServices/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.DirectoryServices/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.DirectoryServices/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.DirectoryServices.dll*.mdb \
+ /usr/lib/mono/1.0/System.DirectoryServices.dll*/*.mdb"
+FILES_libmono-system-ldap1.0-cil = "/usr/lib/mono/gac/System.DirectoryServices/1.0.*/ \
+ /usr/lib/mono/1.0/System.DirectoryServices.dll"
+FILES_libmono-relaxng2.0-cil-dbg = "/usr/lib/mono/gac/Commons.Xml.Relaxng/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Commons.Xml.Relaxng.dll*.mdb \
+ /usr/lib/mono/2.0/Commons.Xml.Relaxng.dll*/*.mdb"
+FILES_libmono-relaxng2.0-cil = "/usr/lib/mono/gac/Commons.Xml.Relaxng/2.0.*/ \
+ /usr/lib/mono/2.0/Commons.Xml.Relaxng.dll"
+FILES_libmono-system-ldap2.0-cil-dbg = "/usr/lib/mono/gac/System.DirectoryServices/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.DirectoryServices/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.DirectoryServices/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.DirectoryServices/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.DirectoryServices.dll*.mdb \
+ /usr/lib/mono/2.0/System.DirectoryServices.dll*/*.mdb"
+FILES_libmono-system-ldap2.0-cil = "/usr/lib/mono/gac/System.DirectoryServices/2.0.*/ \
+ /usr/lib/mono/2.0/System.DirectoryServices.dll"
+FILES_libmono-system-messaging2.0-cil-dbg = "/usr/lib/mono/gac/System.Messaging/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Messaging/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Messaging/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Messaging/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Messaging.dll*.mdb \
+ /usr/lib/mono/2.0/System.Messaging.dll*/*.mdb"
+FILES_libmono-system-messaging2.0-cil = "/usr/lib/mono/gac/System.Messaging/2.0.*/ \
+ /usr/lib/mono/2.0/System.Messaging.dll"
+FILES_libmono-sharpzip0.84-cil-dbg = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.84.*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.84.*/*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.84.*/.debug/ \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.84.*/../.debug/ \
+ /usr/lib/mono/1.0/ICSharpCode.SharpZipLib.dll*.mdb \
+ /usr/lib/mono/1.0/ICSharpCode.SharpZipLib.dll*/*.mdb"
+FILES_libmono-sharpzip0.84-cil = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.84.*/ \
+ /usr/lib/mono/1.0/ICSharpCode.SharpZipLib.dll"
+FILES_libmono-sqlite2.0-cil-dbg = "/usr/lib/mono/gac/Mono.Data.Sqlite/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.Data.Sqlite.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.Data.Sqlite.dll*/*.mdb \
+ /usr/lib/mono/2.0/Mono.Data.SqliteClient.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.Data.SqliteClient.dll*/*.mdb"
+FILES_libmono-sqlite2.0-cil = "/usr/lib/mono/gac/Mono.Data.Sqlite/2.0.*/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/2.0.*/ \
+ /usr/lib/mono/2.0/Mono.Data.Sqlite.dll \
+ /usr/lib/mono/2.0/Mono.Data.SqliteClient.dll"
+FILES_libmono-ldap2.0-cil-dbg = "/usr/lib/mono/gac/Novell.Directory.Ldap/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Novell.Directory.Ldap.dll*.mdb \
+ /usr/lib/mono/2.0/Novell.Directory.Ldap.dll*/*.mdb"
+FILES_libmono-ldap2.0-cil = "/usr/lib/mono/gac/Novell.Directory.Ldap/2.0.*/ \
+ /usr/lib/mono/2.0/Novell.Directory.Ldap.dll"
+FILES_libmono-npgsql2.0-cil-dbg = "/usr/lib/mono/gac/Npgsql/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Npgsql/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Npgsql/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Npgsql/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Npgsql.dll*.mdb \
+ /usr/lib/mono/2.0/Npgsql.dll*/*.mdb"
+FILES_libmono-npgsql2.0-cil = "/usr/lib/mono/gac/Npgsql/2.0.*/ \
+ /usr/lib/mono/2.0/Npgsql.dll"
+FILES_libmono-system-runtime1.0-cil-dbg = "/usr/lib/mono/gac/System.Runtime.*/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Runtime.*/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Runtime.*/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Runtime.*/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Runtime.*.dll*.mdb \
+ /usr/lib/mono/1.0/System.Runtime.*.dll*/*.mdb"
+FILES_libmono-system-runtime1.0-cil = "/usr/lib/mono/gac/System.Runtime.*/1.0.*/ \
+ /usr/lib/mono/1.0/System.Runtime.*.dll"
+FILES_libmono-oracle2.0-cil-dbg = "/usr/lib/mono/gac/System.Data.OracleClient/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Data.OracleClient/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Data.OracleClient/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Data.OracleClient/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Data.OracleClient.dll*.mdb \
+ /usr/lib/mono/2.0/System.Data.OracleClient.dll*/*.mdb"
+FILES_libmono-oracle2.0-cil = "/usr/lib/mono/gac/System.Data.OracleClient/2.0.*/ \
+ /usr/lib/mono/2.0/System.Data.OracleClient.dll"
+FILES_libmono-c5-1.0-cil-dbg = "/usr/lib/mono/gac/Mono.C5/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.C5/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.C5/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.C5/1.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.C5.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.C5.dll*/*.mdb"
+FILES_libmono-c5-1.0-cil = "/usr/lib/mono/gac/Mono.C5/1.0.*/ \
+ /usr/lib/mono/2.0/Mono.C5.dll"
+FILES_libmono-sharpzip2.6-cil-dbg = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.6.*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.6.*/*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.6.*/.debug/ \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.6.*/../.debug/ \
+ /usr/lib/mono/compat-2.0/ICSharpCode.SharpZipLib.dll*.mdb \
+ /usr/lib/mono/compat-2.0/ICSharpCode.SharpZipLib.dll*/*.mdb"
+FILES_libmono-sharpzip2.6-cil = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.6.*/ \
+ /usr/lib/mono/compat-2.0/ICSharpCode.SharpZipLib.dll"
+FILES_libmono-cairo2.0-cil-dbg = "/usr/lib/mono/gac/Mono.Cairo/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Cairo/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Cairo/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Cairo/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.Cairo.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.Cairo.dll*/*.mdb"
+FILES_libmono-cairo2.0-cil = "/usr/lib/mono/gac/Mono.Cairo/2.0.*/ \
+ /usr/lib/mono/2.0/Mono.Cairo.dll"
+FILES_libmono-peapi2.0-cil-dbg = "/usr/lib/mono/gac/PEAPI/2.0.*/*.mdb \
+ /usr/lib/mono/gac/PEAPI/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/PEAPI/2.0.*/.debug/ \
+ /usr/lib/mono/gac/PEAPI/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/PEAPI.dll*.mdb \
+ /usr/lib/mono/2.0/PEAPI.dll*/*.mdb"
+FILES_libmono-peapi2.0-cil = "/usr/lib/mono/gac/PEAPI/2.0.*/ \
+ /usr/lib/mono/2.0/PEAPI.dll"
+FILES_mono-mcs-dbg = "/usr/bin/*.mdb \
+ /usr/bin/*/*.mdb \
+ /usr/bin/.debug/ \
+ /usr/bin/../.debug/ \
+ /usr/lib/mono/1.0/*.exe*.mdb \
+ /usr/lib/mono/1.0/*.exe*/*.mdb"
+FILES_mono-mcs = "/usr/bin/ \
+ /usr/lib/mono/1.0/*.exe*"
+FILES_libmono-system1.0-cil-dbg = "/usr/lib/mono/gac/System*/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System*/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System*/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System*/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/CustomMarshalers/1.0.*/*.mdb \
+ /usr/lib/mono/gac/CustomMarshalers/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/CustomMarshalers/1.0.*/.debug/ \
+ /usr/lib/mono/gac/CustomMarshalers/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System*.dll*.mdb \
+ /usr/lib/mono/1.0/System*.dll*/*.mdb \
+ /usr/lib/mono/1.0/CustomMarshalers.dll*.mdb \
+ /usr/lib/mono/1.0/CustomMarshalers.dll*/*.mdb"
+FILES_libmono-system1.0-cil = "/usr/lib/mono/gac/System*/1.0.*/ \
+ /usr/lib/mono/gac/CustomMarshalers/1.0.*/ \
+ /usr/lib/mono/1.0/System*.dll \
+ /usr/lib/mono/1.0/CustomMarshalers.dll*"
+FILES_libmono-system2.0-cil-dbg = "/usr/lib/mono/gac/System*/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System*/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System*/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System*/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/CustomMarshalers/2.0.*/*.mdb \
+ /usr/lib/mono/gac/CustomMarshalers/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/CustomMarshalers/2.0.*/.debug/ \
+ /usr/lib/mono/gac/CustomMarshalers/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System*.dll*.mdb \
+ /usr/lib/mono/2.0/System*.dll*/*.mdb \
+ /usr/lib/mono/2.0/CustomMarshalers.dll*.mdb \
+ /usr/lib/mono/2.0/CustomMarshalers.dll*/*.mdb"
+FILES_libmono-system2.0-cil = "/usr/lib/mono/gac/System*/2.0.*/ \
+ /usr/lib/mono/gac/CustomMarshalers/2.0.*/ \
+ /usr/lib/mono/2.0/System*.dll \
+ /usr/lib/mono/2.0/CustomMarshalers.dll*"
+FILES_libmono1.0-cil-dbg = "/usr/lib/mono/gac/Mono.*/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.*/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.*/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.*/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/OpenSystem.C/1.0.*.mdb \
+ /usr/lib/mono/gac/OpenSystem.C/1.0.*/*.mdb \
+ /usr/lib/mono/gac/mono-service/1.0.*/*.mdb \
+ /usr/lib/mono/gac/mono-service/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/mono-service/1.0.*/.debug/ \
+ /usr/lib/mono/gac/mono-service/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Mono.*.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.*.dll*/*.mdb \
+ /usr/lib/mono/1.0/OpenSystem.C.dll*.mdb \
+ /usr/lib/mono/1.0/OpenSystem.C.dll*/*.mdb"
+FILES_libmono1.0-cil = "/usr/lib/mono/gac/Mono.*/1.0.*/ \
+ /usr/lib/mono/gac/OpenSystem.C/1.0.* \
+ /usr/lib/mono/gac/mono-service/1.0.*/ \
+ /usr/lib/mono/1.0/Mono.*.dll \
+ /usr/lib/mono/1.0/OpenSystem.C.dll"
+FILES_libmono2.0-cil-dbg = "/usr/lib/mono/gac/Mono.*/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.*/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.*/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.*/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/OpenSystem.C/2.0.*.mdb \
+ /usr/lib/mono/gac/OpenSystem.C/2.0.*/*.mdb \
+ /usr/lib/mono/gac/mono-service/2.0.*/*.mdb \
+ /usr/lib/mono/gac/mono-service/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/mono-service/2.0.*/.debug/ \
+ /usr/lib/mono/gac/mono-service/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.*.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.*.dll*/*.mdb \
+ /usr/lib/mono/2.0/OpenSystem.C.dll*.mdb \
+ /usr/lib/mono/2.0/OpenSystem.C.dll*/*.mdb"
+FILES_libmono2.0-cil = "/usr/lib/mono/gac/Mono.*/2.0.*/ \
+ /usr/lib/mono/gac/OpenSystem.C/2.0.* \
+ /usr/lib/mono/gac/mono-service/2.0.*/ \
+ /usr/lib/mono/2.0/Mono.*.dll \
+ /usr/lib/mono/2.0/OpenSystem.C.dll"
+
+PACKAGES = "mono-jit-dbg \
+ mono-jit \
+ mono-gac-dbg \
+ mono-gac \
+ mono-mjs-dbg \
+ mono-mjs \
+ mono-gmcs-dbg \
+ mono-gmcs \
+ mono-utils-dbg \
+ mono-utils \
+ libmono-peapi1.0-cil-dbg \
+ libmono-peapi1.0-cil \
+ libmono-cairo1.0-cil-dbg \
+ libmono-cairo1.0-cil \
+ libmono-system-web2.0-cil-dbg \
+ libmono-system-web2.0-cil \
+ libmono-accessibility2.0-cil-dbg \
+ libmono-accessibility2.0-cil \
+ libmono-microsoft7.0-cil-dbg \
+ libmono-microsoft7.0-cil \
+ libmono-winforms2.0-cil-dbg \
+ libmono-winforms2.0-cil \
+ libmono-ldap1.0-cil-dbg \
+ libmono-ldap1.0-cil \
+ libmono-sharpzip2.84-cil-dbg \
+ libmono-sharpzip2.84-cil \
+ libmono-system-data2.0-cil-dbg \
+ libmono-system-data2.0-cil \
+ libmono-corlib2.0-cil-dbg \
+ libmono-corlib2.0-cil \
+ libmono-winforms1.0-cil-dbg \
+ libmono-winforms1.0-cil \
+ libmono-microsoft8.0-cil-dbg \
+ libmono-microsoft8.0-cil \
+ libmono-corlib1.0-cil-dbg \
+ libmono-corlib1.0-cil \
+ libmono-system-web1.0-cil-dbg \
+ libmono-system-web1.0-cil \
+ libmono-system-runtime2.0-cil-dbg \
+ libmono-system-runtime2.0-cil \
+ libmono-cscompmgd8.0-cil-dbg \
+ libmono-cscompmgd8.0-cil \
+ libmono-cscompmgd7.0-cil-dbg \
+ libmono-cscompmgd7.0-cil \
+ libmono-firebirdsql1.7-cil-dbg \
+ libmono-firebirdsql1.7-cil \
+ mono-jay-dbg \
+ mono-jay \
+ libmono-data-tds1.0-cil-dbg \
+ libmono-data-tds1.0-cil \
+ libmono-sqlite1.0-cil-dbg \
+ libmono-sqlite1.0-cil \
+ libmono-relaxng1.0-cil-dbg \
+ libmono-relaxng1.0-cil \
+ libmono-dev-dbg \
+ libmono-dev \
+ libmono-accessibility1.0-cil-dbg \
+ libmono-accessibility1.0-cil \
+ mono-common-dbg \
+ mono-common \
+ libmono-oracle1.0-cil-dbg \
+ libmono-oracle1.0-cil \
+ libmono-system-data1.0-cil-dbg \
+ libmono-system-data1.0-cil \
+ libmono-bytefx0.7.6.2-cil-dbg \
+ libmono-bytefx0.7.6.2-cil \
+ libmono0-dbg \
+ libmono0 \
+ libmono-sharpzip0.6-cil-dbg \
+ libmono-sharpzip0.6-cil \
+ libmono-data-tds2.0-cil-dbg \
+ libmono-data-tds2.0-cil \
+ libmono-system-messaging1.0-cil-dbg \
+ libmono-system-messaging1.0-cil \
+ libmono-npgsql1.0-cil-dbg \
+ libmono-npgsql1.0-cil \
+ libmono-security2.0-cil-dbg \
+ libmono-security2.0-cil \
+ libmono-security1.0-cil-dbg \
+ libmono-security1.0-cil \
+ libmono-bytefx0.7.6.1-cil-dbg \
+ libmono-bytefx0.7.6.1-cil \
+ libmono-microsoft-build2.0-cil-dbg \
+ libmono-microsoft-build2.0-cil \
+ libmono-system-ldap1.0-cil-dbg \
+ libmono-system-ldap1.0-cil \
+ libmono-relaxng2.0-cil-dbg \
+ libmono-relaxng2.0-cil \
+ libmono-system-ldap2.0-cil-dbg \
+ libmono-system-ldap2.0-cil \
+ libmono-system-messaging2.0-cil-dbg \
+ libmono-system-messaging2.0-cil \
+ libmono-sharpzip0.84-cil-dbg \
+ libmono-sharpzip0.84-cil \
+ libmono-sqlite2.0-cil-dbg \
+ libmono-sqlite2.0-cil \
+ libmono-ldap2.0-cil-dbg \
+ libmono-ldap2.0-cil \
+ libmono-npgsql2.0-cil-dbg \
+ libmono-npgsql2.0-cil \
+ libmono-system-runtime1.0-cil-dbg \
+ libmono-system-runtime1.0-cil \
+ libmono-oracle2.0-cil-dbg \
+ libmono-oracle2.0-cil \
+ libmono-c5-1.0-cil-dbg \
+ libmono-c5-1.0-cil \
+ libmono-sharpzip2.6-cil-dbg \
+ libmono-sharpzip2.6-cil \
+ libmono-cairo2.0-cil-dbg \
+ libmono-cairo2.0-cil \
+ libmono-peapi2.0-cil-dbg \
+ libmono-peapi2.0-cil \
+ mono-mcs-dbg \
+ mono-mcs \
+ libmono-system1.0-cil-dbg \
+ libmono-system1.0-cil \
+ libmono-system2.0-cil-dbg \
+ libmono-system2.0-cil \
+ libmono1.0-cil-dbg \
+ libmono1.0-cil \
+ libmono2.0-cil-dbg \
+ libmono2.0-cil"
+# This is a generated file, please do not edit directly
+# Use collect-files.py instead. -- Henryk <henryk@openmoko.org>
+FILES_mono-jit-dbg = "/usr/bin/mono*.mdb \
+ /usr/bin/mono*/*.mdb"
+FILES_mono-jit = "/usr/bin/mono"
+FILES_mono-gac-dbg = "/usr/bin/gacutil*.mdb \
+ /usr/bin/gacutil*/*.mdb \
+ /usr/lib/mono/1.0/gacutil.exe*.mdb \
+ /usr/lib/mono/1.0/gacutil.exe*/*.mdb"
+FILES_mono-gac = "/usr/bin/gacutil \
+ /usr/lib/mono/1.0/gacutil.exe"
+FILES_mono-mjs-dbg = "/usr/bin/mjs*.mdb \
+ /usr/bin/mjs*/*.mdb \
+ /usr/lib/mono/1.0/mjs.exe*.mdb \
+ /usr/lib/mono/1.0/mjs.exe*/*.mdb"
+FILES_mono-mjs = "/usr/bin/mjs \
+ /usr/lib/mono/1.0/mjs.exe*"
+FILES_mono-gmcs-dbg = "/usr/bin/gmcs*.mdb \
+ /usr/bin/gmcs*/*.mdb \
+ /usr/bin/wsdl2*.mdb \
+ /usr/bin/wsdl2*/*.mdb \
+ /usr/bin/monop2*.mdb \
+ /usr/bin/monop2*/*.mdb \
+ /usr/bin/ilasm2*.mdb \
+ /usr/bin/ilasm2*/*.mdb \
+ /usr/bin/resgen2*.mdb \
+ /usr/bin/resgen2*/*.mdb \
+ /usr/bin/mono-api-info2*.mdb \
+ /usr/bin/mono-api-info2*/*.mdb \
+ /usr/bin/mono-service2*.mdb \
+ /usr/bin/mono-service2*/*.mdb \
+ /usr/bin/mkbundle2*.mdb \
+ /usr/bin/mkbundle2*/*.mdb \
+ /usr/bin/xbuild*.mdb \
+ /usr/bin/xbuild*/*.mdb \
+ /usr/bin/sgen*.mdb \
+ /usr/bin/sgen*/*.mdb \
+ /usr/bin/al2*.mdb \
+ /usr/bin/al2*/*.mdb \
+ /usr/bin/httpcfg*.mdb \
+ /usr/bin/httpcfg*/*.mdb \
+ /usr/lib/mono/2.0/*.exe*.mdb \
+ /usr/lib/mono/2.0/*.exe*/*.mdb \
+ /usr/lib/mono/2.0/xbuild.rsp*.mdb \
+ /usr/lib/mono/2.0/xbuild.rsp*/*.mdb \
+ /usr/lib/mono/2.0/MSBuild/*.mdb \
+ /usr/lib/mono/2.0/MSBuild/*/*.mdb \
+ /usr/lib/mono/2.0/MSBuild/.debug/ \
+ /usr/lib/mono/2.0/MSBuild/../.debug/ \
+ /usr/lib/mono/2.0/Microsoft.Build.xsd*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Build.xsd*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.CSharp.targets*.mdb \
+ /usr/lib/mono/2.0/Microsoft.CSharp.targets*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Common.tasks*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Common.tasks*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Common.targets*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Common.targets*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.VisualBasic.targets*.mdb \
+ /usr/lib/mono/2.0/Microsoft.VisualBasic.targets*/*.mdb"
+FILES_mono-gmcs = "/usr/bin/gmcs \
+ /usr/bin/wsdl2 \
+ /usr/bin/monop2 \
+ /usr/bin/ilasm2 \
+ /usr/bin/resgen2 \
+ /usr/bin/mono-api-info2 \
+ /usr/bin/mono-service2 \
+ /usr/bin/mkbundle2 \
+ /usr/bin/xbuild \
+ /usr/bin/sgen \
+ /usr/bin/al2 \
+ /usr/bin/httpcfg \
+ /usr/lib/mono/2.0/*.exe* \
+ /usr/lib/mono/2.0/xbuild.rsp \
+ /usr/lib/mono/2.0/MSBuild/ \
+ /usr/lib/mono/2.0/Microsoft.Build.xsd \
+ /usr/lib/mono/2.0/Microsoft.CSharp.targets \
+ /usr/lib/mono/2.0/Microsoft.Common.tasks \
+ /usr/lib/mono/2.0/Microsoft.Common.targets \
+ /usr/lib/mono/2.0/Microsoft.VisualBasic.targets"
+FILES_mono-utils-dbg = "/usr/bin/pedump*.mdb \
+ /usr/bin/pedump*/*.mdb \
+ /usr/bin/monodis*.mdb \
+ /usr/bin/monodis*/*.mdb \
+ /usr/bin/monograph*.mdb \
+ /usr/bin/monograph*/*.mdb \
+ /usr/bin/mono-find-provides*.mdb \
+ /usr/bin/mono-find-provides*/*.mdb \
+ /usr/bin/mono-find-requires*.mdb \
+ /usr/bin/mono-find-requires*/*.mdb"
+FILES_mono-utils = "/usr/bin/pedump \
+ /usr/bin/monodis \
+ /usr/bin/monograph \
+ /usr/bin/mono-find-provides \
+ /usr/bin/mono-find-requires"
+FILES_libmono-peapi1.0-cil-dbg = "/usr/lib/mono/gac/PEAPI/1.0.*/*.mdb \
+ /usr/lib/mono/gac/PEAPI/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/PEAPI/1.0.*/.debug/ \
+ /usr/lib/mono/gac/PEAPI/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/PEAPI.dll*.mdb \
+ /usr/lib/mono/1.0/PEAPI.dll*/*.mdb"
+FILES_libmono-peapi1.0-cil = "/usr/lib/mono/gac/PEAPI/1.0.*/ \
+ /usr/lib/mono/1.0/PEAPI.dll"
+FILES_libmono-cairo1.0-cil-dbg = "/usr/lib/mono/gac/Mono.Cairo/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Cairo/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Cairo/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Cairo/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Mono.Cairo.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.Cairo.dll*/*.mdb \
+ /usr/lib/pkgconfig/mono-cairo.pc*.mdb \
+ /usr/lib/pkgconfig/mono-cairo.pc*/*.mdb"
+FILES_libmono-cairo1.0-cil = "/usr/lib/mono/gac/Mono.Cairo/1.0.*/ \
+ /usr/lib/mono/1.0/Mono.Cairo.dll \
+ /usr/lib/pkgconfig/mono-cairo.pc"
+FILES_libmono-system-web2.0-cil-dbg = "/usr/lib/mono/gac/System.Web/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Web/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Web/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Web/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Web.Services/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Web.Services/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Web.Services/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Web.Services/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Web.dll*.mdb \
+ /usr/lib/mono/2.0/System.Web.dll*/*.mdb \
+ /usr/lib/mono/2.0/System.Web.Services.dll*.mdb \
+ /usr/lib/mono/2.0/System.Web.Services.dll*/*.mdb"
+FILES_libmono-system-web2.0-cil = "/usr/lib/mono/gac/System.Web/2.0.*/ \
+ /usr/lib/mono/gac/System.Web.Services/2.0.*/ \
+ /usr/lib/mono/2.0/System.Web.dll \
+ /usr/lib/mono/2.0/System.Web.Services.dll"
+FILES_libmono-accessibility2.0-cil-dbg = "/usr/lib/mono/gac/Accessibility/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Accessibility/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Accessibility/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Accessibility/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Accessibility.dll*.mdb \
+ /usr/lib/mono/2.0/Accessibility.dll*/*.mdb"
+FILES_libmono-accessibility2.0-cil = "/usr/lib/mono/gac/Accessibility/2.0.*/ \
+ /usr/lib/mono/2.0/Accessibility.dll"
+FILES_libmono-microsoft7.0-cil-dbg = "/usr/lib/mono/gac/Microsoft.JScript/7.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.JScript/7.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.JScript/7.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.JScript/7.0.*/../.debug/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/7.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.VisualC/7.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.VisualC/7.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/7.0.*/../.debug/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/7.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Vsa/7.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Vsa/7.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/7.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Microsoft.JScript.dll*.mdb \
+ /usr/lib/mono/1.0/Microsoft.JScript.dll*/*.mdb \
+ /usr/lib/mono/1.0/Microsoft.VisualC.dll*.mdb \
+ /usr/lib/mono/1.0/Microsoft.VisualC.dll*/*.mdb \
+ /usr/lib/mono/1.0/Microsoft.Vsa.dll*.mdb \
+ /usr/lib/mono/1.0/Microsoft.Vsa.dll*/*.mdb"
+FILES_libmono-microsoft7.0-cil = "/usr/lib/mono/gac/Microsoft.JScript/7.0.*/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/7.0.*/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/7.0.*/ \
+ /usr/lib/mono/1.0/Microsoft.JScript.dll \
+ /usr/lib/mono/1.0/Microsoft.VisualC.dll \
+ /usr/lib/mono/1.0/Microsoft.Vsa.dll"
+FILES_libmono-winforms2.0-cil-dbg = "/usr/lib/mono/gac/System.Windows.Forms/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Windows.Forms/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Windows.Forms/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Windows.Forms/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Drawing.Design/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Drawing.Design/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Drawing.Design/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Drawing.Design/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Design/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Design/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Design/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Design/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Windows.Forms.dll*.mdb \
+ /usr/lib/mono/2.0/System.Windows.Forms.dll*/*.mdb \
+ /usr/lib/mono/2.0/System.Drawing.Design.dll*.mdb \
+ /usr/lib/mono/2.0/System.Drawing.Design.dll*/*.mdb \
+ /usr/lib/mono/2.0/System.Design.dll*.mdb \
+ /usr/lib/mono/2.0/System.Design.dll*/*.mdb"
+FILES_libmono-winforms2.0-cil = "/usr/lib/mono/gac/System.Windows.Forms/2.0.*/ \
+ /usr/lib/mono/gac/System.Drawing.Design/2.0.*/ \
+ /usr/lib/mono/gac/System.Design/2.0.*/ \
+ /usr/lib/mono/2.0/System.Windows.Forms.dll \
+ /usr/lib/mono/2.0/System.Drawing.Design.dll \
+ /usr/lib/mono/2.0/System.Design.dll"
+FILES_libmono-ldap1.0-cil-dbg = "/usr/lib/mono/gac/Novell.Directory.Ldap/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Novell.Directory.Ldap.dll*.mdb \
+ /usr/lib/mono/1.0/Novell.Directory.Ldap.dll*/*.mdb"
+FILES_libmono-ldap1.0-cil = "/usr/lib/mono/gac/Novell.Directory.Ldap/1.0.*/ \
+ /usr/lib/mono/1.0/Novell.Directory.Ldap.dll"
+FILES_libmono-sharpzip2.84-cil-dbg = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.84.*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.84.*/*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.84.*/.debug/ \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.84.*/../.debug/ \
+ /usr/lib/mono/2.0/ICSharpCode.SharpZipLib.dll*.mdb \
+ /usr/lib/mono/2.0/ICSharpCode.SharpZipLib.dll*/*.mdb"
+FILES_libmono-sharpzip2.84-cil = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.84.*/ \
+ /usr/lib/mono/2.0/ICSharpCode.SharpZipLib.dll"
+FILES_libmono-system-data2.0-cil-dbg = "/usr/lib/mono/gac/System.Data/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Data/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Data/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Data/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Data.dll*.mdb \
+ /usr/lib/mono/2.0/System.Data.dll*/*.mdb"
+FILES_libmono-system-data2.0-cil = "/usr/lib/mono/gac/System.Data/2.0.*/ \
+ /usr/lib/mono/2.0/System.Data.dll"
+FILES_libmono-corlib2.0-cil-dbg = "/usr/lib/mono/gac/I18N*/2.0.*/*.mdb \
+ /usr/lib/mono/gac/I18N*/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/I18N*/2.0.*/.debug/ \
+ /usr/lib/mono/gac/I18N*/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/I18N*.dll*.mdb \
+ /usr/lib/mono/2.0/I18N*.dll*/*.mdb \
+ /usr/lib/mono/2.0/mscorlib.dll*.mdb \
+ /usr/lib/mono/2.0/mscorlib.dll*/*.mdb"
+FILES_libmono-corlib2.0-cil = "/usr/lib/mono/gac/I18N*/2.0.*/ \
+ /usr/lib/mono/2.0/I18N*.dll \
+ /usr/lib/mono/2.0/mscorlib.dll*"
+FILES_libmono-winforms1.0-cil-dbg = "/usr/lib/mono/gac/System.Windows.Forms/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Windows.Forms/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Windows.Forms/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Windows.Forms/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Drawing.Design/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Drawing.Design/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Drawing.Design/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Drawing.Design/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Design/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Design/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Design/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Design/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Windows.Forms.dll*.mdb \
+ /usr/lib/mono/1.0/System.Windows.Forms.dll*/*.mdb \
+ /usr/lib/mono/1.0/System.Drawing.Design.dll*.mdb \
+ /usr/lib/mono/1.0/System.Drawing.Design.dll*/*.mdb \
+ /usr/lib/mono/1.0/System.Design.dll*.mdb \
+ /usr/lib/mono/1.0/System.Design.dll*/*.mdb"
+FILES_libmono-winforms1.0-cil = "/usr/lib/mono/gac/System.Windows.Forms/1.0.*/ \
+ /usr/lib/mono/gac/System.Drawing.Design/1.0.*/ \
+ /usr/lib/mono/gac/System.Design/1.0.*/ \
+ /usr/lib/mono/1.0/System.Windows.Forms.dll \
+ /usr/lib/mono/1.0/System.Drawing.Design.dll \
+ /usr/lib/mono/1.0/System.Design.dll"
+FILES_libmono-microsoft8.0-cil-dbg = "/usr/lib/mono/gac/Microsoft.JScript/8.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.JScript/8.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.JScript/8.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.JScript/8.0.*/../.debug/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/8.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.VisualC/8.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.VisualC/8.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/8.0.*/../.debug/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/8.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Vsa/8.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Vsa/8.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/8.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Microsoft.JScript.dll*.mdb \
+ /usr/lib/mono/2.0/Microsoft.JScript.dll*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.VisualC.dll*.mdb \
+ /usr/lib/mono/2.0/Microsoft.VisualC.dll*/*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Vsa.dll*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Vsa.dll*/*.mdb"
+FILES_libmono-microsoft8.0-cil = "/usr/lib/mono/gac/Microsoft.JScript/8.0.*/ \
+ /usr/lib/mono/gac/Microsoft.VisualC/8.0.*/ \
+ /usr/lib/mono/gac/Microsoft.Vsa/8.0.*/ \
+ /usr/lib/mono/2.0/Microsoft.JScript.dll \
+ /usr/lib/mono/2.0/Microsoft.VisualC.dll \
+ /usr/lib/mono/2.0/Microsoft.Vsa.dll"
+FILES_libmono-corlib1.0-cil-dbg = "/usr/lib/mono/gac/I18N*/1.0.*/*.mdb \
+ /usr/lib/mono/gac/I18N*/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/I18N*/1.0.*/.debug/ \
+ /usr/lib/mono/gac/I18N*/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/I18N*.dll*.mdb \
+ /usr/lib/mono/1.0/I18N*.dll*/*.mdb \
+ /usr/lib/mono/1.0/mscorlib.dll*.mdb \
+ /usr/lib/mono/1.0/mscorlib.dll*/*.mdb"
+FILES_libmono-corlib1.0-cil = "/usr/lib/mono/gac/I18N*/1.0.*/ \
+ /usr/lib/mono/1.0/I18N*.dll \
+ /usr/lib/mono/1.0/mscorlib.dll*"
+FILES_libmono-system-web1.0-cil-dbg = "/usr/lib/mono/gac/System.Web/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Web/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Web/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Web/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/System.Web.Services/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Web.Services/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Web.Services/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Web.Services/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Web.dll*.mdb \
+ /usr/lib/mono/1.0/System.Web.dll*/*.mdb \
+ /usr/lib/mono/1.0/System.Web.Services.dll*.mdb \
+ /usr/lib/mono/1.0/System.Web.Services.dll*/*.mdb"
+FILES_libmono-system-web1.0-cil = "/usr/lib/mono/gac/System.Web/1.0.*/ \
+ /usr/lib/mono/gac/System.Web.Services/1.0.*/ \
+ /usr/lib/mono/1.0/System.Web.dll \
+ /usr/lib/mono/1.0/System.Web.Services.dll"
+FILES_libmono-system-runtime2.0-cil-dbg = "/usr/lib/mono/gac/System.Runtime.*/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Runtime.*/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Runtime.*/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Runtime.*/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Runtime.*.dll*.mdb \
+ /usr/lib/mono/2.0/System.Runtime.*.dll*/*.mdb"
+FILES_libmono-system-runtime2.0-cil = "/usr/lib/mono/gac/System.Runtime.*/2.0.*/ \
+ /usr/lib/mono/2.0/System.Runtime.*.dll"
+FILES_libmono-cscompmgd8.0-cil-dbg = "/usr/lib/mono/gac/cscompmgd/8.0.*/*.mdb \
+ /usr/lib/mono/gac/cscompmgd/8.0.*/*/*.mdb \
+ /usr/lib/mono/gac/cscompmgd/8.0.*/.debug/ \
+ /usr/lib/mono/gac/cscompmgd/8.0.*/../.debug/ \
+ /usr/lib/mono/2.0/cscompmgd.dll*.mdb \
+ /usr/lib/mono/2.0/cscompmgd.dll*/*.mdb"
+FILES_libmono-cscompmgd8.0-cil = "/usr/lib/mono/gac/cscompmgd/8.0.*/ \
+ /usr/lib/mono/2.0/cscompmgd.dll"
+FILES_libmono-cscompmgd7.0-cil-dbg = "/usr/lib/mono/gac/cscompmgd/7.0.*/*.mdb \
+ /usr/lib/mono/gac/cscompmgd/7.0.*/*/*.mdb \
+ /usr/lib/mono/gac/cscompmgd/7.0.*/.debug/ \
+ /usr/lib/mono/gac/cscompmgd/7.0.*/../.debug/ \
+ /usr/lib/mono/1.0/cscompmgd.dll*.mdb \
+ /usr/lib/mono/1.0/cscompmgd.dll*/*.mdb"
+FILES_libmono-cscompmgd7.0-cil = "/usr/lib/mono/gac/cscompmgd/7.0.*/ \
+ /usr/lib/mono/1.0/cscompmgd.dll"
+FILES_libmono-firebirdsql1.7-cil-dbg = "/usr/lib/mono/gac/FirebirdSql.Data.Firebird/1.7.*/*.mdb \
+ /usr/lib/mono/gac/FirebirdSql.Data.Firebird/1.7.*/*/*.mdb \
+ /usr/lib/mono/gac/FirebirdSql.Data.Firebird/1.7.*/.debug/ \
+ /usr/lib/mono/gac/FirebirdSql.Data.Firebird/1.7.*/../.debug/ \
+ /usr/lib/mono/1.0/FirebirdSql.Data.Firebird.dll*.mdb \
+ /usr/lib/mono/1.0/FirebirdSql.Data.Firebird.dll*/*.mdb"
+FILES_libmono-firebirdsql1.7-cil = "/usr/lib/mono/gac/FirebirdSql.Data.Firebird/1.7.*/ \
+ /usr/lib/mono/1.0/FirebirdSql.Data.Firebird.dll"
+FILES_mono-jay-dbg = "/usr/bin/jay*.mdb \
+ /usr/bin/jay*/*.mdb"
+FILES_mono-jay = "/usr/bin/jay"
+FILES_libmono-data-tds1.0-cil-dbg = "/usr/lib/mono/gac/Mono.Data.Tds/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Tds/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Tds/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.Tds/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Mono.Data.Tds.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.Data.Tds.dll*/*.mdb"
+FILES_libmono-data-tds1.0-cil = "/usr/lib/mono/gac/Mono.Data.Tds/1.0.*/ \
+ /usr/lib/mono/1.0/Mono.Data.Tds.dll"
+FILES_libmono-sqlite1.0-cil-dbg = "/usr/lib/mono/gac/Mono.Data.Sqlite/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Mono.Data.Sqlite.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.Data.Sqlite.dll*/*.mdb \
+ /usr/lib/mono/1.0/Mono.Data.SqliteClient.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.Data.SqliteClient.dll*/*.mdb"
+FILES_libmono-sqlite1.0-cil = "/usr/lib/mono/gac/Mono.Data.Sqlite/1.0.*/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/1.0.*/ \
+ /usr/lib/mono/1.0/Mono.Data.Sqlite.dll \
+ /usr/lib/mono/1.0/Mono.Data.SqliteClient.dll"
+FILES_libmono-relaxng1.0-cil-dbg = "/usr/lib/mono/gac/Commons.Xml.Relaxng/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Commons.Xml.Relaxng.dll*.mdb \
+ /usr/lib/mono/1.0/Commons.Xml.Relaxng.dll*/*.mdb"
+FILES_libmono-relaxng1.0-cil = "/usr/lib/mono/gac/Commons.Xml.Relaxng/1.0.*/ \
+ /usr/lib/mono/1.0/Commons.Xml.Relaxng.dll"
+FILES_libmono-dev-dbg = "/usr/lib/libmono*.a*.mdb \
+ /usr/lib/libmono*.a*/*.mdb \
+ /usr/lib/libMono*.a*.mdb \
+ /usr/lib/libMono*.a*/*.mdb \
+ /usr/lib/libmono*.so*.mdb \
+ /usr/lib/libmono*.so*/*.mdb \
+ /usr/lib/libMonoSupportW.a*.mdb \
+ /usr/lib/libMonoSupportW.a*/*.mdb \
+ /usr/lib/pkgconfig/mono.pc*.mdb \
+ /usr/lib/pkgconfig/mono.pc*/*.mdb \
+ /usr/lib/pkgconfig/dotnet.pc*.mdb \
+ /usr/lib/pkgconfig/dotnet.pc*/*.mdb \
+ /usr/include/*.mdb \
+ /usr/include/*/*.mdb \
+ /usr/include/.debug/ \
+ /usr/include/../.debug/"
+FILES_libmono-dev = "/usr/lib/libmono*.a \
+ /usr/lib/libMono*.a \
+ /usr/lib/libmono*.so \
+ /usr/lib/libMonoSupportW.a \
+ /usr/lib/pkgconfig/mono.pc \
+ /usr/lib/pkgconfig/dotnet.pc \
+ /usr/include/"
+FILES_libmono-accessibility1.0-cil-dbg = "/usr/lib/mono/gac/Accessibility/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Accessibility/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Accessibility/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Accessibility/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Accessibility.dll*.mdb \
+ /usr/lib/mono/1.0/Accessibility.dll*/*.mdb"
+FILES_libmono-accessibility1.0-cil = "/usr/lib/mono/gac/Accessibility/1.0.*/ \
+ /usr/lib/mono/1.0/Accessibility.dll"
+FILES_mono-common-dbg = "/etc/mono*.mdb \
+ /etc/mono*/*.mdb \
+ /usr/share/mono-1.0/mono/cil/cil-opcodes.xml*.mdb \
+ /usr/share/mono-1.0/mono/cil/cil-opcodes.xml*/*.mdb"
+FILES_mono-common = "/etc/mono \
+ /usr/share/mono-1.0/mono/cil/cil-opcodes.xml"
+FILES_libmono-oracle1.0-cil-dbg = "/usr/lib/mono/gac/System.Data.OracleClient/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Data.OracleClient/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Data.OracleClient/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Data.OracleClient/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Data.OracleClient.dll*.mdb \
+ /usr/lib/mono/1.0/System.Data.OracleClient.dll*/*.mdb"
+FILES_libmono-oracle1.0-cil = "/usr/lib/mono/gac/System.Data.OracleClient/1.0.*/ \
+ /usr/lib/mono/1.0/System.Data.OracleClient.dll"
+FILES_libmono-system-data1.0-cil-dbg = "/usr/lib/mono/gac/System.Data/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Data/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Data/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Data/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Data.dll*.mdb \
+ /usr/lib/mono/1.0/System.Data.dll*/*.mdb"
+FILES_libmono-system-data1.0-cil = "/usr/lib/mono/gac/System.Data/1.0.*/ \
+ /usr/lib/mono/1.0/System.Data.dll"
+FILES_libmono-bytefx0.7.6.2-cil-dbg = "/usr/lib/mono/gac/ByteFX.Data/0.7.6.2*/*.mdb \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.2*/*/*.mdb \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.2*/.debug/ \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.2*/../.debug/ \
+ /usr/lib/mono/2.0/ByteFX.Data.dll*.mdb \
+ /usr/lib/mono/2.0/ByteFX.Data.dll*/*.mdb"
+FILES_libmono-bytefx0.7.6.2-cil = "/usr/lib/mono/gac/ByteFX.Data/0.7.6.2*/ \
+ /usr/lib/mono/2.0/ByteFX.Data.dll"
+FILES_libmono0-dbg = "/usr/lib/libmono*.so.*.mdb \
+ /usr/lib/libmono*.so.*/*.mdb \
+ /usr/lib/libMonoPosixHelper.so*.mdb \
+ /usr/lib/libMonoPosixHelper.so*/*.mdb \
+ /usr/lib/libMonoSupportW.so*.mdb \
+ /usr/lib/libMonoSupportW.so*/*.mdb"
+FILES_libmono0 = "/usr/lib/libmono*.so.* \
+ /usr/lib/libMonoPosixHelper.so \
+ /usr/lib/libMonoSupportW.so"
+FILES_libmono-sharpzip0.6-cil-dbg = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.6.*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.6.*/*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.6.*/.debug/ \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.6.*/../.debug/ \
+ /usr/lib/mono/compat-1.0/ICSharpCode.SharpZipLib.dll*.mdb \
+ /usr/lib/mono/compat-1.0/ICSharpCode.SharpZipLib.dll*/*.mdb"
+FILES_libmono-sharpzip0.6-cil = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.6.*/ \
+ /usr/lib/mono/compat-1.0/ICSharpCode.SharpZipLib.dll"
+FILES_libmono-data-tds2.0-cil-dbg = "/usr/lib/mono/gac/Mono.Data.Tds/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Tds/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Tds/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.Tds/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.Data.Tds.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.Data.Tds.dll*/*.mdb"
+FILES_libmono-data-tds2.0-cil = "/usr/lib/mono/gac/Mono.Data.Tds/2.0.*/ \
+ /usr/lib/mono/2.0/Mono.Data.Tds.dll"
+FILES_libmono-system-messaging1.0-cil-dbg = "/usr/lib/mono/gac/System.Messaging/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Messaging/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Messaging/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Messaging/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Messaging.dll*.mdb \
+ /usr/lib/mono/1.0/System.Messaging.dll*/*.mdb"
+FILES_libmono-system-messaging1.0-cil = "/usr/lib/mono/gac/System.Messaging/1.0.*/ \
+ /usr/lib/mono/1.0/System.Messaging.dll"
+FILES_libmono-npgsql1.0-cil-dbg = "/usr/lib/mono/gac/Npgsql/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Npgsql/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Npgsql/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Npgsql/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Npgsql.dll*.mdb \
+ /usr/lib/mono/1.0/Npgsql.dll*/*.mdb"
+FILES_libmono-npgsql1.0-cil = "/usr/lib/mono/gac/Npgsql/1.0.*/ \
+ /usr/lib/mono/1.0/Npgsql.dll"
+FILES_libmono-security2.0-cil-dbg = "/usr/lib/mono/gac/Mono.Security/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Security/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Security/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Security/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.Security.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.Security.dll*/*.mdb"
+FILES_libmono-security2.0-cil = "/usr/lib/mono/gac/Mono.Security/2.0.*/ \
+ /usr/lib/mono/2.0/Mono.Security.dll"
+FILES_libmono-security1.0-cil-dbg = "/usr/lib/mono/gac/Mono.Security/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Security/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Security/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Security/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Mono.Security.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.Security.dll*/*.mdb"
+FILES_libmono-security1.0-cil = "/usr/lib/mono/gac/Mono.Security/1.0.*/ \
+ /usr/lib/mono/1.0/Mono.Security.dll"
+FILES_libmono-bytefx0.7.6.1-cil-dbg = "/usr/lib/mono/gac/ByteFX.Data/0.7.6.1*/*.mdb \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.1*/*/*.mdb \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.1*/.debug/ \
+ /usr/lib/mono/gac/ByteFX.Data/0.7.6.1*/../.debug/ \
+ /usr/lib/mono/1.0/ByteFX.Data.dll*.mdb \
+ /usr/lib/mono/1.0/ByteFX.Data.dll*/*.mdb"
+FILES_libmono-bytefx0.7.6.1-cil = "/usr/lib/mono/gac/ByteFX.Data/0.7.6.1*/ \
+ /usr/lib/mono/1.0/ByteFX.Data.dll"
+FILES_libmono-microsoft-build2.0-cil-dbg = "/usr/lib/mono/gac/Microsoft.Build.*/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Build.*/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Microsoft.Build.*/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Microsoft.Build.*/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Microsoft.Build.*.dll*.mdb \
+ /usr/lib/mono/2.0/Microsoft.Build.*.dll*/*.mdb"
+FILES_libmono-microsoft-build2.0-cil = "/usr/lib/mono/gac/Microsoft.Build.*/2.0.*/ \
+ /usr/lib/mono/2.0/Microsoft.Build.*.dll"
+FILES_libmono-system-ldap1.0-cil-dbg = "/usr/lib/mono/gac/System.DirectoryServices/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.DirectoryServices/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.DirectoryServices/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.DirectoryServices/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.DirectoryServices.dll*.mdb \
+ /usr/lib/mono/1.0/System.DirectoryServices.dll*/*.mdb"
+FILES_libmono-system-ldap1.0-cil = "/usr/lib/mono/gac/System.DirectoryServices/1.0.*/ \
+ /usr/lib/mono/1.0/System.DirectoryServices.dll"
+FILES_libmono-relaxng2.0-cil-dbg = "/usr/lib/mono/gac/Commons.Xml.Relaxng/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Commons.Xml.Relaxng/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Commons.Xml.Relaxng.dll*.mdb \
+ /usr/lib/mono/2.0/Commons.Xml.Relaxng.dll*/*.mdb"
+FILES_libmono-relaxng2.0-cil = "/usr/lib/mono/gac/Commons.Xml.Relaxng/2.0.*/ \
+ /usr/lib/mono/2.0/Commons.Xml.Relaxng.dll"
+FILES_libmono-system-ldap2.0-cil-dbg = "/usr/lib/mono/gac/System.DirectoryServices/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.DirectoryServices/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.DirectoryServices/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.DirectoryServices/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.DirectoryServices.dll*.mdb \
+ /usr/lib/mono/2.0/System.DirectoryServices.dll*/*.mdb"
+FILES_libmono-system-ldap2.0-cil = "/usr/lib/mono/gac/System.DirectoryServices/2.0.*/ \
+ /usr/lib/mono/2.0/System.DirectoryServices.dll"
+FILES_libmono-system-messaging2.0-cil-dbg = "/usr/lib/mono/gac/System.Messaging/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Messaging/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Messaging/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Messaging/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Messaging.dll*.mdb \
+ /usr/lib/mono/2.0/System.Messaging.dll*/*.mdb"
+FILES_libmono-system-messaging2.0-cil = "/usr/lib/mono/gac/System.Messaging/2.0.*/ \
+ /usr/lib/mono/2.0/System.Messaging.dll"
+FILES_libmono-sharpzip0.84-cil-dbg = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.84.*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.84.*/*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.84.*/.debug/ \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.84.*/../.debug/ \
+ /usr/lib/mono/1.0/ICSharpCode.SharpZipLib.dll*.mdb \
+ /usr/lib/mono/1.0/ICSharpCode.SharpZipLib.dll*/*.mdb"
+FILES_libmono-sharpzip0.84-cil = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/0.84.*/ \
+ /usr/lib/mono/1.0/ICSharpCode.SharpZipLib.dll"
+FILES_libmono-sqlite2.0-cil-dbg = "/usr/lib/mono/gac/Mono.Data.Sqlite/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.Sqlite/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.Data.Sqlite.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.Data.Sqlite.dll*/*.mdb \
+ /usr/lib/mono/2.0/Mono.Data.SqliteClient.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.Data.SqliteClient.dll*/*.mdb"
+FILES_libmono-sqlite2.0-cil = "/usr/lib/mono/gac/Mono.Data.Sqlite/2.0.*/ \
+ /usr/lib/mono/gac/Mono.Data.SqliteClient/2.0.*/ \
+ /usr/lib/mono/2.0/Mono.Data.Sqlite.dll \
+ /usr/lib/mono/2.0/Mono.Data.SqliteClient.dll"
+FILES_libmono-ldap2.0-cil-dbg = "/usr/lib/mono/gac/Novell.Directory.Ldap/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Novell.Directory.Ldap/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Novell.Directory.Ldap.dll*.mdb \
+ /usr/lib/mono/2.0/Novell.Directory.Ldap.dll*/*.mdb"
+FILES_libmono-ldap2.0-cil = "/usr/lib/mono/gac/Novell.Directory.Ldap/2.0.*/ \
+ /usr/lib/mono/2.0/Novell.Directory.Ldap.dll"
+FILES_libmono-npgsql2.0-cil-dbg = "/usr/lib/mono/gac/Npgsql/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Npgsql/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Npgsql/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Npgsql/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Npgsql.dll*.mdb \
+ /usr/lib/mono/2.0/Npgsql.dll*/*.mdb"
+FILES_libmono-npgsql2.0-cil = "/usr/lib/mono/gac/Npgsql/2.0.*/ \
+ /usr/lib/mono/2.0/Npgsql.dll"
+FILES_libmono-system-runtime1.0-cil-dbg = "/usr/lib/mono/gac/System.Runtime.*/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Runtime.*/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Runtime.*/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Runtime.*/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System.Runtime.*.dll*.mdb \
+ /usr/lib/mono/1.0/System.Runtime.*.dll*/*.mdb"
+FILES_libmono-system-runtime1.0-cil = "/usr/lib/mono/gac/System.Runtime.*/1.0.*/ \
+ /usr/lib/mono/1.0/System.Runtime.*.dll"
+FILES_libmono-oracle2.0-cil-dbg = "/usr/lib/mono/gac/System.Data.OracleClient/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System.Data.OracleClient/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System.Data.OracleClient/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System.Data.OracleClient/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System.Data.OracleClient.dll*.mdb \
+ /usr/lib/mono/2.0/System.Data.OracleClient.dll*/*.mdb"
+FILES_libmono-oracle2.0-cil = "/usr/lib/mono/gac/System.Data.OracleClient/2.0.*/ \
+ /usr/lib/mono/2.0/System.Data.OracleClient.dll"
+FILES_libmono-c5-1.0-cil-dbg = "/usr/lib/mono/gac/Mono.C5/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.C5/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.C5/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.C5/1.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.C5.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.C5.dll*/*.mdb"
+FILES_libmono-c5-1.0-cil = "/usr/lib/mono/gac/Mono.C5/1.0.*/ \
+ /usr/lib/mono/2.0/Mono.C5.dll"
+FILES_libmono-sharpzip2.6-cil-dbg = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.6.*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.6.*/*/*.mdb \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.6.*/.debug/ \
+ /usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.6.*/../.debug/ \
+ /usr/lib/mono/compat-2.0/ICSharpCode.SharpZipLib.dll*.mdb \
+ /usr/lib/mono/compat-2.0/ICSharpCode.SharpZipLib.dll*/*.mdb"
+FILES_libmono-sharpzip2.6-cil = "/usr/lib/mono/gac/ICSharpCode.SharpZipLib/2.6.*/ \
+ /usr/lib/mono/compat-2.0/ICSharpCode.SharpZipLib.dll"
+FILES_libmono-cairo2.0-cil-dbg = "/usr/lib/mono/gac/Mono.Cairo/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.Cairo/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.Cairo/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.Cairo/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.Cairo.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.Cairo.dll*/*.mdb"
+FILES_libmono-cairo2.0-cil = "/usr/lib/mono/gac/Mono.Cairo/2.0.*/ \
+ /usr/lib/mono/2.0/Mono.Cairo.dll"
+FILES_libmono-peapi2.0-cil-dbg = "/usr/lib/mono/gac/PEAPI/2.0.*/*.mdb \
+ /usr/lib/mono/gac/PEAPI/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/PEAPI/2.0.*/.debug/ \
+ /usr/lib/mono/gac/PEAPI/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/PEAPI.dll*.mdb \
+ /usr/lib/mono/2.0/PEAPI.dll*/*.mdb"
+FILES_libmono-peapi2.0-cil = "/usr/lib/mono/gac/PEAPI/2.0.*/ \
+ /usr/lib/mono/2.0/PEAPI.dll"
+FILES_mono-mcs-dbg = "/usr/bin/*.mdb \
+ /usr/bin/*/*.mdb \
+ /usr/bin/.debug/ \
+ /usr/bin/../.debug/ \
+ /usr/lib/mono/1.0/*.exe*.mdb \
+ /usr/lib/mono/1.0/*.exe*/*.mdb"
+FILES_mono-mcs = "/usr/bin/ \
+ /usr/lib/mono/1.0/*.exe*"
+FILES_libmono-system1.0-cil-dbg = "/usr/lib/mono/gac/System*/1.0.*/*.mdb \
+ /usr/lib/mono/gac/System*/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System*/1.0.*/.debug/ \
+ /usr/lib/mono/gac/System*/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/CustomMarshalers/1.0.*/*.mdb \
+ /usr/lib/mono/gac/CustomMarshalers/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/CustomMarshalers/1.0.*/.debug/ \
+ /usr/lib/mono/gac/CustomMarshalers/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/System*.dll*.mdb \
+ /usr/lib/mono/1.0/System*.dll*/*.mdb \
+ /usr/lib/mono/1.0/CustomMarshalers.dll*.mdb \
+ /usr/lib/mono/1.0/CustomMarshalers.dll*/*.mdb"
+FILES_libmono-system1.0-cil = "/usr/lib/mono/gac/System*/1.0.*/ \
+ /usr/lib/mono/gac/CustomMarshalers/1.0.*/ \
+ /usr/lib/mono/1.0/System*.dll \
+ /usr/lib/mono/1.0/CustomMarshalers.dll*"
+FILES_libmono-system2.0-cil-dbg = "/usr/lib/mono/gac/System*/2.0.*/*.mdb \
+ /usr/lib/mono/gac/System*/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/System*/2.0.*/.debug/ \
+ /usr/lib/mono/gac/System*/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/CustomMarshalers/2.0.*/*.mdb \
+ /usr/lib/mono/gac/CustomMarshalers/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/CustomMarshalers/2.0.*/.debug/ \
+ /usr/lib/mono/gac/CustomMarshalers/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/System*.dll*.mdb \
+ /usr/lib/mono/2.0/System*.dll*/*.mdb \
+ /usr/lib/mono/2.0/CustomMarshalers.dll*.mdb \
+ /usr/lib/mono/2.0/CustomMarshalers.dll*/*.mdb"
+FILES_libmono-system2.0-cil = "/usr/lib/mono/gac/System*/2.0.*/ \
+ /usr/lib/mono/gac/CustomMarshalers/2.0.*/ \
+ /usr/lib/mono/2.0/System*.dll \
+ /usr/lib/mono/2.0/CustomMarshalers.dll*"
+FILES_libmono1.0-cil-dbg = "/usr/lib/mono/gac/Mono.*/1.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.*/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.*/1.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.*/1.0.*/../.debug/ \
+ /usr/lib/mono/gac/OpenSystem.C/1.0.*.mdb \
+ /usr/lib/mono/gac/OpenSystem.C/1.0.*/*.mdb \
+ /usr/lib/mono/gac/mono-service/1.0.*/*.mdb \
+ /usr/lib/mono/gac/mono-service/1.0.*/*/*.mdb \
+ /usr/lib/mono/gac/mono-service/1.0.*/.debug/ \
+ /usr/lib/mono/gac/mono-service/1.0.*/../.debug/ \
+ /usr/lib/mono/1.0/Mono.*.dll*.mdb \
+ /usr/lib/mono/1.0/Mono.*.dll*/*.mdb \
+ /usr/lib/mono/1.0/OpenSystem.C.dll*.mdb \
+ /usr/lib/mono/1.0/OpenSystem.C.dll*/*.mdb"
+FILES_libmono1.0-cil = "/usr/lib/mono/gac/Mono.*/1.0.*/ \
+ /usr/lib/mono/gac/OpenSystem.C/1.0.* \
+ /usr/lib/mono/gac/mono-service/1.0.*/ \
+ /usr/lib/mono/1.0/Mono.*.dll \
+ /usr/lib/mono/1.0/OpenSystem.C.dll"
+FILES_libmono2.0-cil-dbg = "/usr/lib/mono/gac/Mono.*/2.0.*/*.mdb \
+ /usr/lib/mono/gac/Mono.*/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/Mono.*/2.0.*/.debug/ \
+ /usr/lib/mono/gac/Mono.*/2.0.*/../.debug/ \
+ /usr/lib/mono/gac/OpenSystem.C/2.0.*.mdb \
+ /usr/lib/mono/gac/OpenSystem.C/2.0.*/*.mdb \
+ /usr/lib/mono/gac/mono-service/2.0.*/*.mdb \
+ /usr/lib/mono/gac/mono-service/2.0.*/*/*.mdb \
+ /usr/lib/mono/gac/mono-service/2.0.*/.debug/ \
+ /usr/lib/mono/gac/mono-service/2.0.*/../.debug/ \
+ /usr/lib/mono/2.0/Mono.*.dll*.mdb \
+ /usr/lib/mono/2.0/Mono.*.dll*/*.mdb \
+ /usr/lib/mono/2.0/OpenSystem.C.dll*.mdb \
+ /usr/lib/mono/2.0/OpenSystem.C.dll*/*.mdb"
+FILES_libmono2.0-cil = "/usr/lib/mono/gac/Mono.*/2.0.*/ \
+ /usr/lib/mono/gac/OpenSystem.C/2.0.* \
+ /usr/lib/mono/gac/mono-service/2.0.*/ \
+ /usr/lib/mono/2.0/Mono.*.dll \
+ /usr/lib/mono/2.0/OpenSystem.C.dll"
+
+PACKAGES = "mono-jit-dbg \
+ mono-jit \
+ mono-gac-dbg \
+ mono-gac \
+ mono-mjs-dbg \
+ mono-mjs \
+ mono-gmcs-dbg \
+ mono-gmcs \
+ mono-utils-dbg \
+ mono-utils \
+ libmono-peapi1.0-cil-dbg \
+ libmono-peapi1.0-cil \
+ libmono-cairo1.0-cil-dbg \
+ libmono-cairo1.0-cil \
+ libmono-system-web2.0-cil-dbg \
+ libmono-system-web2.0-cil \
+ libmono-accessibility2.0-cil-dbg \
+ libmono-accessibility2.0-cil \
+ libmono-microsoft7.0-cil-dbg \
+ libmono-microsoft7.0-cil \
+ libmono-winforms2.0-cil-dbg \
+ libmono-winforms2.0-cil \
+ libmono-ldap1.0-cil-dbg \
+ libmono-ldap1.0-cil \
+ libmono-sharpzip2.84-cil-dbg \
+ libmono-sharpzip2.84-cil \
+ libmono-system-data2.0-cil-dbg \
+ libmono-system-data2.0-cil \
+ libmono-corlib2.0-cil-dbg \
+ libmono-corlib2.0-cil \
+ libmono-winforms1.0-cil-dbg \
+ libmono-winforms1.0-cil \
+ libmono-microsoft8.0-cil-dbg \
+ libmono-microsoft8.0-cil \
+ libmono-corlib1.0-cil-dbg \
+ libmono-corlib1.0-cil \
+ libmono-system-web1.0-cil-dbg \
+ libmono-system-web1.0-cil \
+ libmono-system-runtime2.0-cil-dbg \
+ libmono-system-runtime2.0-cil \
+ libmono-cscompmgd8.0-cil-dbg \
+ libmono-cscompmgd8.0-cil \
+ libmono-cscompmgd7.0-cil-dbg \
+ libmono-cscompmgd7.0-cil \
+ libmono-firebirdsql1.7-cil-dbg \
+ libmono-firebirdsql1.7-cil \
+ mono-jay-dbg \
+ mono-jay \
+ libmono-data-tds1.0-cil-dbg \
+ libmono-data-tds1.0-cil \
+ libmono-sqlite1.0-cil-dbg \
+ libmono-sqlite1.0-cil \
+ libmono-relaxng1.0-cil-dbg \
+ libmono-relaxng1.0-cil \
+ libmono-dev-dbg \
+ libmono-dev \
+ libmono-accessibility1.0-cil-dbg \
+ libmono-accessibility1.0-cil \
+ mono-common-dbg \
+ mono-common \
+ libmono-oracle1.0-cil-dbg \
+ libmono-oracle1.0-cil \
+ libmono-system-data1.0-cil-dbg \
+ libmono-system-data1.0-cil \
+ libmono-bytefx0.7.6.2-cil-dbg \
+ libmono-bytefx0.7.6.2-cil \
+ libmono0-dbg \
+ libmono0 \
+ libmono-sharpzip0.6-cil-dbg \
+ libmono-sharpzip0.6-cil \
+ libmono-data-tds2.0-cil-dbg \
+ libmono-data-tds2.0-cil \
+ libmono-system-messaging1.0-cil-dbg \
+ libmono-system-messaging1.0-cil \
+ libmono-npgsql1.0-cil-dbg \
+ libmono-npgsql1.0-cil \
+ libmono-security2.0-cil-dbg \
+ libmono-security2.0-cil \
+ libmono-security1.0-cil-dbg \
+ libmono-security1.0-cil \
+ libmono-bytefx0.7.6.1-cil-dbg \
+ libmono-bytefx0.7.6.1-cil \
+ libmono-microsoft-build2.0-cil-dbg \
+ libmono-microsoft-build2.0-cil \
+ libmono-system-ldap1.0-cil-dbg \
+ libmono-system-ldap1.0-cil \
+ libmono-relaxng2.0-cil-dbg \
+ libmono-relaxng2.0-cil \
+ libmono-system-ldap2.0-cil-dbg \
+ libmono-system-ldap2.0-cil \
+ libmono-system-messaging2.0-cil-dbg \
+ libmono-system-messaging2.0-cil \
+ libmono-sharpzip0.84-cil-dbg \
+ libmono-sharpzip0.84-cil \
+ libmono-sqlite2.0-cil-dbg \
+ libmono-sqlite2.0-cil \
+ libmono-ldap2.0-cil-dbg \
+ libmono-ldap2.0-cil \
+ libmono-npgsql2.0-cil-dbg \
+ libmono-npgsql2.0-cil \
+ libmono-system-runtime1.0-cil-dbg \
+ libmono-system-runtime1.0-cil \
+ libmono-oracle2.0-cil-dbg \
+ libmono-oracle2.0-cil \
+ libmono-c5-1.0-cil-dbg \
+ libmono-c5-1.0-cil \
+ libmono-sharpzip2.6-cil-dbg \
+ libmono-sharpzip2.6-cil \
+ libmono-cairo2.0-cil-dbg \
+ libmono-cairo2.0-cil \
+ libmono-peapi2.0-cil-dbg \
+ libmono-peapi2.0-cil \
+ mono-mcs-dbg \
+ mono-mcs \
+ libmono-system1.0-cil-dbg \
+ libmono-system1.0-cil \
+ libmono-system2.0-cil-dbg \
+ libmono-system2.0-cil \
+ libmono1.0-cil-dbg \
+ libmono1.0-cil \
+ libmono2.0-cil-dbg \
+ libmono2.0-cil"
diff --git a/packages/mono/mono_1.2.5.1.bb b/packages/mono/mono_1.2.5.1.bb
index e1f3f1b6a5..1d58c2d810 100644
--- a/packages/mono/mono_1.2.5.1.bb
+++ b/packages/mono/mono_1.2.5.1.bb
@@ -1,19 +1,79 @@
require mono_1.2.5.inc
-DEPENDS = "mono-native glib-2.0"
+DEPENDS = "mono-native mono-mcs-intermediate glib-2.0 perl-native"
-PR = "r1"
+PR = "r3"
-SRC_URI += "file://configure.patch;patch=1"
+SRC_URI += "file://configure.patch;patch=1 \
+ file://genmdesc-cpp.patch;patch=1"
+
+# Per http://www.mono-project.com/Mono:ARM
+EXTRA_OECONF += " --disable-mcs-build "
+# Instead, get the mcs tree from a different build (see mono-mcs-intermediate)
+
+do_install_prepend() {
+ install -d ${D}
+ pushd ${D}
+ tar -xzf ${STAGING_DIR}/share/mono-mcs/mono-mcs-${PV}.tar.gz
+ popd
+}
do_install_append() {
- install -d ${D}${libdir}/mono/1.0/
- cp ${S}/mcs/class/lib/monolite/* ${D}${libdir}/mono/1.0/
+ # mono-mcs-intermediate builds and installs jay (a Yacc for Java and C#),
+ # however, jay is not being cross-compiled and thus only
+ # available for the buildhost architecture, so remove it
+ # entirely
+ pushd ${D}
+ rm -rf ./usr/share/man/man1/jay.1 ./usr/share/jay \
+ ./usr/share/jay/README.jay \
+ ./usr/bin/jay
+ popd
+
+ # Not packaged with the default rules and apparently
+ # not used for anything
+ rm -rf ${D}${datadir}/mono-1.0/mono/cil/cil-opcodes.xml
}
-EXTRA_OECONF += " --disable-mcs-build "
+inherit mono
+
+# Import file definitions from Debian
+require mono_1.2.5.1-files.inc
+
+# Add some packages
+PACKAGES_append = " mono-doc mono mono-runtime"
+
+FILES_mono-doc_append = " /usr/share/libgc-mono/ "
+
+FILES_mono = ""
+ALLOW_EMPTY_mono = "1"
+RDEPENDS_mono = "mono-common mono-jit"
+
+FILES_mono-runtime = ""
+ALLOW_EMPTY_mono-runtime = "1"
+RDEPENDS_mono-runtime = "mono-jit mono-gac"
+
+RDEPENDS_mono-jit = "mono-common"
+
+FILES_libmono-dev =+ " /usr/lib/libmono.la /usr/lib/libmono-profiler-cov.la /usr/lib/libmono-profiler-aot.la \
+ /usr/lib/libMonoPosixHelper.la /usr/lib/libMonoSupportW.la"
+FILES_libmono-dbg =+ " /usr/lib/.debug/libmono*.so.* /usr/lib/.debug/libikvm-native.so \
+ /usr/lib/.debug/libMonoPosixHelper.so /usr/lib/.debug/libMonoSupportW.so"
+
+# Packages not included in Debian
+PACKAGES_prepend = "libnunit2.2-cil-dbg libnunit2.2-cil-dev libnunit2.2-cil \
+ libmono-cecil0.5-cil-dbg libmono-cecil0.5-cil-dev libmono-cecil0.5-cil \
+ libmono-db2-1.0-cil-dbg libmono-db2-1.0-cil-dev libmono-db2-1.0-cil"
+
+FILES_libnunit2.2-cil = "/usr/lib/mono/gac/nunit.*/2.2.* /usr/lib/mono/1.0/nunit.*.dll"
+FILES_libnunit2.2-cil-dev = "/usr/lib/pkgconfig/mono-nunit.pc"
+FILES_libnunit2.2-cil-dbg = "/usr/lib/mono/gac/nunit*/2.2.*/nunit.*.dll.mdb"
-PACKAGES =+ "mono-dll"
-FILES_mono-dll = "${libdir}/mono/1.0/"
+FILES_libmono-cecil0.5-cil = "/usr/lib/mono/gac/Mono.Cecil/0.5.*"
+FILES_libmono-cecil0.5-cil-dbg = "/usr/lib/mono/gac/Mono.Cecil/0.5.0.1__0738eb9f132ed756/Mono.Cecil.dll.mdb"
+FILES_libmono-db2-1.0-cil = "/usr/lib/mono/gac/IBM.Data.DB2/1.0* /usr/lib/mono/1.0/IBM.Data.DB2.dll"
+FILES_libmono-db2-1.0-cil-dbg = "/usr/lib/mono/gac/IBM.Data.DB2/1.0*/IBM.Data.DB2.dll.mdb"
+# Move .pc files
+FILES_libmono-cairo1.0-cil-dev = "/usr/lib/pkgconfig/mono-cairo.pc"
+PACKAGES =+ " libmono-cairo1.0-cil-dev "
diff --git a/packages/mono/mono_svn.bb b/packages/mono/mono_svn.bb
new file mode 100644
index 0000000000..6644efb4e3
--- /dev/null
+++ b/packages/mono/mono_svn.bb
@@ -0,0 +1,95 @@
+require mono_svn.inc
+
+DEPENDS = "mono-native mono-mcs-intermediate glib-2.0 perl-native"
+
+PR = "r0"
+DEFAULT_PREFERENCE = "-1"
+
+SRC_URI += "file://configure-svnr87352.patch;patch=1"
+
+# Per http://www.mono-project.com/Mono:ARM
+EXTRA_OECONF += " --disable-mcs-build "
+# Instead, get the mcs tree from a different build (see mono-mcs-intermediate)
+
+do_install_prepend() {
+ install -d ${D}
+ pushd ${D}
+ tar -xzf ${STAGING_DIR}/share/mono-mcs/mono-mcs-${PV}.tar.gz
+ popd
+}
+
+do_install_append() {
+ # mono-mcs-intermediate builds and installs jay (a Yacc for Java and C#),
+ # however, jay is not being cross-compiled and thus only
+ # available for the buildhost architecture, so remove it
+ # entirely
+ pushd ${D}
+ rm -rf ./usr/share/man/man1/jay.1 ./usr/share/jay \
+ ./usr/share/jay/README.jay \
+ ./usr/bin/jay
+ popd
+
+ # Not packaged with the default rules and apparently
+ # not used for anything
+ rm -rf ${D}${datadir}/mono-1.0/mono/cil/cil-opcodes.xml
+}
+
+inherit mono
+
+# Import file definitions from Debian
+require mono_1.2.5.1-files.inc
+
+# Add some packages
+PACKAGES_append = " mono-doc mono mono-runtime"
+
+FILES_mono-doc_append = " /usr/share/libgc-mono/ "
+
+FILES_mono = ""
+ALLOW_EMPTY_mono = "1"
+RDEPENDS_mono = "mono-common mono-jit"
+
+FILES_mono-runtime = ""
+ALLOW_EMPTY_mono-runtime = "1"
+RDEPENDS_mono-runtime = "mono-jit mono-gac"
+
+RDEPENDS_mono-jit = "mono-common"
+
+FILES_libmono-dev =+ " /usr/lib/libmono.la /usr/lib/libmono-profiler-cov.la /usr/lib/libmono-profiler-aot.la \
+ /usr/lib/libMonoPosixHelper.la /usr/lib/libMonoSupportW.la"
+FILES_libmono-dbg =+ " /usr/lib/.debug/libmono*.so.* /usr/lib/.debug/libikvm-native.so \
+ /usr/lib/.debug/libMonoPosixHelper.so /usr/lib/.debug/libMonoSupportW.so"
+
+# Packages not included in Debian
+PACKAGES_prepend = "libnunit2.2-cil-dbg libnunit2.2-cil-dev libnunit2.2-cil \
+ libmono-cecil0.6-cil-dbg libmono-cecil0.6-cil-dev libmono-cecil0.6-cil \
+ libmono-cecil-mdb0.2-cil-dbg libmono-cecil-mdb0.2-cil \
+ libmono-db2-1.0-cil-dbg libmono-db2-1.0-cil-dev libmono-db2-1.0-cil \
+ libmono-mozilla0.1-cil-dbg libmono-mozilla0.1-cil \
+ libmono-system-web-extensions1.0-cil-dbg libmono-system-web-extensions1.0-cil"
+
+FILES_libnunit2.2-cil = "/usr/lib/mono/gac/nunit.*/2.2.* /usr/lib/mono/1.0/nunit.*.dll"
+FILES_libnunit2.2-cil-dev = "/usr/lib/pkgconfig/mono-nunit.pc"
+FILES_libnunit2.2-cil-dbg = "/usr/lib/mono/gac/nunit*/2.2.*/nunit.*.dll.mdb"
+
+FILES_libmono-cecil0.6-cil = "/usr/lib/mono/gac/Mono.Cecil*/0.6.*"
+FILES_libmono-cecil0.6-cil-dbg = "/usr/lib/mono/gac/Mono.Cecil*/0.6.*/Mono.Cecil*.dll.mdb"
+FILES_libmono-cecil0.6-cil-dev = "/usr/lib/pkgconfig/cecil.pc"
+
+FILES_libmono-cecil-mdb0.2-cil = "/usr/lib/mono/gac/Mono.Cecil.Mdb/0.2.*"
+FILES_libmono-cecil-mdb0.2-cil-dbg = "/usr/lib/mono/gac/Mono.Cecil.Mdb/0.2.*/Mono.Cecil*.dll.mdb"
+
+FILES_libmono-db2-1.0-cil = "/usr/lib/mono/gac/IBM.Data.DB2/1.0* /usr/lib/mono/1.0/IBM.Data.DB2.dll"
+FILES_libmono-db2-1.0-cil-dbg = "/usr/lib/mono/gac/IBM.Data.DB2/1.0*/IBM.Data.DB2.dll.mdb"
+
+FILES_libmono-system2.0-cil-dbg_append = " /usr/lib/mono/gac/System.Core/3.5.*/*.mdb "
+FILES_libmono-system2.0-cil_append = " /usr/lib/mono/gac/System.Core/3.5.* "
+
+FILES_libmono-mozilla0.1-cil-dbg = "/usr/lib/mono/gac/Mono.Mozilla/0.1.0.0*/Mono.Mozilla.dll.mdb"
+FILES_libmono-mozilla0.1-cil = "/usr/lib/mono/gac/Mono.Mozilla/0.1.0.0*/Mono.Mozilla.dll"
+
+FILES_libmono-system-web-extensions1.0-cil-dbg = "/usr/lib/mono/gac/System.Web.Extensions*/1.0*/*.mdb"
+FILES_libmono-system-web-extensions1.0-cil = "/usr/lib/mono/gac/System.Web.Extensions*/1.0*/*.dll"
+
+# Move .pc files
+FILES_libmono-cairo1.0-cil-dev = "/usr/lib/pkgconfig/mono-cairo.pc"
+PACKAGES =+ " libmono-cairo1.0-cil-dev "
diff --git a/packages/mono/mono_svn.inc b/packages/mono/mono_svn.inc
new file mode 100644
index 0000000000..be007e4b9e
--- /dev/null
+++ b/packages/mono/mono_svn.inc
@@ -0,0 +1,15 @@
+DESCRIPTION = "Mono Programming Language"
+SECTION = "devel/mono"
+LICENSE = "GPL LGPL X11"
+
+SRCREV = "87352"
+SRC_URI = "svn://anonsvn.mono-project.com/source/trunk/;module=mcs;rev=${SRCREV} \
+ svn://anonsvn.mono-project.com/source/trunk/;module=mono;rev=${SRCREV} "
+
+PV = "1.2.5.1+svnr${SRCREV}"
+S = "${WORKDIR}/mono"
+
+inherit autotools
+EXTRA_OECONF_arm = "--without-tls"
+EXTRA_OECONF_mipsel = "--without-tls"
+
diff --git a/packages/mozilla/minimo_cvs.bb b/packages/mozilla/minimo_cvs.bb
index 990068b41e..5f1ae3e996 100644
--- a/packages/mozilla/minimo_cvs.bb
+++ b/packages/mozilla/minimo_cvs.bb
@@ -35,7 +35,7 @@ export ac_cv_prog_HOST_CC="${BUILD_CC}"
export ac_cv_prog_HOST_CFLAGS="${BUILD_CFLAGS}"
export ac_cv_prog_HOST_CXX="${BUILD_CXX}"
export ac_cv_prog_HOST_CXXFLAGS="${BUILD_CXXFLAGS}"
-export HOST_LIBIDL_CONFIG = "libIDL-config-2"
+export HOST_LIBIDL_CONFIG = "${STAGING_DIR}/${BUILD_SYS}/bin/libIDL-config-2"
mozdir="${libdir}/mozilla-minimo"
diff --git a/packages/mplayer/files/mplayer-imageon-svn.patch b/packages/mplayer/files/mplayer-imageon-svn.patch
index c8bb8709cd..744a520b13 100644
--- a/packages/mplayer/files/mplayer-imageon-svn.patch
+++ b/packages/mplayer/files/mplayer-imageon-svn.patch
@@ -5,9 +5,9 @@
Index: trunk/configure
===================================================================
---- trunk.orig/configure
-+++ trunk/configure
-@@ -519,6 +519,7 @@ _svga=auto
+--- trunk.orig/configure 2007-10-07 20:31:56.000000000 +0100
++++ trunk/configure 2007-10-07 20:34:38.000000000 +0100
+@@ -545,6 +545,7 @@
_vesa=auto
_fbdev=auto
_w100=no
@@ -15,7 +15,7 @@ Index: trunk/configure
_dvb=auto
_dvbhead=auto
_dxr2=auto
-@@ -820,6 +821,8 @@ for ac_option do
+@@ -860,6 +861,8 @@
--disable-fbdev) _fbdev=no ;;
--enable-w100) _w100=yes ;;
--disable-w100) _w100=no ;;
@@ -24,7 +24,7 @@ Index: trunk/configure
--enable-dvb) _dvb=yes ;;
--disable-dvb) _dvb=no ;;
--enable-dvbhead) _dvbhead=yes ;;
-@@ -4329,6 +4332,18 @@ else
+@@ -4447,6 +4450,19 @@
fi
echores "$_w100"
@@ -32,6 +32,7 @@ Index: trunk/configure
+if test "$_imageon" = yes ; then
+ _def_imageon='#define HAVE_IMAGEON 1'
+ _ld_imageon='-lw100'
++ _libs_mplayer="$_libs_mplayer $_ld_imageon"
+ _vosrc="$_vosrc vo_imageon.c"
+ _vomodules="imageon $_vomodules"
+else
@@ -43,8 +44,8 @@ Index: trunk/configure
echocheck "DVB"
if test "$_dvb" = auto ; then
-@@ -8355,6 +8370,7 @@ $_def_xmga
- $_def_syncfb
+@@ -8453,6 +8469,7 @@
+ $_def_xmga
$_def_fbdev
$_def_w100
+$_def_imageon
@@ -53,8 +54,8 @@ Index: trunk/configure
$_def_ivtv
Index: trunk/libvo/vo_imageon.c
===================================================================
---- /dev/null
-+++ trunk/libvo/vo_imageon.c
+--- /dev/null 1970-01-01 00:00:00.000000000 +0000
++++ trunk/libvo/vo_imageon.c 2007-10-07 20:31:57.000000000 +0100
@@ -0,0 +1,308 @@
+#include <stdio.h>
+#include <stdlib.h>
diff --git a/packages/mplayer/files/pxa_configure.patch b/packages/mplayer/files/pxa_configure.patch
index 85530b77c5..079d3086de 100644
--- a/packages/mplayer/files/pxa_configure.patch
+++ b/packages/mplayer/files/pxa_configure.patch
@@ -25,11 +25,11 @@ Index: MPlayer-1.0rc1/configure
+echocheck "PXA27x Overlay Support"
+if test "$_pxa" = yes ; then
-+ _def_imageon='#define HAVE_PXA 1'
++ _def_pxa='#define HAVE_PXA 1'
+ _vosrc="$_vosrc vo_pxa.c"
+ _vomodules="pxa $_vomodules"
+else
-+ _def_imageon='#undef HAVE_IMAGEON'
++ _def_pxa='#undef HAVE_PXA'
+ _novomodules="pxa $_novomodules"
+fi
+echores "$_pxa"
diff --git a/packages/mplayer/mplayer_svn.bb b/packages/mplayer/mplayer_svn.bb
index 995ed763ff..e481247970 100644
--- a/packages/mplayer/mplayer_svn.bb
+++ b/packages/mplayer/mplayer_svn.bb
@@ -2,7 +2,10 @@ DESCRIPTION = "Open Source multimedia player."
SECTION = "multimedia"
PRIORITY = "optional"
HOMEPAGE = "http://www.mplayerhq.hu/"
-DEPENDS = "virtual/libsdl libmad zlib libpng jpeg liba52 freetype fontconfig alsa-lib lzo ncurses lame libxv virtual/libx11"
+DEPENDS = "virtual/libsdl xsp libmad zlib libpng jpeg liba52 freetype fontconfig alsa-lib lzo ncurses lame libxv virtual/libx11"
+DEPENDS_append_c7x0 = " libw100 "
+DEPENDS_append_hx4700 = " libw100 "
+
RDEPENDS = "mplayer-common"
LICENSE = "GPL"
SRC_URI = "svn://svn.mplayerhq.hu/mplayer;module=trunk \
@@ -28,21 +31,20 @@ SRC_URI = "svn://svn.mplayerhq.hu/mplayer;module=trunk \
# discovers this is more general than please make this more general
# ie. for all armv4 machines.
SRC_URI_append_collie = "file://disable-executable-stack-test.patch;patch=1"
-PACKAGE_ARCH_mplayer_collie = "collie"
-PACKAGE_ARCH_mencoder_collie = "collie"
+
+PACKAGE_ARCH_collie = "collie"
+PACKAGE_ARCH_c7x0 = "c7x0"
+PACKAGE_ARCH_hx4700 = "hx4700"
RCONFLICTS_${PN} = "mplayer-atty"
RREPLACES_${PN} = "mplayer-atty"
PV = "0.0+1.0rc1+svnr${SRCREV}"
-PR = "r3"
+PR = "r5"
DEFAULT_PREFERENCE = "-1"
PARALLEL_MAKE = ""
-DEPENDS_append_c7x0 = " sharp-aticore-oss libw100 "
-DEPENDS_append_hx4700 = " libw100 "
-
S = "${WORKDIR}/trunk"
PACKAGES =+ "mencoder"
@@ -168,41 +170,23 @@ EXTRA_OECONF = " \
--disable-win32waveout \
--enable-select \
\
- --disable-runtime-cpudetection \
"
EXTRA_OECONF_append_arm = " --disable-decoder=vorbis_decoder \
--disable-encoder=vorbis_encoder"
+EXTRA_OECONF_append_c7x0 = " --enable-imageon "
+EXTRA_OECONF_append_hx4700 = " --enable-imageon "
-EXTRA_OECONF_append_progear = " --disable-sse --disable-3dnow --disable-mmxext --disable-sse2"
+#build with support for the iwmmxt instruction and pxa270fb overlay support (pxa270 and up)
+#not every iwmmxt machine has the lcd connected to pxafb, but building the module doesn't hurt
+MY_ARCH := "${PACKAGE_ARCH}"
+PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', 'iwmmxt', '${MY_ARCH}',d)}"
-#enable support for the ati imageon series (w100 and w3220)
-EXTRA_OECONF_append_c7x0 = " --enable-w100 --enable-imageon "
-EXTRA_OECONF_append_hx4700 = " --enable-imageon "
+MY_TARGET_CC_ARCH := "${TARGET_CC_ARCH}"
+TARGET_CC_ARCH = "${@base_contains('MACHINE_FEATURES', 'iwmmxt', '-march=iwmmxt -mtune=iwmmxt', '${MY_TARGET_CC_ARCH}',d)}"
-#enable pxa270 overlay support
-EXTRA_OECONF_append_spitz = " --enable-pxa --enable-iwmmxt "
-EXTRA_OECONF_append_akita = " --enable-pxa --enable-iwmmxt "
-EXTRA_OECONF_append_a780 = " --enable-pxa --enable-iwmmxt"
-EXTRA_OECONF_append_magician = " --enable-pxa --enable-iwmmxt"
-EXTRA_OECONF_append_htcuniversal = " --enable-pxa --enable-iwmmxt"
-EXTRA_OECONF_append_palmld = " --enable-pxa --enable-iwmmxt"
-
-#build with support for the iwmmxt instruction support (pxa270 and up)
-TARGET_CC_ARCH_spitz = "-march=iwmmxt -mtune=iwmmxt"
-PACKAGE_ARCH_spitz = "iwmmxt"
-TARGET_CC_ARCH_akita = "-march=iwmmxt -mtune=iwmmxt"
-PACKAGE_ARCH_akita = "iwmmxt"
-TARGET_CC_ARCH_a780 = "-march=iwmmxt -mtune=iwmmxt"
-PACKAGE_ARCH_a780 = "iwmmxt"
-TARGET_CC_ARCH_hx4700 = "-march=iwmmxt -mtune=iwmmxt"
-PACKAGE_ARCH_hx4700 = "iwmmxt"
-TARGET_CC_ARCH_magician = "-march=iwmmxt -mtune=iwmmxt"
-PACKAGE_ARCH_magician = "iwmmxt"
-TARGET_CC_ARCH_htcuniversal = "-march=iwmmxt -mtune=iwmmxt"
-PACKAGE_ARCH_htcuniversal = "iwmmxt"
-TARGET_CC_ARCH_palmld = "-march=iwmmxt -mtune=iwmmxt"
-PACKAGE_ARCH_palmld = "iwmmxt"
+EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'iwmmxt', '--enable-pxa --enable-iwmmxt', '',d)} "
+EXTRA_OECONF_append = " ${@base_contains('MACHINE_FEATURES', 'x86', '--enable-runtime-cpudetection', '',d)} "
do_configure() {
cp ${WORKDIR}/vo_w100.c ${S}/libvo
diff --git a/packages/mtd/mtd-utils-native.inc b/packages/mtd/mtd-utils-native.inc
index da9759f02f..8ac4673524 100644
--- a/packages/mtd/mtd-utils-native.inc
+++ b/packages/mtd/mtd-utils-native.inc
@@ -3,8 +3,12 @@ DEPENDS = "zlib-native lzo-native"
FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/mtd-utils"
do_stage () {
+ install -d ${STAGING_INCDIR}/mtd
+ for f in ${S}/include/mtd/*.h; do
+ install -m 0644 $f ${STAGING_INCDIR}/mtd/
+ done
for binary in ${mtd_utils}; do
install -m 0755 $binary ${STAGING_BINDIR}
done
}
- \ No newline at end of file
+
diff --git a/packages/mtd/mtd-utils-native_1.0.0+git.bb b/packages/mtd/mtd-utils-native_1.0.0+git.bb
index 6f9d71e10c..6e310cb1b4 100644
--- a/packages/mtd/mtd-utils-native_1.0.0+git.bb
+++ b/packages/mtd/mtd-utils-native_1.0.0+git.bb
@@ -1,2 +1,3 @@
require mtd-utils_${PV}.bb
require mtd-utils-native.inc
+
diff --git a/packages/mtd/mtd-utils-tests_1.0.0+git.bb b/packages/mtd/mtd-utils-tests_1.0.0+git.bb
new file mode 100644
index 0000000000..b5240009a7
--- /dev/null
+++ b/packages/mtd/mtd-utils-tests_1.0.0+git.bb
@@ -0,0 +1,59 @@
+require mtd-utils_1.0.0+git.bb
+
+# this can probably be integrated into the main mtd-utils package
+# but I did not want to risk breakage -- but would be glad to
+# integrate them if that is best -- cbrake
+
+SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=${TAG}"
+
+PR = "r1"
+
+S = "${WORKDIR}/git/tests/fs-tests"
+
+FILES_${PN} = "${datadir}/mtd-utils"
+
+do_compile () {
+ make || die "Make failed"
+}
+
+do_stage () {
+}
+
+INHIBIT_PACKAGE_STRIP = "1"
+
+mtd_utils_tests = " \
+ help_all.sh \
+ run_all.sh \
+ integrity/integck \
+ simple/ftrunc \
+ simple/test_1 \
+ simple/test_2 \
+ stress/stress00.sh \
+ stress/stress01.sh \
+ stress/atoms/fwrite00 \
+ stress/atoms/gcd_hupper \
+ stress/atoms/pdfrun \
+ stress/atoms/rmdir00 \
+ stress/atoms/rndrm00 \
+ stress/atoms/rndrm99 \
+ stress/atoms/rndwrite00 \
+ stress/atoms/stress_1 \
+ stress/atoms/stress_2 \
+ stress/atoms/stress_3 \
+ utils/free_space \
+ utils/fstest_monitor \
+ "
+
+do_install () {
+ install -d ${D}${datadir}/mtd-utils/tests
+ install -d ${D}${datadir}/mtd-utils/tests/integrity
+ install -d ${D}${datadir}/mtd-utils/tests/simple
+ install -d ${D}${datadir}/mtd-utils/tests/stress
+ install -d ${D}${datadir}/mtd-utils/tests/stress/atoms
+ install -d ${D}${datadir}/mtd-utils/tests/utils
+ for app in ${mtd_utils_tests}; do
+ install -m 0755 $app ${D}${datadir}/mtd-utils/tests/$app
+ done
+}
+
+
diff --git a/packages/mtd/mtd-utils_1.0.0+git.bb b/packages/mtd/mtd-utils_1.0.0+git.bb
index 8b14faa1d6..33f95853f6 100644
--- a/packages/mtd/mtd-utils_1.0.0+git.bb
+++ b/packages/mtd/mtd-utils_1.0.0+git.bb
@@ -3,7 +3,7 @@ SECTION = "base"
DEPENDS = "zlib lzo"
HOMEPAGE = "http://www.linux-mtd.infradead.org/"
LICENSE = "GPLv2"
-PR = "r5"
+PR = "r6"
# This is the default package, thus we lock to a specific git version so
# upstream changes will not break builds.
diff --git a/packages/musicpd/mpd-alsa_svn.bb b/packages/musicpd/mpd-alsa_svn.bb
new file mode 100644
index 0000000000..f86ae6a337
--- /dev/null
+++ b/packages/musicpd/mpd-alsa_svn.bb
@@ -0,0 +1,57 @@
+DESCRIPTION = "Music Player Daemon (mpd). This version is configured for alsa support"
+HOMEPAGE = "http://www.musicpd.org"
+SECTION = "console/multimedia"
+LICENSE = "GPLv2"
+DEPENDS = "libvorbis libogg libid3tag libao-alsa zlib libmad flac audiofile virtual/libiconv faad2"
+RDEPENDS = "libao-alsa"
+PV = "0.11.5+svnr${SRCREV}"
+PR = "r2"
+
+SRC_URI = "svn://svn.musicpd.org/mpd;module=trunk;proto=https \
+ file://mpd/mpd.init"
+# file://mpd/save-volume-state.patch;patch=1 \
+
+S = "${WORKDIR}/trunk"
+
+inherit autotools update-rc.d
+INITSCRIPT_NAME = "mpd"
+
+# Setting --enable-mpd-{mad,id3tag} causes local caches of the libraries to
+# be built, instead we use the OE built versions which should be installed
+# in staging - remove the --with and replace with --enable to use the local
+# versions.
+
+EXTRA_OECONF = "\
+--enable-ogg \
+--enable-oggvorbis \
+--disable-oggflac \
+--enable-flac \
+--enable-faad \
+--with-ao-libraries=${STAGING_LIBDIR} \
+--with-ao-includes=${STAGING_INCDIR} \
+--with-iconv-libraries=${STAGING_LIBDIR} \
+--with-iconv-includes=${STAGING_INCDIR} \
+--with-id3tag-libraries=${STAGING_LIBDIR} \
+--with-id3tag-includes=${STAGING_INCDIR} \
+--with-faad-libraries=${STAGING_LIBDIR} \
+--with-faad-includes=${STAGING_INCDIR} \
+--with-mad-libraries=${STAGING_LIBDIR} \
+--with-mad-includes=${STAGING_INCDIR} \
+--with-ogg-libraries=${STAGING_LIBDIR} \
+--with-ogg-includes=${STAGING_INCDIR} \
+--with-vorbis-libraries=${STAGING_LIBDIR} \
+--with-vorbis-includes=${STAGING_INCDIR} \
+--disable-aotest \
+--disable-alsatest \
+--disable-oggtest \
+--disable-vorbistest \
+--disable-libFLACtest \
+--disable-libOggFLACtest \
+--disable-audiofiletest \
+--disable-libmikmodtest \
+"
+
+do_install_append() {
+ install -d ${D}${sysconfdir}/init.d
+ install -m 755 ${WORKDIR}/mpd/mpd.init ${D}${sysconfdir}/init.d/mpd
+}
diff --git a/packages/netbase/netbase/ghi270/.mtn2git_empty b/packages/netbase/netbase/ghi270/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/netbase/netbase/ghi270/.mtn2git_empty
diff --git a/packages/nfs-utils/files/uclibc_bzero_fix.patch b/packages/nfs-utils/files/uclibc_bzero_fix.patch
index 9a276d326e..2006192d28 100644
--- a/packages/nfs-utils/files/uclibc_bzero_fix.patch
+++ b/packages/nfs-utils/files/uclibc_bzero_fix.patch
@@ -15,54 +15,3 @@ Index: nfs-utils-1.0.6/support/nfs/svc_socket.c
addr.sin_family = AF_INET;
#ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
----
- support/nfs/svc_socket.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: nfs-utils-1.0.6/support/nfs/svc_socket.c
-===================================================================
---- nfs-utils-1.0.6.orig/support/nfs/svc_socket.c 2007-05-27 16:14:09.000000000 +0100
-+++ nfs-utils-1.0.6/support/nfs/svc_socket.c 2007-05-28 22:43:55.000000000 +0100
-@@ -63,7 +63,7 @@ svc_socket (u_long number, int type, int
- }
- }
-
-- __bzero ((char *) &addr, sizeof (addr));
-+ memset ((char *) &addr,0, sizeof (addr));
- addr.sin_family = AF_INET;
-
- #ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
----
- support/nfs/svc_socket.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: nfs-utils-1.0.6/support/nfs/svc_socket.c
-===================================================================
---- nfs-utils-1.0.6.orig/support/nfs/svc_socket.c 2007-05-27 16:14:09.000000000 +0100
-+++ nfs-utils-1.0.6/support/nfs/svc_socket.c 2007-05-28 22:43:55.000000000 +0100
-@@ -63,7 +63,7 @@ svc_socket (u_long number, int type, int
- }
- }
-
-- __bzero ((char *) &addr, sizeof (addr));
-+ memset ((char *) &addr,0, sizeof (addr));
- addr.sin_family = AF_INET;
-
- #ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
----
- support/nfs/svc_socket.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: nfs-utils-1.0.6/support/nfs/svc_socket.c
-===================================================================
---- nfs-utils-1.0.6.orig/support/nfs/svc_socket.c 2007-05-27 16:14:09.000000000 +0100
-+++ nfs-utils-1.0.6/support/nfs/svc_socket.c 2007-05-28 22:43:55.000000000 +0100
-@@ -63,7 +63,7 @@ svc_socket (u_long number, int type, int
- }
- }
-
-- __bzero ((char *) &addr, sizeof (addr));
-+ memset ((char *) &addr,0, sizeof (addr));
- addr.sin_family = AF_INET;
-
- #ifndef __UCLIBC__ /* neither getrpcbynumber() nor getrpcbynumber_r() is SuSv3 */
diff --git a/packages/nfs-utils/nfs-utils_1.0.6.bb b/packages/nfs-utils/nfs-utils_1.0.6.bb
index 15e3914472..1febf057bf 100644
--- a/packages/nfs-utils/nfs-utils_1.0.6.bb
+++ b/packages/nfs-utils/nfs-utils_1.0.6.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "userspace utilities for kernel nfs"
PRIORITY = "optional"
SECTION = "console/network"
LICENSE = "GPL"
-PR = "r12"
+PR = "r13"
SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.gz \
file://acinclude-lossage.patch;patch=1 \
diff --git a/packages/nonworking/gutenprint/gutenprint_5.0.0.bb b/packages/nonworking/gutenprint/gutenprint_5.0.0.bb
deleted file mode 100644
index 5a0de7797f..0000000000
--- a/packages/nonworking/gutenprint/gutenprint_5.0.0.bb
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-DEPENDS = "glib-2.0 gtk+ cups"
-
-inherit autotools pkgconfig
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/gimp-print/${P}.tar.bz2"
-
-EXTRA_OECONF = "\
- --disable-gtktest \
- --disable-libgutenprintui \
- --enable-libgutenprintui2 \
- --enable-translated-cups-ppds \
- --disable-gimptest \
- "
-
-do_configure() {
- oe_runconf
-}
-
-
diff --git a/packages/openmoko-panel-plugins/openmoko-panel-bt_svn.bb b/packages/openmoko-panel-plugins/openmoko-panel-bt_svn.bb
index e87a26230f..abd2654ce9 100644
--- a/packages/openmoko-panel-plugins/openmoko-panel-bt_svn.bb
+++ b/packages/openmoko-panel-plugins/openmoko-panel-bt_svn.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Shows the bluetooth status in the OpenMoko panel"
-DEPENDS = "bluez-libs"
+DEPENDS = "bluez-libs libnotify"
PV = "0.1.0+svn${SVNREV}"
PR = "r1"
diff --git a/packages/openmoko-panel-plugins/openmoko-panel-gsm_svn.bb b/packages/openmoko-panel-plugins/openmoko-panel-gsm_svn.bb
index 76401a2b58..079d6ffeea 100644
--- a/packages/openmoko-panel-plugins/openmoko-panel-gsm_svn.bb
+++ b/packages/openmoko-panel-plugins/openmoko-panel-gsm_svn.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Shows the GSM / GPRS status in the OpenMoko panel"
-DEPENDS = "libgsmd"
+DEPENDS = "libgsmd libnotify"
PV = "0.1.0+svn${SVNREV}"
PR = "r0"
diff --git a/packages/openmoko2/libmokojournal2_svn.bb b/packages/openmoko2/libmokojournal2_svn.bb
index 6e5383af83..09e249ff4f 100644
--- a/packages/openmoko2/libmokojournal2_svn.bb
+++ b/packages/openmoko2/libmokojournal2_svn.bb
@@ -5,6 +5,10 @@ PR = "r2"
inherit openmoko2 lib_package
+do_configure_prepend() {
+ touch gtk-doc.make
+}
+
do_stage() {
autotools_stage_all
}
diff --git a/packages/openmoko2/neod_svn.bb b/packages/openmoko2/neod_svn.bb
index 6e6c3b6019..f68d2e4919 100644
--- a/packages/openmoko2/neod_svn.bb
+++ b/packages/openmoko2/neod_svn.bb
@@ -1,8 +1,9 @@
DESCRIPTION = "Simple Neo1973 Daemon for Button Handling and Power Management"
SECTION = "openmoko/daemons"
-DEPENDS = "gconf gtk+ pulseaudio"
+DEPENDS = "gtk+ pulseaudio"
+RDEPENDS = "gpe-scap xrandr alsa-utils-amixer apm"
PV = "0.1.0+svn${SVNREV}"
-PR = "r1"
+PR = "r4"
inherit openmoko2 gconf
diff --git a/packages/openmoko2/openmoko-appmanager2_svn.bb b/packages/openmoko2/openmoko-appmanager2_svn.bb
new file mode 100644
index 0000000000..24b21c668b
--- /dev/null
+++ b/packages/openmoko2/openmoko-appmanager2_svn.bb
@@ -0,0 +1,10 @@
+DESCRIPTION = "The OpenMoko Application Manager"
+SECTION = "openmoko/applications"
+DEPENDS = "libmokoui2 libmokojournal2 startup-notification dbus-glib libice libsm ipkg"
+PV = "0.1.0+svn${SVNREV}"
+PR = "r0"
+
+inherit openmoko2
+
+FILES_${PN} += "/usr/share/openmoko-appmanager"
+
diff --git a/packages/openmoko2/openmoko-common2_svn.bb b/packages/openmoko2/openmoko-common2_svn.bb
index 0cf7f763cb..018f9a8e74 100644
--- a/packages/openmoko2/openmoko-common2_svn.bb
+++ b/packages/openmoko2/openmoko-common2_svn.bb
@@ -1,21 +1,19 @@
DESCRIPTION = "Common files for the OpenMoko distribution"
SECTION = "openmoko/base"
PV = "0.0+svnr${SRCREV}"
-PR = "r3"
+PR = "r5"
inherit openmoko2
SRC_URI = "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/artwork;module=pixmaps;proto=http"
S = "${WORKDIR}"
+ALLOW_EMPTY = "1"
+
dirs = "pixmaps"
do_install() {
- find ${WORKDIR} -name ".svn" | xargs rm -rf
- install -d ${D}${datadir}
- for i in ${dirs}; do
- cp -fpPR ${S}/$i ${D}${datadir}
- done
+ :
}
PACKAGE_ARCH = "all"
diff --git a/packages/openmoko2/openmoko-dates2_svn.bb b/packages/openmoko2/openmoko-dates2_svn.bb
index 9650a20b0d..14a71d423a 100644
--- a/packages/openmoko2/openmoko-dates2_svn.bb
+++ b/packages/openmoko2/openmoko-dates2_svn.bb
@@ -10,3 +10,8 @@ SRC_URI = "svn://svn.o-hand.com/repos/dates/branches;module=jana;proto=http"
S = "${WORKDIR}/jana/"
EXTRA_OECONF = "--with-frontend=openmoko"
+
+do_configure_prepend() {
+ touch gtk-doc.make
+}
+
diff --git a/packages/openmoko2/openmoko-mediaplayer2_svn.bb b/packages/openmoko2/openmoko-mediaplayer2_svn.bb
index e353bcbaa7..42a71b1472 100644
--- a/packages/openmoko2/openmoko-mediaplayer2_svn.bb
+++ b/packages/openmoko2/openmoko-mediaplayer2_svn.bb
@@ -1,9 +1,9 @@
DESCRIPTION = "A media player for OpenMoko"
SECTION = "openmoko/tools"
-DEPENDS = "libmokoui2 expat gstreamer libspiff"
+DEPENDS = "libmokoui2 expat gstreamer libspiff curl"
RDEPENDS = "gst-meta-audio"
PV = "0.1.0+svn${SVNREV}"
-PR = "r1"
+PR = "r2"
inherit openmoko2
diff --git a/packages/openmoko2/openmoko-session2.bb b/packages/openmoko2/openmoko-session2.bb
index b1f9dae38d..65cb7f1ca6 100644
--- a/packages/openmoko2/openmoko-session2.bb
+++ b/packages/openmoko2/openmoko-session2.bb
@@ -4,7 +4,7 @@ SECTION = "x11"
RDEPENDS = "matchbox-common matchbox-applet-startup-monitor matchbox-panel-2"
RDEPENDS += "openmoko-common2 openmoko-today2 openmoko-dialer2"
RCONFLICTS = "openmoko-session"
-PR = "r33"
+PR = "r34"
SRC_URI = "file://etc"
S = ${WORKDIR}
@@ -29,6 +29,9 @@ gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --dire
gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type int --set /desktop/poky/peripherals/mouse/drag_threshold 8
gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct --type int --set /desktop/openmoko/neod/power_management 2
+gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct -t string --set /system/gstreamer/0.10/default/audiosink pulsesink
+gconftool-2 --config-source=xml::$D${sysconfdir}/gconf/gconf.xml.defaults --direct -t string --set /system/gstreamer/0.10/default/audiosrc pulsesrc
+
}
PACKAGE_ARCH = "all"
diff --git a/packages/openmoko2/openmoko-sound-system2/session b/packages/openmoko2/openmoko-sound-system2/session
index dfef83d934..ed2346d55f 100644
--- a/packages/openmoko2/openmoko-sound-system2/session
+++ b/packages/openmoko2/openmoko-sound-system2/session
@@ -22,7 +22,7 @@ load-sample-lazy x11-bell /usr/share/openmoko/sounds/notify_doorbell.wav
load-module module-x11-bell sample=x11-bell
# Load samples
-load-sample startup /usr/share/openmoko/sounds/startup_openmoko.wav
+load-sample startup /usr/share/openmoko/sounds/startup_unintrusive.wav
load-sample touchscreen /usr/share/openmoko/sounds/touchscreen_click.wav
load-sample ringtone /usr/share/openmoko/sounds/ringtone_classy.wav
diff --git a/packages/openmoko2/openmoko-sound-system2_0.1.0.bb b/packages/openmoko2/openmoko-sound-system2_0.1.0.bb
index 35bfe66318..e77561c3a1 100644
--- a/packages/openmoko2/openmoko-sound-system2_0.1.0.bb
+++ b/packages/openmoko2/openmoko-sound-system2_0.1.0.bb
@@ -9,10 +9,11 @@ RDEPENDS = "\
pulseaudio-module-simple-protocol-tcp \
pulseaudio-module-native-protocol-unix \
pulseaudio-module-cli-protocol-unix \
+ gst-plugin-pulse \
"
RREPLACES = "openmoko-sound-system"
RPROVIDES = "openmoko-sound-system"
-PR = "r1"
+PR = "r3"
inherit openmoko-base update-rc.d
diff --git a/packages/openmoko2/openmoko-sound-theme-standard2_svn.bb b/packages/openmoko2/openmoko-sound-theme-standard2_svn.bb
index 0693b9bb8a..1cfb519c99 100644
--- a/packages/openmoko2/openmoko-sound-theme-standard2_svn.bb
+++ b/packages/openmoko2/openmoko-sound-theme-standard2_svn.bb
@@ -3,7 +3,7 @@ SECTION = "openmoko/base"
RREPLACES = "openmoko-sound-theme-standard"
RPROVIDES = "openmoko-sound-theme-standard"
PV = "0.1+svnr${SRCREV}"
-PR = "r1"
+PR = "r2"
inherit openmoko2 autotools
@@ -16,7 +16,7 @@ do_install() {
for i in *.mp3; do
cp -fpPR ${S}/$i ${D}${datadir}/openmoko/sounds/
done
- for i in touchscreen_click.wav ringtone_classy.wav notify_doorbell.wav startup_openmoko.wav; do
+ for i in touchscreen_click.wav ringtone_classy.wav notify_doorbell.wav startup_unintrusive.wav; do
cp -f ${S}/$i ${D}${datadir}/openmoko/sounds/
done
}
diff --git a/packages/openmoko2/openmoko-theme-standard2_svn.bb b/packages/openmoko2/openmoko-theme-standard2_svn.bb
index b006f6d6dc..ec3b4f702e 100644
--- a/packages/openmoko2/openmoko-theme-standard2_svn.bb
+++ b/packages/openmoko2/openmoko-theme-standard2_svn.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Standard Gtk+ theme for the OpenMoko distribution"
SECTION = "openmoko/base"
RCONFLICTS = "openmoko-theme-standard"
PV = "0.1.0+${SVNREV}"
-PR = "r3"
+PR = "r4"
inherit openmoko2
@@ -15,11 +15,7 @@ do_install() {
cp -fpPR ${S}/* ${D}${datadir}/themes/openmoko-standard-2/
rm -rf ${D}${datadir}/themes/openmoko-standard-2/patches/
- install -d ${D}${sysconfdir}/gtk-2.0
- echo 'include "${datadir}/themes/openmoko-standard-2/gtk-2.0/gtkrc"' >> ${D}${sysconfdir}/gtk-2.0/gtkrc
}
-CONFFILES_${PN} = "${sysconfdir}/gtk-2.0/gtkrc"
-
PACKAGE_ARCH = "all"
-FILES_${PN} = "${datadir} ${sysconfdir}"
+FILES_${PN} = "${datadir}"
diff --git a/packages/openssh/files/sftp-server-nolibcrypto.patch b/packages/openssh/files/sftp-server-nolibcrypto.patch
new file mode 100644
index 0000000000..1b00bff663
--- /dev/null
+++ b/packages/openssh/files/sftp-server-nolibcrypto.patch
@@ -0,0 +1,13 @@
+Index: openssh-4.6p1/Makefile.in
+===================================================================
+--- openssh-4.6p1.orig/Makefile.in 2007-10-16 11:27:24.000000000 +0100
++++ openssh-4.6p1/Makefile.in 2007-10-16 11:27:46.000000000 +0100
+@@ -160,7 +160,7 @@
+ $(LD) -o $@ ssh-keyscan.o $(LDFLAGS) -lssh -lopenbsd-compat -lssh $(LIBS)
+
+ sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o
+- $(LD) -o $@ sftp-server.o sftp-common.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
++ $(LD) -o $@ sftp-server.o sftp-common.o $(LDFLAGS) -lssh -lopenbsd-compat
+
+ sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o
+ $(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT)
diff --git a/packages/openssh/openssh_4.6p1.bb b/packages/openssh/openssh_4.6p1.bb
index b38e7ec595..c1c84d9dc1 100644
--- a/packages/openssh/openssh_4.6p1.bb
+++ b/packages/openssh/openssh_4.6p1.bb
@@ -14,9 +14,10 @@ It is intended as a replacement for rlogin, rsh and rcp, and can be \
used to provide applications with a secure communication channel."
HOMEPAGE = "http://www.openssh.org/"
LICENSE = "BSD"
-PR = "r2"
+PR = "r3"
SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
+ file://sftp-server-nolibcrypto.patch;patch=1 \
file://sshd_config \
file://ssh_config \
file://init"
@@ -56,13 +57,14 @@ do_install_append() {
rmdir ${D}/var/run/sshd ${D}/var/run ${D}/var
}
-PACKAGES =+ " openssh-scp openssh-ssh openssh-sshd openssh-sftp openssh-misc"
+PACKAGES =+ " openssh-scp openssh-ssh openssh-sshd openssh-sftp openssh-misc openssh-sftp-server"
FILES_openssh-dbg +=${bindir}/.debug ${libdir}exec/.debug"
FILES_openssh-scp = "${bindir}/scp.${PN}"
FILES_openssh-ssh = "${bindir}/ssh.${PN} ${bindir}/slogin /${sysconfdir}/ssh/ssh_config"
FILES_openssh-sshd = "${sbindir}/sshd /${sysconfdir}/init.d/sshd ${bindir}/ssh-keygen"
FILES_openssh-sshd += " /${sysconfdir}/ssh/moduli /${sysconfdir}/ssh/sshd_config"
-FILES_openssh-sftp = "${bindir}/sftp ${libdir}exec/sftp-server"
+FILES_openssh-sftp = "${bindir}/sftp"
+FILES_openssh-sftp-server = "${libdir}exec/sftp-server"
FILES_openssh-misc = "${bindir}/ssh* ${libdir}exec/ssh*"
RDEPENDS_openssh += " openssh-scp openssh-ssh openssh-sshd"
diff --git a/packages/opie-usermanager/opie-usermanager.inc b/packages/opie-usermanager/opie-usermanager.inc
deleted file mode 100644
index 63bd0bba67..0000000000
--- a/packages/opie-usermanager/opie-usermanager.inc
+++ /dev/null
@@ -1,17 +0,0 @@
-DESCRIPTION = "User/Group manager for Opie"
-SECTION = "opie/settings"
-PRIORITY = "optional"
-LICENSE = "GPL"
-APPNAME = "usermanager"
-
-
-S = "${WORKDIR}/${APPNAME}"
-
-inherit opie
-
-# FILES plugins/application/libusermanager.so* bin/usermanager apps/Settings/usermanager.desktop pics/usermanager/*
-do_install() {
- install -d ${D}${palmtopdir}/pics/${APPNAME}/
- install -m 0644 ${WORKDIR}/pics/${APPNAME}/*.png ${D}${palmtopdir}/pics/${APPNAME}/
-}
-
diff --git a/packages/opie-usermanager/opie-usermanager_1.2.2.bb b/packages/opie-usermanager/opie-usermanager_1.2.2.bb
deleted file mode 100644
index 2233f1349f..0000000000
--- a/packages/opie-usermanager/opie-usermanager_1.2.2.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require ${PN}.inc
-
-
-
-SRC_URI = "${HANDHELDS_CVS};tag=${TAG};module=opie/noncore/settings/usermanager \
- ${HANDHELDS_CVS};tag=${TAG};module=opie/pics \
- ${HANDHELDS_CVS};tag=${TAG};module=opie/apps"
diff --git a/packages/opie-usermanager/opie-usermanager_1.2.3.bb b/packages/opie-usermanager/opie-usermanager_1.2.3.bb
deleted file mode 100644
index eb173e6532..0000000000
--- a/packages/opie-usermanager/opie-usermanager_1.2.3.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-require ${PN}.inc
-
-
-SRC_URI = "${HANDHELDS_CVS};tag=${TAG};module=opie/noncore/settings/usermanager \
- ${HANDHELDS_CVS};tag=${TAG};module=opie/pics \
- ${HANDHELDS_CVS};tag=${TAG};module=opie/apps"
diff --git a/packages/opie-usermanager/opie-usermanager_cvs.bb b/packages/opie-usermanager/opie-usermanager_cvs.bb
deleted file mode 100644
index 1f481f7461..0000000000
--- a/packages/opie-usermanager/opie-usermanager_cvs.bb
+++ /dev/null
@@ -1,7 +0,0 @@
-require ${PN}.inc
-
-PV = "${OPIE_CVS_PV}"
-
-SRC_URI = "${HANDHELDS_CVS};module=opie/noncore/settings/usermanager \
- ${HANDHELDS_CVS};module=opie/pics \
- ${HANDHELDS_CVS};module=opie/apps"
diff --git a/packages/portmap/portmap.inc b/packages/portmap/portmap.inc
index 478a5ed357..f73ac0e048 100644
--- a/packages/portmap/portmap.inc
+++ b/packages/portmap/portmap.inc
@@ -1,6 +1,7 @@
DESCRIPTION = "RPC program number mapper."
SECTION = "console/network"
LICENSE = "GPL"
+DEPENDS = "fakeroot-native"
SRC_URI = "${DEBIAN_MIRROR}/main/p/portmap/portmap_5.orig.tar.gz \
${DEBIAN_MIRROR}/main/p/portmap/portmap_${PV}.diff.gz;patch=1 \
diff --git a/packages/procps/procps-3.2.7/linux-limits.patch b/packages/procps/procps-3.2.7/linux-limits.patch
new file mode 100644
index 0000000000..dcd66163ad
--- /dev/null
+++ b/packages/procps/procps-3.2.7/linux-limits.patch
@@ -0,0 +1,13 @@
+diff --git a/pwdx.c b/pwdx.c
+index cb96a52..29ebce2 100644
+--- a/pwdx.c
++++ b/pwdx.c
+@@ -13,7 +13,7 @@
+ #include <stdlib.h>
+ #include <sys/types.h>
+ #include <regex.h>
+-#include <limits.h>
++#include <linux/limits.h>
+ #include <unistd.h>
+ #include <errno.h>
+
diff --git a/packages/procps/procps_3.2.7.bb b/packages/procps/procps_3.2.7.bb
index de7524b2cb..e6a6573635 100644
--- a/packages/procps/procps_3.2.7.bb
+++ b/packages/procps/procps_3.2.7.bb
@@ -3,7 +3,8 @@ require procps.inc
PR = "r5"
SRC_URI += "file://procmodule.patch;patch=1 \
- file://psmodule.patch;patch=1"
+ file://psmodule.patch;patch=1 \
+ file://linux-limits.patch;patch=1"
FILES = "${bindir}/top.${PN} ${base_bindir}/ps.${PN} ${bindir}/uptime.${PN} ${base_bindir}/kill.${PN} \
${bindir}/free.${PN} ${bindir}/w ${bindir}/watch ${bindir}/pgrep ${bindir}/pmap ${bindir}/pwdx \
diff --git a/packages/python/python-2.5-manifest.inc b/packages/python/python-2.5-manifest.inc
index 3d46d47bd0..e80da80d87 100644
--- a/packages/python/python-2.5-manifest.inc
+++ b/packages/python/python-2.5-manifest.inc
@@ -50,7 +50,7 @@ FILES_python-datetime="${libdir}/python2.5/_strptime.* ${libdir}/python2.5/calen
DESCRIPTION_python-core="Python Interpreter and core modules (needed!)"
PR_python-core="ml3"
RDEPENDS_python-core=""
-FILES_python-core="/usr/lib/python2.5/__future__.* /usr/lib/python2.5/copy.* /usr/lib/python2.5/copy_reg.* /usr/lib/python2.5/ConfigParser.* /usr/lib/python2.5/getopt.* /usr/lib/python2.5/linecache.* /usr/lib/python2.5/new.* /usr/lib/python2.5/os.* /usr/lib/python2.5/posixpath.* /usr/lib/python2.5/warnings.* /usr/lib/python2.5/site.* /usr/lib/python2.5/stat.* /usr/lib/python2.5/UserDict.* /usr/lib/python2.5/UserList.* /usr/lib/python2.5/UserString.* /usr/lib/python2.5/lib-dynload/binascii.so /usr/lib/python2.5/lib-dynload/struct.so /usr/lib/python2.5/lib-dynload/time.so /usr/lib/python2.5/lib-dynload/xreadlines.so /usr/lib/python2.5/types.* /usr/bin/python* "
+FILES_python-core="${libdir}/python2.5/__future__.* ${libdir}/python2.5/copy.* ${libdir}/python2.5/copy_reg.* ${libdir}/python2.5/ConfigParser.* ${libdir}/python2.5/getopt.* ${libdir}/python2.5/linecache.* ${libdir}/python2.5/new.* ${libdir}/python2.5/os.* ${libdir}/python2.5/posixpath.* ${libdir}/python2.5/warnings.* ${libdir}/python2.5/site.* ${libdir}/python2.5/stat.* ${libdir}/python2.5/UserDict.* ${libdir}/python2.5/UserList.* ${libdir}/python2.5/UserString.* ${libdir}/python2.5/lib-dynload/binascii.so ${libdir}/python2.5/lib-dynload/struct.so ${libdir}/python2.5/lib-dynload/time.so ${libdir}/python2.5/lib-dynload/xreadlines.so ${libdir}/python2.5/types.* ${bindir}/python* "
DESCRIPTION_python-io="Python Low-Level I/O"
PR_python-io="ml1"
@@ -95,7 +95,7 @@ FILES_python-image="${libdir}/python2.5/colorsys.* ${libdir}/python2.5/imghdr.*
DESCRIPTION_python-core-dbg="Python core module debug information"
PR_python-core-dbg="ml1"
RDEPENDS_python-core-dbg="python-core"
-FILES_python-core-dbg="/usr/lib/python2.5/lib-dynload/.debug /usr/bin/.debug /usr/lib/.debug "
+FILES_python-core-dbg="${libdir}/python2.5/lib-dynload/.debug ${bindir}/.debug ${libdir}/.debug "
DESCRIPTION_python-resource="Python Resource Control Interface"
PR_python-resource="ml1"
@@ -105,7 +105,7 @@ FILES_python-resource="${libdir}/python2.5/lib-dynload/resource.so "
DESCRIPTION_python-devel="Python Development Package"
PR_python-devel="ml1"
RDEPENDS_python-devel="python-core"
-FILES_python-devel="/usr/include /usr/lib/python2.5/config "
+FILES_python-devel="${includedir} ${libdir}/python2.5/config "
DESCRIPTION_python-math="Python Math Support"
PR_python-math="ml1"
@@ -165,7 +165,7 @@ FILES_python-curses="${libdir}/python2.5/curses ${libdir}/python2.5/lib-dynload/
DESCRIPTION_python-smtpd="Python Simple Mail Transport Daemon"
PR_python-smtpd="ml1"
RDEPENDS_python-smtpd="python-core python-netserver python-email python-mime"
-FILES_python-smtpd="/usr/bin/smtpd.* "
+FILES_python-smtpd="${bindir}/smtpd.* "
DESCRIPTION_python-html="Python HTML Processing"
PR_python-html="ml1"
@@ -185,7 +185,7 @@ FILES_python-subprocess="${libdir}/python2.5/subprocess.* "
DESCRIPTION_python-pydoc="Python Interactive Help Support"
PR_python-pydoc="ml1"
RDEPENDS_python-pydoc="python-core python-lang python-stringold python-re"
-FILES_python-pydoc="/usr/bin/pydoc /usr/lib/python2.5/pydoc.* "
+FILES_python-pydoc="${bindir}/pydoc ${libdir}/python2.5/pydoc.* "
DESCRIPTION_python-logging="Python Logging Support"
PR_python-logging="ml1"
@@ -280,7 +280,7 @@ FILES_python-crypt="${libdir}/python2.5/lib-dynload/crypt.so ${libdir}/python2.5
DESCRIPTION_python-idle="Python Integrated Development Environment"
PR_python-idle="ml1"
RDEPENDS_python-idle="python-core python-tkinter"
-FILES_python-idle="/usr/bin/idle /usr/lib/python2.5/idlelib "
+FILES_python-idle="${bindir}/idle ${libdir}/python2.5/idlelib "
DESCRIPTION_python-lang="Python Low-Level Language Support"
PR_python-lang="ml1"
diff --git a/packages/python/python-pygobject-native_2.12.2.bb b/packages/python/python-pygobject-native_2.12.2.bb
deleted file mode 100644
index c93950b31b..0000000000
--- a/packages/python/python-pygobject-native_2.12.2.bb
+++ /dev/null
@@ -1,3 +0,0 @@
-require python-pygobject_${PV}.bb
-
-DEPENDS = "python-native"
diff --git a/packages/python/python-pygobject-native_2.12.3.bb b/packages/python/python-pygobject-native_2.12.3.bb
index 86d778c5ab..cb879fdeb1 100644
--- a/packages/python/python-pygobject-native_2.12.3.bb
+++ b/packages/python/python-pygobject-native_2.12.3.bb
@@ -1,6 +1,6 @@
require python-pygobject_${PV}.bb
-DEPENDS = "python-native"
+DEPENDS = "python-native glib-2.0-native"
SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/2.12/pygobject-${PV}.tar.bz2 "
diff --git a/packages/python/python-pygobject_2.12.2.bb b/packages/python/python-pygobject_2.12.2.bb
deleted file mode 100644
index 1604b54715..0000000000
--- a/packages/python/python-pygobject_2.12.2.bb
+++ /dev/null
@@ -1,23 +0,0 @@
-DESCRIPTION = "Python GObject bindings"
-SECTION = "devel/python"
-LICENSE = "LGPL"
-DEPENDS = "python-pygobject-native"
-PR = "ml2"
-
-SRC_URI = "ftp://ftp.gnome.org/pub/GNOME/sources/pygobject/2.12/pygobject-${PV}.tar.bz2"
-S = "${WORKDIR}/pygobject-${PV}"
-
-inherit autotools distutils-base pkgconfig
-
-# otherwise the main package keeps snatching the .pc file away
-# and therefore depends on glib-2.0-dev (which only the -dev
-# package should).
-PACKAGES =+ "${PN}-dev"
-
-do_stage() {
- autotools_stage_all
- install -d ${STAGING_LIBDIR}/../share/pygobject/
- cp -dpfR docs/* ${STAGING_LIBDIR}/../share/pygobject/
- install -d ${STAGING_LIBDIR}/../share/gtk-doc/html/pygobject/
- cp docs/style.css ${STAGING_LIBDIR}/../share/gtk-doc/html/pygobject/
-}
diff --git a/packages/python/python-pygtk_2.10.4.bb b/packages/python/python-pygtk_2.10.4.bb
index e1f77984d1..e90b86bf1c 100644
--- a/packages/python/python-pygtk_2.10.4.bb
+++ b/packages/python/python-pygtk_2.10.4.bb
@@ -5,7 +5,7 @@ DEPENDS = "gtk+ libglade python-pycairo python-pygobject"
RDEPENDS = "python-shell python-pycairo python-pygobject"
SRCNAME = "pygtk"
LICENSE = "LGPL"
-PR = "ml2"
+PR = "ml3"
SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.10/${SRCNAME}-${PV}.tar.bz2 \
file://fix-gtkunixprint.patch;patch=1 \
@@ -31,7 +31,6 @@ do_configure_prepend() {
}
require fix-path.inc
-PACKAGES =+ "${PN}-dev"
FILES_${PN}-dev += "${libdir}/pygtk/2.0 ${bindir}/pygtk-*"
FILES_${PN}-dbg += "${libdir}/python2.4/site-packages/gtk-2.0/*/.debug"
FILES_${PN}-dbg += "${libdir}/python2.4/site-packages/gtk-2.0/.debug"
diff --git a/packages/qmake/qmake2-native-2.10a/use-lflags-last.patch b/packages/qmake/qmake2-native-2.10a/use-lflags-last.patch
new file mode 100644
index 0000000000..4197dbbf64
--- /dev/null
+++ b/packages/qmake/qmake2-native-2.10a/use-lflags-last.patch
@@ -0,0 +1,22 @@
+Index: qtopia-core-opensource-src-4.3.1/qmake/generators/unix/unixmake2.cpp
+===================================================================
+--- qtopia-core-opensource-src-4.3.1.orig/qmake/generators/unix/unixmake2.cpp 2007-10-07 13:45:26.000000000 +0200
++++ qtopia-core-opensource-src-4.3.1/qmake/generators/unix/unixmake2.cpp 2007-10-07 13:57:09.000000000 +0200
+@@ -416,7 +416,7 @@
+ t << "\n\t" << mkdir_p_asstring(destdir) << "\n\t";
+ if(!project->isEmpty("QMAKE_PRE_LINK"))
+ t << var("QMAKE_PRE_LINK") << "\n\t";
+- t << "$(LINK) $(LFLAGS) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS)";
++ t << "$(LINK) -o $(TARGET) " << incr_deps << " " << incr_objs << " $(OBJCOMP) $(LIBS) $(LFLAGS)";
+ if(!project->isEmpty("QMAKE_POST_LINK"))
+ t << "\n\t" << var("QMAKE_POST_LINK");
+ t << endl << endl;
+@@ -430,7 +430,7 @@
+ t << mkdir_p_asstring(destdir) << "\n\t";
+ if(!project->isEmpty("QMAKE_PRE_LINK"))
+ t << var("QMAKE_PRE_LINK") << "\n\t";
+- t << "$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)";
++ t << "$(LINK) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) $(LFLAGS)";
+ if(!project->isEmpty("QMAKE_POST_LINK"))
+ t << "\n\t" << var("QMAKE_POST_LINK");
+ t << endl << endl;
diff --git a/packages/qmake/qmake2-native_2.10a.bb b/packages/qmake/qmake2-native_2.10a.bb
index 207aaaf9b5..55282e562c 100644
--- a/packages/qmake/qmake2-native_2.10a.bb
+++ b/packages/qmake/qmake2-native_2.10a.bb
@@ -9,6 +9,7 @@ QTVER = "qtopia-core-opensource-src-4.3.1"
SRC_URI = "ftp://ftp.trolltech.com/pub/qt/source/${QTVER}.tar.gz \
file://0001-fix-mkspecs.patch;patch=1 \
+ file://use-lflags-last.patch;patch=1 \
file://linux-oe-qmake.conf"
S = "${WORKDIR}/${QTVER}"
diff --git a/packages/rxvt-unicode/rxvt-unicode_7.9.bb b/packages/rxvt-unicode/rxvt-unicode_7.9.bb
index 72d686bffd..e08583527c 100644
--- a/packages/rxvt-unicode/rxvt-unicode_7.9.bb
+++ b/packages/rxvt-unicode/rxvt-unicode_7.9.bb
@@ -13,7 +13,7 @@ FILES_${PN}-control = "${bindir}/rxvtc"
SRC_URI = "http://dist.schmorp.de/rxvt-unicode/Attic/rxvt-unicode-${PV}.tar.bz2 \
file://xwc.patch;patch=1 \
file://signedchar.patch;patch=1"
-PR = "r0"
+PR = "r1"
inherit autotools update-alternatives
@@ -23,6 +23,10 @@ ALTERNATIVE_PATH = "${bindir}/rxvt"
CFLAGS_append = " -fpermissive"
+# This is necessary so that the "tic" command executed during the install can
+# link with the correct libary in staging.
+export LD_LIBRARY_PATH = "${STAGING_LIBDIR_NATIVE}"
+
EXTRA_OECONF = "--enable-menubar --enable-xim \
--enable-utmp --enable-wtmp --enable-lastlog \
--disable-strings --with-term=rxvt --enable-keepscrolling \
diff --git a/packages/slugos-init/files/modulefunctions b/packages/slugos-init/files/modulefunctions
index 784f6ef662..a497f71f6c 100644
--- a/packages/slugos-init/files/modulefunctions
+++ b/packages/slugos-init/files/modulefunctions
@@ -6,15 +6,18 @@
loaddiskmods(){
case "$(machine)" in
nslu2)
+ modprobe ehci-hcd
modprobe ohci-hcd
;;
nas100d)
- modprobe pata-artop
+ modprobe ehci-hcd
modprobe uhci-hcd
+ modprobe pata-artop
;;
dsmg600)
- modprobe pata-artop
+ modprobe ehci-hcd
modprobe uhci-hcd
+ modprobe pata-artop
;;
esac
diff --git a/packages/slugos-init/slugos-init_0.10.bb b/packages/slugos-init/slugos-init_0.10.bb
index 301a6829a5..c8e903ce97 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 = "r88"
+PR = "r89"
SRC_URI = "file://boot/flash \
file://boot/disk \
diff --git a/packages/sylpheed/claws-mail.inc b/packages/sylpheed/claws-mail.inc
deleted file mode 100644
index d8b3a2bc72..0000000000
--- a/packages/sylpheed/claws-mail.inc
+++ /dev/null
@@ -1,46 +0,0 @@
-SECTION = "x11/network"
-DESCRIPTION = "Mail user agent"
-DEPENDS = "gtk+ libetpan openssl aspell"
-LICENSE = "GPL"
-PR = "r0"
-
-SRC_URI = "\
- ${SOURCEFORGE_MIRROR}/sylpheed-claws/claws-mail-${PV}.tar.bz2 \
- file://desktop.patch;patch=1 \
- file://streamline-ui.patch;patch=1 \
- "
-
-FILES_${PN} = "${bindir} ${datadir}/pixmaps ${datadir}/applications"
-
-EXTRA_OECONF = "--disable-aspell-test \
- --enable--aspell \
- --disable-manual \
- --disable-crash-dialog \
- --disable-jpilot \
- --disable-trayicon-plugin \
- --disable-spamassassin-plugin \
- --disable-bogofilter-plugin \
- --disable-pgpcore-plugin \
- --disable-pgpmime-plugin \
- --disable-pgpinline-plugin \
- --disable-dillo-viewer-plugin \
- --disable-clamav-plugin \
- --disable-gnomeprint \
- --disable-valgrind \
- "
-
-CFLAGS += "-D_GNU_SOURCE"
-
-inherit autotools pkgconfig
-
-do_install_append() {
- install -d ${D}${datadir}/applications
- install -m 0644 claws-mail.desktop ${D}${datadir}/applications/
- install -d ${D}${datadir}/pixmaps
- install -m 0644 claws-mail.png ${D}${datadir}/pixmaps/
-}
-
-do_stage () {
- autotools_stage_all
-}
-
diff --git a/packages/sylpheed/claws-mail_2.7.2.bb b/packages/sylpheed/claws-mail_2.7.2.bb
deleted file mode 100644
index 6a698e1914..0000000000
--- a/packages/sylpheed/claws-mail_2.7.2.bb
+++ /dev/null
@@ -1,41 +0,0 @@
-SECTION = "x11/network"
-DESCRIPTION = "Mail user agent"
-DEPENDS = "gtk+ gpgme libetpan libgnomeprint aspell openssl"
-LICENSE = "GPL"
-PR = "r0"
-
-SRC_URI = "${SOURCEFORGE_MIRROR}/sylpheed-claws/claws-mail-${PV}.tar.bz2"
-
-FILES_${PN} = "${bindir} ${datadir}/pixmaps ${datadir}/applications"
-
-EXTRA_OECONF = "--disable-aspell-test \
- --disable-dillo-viewer-plugin --with-aspell-prefix=${STAGING_DIR}/${HOST_SYS} \
- --enable-aspell"
-
-CFLAGS += "-D_GNU_SOURCE"
-
-inherit autotools pkgconfig
-
-do_configure() {
- gnu-configize
- libtoolize --force
- oe_runconf
-}
-
-do_install_append() {
- install -d ${D}${datadir}/applications
- install -m 0644 claws-mail.desktop ${D}${datadir}/applications/
- install -d ${D}${datadir}/pixmaps
- install -m 0644 claws-mail.png ${D}${datadir}/pixmaps/
- mv ${D}${bindir}/${TARGET_SYS}-claws-mail ${D}${bindir}/${PN}
-}
-
-do_stage () {
- autotools_stage_all
-}
-
-python populate_packages_prepend () {
- abiword_libdir = bb.data.expand('${libdir}/claws-mail/plugins', d)
-
- do_split_packages(d, abiword_libdir, '^(.*)\.so$', 'claws-mail-plugin-%s', 'Claws plugin for %s', extra_depends='')
-}
diff --git a/packages/sylpheed/claws-mail_2.9.1.bb b/packages/sylpheed/claws-mail_2.9.1.bb
deleted file mode 100644
index f8a8396b95..0000000000
--- a/packages/sylpheed/claws-mail_2.9.1.bb
+++ /dev/null
@@ -1 +0,0 @@
-require claws-mail.inc
diff --git a/packages/sylpheed/claws-mail_3.0.1.bb b/packages/sylpheed/claws-mail_3.0.2.bb
index 29e7a5bc63..29e7a5bc63 100644
--- a/packages/sylpheed/claws-mail_3.0.1.bb
+++ b/packages/sylpheed/claws-mail_3.0.2.bb
diff --git a/packages/sylpheed/claws-plugin-gtkhtml2-viewer_0.14.1.bb b/packages/sylpheed/claws-plugin-gtkhtml2-viewer_0.15.2.bb
index 5ca95d9dfb..5ca95d9dfb 100644
--- a/packages/sylpheed/claws-plugin-gtkhtml2-viewer_0.14.1.bb
+++ b/packages/sylpheed/claws-plugin-gtkhtml2-viewer_0.15.2.bb
diff --git a/packages/sylpheed/claws-plugin-gtkhtml2-viewer_0.15.bb b/packages/sylpheed/claws-plugin-gtkhtml2-viewer_0.15.bb
deleted file mode 100644
index 5ca95d9dfb..0000000000
--- a/packages/sylpheed/claws-plugin-gtkhtml2-viewer_0.15.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SECTION = "x11/network"
-DESCRIPTION = "Mail user agent plugins"
-DEPENDS = "claws-mail gtkhtml2 curl"
-LICENSE = "GPL"
-PR = "r0"
-
-SRC_URI = "http://www.claws-mail.org/downloads/plugins/gtkhtml2_viewer-${PV}.tar.gz"
-
-inherit autotools pkgconfig
-
-S = "${WORKDIR}/gtkhtml2_viewer-${PV}"
-
-do_configure() {
- gnu-configize
- libtoolize --force
- oe_runconf
-}
-
-FILES_${PN} = "${libdir}/claws-mail/plugins/*.so"
-
diff --git a/packages/sylpheed/claws-plugin-maildir_0.24.4.bb b/packages/sylpheed/claws-plugin-maildir_0.24.4.bb
deleted file mode 100644
index 6032e09918..0000000000
--- a/packages/sylpheed/claws-plugin-maildir_0.24.4.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SECTION = "x11/network"
-DESCRIPTION = "Mail user agent plugins"
-DEPENDS = "claws-mail db"
-LICENSE = "GPL"
-PR = "r0"
-
-SRC_URI = "http://www.claws-mail.org/downloads/plugins/maildir-${PV}.tar.gz"
-
-inherit autotools pkgconfig
-
-S = "${WORKDIR}/maildir-${PV}"
-
-do_configure() {
- gnu-configize
- libtoolize --force
- oe_runconf
-}
-
-FILES_${PN} = "${libdir}/claws-mail/plugins/*.so"
-
diff --git a/packages/sylpheed/claws-plugin-mailmbox_1.12.4.bb b/packages/sylpheed/claws-plugin-mailmbox_1.12.4.bb
deleted file mode 100644
index d1f9e22d22..0000000000
--- a/packages/sylpheed/claws-plugin-mailmbox_1.12.4.bb
+++ /dev/null
@@ -1,20 +0,0 @@
-SECTION = "x11/network"
-DESCRIPTION = "Mail user agent plugins"
-DEPENDS = "claws-mail"
-LICENSE = "GPL"
-PR = "r0"
-
-SRC_URI = "http://www.claws-mail.org/downloads/plugins/mailmbox-${PV}.tar.gz"
-
-inherit autotools pkgconfig
-
-S = "${WORKDIR}/mailmbox-${PV}"
-
-do_configure() {
- gnu-configize
- libtoolize --force
- oe_runconf
-}
-
-FILES_${PN} = "${libdir}/claws-mail/plugins/*.so"
-
diff --git a/packages/sylpheed/claws-plugin-mailmbox_1.13.bb b/packages/sylpheed/claws-plugin-mailmbox_1.14.bb
index 03e939ead3..03e939ead3 100644
--- a/packages/sylpheed/claws-plugin-mailmbox_1.13.bb
+++ b/packages/sylpheed/claws-plugin-mailmbox_1.14.bb
diff --git a/packages/sylpheed/claws-plugin-rssyl_0.13.bb b/packages/sylpheed/claws-plugin-rssyl_0.15.bb
index 29fc245ac4..29fc245ac4 100644
--- a/packages/sylpheed/claws-plugin-rssyl_0.13.bb
+++ b/packages/sylpheed/claws-plugin-rssyl_0.15.bb
diff --git a/packages/tasks/task-base.bb b/packages/tasks/task-base.bb
index 14d06e8926..ea22e0531e 100644
--- a/packages/tasks/task-base.bb
+++ b/packages/tasks/task-base.bb
@@ -98,6 +98,8 @@ RDEPENDS_task-base = "\
${@base_contains('COMBINED_FEATURES', 'redboot', 'task-base-redboot', '',d)} \
\
${@base_contains('DISTRO_FEATURES', 'nfs', 'task-base-nfs', '',d)} \
+ ${@base_contains('DISTRO_FEATURES', 'cramfs', 'task-base-cramfs', '',d)} \
+ ${@base_contains('DISTRO_FEATURES', 'smbfs', 'task-base-smbfs', '',d)} \
${@base_contains('DISTRO_FEATURES', 'ipv6', 'task-base-ipv6', '',d)} \
${@base_contains('DISTRO_FEATURES', 'ipsec', 'task-base-ipsec', '',d)} \
${@base_contains('DISTRO_FEATURES', 'ppp', 'task-base-ppp', '',d)} \
diff --git a/packages/tasks/task-boot.bb b/packages/tasks/task-boot.bb
index 40c5bd530b..fb09ad1a83 100644
--- a/packages/tasks/task-boot.bb
+++ b/packages/tasks/task-boot.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "Basic task to get a device booting"
-PR = "r40"
+PR = "r41"
inherit task
@@ -40,6 +40,7 @@ RDEPENDS_task-boot = "\
base-passwd \
busybox \
initscripts \
+ ${@base_contains("MACHINE_FEATURES", "keyboard", "keymaps", "", d)} \
modutils-initscripts \
netbase \
update-alternatives \
diff --git a/packages/tasks/task-openmoko.bb b/packages/tasks/task-openmoko.bb
index 3b48b674c7..da6c1ef36e 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 = "r65"
+PR = "r66"
inherit task
@@ -135,6 +135,8 @@ RDEPENDS_task-openmoko-pim = "\
openmoko-contacts2 \
openmoko-dates2 \
openmoko-feedreader2 \
+ openmoko-browser2 \
+ openmoko-appmanager2 \
openmoko-tasks2 \
openmoko-mediaplayer2 \
# openmoko-messages \
diff --git a/packages/tasks/task-sdk.bb b/packages/tasks/task-sdk.bb
index 2c2bac1289..79e9fefc2a 100644
--- a/packages/tasks/task-sdk.bb
+++ b/packages/tasks/task-sdk.bb
@@ -1,5 +1,5 @@
DESCRIPTION = "SDK packages"
-PR = "r7"
+PR = "r8"
LICENSE = "MIT"
ALLOW_EMPTY = "1"
@@ -7,8 +7,16 @@ PACKAGES = "\
task-sdk-bare \
"
+DEPENDS = "virtual/libc"
+
+LIBC_linux = "glibc"
+LIBC_linux-uclibc = "uclibc"
+LIBC_linux-gnueabi = "glibc"
+LIBC_linux-uclibcgnueabi = "uclibc"
+
+
RDEPENDS_task-sdk-bare = "\
- glibc \
- glibc-dev \
+ ${LIBC} \
+ ${LIBC}-dev \
libgcc \
"
diff --git a/packages/tasks/task-slugos.bb b/packages/tasks/task-slugos.bb
index 07457c52c7..ecb3189741 100644
--- a/packages/tasks/task-slugos.bb
+++ b/packages/tasks/task-slugos.bb
@@ -6,7 +6,7 @@
DESCRIPTION = "Task packages for the SlugOS distribution"
HOMEPAGE = "http://www.nslu2-linux.org"
LICENSE = "MIT"
-PR = "r14"
+PR = "r15"
PACKAGE_ARCH = "${MACHINE_ARCH}"
ALLOW_EMPTY = "1"
@@ -76,6 +76,7 @@ ${SLUGOS_RNG_TOOLS_PACKAGE} \
# Add modules required for usb support
SLUGOS_STANDARD_RRECOMMENDS += "\
+kernel-module-ehci-hcd \
kernel-module-ohci-hcd \
kernel-module-uhci-hcd \
"
diff --git a/packages/tasks/task-toolchain-openmoko-sdk.bb b/packages/tasks/task-toolchain-openmoko-sdk.bb
new file mode 100644
index 0000000000..062b05519b
--- /dev/null
+++ b/packages/tasks/task-toolchain-openmoko-sdk.bb
@@ -0,0 +1,28 @@
+DESCRIPTION = "Packages for a standalone OpenMoko SDK or external toolchain"
+PR = "r1"
+LICENSE = "MIT"
+ALLOW_EMPTY = "1"
+
+PACKAGES = "${PN}"
+
+RDEPENDS_${PN} = "\
+ glibc \
+ glibc-dbg \
+ glibc-dev \
+ glibc-utils \
+ libsegfault \
+ glibc-thread-db \
+ glibc-localedata-i18n \
+ glibc-gconv-ibm850 \
+ glibc-gconv-cp1252 \
+ glibc-gconv-iso8859-1 \
+ glibc-gconv-iso8859-15 \
+ locale-base-en-gb \
+ libgcc \
+ libstdc++ \
+ \
+ libmokogsmd2-dev \
+ libmokoui2-dev \
+ libmokopanelui2-dev \
+ libmokojournal2-dev \
+"
diff --git a/packages/tslib/tslib-1.0/bd-neon/.mtn2git_empty b/packages/tslib/tslib-1.0/bd-neon/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/tslib/tslib-1.0/bd-neon/.mtn2git_empty
diff --git a/packages/tslib/tslib-1.0/bd-neon/ts.conf b/packages/tslib/tslib-1.0/bd-neon/ts.conf
new file mode 100644
index 0000000000..15fe294ce6
--- /dev/null
+++ b/packages/tslib/tslib-1.0/bd-neon/ts.conf
@@ -0,0 +1,5 @@
+module_raw ucb1x00
+module pthres pmin=1
+module variance delta=500
+module dejitter delta=10000
+module linear
diff --git a/packages/tslib/tslib-1.0/bd-neon/tslib.sh b/packages/tslib/tslib-1.0/bd-neon/tslib.sh
new file mode 100644
index 0000000000..b5f1c906f3
--- /dev/null
+++ b/packages/tslib/tslib-1.0/bd-neon/tslib.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+TSLIB_TSDEVICE=/dev/touch_ucb1x00
+
+export TSLIB_TSDEVICE
+
diff --git a/packages/tslib/tslib_1.0.bb b/packages/tslib/tslib_1.0.bb
index 51bd1f6a7b..598e60fe4d 100644
--- a/packages/tslib/tslib_1.0.bb
+++ b/packages/tslib/tslib_1.0.bb
@@ -4,7 +4,7 @@ AUTHOR = "Russell King w/ plugins by Chris Larson et. al."
SECTION = "base"
LICENSE = "LGPL"
-PR = "r16"
+PR = "r17"
SRC_URI = "http://download.berlios.de/tslib/tslib-1.0.tar.bz2 \
file://tslib-input_raw-grab_events.patch;patch=1 \
diff --git a/packages/ttf-fonts/ttf-liberation_0.2.bb b/packages/ttf-fonts/ttf-liberation_0.2.bb
index b3c96000fe..94b4012d3e 100644
--- a/packages/ttf-fonts/ttf-liberation_0.2.bb
+++ b/packages/ttf-fonts/ttf-liberation_0.2.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "https://www.redhat.com/promo/fonts/"
require ttf.inc
-SRC_URI = "https://www.redhat.com/f/fonts/liberation-fonts-ttf-3.tar.gz"
+SRC_URI = "http://www.redhat.com/f/fonts/liberation-fonts-ttf-3.tar.gz"
S = "${WORKDIR}/liberation-fonts-${PV}"
PACKAGES = "ttf-liberation-mono ttf-liberation-sans ttf-liberation-serif"
diff --git a/packages/uboot/files/makefile-no-dirafter.patch b/packages/uboot/files/makefile-no-dirafter.patch
new file mode 100644
index 0000000000..2ed26c3127
--- /dev/null
+++ b/packages/uboot/files/makefile-no-dirafter.patch
@@ -0,0 +1,17 @@
+Index: git/tools/Makefile
+===================================================================
+--- git.orig/tools/Makefile 2007-10-03 16:51:38.000000000 +0100
++++ git/tools/Makefile 2007-10-03 16:52:03.000000000 +0100
+@@ -114,9 +114,9 @@
+ #
+ # Use native tools and options
+ #
+-CPPFLAGS = -idirafter $(SRCTREE)/include \
+- -idirafter $(OBJTREE)/include2 \
+- -idirafter $(OBJTREE)/include \
++CPPFLAGS = -I$(SRCTREE)/include \
++ -I$(OBJTREE)/include2 \
++ -I$(OBJTREE)/include \
+ -DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC
+ CFLAGS = $(HOST_CFLAGS) $(CPPFLAGS) -O
+ AFLAGS = -D__ASSEMBLY__ $(CPPFLAGS)
diff --git a/packages/uboot/u-boot-1.1.2/u-boot-1.1.2-neon.patch b/packages/uboot/u-boot-1.1.2/u-boot-1.1.2-neon.patch
new file mode 100644
index 0000000000..ed959d43d8
--- /dev/null
+++ b/packages/uboot/u-boot-1.1.2/u-boot-1.1.2-neon.patch
@@ -0,0 +1,19204 @@
+diff -u -r --new-file u-boot-1.1.2/board/bd2003/bd2003.c u-boot-1.1.2-neon/board/bd2003/bd2003.c
+--- u-boot-1.1.2/board/bd2003/bd2003.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/bd2003/bd2003.c 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,94 @@
++/*
++ * (C) Copyright 2002
++ * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
++ *
++ * (C) Copyright 2002
++ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
++ * Marius Groeger <mgroeger@sysgo.de>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <config.h>
++#include <common.h>
++#include <version.h>
++#include <stdarg.h>
++#include <linux/types.h>
++#include <devices.h>
++#include <lcd.h>
++#include <lcd_panels.h>
++
++/* ------------------------------------------------------------------------- */
++/*
++ * LCD panel declarations
++ */
++
++vidinfo_t panel_info = {
++ vl_col: 1024, //this is corrected in SetPanelInfo
++ vl_row: 768,
++ vl_bpix: LCD_BPP,
++ vl_lcd_line_length: (320 * NBITS(LCD_BPP) ) >> 3
++};
++
++void disable_lcd_panel( void )
++{
++}
++
++
++/* ------------------------------------------------------------------------- */
++
++
++/*
++ * Miscelaneous platform dependent initialisations
++ */
++
++int board_init (void)
++{
++ DECLARE_GLOBAL_DATA_PTR;
++
++ /* memory and cpu-speed are setup before relocation */
++ /* so we do _nothing_ here */
++
++ /* arch number of Neon Board */
++ gd->bd->bi_arch_number = MACH_TYPE_BD2003 ;
++
++ /* adress of boot parameters */
++ gd->bd->bi_boot_params = 0xa0000100;
++
++ return 0;
++}
++
++int board_late_init(void)
++{
++ setenv("stdout", "serial");
++ setenv("stderr", "serial");
++ return 0;
++}
++
++
++int dram_init (void)
++{
++ DECLARE_GLOBAL_DATA_PTR;
++
++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
++ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
++
++ return 0;
++}
+diff -u -r --new-file u-boot-1.1.2/board/bd2003/config.mk u-boot-1.1.2-neon/board/bd2003/config.mk
+--- u-boot-1.1.2/board/bd2003/config.mk 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/bd2003/config.mk 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,4 @@
++#TEXT_BASE = 0xa1700000
++TEXT_BASE = 0xA1F00000
++#TEXT_BASE = 0
++PXALCD = 1
+diff -u -r --new-file u-boot-1.1.2/board/bd2003/.cvsignore u-boot-1.1.2-neon/board/bd2003/.cvsignore
+--- u-boot-1.1.2/board/bd2003/.cvsignore 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/bd2003/.cvsignore 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,2 @@
++.depend
++
+diff -u -r --new-file u-boot-1.1.2/board/bd2003/flash.c u-boot-1.1.2-neon/board/bd2003/flash.c
+--- u-boot-1.1.2/board/bd2003/flash.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/bd2003/flash.c 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,477 @@
++/*
++ * (C) Copyright 2001
++ * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
++ *
++ * (C) Copyright 2001
++ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <linux/byteorder/swab.h>
++#include <asm/arch/pxa250Base.h>
++#include <asm/arch/pxaHardware.h>
++#include "lcd.h"
++
++flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
++
++/* Board support for 1 or 2 flash devices */
++#define FLASH_PORT_WIDTH32
++#undef FLASH_PORT_WIDTH16
++
++#ifdef FLASH_PORT_WIDTH16
++#define FLASH_PORT_WIDTH ushort
++#define FLASH_PORT_WIDTHV vu_short
++#define SWAP(x) __swab16(x)
++#else
++#define FLASH_PORT_WIDTH ulong
++#define FLASH_PORT_WIDTHV vu_long
++#define SWAP(x) __swab32(x)
++#endif
++
++#define FPW FLASH_PORT_WIDTH
++#define FPWV FLASH_PORT_WIDTHV
++
++#define mb() __asm__ __volatile__ ("" : : : "memory")
++
++/*-----------------------------------------------------------------------
++ * Functions
++ */
++static ulong flash_get_size (FPW *addr, flash_info_t *info);
++static int write_data (flash_info_t *info, ulong dest, FPW data);
++static void flash_get_offsets (ulong base, flash_info_t *info);
++void inline spin_wheel_init(ulong addr, ulong cnt);
++void inline spin_wheel_done( int worked );
++void inline spin_wheel (ulong numleft);
++
++/*-----------------------------------------------------------------------
++ */
++ulong bases[] = {PHYS_FLASH_1,PHYS_FLASH_2,1};
++unsigned long flash_init (void)
++{
++ int i=0;
++ int j=0;
++ ulong size = 0;
++ ulong base;
++
++ while (i < CFG_MAX_FLASH_BANKS) {
++ base = bases[j++];
++ flash_info[i].start[0] = 0;
++ if (base & 1) break;
++ if (flash_get_size ((FPW *) base, &flash_info[i])) {
++ flash_get_offsets (base, &flash_info[i]);
++ size += flash_info[i].size;
++ i++;
++ }
++ else {
++printf( "error reading flash size\n" );
++ }
++ }
++ if (size>0) {
++ base = flash_info[0].start[0];
++ // Protect monitor and environment sectors
++ flash_protect ( FLAG_PROTECT_SET,
++ base,
++ base + monitor_flash_len - 1,
++ &flash_info[0] );
++
++ flash_protect ( FLAG_PROTECT_SET,
++ base+CFG_ENV_OFFSET,
++ base+CFG_ENV_OFFSET + CFG_ENV_SIZE - 1, &flash_info[0] );
++ }
++
++ return size;
++}
++
++/*-----------------------------------------------------------------------
++ */
++static void flash_get_offsets (ulong base, flash_info_t *info)
++{
++ int i;
++
++ if (info->flash_id == FLASH_UNKNOWN) {
++ return;
++ }
++
++ if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
++ for (i = 0; i < info->sector_count; i++) {
++ info->start[i] = base + (i * PHYS_FLASH_SECT_SIZE);
++ info->protect[i] = 0;
++ }
++ }
++}
++
++/*-----------------------------------------------------------------------
++ */
++void flash_print_info (flash_info_t *info)
++{
++ int i;
++
++ if (info->flash_id == FLASH_UNKNOWN) {
++ printf ("missing or unknown FLASH type\n");
++ return;
++ }
++
++ switch (info->flash_id & FLASH_VENDMASK) {
++ case FLASH_MAN_INTEL:
++ printf ("INTEL ");
++ break;
++ default:
++ printf ("Unknown Vendor ");
++ break;
++ }
++
++ switch (info->flash_id & FLASH_TYPEMASK) {
++ case FLASH_28F128J3A:
++ printf ("28F128J3A\n");
++ break;
++ default:
++ printf ("Unknown Chip Type\n");
++ break;
++ }
++
++ printf (" Size: %ld MB in %d Sectors\n",
++ info->size >> 20, info->sector_count);
++
++ printf (" Sector Start Addresses:");
++ for (i = 0; i < info->sector_count; ++i) {
++ if ((i % 5) == 0)
++ printf ("\n ");
++ printf (" %08lX%s",
++ info->start[i],
++ info->protect[i] ? " (RO)" : " ");
++ }
++ printf ("\n");
++ return;
++}
++
++/*
++ * The following code cannot be run from FLASH!
++ */
++static ulong flash_get_size (FPW *addr, flash_info_t *info)
++{
++ volatile FPW value;
++ volatile unsigned long *mc = (unsigned long *)MEMORY_CONTROL_BASE;
++ unsigned long val = 1<<3;
++
++ info->flash_id = FLASH_UNKNOWN;
++ info->sector_count = 0;
++ info->size = 0;
++
++ if (((ulong)addr) > 0x14000000) return 0;
++ val = mc[(MSC0>>2) +(((ulong)addr)>>27)];
++ if (((ulong)addr) & 0x04000000) val = val>>16;
++ if ( val & (1<<3)) return 0; //if 16 bit bus then return
++
++ /* Write auto select command: read Manufacturer ID */
++ addr[0x5555] = (FPW) 0x00AA00AA;
++ addr[0x2AAA] = (FPW) 0x00550055;
++ addr[0x5555] = (FPW) 0x00900090;
++
++ mb ();
++ value = addr[0];
++
++ switch (value) {
++
++ case (FPW) 0:
++ case (FPW) INTEL_MANUFACT & 0xFF0000 :
++ case (FPW) INTEL_MANUFACT & 0x0000FF :
++ case (FPW) INTEL_MANUFACT:
++ info->flash_id = FLASH_MAN_INTEL;
++ break;
++
++ default:
++printf( "Invalid flash manufacturer %x\n", value );
++ addr[0] = (FPW) 0x00FF00FF; /* restore read mode */
++ return (0); /* no or unknown flash */
++ }
++
++ mb ();
++ value = addr[1]; /* device ID */
++
++ switch (value) {
++
++ case (FPW) 0:
++ case (FPW) INTEL_ID_28F128J3A & 0xFF0000 :
++ case (FPW) INTEL_ID_28F128J3A & 0x0000FF :
++ case (FPW) INTEL_ID_28F128J3A:
++ info->flash_id += FLASH_28F128J3A;
++ info->sector_count = 128;
++ info->size = 0x02000000;
++ break; /* => 16 MB */
++
++ default:
++printf( "Unknown flash device %x\n", value );
++ info->flash_id = FLASH_UNKNOWN;
++ break;
++ }
++
++ if (info->sector_count > CFG_MAX_FLASH_SECT) {
++ printf ("** ERROR: sector count %d > max (%d) **\n",
++ info->sector_count, CFG_MAX_FLASH_SECT);
++ info->sector_count = CFG_MAX_FLASH_SECT;
++ }
++
++ addr[0] = (FPW) 0x00FF00FF; /* restore read mode */
++
++ return (info->size);
++}
++
++
++/*-----------------------------------------------------------------------
++ */
++
++int flash_erase (flash_info_t *info, int s_first, int s_last)
++{
++ int flag, prot, sect;
++ ulong type, start, last;
++ int rcode = 0;
++
++ if ((s_first < 0) || (s_first > s_last)) {
++ if (info->flash_id == FLASH_UNKNOWN) {
++ printf ("- missing\n");
++ } else {
++ printf ("- no sectors to erase\n");
++ }
++ return 1;
++ }
++
++ type = (info->flash_id & FLASH_VENDMASK);
++ if ((type != FLASH_MAN_INTEL)) {
++ printf ("Can't erase unknown flash type %08lx - aborted\n",
++ info->flash_id);
++ return 1;
++ }
++
++ prot = 0;
++ for (sect = s_first; sect <= s_last; ++sect) {
++ if (info->protect[sect]) {
++ prot++;
++ }
++ }
++
++ if (prot) {
++ printf ("- Warning: %d protected sectors will not be erased!\n",
++ prot);
++ } else {
++ printf ("\n");
++ }
++
++ start = get_timer (0);
++ last = start;
++
++ /* Disable interrupts which might cause a timeout here */
++ flag = disable_interrupts ();
++
++ /* Start erase on unprotected sectors */
++ for (sect = s_first; sect <= s_last; sect++) {
++ if (info->protect[sect] == 0) { /* not protected */
++ char temp[80];
++ FPWV *addr = (FPWV *) (info->start[sect]);
++ FPW status;
++
++ sprintf (temp, "Erasing sector %2d ... \r", sect);
++ lcd_puts( temp );
++
++ /* arm simple, non interrupt dependent timer */
++ reset_timer_masked ();
++
++ *addr = (FPW) 0x00500050; /* clear status register */
++ *addr = (FPW) 0x00200020; /* erase setup */
++ *addr = (FPW) 0x00D000D0; /* erase confirm */
++
++ while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) {
++ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) {
++ printf ("Timeout\n");
++ *addr = (FPW) 0x00B000B0; /* suspend erase */
++ *addr = (FPW) 0x00FF00FF; /* reset to read mode */
++ rcode = 1;
++ break;
++ }
++ }
++
++ *addr = 0x00500050; /* clear status register cmd. */
++ *addr = 0x00FF00FF; /* resest to read mode */
++ }
++ }
++ lcd_puts( "\r\n" );
++ return rcode;
++}
++
++/*-----------------------------------------------------------------------
++ * Copy memory to flash, returns:
++ * 0 - OK
++ * 1 - write timeout
++ * 2 - Flash not erased
++ * 4 - Flash not identified
++ */
++
++int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
++{
++ ulong cp, wp;
++ FPW data;
++ int count, i, l, rc, port_width;
++
++ rc = 0 ;
++ if (info->flash_id == FLASH_UNKNOWN) {
++ return 4;
++ }
++/* get lower word aligned address */
++#ifdef FLASH_PORT_WIDTH16
++ wp = (addr & ~1);
++ port_width = 2;
++#else
++ wp = (addr & ~3);
++ port_width = 4;
++#endif
++
++ spin_wheel_init(addr,cnt);
++
++ /*
++ * handle unaligned start bytes
++ */
++ if ((l = addr - wp) != 0) {
++ data = 0;
++ for (i = 0, cp = wp; i < l; ++i, ++cp) {
++ data = (data << 8) | (*(uchar *) cp);
++ }
++ for (; i < port_width && cnt > 0; ++i) {
++ data = (data << 8) | *src++;
++ --cnt;
++ ++cp;
++ }
++ for (; cnt == 0 && i < port_width; ++i, ++cp) {
++ data = (data << 8) | (*(uchar *) cp);
++ }
++
++ if ((rc = write_data (info, wp, SWAP (data))) != 0) {
++ goto out;
++ }
++ wp += port_width;
++ }
++
++ /*
++ * handle word aligned part
++ */
++ count = 0;
++ while (cnt >= port_width) {
++ data = 0;
++ for (i = 0; i < port_width; ++i) {
++ data = (data << 8) | *src++;
++ }
++ if ((rc = write_data (info, wp, SWAP (data))) != 0) {
++ goto out;
++ }
++ wp += port_width;
++ cnt -= port_width;
++ if (count++ > 0x800) {
++ spin_wheel (cnt);
++ count = 0;
++ }
++ }
++
++ if (cnt) {
++ /*
++ * handle unaligned tail bytes
++ */
++ data = 0;
++ for (i = 0, cp = wp; i < port_width && cnt > 0; ++i, ++cp) {
++ data = (data << 8) | *src++;
++ --cnt;
++ }
++ for (; i < port_width; ++i, ++cp) {
++ data = (data << 8) | (*(uchar *) cp);
++ }
++
++ rc = write_data (info, wp, SWAP (data));
++ }
++
++out:
++ spin_wheel_done(0 == rc);
++ return rc ;
++}
++
++/*-----------------------------------------------------------------------
++ * Write a word or halfword to Flash, returns:
++ * 0 - OK
++ * 1 - write timeout
++ * 2 - Flash not erased
++ */
++static int write_data (flash_info_t *info, ulong dest, FPW data)
++{
++ FPWV *addr = (FPWV *) dest;
++ FPW old = *addr ;
++ ulong status;
++ int flag;
++
++ /* Check if Flash is (sufficiently) erased */
++ if ((old & data) != data) {
++ printf ("not erased at %08lx (%lx)\n", (ulong) addr, old);
++ return (2);
++ }
++
++ if( old != data )
++ {
++ /* Disable interrupts which might cause a timeout here */
++ flag = disable_interrupts ();
++
++ *addr = (FPW) 0x00400040; /* write setup */
++ *addr = data;
++
++ /* arm simple, non interrupt dependent timer */
++ reset_timer_masked ();
++
++ /* wait while polling the status register */
++ while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) {
++ if (get_timer_masked () > CFG_FLASH_WRITE_TOUT) {
++ *addr = (FPW) 0x00FF00FF; /* restore read mode */
++ return (1);
++ }
++ }
++ *addr = (FPW) 0x00FF00FF; /* restore read mode */
++ } /* need to program? */
++
++
++ return (0);
++}
++
++void inline spin_wheel_init(ulong addr, ulong cnt)
++{
++ char temp[80];
++ sprintf( temp,
++ "\nprogramming flash\n"
++ "%08lx->%08lx\n"
++ " ", addr, cnt );
++ lcd_puts( temp );
++}
++
++void inline spin_wheel_done( int worked )
++{
++ if( worked )
++ spin_wheel(0);
++ lcd_puts( worked ? "\ncompleted.\n" : "\nfailed!\n" );
++}
++
++void inline spin_wheel( ulong numleft )
++{
++ char temp[40];
++ sprintf( temp, "\r %08lx", numleft );
++ lcd_puts( temp );
++}
+diff -u -r --new-file u-boot-1.1.2/board/bd2003/init.script u-boot-1.1.2-neon/board/bd2003/init.script
+--- u-boot-1.1.2/board/bd2003/init.script 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/bd2003/init.script 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,42 @@
++if fatload mmc 0 a0000000 logo.bmp ; then
++ bmp info a0000000 ;
++ bmp display a0000000 ;
++else
++ lecho "No logo present" ;
++fi
++
++if fatload mmc 0 a2000000 uimage ; then
++ lecho 'load Linux'
++ if fatload mmc 0 a2200000 mmcinitrd.u-boot ; then
++ echo 'using initrd' ;
++ lecho "Booting Linux"
++ set bootargs root=/dev/ram0 console=ttyS0,115200 debug=7 mtdparts=phys_mapped_flash:1024k(armboot),256k(params),-(rootfs1)
++ bootm a2000000 a2200000
++ else
++ echo 'testing cramfs img' ;
++ if fatload mmc 0 a2200000 cramfs.img ; then
++ if cmp.b 00140000 a2200000 $filesize ; then
++ echo 'cramfs images match' ;
++ else
++ lecho 'filesystems differ...' ;
++ protect off all ;
++ erase 00140000 01ffffff ;
++ cp.b a2200000 00140000 $filesize ;
++ fi
++
++ set bootargs console=ttyS0,115200 debug=7 mtdparts=phys_mapped_flash:1024k(armboot),256k(params),-(rootfs1) root=/dev/mtdblock3 rootfstype=cramfs
++ lecho "Booting Linux"
++ bootm a2000000
++ fi
++ fi
++else
++ echo "No Linux kernel" ;
++fi
++
++lecho 'No Linux, try CE'
++
++if fatload mmc 0 A0030000 nk.nb0 ; then
++ g A0030000 ;
++else
++ echo "No WinCE image" ;
++fi
+diff -u -r --new-file u-boot-1.1.2/board/bd2003/Makefile u-boot-1.1.2-neon/board/bd2003/Makefile
+--- u-boot-1.1.2/board/bd2003/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/bd2003/Makefile 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,48 @@
++
++#
++# (C) Copyright 2000
++# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++#
++# See file CREDITS for list of people who contributed to this
++# project.
++#
++# This program is free software; you can redistribute it and/or
++# modify it under the terms of the GNU General Public License as
++# published by the Free Software Foundation; either version 2 of
++# the License, or (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++# MA 02111-1307 USA
++#
++
++include $(TOPDIR)/config.mk
++
++LIB = lib$(BOARD).a
++
++OBJS := bd2003.o flash.o
++SOBJS := memsetup.o
++
++$(LIB): $(OBJS) $(SOBJS)
++ $(AR) crv $@ $(OBJS) $(SOBJS)
++
++clean:
++ rm -f $(SOBJS) $(OBJS)
++
++distclean: clean
++ rm -f $(LIB) core *.bak .depend
++
++#########################################################################
++
++.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
++ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
++
++-include .depend
++
++#########################################################################
+diff -u -r --new-file u-boot-1.1.2/board/bd2003/memsetup.S u-boot-1.1.2-neon/board/bd2003/memsetup.S
+--- u-boot-1.1.2/board/bd2003/memsetup.S 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/bd2003/memsetup.S 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,64 @@
++/*
++ * Most of this taken from Redboot hal_platform_setup.h with cleanup
++ *
++ * NOTE: I haven't clean this up considerably, just enough to get it
++ * running. See hal_platform_setup.h for the source. See
++ * board/cradle/memsetup.S for another PXA250 setup that is
++ * much cleaner.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <config.h>
++#include <version.h>
++
++#define BAUDRATE 115200
++#include <asm/arch/platformTypes.h>
++#include <configs/select.h>
++#include <asm/arch/pxaGpio.h>
++#include <asm/arch/pxaMacro3.h>
++
++DRAM_SIZE: .long CFG_DRAM_SIZE
++
++/* wait for coprocessor write complete */
++ .macro CPWAIT reg
++ mrc p15,0,\reg,c2,c0,0
++ mov \reg,\reg
++ sub pc,pc,#4
++ .endm
++
++
++/*
++ * Memory setup
++ */
++
++.globl memsetup
++memsetup:
++
++ mov r10, lr
++
++ InitCS0_CS1 r0,sp
++ InitGPIO r0,sp
++ InitIC_Clocks r0,sp
++ InitUART r0,sp,UART_BASE,BAUDRATE
++ InitUART r0,sp,UART_BASE+0x600000,9600
++ InitChangeCPUSpeed r0
++ InitMemory r0,sp,r1
++
++ mov pc, lr
+diff -u -r --new-file u-boot-1.1.2/board/bd2003/u-boot.lds u-boot-1.1.2-neon/board/bd2003/u-boot.lds
+--- u-boot-1.1.2/board/bd2003/u-boot.lds 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/bd2003/u-boot.lds 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,56 @@
++/*
++ * (C) Copyright 2000
++ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
++OUTPUT_ARCH(arm)
++ENTRY(_start)
++SECTIONS
++{
++ . = 0x00000000;
++
++ . = ALIGN(4);
++ .text :
++ {
++ cpu/pxa/start.o (.text)
++ cpu/pxa/ministart.o (.text)
++ *(.text)
++ }
++
++ . = ALIGN(4);
++ .rodata : { *(.rodata) }
++
++ . = ALIGN(4);
++ .data : { *(.data) }
++
++ . = ALIGN(4);
++ .got : { *(.got) }
++
++ __u_boot_cmd_start = .;
++ .u_boot_cmd : { *(.u_boot_cmd) }
++ __u_boot_cmd_end = .;
++
++ . = ALIGN(4);
++ __bss_start = .;
++ .bss : { *(.bss) }
++ _end = .;
++}
+diff -u -r --new-file u-boot-1.1.2/board/bd2003/u-bootmini.lds u-boot-1.1.2-neon/board/bd2003/u-bootmini.lds
+--- u-boot-1.1.2/board/bd2003/u-bootmini.lds 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/bd2003/u-bootmini.lds 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,56 @@
++/*
++ * (C) Copyright 2000
++ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
++OUTPUT_ARCH(arm)
++ENTRY(StartUp)
++SECTIONS
++{
++ . = 0x00000000;
++
++ . = ALIGN(4);
++ .text :
++ {
++ cpu/pxa/minidebug.o (.text)
++ cpu/pxa/ministart.o (.text)
++ *(.text)
++ }
++
++ . = ALIGN(4);
++ .rodata : { *(.rodata) }
++
++ . = ALIGN(4);
++ .data : { *(.data) }
++
++ . = ALIGN(4);
++ .got : { *(.got) }
++
++ __u_boot_cmd_start = .;
++ .u_boot_cmd : { *(.u_boot_cmd) }
++ __u_boot_cmd_end = .;
++
++ . = ALIGN(4);
++ __bss_start = .;
++ .bss : { *(.bss) }
++ _end = .;
++}
+diff -u -r --new-file u-boot-1.1.2/board/halogen/config.mk u-boot-1.1.2-neon/board/halogen/config.mk
+--- u-boot-1.1.2/board/halogen/config.mk 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/halogen/config.mk 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,4 @@
++#TEXT_BASE = 0xa1700000
++TEXT_BASE = 0xA1F00000
++#TEXT_BASE = 0
++PXALCD = 1
+diff -u -r --new-file u-boot-1.1.2/board/halogen/.cvsignore u-boot-1.1.2-neon/board/halogen/.cvsignore
+--- u-boot-1.1.2/board/halogen/.cvsignore 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/halogen/.cvsignore 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,2 @@
++.depend
++
+diff -u -r --new-file u-boot-1.1.2/board/halogen/flash.c u-boot-1.1.2-neon/board/halogen/flash.c
+--- u-boot-1.1.2/board/halogen/flash.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/halogen/flash.c 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,482 @@
++/*
++ * (C) Copyright 2001
++ * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
++ *
++ * (C) Copyright 2001
++ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <linux/byteorder/swab.h>
++#include <asm/arch/pxa250Base.h>
++#include <asm/arch/pxaHardware.h>
++#include "lcd.h"
++
++flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
++
++/* Board support for 1 or 2 flash devices */
++#define FLASH_PORT_WIDTH32
++#undef FLASH_PORT_WIDTH16
++
++#ifdef FLASH_PORT_WIDTH16
++#define FLASH_PORT_WIDTH ushort
++#define FLASH_PORT_WIDTHV vu_short
++#define SWAP(x) __swab16(x)
++#else
++#define FLASH_PORT_WIDTH ulong
++#define FLASH_PORT_WIDTHV vu_long
++#define SWAP(x) __swab32(x)
++#endif
++
++#define FPW FLASH_PORT_WIDTH
++#define FPWV FLASH_PORT_WIDTHV
++
++#define mb() __asm__ __volatile__ ("" : : : "memory")
++
++/*-----------------------------------------------------------------------
++ * Functions
++ */
++static ulong flash_get_size (FPW *addr, flash_info_t *info);
++static int write_data (flash_info_t *info, ulong dest, FPW data);
++static void flash_get_offsets (ulong base, flash_info_t *info);
++void inline spin_wheel_init(ulong addr, ulong cnt);
++void inline spin_wheel_done( int worked );
++void inline spin_wheel (ulong numleft);
++
++/*-----------------------------------------------------------------------
++ */
++ulong bases[] = {PHYS_FLASH_1,PHYS_FLASH_2,1};
++unsigned long flash_init (void)
++{
++ int i=0;
++ int j=0;
++ ulong size = 0;
++ ulong base;
++
++ while (i < CFG_MAX_FLASH_BANKS) {
++ base = bases[j++];
++ flash_info[i].start[0] = 0;
++ if (base & 1) break;
++ if (flash_get_size ((FPW *) base, &flash_info[i])) {
++ flash_get_offsets (base, &flash_info[i]);
++ size += flash_info[i].size;
++ i++;
++ }
++ else {
++printf( "error reading flash size\n" );
++ }
++ }
++ if (size>0) {
++ base = flash_info[0].start[0];
++ // Protect monitor and environment sectors
++ flash_protect ( FLAG_PROTECT_SET,
++ base,
++ base + monitor_flash_len - 1,
++ &flash_info[0] );
++
++ flash_protect ( FLAG_PROTECT_SET,
++ base+CFG_ENV_OFFSET,
++ base+CFG_ENV_OFFSET + CFG_ENV_SIZE - 1, &flash_info[0] );
++ }
++
++ return size;
++}
++
++/*-----------------------------------------------------------------------
++ */
++static void flash_get_offsets (ulong base, flash_info_t *info)
++{
++ int i;
++
++ if (info->flash_id == FLASH_UNKNOWN) {
++ return;
++ }
++
++ if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
++ for (i = 0; i < info->sector_count; i++) {
++ info->start[i] = base + (i * PHYS_FLASH_SECT_SIZE);
++ info->protect[i] = 0;
++ }
++ }
++}
++
++/*-----------------------------------------------------------------------
++ */
++void flash_print_info (flash_info_t *info)
++{
++ int i;
++
++ if (info->flash_id == FLASH_UNKNOWN) {
++ printf ("missing or unknown FLASH type\n");
++ return;
++ }
++
++ switch (info->flash_id & FLASH_VENDMASK) {
++ case FLASH_MAN_INTEL:
++ printf ("INTEL ");
++ break;
++ default:
++ printf ("Unknown Vendor ");
++ break;
++ }
++
++ switch (info->flash_id & FLASH_TYPEMASK) {
++ case FLASH_28F128J3A:
++ printf ("28F128J3A\n");
++ break;
++ default:
++ printf ("Unknown Chip Type\n");
++ break;
++ }
++
++ printf (" Size: %ld MB in %d Sectors\n",
++ info->size >> 20, info->sector_count);
++
++ printf (" Sector Start Addresses:");
++ for (i = 0; i < info->sector_count; ++i) {
++ if ((i % 5) == 0)
++ printf ("\n ");
++ printf (" %08lX%s",
++ info->start[i],
++ info->protect[i] ? " (RO)" : " ");
++ }
++ printf ("\n");
++ return;
++}
++
++/*
++ * The following code cannot be run from FLASH!
++ */
++static ulong flash_get_size (FPW *addr, flash_info_t *info)
++{
++ volatile FPW value;
++ volatile unsigned long *mc = (unsigned long *)MEMORY_CONTROL_BASE;
++ unsigned long val = 1<<3;
++
++ info->flash_id = FLASH_UNKNOWN;
++ info->sector_count = 0;
++ info->size = 0;
++
++ if (((ulong)addr) > 0x14000000) return 0;
++ val = mc[(MSC0>>2) +(((ulong)addr)>>27)];
++ if (((ulong)addr) & 0x04000000) val = val>>16;
++ if ( val & (1<<3)) return 0; //if 16 bit bus then return
++
++ /* Write auto select command: read Manufacturer ID */
++ addr[0x5555] = (FPW) 0x00AA00AA;
++ addr[0x2AAA] = (FPW) 0x00550055;
++ addr[0x5555] = (FPW) 0x00900090;
++
++ mb ();
++ value = addr[0];
++
++ switch (value) {
++
++ case (FPW) 0:
++ case (FPW) STM_MANUFACT:
++ case (FPW) INTEL_MANUFACT & 0xFF0000 :
++ case (FPW) INTEL_MANUFACT & 0x0000FF :
++ case (FPW) INTEL_MANUFACT:
++ info->flash_id = FLASH_MAN_INTEL;
++ break;
++
++ default:
++printf( "Invalid flash manufacturer %x\n", value );
++ addr[0] = (FPW) 0x00FF00FF; /* restore read mode */
++ return (0); /* no or unknown flash */
++ }
++
++ mb ();
++ value = addr[1]; /* device ID */
++
++ switch (value) {
++
++ case (FPW) 0:
++ case (FPW) INTEL_ID_28F128J3A & 0xFF0000 :
++ case (FPW) INTEL_ID_28F128J3A & 0x0000FF :
++ case (FPW) INTEL_ID_28F128J3A:
++ info->flash_id += FLASH_28F128J3A;
++ info->sector_count = 128;
++ info->size = 0x01000000;
++ break; /* => 16 MB x 1 */
++ case (FPW) INTEL_ID_28F320J3A:
++ info->flash_id += FLASH_28F320J3A;
++ info->sector_count = 32 ;
++ info->size = 0x400000 ;
++ break; /* => 4 MB x 1 */
++ default:
++printf( "Unknown flash device %x\n", value );
++ info->flash_id = FLASH_UNKNOWN;
++ break;
++ }
++
++ if (info->sector_count > CFG_MAX_FLASH_SECT) {
++ printf ("** ERROR: sector count %d > max (%d) **\n",
++ info->sector_count, CFG_MAX_FLASH_SECT);
++ info->sector_count = CFG_MAX_FLASH_SECT;
++ }
++
++ addr[0] = (FPW) 0x00FF00FF; /* restore read mode */
++
++ return (info->size);
++}
++
++
++/*-----------------------------------------------------------------------
++ */
++
++int flash_erase (flash_info_t *info, int s_first, int s_last)
++{
++ int flag, prot, sect;
++ ulong type, start, last;
++ int rcode = 0;
++
++ if ((s_first < 0) || (s_first > s_last)) {
++ if (info->flash_id == FLASH_UNKNOWN) {
++ printf ("- missing\n");
++ } else {
++ printf ("- no sectors to erase\n");
++ }
++ return 1;
++ }
++
++ type = (info->flash_id & FLASH_VENDMASK);
++ if ((type != FLASH_MAN_INTEL)) {
++ printf ("Can't erase unknown flash type %08lx - aborted\n",
++ info->flash_id);
++ return 1;
++ }
++
++ prot = 0;
++ for (sect = s_first; sect <= s_last; ++sect) {
++ if (info->protect[sect]) {
++ prot++;
++ }
++ }
++
++ if (prot) {
++ printf ("- Warning: %d protected sectors will not be erased!\n",
++ prot);
++ } else {
++ printf ("\n");
++ }
++
++ start = get_timer (0);
++ last = start;
++
++ /* Disable interrupts which might cause a timeout here */
++ flag = disable_interrupts ();
++
++ /* Start erase on unprotected sectors */
++ for (sect = s_first; sect <= s_last; sect++) {
++ if (info->protect[sect] == 0) { /* not protected */
++ char temp[80];
++ FPWV *addr = (FPWV *) (info->start[sect]);
++ FPW status;
++
++ sprintf (temp, "Erasing sector %2d ... \r", sect);
++ lcd_puts( temp );
++
++ /* arm simple, non interrupt dependent timer */
++ reset_timer_masked ();
++
++ *addr = (FPW) 0x00500050; /* clear status register */
++ *addr = (FPW) 0x00200020; /* erase setup */
++ *addr = (FPW) 0x00D000D0; /* erase confirm */
++
++ while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) {
++ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) {
++ printf ("Timeout\n");
++ *addr = (FPW) 0x00B000B0; /* suspend erase */
++ *addr = (FPW) 0x00FF00FF; /* reset to read mode */
++ rcode = 1;
++ break;
++ }
++ }
++
++ *addr = 0x00500050; /* clear status register cmd. */
++ *addr = 0x00FF00FF; /* resest to read mode */
++ }
++ }
++ lcd_puts( "\r\n" );
++ return rcode;
++}
++
++/*-----------------------------------------------------------------------
++ * Copy memory to flash, returns:
++ * 0 - OK
++ * 1 - write timeout
++ * 2 - Flash not erased
++ * 4 - Flash not identified
++ */
++
++int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
++{
++ ulong cp, wp;
++ FPW data;
++ int count, i, l, rc, port_width;
++
++ rc = 0 ;
++ if (info->flash_id == FLASH_UNKNOWN) {
++ return 4;
++ }
++/* get lower word aligned address */
++#ifdef FLASH_PORT_WIDTH16
++ wp = (addr & ~1);
++ port_width = 2;
++#else
++ wp = (addr & ~3);
++ port_width = 4;
++#endif
++
++ spin_wheel_init(addr,cnt);
++
++ /*
++ * handle unaligned start bytes
++ */
++ if ((l = addr - wp) != 0) {
++ data = 0;
++ for (i = 0, cp = wp; i < l; ++i, ++cp) {
++ data = (data << 8) | (*(uchar *) cp);
++ }
++ for (; i < port_width && cnt > 0; ++i) {
++ data = (data << 8) | *src++;
++ --cnt;
++ ++cp;
++ }
++ for (; cnt == 0 && i < port_width; ++i, ++cp) {
++ data = (data << 8) | (*(uchar *) cp);
++ }
++
++ if ((rc = write_data (info, wp, SWAP (data))) != 0) {
++ goto out;
++ }
++ wp += port_width;
++ }
++
++ /*
++ * handle word aligned part
++ */
++ count = 0;
++ while (cnt >= port_width) {
++ data = 0;
++ for (i = 0; i < port_width; ++i) {
++ data = (data << 8) | *src++;
++ }
++ if ((rc = write_data (info, wp, SWAP (data))) != 0) {
++ goto out;
++ }
++ wp += port_width;
++ cnt -= port_width;
++ if (count++ > 0x800) {
++ spin_wheel (cnt);
++ count = 0;
++ }
++ }
++
++ if (cnt) {
++ /*
++ * handle unaligned tail bytes
++ */
++ data = 0;
++ for (i = 0, cp = wp; i < port_width && cnt > 0; ++i, ++cp) {
++ data = (data << 8) | *src++;
++ --cnt;
++ }
++ for (; i < port_width; ++i, ++cp) {
++ data = (data << 8) | (*(uchar *) cp);
++ }
++
++ rc = write_data (info, wp, SWAP (data));
++ }
++
++out:
++ spin_wheel_done(0 == rc);
++ return rc ;
++}
++
++/*-----------------------------------------------------------------------
++ * Write a word or halfword to Flash, returns:
++ * 0 - OK
++ * 1 - write timeout
++ * 2 - Flash not erased
++ */
++static int write_data (flash_info_t *info, ulong dest, FPW data)
++{
++ FPWV *addr = (FPWV *) dest;
++ FPW old = *addr ;
++ ulong status;
++ int flag;
++
++ /* Check if Flash is (sufficiently) erased */
++ if ((old & data) != data) {
++ printf ("not erased at %08lx (%lx)\n", (ulong) addr, old);
++ return (2);
++ }
++
++ if( old != data )
++ {
++ /* Disable interrupts which might cause a timeout here */
++ flag = disable_interrupts ();
++
++ *addr = (FPW) 0x00400040; /* write setup */
++ *addr = data;
++
++ /* arm simple, non interrupt dependent timer */
++ reset_timer_masked ();
++
++ /* wait while polling the status register */
++ while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) {
++ if (get_timer_masked () > CFG_FLASH_WRITE_TOUT) {
++ *addr = (FPW) 0x00FF00FF; /* restore read mode */
++ return (1);
++ }
++ }
++ *addr = (FPW) 0x00FF00FF; /* restore read mode */
++ } /* need to program? */
++
++
++ return (0);
++}
++
++void inline spin_wheel_init(ulong addr, ulong cnt)
++{
++ char temp[80];
++ sprintf( temp,
++ "\nprogramming flash\n"
++ "%08lx->%08lx\n"
++ " ", addr, cnt );
++ lcd_puts( temp );
++}
++
++void inline spin_wheel_done( int worked )
++{
++ if( worked )
++ spin_wheel(0);
++ lcd_puts( worked ? "\ncompleted.\n" : "\nfailed!\n" );
++}
++
++void inline spin_wheel( ulong numleft )
++{
++ char temp[40];
++ sprintf( temp, "\r %08lx", numleft );
++ lcd_puts( temp );
++}
+diff -u -r --new-file u-boot-1.1.2/board/halogen/halogen.c u-boot-1.1.2-neon/board/halogen/halogen.c
+--- u-boot-1.1.2/board/halogen/halogen.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/halogen/halogen.c 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,94 @@
++/*
++ * (C) Copyright 2002
++ * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
++ *
++ * (C) Copyright 2002
++ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
++ * Marius Groeger <mgroeger@sysgo.de>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <config.h>
++#include <common.h>
++#include <version.h>
++#include <stdarg.h>
++#include <linux/types.h>
++#include <devices.h>
++#include <lcd.h>
++#include <lcd_panels.h>
++
++/* ------------------------------------------------------------------------- */
++/*
++ * LCD panel declarations
++ */
++
++vidinfo_t panel_info = {
++ vl_col: 1024, //this is corrected in SetPanelInfo
++ vl_row: 768,
++ vl_bpix: LCD_BPP,
++ vl_lcd_line_length: (320 * NBITS(LCD_BPP) ) >> 3
++};
++
++void disable_lcd_panel( void )
++{
++}
++
++
++/* ------------------------------------------------------------------------- */
++
++
++/*
++ * Miscelaneous platform dependent initialisations
++ */
++
++int board_init (void)
++{
++ DECLARE_GLOBAL_DATA_PTR;
++
++ /* memory and cpu-speed are setup before relocation */
++ /* so we do _nothing_ here */
++
++ /* arch number of Neon Board */
++ gd->bd->bi_arch_number = MACH_TYPE_HALOGEN ;
++
++ /* adress of boot parameters */
++ gd->bd->bi_boot_params = 0xa0000100;
++
++ return 0;
++}
++
++int board_late_init(void)
++{
++ setenv("stdout", "serial");
++ setenv("stderr", "serial");
++ return 0;
++}
++
++
++int dram_init (void)
++{
++ DECLARE_GLOBAL_DATA_PTR;
++
++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
++ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
++
++ return 0;
++}
+diff -u -r --new-file u-boot-1.1.2/board/halogen/init.script u-boot-1.1.2-neon/board/halogen/init.script
+--- u-boot-1.1.2/board/halogen/init.script 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/halogen/init.script 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,42 @@
++if fatload mmc 0 a0008000 logo*.bmp ; then
++ bmp info a0008000 ;
++ bmp display a0008000 ;
++else
++ lecho "No logo present" ;
++fi
++
++if fatload mmc 0 a2000000 uim* ; then
++ lecho 'load Linux'
++ if fatload mmc 0 a2200000 mmcinitrd* ; then
++ echo 'using initrd' ;
++ lecho "Booting Linux"
++ set bootargs root=/dev/ram0 console=ttyS0,115200 debug=7 mtdparts=phys_mapped_flash:1024k(armboot),256k(params),-(rootfs1)
++ bootm a2000000 a2200000
++ else
++ echo 'testing cramfs img' ;
++ if fatload mmc 0 a2200000 cramfs* ; then
++ if cmp.b 00140000 a2200000 $filesize ; then
++ echo 'cramfs images match' ;
++ else
++ lecho 'filesystems differ...' ;
++ protect off all ;
++ erase 00140000 01ffffff ;
++ cp.b a2200000 00140000 $filesize ;
++ fi
++
++ set bootargs console=ttyS0,115200 debug=7 mtdparts=phys_mapped_flash:1024k(armboot),256k(params),-(rootfs1) root=/dev/mtdblock3 rootfstype=cramfs
++ lecho "Booting Linux"
++ bootm a2000000
++ fi
++ fi
++else
++ echo "No Linux kernel" ;
++fi
++
++lecho 'No Linux, try CE'
++
++if fatload mmc 0 A0030000 nk*.nb0 ; then
++ g A0030000 ;
++else
++ echo "No WinCE image" ;
++fi
+diff -u -r --new-file u-boot-1.1.2/board/halogen/Makefile u-boot-1.1.2-neon/board/halogen/Makefile
+--- u-boot-1.1.2/board/halogen/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/halogen/Makefile 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,48 @@
++
++#
++# (C) Copyright 2000
++# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++#
++# See file CREDITS for list of people who contributed to this
++# project.
++#
++# This program is free software; you can redistribute it and/or
++# modify it under the terms of the GNU General Public License as
++# published by the Free Software Foundation; either version 2 of
++# the License, or (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++# MA 02111-1307 USA
++#
++
++include $(TOPDIR)/config.mk
++
++LIB = lib$(BOARD).a
++
++OBJS := halogen.o flash.o
++SOBJS := memsetup.o
++
++$(LIB): $(OBJS) $(SOBJS)
++ $(AR) crv $@ $(OBJS) $(SOBJS)
++
++clean:
++ rm -f $(SOBJS) $(OBJS)
++
++distclean: clean
++ rm -f $(LIB) core *.bak .depend
++
++#########################################################################
++
++.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
++ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
++
++-include .depend
++
++#########################################################################
+diff -u -r --new-file u-boot-1.1.2/board/halogen/memsetup.S u-boot-1.1.2-neon/board/halogen/memsetup.S
+--- u-boot-1.1.2/board/halogen/memsetup.S 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/halogen/memsetup.S 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,64 @@
++/*
++ * Most of this taken from Redboot hal_platform_setup.h with cleanup
++ *
++ * NOTE: I haven't clean this up considerably, just enough to get it
++ * running. See hal_platform_setup.h for the source. See
++ * board/cradle/memsetup.S for another PXA250 setup that is
++ * much cleaner.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <config.h>
++#include <version.h>
++
++#define BAUDRATE 115200
++#include <asm/arch/platformTypes.h>
++#include <configs/select.h>
++#include <asm/arch/pxaGpio.h>
++#include <asm/arch/pxaMacro3.h>
++
++DRAM_SIZE: .long CFG_DRAM_SIZE
++
++/* wait for coprocessor write complete */
++ .macro CPWAIT reg
++ mrc p15,0,\reg,c2,c0,0
++ mov \reg,\reg
++ sub pc,pc,#4
++ .endm
++
++
++/*
++ * Memory setup
++ */
++
++.globl memsetup
++memsetup:
++
++ mov r10, lr
++
++ InitCS0_CS1 r0,sp
++ InitGPIO r0,sp
++ InitIC_Clocks r0,sp
++ InitUART r0,sp,UART_BASE,BAUDRATE
++ InitUART r0,sp,UART_BASE+0x600000,9600
++ InitChangeCPUSpeed r0
++ InitMemory r0,sp,r1
++
++ mov pc, lr
+diff -u -r --new-file u-boot-1.1.2/board/halogen/u-boot.lds u-boot-1.1.2-neon/board/halogen/u-boot.lds
+--- u-boot-1.1.2/board/halogen/u-boot.lds 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/halogen/u-boot.lds 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,56 @@
++/*
++ * (C) Copyright 2000
++ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
++OUTPUT_ARCH(arm)
++ENTRY(_start)
++SECTIONS
++{
++ . = 0x00000000;
++
++ . = ALIGN(4);
++ .text :
++ {
++ cpu/pxa/start.o (.text)
++ cpu/pxa/ministart.o (.text)
++ *(.text)
++ }
++
++ . = ALIGN(4);
++ .rodata : { *(.rodata) }
++
++ . = ALIGN(4);
++ .data : { *(.data) }
++
++ . = ALIGN(4);
++ .got : { *(.got) }
++
++ __u_boot_cmd_start = .;
++ .u_boot_cmd : { *(.u_boot_cmd) }
++ __u_boot_cmd_end = .;
++
++ . = ALIGN(4);
++ __bss_start = .;
++ .bss : { *(.bss) }
++ _end = .;
++}
+diff -u -r --new-file u-boot-1.1.2/board/halogen/u-bootmini.lds u-boot-1.1.2-neon/board/halogen/u-bootmini.lds
+--- u-boot-1.1.2/board/halogen/u-bootmini.lds 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/halogen/u-bootmini.lds 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,56 @@
++/*
++ * (C) Copyright 2000
++ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
++OUTPUT_ARCH(arm)
++ENTRY(StartUp)
++SECTIONS
++{
++ . = 0x00000000;
++
++ . = ALIGN(4);
++ .text :
++ {
++ cpu/pxa/minidebug.o (.text)
++ cpu/pxa/ministart.o (.text)
++ *(.text)
++ }
++
++ . = ALIGN(4);
++ .rodata : { *(.rodata) }
++
++ . = ALIGN(4);
++ .data : { *(.data) }
++
++ . = ALIGN(4);
++ .got : { *(.got) }
++
++ __u_boot_cmd_start = .;
++ .u_boot_cmd : { *(.u_boot_cmd) }
++ __u_boot_cmd_end = .;
++
++ . = ALIGN(4);
++ __bss_start = .;
++ .bss : { *(.bss) }
++ _end = .;
++}
+diff -u -r --new-file u-boot-1.1.2/board/neon/config.mk u-boot-1.1.2-neon/board/neon/config.mk
+--- u-boot-1.1.2/board/neon/config.mk 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/config.mk 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,4 @@
++#TEXT_BASE = 0xa1700000
++TEXT_BASE = 0xA1F00000
++#TEXT_BASE = 0
++#PXALCD = 1
+diff -u -r --new-file u-boot-1.1.2/board/neon/.cvsignore u-boot-1.1.2-neon/board/neon/.cvsignore
+--- u-boot-1.1.2/board/neon/.cvsignore 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/.cvsignore 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,2 @@
++.depend
++
+diff -u -r --new-file u-boot-1.1.2/board/neon/flash.c u-boot-1.1.2-neon/board/neon/flash.c
+--- u-boot-1.1.2/board/neon/flash.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/flash.c 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,482 @@
++/*
++ * (C) Copyright 2001
++ * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
++ *
++ * (C) Copyright 2001
++ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <linux/byteorder/swab.h>
++#include <asm/arch/pxa250Base.h>
++#include <asm/arch/pxaHardware.h>
++#include "lcd.h"
++
++flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
++
++/* Board support for 1 or 2 flash devices */
++#define FLASH_PORT_WIDTH32
++#undef FLASH_PORT_WIDTH16
++
++#ifdef FLASH_PORT_WIDTH16
++#define FLASH_PORT_WIDTH ushort
++#define FLASH_PORT_WIDTHV vu_short
++#define SWAP(x) __swab16(x)
++#else
++#define FLASH_PORT_WIDTH ulong
++#define FLASH_PORT_WIDTHV vu_long
++#define SWAP(x) __swab32(x)
++#endif
++
++#define FPW FLASH_PORT_WIDTH
++#define FPWV FLASH_PORT_WIDTHV
++
++#define mb() __asm__ __volatile__ ("" : : : "memory")
++
++/*-----------------------------------------------------------------------
++ * Functions
++ */
++static ulong flash_get_size (FPW *addr, flash_info_t *info);
++static int write_data (flash_info_t *info, ulong dest, FPW data);
++static void flash_get_offsets (ulong base, flash_info_t *info);
++void inline spin_wheel_init(ulong addr, ulong cnt);
++void inline spin_wheel_done( int worked );
++void inline spin_wheel (ulong numleft);
++
++/*-----------------------------------------------------------------------
++ */
++ulong bases[] = {PHYS_FLASH_1,PHYS_FLASH_2,1};
++unsigned long flash_init (void)
++{
++ int i=0;
++ int j=0;
++ ulong size = 0;
++ ulong base;
++
++ while (i < CFG_MAX_FLASH_BANKS) {
++ base = bases[j++];
++ flash_info[i].start[0] = 0;
++ if (base & 1) break;
++ if (flash_get_size ((FPW *) base, &flash_info[i])) {
++ flash_get_offsets (base, &flash_info[i]);
++ size += flash_info[i].size;
++ i++;
++ }
++ else {
++printf( "error reading flash size\n" );
++ }
++ }
++ if (size>0) {
++ base = flash_info[0].start[0];
++ // Protect monitor and environment sectors
++ flash_protect ( FLAG_PROTECT_SET,
++ base,
++ base + monitor_flash_len - 1,
++ &flash_info[0] );
++
++ flash_protect ( FLAG_PROTECT_SET,
++ base+CFG_ENV_OFFSET,
++ base+CFG_ENV_OFFSET + CFG_ENV_SIZE - 1, &flash_info[0] );
++ }
++
++ return size;
++}
++
++/*-----------------------------------------------------------------------
++ */
++static void flash_get_offsets (ulong base, flash_info_t *info)
++{
++ int i;
++
++ if (info->flash_id == FLASH_UNKNOWN) {
++ return;
++ }
++
++ if ((info->flash_id & FLASH_VENDMASK) == FLASH_MAN_INTEL) {
++ for (i = 0; i < info->sector_count; i++) {
++ info->start[i] = base + (i * PHYS_FLASH_SECT_SIZE);
++ info->protect[i] = 0;
++ }
++ }
++}
++
++/*-----------------------------------------------------------------------
++ */
++void flash_print_info (flash_info_t *info)
++{
++ int i;
++
++ if (info->flash_id == FLASH_UNKNOWN) {
++ printf ("missing or unknown FLASH type\n");
++ return;
++ }
++
++ switch (info->flash_id & FLASH_VENDMASK) {
++ case FLASH_MAN_INTEL:
++ printf ("INTEL ");
++ break;
++ default:
++ printf ("Unknown Vendor ");
++ break;
++ }
++
++ switch (info->flash_id & FLASH_TYPEMASK) {
++ case FLASH_28F128J3A:
++ printf ("28F128J3A\n");
++ break;
++ default:
++ printf ("Unknown Chip Type\n");
++ break;
++ }
++
++ printf (" Size: %ld MB in %d Sectors\n",
++ info->size >> 20, info->sector_count);
++
++ printf (" Sector Start Addresses:");
++ for (i = 0; i < info->sector_count; ++i) {
++ if ((i % 5) == 0)
++ printf ("\n ");
++ printf (" %08lX%s",
++ info->start[i],
++ info->protect[i] ? " (RO)" : " ");
++ }
++ printf ("\n");
++ return;
++}
++
++/*
++ * The following code cannot be run from FLASH!
++ */
++static ulong flash_get_size (FPW *addr, flash_info_t *info)
++{
++ volatile FPW value;
++ volatile unsigned long *mc = (unsigned long *)MEMORY_CONTROL_BASE;
++ unsigned long val = 1<<3;
++
++ info->flash_id = FLASH_UNKNOWN;
++ info->sector_count = 0;
++ info->size = 0;
++
++ if (((ulong)addr) > 0x14000000) return 0;
++ val = mc[(MSC0>>2) +(((ulong)addr)>>27)];
++ if (((ulong)addr) & 0x04000000) val = val>>16;
++ if ( val & (1<<3)) return 0; //if 16 bit bus then return
++
++ /* Write auto select command: read Manufacturer ID */
++ addr[0x5555] = (FPW) 0x00AA00AA;
++ addr[0x2AAA] = (FPW) 0x00550055;
++ addr[0x5555] = (FPW) 0x00900090;
++
++ mb ();
++ value = addr[0];
++
++ switch (value) {
++
++ case (FPW) 0:
++ case (FPW) STM_MANUFACT:
++ case (FPW) INTEL_MANUFACT & 0xFF0000 :
++ case (FPW) INTEL_MANUFACT & 0x0000FF :
++ case (FPW) INTEL_MANUFACT:
++ info->flash_id = FLASH_MAN_INTEL;
++ break;
++
++ default:
++printf( "Invalid flash manufacturer %x\n", value );
++ addr[0] = (FPW) 0x00FF00FF; /* restore read mode */
++ return (0); /* no or unknown flash */
++ }
++
++ mb ();
++ value = addr[1]; /* device ID */
++
++ switch (value) {
++
++ case (FPW) 0:
++ case (FPW) INTEL_ID_28F128J3A & 0xFF0000 :
++ case (FPW) INTEL_ID_28F128J3A & 0x0000FF :
++ case (FPW) INTEL_ID_28F128J3A:
++ info->flash_id += FLASH_28F128J3A;
++ info->sector_count = 128;
++ info->size = 0x02000000;
++ break; /* => 16 MB x 2 */
++ case (FPW) INTEL_ID_28F320J3A:
++ info->flash_id += FLASH_28F320J3A;
++ info->sector_count = 32 ;
++ info->size = 0x800000 ;
++ break; /* => 4 MB x 2 */
++ default:
++printf( "Unknown flash device %x\n", value );
++ info->flash_id = FLASH_UNKNOWN;
++ break;
++ }
++
++ if (info->sector_count > CFG_MAX_FLASH_SECT) {
++ printf ("** ERROR: sector count %d > max (%d) **\n",
++ info->sector_count, CFG_MAX_FLASH_SECT);
++ info->sector_count = CFG_MAX_FLASH_SECT;
++ }
++
++ addr[0] = (FPW) 0x00FF00FF; /* restore read mode */
++
++ return (info->size);
++}
++
++
++/*-----------------------------------------------------------------------
++ */
++
++int flash_erase (flash_info_t *info, int s_first, int s_last)
++{
++ int flag, prot, sect;
++ ulong type, start, last;
++ int rcode = 0;
++
++ if ((s_first < 0) || (s_first > s_last)) {
++ if (info->flash_id == FLASH_UNKNOWN) {
++ printf ("- missing\n");
++ } else {
++ printf ("- no sectors to erase\n");
++ }
++ return 1;
++ }
++
++ type = (info->flash_id & FLASH_VENDMASK);
++ if ((type != FLASH_MAN_INTEL)) {
++ printf ("Can't erase unknown flash type %08lx - aborted\n",
++ info->flash_id);
++ return 1;
++ }
++
++ prot = 0;
++ for (sect = s_first; sect <= s_last; ++sect) {
++ if (info->protect[sect]) {
++ prot++;
++ }
++ }
++
++ if (prot) {
++ printf ("- Warning: %d protected sectors will not be erased!\n",
++ prot);
++ } else {
++ printf ("\n");
++ }
++
++ start = get_timer (0);
++ last = start;
++
++ /* Disable interrupts which might cause a timeout here */
++ flag = disable_interrupts ();
++
++ /* Start erase on unprotected sectors */
++ for (sect = s_first; sect <= s_last; sect++) {
++ if (info->protect[sect] == 0) { /* not protected */
++ char temp[80];
++ FPWV *addr = (FPWV *) (info->start[sect]);
++ FPW status;
++
++ sprintf (temp, "Erasing sector %2d ... \r", sect);
++ lcd_puts( temp );
++
++ /* arm simple, non interrupt dependent timer */
++ reset_timer_masked ();
++
++ *addr = (FPW) 0x00500050; /* clear status register */
++ *addr = (FPW) 0x00200020; /* erase setup */
++ *addr = (FPW) 0x00D000D0; /* erase confirm */
++
++ while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) {
++ if (get_timer_masked () > CFG_FLASH_ERASE_TOUT) {
++ printf ("Timeout\n");
++ *addr = (FPW) 0x00B000B0; /* suspend erase */
++ *addr = (FPW) 0x00FF00FF; /* reset to read mode */
++ rcode = 1;
++ break;
++ }
++ }
++
++ *addr = 0x00500050; /* clear status register cmd. */
++ *addr = 0x00FF00FF; /* resest to read mode */
++ }
++ }
++ lcd_puts( "\r\n" );
++ return rcode;
++}
++
++/*-----------------------------------------------------------------------
++ * Copy memory to flash, returns:
++ * 0 - OK
++ * 1 - write timeout
++ * 2 - Flash not erased
++ * 4 - Flash not identified
++ */
++
++int write_buff (flash_info_t *info, uchar *src, ulong addr, ulong cnt)
++{
++ ulong cp, wp;
++ FPW data;
++ int count, i, l, rc, port_width;
++
++ rc = 0 ;
++ if (info->flash_id == FLASH_UNKNOWN) {
++ return 4;
++ }
++/* get lower word aligned address */
++#ifdef FLASH_PORT_WIDTH16
++ wp = (addr & ~1);
++ port_width = 2;
++#else
++ wp = (addr & ~3);
++ port_width = 4;
++#endif
++
++ spin_wheel_init(addr,cnt);
++
++ /*
++ * handle unaligned start bytes
++ */
++ if ((l = addr - wp) != 0) {
++ data = 0;
++ for (i = 0, cp = wp; i < l; ++i, ++cp) {
++ data = (data << 8) | (*(uchar *) cp);
++ }
++ for (; i < port_width && cnt > 0; ++i) {
++ data = (data << 8) | *src++;
++ --cnt;
++ ++cp;
++ }
++ for (; cnt == 0 && i < port_width; ++i, ++cp) {
++ data = (data << 8) | (*(uchar *) cp);
++ }
++
++ if ((rc = write_data (info, wp, SWAP (data))) != 0) {
++ goto out;
++ }
++ wp += port_width;
++ }
++
++ /*
++ * handle word aligned part
++ */
++ count = 0;
++ while (cnt >= port_width) {
++ data = 0;
++ for (i = 0; i < port_width; ++i) {
++ data = (data << 8) | *src++;
++ }
++ if ((rc = write_data (info, wp, SWAP (data))) != 0) {
++ goto out;
++ }
++ wp += port_width;
++ cnt -= port_width;
++ if (count++ > 0x800) {
++ spin_wheel (cnt);
++ count = 0;
++ }
++ }
++
++ if (cnt) {
++ /*
++ * handle unaligned tail bytes
++ */
++ data = 0;
++ for (i = 0, cp = wp; i < port_width && cnt > 0; ++i, ++cp) {
++ data = (data << 8) | *src++;
++ --cnt;
++ }
++ for (; i < port_width; ++i, ++cp) {
++ data = (data << 8) | (*(uchar *) cp);
++ }
++
++ rc = write_data (info, wp, SWAP (data));
++ }
++
++out:
++ spin_wheel_done(0 == rc);
++ return rc ;
++}
++
++/*-----------------------------------------------------------------------
++ * Write a word or halfword to Flash, returns:
++ * 0 - OK
++ * 1 - write timeout
++ * 2 - Flash not erased
++ */
++static int write_data (flash_info_t *info, ulong dest, FPW data)
++{
++ FPWV *addr = (FPWV *) dest;
++ FPW old = *addr ;
++ ulong status;
++ int flag;
++
++ /* Check if Flash is (sufficiently) erased */
++ if ((old & data) != data) {
++ printf ("not erased at %08lx (%lx)\n", (ulong) addr, old);
++ return (2);
++ }
++
++ if( old != data )
++ {
++ /* Disable interrupts which might cause a timeout here */
++ flag = disable_interrupts ();
++
++ *addr = (FPW) 0x00400040; /* write setup */
++ *addr = data;
++
++ /* arm simple, non interrupt dependent timer */
++ reset_timer_masked ();
++
++ /* wait while polling the status register */
++ while (((status = *addr) & (FPW) 0x00800080) != (FPW) 0x00800080) {
++ if (get_timer_masked () > CFG_FLASH_WRITE_TOUT) {
++ *addr = (FPW) 0x00FF00FF; /* restore read mode */
++ return (1);
++ }
++ }
++ *addr = (FPW) 0x00FF00FF; /* restore read mode */
++ } /* need to program? */
++
++
++ return (0);
++}
++
++void inline spin_wheel_init(ulong addr, ulong cnt)
++{
++ char temp[80];
++ sprintf( temp,
++ "\nprogramming flash\n"
++ "%08lx->%08lx\n"
++ " ", addr, cnt );
++ lcd_puts( temp );
++}
++
++void inline spin_wheel_done( int worked )
++{
++ if( worked )
++ spin_wheel(0);
++ lcd_puts( worked ? "\ncompleted.\n" : "\nfailed!\n" );
++}
++
++void inline spin_wheel( ulong numleft )
++{
++ char temp[40];
++ sprintf( temp, "\r %08lx", numleft );
++ lcd_puts( temp );
++}
+diff -u -r --new-file u-boot-1.1.2/board/neon/init.script u-boot-1.1.2-neon/board/neon/init.script
+--- u-boot-1.1.2/board/neon/init.script 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/init.script 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,42 @@
++if fatload mmc 0 a0008000 logo*.bmp ; then
++ bmp info a0008000 ;
++ bmp display a0008000 ;
++else
++ lecho "No logo present" ;
++fi
++
++if fatload mmc 0 a2000000 uim* ; then
++ lecho 'load Linux'
++ if fatload mmc 0 a2200000 mmcinitrd* ; then
++ echo 'using initrd' ;
++ lecho "Booting Linux"
++ set bootargs root=/dev/ram0 console=ttyS0,115200 debug=7 mtdparts=phys_mapped_flash:1024k(armboot),256k(params),-(rootfs1)
++ bootm a2000000 a2200000
++ else
++ echo 'testing cramfs img' ;
++ if fatload mmc 0 a2200000 cramfs* ; then
++ if cmp.b 00140000 a2200000 $filesize ; then
++ echo 'cramfs images match' ;
++ else
++ lecho 'filesystems differ...' ;
++ protect off all ;
++ erase 00140000 01ffffff ;
++ cp.b a2200000 00140000 $filesize ;
++ fi
++
++ set bootargs console=ttyS0,115200 debug=7 mtdparts=phys_mapped_flash:1024k(armboot),256k(params),-(rootfs1) root=/dev/mtdblock3 rootfstype=cramfs
++ lecho "Booting Linux"
++ bootm a2000000
++ fi
++ fi
++else
++ echo "No Linux kernel" ;
++fi
++
++lecho 'No Linux, try CE'
++
++if fatload mmc 0 A0030000 nk*.nb0 ; then
++ g A0030000 ;
++else
++ echo "No WinCE image" ;
++fi
+diff -u -r --new-file u-boot-1.1.2/board/neon/Makefile u-boot-1.1.2-neon/board/neon/Makefile
+--- u-boot-1.1.2/board/neon/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/Makefile 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,48 @@
++
++#
++# (C) Copyright 2000
++# Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++#
++# See file CREDITS for list of people who contributed to this
++# project.
++#
++# This program is free software; you can redistribute it and/or
++# modify it under the terms of the GNU General Public License as
++# published by the Free Software Foundation; either version 2 of
++# the License, or (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++# MA 02111-1307 USA
++#
++
++include $(TOPDIR)/config.mk
++
++LIB = lib$(BOARD).a
++
++OBJS := neon.o flash.o rtc_M41T81S.o
++SOBJS := memsetup.o
++
++$(LIB): $(OBJS) $(SOBJS)
++ $(AR) crv $@ $(OBJS) $(SOBJS)
++
++clean:
++ rm -f $(SOBJS) $(OBJS)
++
++distclean: clean
++ rm -f $(LIB) core *.bak .depend
++
++#########################################################################
++
++.depend: Makefile $(SOBJS:.o=.S) $(OBJS:.o=.c)
++ $(CC) -M $(CPPFLAGS) $(SOBJS:.o=.S) $(OBJS:.o=.c) > $@
++
++-include .depend
++
++#########################################################################
+diff -u -r --new-file u-boot-1.1.2/board/neon/memsetup.S u-boot-1.1.2-neon/board/neon/memsetup.S
+--- u-boot-1.1.2/board/neon/memsetup.S 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/memsetup.S 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,64 @@
++/*
++ * Most of this taken from Redboot hal_platform_setup.h with cleanup
++ *
++ * NOTE: I haven't clean this up considerably, just enough to get it
++ * running. See hal_platform_setup.h for the source. See
++ * board/cradle/memsetup.S for another PXA250 setup that is
++ * much cleaner.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <config.h>
++#include <version.h>
++
++#define BAUDRATE 115200
++#include <asm/arch/platformTypes.h>
++#include <configs/select.h>
++#include <asm/arch/pxaGpio.h>
++#include <asm/arch/pxaMacro3.h>
++
++DRAM_SIZE: .long CFG_DRAM_SIZE
++
++/* wait for coprocessor write complete */
++ .macro CPWAIT reg
++ mrc p15,0,\reg,c2,c0,0
++ mov \reg,\reg
++ sub pc,pc,#4
++ .endm
++
++
++/*
++ * Memory setup
++ */
++
++.globl memsetup
++memsetup:
++
++ mov r10, lr
++
++ InitCS0_CS1 r0,sp
++ InitGPIO r0,sp
++ InitIC_Clocks r0,sp
++ InitUART r0,sp,UART_BASE,BAUDRATE
++ InitUART r0,sp,UART_BASE+0x600000,9600
++ InitChangeCPUSpeed r0
++ InitMemory r0,sp,r1
++
++ mov pc, lr
+diff -u -r --new-file u-boot-1.1.2/board/neon/neon.c u-boot-1.1.2-neon/board/neon/neon.c
+--- u-boot-1.1.2/board/neon/neon.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/neon.c 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,615 @@
++/*
++ * (C) Copyright 2002
++ * Kyle Harris, Nexus Technologies, Inc. kharris@nexus-tech.net
++ *
++ * (C) Copyright 2002
++ * Sysgo Real-Time Solutions, GmbH <www.elinos.com>
++ * Marius Groeger <mgroeger@sysgo.de>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <config.h>
++#include <common.h>
++#include <version.h>
++#include <stdarg.h>
++#include <linux/types.h>
++#include <devices.h>
++#include <lcd.h>
++#include <lcd_panels.h>
++
++#define FASTCLOCK1 0x291A0201 //faster pixel clock: P2S = 1, P2 = 9 (/6) ( panel source 1, divide by 6)
++ // V2S = 1, V2 = 10 (/12) ( crt source 1, divide by 12)
++ // M2S = 0, MR = 2 (/4) (sdram source 1, divide by 4)
++ // M1S = 0, MR = 1 (/2)
++ // miscTimReg[5:4] == 0 (336 MHz)
++ // / 6 == 56 MHz
++ //
++#define FASTCLOCK2 0x291A0201
++#define FASTCLOCK3 0x00080800
++
++#define SLOWCLOCK1 0x0A1A0201 //slow pixel clock: P2S = 0, P2 = 10 (/12) ( panel source 0, divide by 12)
++ // V2S = 1, V2 = 10 (/12) ( crt source 1, divide by 12)
++ // M2S = 0, MR = 2 (/4) (sdram source 1, divide by 4)
++ // M1S = 0, MR = 1 (/2)
++ // miscTimReg[5:4] == 0 (288 MHz)
++ // / 12 == 24 MHz
++ //
++#define SLOWCLOCK2 0x0A1A0A09
++#define SLOWCLOCK3 0x00090900
++
++unsigned long const fbStart = 0x0C000000 ;
++unsigned long const fbMax = 0x00800000 ; //
++
++unsigned long const mmioStart = 0xFE00000 ;
++unsigned long const mmioLength = 0x00200000 ;
++unsigned long const lcdPaletteRegs = 0xFE80400 ;
++unsigned long const crtPaletteRegs = 0xFE80C00 ;
++unsigned long paletteRegs = 0xFE80400 ;
++
++const unsigned int sm501_list1[]={
++ 0x0FE00000,
++ 0x00100000,0x00001002,0x00000000,0x00000000,0x07F127C0,0x05146732,0x40715128,0x00000000,
++ 0x00000000,0x00180002,0x00000002,0x00000002,0x00000000,0x00000000,0x0000001F,0x291A0201,
++ 0x0000001F,0x291A0201,0x00000007,0x291A0201,0x00018000,0x00000000,0x00000000,0x00000000,
++ 0x050100A0,0x00000000,0x00080800};
++
++const unsigned int sm501_list2[]={ 0x0fe80000,
++/* 80000 dispctrl */ 0x0F013100, // 0f0d0105
++/* 80004 pan */ 0x00000000,
++/* 80008 colorkey */ 0x00000000,
++/* 8000C fbaddr */ 0x00000000,
++/* 80010 offsetww */ 0x00000000, // ((LCD_XRES)<<16)+(LCD_XRES),
++/* 80014 fbwidth */ 0x00000000, // (LCD_XRES<<16),
++/* 80018 fbheight */ 0x00000000, // (LCD_YRES<<16),
++/* 8001C tllocate */ 0x00000000,
++/* 80020 brlocate */ 0x00000000, // ((LCD_YRES-1)<<16)+(LCD_XRES-1),
++/* 80024 htotal */ 0x00000000, // ((LCD_BEGIN_OF_LINE_WAIT_COUNT+
++/* */ // LCD_XRES+
++/* */ // LCD_END_OF_LINE_WAIT_COUNT+
++/* */ // LCD_HORIZONTAL_SYNC_PULSE_WIDTH-1)<<16)
++/* */ // +(LCD_XRES-1),
++/* 80028 hsync */ 0x00000000, // (LCD_HORIZONTAL_SYNC_PULSE_WIDTH<<16)
++/* */ // +(LCD_XRES+LCD_BEGIN_OF_LINE_WAIT_COUNT-1),
++/* 8002C vtotal */ 0x00000000, // ((LCD_BEGIN_FRAME_WAIT_COUNT+
++/* */ // LCD_YRES+
++/* */ // LCD_END_OF_FRAME_WAIT_COUNT+
++/* */ // LCD_VERTICAL_SYNC_PULSE_WIDTH-1)<<16)
++/* */ // +(LCD_YRES-1),
++/* 80030 vsync */ 0x00000000, // (LCD_VERTICAL_SYNC_PULSE_WIDTH<<16)
++/* */ // +(LCD_YRES+LCD_BEGIN_FRAME_WAIT_COUNT-1)
++};
++
++static unsigned const miscCtrl = 0x00000004 ;
++static unsigned const curClockReg = 0x0000003C ;
++static unsigned const pm0ClockReg = 0x00000044 ;
++static unsigned const pm1ClockReg = 0x0000004C ;
++static unsigned const miscTimReg = 0x00000068 ;
++
++static unsigned const dispctrlReg = 0x00080000 ;
++static unsigned const offsetReg = 0x00080010 ; // ((xres)<<16)+(xres),
++static unsigned const fbWidthReg = 0x00080014 ; // (xres<<16),
++static unsigned const fbHeightReg = 0x00080018 ; // (yres<<16),
++static unsigned const brLocateReg = 0x00080020 ; // ((yres-1)<<16)+(xres-1),
++static unsigned const hTotalReg = 0x00080024 ; // (left_margin+xres+right_margin+hsync_len-1) << 16
++ // + xres
++static unsigned const hSyncReg = 0x00080028 ; // (hsync_len<<16) + (xres+left_margin-1)
++static unsigned const vTotalReg = 0x0008002c ; // (top_margin+yres+lower_margin+vsync_len-1) << 16
++ // + yres-1
++static unsigned const vSyncReg = 0x00080030 ; // (vsync_len<<16) + yres+top_margin-1
++
++/*
++ * CRT regs
++ */
++static unsigned const crtctrlReg = 0x00080200 ;
++static unsigned const crtFbAddrReg = 0x00080204 ;
++static unsigned const crtFbOffsReg = 0x00080208 ;
++static unsigned const crtFbHTotReg = 0x0008020C ;
++static unsigned const crtFbHSynReg = 0x00080210 ;
++static unsigned const crtFbVTotReg = 0x00080214 ;
++static unsigned const crtFbVSynReg = 0x00080218 ;
++
++#define DISPCRTL_ENABLE 4
++
++#define CLOCK_ACTIVEHIGH 0
++#define CLOCK_ACTIVELOW (1<<14)
++#define CLOCK_ACTIVEMASK (1<<14)
++
++#define LCDTYPE_TFT 0
++#define LCDTYPE_STN12 (3<<18)
++#define LCDTYPE_MASK (3<<18)
++
++#define READREG( addr ) *( (unsigned long volatile *)((addr)+mmioStart) )
++#define STUFFREG( addr, value ) *( (unsigned long volatile *)((addr)+mmioStart) ) = (value)
++
++const unsigned int sm501_list3[]={0x0fe80040,
++ 0x00010000,0x0703E360,0x00200400,0x00A81330,0x0385009C,0x02200240,0x00000000,0x00000000,
++ 0x00EDEDED,0x089C4040,0x0031E3B0};
++
++const unsigned int sm501_list4[]={0x0fe80080,
++ 0x00010000,0x05121880,0x28800C00,0x00108030,0x02090040,0x00840050,0x00000000,0x00000000,
++ 0x0141A200,0x020A0802,0x0088D109,0x20820040,0x10800000,0x30029200,0x00080821,0x01010400,
++ 0x44000120,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
++ 0x00000000,0x00000000,0x00000000,0x00000000};
++
++const unsigned int sm501_list5[]={0x0fe800f0,
++ 0x0070F800,0x00780140,0x00000000,0x0000FFFF,0x00010000};
++
++struct itemEntry {
++ const int cnt;
++ const unsigned int* p;
++};
++
++const struct itemEntry lists[] = {
++ {sizeof(sm501_list1)>>2,sm501_list1},
++ {sizeof(sm501_list2)>>2,sm501_list2},
++ {sizeof(sm501_list3)>>2,sm501_list3},
++ {sizeof(sm501_list4)>>2,sm501_list4},
++ {sizeof(sm501_list5)>>2,sm501_list5}
++};
++
++int lcd_color_fg;
++int lcd_color_bg;
++
++void *lcd_base; /* Start of framebuffer memory */
++void *lcd_console_address; /* Start of console buffer */
++
++short console_col;
++short console_row;
++
++
++ulong calc_fbsize (void)
++{
++ if( cur_lcd_panel )
++ {
++ int line_length = (cur_lcd_panel->xres * NBITS (LCD_BPP)) / 8;
++ return ( cur_lcd_panel->yres * line_length ) + PAGE_SIZE ;
++ }
++ else
++ return 0 ;
++}
++
++void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
++{
++ unsigned long *const palette = (unsigned long *)paletteRegs ;
++ unsigned long const rgb = ((unsigned long)red ) << 16
++ | ((unsigned long)green ) << 8
++ | blue ;
++ palette[regno] = rgb ;
++}
++
++void lcd_ctrl_init (void *lcdbase)
++{
++ unsigned short *fbMem;
++ char *panelName ;
++
++ unsigned long val=0;
++ const struct itemEntry* l = lists;
++ int count = sizeof(lists)/sizeof(struct itemEntry);
++ printf( "sm501 init start\n");
++
++ while (count) {
++ int cnt = l->cnt-1;
++ const unsigned long* p = (unsigned long*)l->p;
++ volatile unsigned int* reg = (unsigned int*)(*p++);
++// printf( "set regs: %p, cnt:%x, from %p, l:%p\n", reg, cnt, p,l );
++// while (reg==0) {
++// }
++
++ while (cnt) {
++ val = *p++;
++// printf( "set reg: %p = %x from %p\n", reg, val, p );
++ *reg++ = val;
++ cnt--;
++ }
++ count--;
++ l++;
++ }
++// printf( "sm501 init middle\n");
++
++ panelName = getenv( "panel" );
++// printf( "after getenv\n");
++ if( panelName )
++ {
++ struct lcd_panel_info_t const *panel ;
++ panel = find_lcd_panel( panelName );
++ if( panel )
++ {
++ printf( "panel %s found: %u x %u\n", panelName, panel->xres, panel->yres );
++// printf( "before set_lcd_panel\n");
++ set_lcd_panel( panel );
++// printf( "after set_lcd_panel\n");
++ }
++ else
++ printf( "panel %s not found\n", panelName );
++ }
++
++ fbMem = (unsigned short *)fbStart ;
++ lcd_base = fbMem ;
++
++/*
++Settings for Hitachi 5.7
++ PANEL_HORIZONTAL_TOTAL, 01c00160);
++ PANEL_HORIZONTAL_SYNC, 00400161);
++ PANEL_VERTICAL_TOTAL, 0x010800f0);
++ PANEL_VERTICAL_SYNC, 0x00020104);
++
++In bdlogo.bmp - offset 436 is pixel data
++ STUFFREG( hTotalReg, 0x01800140 );
++ STUFFREG( hSyncReg, 0x0008014f );
++ STUFFREG( vTotalReg, 0x010700F0 );
++ STUFFREG( vSyncReg, 0x00020100 );
++*/
++ printf( "lcd_ctrl_init exit\n");
++}
++
++void lcd_enable (void)
++{
++}
++
++#define BIT29 (1<<29)
++
++static void setClockReg( unsigned reg, unsigned long value )
++{
++ unsigned oldValue = READREG( reg );
++ if( (oldValue & BIT29) != (value&BIT29) )
++ {
++ oldValue = (oldValue & (~BIT29))
++ | (value & BIT29);
++ STUFFREG( reg, oldValue );
++ udelay(16000);
++ }
++
++ if( oldValue != value )
++ STUFFREG( reg, value );
++}
++
++vidinfo_t panel_info = {
++ vl_col: 320, //this is corrected in SetPanelInfo
++ vl_row: 240,
++ vl_bpix: LCD_BPP,
++ vl_lcd_line_length: (320 * NBITS(LCD_BPP) ) >> 3
++};
++
++static void SetPanelInfo(struct lcd_panel_info_t const *panel)
++{
++ panel_info.vl_col = panel->xres;
++ panel_info.vl_row = panel->yres;
++ panel_info.vl_bpix = LCD_BPP;
++ panel_info.vl_lcd_line_length = (panel_info.vl_col * NBITS (panel_info.vl_bpix)) >> 3;
++ printf("panel: %ix%ix%i\n",panel_info.vl_col,panel_info.vl_row,(1<<panel_info.vl_bpix));
++}
++
++static unsigned long clockRegs[] = {
++ SLOWCLOCK1, SLOWCLOCK2,
++ FASTCLOCK1, FASTCLOCK2
++};
++
++static unsigned const numClockRegs = sizeof(clockRegs)/sizeof(clockRegs[0])/2 ;
++
++/*
++ * The following tables were built by screen-scraping and sorting
++ * the tables in the SM501 manual:
++ *
++ * Fields are:
++ * frequency in Hz
++ * clock source (0 == 288MHz, 1 == 366 MHz)
++ * select bits (5 bits for panels, 4 bits for CRTs)
++ */
++#define ENTRIESPERFREQ 3
++unsigned long const panelFrequencies[] = {
++ 450000/2, 0<<29, 0x17<<24,
++ 525000/2, 1<<29, 0x17<<24,
++ 750000/2, 0<<29, 0x0f<<24,
++ 875000/2, 1<<29, 0x0f<<24,
++ 900000/2, 0<<29, 0x16<<24,
++ 1050000/2, 1<<29, 0x16<<24,
++ 1500000/2, 0<<29, 0x0e<<24,
++ 1750000/2, 1<<29, 0x0e<<24,
++ 1800000/2, 0<<29, 0x15<<24,
++ 2100000/2, 1<<29, 0x15<<24,
++ 2250000/2, 0<<29, 0x07<<24,
++ 2625000/2, 1<<29, 0x07<<24,
++ 3000000/2, 0<<29, 0x0d<<24,
++ 3500000/2, 1<<29, 0x0d<<24,
++ 3600000/2, 0<<29, 0x14<<24,
++ 4200000/2, 1<<29, 0x14<<24,
++ 4500000/2, 0<<29, 0x06<<24,
++ 5250000/2, 1<<29, 0x06<<24,
++ 6000000/2, 0<<29, 0x0c<<24,
++ 7000000/2, 1<<29, 0x0c<<24,
++ 7200000/2, 0<<29, 0x13<<24,
++ 8400000/2, 1<<29, 0x13<<24,
++ 9000000/2, 0<<29, 0x05<<24,
++ 10500000/2, 1<<29, 0x05<<24,
++ 12000000/2, 0<<29, 0x0b<<24,
++ 14000000/2, 1<<29, 0x0b<<24,
++ 14400000/2, 0<<29, 0x12<<24,
++ 16800000/2, 1<<29, 0x12<<24,
++ 18000000/2, 0<<29, 0x04<<24,
++ 21000000/2, 1<<29, 0x04<<24,
++ 24000000/2, 0<<29, 0x0a<<24,
++ 28000000/2, 1<<29, 0x0a<<24,
++ 28800000/2, 0<<29, 0x11<<24,
++ 33600000/2, 1<<29, 0x11<<24,
++ 36000000/2, 0<<29, 0x03<<24,
++ 42000000/2, 1<<29, 0x03<<24,
++ 48000000/2, 0<<29, 0x09<<24,
++ 56000000/2, 1<<29, 0x09<<24,
++ 57600000/2, 0<<29, 0x10<<24,
++ 67200000/2, 1<<29, 0x10<<24,
++ 72000000/2, 0<<29, 0x02<<24,
++ 84000000/2, 1<<29, 0x02<<24,
++ 96000000/2, 0<<29, 0x08<<24,
++ 112000000/2, 1<<29, 0x08<<24,
++ 144000000/2, 0<<29, 0x01<<24,
++ 168000000/2, 1<<29, 0x01<<24,
++ 288000000/2, 0<<29, 0x00<<24,
++ 336000000/2, 1<<29, 0x00<<24
++};
++#define numPanelFrequencies (sizeof(panelFrequencies)/sizeof(panelFrequencies[0])/ENTRIESPERFREQ)
++
++unsigned long const crtFrequencies[] = {
++ 750000/2, 0<<20, 0x0f<<16,
++ 875000/2, 1<<20, 0x0f<<16,
++ 1500000/2, 0<<20, 0x0e<<16,
++ 1750000/2, 1<<20, 0x0e<<16,
++ 2250000/2, 0<<20, 0x07<<16,
++ 2625000/2, 1<<20, 0x07<<16,
++ 3000000/2, 0<<20, 0x0d<<16,
++ 3500000/2, 1<<20, 0x0d<<16,
++ 4500000/2, 0<<20, 0x06<<16,
++ 5250000/2, 1<<20, 0x06<<16,
++ 6000000/2, 0<<20, 0x0c<<16,
++ 7000000/2, 1<<20, 0x0c<<16,
++ 9000000/2, 0<<20, 0x05<<16,
++ 10500000/2, 1<<20, 0x05<<16,
++ 12000000/2, 0<<20, 0x0b<<16,
++ 14000000/2, 1<<20, 0x0b<<16,
++ 18000000/2, 0<<20, 0x04<<16,
++ 21000000/2, 1<<20, 0x04<<16,
++ 24000000/2, 0<<20, 0x0a<<16,
++ 28000000/2, 1<<20, 0x0a<<16,
++ 36000000/2, 0<<20, 0x03<<16,
++ 42000000/2, 1<<20, 0x03<<16,
++ 48000000/2, 0<<20, 0x09<<16,
++ 56000000/2, 1<<20, 0x09<<16,
++ 72000000/2, 0<<20, 0x02<<16,
++ 84000000/2, 1<<20, 0x02<<16,
++ 96000000/2, 0<<20, 0x08<<16,
++ 112000000/2, 1<<20, 0x08<<16,
++ 144000000/2, 0<<20, 0x01<<16,
++ 168000000/2, 1<<20, 0x01<<16,
++ 288000000/2, 0<<20, 0x00<<16,
++ 336000000/2, 1<<20, 0x00<<16
++};
++#define numCrtFrequencies (sizeof(crtFrequencies)/sizeof(crtFrequencies[0])/ENTRIESPERFREQ)
++
++unsigned long const * const frequencies[] = {
++ panelFrequencies,
++ crtFrequencies
++};
++
++unsigned const numFrequencies[] = {
++ numPanelFrequencies,
++ numCrtFrequencies
++};
++
++static unsigned long const clockMasks[] = {
++ 0x3F<<24,
++ 0x1F<<16
++};
++
++static void updateCRT( unsigned long const *freq,
++ struct lcd_panel_info_t const *panel )
++{
++ unsigned long reg ;
++ unsigned long crtCtrl = 0x00010304 ; // FIFO 3 or more, CRT Timing, CRT data, enable 8-bit
++ if( panel->act_high )
++ crtCtrl |= (3<<14); // horizontal and vertical phase
++ STUFFREG( crtFbAddrReg, 0 );
++ STUFFREG( crtFbOffsReg, ((panel->xres)<<16)+(panel->xres) );
++ STUFFREG( crtFbHTotReg, (( panel->left_margin
++ +panel->xres
++ +panel->right_margin
++ +panel->hsync_len - 1) << 16 )
++ + panel->xres-1 );
++ STUFFREG( crtFbHSynReg, (panel->hsync_len<<16)+ (panel->xres+panel->left_margin-1) );
++ STUFFREG( crtFbVTotReg, (( panel->upper_margin
++ +panel->yres
++ +panel->lower_margin
++ +panel->vsync_len-1 ) << 16 )
++ + panel->yres-1 );
++ STUFFREG( crtFbVSynReg,(panel->vsync_len<<16)
++ + panel->yres+panel->upper_margin-1 );
++ STUFFREG( crtctrlReg, crtCtrl ); // enable
++
++ reg = READREG( miscCtrl ) & ~0x1000 ;
++ STUFFREG( miscCtrl, reg );
++}
++
++void set_lcd_panel( struct lcd_panel_info_t const *panel )
++{
++ unsigned long dispctrl = READREG( dispctrlReg );
++ dispctrl &= ~(CLOCK_ACTIVEMASK|LCDTYPE_MASK);
++ if( !panel->act_high )
++ dispctrl |= CLOCK_ACTIVELOW ;
++ else
++ dispctrl &= ~CLOCK_ACTIVEMASK ;
++
++ if( !panel->active )
++ dispctrl |= LCDTYPE_STN12 ;
++ else
++ dispctrl &= ~LCDTYPE_MASK ;
++
++ if (panel->crt==0) dispctrl |= 4;
++
++ STUFFREG( offsetReg, ((panel->xres)<<16)+(panel->xres) );
++ STUFFREG( fbWidthReg, (panel->xres<<16) );
++ STUFFREG( fbHeightReg, (panel->yres<<16) );
++ STUFFREG( brLocateReg, ((panel->yres-1)<<16)+(panel->xres-1) );
++ STUFFREG( hTotalReg, (( panel->left_margin
++ +panel->xres
++ +panel->right_margin
++ +panel->hsync_len - 1) << 16 )
++ + panel->xres-1 );
++ STUFFREG( hSyncReg, (panel->hsync_len<<16)+ (panel->xres+panel->left_margin-1) );
++ STUFFREG( vTotalReg, (( panel->upper_margin
++ +panel->yres
++ +panel->lower_margin
++ +panel->vsync_len-1 ) << 16 )
++ + panel->yres-1 );
++ STUFFREG( vSyncReg, (panel->vsync_len<<16)
++ + panel->yres+panel->upper_margin-1 );
++
++ if( panel->pixclock < numClockRegs )
++ {
++ unsigned long const *clk = clockRegs+(panel->pixclock*2);
++ setClockReg( curClockReg, *clk );
++ setClockReg( pm0ClockReg, *clk++ );
++ setClockReg( pm1ClockReg, *clk );
++ }
++ else
++ {
++ int const isCRT = (0 != panel->crt);
++ int crt ;
++
++ for( crt = 0 ; crt < 2 ; crt++ )
++ {
++ unsigned long reg ;
++ unsigned long const *freq = frequencies[crt];
++ unsigned const count = numFrequencies[crt];
++
++ unsigned long f, diffl, diffh ;
++ int i ;
++ unsigned long low, high ;
++
++ //
++ // linear scan for closest frequency
++ //
++ for( i = 0 ; i < count ; i++, freq += ENTRIESPERFREQ )
++ {
++ if( *freq > panel->pixclock )
++ break;
++ }
++
++ low = (i > 0)
++ ? freq[0-ENTRIESPERFREQ]
++ : 0 ;
++ diffl = panel->pixclock - low ;
++
++ high = (i < count )
++ ? *freq
++ : 0xFFFFFFFF ;
++ diffh = high - panel->pixclock ;
++
++ if( diffh < diffl )
++ {
++ f = high ;
++ }
++ else
++ {
++ f = low ;
++ freq-- ;
++ }
++
++ printf( "pixclock == %lu, frequency %u/%u -> %lu\n",
++ panel->pixclock, low, high, f );
++
++ reg = READREG( curClockReg ) & ~(clockMasks[crt]);
++
++ // Clock source
++ printf( "source %u, divisor %u\n", freq[1], freq[2] );
++ reg |= freq[1];
++ reg |= freq[2];
++
++ setClockReg( curClockReg, reg );
++ setClockReg( pm0ClockReg, reg );
++ setClockReg( pm1ClockReg, reg );
++
++ if( isCRT )
++ {
++ paletteRegs = crtPaletteRegs ;
++ updateCRT( freq, panel );
++ }
++ else
++ paletteRegs = lcdPaletteRegs ;
++ }
++ }
++ STUFFREG( dispctrlReg, dispctrl );
++ cur_lcd_panel = panel ;
++ SetPanelInfo(panel);
++}
++
++void disable_lcd_panel( void )
++{
++ unsigned long dispctrl = READREG( dispctrlReg );
++ unsigned long crtctrl = READREG( crtctrlReg );
++
++ dispctrl &= ~(DISPCRTL_ENABLE);
++ STUFFREG( dispctrlReg, dispctrl );
++
++ crtctrl &= ~(DISPCRTL_ENABLE);
++ STUFFREG( crtctrlReg, crtctrl );
++}
++
++/* ------------------------------------------------------------------------- */
++
++
++/*
++ * Miscelaneous platform dependent initialisations
++ */
++
++int board_init (void)
++{
++ DECLARE_GLOBAL_DATA_PTR;
++
++ /* memory and cpu-speed are setup before relocation */
++ /* so we do _nothing_ here */
++
++ /* arch number of Neon Board */
++ gd->bd->bi_arch_number = MACH_TYPE_BD2003 ;
++
++ /* adress of boot parameters */
++ gd->bd->bi_boot_params = 0xa0000100;
++
++ /* address of frame buffer */
++ gd->fb_base = fbStart ;
++
++ return 0;
++}
++
++int board_late_init(void)
++{
++ setenv("stdout", "serial");
++ setenv("stderr", "serial");
++ return 0;
++}
++
++
++int dram_init (void)
++{
++ DECLARE_GLOBAL_DATA_PTR;
++
++ gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
++ gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;
++
++ return 0;
++}
+diff -u -r --new-file u-boot-1.1.2/board/neon/rtc_M41T81S.c u-boot-1.1.2-neon/board/neon/rtc_M41T81S.c
+--- u-boot-1.1.2/board/neon/rtc_M41T81S.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/rtc_M41T81S.c 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,663 @@
++/*
++ * M41T81S:
++ *
++ * This module defines a single 'rtc' command to read/write or
++ * test the ST Micro Real Time Clock attached to the SM-501
++ * I2C pins.
++ *
++ * If called with no parameters, it will display the current time
++ * to the console device and set the 'time' environment variable.
++ *
++ * If called with a single parameter of "test", it will read the
++ * current time, wait a second and read the current time again.
++ * It will return success (zero) if the RTC time appears to tick
++ * by 1 second.
++ *
++ * If called with one or two parameters that appear to fit an
++ * ISO 8601 time format (i.e. YYYY-MM-DD HH:MM:SS.00 ), it will
++ * set the date and time.
++ *
++ * Copyright (c) Boundary Devices, 2006
++ *
++ */
++#include "sm501.h"
++#include <config.h>
++#include <common.h>
++#include <version.h>
++#include <stdarg.h>
++#include <command.h>
++
++int WriteI2C(int bVal);
++int ReadI2C(int ack);
++int I2CStart(int bSlaveAddress);
++void I2CStop(void);
++void I2CInit(void);
++
++//////////////////////////////////////////////////////////
++
++#define SM501_GPIO_DATA 0x10000
++#define SM501_GPIO_DIR 0x10008
++
++#define INPUT 0
++#define OUTPUT 1
++
++#define I2C_CLK 46
++#define I2C_DATA 47
++#define GPBIT_MASK(bitnum) (1<<(bitnum&0x1f))
++#define GPBIT_TEST(bitnum) ( (ReadReg(SM501_GPIO_DATA + ((bitnum>>5)<<2))) & (1<<(bitnum&0x1f)) )
++#define GPBIT_TESTBIT(c,bitnum) ( c & (1<<(bitnum&0x1f)) )
++#define GPBIT_SET(x,bitnum,value) ( (value) ? ((x) | (1<<(bitnum&0x1f))) : ((x) & ~(1<<(bitnum&0x1f))) )
++
++//0.400 Mhz protocol = 1/.4 uSec = 10/4 uSec = 2.5 uSec
++//4 should be safe
++#define I2CWait 4
++#define LongBusWait 8
++#define StartBusWait 12
++
++typedef struct {
++ unsigned short wYear;
++ unsigned short wMonth;
++ unsigned short wDayOfWeek;
++ unsigned short wDay;
++ unsigned short wHour;
++ unsigned short wMinute;
++ unsigned short wSecond;
++ unsigned short wMilliseconds;
++} SYSTEMTIME ;
++
++typedef SYSTEMTIME *LPSYSTEMTIME ;
++
++void I2CInit(void)
++{
++ int i;
++
++ for(i=0; i<9; i++)
++ {
++ I2CStop();
++ }
++}
++
++
++#define ReadReg(reg) READ_SM501_REG(reg)
++#define WriteReg(reg,data) STUFF_SM501_REG((reg), (data))
++
++void SetVal_ClkData(int clk,int data)
++{
++#if (I2C_DATA>>5)==(I2C_CLK>>5)
++ ulong c = ReadReg( SM501_GPIO_DATA + ((I2C_DATA>>5)<<2) );
++ c = GPBIT_SET(c, I2C_DATA, data);
++ c = GPBIT_SET(c, I2C_CLK, clk);
++ WriteReg(SM501_GPIO_DATA + ((I2C_DATA>>5)<<2), c);
++#else
++ ulong c = ReadReg( SM501_GPIO_DATA + ((I2C_DATA>>5)<<2) );
++ c = GPBIT_SET(c, I2C_DATA, data);
++ WriteReg(SM501_GPIO_DATA + ((I2C_DATA>>5)<<2), c);
++
++ c = ReadReg( SM501_GPIO_DATA + ((I2C_CLK>>5)<<2) );
++ c = GPBIT_SET(c, I2C_CLK, clk);
++ WriteReg(SM501_GPIO_DATA + ((I2C_CLK>>5)<<2), c);
++#endif
++}
++
++void SetDir_ClkData(int clk,int data)
++{
++ ulong c,c1;
++#if (I2C_DATA>>5)==(I2C_CLK>>5)
++ c = ReadReg( SM501_GPIO_DIR + ((I2C_CLK>>5)<<2) );
++ if (clk==OUTPUT) {
++ //will be low, and can then change data
++ c1 = GPBIT_SET(c, I2C_CLK, OUTPUT);
++ if (c!=c1) WriteReg( SM501_GPIO_DIR + ((I2C_CLK>>5)<<2), c1);
++ c = GPBIT_SET(c1, I2C_DATA, data);
++ } else {
++ //clk might be low currently, so change data 1st
++ c1 = GPBIT_SET(c, I2C_DATA, data);
++ if (c!=c1) WriteReg( SM501_GPIO_DIR + ((I2C_DATA>>5)<<2), c1);
++ c = GPBIT_SET(c1, I2C_CLK, INPUT);
++ }
++ if (c!=c1) WriteReg( SM501_GPIO_DIR + ((I2C_CLK>>5)<<2), c);
++#else
++ if (clk==OUTPUT) {
++ //will be low, and can then change data
++ c = ReadReg( SM501_GPIO_DIR + ((I2C_CLK>>5)<<2) );
++ c1 = GPBIT_SET(c, I2C_CLK, OUTPUT);
++ if (c!=c1) WriteReg( SM501_GPIO_DIR + ((I2C_CLK>>5)<<2), c1);
++
++ c1 = ReadReg( SM501_GPIO_DIR + ((I2C_DATA>>5)<<2) );
++ c = GPBIT_SET(c1, I2C_DATA, data);
++ if (c!=c1) WriteReg( SM501_GPIO_DIR + ((I2C_DATA>>5)<<2), c);
++ } else {
++ //clk might be low currently, so change data 1st
++ c = ReadReg( SM501_GPIO_DIR + ((I2C_DATA>>5)<<2) );
++ c1 = GPBIT_SET(c, I2C_DATA, data);
++ if (c!=c1) WriteReg( SM501_GPIO_DIR + ((I2C_DATA>>5)<<2), c1);
++
++ c1 = ReadReg( SM501_GPIO_DIR + ((I2C_CLK>>5)<<2) );
++ c = GPBIT_SET(c1, I2C_CLK, INPUT);
++ if (c!=c1) c1WriteReg( SM501_GPIO_DIR + ((I2C_CLK>>5)<<2), c);
++ }
++#endif
++}
++void SetDir_Clk(int clk)
++{
++ ulong c = ReadReg( SM501_GPIO_DIR + ((I2C_CLK>>5)<<2) );
++ c = GPBIT_SET(c, I2C_CLK, clk);
++ WriteReg( SM501_GPIO_DIR + ((I2C_CLK>>5)<<2), c);
++}
++
++void I2CStop()
++{
++ SetDir_Clk(OUTPUT); //low clock
++ udelay(I2CWait);
++ SetDir_ClkData(OUTPUT,OUTPUT); //low clock, low data
++ udelay(I2CWait);
++
++ //Drive Write SCL High
++ SetDir_Clk(INPUT); //high clock
++ udelay(I2CWait);
++
++ // Drive Write SDA High
++ SetDir_ClkData(INPUT,INPUT); //transition on data from low to high while clock is high is a stop control signal
++ udelay(LongBusWait);
++
++}
++
++
++//return 0 for success
++int WriteI2C(int bVal)
++{
++
++ int mask;
++ int i;
++
++ // Enable Write SDA and SCL, and Drv SCL low
++ SetDir_Clk(OUTPUT); //clock low
++ udelay(I2CWait); //hold time
++
++ for (mask=0x80; mask; mask>>=1)
++ {
++ SetDir_ClkData(OUTPUT, (bVal & mask) ? INPUT : OUTPUT); // Write data bits to SDA
++ udelay(LongBusWait);
++
++ SetDir_Clk(INPUT); // Drv CLK High
++ udelay(I2CWait);
++
++ SetDir_Clk(OUTPUT); // Drv CLK Low
++ udelay(I2CWait); //hold time after clock goes low
++ }
++
++
++ SetDir_ClkData(OUTPUT,INPUT); // Disable Write SDA
++ udelay(LongBusWait); //wait for acknowledge to be placed on SDA
++ SetDir_Clk(INPUT); // Drive Clock High
++
++ // Read SDA, until SDA==0
++ for (i=0; i<255; i++) {
++ udelay(LongBusWait);
++ if (!GPBIT_TEST(I2C_DATA)) {
++ SetDir_Clk(OUTPUT); // Drv Clk LOW
++ return 0; //success
++ }
++ }
++
++ printf( "WriteI2C(%i) failed\n", bVal );
++ return -1;
++}
++
++int ReadI2C(int ack)
++{
++ int mask;
++ int byRet = 0;
++
++// SetVal_ClkData(0,0);
++ SetDir_Clk(OUTPUT); //clock low
++ udelay(I2CWait); //hold time
++
++ SetDir_ClkData(OUTPUT,INPUT); //clock low, data input
++ for (mask=0x80; mask; mask>>=1)
++ {
++ // Disable Write SDA, Drive SCL to LOW
++ SetDir_Clk(OUTPUT); //clock low
++ udelay(LongBusWait);
++
++ // Enable Write SCL, Drive SCL to HIGH
++ SetDir_Clk(INPUT); //clock high
++ udelay(I2CWait);
++
++ // Read data bits from SDA
++ if (GPBIT_TEST(I2C_DATA)) byRet |= mask; //sample data bit
++ }
++
++ SetDir_Clk(OUTPUT); //clock low
++ udelay(I2CWait); //let them stop driving data line
++
++ if (ack) {
++ SetDir_ClkData(OUTPUT,OUTPUT); //clock low, data low for ack
++ }
++ udelay(I2CWait);
++ SetDir_Clk(INPUT); //clock high
++ udelay(I2CWait); //wait ack/noack phase
++ return byRet;
++
++}
++
++int I2CStart(int SlaveAddress)
++{
++ int ret;
++ udelay(I2CWait);
++ // Enable Write SDA and Write SCL, and drive them high
++ SetDir_ClkData(INPUT,INPUT);
++ SetVal_ClkData(0,0); //they float high anyway
++ udelay(StartBusWait);
++
++ // Drive Data
++ SetDir_ClkData(INPUT,OUTPUT); //drive data low, (high to low transition on data, while clock high is start signal)
++ udelay(StartBusWait);
++
++ ret = WriteI2C(SlaveAddress);
++ if (ret) {
++ printf( "I2CStart failed write of device address\n" );
++ }
++ return ret;
++}
++
++#define M41T81S_SlaveAddrWrite 0xd0
++#define M41T81S_SlaveAddrRead 0xd1
++
++#define M_HUNDREDTHS 0 //00-99 BCD
++#define M_SECONDS 1 //00-59 BCD, bit 7 ST (oscillator is stopped bit)
++#define M_MINUTES 2 //00-59 BCD
++#define M_HOURS 3 //high 2 bits are CENTURY, low 6 BCD 00-23
++#define M_WEEKDAY 4 //01-07
++#define M_DAY 5 //01-31 BCD
++#define M_MONTH 6 //01-12 BCD
++#define M_YEAR 7 //00-99 BCD
++#define M_CALIBRATION 8
++#define M_WATCHDOG 9
++#define M_ALARM_MOTH 0x0a //01-12 BCD, high 3 bits enable
++#define M_ALARM_DAY 0x0b //01-31 BCD. high 2 bits RPT4, RPT5
++#define M_ALARM_HOUR 0x0c //00-23 BCD, high 2 bits RPT3, HT
++#define M_ALARM_MINUTES 0x0d //00-59 BCD, high bit RPT2
++#define M_ALARM_SECONDS 0x0e //00-59 BCD, high bit RPT1
++#define M_FLAGS 0x0f //bit 7(WDF), 6(AF), 4(BL), 2(OF)
++#define M_SQW 0x13 //bit 7(RS3), 6(RS2), 5(RS1), 4(RS0)
++
++//M_FLAGS bit mask definitions
++#define MF_WDF 0x80 //Watchdog flag
++#define MF_AF 0x40 //Alarm flag
++#define MF_BL 0x10 //Battery low
++#define MF_OF 0x04 //Oscillator fail
++static int bcd(int val,int low, int high)
++{
++ int tens = val>>4;
++ int ones = val & 0xf;
++ if ((tens > 9) || (ones > 9)) return -1;
++ val = (tens*10) + ones;
++ if ((val < low) || (val > high)) return -1;
++ return val;
++}
++static unsigned char toBcd(int val)
++{
++ int tens = val/10;
++ int rem = val - (tens*10);
++ if (tens >= 10) tens = tens % 10;
++ return (tens<<4) | rem;
++}
++
++static int GetTime(LPSYSTEMTIME lpst)
++{
++ unsigned char b[M_YEAR+1];
++ unsigned char * p = b;
++ unsigned char flags;
++ int i;
++ I2CInit(); //send a bunch of stops
++
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_ALARM_HOUR)) return -1;
++ if (I2CStart(M41T81S_SlaveAddrRead)) return -1;
++
++ b[0] = (unsigned char)ReadI2C(0); //read Halt bit
++ I2CStop();
++
++ if (b[0] & 0x40) {
++ //halted, restart it
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_ALARM_HOUR)) return -1;
++ if (WriteI2C(b[0] & ~0x40)) return -1; //clear Halt bit
++ I2CStop();
++ }
++
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_HUNDREDTHS)) return -1;
++ if (I2CStart(M41T81S_SlaveAddrRead)) return -1;
++ for (i=0; i<M_YEAR; i++) *p++ = (unsigned char)ReadI2C(1);
++ *p++ = (unsigned char)ReadI2C(0); //read year
++ I2CStop();
++
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_FLAGS)) return -1;
++ if (I2CStart(M41T81S_SlaveAddrRead)) return -1;
++ flags = (unsigned char)ReadI2C(0); //read flags
++ I2CStop();
++
++ if (flags & MF_BL) {
++ printf( "M41T81S_GetTime: Battery low\n" );
++ }
++ if (flags & MF_OF) {
++ printf( "M41T81S_GetTime: Oscillator failed\n" );
++
++ //stop oscillator
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_SECONDS)) return -1;
++ if (WriteI2C(b[M_SECONDS] | 0x80)) return -1; //set stop bit
++ I2CStop();
++
++ //start oscillator
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_SECONDS)) return -1;
++ if (WriteI2C(b[M_SECONDS] & ~0x80)) return -1; //clear stop bit
++ I2CStop();
++ }
++
++
++ lpst->wYear = ( (b[M_YEAR] > 0x99) || ((b[M_YEAR]&0xf) > 0x9) ) ? 0 :
++ (bcd(b[M_YEAR],0,99) + ( (b[M_HOURS]&0x40) ? 2100 : 2000));
++ lpst->wMonth = bcd(b[M_MONTH],1,12);
++ lpst->wDayOfWeek = bcd(b[M_WEEKDAY],1,7);
++ lpst->wDay = bcd(b[M_DAY],1,31);
++ lpst->wHour = bcd(b[M_HOURS]&0x3f,0,23);
++ lpst->wMinute = bcd(b[M_MINUTES],0,59);
++ lpst->wSecond = bcd(b[M_SECONDS]&0x7f,0,59);
++ lpst->wMilliseconds = bcd(b[M_HUNDREDTHS],0,99)*10;
++
++ if (b[M_SECONDS] & 0x80) {
++ //oscillator is stopped, restart it
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_SECONDS)) return -1;
++ if (WriteI2C(b[M_SECONDS] & ~0x80)) return -1; //clear stop bit
++ I2CStop();
++ }
++
++/*
++ printf( "M41T81S_GetTime: Year:%u, Month:%u, Day:%u, Hour:%u, Minute:%u, second:%u, milli:%u\n",
++ lpst->wYear, lpst->wMonth,lpst->wDay, lpst->wHour, lpst->wMinute, lpst->wSecond,lpst->wMilliseconds );
++*/
++ if (flags & MF_OF) {
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_FLAGS)) return -1;
++ if (WriteI2C(flags & ~MF_OF)) return -1; //clear oscillator failed bit
++ I2CStop();
++ }
++ return 0;
++}
++
++static int SetTime(LPSYSTEMTIME lpst)
++{
++ unsigned char b[M_YEAR+1];
++ unsigned char flags;
++ int i;
++ if (lpst->wYear < 2004) {
++ lpst->wYear = 2004; //don't allow it to be set in the far past.
++ lpst->wMonth = 1;
++ lpst->wDay = 1;
++ lpst->wDayOfWeek = 4; //Thursday Jan. 1, 2004
++ }
++
++/* printf( "M41T81S_SetTime: Year:%u, Month:%u, Day:%u, Hour:%u, Minute:%u, second:%u, milli:%u\n",
++ lpst->wYear, lpst->wMonth,lpst->wDay, lpst->wHour, lpst->wMinute, lpst->wSecond,lpst->wMilliseconds );
++*/
++ b[M_HUNDREDTHS] = 0; //toBcd(lpst->wMilliseconds/10);
++ b[M_SECONDS] = toBcd(lpst->wSecond);
++ b[M_MINUTES] = toBcd(lpst->wMinute);
++ b[M_HOURS] = toBcd(lpst->wHour) | ( ((lpst->wYear % 200) >= 100) ? 0xc0 : 0x80);
++ b[M_WEEKDAY] = (unsigned char)lpst->wDayOfWeek;
++ b[M_DAY] = toBcd(lpst->wDay);
++ b[M_MONTH] = toBcd(lpst->wMonth);
++ b[M_YEAR] = toBcd( lpst->wYear % 100);
++
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_HUNDREDTHS)) return -1;
++
++ for (i=M_HUNDREDTHS; i<=M_YEAR; i++) {
++ if (WriteI2C(b[i])) return -1;
++ }
++ I2CStop();
++
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_FLAGS)) return -1;
++ if (I2CStart(M41T81S_SlaveAddrRead)) return -1;
++ flags = (unsigned char)ReadI2C(0); //read flags
++ I2CStop();
++
++/* printf( "M41T81S_SetTime: Year:%u, Month:%u, Day:%u, Weekday:%u, Hour:%u, Minute:%u, second:%u flags:%u\n",
++ lpst->wYear, lpst->wMonth, lpst->wDay, lpst->wDayOfWeek, lpst->wHour, lpst->wMinute, lpst->wSecond, flags );
++*/
++
++ if (flags & MF_OF) {
++ if (I2CStart(M41T81S_SlaveAddrWrite)) return -1;
++ if (WriteI2C(M_FLAGS)) return -1;
++ if (WriteI2C(flags & ~MF_OF)) return -1; //clear oscillator failed bit
++ I2CStop();
++ }
++ return 0;
++}
++
++int M41T81S_GetTime(LPSYSTEMTIME lpst)
++{
++ int ret;
++ int reg = (READ_SM501_REG(SMIR_POWER_MODE_CONTROL) & 1) ? SMIR_PWRM1_GATE : SMIR_PWRM0_GATE;
++ int gate = READ_SM501_REG(reg);
++ if ((gate & 0x40)==0) STUFF_SM501_REG(reg, gate | 0x40);
++ STUFF_SM501_REG(SMIR_GPIO_32_63_CONTROL,
++ READ_SM501_REG(SMIR_GPIO_32_63_CONTROL)
++ & ~(GPBIT_MASK(I2C_CLK)|GPBIT_MASK(I2C_DATA))); // set as gpio controlled
++ udelay(LongBusWait);
++ ret = GetTime(lpst);
++ udelay(I2CWait);
++ SetDir_ClkData(INPUT,INPUT); //high clock, high data, just for safety, should be input already
++ if ((gate & 0x40)==0){
++ STUFF_SM501_REG( reg,
++ READ_SM501_REG( reg )
++ & ~0x40 ); //disable gpio if was originally
++ }
++
++ return ret;
++}
++int M41T81S_SetTime(LPSYSTEMTIME lpst)
++{
++ int ret;
++ int reg = (READ_SM501_REG(SMIR_POWER_MODE_CONTROL) & 1) ? SMIR_PWRM1_GATE : SMIR_PWRM0_GATE;
++ int gate = READ_SM501_REG(reg);
++ if ((gate & 0x40)==0) STUFF_SM501_REG(reg, gate | 0x40);
++ STUFF_SM501_REG(SMIR_GPIO_32_63_CONTROL,
++ READ_SM501_REG(SMIR_GPIO_32_63_CONTROL)
++ & ~(GPBIT_MASK(I2C_CLK)|GPBIT_MASK(I2C_DATA))); // set as gpio controlled
++ udelay(LongBusWait);
++ ret = SetTime(lpst);
++ udelay(I2CWait);
++ SetDir_ClkData(INPUT,INPUT); //high clock, high data, just for safety, should be input already
++ if ((gate & 0x40)==0){
++ STUFF_SM501_REG( reg,
++ READ_SM501_REG( reg )
++ & ~0x40 ); //disable gpio if was originally
++ }
++
++ return ret;
++}
++
++static int badTime( LPSYSTEMTIME lpst )
++{
++ return ( 1 > lpst->wMonth)
++ ||
++ ( 12 < lpst->wMonth)
++ ||
++ ( 1 > lpst->wDay)
++ ||
++ ( 12 < lpst->wDay)
++ ||
++ ( 24 <= lpst->wHour)
++ ||
++ ( 60 <= lpst->wMinute)
++ ||
++ ( 60 <= lpst->wSecond)
++ ||
++ ( 1000 <= lpst->wMilliseconds );
++}
++
++static unsigned diffMs( LPSYSTEMTIME lpst1,
++ LPSYSTEMTIME lpst2 )
++{
++ return ( (long)lpst2->wMilliseconds-(long)lpst1->wMilliseconds )
++ + ( (long)lpst2->wSecond-(long)lpst1->wSecond)*1000
++ + ( (long)lpst2->wMinute-(long)lpst1->wMinute)*60000
++ + ( (long)lpst2->wHour-(long)lpst1->wHour)*3600000 ;
++}
++
++static void printTime( LPSYSTEMTIME t )
++{
++ printf( "%04u-%02u-%02u %02u:%02u:%02u.%02u",
++ t->wYear, t->wMonth, t->wDay,
++ t->wHour, t->wMinute, t->wSecond, t->wMilliseconds/10 );
++}
++
++// returns zero for success
++static int parseTime( LPSYSTEMTIME t,
++ char const *dateString,
++ char const *timeString )
++{
++ int rval = 1 ;
++ char *nextIn ;
++ unsigned long inVal = simple_strtoul( dateString, &nextIn, 10 );
++ if( ( 0 == inVal ) || ( 2999 < inVal ) || ( '-' != *nextIn ) )
++ goto bail ;
++
++ nextIn++ ;
++ t->wYear = inVal ;
++
++ inVal = simple_strtoul( nextIn, &nextIn, 10 );
++ if( ( 0 == inVal ) || ( 12 < inVal ) || ( '-' != *nextIn ) )
++ goto bail ;
++
++ nextIn++ ;
++ t->wMonth = inVal ;
++
++ inVal = simple_strtoul( nextIn, &nextIn, 10 );
++ if( ( 0 == inVal ) || ( 31 < inVal ) || ( '\0' != *nextIn ) )
++ goto bail ;
++
++ nextIn++ ;
++ t->wDay = inVal ;
++
++ t->wHour = 0 ; t->wMinute = 0 ; t->wSecond = 0 ; t->wMilliseconds = 0 ;
++
++ if( 0 != timeString )
++ {
++ inVal = simple_strtoul( timeString, &nextIn, 10 );
++ if( ( 23 < inVal ) || ( ':' != *nextIn ) )
++ goto bail ;
++
++ nextIn++ ;
++ t->wHour = inVal ;
++
++ inVal = simple_strtoul( nextIn, &nextIn, 10 );
++ if( ( 59 < inVal ) || ( ':' != *nextIn ) )
++ goto bail ;
++
++ nextIn++ ;
++ t->wMinute = inVal ;
++
++ inVal = simple_strtoul( nextIn, &nextIn, 10 );
++ if( ( 59 < inVal ) || ( '.' != *nextIn ) )
++ goto bail ;
++
++ nextIn++ ;
++ t->wSecond = inVal ;
++
++ inVal = simple_strtoul( nextIn, &nextIn, 10 );
++ if( ( 99 < inVal ) || ( '\0' != *nextIn ) )
++ goto bail ;
++
++ nextIn++ ;
++ t->wMilliseconds = inVal*10 ;
++ rval = 0 ;
++ }
++ else
++ rval = 0 ;
++
++bail:
++ return rval ;
++}
++
++int do_rtc (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ int rval = 1 ;
++
++ if( 1 == argc )
++ {
++ SYSTEMTIME t ;
++ int rval = M41T81S_GetTime( &t );
++ if( 0 == rval )
++ {
++ printTime(&t);
++ }
++ }
++ else if( ( 2 == argc ) && ( 0 == strcmp( "test", argv[1] ) ) )
++ {
++ SYSTEMTIME t ;
++ int rval = M41T81S_GetTime( &t );
++ if( 0 == rval ){
++ if( badTime(&t) ){
++ printf( "time not initialized...initializing\n" );
++ t.wYear = 2006 ;
++ t.wMonth = 6 ;
++ t.wDay = 3 ;
++ memset( &t, 0, sizeof(t) );
++ rval = M41T81S_SetTime(&t);
++ }
++ }
++
++ if( 0 == rval )
++ {
++ SYSTEMTIME t2 ;
++ udelay( 1000000 ); // wait a sec
++ rval = M41T81S_GetTime( &t2 );
++ if( 0 == rval )
++ {
++ unsigned diff = diffMs(&t,&t2);
++
++ if( ( diff < 800 ) || ( diff > 1200 ) )
++ {
++ rval = 1 ; // clock not moving or moving too fast (bad oscillator?)
++ if( 0 == diff )
++ printf( "check RTC oscillator\n" );
++#ifdef DEBUG
++ printf( "rtc test failed!\n"
++ "difftime: %u\n", diff );
++ printf( "t1: " ); printTime( &t ); printf( "\n" );
++ printf( "t2: " ); printTime( &t2 ); printf( "\n" );
++#endif
++ }
++ }
++ }
++ }
++ else if( ( 2 == argc ) || ( 3 == argc ) )
++ {
++ SYSTEMTIME t ;
++ if( 0 == parseTime( &t, argv[1], ( 3 == argc ) ? argv[2] : 0 ) )
++ {
++ rval = M41T81S_SetTime(&t);
++ }
++ else
++ printf( "Invalid time format: use YYYY-MM-DD HH:MM:SS\n" );
++ }
++
++ return rval ;
++}
++
++U_BOOT_CMD(
++ rtc, 127, 0, do_rtc,
++ "rtc - get/set/test RTC\n",
++ NULL
++);
++
++
+diff -u -r --new-file u-boot-1.1.2/board/neon/sm501.h u-boot-1.1.2-neon/board/neon/sm501.h
+--- u-boot-1.1.2/board/neon/sm501.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/sm501.h 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,22 @@
++#ifndef __SM501_H__
++#define __SM501_H__
++
++/*
++ * sm501.h
++ *
++ * Defines constants and macros for the SM-501 Graphics Controller.
++ *
++ */
++
++extern unsigned long const mmioStart ;
++extern unsigned long const mmioLength ;
++
++#define SMIR_GPIO_32_63_CONTROL 0x0000c
++#define SMIR_PWRM0_GATE 0x00040
++#define SMIR_PWRM1_GATE 0x00048
++#define SMIR_POWER_MODE_CONTROL 0x00054
++
++#define READ_SM501_REG( addr ) *( (unsigned long volatile *)((addr)+mmioStart) )
++#define STUFF_SM501_REG( addr, value ) *( (unsigned long volatile *)((addr)+mmioStart) ) = (value)
++
++#endif
+diff -u -r --new-file u-boot-1.1.2/board/neon/u-boot.lds u-boot-1.1.2-neon/board/neon/u-boot.lds
+--- u-boot-1.1.2/board/neon/u-boot.lds 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/u-boot.lds 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,56 @@
++/*
++ * (C) Copyright 2000
++ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
++OUTPUT_ARCH(arm)
++ENTRY(_start)
++SECTIONS
++{
++ . = 0x00000000;
++
++ . = ALIGN(4);
++ .text :
++ {
++ cpu/pxa/start.o (.text)
++ cpu/pxa/ministart.o (.text)
++ *(.text)
++ }
++
++ . = ALIGN(4);
++ .rodata : { *(.rodata) }
++
++ . = ALIGN(4);
++ .data : { *(.data) }
++
++ . = ALIGN(4);
++ .got : { *(.got) }
++
++ __u_boot_cmd_start = .;
++ .u_boot_cmd : { *(.u_boot_cmd) }
++ __u_boot_cmd_end = .;
++
++ . = ALIGN(4);
++ __bss_start = .;
++ .bss : { *(.bss) }
++ _end = .;
++}
+diff -u -r --new-file u-boot-1.1.2/board/neon/u-bootmini.lds u-boot-1.1.2-neon/board/neon/u-bootmini.lds
+--- u-boot-1.1.2/board/neon/u-bootmini.lds 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/board/neon/u-bootmini.lds 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,56 @@
++/*
++ * (C) Copyright 2000
++ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
++OUTPUT_ARCH(arm)
++ENTRY(StartUp)
++SECTIONS
++{
++ . = 0x00000000;
++
++ . = ALIGN(4);
++ .text :
++ {
++ cpu/pxa/minidebug.o (.text)
++ cpu/pxa/ministart.o (.text)
++ *(.text)
++ }
++
++ . = ALIGN(4);
++ .rodata : { *(.rodata) }
++
++ . = ALIGN(4);
++ .data : { *(.data) }
++
++ . = ALIGN(4);
++ .got : { *(.got) }
++
++ __u_boot_cmd_start = .;
++ .u_boot_cmd : { *(.u_boot_cmd) }
++ __u_boot_cmd_end = .;
++
++ . = ALIGN(4);
++ __bss_start = .;
++ .bss : { *(.bss) }
++ _end = .;
++}
+diff -u -r --new-file u-boot-1.1.2/common/cmd_boot.c u-boot-1.1.2-neon/common/cmd_boot.c
+--- u-boot-1.1.2/common/cmd_boot.c 2003-10-09 01:26:14.000000000 +0200
++++ u-boot-1.1.2-neon/common/cmd_boot.c 2007-08-11 21:07:20.000000000 +0200
+@@ -59,6 +59,7 @@
+ */
+ argv[0] = (char *)gd;
+ #endif
++ *((ulong*)0x40e00014) |= (1<<25); //make gpio89 an output(ac97_reset)
+ #if !defined(CONFIG_NIOS)
+ rc = ((ulong (*)(int, char *[]))addr) (--argc, &argv[1]);
+ #else
+diff -u -r --new-file u-boot-1.1.2/common/cmd_bootm.c u-boot-1.1.2-neon/common/cmd_bootm.c
+--- u-boot-1.1.2/common/cmd_bootm.c 2004-11-21 01:06:34.000000000 +0100
++++ u-boot-1.1.2-neon/common/cmd_bootm.c 2007-08-11 21:07:20.000000000 +0200
+@@ -29,8 +29,6 @@
+ #include <command.h>
+ #include <image.h>
+ #include <malloc.h>
+-#include <zlib.h>
+-#include <bzlib.h>
+ #include <environment.h>
+ #include <asm/byteorder.h>
+
+@@ -73,10 +71,12 @@
+ # define CHUNKSZ (64 * 1024)
+ #endif
+
++#ifdef CONFIG_GZIP
++#include <zlib.h>
+ int gunzip (void *, int, unsigned char *, unsigned long *);
+-
+ static void *zalloc(void *, unsigned, unsigned);
+ static void zfree(void *, void *, unsigned);
++#endif
+
+ #if (CONFIG_COMMANDS & CFG_CMD_IMI)
+ static int image_info (unsigned long addr);
+@@ -327,12 +327,17 @@
+ break;
+ case IH_COMP_GZIP:
+ printf (" Uncompressing %s ... ", name);
++#ifdef CONFIG_GZIP
+ if (gunzip ((void *)ntohl(hdr->ih_load), unc_len,
+ (uchar *)data, &len) != 0) {
+ puts ("GUNZIP ERROR - must RESET board to recover\n");
+ SHOW_BOOT_PROGRESS (-6);
+ do_reset (cmdtp, flag, argc, argv);
+ }
++#else
++ printf( "GUNZIP not supported\n" );
++#endif
++
+ break;
+ #ifdef CONFIG_BZIP2
+ case IH_COMP_BZIP2:
+@@ -1221,6 +1226,8 @@
+ printf ("%s %s %s (%s)", arch, os, type, comp);
+ }
+
++#ifdef CONFIG_GZIP
++
+ #define ZALLOC_ALIGNMENT 16
+
+ static void *zalloc(void *x, unsigned items, unsigned size)
+@@ -1302,6 +1309,8 @@
+
+ return (0);
+ }
++#endif // CONFIG_GZIP
++
+
+ #ifdef CONFIG_BZIP2
+ void bz_internal_error(int errcode)
+diff -u -r --new-file u-boot-1.1.2/common/cmd_fat.c u-boot-1.1.2-neon/common/cmd_fat.c
+--- u-boot-1.1.2/common/cmd_fat.c 2004-08-28 23:09:15.000000000 +0200
++++ u-boot-1.1.2-neon/common/cmd_fat.c 2007-08-11 21:07:20.000000000 +0200
+@@ -30,6 +30,13 @@
+ #include <net.h>
+ #include <ata.h>
+
++#define CONFIG_FATLOAD_TICKS
++#define CONFIG_FATLOAD_ADLER
++
++#ifdef CONFIG_FATLOAD_ADLER
++#include <zlib.h>
++#endif
++
+ #if (CONFIG_COMMANDS & CFG_CMD_FAT)
+
+ #undef DEBUG
+@@ -83,6 +90,11 @@
+ int dev=0;
+ int part=1;
+ char *ep;
++#ifdef CONFIG_FATLOAD_TICKS
++ ulong ticks1 ;
++ ulong ticks2 ;
++ ulong ticks3 ;
++#endif
+
+ if (argc < 5) {
+ printf ("usage: fatload <interface> <dev[:part]> <addr> <filename> [bytes]\n");
+@@ -110,6 +122,10 @@
+ count = simple_strtoul (argv[5], NULL, 16);
+ else
+ count = 0;
++#ifdef CONFIG_FATLOAD_TICKS
++ ticks1 = get_timer( 0 );
++#endif
++
+ size = file_fat_read (argv[4], (unsigned char *) offset, count);
+
+ if(size==-1) {
+@@ -117,7 +133,21 @@
+ return 1;
+ }
+
+- printf ("\n%ld bytes read\n", size);
++ printf ("\n%ld bytes read", size);
++
++#ifdef CONFIG_FATLOAD_TICKS
++ ticks2 = get_timer( 0 );
++ printf( " in %lu ticks, (%lu ms)", (ticks2-ticks1), (ticks2-ticks1)/(CFG_HZ/1000) );
++#endif
++
++#ifdef CONFIG_FATLOAD_ADLER
++ printf( ", adler == 0x" );
++ printf( "%08lx", adler32(0, (Bytef *)offset, size ) );
++ ticks3 = get_timer( 0 );
++ printf( " in %lu ticks, (%lu ms)", (ticks3-ticks2), (ticks3-ticks2)/(CFG_HZ/1000) );
++#endif
++
++ printf( "\n" );
+
+ sprintf(buf, "%lX", size);
+ setenv("filesize", buf);
+diff -u -r --new-file u-boot-1.1.2/common/cmd_flash.c u-boot-1.1.2-neon/common/cmd_flash.c
+--- u-boot-1.1.2/common/cmd_flash.c 2004-12-31 10:32:50.000000000 +0100
++++ u-boot-1.1.2-neon/common/cmd_flash.c 2007-08-11 21:07:20.000000000 +0200
+@@ -507,7 +507,7 @@
+ );
+
+ U_BOOT_CMD(
+- erase, 3, 1, do_flerase,
++ erase, 3, 0, do_flerase,
+ "erase - erase FLASH memory\n",
+ "start end\n"
+ " - erase FLASH from addr 'start' to addr 'end'\n"
+diff -u -r --new-file u-boot-1.1.2/common/cmd_lcdpanel.c u-boot-1.1.2-neon/common/cmd_lcdpanel.c
+--- u-boot-1.1.2/common/cmd_lcdpanel.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/common/cmd_lcdpanel.c 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,265 @@
++/*
++ * Module cmd_lcdpanel.cpp
++ *
++ * This module defines ...
++ *
++ *
++ * Change History :
++ *
++ * $Log: cmd_lcdpanel.c,v $
++ * Revision 1.8 2005/09/19 13:15:59 ericn
++ * -allow zeros in most fields
++ *
++ * Revision 1.7 2005/08/22 16:30:32 ericn
++ * -update panel env var w/lcdp command
++ *
++ * Revision 1.6 2005/07/18 03:05:53 ericn
++ * -allow cmdline config of CRT
++ *
++ * Revision 1.5 2005/07/06 05:26:54 ericn
++ * -make lcdinfo command conditional on PXALCD
++ *
++ * Revision 1.4 2005/07/04 18:49:01 ericn
++ * -added lcdi command
++ *
++ * Revision 1.3 2005/06/02 04:01:30 ericn
++ * -allow zero value of pixclock (meaning slow one)
++ *
++ * Revision 1.2 2005/04/30 20:32:44 ericn
++ * -added disable cmd
++ *
++ * Revision 1.1 2005/04/09 17:49:15 ericn
++ * -Initial import
++ *
++ *
++ * Copyright Boundary Devices, Inc. 2005
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++
++#include <common.h>
++#include <command.h>
++#if (CONFIG_COMMANDS & CFG_CMD_LCDPANEL)
++
++#include <malloc.h>
++#include <lcd_panels.h>
++
++extern char console_buffer[]; /* console I/O buffer */
++
++static void print_panel_info( struct lcd_panel_info_t const *panel )
++{
++ printf( "------------------------------------\n"
++ "name : %s\n", panel->name );
++ printf( "pixclock : %u\n", panel->pixclock );
++ printf( "xres : %u\n", panel->xres );
++ printf( "yres : %u\n", panel->yres );
++ printf( "act_high : %u\n", panel->act_high );
++ printf( "hsync_len : %u\n", panel->hsync_len );
++ printf( "left_margin : %u\n", panel->left_margin );
++ printf( "right_margin : %u\n", panel->right_margin );
++ printf( "vsync_len : %u\n", panel->vsync_len );
++ printf( "upper_margin : %u\n", panel->upper_margin );
++ printf( "lower_margin : %u\n", panel->lower_margin );
++ printf( "active : %u\n", panel->active );
++ printf( "CRT ? %u\n", panel->crt );
++}
++
++static struct lcd_panel_info_t const *prompt_for_panel( void )
++{
++ struct lcd_panel_info_t *panel = (struct lcd_panel_info_t *)malloc(sizeof(struct lcd_panel_info_t));
++ int bytesRead ;
++
++ memset( panel, 0, sizeof(*panel));
++
++ bytesRead = readline( "name: " );
++ if( 0 < bytesRead )
++ {
++ panel->name = strdup( console_buffer );
++ bytesRead = readline( "pixclock: " );
++ if( 0 < bytesRead )
++ {
++ char *endp;
++ ulong value = simple_strtoul( console_buffer, &endp, 0 );
++ if( endp > console_buffer )
++ {
++ panel->pixclock = value ;
++ bytesRead = readline( "xres: " );
++ if( ( 0 < bytesRead )
++ && ( 0 != ( value = simple_strtoul( console_buffer, &endp, 0 ) ) )
++ && ( endp > console_buffer ) )
++ {
++ panel->xres = value ;
++ bytesRead = readline( "yres: " );
++ if( ( 0 < bytesRead )
++ && ( 0 != ( value = simple_strtoul( console_buffer, &endp, 0 ) ) )
++ && ( endp > console_buffer ) )
++ {
++ panel->yres = value ;
++ bytesRead = readline( "act_high: " );
++ if( ( 0 < bytesRead )
++ && ( 1 >= ( value = simple_strtoul( console_buffer, &endp, 0 ) ) )
++ && ( endp > console_buffer ) )
++ {
++ panel->act_high = value ;
++ bytesRead = readline( "hsync_len: " );
++ if( ( 0 < bytesRead )
++ && ( 0 != ( value = simple_strtoul( console_buffer, &endp, 0 ) ) )
++ && ( endp > console_buffer ) )
++ {
++ panel->hsync_len = value ;
++ bytesRead = readline( "left_margin: " );
++ value = simple_strtoul( console_buffer, &endp, 0 );
++ if( ( 0 < bytesRead )
++ && ( endp > console_buffer ) )
++ {
++ panel->left_margin = value ;
++ bytesRead = readline( "right_margin: " );
++ value = simple_strtoul( console_buffer, &endp, 0 );
++ if( ( 0 < bytesRead )
++ && ( endp > console_buffer ) )
++ {
++ panel->right_margin = value ;
++ bytesRead = readline( "vsync_len: " );
++ value = simple_strtoul( console_buffer, &endp, 0 );
++ if( ( 0 < bytesRead )
++ && ( endp > console_buffer ) )
++ {
++ panel->vsync_len = value ;
++ bytesRead = readline( "upper_margin: " );
++ value = simple_strtoul( console_buffer, &endp, 0 );
++ if( ( 0 < bytesRead )
++ && ( endp > console_buffer ) )
++ {
++ panel->upper_margin = value ;
++ bytesRead = readline( "lower_margin: " );
++ value = simple_strtoul( console_buffer, &endp, 0 );
++ if( ( 0 < bytesRead )
++ && ( endp > console_buffer ) )
++ {
++ panel->lower_margin = value ;
++ bytesRead = readline( "active (0|1) : " );
++ value = simple_strtoul( console_buffer, &endp, 0 );
++ if( ( 0 < bytesRead ) && ( endp > console_buffer ) )
++ {
++ panel->active = value ;
++ bytesRead = readline( "crt (0|1) : " );
++ value = simple_strtoul( console_buffer, &endp, 0 );
++ if( ( 0 < bytesRead )
++ &&
++ ( endp > console_buffer ) )
++ {
++ panel->crt = value ;
++ print_panel_info( panel );
++ return panel ;
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++ }
++
++ free( panel );
++
++ return 0 ;
++}
++
++static int lcdpanel(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ if ( 1 == argc ) {
++ if( cur_lcd_panel )
++ print_panel_info( cur_lcd_panel );
++ else
++ printf( "no panel defined\n" );
++ }
++ else {
++ struct lcd_panel_info_t const *panel = find_lcd_panel( argv[1] );
++ if( panel ) {
++ printf( "found panel %s\n", panel->name );
++ set_lcd_panel( panel );
++ setenv( "panel", panel->name );
++ }
++ else if( '+' == *argv[1] ) {
++ panel = prompt_for_panel();
++ if( panel )
++ {
++ print_panel_info( panel );
++ set_lcd_panel( panel );
++ }
++ }
++ else if( '?' == *argv[1] )
++ {
++ int i ;
++ for( i = 0 ; i < num_lcd_panels ; i++ )
++ print_panel_info( lcd_panels+i );
++ }
++ else if( '-' == *argv[1] )
++ {
++ disable_lcd_panel();
++ printf( "panel disabled\n" );
++ }
++ else
++ printf( "panel %s not found\n", argv[1] );
++ }
++
++ return 0;
++}
++
++
++U_BOOT_CMD(
++ lcdpanel, 2, 0, lcdpanel,
++ "lcdpanel [panelName|?|+|-]\n"
++ " init lcd panel with panel name\n"
++ " ? will display the supported panels\n"
++ " + will prompt for panel details\n"
++ " - will disable the panel\n",
++ NULL
++);
++
++#ifdef PXALCD
++#include <lcd.h>
++
++static int lcdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ printf( "--> lcdinfo:\n"
++ "screen: %08lx\n"
++ "palette: %08lx/%u\n",
++ panel_info.pxa.screen,
++ panel_info.pxa.palette,
++ panel_info.pxa.palette_size );
++ return 0 ;
++}
++
++U_BOOT_CMD(
++ lcdinfo, 2, 0, lcdinfo,
++ "lcdinfo\n",
++ NULL
++);
++#endif
++
++#endif /* CFG_CMD_LCDPANEL */
++
++
++
++
+diff -u -r --new-file u-boot-1.1.2/common/cmd_lcdpanel.h u-boot-1.1.2-neon/common/cmd_lcdpanel.h
+--- u-boot-1.1.2/common/cmd_lcdpanel.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/common/cmd_lcdpanel.h 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,24 @@
++#ifndef __CMD_LCDPANEL_H__
++#define __CMD_LCDPANEL_H__ "$Id: cmd_lcdpanel.h,v 1.1 2005/04/09 17:49:16 ericn Exp $"
++
++/*
++ * cmd_lcdpanel.h
++ *
++ * This header file declares ...
++ *
++ *
++ * Change History :
++ *
++ * $Log: cmd_lcdpanel.h,v $
++ * Revision 1.1 2005/04/09 17:49:16 ericn
++ * -Initial import
++ *
++ *
++ *
++ * Copyright Boundary Devices, Inc. 2005
++ */
++
++
++
++#endif
++
+diff -u -r --new-file u-boot-1.1.2/common/cmd_mmc.c u-boot-1.1.2-neon/common/cmd_mmc.c
+--- u-boot-1.1.2/common/cmd_mmc.c 2003-07-01 23:07:07.000000000 +0200
++++ u-boot-1.1.2-neon/common/cmd_mmc.c 2007-08-11 21:07:20.000000000 +0200
+@@ -43,4 +43,71 @@
+ NULL
+ );
+
++int do_mmc_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ if( 5 == argc )
++ {
++ unsigned long args[4];
++ unsigned i ;
++ for( i = 1 ; i < 5 ; i++ )
++ {
++ char *endp ;
++ args[i-1] = simple_strtoul(argv[i], &endp, 16 );
++ if( 0 != *endp )
++ {
++ printf( "arg[%u] is not a valid hex number\n", i );
++ break;
++ }
++ }
++
++ if( 5 == i )
++ {
++ uchar *resp = mmc_cmd( (ushort)args[0],
++ (ushort)args[1],
++ (ushort)args[2],
++ (ushort)args[3] );
++ ushort numWords = 0 ;
++ switch( args[3] )
++ {
++ case MMC_CMDAT_R1:
++ case MMC_CMDAT_R3:
++ numWords = 3;
++ break;
++
++ case MMC_CMDAT_R2:
++ numWords = 8;
++ break;
++
++ default:
++ printf( "Invalid response type %lu, options are [1,2,3]\n", args[3] );
++ break;
++ }
++
++ if( resp )
++ {
++ for( i = 0 ; i < numWords*2 ; i++ )
++ {
++ printf( "%02X ", resp[i] );
++ }
++ printf( "\n" );
++ }
++ else
++ printf( "no response\n" );
++ }
++ }
++ else
++ printf ("Usage:\n%s\n", cmdtp->usage);
++
++ return 0;
++}
++
++extern uchar *
++mmc_cmd(ushort cmd, ushort argh, ushort argl, ushort cmdat);
++
++U_BOOT_CMD(
++ mmccmd, 5, 0, do_mmc_cmd,
++ "mmccmd - issue mmc command\n",
++ "mmccmd cmd# argh(hex) argl(hex) rsptype\n"
++);
++
+ #endif /* CFG_CMD_MMC */
+diff -u -r --new-file u-boot-1.1.2/common/cmd_net.c u-boot-1.1.2-neon/common/cmd_net.c
+--- u-boot-1.1.2/common/cmd_net.c 2004-06-09 14:42:26.000000000 +0200
++++ u-boot-1.1.2-neon/common/cmd_net.c 2007-08-11 21:07:20.000000000 +0200
+@@ -46,6 +46,104 @@
+ "[loadAddress] [bootfilename]\n"
+ );
+
++extern int get_rom_mac (char *v_rom_mac);
++extern int set_rom_mac (char const *v_rom_mac);
++
++/*
++ * returns -1 if not valid hex
++ */
++static int hexValue( char c )
++{
++ if( ( '0' <= c ) && ( '9' >= c ) )
++ {
++ return c-'0' ;
++ }
++ else if( ( 'A' <= c ) && ( 'F' >= c ) )
++ {
++ return c-'A'+10 ;
++ }
++ else if( ( 'a' <= c ) && ( 'f' >= c ) )
++ {
++ return c-'a'+10 ;
++ }
++ else
++ return -1 ;
++}
++
++// returns non-zero to indicate success
++static int parse_mac( char const *macString, // input
++ char *macaddr ) // output: not NULL-terminated
++{
++ int i ;
++ for( i = 0 ; i < 6 ; i++ )
++ {
++ char high, low, term ;
++ int highval, lowval ;
++ high = *macString++ ;
++
++ if( ( 0 == high )
++ ||
++ ( 0 > ( highval = hexValue(high) ) ) )
++ break ;
++ low = *macString++ ;
++ if( ( 0 == low )
++ ||
++ ( 0 > ( lowval = hexValue(low) ) ) )
++ break ;
++
++ term = *macString++ ;
++ if( 5 > i )
++ {
++ if( ( '-' != term ) && ( ':' != term ) )
++ break ;
++ }
++ else if( '\0' != term )
++ break ;
++
++ *macaddr++ = (highval<<4) | lowval ;
++ }
++
++ return ( 6 == i );
++}
++
++int do_mac (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ if( 2 == argc )
++ {
++ char mac[6];
++ if( parse_mac( argv[1], mac ) )
++ {
++ printf( "setting mac address to %02x:%02x:%02x:%02x:%02x:%02x\n",
++ mac[0],mac[1],mac[2],mac[3],mac[4],mac[5] );
++ if( set_rom_mac( mac ) )
++ printf( "done\n" );
++ else
++ printf( "Error setting mac address\n" );
++ }
++ else
++ printf( "Error parsing mac: use form NN:NN:NN:NN:NN:NN\n" );
++ }
++ else
++ {
++ char mac[6];
++ if( get_rom_mac( mac ) )
++ printf( "mac address %02x:%02x:%02x:%02x:%02x:%02x\n",
++ mac[0],mac[1],mac[2],mac[3],mac[4],mac[5] );
++ else if( 0xFF == mac[0] )
++ printf( "MAC has not been programmed\n" );
++ else
++ printf( "error reading mac\n" );
++ }
++ return 0 ;
++}
++
++U_BOOT_CMD(
++ mac, 3, 1, do_mac,
++ "mac\t- read/write mac address\n",
++ "- supply a parameter of the form NN:NN:NN:NN:NN:NN to set"
++);
++
++
+ int do_tftpb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+ {
+ return netboot_common (TFTP, cmdtp, argc, argv);
+diff -u -r --new-file u-boot-1.1.2/common/cmd_not.c u-boot-1.1.2-neon/common/cmd_not.c
+--- u-boot-1.1.2/common/cmd_not.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/common/cmd_not.c 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,55 @@
++/*
++ * (C) Copyright 2006
++ * Eric Nelson, Boundary Devices
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <common.h>
++#include <config.h>
++#include <command.h>
++
++#if (CONFIG_COMMANDS & CFG_CMD_NOT)
++
++int do_not (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ int rval = 1 ;
++ if( 1 < argc )
++ {
++ cmd_tbl_t *cmd = find_cmd(argv[1]);
++ if( cmd )
++ {
++ rval = ( 0 == cmd->cmd(cmd, flag, argc-1, argv+1) );
++ }
++ else
++ printf( "command %s not found\n", argv[1] );
++ }
++ else
++ printf( "Usage not command [..params]\n" );
++
++ return rval ;
++}
++
++U_BOOT_CMD(
++ not, 127, 0, do_not,
++ "not - negate a command\n",
++ NULL
++);
++
++#endif /* CONFIG_COMMANDS & CFG_CMD_NOT */
+diff -u -r --new-file u-boot-1.1.2/common/cmd_nvedit.c u-boot-1.1.2-neon/common/cmd_nvedit.c
+--- u-boot-1.1.2/common/cmd_nvedit.c 2004-09-30 00:55:14.000000000 +0200
++++ u-boot-1.1.2-neon/common/cmd_nvedit.c 2007-08-11 21:07:20.000000000 +0200
+@@ -487,16 +487,21 @@
+ {
+ int i, nxt;
+
++// printf ("before WATCHDOG_RESET\n");
+ WATCHDOG_RESET();
++// printf ("after WATCHDOG_RESET\n");
+
+ for (i=0; env_get_char(i) != '\0'; i=nxt+1) {
+ int val;
+
++// printf ("i= %i\n", i);
+ for (nxt=i; env_get_char(nxt) != '\0'; ++nxt) {
+ if (nxt >= CFG_ENV_SIZE) {
+ return (NULL);
+ }
++// putc(env_get_char(nxt));
+ }
++// printf ("\n");
+ if ((val=envmatch(name, i)) < 0)
+ continue;
+ return (env_get_addr(val));
+diff -u -r --new-file u-boot-1.1.2/common/command.c u-boot-1.1.2-neon/common/command.c
+--- u-boot-1.1.2/common/command.c 2004-04-18 19:39:39.000000000 +0200
++++ u-boot-1.1.2-neon/common/command.c 2007-08-11 21:07:20.000000000 +0200
+@@ -27,6 +27,9 @@
+
+ #include <common.h>
+ #include <command.h>
++#ifdef CONFIG_LCD
++#include "lcd.h"
++#endif
+
+ int
+ do_version (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+@@ -74,6 +77,41 @@
+ " - echo args to console; \\c suppresses newline\n"
+ );
+
++#ifdef CONFIG_LCD
++
++int
++do_lecho (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ int i, putnl = 1;
++
++ for (i = 1; i < argc; i++) {
++ char *p = argv[i], c;
++
++ if (i > 1)
++ putc(' ');
++ while ((c = *p++) != '\0') {
++ if (c == '\\' && *p == 'c') {
++ putnl = 0;
++ p++;
++ } else {
++ lcd_putc(c);
++ }
++ }
++ }
++
++ if (putnl)
++ lcd_putc('\n');
++ return 0;
++}
++
++U_BOOT_CMD(
++ lecho, CFG_MAXARGS, 1, do_lecho,
++ "lecho - echo args to lcd\n",
++ "[args..]\n"
++ " - echo args to lcd; \\c suppresses newline\n"
++);
++#endif
++
+ #ifdef CFG_HUSH_PARSER
+
+ int
+diff -u -r --new-file u-boot-1.1.2/common/env_flash.c u-boot-1.1.2-neon/common/env_flash.c
+--- u-boot-1.1.2/common/env_flash.c 2004-03-14 02:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/common/env_flash.c 2007-08-11 21:07:20.000000000 +0200
+@@ -83,6 +83,10 @@
+ #define OBSOLETE_FLAG 0
+ #endif /* CFG_ENV_ADDR_REDUND */
+
++#ifdef CFG_ENV_IS_IN_FLASH
++static env_t *flash_addr_new = (env_t *)CFG_ENV_ADDR ;
++#endif
++
+ extern uchar default_environment[];
+ extern int default_environment_size;
+
+diff -u -r --new-file u-boot-1.1.2/common/fnmatch.c u-boot-1.1.2-neon/common/fnmatch.c
+--- u-boot-1.1.2/common/fnmatch.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/common/fnmatch.c 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,166 @@
++/*
++ * (C) Copyright 2005
++ * Boundary Devices
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ */
++
++#include <common.h>
++#include <config.h>
++#include <part.h>
++
++/* Some file systems are case-insensitive. If FOLD_FN_CHAR is
++ #defined, it maps the character C onto its "canonical" form. In a
++ case-insensitive system, it would map all alphanumeric characters
++ to lower case. Under Windows NT, / and \ are both path component
++ separators, so FOLD_FN_CHAR would map them both to /. */
++#define FOLD_FN_CHAR(c) (c)
++
++
++int fnmatch(const char *pattern, const char *string, int flags)
++{
++ register const char *p = pattern, *n = string;
++ register char c;
++
++ while ((c = *p++) != '\0')
++ {
++ switch (c)
++ {
++ case '?':
++ if (*n == '\0')
++ return FNM_NOMATCH;
++ else if ((flags & FNM_PATHNAME) && *n == '/')
++ return FNM_NOMATCH;
++ else if ((flags & FNM_PERIOD) && *n == '.' &&
++ (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
++ return FNM_NOMATCH;
++ break;
++
++ case '\\':
++ if (!(flags & FNM_NOESCAPE))
++ c = *p++;
++ if (FOLD_FN_CHAR (*n) != FOLD_FN_CHAR (c))
++ return FNM_NOMATCH;
++ break;
++
++ case '*':
++ if ((flags & FNM_PERIOD) && *n == '.' &&
++ (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
++ return FNM_NOMATCH;
++
++ for (c = *p++; c == '?' || c == '*'; c = *p++, ++n)
++ if (((flags & FNM_PATHNAME) && *n == '/') ||
++ (c == '?' && *n == '\0'))
++ return FNM_NOMATCH;
++
++ if (c == '\0')
++ return 0;
++
++ {
++ char c1 = (!(flags & FNM_NOESCAPE) && c == '\\') ? *p : c;
++ for (--p; *n != '\0'; ++n)
++ if ((c == '[' || FOLD_FN_CHAR (*n) == FOLD_FN_CHAR (c1)) &&
++ fnmatch(p, n, flags & ~FNM_PERIOD) == 0)
++ return 0;
++ return FNM_NOMATCH;
++ }
++
++ case '[':
++ {
++ /* Nonzero if the sense of the character class is inverted. */
++ register int not;
++
++ if (*n == '\0')
++ return FNM_NOMATCH;
++
++ if ((flags & FNM_PERIOD) && *n == '.' &&
++ (n == string || ((flags & FNM_PATHNAME) && n[-1] == '/')))
++ return FNM_NOMATCH;
++
++ not = (*p == '!' || *p == '^');
++ if (not)
++ ++p;
++
++ c = *p++;
++ for (;;)
++ {
++ register char cstart = c, cend = c;
++
++ if (!(flags & FNM_NOESCAPE) && c == '\\')
++ cstart = cend = *p++;
++
++ if (c == '\0')
++ /* [ (unterminated) loses. */
++ return FNM_NOMATCH;
++
++ c = *p++;
++
++ if ((flags & FNM_PATHNAME) && c == '/')
++ /* [/] can never match. */
++ return FNM_NOMATCH;
++
++ if (c == '-' && *p != ']')
++ {
++ cend = *p++;
++ if (!(flags & FNM_NOESCAPE) && cend == '\\')
++ cend = *p++;
++ if (cend == '\0')
++ return FNM_NOMATCH;
++ c = *p++;
++ }
++
++ if (*n >= cstart && *n <= cend)
++ goto matched;
++
++ if (c == ']')
++ break;
++ }
++ if (!not)
++ return FNM_NOMATCH;
++ break;
++
++ matched:;
++ /* Skip the rest of the [...] that already matched. */
++ while (c != ']')
++ {
++ if (c == '\0')
++ /* [... (unterminated) loses. */
++ return FNM_NOMATCH;
++
++ c = *p++;
++ if (!(flags & FNM_NOESCAPE) && c == '\\')
++ /* 1003.2d11 is unclear if this is right. %%% */
++ ++p;
++ }
++ if (not)
++ return FNM_NOMATCH;
++ }
++ break;
++
++ default:
++ if (FOLD_FN_CHAR (c) != FOLD_FN_CHAR (*n))
++ return FNM_NOMATCH;
++ }
++
++ ++n;
++ }
++
++ if (*n == '\0')
++ return 0;
++
++ return FNM_NOMATCH;
++}
++
+diff -u -r --new-file u-boot-1.1.2/common/lcd.c u-boot-1.1.2-neon/common/lcd.c
+--- u-boot-1.1.2/common/lcd.c 2004-12-10 12:40:50.000000000 +0100
++++ u-boot-1.1.2-neon/common/lcd.c 2007-08-11 21:07:20.000000000 +0200
+@@ -41,7 +41,7 @@
+ #endif
+ #include <lcd.h>
+
+-#if defined(CONFIG_PXA250)
++#if defined(CONFIG_PXA250) || defined(CONFIG_PXA270)
+ #include <asm/byteorder.h>
+ #endif
+
+@@ -94,8 +94,46 @@
+ static int lcd_getfgcolor (void);
+ #endif /* NOT_USED_SO_FAR */
+
+-/************************************************************************/
++static int luminance( int red, int green, int blue )
++{
++ //
++ // I've seen a couple of different algorithms here:
++ // (max+min)/2
++/*
++
++ int max = MAX( red, MAX( green, blue ) );
++ int min = MIN( red, MIN( green, blue ) );
++ return (max+min)/2 ;
++*/
++
++ // A more mathematically-correct version
++// return (int)(c.R*0.3 + c.G*0.59+ c.B*0.11);
++
++ // Just return 'green'
++ // return green;
++
++ // and one that uses shifts and adds to come close to the above
++ //
++ // red = 5/16= 0.3125 == 1/4 + 1/16
++ // green = 9/16= 0.5625 == 1/2 + 1/16
++ // blue = 1/8 = 0.125
++ //
++ if( 0 < red )
++ red = (red>>2) + (red>>4);
++ else
++ red = 0 ;
++ if( 0 < green )
++ green = (green>>1) + (green>>4) ;
++ else
++ green = 0 ;
++ if( 0 < blue )
++ blue = blue >> 3 ;
++ else
++ blue = 0 ;
++ return red+green+blue ;
++}
+
++/************************************************************************/
+ /*----------------------------------------------------------------------*/
+
+ static void console_scrollup (void)
+@@ -221,10 +259,10 @@
+ uchar *dest;
+ ushort off, row;
+
+- dest = (uchar *)(lcd_base + y * lcd_line_length + x * (1 << LCD_BPP) / 8);
++ dest = (uchar *)(lcd_base + y * panel_info.vl_lcd_line_length + x * (1 << LCD_BPP) / 8);
+ off = x * (1 << LCD_BPP) % 8;
+
+- for (row=0; row < VIDEO_FONT_HEIGHT; ++row, dest += lcd_line_length) {
++ for (row=0; row < VIDEO_FONT_HEIGHT; ++row, dest += panel_info.vl_lcd_line_length) {
+ uchar *s = str;
+ uchar *d = dest;
+ int i;
+@@ -337,8 +375,6 @@
+
+ lcd_base = (void *)(gd->fb_base);
+
+- lcd_line_length = (panel_info.vl_col * NBITS (panel_info.vl_bpix)) / 8;
+-
+ lcd_init (lcd_base); /* LCD initialization */
+
+ /* Device initialization */
+@@ -389,7 +425,7 @@
+ /* set framebuffer to background color */
+ memset ((char *)lcd_base,
+ COLOR_MASK(lcd_getbgcolor()),
+- lcd_line_length*panel_info.vl_row);
++ panel_info.vl_lcd_line_length*panel_info.vl_row);
+ #endif
+ /* Paint the logo and retrieve LCD base address */
+ debug ("[LCD] Drawing the logo...\n");
+@@ -500,12 +536,13 @@
+ #ifdef CONFIG_LCD_LOGO
+ void bitmap_plot (int x, int y)
+ {
+- ushort *cmap;
++ PALETTEVAL_TYPE *cmap;
+ ushort i, j;
+ uchar *bmap;
+ uchar *fb;
+ ushort *fb16;
+-#if defined(CONFIG_PXA250)
++
++#if defined(PXALCD)
+ struct pxafb_info *fbi = &panel_info.pxa;
+ #elif defined(CONFIG_MPC823)
+ volatile immap_t *immr = (immap_t *) CFG_IMMR;
+@@ -514,17 +551,18 @@
+
+ debug ("Logo: width %d height %d colors %d cmap %d\n",
+ BMP_LOGO_WIDTH, BMP_LOGO_HEIGHT, BMP_LOGO_COLORS,
+- sizeof(bmp_logo_palette)/(sizeof(ushort)));
++ sizeof(bmp_logo_palette)/(sizeof(PALETTEVAL_TYPE)));
+
+ bmap = &bmp_logo_bitmap[0];
+- fb = (char *)(lcd_base + y * lcd_line_length + x);
++ fb = (char *)(lcd_base + y * panel_info.vl_lcd_line_length + x);
+
+ if (NBITS(panel_info.vl_bpix) < 12) {
+ /* Leave room for default color map */
+-#if defined(CONFIG_PXA250)
+- cmap = (ushort *)fbi->palette;
++#if defined(PXALCD)
++ cmap = (PALETTEVAL_TYPE *)fbi->palette;
+ #elif defined(CONFIG_MPC823)
+ cmap = (ushort *)&(cp->lcd_cmap[BMP_LOGO_OFFSET*sizeof(ushort)]);
++#elif defined(CONFIG_SM501)
+ #endif
+
+ WATCHDOG_RESET();
+@@ -532,10 +570,13 @@
+ /* Set color map */
+ for (i=0; i<(sizeof(bmp_logo_palette)/(sizeof(ushort))); ++i) {
+ ushort colreg = bmp_logo_palette[i];
+-#ifdef CFG_INVERT_COLORS
+- *cmap++ = 0xffff - colreg;
++#if defined(CONFIG_SM501)
+ #else
++ #ifdef CFG_INVERT_COLORS
++ *cmap++ = 0xffff - colreg;
++ #else
+ *cmap++ = colreg;
++ #endif
+ #endif
+ }
+
+@@ -548,7 +589,7 @@
+ }
+ }
+ else { /* true color mode */
+- fb16 = (ushort *)(lcd_base + y * lcd_line_length + x);
++ fb16 = (ushort *)(lcd_base + y * panel_info.vl_lcd_line_length + x);
+ for (i=0; i<BMP_LOGO_HEIGHT; ++i) {
+ for (j=0; j<BMP_LOGO_WIDTH; j++) {
+ fb16[j] = bmp_logo_palette[(bmap[j])];
+@@ -570,7 +611,11 @@
+ */
+ int lcd_display_bitmap(ulong bmp_image, int x, int y)
+ {
+- ushort *cmap;
++#if defined(CONFIG_SM501)
++ uchar *cmap ;
++#else
++ PALETTEVAL_TYPE *cmap;
++#endif
+ ushort i, j;
+ uchar *fb;
+ bmp_image_t *bmp=(bmp_image_t *)bmp_image;
+@@ -579,7 +624,12 @@
+ unsigned long width, height;
+ unsigned colors,bpix;
+ unsigned long compression;
+-#if defined(CONFIG_PXA250)
++ int maxLum = 0 ;
++ int bgCol = 0 ;
++ int minLum = 0xFFFF ;
++ int fgCol = 0 ;
++
++#if defined(PXALCD)
+ struct pxafb_info *fbi = &panel_info.pxa;
+ #elif defined(CONFIG_MPC823)
+ volatile immap_t *immr = (immap_t *) CFG_IMMR;
+@@ -590,7 +640,7 @@
+ (bmp->header.signature[1]=='M'))) {
+ printf ("Error: no valid bmp image at %lx\n", bmp_image);
+ return 1;
+-}
++ }
+
+ width = le32_to_cpu (bmp->header.width);
+ height = le32_to_cpu (bmp->header.height);
+@@ -616,33 +666,64 @@
+ (int)width, (int)height, (int)colors);
+
+ if (bpix==8) {
+-#if defined(CONFIG_PXA250)
+- cmap = (ushort *)fbi->palette;
++#if defined(PXALCD)
++ cmap = (PALETTEVAL_TYPE *)fbi->palette;
+ #elif defined(CONFIG_MPC823)
+ cmap = (ushort *)&(cp->lcd_cmap[255*sizeof(ushort)]);
++#elif defined(CONFIG_SM501)
++ cmap = (uchar *)paletteRegs ;
+ #else
+ # error "Don't know location of color map"
+ #endif
+
+ /* Set color map */
+ for (i=0; i<colors; ++i) {
++ int lum ;
+ bmp_color_table_entry_t cte = bmp->color_table[i];
++#if defined(CONFIG_SM501)
++ *cmap++ = cte.blue ;
++ *cmap++ = cte.green ;
++ *cmap++ = cte.red ;
++ *cmap++ = 0 ;
++#elif defined(CONFIG_PXA270) && defined(PXALCD)
++ *cmap = 0xFF000000 ;
++ *cmap |= cte.red << 16 ;
++ *cmap |= cte.green << 8 ;
++ *cmap |= cte.blue ;
++ *cmap++ ;
++#else
+ ushort colreg =
+ ( ((cte.red) << 8) & 0xf800) |
+ ( ((cte.green) << 4) & 0x07e0) |
+ ( (cte.blue) & 0x001f) ;
+-
+-#ifdef CFG_INVERT_COLORS
++ #ifdef CFG_INVERT_COLORS
+ *cmap = 0xffff - colreg;
+-#else
++ #else
+ *cmap = colreg;
+-#endif
+-#if defined(CONFIG_PXA250)
++ #endif
++ #if defined(PXALCD)
+ cmap++;
+-#elif defined(CONFIG_MPC823)
++ #elif defined(CONFIG_MPC823)
+ cmap--;
++ #endif
+ #endif
++ lum = luminance( cte.red, cte.green, cte.blue );
++ if( lum > maxLum )
++ {
++ maxLum = lum ;
++ bgCol = i ;
++ }
++
++ if( lum < minLum )
++ {
++ minLum = lum ;
++ fgCol = i ;
++ }
+ }
++
++ printf( "bgcolor %u, fg %u\n", bgCol, fgCol );
++ lcd_color_fg = fgCol ;
++ lcd_color_bg = bgCol ;
+ }
+
+ padded_line = (width&0x3) ? ((width&~0x3)+4) : (width);
+@@ -653,16 +734,16 @@
+
+ bmap = (uchar *)bmp + le32_to_cpu (bmp->header.data_offset);
+ fb = (uchar *) (lcd_base +
+- (y + height - 1) * lcd_line_length + x);
++ (y + height - 1) * panel_info.vl_lcd_line_length + x);
+ for (i = 0; i < height; ++i) {
+ for (j = 0; j < width ; j++)
+-#if defined(CONFIG_PXA250)
++#if defined(CONFIG_PXA250) || defined(CONFIG_PXA270)
+ *(fb++)=*(bmap++);
+ #elif defined(CONFIG_MPC823)
+ *(fb++)=255-*(bmap++);
+ #endif
+- bmap += (width - padded_line);
+- fb -= (width + lcd_line_length);
++ bmap += (padded_line-width);
++ fb -= (width + panel_info.vl_lcd_line_length);
+ }
+
+ return (0);
+@@ -735,7 +816,7 @@
+ #endif /* LCD_INFO */
+
+ #if defined(CONFIG_LCD_LOGO) && !defined(LCD_INFO_BELOW_LOGO)
+- return ((void *)((ulong)lcd_base + BMP_LOGO_HEIGHT * lcd_line_length));
++ return ((void *)((ulong)lcd_base + BMP_LOGO_HEIGHT * panel_info.vl_lcd_line_length));
+ #else
+ return ((void *)lcd_base);
+ #endif /* CONFIG_LCD_LOGO */
+diff -u -r --new-file u-boot-1.1.2/common/lcd_panels.c u-boot-1.1.2-neon/common/lcd_panels.c
+--- u-boot-1.1.2/common/lcd_panels.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/common/lcd_panels.c 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,286 @@
++/*
++ * Module lcd_panels.cpp
++ *
++ * This module defines the num_lcd_panels and lcd_panels
++ * constants as declared in lcd_panels.h
++ *
++ * Change History :
++ *
++ * $Log: lcd_panels.c,v $
++ * Revision 1.9 2006/05/23 18:46:39 ericn
++ * -added hitachi_wxga panel
++ *
++ * Revision 1.8 2005/09/19 13:15:43 ericn
++ * -updated sharp_qvga timing
++ *
++ * Revision 1.7 2005/07/18 03:05:35 ericn
++ * -update crt1024x768 timings
++ *
++ * Revision 1.6 2005/07/07 03:42:22 tkisky
++ * -make my CRT 1024x768 display work
++ *
++ * Revision 1.5 2005/06/02 04:02:39 ericn
++ * -added qvga_portrait
++ *
++ * Revision 1.4 2005/05/15 18:59:00 tkisky
++ * -change polarity of hitachi_wvga
++ *
++ * Revision 1.3 2005/05/03 15:32:11 ericn
++ * -fast pixclock for hvga, remove redundant 1024x768
++ *
++ * Revision 1.2 2005/04/30 20:33:22 ericn
++ * -added CRT support
++ *
++ * Revision 1.1 2005/04/09 17:49:17 ericn
++ * -Initial import
++ *
++ *
++ * Copyright Boundary Devices, Inc. 2005
++ */
++
++
++#include "lcd_panels.h"
++#include <common.h>
++
++/*
++Settings for Hitachi 5.7
++ PANEL_HORIZONTAL_TOTAL, 01c00160); // should be 34+320+1+64-1= 418 = 0x1A2 (Hex)
++ + 0x13f+16
++ PANEL_HORIZONTAL_SYNC, 00400161); hsync_len == 64 lmargin=0x161-0x13f=34
++ PANEL_VERTICAL_TOTAL, 0x010800f0);
++ PANEL_VERTICAL_SYNC, 0x00020104); vsync=2, upper_margin=0x0104-0xf0-1= 19
++
++In bdlogo.bmp - offset 436 is pixel data
++
++Sharp 5.7 active
++
++ STUFFREG( hTotalReg, 0x01800140 ); // should be 16+320+1+8-1 == 0x158
++ + 0x13f (width-1)
++ STUFFREG( hSyncReg, 0x0008014f ); hsync_len == 8 lmargin=0x14f-0x13f=16
++ STUFFREG( vTotalReg, 0x010700F0 );
++ STUFFREG( vSyncReg, 0x00020100 ); vsync=2, upper_margin=0x0100-0xf0+1= 17
++
++static unsigned const hTotalReg = 0x00080024 ; // 015F0140
++static unsigned const hSyncReg = 0x00080028 ; // 0008014f
++static unsigned const vTotalReg = 0x0008002c ; // 010700F0
++static unsigned const vSyncReg = 0x00080030 ; // 000200FE
++
++const unsigned int sm501_list2[]={0x0fe80000,
++dispctrl 0x0F013104, // 0f0d0105
++pan 0x00000000,
++colorkey 0x00000000,
++fbaddr 0x00000000,
++offsetww ((LCD_XRES)<<16)+(LCD_XRES),
++fbwidth (LCD_XRES<<16),
++fbheight (LCD_YRES<<16),
++tllocate 0x00000000,
++brlocate ((LCD_YRES-1)<<16)+(LCD_XRES-1),
++htotal ((LCD_BEGIN_OF_LINE_WAIT_COUNT+
++ LCD_XRES+
++ LCD_END_OF_LINE_WAIT_COUNT+
++ LCD_HORIZONTAL_SYNC_PULSE_WIDTH-1)<<16)
++ +(LCD_XRES-1),
++hsync (LCD_HORIZONTAL_SYNC_PULSE_WIDTH<<16)
++ +(LCD_XRES+LCD_BEGIN_OF_LINE_WAIT_COUNT-1),
++vtotal ((LCD_BEGIN_FRAME_WAIT_COUNT+
++ LCD_YRES+
++ LCD_END_OF_FRAME_WAIT_COUNT+
++ LCD_VERTICAL_SYNC_PULSE_WIDTH-1)<<16)
++ +(LCD_YRES-1),
++vsync (LCD_VERTICAL_SYNC_PULSE_WIDTH<<16)
++ +(LCD_YRES+LCD_BEGIN_FRAME_WAIT_COUNT-1)};
++*/
++
++static struct lcd_panel_info_t const lcd_panels_[] = {
++
++ /* char const *name */ { "hitachi_qvga"
++ /* unsigned long pixclock */ , 0
++ /* unsigned short xres */ , 320
++ /* unsigned short yres */ , 240
++ /* unsigned char act_high */ , 1
++ /* unsigned char hsync_len */ , 64
++ /* unsigned char left_margin */ , 1
++ /* unsigned char right_margin */ , 16
++ /* unsigned char vsync_len */ , 20
++ /* unsigned char upper_margin */ , 8
++ /* unsigned char lower_margin */ , 3
++ /* unsigned char active */ , 1
++ /* unsigned char crt */ , 0 }
++
++ /* char const *name */ , { "sharp_qvga"
++ /* unsigned long pixclock */ , 0
++ /* unsigned short xres */ , 320 /* , 320 */
++ /* unsigned short yres */ , 240 /* , 240 */
++ /* unsigned char act_high */ , 1 /* , 1 */
++ /* unsigned char hsync_len */ , 20 /* , 8 */
++ /* unsigned char left_margin */ , 1 /* , 16 */
++ /* unsigned char right_margin */ , 30 /* , 1 */
++ /* unsigned char vsync_len */ , 4 /* , 20 */
++ /* unsigned char upper_margin */ , 17 /* , 17 */
++ /* unsigned char lower_margin */ , 3 /* , 3 */
++ /* unsigned char active */ , 1 /* , 1 */
++ /* unsigned char crt */ , 0 }
++
++ /* char const *name */ , { "qvga_portrait"
++ /* unsigned long pixclock */ , 0
++ /* unsigned short xres */ , 240
++ /* unsigned short yres */ , 320
++ /* unsigned char act_high */ , 1
++ /* unsigned char hsync_len */ , 64
++ /* unsigned char left_margin */ , 34
++ /* unsigned char right_margin */ , 1
++ /* unsigned char vsync_len */ , 20
++ /* unsigned char upper_margin */ , 8
++ /* unsigned char lower_margin */ , 3
++ /* unsigned char active */ , 1
++ /* unsigned char crt */ , 0
++ /* unsigned rotation */ , 90 }
++
++ /* char const *name */ , { "hitachi_hvga"
++ /* unsigned long pixclock */ , 1
++ /* unsigned short xres */ , 640
++ /* unsigned short yres */ , 240
++ /* unsigned char act_high */ , 1
++ /* unsigned char hsync_len */ , 64
++ /* unsigned char left_margin */ , 34
++ /* unsigned char right_margin */ , 1
++ /* unsigned char vsync_len */ , 20
++ /* unsigned char upper_margin */ , 8
++ /* unsigned char lower_margin */ , 3
++ /* unsigned char active */ , 1
++ /* unsigned char crt */ , 0 }
++
++ /* char const *name */ , { "sharp_vga"
++ /* unsigned long pixclock */ , 1
++ /* unsigned short xres */ , 640
++ /* unsigned short yres */ , 480
++ /* unsigned char act_high */ , 1
++ /* unsigned char hsync_len */ , 64
++ /* unsigned char left_margin */ , 60
++ /* unsigned char right_margin */ , 60
++ /* unsigned char vsync_len */ , 20
++ /* unsigned char upper_margin */ , 34
++ /* unsigned char lower_margin */ , 3
++ /* unsigned char active */ , 1
++ /* unsigned char crt */ , 0 }
++
++ /* char const *name */ , { "hitachi_wvga"
++ /* unsigned long pixclock */ , 1
++ /* unsigned short xres */ , 800
++ /* unsigned short yres */ , 480
++ /* unsigned char act_high */ , 1
++ /* unsigned char hsync_len */ , 64
++ /* unsigned char left_margin */ , 1
++ /* unsigned char right_margin */ , 39
++ /* unsigned char vsync_len */ , 20
++ /* unsigned char upper_margin */ , 8
++ /* unsigned char lower_margin */ , 3
++ /* unsigned char active */ , 1
++ /* unsigned char crt */ , 0 }
++// Note that you can use the nifty tool at the
++// following location to generate these values:
++// http://www.tkk.fi/Misc/Electronics/faq/vga2rgb/calc.html
++, {
++ name: "crt1024x768",
++ pixclock: 65000000,
++ xres: 1024,
++ yres: 768,
++ act_high : 0,
++ hsync_len: 136,
++ left_margin: 24,
++ right_margin: 160,
++ vsync_len: 6,
++ upper_margin: 3,
++ lower_margin: 29,
++ active : 0,
++ crt : 1
++}
++, {
++ name: "hitachi_wxga",
++ pixclock: 1,
++ xres: 1024,
++ yres: 768,
++ act_high : 1,
++ hsync_len: 64,
++ left_margin: 1,
++ right_margin: 39,
++ vsync_len: 20,
++ upper_margin: 8,
++ lower_margin: 3,
++ active : 1,
++ crt : 0
++}
++};
++
++/*
++. e
++typedef enum _polarity_t
++{
++ POSITIVE,
++ NEGATIVE,
++}
++polarity_t;
++
++typedef struct _mode_table_t
++{
++ // Horizontal timing.
++ int horizontal_total;
++ int horizontal_display_end;
++ int horizontal_sync_start;
++ int horizontal_sync_width;
++ polarity_t horizontal_sync_polarity;
++
++ // Vertical timing.
++ int vertical_total;
++ int vertical_display_end;
++ int vertical_sync_start;
++ int vertical_sync_height;
++ polarity_t vertical_sync_polarity;
++
++ // Refresh timing.
++ long pixel_clock;
++ long horizontal_frequency;
++ long vertical_frequency;
++}
++mode_table_t;
++
++ // 1024 x 768
++ htotal dend hsstrt hsw hpolar vtot vdend vdstrt vsh vpolar pixclk hfreq vfreq
++{ 1344, 1024, 1048, 136, NEGATIVE, 806, 768, 771, 6, NEGATIVE, 65000000, 48363, 60 },
++{ 1328, 1024, 1048, 136, NEGATIVE, 806, 768, 771, 6, NEGATIVE, 75000000, 56476, 70 },
++{ 1312, 1024, 1040, 96, POSITIVE, 800, 768, 769, 3, POSITIVE, 78750000, 60023, 75 },
++{ 1376, 1024, 1072, 96, POSITIVE, 808, 768, 769, 3, POSITIVE, 94500000, 68677, 85 },
++
++0FE80200/00010000 + CRT regs
++0FE80204/00180000 +
++0FE80208/08000800 +
++0FE8020C/05D003FF +
++0FE80210/00C80424 +
++0FE80214/032502FF +
++0FE80218/00060302 +
++0FE8021C/00000000 +
++0FE80220/00000000 +
++0FE80224/00400200 +
++0FE80228/00000000 +
++0FE8022C/00000000 +
++0FE80230/00000800 +
++0FE80234/00000000 +
++0FE80238/08000000 +
++0FE8023C/00000400 +
++*/
++
++struct lcd_panel_info_t const * const lcd_panels = lcd_panels_ ;
++unsigned const num_lcd_panels = sizeof(lcd_panels_)/sizeof(lcd_panels_[0]);
++
++struct lcd_panel_info_t const *find_lcd_panel( char const * name )
++{
++ unsigned i ;
++ for( i = 0 ; i < num_lcd_panels ; i++ )
++ {
++ if( 0 == strcmp( lcd_panels_[i].name, name ) )
++ return lcd_panels_+i ;
++ }
++ return 0 ;
++}
++
++struct lcd_panel_info_t const *cur_lcd_panel = 0 ;
+diff -u -r --new-file u-boot-1.1.2/common/Makefile u-boot-1.1.2-neon/common/Makefile
+--- u-boot-1.1.2/common/Makefile 2004-12-16 18:35:57.000000000 +0100
++++ u-boot-1.1.2-neon/common/Makefile 2007-08-11 21:07:20.000000000 +0200
+@@ -35,16 +35,16 @@
+ cmd_eeprom.o cmd_elf.o cmd_ext2.o \
+ cmd_fat.o cmd_fdc.o cmd_fdos.o cmd_flash.o cmd_fpga.o \
+ cmd_i2c.o cmd_ide.o cmd_immap.o cmd_itest.o cmd_jffs2.o \
+- cmd_load.o cmd_log.o \
++ cmd_lcdpanel.o cmd_load.o cmd_log.o \
+ cmd_mem.o cmd_mii.o cmd_misc.o cmd_mmc.o \
+- cmd_nand.o cmd_net.o cmd_nvedit.o \
++ cmd_nand.o cmd_net.o cmd_not.o cmd_nvedit.o \
+ cmd_pci.o cmd_pcmcia.o cmd_portio.o \
+ cmd_reginfo.o cmd_reiser.o cmd_scsi.o cmd_spi.o cmd_universe.o cmd_usb.o cmd_vfd.o \
+ command.o console.o devices.o dlmalloc.o docecc.o \
+ environment.o env_common.o \
+ env_nand.o env_dataflash.o env_flash.o env_eeprom.o env_nvram.o env_nowhere.o exports.o \
+- flash.o fpga.o \
+- hush.o kgdb.o lcd.o lists.o lynxkdi.o \
++ flash.o fnmatch.o fpga.o \
++ hush.o kgdb.o lcd.o lcd_panels.o lists.o lynxkdi.o \
+ memsize.o miiphybb.o miiphyutil.o \
+ s_record.o serial.o soft_i2c.o soft_spi.o spartan2.o \
+ usb.o usb_kbd.o usb_storage.o \
+diff -u -r --new-file u-boot-1.1.2/config.mk u-boot-1.1.2-neon/config.mk
+--- u-boot-1.1.2/config.mk 2004-10-10 00:21:30.000000000 +0200
++++ u-boot-1.1.2-neon/config.mk 2007-08-11 21:07:20.000000000 +0200
+@@ -22,6 +22,7 @@
+ #
+
+ #########################################################################
++sinclude select.mk # include DISPLAY_TYPE, HARDWARE_TYPE, SOFTWARE_TYPE, INCLUDE_MINIDEBUG
+
+ # clean the slate ...
+ PLATFORM_RELFLAGS =
+@@ -106,11 +107,15 @@
+ OPTFLAGS= -Os #-fomit-frame-pointer
+ ifndef LDSCRIPT
+ #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
++ifeq ($(INCLUDE_MINIDEBUG),y)
++LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-bootmini.lds
++else
+ LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
+ endif
++endif
+ OBJCFLAGS += --gap-fill=0xff
+
+-gccincdir := $(shell $(CC) -print-file-name=include)
++gccincdir := "$(shell $(CC) -print-file-name=include)"
+
+ CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \
+ -D__KERNEL__ -DTEXT_BASE=$(TEXT_BASE) \
+@@ -170,11 +175,19 @@
+
+ #########################################################################
+
++ifdef LISTINGS
++%.s: %.S
++ $(CPP) $(AFLAGS) -Wa,-alh=$(basename $<).lst -o $@ $(CURDIR)/$<
++%.o: %.S
++ $(CC) $(AFLAGS) -c -Wa,-alh=$(basename $<).lst -o $@ $(CURDIR)/$<
++%.o: %.c
++ $(CC) $(CFLAGS) -c -Wa,-alh=$(basename $<).lst -o $@ $<
++else
+ %.s: %.S
+ $(CPP) $(AFLAGS) -o $@ $(CURDIR)/$<
+ %.o: %.S
+ $(CC) $(AFLAGS) -c -o $@ $(CURDIR)/$<
+ %.o: %.c
+ $(CC) $(CFLAGS) -c -o $@ $<
+-
++endif
+ #########################################################################
+diff -u -r --new-file u-boot-1.1.2/Configure u-boot-1.1.2-neon/Configure
+--- u-boot-1.1.2/Configure 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/Configure 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,170 @@
++#!/bin/bash
++#=======================================================================
++DISPLAY_TYPE_CHOICES="DA640X240 DA320X240 DA800X480 DA640X480 DA240X320 DA800X600 DA1024X768 DP320X240 DP480X320 DL122X32"
++PLATFORM_TYPE_CHOICES="NEONB NEON HALOGEN BD2003 GAME_WITH_SMC GAME_CONTROLLER"
++# BOUNDARY_OLD_BOARD #lcd pin reordering for rgb problem, don't use VLIO(gp18 is turnstile)
++# OLD_GAME_CONTROLLER GAME_CONTROLLER_PLAITED_A1
++REVISION_CHOICES="1 2"
++
++SOFTWARE_TYPE_CHOICES="WINCE LINUX GAME"
++INCLUDE_MINIDEBUG_CHOICES="y n"
++CPU_CLOCK_CHOICES="100 200 300 400"
++CPU_CLOCK_PXA270_CHOICES="104 208 312 416 520 624"
++
++CONFIG_H=include/configs/select.h
++CONFIG_MK=select.mk
++CONFIG_LOG=select.log
++
++fail ()
++{
++ echo ""
++ echo "Configuration failed."
++ echo ""
++ exit 1
++}
++
++if [ -f $CONFIG_MK ] ; then
++. ./$CONFIG_LOG
++fi
++
++
++
++#=======================================================================
++
++
++arg () {
++ VALUE="`echo X"$2" | sed -e 's/^X--[a-zA-Z_]*=//'`"
++ eval $1=\"$VALUE\"
++ eval $1_P='y'
++}
++
++usage () {
++ echo "bad parameters"
++ exit 1
++}
++
++while [ $# -gt 0 ] ; do
++ case "$1" in
++ --DISPLAY_TYPE=*) arg DISPLAY_TYPE $1 ;;
++ --PLATFORM_TYPE=*) arg PLATFORM_TYPE $1 ;;
++ --SOFTWARE_TYPE=*) arg SOFTWARE_TYPE $1 ;;
++ --INCLUDE_MINIDEBUG=*) arg INCLUDE_MINIDEBUG $1 ;;
++ --CPU_CLOCK=*) arg CPU_CLOCK $1 ;;
++ *) usage ;;
++ esac
++ shift
++done
++
++#=======================================================================
++
++write_str () {
++ value=`eval echo '$'$1`
++ echo "$1=$value" >> $CONFIG_MK
++ echo "$1=\"$value\"" >> $CONFIG_LOG
++ if [ x$3 != x ] ; then
++ choices=`eval echo '$'$2`
++ str=""
++ for a in $choices ; do
++ if [ -n "$str" ] ; then str="$str && " ; fi
++ str="$str!defined($3$a)";
++ done
++ echo "#if $str" >> $CONFIG_H
++ echo "#define $3$value" >> $CONFIG_H
++ echo "#endif" >> $CONFIG_H
++ else
++ echo "#ifndef $1" >> $CONFIG_H
++ echo "#define $1 $value" >> $CONFIG_H
++ echo "#endif" >> $CONFIG_H
++ fi
++}
++
++prompt () {
++ eval $3=\"$2\"
++ /bin/echo -e "$1 [$2]: \c"
++ read tmp
++ if [ -n "$tmp" ] ; then eval $3=\"$tmp\" ; fi
++ if [ ! -t 1 ] ; then echo $3 ; fi
++}
++noprompt () {
++ eval $3=\"$2\"
++ /bin/echo -e "$1 [$2]: "
++ if [ ! -t 1 ] ; then echo $3 ; fi
++}
++
++
++ask_str () {
++ choices=`eval echo '$'$3`
++ default=`eval echo '$'$2`
++ ppp=`eval echo '$'$2_P`
++ ans=""
++ stop="0"
++ if [ x$ppp = x"y" ] ; then
++ noprompt "$1 ($choices)" "$default" answer
++ for a in $choices ; do
++ if [ x$a = x$answer ] ; then ans=$a; stop="1"; break; fi;
++ done
++ if [ $stop != "1" ] ; then default=""; fi;
++ fi
++ while [ $stop != "1" ] ; do
++ prompt "$1 ($choices)" "$default" answer
++ for a in $choices ; do
++ if [ x$a = x$answer ] ; then ans=$a; stop="1"; break; fi;
++ done
++ done
++ eval $2=\"$ans\"
++}
++#=======================================================================
++
++echo ""
++echo " -------- U-Boot Boundary Devices Specific Configuration Script --------"
++echo ""
++echo ""
++
++ask_str "Choose display type" DISPLAY_TYPE DISPLAY_TYPE_CHOICES
++ask_str "Choose hardware type" PLATFORM_TYPE PLATFORM_TYPE_CHOICES
++ if [ x$PLATFORM_TYPE = xHALOGEN ] ; then
++ask_str "Choose hardware revision" PLATFORM_REV REVISION_CHOICES
++ fi
++ask_str "Choose software type" SOFTWARE_TYPE SOFTWARE_TYPE_CHOICES
++ask_str "Include minidebug" INCLUDE_MINIDEBUG INCLUDE_MINIDEBUG_CHOICES
++
++ if [ x$PLATFORM_TYPE = xHALOGEN ] ; then
++ask_str "CPU clock" CPU_CLOCK CPU_CLOCK_PXA270_CHOICES
++ else
++ask_str "CPU clock" CPU_CLOCK CPU_CLOCK_CHOICES
++ fi
++
++rm -f $CONFIG_H $CONFIG_MK
++
++cat << 'EOF' > $CONFIG_H
++/*
++ Automatically generated by 'make xxx_config' -- don't edit!
++*/
++#include <asm/arch/platformTypes.h>
++EOF
++
++cat << 'EOF' > $CONFIG_MK
++#
++# Automatically generated by 'make xxx_config' -- don't edit!
++#
++EOF
++
++cat << 'EOF' > $CONFIG_LOG
++#!/bin/bash
++EOF
++
++chmod 777 $CONFIG_LOG
++
++write_str DISPLAY_TYPE DISPLAY_TYPE_CHOICES
++write_str PLATFORM_TYPE PLATFORM_TYPE_CHOICES
++ if [ x$PLATFORM_TYPE = xHALOGEN ] ; then
++write_str PLATFORM_REV REVISION_CHOICES
++ fi
++write_str SOFTWARE_TYPE SOFTWARE_TYPE_CHOICES
++write_str INCLUDE_MINIDEBUG INCLUDE_MINIDEBUG_CHOICES
++ if [ x$PLATFORM_TYPE = xHALOGEN ] ; then
++write_str CPU_CLOCK CPU_CLOCK_PXA270_CHOICES
++ else
++write_str CPU_CLOCK CPU_CLOCK_CHOICES
++ fi
++echo "Configuration successful."
+diff -u -r --new-file u-boot-1.1.2/cpu/mpc8xx/lcd.c u-boot-1.1.2-neon/cpu/mpc8xx/lcd.c
+--- u-boot-1.1.2/cpu/mpc8xx/lcd.c 2004-10-10 01:26:00.000000000 +0200
++++ u-boot-1.1.2-neon/cpu/mpc8xx/lcd.c 2007-08-11 21:07:20.000000000 +0200
+@@ -255,7 +255,6 @@
+ /*----------------------------------------------------------------------*/
+
+
+-int lcd_line_length;
+
+ int lcd_color_fg;
+ int lcd_color_bg;
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/config.mk u-boot-1.1.2-neon/cpu/pxa/config.mk
+--- u-boot-1.1.2/cpu/pxa/config.mk 2003-05-23 14:36:21.000000000 +0200
++++ u-boot-1.1.2-neon/cpu/pxa/config.mk 2007-08-11 21:15:47.000000000 +0200
+@@ -21,8 +21,19 @@
+ # Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ # MA 02111-1307 USA
+ #
+-
+-PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
+- -mshort-load-bytes -msoft-float
+-
+-PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=strongarm1100
+++sinclude ../../select.mk # include DISPLAY_TYPE, HARDWARE_TYPE, SOFTWARE_TYPE, INCLUDE_MINIDEBUG
+++
+++PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8
+++PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4
+++GCC_MAJOR := $(shell $(CC) -v 2>&1 | grep version | cut -d' ' -f3 | cut -d'.' -f1)
+++GCC_MINOR := $(shell $(CC) -v 2>&1 | grep version | cut -d' ' -f3 | cut -d'.' -f2)
+++
+++ifneq ($(GCC_MAJOR),3)
+++ PLATFORM_CPPFLAGS += -mtune=strongarm1100
+++ PLATFORM_RELFLAGS += -msoft-float
+++else
+++ PLATFORM_CPPFLAGS += -mtune=xscale
+++ ifneq ($(GCC_MINOR),4)
+++ PLATFORM_RELFLAGS += -msoft-float
+++ endif
+++endif
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/cpu.c u-boot-1.1.2-neon/cpu/pxa/cpu.c
+--- u-boot-1.1.2/cpu/pxa/cpu.c 2004-02-08 20:38:44.000000000 +0100
++++ u-boot-1.1.2-neon/cpu/pxa/cpu.c 2007-08-11 21:07:20.000000000 +0200
+@@ -33,6 +33,7 @@
+ #include <common.h>
+ #include <command.h>
+ #include <asm/arch/pxa-regs.h>
++#include <asm/arch/mmc.h>
+
+ int cpu_init (void)
+ {
+@@ -59,8 +60,12 @@
+
+ unsigned long i;
+
++ MMC_STRPCL = MMC_STRPCL_STOP_CLK;
++
+ disable_interrupts ();
+
++ dcache_disable();
++
+ /* turn off I-cache */
+ asm ("mrc p15, 0, %0, c1, c0, 0":"=r" (i));
+ i &= ~0x1000;
+@@ -129,21 +134,6 @@
+ return (i & 0x1000);
+ }
+
+-/* we will never enable dcache, because we have to setup MMU first */
+-void dcache_enable (void)
+-{
+- return;
+-}
+-
+-void dcache_disable (void)
+-{
+- return;
+-}
+-
+-int dcache_status (void)
+-{
+- return 0; /* always off */
+-}
+
+ void set_GPIO_mode(int gpio_mode)
+ {
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/Makefile u-boot-1.1.2-neon/cpu/pxa/Makefile
+--- u-boot-1.1.2/cpu/pxa/Makefile 2003-06-16 00:40:43.000000000 +0200
++++ u-boot-1.1.2-neon/cpu/pxa/Makefile 2007-08-11 21:07:20.000000000 +0200
+@@ -23,10 +23,45 @@
+
+ include $(TOPDIR)/config.mk
+
++CPU_TYPE=xscale
++
++ifeq ($(SOFTWARE_TYPE),WINCE)
++STACKS_VALID = -DCONFIG_STACKS_VALID
++else
++
++ifeq ($(SOFTWARE_TYPE),GAME)
++STACKS_VALID = -DCONFIG_STACKS_VALID
++else
++STACKS_VALID =
++endif
++endif
++ARM_ELF_GCC ?= arm-elf-gcc
++
+ LIB = lib$(CPU).a
+
+-START = start.o
+-OBJS = serial.o interrupts.o cpu.o i2c.o pxafb.o mmc.o
++ifeq ($(INCLUDE_MINIDEBUG),y)
++START = minidebug.o ministart.o
++else
++START = start.o ministart.o
++endif
++OBJS = serial.o interrupts.o cpu.o i2c.o mmc.o
++
++ifdef PXALCD
++ OBJS += pxafb.o
++endif
++
++ifeq ($(PLATFORM_TYPE),HALOGEN)
++ OBJS += usb_ohci.o
++else
++ifeq ($(PLATFORM_TYPE),NEON)
++ OBJS += usb_ohci.o
++else
++ifeq ($(PLATFORM_TYPE),NEONB)
++ OBJS += usb_ohci.o
++else
++endif
++endif
++endif
+
+ all: .depend $(START) $(LIB)
+
+@@ -35,9 +70,13 @@
+
+ #########################################################################
+
+-.depend: Makefile $(START:.o=.S) $(OBJS:.o=.c)
+- $(CC) -M $(CFLAGS) $(START:.o=.S) $(OBJS:.o=.c) > $@
++.depend: Makefile $(START) $(OBJS)
++ $(CC) -M $(CFLAGS) -DUBOOT=1 $(START:.o=.S) $(OBJS:.o=.c) > $@
+
+ sinclude .depend
+
++minidebug.o : minidebug.S Makefile
++ $(ARM_ELF_GCC) -c $(D_GNUC) -DUBOOT=1 -DDISPLAY_TYPE=$(DISPLAY_TYPE) -DPLATFORM_TYPE=$(PLATFORM_TYPE) -DPLATFORM_REV=$(PLATFORM_REV) -DSOFTWARE_TYPE=$(SOFTWARE_TYPE) $(STACKS_VALID) -DCPU_CLOCK=$(CPU_CLOCK) \
++ $(SOFT_FLOAT) -I$(TOPDIR)/include -mtune=$(CPU_TYPE) -mcpu=$(CPU_TYPE) -o $@ $<
++
+ #########################################################################
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/minidebug.S u-boot-1.1.2-neon/cpu/pxa/minidebug.S
+--- u-boot-1.1.2/cpu/pxa/minidebug.S 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/cpu/pxa/minidebug.S 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,3850 @@
++ .nolist
++ .ifdef __ARMASM
++UBOOT EQU 0
++CONFIG_UNSCRAMBLE_LCD EQU 0
++LCD_REORDER_BLUE EQU 1
++ .endif
++
++#ifdef UBOOT
++#include <asm/arch/platformTypes.h>
++#include <configs/select.h>
++#include <asm/arch/pxaGpio.h>
++#include <asm/arch/pxaMacro3.h>
++#include <asm/arch/miniMac.inc>
++#include <asm/arch/burn.inc>
++#else
++#include "platformTypes.h"
++#include "pxaGpio.h"
++#include "pxaMacro3.h"
++#include "miniMac.inc"
++#include "burn.inc"
++ .ifdef __ARMASM
++ STARTUPTEXT
++ EXTERN HeadStart
++ .endif
++#endif
++
++ .list
++ .global StartUp
++
++
++#define L1(a) ((CH_##a))
++#define L2(a,b) ((CH_##a)+(CH_##b<<8))
++#define L3(a,b,c) ((CH_##a)+(CH_##b<<8)+(CH_##c<<16))
++#define L4(a,b,c,d) ((CH_##a)+(CH_##b<<8)+(CH_##c<<16)+(CH_##d<<24))
++
++#define C2(a,b) ((CH_##a<<8)+(CH_##b))
++#define C3(a,b,c) ((CH_##a<<16)+(CH_##b<<8)+(CH_##c))
++#define C4(a,b,c,d) ((CH_##a<<24)+(CH_##b<<16)+(CH_##c<<8)+(CH_##d))
++
++// *******************************************************************************************
++// *******************************************************************************************
++
++
++//.global _start
++//_start:
++StartUp:
++ b V_Reset //0
++ b V_UndefinedInstr //4
++ b V_SWI //8
++ b V_PrefetchAbort //0x0c
++ b V_DataAbort //0x10
++ b V_Unused //0x14, not used
++ b V_IRQ //0x18
++// b V_FIQ //0x1c
++
++//In Linux, all modes switch almost immediately to the SVC mode
++//and it is the only one with a valid stack
++//FIQ & SWI stacks are always assumed valid
++V_FIQ:
++ V_VectorEntrance V_rWork,V_rBranch,SIG_FIQ
++
++join_fiq:
++ CheckBranch V_rWork,V_rBranch
++ V_VectorExitCC V_rWork,V_rBranch,eq,eqia
++ CheckLdr V_rWork,V_rBranch
++ V_VectorExitCC1 V_rWork,V_rBranch,cc,ccia
++join_fiq2:
++ sub sp,sp,#(DEBUG_SPACE-DBG_R0) //the extra 12 bytes already on stack are needed for indirect return for SDS bug
++ stmia sp,{r0,r1}
++ sub r1,V_rBranch,#8 //restore to SIG_xxx value
++ add r0,sp,#(DEBUG_SPACE-DBG_R0)
++ ldr V_rWork,[r0],#4
++ ldr V_rBranch,[r0],#8
++ str r0,[sp,#DBG_HSP-DBG_R0]
++ sub r0,sp,#DBG_R0
++join_fiq3:
++ mov r1,r1,LSR #2
++ and r1,r1,#0xf
++ b SaveRest2
++V_Reset:
++//this is either a normal processor reset, or a debug exception in halt mode
++ mrs sp,cpsr
++ and sp,sp,#0x1f
++ cmp sp,#0x15
++ bne 2f
++//this is a debug exception in halt mode
++ CP14_DCSR mrc,sp
++ and sp,sp,#0x1c
++ cmp sp,#0 //reset
++ cmpne sp,#5<<2 //vector trap (reset vector)
++ bne 10f //initialization already done
++
++ BigMov sp,PWR_MANAGER_BASE
++ ldr sp,[sp,#RCSR]
++ tst sp,#2
++ tsteq pc,#0xff000000
++ bne 2f //br if watchdog reset or if not nCS0 address
++
++//signal debugger that he can download into main instruction cache now
++ CP14_TX mcr,sp
++1:
++ CP14_TXRXCTRL mrc,r15 //r15 means update condition codes
++ bpl 1b
++ CP14_RX mrc,sp //just read and discard
++2:
++ CP14_DCSR mrc,sp
++ orr sp,sp,#1<<31 //set global debug enable bit
++ CP14_DCSR mcr,sp
++
++// InitGPIO r0,sp
++// InitIC_Clocks r0,sp
++// InitUART r0,sp,UART_BASE,BAUDRATE
++// TransMacro L1(U)
++ b MainInitializationCode //this can be in the main instruction cache not locked
++ //because it is only executed upon reset
++
++10:
++ cmp sp,#1<<2 //Instruction breakpoint
++ mov sp,r0 //save r0
++ BigMov r0,DEBUG_BASE
++ str sp,[r0,#DBG_R0]
++ str r1,[r0,#DBG_R1]
++ str r2,[r0,#DBG_R2]
++SSDebug:
++ bne 11f
++//this is a breakpoint
++ ldr r1,[r0,#DBG_TRACE]
++ tst r1,#1
++ beq 11f
++ cmn r1,#1
++ moveq r1,#0
++ CP15_IBCR1 mrc,sp
++ sub r2,lr,#3
++ cmp sp,r2
++ CP15_IBCR1 mcreq,r1 //remove breakpoint if single-stepping
++ beq 11f
++ CP15_IBCR0 mrc,sp
++ cmp sp,r2
++ CP15_IBCR0 mcreq,r1
++11:
++ mrs r2,spsr
++ sub lr,lr,#4
++
++ str r3,[r0,#DBG_R3]
++ ldrb r3,[r0,#DBG_Mode]
++SaveDebug:
++ CP14_DCSR mrc,sp
++// str sp,[r0,#DBG_Temp] //the mcr CP14_DCSR instruction below will trash sp in SDS (special debug state)
++ and r1,sp,#0x1c
++ orr sp,sp,#0x1c
++ CP14_DCSR mcr,sp
++ mov r1,r1,LSR #2
++ add r1,r1,#SIG_DBG
++ b SaveR4andUp
++
++V_UndefinedInstr:
++ VectorEntrance rWork,rBranch,SIG_UNDEFINED_INSTRUCTION
++ JOIN b
++V_IRQ:
++ VectorEntrance rWork,rBranch,SIG_IRQ
++
++ .if STACKS_VALID
++ JOIN b
++ .else
++join_irq:
++ CheckBranch I_rWork,I_rBranch
++ I_VectorExitCC I_rWork,I_rBranch,eq,eqia
++
++ CheckLdr I_rWork,I_rBranch
++ I_VectorExitCC1 I_rWork,I_rBranch,cc,ccia
++join_irq2:
++ strd r0,[I_rWork,#DBG_R0-DBG_MAGIC]
++ sub r0,I_rWork,#DBG_MAGIC
++ sub r1,I_rBranch,#8 //restore to SIG_xxx value
++ ldr I_rWork,[r0,#DBG_TEMP]
++ add sp,r0,#DBG_INDIRECT_R0+8 //sp is trashed, if stacks assumed invalid
++ str sp,[r0,#DBG_HSP]
++ b join_fiq3
++ .endif
++
++//sp is valid for this!!!!!, what a treat
++V_SWI:
++ V_VectorEntrance V_rWork,V_rBranch,SIG_SWI
++ b join_fiq
++
++//monitor mode also has instruction breakpoint, bkpt instruction
++V_PrefetchAbort:
++ VectorEntrance rWork,rBranch,SIG_PREFETCH_ABORT
++ CP15_FSR mrc,rWork
++ tst rWork,#1<<9
++ bne DEBUG_EVENT //br if a debug event, in monitor mode
++
++//the 1st instruction after exiting special debug state can cause an abort or possibly the wrong instruction to execute.
++//the Immu is not turned on until the 2nd instruction.
++ tst rWork,#1<<10
++ JOIN beq
++ and rWork,rWork,#0xf
++ cmp rWork,#0x6
++ JOIN bne //br if not an external abort
++
++ CP15_CONTROL mrc,rWork //get the control register
++ tst rWork,#1 //test MMU
++
++ BigMov rWork,DEBUG_BASE+DBG_ABORT_PC
++ swpne rWork,lr,[rWork] //save lr as a flag so not infinite errors, if mmu on
++ cmpne rWork,lr
++
++ .if STACKS_VALID
++ ldrne rBranch,[sp,#4]
++ ldrne rWork,[sp],#12
++ subnes pc,lr,#4 //retry access
++ .else
++ BigMov rWork,DEBUG_BASE+DBG_MAGIC
++ ldrne rWork,[rWork,#DBG_TEMP-DBG_MAGIC]
++ subnes pc,lr,#4 //retry access
++ .endif
++
++ add rBranch,rBranch,#8
++ JOIN2 b
++
++//stacks aren't kept valid
++//monitor mode also has data breakpoint, external debug break, trace-buffer full break
++V_DataAbort:
++ VectorEntrance rWork,rBranch,SIG_DATA_ABORT
++ CP15_FSR mrc,rWork
++ tst rWork,#1<<9
++ JOIN beq
++ sub lr,lr,#4 //+8 of offending instruction for most data aborts instead of +4
++DEBUG_EVENT:
++ BigMov rWork,DEBUG_BASE+DBG_MAGIC
++ strd r0,[rWork,#DBG_R0-DBG_MAGIC]
++ sub r0,rWork,#DBG_MAGIC
++
++ .if STACKS_VALID
++ ldr rWork,[sp],#4
++ ldr rBranch,[sp],#8
++ .else
++ ldr rWork,[r0,#DBG_TEMP]
++ add sp,r0,#DBG_INDIRECT_R0+8 //sp is trashed, if stacks assumed invalid
++ .endif
++ str sp,[r0,#DBG_HSP]
++ CP14_DCSR mrc,sp
++ and sp,sp,#0x1c
++ cmp sp,#1<<2 //Instruction breakpoint
++ str r2,[r0,#DBG_R2]
++ b SSDebug
++
++V_Unused:
++ mov sp,r0 //save r0
++ BigMov r0,DEBUG_BASE
++ str sp,[r0,#DBG_R0]
++ str r1,[r0,#DBG_R1]
++ mov r1,#SIG_UNUSED
++// b SaveRest2
++
++//r0 - debug storage
++//r1 - reason for getting here
++SaveRest2:
++ str r2,[r0,#DBG_R2]
++ sub lr,lr,#4
++ mrs r2,spsr
++ str r3,[r0,#DBG_R3]
++ ldrb r3,[r0,#DBG_Mode]
++//r2 - spsr
++//r3 - DBG_MODE - don't assume that ram is working upon reset
++SaveR4andUp:
++ str r4,[r0,#DBG_R4]
++ str lr,[r0,#DBG_PC] //return PC
++ str r2,[r0,#DBG_CPSR] //return CPSR
++ mrs r4,cpsr
++ str r4,[r0,#DBG_HCPSR] //mode to return to before exception return
++
++ tst r2,#0xf
++ orreq r2,r2,#0xdf //if user mode, switch to system mode to access user registers, set I, F
++ orrne r2,r2,#0xc0 //set I, F
++ msr cpsr_c,r2
++
++ add r2,r0,#DBG_R5
++ stmia r2,{r5,r6,r7,r8,r9,sl,fp,ip,sp,lr}
++// **********************************
++// **********************************
++
++ mov rDBG,r0
++ mov r6,r1 //reason
++ mov r5,r3 //DBG_MODE
++ strb r2,[rDBG,#DBG_LastSignal]
++ CP15_CONTROL mrc,r1 //get the control register
++ tst r1,#1
++ BigMov rUart,UART_BASE //this is right if MMU is off
++ blne GetUartAddress //if MMU is on
++ b gdb_lastSignal1
++
++//r1 - CP15_CONTROL(r1)
++GetUartAddress:
++ tst r1,#1<<13 //assume 1:1 mapping for TTBR if relocation vector is off
++// see if identity mapping is enabled
++ CP15_TTBR mrc,r1
++// using Big will generate no instructions if Wince, throwing off my reloc vector
++// BigAdd2Ne r1,(SDRAM_BASE_C_VIRTUAL-0xA0000000)
++ addne r1,r1,#(SDRAM_BASE_C_VIRTUAL-0xA0000000) //convert this physical address to a virtual address if relocation vector ON
++
++ ldr r2,[r1,rUart,lsr #18]
++ sub r2,r2,rUart
++ cmp r2,#1<<20
++ movcc pc,lr //identity mapping on
++
++ mov r3,rUart
++ BigMov rUart,UART_VIRT_BASE
++1: ldr r2,[r1,rUart,lsr #18]
++ tst r2,#3
++ beq 2f
++ sub r2,r2,r3
++ cmp r2,#1<<20
++ movcc pc,lr //br if found virtual address
++ adds rUart,rUart,#1<<20
++ moveq rUart,#0xE0000000
++ b 1b
++2:
++ BigOrr2 r3,0xc02
++ str r3,[r1,rUart,lsr #18] //steal this unused entry
++// b cache_clean_invalidate_all
++
++cache_clean_invalidate_all:
++//flush data cache, if data cache is enabled
++ CP15_CONTROL mrc,r0 //get the control register
++ tst r0,#4
++ moveq pc,lr //return if disabled
++
++// Set baseaddress as the 1st virtual address of a 32k range used only
++// to flush the data cache. baseaddress should be aligned on a 32 byte(cache-line) boundary.
++// If the virtual range beginning with baseaddress is used for any purpos other than flushing
++// the data cache, then cachelinecount must be doubled from 1024 to 2048
++ mov r1,#cachelinecount
++ ldr r0,[rDBG,#DBG_PC] //I hope my return address is mapped
++ BigBic2 r0,0xffff
++1:
++ CP15_CF_ALLOC_LINE mcr,r0 //allocate a cache line for r0
++ add r0,r0,#cachelinesize
++ subs r1,r1,#1
++ bne 1b
++
++// teq r2, #0 // if running only from cache, an invalidate could be fatal if not done from minicache
++ // and then, a return to caller would not be allowed, so invalidate is postponed
++// CP15_CF_INVAL_I mcrne,r0
++ CP15_CF_DRAIN mcr,r0
++ CP15_CF_INVAL_D mcr,r0
++// The instruction cache is guaranteed to be invalidated at this point. The
++// next instruction sees the result of the invalidate command.
++ mov pc,lr
++
++
++//r0 - value to printm r9 - chksum
++PrintHexEndian:
++#if LITTLE_ENDIAN
++ mov r2,#8
++1: mov r4,r0
++ mov r3,lr
++2: tst r2,#1
++ moveq r0,r4,LSR #4
++ andne r0,r4,#0xf
++ andeq r0,r0,#0xf
++ movne r4,r4,ROR #8
++ cmp r0,#0xA
++ addcs r0,r0,#L1(a)-0x0a
++ addcc r0,r0,#L1(0)
++ add r9,r9,r0
++ bl Transmit
++ subs r2,r2,#1
++ bne 2b
++ mov pc,r3
++
++PrintHexByteEndian:
++ mov r2,#2
++ b 1b
++#else
++ mov r2,#8
++ mov r4,r0
++1: mov r3,lr
++2: mov r4,r4,ROR #28
++ and r0,r4,#0xf
++ cmp r0,#0xA
++ addcs r0,r0,#L1(a)-0x0a
++ addcc r0,r0,#L1(0)
++ add r9,r9,r0
++ bl Transmit
++ subs r2,r2,#1
++ bne 2b
++ mov pc,r3
++PrintHexByteEndian:
++ mov r4,r0,LSL #24
++ mov r2,#2
++ b 1b
++#endif
++
++PrintHexByte:
++ mov r4,r0,LSL #24
++ mov r2,#2
++ b PrintHex1
++
++TransmitCRLF:
++ BigMov r0,L2(CR,LF)
++ b Transmit
++
++
++ .if STACKS_VALID
++ .else
++// *******************************************************
++ RelocationVector 0
++// *******************************************************
++ .endif
++
++
++//IN: r0 - value to print
++//OUT: r0-r4 trashed
++PrintHex:
++ mov r2,#8
++ mov r4,r0
++PrintHex1:
++ mov r3,lr
++1: mov r4,r4,ROR #28
++ and r0,r4,#0xf
++ cmp r0,#0xA
++ addcs r0,r0,#L1(A)-0x0a
++ addcc r0,r0,#L1(0)
++ bl Transmit
++ subs r2,r2,#1
++ bne 1b
++ mov pc,r3
++
++
++TransmitSPACE:
++ mov r0,#L1(SPACE)
++// b Transmit
++
++//IN: r0 - character to transmit
++//OUT: r0 - last character transmitted, r1 - trashed
++Transmit1:
++Transmit:
++1: ldr r1,[rUart,#UART_LSR]
++ ands r1,r1,#0x20
++ beq 1b
++ mov r1,r0
++ and r1,r1,#0xff
++ str r1,[rUart,#UART_THR]
++ movs r1,r0,LSR #8
++ movne r0,r1
++ bne 1b
++ mov pc,lr //return
++
++TransmitChkSum:
++ add r9,r9,r0
++ b Transmit
++
++ .if STACKS_VALID
++// *******************************************************
++ RelocationVector 2
++// *******************************************************
++ .endif
++
++//OUT:
++//z-0 good data in r0
++//z-1 timeout, r0 is 0
++//r1 - loop cnt time remaining
++Receive:
++ mov r1,#RECEIVE_LOOP_COUNT
++Receive1:
++1: ldr r0,[rUart,#UART_LSR]
++ ands r0,r0,#0x1
++ ldrne r0,[rUart,#UART_RBR]
++ movne pc,lr //return
++
++ subs r1,r1,#1
++ bne 1b
++ mov pc,lr //return
++
++
++
++
++//IN: r2 - symbol #
++//OUT: r1:r0 - value,
++GetRegVal:
++ cmp r2,#SYM_FP0
++ bcs GetSpecialReg
++#if DBG_R0
++ add r1,rDBG,#DBG_R0
++ ldr r0,[r1,r2,LSL #2]
++#else
++ ldr r0,[rDBG,r2,LSL #2]
++#endif
++ mov r1,#0
++ mov pc,lr
++
++// ********************************************************************
++// ********************************************************************
++// ********************************************************************
++
++
++gdb_lastSignal:
++ ldrb r6,[rDBG,#DBG_LastSignal]
++ ldrb r5,[rDBG,#DBG_Mode]
++gdb_lastSignal1:
++ ldr r0,[rUart,#UART_LCR]
++ strb r0,[rDBG,#DBG_FFUART_LCR]
++ bic r0,r0,#0x80 //make sure DLAB is clear
++ str r0,[rUart,#UART_LCR]
++
++
++1: mov r9,#0 //chksum
++ mov r0,#L1(DOLLAR)
++ bl Transmit
++// mov r0,#L1(T)
++ mov r0,#L1(S)
++ bl TransmitChkSum
++ mov r0,r6
++ bl PrintHexByteEndian
++// mov r0,#L1(F)
++// bl TransmitChkSum
++// mov r0,#L1(COLON)
++// bl TransmitChkSum
++// mov r2,#SYM_PC
++// bl GetRegVal
++// bl PrintHexEndian
++
++ mov r0,#L1(POUND)
++ bl Transmit
++ and r0,r9,#0xff
++ bl PrintHexByteEndian
++ mov r3,#0
++ mov r1,#RECEIVE_LOOP_COUNT
++10:
++ bl Receive1 //z-0 good data in r0, z-1 timeout, r0 is 0
++ moveq rNum1,#0
++ beq 12f //br if timeout
++ cmpne r6,#SIG_RESET //disable cr abort on power up
++// beq 10b //uncomment to stop <cr> from stopping
++
++ cmp r0,#L1(PLUS)
++ beq WaitForDollarSign
++ cmp r0,#L1(DOLLAR)
++ beq ReadGDB
++
++ cmp r0,#L1(MINUS)
++ beq 1b
++ tst r5,#1
++ cmpeq r0,#GDB_EXIT_CHAR
++ bne 10b //br if in GDB mode or NOT <cr>
++ mov rNum1,#1
++
++//r6 -SIG_xxx
++12:
++ bl TransmitCRLF
++ cmp r6,#SIG_DBG
++ BigMov r0,L4(D,B,G,MINUS)
++ blcs Transmit1
++
++ mov r2,#0
++ mov r3,#0
++ mov r4,#0
++ cmp r6,#SIG_RESET
++ cmpne r6,#SIG_DBG_RESET
++ BigMovEq r0,L4(R,e,s,e)
++ BigMovEq r2,L1(t)
++ cmp r6,#SIG_UNDEFINED_INSTRUCTION
++ BigMovEq r0,L4(U,n,d,e)
++ BigMovEq r2,L1(f)
++// BigMovEq r3,L1(d)
++ cmp r6,#SIG_SWI
++ BigMovEq r0,L3(S,w,i)
++ cmp r6,#SIG_PREFETCH_ABORT
++ BigMovEq r0,L4(P,r,e,f)
++ BigMovEq r2,L4(e,t,c,h)
++ cmp r6,#SIG_DATA_ABORT
++ BigMovEq r0,L4(D,a,t,a)
++ cmpne r6,#SIG_PREFETCH_ABORT
++ BigMovEq r3,L4(SPACE,A,b,o)
++ BigMovEq r4,L2(r,t)
++ cmp r6,#SIG_UNUSED
++ BigMovEq r0,L4(U,n,u,s)
++ BigMovEq r2,L2(e,d)
++ cmp r6,#SIG_IRQ
++ BigMovEq r0,L3(I,r,q)
++ cmp r6,#SIG_FIQ
++ BigMovEq r0,L3(F,i,q)
++ cmp r6,#SIG_DBG_INSTRUCTION_BKPT
++ BigMovEq r0,L4(I,n,s,t)
++ BigMovEq r2,L4(SPACE,B,r,k)
++ cmp r6,#SIG_DBG_DATA_BKPT
++ BigMovEq r0,L4(D,a,t,a)
++ BigMovEq r2,L4(SPACE,B,r,k)
++ cmp r6,#SIG_DBG_BKPT_SOFTWARE
++ BigMovEq r0,L4(B,k,p,t)
++ cmp r6,#SIG_DBG_EXTERNAL
++ BigMovEq r0,L4(E,x,t,e)
++ BigMovEq r2,L4(r,n,a,l)
++ cmp r6,#SIG_DBG_VECTOR_TRAP
++ BigMovEq r0,L4(V,e,c,t)
++ BigMovEq r2,L4(o,r,SPACE,T)
++ BigMovEq r3,L3(r,a,p)
++ cmp r6,#SIG_DBG_TRACE_BUFFER_FULL
++ BigMovEq r0,L4(T,r,a,c)
++ BigMovEq r2,L4(e,SPACE,F,u)
++ BigMovEq r3,L2(l,l)
++ cmp r6,#SIG_DBG_RESERVED
++ BigMovEq r0,L4(R,e,s,e)
++ BigMovEq r2,L4(r,v,e,d)
++
++ bl Transmit1
++ movs r0,r2
++ blne Transmit1
++ movs r0,r3
++ blne Transmit1
++ movs r0,r4
++ blne Transmit1
++
++ bl TransmitSPACE
++ mov r2,#SYM_PC
++ bl GetRegVal
++ bl PrintHex
++// bl TransmitSPACE
++ bl TransmitCRLF
++
++ rsbs r0,pc,#0x800
++ BigMov r0,FLASH_READ_CMD
++
++#if (PLATFORM_TYPE==NEONB)
++ BigMov r1,VIRTUAL_CS1 //remember, although instruction fetches are physical, data are still virtual
++#else
++ BigMov r1,VIRTUAL_CS0 //remember, although instruction fetches are physical, data are still virtual
++#endif
++ cmphs rUart,#0x41000000
++ strhs r0,[r1] //if (pc is in minicache) & (rUart is in virtual memory) then
++ //make sure flash is in read mode, we are almost off the minicache
++
++#if (PLATFORM_TYPE==NEONB)
++ adr lr,AfterPCPrint
++ add r1,r1,lr //virtual address of AfterPCPrint if in Linux for data fetch
++ cmp lr,#0x800
++ BigOrr2Eq lr,FLASH_BASE_ADDRESS //if in low part of CS0 flash, try CS1 flash
++ BigMov r0,0xe3a00055 //instruction mov r0,#55
++ cmp rUart,#0x41000000
++ movlo r1,lr //use physical address of AfterPCPrint for data fetch
++ ldr r2,[r1]
++ cmp r2,r0
++ moveq pc,lr //br if CS1 valid
++ b AfterPCPrint_error
++#else
++ b AfterPCPrint1
++#endif
++
++// ******************************************************************************************
++//A MAIN goal is for all the code above this point to fit into the 2k mini instruction cache
++//So that if difficult errors occur and the flash isn't functioning properly, we can
++//at least get the PC printed out before a crash.
++// ******************************************************************************************
++
++
++//IN: r2 - symbol #, z-1 if SYM_FP0
++//OUT: r1:r0 - value,
++GetSpecialReg:
++ bne 2f
++//MRA{<cond>} <RdLo>,<RdHi>,acc0
++ mra r0,r1,acc0
++ mov pc,lr
++
++ .if STACKS_VALID
++ .else
++//Must keep this aligned at 0x800 if Bal
++ mac_AfterPCPrint 1
++ .endif
++
++2: cmp r2,#SYM_FSR
++ CP15_FSR mrceq,r0
++ cmp r2,#SYM_FAR
++ CP15_FAR mrceq,r0
++ cmp r2,#SYM_DCSR
++ CP14_DCSR mrceq,r0
++ cmp r2,#SYM_TTBR
++ CP15_TTBR mrceq,r0
++ cmp r2,#SYM_CTRL
++ CP15_CONTROL mrceq,r0
++ mov r1,#0
++ mov pc,lr
++
++//out: c-1 means hex char, r0 - character read, r1 - 0:15 if r0 is a hex character
++ReadHex:
++1: ldr r0,[rUart,#UART_LSR]
++ ands r0,r0,#0x1
++ ldrne r0,[rUart,#UART_RBR]
++ beq 1b //br on timeout
++ rsbs r1,r0,#L1(9) //reverse subtract
++ subcss r1,r0,#L1(0)
++ movcs pc,lr
++
++ rsbs r1,r0,#L1(f) //reverse subtract
++ subcss r1,r0,#L1(a)
++ addcs r1,r1,#10
++
++ movcs pc,lr
++
++ rsbs r1,r0,#L1(F) //reverse subtract
++ subcss r1,r0,#L1(A)
++ addcs r1,r1,#10
++ mov pc,lr
++
++ .if STACKS_VALID
++//Must keep this aligned at 0x800 if Bal
++ mac_AfterPCPrint 0
++ .endif
++
++
++//r2:r1:r0 value to print, r9 - chksum
++PrintHexEndian12:
++ .if 1
++ orr r3,r0,r1
++ orrs r3,r3,r2
++ bne 1f
++ mov r3,lr
++ mov r0,#L1(0)
++ bl TransmitChkSum
++ mov r0,#L1(ASTERISK)
++ bl TransmitChkSum
++ mov r0,#29+24-1
++ mov lr,r3
++ b TransmitChkSum
++ .endif
++1:
++#if LITTLE_ENDIAN
++ mov r7,lr
++ mov r5,r1
++ mov r6,r2
++ bl PrintHexEndian //r0
++ mov r0,r5
++ bl PrintHexEndian //r1
++ mov r0,r6
++ mov lr,r7
++ b PrintHexEndian //r2
++
++#else
++ mov r7,lr
++ mov r5,r0
++ mov r6,r1
++ mov r0,r2
++ bl PrintHexEndian //r2
++ mov r0,r6
++ bl PrintHexEndian //r1
++ mov r0,r5
++ mov lr,r7
++ b PrintHexEndian //r0
++#endif
++
++
++MainInitializationCode:
++ cmp pc,#MEM_START
++ biclo sp,pc,#FLASH_BASE_ADDRESS
++ rsblos sp,sp,#0x4000
++ movlo r1,#0
++ blo InitializeCont2 //br if not ram and not from reset vector
++
++//pc - 0-0x4000, 0x04000000-0x04004000, 0xa000000-0xffffffff
++ InitCS0_CS1 r0,sp
++ InitGPIO r0,sp
++
++#if (PLATFORM_TYPE==NEONB)
++ adr lr,AfterPCPrint
++ cmp lr,#0x800
++ bne InitializeCont1
++ BigOrr2 lr,FLASH_BASE_ADDRESS //if in low part of CS0 flash, try CS1 flash
++ BigMov r0,0xe3a00055 //instruction mov r0,#55
++ ldr r2,[lr]
++ cmp r2,r0
++ addeq pc,lr,#InitializeCont-AfterPCPrint //br if CS1 valid
++#endif
++ b InitializeCont1
++
++//OUT: r0,r2 value, r7 trashed
++ReadHexEndian:
++ mov r3,lr
++ ReadHexE r2,r7
++ mov r0,r2
++ mov pc,r3
++
++
++//OUT: r2:r1:r0 value
++ReadHexEndian12:
++ mov r3,lr
++
++#if LITTLE_ENDIAN
++ ReadHexE r4,r7
++ ReadHexE r5,r7
++ ReadHexE r2,r7
++ mov r0,r4
++ mov r1,r5
++#else
++ ReadHexE r2,r7
++ ReadHexE r5,r7
++ ReadHexE r4,r7
++ mov r0,r4
++ mov r1,r5
++#endif
++ mov pc,r3
++
++
++
++ReadGDB:
++ mov r8,#0
++ mov r9,#0
++ mov rGdbNum3,#0
++ mov rGdbChkSum,#0
++1: bl Receive
++ beq 1b //br on timeout
++ cmp r0,#L1(G)
++ beq gdb_G
++// cmp r0,#L1(q)
++// beq gdb_q
++ mov rGdbCmd,r0 //r5 - command being requested
++ add rGdbChkSum,rGdbChkSum,r0 //update checksum
++ bl GetNumber
++ mov r6,r2
++ mov r7,r0
++ cmp r0,#L1(POUND)
++ beq 2f
++ cmp rGdbCmd,#L1(P)
++ beq gdb_P
++// cmp r0,#L1(COMMA)
++// cmpne r0,#L1(SEMICOLON)
++// cmpne r0,#L1(COLON)
++// cmpne r0,#L1(EQUAL)
++ bl GetNumber
++ mov r8,r2
++ mov r9,r0
++ cmp r0,#L1(POUND)
++ beq 2f
++ cmp rGdbCmd,#L1(M)
++ beq gdb_M
++ cmp rGdbCmd,#L1(X)
++ beq gdb_X
++
++ bl GetNumber
++ mov rGdbNum3,r2
++ cmp r0,#L1(POUND)
++ bne WaitForPound
++
++//# found, check chksum
++2: bl ReadChksum
++ and rGdbChkSum,rGdbChkSum,#0xff
++ cmp rGdbChkSum,r2
++ bne CheckSumError
++ mov r0,#L1(PLUS)
++ bl Transmit
++
++ cmp rGdbCmd,#L1(g)
++ beq gdb_g
++ cmp rGdbCmd,#L1(p)
++ beq gdb_p
++ cmp rGdbCmd,#L1(m)
++ beq gdb_m
++ cmp rGdbCmd,#L1(c)
++ beq gdb_c
++ cmp rGdbCmd,#L1(C)
++ beq gdb_C
++ cmp rGdbCmd,#L1(s)
++ beq gdb_s
++ cmp rGdbCmd,#L1(S)
++ beq gdb_S
++ cmp rGdbCmd,#L1(z)
++ beq gdb_z
++ cmp rGdbCmd,#L1(Z)
++ beq gdb_Z
++ cmp rGdbCmd,#L1(t)
++ beq gdb_t
++ cmp rGdbCmd,#L1(QUESTION_MARK)
++ beq gdb_lastSignal
++ cmp rGdbCmd,#L1(D)
++ beq gdb_D
++//this is an unimplemented command
++UnImplemented:
++ BigMov r0,L4(DOLLAR,POUND,0,0)
++ bl Transmit1
++ b WaitForDollarSign
++
++
++SendError01:
++ mov r9,#0 //chksum
++ mov r0,#L1(DOLLAR)
++ bl Transmit
++ mov r0,#L1(E)
++ bl TransmitChkSum
++ mov r0,#L1(0)
++ bl TransmitChkSum
++ mov r0,#L1(1)
++ bl TransmitChkSum
++ sub r5,pc,#.+8-SendError01
++ b FinishPacket
++
++
++SendOK:
++ mov r9,#0 //chksum
++ mov r0,#L1(DOLLAR)
++ bl Transmit
++ mov r0,#L1(O)
++ bl TransmitChkSum
++ mov r0,#L1(K)
++ bl TransmitChkSum
++ sub r5,pc,#.+8-SendOK
++ b FinishPacket
++
++CheckSumError:
++ mov r0,#L1(MINUS)
++ bl Transmit
++WaitForDollarSign:
++11: bl GetNumber //$ will branch to ReadGDB
++ b 11b
++WaitForPound:
++11: bl GetNumber
++ cmp r0,#L1(POUND)
++ bne 11b
++ bl ReadChksum
++ and rGdbChkSum,rGdbChkSum,#0xff
++ cmp rGdbChkSum,r2
++ bne CheckSumError
++ mov r0,#L1(PLUS)
++ bl Transmit
++ b UnImplemented
++
++
++
++FinishPacket:
++ mov r0,#L1(POUND)
++ bl Transmit
++ and r0,r9,#0xff
++ bl PrintHexByte
++10: mov r2,#5
++11: bl ReadHex
++ cmp r0,#L1(DOLLAR)
++ beq ReadGDB
++ cmp r0,#L1(PLUS)
++ beq WaitForDollarSign
++ cmp r0,#L1(MINUS)
++
++
++ moveq pc,r5 //retransmit packet
++ cmp r0,#GDB_EXIT_CHAR
++ bne 10b
++ subs r2,r2,#1
++ beq Prompt
++ b 11b
++
++ .if 0
++gdb_q:
++ mov r2,#0
++ mov r3,#0
++1: bl ReadHex
++ cmp r0,#L1(DOLLAR)
++ beq ReadGDB
++ cmp r0,#GDB_EXIT_CHAR
++ beq Prompt
++ cmp r0,#L1(POUND)
++ beq 2f
++ add rGdbChkSum,rGdbChkSum,r0 //update checksum
++ mov r1,r2,LSR #24
++ orr r3,r1,r3,LSL #8
++ orr r2,r0,r2,LSL #8
++ b 1b
++2:
++ bl ReadChksum
++ and rGdbChkSum,rGdbChkSum,#0xff
++ cmp rGdbChkSum,r2
++ bne CheckSumError
++ mov r0,#L1(PLUS)
++ bl Transmit
++ b UnImplemented
++ .endif
++
++
++//Detach command - gdb is exiting
++gdb_D:
++//clear break/watch points
++ b Prompt
++
++//r6 - addr, r8 - PP, rGdbNum3 - mm
++gdb_t:
++ b UnImplemented
++
++
++//read general registers
++gdb_g:
++ mov r9,#0 //chksum
++ mov r0,#L1(DOLLAR)
++ bl Transmit
++ mov r8,#0
++1: mov r2,r8
++ bl GetRegVal
++ bl PrintHexEndian
++ add r8,r8,#1
++ cmp r8,#SYM_PC+1
++ bne 1b
++
++ mov r2,#SYM_FP0
++ bl GetRegVal
++ mov r8,#0
++2: mov r2,#0
++ bl PrintHexEndian12 //fp0-7
++ mov r0,#0
++ mov r1,#0
++ add r8,r8,#1
++ cmp r8,#8
++ bne 2b
++
++ bl PrintHexEndian //fps
++
++ mov r2,#SYM_CPSR
++ bl GetRegVal
++ bl PrintHexEndian //cpsr
++
++ sub r5,pc,#.+8-gdb_g
++ b FinishPacket
++
++
++//Read general register
++//r6 - reg #
++gdb_p:
++ mov r9,#0 //chksum
++ mov r0,#L1(DOLLAR)
++ bl Transmit
++ mov r2,r6
++ cmp r6,#SYM_PC+1
++ bcs 2f
++
++1: bl GetRegVal
++3: bl PrintHexEndian
++4: sub r5,pc,#.+8-gdb_p
++ b FinishPacket
++2: cmp r6,#25
++ mov r2,#SYM_CPSR
++ beq 1b
++ cmp r6,#24 //fps
++ mov r0,#0
++ beq 3b
++ cmp r6,#16 //fp0
++ mov r0,#0
++ mov r1,#0
++ mov r2,#SYM_FP0
++ mov rGdbNum3,r6
++ bleq GetRegVal
++ mov r2,#0
++ bl PrintHexEndian12 //fp0-7
++ mov r6,rGdbNum3
++ b 4b
++
++//read memory
++//r6 - addr, r8 - length
++gdb_m:
++ mov r9,#0 //chksum
++ mov r0,#L1(DOLLAR)
++ bl Transmit
++ mov r5,r6
++ movs r7,r8
++ beq 4f
++1:
++ tst r5,#3
++ bne 3f
++ cmp r7,#4
++ bcc 3f
++ ldr r0,[r5],#4
++ bl PrintHexEndian
++ subs r7,r7,#4
++ bne 1b
++ b 4f
++
++3: ldrb r0,[r5],#1
++ bl PrintHexByteEndian
++ subs r7,r7,#1
++ bne 1b
++4: sub r5,pc,#.+8-gdb_m
++ b FinishPacket
++
++
++//continue
++//r6 - address, 0- current PC
++gdb_c:
++ mov r8,r6
++//r8 - address, 0- current PC
++gdb_C:
++ movs rNum1,r8
++ movne rValidCnt,#F_NUM1_MASK
++ moveq rValidCnt,#0
++ tst rNum1,#3
++ bne SendError01
++ mov r4,#1
++ b Go_Cmd1
++
++//step
++//r6 - address, 0- current PC
++gdb_s:
++ mov r8,r6
++//r8 - address, 0- current PC
++gdb_S:
++ movs rNum1,r8
++ movne rValidCnt,#F_NUM1_MASK
++ moveq rValidCnt,#0
++ tst rNum1,#3
++ bne SendError01
++ mov r4,#1
++ b Trace_Cmd1
++
++
++
++//watchpoints/breakpoints - remove
++//r6 - type, r8 - address
++gdb_z:
++ cmp r6,#0 //software breakpoint
++ cmpne r6,#1 //hardware breakpoint
++ bne UnImplemented
++// mov rNum1,r8 //same reg
++ bl BC_Do
++ b SendOK
++
++
++
++//watchpoints/breakpoints - insert
++gdb_Z:
++ cmp r6,#0 //software breakpoint
++ cmpne r6,#1 //hardware breakpoint
++ bne UnImplemented
++// mov rNum1,r8 //same reg
++ bl BS_Do // z-0 if r0==rNum1, breakpoint was already set
++ cmpne r0,rNum1
++ beq SendOK
++ b SendError01
++
++
++//gdb routines below have not done checksum yet
++//write general registers
++gdb_G:
++ mov r8,#0
++1: bl ReadHexEndian
++ mov r2,r8
++ mov r1,#0
++ bl StoreRegVal //r2 - symbol #, r1:r0 - value
++ add r8,r8,#1
++ cmp r8,#SYM_PC+1
++ bne 1b
++
++ bl ReadHexEndian12
++ mov r2,#SYM_FP0
++ bl StoreRegVal //r2 - symbol #, r1:r0 - value
++
++ mov r8,#1
++2: bl ReadHexEndian12
++ add r8,r8,#1
++ cmp r8,#8
++ bne 2b
++
++ bl ReadHexEndian //fps
++ bl ReadHexEndian //cpsr
++
++ mov r2,#SYM_CPSR
++ bl StoreRegVal //r2 - symbol #, r1:r0 - value
++FinishWritePacket:
++ bl FinishWriteP
++ b SendOK
++FinishWriteP:
++ mov r4,lr
++ bl ReadHex
++ cmp r0,#L1(POUND)
++ bne CheckSumError
++ bl ReadChksum
++ and rGdbChkSum,rGdbChkSum,#0xff
++ cmp rGdbChkSum,r2
++ bne CheckSumError
++ mov r0,#L1(PLUS)
++ bl Transmit
++ mov pc,r4
++
++
++
++
++//write general register
++//r6 - reg#
++gdb_P:
++ mov r8,r6
++ cmp r6,#SYM_PC+1
++ bcs 2f
++1:
++ bl ReadHexEndian
++4: mov r6,r0
++ mov r7,r1
++ bl FinishWriteP
++ mov r0,r6
++ mov r1,r7
++ mov r2,r8
++ bl StoreRegVal //r2 - symbol #, r1:r0 - value
++ b SendOK
++
++3: bl ReadHexEndian
++ b FinishWritePacket
++
++2: cmp r6,#25
++ mov r8,#SYM_CPSR
++ beq 1b
++ cmp r6,#24 //fps
++ beq 3b
++ bl ReadHexEndian12
++ cmp r6,#16 //fp0
++ bne FinishWritePacket
++ mov r8,#SYM_FP0
++ b 4b
++
++
++//write memory
++//r6 - addr, r8 - length
++gdb_M:
++ movs r8,r8
++ beq FinishWritePacket
++
++1: tst r6,#3
++ beq 3f
++2: bl ReadHexByteEndian
++ strb r2,[r6],#1
++ subs r8,r8,#1
++ bne 1b
++ b FinishWritePacket
++3: cmp r8,#4
++ bcc 2b
++ bl ReadHexEndian
++ str r2,[r6],#4
++ subs r8,r8,#4
++ bne 3b
++ b FinishWritePacket
++
++
++//write memory binary with 0x7d, "$","#", escaped with 0x7d
++//r6 - addr, r8 - length
++gdb_X:
++ movs r8,r8
++ beq FinishWritePacket
++
++1: tst r6,#3
++ beq 3f
++2: bl ReadByteEndian
++ strb r0,[r6],#1
++ subs r8,r8,#1
++ bne 1b
++ b FinishWritePacket
++3: cmp r8,#4
++ bcc 2b
++ bl ReadEndian
++ str r0,[r6],#4
++ subs r8,r8,#4
++ bne 3b
++ b FinishWritePacket
++
++
++
++ReadEndian:
++ mov r4,lr
++ mov r5,#4
++1: bl ReadByteEndian
++
++#if LITTLE_ENDIAN
++ mov r0,r0,LSL #24
++ orr r2,r0,r2,LSR #8
++#else
++ orr r2,r0,r2,LSL #8
++#endif
++
++ subs r5,r5,#1
++ bne 1b
++ mov r0,r2
++ mov pc,r4
++
++
++ReadByteEndian:
++ mov r3,lr
++ bl ReadHex
++ add rGdbChkSum,rGdbChkSum,r0 //update checksum
++ cmp r0,#0x7d
++ beq 1f
++ cmp r0,#L1(DOLLAR)
++ cmpne r0,#L1(POUND)
++ beq CheckSumError
++ mov pc,r3
++1:
++ bl ReadHex
++ add rGdbChkSum,rGdbChkSum,r0 //update checksum
++ mov pc,r3
++
++
++ReadHexByteEndian:
++ mov r3,lr
++ bl ReadHex
++ bcc CheckSumError
++ add rGdbChkSum,rGdbChkSum,r0 //update checksum
++ mov r2,r1
++ bl ReadHex
++ bcc CheckSumError
++ add rGdbChkSum,rGdbChkSum,r0 //update checksum
++ add r2,r1,r2,LSL #4
++ mov pc,r3
++
++//OUT: r2 - checksum
++ReadChksum:
++ mov r3,lr
++ bl ReadHex
++ movcs r2,r1
++ blcs ReadHex
++ addcs r2,r1,r2,LSL #4
++ mvncc r2,#0
++ mov pc,r3
++
++//out: r0 exit character, r2 - number, rGdbChkSum - updated
++GetNumber:
++ mov r2,#0
++ mov r3,lr
++1: bl ReadHex
++ bcc 3f
++ add rGdbChkSum,rGdbChkSum,r0 //update checksum
++2: tst r2,#0xf0000000
++ movne pc,r3 //return on number overflow
++ add r2,r1,r2,LSL #4
++ b 1b
++3: cmp r0,#L1(DOLLAR)
++ beq ReadGDB
++ cmp r0,#GDB_EXIT_CHAR
++ beq Prompt
++ cmp r0,#L1(POUND)
++ addne rGdbChkSum,rGdbChkSum,r0 //update checksum
++ mov pc,r3
++
++// *****************************************************************
++#if (PLATFORM_TYPE==NEONB)
++AfterPCPrint_error:
++ bl TransmitCRLF
++ BigMov r0,L4(F,l,a,s)
++ bl Transmit1
++ BigMov r0,L4(h,SPACE,i,s)
++ bl Transmit1
++ BigMov r0,L4(SPACE,i,n,v)
++ bl Transmit1
++ BigMov r0,L4(a,l,i,d)
++ bl Transmit1
++ bl TransmitCRLF
++#endif
++AfterPCPrint1:
++ mov rPrevNum1,#MEM_START
++ movs rNum1,rNum1
++ tsteq r6,#7 //make sure it's a SIG_RESET, or SIG_DBG_RESET, and timeout
++ bne 1f
++ BigBic r0,pc,FLASH_BASE_ADDRESS
++ cmp r0,#0x4000
++ blo Gl_Cmd //auto start program if running in flash
++1:
++ b R_Cmd
++// b Prompt2
++
++
++Invalid:
++ bl TransmitCRLF
++ BigMov r0,L4(i,n,v,a)
++ bl Transmit1
++ BigMov r0,L3(l,i,d)
++ bl Transmit1
++ b Prompt
++Prompt1:
++ mov rPrevNum1,#MEM_START
++Prompt:
++1: bl TransmitCRLF
++Prompt2:
++ mov r0,#L1(PERIOD)
++ bl Transmit
++ bl TransmitSPACE
++ mov rFieldStart,#1
++ bl ReadCommand
++
++ mov r2,r0 //save exit character
++ cmp r0,#0x0d
++ blne Transmit
++ bl TransmitCRLF
++
++ cmp rCommand,#0
++ bne 2f
++ cmp r2,#0x0d
++ beq 1b
++ cmp r2,#L1(PLUS)
++ addeq rPrevNum1,rPrevNum1,#4
++ beq Examine_Cmd
++ cmp r2,#L1(MINUS)
++ subeq rPrevNum1,rPrevNum1,#4
++ beq Examine_Cmd
++ b 1b
++
++2: tst rSymbol,#F_NUM1_MASK
++ mov r0,rNum1
++ blne GetSymbolNumber
++ bne Invalid
++ mov rNum1,r0
++
++ tst rSymbol,#F_NUM2_MASK
++ mov r0,rNum2
++ blne GetSymbolNumber
++ bne Invalid
++ mov rNum2,r0
++
++ cmp rCommand,#L1(E)
++ beq Examine_Cmd
++ cmp rCommand,#L1(D)
++ beq Deposit_Cmd
++ cmp rCommand,#L1(G)
++ beq Go_Cmd
++ cmp rCommand,#L1(R)
++ beq R_Cmd
++ cmp rCommand,#L1(T)
++ beq Trace_Cmd
++ BigMov r0,C2(D,L)
++ cmp rCommand,r0
++ beq Download_Cmd
++ cmp rCommand,#L1(QUESTION_MARK)
++ beq Help_Cmd
++
++ mov r0,r0,LSL #8
++ orr r0,r0,#L1(W)
++ cmp rCommand,r0
++ beq Download_Wireless_Cmd
++
++ BigMov r0,C4(S,S,I,D)
++ cmp rCommand,r0
++ beq SSID_Cmd
++
++ BigMov r0,C3(M,A,C)
++ cmp rCommand,r0
++ beq MAC_Cmd
++
++ BigMov r0,C4(B,U,R,N)
++ cmp rCommand,r0
++ beq Burn_Cmd
++
++ BigMov r0,C2(B,B)
++ cmp rCommand,r0
++ beq Burn2_Cmd
++
++ BigMov r0,C4(B,A,L,L) //Burn all of flash, erase end.
++ cmp rCommand,r0
++ beq BurnAll_Cmd
++
++ cmp rCommand,#L1(V)
++ beq Verify_Cmd
++
++ BigMov r0,C2(V,V)
++ cmp rCommand,r0
++ beq Verify2_Cmd
++
++ BigMov r0,C2(G,L)
++ cmp rCommand,r0
++ beq Gl_Cmd //go linux!!
++
++ BigEor2 r0,C2(G,L)^C2(G,G)
++ cmp rCommand,r0
++ beq GG_Cmd //go without cache invalidate
++
++ BigMov r0,C2(T,T)
++ cmp rCommand,r0
++ beq TT_Cmd //Trace without cache invalidate
++
++ BigMov r0,C2(B,S)
++ cmp rCommand,r0
++ beq BS_Cmd
++
++ BigEor2 r0,C2(B,S)^C2(B,E)
++ cmp rCommand,r0
++ beq BE_Cmd
++
++ BigEor2 r0,C2(B,E)^C2(B,C)
++ cmp rCommand,r0
++ beq BC_Cmd
++
++ BigEor2 r0,C2(B,C)^C2(W,C)
++ cmp rCommand,r0
++ beq WC_Cmd
++
++ BigEor2 r0,C2(W,C)^C2(W,W)
++ cmp rCommand,r0
++ beq WW_Cmd
++
++ BigEor2 r0,C2(W,W)^C2(W,R)
++ cmp rCommand,r0
++ beq WR_Cmd
++
++ mov r0,r0,LSL #8
++ orr r0,r0,#L1(W)
++ cmp rCommand,r0
++ beq WRW_Cmd
++
++ BigMov r0,C3(M,M,U)
++ cmp rCommand,r0
++ beq MMU_Cmd
++// mov r0,rCommand
++// bl PrintHex
++ b Invalid
++
++//IN: rFieldStart - starting field (this is a blank counting field)
++//OUT:
++ReadCommand:
++ mov r3,lr
++ mov rSymbol,#0
++ mov rField,rFieldStart
++ mov rValidCnt,#0 //low nibble: # of blanks before command
++ //next: # of chars in command
++ //next: # of blanks
++ //next: # of hex digits in num1
++ //next: # of blanks
++ //next: # of hex digits in num2
++ mov rCommand,#0 //command
++ mov rNum1,#0 //1st number
++ mov rNum2,#0 //2nd number
++
++1: bl Receive
++ beq 1b //br on timeout
++ cmp r0,#L1(DOLLAR)
++ beq ReadGDB
++ cmp r0,#L1(PLUS)
++ cmpne r0,#L1(MINUS)
++ cmpne r0,#L1(AT_SIGN)
++ cmpeq rValidCnt,#0
++ cmpne r0,#0x0d
++ moveq pc,r3 //return on -,+, 1st on line or <cr>
++
++ cmp r0,#L1(SPACE)
++ bne 2f
++ bl Transmit
++ tst rValidCnt,#0x80000000
++ eorne rValidCnt,rValidCnt,#0x80000000 //clear bit 31 to mark as blank field
++ movne rField,rField,LSL #F_INC
++//now we are in a counting blanks field
++ rsb r2,rField,rField,LSL #F_INC //get a field mask
++ and r1,rValidCnt,r2
++ cmp r1,r2
++ beq Invalid //br if field is full
++ add rValidCnt,rValidCnt,rField
++ b 1b
++2:
++ cmp r0,#0x08 //Backspace
++ cmpne r0,#0x7f //del or Backspace
++ bne 4f
++ cmp rValidCnt,#0
++ beq 1b //br if nothing to remove
++ BigMov r0,L3(BACKSPACE,SPACE,BACKSPACE)
++ bl Transmit1
++ sub rValidCnt,rValidCnt,rField
++ mov r0,#4
++ tst rSymbol,rField
++ movne r0,#8
++ cmp rField,#F_COMMAND
++ moveq rCommand,rCommand,LSR #8
++ cmp rField,#F_NUM1
++ moveq rNum1,rNum1,LSR r0
++ cmp rField,#F_NUM2
++ moveq rNum2,rNum2,LSR r0
++
++3: rsb r0,rField,rField,LSL #F_INC //get a field mask
++ tst rValidCnt,r0
++ bne 1b //br if still more in this field
++ bic rSymbol,rSymbol,rField
++ cmp rField,rFieldStart
++ beq 1b
++//move back to lower field
++ mov rField,rField,LSR #F_INC
++ eors rValidCnt,rValidCnt,#0x80000000
++ b 3b
++
++4: bl Transmit
++ tst rValidCnt,#0x80000000
++ orreq rValidCnt,rValidCnt,#0x80000000 //set bit 31 to mark as data field
++ moveq rField,rField,LSL #F_INC
++ cmp rField,#F_UNDEF
++ beq Invalid
++//now we are in a data field
++ rsbs r1,rField,#F_COMMAND
++ rsbges r1,r0,#L1(9) //reverse subtract
++ subges r1,r0,#L1(0)
++ movge rField,rField,LSL #F_INC+F_INC //advance to number field if in range "0"-"9"
++
++ rsb r2,rField,rField,LSL #F_INC //get a field mask
++ and r1,rValidCnt,r2
++ cmp r1,r2
++ beq Invalid //field is full
++ add rValidCnt,rValidCnt,rField
++
++ rsbs r1,r0,#L1(z) //reverse subtract
++ subges r1,r0,#L1(a)
++ andge r0,r0,#0xdf //convert to uppercase if was "a"-"z"
++ cmp rField,#F_COMMAND
++ bne 6f
++ tst rCommand,#0xff000000
++ bne Invalid
++ add rCommand,r0,rCommand,LSL #8
++ b 1b
++
++6: tst rSymbol,rField
++ bne 15f
++ rsbs r1,r0,#L1(9) //reverse subtract
++ subges r1,r0,#L1(0)
++ bge 5f
++ rsbs r1,r0,#L1(F) //reverse subtract
++ subges r1,r0,#L1(A)
++ add r1,r1,#10
++ bge 5f
++ orr rSymbol,rSymbol,rField
++//now if number started with "A"-"F", convert back to ascii
++
++ cmp rField,#F_NUM1
++ mov r1,rValidCnt,LSR #F_NUM1_BIT //# of nibbles +1 in rNum
++ movne r1,rValidCnt,LSR #F_NUM2_BIT
++ and r1,r1,#((1<<F_INC)-1)
++
++ subs r1,r1,#1 //# of nibbles in rNum
++ beq 15f
++
++
++
++ cmp r1,#3
++ bcs Invalid //br if too many leading hex characters
++ mov r1,r1,LSL #2 //# of bits valid in rNum
++ cmp rField,#F_NUM1
++ rsb lr,r1,#24
++ moveq r2,rNum1,ROR r1
++ movne r2,rNum2,ROR r1
++ orr r2,r2,r0,LSL lr //save r0 character
++
++ mov lr,#0
++26: mov r0,r2,LSR #28
++ cmp r0,#10
++ addcs r0,r0,#L1(A)-10
++ addcc r0,r0,#L1(0)
++ orr lr,r0,lr,LSL #8
++ mov r2,r2,LSL #4
++ subs r1,r1,#4
++ bne 26b
++
++ cmp rField,#F_NUM1
++ mov r0,r2,LSR #24 //restore r0
++ moveq rNum1,lr
++ movne rNum2,lr
++ b 15f
++
++5:
++ cmp rField,#F_NUM1
++ bne 7f
++ tst rNum1,#0xf0000000
++ bne Invalid
++ add rNum1,r1,rNum1,LSL #4
++ b 1b
++7: tst rNum2,#0xf0000000
++ bne Invalid
++ add rNum2,r1,rNum2,LSL #4
++ b 1b
++
++15:
++ cmp rField,#F_NUM1
++ bne 17f
++ tst rNum1,#0xff000000
++ bne Invalid
++ add rNum1,r0,rNum1,LSL #8
++ b 1b
++17: tst rNum2,#0xff000000
++ bne Invalid
++ add rNum2,r0,rNum2,LSL #8
++ b 1b
++
++//rNum1 - 0 off, 1 on
++MMU_Cmd:
++ bl cache_clean_invalidate_all
++ tst rNum1,#1
++//now enable/disable MMU, Data Cache
++ CP15_CONTROL mrc,r1 //get the control register
++ biceq r1,r1,#0x5
++ orrne r1,r1,#0x5
++ CP15_CONTROL mcr,r1 //set the control register
++ CPWAIT r0
++ BigMov rUart,UART_BASE //this is right if MMU is off
++ blne GetUartAddress //if mmu is on
++ b Prompt
++
++// ********************************************************************
++// ********************************************************************
++// ********************************************************************
++// r3 - -1 : Trace, 0 : Go
++// r4 - 0 : normal, 1 : mark gdb mode
++// rNum2 - 0 : invalidate cache, 1 : don't invalidate cache
++//go without cache invalidate
++GG_Cmd:
++ mov r4,#0
++ mov r3,#0
++ mov rNum2,#1
++ b Go2
++Go_Cmd:
++ mov r4,#0
++Go_Cmd1:
++ mov r3,#0
++Go1:
++ bl cache_clean_invalidate_all
++ .if 0
++ mov rNum2,#0
++ .else
++ mov rNum2,#1
++ .endif
++Go2:
++
++ ldrb r2,[rDBG,#DBG_Mode]
++ and r2,r2,#0xfe
++ orr r2,r2,r4
++ strb r2,[rDBG,#DBG_Mode] //mark gdb mode
++
++ tst rValidCnt,#F_NUM1_MASK
++ strne rNum1,[rDBG,#DBG_PC] //return pc
++ ldreq rNum1,[rDBG,#DBG_PC] //return pc
++ orr r0,rNum1,#1
++ CP15_IBCR0 mrc,rBCR0
++ CP15_IBCR1 mrc,rBCR1
++ cmp r0,rBCR0
++ ldr r7,[rDBG,#DBG_CPSR]
++ mov r2,rBCR0 //save temporary
++ moveq rBCR0,#0
++ cmp r0,rBCR1
++ moveq rBCR1,#0
++
++ cmpne r0,r2
++ streq r0,[rDBG,#DBG_TRACE] //this is the current instruction breakpoint value
++ beq 4f //br if a bkpt matches current instruction
++ cmp r3,#0
++ str r3,[rDBG,#DBG_TRACE] //-1 : Trace, 0 : Go
++ beq 6f
++
++
++4: bl CalcNextPc //IN: rNum1: current PC, r7- cpsr; OUT: rNum1: next PC
++ tst r0,#1
++ bne Invalid
++ orr r1,r0,#1
++
++ tst rBCR0,#1
++ moveq rBCR0,r1
++ beq 5f
++ tst rBCR1,#1
++ moveq rBCR1,r1
++ strne rBCR0,[rDBG,#DBG_TRACE] //need to steal this breakpoint momentarily
++ movne rBCR0,r1
++5:
++ CP15_IBCR0 mcr,rBCR0
++ CP15_IBCR1 mcr,rBCR1
++
++6:
++ ldrb r0,[rDBG,#DBG_FFUART_LCR]
++ str r0,[rUart,#UART_LCR] //restore value
++ add r0,rDBG,#DBG_R2
++
++ bl ClearStickyAbort
++ BigMov r1,UART_BASE //physical address
++ movs rNum2,rNum2,LSR #1 //carry flag 1 : don't invalidate cache
++ teq r1,rUart //this lets me know if identity mapping is used, or MMU is off, C & V are not affected by instruction
++
++ ldmia r0,{r2,r3,r4,r5,r6,r7,r8,r9,sl,fp,ip,sp,lr}
++//z-0 return indirect, setup stack to contain real return address
++ ldrne r1,[r0,#DBG_PC-DBG_R2]
++ strne r1,[sp,#-4]!
++
++ ldr r1,[r0,#DBG_HCPSR-DBG_R2]
++ orr r1,r1,#0xc0 //set I, F
++ msr cpsr_c,r1
++// ldr r1,[r0,#DBG_CPSR-DBG_R2] //don't allow changing return mode for now... to messy
++// msr spsr,r1
++ CP15_CF_DRAIN mcr,r1 //make sure data cache write buffers are drained
++ b InvalidateAndReturn //z-1 return direct, z-0 return indirect
++
++
++
++ClearStickyAbort:
++ CP14_DCSR mrc,r1
++ tst r1,#1<<5
++ bic r1,r1,#1<<5 //clear sticky abort bit
++ CP14_DCSR mcrne,r1
++ mov pc,lr
++TT_Cmd:
++ mov r4,#0
++ mvn r3,#0
++ mov rNum2,#1
++ b Go2
++
++Trace_Cmd:
++ mov r4,#0
++Trace_Cmd1:
++ mvn r3,#0
++ b Go1
++
++
++//IN: rNum1: current PC, r7- cpsr
++//OUT: r0: next PC
++//trashed: r1,r2,r3,r4,r6
++CalcNextPc:
++ mov r4,lr
++ bl ClearStickyAbort
++ ldr r2,[rNum1]
++ add r0,rNum1,#4
++ nop //let abort have time to signal
++ bl ClearStickyAbort
++ movne pc,r4
++//1st check to see if condition codes allow instruction to execute
++1:
++ mov r3,r2,LSR #28
++ msr CPSR_f,r7
++ add pc,pc,r3,LSL #3
++ nop
++ beq 2f //0-eq
++ mov pc,r4
++ bne 2f //1-ne
++ mov pc,r4
++ bcs 2f //2-cs
++ mov pc,r4
++ bcc 2f //3-cc
++ mov pc,r4
++ bmi 2f //4-mi
++ mov pc,r4
++ bpl 2f //5-pl
++ mov pc,r4
++ bvs 2f //6-vs
++ mov pc,r4
++ bvc 2f //7-vc
++ mov pc,r4
++ bhi 2f //8-hi
++ mov pc,r4
++ bls 2f //9-ls
++ mov pc,r4
++ bge 2f //a-ge
++ mov pc,r4
++ blt 2f //b-lt
++ mov pc,r4
++ bgt 2f //c-gt
++ mov pc,r4
++ ble 2f //d-le
++ mov pc,r4
++ b 2f //e-al
++ mov pc,r4 //just a spacer instruction, never executed
++ //f-nv
++
++ and r3,r2,#0xfe000000
++ cmp r3,#0xfa000000
++ movne pc,r4
++//BLX instruction changing into thumb mode
++ movs r3,r2,LSL #8 //mov H bit to carry flag
++ orrcs r3,r3,#1<<7
++ add r0,r0,#4
++ add r0,r0,r3,ASR #6
++ mov pc,r4
++
++
++//instruction WILL execute
++2:
++ mov r3,r2,LSR #25
++ and r3,r3,#0x7
++ and r1,r2,#0x0000f000
++ cmp r1, #0x0000f000
++ mov r1,r2,LSL #20
++ mov r1,r1,LSR #20 //r1 gets low 12 bits of r2
++ add pc,pc,r3,LSL #2
++ nop
++ b 10f
++ b 11f
++ b 12f
++ b 13f
++ b 14f
++ b 15f
++ mov pc,r4 //6
++ mov pc,r4 //7
++//nnnn 000n
++10:
++ movne pc,r4
++ and r3,r2,#0x01800000
++ cmp r3, #0x01000000
++ bne 51f
++ and r3,r2,#0x0ff00000
++ cmp r3, #0x01200000
++ andeq r3,r2,#0x000000d0
++ cmpeq r3, #0x00000010
++//B{L} <Rm> instruction -eq
++ andeq r3,r2,#0xf
++#if DBG_R0
++ addeq r0,rDBG,#DBG_R0
++ ldreq r0,[r0,r3,LSL #2]
++#else
++ ldreq r0,[rDBG,r3,LSL #2]
++#endif
++
++ biceq r0,r0,#1
++ mov pc,r4
++
++
++51: tst r2,#1<<4
++ bne 52f
++ add r0,r0,#4 //pc+8
++ bl RegShiftImmed
++ b 50f
++52:
++ tst r2,#1<<7
++ movne pc,r4 //return if LDR|STR<H|D|B|SB|SH>|MUL|MLA...
++//this is a shift by a register value
++ add r0,r0,#4 //pc+8
++ bl RegShiftReg
++ b 50f
++
++//nnnn 001n immediate
++11:
++ movne pc,r4
++ and r3,r2,#0x01800000
++ cmp r3, #0x01000000
++ moveq pc,r4 //return if TST|TEQ|CMP|CMN|MRS|MSR|SMLA.....
++ and r6,r1,#0xff
++ mov r3,r1,LSR #7
++ BIC r3,r3,#1
++ mov r1,r6,ROR r3
++ add r0,r0,#4 //pc+8
++//r1 has 2nd operand
++50:
++ mov r3,r2,LSR #16
++ and r3,r3,#0xf
++ cmp r3,#0xf
++ moveq r6,r0 //pc+8
++#if DBG_R0
++ addne r6,rDBG,#DBG_R0
++ ldrne r6,[r6,r3,LSL #2] //<Rn> - r6
++#else
++ ldrne r6,[rDBG,r3,LSL #2] //<Rn> - r6
++#endif
++
++//r6 has 1st operand
++ mov r3,r2,LSR #21
++ and r3,r3,#0xf
++ msr CPSR_f,r7
++ add pc,pc,r3,LSL #3
++ nop
++ and r0,r6,r1 //0-AND
++ mov pc,r4
++ eor r0,r6,r1 //1-EOR
++ mov pc,r4
++ sub r0,r6,r1 //2-SUB
++ mov pc,r4
++ rsb r0,r6,r1 //3-RSB
++ mov pc,r4
++ add r0,r6,r1 //4-ADD
++ mov pc,r4
++ adc r0,r6,r1 //5-ADC
++ mov pc,r4
++ sbc r0,r6,r1 //6-SBC
++ mov pc,r4
++ rsc r0,r6,r1 //7-RSC
++ mov pc,r4
++ sub r0,r0,#4 //8-TST, cannot get here
++ mov pc,r4
++ sub r0,r0,#4 //9-TEQ, cannot get here
++ mov pc,r4
++ sub r0,r0,#4 //A-CMP, cannot get here
++ mov pc,r4
++ sub r0,r0,#4 //B-CMN, cannot get here
++ mov pc,r4
++ orr r0,r6,r1 //C-ORR
++ mov pc,r4
++ mov r0,r1 //D-MOV
++ mov pc,r4
++ bic r0,r6,r1 //E-BIC
++ mov pc,r4
++ mvn r0,r1 //F-MVN
++ mov pc,r4
++
++//LDR
++12:
++13:
++ tsteq r2,#1<<22 //B bit 22 1 : Byte, 0: Word
++ movne pc,r4
++ tst r2,#1<<20 //L bit 20 1 : LDR, 0:STR
++ moveq pc,r4
++
++ add r0,r0,#4 //pc+8
++ tst r2,#1<<24 //P bit
++ moveq r1,#0
++ beq 34f
++ tst r2,#1<<25
++ beq 34f //branch if immediate12bits value is in r1
++ bl RegShiftImmed
++34:
++ mov r3,r2,LSR #16
++ and r3,r3,#0xf
++ cmp r3,#0xf
++ moveq r6,r0 //pc+8
++#if DBG_R0
++ addne r6,rDBG,#DBG_R0
++ ldrne r6,[r6,r3,LSL #2] //<Rn> - r6
++#else
++ ldrne r6,[rDBG,r3,LSL #2] //<Rn> - r6
++#endif
++
++ tst r2,#1<<23 //U bit Up/Down, Add/Sub
++ addne r6,r6,r1
++ subeq r6,r6,r1
++ ldr r0,[r6]
++ mov pc,r4
++
++
++//LDM
++14:
++ and r3,r2,#(1<<15)+(1<<20)
++ cmp r3, #(1<<15)+(1<<20)
++ movne pc,r4
++
++//LDM to PC -eq
++ add r0,r0,#4 //pc+8
++ mov r3,r2,LSR #16
++ and r3,r3,#0xf
++ cmp r3,#0xf
++ moveq r1,r0 //pc+8, should never execute
++#if DBG_R0
++ addne r1,rDBG,#DBG_R0
++ ldrne r1,[r1,r3,LSL #2] //<Rn> - r1
++#else
++ ldrne r1,[rDBG,r3,LSL #2] //<Rn> - r1
++#endif
++
++//r1 is already correct address for downward from base (U==0), included(P==0)
++ tst r2,#1<<23 //U bit
++ beq 4f
++ mov r6,r2,LSL #16
++3: movs r6,r6,LSL #1
++ addcs r1,r1,#4
++ bne 3b
++ eor r2,r2,#1<<24
++4: tst r2,#1<<24 //P bit
++ subne r1,r1,#4
++ ldr r0,[r1]
++ mov pc,r4
++
++//B{L} instruction
++15:
++ mov r3,r2,LSL #8
++ add r0,r0,#4
++ add r0,r0,r3,ASR #6
++ mov pc,r4
++
++//IN: r0 - pc+4, r2 instruction, r1 low 12 bits of instruction
++//OUT: r1 - shifted value, r2 - unchanged, r0 - pc+8
++RegShiftImmed:
++ mov r1,r1,LSR #7 //Shift_imm - r1
++ and r3,r2,#0xf
++ cmp r3,#0xf
++ moveq r6,r0 //pc+8
++#if DBG_R0
++ addne r6,rDBG,#DBG_R0
++ ldrne r6,[r6,r3,LSL #2] //<Rm> - r6
++#else
++ ldrne r6,[rDBG,r3,LSL #2] //<Rm> - r6
++#endif
++
++ tst r2,#1<<6
++ bne 32f
++ tst r2,#1<<5
++ bne 31f
++ mov r1,r6,LSL r1 //<Rm> shf Shift_imm - r1
++ mov pc,lr
++
++31: cmp r1,#0
++ movne r1,r6,LSR r1
++ mov pc,lr
++
++32: tst r2,#1<<5
++ bne 33f
++ cmp r1,#0
++ moveq r1,#32
++ mov r1,r6,ASR r1
++ mov pc,lr
++
++33: cmp r1,#0
++ movne r1,r6,ROR r1
++ movne pc,lr
++
++ msr CPSR_f,r7
++ mov r1,r6, RRX
++ mov pc,lr
++
++
++//IN: r2 instruction, r1 low 12 bits of instruction
++//OUT: r1 - shifted value, r2 - unchanged, r0 - pc+8
++RegShiftReg:
++ mov r3,r1,LSR #8
++ cmp r3,#0xf
++ moveq r1,r0 //pc+8
++#if DBG_R0
++ addne r1,rDBG,#DBG_R0
++ ldrne r1,[r1,r3,LSL #2] //<Rs> - r1
++#else
++ ldrne r1,[rDBG,r3,LSL #2] //<Rs> - r1
++#endif
++
++ and r3,r2,#0xf
++ cmp r3,#0xf
++ moveq r6,r0 //pc+8
++#if DBG_R0
++ addne r6,rDBG,#DBG_R0
++ ldrne r6,[r6,r3,LSL #2] //<Rm> - r6
++#else
++ ldrne r6,[rDBG,r3,LSL #2] //<Rm> - r6
++#endif
++ tst r2,#1<<6
++ bne 32f
++ tst r2,#1<<5
++ moveq r1,r6,LSL r1 //<Rm> shf <Rs> - r1
++ movne r1,r6,LSR r1
++ mov pc,lr
++
++32: tst r2,#1<<5
++ moveq r1,r6,ASR r1
++ movne r1,r6,ROR r1
++ mov pc,lr
++
++
++
++//IN: r0 - register name
++//OUT: r0 - location
++GetSymbolNumber:
++ BigMov r1,C2(R,0)
++ sub r2,r0,r1
++ cmp r2,#10
++ bcc 1f
++
++ BigMov r1,C3(R,1,0)
++ sub r2,r0,r1
++ cmp r2,#6
++ bcc 2f
++
++ BigMov r1,C3(F,P,0)
++ cmp r1,r0
++ moveq r2,#SYM_FP0
++ beq 1f
++
++ BigMov r1,C2(S,L)
++ cmp r1,r0
++ moveq r2,#SYM_SL
++ beq 1f
++
++ BigMov r1,C2(F,P)
++ cmp r1,r0
++ moveq r2,#SYM_FP
++ beq 1f
++
++ BigEor2 r1,C2(F,P)^C2(I,P)
++ cmp r1,r0
++ moveq r2,#SYM_IP
++ beq 1f
++
++ BigEor2 r1,C2(I,P)^C2(S,P)
++ cmp r1,r0
++ moveq r2,#SYM_SP
++ beq 1f
++
++ BigMov r1,C2(L,R)
++ cmp r1,r0
++ moveq r2,#SYM_LR
++ beq 1f
++
++ BigMov r1,C2(P,C)
++ cmp r1,r0
++ moveq r2,#SYM_PC
++ beq 1f
++
++ BigMov r1,C4(C,P,S,R)
++ cmp r1,r0
++ moveq r2,#SYM_CPSR
++ beq 1f
++
++ BigMov r1,C3(F,S,R)
++ cmp r1,r0
++ moveq r2,#SYM_FSR
++ beq 1f
++
++ BigMov r1,C3(F,A,R)
++ cmp r1,r0
++ moveq r2,#SYM_FAR
++ beq 1f
++
++ BigMov r1,C4(D,C,S,R)
++ cmp r1,r0
++ moveq r2,#SYM_DCSR
++ beq 1f
++
++ BigMov r1,C4(T,T,B,R)
++ cmp r1,r0
++ moveq r2,#SYM_TTBR
++ beq 1f
++
++ BigMov r1,C4(C,T,R,L)
++ cmp r1,r0
++ moveq r2,#SYM_CTRL
++ beq 1f
++
++// BigMov r1,C3(F,P,S)
++// cmp r1,r0
++// moveq r2,#SYM_FPS-SYM_F0
++ movne pc,lr
++
++
++//3: add r2,r2,#SYM_F0-SYM_SL
++2: add r2,r2,#SYM_SL
++1: BigMov r0,DEBUG_SYM
++ add r0,r0,r2
++ subs r2,r2,r2
++ mov pc,lr
++
++
++
++//IN: r0 - symbol address or number to print
++PrintHexOrSymbol:
++ BigAdd r1,r0,-DEBUG_SYM
++ cmp r1,#SYM_LAST+1
++ bcs PrintHex
++ mov r0,#0
++
++//IN: r1 register #, r0 {31:16}- 2 characters to print after
++PrintRegName:
++ cmp r1,#SYM_SL
++ bcs 1f
++ add r0,r0,r1,LSL #8
++ add r0,r0,#L2(NULL,0)
++// cmp r1,#10
++// subge r0,r0,#10<<8
++// movge r0,r0,LSL #8
++// addge r0,r0,#L2(NULL,1)
++ add r0,r0,#L1(R)
++20: b Transmit1
++1: BigOrr2Eq r0,L2(S,L)
++ cmp r1,#SYM_FP
++ BigOrr2Eq r0,L2(F,P)
++ cmp r1,#SYM_IP
++ BigOrr2Eq r0,L2(I,P)
++ cmp r1,#SYM_SP
++ BigOrr2Eq r0,L2(S,P)
++ cmp r1,#SYM_LR
++ BigOrr2Eq r0,L2(L,R)
++ cmp r1,#SYM_PC
++ BigOrr2Eq r0,L2(P,C)
++ ble 20b
++ cmp r1,#SYM_FP0
++
++ mov r0,r0,LSL #8
++ BigOrr2Eq r0,L3(F,P,0)
++ cmp r1,#SYM_FSR
++ BigOrr2Eq r0,L3(F,S,R)
++ cmp r1,#SYM_FAR
++ BigOrr2Eq r0,L3(F,A,R)
++
++ cmp r1,#SYM_CPSR
++ BigMovEq r0,L4(C,P,S,R)
++ cmp r1,#SYM_DCSR
++ BigMovEq r0,L4(D,C,S,R)
++ cmp r1,#SYM_TTBR
++ BigMovEq r0,L4(T,T,B,R)
++ cmp r1,#SYM_CTRL
++ BigMovEq r0,L4(C,T,R,L)
++ b Transmit1
++
++
++//r2 - symbol #
++PrintRegVal:
++ mov r6,lr
++ bl GetRegVal
++ cmp r2,#SYM_FP0
++ bne 1f
++ mov r5,r0
++ mov r0,r1
++ bl PrintHexByte //40 bits
++ mov r0,r5
++1: mov lr,r6
++ b PrintHex
++
++
++
++
++
++//r2 - symbol #, r1:r0 - value
++StoreRegVal:
++ cmp r2,#SYM_FP0
++ bcs 1f
++#if DBG_R0
++ add r1,rDBG,#DBG_R0
++ str r0,[r1,r2,LSL #2]
++#else
++ str r0,[rDBG,r2,LSL #2]
++#endif
++ mov pc,lr
++1:
++ bne 2f
++//MAR{<cond>} acc0,<RdLo>,<RdHi>
++ mar acc0,r0,r1
++ mov pc,lr
++2: cmp r2,#SYM_FSR
++ CP15_FSR mcreq,r0
++ cmp r2,#SYM_FAR
++ CP15_FAR mcreq,r0
++ cmp r2,#SYM_DCSR
++ CP14_DCSR mcreq,r0
++ cmp r2,#SYM_TTBR
++ CP15_TTBR mcreq,r0
++ cmp r2,#SYM_CTRL
++ CP15_CONTROL mcreq,r0
++ mov pc,lr
++
++R_Cmd:
++ mov r7,#0
++1: mov r1,r7
++ BigMov r0,L4(NULL,NULL,COLON,SPACE)
++ bl PrintRegName
++ bl TransmitSPACE
++ mov r2,r7
++ bl PrintRegVal
++ bl TransmitSPACE
++ bl TransmitSPACE
++ add r7,r7,#1
++ tst r7,#3
++ bleq TransmitCRLF
++ cmp r7,#SYM_LAST_RCMD+1
++ bne 1b
++ b Prompt
++BS_Cmd:
++ tst rValidCnt,#F_NUM1_MASK
++ beq BE_Cmd
++ tst rSymbol,#F_NUM1_MASK
++ mov r0,rNum1
++ blne GetSymValue
++ mov rNum1,r0
++ bl BS_Do
++ beq Prompt
++ b BE_Cmd
++
++//out: z-1 breakpoint just set
++// z-0 if r0==rNum1, breakpoint was already set
++BS_Do:
++ CP15_IBCR0 mrc,r0
++ CP15_IBCR1 mrc,r1
++ orr rNum1,rNum1,#1
++ cmp r0,rNum1
++ cmpne r1,rNum1
++ beq 2f
++ tst r0,#1
++ CP15_IBCR0 mcreq,rNum1
++ moveq pc,lr
++ tst r1,#1
++ CP15_IBCR1 mcreq,rNum1
++ mov pc,lr
++
++2: mov r0,rNum1
++ movs r1,#1
++ mov pc,lr
++
++BC_Cmd:
++ tst rValidCnt,#F_NUM1_MASK
++ beq BE_Cmd
++ tst rSymbol,#F_NUM1_MASK
++ mov r0,rNum1
++ blne GetSymValue
++ mov rNum1,r0
++ bl BC_Do
++ beq Prompt
++ b BE_Cmd
++
++//out: z-1 breakpoint just cleared
++BC_Do:
++ CP15_IBCR0 mrc,r0
++ CP15_IBCR1 mrc,r1
++ orr rNum1,rNum1,#1
++ mov r2,#0
++ cmp r0,rNum1
++ CP15_IBCR0 mcreq,r2
++ cmp r1,rNum1
++ CP15_IBCR1 mcreq,r2
++ cmpne r0,rNum1
++ mov pc,lr
++
++BE_Cmd:
++ BigMov r0,L4(B,K,P,T)
++ bl Transmit1
++ bl TransmitSPACE
++ BigMov r0,L4(S,t,a,t)
++ bl Transmit1
++ BigMov r0,L4(u,s,COLON,SPACE)
++ bl Transmit1
++ CP15_IBCR0 mrc,r0
++ tst r0,#1
++ bic r0,r0,#1
++ blne PrintHex
++ bl TransmitSPACE
++
++ CP15_IBCR1 mrc,r0
++ tst r0,#1
++ bic r0,r0,#1
++ blne PrintHex
++ b Prompt
++
++WatchStatus:
++ BigMov r0,L4(W,A,T,C)
++ bl Transmit1
++ BigMov r0,L2(H,SPACE)
++ bl Transmit1
++ BigMov r0,L4(S,t,a,t)
++ bl Transmit1
++ BigMov r0,L4(u,s,COLON,SPACE)
++ bl Transmit1
++ CP15_DBCON mrc,r5
++ tst r5,#0x0f
++ beq 10f
++ tst r5,#0x03
++ bne 1f
++ tst r5,#0x100
++ bne 10f //br if dbr1 is mask (nothing being watched)
++ b 4f
++1:
++ CP15_DBR0 mrc,r0
++ bl PrintHex
++ bl 20f
++ tst r5,#0x100
++ beq 3f
++ BigMov r0,L2(M,COLON)
++ bl Transmit1
++ CP15_DBR1 mrc,r0 //read mask
++ bl PrintHex
++ b 10f
++3:
++ tst r5,#3<<2
++ beq 10f
++4:
++ CP15_DBR1 mrc,r0
++ bl PrintHex
++ mov r5,r5,LSR #2
++ bl 20f
++10: b Prompt
++
++
++20:
++ BigMov r0,L4(SPACE,R,W,SPACE)
++ tst r5,#1
++ beq 21f
++ tst r5,#2
++ BigEor2Eq r0,L4(SPACE,R,W,SPACE)^L4(SPACE,SPACE,W,SPACE) //store only
++ BigEor2Ne r0,L4(SPACE,R,W,SPACE)^L4(SPACE,R,SPACE,SPACE) //load only
++21:
++ b Transmit1
++
++WC_Cmd:
++ mov r0,#0
++ CP15_DBCON mcr,r0
++ b Prompt
++WRW_Cmd:
++ mov r4,#2
++ b WW_JOIN
++WR_Cmd:
++ mov r4,#3
++ b WW_JOIN
++WW_Cmd:
++ mov r4,#1
++WW_JOIN:
++ tst rValidCnt,#F_NUM1_MASK
++ beq WatchStatus
++ tst rSymbol,#F_NUM1_MASK
++ mov r0,rNum1
++ blne GetSymValue
++ mov rNum1,r0
++
++ tst rValidCnt,#F_NUM2_MASK
++ beq 3f
++ tst rSymbol,#F_NUM2_MASK
++ mov r0,rNum2
++ blne GetSymValue
++ mov rNum2,r0
++ orr r4,r4,#0x100 //mask
++1:
++ mov r0,#0
++ CP15_DBCON mcr,r0
++ CP15_DBR0 mcr,rNum1
++ CP15_DBR1 mcr,rNum2
++2:
++ CP15_DBCON mcr,r4
++ b Prompt
++3:
++ CP15_DBCON mrc,r5
++ mov rNum2,#0
++ tst r5,#0x100
++ bne 1b //br if mask was used previously
++ tst r5,#0x0f
++ beq 1b
++ mov r0,#0
++ CP15_DBCON mcr,r0
++ tst r5,#3
++ orreq r4,r5,r4
++ bicne r5,r5,#3<<2
++ orrne r4,r5,r4,LSL #2
++ CP15_DBR0 mcreq,rNum1
++ CP15_DBR1 mcrne,rNum1
++ b 2b
++
++
++//IN: rNum2 address
++//OUT: r1:r0 val
++GetSymValue:
++ BigAdd r2,rNum2,-DEBUG_SYM
++ cmp r2,#SYM_LAST+1
++ bcc GetRegVal
++ mov r0,rNum2
++ mov r1,#0
++ mov pc,lr
++//IN: rPrevNum1 address or symbol
++//OUT: r1:r0 val
++GetValue:
++ BigAdd r2,rPrevNum1,-DEBUG_SYM
++ cmp r2,#SYM_LAST+1
++ bcc GetRegVal
++ ldr r0,[rPrevNum1]
++ mov r1,#0
++ mov pc,lr
++
++
++//IN: rNum1 address
++PrintLocationOrRegVal:
++ BigAdd r2,rNum1,-DEBUG_SYM
++ cmp r2,#SYM_LAST+1
++ bcc PrintRegVal
++ tst r5,#3
++ tsteq rNum1,#3
++ bne 1f
++ ldr r0,[rNum1]
++ b PrintHex
++1: ldrb r0,[rNum1]
++ b PrintHexByte
++
++//IN: rPrevNum1 address, r1:r0 - value
++StoreLocationOrReg:
++ BigAdd r2,rPrevNum1,-DEBUG_SYM
++ cmp r2,#SYM_LAST+1
++ bcc StoreRegVal
++ tst r5,#3
++ tsteq rPrevNum1,#3
++ bne 1f
++ str r0,[rPrevNum1]
++ mov pc,lr
++1: strb r0,[rPrevNum1]
++ mov pc,lr
++
++GetChangeAmount:
++ BigAdd r0,rPrevNum1,-DEBUG_SYM
++ cmp r0,#SYM_LAST+1
++ movcs r0,#4
++ movcc r0,#1
++ tst r5,#3
++// tsteq rPrevNum1,#3
++ movne r0,#1
++ mov pc,lr
++
++Examine_Cmd:
++ tst rValidCnt,#F_NUM1_MASK
++ moveq rNum1,rPrevNum1
++ movne rPrevNum1,rNum1
++ mov r5,rNum1
++ tst rValidCnt,#F_NUM2_MASK
++ bne 12f
++1: mov r0,rNum1
++ bl PrintHexOrSymbol
++ mov r0,#L1(FSLASH)
++ bl Transmit
++
++ bl PrintLocationOrRegVal
++
++ bl TransmitSPACE
++ mov rFieldStart,#1<<(F_INC+F_INC+F_INC+F_INC) //blank before num2 field
++ str r5,[rDBG,#DBG_TEMP]
++ bl ReadCommand
++ ldr r5,[rDBG,#DBG_TEMP]
++ mov r3,r0 //save exit character
++ mov r0,rNum2
++ mov r1,#0
++ tst rSymbol,#F_NUM2_MASK
++ beq 20f
++ blne GetSymbolNumber
++ bne Invalid
++ mov rNum2,r0
++ bl GetSymValue
++
++20:
++ cmp r3,#L1(PLUS)
++ cmpne r3,#L1(MINUS)
++ cmpne r3,#L1(AT_SIGN)
++ beq 2f
++ tst rValidCnt,#F_NUM2_MASK
++ beq Prompt
++ bl StoreLocationOrReg
++ mov r3,#L1(PLUS)
++ b 3f
++
++2: mov r0,r3
++ bl Transmit
++3: bl TransmitCRLF
++ bl GetChangeAmount
++ cmp r3,#L1(AT_SIGN)
++ beq 5f
++ cmp r3,#L1(PLUS)
++ addeq rPrevNum1,rPrevNum1,r0
++ subne rPrevNum1,rPrevNum1,r0
++4: mov rNum1,rPrevNum1
++ b 1b
++
++5: bl GetValue
++ mov rPrevNum1,r0
++ mov r5,r0
++ b 4b
++
++11: sub r0,rNum1,r5
++ cmp r0,#0x1000
++ bhs Prompt //no more than 128 lines per examine command
++ bl TransmitCRLF
++12: mov r0,rNum1
++ bl PrintHexOrSymbol
++ mov r0,#L1(FSLASH)
++ bl Transmit
++13:
++ bl GetChangeAmount
++ bcc 14f
++ add r0,rNum1,#3
++ cmp r0,rNum2
++ bhi 16f
++ tst r5,#3
++ tsteq rNum1,#3
++ bne 16f
++14: bl PrintLocationOrRegVal
++ bl GetChangeAmount
++15: add rNum1,rNum1,r0
++ cmp rNum1,rNum2
++ bhi Prompt
++ tst rNum1,#0x1f
++ beq 11b
++ bl TransmitSPACE
++ tst rNum1,#0x0f
++ bleq TransmitSPACE
++ b 13b
++16:
++ ldrb r0,[rNum1]
++ bl PrintHexByte
++ mov r0,#1
++ b 15b
++
++Deposit_Cmd:
++ tst rValidCnt,#F_NUM1_MASK
++ beq Invalid
++ tst rValidCnt,#F_NUM2_MASK
++ beq Invalid
++ mov r0,rNum2
++ mov r1,#0
++ tst rSymbol,#F_NUM2_MASK
++ blne GetSymValue
++ mov rPrevNum1,rNum1
++ bl StoreLocationOrReg
++ b Prompt
++
++
++Download_Cmd:
++ tst rValidCnt,#F_NUM1_MASK
++ beq Invalid
++ tst rNum1,#3
++ bne Invalid
++ cmp rNum1,#MEM_START
++ bcc Invalid //br if rNum1 is below ram start,
++ //NOTE: arm sets the carry to the opposite of most processors on subtract, compare
++
++ mov rDest,rNum1
++ mov rDestHead,rNum1
++ mov rPrevNum1,rNum1
++ mov rPrevCRC,#0
++ mov rRunningCRC,#0
++ mov rNak,#L1(C) //current NAK character
++ mov rBlockNum,#1 //block # to receive
++
++#if DDEBUG
++ b 47f
++91:
++ cmp rBlockNum,#1
++ beq 47f
++ mov r2,#L1(1)
++ b 45f
++92:
++ mov r2,#L1(2)
++ b 45f
++93:
++ mov r2,#L1(3)
++ b 45f
++94:
++ mov r2,#L1(4)
++ b 45f
++95:
++ mov r2,#L1(5)
++45:
++ BigMov r0,L3(CAN,CAN,CAN) //abort
++ bl Transmit1
++46: bl Receive
++ bne 46b //branch until timeout
++ mov r0,r2
++ bl Transmit
++ b Invalid
++#else
++91:
++92:
++93:
++94:
++95:
++#endif
++
++47:
++
++ mov r0,rNak
++15:
++ bl Transmit
++2: bl Receive
++ beq 91b //branch on timeout
++
++ mov rPacketLength,#128-1
++ cmp r0,#SOH
++ addne rPacketLength,rPacketLength,#1024-1-(128-1)
++ cmpne r0,#STX
++ beq 3f
++ cmp r0,#CAN
++ bne 16f
++ bl Receive
++ cmp r0,#CAN
++ bne 10f
++ b Invalid
++16: cmp r0,#EOT
++ bne 10f
++ mov r0,#ACK
++ bl Transmit
++
++#if DDEBUG
++ mov rDestHead,rDest
++ mov r0,rDest
++ bl PrintHex
++ bl TransmitSPACE
++ mov r0,rBlockNum
++ bl PrintHex
++
++ bl TransmitSPACE
++ mov r0,rRunningCRC
++ bl PrintHex
++ mov rDest,rDestHead
++#endif
++
++// now verify that ram is STILL valid by recomputing the CRC
++ mov rCRC,#0
++ mov r1,rPrevNum1
++ b 83f
++82:
++ ldrb r0,[r1],#1
++//
++ eor r0,rCRC,r0,LSL #24
++ eor r0,r0,r0,LSR #4 //c is in high byte of r0
++ and r0,r0,#0xff000000
++
++ mov rCRC,rCRC,LSL #8
++ eor rCRC,rCRC,r0,LSL #4
++ orr rCRC,rCRC,r0,LSR #8
++
++ eor rCRC,rCRC,r0,LSR #3
++//
++83: cmp r1,rDest
++ bne 82b
++#if DDEBUG
++ bl TransmitSPACE
++ mov r0,rCRC
++ bl PrintHex
++#endif
++
++ cmp rCRC,rRunningCRC
++ bne 84f
++ BigMov r0,L3(O,K,SPACE)
++ bl Transmit1
++ mov r0,rPrevNum1
++ mov rDestHead,rDest
++ bl PrintHex
++ mov r0,#L1(MINUS)
++ bl Transmit
++ mov r0,rDestHead
++ bl PrintHex
++ b Prompt
++84:
++ BigMov r0,L4(E,R,R,O)
++ bl Transmit1
++ mov r0,#L1(R)
++ bl Transmit
++ b Prompt
++
++3: bl Receive
++ beq 92b
++ mov r2,r0
++ bl Receive
++ beq 93b
++ eor r0,r0,#0xff
++ cmp r0,r2 //check 1's complement blk #
++ bne 10f
++ cmp r2,rBlockNum //check blk #
++ bne 20f
++80:
++ mov rDestHead,rDest //rDestHead - start of buffer, rDest end of buffer
++ mov rPrevCRC,rRunningCRC
++ mov rCRC,#0 //crc
++
++//alternative CRC calculation routines
++ .if 0
++ BigMov r2,CRC_POLY
++4: bl Receive
++ beq 8f //branch on timeout
++ eor rCRC,rCRC,r0,LSL #24
++ mov r1,#8
++5:
++ movs rCRC,rCRC,LSL #1
++ eorcs rCRC,rCRC,r2
++ subs r1,r1,#1
++ bne 5b
++ strb r0,[rDest],#1
++ subs rPacketLength,rPacketLength,#1
++ bge 4b
++ mov rCRC,rCRC,LSR #16 //CRC was only in the high half
++
++ .endif
++
++
++
++ .if 1
++4: bl Receive
++ beq 8f //branch on timeout
++//
++//calculate CRC
++//unsigned int crc = 0;
++//unsigned int c = 0;
++//for (i=3; i<max; i++)
++//{
++// c = crc ^ (buf[i]<<24);
++// c ^= (c >> 4);
++// c &= 0xff000000;
++// crc = (((crc<<8) ^ (c << 4)) | (c>>8)) ^ (c >> 3);
++//}
++//crc >>= 16;
++//
++ eor r1,rCRC,r0,LSL #24
++ eor r1,r1,r1,LSR #4
++ and r1,r1,#0xff000000
++
++ mov rCRC,rCRC,LSL #8
++ eor rCRC,rCRC,r1,LSL #4
++ orr rCRC,rCRC,r1,LSR #8
++ eor rCRC,rCRC,r1,LSR #3
++
++//also save a running total CRC to use to verify RAM after download is complete
++//
++ eor r1,rRunningCRC,r0,LSL #24
++ eor r1,r1,r1,LSR #4 //c is in high byte of r1
++ and r1,r1,#0xff000000
++
++ mov rRunningCRC,rRunningCRC,LSL #8
++ eor rRunningCRC,rRunningCRC,r1,LSL #4
++ orr rRunningCRC,rRunningCRC,r1,LSR #8
++
++ eor rRunningCRC,rRunningCRC,r1,LSR #3
++//
++#if LITTLE_ENDIAN
++ mov r0,r0,LSL #24
++ orr r2,r0,r2,LSR #8 //this assumes a little endian memory system
++#else
++ orr r2,r0,r2,LSL #8 //this assumes a big endian memory system
++#endif
++
++ tst rPacketLength,#3
++ streq r2,[rDest],#4
++ subs rPacketLength,rPacketLength,#1
++ bge 4b
++ mov rCRC,rCRC,LSR #16 //CRC was only in the high half
++ .endif
++
++
++
++
++ bl Receive
++ beq 8f //branch on timeout
++ mov r2,r0
++ bl Receive
++ beq 8f //branch on timeout
++ add r2,r0,r2,LSL #8
++ cmp rCRC,r2
++ bne 9f //branch on crc mismatch
++//packet is good
++ add rBlockNum,rBlockNum,#1
++ and rBlockNum,rBlockNum,#0xff
++ mov rNak,#NAK
++ mov r0,#ACK
++ b 15b
++20:
++ sub r1,rBlockNum,#1
++ and r1,r1,#0xff
++ cmp r1,r2
++ bne 21f //br if not trying to transmit the packet I just ACKed
++ mov rDest,rDestHead //reset pointer to previous packet
++ mov rRunningCRC,rPrevCRC
++ mov rBlockNum,r1 //correct blk #
++ b 80b
++
++21: BigMov r0,L3(CAN,CAN,CAN) //abort code
++ bl Transmit1
++48: bl Receive
++ bne 48b //branch until timeout
++
++#if DDEBUG
++ mov r0,r2
++ bl PrintHex
++ bl TransmitSPACE
++ mov r0,rBlockNum
++ bl PrintHex
++#endif
++
++ b Invalid //give up
++
++
++8: mov rDest,rDestHead //reset register
++ mov rRunningCRC,rPrevCRC
++ b 94b //send NAK
++9:
++#if DDEBUG //debug code
++ BigMov r0,L3(CAN,CAN,CAN) //abort code
++ bl Transmit1
++44: bl Receive
++ bne 44b //branch until timeout
++ mov r0,r2
++ bl PrintHex
++ bl TransmitSPACE
++ mov r0,rCRC
++ bl PrintHex
++ b Invalid
++#endif
++
++ mov rDest,rDestHead
++ mov rRunningCRC,rPrevCRC
++
++
++10: bl Receive
++ bne 10b //branch until timeout
++ b 95b //send NAK and wait for packet
++
++
++
++// *******************************************************************************************
++// *******************************************************************************************
++// *******************************************************************************************
++// *******************************************************************************************
++//Code above this point must fit in 2k mini cache or be burned on flash
++//
++//Code below this point need not be in the 2k mini-instruction cache,
++//it can be temporarily placed in the main instruction cache unlocked
++// *******************************************************************************************
++
++InitializeCont1:
++//pc - 0-0x4000, 0x04000000-0x04004000, 0xa000000-0xffffffff
++ InitIC_Clocks r0,sp
++ InitUART r0,sp,FFUART_BASE,BAUDRATE
++ InitUART r0,sp,BTUART_BASE,BAUDRATE
++ InitUART r0,sp,STUART_BASE,9600
++ InitChangeCPUSpeed r0
++ InitMemory r0,sp,r1
++ BigMov r1,MACH_TYPE_SCANPASS
++ SaveRegisters r0,sp
++// *******************************************************
++ InitMMU r0
++ InitPWR r0,r1,sp //out: r1 RCSR
++InitializeCont2:
++ cmp pc,#MEM_START
++ bhs 89f //if in ram, must be mdebug
++ bic sp,pc,#FLASH_BASE_ADDRESS
++ cmp sp,#0x4000
++ mov r2,#FUNC_REQ_GL
++ bhs 87f //br if not part of reset vector
++ tst r1,#RCSR_SLEEP_RESET
++ beq 89f //; Not sleep.
++ mov r2,#FUNC_REQ_WAKEUP
++87: adr r7,88f
++ adr lr,89f
++ mov r10,r1 //RCSR
++ b TryRoutine1
++88: ldmia sp,{rPrevNum1,rUart,rDBG}
++89:
++ mov r2,lr
++ bl CalcMemEnd
++ mov r3,r0
++ mov lr,r2
++// *******************************************************
++//0xnnnn0000 - 16k remapping of flash address 0 for relocated vector table
++//0xnnnn4000 - 16k 16k 1st level descriptors table
++//0xnnnn8000 - 16k 2 x 1k 2nd level descriptor tables
++//0xnnnnc000 - 16k 12k skipped, 4k debug data
++//end of ram
++ BigSub sp,r3,0x8000
++ sub r2,sp,#0x4000
++ mov r1,r2
++ BigMov r0,0x0402 //section descriptor, ap-01, privileged r/w
++ //map virt to phys 1-to-1, non-cache, non-bufferable
++1: str r0,[r2],#4
++ add r0,r0,#1<<20
++ cmp r2,sp
++ bne 1b
++
++
++ add sp,r1,r3,LSR #(20-2)
++ add r1,r1,#((MEM_START>>20)&0xfff)<<2 //microsoft assembler bug propagates the sign bit
++ BigMov r0,(MEM_START&0xfff00000)+0x040A //cacheable (write through)
++2: str r0,[r1],#4
++ cmp r1,sp
++ addne r0,r0,#1<<20
++ bne 2b
++//r0 is physical address of last meg of memory
++ orr r1,r2,#1 //2nd level descriptor address (1k boundary), coarse page table
++
++ .ifdef __ARMASM
++ GBLA TABLE_CNT
++ .endif
++ .if ((DEBUG_START&0xfff00000) - (0xffff0000&0xfff00000))
++ .set TABLE_CNT,2
++ str r1,[r2,#((DEBUG_START>>18)&0x3ffc)-0x4000] //r2 is the end of the 16k table
++ add r1,r1,#0x400
++
++ .else
++ .set TABLE_CNT,1
++ .endif
++
++ str r1,[r2,#-4] //map (0xfff00000) to 2nd level page table
++ //last meg of memory (contains relocated reset vector)
++ add sp,r2,#((256*TABLE_CNT)-16)<<2 //256 - 4byte entries each mapping 4k
++
++//clear out 1 or 2 level 2 page tables
++ mov r1,#0
++3: str r1,[r2],#4
++ cmp r2,sp
++ bne 3b
++
++
++ BigMov r1,0x559 //map to flash in 1 - 64k page
++ add sp,sp,#16<<2
++4: str r1,[r2],#4
++ cmp r2,sp
++ bne 4b
++
++ bic r0,r0,#0x000ff
++ orr r0,r0,#0x0000e //cacheable writeback 4k page
++// orr r0,r0,#0x0000a //cacheable writethru 4k page
++ orr r0,r0,#0x00aa0 //privileged r/w, user read
++ orr r0,r0,#0xff000 //last 4k of ram
++
++ str r0,[r2,#((DEBUG_START>>10)&0x3fc)-(TABLE_CNT*0x400)] //debug variables, r2 is end of 1k tables
++
++ BigMov r0,0xffffffff
++ CP15_DACR mcr,r0
++
++ BigSub r0,r3,0xc000 //MEM_END-0xc000
++ CP15_TTBR mcr,r0
++//enable MMU
++ CP15_TLB_UNLOCK_I mcr,r0
++ CP15_TLB_UNLOCK_D mcr,r0
++ CP15_TLB_INVAL_BOTH mcr,r0
++
++ CP15_CONTROL mrc,r1 //get the control register
++ orr r1,r1,#0x1 //set bit 0 - enable MMU
++ CPWAIT r0
++ CP15_CONTROL mcr,r1 //set the control register
++ CPWAIT r0
++
++//enable the instruction cache
++ CP15_CF_UNLOCK_I mcr,r0
++// CP15_CF_INVAL_I mcr,r0 //I might be running from cache only, don't invalidate
++
++ orr r1,r1,#0x1000 //set bit 12 -- the I bit
++ CP15_CONTROL mcr,r1 //set the control register
++ CPWAIT r0
++
++//enable the data cache
++ CP15_CF_UNLOCK_D mcr,r0
++ CP15_CF_INVAL_D mcr,r0 //this will also drain write buffer
++ CP15_CF_DRAIN mcr,r0 //make sure it is drained just to be very safe
++
++ orr r1,r1,#0x4 //set bit 4 -- the D bit
++ CP15_CONTROL mcr,r1 //set the control register
++ CPWAIT r0
++
++ .if 0
++//if not in halt mode, lock 64k of flash remap in instruction TLB(contains override relocated vector table)
++//halt mode uses the mini cache and physical addresses only for this
++ CP14_DCSR mrc,r0
++ BigMov r1,0xffff0000
++ tst r0,#0x40000000
++//I am currently executing from flash, marked as uncacheable
++ CP15_TLB_LOCK_IENTRY mcreq,r1 //lock 64k if not in halt mode
++ CPWAIT r0
++ .endif
++
++//now lock debug data into data cache
++ BigMov r1,DEBUG_START
++ mov r2,#DEBUG_SPACE>>5 //3 or 4 cache lines to lock
++ CP15_TLB_LOCK_DENTRY mcr,r1
++ mov sp,#1
++ CP15_CF_LOCK_D_CSR mcr,sp //data cache is into lock mode
++ CPWAIT r0
++5: pld [r1]
++ add r1,r1,#32 //lock and load
++ CP15_CF_DRAIN mcr,r0
++ subs r2,r2,#1
++ bne 5b
++
++ mov sp,#0
++ CP15_CF_LOCK_D_CSR mcr,sp //data cache is out of lock mode
++ CPWAIT r0
++
++ BigMov r0,0x3fff
++ CP15_CP_ACCESS mcr,r0 //enable access to all coprocessors
++//now disable MMU, Data Cache
++ .if 1
++ CP15_CONTROL mrc,r1 //get the control register
++ bic r1,r1,#0x5
++ CP15_CONTROL mcr,r1 //set the control register
++ CPWAIT r0
++ .endif
++#if (DO_GPTEST==0)
++// TransMacro L1(U)
++
++#if (PLATFORM_TYPE==BD2003) || (PLATFORM_TYPE==BOUNDARY_OLD_BOARD) || (PLATFORM_TYPE==OLD_GAME_CONTROLLER) || (PLATFORM_TYPE==HALOGEN)
++ sub r0,r3,#0x100000 //last meg-8k for video ram
++ sub r1,r3,#0x2000 //8K from end, last 4k is debug variables
++ str r1,[r1,#FDESC_FDADR] //next frame descriptor address, loop to self
++ str r0,[r1,#FDESC_FSADR] //start of frame
++ str r0,[r1,#FDESC_FIDR] //id of frame, anything I want
++ BigMov r2,SCREEN_WIDTH*SCREEN_HEIGHT*BYTES_PER_PIXEL
++ str r2,[r1,#FDESC_DCMD] //length of dma transfer
++
++#if (BYTES_PER_PIXEL==2)
++ BigMov sp,(BLUE_VAL<<0)+(GREEN_VAL<<5)+(RED_VAL<<11) //rgb value
++ orr sp,sp,sp,LSL #16
++79: str sp,[r0],#4
++ subs r2,r2,#4
++ bne 79b
++#else
++ BigMov r1,(BLUE_VAL<<0)+(GREEN_VAL<<6)+(RED_VAL<<12) //rgb value
++ orr r1,r1,r1,LSL #24
++
++ mov sp,r1,LSR #8
++ orr sp,sp,sp,LSL #24
++
++ mov lr,sp,LSR #8
++ orr lr,lr,lr,LSL #24
++79: stmia r0!,{r1,sp,lr}
++ subs r2,r2,#12
++ bne 79b
++ sub r1,r3,#0x2000 //8K from end, last 4k is debug variables
++#endif
++
++ InitLCD r0,sp,r1 //r1 has descriptor address
++#endif
++
++
++// ****************************
++ mrs r1, CPSR
++ bic r2, r1,#PSR_MODE_MASK
++ orr r0, r2,#PSR_NOINTS_MASK+PSR_MODE_SVC //change to supervisor stack
++ msr CPSR_c, r0
++ BigMov r0,SS_START+SS_SUPERVISOR
++ mov sp, r0
++
++ orr r2, r2, #PSR_NOINTS_MASK+PSR_MODE_IRQ //irq stack
++ msr CPSR_c, r2
++ BigAdd sp, r0, SS_IRQ
++
++ sub r2, r2, #PSR_MODE_IRQ-PSR_MODE_FIQ //fiq stack
++ msr CPSR_c, r2
++ BigAdd sp, r0, SS_IRQ+SS_FIQ
++
++ add r2, r2, #PSR_MODE_SYSTEM-PSR_MODE_FIQ //system(user mode)
++ msr CPSR_c, r2
++ BigAdd sp, r0, SS_IRQ+SS_FIQ+SS_SYSTEM
++
++ sub r2, r2, #PSR_MODE_SYSTEM-PSR_MODE_UNDEF //undefined stack
++ msr CPSR_c, r2
++ BigAdd sp, r0, SS_IRQ+SS_FIQ+SS_SYSTEM+SS_UNDEFINED
++
++ sub r2, r2, #PSR_MODE_UNDEF-PSR_MODE_ABORT //Abort stack
++ msr CPSR_c, r2
++ BigAdd sp, r0, SS_IRQ+SS_FIQ+SS_SYSTEM+SS_UNDEFINED+SS_ABORT
++//
++ msr CPSR_c, r1
++ sub r2, r2, #PSR_MODE_ABORT-PSR_MODE_SVC //supervisor stack
++
++// ****************************
++ CP14_DCSR mrc,sp
++ tst sp,#1<<5 //test sticky abort bit
++ mov sp,r0
++ BigMovEq r0,DEBUG_BASE+DBG_MAGIC
++ BigAddNe r0,r3,(-0x1000+((DEBUG_BASE+DBG_MAGIC)&0xfff)) //don't use virtual address if memory isn't working right
++ sub r0,r0,#DBG_MAGIC
++
++ and r1,r1,#PSR_MODE_MASK
++ mov r3,#0
++ cmp r1,#PSR_MODE_DEBUG
++ BigMov lr,0xa0008000 //default start pc
++ beq SaveDebug //br if a debug exception in halt mode
++ mov r1,#SIG_RESET
++ b SaveR4andUp
++#else
++//#define GPBIT 2
++//#define GPL GPLR1
++#define GPBIT 9
++#define GPL GPLR0
++#define GPMASK (1<<GPBIT)
++GPTest:
++ BigMov rUart,UART_BASE
++ BigMov fp,GPIO_BASE
++ mov r6,#GPMASK
++ str r6,[fp,#GPSR0]
++
++2: bl TransmitCRLF
++ mov r3,#40
++20: mov r2,#0x300000
++
++1: ldr r0,[fp]
++ and r0,r1,#GPMASK
++ cmp r0,r6
++ subnes r2,r2,#1
++ bne 1b //wait for desired state
++
++ mov r1,#L1(0)
++ add r0,r1,r0,LSR #GPBIT
++ bl Transmit
++
++ mov r0,#GPMASK
++ eors r6,r6,#GPMASK //get new desired state
++ streq r0,[fp,#GPCR0]
++ strne r0,[fp,#GPSR0]
++ subs r3,r3,#1
++ bne 20b
++ b 2b
++#endif
++
++
++
++
++ .if 0 //macro tests
++ BigMov r0,-1
++ BigMov r0,-5
++ BigMov r0,0x0ffffff0
++ BigMov r0,1
++ BigMov r0,0xff
++ BigMov r0,0xf000000f
++ BigMov r0,0x80010003
++ .endif
++
++
++TransLineR3:
++ mov r4,#0
++TransLineR4:
++ mov r5,#0
++TransLineR5:
++ mov r6,#0
++TransLineR6:
++ mov r7,#0
++TransLineR7:
++ mov fp,lr
++ mov r0,r2
++ bl Transmit1
++
++ BigEor r0,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(SPACE,SPACE,MINUS,SPACE)
++ bl Transmit1
++
++ mov r0,r3
++ bl Transmit1
++ movs r0,r4
++ blne Transmit1
++ movs r0,r5
++ blne Transmit1
++ movs r0,r6
++ blne Transmit1
++ movs r0,r7
++ blne Transmit1
++ mov lr,fp
++ b TransmitCRLF
++
++Help_Cmd:
++ BigMov rSP,L2(SPACE,SPACE)
++ orr rSP,rSP,rSP,LSL #16
++
++ BigEor r2,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(B,C,SPACE,SPACE) //BC -Breakpoint clear
++ BigEor r3,r2, L4(B,C,SPACE,SPACE)^L4(B,r,e,a)
++ BigMov r4, L4(k,p,o,i)
++ BigEor r5,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(n,t,SPACE,c)
++ BigMov r6, L4(l,e,a,r)
++ bl TransLineR6
++
++ BigEor2 r2,L4(B,C,SPACE,SPACE) ^L4(B,E,SPACE,SPACE) //BE -Breakpoint examine
++ BigEor2 r5,L4(n,t,SPACE,c) ^L4(n,t,SPACE,e)
++ BigMov r6, L4(x,a,m,i)
++ BigMov r7, L2(n,e)
++ bl TransLineR7
++
++ BigEor2 r2,L4(B,E,SPACE,SPACE) ^L4(B,S,SPACE,SPACE) //BS -Breakpoint set
++ BigEor2 r5,L4(n,t,SPACE,e) ^L4(n,t,SPACE,s)
++ BigMov r6, L2(e,t)
++ bl TransLineR6
++
++ BigEor2 r2,L4(B,S,SPACE,SPACE) ^L4(B,U,R,N) //BURN-Write to flash
++ BigMov r3, L4(W,r,i,t)
++ BigEor r4,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(e,SPACE,t,o)
++ BigMov r5, L4(SPACE,f,l,a)
++ BigMov r6, L2(s,h)
++ bl TransLineR6
++
++ BigEor r2,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(E,SPACE,SPACE,SPACE) //E -Examine
++ BigEor r3,r2, L4(E,SPACE,SPACE,SPACE)^L4(E,x,a,m)
++ BigMov r4, L3(i,n,e)
++ bl TransLineR4
++
++ BigEor r2,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(D,SPACE,SPACE,SPACE) //D -Deposit
++ BigEor r3,r2, L4(D,SPACE,SPACE,SPACE)^L4(D,e,p,o)
++ BigMov r4, L3(s,i,t)
++ bl TransLineR4
++
++ BigEor2 r2,L4(D,SPACE,SPACE,SPACE) ^L4(D,L,SPACE,SPACE) //DL -Download
++ BigEor2 r3,L4(D,e,p,o) ^L4(D,o,w,n)
++ BigMov r4, L4(l,o,a,d)
++ bl TransLineR4
++
++ BigEor2 r2,L4(D,L,SPACE,SPACE) ^L4(D,L,W,SPACE) //DLW -Download wireless
++ BigEor r5,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(SPACE,w,i,r)
++ BigMov r6, L4(e,l,e,s)
++ BigMov r7, L1(s)
++ bl TransLineR7
++
++ BigEor r2,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(G,SPACE,SPACE,SPACE) //G -Go
++ BigMov r3, L2(G,o)
++ bl TransLineR3
++
++ BigEor2 r2,L4(G,SPACE,SPACE,SPACE) ^L4(G,L,SPACE,SPACE) //GL -Go Linux
++ BigEor2 r3,L2(G,o) ^L4(G,o,SPACE,L)
++ BigMov r4, L4(i,n,u,x)
++ bl TransLineR4
++
++ BigEor2 r2,L4(G,L,SPACE,SPACE) ^L4(G,G,SPACE,SPACE) //GG -Go no cache clear
++ BigEor2 r3,L4(G,o,SPACE,L) ^L4(G,o,SPACE,n)
++ BigEor r4,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(o,SPACE,c,a)
++ BigEor r5,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(c,h,e,SPACE)
++ BigMov r6, L4(c,l,e,a)
++ BigMov r7, L1(r)
++ bl TransLineR7
++
++ BigEor r2,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(R,SPACE,SPACE,SPACE) //R -Registers
++ BigEor r3,r2, L4(R,SPACE,SPACE,SPACE)^L4(R,e,g,i)
++ BigMov r4, L4(s,t,e,r)
++ BigMov r5, L1(s)
++ bl TransLineR5
++
++ BigMov r2, L4(S,S,I,D) //SSID- Set SSID string
++ BigEor r3,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(S,e,t,SPACE)
++ mov r4,r2
++ BigMov r5, L4(SPACE,s,t,r)
++ BigMov r6, L3(i,n,g)
++ bl TransLineR6
++
++ BigEor r2,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(T,SPACE,SPACE,SPACE) //T -Trace
++ BigEor r3,r2, L4(T,SPACE,SPACE,SPACE)^L4(T,r,a,c)
++ BigMov r4,L1(e)
++ bl TransLineR4
++
++ BigEor2 r2,L4(T,SPACE,SPACE,SPACE) ^L4(T,T,SPACE,SPACE) //TT -Trace
++ BigEor2 r4,L1(e) ^L4(e,SPACE,n,o)
++ BigEor r5,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(SPACE,c,a,c)
++ BigEor r6,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(h,e,SPACE,c)
++ BigMov r7, L4(l,e,a,r)
++ bl TransLineR7
++
++ BigEor r2,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(V,SPACE,SPACE,SPACE) //V -Verify
++ BigEor r3,r2, L4(V,SPACE,SPACE,SPACE)^L4(V,e,r,i)
++ BigMov r4, L2(f,y)
++ bl TransLineR4
++
++ BigEor r2,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(W,C,SPACE,SPACE) //WC -Watch clear
++ BigEor r3,r2, L4(W,C,SPACE,SPACE)^L4(W,a,t,c)
++ BigEor r4,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(h,SPACE,c,l)
++ BigMov r5, L3(e,a,r)
++ bl TransLineR5
++
++ BigEor2 r2,L4(W,C,SPACE,SPACE) ^L4(W,R,SPACE,SPACE) //WR -Watch read
++ BigEor2 r4,L4(h,SPACE,c,l) ^L4(h,SPACE,r,e)
++ BigMov r5, L2(a,d)
++ bl TransLineR5
++
++ BigEor2 r2,L4(W,R,SPACE,SPACE) ^L4(W,R,W,SPACE) //WRW -Watch read/write
++ BigEor2 r5,L2(a,d) ^L4(a,d,FSLASH,w)
++ BigMov r6, L4(r,i,t,e)
++ bl TransLineR6
++
++ BigEor r2,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(W,W,SPACE,SPACE) //WW -Watch write
++ BigEor2 r4,L4(h,SPACE,r,e) ^L4(h,SPACE,w,r)
++ BigMov r5, L3(i,t,e)
++ bl TransLineR5
++
++ BigEor r2,rSP,L4(SPACE,SPACE,SPACE,SPACE)^L4(QUESTION_MARK,SPACE,SPACE,SPACE) //? -Help
++ BigMov r3, L4(H,e,l,p)
++ bl TransLineR3
++
++ b Prompt
++
++//.global CalcMemEnd
++CalcMemEnd:
++ CalcMemSize r1,r0,MEMORY_CONTROL_BASE //out: r0 - mem size
++ BigAdd2 r0,MEM_START //32 meg
++ mov pc,lr
++
++
++//rRamSector - start (rNum1)
++//rRamEnd - end (rNum2)
++Verify_Cmd:
++ mov r5,#CMD_VERIFY
++ b Burn1
++Verify2_Cmd:
++ mov r5,#CMD_VERIFY
++ b Burn2
++BurnAll_Cmd:
++ mov r5,#CMD_BURNALL
++ b Burn1
++Burn2_Cmd:
++ mov r5,#CMD_BURN
++Burn2:
++ BigMov r4,FLASH_BASE_ADDRESS+(16<<20)
++ b BurnContinue
++Burn_Cmd:
++ mov r5,#CMD_BURN
++Burn1:
++ BigMov r4,FLASH_BASE_ADDRESS
++BurnContinue:
++ tst rValidCnt,#F_NUM1_MASK
++ tstne rValidCnt,#F_NUM2_MASK
++ beq Invalid
++ tst rRamSector,#3
++ bne Invalid
++ tst rRamEnd,#3
++ bne Invalid
++ cmp rRamSector,rRamEnd
++ bhs Invalid
++ cmp rRamSector,#MEM_START
++ blo Invalid //br if rRamSector is below ram start,
++ bl CalcMemEnd
++ mov r1,r4
++ cmp rRamEnd,r0
++ bhi Invalid //br if rRamEnd is above ram end,
++ sub lr,rRamEnd,rRamSector
++ cmp lr,#f128j3a_SIZE
++ bhi Invalid
++
++ mvn r2,#0
++ tst rRamEnd,#1
++ strneb r2,[rRamEnd],#1
++ tst rRamEnd,#2
++ strneh r2,[rRamEnd],#2
++
++//1st verify that flash needs burned
++ mov lr,rRamSector
++1: ldr r2,[lr],#4
++ ldr r3,[r1],#4
++ cmp r2,r3
++ bne 2f
++ cmp lr,rRamEnd
++ blo 1b
++
++ cmp r5,#CMD_BURNALL
++ beq 3f
++ BigMov r0,L4(V,e,r,i)
++ bl Transmit1
++ BigMov r0,L4(f,i,e,d)
++ bl Transmit1
++ b Prompt
++2:
++ sub r1,r1,#4
++ cmp r5,#CMD_VERIFY
++ bne 3f
++ sub r0,lr,#4
++20:
++ bl Burn_error
++ b Prompt
++3:
++ mov rFlashSector,r1,LSR #18
++ mov rFlashSector,rFlashSector,LSL #18 //round to 256k boundary
++ add rRamSector,rRamSector,rFlashSector
++ sub rRamSector,rRamSector,r4
++ BigMov r3,MEMORY_CONTROL_BASE
++ tst rFlashSector,#1<<26
++ ldr r1,[r3,#MSC0]
++ movne r1,r1,LSR #16 //nCS1 being used for flash
++ tst r1,#1<<3 //bit 3 - 1 means 16 bit mode
++ adr r4,Burn_Rtn32
++ ldr r3,[r4]
++ BigMov r2,0xe58d5054 //NOTE: when 1st instruction of Burn_Rtn32 changes (or DBG_TEMP value), this must change as well
++ adrne r4,Burn_Rtn16
++
++ cmp r4,#MEM_START
++ bhs 10f
++//I must move the burn code, unless I'm only running from cache
++ cmp r2,r3
++ bne 10f
++ tst r1,#1<<3 //bit 3 - 1 means 16 bit mode
++ BigAdd r1,r0,(-0x1000+((DEBUG_BASE+DBG_START)&0xfe0)-32)
++ moveq r3,#((Burn_Rtn_End-Burn_Rtn32)+0x1f)&(~0x1f) //round to 32 byte (cache line)boundary
++ movne r3,#((Burn_Rtn_End-Burn_Rtn16)+0x1f)&(~0x1f) //round to 32 byte (cache line)boundary
++ add r2,r4,r3
++ sub r1,r1,r3
++ mov r0,r1
++4: ldr r3,[r4],#4
++ str r3,[r1],#4
++ cmp r4,r2
++ blo 4b
++
++ mov r4,r0
++5:
++ CP15_CF_INVAL_ILINE mcr,r4
++ add r4,r4,#32
++ cmp r4,r1
++ blo 5b
++
++ CP15_CF_INVAL_BTB mcr,r4
++
++ CP15_CF_DRAIN mcr,r4 //data cache is disabled, but it should still drain first
++ CPWAIT r1
++
++ BigMov rFlashBase,FLASH_BASE_ADDRESS
++ mov rRet,#0
++ blx r0
++ b 20b //unknow Man/dev Id if it returns from here
++
++10:
++//I'm running from ram, or from cache only
++ BigMov rFlashBase,FLASH_BASE_ADDRESS
++ adr rRet,11f
++ blx r4
++ b 20b //unknow Man/dev Id if it returns from here
++11: b Prompt
++
++
++
++
++//BurnRtn istr,ildr,mask,shift,inc,plait
++Burn_Rtn32:
++ BurnRtn str,ldr,0xffffffff,0,0,4,0
++Burn_Rtn16:
++#if 1
++ BigMov r0,FLASH_STATUS_CLEAR_CMD&0xffff
++ strh r0,[rFlashBase,#0]
++ delay
++ BigMov r0,FLASH_ID_CMD&0xffff
++ strh r0,[rFlashBase,#0]
++ delay
++ ldrh r2,[rFlashBase,#2]
++
++ BigMov r0,FLASH_READ_CMD&0xffff
++ strh r0,[rFlashBase,#0]
++ delayCnt r0,((40/10)*COUNT_MULT)
++ cmp r2,#0x16
++ cmpne r2,#0x17
++ cmpne r2,#0x18
++ beq 99f
++//(PLATFORM_TYPE==GAME_CONTROLLER_PLAITED_A1)
++ BurnRtn strh,ldrh, 0xffff,0,1,4,1 //the plait version (a1 jumpered to a high address line)
++99:
++ BurnRtn strh,ldrh, 0xffff,1,1,2,0 //the non-plait version (a1 correct)
++#else
++
++#if (PLATFORM_TYPE==GAME_CONTROLLER_PLAITED_A1)
++ BurnRtn strh,ldrh, 0xffff,0,1,4,1 //the plait version (a1 jumpered to a high address line)
++#else
++99:
++ BurnRtn strh,ldrh, 0xffff,1,1,2,0 //the non-plait version (a1 correct)
++#endif
++
++#endif
++
++Timeout:
++ BigMov r0,L4(T,i,m,e)
++ bl TransmitR
++ BigMov r0,L4(d,SPACE,o,u)
++ bl TransmitR
++ BigMov r0,L2(t,SPACE)
++ bl TransmitR
++
++ mov r0,rRamSector
++ mov r1,rFlashSector
++ ldr r2,[r0]
++ ldr r3,[r1]
++ bl Burn_error
++ b Burn_return
++
++ReturnError:
++ sub r0,r0,#4
++ sub r1,r1,#4
++ bl Burn_error
++ b Burn_return
++
++PrintSector:
++ mov r5,lr
++ bl TransmitR_CRLF
++ BigMov r0,L4(S,e,c,t)
++ bl TransmitR
++ BigMov r0,L3(o,r,SPACE)
++ bl TransmitR
++ mov r0,rFlashSector
++ bl PrintHexR
++ mov r0,#L1(SPACE)
++ bl TransmitR
++ mov r0,rRamSector
++ mov r1,rFlashSector
++ mov pc,r5
++
++PrintErasing:
++ mov r5,lr
++ BigMov r0,L4(E,r,a,s)
++ bl TransmitR
++ BigMov r0,L4(i,n,g,SPACE)
++ mov lr,r5
++ b TransmitR
++
++PrintProgramming:
++ mov r5,lr
++ BigMov r0,L4(P,r,o,g)
++ bl TransmitR
++ BigMov r0,L4(r,a,m,m)
++ bl TransmitR
++ BigMov r0,L4(i,n,g,SPACE)
++ bl TransmitR
++ mov r0,rRamSector
++ mov r1,rFlashSector
++ mov pc,r5
++
++PrintVerifying:
++ mov r5,lr
++ BigMov r0,L4(V,e,r,i)
++ bl TransmitR
++ BigMov r0,L4(f,y,i,n)
++ bl TransmitR
++ BigMov r0,L4(g,PERIOD,PERIOD,PERIOD)
++ bl TransmitR
++ mov r0,rRamSector
++ mov r1,rFlashSector
++ mov pc,r5
++
++PrintSuccess:
++ bl TransmitR_CRLF
++ BigMov r0,L4(S,u,c,c)
++ bl TransmitR
++ BigMov r0,L3(e,s,s)
++ bl TransmitR
++// b Burn_return
++
++Burn_return:
++ bl TransmitR_CRLF
++ bl WaitTxEmpty
++ movs rRet,rRet
++ CP15_CF_INVAL_BOTH mcreq,r1 //invalidate if return is reset vector
++ CPWAIT r1
++ mov pc,rRet
++
++Burn_error:
++ mov r8,lr
++ mov r5,r1
++ mov sl,r2
++ mov r7,r3
++ bl PrintHexR
++ mov r0,#L1(COLON)
++ bl TransmitR
++ mov r0,sl
++ bl PrintHexR
++ bl TransmitSPACER
++
++ mov r0,r5
++ bl PrintHexR
++ mov r0,#L1(COLON)
++ bl TransmitR
++ mov r0,r7
++ mov lr,r8
++ b PrintHexR
++
++ DEFINE_FLASH_GPIO_WAIT_FOR_IDLE
++
++
++WaitTxEmpty:
++1: ldr r1,[rUart,#UART_LSR]
++ ands r1,r1,#0x40
++ beq 1b
++ mov pc,lr //return
++
++TransmitSPACER:
++ mov r0,#L1(SPACE)
++ b TransmitR
++TransmitR_CRLF:
++ BigMov r1,L2(CR,LF)
++trR:
++ mov r0,r1
++//IN: r0 - character to transmit
++//OUT: r0 - last character transmitted, r1 - trashed
++TransmitR:
++1: ldr r1,[rUart,#UART_LSR]
++ ands r1,r1,#0x20
++ beq 1b
++ mov r1,r0
++ and r1,r1,#0xff
++ str r1,[rUart,#UART_THR]
++ movs r1,r0,LSR #8
++ bne trR
++ mov pc,lr //return
++//IN: r0 - value to print
++//OUT: r0-r4 trashed
++PrintHexR:
++ mov r2,#8
++ mov r4,r0
++ mov r3,lr
++1: mov r4,r4,ROR #28
++ and r0,r4,#0xf
++ cmp r0,#0xA
++ addcs r0,r0,#L1(A)-0x0a
++ addcc r0,r0,#L1(0)
++ bl TransmitR
++ subs r2,r2,#1
++ bne 1b
++ mov pc,r3
++
++Burn_Rtn_End:
++
++
++SSID_Cmd:
++ BigMov r0,L4(I,d,COLON,SPACE)
++ bl Transmit1
++ bl CalcMemEnd
++ BigAdd r5,r0,(-0x1000+((DEBUG_BASE+DBG_START)&0xfff)-32)
++ mov r6,#31
++1: bl Receive
++ beq 1b //br on timeout
++ cmp r0,#CR
++ beq 2f
++ strb r0,[r5],#1
++ bl Transmit1
++ subs r6,r6,#1
++ bne 1b
++2: mov r0,#0
++ strb r0,[r5],#1
++ b Prompt
++
++MAC_Cmd:
++ mov r2,#FUNC_REQ_MAC
++ b join_cmd
++Download_Wireless_Cmd:
++ tst rValidCnt,#F_NUM1_MASK
++ beq Invalid
++ tst rNum1,#3
++ bne Invalid
++ cmp rNum1,#MEM_START
++ bcc Invalid //br if rNum1 is below ram start,
++ //NOTE: arm sets the carry to the opposite of most processors on subtract, compare
++ mov r2,#FUNC_REQ_DLW
++join_cmd:
++ bl TryRoutine
++ ldmia sp,{rPrevNum1,rUart,rDBG}
++ bl SetupATAG //dlw is now overwriting ATAG space, so set it again
++ b Prompt
++
++//struct tag_mem32 {
++// u32 size;
++// u32 start; /* physical start address */
++//};
++
++//out: r2,r7 - saved, r0 - CalcMemEnd return value
++SetupATAG:
++ mov r3,lr
++ bl CalcMemEnd
++ mov lr,r3
++ BigMov r1,TAGGED_LIST
++ BigMov r3,2
++ BigMov r4,ATAG_CORE
++ BigMov r5,4
++ BigEor r6,r4,(ATAG_MEM^ATAG_CORE)
++ stmia r1!,{r3,r4,r5,r6}
++ BigMov r4,MEM_START
++ BigMov r5,0
++ sub r3,r0,r4
++ stmia r1,{r3,r4,r5}
++ mov pc,lr
++
++
++Gl_Cmd:
++ mov r2,#FUNC_REQ_PIC
++ bl TryRoutine
++ ldmia sp,{rPrevNum1,rUart,rDBG}
++
++ BigMov r1,MACH_TYPE_SCANPASS
++ str r1,[rDBG,#DBG_R1]
++ mov r2,#FUNC_REQ_GL
++ bl TryRoutine
++ ldmia sp,{rPrevNum1,rUart,rDBG}
++ movs rNum1,r4
++ bne Go_Cmd
++ b Prompt
++
++//r2- function select
++TryRoutine:
++ mov r10,#0
++ mov r7,lr
++ bl TryRoutine1
++ b Invalid
++//r10- RCSR
++//r2- function select
++//r7- main return
++//lr- error return
++TryRoutine1:
++ adr r0,MiniDebugEnd
++ ldr r1,[r0]
++ BigMov r3,0xe1a08000
++ cmp r1,r3
++ movne pc,lr //failure return
++ bl SetupATAG //out: r0 - calcMemEnd return value
++ mov lr,r7
++
++ BigAdd r1,r0,(-0x1000+((DEBUG_BASE+DBG_START)&0xfff)-32) //@ssid
++ mov r0,r1
++ stmdb r0!,{rPrevNum1,rUart,rDBG}
++ mov sp,r0
++ mov fp,r0
++ mov r0,rNum1
++ adr r4,MiniDebugEnd
++ mov r3,#DEF_DISPLAY_INDEX
++ b HeadStart
++
++ .ifdef __ARMASM
++ DUP 6,0xffffffff
++ align 256
++ .else
++ .balignl 256,0xffffffff
++ .endif
++
++MiniDebugEnd:
++//This is defined in head.S or minidebug.lds
++//HeadStart:
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/ministart.S u-boot-1.1.2-neon/cpu/pxa/ministart.S
+--- u-boot-1.1.2/cpu/pxa/ministart.S 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/cpu/pxa/ministart.S 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,270 @@
++/*
++ * armboot - Startup Code for XScale
++ *
++ * Copyright (C) 1998 Dan Malek <dmalek@jlc.net>
++ * Copyright (C) 1999 Magnus Damm <kieraypc01.p.y.kie.era.ericsson.se>
++ * Copyright (C) 2000 Wolfgang Denk <wd@denx.de>
++ * Copyright (C) 2001 Alex Zuepke <azu@sysgo.de>
++ * Copyright (C) 2002 Kyle Harris <kharris@nexus-tech.net>
++ * Copyright (C) 2003 Robert Schwebel <r.schwebel@pengutronix.de>
++ * Copyright (C) 2003 Kai-Uwe Bloem <kai-uwe.bloem@auerswald.de>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ */
++
++#include <config.h>
++#include <version.h>
++#include <asm/arch/pxaMacro.h>
++
++#define Mode_SVC 0x13
++#define NoIntsMask 0xc0
++.globl _bss_start
++.globl _bss_end
++
++//defined globals
++.globl HeadStart
++.globl _armboot_start
++
++//r3 - display type
++HeadStart:
++ mov r8,r0 //there is a check for this instruction before jumping here
++
++// ********************************************************************
++// Set processor into Supervisior mode (SVC) and disable IRQ & FIQ
++//
++ mrs r0, CPSR
++ bic r0, r0,#0x1f
++ orr r0, r0,#(Mode_SVC | NoIntsMask)
++ msr cpsr_c, r0
++//exit SDS, if currently active
++ msr SPSR, r0
++ adr lr,1f
++ movs pc,lr
++1:
++ b relocate
++// ********************************************************************
++_armboot_start:
++_TEXT_BASE: .word TEXT_BASE
++
++_start_armboot: .word start_armboot
++/*
++ * These are defined in the board-specific linker script.
++ */
++_bss_start: .word __bss_start
++_bss_end: .word _end
++
++#ifdef CONFIG_USE_IRQ
++/* IRQ stack memory (calculated at run-time) */
++.globl IRQ_STACK_START
++IRQ_STACK_START:
++ .word 0x0badc0de
++
++/* IRQ stack memory (calculated at run-time) */
++.globl FIQ_STACK_START
++FIQ_STACK_START:
++ .word 0x0badc0de
++#endif
++
++relocate: /* relocate U-Boot to RAM */
++ adr r0, HeadStart /* r0 <- current position of code */
++ bic r0,r0,#0xff
++ bic r0,r0,#0xff00 //64k aligned
++ ldr r1, _TEXT_BASE
++ cmp r0, r1 /* don't reloc during debug */
++ beq stack_setup
++
++ ldr r2, _bss_start
++
++copy_loop:
++ ldmia r0!, {r3-r10} /* copy from source address [r0] */
++ stmia r1!, {r3-r10} /* copy to target address [r1] */
++ cmp r1, r2 /* until dest end addreee [r2] */
++ ble copy_loop
++
++ /* Set up the stack */
++stack_setup:
++ ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */
++ BigSub2 r0,(CFG_MALLOC_LEN+CFG_GBL_DATA_SIZE+CFG_MMU_SPACE_RESERVED) //malloc area,bdinfo
++#ifdef CONFIG_USE_IRQ
++ sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
++#endif
++ sub sp, r0, #12 /* leave 3 words for abort-stack */
++
++clear_bss:
++ ldr r0, _bss_start /* find start of bss segment */
++ ldr r1, _bss_end /* stop here */
++ mov r2, #0x00000000 /* clear */
++
++clbss_l:str r2, [r0] /* clear loop... */
++ add r0, r0, #4
++ cmp r0, r1
++ bne clbss_l
++ bl dcache_enable
++
++ ldr pc, _start_armboot
++
++
++FlushCache:
++ CP15_CONTROL mrc,r0
++ tst r0, #4 //is data cache enabled
++ beq 2f
++// b 2f
++ mov r1, #2048
++ add r0,pc,#0x20000 //make sure I don't alloc a line in this subroutine
++ BigBic2 r0, 0xffff
++1: CP15_CF_ALLOC_LINE mcr,r0
++ add r0, r0, #0x20
++ subs r1, r1, #1
++ bne 1b
++
++ CP15_CF_DRAIN mcr,r0
++ CPWAIT r0
++2: CP15_CF_INVAL_BOTH mcr,r0
++ CPWAIT r0
++ mov pc, lr
++
++
++
++//void dcache_disable (void)
++.globl dcache_disable
++dcache_disable:
++ mov r3,lr
++ bl FlushCache
++ CP15_CONTROL mrc,r1
++
++ BigBic2 r1, 0x2805 //disable high vector, branch target buffer, disable data cache, MMU
++ .balignl 32,0xe1a00000 //cacheline boundary (32 bytes)
++ //Needed so that if new flash is burnt
++ //and flash != ram copy,
++ //mov pc, r3 will be in cache and execute correctly
++ //(r3 is 0) return to the reset vector
++ CP15_CONTROL mcr,r1
++ CPWAIT r0
++ mov pc, r3
++
++
++//int dcache_status (void)
++.globl dcache_status
++dcache_status:
++ CP15_CONTROL mrc,r0 //get the control register
++ and r0,r0,#1
++ mov pc,lr
++
++#define MEM_START1 0xa0000000
++#define MEM_END1 0xa4000000
++//void dcache_enable (void)
++.globl dcache_enable
++dcache_enable:
++ stmdb sp!,{r5,r6,lr}
++ bl FlushCache
++#if !defined(CFG_MMU_SPACE_RESERVED) || (CFG_MMU_SPACE_RESERVED<(1<<14))
++ mov r0,#1<<15 //16k plus alignment of 16k
++ bl malloc
++ add r6,r0,#(1<<14) //16k alignment
++ BigBic2 r6,(1<<14)-1
++#else
++ ldr r6, _TEXT_BASE /* upper 128 KiB: relocated uboot */
++ BigSub2 r6,(CFG_MMU_SPACE_RESERVED) //malloc area,bdinfo
++#endif
++ mov r2,r6
++ add r5,r6,#(1<<14) //16k 1st level page table
++ BigMov r0,0x0402 //section descriptor, ap-01, privileged r/w
++ //map virt to phys 1-to-1, non-cache, non-bufferable
++1: str r0,[r2],#4
++ add r0,r0,#1<<20
++ cmp r2,r5
++ bne 1b
++
++
++ mov r3,#MEM_END1
++ add r5,r6,r3,LSR #(20-2)
++ add r1,r6,#(MEM_START1>>20)<<2
++ BigMov r0,(MEM_START1&0xfff00000)+0x040A //cacheable (write through)
++2: str r0,[r1],#4
++ cmp r1,r5
++ addne r0,r0,#1<<20
++ bne 2b
++
++ BigMov r0,0xffffffff
++ CP15_DACR mcr,r0
++
++ CP15_TTBR mcr,r6
++//enable MMU
++ CP15_TLB_UNLOCK_I mcr,r0
++ CP15_TLB_UNLOCK_D mcr,r0
++ CP15_TLB_INVAL_BOTH mcr,r0
++
++ CP15_CONTROL mrc,r1 //get the control register
++ BigOrr2 r1,0x201 // enable MMU, r bit
++ BigBic2 r1,0x100 // disable S bit, ap -0 means read only by all
++ CPWAIT r0
++ CP15_CONTROL mcr,r1 //set the control register
++ CPWAIT r0
++
++//enable the instruction cache
++ CP15_CF_UNLOCK_I mcr,r0
++// CP15_CF_INVAL_I mcr,r0 //I might be running from cache only, don't invalidate
++
++ orr r1,r1,#0x1000 //set bit 12 -- the I bit
++ CP15_CONTROL mcr,r1 //set the control register
++ CPWAIT r0
++
++//enable the data cache
++// CP15_CF_UNLOCK_D mcr,r0
++ CP15_CF_INVAL_D mcr,r0 //this will also drain write buffer
++ CP15_CF_DRAIN mcr,r0 //make sure it is drained just to be very safe
++
++ orr r1,r1,#0x4 //set bit 4 -- the D bit
++ CP15_CONTROL mcr,r1 //set the control register
++ CPWAIT r0
++
++ BigMov r0,0x3fff
++ CP15_CP_ACCESS mcr,r0 //enable access to all coprocessors
++ ldmia sp!,{r5,r6,pc}
++
++
++
++/****************************************************************************/
++/* */
++/* Reset function: the PXA250 doesn't have a reset function, so we have to */
++/* perform a watchdog timeout for a soft reset. */
++/* */
++/****************************************************************************/
++.globl reset_cpu
++ /* FIXME: this code is PXA250 specific. How is this handled on */
++ /* other XScale processors? */
++
++reset_cpu:
++ BigMov r0,0x40a00000 //OSTIMER_BASE
++ /* We set OWE:WME (watchdog enable) and wait until timeout happens */
++
++ ldr r1, [r0, #OWER]
++ orr r1, r1, #0x0001 /* bit0: WME */
++ str r1, [r0, #OWER]
++
++ /* OS timer does only wrap every 1165 seconds, so we have to set */
++ /* the match register as well. */
++
++ ldr r1, [r0, #OSCR] /* read OS timer */
++ add r1, r1, #0x800 /* let OSMR3 match after */
++ add r1, r1, #0x800 /* 4096*(1/3.6864MHz)=1ms */
++ str r1, [r0, #OSMR3]
++
++reset_endless:
++ b reset_endless
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/mmc.c u-boot-1.1.2-neon/cpu/pxa/mmc.c
+--- u-boot-1.1.2/cpu/pxa/mmc.c 2003-10-16 01:53:52.000000000 +0200
++++ u-boot-1.1.2-neon/cpu/pxa/mmc.c 2007-08-11 21:07:20.000000000 +0200
+@@ -27,6 +27,7 @@
+ #include <asm/errno.h>
+ #include <asm/arch/hardware.h>
+ #include <part.h>
++#include <command.h>
+
+ #ifdef CONFIG_MMC
+
+@@ -47,9 +48,19 @@
+ static uchar mmc_buf[MMC_BLOCK_SIZE];
+ static mmc_csd_t mmc_csd;
+ static int mmc_ready = 0;
++static int isSD = 0 ;
++static int startBlock = 0 ;
++static ushort RCA = MMC_DEFAULT_RCA ;
++static struct partition part ;
+
++static void stop_clock( void )
++{
++ MMC_STRPCL = MMC_STRPCL_STOP_CLK;
++ MMC_I_MASK = ~MMC_I_MASK_CLK_IS_OFF;
++ while (!(MMC_I_REG & MMC_I_REG_CLK_IS_OFF));
++}
+
+-static uchar *
++uchar *
+ /****************************************************/
+ mmc_cmd(ushort cmd, ushort argh, ushort argl, ushort cmdat)
+ /****************************************************/
+@@ -59,9 +70,8 @@
+ int words, i;
+
+ debug("mmc_cmd %x %x %x %x\n", cmd, argh, argl, cmdat);
+- MMC_STRPCL = MMC_STRPCL_STOP_CLK;
+- MMC_I_MASK = ~MMC_I_MASK_CLK_IS_OFF;
+- while (!(MMC_I_REG & MMC_I_REG_CLK_IS_OFF));
++ stop_clock();
++
+ MMC_CMD = cmd;
+ MMC_ARGH = argh;
+ MMC_ARGL = argl;
+@@ -71,9 +81,10 @@
+ while (!(MMC_I_REG & MMC_I_REG_END_CMD_RES));
+
+ status = MMC_STAT;
+- debug("MMC status %x\n", status);
++ debug("MMC status %lx\n", status);
+ if (status & MMC_STAT_TIME_OUT_RESPONSE)
+ {
++ printf( "mmc_cmd timeout: cmd: 0x%x, args: 0x%04x%04x, status 0x%lx\n", cmd, argh, argl, status );
+ return 0;
+ }
+
+@@ -85,7 +96,7 @@
+ break;
+
+ case MMC_CMDAT_R2:
+- words = 8;
++ words = 9;
+ break;
+
+ default:
+@@ -109,6 +120,22 @@
+ return resp;
+ }
+
++static void mmc_setblklen( ulong blklen )
++{
++ static ulong prevLen = -1UL ;
++ if( blklen != prevLen )
++ {
++ ushort argh, argl ;
++
++ argh = blklen >> 16;
++ argl = blklen & 0xffff;
++
++ /* set block len */
++ mmc_cmd( MMC_CMD_SET_BLOCKLEN, argh, argl, MMC_CMDAT_R1);
++ prevLen = blklen ;
++ }
++}
++
+ int
+ /****************************************************/
+ mmc_block_read(uchar *dst, ulong src, ulong len)
+@@ -117,20 +144,18 @@
+ uchar *resp;
+ ushort argh, argl;
+ ulong status;
++ unsigned char volatile *rxFIFO = (unsigned char *)&(MMC_RXFIFO);
+
+ if (len == 0)
+ {
+ return 0;
+ }
+
+- debug("mmc_block_rd dst %lx src %lx len %d\n", (ulong)dst, src, len);
++ debug("mmc_block_rd dst %lx src %lx len %ld\n", (ulong)dst, src, len);
+
+- argh = len >> 16;
+- argl = len & 0xffff;
+-
+- /* set block len */
+- resp = mmc_cmd(MMC_CMD_SET_BLOCKLEN, argh, argl, MMC_CMDAT_R1);
++ mmc_setblklen( len );
+
++ src += (startBlock*MMC_BLOCK_SIZE);
+ /* send read command */
+ argh = src >> 16;
+ argl = src & 0xffff;
+@@ -147,15 +172,14 @@
+ {
+ if (MMC_I_REG & MMC_I_REG_RXFIFO_RD_REQ)
+ {
+- *dst++ = MMC_RXFIFO;
+- len--;
+- }
+- status = MMC_STAT;
+- if (status & MMC_STAT_ERRORS)
+- {
+- printf("MMC_STAT error %lx\n", status);
+- return -1;
++ int i, bytes = min(32,len);
++ len -= bytes;
++
++ for (i=0; i<bytes; i++)
++ *dst++ = *rxFIFO ;
+ }
++ else if (MMC_STAT & MMC_STAT_ERRORS)
++ break;
+ }
+ MMC_I_MASK = ~MMC_I_MASK_DATA_TRAN_DONE;
+ while (!(MMC_I_REG & MMC_I_REG_DATA_TRAN_DONE));
+@@ -338,7 +362,7 @@
+ aligned_end = mmc_block_address & end;
+
+ /* all block aligned accesses */
+- debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
++ debug("src %p dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ if (part_start)
+ {
+@@ -357,22 +381,22 @@
+ dst += part_len;
+ src += part_len;
+ }
+- debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
++ debug("src %p dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ for (; dst < aligned_end; src += mmc_block_size, dst += mmc_block_size)
+ {
+- debug("al src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
++ debug("al src %p dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ if ((mmc_block_write(dst, (uchar *)src, mmc_block_size)) < 0)
+ {
+ return -1;
+ }
+ }
+- debug("src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
++ debug("src %p dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ if (part_end && dst < end)
+ {
+- debug("pe src %lx dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
++ debug("pe src %p dst %lx end %lx pstart %lx pend %lx astart %lx aend %lx\n",
+ src, (ulong)dst, end, part_start, part_end, aligned_start, aligned_end);
+ if ((mmc_block_read(mmc_buf, aligned_end, mmc_block_size)) < 0)
+ {
+@@ -392,13 +416,324 @@
+ mmc_bread(int dev_num, ulong blknr, ulong blkcnt, ulong *dst)
+ /****************************************************/
+ {
++ debug( "read %lu blocks at block #%lu\n", blkcnt, blknr );
++
++ if( 0 < blkcnt )
++ {
++ if( 0 != getenv( "mblock" ) )
++ {
+ int mmc_block_size = MMC_BLOCK_SIZE;
+ ulong src = blknr * mmc_block_size + CFG_MMC_BASE;
+
+ mmc_read(src, (uchar *)dst, blkcnt*mmc_block_size);
++ }
++ else
++ {
++ ulong src = (blknr+startBlock) * MMC_BLOCK_SIZE ;
++ ulong status ;
++ uchar *dstb = (uchar *)dst ;
++ unsigned char volatile *rxFIFO = (unsigned char *)&(MMC_RXFIFO);
++
++ MMC_RDTO = 0xffff;
++ MMC_BLKLEN = MMC_BLOCK_SIZE ;
++ MMC_NOB = blkcnt ;
++
++ mmc_setblklen( MMC_BLOCK_SIZE );
++ mmc_cmd( MMC_CMD_RD_BLK_MULTI,
++ src >> 16,
++ src & 0xFFFF,
++ MMC_CMDAT_R1|MMC_CMDAT_READ|MMC_CMDAT_BLOCK|MMC_CMDAT_DATA_EN );
++
++ // read the data
++ for( blknr = 0 ; blknr < blkcnt ; blknr++ )
++ {
++ unsigned len = MMC_BLOCK_SIZE ;
++
++ while (len)
++ {
++ int i ;
++ MMC_I_MASK = ~MMC_I_MASK_RXFIFO_RD_REQ;
++ while( (MMC_I_REG & MMC_I_REG_RXFIFO_RD_REQ) == 0 )
++ {
++ }
++
++ for (i = 0; i < 32 ; i++ )
++ {
++ *dstb++ = *rxFIFO ;
++ }
++ len -= 32 ;
++ }
++ } // for each block
++
++ MMC_I_MASK = ~MMC_I_MASK_DATA_TRAN_DONE;
++ while (!(MMC_I_REG & MMC_I_REG_DATA_TRAN_DONE));
++ status = MMC_STAT;
++ if (status & MMC_STAT_ERRORS)
++ {
++ printf("MMC_STAT error %lx\n", status);
++ return -1;
++ }
++// printf( "completed mread... now stop\n" );
++
++ mmc_cmd( MMC_CMD_STOP, 0, 0, MMC_CMDAT_R1);
++
++ } // multi-block read
++ } // or why bother?
+ return blkcnt;
+ }
+
++static void dumpResponse( uchar *resp, unsigned bytes )
++{
++ debug( "rsp: " );
++ if( resp )
++ {
++ while( bytes-- )
++ debug( "%02X ", *resp++ );
++ debug( "\n" );
++ }
++ else
++ debug( "NULL\n" );
++}
++
++int SDCard_test( void )
++{
++ unsigned short response ;
++ unsigned long ignore ;
++ unsigned char *resp ;
++
++ mmc_cmd(0, 0, 0, 0);
++
++ resp = mmc_cmd(SD_APP_CMD55, 0, 0, MMC_CMDAT_R1);
++ if( !resp )
++ {
++ printf( "SDInitErr1\n" );
++ return -ENODEV ;
++ }
++
++ resp = mmc_cmd(SD_APP_CMD41, 0x0020, 0, MMC_CMDAT_INIT|MMC_CMDAT_R1);
++ if( !resp )
++ {
++ printf( "SDInitErr2\n" );
++ return -ENODEV ;
++ }
++
++ memcpy( &response, resp, sizeof( response ) );
++
++ while (response != 0x3f80)//continue doing ACMD1 until busy bit in response is set
++ {
++ //CMD55 APP_CMD
++ MMC_STRPCL = 0x00000001;//stop clock
++ while ((MMC_STAT & 0x00000100) == 0x00000100); //wait for clock to stop
++ MMC_CMD = 0x00000037;//CMD55 index APP_CMD
++ MMC_ARGH = 0x00000000;//relative card address 0x0
++ MMC_ARGL = 0x00000000;//stuff bits
++ MMC_CMDAT = 0x00000001;//expect response 1
++ MMC_STRPCL = 0x00000002;//start clock
++ while ((MMC_STAT & 0x00002000) == 0x00000000);//wait for end_cmd_res
++ //read response FIFO
++ response = MMC_RES & 0x0000ffff ;
++ ignore = MMC_RES ;
++ ignore = MMC_RES ;
++
++ //ACMD41
++ MMC_STRPCL = 0x00000001;//stop clock
++ while ((MMC_STAT & 0x00000100) == 0x00000100); //wait for clock to stop
++ MMC_CMD = 0x00000029;//ACMD41 index SD_APP_SEND_OP_COND
++ MMC_ARGH = 0x00000020;//set voltage limit of system in command argument
++ MMC_ARGL = 0x00000000;
++ MMC_CMDAT = 0x00000003;//expect response 3
++ MMC_STRPCL = 0x00000002;//start clock
++ while ((MMC_STAT & 0x00002000) == 0x00000000);//wait for end_cmd_res
++
++ //read response FIFO
++ response = MMC_RES & 0x0000ffff ;
++ ignore = MMC_RES ;
++ ignore = MMC_RES ;
++ }
++
++ return 0 ;
++}
++
++#ifdef DEBUG
++static void print_mmc_csd( struct mmc_csd *csd )
++{
++ printf( "ecc: %u\n", csd->ecc );
++ printf( "file_format: %u\n", csd->file_format );
++ printf( "tmp_write_protect: %u\n", csd->tmp_write_protect );
++ printf( "perm_write_protect: %u\n", csd->perm_write_protect );
++ printf( "copy: %u\n", csd->copy );
++ printf( "file_format_grp: %u\n", csd->file_format_grp );
++ printf( "content_prot_app: %u\n", csd->content_prot_app );
++ printf( "rsvd3: %u\n", csd->rsvd3 );
++ printf( "write_bl_partial: %u\n", csd->write_bl_partial );
++ printf( "write_bl_len: %u\n", csd->write_bl_len );
++ printf( "r2w_factor: %u\n", csd->r2w_factor );
++ printf( "default_ecc: %u\n", csd->default_ecc );
++ printf( "wp_grp_enable: %u\n", csd->wp_grp_enable );
++ printf( "wp_grp_size: %u\n", csd->wp_grp_size );
++ printf( "erase_grp_mult: %u\n", csd->erase_grp_mult );
++ printf( "erase_grp_size: %u\n", csd->erase_grp_size );
++ printf( "c_size_mult1: %u\n", csd->c_size_mult1 );
++ printf( "vdd_w_curr_max: %u\n", csd->vdd_w_curr_max );
++ printf( "vdd_w_curr_min: %u\n", csd->vdd_w_curr_min );
++ printf( "vdd_r_curr_max: %u\n", csd->vdd_r_curr_max );
++ printf( "vdd_r_curr_min: %u\n", csd->vdd_r_curr_min );
++ printf( "c_size: %u\n", csd->c_size );
++ printf( "rsvd2: %u\n", csd->rsvd2 );
++ printf( "dsr_imp: %u\n", csd->dsr_imp );
++ printf( "read_blk_misalign: %u\n", csd->read_blk_misalign );
++ printf( "write_blk_misalign: %u\n", csd->write_blk_misalign );
++ printf( "read_bl_partial: %u\n", csd->read_bl_partial );
++ printf( "read_bl_len: %u\n", csd->read_bl_len );
++ printf( "ccc: %u\n", csd->ccc );
++ printf( "tran_speed %u\n", csd->tran_speed );
++ printf( "nsac; %u\n", csd->nsac );
++ printf( "taac; %u\n", csd->taac );
++ printf( "rsvd1: %u\n", csd->rsvd1 );
++ printf( "spec_vers: %u\n", csd->spec_vers );
++ printf( "csd_structure: %u\n", csd->csd_structure );
++}
++#endif
++
++#define DOS_PART_MAGIC_OFFSET 0x1fe
++#define DOS_FS_TYPE_OFFSET 0x36
++#define MSDOS_LABEL_MAGIC1 0x55
++#define MSDOS_LABEL_MAGIC2 0xAA
++
++struct bpb { // see http://staff.washington.edu/dittrich/misc/fatgen103.pdf
++ unsigned char jump[3];
++ char oemName[8];
++ unsigned short bytesPerSector ;
++ unsigned char sectorsPerCluster ;
++ unsigned short reservedSectorCount ;
++ unsigned char numFats ;
++ unsigned short rootEntCount ;
++ unsigned short totalSec16 ;
++ unsigned char media ; // 0xF8
++ unsigned short fatSz16 ;
++ unsigned short secPerTrack ;
++ unsigned short numHeads ;
++ unsigned long hiddenSectors ;
++ unsigned long totalSectors32 ;
++ unsigned char driveNum ;
++ unsigned char reserved1 ; // 0x00
++ unsigned char bootSig ; // 0x29
++ unsigned long volumeId ;
++ char volumeLabel[11];
++ char fileSysType[8];
++} __attribute__((packed));
++
++#define isprint(__c) (((__c)>=0x20)&&((__c)<=0x7f))
++
++static int find_mbr( int max_blocks )
++{
++ int i ;
++ ulong addr = 0 ;
++
++printf( "---- searching %d blocks for MBR\n", max_blocks );
++
++ for( i = 0 ; i < 10 ; i++, addr += MMC_BLOCK_SIZE )
++ {
++ uchar data[MMC_BLOCK_SIZE];
++ if( 0 == mmc_block_read(data, addr, sizeof(data) ))
++ {
++ memcpy( &part, data+0x1be, sizeof(part));
++ if( ( data[DOS_PART_MAGIC_OFFSET] == MSDOS_LABEL_MAGIC1 )
++ &&
++ ( data[DOS_PART_MAGIC_OFFSET + 1] == MSDOS_LABEL_MAGIC2 ) )
++ {
++ if( ( ('\x00' == part.boot_ind )
++ ||
++ ('\x80' == part.boot_ind ) )
++ &&
++ ( 10 > part.head )
++ &&
++ ( part.end_head >= part.head ) )
++ {
++ printf( "partition info found at block %u\n", i );
++ printf( "boot:%02x head:%02x sec:%02x cyl:%02x sys:%02x endh:%02x ends:%02x endc:%02x start:%08x, count:%08x\n",
++ part.boot_ind, part.head, part.sector, part.cyl,
++ part.sys_ind, part.end_head, part.end_sector, part.end_cyl,
++ part.start_sect, part.nr_sects );
++ printf( "MBR found at block %d\n", i );
++ return part.start_sect ;
++ }
++ else {
++ struct bpb const *bootParams = (struct bpb *)data ;
++ unsigned j ;
++ for( j = 0 ; j < sizeof(data); j++ )
++ {
++ if( 0 == ( j & 0x0f ) )
++ printf( "%04x ", j );
++ printf( "%02x ", data[j] );
++ if( 7 == ( j & 7 ) )
++ printf( " " );
++ if( 0x0f == ( j & 0x0f ) )
++ {
++ unsigned b ;
++ for( b = j-15 ; b <= j ; b++ )
++ {
++ uchar c = data[b];
++ if( isprint(c) )
++ printf( "%c", c );
++ else
++ printf( "." );
++ if( 7 == ( b & 7 ) )
++ printf( " " );
++ }
++ printf( "\n" );
++ }
++ }
++ printf( "Invalid MBR\n" );
++ printf( "---> Boot Parameter block\n" );
++ printf( "jump %02x %02x %02x\n", bootParams->jump[0],bootParams->jump[1],bootParams->jump[2]);
++ printf( "bytesPerSector: %04x\n", bootParams->bytesPerSector );
++ printf( "sectorsPerCluster: %02x\n", bootParams->sectorsPerCluster );
++ printf( "reservedSectors %04x\n", bootParams->reservedSectorCount );
++ printf( "numFats: %02x\n", bootParams->numFats );
++ printf( "rootEntCount: %04x\n", bootParams->rootEntCount );
++ printf( "totalSec16: %04x\n", bootParams->totalSec16 );
++ printf( "media: %02x\n", bootParams->media );
++ printf( "fatsz16: %04x", bootParams->fatSz16 );
++ printf( "secPerTrack: %04x\n", bootParams->secPerTrack );
++ printf( "numHeads = %04x\n", bootParams->numHeads );
++ printf( "hidden = %08lx\n", bootParams->hiddenSectors );
++ printf( "totalSec32 = %08lx\n", bootParams->totalSectors32 );
++ printf( "drive #%u\n", bootParams->driveNum );
++ printf( "reserved1: %02x\n", bootParams->reserved1 );
++ printf( "bootSig: %02x\n", bootParams->bootSig );
++ printf( "volume: %08lx\n", bootParams->volumeId );
++ part.boot_ind = 0 ;
++ part.head = 0 ;
++ part.sector = 2 ;
++ part.cyl = 0 ;
++ part.sys_ind = 6 ;
++ part.end_head = bootParams->numHeads ;
++ part.end_sector = 0xe0 ;
++ part.end_cyl = 0xc9 ;
++ part.start_sect = 0 ;
++ part.nr_sects = bootParams->totalSectors32 ;
++ printf( "partition info found at block %u\n", i );
++ printf( "boot:%02x head:%02x sec:%02x cyl:%02x sys:%02x endh:%02x ends:%02x endc:%02x start:%08x, count:%08x\n",
++ part.boot_ind, part.head, part.sector, part.cyl,
++ part.sys_ind, part.end_head, part.end_sector, part.end_cyl,
++ part.start_sect, part.nr_sects );
++ printf( "MBR found at block %d\n", i );
++ return 0 ;
++ }
++ }
++ }
++ else
++ {
++ printf( "!!! Error reading mmc block %u\n", i );
++ break;
++ }
++ }
++
++ printf( "MBR not found!\n" );
++ return -1 ;
++}
++
+ int
+ /****************************************************/
+ mmc_init(int verbose)
+@@ -406,7 +741,8 @@
+ {
+ int retries, rc = -ENODEV;
+ uchar *resp;
+-
++ mmc_cid_t *cid ;
++ mmc_csd_t *csd ;
+ #ifdef CONFIG_LUBBOCK
+ set_GPIO_mode( GPIO6_MMCCLK_MD );
+ set_GPIO_mode( GPIO8_MMCCS0_MD );
+@@ -419,23 +755,63 @@
+ MMC_RESTO = MMC_RES_TO_MAX;
+ MMC_SPI = MMC_SPI_DISABLE;
+
++ if( 0 == SDCard_test() )
++ {
++ printf( "SD card detected!\n" );
++ isSD = 1 ;
++ }
++ else
++ {
++ isSD = 0 ;
++
+ /* reset */
+- retries = 10;
+- resp = mmc_cmd(0, 0, 0, 0);
++ mmc_cmd(0, 0, 0, 0);
+ resp = mmc_cmd(1, 0x00ff, 0xc000, MMC_CMDAT_INIT|MMC_CMDAT_BUSY|MMC_CMDAT_R3);
+- while (retries-- && resp && !(resp[4] & 0x80))
++ if( 0 == resp )
++ {
++ printf( "MMC CMD1 error\n" );
++ return -1 ;
++ }
++
++ printf( "init: " ); dumpResponse( resp, 6 );
++ retries = 0 ;
++ do
+ {
+- debug("resp %x %x\n", resp[0], resp[1]);
+- udelay(50);
++ udelay(100);
+ resp = mmc_cmd(1, 0x00ff, 0xff00, MMC_CMDAT_BUSY|MMC_CMDAT_R3);
++ debug( "cmd1: " ); dumpResponse( resp, 6 );
++ retries++ ;
++ } while( resp && ( 0 == ( resp[4] & 0x80 ) ) );
++
++ if( 0 == resp )
++ {
++ printf( "MMC CMD1 error2\n" );
++ return -1 ;
++ }
++
++ do {
++ udelay(100);
++ resp = mmc_cmd(1, 0x00ff, 0xff00, MMC_CMDAT_BUSY|MMC_CMDAT_R3);
++ debug( "cmd1: " ); dumpResponse( resp, 6 );
++ retries++ ;
++ } while( resp && ( 0 != ( resp[4] & 0x80 ) ) );
++
++ printf( "after busy: %s, %d retries\n",
++ resp ? "have INIT response"
++ : "no INIT response",
++ retries );
+ }
+
+ /* try to get card id */
+ resp = mmc_cmd(2, 0, 0, MMC_CMDAT_R2);
+- if (resp)
++ if( !resp )
+ {
++ printf( "Bad CMDAT_R2 response\n" );
++ return -1 ;
++ }
++
+ /* TODO configure mmc driver depending on card attributes */
+- mmc_cid_t *cid = (mmc_cid_t *)resp;
++ cid = (mmc_cid_t *)resp;
+ if (verbose)
+ {
+ printf("MMC found. Card desciption is:\n");
+@@ -449,6 +825,12 @@
+ printf("Month = %d\n",cid->month);
+ printf("Year = %d\n",1997 + cid->year);
+ }
++ sprintf(mmc_dev.product,"%s",cid->name);
++ sprintf(mmc_dev.vendor,"Man %02x%02x%02x Snr %02x%02x%02x",
++ cid->id[0], cid->id[1], cid->id[2],
++ cid->sn[0], cid->sn[1], cid->sn[2]);
++ sprintf(mmc_dev.revision,"%x %x",cid->hwrev, cid->fwrev);
++
+ /* fill in device description */
+ mmc_dev.if_type = IF_TYPE_MMC;
+ mmc_dev.dev = 0;
+@@ -457,30 +839,118 @@
+ /* FIXME fill in the correct size (is set to 32MByte) */
+ mmc_dev.blksz = 512;
+ mmc_dev.lba = 0x10000;
+- sprintf(mmc_dev.vendor,"Man %02x%02x%02x Snr %02x%02x%02x",
+- cid->id[0], cid->id[1], cid->id[2],
+- cid->sn[0], cid->sn[1], cid->sn[2]);
+- sprintf(mmc_dev.product,"%s",cid->name);
+- sprintf(mmc_dev.revision,"%x %x",cid->hwrev, cid->fwrev);
+ mmc_dev.removable = 0;
+ mmc_dev.block_read = mmc_bread;
+
+ /* MMC exists, get CSD too */
+ resp = mmc_cmd(MMC_CMD_SET_RCA, MMC_DEFAULT_RCA, 0, MMC_CMDAT_R1);
+- resp = mmc_cmd(MMC_CMD_SEND_CSD, MMC_DEFAULT_RCA, 0, MMC_CMDAT_R2);
+- if (resp)
++
++ if( resp )
+ {
+- mmc_csd_t *csd = (mmc_csd_t *)resp;
+- memcpy(&mmc_csd, csd, sizeof(csd));
+- rc = 0;
+- mmc_ready = 1;
+- /* FIXME add verbose printout for csd */
++ if( isSD )
++ RCA = ((ushort)resp[4] << 8 ) | resp[3];
++ else
++ RCA = MMC_DEFAULT_RCA ;
+ }
++ else
++ {
++ printf( "no SET_RCA response\n" );
++ return -1 ;
+ }
+
++#if 0
++/*
++ * According to a Toshiba doc, the following is supposed to give
++ * the size of the 'protected' area (so we can ignore it).
++
++ * Unfortunately, I can't get the numbers to add up, so we walk
++ * til we find an MBR instead.
++ */
++ if( isSD )
++ {
++ printf( "sending CMD55\n" );
++ resp = mmc_cmd(SD_APP_CMD55, RCA, 0, MMC_CMDAT_R1);
++ if( !resp )
++ {
++ printf( "Error 0x%04x sending APP CMD\n", MMC_STAT );
++ return -1 ;
++ }
++ else
++ {
++ printf( "have CMD55 response\n" );
++ memset( resp, 0, 20 );
++ }
++
++ resp = mmc_cmd(SD_STATUS, RCA, 0, MMC_CMDAT_R1 );
++ if( resp )
++ {
++ sd_status_t *status ;
++ int i ;
++ printf( "SDSTATUS returned\n" );
++ for( i = 0 ; i < 16 ; i++ )
++ printf( "%02x ", resp[i] );
++ printf( "\n" );
++ status = (sd_status_t *)resp ;
++ printf( "bus_width: %u\n", status->bus_width );
++ printf( "secured_mode: %u\n", status->secured_mode );
++ printf( "unused0: %x\n", status->unused0 );
++ printf( "card_type: %x\n", status->card_type );
++ printf( "prot_size: %lx\n", status->prot_size );
++ }
++ else
++ {
++ printf( "Error reading SD_STATUS\n" );
++ return -1 ;
++ }
++ }
++#endif
++
++ MMC_STRPCL = MMC_STRPCL_STOP_CLK;
++ MMC_I_MASK = ~MMC_I_MASK_CLK_IS_OFF;
++ while (!(MMC_I_REG & MMC_I_REG_CLK_IS_OFF));
++
+ MMC_CLKRT = 0; /* 20 MHz */
+- resp = mmc_cmd(7, MMC_DEFAULT_RCA, 0, MMC_CMDAT_R1);
++ resp = mmc_cmd(7, RCA, 0, MMC_CMDAT_R1);
++ if( !resp )
++ {
++ printf( "Error selecting RCA %x\n", RCA );
++ return -1 ;
++ }
++
++ resp = mmc_cmd(7, 0, 0, MMC_CMDAT_R1);
++ if( !resp )
++ {
++ // this is normal
++ }
++
++ resp = mmc_cmd(MMC_CMD_SEND_CSD, RCA, 0, MMC_CMDAT_R2);
++ if (!resp)
++ {
++ printf( "Error reading CSD\n" );
++ return -1 ;
++ }
++
++ csd = (mmc_csd_t *)resp;
++ memcpy(&mmc_csd, csd, sizeof(*csd));
++ rc = 0;
++
++#ifdef DEBUG
++ dumpResponse( resp, sizeof( *csd ) );
++ print_mmc_csd( csd );
++#endif
++
++ resp = mmc_cmd(7, RCA, 0, MMC_CMDAT_R1);
++ if( !resp )
++ {
++ printf( "Error selecting RCA %x\n", RCA );
++ return -1 ;
++ }
++
++ mmc_ready = 1;
++ startBlock = find_mbr(mmc_csd.c_size);
+
++ printf( "registering device: startBlock == %d, isSD ? %s\n",
++ startBlock, isSD ? "yes" : "no" );
+ fat_register_device(&mmc_dev,1); /* partitions start counting with 1 */
+
+ return rc;
+@@ -503,4 +973,41 @@
+ return 0;
+ }
+
++#if (CONFIG_COMMANDS & CFG_CMD_MMC)
++
++int do_mmc_detect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ unsigned long gplr1 = GPLR1 ;
++ int rval = ( 0 != (gplr1 & 0x10) );
++#ifdef DEBUG
++ printf ("Checking for MMC card: %lx, %d\n", gplr1, rval );
++#endif
++ return rval ;
++}
++
++U_BOOT_CMD(
++ mmcdet, 1, 0, do_mmc_detect,
++ "mmcdet - detect mmc card\n",
++ NULL
++);
++
++int do_mmc_wp (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
++{
++ unsigned long gplr1 = GPLR1 ;
++ int rval = ( 0 == (gplr1 & 0x40) );
++#ifdef DEBUG
++ printf ("Checking MMC write protect: %lx, %d\n", gplr1, rval );
++#endif
++ return rval ;
++}
++
++U_BOOT_CMD(
++ mmcwp, 1, 0, do_mmc_wp,
++ "mmcwp - detect mmc write protect\n",
++ NULL
++);
++
++#endif
++
+ #endif
++
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/pxafb.c u-boot-1.1.2-neon/cpu/pxa/pxafb.c
+--- u-boot-1.1.2/cpu/pxa/pxafb.c 2004-10-10 01:26:00.000000000 +0200
++++ u-boot-1.1.2-neon/cpu/pxa/pxafb.c 2007-08-11 21:07:20.000000000 +0200
+@@ -36,6 +36,10 @@
+ #include <lcd.h>
+ #include <asm/arch/pxa-regs.h>
+
++#ifdef CFG_CMD_LCDPANEL
++#include <lcd_panels.h>
++#endif
++
+ /* #define DEBUG */
+
+ #ifdef CONFIG_LCD
+@@ -147,6 +151,38 @@
+ #endif /* CONFIG_HITACHI_SX14 */
+
+ /*----------------------------------------------------------------------*/
++#ifdef CONFIG_SHARP_QVGA
++/* Sharp 1/4 VGA LCD */
++#define LCD_BPP LCD_COLOR8
++
++/* you have to set lccr0 and lccr3 (including pcd) */
++#define REG_LCCR0 0x003008F8
++#define REG_LCCR3 (0x0040FF0C|(LCD_BPP<<24))
++
++vidinfo_t panel_info = {
++ vl_col: 320,
++ vl_row: 240,
++ vl_width: 167,
++ vl_height: 109,
++ vl_clkp: CFG_HIGH,
++ vl_oep: CFG_HIGH,
++ vl_hsp: CFG_HIGH,
++ vl_vsp: CFG_HIGH,
++ vl_dp: CFG_HIGH,
++ vl_bpix: LCD_BPP,
++ vl_lbw: 1,
++ vl_splt: 0,
++ vl_clor: 1,
++ vl_tft: 1,
++ vl_hpw: 64,
++ vl_blw: 34,
++ vl_elw: 1,
++ vl_vpw: 20,
++ vl_bfw: 8,
++ vl_efw: 3,
++};
++#endif /* CONFIG_SHARP_QVGA */
++
+
+ #if LCD_BPP == LCD_COLOR8
+ void lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue);
+@@ -163,7 +199,6 @@
+ void lcd_ctrl_init (void *lcdbase);
+ void lcd_enable (void);
+
+-int lcd_line_length;
+ int lcd_color_fg;
+ int lcd_color_bg;
+
+@@ -185,10 +220,28 @@
+
+ void lcd_ctrl_init (void *lcdbase)
+ {
++#ifdef CFG_CMD_LCDPANEL
++ char const *panelName = getenv( "panel" );
++ if( panelName )
++ {
++ struct lcd_panel_info_t const *panel ;
++ panel = find_lcd_panel( panelName );
++ if( panel )
++ {
++ printf( "panel %s found: %u x %u\n", panelName, panel->xres, panel->yres );
++ panel_info.pxa.screen = (u_long)lcdbase;
++ set_lcd_panel( panel );
++ }
++ else
++ printf( "panel %s not found\n", panelName );
++ }
++#else
+ pxafb_init_mem(lcdbase, &panel_info);
+ pxafb_init(&panel_info);
+ pxafb_setup_gpio(&panel_info);
+ pxafb_enable_controller(&panel_info);
++#endif
++
+ }
+
+ /*----------------------------------------------------------------------*/
+@@ -204,6 +257,7 @@
+ void
+ lcd_setcolreg (ushort regno, ushort red, ushort green, ushort blue)
+ {
++#if defined( CONFIG_PXA250 )
+ struct pxafb_info *fbi = &panel_info.pxa;
+ unsigned short *palette = (unsigned short *)fbi->palette;
+ u_int val;
+@@ -219,7 +273,22 @@
+ palette[regno] = val;
+ #endif
+ }
++#elif defined( CONFIG_PXA270 )
++ struct pxafb_info *fbi = &panel_info.pxa;
++ u32 *palette = (u32 *)fbi->palette;
++ u32 val;
++
++ if (regno < fbi->palette_size) {
++ val = 0xFF000000 ; // transparency
++ val |= (red << 16);
++ val |= (green << 8);
++ val |= blue ;
+
++ palette[regno] = val;
++ }
++#else
++#error no processor defined
++#endif
+ debug ("setcolreg: reg %2d @ %p: R=%02X G=%02X B=%02X => %04X\n",
+ regno, &palette[regno],
+ red, green, blue,
+@@ -284,7 +353,7 @@
+ fbi->screen = (u_long)lcdbase;
+
+ fbi->palette_size = NBITS(vid->vl_bpix) == 8 ? 256 : 16;
+- palette_mem_size = fbi->palette_size * sizeof(u16);
++ palette_mem_size = fbi->palette_size * sizeof(PALETTEVAL_TYPE);
+
+ debug("palette_mem_size = 0x%08lx\n", (u_long) palette_mem_size);
+ /* locate palette and descs at end of page following fb */
+@@ -376,11 +445,16 @@
+ static int pxafb_init (vidinfo_t *vid)
+ {
+ struct pxafb_info *fbi = &vid->pxa;
++ unsigned long const REG_LCCR3 = 0x0040FF0C|(LCD_BPP<<24);
+
+ debug("Configuring PXA LCD\n");
+
+- fbi->reg_lccr0 = REG_LCCR0;
+- fbi->reg_lccr3 = REG_LCCR3;
++#if defined( CONFIG_PXA270 )
++ LCCR4 = 0x00010000 ;
++#endif
++
++ fbi->reg_lccr0 = 0x003008F8;
++ fbi->reg_lccr3 = REG_LCCR3 ;
+
+ debug("vid: vl_col=%d hslen=%d lm=%d rm=%d\n",
+ vid->vl_col, vid->vl_hpw,
+@@ -429,7 +503,7 @@
+
+ fbi->dmadesc_palette->fsadr = fbi->palette;
+ fbi->dmadesc_palette->fidr = 0;
+- fbi->dmadesc_palette->ldcmd = (fbi->palette_size * 2) | LDCMD_PAL;
++ fbi->dmadesc_palette->ldcmd = (fbi->palette_size * sizeof(PALETTEVAL_TYPE)) | LDCMD_PAL;
+
+ if( NBITS(vid->vl_bpix) < 12)
+ {
+@@ -465,6 +539,39 @@
+ return 0;
+ }
+
++
++#ifdef CFG_CMD_LCDPANEL
++
++void set_lcd_panel( struct lcd_panel_info_t const *panel )
++{
++ panel_info.vl_col = panel->xres ;
++ panel_info.vl_row = panel->yres ;
++ panel_info.vl_clkp = panel->act_high ;
++ panel_info.vl_oep = panel->act_high ;
++ panel_info.vl_hsp = panel->act_high ;
++ panel_info.vl_vsp = panel->act_high ;
++ panel_info.vl_dp = panel->act_high ;
++ panel_info.vl_bpix = LCD_BPP ;
++ panel_info.vl_lcd_line_length = (panel_info.vl_col * NBITS (panel_info.vl_bpix)) >> 3;
++ panel_info.vl_lbw = 1 ;
++ panel_info.vl_splt = 0 ;
++ panel_info.vl_clor = 1 ;
++ panel_info.vl_tft = panel->active ;
++ panel_info.vl_hpw = panel->hsync_len ;
++ panel_info.vl_blw = panel->left_margin ;
++ panel_info.vl_elw = panel->right_margin ;
++ panel_info.vl_vpw = panel->vsync_len ;
++ panel_info.vl_bfw = panel->upper_margin ;
++ panel_info.vl_efw = panel->lower_margin ;
++
++ pxafb_init_mem( (void *)panel_info.pxa.screen, &panel_info);
++ pxafb_init(&panel_info);
++ pxafb_setup_gpio(&panel_info);
++ pxafb_enable_controller(&panel_info);
++}
++
++#endif // dynamic LCD panel support
++
+ /************************************************************************/
+ /************************************************************************/
+
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/sm501_usb.h u-boot-1.1.2-neon/cpu/pxa/sm501_usb.h
+--- u-boot-1.1.2/cpu/pxa/sm501_usb.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/cpu/pxa/sm501_usb.h 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,66 @@
++#ifndef SM501_USB_INCLUDED
++#define SM501_USB_INCLUDED
++
++ #if defined(CONFIG_SM501)
++ #define USB_GATE_MODE0 __REG(0xFE00040)
++ #define USB_GATE_MODE1 __REG(0xFE00048)
++ #define ENABLE_USBH (1<<11)
++
++ /*
++ * USB Host Controller
++ */
++ #define USBH_BASE 0xFE40000
++ #define UHCREV __REG(0xFE40000)
++ #define UHCHCON __REG(0xFE40004)
++ #define UHCCOMS __REG(0xFE40008)
++ #define UHCINTS __REG(0xFE4000C)
++ #define UHCINTE __REG(0xFE40010)
++ #define UHCINTD __REG(0xFE40014)
++ #define UHCHCCA __REG(0xFE40018)
++ #define UHCPCED __REG(0xFE4001C)
++ #define UHCCHED __REG(0xFE40020)
++ #define UHCCCED __REG(0xFE40024)
++ #define UHCBHED __REG(0xFE40028)
++ #define UHCBCED __REG(0xFE4002C)
++ #define UHCDHEAD __REG(0xFE40030)
++ #define UHCFMI __REG(0xFE40034)
++ #define UHCFMR __REG(0xFE40038)
++ #define UHCFMN __REG(0xFE4003C)
++ #define UHCPERS __REG(0xFE40040)
++ #define UHCLST __REG(0xFE40044)
++ #define UHCRHDA __REG(0xFE40048)
++ #define UHCRHDB __REG(0xFE4004C)
++ #define UHCRHS __REG(0xFE40050)
++ #define UHCRHPS1 __REG(0xFE40054)
++ #define UHCRHPS2 __REG(0xFE40058)
++ #define UHCRHPS3 __REG(0xFE4005C)
++ #define UHCSTAT __REG(0xFE40060)
++ #define UHCHR __REG(0xFE40064)
++ #define UHCHIE __REG(0xFE40068)
++ #define UHCHIT __REG(0xFE4006C)
++
++ #define UHCHR_FSBIR (1<<0)
++ #define UHCHR_FHR (1<<1)
++ #define UHCHR_CGR (1<<2)
++ #define UHCHR_SSDC (1<<3)
++ #define UHCHR_UIT (1<<4)
++ #define UHCHR_SSE (1<<5)
++ #define UHCHR_PSPL (1<<6)
++ #define UHCHR_PCPL (1<<7)
++ #define UHCHR_SSEP0 (1<<9)
++ #define UHCHR_SSEP1 (1<<10)
++ #define UHCHR_SSEP2 (1<<11)
++
++ #define UHCHIE_UPRIE (1<<13)
++ #define UHCHIE_UPS2IE (1<<12)
++ #define UHCHIE_UPS1IE (1<<11)
++ #define UHCHIE_TAIE (1<<10)
++ #define UHCHIE_HBAIE (1<<8)
++ #define UHCHIE_RWIE (1<<7)
++
++ #define UHCCOMS_HCR 1
++ #define UHCRHS_LPS 1
++ #define UHCHR_SSE (1<<5)
++
++ #endif
++#endif
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/start.S u-boot-1.1.2-neon/cpu/pxa/start.S
+--- u-boot-1.1.2/cpu/pxa/start.S 2004-06-09 02:11:02.000000000 +0200
++++ u-boot-1.1.2-neon/cpu/pxa/start.S 2007-08-11 21:07:20.000000000 +0200
+@@ -61,23 +61,10 @@
+ * - jump to second stage
+ */
+
+-_TEXT_BASE:
+- .word TEXT_BASE
+
+-.globl _armboot_start
+-_armboot_start:
+- .word _start
++_textBase:
++ .word TEXT_BASE
+
+-/*
+- * These are defined in the board-specific linker script.
+- */
+-.globl _bss_start
+-_bss_start:
+- .word __bss_start
+-
+-.globl _bss_end
+-_bss_end:
+- .word _end
+
+ #ifdef CONFIG_USE_IRQ
+ /* IRQ stack memory (calculated at run-time) */
+@@ -111,47 +98,9 @@
+ #ifdef CONFIG_INIT_CRITICAL
+ bl cpu_init_crit /* we do sys-critical inits */
+ #endif
++ b HeadStart
+
+-relocate: /* relocate U-Boot to RAM */
+- adr r0, _start /* r0 <- current position of code */
+- ldr r1, _TEXT_BASE /* test if we run from flash or RAM */
+- cmp r0, r1 /* don't reloc during debug */
+- beq stack_setup
+-
+- ldr r2, _armboot_start
+- ldr r3, _bss_start
+- sub r2, r3, r2 /* r2 <- size of armboot */
+- add r2, r0, r2 /* r2 <- source end address */
+-
+-copy_loop:
+- ldmia r0!, {r3-r10} /* copy from source address [r0] */
+- stmia r1!, {r3-r10} /* copy to target address [r1] */
+- cmp r0, r2 /* until source end addreee [r2] */
+- ble copy_loop
+-
+- /* Set up the stack */
+-stack_setup:
+- ldr r0, _TEXT_BASE /* upper 128 KiB: relocated uboot */
+- sub r0, r0, #CFG_MALLOC_LEN /* malloc area */
+- sub r0, r0, #CFG_GBL_DATA_SIZE /* bdinfo */
+-#ifdef CONFIG_USE_IRQ
+- sub r0, r0, #(CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ)
+-#endif
+- sub sp, r0, #12 /* leave 3 words for abort-stack */
+-
+-clear_bss:
+- ldr r0, _bss_start /* find start of bss segment */
+- ldr r1, _bss_end /* stop here */
+- mov r2, #0x00000000 /* clear */
+
+-clbss_l:str r2, [r0] /* clear loop... */
+- add r0, r0, #4
+- cmp r0, r1
+- bne clbss_l
+-
+- ldr pc, _start_armboot
+-
+-_start_armboot: .word start_armboot
+
+
+ /****************************************************************************/
+@@ -167,16 +116,7 @@
+ IC_BASE: .word 0x40d00000
+ #define ICMR 0x04
+
+-/* Reset-Controller */
+-RST_BASE: .word 0x40f00030
+-#define RCSR 0x00
+-
+-/* Operating System Timer */
+-OSTIMER_BASE: .word 0x40a00000
+-#define OSMR3 0x0C
+-#define OSCR 0x10
+-#define OWER 0x18
+-#define OIER 0x1C
++
+
+ /* Clock Manager Registers */
+ #ifdef CFG_CPUSPEED
+@@ -288,7 +228,7 @@
+ stmia sp, {r0 - r12} /* Calling r0-r12 */
+ add r8, sp, #S_PC
+
+- ldr r2, _armboot_start
++ ldr r2, _textBase
+ sub r2, r2, #(CONFIG_STACKSIZE+CFG_MALLOC_LEN)
+ sub r2, r2, #(CFG_GBL_DATA_SIZE+8) @ set base 2 words into abort stack
+ ldmia r2, {r2 - r4} /* get pc, cpsr, old_r0 */
+@@ -325,7 +265,7 @@
+ .endm
+
+ .macro get_bad_stack
+- ldr r13, _armboot_start @ setup our mode stack
++ ldr r13, _textBase @ setup our mode stack
+ sub r13, r13, #(CONFIG_STACKSIZE+CFG_MALLOC_LEN)
+ sub r13, r13, #(CFG_GBL_DATA_SIZE+8) @ reserved a couple spots in abort stack
+
+@@ -416,36 +356,3 @@
+
+ #endif
+
+-/****************************************************************************/
+-/* */
+-/* Reset function: the PXA250 doesn't have a reset function, so we have to */
+-/* perform a watchdog timeout for a soft reset. */
+-/* */
+-/****************************************************************************/
+-
+- .align 5
+-.globl reset_cpu
+-
+- /* FIXME: this code is PXA250 specific. How is this handled on */
+- /* other XScale processors? */
+-
+-reset_cpu:
+-
+- /* We set OWE:WME (watchdog enable) and wait until timeout happens */
+-
+- ldr r0, OSTIMER_BASE
+- ldr r1, [r0, #OWER]
+- orr r1, r1, #0x0001 /* bit0: WME */
+- str r1, [r0, #OWER]
+-
+- /* OS timer does only wrap every 1165 seconds, so we have to set */
+- /* the match register as well. */
+-
+- ldr r1, [r0, #OSCR] /* read OS timer */
+- add r1, r1, #0x800 /* let OSMR3 match after */
+- add r1, r1, #0x800 /* 4096*(1/3.6864MHz)=1ms */
+- str r1, [r0, #OSMR3]
+-
+-reset_endless:
+-
+- b reset_endless
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/usb_ohci.c u-boot-1.1.2-neon/cpu/pxa/usb_ohci.c
+--- u-boot-1.1.2/cpu/pxa/usb_ohci.c 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/cpu/pxa/usb_ohci.c 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,1679 @@
++/*
++ * URB OHCI HCD (Host Controller Driver) for USB on the S3C2400.
++ *
++ * (C) Copyright 2003
++ * Gary Jennejohn, DENX Software Engineering <gj@denx.de>
++ *
++ * See file CREDITS for list of people who contributed to this
++ * project.
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ * MA 02111-1307 USA
++ *
++ * Note: Part of this code has been derived from linux
++ *
++ */
++/*
++ * IMPORTANT NOTES
++ * 1 - you MUST define LITTLEENDIAN in the configuration file for the
++ * board or this driver will NOT work!
++ * 2 - this driver is intended for use with USB Mass Storage Devices
++ * (BBB) ONLY. There is NO support for Interrupt or Isochronous pipes!
++ */
++
++#include <common.h>
++/* #include <pci.h> no PCI on the S3C24X0 */
++
++#ifdef CONFIG_USB_OHCI
++
++#include <asm/arch/pxa-regs.h>
++
++#include <malloc.h>
++#include <usb.h>
++#include "usb_ohci.h"
++
++#if defined( CONFIG_SM501 )
++#include "sm501_usb.h"
++#endif
++
++// #define OHCI_USE_NPS /* force NoPowerSwitching mode */
++// #define OHCI_VERBOSE_DEBUG /* not always helpful */
++
++
++/* For initializing controller (mask in an HCFS mode too) */
++#define OHCI_CONTROL_INIT \
++ (OHCI_CTRL_CBSR & 0x3) | OHCI_CTRL_IE | OHCI_CTRL_PLE
++
++#define readl(a) (*((vu_long *)(a)))
++#define writel(a, b) (*((vu_long *)(b)) = ((vu_long)a))
++
++#define min_t(type,x,y) ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
++
++//#define DEBUG
++#ifdef DEBUG
++#define dbg(format, arg...) printf("DEBUG: " format "\n", ## arg)
++#else
++#define dbg(format, arg...) do {} while(0)
++#endif /* DEBUG */
++#define err(format, arg...) printf("ERROR: " format "\n", ## arg)
++#define SHOW_INFO
++#ifdef SHOW_INFO
++#define info(format, arg...) printf("INFO: " format "\n", ## arg)
++#else
++#define info(format, arg...) do {} while(0)
++#endif
++
++#define m16_swap(x) swap_16(x)
++#define m32_swap(x) swap_32(x)
++
++/* global ohci_t */
++static ohci_t gohci;
++/* this must be aligned to a 256 byte boundary */
++struct ohci_hcca ghcca[1];
++/* a pointer to the aligned storage */
++struct ohci_hcca *phcca;
++/* this allocates EDs for all possible endpoints */
++struct ohci_device ohci_dev;
++/* urb_priv */
++urb_priv_t urb_priv;
++/* RHSC flag */
++int got_rhsc;
++/* device which was disconnected */
++struct usb_device *devgone;
++
++/*-------------------------------------------------------------------------*/
++
++/* AMD-756 (D2 rev) reports corrupt register contents in some cases.
++ * The erratum (#4) description is incorrect. AMD's workaround waits
++ * till some bits (mostly reserved) are clear; ok for all revs.
++ */
++#define OHCI_QUIRK_AMD756 0xabcd
++#define read_roothub(hc, register, mask) ({ \
++ u32 temp = readl (&hc->regs->roothub.register); \
++ if (hc->flags & OHCI_QUIRK_AMD756) \
++ while (temp & mask) \
++ temp = readl (&hc->regs->roothub.register); \
++ temp; })
++
++static u32 roothub_a (struct ohci *hc)
++ { return read_roothub (hc, a, 0xfc0fe000); }
++static inline u32 roothub_b (struct ohci *hc)
++ { return readl (&hc->regs->roothub.b); }
++static inline u32 roothub_status (struct ohci *hc)
++ { return readl (&hc->regs->roothub.status); }
++static u32 roothub_portstatus (struct ohci *hc, int i)
++ { return read_roothub (hc, portstatus [i], 0xffe0fce0); }
++
++
++/* forward declaration */
++static int hc_interrupt (void);
++static void
++td_submit_job (struct usb_device * dev, unsigned long pipe, void * buffer,
++ int transfer_len, struct devrequest * setup, urb_priv_t * urb, int interval);
++
++/*-------------------------------------------------------------------------*
++ * URB support functions
++ *-------------------------------------------------------------------------*/
++
++/* free HCD-private data associated with this URB */
++
++static void urb_free_priv (urb_priv_t * urb)
++{
++ int i;
++ int last;
++ struct td * td;
++
++ last = urb->length - 1;
++ if (last >= 0) {
++ for (i = 0; i <= last; i++) {
++ td = urb->td[i];
++ if (td) {
++ td->usb_dev = NULL;
++ urb->td[i] = NULL;
++ }
++ }
++ }
++}
++
++/*-------------------------------------------------------------------------*/
++
++#ifdef DEBUG
++static int sohci_get_current_frame_number (struct usb_device * dev);
++
++/* debug| print the main components of an URB
++ * small: 0) header + data packets 1) just header */
++
++static void pkt_print (struct usb_device * dev, unsigned long pipe, void * buffer,
++ int transfer_len, struct devrequest * setup, char * str, int small)
++{
++ urb_priv_t * purb = &urb_priv;
++
++ dbg("%s URB:[%4x] dev:%2d,ep:%2d-%c,type:%s,len:%d/%d stat:%#lx",
++ str,
++ sohci_get_current_frame_number (dev),
++ usb_pipedevice (pipe),
++ usb_pipeendpoint (pipe),
++ usb_pipeout (pipe)? 'O': 'I',
++ usb_pipetype (pipe) < 2? (usb_pipeint (pipe)? "INTR": "ISOC"):
++ (usb_pipecontrol (pipe)? "CTRL": "BULK"),
++ purb->actual_length,
++ transfer_len, dev->status);
++#ifdef OHCI_VERBOSE_DEBUG
++ if (!small) {
++ int i, len;
++
++ if (usb_pipecontrol (pipe)) {
++ printf (__FILE__ ": cmd(8):");
++ for (i = 0; i < 8 ; i++)
++ printf (" %02x", ((__u8 *) setup) [i]);
++ printf ("\n");
++ }
++ if (transfer_len > 0 && buffer) {
++ printf (__FILE__ ": data(%d/%d):",
++ purb->actual_length,
++ transfer_len);
++ len = usb_pipeout (pipe)?
++ transfer_len: purb->actual_length;
++ for (i = 0; i < 16 && i < len; i++)
++ printf (" %02x", ((__u8 *) buffer) [i]);
++ printf ("%s\n", i < len? "...": "");
++ }
++ }
++#endif
++}
++
++/* just for debugging; prints non-empty branches of the int ed tree inclusive iso eds*/
++void ep_print_int_eds (ohci_t *ohci, char * str) {
++ int i, j;
++ __u32 * ed_p;
++ for (i= 0; i < 32; i++) {
++ j = 5;
++ ed_p = &(ohci->hcca->int_table [i]);
++ if (*ed_p == 0)
++ continue;
++ printf (__FILE__ ": %s branch int %2d(%2x):", str, i, i);
++ while (*ed_p != 0 && j--) {
++ ed_t *ed = (ed_t *)m32_swap(ed_p);
++ printf (" ed: %4x;", ed->hwINFO);
++ ed_p = &ed->hwNextED;
++ }
++ printf ("\n");
++ }
++}
++
++static void ohci_dump_intr_mask (char *label, __u32 mask)
++{
++ dbg ("%s: 0x%08x%s%s%s%s%s%s%s%s%s",
++ label,
++ mask,
++ (mask & OHCI_INTR_MIE) ? " MIE" : "",
++ (mask & OHCI_INTR_OC) ? " OC" : "",
++ (mask & OHCI_INTR_RHSC) ? " RHSC" : "",
++ (mask & OHCI_INTR_FNO) ? " FNO" : "",
++ (mask & OHCI_INTR_UE) ? " UE" : "",
++ (mask & OHCI_INTR_RD) ? " RD" : "",
++ (mask & OHCI_INTR_SF) ? " SF" : "",
++ (mask & OHCI_INTR_WDH) ? " WDH" : "",
++ (mask & OHCI_INTR_SO) ? " SO" : ""
++ );
++}
++
++static void maybe_print_eds (char *label, __u32 value)
++{
++ ed_t *edp = (ed_t *)value;
++
++ if (value) {
++ dbg ("%s %08x", label, value);
++ dbg ("%08x", edp->hwINFO);
++ dbg ("%08x", edp->hwTailP);
++ dbg ("%08x", edp->hwHeadP);
++ dbg ("%08x", edp->hwNextED);
++ }
++}
++
++static char * hcfs2string (int state)
++{
++ switch (state) {
++ case OHCI_USB_RESET: return "reset";
++ case OHCI_USB_RESUME: return "resume";
++ case OHCI_USB_OPER: return "operational";
++ case OHCI_USB_SUSPEND: return "suspend";
++ }
++ return "?";
++}
++
++/* dump control and status registers */
++static void ohci_dump_status (ohci_t *controller)
++{
++ struct ohci_regs *regs = controller->regs;
++ __u32 temp;
++
++ temp = readl (&regs->revision) & 0xff;
++ if (temp != 0x10)
++ dbg ("spec %d.%d", (temp >> 4), (temp & 0x0f));
++
++ temp = readl (&regs->control);
++ dbg ("control: 0x%08x%s%s%s HCFS=%s%s%s%s%s CBSR=%d", temp,
++ (temp & OHCI_CTRL_RWE) ? " RWE" : "",
++ (temp & OHCI_CTRL_RWC) ? " RWC" : "",
++ (temp & OHCI_CTRL_IR) ? " IR" : "",
++ hcfs2string (temp & OHCI_CTRL_HCFS),
++ (temp & OHCI_CTRL_BLE) ? " BLE" : "",
++ (temp & OHCI_CTRL_CLE) ? " CLE" : "",
++ (temp & OHCI_CTRL_IE) ? " IE" : "",
++ (temp & OHCI_CTRL_PLE) ? " PLE" : "",
++ temp & OHCI_CTRL_CBSR
++ );
++
++ temp = readl (&regs->cmdstatus);
++ dbg ("cmdstatus: 0x%08x SOC=%d%s%s%s%s", temp,
++ (temp & OHCI_SOC) >> 16,
++ (temp & OHCI_OCR) ? " OCR" : "",
++ (temp & OHCI_BLF) ? " BLF" : "",
++ (temp & OHCI_CLF) ? " CLF" : "",
++ (temp & OHCI_HCR) ? " HCR" : ""
++ );
++
++ ohci_dump_intr_mask ("intrstatus", readl (&regs->intrstatus));
++ ohci_dump_intr_mask ("intrenable", readl (&regs->intrenable));
++
++ maybe_print_eds ("ed_periodcurrent", readl (&regs->ed_periodcurrent));
++
++ maybe_print_eds ("ed_controlhead", readl (&regs->ed_controlhead));
++ maybe_print_eds ("ed_controlcurrent", readl (&regs->ed_controlcurrent));
++
++ maybe_print_eds ("ed_bulkhead", readl (&regs->ed_bulkhead));
++ maybe_print_eds ("ed_bulkcurrent", readl (&regs->ed_bulkcurrent));
++
++ maybe_print_eds ("donehead", readl (&regs->donehead));
++}
++
++static void ohci_dump_roothub (ohci_t *controller, int verbose)
++{
++ __u32 temp, ndp, i;
++
++ temp = roothub_a (controller);
++ ndp = (temp & RH_A_NDP);
++
++ if (verbose) {
++ dbg ("roothub.a: %08x POTPGT=%d%s%s%s%s%s NDP=%d", temp,
++ ((temp & RH_A_POTPGT) >> 24) & 0xff,
++ (temp & RH_A_NOCP) ? " NOCP" : "",
++ (temp & RH_A_OCPM) ? " OCPM" : "",
++ (temp & RH_A_DT) ? " DT" : "",
++ (temp & RH_A_NPS) ? " NPS" : "",
++ (temp & RH_A_PSM) ? " PSM" : "",
++ ndp
++ );
++ temp = roothub_b (controller);
++ dbg ("roothub.b: %08x PPCM=%04x DR=%04x",
++ temp,
++ (temp & RH_B_PPCM) >> 16,
++ (temp & RH_B_DR)
++ );
++ temp = roothub_status (controller);
++ dbg ("roothub.status: %08x%s%s%s%s%s%s",
++ temp,
++ (temp & RH_HS_CRWE) ? " CRWE" : "",
++ (temp & RH_HS_OCIC) ? " OCIC" : "",
++ (temp & RH_HS_LPSC) ? " LPSC" : "",
++ (temp & RH_HS_DRWE) ? " DRWE" : "",
++ (temp & RH_HS_OCI) ? " OCI" : "",
++ (temp & RH_HS_LPS) ? " LPS" : ""
++ );
++ }
++
++ for (i = 0; i < ndp; i++) {
++ temp = roothub_portstatus (controller, i);
++ dbg ("roothub.portstatus [%d] = 0x%08x%s%s%s%s%s%s%s%s%s%s%s%s",
++ i,
++ temp,
++ (temp & RH_PS_PRSC) ? " PRSC" : "",
++ (temp & RH_PS_OCIC) ? " OCIC" : "",
++ (temp & RH_PS_PSSC) ? " PSSC" : "",
++ (temp & RH_PS_PESC) ? " PESC" : "",
++ (temp & RH_PS_CSC) ? " CSC" : "",
++
++ (temp & RH_PS_LSDA) ? " LSDA" : "",
++ (temp & RH_PS_PPS) ? " PPS" : "",
++ (temp & RH_PS_PRS) ? " PRS" : "",
++ (temp & RH_PS_POCI) ? " POCI" : "",
++ (temp & RH_PS_PSS) ? " PSS" : "",
++
++ (temp & RH_PS_PES) ? " PES" : "",
++ (temp & RH_PS_CCS) ? " CCS" : ""
++ );
++ }
++}
++
++static void ohci_dump (ohci_t *controller, int verbose)
++{
++ dbg ("OHCI controller usb-%s state", controller->slot_name);
++
++ /* dumps some of the state we know about */
++ ohci_dump_status (controller);
++ if (verbose)
++ ep_print_int_eds (controller, "hcca");
++ dbg ("hcca frame #%04x", controller->hcca->frame_no);
++ ohci_dump_roothub (controller, 1);
++}
++
++
++#endif /* DEBUG */
++
++/*-------------------------------------------------------------------------*
++ * Interface functions (URB)
++ *-------------------------------------------------------------------------*/
++
++/* get a transfer request */
++
++int sohci_submit_job(struct usb_device *dev, unsigned long pipe, void *buffer,
++ int transfer_len, struct devrequest *setup, int interval)
++{
++ ohci_t *ohci;
++ ed_t * ed;
++ urb_priv_t *purb_priv;
++ int i, size = 0;
++
++ ohci = &gohci;
++
++ /* when controller's hung, permit only roothub cleanup attempts
++ * such as powering down ports */
++ if (ohci->disabled) {
++ err("sohci_submit_job: EPIPE");
++ return -1;
++ }
++
++ /* every endpoint has a ed, locate and fill it */
++ if (!(ed = ep_add_ed (dev, pipe))) {
++ err("sohci_submit_job: ENOMEM");
++ return -1;
++ }
++
++ /* for the private part of the URB we need the number of TDs (size) */
++ switch (usb_pipetype (pipe)) {
++ case PIPE_BULK: /* one TD for every 4096 Byte */
++ size = (transfer_len - 1) / 4096 + 1;
++ break;
++ case PIPE_CONTROL: /* 1 TD for setup, 1 for ACK and 1 for every 4096 B */
++ size = (transfer_len == 0)? 2:
++ (transfer_len - 1) / 4096 + 3;
++ break;
++ }
++
++ if (size >= (N_URB_TD - 1)) {
++ err("need %d TDs, only have %d", size, N_URB_TD);
++ return -1;
++ }
++ purb_priv = &urb_priv;
++ purb_priv->pipe = pipe;
++
++ /* fill the private part of the URB */
++ purb_priv->length = size;
++ purb_priv->ed = ed;
++ purb_priv->actual_length = 0;
++
++ /* allocate the TDs */
++ /* note that td[0] was allocated in ep_add_ed */
++ for (i = 0; i < size; i++) {
++ purb_priv->td[i] = td_alloc (dev);
++ if (!purb_priv->td[i]) {
++ purb_priv->length = i;
++ urb_free_priv (purb_priv);
++ err("sohci_submit_job: ENOMEM");
++ return -1;
++ }
++ }
++
++ if (ed->state == ED_NEW || (ed->state & ED_DEL)) {
++ urb_free_priv (purb_priv);
++ err("sohci_submit_job: EINVAL");
++ return -1;
++ }
++
++ /* link the ed into a chain if is not already */
++ if (ed->state != ED_OPER)
++ ep_link (ohci, ed);
++
++ /* fill the TDs and link it to the ed */
++ td_submit_job(dev, pipe, buffer, transfer_len, setup, purb_priv, interval);
++
++ return 0;
++}
++
++/*-------------------------------------------------------------------------*/
++
++#ifdef DEBUG
++/* tell us the current USB frame number */
++
++static int sohci_get_current_frame_number (struct usb_device *usb_dev)
++{
++ ohci_t *ohci = &gohci;
++
++ return m16_swap (ohci->hcca->frame_no);
++}
++#endif
++
++/*-------------------------------------------------------------------------*
++ * ED handling functions
++ *-------------------------------------------------------------------------*/
++
++/* link an ed into one of the HC chains */
++
++static int ep_link (ohci_t *ohci, ed_t *edi)
++{
++ volatile ed_t *ed = edi;
++
++ ed->state = ED_OPER;
++
++ switch (ed->type) {
++ case PIPE_CONTROL:
++ ed->hwNextED = 0;
++ if (ohci->ed_controltail == NULL) {
++ writel (ed, &ohci->regs->ed_controlhead);
++ } else {
++ ohci->ed_controltail->hwNextED = m32_swap (ed);
++ }
++ ed->ed_prev = ohci->ed_controltail;
++ if (!ohci->ed_controltail && !ohci->ed_rm_list[0] &&
++ !ohci->ed_rm_list[1] && !ohci->sleeping) {
++ ohci->hc_control |= OHCI_CTRL_CLE;
++ writel (ohci->hc_control, &ohci->regs->control);
++ }
++ ohci->ed_controltail = edi;
++ break;
++
++ case PIPE_BULK:
++ ed->hwNextED = 0;
++ if (ohci->ed_bulktail == NULL) {
++ writel (ed, &ohci->regs->ed_bulkhead);
++ } else {
++ ohci->ed_bulktail->hwNextED = m32_swap (ed);
++ }
++ ed->ed_prev = ohci->ed_bulktail;
++ if (!ohci->ed_bulktail && !ohci->ed_rm_list[0] &&
++ !ohci->ed_rm_list[1] && !ohci->sleeping) {
++ ohci->hc_control |= OHCI_CTRL_BLE;
++ writel (ohci->hc_control, &ohci->regs->control);
++ }
++ ohci->ed_bulktail = edi;
++ break;
++ }
++ return 0;
++}
++
++/*-------------------------------------------------------------------------*/
++
++/* unlink an ed from one of the HC chains.
++ * just the link to the ed is unlinked.
++ * the link from the ed still points to another operational ed or 0
++ * so the HC can eventually finish the processing of the unlinked ed */
++
++static int ep_unlink (ohci_t *ohci, ed_t *ed)
++{
++ ed->hwINFO |= m32_swap (OHCI_ED_SKIP);
++
++ switch (ed->type) {
++ case PIPE_CONTROL:
++ if (ed->ed_prev == NULL) {
++ if (!ed->hwNextED) {
++ ohci->hc_control &= ~OHCI_CTRL_CLE;
++ writel (ohci->hc_control, &ohci->regs->control);
++ }
++ writel (m32_swap (*((__u32 *)&ed->hwNextED)), &ohci->regs->ed_controlhead);
++ } else {
++ ed->ed_prev->hwNextED = ed->hwNextED;
++ }
++ if (ohci->ed_controltail == ed) {
++ ohci->ed_controltail = ed->ed_prev;
++ } else {
++ ((ed_t *)m32_swap (*((__u32 *)&ed->hwNextED)))->ed_prev = ed->ed_prev;
++ }
++ break;
++
++ case PIPE_BULK:
++ if (ed->ed_prev == NULL) {
++ if (!ed->hwNextED) {
++ ohci->hc_control &= ~OHCI_CTRL_BLE;
++ writel (ohci->hc_control, &ohci->regs->control);
++ }
++ writel (m32_swap (*((__u32 *)&ed->hwNextED)), &ohci->regs->ed_bulkhead);
++ } else {
++ ed->ed_prev->hwNextED = ed->hwNextED;
++ }
++ if (ohci->ed_bulktail == ed) {
++ ohci->ed_bulktail = ed->ed_prev;
++ } else {
++ ((ed_t *)m32_swap (*((__u32 *)&ed->hwNextED)))->ed_prev = ed->ed_prev;
++ }
++ break;
++ }
++ ed->state = ED_UNLINK;
++ return 0;
++}
++
++
++/*-------------------------------------------------------------------------*/
++
++/* add/reinit an endpoint; this should be done once at the usb_set_configuration command,
++ * but the USB stack is a little bit stateless so we do it at every transaction
++ * if the state of the ed is ED_NEW then a dummy td is added and the state is changed to ED_UNLINK
++ * in all other cases the state is left unchanged
++ * the ed info fields are setted anyway even though most of them should not change */
++
++static ed_t * ep_add_ed (struct usb_device *usb_dev, unsigned long pipe)
++{
++ td_t *td;
++ ed_t *ed_ret;
++ volatile ed_t *ed;
++
++ ed = ed_ret = &ohci_dev.ed[(usb_pipeendpoint (pipe) << 1) |
++ (usb_pipecontrol (pipe)? 0: usb_pipeout (pipe))];
++
++ if ((ed->state & ED_DEL) || (ed->state & ED_URB_DEL)) {
++ err("ep_add_ed: pending delete");
++ /* pending delete request */
++ return NULL;
++ }
++
++ if (ed->state == ED_NEW) {
++ ed->hwINFO = m32_swap (OHCI_ED_SKIP); /* skip ed */
++ /* dummy td; end of td list for ed */
++ td = td_alloc (usb_dev);
++ ed->hwTailP = m32_swap (td);
++ ed->hwHeadP = ed->hwTailP;
++ ed->state = ED_UNLINK;
++ ed->type = usb_pipetype (pipe);
++ ohci_dev.ed_cnt++;
++ }
++
++ ed->hwINFO = m32_swap (usb_pipedevice (pipe)
++ | usb_pipeendpoint (pipe) << 7
++ | (usb_pipeisoc (pipe)? 0x8000: 0)
++ | (usb_pipecontrol (pipe)? 0: (usb_pipeout (pipe)? 0x800: 0x1000))
++ | usb_pipeslow (pipe) << 13
++ | usb_maxpacket (usb_dev, pipe) << 16);
++
++ return ed_ret;
++}
++
++/*-------------------------------------------------------------------------*
++ * TD handling functions
++ *-------------------------------------------------------------------------*/
++
++/* enqueue next TD for this URB (OHCI spec 5.2.8.2) */
++
++static void td_fill (ohci_t *ohci, unsigned int info,
++ void *data, int len,
++ struct usb_device *dev, int index, urb_priv_t *urb_priv)
++{
++ volatile td_t *td, *td_pt;
++#ifdef OHCI_FILL_TRACE
++ int i;
++#endif
++
++ if (index > urb_priv->length) {
++ err("index > length");
++ return;
++ }
++ /* use this td as the next dummy */
++ td_pt = urb_priv->td [index];
++ td_pt->hwNextTD = 0;
++
++ /* fill the old dummy TD */
++ td = urb_priv->td [index] = (td_t *)(m32_swap (urb_priv->ed->hwTailP) & ~0xf);
++
++ td->ed = urb_priv->ed;
++ td->next_dl_td = NULL;
++ td->index = index;
++ td->data = (__u32)data;
++#ifdef OHCI_FILL_TRACE
++ if ((usb_pipetype(urb_priv->pipe) == PIPE_BULK) && usb_pipeout(urb_priv->pipe)) {
++ for (i = 0; i < len; i++)
++ printf("td->data[%d] %#2x ",i, ((unsigned char *)td->data)[i]);
++ printf("\n");
++ }
++#endif
++ if (!len)
++ data = 0;
++
++ td->hwINFO = m32_swap (info);
++ td->hwCBP = m32_swap (data);
++ if (data)
++ td->hwBE = m32_swap (data + len - 1);
++ else
++ td->hwBE = 0;
++ td->hwNextTD = m32_swap (td_pt);
++ td->hwPSW [0] = m16_swap (((__u32)data & 0x0FFF) | 0xE000);
++
++ /* append to queue */
++ td->ed->hwTailP = td->hwNextTD;
++}
++
++/*-------------------------------------------------------------------------*/
++
++/* prepare all TDs of a transfer */
++
++static void td_submit_job (struct usb_device *dev, unsigned long pipe, void *buffer,
++ int transfer_len, struct devrequest *setup, urb_priv_t *urb, int interval)
++{
++ ohci_t *ohci = &gohci;
++ int data_len = transfer_len;
++ void *data;
++ int cnt = 0;
++ __u32 info = 0;
++ unsigned int toggle = 0;
++
++ /* OHCI handles the DATA-toggles itself, we just use the USB-toggle bits for reseting */
++ if(usb_gettoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe))) {
++ toggle = TD_T_TOGGLE;
++ } else {
++ toggle = TD_T_DATA0;
++ usb_settoggle(dev, usb_pipeendpoint(pipe), usb_pipeout(pipe), 1);
++ }
++ urb->td_cnt = 0;
++ if (data_len)
++ data = buffer;
++ else
++ data = 0;
++
++ switch (usb_pipetype (pipe)) {
++ case PIPE_BULK:
++ info = usb_pipeout (pipe)?
++ TD_CC | TD_DP_OUT : TD_CC | TD_DP_IN ;
++ while(data_len > 4096) {
++ td_fill (ohci, info | (cnt? TD_T_TOGGLE:toggle), data, 4096, dev, cnt, urb);
++ data += 4096; data_len -= 4096; cnt++;
++ }
++ info = usb_pipeout (pipe)?
++ TD_CC | TD_DP_OUT : TD_CC | TD_R | TD_DP_IN ;
++ td_fill (ohci, info | (cnt? TD_T_TOGGLE:toggle), data, data_len, dev, cnt, urb);
++ cnt++;
++
++ if (!ohci->sleeping)
++ writel (OHCI_BLF, &ohci->regs->cmdstatus); /* start bulk list */
++ break;
++
++ case PIPE_CONTROL:
++ info = TD_CC | TD_DP_SETUP | TD_T_DATA0;
++ td_fill (ohci, info, setup, 8, dev, cnt++, urb);
++ if (data_len > 0) {
++ info = usb_pipeout (pipe)?
++ TD_CC | TD_R | TD_DP_OUT | TD_T_DATA1 : TD_CC | TD_R | TD_DP_IN | TD_T_DATA1;
++ /* NOTE: mishandles transfers >8K, some >4K */
++ td_fill (ohci, info, data, data_len, dev, cnt++, urb);
++ }
++ info = usb_pipeout (pipe)?
++ TD_CC | TD_DP_IN | TD_T_DATA1: TD_CC | TD_DP_OUT | TD_T_DATA1;
++ td_fill (ohci, info, data, 0, dev, cnt++, urb);
++ if (!ohci->sleeping)
++ writel (OHCI_CLF, &ohci->regs->cmdstatus); /* start Control list */
++ break;
++ }
++ if (urb->length != cnt)
++ dbg("TD LENGTH %d != CNT %d", urb->length, cnt);
++}
++
++/*-------------------------------------------------------------------------*
++ * Done List handling functions
++ *-------------------------------------------------------------------------*/
++
++
++/* calculate the transfer length and update the urb */
++
++static void dl_transfer_length(td_t * td)
++{
++ __u32 tdINFO, tdBE, tdCBP;
++ urb_priv_t *lurb_priv = &urb_priv;
++
++ tdINFO = m32_swap (td->hwINFO);
++ tdBE = m32_swap (td->hwBE);
++ tdCBP = m32_swap (td->hwCBP);
++
++
++ if (!(usb_pipetype (lurb_priv->pipe) == PIPE_CONTROL &&
++ ((td->index == 0) || (td->index == lurb_priv->length - 1)))) {
++ if (tdBE != 0) {
++ if (td->hwCBP == 0)
++ lurb_priv->actual_length += tdBE - td->data + 1;
++ else
++ lurb_priv->actual_length += tdCBP - td->data;
++ }
++ }
++}
++
++/*-------------------------------------------------------------------------*/
++
++/* replies to the request have to be on a FIFO basis so
++ * we reverse the reversed done-list */
++
++static td_t * dl_reverse_done_list (ohci_t *ohci)
++{
++ __u32 td_list_hc;
++ td_t *td_rev = NULL;
++ td_t *td_list = NULL;
++ urb_priv_t *lurb_priv = NULL;
++
++ td_list_hc = m32_swap (ohci->hcca->done_head) & 0xfffffff0;
++ ohci->hcca->done_head = 0;
++
++ while (td_list_hc) {
++ td_list = (td_t *)td_list_hc;
++
++ if (TD_CC_GET (m32_swap (td_list->hwINFO))) {
++ lurb_priv = &urb_priv;
++ dbg(" USB-error/status: %x : %p",
++ TD_CC_GET (m32_swap (td_list->hwINFO)), td_list);
++ if (td_list->ed->hwHeadP & m32_swap (0x1)) {
++ if (lurb_priv && ((td_list->index + 1) < lurb_priv->length)) {
++ td_list->ed->hwHeadP =
++ (lurb_priv->td[lurb_priv->length - 1]->hwNextTD & m32_swap (0xfffffff0)) |
++ (td_list->ed->hwHeadP & m32_swap (0x2));
++ lurb_priv->td_cnt += lurb_priv->length - td_list->index - 1;
++ } else
++ td_list->ed->hwHeadP &= m32_swap (0xfffffff2);
++ }
++ }
++
++ td_list->next_dl_td = td_rev;
++ td_rev = td_list;
++ td_list_hc = m32_swap (td_list->hwNextTD) & 0xfffffff0;
++ }
++ return td_list;
++}
++
++/*-------------------------------------------------------------------------*/
++
++/* td done list */
++static int dl_done_list (ohci_t *ohci, td_t *td_list)
++{
++ td_t *td_list_next = NULL;
++ ed_t *ed;
++ int cc = 0;
++ int stat = 0;
++ /* urb_t *urb; */
++ urb_priv_t *lurb_priv;
++ __u32 tdINFO, edHeadP, edTailP;
++
++ while (td_list) {
++ td_list_next = td_list->next_dl_td;
++
++ lurb_priv = &urb_priv;
++ tdINFO = m32_swap (td_list->hwINFO);
++
++ ed = td_list->ed;
++
++ dl_transfer_length(td_list);
++
++ /* error code of transfer */
++ cc = TD_CC_GET (tdINFO);
++ if (cc != 0) {
++ dbg("ConditionCode %#x", cc);
++ stat = cc_to_error[cc];
++ }
++
++ if (ed->state != ED_NEW) {
++ edHeadP = m32_swap (ed->hwHeadP) & 0xfffffff0;
++ edTailP = m32_swap (ed->hwTailP);
++
++ /* unlink eds if they are not busy */
++ if ((edHeadP == edTailP) && (ed->state == ED_OPER))
++ ep_unlink (ohci, ed);
++ }
++
++ td_list = td_list_next;
++ }
++ return stat;
++}
++
++/*-------------------------------------------------------------------------*
++ * Virtual Root Hub
++ *-------------------------------------------------------------------------*/
++
++/* Device descriptor */
++static __u8 root_hub_dev_des[] =
++{
++ 0x12, /* __u8 bLength; */
++ 0x01, /* __u8 bDescriptorType; Device */
++ 0x10, /* __u16 bcdUSB; v1.1 */
++ 0x01,
++ 0x09, /* __u8 bDeviceClass; HUB_CLASSCODE */
++ 0x00, /* __u8 bDeviceSubClass; */
++ 0x00, /* __u8 bDeviceProtocol; */
++ 0x08, /* __u8 bMaxPacketSize0; 8 Bytes */
++ 0x00, /* __u16 idVendor; */
++ 0x00,
++ 0x00, /* __u16 idProduct; */
++ 0x00,
++ 0x00, /* __u16 bcdDevice; */
++ 0x00,
++ 0x00, /* __u8 iManufacturer; */
++ 0x01, /* __u8 iProduct; */
++ 0x00, /* __u8 iSerialNumber; */
++ 0x01 /* __u8 bNumConfigurations; */
++};
++
++
++/* Configuration descriptor */
++static __u8 root_hub_config_des[] =
++{
++ 0x09, /* __u8 bLength; */
++ 0x02, /* __u8 bDescriptorType; Configuration */
++ 0x19, /* __u16 wTotalLength; */
++ 0x00,
++ 0x01, /* __u8 bNumInterfaces; */
++ 0x01, /* __u8 bConfigurationValue; */
++ 0x00, /* __u8 iConfiguration; */
++ 0x40, /* __u8 bmAttributes;
++ Bit 7: Bus-powered, 6: Self-powered, 5 Remote-wakwup, 4..0: resvd */
++ 0x00, /* __u8 MaxPower; */
++
++ /* interface */
++ 0x09, /* __u8 if_bLength; */
++ 0x04, /* __u8 if_bDescriptorType; Interface */
++ 0x00, /* __u8 if_bInterfaceNumber; */
++ 0x00, /* __u8 if_bAlternateSetting; */
++ 0x01, /* __u8 if_bNumEndpoints; */
++ 0x09, /* __u8 if_bInterfaceClass; HUB_CLASSCODE */
++ 0x00, /* __u8 if_bInterfaceSubClass; */
++ 0x00, /* __u8 if_bInterfaceProtocol; */
++ 0x00, /* __u8 if_iInterface; */
++
++ /* endpoint */
++ 0x07, /* __u8 ep_bLength; */
++ 0x05, /* __u8 ep_bDescriptorType; Endpoint */
++ 0x81, /* __u8 ep_bEndpointAddress; IN Endpoint 1 */
++ 0x03, /* __u8 ep_bmAttributes; Interrupt */
++ 0x02, /* __u16 ep_wMaxPacketSize; ((MAX_ROOT_PORTS + 1) / 8 */
++ 0x00,
++ 0xff /* __u8 ep_bInterval; 255 ms */
++};
++
++static unsigned char root_hub_str_index0[] =
++{
++ 0x04, /* __u8 bLength; */
++ 0x03, /* __u8 bDescriptorType; String-descriptor */
++ 0x09, /* __u8 lang ID */
++ 0x04, /* __u8 lang ID */
++};
++
++static unsigned char root_hub_str_index1[] =
++{
++ 28, /* __u8 bLength; */
++ 0x03, /* __u8 bDescriptorType; String-descriptor */
++ 'O', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ 'H', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ 'C', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ 'I', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ ' ', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ 'R', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ 'o', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ 'o', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ 't', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ ' ', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ 'H', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ 'u', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++ 'b', /* __u8 Unicode */
++ 0, /* __u8 Unicode */
++};
++
++/* Hub class-specific descriptor is constructed dynamically */
++
++
++/*-------------------------------------------------------------------------*/
++
++#define OK(x) len = (x); break
++#ifdef DEBUG
++#define WR_RH_STAT(x) {info("WR:status %#8x", (x));writel((x), &gohci.regs->roothub.status);}
++#define WR_RH_PORTSTAT(x) {info("WR:portstatus[%d] %#8x", wIndex-1, (x));writel((x), &gohci.regs->roothub.portstatus[wIndex-1]);}
++#else
++#define WR_RH_STAT(x) writel((x), &gohci.regs->roothub.status)
++#define WR_RH_PORTSTAT(x) writel((x), &gohci.regs->roothub.portstatus[wIndex-1])
++#endif
++#define RD_RH_STAT roothub_status(&gohci)
++#define RD_RH_PORTSTAT roothub_portstatus(&gohci,wIndex-1)
++
++/* request to virtual root hub */
++
++int rh_check_port_status(ohci_t *controller)
++{
++ __u32 temp, ndp, i;
++ int res;
++
++ res = -1;
++ temp = roothub_a (controller);
++ ndp = (temp & RH_A_NDP);
++ for (i = 0; i < ndp; i++) {
++ temp = roothub_portstatus (controller, i);
++ /* check for a device disconnect */
++ if (((temp & (RH_PS_PESC | RH_PS_CSC)) ==
++ (RH_PS_PESC | RH_PS_CSC)) &&
++ ((temp & RH_PS_CCS) == 0)) {
++ res = i;
++ break;
++ }
++ }
++ return res;
++}
++
++static int ohci_submit_rh_msg(struct usb_device *dev, unsigned long pipe,
++ void *buffer, int transfer_len, struct devrequest *cmd)
++{
++ void * data = buffer;
++ int leni = transfer_len;
++ int len = 0;
++ int stat = 0;
++ __u32 datab[4];
++ __u8 *data_buf = (__u8 *)datab;
++ __u16 bmRType_bReq;
++ __u16 wValue;
++ __u16 wIndex;
++ __u16 wLength;
++
++#ifdef DEBUG
++urb_priv.actual_length = 0;
++pkt_print(dev, pipe, buffer, transfer_len, cmd, "SUB(rh)", usb_pipein(pipe));
++#else
++ wait_ms(1);
++#endif
++ if ((pipe & PIPE_INTERRUPT) == PIPE_INTERRUPT) {
++ info("Root-Hub submit IRQ: NOT implemented");
++ return 0;
++ }
++
++ bmRType_bReq = cmd->requesttype | (cmd->request << 8);
++ wValue = m16_swap (cmd->value);
++ wIndex = m16_swap (cmd->index);
++ wLength = m16_swap (cmd->length);
++
++ info("Root-Hub: adr: %2x cmd(%1x): %08x %04x %04x %04x",
++ dev->devnum, 8, bmRType_bReq, wValue, wIndex, wLength);
++
++ switch (bmRType_bReq) {
++ /* Request Destination:
++ without flags: Device,
++ RH_INTERFACE: interface,
++ RH_ENDPOINT: endpoint,
++ RH_CLASS means HUB here,
++ RH_OTHER | RH_CLASS almost ever means HUB_PORT here
++ */
++
++ case RH_GET_STATUS:
++ *(__u16 *) data_buf = m16_swap (1); OK (2);
++ case RH_GET_STATUS | RH_INTERFACE:
++ *(__u16 *) data_buf = m16_swap (0); OK (2);
++ case RH_GET_STATUS | RH_ENDPOINT:
++ *(__u16 *) data_buf = m16_swap (0); OK (2);
++ case RH_GET_STATUS | RH_CLASS:
++ *(__u32 *) data_buf = m32_swap (
++ RD_RH_STAT & ~(RH_HS_CRWE | RH_HS_DRWE));
++ OK (4);
++ case RH_GET_STATUS | RH_OTHER | RH_CLASS:
++ *(__u32 *) data_buf = m32_swap (RD_RH_PORTSTAT); OK (4);
++
++ case RH_CLEAR_FEATURE | RH_ENDPOINT:
++ switch (wValue) {
++ case (RH_ENDPOINT_STALL): OK (0);
++ }
++ break;
++
++ case RH_CLEAR_FEATURE | RH_CLASS:
++ switch (wValue) {
++ case RH_C_HUB_LOCAL_POWER:
++ OK(0);
++ case (RH_C_HUB_OVER_CURRENT):
++ WR_RH_STAT(RH_HS_OCIC); OK (0);
++ }
++ break;
++
++ case RH_CLEAR_FEATURE | RH_OTHER | RH_CLASS:
++ switch (wValue) {
++ case (RH_PORT_ENABLE):
++ WR_RH_PORTSTAT (RH_PS_CCS ); OK (0);
++ case (RH_PORT_SUSPEND):
++ WR_RH_PORTSTAT (RH_PS_POCI); OK (0);
++ case (RH_PORT_POWER):
++ WR_RH_PORTSTAT (RH_PS_LSDA); OK (0);
++ case (RH_C_PORT_CONNECTION):
++ WR_RH_PORTSTAT (RH_PS_CSC ); OK (0);
++ case (RH_C_PORT_ENABLE):
++ WR_RH_PORTSTAT (RH_PS_PESC); OK (0);
++ case (RH_C_PORT_SUSPEND):
++ WR_RH_PORTSTAT (RH_PS_PSSC); OK (0);
++ case (RH_C_PORT_OVER_CURRENT):
++ WR_RH_PORTSTAT (RH_PS_OCIC); OK (0);
++ case (RH_C_PORT_RESET):
++ WR_RH_PORTSTAT (RH_PS_PRSC); OK (0);
++ }
++ break;
++
++ case RH_SET_FEATURE | RH_OTHER | RH_CLASS:
++ switch (wValue) {
++ case (RH_PORT_SUSPEND):
++ WR_RH_PORTSTAT (RH_PS_PSS ); OK (0);
++ case (RH_PORT_RESET): /* BUG IN HUP CODE *********/
++ if (RD_RH_PORTSTAT & RH_PS_CCS)
++ WR_RH_PORTSTAT (RH_PS_PRS);
++ OK (0);
++ case (RH_PORT_POWER):
++ WR_RH_PORTSTAT (RH_PS_PPS ); OK (0);
++ case (RH_PORT_ENABLE): /* BUG IN HUP CODE *********/
++ if (RD_RH_PORTSTAT & RH_PS_CCS)
++ WR_RH_PORTSTAT (RH_PS_PES );
++ OK (0);
++ }
++ break;
++
++ case RH_SET_ADDRESS: gohci.rh.devnum = wValue; OK(0);
++
++ case RH_GET_DESCRIPTOR:
++ switch ((wValue & 0xff00) >> 8) {
++ case (0x01): /* device descriptor */
++ len = min_t(unsigned int,
++ leni,
++ min_t(unsigned int,
++ sizeof (root_hub_dev_des),
++ wLength));
++ data_buf = root_hub_dev_des; OK(len);
++ case (0x02): /* configuration descriptor */
++ len = min_t(unsigned int,
++ leni,
++ min_t(unsigned int,
++ sizeof (root_hub_config_des),
++ wLength));
++ data_buf = root_hub_config_des; OK(len);
++ case (0x03): /* string descriptors */
++ if(wValue==0x0300) {
++ len = min_t(unsigned int,
++ leni,
++ min_t(unsigned int,
++ sizeof (root_hub_str_index0),
++ wLength));
++ data_buf = root_hub_str_index0;
++ OK(len);
++ }
++ if(wValue==0x0301) {
++ len = min_t(unsigned int,
++ leni,
++ min_t(unsigned int,
++ sizeof (root_hub_str_index1),
++ wLength));
++ data_buf = root_hub_str_index1;
++ OK(len);
++ }
++ default:
++ stat = USB_ST_STALLED;
++ }
++ break;
++
++ case RH_GET_DESCRIPTOR | RH_CLASS:
++ {
++ __u32 temp = roothub_a (&gohci);
++
++ data_buf [0] = 9; /* min length; */
++ data_buf [1] = 0x29;
++ data_buf [2] = temp & RH_A_NDP;
++ data_buf [3] = 0;
++ if (temp & RH_A_PSM) /* per-port power switching? */
++ data_buf [3] |= 0x1;
++ if (temp & RH_A_NOCP) /* no overcurrent reporting? */
++ data_buf [3] |= 0x10;
++ else if (temp & RH_A_OCPM) /* per-port overcurrent reporting? */
++ data_buf [3] |= 0x8;
++
++ /* corresponds to data_buf[4-7] */
++ datab [1] = 0;
++ data_buf [5] = (temp & RH_A_POTPGT) >> 24;
++ temp = roothub_b (&gohci);
++ data_buf [7] = temp & RH_B_DR;
++ if (data_buf [2] < 7) {
++ data_buf [8] = 0xff;
++ } else {
++ data_buf [0] += 2;
++ data_buf [8] = (temp & RH_B_DR) >> 8;
++ data_buf [10] = data_buf [9] = 0xff;
++ }
++
++ len = min_t(unsigned int, leni,
++ min_t(unsigned int, data_buf [0], wLength));
++ OK (len);
++ }
++
++ case RH_GET_CONFIGURATION: *(__u8 *) data_buf = 0x01; OK (1);
++
++ case RH_SET_CONFIGURATION: WR_RH_STAT (0x10000); OK (0);
++
++ default:
++ dbg ("unsupported root hub command");
++ stat = USB_ST_STALLED;
++ }
++
++#ifdef DEBUG
++ ohci_dump_roothub (&gohci, 1);
++#else
++ wait_ms(1);
++#endif
++
++ len = min_t(int, len, leni);
++ if (data != data_buf)
++ memcpy (data, data_buf, len);
++ dev->act_len = len;
++ dev->status = stat;
++
++#ifdef DEBUG
++ if (transfer_len)
++ urb_priv.actual_length = transfer_len;
++ pkt_print(dev, pipe, buffer, transfer_len, cmd, "RET(rh)", 0/*usb_pipein(pipe)*/);
++#else
++ wait_ms(1);
++#endif
++
++ return stat;
++}
++
++/*-------------------------------------------------------------------------*/
++
++/* common code for handling submit messages - used for all but root hub */
++/* accesses. */
++int submit_common_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
++ int transfer_len, struct devrequest *setup, int interval)
++{
++ int stat = 0;
++ int maxsize = usb_maxpacket(dev, pipe);
++ int timeout;
++
++ /* device pulled? Shortcut the action. */
++ if (devgone == dev) {
++ dev->status = USB_ST_CRC_ERR;
++ return 0;
++ }
++
++#ifdef DEBUG
++ urb_priv.actual_length = 0;
++ pkt_print(dev, pipe, buffer, transfer_len, setup, "SUB", usb_pipein(pipe));
++#else
++ wait_ms(1);
++#endif
++ if (!maxsize) {
++ err("submit_common_message: pipesize for pipe %lx is zero",
++ pipe);
++ return -1;
++ }
++
++ if (sohci_submit_job(dev, pipe, buffer, transfer_len, setup, interval) < 0) {
++ err("sohci_submit_job failed");
++ return -1;
++ }
++
++ wait_ms(10);
++ /* ohci_dump_status(&gohci); */
++
++ /* allow more time for a BULK device to react - some are slow */
++#define BULK_TO 5000 /* timeout in milliseconds */
++ if (usb_pipetype (pipe) == PIPE_BULK)
++ timeout = BULK_TO;
++ else
++ timeout = 100;
++
++ /* wait for it to complete */
++ for (;;) {
++ /* check whether the controller is done */
++ stat = hc_interrupt();
++ if (stat < 0) {
++ stat = USB_ST_CRC_ERR;
++ break;
++ }
++ if (stat >= 0 && stat != 0xff) {
++ /* 0xff is returned for an SF-interrupt */
++ break;
++ }
++ if (--timeout) {
++ wait_ms(1);
++ } else {
++ err("CTL:TIMEOUT ");
++ stat = USB_ST_CRC_ERR;
++ break;
++ }
++ }
++ /* we got an Root Hub Status Change interrupt */
++ if (got_rhsc) {
++#ifdef DEBUG
++ ohci_dump_roothub (&gohci, 1);
++#endif
++ got_rhsc = 0;
++ /* abuse timeout */
++ timeout = rh_check_port_status(&gohci);
++ if (timeout >= 0) {
++#if 0 /* this does nothing useful, but leave it here in case that changes */
++ /* the called routine adds 1 to the passed value */
++ usb_hub_port_connect_change(gohci.rh.dev, timeout - 1);
++#endif
++ /*
++ * XXX
++ * This is potentially dangerous because it assumes
++ * that only one device is ever plugged in!
++ */
++ devgone = dev;
++ }
++ }
++
++ dev->status = stat;
++ dev->act_len = transfer_len;
++
++#ifdef DEBUG
++ pkt_print(dev, pipe, buffer, transfer_len, setup, "RET(ctlr)", usb_pipein(pipe));
++#else
++ wait_ms(1);
++#endif
++
++ /* free TDs in urb_priv */
++ urb_free_priv (&urb_priv);
++ return 0;
++}
++
++/* submit routines called from usb.c */
++int submit_bulk_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
++ int transfer_len)
++{
++ info("submit_bulk_msg");
++ return submit_common_msg(dev, pipe, buffer, transfer_len, NULL, 0);
++}
++
++int submit_control_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
++ int transfer_len, struct devrequest *setup)
++{
++ int maxsize = usb_maxpacket(dev, pipe);
++
++ info("submit_control_msg");
++#ifdef DEBUG
++ urb_priv.actual_length = 0;
++ pkt_print(dev, pipe, buffer, transfer_len, setup, "SUB", usb_pipein(pipe));
++#else
++ wait_ms(1);
++#endif
++ if (!maxsize) {
++ err("submit_control_message: pipesize for pipe %lx is zero",
++ pipe);
++ return -1;
++ }
++ if (((pipe >> 8) & 0x7f) == gohci.rh.devnum) {
++ gohci.rh.dev = dev;
++ /* root hub - redirect */
++ return ohci_submit_rh_msg(dev, pipe, buffer, transfer_len,
++ setup);
++ }
++
++ return submit_common_msg(dev, pipe, buffer, transfer_len, setup, 0);
++}
++
++int submit_int_msg(struct usb_device *dev, unsigned long pipe, void *buffer,
++ int transfer_len, int interval)
++{
++ info("submit_int_msg");
++ return -1;
++}
++
++/*-------------------------------------------------------------------------*
++ * HC functions
++ *-------------------------------------------------------------------------*/
++
++/* reset the HC and BUS */
++
++static int hc_reset (ohci_t *ohci)
++{
++ int timeout = 30;
++ int smm_timeout = 50; /* 0,5 sec */
++
++ if (readl (&ohci->regs->control) & OHCI_CTRL_IR) { /* SMM owns the HC */
++ writel (OHCI_OCR, &ohci->regs->cmdstatus); /* request ownership */
++ info("USB HC TakeOver from SMM");
++ while (readl (&ohci->regs->control) & OHCI_CTRL_IR) {
++ wait_ms (10);
++ if (--smm_timeout == 0) {
++ err("USB HC TakeOver failed!");
++ return -1;
++ }
++ }
++ }
++
++ /* Disable HC interrupts */
++ writel (OHCI_INTR_MIE, &ohci->regs->intrdisable);
++
++ dbg("USB HC reset_hc usb-%s: ctrl = 0x%X ;",
++ ohci->slot_name,
++ readl (&ohci->regs->control));
++
++ /* Reset USB (needed by some controllers) */
++ writel (0, &ohci->regs->control);
++
++ /* HC Reset requires max 10 us delay */
++ writel (OHCI_HCR, &ohci->regs->cmdstatus);
++ while ((readl (&ohci->regs->cmdstatus) & OHCI_HCR) != 0) {
++ if (--timeout == 0) {
++ err("USB HC reset timed out!");
++ return -1;
++ }
++ udelay (1);
++ }
++ return 0;
++}
++
++/*-------------------------------------------------------------------------*/
++
++/* Start an OHCI controller, set the BUS operational
++ * enable interrupts
++ * connect the virtual root hub */
++
++static int hc_start (ohci_t * ohci)
++{
++ __u32 mask;
++ unsigned int fminterval;
++
++ ohci->disabled = 1;
++
++ /* Tell the controller where the control and bulk lists are
++ * The lists are empty now. */
++
++ writel (0, &ohci->regs->ed_controlhead);
++ writel (0, &ohci->regs->ed_bulkhead);
++
++ writel ((__u32)ohci->hcca, &ohci->regs->hcca); /* a reset clears this */
++
++ fminterval = 0x2edf;
++ writel ((fminterval * 9) / 10, &ohci->regs->periodicstart);
++ fminterval |= ((((fminterval - 210) * 6) / 7) << 16);
++ writel (fminterval, &ohci->regs->fminterval);
++ writel (0x628, &ohci->regs->lsthresh);
++
++ /* start controller operations */
++ ohci->hc_control = OHCI_CONTROL_INIT | OHCI_USB_OPER;
++ ohci->disabled = 0;
++ writel (ohci->hc_control, &ohci->regs->control);
++
++ /* disable all interrupts */
++ mask = (OHCI_INTR_SO | OHCI_INTR_WDH | OHCI_INTR_SF | OHCI_INTR_RD |
++ OHCI_INTR_UE | OHCI_INTR_FNO | OHCI_INTR_RHSC |
++ OHCI_INTR_OC | OHCI_INTR_MIE);
++ writel (mask, &ohci->regs->intrdisable);
++ /* clear all interrupts */
++ mask &= ~OHCI_INTR_MIE;
++ writel (mask, &ohci->regs->intrstatus);
++ /* Choose the interrupts we care about now - but w/o MIE */
++ mask = OHCI_INTR_RHSC | OHCI_INTR_UE | OHCI_INTR_WDH | OHCI_INTR_SO;
++ writel (mask, &ohci->regs->intrenable);
++
++#ifdef OHCI_USE_NPS
++ /* required for AMD-756 and some Mac platforms */
++ writel ((roothub_a (ohci) | RH_A_NPS) & ~RH_A_PSM,
++ &ohci->regs->roothub.a);
++ writel (RH_HS_LPSC, &ohci->regs->roothub.status);
++#endif /* OHCI_USE_NPS */
++
++#define mdelay(n) ({unsigned long msec=(n); while (msec--) udelay(1000);})
++ /* POTPGT delay is bits 24-31, in 2 ms units. */
++ mdelay ((roothub_a (ohci) >> 23) & 0x1fe);
++
++ /* connect the virtual root hub */
++ ohci->rh.devnum = 0;
++
++printf( "---> Done with hc_start\n" );
++
++ return 0;
++}
++
++/*-------------------------------------------------------------------------*/
++
++/* an interrupt happens */
++
++static int
++hc_interrupt (void)
++{
++ ohci_t *ohci = &gohci;
++ struct ohci_regs *regs = ohci->regs;
++ int ints;
++ int stat = -1;
++
++ if ((ohci->hcca->done_head != 0) && !(m32_swap (ohci->hcca->done_head) & 0x01)) {
++ ints = OHCI_INTR_WDH;
++ } else {
++ ints = readl (&regs->intrstatus);
++ }
++
++dbg("Interrupt: %x frame: %x", ints, ohci->hcca->frame_no);
++
++ if (ints & OHCI_INTR_RHSC) {
++dbg("rhsc\n" );
++ got_rhsc = 1;
++ }
++
++ if (ints & OHCI_INTR_UE) {
++ ohci->disabled++;
++ err ("OHCI Unrecoverable Error, controller usb-%s disabled",
++ ohci->slot_name);
++ /* e.g. due to PCI Master/Target Abort */
++
++#ifdef DEBUG
++ ohci_dump (ohci, 1);
++#else
++ wait_ms(1);
++#endif
++ /* FIXME: be optimistic, hope that bug won't repeat often. */
++ /* Make some non-interrupt context restart the controller. */
++ /* Count and limit the retries though; either hardware or */
++ /* software errors can go forever... */
++ hc_reset (ohci);
++ return -1;
++ }
++
++ if (ints & OHCI_INTR_WDH) {
++ wait_ms(1);
++ writel (OHCI_INTR_WDH, &regs->intrdisable);
++ stat = dl_done_list (&gohci, dl_reverse_done_list (&gohci));
++ writel (OHCI_INTR_WDH, &regs->intrenable);
++dbg("wdh: %x\n", stat );
++ goto out ;
++ }
++
++ if (ints & OHCI_INTR_SO) {
++ dbg("USB Schedule overrun\n");
++ writel (OHCI_INTR_SO, &regs->intrenable);
++ stat = -1;
++ }
++
++ /* FIXME: this assumes SOF (1/ms) interrupts don't get lost... */
++ if (ints & OHCI_INTR_SF) {
++ unsigned int frame = m16_swap (ohci->hcca->frame_no) & 1;
++ wait_ms(1);
++ writel (OHCI_INTR_SF, &regs->intrdisable);
++ if (ohci->ed_rm_list[frame] != NULL)
++ writel (OHCI_INTR_SF, &regs->intrenable);
++ if( -1 == stat )
++ stat = 0xff;
++dbg("sf\n" );
++ }
++ if( 0 == ints )
++ stat = 0 ;
++out:
++ writel (ints, &regs->intrstatus);
++ return stat;
++}
++
++/*-------------------------------------------------------------------------*/
++
++/*-------------------------------------------------------------------------*/
++
++/* De-allocate all resources.. */
++
++static void hc_release_ohci (ohci_t *ohci)
++{
++ dbg ("USB HC release ohci usb-%s", ohci->slot_name);
++
++ if (!ohci->disabled)
++ hc_reset (ohci);
++}
++
++/*-------------------------------------------------------------------------*/
++
++/*
++ * low level initalisation routine, called from usb.c
++ */
++static char ohci_inited = 0;
++
++int usb_lowlevel_init(void)
++{
++#ifdef FIXME
++ S3C24X0_CLOCK_POWER * const clk_power = S3C24X0_GetBase_CLOCK_POWER();
++ S3C24X0_GPIO * const gpio = S3C24X0_GetBase_GPIO();
++ /*
++ * Set the 48 MHz UPLL clocking. Values are taken from
++ * "PLL value selection guide", 6-23, s3c2400_UM.pdf.
++ */
++ clk_power->UPLLCON = ((40 << 12) + (1 << 4) + 2);
++ gpio->MISCCR |= 0x8; /* 1 = use pads related USB for USB host */
++ /*
++ * Enable USB host clock.
++ */
++ clk_power->CLKCON |= (1 << 4);
++#endif
++#ifdef CONFIG_PXA27X
++ /*
++ * Section 20.6.1 of PXA Developer's reference manual
++ */
++ GPCR3 |= 0x80 ; // GP103 low
++
++ UHCHR |= UHCHR_SSEP2|UHCHR_SSEP1 ; // Port 2 and 3 not supported
++ UHCHR &= ~(UHCHR_SSE|UHCHR_SSEP0);
++
++// UHCRHS &= ~UHCRHS_LPS ;
++// UHCCOMS &= ~UHCCOMS_HCR ; // reset
++ CKEN |= CKEN10_USBHOST ;
++ udelay(10);
++ UHCHR &= ~(UHCHR_FHR|UHCHR_SSE);
++#elif defined( CONFIG_SM501 )
++ USB_GATE_MODE0 |= ENABLE_USBH ;
++ USB_GATE_MODE1 |= ENABLE_USBH ;
++#endif
++
++ memset (&gohci, 0, sizeof (ohci_t));
++ memset (&urb_priv, 0, sizeof (urb_priv_t));
++
++ /* align the storage */
++ if ((__u32)&ghcca[0] & 0xff) {
++ err("HCCA not aligned!!");
++ return -1;
++ }
++ phcca = &ghcca[0];
++ info("aligned ghcca %p", phcca);
++ memset(&ohci_dev, 0, sizeof(struct ohci_device));
++ if ((__u32)&ohci_dev.ed[0] & 0x7) {
++ err("EDs not aligned!!");
++ return -1;
++ }
++ memset(gtd, 0, sizeof(td_t) * (NUM_TD + 1));
++ if ((__u32)gtd & 0x7) {
++ err("TDs not aligned!!");
++ return -1;
++ }
++ ptd = gtd;
++ gohci.hcca = phcca;
++ memset (phcca, 0, sizeof (struct ohci_hcca));
++
++ gohci.disabled = 1;
++ gohci.sleeping = 0;
++ gohci.irq = -1;
++ gohci.regs = (struct ohci_regs *)USBH_BASE ;
++ gohci.flags = 0;
++ gohci.slot_name = "s3c2400";
++
++ if (hc_reset (&gohci) < 0) {
++ err( "----> Error from hc_reset\n" );
++ hc_release_ohci (&gohci);
++ /* Initialization failed */
++#ifdef FIXME
++ clk_power->CLKCON &= ~(1 << 4);
++#endif
++#ifdef CONFIG_PXA27X
++ CKEN &= ~CKEN10_USBHOST ;
++#elif defined( CONFIG_SM501 )
++#endif
++ return -1;
++ }
++
++ /* FIXME this is a second HC reset; why?? */
++ writel (gohci.hc_control = OHCI_USB_RESET, &gohci.regs->control);
++ wait_ms (10);
++
++ if (hc_start (&gohci) < 0) {
++ err ("can't start usb-%s", gohci.slot_name);
++ hc_release_ohci (&gohci);
++ /* Initialization failed */
++#ifdef FIXME
++ clk_power->CLKCON &= ~(1 << 4);
++#endif
++#ifdef CONFIG_PXA27X
++ CKEN &= ~CKEN10_USBHOST ;
++#elif defined( CONFIG_SM501 )
++#endif
++ return -1;
++ }
++
++#ifdef DEBUG
++ ohci_dump (&gohci, 1);
++#else
++ wait_ms(1);
++#endif
++printf( "----> end of low_level_init()\n" );
++ ohci_inited = 1;
++ return 0;
++}
++
++int usb_lowlevel_stop(void)
++{
++ /* this gets called really early - before the controller has */
++ /* even been initialized! */
++ if (!ohci_inited)
++ return 0;
++ /* TODO release any interrupts, etc. */
++ /* call hc_release_ohci() here ? */
++ hc_reset (&gohci);
++
++#ifdef CONFIG_PXA27X
++ /*
++ * Section 20.7.4.4 of PXA Developer's reference manual
++ */
++ UHCCOMS |= UHCCOMS_HCR ; // reset
++ udelay(10);
++ UHCRHS |= UHCRHS_LPS ;
++ UHCHR |= UHCHR_SSE ;
++ CKEN &= ~CKEN10_USBHOST ;
++#elif defined( CONFIG_SM501 )
++#endif
++
++ return 0;
++}
++
++#endif /* CONFIG_USB_OHCI */
+diff -u -r --new-file u-boot-1.1.2/cpu/pxa/usb_ohci.h u-boot-1.1.2-neon/cpu/pxa/usb_ohci.h
+--- u-boot-1.1.2/cpu/pxa/usb_ohci.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/cpu/pxa/usb_ohci.h 2007-08-11 21:07:20.000000000 +0200
+@@ -0,0 +1,419 @@
++/*
++ * URB OHCI HCD (Host Controller Driver) for USB.
++ *
++ * (C) Copyright 1999 Roman Weissgaerber <weissg@vienna.at>
++ * (C) Copyright 2000-2001 David Brownell <dbrownell@users.sourceforge.net>
++ *
++ * usb-ohci.h
++ */
++
++
++static int cc_to_error[16] = {
++
++/* mapping of the OHCI CC status to error codes */
++ /* No Error */ 0,
++ /* CRC Error */ USB_ST_CRC_ERR,
++ /* Bit Stuff */ USB_ST_BIT_ERR,
++ /* Data Togg */ USB_ST_CRC_ERR,
++ /* Stall */ USB_ST_STALLED,
++ /* DevNotResp */ -1,
++ /* PIDCheck */ USB_ST_BIT_ERR,
++ /* UnExpPID */ USB_ST_BIT_ERR,
++ /* DataOver */ USB_ST_BUF_ERR,
++ /* DataUnder */ USB_ST_BUF_ERR,
++ /* reservd */ -1,
++ /* reservd */ -1,
++ /* BufferOver */ USB_ST_BUF_ERR,
++ /* BuffUnder */ USB_ST_BUF_ERR,
++ /* Not Access */ -1,
++ /* Not Access */ -1
++};
++
++/* ED States */
++
++#define ED_NEW 0x00
++#define ED_UNLINK 0x01
++#define ED_OPER 0x02
++#define ED_DEL 0x04
++#define ED_URB_DEL 0x08
++
++/* usb_ohci_ed */
++struct ed {
++ __u32 hwINFO;
++ __u32 hwTailP;
++ __u32 hwHeadP;
++ __u32 hwNextED;
++
++ struct ed *ed_prev;
++ __u8 int_period;
++ __u8 int_branch;
++ __u8 int_load;
++ __u8 int_interval;
++ __u8 state;
++ __u8 type;
++ __u16 last_iso;
++ struct ed *ed_rm_list;
++
++ struct usb_device *usb_dev;
++ __u32 unused[3];
++} __attribute((aligned(16)));
++typedef struct ed ed_t;
++
++
++/* TD info field */
++#define TD_CC 0xf0000000
++#define TD_CC_GET(td_p) ((td_p >>28) & 0x0f)
++#define TD_CC_SET(td_p, cc) (td_p) = ((td_p) & 0x0fffffff) | (((cc) & 0x0f) << 28)
++#define TD_EC 0x0C000000
++#define TD_T 0x03000000
++#define TD_T_DATA0 0x02000000
++#define TD_T_DATA1 0x03000000
++#define TD_T_TOGGLE 0x00000000
++#define TD_R 0x00040000
++#define TD_DI 0x00E00000
++#define TD_DI_SET(X) (((X) & 0x07)<< 21)
++#define TD_DP 0x00180000
++#define TD_DP_SETUP 0x00000000
++#define TD_DP_IN 0x00100000
++#define TD_DP_OUT 0x00080000
++
++#define TD_ISO 0x00010000
++#define TD_DEL 0x00020000
++
++/* CC Codes */
++#define TD_CC_NOERROR 0x00
++#define TD_CC_CRC 0x01
++#define TD_CC_BITSTUFFING 0x02
++#define TD_CC_DATATOGGLEM 0x03
++#define TD_CC_STALL 0x04
++#define TD_DEVNOTRESP 0x05
++#define TD_PIDCHECKFAIL 0x06
++#define TD_UNEXPECTEDPID 0x07
++#define TD_DATAOVERRUN 0x08
++#define TD_DATAUNDERRUN 0x09
++#define TD_BUFFEROVERRUN 0x0C
++#define TD_BUFFERUNDERRUN 0x0D
++#define TD_NOTACCESSED 0x0F
++
++
++#define MAXPSW 1
++
++struct td {
++ __u32 hwINFO;
++ __u32 hwCBP; /* Current Buffer Pointer */
++ __u32 hwNextTD; /* Next TD Pointer */
++ __u32 hwBE; /* Memory Buffer End Pointer */
++
++ __u16 hwPSW[MAXPSW];
++ __u8 unused;
++ __u8 index;
++ struct ed *ed;
++ struct td *next_dl_td;
++ struct usb_device *usb_dev;
++ int transfer_len;
++ __u32 data;
++
++ __u32 unused2[2];
++} __attribute((aligned(32)));
++typedef struct td td_t;
++
++#define OHCI_ED_SKIP (1 << 14)
++
++/*
++ * The HCCA (Host Controller Communications Area) is a 256 byte
++ * structure defined in the OHCI spec. that the host controller is
++ * told the base address of. It must be 256-byte aligned.
++ */
++
++#define NUM_INTS 32 /* part of the OHCI standard */
++struct ohci_hcca {
++ __u32 int_table[NUM_INTS]; /* Interrupt ED table */
++ __u16 frame_no; /* current frame number */
++ __u16 pad1; /* set to 0 on each frame_no change */
++ __u32 done_head; /* info returned for an interrupt */
++ u8 reserved_for_hc[116];
++} __attribute((aligned(256)));
++
++
++/*
++ * Maximum number of root hub ports.
++ */
++#define MAX_ROOT_PORTS 15 /* maximum OHCI root hub ports */
++
++/*
++ * This is the structure of the OHCI controller's memory mapped I/O
++ * region. This is Memory Mapped I/O. You must use the readl() and
++ * writel() macros defined in asm/io.h to access these!!
++ */
++struct ohci_regs {
++ /* control and status registers */
++ __u32 revision;
++ __u32 control;
++ __u32 cmdstatus;
++ __u32 intrstatus;
++ __u32 intrenable;
++ __u32 intrdisable;
++ /* memory pointers */
++ __u32 hcca;
++ __u32 ed_periodcurrent;
++ __u32 ed_controlhead;
++ __u32 ed_controlcurrent;
++ __u32 ed_bulkhead;
++ __u32 ed_bulkcurrent;
++ __u32 donehead;
++ /* frame counters */
++ __u32 fminterval;
++ __u32 fmremaining;
++ __u32 fmnumber;
++ __u32 periodicstart;
++ __u32 lsthresh;
++ /* Root hub ports */
++ struct ohci_roothub_regs {
++ __u32 a;
++ __u32 b;
++ __u32 status;
++ __u32 portstatus[MAX_ROOT_PORTS];
++ } roothub;
++} __attribute((aligned(32)));
++
++
++/* OHCI CONTROL AND STATUS REGISTER MASKS */
++
++/*
++ * HcControl (control) register masks
++ */
++#define OHCI_CTRL_CBSR (3 << 0) /* control/bulk service ratio */
++#define OHCI_CTRL_PLE (1 << 2) /* periodic list enable */
++#define OHCI_CTRL_IE (1 << 3) /* isochronous enable */
++#define OHCI_CTRL_CLE (1 << 4) /* control list enable */
++#define OHCI_CTRL_BLE (1 << 5) /* bulk list enable */
++#define OHCI_CTRL_HCFS (3 << 6) /* host controller functional state */
++#define OHCI_CTRL_IR (1 << 8) /* interrupt routing */
++#define OHCI_CTRL_RWC (1 << 9) /* remote wakeup connected */
++#define OHCI_CTRL_RWE (1 << 10) /* remote wakeup enable */
++
++/* pre-shifted values for HCFS */
++# define OHCI_USB_RESET (0 << 6)
++# define OHCI_USB_RESUME (1 << 6)
++# define OHCI_USB_OPER (2 << 6)
++# define OHCI_USB_SUSPEND (3 << 6)
++
++/*
++ * HcCommandStatus (cmdstatus) register masks
++ */
++#define OHCI_HCR (1 << 0) /* host controller reset */
++#define OHCI_CLF (1 << 1) /* control list filled */
++#define OHCI_BLF (1 << 2) /* bulk list filled */
++#define OHCI_OCR (1 << 3) /* ownership change request */
++#define OHCI_SOC (3 << 16) /* scheduling overrun count */
++
++/*
++ * masks used with interrupt registers:
++ * HcInterruptStatus (intrstatus)
++ * HcInterruptEnable (intrenable)
++ * HcInterruptDisable (intrdisable)
++ */
++#define OHCI_INTR_SO (1 << 0) /* scheduling overrun */
++#define OHCI_INTR_WDH (1 << 1) /* writeback of done_head */
++#define OHCI_INTR_SF (1 << 2) /* start frame */
++#define OHCI_INTR_RD (1 << 3) /* resume detect */
++#define OHCI_INTR_UE (1 << 4) /* unrecoverable error */
++#define OHCI_INTR_FNO (1 << 5) /* frame number overflow */
++#define OHCI_INTR_RHSC (1 << 6) /* root hub status change */
++#define OHCI_INTR_OC (1 << 30) /* ownership change */
++#define OHCI_INTR_MIE (1 << 31) /* master interrupt enable */
++
++
++/* Virtual Root HUB */
++struct virt_root_hub {
++ int devnum; /* Address of Root Hub endpoint */
++ void *dev; /* was urb */
++ void *int_addr;
++ int send;
++ int interval;
++};
++
++/* USB HUB CONSTANTS (not OHCI-specific; see hub.h) */
++
++/* destination of request */
++#define RH_INTERFACE 0x01
++#define RH_ENDPOINT 0x02
++#define RH_OTHER 0x03
++
++#define RH_CLASS 0x20
++#define RH_VENDOR 0x40
++
++/* Requests: bRequest << 8 | bmRequestType */
++#define RH_GET_STATUS 0x0080
++#define RH_CLEAR_FEATURE 0x0100
++#define RH_SET_FEATURE 0x0300
++#define RH_SET_ADDRESS 0x0500
++#define RH_GET_DESCRIPTOR 0x0680
++#define RH_SET_DESCRIPTOR 0x0700
++#define RH_GET_CONFIGURATION 0x0880
++#define RH_SET_CONFIGURATION 0x0900
++#define RH_GET_STATE 0x0280
++#define RH_GET_INTERFACE 0x0A80
++#define RH_SET_INTERFACE 0x0B00
++#define RH_SYNC_FRAME 0x0C80
++/* Our Vendor Specific Request */
++#define RH_SET_EP 0x2000
++
++
++/* Hub port features */
++#define RH_PORT_CONNECTION 0x00
++#define RH_PORT_ENABLE 0x01
++#define RH_PORT_SUSPEND 0x02
++#define RH_PORT_OVER_CURRENT 0x03
++#define RH_PORT_RESET 0x04
++#define RH_PORT_POWER 0x08
++#define RH_PORT_LOW_SPEED 0x09
++
++#define RH_C_PORT_CONNECTION 0x10
++#define RH_C_PORT_ENABLE 0x11
++#define RH_C_PORT_SUSPEND 0x12
++#define RH_C_PORT_OVER_CURRENT 0x13
++#define RH_C_PORT_RESET 0x14
++
++/* Hub features */
++#define RH_C_HUB_LOCAL_POWER 0x00
++#define RH_C_HUB_OVER_CURRENT 0x01
++
++#define RH_DEVICE_REMOTE_WAKEUP 0x00
++#define RH_ENDPOINT_STALL 0x01
++
++#define RH_ACK 0x01
++#define RH_REQ_ERR -1
++#define RH_NACK 0x00
++
++
++/* OHCI ROOT HUB REGISTER MASKS */
++
++/* roothub.portstatus [i] bits */
++#define RH_PS_CCS 0x00000001 /* current connect status */
++#define RH_PS_PES 0x00000002 /* port enable status*/
++#define RH_PS_PSS 0x00000004 /* port suspend status */
++#define RH_PS_POCI 0x00000008 /* port over current indicator */
++#define RH_PS_PRS 0x00000010 /* port reset status */
++#define RH_PS_PPS 0x00000100 /* port power status */
++#define RH_PS_LSDA 0x00000200 /* low speed device attached */
++#define RH_PS_CSC 0x00010000 /* connect status change */
++#define RH_PS_PESC 0x00020000 /* port enable status change */
++#define RH_PS_PSSC 0x00040000 /* port suspend status change */
++#define RH_PS_OCIC 0x00080000 /* over current indicator change */
++#define RH_PS_PRSC 0x00100000 /* port reset status change */
++
++/* roothub.status bits */
++#define RH_HS_LPS 0x00000001 /* local power status */
++#define RH_HS_OCI 0x00000002 /* over current indicator */
++#define RH_HS_DRWE 0x00008000 /* device remote wakeup enable */
++#define RH_HS_LPSC 0x00010000 /* local power status change */
++#define RH_HS_OCIC 0x00020000 /* over current indicator change */
++#define RH_HS_CRWE 0x80000000 /* clear remote wakeup enable */
++
++/* roothub.b masks */
++#define RH_B_DR 0x0000ffff /* device removable flags */
++#define RH_B_PPCM 0xffff0000 /* port power control mask */
++
++/* roothub.a masks */
++#define RH_A_NDP (0xff << 0) /* number of downstream ports */
++#define RH_A_PSM (1 << 8) /* power switching mode */
++#define RH_A_NPS (1 << 9) /* no power switching */
++#define RH_A_DT (1 << 10) /* device type (mbz) */
++#define RH_A_OCPM (1 << 11) /* over current protection mode */
++#define RH_A_NOCP (1 << 12) /* no over current protection */
++#define RH_A_POTPGT (0xff << 24) /* power on to power good time */
++
++/* urb */
++#define N_URB_TD 48
++typedef struct
++{
++ ed_t *ed;
++ __u16 length; /* number of tds associated with this request */
++ __u16 td_cnt; /* number of tds already serviced */
++ int state;
++ unsigned long pipe;
++ int actual_length;
++ td_t *td[N_URB_TD]; /* list pointer to all corresponding TDs associated with this request */
++} urb_priv_t;
++#define URB_DEL 1
++
++/*
++ * This is the full ohci controller description
++ *
++ * Note how the "proper" USB information is just
++ * a subset of what the full implementation needs. (Linus)
++ */
++
++
++typedef struct ohci {
++ struct ohci_hcca *hcca; /* hcca */
++ /*dma_addr_t hcca_dma;*/
++
++ int irq;
++ int disabled; /* e.g. got a UE, we're hung */
++ int sleeping;
++ unsigned long flags; /* for HC bugs */
++
++ struct ohci_regs *regs; /* OHCI controller's memory */
++
++ ed_t *ed_rm_list[2]; /* lists of all endpoints to be removed */
++ ed_t *ed_bulktail; /* last endpoint of bulk list */
++ ed_t *ed_controltail; /* last endpoint of control list */
++ int intrstatus;
++ __u32 hc_control; /* copy of the hc control reg */
++ struct usb_device *dev[32];
++ struct virt_root_hub rh;
++
++ const char *slot_name;
++} ohci_t;
++
++#define NUM_EDS 8 /* num of preallocated endpoint descriptors */
++
++struct ohci_device {
++ ed_t ed[NUM_EDS];
++ int ed_cnt;
++};
++
++/* hcd */
++/* endpoint */
++static int ep_link(ohci_t * ohci, ed_t * ed);
++static int ep_unlink(ohci_t * ohci, ed_t * ed);
++static ed_t * ep_add_ed(struct usb_device * usb_dev, unsigned long pipe);
++
++/*-------------------------------------------------------------------------*/
++
++/* we need more TDs than EDs */
++#define NUM_TD 64
++
++/* +1 so we can align the storage */
++td_t gtd[NUM_TD+1];
++/* pointers to aligned storage */
++td_t *ptd;
++
++/* TDs ... */
++static inline struct td *
++td_alloc (struct usb_device *usb_dev)
++{
++ int i;
++ struct td *td;
++
++ td = NULL;
++ for (i = 0; i < NUM_TD; i++)
++ {
++ if (ptd[i].usb_dev == NULL)
++ {
++ td = &ptd[i];
++ td->usb_dev = usb_dev;
++ break;
++ }
++ }
++
++ return td;
++}
++
++static inline void
++ed_free (struct ed *ed)
++{
++ ed->usb_dev = NULL;
++}
+diff -u -r --new-file u-boot-1.1.2/.cvsignore u-boot-1.1.2-neon/.cvsignore
+--- u-boot-1.1.2/.cvsignore 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/.cvsignore 2007-08-11 21:07:19.000000000 +0200
+@@ -0,0 +1,13 @@
++*.map
++*.scr
++*.gz
++select.h
++*.log
++select.mk
++u-boot
++u-boot.bin
++u-boot.map
++u-boot.map.sorted
++u-boot.srec
++u-boot-binaries.zip
++
+diff -u -r --new-file u-boot-1.1.2/drivers/lan91c96.h u-boot-1.1.2-neon/drivers/lan91c96.h
+--- u-boot-1.1.2/drivers/lan91c96.h 2004-06-07 00:11:41.000000000 +0200
++++ u-boot-1.1.2-neon/drivers/lan91c96.h 2007-08-11 21:07:21.000000000 +0200
+@@ -76,7 +76,7 @@
+
+ #define SMC_IO_EXTENT 16
+
+-#ifdef CONFIG_PXA250
++#if defined( CONFIG_PXA250 ) || defined( CONFIG_PXA270 )
+
+ #define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+( r * 4 ))))
+ #define SMC_inw(r) (*((volatile word *)(SMC_BASE_ADDRESS+( r * 4 ))))
+@@ -139,7 +139,7 @@
+ }; \
+ })
+
+-#else /* if not CONFIG_PXA250 */
++#else /* if not CONFIG_PXA250 or CONFIG_PXA270 */
+
+ /*
+ * We have only 16 Bit PCMCIA access on Socket 0
+diff -u -r --new-file u-boot-1.1.2/drivers/smc91111.c u-boot-1.1.2-neon/drivers/smc91111.c
+--- u-boot-1.1.2/drivers/smc91111.c 2004-11-22 23:20:09.000000000 +0100
++++ u-boot-1.1.2-neon/drivers/smc91111.c 2007-08-11 21:07:21.000000000 +0200
+@@ -1583,6 +1583,101 @@
+ return (0);
+ }
+
++#define SMC_GET_INT_MASK() (SMC_inw( SMC91111_INT_REG ) >> 8)
++#define SMC_SET_INT_MASK(x) SMC_outw( (x) << 8, SMC91111_INT_REG )
++#define SMC_CURRENT_BANK() SMC_inw( BANK_SELECT )
++#define SMC_GET_CTL() SMC_inw( CTL_REG )
++#define SMC_SET_CTL(x) SMC_outw( x, CTL_REG )
++#define SMC_GET_MII() SMC_inw( MII_REG )
++#define SMC_SET_MII(x) SMC_outw( x, MII_REG )
++#define SMC_GET_PTR() SMC_inw( PTR_REG )
++#define SMC_SET_PTR(x) SMC_outw( x, PTR_REG )
++
++static int writeEEprom(int i,unsigned short val,unsigned short ctl)
++{
++ SMC_SELECT_BANK( 2 );
++ SMC_SET_PTR( i );
++ SMC_SELECT_BANK( 1 );
++ SMC_outw( val, GP_REG );
++ udelay(1);
++ SMC_SET_CTL( ctl | CTL_EEPROM_SELECT | CTL_STORE );
++ int j=0;
++ do {
++ udelay(10);
++ j++;
++ if (j>=100000) return -1;
++ } while (SMC_GET_CTL() & CTL_STORE);
++ return 0;
++}
++
++#define SMC_SET_MAC_ADDR(addr) \
++ do { \
++ SMC_outw( addr[0]|(addr[1] << 8), ADDR0_REG ); \
++ SMC_outw( addr[2]|(addr[3] << 8), ADDR1_REG ); \
++ SMC_outw( addr[4]|(addr[5] << 8), ADDR2_REG ); \
++ } while (0)
++
++int set_rom_mac (char const *mac)
++{
++ unsigned short saved_bank = SMC_CURRENT_BANK();
++ SMC_SELECT_BANK( 2 );
++
++ unsigned short saved_mask = SMC_GET_INT_MASK();
++ SMC_SET_INT_MASK( 0 );
++
++ unsigned short saved_ptr = SMC_GET_PTR();
++
++ SMC_SELECT_BANK( 1 );
++
++ unsigned short saved_ctl = SMC_GET_CTL();
++
++ SMC_SET_MAC_ADDR(mac);
++
++ SMC_SELECT_BANK( 3 );
++ unsigned short mii_reg = SMC_GET_MII();
++
++ SMC_SET_MII(mii_reg & ~(0x0f));
++
++ SMC_SELECT_BANK( 1 );
++
++ SMC_SET_CTL( saved_ctl | CTL_EEPROM_SELECT );
++ unsigned short cfg = CONFIG_DEFAULT
++ | CONFIG_NO_WAIT
++ | CONFIG_EPH_POWER_EN;
++ unsigned short bar = (unsigned short)( SMC_BASE_ADDRESS );
++//a4, a10,a11,a12 must be all zeros
++ bar = (bar & 0xe000) | ((bar & 0x3e0)<<3) | (0x27);
++ int i=0;
++ while (i < 0x20) {
++ if (writeEEprom(i,cfg,saved_ctl)) break;
++ if (writeEEprom(i+1,bar,saved_ctl)) break;
++ if (writeEEprom(i+2,0,saved_ctl)) break;
++ if (writeEEprom(i+3,0,saved_ctl)) break;
++ i+=4;
++ }
++
++ int j = 0;
++ if (i==0x20) {
++ while (j < 6) {
++ if (writeEEprom(i,mac[j]|(mac[j+1]<<8),saved_ctl)) break;
++ i++; j+=2;
++ }
++ }
++
++ SMC_SET_CTL( saved_ctl );
++
++ SMC_SELECT_BANK( 2 );
++ SMC_SET_PTR( saved_ptr );
++ SMC_SET_INT_MASK( saved_mask );
++ SMC_SELECT_BANK( saved_bank );
++
++ return 6 == j ;
++}
++
++static char const invalidMac[6] = {
++ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
++};
++
+ int get_rom_mac (char *v_rom_mac)
+ {
+ #ifdef HARDCODE_MAC /* used for testing or to supress run time warnings */
+@@ -1601,6 +1696,9 @@
+ valid_mac |= v_rom_mac[i];
+ }
+
++ if( valid_mac )
++ valid_mac = ( 0 != memcmp( invalidMac, v_rom_mac, sizeof(invalidMac) ) );
++
+ return (valid_mac ? 1 : 0);
+ #endif
+ }
+diff -u -r --new-file u-boot-1.1.2/drivers/smc91111.h u-boot-1.1.2-neon/drivers/smc91111.h
+--- u-boot-1.1.2/drivers/smc91111.h 2004-11-02 14:00:56.000000000 +0100
++++ u-boot-1.1.2-neon/drivers/smc91111.h 2007-08-11 21:07:21.000000000 +0200
+@@ -74,7 +74,7 @@
+
+ #define SMC_IO_EXTENT 16
+
+-#ifdef CONFIG_PXA250
++#if defined( CONFIG_PXA250 ) || defined( CONFIG_PXA270 )
+
+ #ifdef CONFIG_XSENGINE
+ #define SMC_inl(r) (*((volatile dword *)(SMC_BASE_ADDRESS+(r<<1))))
+@@ -176,7 +176,7 @@
+ }; \
+ })
+
+-#else /* if not CONFIG_PXA250 */
++#else /* if not CONFIG_PXA250 or CONFIG_PXA270 */
+
+ #ifndef CONFIG_SMC_USE_IOFUNCS /* these macros don't work on some boards */
+ /*
+diff -u -r --new-file u-boot-1.1.2/examples/Makefile u-boot-1.1.2-neon/examples/Makefile
+--- u-boot-1.1.2/examples/Makefile 2004-10-10 23:27:33.000000000 +0200
++++ u-boot-1.1.2-neon/examples/Makefile 2007-08-11 21:07:21.000000000 +0200
+@@ -100,12 +100,12 @@
+ LIBCOBJS= stubs.o
+ LIBOBJS = $(LIBAOBJS) $(LIBCOBJS)
+
+-gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`)
+-clibdir := $(shell dirname `$(CC) $(CFLAGS) -print-file-name=libc.a`)
++gcclibdir := $(shell dirname "`$(CC) -print-libgcc-file-name`")
++clibdir := $(shell dirname "`$(CC) $(CFLAGS) -print-file-name=libc.a`")
+
+ CPPFLAGS += -I..
+
+-all: .depend $(LIB) $(SREC) $(BIN)
++all: .depend $(LIB)
+
+ #########################################################################
+ $(LIB): .depend $(LIBOBJS)
+diff -u -r --new-file u-boot-1.1.2/fs/fat/fat.c u-boot-1.1.2-neon/fs/fat/fat.c
+--- u-boot-1.1.2/fs/fat/fat.c 2004-12-16 18:57:26.000000000 +0100
++++ u-boot-1.1.2-neon/fs/fat/fat.c 2007-08-11 21:07:21.000000000 +0200
+@@ -52,6 +52,8 @@
+ #define DOS_PART_TBL_OFFSET 0x1be
+ #define DOS_PART_MAGIC_OFFSET 0x1fe
+ #define DOS_FS_TYPE_OFFSET 0x36
++#define DOS_FS_TYPE_OFFSET_FAT_16 0x36 // Code relating to this constant was changed/added by Dubner 2005-05-20
++#define DOS_FS_TYPE_OFFSET_FAT_32 0x52 // Code relating to this constant was changed/added by Dubner 2005-05-20
+
+ int disk_read (__u32 startblock, __u32 getsize, __u8 * bufptr)
+ {
+@@ -83,7 +85,8 @@
+ /* no signature found */
+ return -1;
+ }
+- if(!strncmp(&buffer[DOS_FS_TYPE_OFFSET],"FAT",3)) {
++ if(!strncmp(&buffer[DOS_FS_TYPE_OFFSET_FAT_16],"FAT",3)
++ || !strncmp (&buffer[DOS_FS_TYPE_OFFSET_FAT_32], "FAT", 3)) {
+ /* ok, we assume we are on a PBR only */
+ cur_part = 1;
+ part_offset=0;
+@@ -342,7 +345,7 @@
+ newclust = get_fatent(mydata, endclust);
+ if((newclust -1)!=endclust)
+ goto getit;
+- if (newclust <= 0x0001 || newclust >= 0xfff0) {
++ if (newclust <= 0x0001 ) { // || newclust >= 0xfff0) {
+ FAT_DPRINT("curclust: 0x%x\n", newclust);
+ FAT_DPRINT("Invalid FAT entry\n");
+ return gotsize;
+@@ -890,7 +893,7 @@
+ dentptr++;
+ continue;
+ }
+- if (strcmp (fnamecopy, s_name) && strcmp (fnamecopy, l_name)) {
++ if (fnmatch(fnamecopy, s_name,0) && fnmatch(fnamecopy, l_name,0)) {
+ FAT_DPRINT ("RootMismatch: |%s|%s|\n", s_name, l_name);
+ dentptr++;
+ continue;
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/BigMacro.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/BigMacro.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/BigMacro.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/BigMacro.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,325 @@
++//
++// linux/include/asm-arm/BigMacro.h
++//
++// Author: Troy Kisky
++// Created: Jun 30, 2002
++// Copyright: Boundary Devices
++//
++// This program is free software; you can redistribute it and/or modify
++// it under the terms of the GNU General Public License version 2 as
++// published by the Free Software Foundation.
++//
++ .nolist
++
++//find set bit pair >= curbit
++//out: __nBit
++ .ifdef __ARMASM
++ GBLA __nBit
++ GBLA __nMask
++ GBLA __nVal
++; DCD __nV1
++
++.macro NextSetBitUp val,curBit
++ LCLA __nV1
++ .set __nBit,(\curBit)
++ .set __nV1,(\val)
++ WHILE ( (__nBit < 30) :LAND: ( (__nV1 :AND: (0x03:SHL:__nBit))=0) )
++ .set __nBit,(__nBit)+2
++ WEND
++.endm
++
++//find set bit pair <= curbit
++//out: __nBit
++.macro NextSetBitDown val,curBit
++ LCLA __nV1
++ .set __nBit,(\curBit)
++ .set __nV1,(\val)
++ WHILE ( (__nBit <> 0) :LAND: ( (__nV1:AND:(0xc0:SHL:__nBit))=0) )
++ .set __nBit,(__nBit)-2
++ WEND
++.endm
++ .else
++
++.macro NextSetBitUp val,curBit
++ .set __nBit,(\curBit)
++ .set __nV1,(\val)
++ .if ((__nV1) & (0x03<<(__nBit)))
++ .else
++ .if ((__nBit)-30)
++ NextSetBitUp __nV1,((__nBit)+2)
++ .endif
++ .endif
++ .set __nV1,0
++.endm
++
++//find set bit pair <= curbit
++//out: __nBit
++.macro NextSetBitDown val,curBit
++ .set __nBit,(\curBit)
++ .set __nV1,(\val)
++ .if ((__nV1)&(0xc0<<(__nBit)))
++ .else
++ .if (__nBit)
++ NextSetBitDown __nV1,((__nBit)-2)
++ .endif
++ .endif
++ .set __nV1,0
++.endm
++ .endif
++
++//OUT: __nMask
++.macro NextSetMask val
++ NextSetBitDown \val,24
++ .if (__nBit>=20)
++ NextSetBitUp \val,__nBit
++ .set __nMask,(0xff<<((__nBit)-16))
++ .set __nMask,(((__nMask)>>16)+(((__nMask)<<16)&0xffff0000))
++ .else
++ .set __nMask,(0xff<<(__nBit))
++ .endif
++
++.endm
++
++.macro Big2CC inst,dest,val
++ .set __nVal,(\val)
++ .if (__nVal)<>0
++ NextSetMask __nVal
++ \inst \dest,\dest,#(__nVal)&(__nMask)
++ Big2CC \inst,\dest,(__nVal)&~(__nMask)
++ .endif
++.endm
++
++.macro BigAnd2CC cc,dest,val
++ .set __nVal,(\val)
++ .if (~__nVal)<>0
++ NextSetMask __nVal
++ .if (((__nVal)&~(__nMask))=0)
++ and\cc \dest,\dest,#(__nVal)&(__nMask)
++ .else
++ Big2CC bic\cc,\dest,~__nVal
++ .endif
++ .endif
++.endm
++
++///////////////////////////////////////////////////////
++.macro BigMovCC cc,dest, val
++ .set __nVal,(\val)
++ NextSetMask ~__nVal
++ .if (((~(__nVal))&~(__nMask)) > 0x255)
++ NextSetMask __nVal
++ mov\cc \dest,#(__nVal)&(__nMask)
++ .if (((__nVal)&0xffff) ^ (((__nVal)>>16)&0xffff))<>0
++ Big2CC orr\cc,\dest,(__nVal)&~(__nMask)
++ .else
++ .set __nVal,(__nVal)&~(__nMask)
++ .if (__nVal)<>0
++ NextSetMask __nVal
++ orr\cc \dest,\dest,#(__nVal)&(__nMask)
++ .set __nVal,(__nVal)&~(__nMask)
++ .if (__nVal)<>0
++ orr\cc \dest,\dest,\dest,LSR #16
++ .endif
++ .endif
++ .endif
++ .else
++ mvn\cc \dest,#(~(__nVal))&(__nMask) //complement of complement is original
++ Big2CC bic\cc,\dest,(~(__nVal))&~(__nMask)
++ .endif
++.endm
++
++
++.macro BigAddCC cc,dest,src,val
++ .set __nVal,(\val)
++ .if (__nVal)<>0
++ NextSetMask -__nVal
++ .if (((-(__nVal))&~(__nMask)) > 0x255)
++ NextSetMask __nVal
++ add\cc \dest,\src,#(__nVal)&(__nMask)
++ Big2CC add\cc,\dest,(__nVal)&~(__nMask)
++ .else
++ sub\cc \dest,\src,#(-(__nVal))&(__nMask)
++ Big2CC sub\cc,\dest,(-(__nVal))&~(__nMask)
++ .endif
++ .else
++ mov\cc \dest,\src
++ .endif
++.endm
++
++.macro BigSubCC cc,dest,src,val
++ .set __nVal,(\val)
++ BigAddCC \cc,\dest,\src,-__nVal
++.endm
++
++.macro BigCC inst,cc,dest,src,val
++ .set __nVal,(\val)
++ .if (__nVal)<>0
++ NextSetMask __nVal
++ \inst\cc \dest,\src,#(__nVal)&(__nMask)
++ Big2CC \inst\cc,\dest,(__nVal)&~(__nMask)
++ .else
++ mov\cc \dest,\src
++ .endif
++.endm
++
++
++.macro BigAndCC cc,dest,src,val
++ .set __nVal,(\val)
++ .if (~__nVal)<>0
++ NextSetMask __nVal
++ .if (((__nVal)&~(__nMask))=0)
++ and\cc \dest,\src,#(__nVal)&(__nMask)
++ .else
++ BigCC bic,\cc,\dest,\src,~__nVal
++ .endif
++ .else
++ mov\cc \dest,\src
++ .endif
++.endm
++
++/////////////////////////////////////
++//dest, value
++.macro BigAdd2 dest,val
++ Big2CC add,\dest,\val
++.endm
++.macro BigAdd2Eq dest,val
++ Big2CC addeq,\dest,\val
++.endm
++.macro BigAdd2Ne dest,val
++ Big2CC addne,\dest,\val
++.endm
++
++.macro BigSub2 dest,val
++ Big2CC sub,\dest,\val
++.endm
++.macro BigSub2Eq dest,val
++ Big2CC subeq,\dest,\val
++.endm
++.macro BigSub2Ne dest,val
++ Big2CC subne,\dest,\val
++.endm
++
++.macro BigOrr2 dest,val
++ Big2CC orr,\dest,\val
++.endm
++.macro BigOrr2Eq dest,val
++ Big2CC orreq,\dest,\val
++.endm
++.macro BigOrr2Ne dest,val
++ Big2CC orrne,\dest,\val
++.endm
++
++.macro BigEor2 dest,val
++ Big2CC eor,\dest,\val
++.endm
++.macro BigEor2Eq dest,val
++ Big2CC eoreq,\dest,\val
++.endm
++.macro BigEor2Ne dest,val
++ Big2CC eorne,\dest,\val
++.endm
++.macro BigEor2Cs dest,val
++ Big2CC eorcs,\dest,\val
++.endm
++.macro BigEor2Cc dest,val
++ Big2CC eorcc,\dest,\val
++.endm
++
++.macro BigBic2 dest,val
++ Big2CC bic,\dest,\val
++.endm
++.macro BigBic2Eq dest,val
++ Big2CC biceq,\dest,\val
++.endm
++.macro BigBic2Ne dest,val
++ Big2CC bicne,\dest,\val
++.endm
++
++.macro BigAnd2 dest,val
++ BigAnd2CC al,\dest,\val
++.endm
++.macro BigAnd2Eq dest,val
++ BigAnd2CC eq,\dest,\val
++.endm
++.macro BigAnd2Ne dest,val
++ BigAnd2CC ne,\dest,\val
++.endm
++/////////////////////////////////////
++
++.macro BigMov dest,val
++ BigMovCC al,\dest,\val
++.endm
++.macro BigMovEq dest,val
++ BigMovCC eq,\dest,\val
++.endm
++.macro BigMovNe dest,val
++ BigMovCC ne,\dest,\val
++.endm
++// dest,src,value
++.macro BigAdd dest,src,val
++ BigAddCC al,\dest,\src,\val
++.endm
++.macro BigAddEq dest,src,val
++ BigAddCC eq,\dest,\src,\val
++.endm
++.macro BigAddNe dest,src,val
++ BigAddCC ne,\dest,\src,\val
++.endm
++
++.macro BigSub dest,src,val
++ BigSubCC al,\dest,\src,\val
++.endm
++.macro BigSubEq dest,src,val
++ BigSubCC eq,\dest,\src,\val
++.endm
++.macro BigSubNe dest,src,val
++ BigSubCC ne,\dest,\src,\val
++.endm
++
++.macro BigOrr dest,src,val
++ BigCC orr,al,\dest,\src,\val
++.endm
++.macro BigOrrEq dest,src,val
++ BigCC orr,eq,\dest,\src,\val
++.endm
++.macro BigOrrNe dest,src,val
++ BigCC orr,ne,\dest,\src,\val
++.endm
++
++.macro BigEor dest,src,val
++ BigCC eor,al,\dest,\src,\val
++.endm
++.macro BigEorEq dest,src,val
++ BigCC eor,eq,\dest,\src,\val
++.endm
++.macro BigEorNe dest,src,val
++ BigCC eor,ne,\dest,\src,\val
++.endm
++.macro BigEorCs dest,src,val
++ BigCC eor,cs,\dest,\src,\val
++.endm
++.macro BigEorCc dest,src,val
++ BigCC eor,cc,\dest,\src,\val
++.endm
++
++.macro BigBic dest,src,val
++ BigCC bic,al,\dest,\src,\val
++.endm
++.macro BigBicEq dest,src,val
++ BigCC bic,eq,\dest,\src,\val
++.endm
++.macro BigBicNe dest,src,val
++ BigCC bic,ne,\dest,\src,\val
++.endm
++
++.macro BigAnd dest,src,val
++ BigAndCC al,\dest,\src,\val
++.endm
++.macro BigAndEq dest,src,val
++ BigAndCC eq,\dest,\src,\val
++.endm
++.macro BigAndNe dest,src,val
++ BigAndCC ne,\dest,\src,\val
++.endm
++
++// *******************************************************************************************
++ .list
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/burn.inc u-boot-1.1.2-neon/include/asm-arm/arch-pxa/burn.inc
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/burn.inc 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/burn.inc 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,367 @@
++#define FLASH_GPIO_STATUS 0 //1 means use gp to tell when flash is ready
++
++#if (PLATFORM_TYPE==NEONB)
++#define FLASH_BASE_ADDRESS 0x04000000
++#else
++#define FLASH_BASE_ADDRESS 0x0
++#endif
++
++
++#define FLASH_ID_CMD ((0x0090<<16) + 0x0090) //read Identifier Codes
++#define FLASH_STATUS_CMD ((0x0070<<16) + 0x0070)
++#define FLASH_STATUS_CLEAR_CMD ((0x0050<<16) + 0x0050)
++#define FLASH_READ_CMD ((0x00FF<<16) + 0x00FF) //Read Array/Reset
++#define FLASH_ERASE_CMD ((0x0020<<16) + 0x0020) //Block Erase
++#define FLASH_CONFIRM_CMD ((0x00D0<<16) + 0x00D0) //Block Erase and Program Resume
++//#define FLASH_WRITE_CMD ((0x0040<<16) + 0x0040) //Program word
++#define FLASH_WRITE_TO_BUFFER_CMD ((0x00E8<<16) + 0x00E8) //Program word
++
++#define FLASH_SUCCESS_RSP ((0x0080<<16) + 0x0080)
++
++#define stmicro_manCode ((0x0020<<16) + 0x0020)
++#define intel_manCode ((0x0089<<16) + 0x0089)
++#define SECT_SIZE (1<<18) //256k
++
++#define f320j3a_devCode ((0x0016<<16) + 0x0016)
++#define f320j3a_NUM_SECTORS 32 //for 8M flash
++#define f320j3a_SIZE (f320j3a_NUM_SECTORS*SECT_SIZE)
++
++#define f640j3a_devCode ((0x0017<<16) + 0x0017)
++#define f640j3a_NUM_SECTORS 64 //for 16M flash (8 meg on 16bit boards)
++#define f640j3a_SIZE (f640j3a_NUM_SECTORS*SECT_SIZE)
++
++#define f128j3a_devCode ((0x0018<<16) + 0x0018)
++#define f128j3a_NUM_SECTORS 128 //for 32M flash
++#define f128j3a_SIZE (f128j3a_NUM_SECTORS*SECT_SIZE)
++// *****************************
++#define MANCODE 0
++#define DEVCODE 4
++
++
++
++#define rRet r6
++#define rRamSectorEnd r7
++#define rRamSector rNum1
++#define rRamEnd rNum2
++#define rFlashBase sl //r10
++#define rFlashSector fp //r11
++
++#define CMD_BURN 0
++#define CMD_VERIFY 1
++#define CMD_BURNALL 2
++
++.macro delayCnt rTemp,cnt
++ mov \rTemp,#\cnt
++90: subs \rTemp,\rTemp,#1
++ bne 90b
++.endm
++// *********************************
++//default delay is for write recovery before read, allow 400 MHZ cpu
++.macro delay
++ delayCnt r4,((40/10)*COUNT_MULT)
++.endm
++
++
++
++.macro FLASH_GPIO_WAIT_FOR_IDLE
++ .if FLASH_GPIO_STATUS
++ bl FlashGpioWaitForIdle
++ .endif
++.endm
++
++.macro DEFINE_FLASH_GPIO_WAIT_FOR_IDLE
++ .if FLASH_GPIO_STATUS
++FlashGpioWaitForIdle:
++//500 ns delay for STS going low
++ delayCnt r4,((500/10)*COUNT_MULT) //500ns /10ns (for 100MHZ cpu cycle time) * 4 (100MHZ cpu)
++ mov r5,#0x300000
++ BigMov r4,GPIO_BASE
++91: ldr r2,[r4,#GPLR0]
++ and r2,r2,#3
++ cmp r2,#3
++ subnes r5,r5,#1
++ bne 91b
++ mov pc,lr //return
++ .endif
++.endm
++
++//out: z-1 timeout
++.macro waitForReady istr,ildr,mask,inc
++ BigMov r2,FLASH_STATUS_CMD&\mask
++ \istr r2,[r1,#-\inc]
++
++ FLASH_GPIO_WAIT_FOR_IDLE
++ BigMov r3,FLASH_SUCCESS_RSP&\mask
++
++ mov r5,#0x300000*COUNT_MULT
++ .if FLASH_GPIO_STATUS
++ b 92f
++ .endif
++
++71:
++ delayCnt r4,((500/10)*COUNT_MULT)
++92: \ildr r4,[r1,#-\inc] //!!! read status
++ and r4,r4,r3
++ cmp r4,r3
++ subnes r5,r5,#1
++ bne 71b
++
++ BigMov r2,FLASH_READ_CMD&\mask
++ \istr r2,[r1,#-\inc]
++ delay
++ teq r5,#0
++.endm
++
++
++
++//out: z-1 timeout
++.macro WaitForEraseDone istr,ildr,mask
++ FLASH_GPIO_WAIT_FOR_IDLE
++ BigMov r3,FLASH_SUCCESS_RSP&\mask
++ mov r5,#0x10000
++92:
++ delayCnt r4,0x3000
++ \ildr r4,[rFlashSector]
++ and r4,r4,r3
++ cmp r4,r3
++ subnes r5,r5,#1
++ bne 92b
++
++ BigMov r2,FLASH_READ_CMD&\mask
++ \istr r2,[rFlashSector,#0]
++ delay
++ teq r5,#0
++.endm
++// ***********************************
++
++//r5 - command - CMD_BURN or CMD_BURNALL
++//rRet(r6) succesful burn return address
++//rRamSectorEnd(r7) - but not an input, just how it is used
++//rRamSector(r8) - start
++//rRamEnd(r9) - end
++//rFlashBase(sl,r10) - flash base
++//rFlashSector(fp,r11) - starting flash sector
++//rDBG(sp,r13)
++//lr - return address on failure
++
++.macro BurnRtn istr,ildr,mask,shift,sizeShift,inc,plait
++ str r5,[rDBG,#DBG_TEMP]
++ BigMov r0,FLASH_STATUS_CLEAR_CMD&\mask
++ \istr r0,[rFlashBase,#0]
++ delay
++ BigMov r0,FLASH_ID_CMD&\mask
++ \istr r0,[rFlashBase,#0]
++ delay
++ BigMov r4,intel_manCode&\mask
++ BigMov r1,stmicro_manCode&\mask
++ BigMov r5,f320j3a_devCode&\mask
++ \ildr r2,[rFlashBase,#MANCODE>>\shift]
++ \ildr r3,[rFlashBase,#DEVCODE>>\shift]
++
++ BigMov r0,FLASH_READ_CMD&\mask
++ \istr r0,[rFlashBase,#0]
++ delayCnt r0,((40/10)*COUNT_MULT)
++
++ mov r0,#f320j3a_SIZE>>\sizeShift
++ cmp r3,r5
++
++ BigMovNe r5,f128j3a_devCode&\mask
++ movne r0,#f128j3a_SIZE>>\sizeShift
++ cmpne r3,r5
++
++ BigMovNe r5,f640j3a_devCode&\mask
++ movne r0,#f640j3a_SIZE>>\sizeShift
++ cmpne r3,r5
++
++ cmpeq r2,r4
++ cmpne r2,r1
++ movne r0,#MANCODE>>2
++ movne r1,#DEVCODE>>2
++ movne pc,lr //return if unrecognized chip
++
++ sub r1,rRamEnd,rRamSector
++ sub r2,rFlashSector,rFlashBase
++ add r1,r1,r2
++ cmp r1,r0
++ movhi pc,lr //return if trying to write too much
++
++ ldrb r5,[rDBG,#DBG_TEMP]
++ cmp r5,#CMD_BURNALL
++ streq r0,[rDBG,#DBG_TEMP] //r0 is size of flash
++
++ FLASH_GPIO_WAIT_FOR_IDLE
++1:
++ bl PrintSector
++
++//Now see if block needs erased
++ add rRamSectorEnd,rRamSector,#SECT_SIZE>>\shift
++ cmp rRamSectorEnd,rRamEnd
++ movhi rRamSectorEnd,rRamEnd
++ b 3f
++2:
++ ldr r2,[r0],#4 //read ram
++ ldr r3,[r1],#4 //read flash
++ and r4,r3,r2
++ cmp r4,r2
++ bne 10f
++3: cmp r0,rRamSectorEnd
++ blo 2b
++
++
++ ldr r2,[rDBG,#DBG_TEMP]
++ movs r2,r2
++ beq 20f
++ add r0,rFlashSector,#SECT_SIZE>>\shift
++ b 62f
++61:
++ ldr r2,[r1],#4 //read flash
++ adds r2,r2,#1
++ bne 10f
++62: cmp r1,r0
++ blo 61b
++ b 19f //erase not needed
++
++//erase
++10:
++ BigMov r3,FLASH_READ_CMD&\mask
++ \istr r3,[rFlashBase,#0]
++ delay
++ ldr r3,[r1,#-4] //read flash
++ and r4,r3,r2
++ cmp r4,r2
++ beq 3b //br if (we signal) glitch caused a spurious status register read
++
++ BigMov r0,FLASH_ERASE_CMD&\mask
++ \istr r0,[rFlashSector]
++ BigMov r0,FLASH_CONFIRM_CMD&\mask
++ \istr r0,[rFlashSector]
++ bl PrintErasing
++
++ WaitForEraseDone \istr,\ildr,\mask
++ beq Timeout //br if erase timed out
++
++ .if (\plait)
++ BigMov r0,FLASH_ERASE_CMD&\mask
++ \istr r0,[rFlashSector,#2]
++ BigMov r0,FLASH_CONFIRM_CMD&\mask
++ \istr r0,[rFlashSector,#2]
++ bl PrintErasing
++
++ WaitForEraseDone \istr,\ildr,\mask
++ beq Timeout //br if erase timed out
++ .endif
++
++19: cmp rRamSector,rRamSectorEnd
++ bhs 42f
++
++//programming
++20:
++ bl PrintProgramming
++21:
++ ldr r2,[r0],#4 //read ram
++ ldr r3,[r1],#4 //read flash
++ cmp r2,r3
++ bne 22f
++28:
++ cmp r0,rRamSectorEnd
++ blo 21b
++ b 30f //goto verify
++
++22:
++ sub r1,r1,#4
++ sub r0,r0,#4
++ and r2,r1,#0x3f>>\shift //align to a 64 byte boundary (32 per device)
++ sub r1,r1,r2
++ sub r0,r0,r2
++
++ BigMov r2,FLASH_WRITE_TO_BUFFER_CMD&\mask
++ \istr r2,[r1] //!!! write_to_buffer
++
++ sub r3,rRamSectorEnd,r0
++ mov r3,r3,LSR #2-\shift
++ sub r3,r3,#1
++ cmp r3,#0x0f
++ movhi r3,#0x0f
++ orr r2,r3,r3,LSL #16
++ \istr r2,[r1] //!!! word cnt -1
++25: \ildr r2,[r0],#\inc
++ \istr r2,[r1],#\inc //!!! words
++ subs r3,r3,#1
++ bpl 25b
++ BigMov r2,FLASH_CONFIRM_CMD&\mask
++ \istr r2,[r1,#-\inc] //!!! confirm
++
++ waitForReady \istr,\ildr,\mask,\inc
++
++ .if (\plait)
++ beq 88f
++ sub r1,r1,#\inc
++ sub r0,r0,#\inc
++ and r2,r1,#0x3f>>\shift //align to a 64 byte boundary (32 per device)
++ sub r1,r1,r2
++ sub r0,r0,r2
++
++ BigMov r2,FLASH_WRITE_TO_BUFFER_CMD&\mask
++ \istr r2,[r1,#2]! //!!! write_to_buffer
++ sub r3,rRamSectorEnd,r0
++ add r0,r0,#2
++ mov r3,r3,LSR #2-\shift
++ sub r3,r3,#1
++ cmp r3,#0x0f
++ movhi r3,#0x0f
++ orr r2,r3,r3,LSL #16
++ \istr r2,[r1] //!!! word cnt -1
++85: \ildr r2,[r0],#\inc
++ \istr r2,[r1],#\inc //!!! words
++ subs r3,r3,#1
++ bpl 85b
++ BigMov r2,FLASH_CONFIRM_CMD&\mask
++ \istr r2,[r1,#-\inc] //!!! confirm
++
++ waitForReady \istr,\ildr,\mask,\inc
++ sub r0,r0,#2
++ sub r1,r1,#2
++
++ bne 28b
++88:
++
++ .else
++ bne 28b
++ .endif
++ sub rRamSector,r0,#0x40>>\shift //whoops, timeout
++ sub rFlashSector,r1,#0x40>>\shift
++ b Timeout
++
++
++
++//verify
++30:
++ bl PrintVerifying
++31:
++ ldr r2,[r0],#4 //read ram
++ ldr r3,[r1],#4 //read flash
++ cmp r2,r3
++ bne 33f
++32: cmp r0,rRamSectorEnd
++ blo 31b
++42:
++ add rRamSector,rRamSector,#SECT_SIZE>>\shift
++ add rFlashSector,rFlashSector,#SECT_SIZE>>\shift
++ cmp rRamSector,rRamEnd
++ blo 1b //goto next sector
++
++ ldr r2,[rDBG,#DBG_TEMP]
++ add r2,r2,rFlashBase
++ cmp rFlashSector,r2
++ blo 1b
++
++ b PrintSuccess
++33:
++ BigMov r3,FLASH_READ_CMD&\mask
++ \istr r3,[rFlashBase,#0]
++ delay
++ ldr r3,[r1,#-4] //read flash
++ cmp r2,r3
++ beq 32b //br if (we signal) glitch caused a spurious status register read
++ b ReturnError
++.endm
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/miniMac.inc u-boot-1.1.2-neon/include/asm-arm/arch-pxa/miniMac.inc
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/miniMac.inc 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/miniMac.inc 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,476 @@
++#include "platformTypes.h"
++#define SUB_LR_FALL_THRU_FOR_FIQ 1 //0 for branch
++#define LITTLE_ENDIAN 1 //describes memory system
++#define DDEBUG 0
++#define DO_GPTEST 0
++
++#define MACH_TYPE_SCANPASS 332
++
++#define ATAG_CORE 0x54410001
++#define ATAG_MEM 0x54410002
++#define TAGGED_LIST 0xa0000100
++ .ifdef __ARMASM
++ GBLA STACKS_VALID
++ GBLA CONFIG_STACKS_VALID
++ .set CONFIG_STACKS_VALID,1
++ .endif
++
++#if (SOFTWARE_TYPE==WINCE)
++ .set STACKS_VALID,1
++ .ifdef __ARMASM
++ .else
++#ifndef CONFIG_STACKS_VALID
++#define CONFIG_STACKS_VALID 1
++#endif
++ .endif
++
++#define SDRAM_BASE_C_VIRTUAL 0xA0000000 //0x80000000 is cached mapped, 0xa0000000 is uncacheable
++#define UART_VIRT_BASE 0xAA100000
++#define VMA_DEBUG (0xfff00000)
++#define VIRTUAL_CS0 0xa8000000
++#define VIRTUAL_CS1 0xa8000000
++
++#else
++#ifdef CONFIG_STACKS_VALID
++ .set STACKS_VALID,1
++#else
++ .set STACKS_VALID,0
++#endif
++#define SDRAM_BASE_C_VIRTUAL 0xC0000000
++#define UART_VIRT_BASE 0xf8100000
++//#define VMA_DEBUG 0xff000000
++//!!!!!for some reason the above base causes bizarre problems
++#define VMA_DEBUG (0xfff00000)
++#define VIRTUAL_CS0 0xff000000
++#define VIRTUAL_CS1 0xff100000
++#endif
++
++#define V_rWork r2
++#define V_rBranch r3
++#define I_rWork r2
++#define I_rBranch sp //r13
++
++#ifdef CONFIG_STACKS_VALID
++#define rWork V_rWork
++#define rBranch V_rBranch
++
++#else
++#define rWork I_rWork
++#define rBranch I_rBranch
++#endif
++
++
++#if 0
++#define RED_VAL 0x15
++#define GREEN_VAL 0x2a
++#define BLUE_VAL 0x0a
++#else
++#define RED_VAL 0x0
++#define GREEN_VAL 0x0
++#define BLUE_VAL 0x0
++#endif
++
++//#define BAUDRATE 9600
++//#define BAUDRATE 38400
++//#define BAUDRATE 57600
++//#define BAUDRATE 57600
++#define BAUDRATE 115200
++//#define BAUDRATE 230400
++
++#if (CPU_CLOCK==100)
++#define COUNT_MULT 1
++#else
++#if (CPU_CLOCK==200)
++#define COUNT_MULT 2
++#else
++#if (CPU_CLOCK==300)
++#define COUNT_MULT 3
++#else
++#define COUNT_MULT 4
++#endif
++#endif
++#endif
++
++#if 1 //(SOFTWARE_TYPE==WINCE)
++#define RECEIVE_LOOP_COUNT 0x10000*COUNT_MULT
++#else
++#if (PLATFORM_TYPE==GAME_CONTROLLER_PLAITED_A1)||(PLATFORM_TYPE==GAME_CONTROLLER)||(PLATFORM_TYPE==GAME_WITH_SMC)
++#define RECEIVE_LOOP_COUNT 0x100000*COUNT_MULT
++#else
++#define RECEIVE_LOOP_COUNT 0x300000*3*COUNT_MULT
++#endif
++#endif
++
++// **********************************************************
++#define DBG_MAGIC 95 //this allows BigMov sp,DEBUG_BASE+DBG_MAGIC to generate just 1 instruction
++//#define DBG_START -95
++#define DBG_START 0
++#define DBG_R0 ((0<<2)+DBG_START)
++#define DBG_R1 ((1<<2)+DBG_START)
++#define DBG_R2 ((2<<2)+DBG_START)
++#define DBG_R3 ((3<<2)+DBG_START)
++#define DBG_R4 ((4<<2)+DBG_START)
++#define DBG_R5 ((5<<2)+DBG_START)
++#define DBG_R6 ((6<<2)+DBG_START)
++#define DBG_R7 ((7<<2)+DBG_START)
++#define DBG_R8 ((8<<2)+DBG_START)
++#define DBG_R9 ((9<<2)+DBG_START)
++#define DBG_SL ((10<<2)+DBG_START)
++#define DBG_FP ((11<<2)+DBG_START)
++#define DBG_IP ((12<<2)+DBG_START)
++#define DBG_SP ((13<<2)+DBG_START)
++#define DBG_LR ((14<<2)+DBG_START)
++#define DBG_PC ((15<<2)+DBG_START)
++#define DBG_CPSR ((16<<2)+DBG_START) //this and above have corresponding symbol #s
++
++#define DBG_HCPSR ((17<<2)+DBG_START) //interrupt handler original CPSR
++#define DBG_TRACE ((18<<2)+DBG_START)
++#define DBG_LastSignal ((19<<2)+DBG_START) //only 1 byte
++#define DBG_Mode (((19<<2)+1)+DBG_START) //only 1 byte, bit 0 -1 means gdb mode for control breaks
++#define DBG_FFUART_LCR (((19<<2)+2)+DBG_START) //only 1 byte
++#define DBG_HSP ((20<<2)+DBG_START) //handler stack pointer on entry, for aborts
++#define DBG_TEMP ((21<<2)+DBG_START)
++//22 free
++#define DBG_ABORT_PC ((23<<2)+DBG_START)
++#define DBG_INDIRECT_R0 ((24<<2)+DBG_START) //it needs it's own space in case a debug interrupt
++#define DBG_INDIRECT_LR ((25<<2)+DBG_START) //happens in the return code, but memory is mapped if used
++#define DEBUG_SPACE (((23<<2)|0x1f)+1) //a multiple of 32 bytes
++
++// *********************************************************
++
++#define DEBUG_START (VMA_DEBUG+0x3000-DEBUG_SPACE) //this saves on memory, but the else is easier to debug
++#define VMA_DEBUG_OFFSET (0xffff0000-VMA_DEBUG)
++#define DEBUG_BASE (DEBUG_START-DBG_START)
++#define DEBUG_SYM DEBUG_START
++
++
++#define SYM_R0 0
++#define SYM_R1 1
++#define SYM_R2 2
++#define SYM_R3 3
++#define SYM_R4 4
++#define SYM_R5 5
++#define SYM_R6 6
++#define SYM_R7 7
++#define SYM_R8 8
++#define SYM_R9 9
++#define SYM_SL 10
++#define SYM_FP 11
++#define SYM_IP 12
++#define SYM_SP 13
++#define SYM_LR 14
++#define SYM_PC 15
++#define SYM_CPSR 16
++
++//#define SYM_SPSR 17 //nice to have, but do it later
++//#define SYM_FPS 17
++#define SYM_FP0 17 //40 bits, 5
++#define SYM_FSR 18
++#define SYM_FAR 19
++#define SYM_DCSR 20
++#define SYM_TTBR 21
++#define SYM_CTRL 22
++
++#define SYM_LAST 22
++
++#define SYM_LAST_RCMD (SYM_FP0) //last symbol printed by R cmd
++
++
++
++#define SIG_RESET 0
++#define SIG_UNDEFINED_INSTRUCTION 1
++#define SIG_SWI 2
++#define SIG_PREFETCH_ABORT 3
++#define SIG_DATA_ABORT 4
++#define SIG_UNUSED 5
++#define SIG_IRQ 6
++#define SIG_FIQ 7
++#define SIG_DBG 8
++#define SIG_DBG_RESET 8+0
++#define SIG_DBG_INSTRUCTION_BKPT 8+1
++#define SIG_DBG_DATA_BKPT 8+2
++#define SIG_DBG_BKPT_SOFTWARE 8+3
++#define SIG_DBG_EXTERNAL 8+4
++#define SIG_DBG_VECTOR_TRAP 8+5
++#define SIG_DBG_TRACE_BUFFER_FULL 8+6
++#define SIG_DBG_RESERVED 8+7
++
++#define GDB_EXIT_CHAR 0x0d
++// ******************************************************************
++#define rFieldStart r4
++#define rField r5
++#define rValidCnt r6
++#define rCommand r7
++#define rNum1 r8
++#define rNum2 r9
++#define rSymbol sl //r10
++#define rPrevNum1 fp //r11
++#define rUart ip //r12
++#define rDBG sp
++
++//in Go routine, temporary
++#define rBCR0 sl //r10
++#define rBCR1 fp //r11
++
++//in GDB routines
++#define rGdbCmd r5
++#define rGdbNum1 r6
++#define rGdbTermChar1 r7
++#define rGdbNum2 r8
++#define rGdbTermChar2 r9
++#define rGdbNum3 sl //r10
++#define rGdbChkSum fp //r11
++
++//in Download routine
++#define rDest r3
++#define rPacketLength r4
++#define rDestHead r5
++#define rBlockNum r6
++#define rNak r7
++#define rCRC r8
++#define rRunningCRC r9
++#define rPrevCRC sl //r10
++
++#define rSP r8 //register which contains L4(' ',' ',' ',' '), all spaces
++// ********
++
++#define CR 0x0d
++#define LF 0x0a
++
++// ******************************
++#define F_INC 4
++
++#define F_NUM1_BIT (F_INC*3)
++#define F_NUM2_BIT (F_INC*5)
++
++#define F_COMMAND 1<<(F_INC)
++#define F_NUM1 1<<(F_NUM1_BIT)
++#define F_NUM2 1<<(F_NUM2_BIT)
++#define F_UNDEF 1<<(F_INC*7)
++
++#define F_COMMAND_MASK ((1<<F_INC)-1)<<(F_INC)
++#define F_NUM1_MASK ((1<<F_INC)-1)<<(F_INC*3)
++#define F_NUM2_MASK ((1<<F_INC)-1)<<(F_INC*5)
++// ******************************
++#define cachelinecount 2048 //1024 if baseaddress not used for another purpose
++#define cachelinesize 32
++//#define baseaddress 0 //physical memory does not have to exist here, but a valid descriptor table entry IS required
++
++// *****************************
++#define SOH 1
++#define STX 2
++#define EOT 4
++#define ACK 6
++#define NAK 0x15
++#define CAN 0x18
++
++#define CRC_POLY 0x10210000
++// *****************************
++
++// divide 0x1000 bytes among the stacks
++#define SS_SUPERVISOR 0x0800
++#define SS_IRQ 0x0400
++#define SS_FIQ 0x0100
++#define SS_SYSTEM 0x0100
++#define SS_UNDEFINED 0x0100
++#define SS_ABORT 0x0100
++#define SS_TOTAL (SS_SUPERVISOR+SS_IRQ+SS_FIQ+SS_SYSTEM+SS_UNDEFINED+SS_ABORT)
++#define SS_START 0x0a0008000-0x4400-SS_TOTAL //-17k, 16k for 1st level page table, 1k for 2nd level page table
++// *****************************
++
++
++
++
++// *********************************
++.macro mac_AfterPCPrint branch //vector table at 0xffff0000, br to vector table at VMA_DEBUG
++ .ifdef __ARMASM
++ LCLA cnt
++ .set cnt,$branch
++ WHILE cnt>0
++ b 93f
++ .set cnt,cnt-1
++ WEND
++ .else
++ .rept (\branch)
++ b 93f
++ .endr
++ .endif
++
++AfterPCPrint:
++ mov r0,#0x55
++ b AfterPCPrint1
++InitializeCont:
++ b MainInitializationCode
++93:
++.endm
++
++
++.macro RelocationVector branch //vector table at 0xffff0000, br to vector table at VMA_DEBUG
++ //warning, do not use relocated vectors unless memory management is enabled and VMA_DEBUG is mapped
++ .ifdef __ARMASM
++ LCLA cnt
++ .set cnt,$branch
++ WHILE cnt>0
++ b 71f
++ .set cnt,cnt-1
++ WEND
++ .else
++ .rept (\branch)
++ b 71f
++ .endr
++ .endif
++
++ mov pc,#0x00 //0 - reset always goes to 0 because it will be in physical memory mode for instructions
++ b .-VMA_DEBUG_OFFSET //4 - UndefinedInstr
++ b .-VMA_DEBUG_OFFSET //8 - SWI
++ b .-VMA_DEBUG_OFFSET //0x0c - PrefetchAbort
++ b .-VMA_DEBUG_OFFSET //0x10 - DataAbort
++ b .-VMA_DEBUG_OFFSET //0x14 - Unused
++ b .-VMA_DEBUG_OFFSET //0x18 - IRQ
++ .if SUB_LR_FALL_THRU_FOR_FIQ
++ sub lr,lr,#4 //0x1c - FIQ
++ .else
++ b .-VMA_DEBUG_OFFSET //0x1c - FIQ
++ .endif
++
++//these instructions are always at this address
++//to minimize the effect of a mismatch of minicache and flash
++ReturnWithIndirection:
++ mov r0,r0 //!!!! make sure this instruction is in the 1st 4k of flash so that BigOrr2Ne is guaranteed to work
++ ldr pc,[sp],#4
++
++//c-0 invalidate caches, c-1 skip cache invalidate
++//z-1 return direct, z-0 return indirect
++InvalidateAndReturn:
++ adrne lr,ReturnWithIndirection
++ ldreq lr,[r0,#DBG_PC-DBG_R2]
++ BigOrr2Ne lr,VMA_DEBUG //this range is sure to give an external abort for errata on exiting SDS
++
++//Invalidate the data/instruction cache and branch target buffer
++
++ CP15_CF_INVAL_BOTH mcrcc,r1
++ CPWAIT r1
++
++ ldr sp,[r0,#DBG_HSP-DBG_R2]
++ ldr r1,[r0,#DBG_R1-DBG_R2]
++ str r0,[r0,#DBG_ABORT_PC-DBG_R2] //reset error flag so abort can be retried
++ ldr r0,[r0,#DBG_R0-DBG_R2]
++ movs pc,lr
++71:
++.endm
++
++.macro CheckBranch rTemp,rAddr
++ movs \rTemp,pc //don't redirect if running from flash
++ submi \rAddr, \rAddr, #0x00010000
++ ldrmi \rTemp, [\rAddr], #8
++ eormi \rTemp, \rTemp, #0xea000000
++ tstmi \rTemp, #0xff000000
++ moveq \rTemp, \rTemp, LSL #8
++ addeq \rAddr, \rAddr, \rTemp, ASR #6
++.endm
++.macro CheckLdr rTemp,rAddr //check for instruction LDR pc,[pc,#nnn]
++ eor \rTemp, \rTemp, #0x0f900000
++ eor \rTemp, \rTemp, #0x000ff000
++ cmp \rTemp, #0x1000
++ ldrcc \rAddr,[\rAddr,\rTemp]
++.endm
++
++//this is case where stacks are assumed valid
++.macro V_VectorEntrance Work,Branch,code
++ stmdb sp!,{\Work,\Branch,lr}
++ mov \Branch,#\code<<2
++.endm
++.macro V_VectorExitCC Work,Branch,cc,ccia
++ str\cc \Branch,[sp,#8]
++ ldm\ccia sp!,{\Work,\Branch,pc}
++.endm
++.macro V_VectorExitCC1 Work,Branch,cc,ccia
++ str\cc \Branch,[sp,#8]
++ ldm\ccia sp!,{\Work,\Branch,pc}
++.endm
++
++//this is case where stacks are assumed invalid
++.macro I_VectorEntrance Work,Branch,code
++ BigMov \Branch,DEBUG_BASE+DBG_MAGIC
++ str \Work,[\Branch,#DBG_TEMP-DBG_MAGIC]
++ mov \Branch, #\code<<2
++.endm
++.macro I_VectorExitCC Work,Branch,cc,ccia
++ BigMovCC \cc,\Work,DEBUG_BASE+DBG_MAGIC
++ ldr\cc \Work,[\Work,#DBG_TEMP-DBG_MAGIC]
++ bx\cc \Branch
++.endm
++.macro I_VectorExitCC1 Work,Branch,cc,ccia
++ BigMov \Work,DEBUG_BASE+DBG_MAGIC
++ ldr\cc \Work,[\Work,#DBG_TEMP-DBG_MAGIC]
++ bx\cc \Branch
++.endm
++.macro VectorEntrance Work,Branch,code
++ .if STACKS_VALID
++ V_VectorEntrance \Work,\Branch,\code
++ .else
++ I_VectorEntrance \Work,\Branch,\code
++ .endif
++.endm
++.macro JOIN brcc
++ .if STACKS_VALID
++ \brcc join_fiq
++ .else
++ \brcc join_irq
++ .endif
++.endm
++.macro JOIN2 brcc
++ .if STACKS_VALID
++ \brcc join_fiq2
++ .else
++ \brcc join_irq2
++ .endif
++.endm
++// *****************************************************
++
++.macro SaveRegisters rBase,rTemp
++ CalcMemSize \rBase,\rTemp,MEMORY_CONTROL_BASE //out: \rTemp - mem size
++ BigAdd \rBase,\rTemp,MEM_START-0x1000+((DEBUG_BASE+DBG_MAGIC)&0xfff) //last 4k of memory
++ mov \rTemp,#0
++//great, now memory should be working, let's save registers, only r0(rBase),sp(rTemp) have been lost
++//don't trust LDM,STM instructions in debug mode....
++//or LDR w/Rd=PC, LDR w/RRX addressing mode, SWP, LDC, STC
++// *******************************************************
++// *******************************************************
++ str \rTemp,[\rBase,#DBG_START-32 -DBG_MAGIC]
++ str \rTemp,[\rBase,#DBG_R0 -DBG_MAGIC]
++ str r1, [\rBase,#DBG_R1 -DBG_MAGIC]
++ str r2, [\rBase,#DBG_R2 -DBG_MAGIC]
++ str r3, [\rBase,#DBG_R3 -DBG_MAGIC]
++ str \rTemp,[\rBase,#DBG_TRACE -DBG_MAGIC]
++ str \rTemp,[\rBase,#DBG_LastSignal-DBG_MAGIC]
++.endm
++.macro ReadHexE dest,rCnt1
++
++#if LITTLE_ENDIAN
++ mov \rCnt1,#4
++ mov \dest,#0
++1: bl ReadHex
++ bcc CheckSumError
++ add rGdbChkSum,rGdbChkSum,r0 //update checksum
++ mov r1,r1,LSL #28
++ add \dest,r1,\dest,LSR #8
++
++ bl ReadHex
++ bcc CheckSumError
++ add rGdbChkSum,rGdbChkSum,r0 //update checksum
++ add \dest,\dest,r1,LSL #24
++#else
++ mov \rCnt1,#8
++ mov \dest,#0
++1: bl ReadHex
++ bcc CheckSumError
++ add rGdbChkSum,rGdbChkSum,r0 //update checksum
++ add \dest,r1,\dest,LSL #4
++#endif
++ subs \rCnt1,\rCnt1,#1
++ bne 1b
++.endm
++
++
++
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/mmc.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/mmc.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/mmc.h 2003-06-27 23:32:42.000000000 +0200
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/mmc.h 2007-08-11 21:07:21.000000000 +0200
+@@ -4,7 +4,7 @@
+ * Author: Vladimir Shebordaev, Igor Oblakov
+ * Copyright: MontaVista Software Inc.
+ *
+- * $Id: mmc_pxa.h,v 0.3.1.6 2002/09/25 19:25:48 ted Exp ted $
++ * $Id: mmc.h,v 1.3 2005/04/16 17:05:19 ericn Exp $
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+@@ -113,12 +113,17 @@
+ #define MMC_CMD_SET_RCA 3
+ #define MMC_CMD_SEND_CSD 9
+ #define MMC_CMD_SEND_CID 10
++#define MMC_CMD_STOP 12
+ #define MMC_CMD_SEND_STATUS 13
+ #define MMC_CMD_SET_BLOCKLEN 16
+ #define MMC_CMD_READ_BLOCK 17
+ #define MMC_CMD_RD_BLK_MULTI 18
+ #define MMC_CMD_WRITE_BLOCK 24
+
++#define SD_APP_CMD55 55 /* 0x37 */
++#define SD_APP_CMD41 41 /* 0x29 */
++#define SD_STATUS 13 /* 0x0D */
++
+ #define MMC_MAX_BLOCK_SIZE 512
+
+ #define MMC_R1_IDLE_STATE 0x01
+@@ -197,4 +202,15 @@
+ } mmc_csd_t;
+
+
++typedef struct sd_status {
++ ulong prot_size ;
++ ushort card_type ;
++ ushort bus_width:2,
++ secured_mode:1,
++ unused0: 13 ;
++} sd_status_t ;
++
++extern uchar *
++mmc_cmd(ushort cmd, ushort argh, ushort argl, ushort cmdat);
++
+ #endif /* __MMC_PXA_P_H__ */
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/platformTypes.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/platformTypes.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/platformTypes.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/platformTypes.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,19 @@
++#ifndef __PLATFORMTYPES_H__
++#define __PLATFORMTYPES_H__ 1
++#define NEON 1
++#define NEONB 2
++#define BD2003 3
++#define GAME_WITH_SMC 4
++#define GAME_CONTROLLER 5
++#define GAME_CONTROLLER_PLAITED_A1 6
++#define BOUNDARY_OLD_BOARD 7 //lcd pin reordering for rgb problem, don't use VLIO(gp18 is turnstile)
++#define OLD_GAME_CONTROLLER 8
++#define HALOGEN 9
++
++#if (PLATFORM_TYPE==NEONB)
++#define PHYS_FLASH_BASE 0x04000000
++#else
++#define PHYS_FLASH_BASE 0x0
++#endif
++
++#endif
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxa250Base.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxa250Base.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxa250Base.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxa250Base.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,60 @@
++#ifndef __PXA250BASE_H__
++#define __PXA250BASE_H__ 1
++
++#ifdef __ARMASM
++#define USE_PHYSICAL 1
++#else
++#ifndef _MSC_VER
++#define USE_PHYSICAL 1
++#endif
++#endif
++
++
++#ifndef USE_PHYSICAL
++#if EBOOT_PHYS
++#define USE_PHYSICAL 1
++#endif
++#endif
++
++#if USE_PHYSICAL
++#define PCMCIA_CARD0_IO 0x20000000
++#define PCMCIA_CARD0_ATTR 0x28000000
++#define PCMCIA_CARD0_MEM 0x2c000000
++
++#define PCMCIA_CARD1_IO 0x30000000
++#define PCMCIA_CARD1_ATTR 0x38000000
++#define PCMCIA_CARD1_MEM 0x3c000000
++
++#define FFUART_BASE 0x40100000
++#define BTUART_BASE 0x40200000
++#define STUART_BASE 0x40700000
++#define UART_BASE FFUART_BASE
++//#define UART_BASE BTUART_BASE
++
++#define OS_TIMER_BASE 0x40a00000
++#define IC_BASE 0x40D00000
++#define GPIO_BASE 0x40E00000
++#define PWR_MANAGER_BASE 0x40F00000
++#define CLK_MANAGER_BASE 0x41300000
++#define LCD_CONTROL_BASE 0x44000000
++#define MEMORY_CONTROL_BASE 0x48000000
++
++#define MEM_START 0xa0000000
++
++
++#else
++#include "xsc1.h"
++
++#define PCMCIA_CARD0_IO PCMCIA_S0_IO_U_VIRTUAL
++#define PCMCIA_CARD0_ATTR PCMCIA_S0_ATTR_U_VIRTUAL
++#define PCMCIA_CARD0_MEM PCMCIA_S0_CMN_U_VIRTUAL
++
++#define PCMCIA_CARD1_IO PCMCIA_S1_IO_U_VIRTUAL
++#define PCMCIA_CARD1_ATTR PCMCIA_S1_ATTR_U_VIRTUAL
++#define PCMCIA_CARD1_MEM PCMCIA_S0_CMN_U_VIRTUAL
++
++#define MEMORY_CONTROL_BASE MEMC_BASE_U_VIRTUAL
++#define GPIO_BASE GPIO_BASE_U_VIRTUAL
++#endif
++
++#endif
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxaGpio25x.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaGpio25x.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxaGpio25x.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaGpio25x.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,218 @@
++//gpios for PLATFORM_TYPE== NEON,NEONB,BD2003, or BOUNDARY_OLD_BOARD
++
++#define LCD_CS_STATE HIGH
++
++//CP - Clock and Power Management Unit
++//MMC - Multimedia Card Controller
++//MC - Memory Controller
++//SIU - System Integration Unit
++//SSP - Synchronous Serial Port
++//AC - Audio Controller (AC97)
++//FF - Full Function UART
++//BT - Blue Tooth UART
++//ST - standard UART Port
++//LCD - LCD Controller
++ SPEC_GP 0,IN,HIGH,0 // flash ready low 16, or magStripe T1 Clk(SMC)
++ SPEC_GP 1,IN,HIGH,0 //CP_RST, flash ready high 16, or magStripe T2 Clk(SMC)
++
++#if (PLATFORM_TYPE==NEONB)
++ SPEC_GP 2,IN,HIGH,0 //USB client connection status
++ SPEC_GP 3,IN,HIGH,0 //float means USB Slave not ready to accept data
++ //out 1 means ready (D+ signal)
++ SPEC_GP 4,OUT,LOW,0 //low means don't provide 12 volts to I2C bus
++#else
++#if (PLATFORM_TYPE==NEON)
++ SPEC_GP 2,IN,HIGH,0 //USB client connection status
++ SPEC_GP 3,IN,HIGH,0 //float means USB Slave not ready to accept data
++ SPEC_GP 4,IN,HIGH,0 //UCB1400 irq on NEON board
++#else
++ SPEC_GP 2,OUT,LOW,0 //output to transistor (unused), OUT_DRY_CONTACT2
++ SPEC_GP 3,OUT,HIGH,0
++ SPEC_GP 4,IN,HIGH,0 //interrupt for USB irq 1
++#endif
++#endif
++
++ SPEC_GP 5,IN,HIGH,0 //interrupt for USB irq 2, or SM501
++ SPEC_GP 6,OUT,HIGH,1 //MMC_CLK
++ SPEC_GP 7,OUT,LOW,0 //CP_48MHZ !!! red led, NEON:J13,pin3
++ SPEC_GP 8,OUT,HIGH,1 //MMC_CCS0
++ SPEC_GP 9,OUT,LOW,0 //MMC_CCS1, !!! doorlock, or OUT_DRY_CONTACT1
++ SPEC_GP 10,IN,HIGH,0 //SIU_RTCCLK, Neon/Neonb data 1 for SDIO interrupt
++
++#if (PLATFORM_TYPE==NEON)
++ SPEC_GP 11,OUT,HIGH,0 //CP_3600KHZ, NEON:J12,pin1
++#else
++ SPEC_GP 11,IN,HIGH,0 //CP_3600KHZ, suspend USB slave
++#endif
++ SPEC_GP 12,IN,HIGH,0 //CP_32KHZ, suspend USB host
++
++#if (PLATFORM_TYPE==NEON) || (PLATFORM_TYPE==NEONB)
++ SPEC_GP 13,OUT,HIGH,2 //MC_MBGNT
++ SPEC_GP 14,IN,HIGH,1 //MC_MBREQ
++#else
++ SPEC_GP 13,OUT,HIGH,0 //USB wakeup slave
++ SPEC_GP 14,IN,HIGH,0 //UCB1400 IRQ
++#endif
++
++
++#if (PLATFORM_TYPE==NEONB)
++ SPEC_GP 15,OUT,HIGH,2 //MC_nCS1, eeprom
++#else
++#if (PLATFORM_TYPE==NEON)
++ SPEC_GP 15,OUT,LOW,0 //MC_nCS1, NEON:J13, pin 1
++#else
++ SPEC_GP 15,OUT,LOW,0 //MC_nCS1, !!! amber led
++#endif
++#endif
++
++
++#if (PLATFORM_TYPE==NEON) || (PLATFORM_TYPE==NEONB)
++ SPEC_GP 16,OUT,HIGH,0 //LCD backlight brightness control
++ SPEC_GP 17,OUT,HIGH,0 //LCD backlight ON/OFF
++#else
++ SPEC_GP 16,IN,HIGH,0 //SIU_PWM0, !!! feedback2, left in
++ SPEC_GP 17,IN,HIGH,0 //SIU_PWM1, !!! feedback1, right in
++#endif
++
++#if (PLATFORM_TYPE==BOUNDARY_OLD_BOARD)
++ SPEC_GP 18,OUT,HIGH,0 //MC_RDY, !!! turnstile
++#else
++ SPEC_GP 18,IN,HIGH,1 //MC_RDY, VIO_READY
++#endif
++
++#if (PLATFORM_TYPE==NEON) || (PLATFORM_TYPE==NEONB)
++ SPEC_GP 19,OUT,HIGH,0 //MC_DREQ1, nc
++#else
++ SPEC_GP 19,IN,HIGH,1 //MC_DREQ1, DMA request for USB DC
++#endif
++
++#if (PLATFORM_TYPE==NEON) || (PLATFORM_TYPE==NEONB)
++ SPEC_GP 20,OUT,HIGH,1 //MC_DREQ0, nc
++#else
++ SPEC_GP 20,IN,HIGH,1 //MC_DREQ0, DMA request for USB HC
++#endif
++
++ SPEC_GP 21,IN,HIGH,0 // pcmcia card detect
++ SPEC_GP 22,IN,HIGH,0 // pcmcia intr (active low)
++
++#if (PLATFORM_TYPE==NEON) || (PLATFORM_TYPE==NEONB)
++ SPEC_GP 23,IN,LOW,0 //UCB1400 irq for NEONB, nc for NEW NEON
++#else
++ SPEC_GP 23,OUT,HIGH,0 //SSP_SCLK, nc
++#endif
++
++#if (PLATFORM_TYPE==NEON) || (PLATFORM_TYPE==NEONB)
++ SPEC_GP 24,IN,LOW,0 //SSP_SFRM, SMSC interrupt (active high)
++#else
++ SPEC_GP 24,OUT,HIGH,0 //SSP_SFRM, nc
++#endif
++
++ SPEC_GP 25,OUT,HIGH,0 //SSP_TXD, nc
++ SPEC_GP 26,OUT,HIGH,0 //SSP_RXD, nc
++ SPEC_GP 27,OUT,LOW,0 //SSP_EXTCLK, DC1 (SMC)
++
++ SPEC_GP 28,IN,HIGH,1 //AC_BITCLK, ac97 bitclk
++ SPEC_GP 29,IN,HIGH,1 //AC_SDATAIN0, ac97 datain0
++ SPEC_GP 30,OUT,HIGH,2 //AC_SDATAOUT, ac97 data out
++ SPEC_GP 31,OUT,HIGH,2 //AC_SYNC, ac97 sync
++////////////////////////////////////////////////////////////////////////////////////////////
++
++
++ SPEC_GP 32,OUT,HIGH,0 //AC_SDATAIN1, wet contact
++ SPEC_GP 33,OUT,LOW,0 //MC_nCS5, green led (left), NEON:J13,pin 2
++ SPEC_GP 34,IN,HIGH,1 //FF_RXD
++ SPEC_GP 35,IN,HIGH,1 //FF_CTS
++ SPEC_GP 36,IN,HIGH,0 //FF_DCD, MMC Card Detect
++ SPEC_GP 37,IN,HIGH,1 //FF_DSR
++ SPEC_GP 38,IN,HIGH,0 //FF_RI, MMC Write Protect, MMC/SDIO IRQ
++ SPEC_GP 39,OUT,HIGH,2 //FF_TXD
++ SPEC_GP 40,OUT,HIGH,2 //FF_DTR
++ SPEC_GP 41,OUT,HIGH,2 //FF_RTS
++ SPEC_GP 42,IN,HIGH,1 //BT_RXD
++ SPEC_GP 43,OUT,HIGH,2 //BT_TXD
++#if (PLATFORM_TYPE==NEON)
++ SPEC_GP 44,IN,HIGH,0 //BT_CTS, NEON:J12,pin 2
++#else
++ SPEC_GP 44,OUT,HIGH,0 //BT_CTS, USB wakeup host
++#endif
++ SPEC_GP 45,OUT,LOW,0 //BT_RTS, HIGH 2
++#if (PLATFORM_TYPE==NEON)
++ SPEC_GP 46,IN,HIGH,0 //ST_RXD, NEON:J12,pin 3
++#else
++ SPEC_GP 46,IN,HIGH,2 //ST_RXD
++#endif
++ SPEC_GP 47,OUT,HIGH,1 //ST_TXD
++ SPEC_GP 48,OUT,HIGH,2 //MC_nPOE, pcmcia
++ SPEC_GP 49,OUT,HIGH,2 //MC_nPWE, pcmcia
++ SPEC_GP 50,OUT,HIGH,2 //MC_nPIOR, pcmcia
++ SPEC_GP 51,OUT,HIGH,2 //MC_nPIOW, pcmcia
++ SPEC_GP 52,OUT,HIGH,2 //MC_nPCE1, pcmcia
++ SPEC_GP 53,OUT,HIGH,2 //MC_nPCE2, pcmcia
++ SPEC_GP 54,OUT,HIGH,2 //MC_nPSKTSEL, nc
++ SPEC_GP 55,OUT,HIGH,2 //MC_nPREG, pcmcia attribe vs Io space
++ SPEC_GP 56,IN,HIGH,1 //MC_nPWAIT pcmcia busy
++ SPEC_GP 57,IN,HIGH,1 //MC_nIOIS16, pcmcia 16 bit wide
++ SPEC_GP 58,OUT,HIGH,ALT_LCD //LCD_LDD0, also GP_PIX_D0
++ SPEC_GP 59,OUT,HIGH,ALT_LCD //LCD_LDD1, also GP_PIX_D1
++ SPEC_GP 60,OUT,HIGH,ALT_LCD //LCD_LDD2, also GP_PIX_D2
++ SPEC_GP 61,OUT,HIGH,ALT_LCD //LCD_LDD3, also GP_PIX_D3
++ SPEC_GP 62,OUT,HIGH,ALT_LCD //LCD_LDD4, also GP_PIX_D4
++ SPEC_GP 63,OUT,HIGH,ALT_LCD //LCD_LDD5, also GP_PIX_D5
++
++
++////////////////////////////////////////////////////////////////////////////////////////////
++
++
++ SPEC_GP 64,OUT,HIGH,ALT_LCD //LCD_LDD6, also GP_PIX_D6
++ SPEC_GP 65,OUT,HIGH,ALT_LCD //LCD_LDD7, also GP_PIX_D7
++ SPEC_GP 66,OUT,HIGH,ALT_LCD //LCD_LDD8, also GP_PIX_RESET
++ SPEC_GP 67,OUT,HIGH,ALT_LCD //LCD_LDD9
++ SPEC_GP 68,OUT,HIGH,ALT_LCD //LCD_LDD10
++ SPEC_GP 69,OUT,HIGH,ALT_LCD //LCD_LDD11
++ SPEC_GP 70,OUT,HIGH,ALT_LCD //LCD_LDD12
++
++ SPEC_GP 71,OUT,HIGH,ALT_LCD //LCD_LDD13
++
++ SPEC_GP 72,OUT,HIGH,ALT_LCD //LCD_LDD14
++ SPEC_GP 73,OUT,HIGH,ALT_LCD //LCD_LDD15
++ SPEC_GP 74,OUT,HIGH,ALT_LCD //LCD_FCLK, also GP_PIX_READ
++ SPEC_GP 75,OUT,LCD_CS_STATE,ALT_LCD //LCD_LCLK, also GP_PIX_CS1
++ SPEC_GP 76,OUT,LCD_CS_STATE,ALT_LCD //LCD_PCLK, also GP_PIX_CS0
++ SPEC_GP 77,OUT,HIGH,ALT_LCD //LCD_ACBIAS, also GP_PIX_A0
++ SPEC_GP 78,OUT,HIGH,2 //nCS2, DMA acknowledge channel 1 for USB, SMC91c111 Chip Select nDATACS
++ SPEC_GP 79,OUT,HIGH,2 //nCS3, DMA acknowledge channel 2 for USB, SM501 Chip Select
++ SPEC_GP 80,OUT,HIGH,2 //nCS4, USB chip select, SMC91c111 Chip Select
++ SPEC_GP 81,IN,LOW,0 //GND (pin F16), pxa255 has 9 extra gpios
++ SPEC_GP 82,IN,LOW,0 //GND (pin E16)
++ SPEC_GP 83,IN,LOW,0 //GND (pin E15)
++ SPEC_GP 84,IN,LOW,0 //GND (pin D16)
++ SPEC_GP 85,IN,LOW,0 //GND (pin F15)
++//to maintain compatibility with code written for the pxa250
++//the meaning of gp86-gp89's direction bit is reversed, and alternate function is forced to the SDRAM/AC97 unit's control
++ SPEC_GP 86,IN,HIGH,0 //SDCS2 (pin G3) set as OUTPUT!!!
++ SPEC_GP 87,IN,HIGH,0 //SDCS3 (pin F2) set as OUTPUT!!!
++ SPEC_GP 88,IN,HIGH,0 //old RDnWR(pin D3) set as OUTPUT!!!
++ SPEC_GP 89,IN,LOW,0 //old ac97_reset(pin D10), set as OUTPUT!!!
++ SPEC_GP 90,IN,LOW,0 //undefined
++ SPEC_GP 91,IN,LOW,0 //undefined
++ SPEC_GP 92,IN,LOW,0 //undefined
++ SPEC_GP 93,IN,LOW,0 //undefined
++ SPEC_GP 94,IN,LOW,0 //undefined
++ SPEC_GP 95,IN,LOW,0 //undefined
++
++// ****************************************************************************
++ CREATE_MASK_DIR DRVAL0, SPEC_, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
++ CREATE_MASK_LEVEL SRVAL0, SPEC_, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
++ CREATE_MASK_ALT AFVAL0, SPEC_, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
++ CREATE_MASK_ALT AFVAL16,SPEC_,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
++
++ CREATE_MASK_DIR DRVAL32,SPEC_,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63
++ CREATE_MASK_LEVEL SRVAL32,SPEC_,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63
++ CREATE_MASK_ALT AFVAL32,SPEC_,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47
++ CREATE_MASK_ALT AFVAL48,SPEC_,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63
++
++ CREATE_MASK_DIR DRVAL64,SPEC_,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95
++ CREATE_MASK_LEVEL SRVAL64,SPEC_,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95
++ CREATE_MASK_ALT AFVAL64,SPEC_,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79
++ CREATE_MASK_ALT AFVAL80,SPEC_,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95
++
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxaGpio27x.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaGpio27x.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxaGpio27x.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaGpio27x.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,221 @@
++//gpios for HALOGEN
++
++//CP - Clock and Power Management Unit
++//MMC - Multimedia Card Controller
++//MC - Memory Controller
++//SIU - System Integration Unit
++//SSP - Synchronous Serial Port
++//AC - Audio Controller (AC97)
++//FF - Full Function UART
++//BT - Blue Tooth UART
++//ST - standard UART Port
++//LCD - LCD Controller
++
++ SPEC_GP 0,IN,HIGH,0 //
++ SPEC_GP 1,IN,HIGH,0 //nRESET_GPIO, usb client connect interrupt
++
++ SPEC_GP 2,IN,HIGH,0 //SYS_EN
++
++ SPEC_GP 3,IN,HIGH,0 //PWR_SCL, Rev 1 usb client enable, float means USB Slave not ready to accept data
++ //out 1 means ready
++
++ SPEC_GP 4,IN,HIGH,0 //PWR_SDA
++
++ SPEC_GP 5,IN,HIGH,0 //PWR_CAP 0
++ SPEC_GP 6,IN,HIGH,0 //PWR_CAP 1
++ SPEC_GP 7,IN,HIGH,0 //PWR_CAP 2
++ SPEC_GP 8,IN,HIGH,0 //PWR_CAP 3
++ SPEC_GP 9,OUT,HIGH,0 //NC
++#if (PLATFORM_REV==1)
++ SPEC_GP 10,OUT,HIGH,0 //NC, rev 1 doesn't have MMC write protect, or card detect
++#else
++ SPEC_GP 10,IN,HIGH,0 //MMC card detect
++#endif
++
++ SPEC_GP 11,OUT,HIGH,0 //NC
++ SPEC_GP 12,OUT,HIGH,0 //NC
++ SPEC_GP 13,OUT,HIGH,0 //NC
++
++ SPEC_GP 14,OUT,HIGH,0 //NC
++ SPEC_GP 15,OUT,HIGH,2 //nCS1, NC
++
++
++ SPEC_GP 16,OUT,LOW,0 //PWM0 backlight intensity, 0 brightest
++ SPEC_GP 17,OUT,HIGH,0 //NC
++
++ SPEC_GP 18,IN,HIGH,1 //MC_RDY, VIO_READY
++
++ SPEC_GP 19,OUT,HIGH,0 //NC
++
++ SPEC_GP 20,OUT,HIGH,1 //MC_DREQ0, NC
++
++ SPEC_GP 21,OUT,HIGH,0 //NC
++ SPEC_GP 22,OUT,HIGH,0 //NC
++
++#if (PLATFORM_REV==1)
++ SPEC_GP 23,OUT,HIGH,0 //NC
++#else
++ SPEC_GP 23,IN,HIGH,0 //rev 2 UCB1400 int
++#endif
++
++ SPEC_GP 24,IN,LOW,0 //LAN91c111 Interrupt pin (SMSC)
++
++ SPEC_GP 25,OUT,HIGH,0 //SSP_TXD, nc
++ SPEC_GP 26,OUT,HIGH,0 //SSP_RXD, nc
++ SPEC_GP 27,OUT,HIGH,0 //NC
++
++ SPEC_GP 28,IN,HIGH,1 //AC_BITCLK, ac97 bitclk
++ SPEC_GP 29,IN,HIGH,1 //AC_SDATAIN0, ac97 datain0
++ SPEC_GP 30,OUT,HIGH,2 //AC_SDATAOUT, ac97 data out
++ SPEC_GP 31,OUT,HIGH,2 //AC_SYNC, ac97 sync
++////////////////////////////////////////////////////////////////////////////////////////////
++
++
++ SPEC_GP 32,OUT,HIGH,2 //MMCLK
++ SPEC_GP 33,OUT,HIGH,0 //MC_nCS5, NC
++ SPEC_GP 34,IN,HIGH,1 //(in alt 1:FF_RXD) (out alt 1:USB_P2_2) 2 input, Session Valid
++ SPEC_GP 35,IN,HIGH,0 //(in alt 1:FF_CTS) (in alt 2:USB_P2_1) 1 input, SRP Detect
++#if (PLATFORM_REV==1)
++ SPEC_GP 36,OUT,HIGH,0 //(in alt 1:FF_DCD)
++#else
++ SPEC_GP 36,IN,HIGH,0 //(in alt 1:FF_DCD) (out alt 1:USB_P2_4) 4 output Vbus Enable
++#endif
++ SPEC_GP 37,OUT,HIGH,0 //(in alt 1:FF_DSR) (out alt 1:USB_P2_8) 8 output Vbus Pulsing Enable for SRP
++
++ SPEC_GP 38,IN,HIGH,0 //(in alt 1:FF_RI) (in alt 3:USB_P2_3) //MMC Write Protect (rev 1 is NC),// 3 input, Vbus valid 4.4 Volts
++ SPEC_GP 39,OUT,HIGH,2 //(out alt 2:FF_TXD) (out alt 1:USB_P2_6)
++
++#if (PLATFORM_REV==1)
++ SPEC_GP 40,OUT,HIGH,2 //(out alt 2:FF_DTR)
++#else
++ SPEC_GP 40,IN,HIGH,0 //(out alt 2:FF_DTR) (in alt 3:USB_P2_5) 5 input, Vbus valid 4.0 Volts
++#endif
++
++ SPEC_GP 41,OUT,HIGH,2 //(out alt 2:FF_RTS) (in alt 2:USB_P2_7) 7 input OTG ID
++ SPEC_GP 42,IN,HIGH,1 //BT_RXD
++ SPEC_GP 43,OUT,HIGH,2 //BT_TXD
++ SPEC_GP 44,OUT,HIGH,0 //BT_CTS, NC
++ SPEC_GP 45,OUT,LOW,0 //BT_RTS, NC
++ SPEC_GP 46,IN,HIGH,2 //ST_RXD
++ SPEC_GP 47,OUT,HIGH,1 //ST_TXD
++ SPEC_GP 48,OUT,HIGH,2 //MC_nPOE,NC
++ SPEC_GP 49,OUT,HIGH,2 //MC_nPWE
++ SPEC_GP 50,OUT,HIGH,2 //MC_nPIOR, NC
++ SPEC_GP 51,OUT,HIGH,2 //MC_nPIOW, NC
++ SPEC_GP 52,OUT,HIGH,2 //MC_nPCE1, NC
++ SPEC_GP 53,OUT,HIGH,2 //MC_nPCE2, NC
++ SPEC_GP 54,OUT,HIGH,2 //MC_nPSKTSEL, nc
++ SPEC_GP 55,OUT,HIGH,2 //MC_nPREG, NC
++ SPEC_GP 56,IN,HIGH,1 //MC_nPWAIT NC
++ SPEC_GP 57,IN,HIGH,1 //MC_nIOIS16, NC
++ SPEC_GP 58,OUT,HIGH,ALT_LCD //LCD_LDD0
++ SPEC_GP 59,OUT,HIGH,ALT_LCD //LCD_LDD1
++ SPEC_GP 60,OUT,HIGH,ALT_LCD //LCD_LDD2
++ SPEC_GP 61,OUT,HIGH,ALT_LCD //LCD_LDD3
++ SPEC_GP 62,OUT,HIGH,ALT_LCD //LCD_LDD4
++ SPEC_GP 63,OUT,HIGH,ALT_LCD //LCD_LDD5
++
++
++////////////////////////////////////////////////////////////////////////////////////////////
++
++
++ SPEC_GP 64,OUT,HIGH,ALT_LCD //LCD_LDD6
++ SPEC_GP 65,OUT,HIGH,ALT_LCD //LCD_LDD7
++ SPEC_GP 66,OUT,HIGH,ALT_LCD //LCD_LDD8
++ SPEC_GP 67,OUT,HIGH,ALT_LCD //LCD_LDD9
++ SPEC_GP 68,OUT,HIGH,ALT_LCD //LCD_LDD10
++ SPEC_GP 69,OUT,HIGH,ALT_LCD //LCD_LDD11
++ SPEC_GP 70,OUT,HIGH,ALT_LCD //LCD_LDD12
++
++ SPEC_GP 71,OUT,HIGH,ALT_LCD //LCD_LDD13
++
++ SPEC_GP 72,OUT,HIGH,ALT_LCD //LCD_LDD14
++ SPEC_GP 73,OUT,HIGH,ALT_LCD //LCD_LDD15
++ SPEC_GP 74,OUT,HIGH,ALT_LCD //LCD_FCLK, NC
++ SPEC_GP 75,OUT,HIGH,ALT_LCD //LCD_LCLK
++ SPEC_GP 76,OUT,HIGH,ALT_LCD //LCD_PCLK
++ SPEC_GP 77,OUT,HIGH,ALT_LCD //LCD_ACBIAS
++ SPEC_GP 78,OUT,HIGH,2 //nCS2, SMC91c111 Chip Select nDATACS
++ SPEC_GP 79,OUT,HIGH,2 //nCS3, NC
++ SPEC_GP 80,OUT,HIGH,2 //nCS4, SMC91c111 Chip Select
++ SPEC_GP 81,OUT,HIGH,0 //NC
++ SPEC_GP 82,OUT,HIGH,0 //NC
++ SPEC_GP 83,OUT,HIGH,0 //NC
++ SPEC_GP 84,OUT,HIGH,0 //NC
++ SPEC_GP 85,OUT,HIGH,0 //NC
++ SPEC_GP 86,OUT,HIGH,ALT_LCD //LDD16
++ SPEC_GP 87,OUT,HIGH,ALT_LCD //LDD17
++#if (PLATFORM_REV==1)
++ SPEC_GP 88,OUT,HIGH,0 //NC
++ SPEC_GP 89,OUT,HIGH,0 //NC
++#else
++ SPEC_GP 88,IN,HIGH,1 //port 1 usb power over current
++ SPEC_GP 89,OUT,HIGH,0 //port 1 usb power enable (driver needs to enable usb power (LOW,2)
++#endif
++
++ SPEC_GP 90,OUT,HIGH,0 //NC
++ SPEC_GP 91,OUT,HIGH,0 //NC
++ SPEC_GP 92,OUT,HIGH,1 //MMDAT
++ SPEC_GP 93,OUT,HIGH,0 //NC
++ SPEC_GP 94,OUT,HIGH,0 //NC
++ SPEC_GP 95,OUT,HIGH,0 //NC
++ SPEC_GP 96,OUT,HIGH,0 //NC
++ SPEC_GP 97,OUT,HIGH,0 //NC
++ SPEC_GP 98,OUT,HIGH,0 //NC
++ SPEC_GP 99,OUT,HIGH,0 //NC
++ SPEC_GP 100,OUT,HIGH,0 //NC
++ SPEC_GP 101,OUT,HIGH,0 //NC
++ SPEC_GP 102,OUT,HIGH,0 //NC
++ SPEC_GP 103,OUT,HIGH,0 //port 1,USB Power Enable for REV 1 board (driver needs to enable usb power (LOW,0)
++ SPEC_GP 104,OUT,HIGH,0 //NC
++
++#if (PLATFORM_REV==1)
++ SPEC_GP 105,IN,HIGH,0 //USB Overcurrent
++#else
++ SPEC_GP 105,OUT,HIGH,0 //NC
++#endif
++
++ SPEC_GP 106,OUT,HIGH,0 //NC
++ SPEC_GP 107,OUT,HIGH,0 //NC
++ SPEC_GP 108,OUT,HIGH,0 //NC
++ SPEC_GP 109,OUT,HIGH,1 //MMDAT 1
++ SPEC_GP 110,OUT,HIGH,1 //MMDAT 2
++ SPEC_GP 111,OUT,HIGH,1 //MMDAT 3
++ SPEC_GP 112,OUT,HIGH,1 //MMCMD
++ SPEC_GP 113,OUT,HIGH,2 //AC97 Reset, NC
++ SPEC_GP 114,OUT,HIGH,0 //NC
++ SPEC_GP 115,OUT,HIGH,0 //NC
++ SPEC_GP 116,OUT,HIGH,0 //NC
++ SPEC_GP 117,OUT,HIGH,1 //SCL (I2C)
++ SPEC_GP 118,OUT,HIGH,1 //SDA (I2C)
++ SPEC_GP 119,OUT,HIGH,0 //NC
++ SPEC_GP 120,OUT,HIGH,0 //NC
++ SPEC_GP 121,IN,LOW,0 //undefined
++ SPEC_GP 122,IN,LOW,0 //undefined
++ SPEC_GP 123,IN,LOW,0 //undefined
++ SPEC_GP 124,IN,LOW,0 //undefined
++ SPEC_GP 125,IN,LOW,0 //undefined
++ SPEC_GP 126,IN,LOW,0 //undefined
++ SPEC_GP 127,IN,LOW,0 //undefined
++
++// ****************************************************************************
++ CREATE_MASK_DIR DRVAL0, SPEC_, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
++ CREATE_MASK_LEVEL SRVAL0, SPEC_, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
++ CREATE_MASK_ALT AFVAL0, SPEC_, 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
++ CREATE_MASK_ALT AFVAL16,SPEC_,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
++
++ CREATE_MASK_DIR DRVAL32,SPEC_,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63
++ CREATE_MASK_LEVEL SRVAL32,SPEC_,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63
++ CREATE_MASK_ALT AFVAL32,SPEC_,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47
++ CREATE_MASK_ALT AFVAL48,SPEC_,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63
++
++ CREATE_MASK_DIR DRVAL64,SPEC_,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95
++ CREATE_MASK_LEVEL SRVAL64,SPEC_,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95
++ CREATE_MASK_ALT AFVAL64,SPEC_,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79
++ CREATE_MASK_ALT AFVAL80,SPEC_,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95
++
++ CREATE_MASK_DIR DRVAL96,SPEC_,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127
++ CREATE_MASK_LEVEL SRVAL96,SPEC_,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127
++ CREATE_MASK_ALT AFVAL96,SPEC_, 96, 97, 98, 99,100,101,102,103,104,105,106,107,108,109,110,111
++ CREATE_MASK_ALT AFVAL112,SPEC_,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127
++
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxaGpio.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaGpio.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxaGpio.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaGpio.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,142 @@
++#include "platformTypes.h"
++
++#define IN 0
++#define OUT 1
++
++#define LOW 0
++#define HIGH 1
++
++ .ifdef __ARMASM
++.macro SPEC_GP gp_,dir,level,alt
++SPEC_\gp_ EQU \dir+(\level<<8)+(\alt<<16)
++.endm
++ .else
++.macro SPEC_GP gp_,dir,level,alt
++ .set SPEC_\gp_,\dir+(\level<<8)+(\alt<<16)
++.endm
++ .endif
++// *****************************************************************************************
++.macro CREATE_MASK_DIR name,prefix,p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31
++ .ifdef __ARMASM
++ LCLA mask
++ .endif
++ .set mask,((\prefix\p0&1)<<(\p0&0x1f))
++ .set mask,mask | ((\prefix\p1&1)<<(\p1&0x1f))
++ .set mask,mask | ((\prefix\p2&1)<<(\p2&0x1f))
++ .set mask,mask | ((\prefix\p3&1)<<(\p3&0x1f))
++ .set mask,mask | ((\prefix\p4&1)<<(\p4&0x1f))
++ .set mask,mask | ((\prefix\p5&1)<<(\p5&0x1f))
++ .set mask,mask | ((\prefix\p6&1)<<(\p6&0x1f))
++ .set mask,mask | ((\prefix\p7&1)<<(\p7&0x1f))
++ .set mask,mask | ((\prefix\p8&1)<<(\p8&0x1f))
++ .set mask,mask | ((\prefix\p9&1)<<(\p9&0x1f))
++ .set mask,mask | ((\prefix\p10&1)<<(\p10&0x1f))
++ .set mask,mask | ((\prefix\p11&1)<<(\p11&0x1f))
++ .set mask,mask | ((\prefix\p12&1)<<(\p12&0x1f))
++ .set mask,mask | ((\prefix\p13&1)<<(\p13&0x1f))
++ .set mask,mask | ((\prefix\p14&1)<<(\p14&0x1f))
++ .set mask,mask | ((\prefix\p15&1)<<(\p15&0x1f))
++ .set mask,mask | ((\prefix\p16&1)<<(\p16&0x1f))
++ .set mask,mask | ((\prefix\p17&1)<<(\p17&0x1f))
++ .set mask,mask | ((\prefix\p18&1)<<(\p18&0x1f))
++ .set mask,mask | ((\prefix\p19&1)<<(\p19&0x1f))
++ .set mask,mask | ((\prefix\p20&1)<<(\p20&0x1f))
++ .set mask,mask | ((\prefix\p21&1)<<(\p21&0x1f))
++ .set mask,mask | ((\prefix\p22&1)<<(\p22&0x1f))
++ .set mask,mask | ((\prefix\p23&1)<<(\p23&0x1f))
++ .set mask,mask | ((\prefix\p24&1)<<(\p24&0x1f))
++ .set mask,mask | ((\prefix\p25&1)<<(\p25&0x1f))
++ .set mask,mask | ((\prefix\p26&1)<<(\p26&0x1f))
++ .set mask,mask | ((\prefix\p27&1)<<(\p27&0x1f))
++ .set mask,mask | ((\prefix\p28&1)<<(\p28&0x1f))
++ .set mask,mask | ((\prefix\p29&1)<<(\p29&0x1f))
++ .set mask,mask | ((\prefix\p30&1)<<(\p30&0x1f))
++ .set mask,mask | ((\prefix\p31&1)<<(\p31&0x1f))
++ .ifdef __ARMASM
++\name EQU mask
++ .else
++ .set \name,mask
++ .endif
++.endm
++
++.macro CREATE_MASK_LEVEL name,prefix,p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,p31
++ .ifdef __ARMASM
++ LCLA mask
++ .endif
++ .set mask,(((\prefix\p0>>8)&1)<<(\p0&0x1f))
++ .set mask,mask | (((\prefix\p1>>8)&1)<<(\p1&0x1f))
++ .set mask,mask | (((\prefix\p2>>8)&1)<<(\p2&0x1f))
++ .set mask,mask | (((\prefix\p3>>8)&1)<<(\p3&0x1f))
++ .set mask,mask | (((\prefix\p4>>8)&1)<<(\p4&0x1f))
++ .set mask,mask | (((\prefix\p5>>8)&1)<<(\p5&0x1f))
++ .set mask,mask | (((\prefix\p6>>8)&1)<<(\p6&0x1f))
++ .set mask,mask | (((\prefix\p7>>8)&1)<<(\p7&0x1f))
++ .set mask,mask | (((\prefix\p8>>8)&1)<<(\p8&0x1f))
++ .set mask,mask | (((\prefix\p9>>8)&1)<<(\p9&0x1f))
++ .set mask,mask | (((\prefix\p10>>8)&1)<<(\p10&0x1f))
++ .set mask,mask | (((\prefix\p11>>8)&1)<<(\p11&0x1f))
++ .set mask,mask | (((\prefix\p12>>8)&1)<<(\p12&0x1f))
++ .set mask,mask | (((\prefix\p13>>8)&1)<<(\p13&0x1f))
++ .set mask,mask | (((\prefix\p14>>8)&1)<<(\p14&0x1f))
++ .set mask,mask | (((\prefix\p15>>8)&1)<<(\p15&0x1f))
++ .set mask,mask | (((\prefix\p16>>8)&1)<<(\p16&0x1f))
++ .set mask,mask | (((\prefix\p17>>8)&1)<<(\p17&0x1f))
++ .set mask,mask | (((\prefix\p18>>8)&1)<<(\p18&0x1f))
++ .set mask,mask | (((\prefix\p19>>8)&1)<<(\p19&0x1f))
++ .set mask,mask | (((\prefix\p20>>8)&1)<<(\p20&0x1f))
++ .set mask,mask | (((\prefix\p21>>8)&1)<<(\p21&0x1f))
++ .set mask,mask | (((\prefix\p22>>8)&1)<<(\p22&0x1f))
++ .set mask,mask | (((\prefix\p23>>8)&1)<<(\p23&0x1f))
++ .set mask,mask | (((\prefix\p24>>8)&1)<<(\p24&0x1f))
++ .set mask,mask | (((\prefix\p25>>8)&1)<<(\p25&0x1f))
++ .set mask,mask | (((\prefix\p26>>8)&1)<<(\p26&0x1f))
++ .set mask,mask | (((\prefix\p27>>8)&1)<<(\p27&0x1f))
++ .set mask,mask | (((\prefix\p28>>8)&1)<<(\p28&0x1f))
++ .set mask,mask | (((\prefix\p29>>8)&1)<<(\p29&0x1f))
++ .set mask,mask | (((\prefix\p30>>8)&1)<<(\p30&0x1f))
++ .set mask,mask | (((\prefix\p31>>8)&1)<<(\p31&0x1f))
++ .ifdef __ARMASM
++\name EQU mask
++ .else
++ .set \name,mask
++ .endif
++.endm
++
++.macro CREATE_MASK_ALT name,prefix,p0,p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15
++ .ifdef __ARMASM
++ LCLA mask
++ .endif
++ .set mask,(((\prefix\p0>>16)&3)<<((\p0&0x0f)<<1))
++ .set mask,mask | (((\prefix\p1>>16)&3)<<((\p1&0x0f)<<1))
++ .set mask,mask | (((\prefix\p2>>16)&3)<<((\p2&0x0f)<<1))
++ .set mask,mask | (((\prefix\p3>>16)&3)<<((\p3&0x0f)<<1))
++ .set mask,mask | (((\prefix\p4>>16)&3)<<((\p4&0x0f)<<1))
++ .set mask,mask | (((\prefix\p5>>16)&3)<<((\p5&0x0f)<<1))
++ .set mask,mask | (((\prefix\p6>>16)&3)<<((\p6&0x0f)<<1))
++ .set mask,mask | (((\prefix\p7>>16)&3)<<((\p7&0x0f)<<1))
++ .set mask,mask | (((\prefix\p8>>16)&3)<<((\p8&0x0f)<<1))
++ .set mask,mask | (((\prefix\p9>>16)&3)<<((\p9&0x0f)<<1))
++ .set mask,mask | (((\prefix\p10>>16)&3)<<((\p10&0x0f)<<1))
++ .set mask,mask | (((\prefix\p11>>16)&3)<<((\p11&0x0f)<<1))
++ .set mask,mask | (((\prefix\p12>>16)&3)<<((\p12&0x0f)<<1))
++ .set mask,mask | (((\prefix\p13>>16)&3)<<((\p13&0x0f)<<1))
++ .set mask,mask | (((\prefix\p14>>16)&3)<<((\p14&0x0f)<<1))
++ .set mask,mask | (((\prefix\p15>>16)&3)<<((\p15&0x0f)<<1))
++ .ifdef __ARMASM
++\name EQU mask
++ .else
++ .set \name,mask
++ .endif
++.endm
++
++#if (PLATFORM_TYPE==NEON)||(PLATFORM_TYPE==NEONB)||(PLATFORM_TYPE==BD2003)||(PLATFORM_TYPE==BOUNDARY_OLD_BOARD)
++#define ALT_LCD 2
++#include "pxaGpio25x.h"
++#else
++#if (PLATFORM_TYPE==HALOGEN)
++#define ALT_LCD 2
++#include "pxaGpio27x.h"
++#else
++#include "pxaGpioGame.h"
++#endif
++#endif
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxaHardware.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaHardware.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxaHardware.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaHardware.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,288 @@
++//#define GPIO_BASE 0x40E00000
++#define GPLR0 0x00 //level
++#define GPLR1 0x04
++#define GPLR2 0x08
++#define GPLR3 0x100 //level
++
++#define GPDR0 0x0c //direction
++#define GPDR1 0x10
++#define GPDR2 0x14
++#define GPDR3 0x10c //direction
++
++#define GPSR0 0x18 //set
++#define GPSR1 0x1C
++#define GPSR2 0x20
++#define GPSR3 0x118 //set
++
++#define GPCR0 0x24 //clear
++#define GPCR1 0x28
++#define GPCR2 0x2c
++#define GPCR3 0x124 //clear
++
++#define GRER0 0x30 //enable rising edge detect
++#define GRER1 0x34
++#define GRER2 0x38
++#define GRER3 0x130 //enable rising edge detect
++
++#define GFER0 0x3C //enable falling edge detect
++#define GFER1 0x40
++#define GFER2 0x44
++#define GFER3 0x13C //enable falling edge detect
++
++#define GEDR0 0x48 //edge detect status
++#define GEDR1 0x4C
++#define GEDR2 0x50
++#define GEDR3 0x148 //edge detect status
++
++#define GAFR0_L 0x54 //alternate function
++#define GAFR0_U 0x58
++#define GAFR1_L 0x5C
++#define GAFR1_U 0x60
++#define GAFR2_L 0x64
++#define GAFR2_U 0x68
++#define GAFR3_L 0x6c
++#define GAFR3_U 0x70
++
++
++#define UART_RBR 0 //read, DLAB-0 :RECEIVE_BUFFER
++#define UART_THR 0 //write, DLAB-0 :TRANSMIT_BUFFER
++#define UART_DLL 0 //r/w, DLAB-1 :DIVISOR_LOW
++#define UART_IER 4 //r/w, DLAB-0 :INTERRUPT_ENABLE
++#define UART_DLH 4 //r/w, DLAB-1 :DIVISOR_HIGH
++
++#define UART_IIR 8 //read :INTERRUPT_INDENTIFICATION
++#define UART_FCR 8 //write :FIFO_CONTROL
++#define UART_LCR 0x0c //r/w :LINE_CONTROL
++#define UART_MCR 0x10 //r/w :MODEM_CONTROL
++#define UART_LSR 0x14 //read :LINE_STATUS
++#define UART_MSR 0x18 //read :MODEM_STATUS
++#define UART_SPR 0x1c //r/w :SCRATCH_PAD
++#define UART_ISR 0x20 //r/w :INFRARED
++
++//#define IC_BASE 0x40D00000
++#define ICIP 0x00 //IRQ pending status
++#define ICMR 0x04 //interrupt controller mask
++#define ICLR 0x08 //level, 0 - irq, 1 -fiq
++#define ICFP 0x0C //FIQ pending status
++#define ICPR 0x10 //all interrupts pending, no mask
++#define ICCR 0x14 //0 - ignore ICMR in idle mode, 1 - only unmasked interrupts will awaken processor
++
++
++#define __SKIP 8
++#define ICL1_GPIO0 (8 - __SKIP)
++#define ICL1_GPIO1 (9 - __SKIP)
++#define ICL1_GPIO2_80 (10 - __SKIP)
++#define ICL1_USB (11 - __SKIP)
++#define ICL1_PMU (12 - __SKIP)
++#define ICL1_I2S (13 - __SKIP)
++#define ICL1_AC97 (14 - __SKIP)
++#define ICL1_LCD (17 - __SKIP)
++#define ICL1_I2C (18 - __SKIP)
++#define ICL1_ICP (19 - __SKIP)
++#define ICL1_STUART (20 - __SKIP)
++#define ICL1_BTUART (21 - __SKIP)
++#define ICL1_FFUART (22 - __SKIP)
++#define ICL1_MMC (23 - __SKIP)
++#define ICL1_SSP (24 - __SKIP)
++#define ICL1_DMA (25 - __SKIP)
++#define ICL1_OS_TIMER0 (26 - __SKIP)
++#define ICL1_OS_TIMER1 (27 - __SKIP)
++#define ICL1_OS_TIMER2 (28 - __SKIP)
++#define ICL1_OS_TIMER3 (29 - __SKIP)
++#define ICL1_RTC_TICK (30 - __SKIP)
++#define ICL1_RTC_ALARM_MATCH (31 - __SKIP)
++
++//#define OS_TIMER_BASE 0x40a00000
++#define OSMR0 0x00
++#define OSMR1 0x04
++#define OSMR2 0x08
++#define OSMR3 0x0c
++#define OSCR 0x10 //OS timer Count register, increments at 3.6864 Mhz
++#define OSSR 0x14 //OS timer Status Register
++#define OWER 0x18 //OS timer Watchdog Match enable register
++#define OIER 0x1c
++
++//3686400 ticks/seconds = 3.6864 ticks/usec = 1 tick/.271267361111 usec
++#define TICK_PER_USEC_WHOLE 3
++#define TICK_PER_USEC_FRAC 0xAFB7E910
++//////////////////////////////////////////////////////////////////////////////////////////
++
++//#define PWR_MANAGER_BASE 0x40F00000
++#define PMCR 0
++#define PSSR 4
++#define PSPR 8
++#define PWER 0x0c
++#define PRER 0x10
++#define PFER 0x14
++#define PEDR 0x18
++#define PCFR 0x1c
++#define PGSR0 0x20
++#define PGSR1 0x24
++#define PGSR2 0x28
++#define RCSR 0x30
++
++#define PSSR_MASK 0x37
++#define RCSR_MASK 0x0f
++#define RCSR_SLEEP_RESET 4
++
++//#define CLK_MANAGER_BASE 0x41300000
++#define CCCR 0
++#define CKEN 4
++#define OSCC 8
++
++//#define MEMORY_CONTROL_BASE 0x48000000
++#define MDCNFG 0
++#define MDREFR 4
++#define MSC0 8
++#define MSC1 0x0c
++#define MSC2 0x10
++#define MECR 0x14
++#define SXCNFG 0x1c
++#define SXMRS 0x24
++#define MCMEM0 0x28
++#define MCMEM1 0x2c
++#define MCATT0 0x30
++#define MCATT1 0x34
++#define MCIO0 0x38
++#define MCIO1 0x3c
++#define MDMRS 0x40
++#define BOOT_DEF 0x44
++
++
++//#define LCD_CONTROL_BASE 0x44000000
++#define LCD_CR0 0 //master enable last
++#define LCD_CR1 4
++#define LCD_CR2 8
++#define LCD_CR3 0x0c
++#define LCD_FBR0 0x20 //Frame branch register
++#define LCD_FBR1 0x24 //Frame branch register
++#define LCD_SR 0x38
++#define LCD_INT_ID 0x3c
++#define LCD_TMEDS 0x40 //TMED RGB seed
++#define LCD_TMEDC 0x44 //TMED control
++#define LCD_FDADR0 0x200 //frame descriptor address register
++#define LCD_FDADR1 0x210 //frame descriptor address register
++
++#define LCD_FSADR0 0x204 //frame source address register
++#define LCD_FSADR1 0x214 //frame source address register
++
++#define LCD_FIDR0 0x208 //frame ID register
++#define LCD_FIDR1 0x218 //frame ID register
++
++#define LCD_DCMD0 0x20c //dma command
++#define LCD_DCMD1 0x21c //dma command
++
++#define CRO_LDDALT 26 //LDDALT ;0 selects RGB 555, 1 selects RGB 565
++#define CRO_OUC 25 //OUC ;0 underlays, 1 overlays
++#define CR0_CMDIM 24 //CMDIM ;command interrupt mask, 0 - enabled, 1 disabled
++#define CR0_RDSTM 23 //RDSTM ;read status interrupt mask, 0 - enabled, 1 disabled
++#define CR0_LCDT 22 //LCDT ;LCD Panel Type, 1 - internal frame buffer
++#define CR0_IM_OUTPUT_FIFO_UNDERRUN 21 //OUM IM stands for Interrupt Mask
++#define CR0_IM_BRANCH 20 //BSM0
++#define CR0_PALETTE_DMA_REQUEST_DELAY 12 //PDD 8 bit field, 0-255
++#define CR0_IM_LCD_QUICK_DISABLE 11 //QDM
++#define CR0_DISABLE 10 //DIS
++#define CR0_DOUBLE_PIXEL_DATA 9 //DPD
++#define CR0_ACTIVE_SELECT 7 //PAS
++#define CR0_IM_END_OF_FRAME 6 //EOFM0
++#define CR0_IM_INPUT_FIFO_UNDERRUN 5 //IUM
++#define CR0_IM_START_OF_FRAME 4 //SOFM0
++#define CR0_IM_DISABLE_DONE 3 //LDM
++#define CR0_DUAL_PANEL_SELECT 2 //SDS
++#define CR0_MONOCHROME_SELECT 1 //CMS
++#define CR0_ENABLE 0 //ENB
++
++
++
++
++#define CR1_BEGINNING_OF_LINE_WAIT 24 //8 bit field +1
++#define CR1_END_OF_LINE_WAIT 16 //8 bit field +1
++#define CR1_HORIZONTAL_SYNC_PULSE_WIDTH 10 //6 bit field +1
++#define CR1_PIXELS_PER_LINE 0 //10 bit field +1
++
++
++
++#define CR2_BEGINNING_OF_FRAME_WAIT 24 //8 bit field
++#define CR2_END_OF_FRAME_WAIT 16 //8 bit field
++#define CR2_VERTICAL_SYNC_PULSE_WIDTH 10 //6 bit field +1
++#define CR2_LINES_PER_PANEL 0 //10 bit field +1
++
++
++#define CR3_PDFOR 30
++#define CR3_DOUBLE_PCLK 27
++#define CR3_BITS_PER_PIXEL 24 //3 bit field
++//0 - 1 bit
++//1 - 2 bits
++//2 - 4 bits
++//3 - 8 bits
++//4 - 16 bits,
++//5-7 reserved
++#define CR3_BIAS_POLARITY 23
++#define CR3_PCLK_POLARITY 22
++#define CR3_LCLK_POLARITY 21
++#define CR3_FCLK_POLARITY 20
++#define CR3_API 16 //4 bits field, ac bias transitions per interrupt, 0 disable
++#define CR3_ACBIAS_TOGGLE 8 //8 bit field +1
++#define CR3_PCLK_DIVISOR 0 //8 bit field +1
++
++
++
++#define FBR_BRANCH_INT 1
++#define FBR_BRANCH 0
++
++
++#define SR_MISSED_INT 10
++#define SR_BRANCH_INT 9
++#define SR_END_OF_FRAME_INT 8
++#define SR_QUICK_DISABLE_INT 7
++#define SR_OUTPUT_FIFO_UNDERRUN 6
++#define SR_INPUT_FIFO_UNDERRUN0 5
++#define SR_INPUT_FIFO_UNDERRUN1 4
++#define SR_ACBIAS_COUNT_INT 3
++#define SR_BUS_ERROR 2
++#define SR_START_OF_FRAME 1
++#define SR_DISABLE_DONE 0
++
++#define TMEDS_BLUE 16 //8 bit field
++#define TMEDS_GREEN 8 //8 bit field
++#define TMEDS_RED 0 //8 bit field
++
++
++#define TMEDC_MATRIX2_SELECT 14
++#define TMEDC_RESERVED 12 //2 bit field
++#define TMEDC_HORIZONTAL_BEAT_SUPPRESSION 8 //4 bit field
++#define TMEDC_VERTICAL_BEAT_SUPPRESSION 4 //4 bit field
++#define TMEDC_FRAME_NUMBER_ADJUST_EN 3
++#define TMEDC_COLOR_OFFSET_ADJUST_EN 2
++#define TMEDC_FRAME_NUMBER_ADJUST_MATRIX2 1
++#define TMEDC_COLOR_OFFSET_ADJUST_MATRIX2 0
++
++
++#define DCMD_PALETTE 26
++#define DCMD_START_OF_FRAME_INTERRUPT 22
++#define DCMD_END_OF_FRAME_INTERRUPT 21
++#define DCMD_LENGTH 0 //21 bit field
++
++
++#define FDESC_FDADR 0
++#define FDESC_FSADR 4
++#define FDESC_FIDR 8
++#define FDESC_DCMD 0x0c
++
++#define PSR_MODE_MASK 0x1f
++#define PSR_MODE_USER 0x10
++#define PSR_MODE_FIQ 0x11
++#define PSR_MODE_IRQ 0x12
++#define PSR_MODE_SVC 0x13
++#define PSR_MODE_DEBUG 0x15
++#define PSR_MODE_ABORT 0x17
++#define PSR_MODE_UNDEF 0x1b
++#define PSR_MODE_SYSTEM 0x1f
++#define PSR_NOINTS_MASK 0xc0
++
++#define FUNC_REQ_GL 0
++#define FUNC_REQ_DLW 1
++#define FUNC_REQ_GAME 2 //not specifically referenced
++#define FUNC_REQ_MAC 3
++#define FUNC_REQ_WAKEUP 4
++#define FUNC_REQ_PIC 5
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxaLcd2.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaLcd2.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxaLcd2.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaLcd2.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,78 @@
++#include "pxaLcd.h"
++#define DA320X240 0
++#define DA640X240 1
++#define DA800X480 2
++#define DA640X480 3
++#define DA240X320 4
++#define DA800X600 5
++#define DA1024X768 6
++#define DP480X320 7
++#define DP320X240 8
++#define DL122X32 9
++#define UNKNOWN 0xcc
++
++#ifdef __ARMASM
++ GBLS DEF_P
++#endif
++
++#if DISPLAY_TYPE==DA320X240 //5.7 inch display
++#define DEF_P DA320X240_P
++#define DEF_DISPLAY_INDEX 0
++#else
++#if DISPLAY_TYPE==DA640X240 //6.2 inch display
++#define DEF_P DA640X240_P
++#define DEF_DISPLAY_INDEX 1
++#else
++#if DISPLAY_TYPE==DA800X480 //7 or 9 inch display
++#define DEF_P DA800X480_P
++#define DEF_DISPLAY_INDEX 2
++#else
++#if DISPLAY_TYPE==DA640X480 //10.4 inch display
++#define DEF_P DA640X480_P
++#define DEF_DISPLAY_INDEX 3
++#else
++#if DISPLAY_TYPE==DA240X320 //3.5 inch display
++#define DEF_P DA240X320_P
++#define DEF_DISPLAY_INDEX 4
++#else
++#if DISPLAY_TYPE==DA800X600
++#define DEF_P DA800X600_P
++#define DEF_DISPLAY_INDEX 5
++#else
++#if DISPLAY_TYPE==DA1024X768
++#define DEF_P DA1024X768_P
++#define DEF_DISPLAY_INDEX 6
++#else
++#if DISPLAY_TYPE==DP480X320 //5.7 inch display
++#define DEF_P DP480X320_P
++#define DEF_DISPLAY_INDEX 7
++#else
++#if DISPLAY_TYPE==DP320X240 //5.7 inch display
++#define DEF_P DP320X240_P
++#define DEF_DISPLAY_INDEX 8
++#else
++#if DISPLAY_TYPE==DL122X32
++#define DEF_P DL122X32_P
++#define DEF_DISPLAY_INDEX 9
++#else
++#if DISPLAY_TYPE==UNKNOWN
++#define DEF_P DA320X240_P
++#define DEF_DISPLAY_INDEX 0xcc
++
++#else
++#define DEF_P DA320X240_P
++#define DEF_DISPLAY_INDEX 0
++#warning "No display selected, defaulting to DA320X240"
++
++#endif //0xcc
++#endif //9
++#endif //8
++#endif //7
++#endif //6
++#endif //5
++#endif //4
++#endif //3
++#endif //2
++#endif //1
++#endif //0
++
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxaLcd.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaLcd.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxaLcd.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaLcd.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,79 @@
++#include "platformTypes.h"
++#define WINCE 1
++#define LINUX 2
++#define GAME 3
++
++#define PXAFB_BPP 16
++
++#define LCD_PANEL 0
++#define CRT 1
++
++//pixel clock frequency = LCLK / (2*(PCD+1))
++#if (PLATFORM_TYPE==HALOGEN)
++#define __BPP 18
++#define BPP_FORMAT 6
++#define PDFOR 3
++#define BYTES_PER_PIXEL 3
++#else
++#define __BPP 16
++#define BPP_FORMAT 4
++#define PDFOR 0
++#define BYTES_PER_PIXEL 2
++#endif
++
++// ****************************************************************************
++// This is where different display settings reside
++// xres,xsyncWidth,xbegin,xend, yres,ysyncWidth,ybegin,yend, enable,unscramble,rotate,active,bpp,clkdiv,type
++//#define DA320X240_P 320, 64, 34, 1, 240, 20, 8, 3, 1,0,0,1,PXAFB_BPP,4,LCD_PANEL //0
++#define DA320X240_P 320, 64, 34, 11, 240, 5, 8, 3, 1,0,0,1,PXAFB_BPP,4,LCD_PANEL //0
++
++#define DA640X240_P 640, 64, 34, 1, 240, 20, 8, 3, 1,1,0,1,PXAFB_BPP,2,LCD_PANEL //1
++#define DA800X480_P 800, 64, 34, 1, 480, 20, 8, 3, 1,1,0,1,PXAFB_BPP,2,LCD_PANEL //2
++#define DA640X480_P 640, 64, 34,105, 480, 20, 8,14, 1,1,0,1,PXAFB_BPP,2,LCD_PANEL //3
++#define DA240X320_P 240, 64, 34, 1, 320, 20, 8, 3, 1,0,1,1,PXAFB_BPP,5,LCD_PANEL //4
++#define DA800X600_P 800,0x9b,0x31,0x69, 600,0x04,0x01,0x17, 1,1,0,1,PXAFB_BPP,2,CRT //5
++//#define DA1024X768_P 1024,0xc8,0x55,0xb4, 768,0x06,0x0b,0x1d, 1,1,0,1,PXAFB_BPP,2,CRT //6
++//#define DA1024X768_P 1024,0xe4,0x3c,0x70, 768,0x0c,0x0b,0x20, 1,1,0,1,PXAFB_BPP,2,CRT //6
++#define DA1024X768_P 1024,0xe4,0x3c,0x70, 768,0x0c,0x0b,0x20, 1,1,0,1,PXAFB_BPP,2,LCD_PANEL //6
++#define DP480X320_P 480, 64, 34, 1, 320,20,8,3, 1,0,0,0,PXAFB_BPP,3,LCD_PANEL //7
++#define DP320X240_P 320, 64, 34, 1, 240,20,8,3, 1,0,0,0,PXAFB_BPP,4,LCD_PANEL //8
++#define DL122X32_P 320, 64, 34, 1, 240,20,8,3, 0,0,0,0,PXAFB_BPP,4,0 //9
++
++// ********************************************************************************
++#if (PLATFORM_TYPE==BOUNDARY_OLD_BOARD)
++#define MOTHERBOARD_SCRAMBLED
++#endif
++
++//#define CONFIG_UNSCRAMBLE_LCD
++#ifdef CONFIG_UNSCRAMBLE_LCD
++#if 1 //FL_ACTIVE(DEF_P) //passive cannot swap pin order
++#ifdef MOTHERBOARD_SCRAMBLED
++
++#ifndef DAUGHTERBOARD_UNSCRAMBLE
++#define LCD_REORDER_BLUE 15,14, 8, 7, 6
++#define LCD_REORDER_GREEN 13,12,11, 5, 4, 3
++#define LCD_REORDER_RED 10, 9, 2, 1, 0
++#endif
++
++#else
++//motherboard is NOT scrambled
++#ifdef DAUGHTERBOARD_UNSCRAMBLE
++#define LCD_REORDER_BLUE 15,14,13,10, 9
++#define LCD_REORDER_GREEN 8, 4, 3, 2, 12, 11
++#define LCD_REORDER_RED 7, 6, 5, 1, 0
++#endif
++#endif //#ifdef MOTHERBOARD_SCRAMBLED
++#endif //#if FL_ACTIVE(DEF_P)
++#endif //#ifdef CONFIG_UNSCRAMBLE_LCD
++
++#ifndef LCD_REORDER_BLUE
++#if (BYTES_PER_PIXEL==2)
++#define LCD_REORDER_BLUE 0,1,2,3,4
++#define LCD_REORDER_GREEN 5,6,7,8,9,10
++#define LCD_REORDER_RED 11,12,13,14,15
++#else
++#define LCD_REORDER_BLUE 0,1,2,3,4,5
++#define LCD_REORDER_GREEN 6,7,8,9,10,11
++#define LCD_REORDER_RED 12,13,14,15,16,17
++#endif
++#endif
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxaMacro2.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaMacro2.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxaMacro2.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaMacro2.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,540 @@
++#include "pxaMacro.h"
++// ************************************************************************************************
++// ************************************************************************************************
++
++//In: c-0 try 64meg, c-1 try 32meg
++// or if 16 bit mode
++// c-0 try 32meg, c-1 try 16meg
++//Out: z-0 if 16 bit mode
++.macro InitRam rBase,rTemp
++ BigMov \rBase,MEMORY_CONTROL_BASE
++ ldr \rTemp,[\rBase,#BOOT_DEF]
++ tst \rTemp,#1 //bit 0 - 1 means 16 bit mode
++ BigMov \rTemp,M64_MDCNFG_VAL
++ BigEor2Cs \rTemp,(M64_MDCNFG_VAL)^(M32_MDCNFG_VAL)
++#if (!(PLATFORM_TYPE==NEONB)) && (!(PLATFORM_TYPE==HALOGEN))
++ BigOrr2Ne \rTemp,(1<<2) //select 16 bit width
++#endif
++ str \rTemp,[\rBase,#MDCNFG]
++
++ mov \rTemp,#0
++ nop //pxa270 may need this for some reason, depending upon instruction alignment
++ str \rTemp,[\rBase,#MDMRS]
++
++
++ BigMov \rTemp,M64_MDREFR_VAL
++ BigEor2Cs \rTemp,(M64_MDREFR_VAL)^(M32_MDREFR_VAL)
++ str \rTemp,[\rBase,#MDREFR]
++.endm
++
++
++//In: z-1 - c-0 try 64meg, c-1 try 32meg
++// z-0 - c-0 try 32meg, c-1 try 16meg
++//out: rTemp - memory size
++.macro CheckRam rBase,rTemp,rTemp2
++ // Issue read requests to disabled bank to start refresh
++ BigMov \rBase,MEM_START+0x0C000000
++ ldr \rTemp, [\rBase]
++ mov \rTemp,#M32_MEM_SIZE
++ movcc \rTemp,#M64_MEM_SIZE
++#if (!(PLATFORM_TYPE==NEONB)) && (!(PLATFORM_TYPE==HALOGEN))
++ movne \rTemp,\rTemp,LSR #1
++#endif
++ BigMov \rBase,MEM_START
++#if 1
++ mov \rTemp2,#0x24<<2 //0x24 seems to work, but keep it safe
++81: sub \rTemp2,\rTemp2,#1
++ str \rTemp2,[\rBase]
++ movs \rTemp2,\rTemp2 //don't affect carry flag
++ bne 81b
++#endif
++ str \rTemp,[\rBase]
++ str \rBase,[\rBase,\rTemp,LSR #1]
++ ldr \rTemp2,[\rBase]
++ movcs \rTemp2,\rTemp //if 2nd time through, force match
++ cmp \rTemp2,\rTemp
++#if 1
++ strne \rTemp2,[\rBase,#4]
++// teq \rTemp2,\rTemp2
++#endif
++.endm
++
++#define tEHEL 0 //R14
++#define tAPA 3 //r15 25ns/10ns rounded up
++
++#define RDFSelect 13 //R2 : tAVQV : 110ns/10ns = 11; 11-1=10=RDF
++//#define RDFSelect 10 //R2 : tAVQV : 110ns/10ns = 11; 11-1=10=RDF
++ //0-11 map to 0-11
++ //12 -> 13, 13 ->15, 14->18, 15->23
++
++//#if (PLATFORM_TYPE==GAME_CONTROLLER_PLAITED_A1)
++#if (PLATFORM_TYPE==GAME_CONTROLLER_PLAITED_A1)||(PLATFORM_TYPE==GAME_CONTROLLER)||(PLATFORM_TYPE==GAME_WITH_SMC)
++#define BurstSelect 0 //if plaited bug, burst mode will no longer work.
++#else
++#define BurstSelect 2 //0->nonburst,1->SRAM,2->burst of4, 3->burst of 8, 4->variable latency i/o
++#endif
++
++
++#if (PLATFORM_TYPE==NEONB)
++//access time 70ns, 25ns after CS data becomes valid
++// RRR RDN RDF RBW RTX
++// gap between Address to
++// 1-fast chip selects data valid
++// 0-slow recovery 2nd burst access 1st access delay 16-bit bus non-burst(0), sram(1), 4cycle(2), 8cycle(3), VLIO(4)
++#define CS0_MSC (1<<15)+ (1<<12)+ (7<<8)+ ((7-1)<<4)+ 0
++#define CS1_MSC (1<<15)+(((tEHEL+1)>>1)<<12)+((tAPA-1)<<8)+ (RDFSelect<<4)+ (BurstSelect) //fast device
++#else
++#define CS0_MSC (1<<15)+(((tEHEL+1)>>1)<<12)+((tAPA-1)<<8)+ (RDFSelect<<4)+ (BurstSelect) //fast device
++#define CS1_MSC (1<<15)+ (3<<12)+ (2<<8)+ ((3-1)<<4)+ (1<<3) + 4 //SMC chip
++//#define CS1_MSC (1<<15)+ (6<<12)+ ((11-1)<<8)+ ((4-1)<<4)+ (1<<3) + 4 //SMC chip
++#endif
++
++.macro InitCS0_CS1 rBase,rTemp
++ BigMov \rBase,MEMORY_CONTROL_BASE
++ ldr \rTemp,[\rBase,#BOOT_DEF]
++ tst \rTemp,#1 //bit 0 - 1 means 16 bit mode
++ BigMov \rTemp,(CS0_MSC)|((CS1_MSC)<<16)
++/////// BigMov \rTemp,0x7ff07ff0
++ orrne \rTemp,\rTemp,#1<<3 //16 bit bus
++ str \rTemp,[\rBase,#MSC0]
++.endm
++
++
++.macro InitMemory rBase,rTemp,rTemp2
++ cmp pc,#MEM_START
++ bcs 92f //exit if running from ram
++#if 0 //1 to force smaller memory
++ subs \rTemp,\rTemp,\rTemp //set carry flag
++#endif
++
++1:
++ InitRam \rBase, \rTemp //out: \rBase - MEMORY_CONTROL_BASE
++
++#if (PLATFORM_TYPE==BOUNDARY_OLD_BOARD)
++#define CHIP_MODE 0 //don't use VIO_READY
++#else
++#define CHIP_MODE 4 //gp18 is VIO_READY
++#endif
++
++// RRR RDN RDF RBW RTX
++// gap between Address to
++// 1-fast chip selects data valid
++// 0-slow recovery 2nd burst access 1st access delay 16-bit bus non-burst(0), sram(1), 4cycle(2), 8cycle(3), VLIO(4)
++#if 1
++#define CS2_MSC (1<<15)+ (4<<12)+ ((6-2)<<8)+ ((4-1)<<4)+ (1<<3) + CHIP_MODE //for USB dma
++//#define CS2_MSC (1<<15)+ (7<<12)+ ((16-1)<<8)+ ((16-1)<<4)+ (1<<3) + CHIP_MODE //for USB dma
++
++// vlio min 2 vlio min 3
++#if (PLATFORM_TYPE==NEON) || (PLATFORM_TYPE==NEONB)
++#define CS3_MSC (1<<15)+ (1<<12)+ (2<<8)+ ((4-1)<<4)+ (0<<3) + 4 //SM501
++#define CS4_MSC (1<<15)+ (3<<12)+ (2<<8)+ ((4-1)<<4)+ (0<<3) + 4 //SMC chip
++#else
++#if (PLATFORM_TYPE==HALOGEN)
++#define CS3_MSC (1<<15)+ (1<<12)+ (2<<8)+ ((4-1)<<4)+ (0<<3) + 4 //NC
++#define CS4_MSC (1<<15)+ (3<<12)+ (2<<8)+ ((5-1)<<4)+ (0<<3) + 4 //SMC chip
++#else
++#define CS3_MSC (1<<15)+ (4<<12)+ ((6-2)<<8)+ ((4-1)<<4)+ (1<<3) + CHIP_MODE //for USB dma
++//#define CS3_MSC (1<<15)+ (7<<12)+ ((16-1)<<8)+ ((16-1)<<4)+ (1<<3) + CHIP_MODE //for USB dma
++#define CS4_MSC (1<<15)+ (6<<12)+ ((11-1)<<8)+ ((4-1)<<4)+ (1<<3) + CHIP_MODE //for USB IO
++#endif
++#endif
++
++#define CS5_MSC (0<<15)+ (7<<12)+ ((8-1)<<8)+ ((8-1)<<4)+ (1<<3) + (0) //for USB IO delay after CMD write
++#else
++#define CS2_MSC (1<<15)+ (7<<12)+ ((16-1)<<8)+ ((16-1)<<4)+ (1<<3) + CHIP_MODE //for USB dma
++#define CS3_MSC (1<<15)+ (7<<12)+ ((16-1)<<8)+ ((16-1)<<4)+ (1<<3) + CHIP_MODE //for USB dma
++#define CS4_MSC (1<<15)+ (7<<12)+ ((16-1)<<8)+ ((16-1)<<4)+ (1<<3) + CHIP_MODE //for USB IO
++#define CS5_MSC (0<<15)+ (7<<12)+ ((16-1)<<8)+ ((16-1)<<4)+ (1<<3) + (0) //for USB IO delay after CMD write
++#endif
++ BigMov \rTemp,(CS2_MSC)|((CS3_MSC)<<16)
++ str \rTemp,[\rBase,#MSC1]
++ BigMov \rTemp,(CS4_MSC)|((CS5_MSC)<<16)
++ str \rTemp,[\rBase,#MSC2]
++
++
++
++#define PCMCIA_MEM_SETUP_ADDRESS 5 //0-127
++#define PCMCIA_MEM_COMMAND_CODE 3 //0-31
++#define PCMCIA_MEM_HOLD_ADDRESS 2 //0-63
++ BigMov \rTemp,(PCMCIA_MEM_HOLD_ADDRESS<<14)+(PCMCIA_MEM_COMMAND_CODE<<7)+(PCMCIA_MEM_SETUP_ADDRESS<<0)
++ str \rTemp,[\rBase,#MCMEM0]
++ str \rTemp,[\rBase,#MCMEM1]
++#define PCMCIA_ATT_SETUP_ADDRESS 5 //0-127
++#define PCMCIA_ATT_COMMAND_CODE 3 //0-31
++#define PCMCIA_ATT_HOLD_ADDRESS 2 //0-63
++ BigMov \rTemp,(PCMCIA_ATT_HOLD_ADDRESS<<14)+(PCMCIA_ATT_COMMAND_CODE<<7)+(PCMCIA_ATT_SETUP_ADDRESS<<0)
++ str \rTemp,[\rBase,#MCATT0]
++ str \rTemp,[\rBase,#MCATT1]
++#define PCMCIA_IO_SETUP_ADDRESS 5 //0-127
++#define PCMCIA_IO_COMMAND_CODE 3 //0-31
++#define PCMCIA_IO_HOLD_ADDRESS 2 //0-63
++ BigMov \rTemp,(PCMCIA_IO_HOLD_ADDRESS<<14)+(PCMCIA_IO_COMMAND_CODE<<7)+(PCMCIA_IO_SETUP_ADDRESS<<0)
++ str \rTemp,[\rBase,#MCIO0]
++ str \rTemp,[\rBase,#MCIO1]
++ mov \rTemp,#2
++ str \rTemp,[\rBase,#MECR]
++
++ CheckRam \rBase, \rTemp, \rTemp2
++ cmpne \rTemp,#0x0 //set carry flag, keep z-0 (memory size!=0)
++ bne 1b
++92:
++.endm
++
++// *******************************************************************************************
++// *******************************************************************************************
++// *******************************************************************************************
++// *******************************************************************************************
++#define CKEN_PWM0 0
++#define CKEN_PWM1 1
++#define CKEN_AC97 2
++#define CKEN_SSP 3
++#define CKEN_HWUART 4
++#define CKEN_STUART 5
++#define CKEN_FFUART 6
++#define CKEN_BTUART 7
++#define CKEN_I2S 8
++#define CKEN_USB 11
++#define CKEN_MMC 12
++#define CKEN_FICP 13
++#define CKEN_I2C 14
++#define CKEN_LCD 16
++
++#if (PLATFORM_TYPE==NEON) || (PLATFORM_TYPE==BD2003) || (PLATFORM_TYPE==BOUNDARY_OLD_BOARD) || (PLATFORM_TYPE==OLD_GAME_CONTROLLER) || (PLATFORM_TYPE==HALOGEN)
++#define __ENABLED_BTUART_MASK (1<<CKEN_BTUART)
++#define __ENABLED_STUART_MASK (1<<CKEN_STUART)
++#endif
++
++#if (PLATFORM_TYPE==BD2003) || (PLATFORM_TYPE==BOUNDARY_OLD_BOARD) || (PLATFORM_TYPE==OLD_GAME_CONTROLLER) || (PLATFORM_TYPE==HALOGEN)
++#define __ENABLED_LCD_MASK (1<<CKEN_LCD)
++#endif
++
++#ifndef __ENABLED_BTUART_MASK
++#define __ENABLED_BTUART_MASK 0
++#endif
++
++#ifndef __ENABLED_STUART_MASK
++#define __ENABLED_STUART_MASK 0
++#endif
++
++#ifndef __ENABLED_LCD_MASK
++#define __ENABLED_LCD_MASK 0
++#endif
++
++.macro InitIC_Clocks rBase,rTemp
++ BigMov \rBase,IC_BASE
++ mov \rTemp,#0
++ str \rTemp,[\rBase,#ICMR] //disable all interrupts
++
++ BigMov \rBase,CLK_MANAGER_BASE
++#if (PLATFORM_TYPE==HALOGEN)
++#define CKEN_MEMORY_CONTROLLER 22
++#define CKEN_OS_TIMER 9
++
++#define CCCR_L_BIT 0
++#define CCCR_2N_BIT 7
++#define CCCR_A_BIT 25
++
++#define CLKCFG_TURBO_BIT 0
++#define CLKCFG_FREQUENCY_CHANGE_BIT 1
++#define CLKCFG_HALF_TURBO_BIT 2
++#define CLKCFG_FAST_BUS_BIT 3
++
++#if (CPU_CLOCK==104) //13*8 = 104MHz
++#define CCCR_2N 2
++#define CCCR_L 8
++#define CCCR_A 0
++#define CLKCFG_TURBO 0
++#define CLKCFG_FAST_BUS 0
++#else
++#if (CPU_CLOCK==208) //13*16 = 208MHz
++#define CCCR_2N 2
++#define CCCR_L 16
++#define CCCR_A 0
++#define CLKCFG_TURBO 0
++#define CLKCFG_FAST_BUS 0
++#else
++#if (CPU_CLOCK==312) //312MHz
++#define CCCR_2N 3
++#define CCCR_L 16
++#define CCCR_A 0
++#define CLKCFG_TURBO 1
++#define CLKCFG_FAST_BUS 0
++#else
++#if (CPU_CLOCK==416) //416MHz
++#define CCCR_2N 4
++#define CCCR_L 16
++#define CCCR_A 0
++#define CLKCFG_TURBO 1
++#define CLKCFG_FAST_BUS 1
++#else
++#if (CPU_CLOCK==520) //520MHz
++#define CCCR_2N 5
++#define CCCR_L 16
++#define CCCR_A 0
++#define CLKCFG_TURBO 1
++#define CLKCFG_FAST_BUS 1
++#else
++#if (CPU_CLOCK==624) //624MHz
++#define CCCR_2N 6
++#define CCCR_L 16
++#define CCCR_A 0
++#define CLKCFG_TURBO 1
++#define CLKCFG_FAST_BUS 1
++
++#else
++#warning CPU_CLOCK selection not made
++#endif
++#endif
++#endif
++#endif
++#endif
++#endif
++ BigMov \rTemp,(CCCR_L<<CCCR_L_BIT)+(CCCR_2N<<CCCR_2N_BIT)+(CCCR_A<<CCCR_A_BIT)
++ str \rTemp,[\rBase,#CCCR]
++
++ BigMov \rTemp,(1<<CKEN_OS_TIMER)+(1<<CKEN_MEMORY_CONTROLLER)+(1<<CKEN_FFUART)+__ENABLED_BTUART_MASK+__ENABLED_STUART_MASK+__ENABLED_LCD_MASK
++ str \rTemp,[\rBase,#CKEN]
++
++#else
++#define tRP 20
++#define tRCD 20
++#define tRAS 45 //45 ns
++#define tRC 65
++// CRYSTALns 10000000/ 36864 //271ns
++
++#define LSelect 1 //1 : *27 = 10.0469 ns memory clk time, 99.53 MHz
++ // tRP_clk = tRCD_clk= 1.99066 -> 2 clks
++ // tRAS_clk= 4.47899 -> 5 clks
++ // tRC_clk= 6.46966 -> 7 clks
++ //2 : *32 = 8.47711 ns, 117.96 MHz
++ // tRP_clk = tRCD_clk= 2.35929 -> 3 clks
++ // tRAS_clk=5.30841 -> 6
++ // tRC_clk =7.66771 -> 8 clks
++ //3 : *36 = 7.5352 ns, 132.71 MHz
++ // tRP_clk = tRCD_clk= 2.65421 -> 3 clks
++ // tRAS_clk=5.97197 -> 6
++ // tRC_clk = 8.62618 -> 9 clks
++ //4 : *40 = 6.78168ns, 147.46 MHz
++ // tRP_clk = tRCD_clk= 2.94912 -> 3 clks
++ // tRAS_clk=6.63522 -> 7
++ // tRC_clk = 9.58465 -> 10 clks
++ //5 : *45 = 6.02816ns, 165.89 MHz
++ // tRP_clk = tRCD_clk= 3.31776 -> 4 clks
++ // tRAS_clk=7.46496 -> 8
++ // tRC_clk = 10.7827 -> 11 clks
++//MSelect
++//1 : *1
++//2 : *2
++
++//NSelect
++//2 : *1;
++//3 : *1.5;
++//4 : *2;
++//6 : *3
++
++#if (CPU_CLOCK==100)
++#define MSelect 1 //1 : *1 100MHz
++#define NSelect 4 //4 : *2; turbo 200 MHZ
++#define FCS_MASK 2 // turbo off
++#else
++#if (CPU_CLOCK==200)
++#define MSelect 2 //2 : *2 200 MHz
++#define NSelect 3 //3 : *1.5; turbo 300 MHZ
++#define FCS_MASK 2 // turbo off
++#else
++#if (CPU_CLOCK==300)
++#define MSelect 2 //2 : *2 200 MHz
++#define NSelect 3 //3 : *1.5; turbo 300 MHZ
++#define FCS_MASK 3 // turbo on
++#else
++#if (CPU_CLOCK==400)
++
++#if 0 //only pxa255 runs with 200Mhz internal bus, pxa250 doesn't
++#define MSelect 2 //2 : *2 200 MHz
++#define NSelect 4 //4 : *2; turbo 400 MHZ
++#define FCS_MASK 3 // turbo on
++#else
++#define MSelect 3 //2 : *4 400 MHz
++#define NSelect 2 //4 : *1; turbo 400 MHZ
++#define FCS_MASK 2 // turbo off
++#endif
++
++#else
++//////#WARNING CPU_CLOCK selection not made
++#endif
++#endif
++#endif
++#endif
++
++ BigMov \rTemp,(NSelect<<7)+(MSelect<<5)+(LSelect)
++ str \rTemp,[\rBase,#CCCR]
++
++ BigMov \rTemp,(1<<CKEN_FFUART)+__ENABLED_BTUART_MASK+__ENABLED_STUART_MASK+__ENABLED_LCD_MASK
++ str \rTemp,[\rBase,#CKEN]
++#endif //not HALOGEN
++ mov \rTemp,#0 //disable 32.768khz oscillator
++// mov \rTemp,#2 //enable 32.768khz oscillator
++ str \rTemp,[\rBase,#OSCC]
++.endm
++
++.macro InitChangeCPUSpeed rTemp
++#if (PLATFORM_TYPE==HALOGEN)
++ mov \rTemp,#(CLKCFG_FAST_BUS<<CLKCFG_FAST_BUS_BIT)+(CLKCFG_TURBO<<CLKCFG_TURBO_BIT)+(1<<CLKCFG_FREQUENCY_CHANGE_BIT)
++ CP14_CCLKCFG mcr,\rTemp
++#else
++ mov \rTemp,#FCS_MASK
++ CP14_CCLKCFG mcr,\rTemp
++#endif
++.endm
++
++// *******************************************************************************************
++// *******************************************************************************************
++
++.macro InitUART rBase,rTemp,uartaddr,baudrate
++ BigMov \rBase,\uartaddr
++
++ mov \rTemp,#0x83 //DLAB, 8-bit characters
++ str \rTemp,[\rBase,#UART_LCR]
++ mov \rTemp,#(14745600/((\baudrate)<<4))&0xff
++ str \rTemp,[\rBase,#UART_DLL]
++ mov \rTemp,#((14745600/((\baudrate)<<4))>>8)
++ str \rTemp,[\rBase,#UART_DLH]
++
++ mov \rTemp,#3 //8-bit characters
++ str \rTemp,[\rBase,#UART_LCR]
++
++ mov \rTemp,#0xc1 //enable fifo, 32 byte level
++ str \rTemp,[\rBase,#UART_FCR]
++
++ mov \rTemp,#0x40 //UUE- UART unit enable
++ str \rTemp,[\rBase,#UART_IER]
++.endm
++.macro InitGPIO rBase,rTemp
++ BigMov \rBase,GPIO_BASE
++
++ BigMov \rTemp,~SRVAL0
++ str \rTemp,[\rBase,#GPCR0]
++ mvn \rTemp,\rTemp
++ str \rTemp,[\rBase,#GPSR0]
++
++ BigMov \rTemp,~SRVAL32
++ str \rTemp,[\rBase,#GPCR1]
++ mvn \rTemp,\rTemp
++ str \rTemp,[\rBase,#GPSR1]
++
++ BigMov \rTemp,~SRVAL64
++ str \rTemp,[\rBase,#GPCR2]
++ mvn \rTemp,\rTemp
++ str \rTemp,[\rBase,#GPSR2]
++#if (PLATFORM_TYPE==HALOGEN)
++ BigMov \rTemp,~SRVAL96
++ str \rTemp,[\rBase,#GPCR3]
++ mvn \rTemp,\rTemp
++ str \rTemp,[\rBase,#GPSR3]
++#endif
++////////
++ BigMov \rTemp,DRVAL0
++ str \rTemp,[\rBase,#GPDR0]
++
++ BigMov \rTemp,DRVAL32
++ str \rTemp,[\rBase,#GPDR1]
++
++ BigMov \rTemp,DRVAL64
++ str \rTemp,[\rBase,#GPDR2]
++#if (PLATFORM_TYPE==HALOGEN)
++ BigMov \rTemp,DRVAL96
++ str \rTemp,[\rBase,#GPDR3]
++#endif
++////////
++ BigMov \rTemp,AFVAL0
++ str \rTemp,[\rBase,#GAFR0_L]
++ BigMov \rTemp,AFVAL16
++ str \rTemp,[\rBase,#GAFR0_U]
++
++ BigMov \rTemp,AFVAL32
++ str \rTemp,[\rBase,#GAFR1_L]
++ BigMov \rTemp,AFVAL48
++ str \rTemp,[\rBase,#GAFR1_U]
++
++ BigMov \rTemp,AFVAL64
++ str \rTemp,[\rBase,#GAFR2_L]
++ BigMov \rTemp,AFVAL80
++ str \rTemp,[\rBase,#GAFR2_U]
++#if (PLATFORM_TYPE==HALOGEN)
++ BigMov \rTemp,AFVAL96
++ str \rTemp,[\rBase,#GAFR3_L]
++ BigMov \rTemp,AFVAL112
++ str \rTemp,[\rBase,#GAFR3_U]
++#endif
++ BigMov \rBase,PWR_MANAGER_BASE
++ mov \rTemp,#0x30
++ str \rTemp,[\rBase,#PSSR]
++.endm
++
++
++
++.macro TransMacro val
++ BigMov r12,UART_BASE
++91:
++ BigMov r0,\val
++ bl Transmit
++ b 91b
++.endm
++// *******************************************************************************************
++.macro InitMMU rBase,rTemp
++// mov r0,#PSR_NOINTS_MASK+PSR_MODE_SVC
++// msr cpsr_c,r0
++// ********************************************************************
++// Disable the MMU and gang regardless of why we are here.
++ BigMov \rBase,0x2001 //; enable access to all coprocessors
++ CP15_CP_ACCESS mcr,\rBase
++ CPWAIT \rBase
++
++ mov \rBase,#0x00000078 //; get a zero to turn things off (must write bits[6:3] as 1's)
++ CP15_CONTROL mcr,\rBase //; Turn Off MMU, I&D Caches, WB.
++ CPWAIT \rBase
++
++ mov \rBase,#0x00000000 //; get a zero to turn things off
++ cmp pc,#MEM_START
++ CP15_TLB_INVAL_BOTH mcr,\rBase //; flush (invalidate) I/D tlb's
++ CP15_CF_INVAL_BTB mcr,\rBase //invalidate Branch target buffer
++ CP15_CF_INVAL_D mcr,\rBase
++ CP15_CF_INVAL_I mcrcs,\rBase //I might be running from cache only, invalidate if in ram
++ CP15_CF_DRAIN mcr,\rBase //; Drain the write buffer
++ nop
++ nop
++ nop
++ mvn r0, #0 //; grant manager access to all domains
++ CP15_DACR mcr,\rBase
++.endm
++
++//out rTemp1 reset reason
++.macro InitPWR rBase,rTemp1,rTemp2
++ BigMov \rBase,PWR_MANAGER_BASE
++// ********************************************************************
++ ldr \rTemp1,[\rBase,#RCSR] // Read & Init Reset Cause bits in RCSR.
++ and \rTemp1,\rTemp1,#RCSR_MASK // extract the reset cause bits
++ str \rTemp1,[\rBase,#RCSR] // clear the reset cause bits (they're sticky)
++// ********************************************************************
++// Read and store PSSR, too - it will be reset later, after GPIOs are initialized.
++// Unclear when we'll need this information, but don't throw a good status away.
++// ldr \rTemp2, [\rBase,#PSSR]
++// extract the reset cause bits
++// and \rTemp2,\rTemp2,#PSSR_MASK //; r12 now holds the conditioned PSSR
++// orr \rTemp1,\rTemp1,\rTemp2,lsl #16 //; R10 now has RCSR in lower half and PSSR in upper.
++// ********************************************************************
++// Reasons for being here:
++// 1) Hard Reset
++// 2) Wake from Sleep
++// 3) GPIO Reset
++// 4) Watchdog Reset
++// 5) Eboot Handoff
++// If Sleep_Reset: reinit all but RTC, PWRMAN, CLKS (except cp14)... so reinit: OST, INTC, GPIO
++// If GPIO_Reset: reinit all but MEMC.Config, RTC, CLKS (except cp14)... so reinit: treat like sleep
++// If Watchdog_Reset: reinit all but RTC.RTTR, CLK.OSCC... so reinit: treat like a hard reset, minus OSCC and RTTR init.
++// If Hard_Reset: reinit all
++.endm
++
++// *******************************************************************************************
++// *******************************************************************************************
++ .list
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxaMacro3.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaMacro3.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxaMacro3.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaMacro3.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,74 @@
++#include "pxaLcd2.h"
++#include "pxaMacro2.h"
++.macro DEFINE_SCREEN_WIDTH xres,xsyncWidth,xbegin,xend, yres,ysyncWidth,ybegin,yend, enable,unscramble,rotate,active,bpp,clkdiv,type
++ .ifdef __ARMASM
++ GBLA SCREEN_WIDTH
++ .endif
++ .set SCREEN_WIDTH,\xres
++.endm
++
++.macro DEFINE_SCREEN_HEIGHT xres,xsyncWidth,xbegin,xend, yres,ysyncWidth,ybegin,yend, enable,unscramble,rotate,active,bpp,clkdiv,type
++ .ifdef __ARMASM
++ GBLA SCREEN_HEIGHT
++ .endif
++ .set SCREEN_HEIGHT,\yres
++.endm
++
++ DEFINE_SCREEN_WIDTH DEF_P
++ DEFINE_SCREEN_HEIGHT DEF_P
++
++.macro CR0_INIT_VAL reg,xres,xsyncWidth,xbegin,xend, yres,ysyncWidth,ybegin,yend, enable,unscramble,rotate,active,bpp,clkdiv,type
++ BigMov \reg,(\enable<<CR0_ENABLE)+(1<<CR0_IM_DISABLE_DONE)+(1<<CR0_IM_START_OF_FRAME)+\
++ (1<<CR0_IM_INPUT_FIFO_UNDERRUN)+(1<<CR0_IM_END_OF_FRAME)+(\active<<CR0_ACTIVE_SELECT)+\
++ (1<<CR0_IM_LCD_QUICK_DISABLE)+(1<<CR0_IM_BRANCH)+(1<<CR0_IM_OUTPUT_FIFO_UNDERRUN)
++.endm
++
++.macro CR1_INIT_VAL reg,xres,xsyncWidth,xbegin,xend, yres,ysyncWidth,ybegin,yend, enable,unscramble,rotate,active,bpp,clkdiv,type
++ BigMov \reg,((\xres-1)<<CR1_PIXELS_PER_LINE)+((\xsyncWidth-1)<<CR1_HORIZONTAL_SYNC_PULSE_WIDTH)+\
++ ((\xend-1)<<CR1_END_OF_LINE_WAIT)+((\xbegin-1)<<CR1_BEGINNING_OF_LINE_WAIT)
++.endm
++
++.macro CR2_INIT_VAL reg,xres,xsyncWidth,xbegin,xend, yres,ysyncWidth,ybegin,yend, enable,unscramble,rotate,active,bpp,clkdiv,type
++ BigMov \reg,((\yres-1)<<CR2_LINES_PER_PANEL)+((\ysyncWidth-1)<<CR2_VERTICAL_SYNC_PULSE_WIDTH)+\
++ (\yend<<CR2_END_OF_FRAME_WAIT)+(\ybegin<<CR2_BEGINNING_OF_FRAME_WAIT)
++.endm
++
++.macro CR3_INIT_VAL reg,xres,xsyncWidth,xbegin,xend, yres,ysyncWidth,ybegin,yend, enable,unscramble,rotate,active,bpp,clkdiv,type
++//LCD Clock is same as memory clock
++ BigMov \reg,(\clkdiv<<CR3_PCLK_DIVISOR)+((256-1)<<CR3_ACBIAS_TOGGLE)+\
++ (0<<CR3_API)+(0<<CR3_FCLK_POLARITY)+(0<<CR3_LCLK_POLARITY)+\
++ (1<<CR3_PCLK_POLARITY)+(0<<CR3_BIAS_POLARITY)+\
++ (BPP_FORMAT<<CR3_BITS_PER_PIXEL)+(0<<CR3_DOUBLE_PCLK)+(PDFOR<<CR3_PDFOR)
++.endm
++
++#define TMEDS_INIT_VAL (0xaa<<TMEDS_BLUE)+(0x55<<TMEDS_GREEN)+(0x00<<TMEDS_RED)
++#define TMEDC_INIT_VAL (1<<TMEDC_MATRIX2_SELECT)+(3<<TMEDC_RESERVED)+(5<<TMEDC_HORIZONTAL_BEAT_SUPPRESSION)+(4<<TMEDC_VERTICAL_BEAT_SUPPRESSION)+(1<<TMEDC_FRAME_NUMBER_ADJUST_EN)+(1<<TMEDC_COLOR_OFFSET_ADJUST_EN)+(1<<TMEDC_FRAME_NUMBER_ADJUST_MATRIX2)+(1<<TMEDC_COLOR_OFFSET_ADJUST_MATRIX2)
++
++
++.macro InitLCD rBase,rTemp,rDescript
++
++ BigMov \rBase,LCD_CONTROL_BASE
++
++ CR1_INIT_VAL \rTemp,DEF_P
++ str \rTemp,[\rBase,#LCD_CR1]
++
++ CR2_INIT_VAL \rTemp,DEF_P
++ str \rTemp,[\rBase,#LCD_CR2]
++
++ CR3_INIT_VAL \rTemp,DEF_P
++ str \rTemp,[\rBase,#LCD_CR3]
++
++ BigMov \rTemp,0
++ str \rTemp,[\rBase,#LCD_FBR0]
++ str \rTemp,[\rBase,#LCD_FBR1]
++
++ BigMov \rTemp,TMEDS_INIT_VAL
++ str \rTemp,[\rBase,#LCD_TMEDS]
++ BigMov \rTemp,TMEDC_INIT_VAL
++ str \rTemp,[\rBase,#LCD_TMEDC]
++
++ str \rDescript,[\rBase,#LCD_FDADR0]
++
++ CR0_INIT_VAL \rTemp,DEF_P
++ str \rTemp,[\rBase,#LCD_CR0]
++.endm
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxaMacro.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaMacro.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxaMacro.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxaMacro.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,343 @@
++#include "pxa250Base.h"
++#include "pxaHardware.h"
++#include "BigMacro.h"
++ .nolist
++
++//CP14 registers
++.macro CP14_PMNC ins,rx
++ \ins p14,0,\rx,c0,c0,0
++.endm
++.macro CP14_CCNT ins,rx
++ \ins p14,0,\rx,c1,c0,0
++.endm
++.macro CP14_PMN0 ins,rx
++ \ins p14,0,\rx,c2,c0,0
++.endm
++.macro CP14_PMN1 ins,rx
++ \ins p14,0,\rx,c3,c0,0
++.endm
++.macro CP14_CCLKCFG ins,rx
++ \ins p14,0,\rx,c6,c0,0
++.endm
++.macro CP14_PWRMODE ins,rx
++ \ins p14,0,\rx,c7,c0,0
++.endm
++.macro CP14_TX ins,rx
++ \ins p14,0,\rx,c8,c0,0
++.endm
++.macro CP14_RX ins,rx
++ \ins p14,0,\rx,c9,c0,0
++.endm
++.macro CP14_DCSR ins,rx
++ \ins p14,0,\rx,c10,c0,0 //debug control and status register
++.endm
++.macro CP14_TBREG ins,rx
++ \ins p14,0,\rx,c11,c0,0 //trace buffer register
++.endm
++.macro CP14_CHKPT0 ins,rx
++ \ins p14,0,\rx,c12,c0,0 //checkpoint register 0
++.endm
++.macro CP14_CHKPT1 ins,rx
++ \ins p14,0,\rx,c13,c0,0 //checkpoint register 1
++.endm
++.macro CP14_TXRXCTRL ins,rx
++ \ins p14,0,\rx,c14,c0,0
++.endm
++
++
++//CP15 registers
++.macro CP15_ID ins,rx
++ \ins p15,0,\rx,c0,c0,0
++.endm
++.macro CP15_CACHETYPE ins,rx
++ \ins p15,0,\rx,c0,c0,1
++.endm
++.macro CP15_CONTROL ins,rx
++ \ins p15,0,\rx,c1,c0,0
++.endm
++.macro CP15_AUXCONTROL ins,rx
++ \ins p15,0,\rx,c1,c0,1
++.endm
++.macro CP15_TTBR ins,rx
++ \ins p15,0,\rx,c2,c0,0 //translation table base
++.endm
++.macro CP15_DACR ins,rx
++ \ins p15,0,\rx,c3,c0,0 //domain access control register
++.endm
++.macro CP15_FSR ins,rx
++ \ins p15,0,\rx,c5,c0,0 //fault status register
++.endm
++.macro CP15_FAR ins,rx
++ \ins p15,0,\rx,c6,c0,0 //fault address register
++.endm
++
++.macro CP15_CF_ALLOC_LINE ins,rx
++ \ins p15,0,\rx,c7,c2,5 //allocate line in data cache
++.endm
++.macro CP15_CF_INVAL_I ins,rx
++ \ins p15,0,\rx,c7,c5,0 //invalidate instruction cache
++.endm
++.macro CP15_CF_INVAL_ILINE ins,rx
++ \ins p15,0,\rx,c7,c5,1
++.endm
++.macro CP15_CF_INVAL_BTB ins,rx
++ \ins p15,0,\rx,c7,c5,6 //invalidate Branch target buffer
++.endm
++.macro CP15_CF_INVAL_D ins,rx
++ \ins p15,0,\rx,c7,c6,0
++.endm
++.macro CP15_CF_INVAL_DLINE ins,rx
++ \ins p15,0,\rx,c7,c6,1
++.endm
++.macro CP15_CF_INVAL_BOTH ins,rx
++ \ins p15,0,\rx,c7,c7,0 //invalidate instruction & data cache & BTB
++.endm
++.macro CP15_CF_CLEAN_DLINE ins,rx
++ \ins p15,0,\rx,c7,c10,1
++.endm
++.macro CP15_CF_DRAIN ins,rx
++ \ins p15,0,\rx,c7,c10,4
++.endm
++
++.macro CP15_TLB_INVAL_I ins,rx
++ \ins p15,0,\rx,c8,c5,0
++.endm
++.macro CP15_TLB_INVAL_IENTRY ins,rx
++ \ins p15,0,\rx,c8,c5,1
++.endm
++.macro CP15_TLB_INVAL_D ins,rx
++ \ins p15,0,\rx,c8,c6,0
++.endm
++.macro CP15_TLB_INVAL_DENTRY ins,rx
++ \ins p15,0,\rx,c8,c6,1
++.endm
++.macro CP15_TLB_INVAL_BOTH ins,rx
++ \ins p15,0,\rx,c8,c7,0
++.endm
++
++.macro CP15_CF_LOCK_ILINE ins,rx
++ \ins p15,0,\rx,c9,c1,0 //mva to fetch and lock
++.endm
++.macro CP15_CF_UNLOCK_I ins,rx
++ \ins p15,0,\rx,c9,c1,1 //unlock all lines
++.endm
++.macro CP15_CF_LOCK_D_CSR ins,rx
++ \ins p15,0,\rx,c9,c2,0
++.endm
++.macro CP15_CF_UNLOCK_D ins,rx
++ \ins p15,0,\rx,c9,c2,1 //unlock all lines in data cache
++.endm
++
++.macro CP15_TLB_LOCK_IENTRY ins,rx
++ \ins p15,0,\rx,c10,c4,0
++.endm
++.macro CP15_TLB_UNLOCK_I ins,rx
++ \ins p15,0,\rx,c10,c4,1
++.endm
++.macro CP15_TLB_LOCK_DENTRY ins,rx
++ \ins p15,0,\rx,c10,c8,0
++.endm
++.macro CP15_TLB_UNLOCK_D ins,rx
++ \ins p15,0,\rx,c10,c8,1
++.endm
++
++.macro CP15_PID ins,rx
++ \ins p15,0,\rx,c13,c0,0
++.endm
++
++.macro CP15_DBR0 ins,rx
++ \ins p15,0,\rx,c14,c0,0 //Data Breakpoint address register 0
++.endm
++.macro CP15_DBR1 ins,rx
++ \ins p15,0,\rx,c14,c3,0 //Data Breakpoint address/mask register 1
++.endm
++.macro CP15_DBCON ins,rx
++ \ins p15,0,\rx,c14,c4,0 //Data Breakpoint control register
++.endm
++.macro CP15_IBCR0 ins,rx
++ \ins p15,0,\rx,c14,c8,0 //Instruction Breakpoint Control Register 0
++.endm
++.macro CP15_IBCR1 ins,rx
++ \ins p15,0,\rx,c14,c9,0 //Instruction Breakpoint Control Register 1
++.endm
++
++.macro CP15_CP_ACCESS ins,rx
++ \ins p15,0,\rx,c15,c1,0 //Coprocessor access register, set bit n to enable access to coprocessor n
++.endm
++
++
++.macro CPWAIT dest
++ CP15_ID mrc,\dest //read some register in CP15
++ mov \dest,\dest //wait for the read to complete
++ sub pc,pc,#4 //branch to the next instruction, flushing the instruction pipeline
++.endm
++
++// *******************************************************************************************
++// *******************************************************************************************
++// *******************************************************************************************
++// *******************************************************************************************
++// *******************************************************************************************
++// ************************************************************************************************
++// *******************************************************************************************
++// *******************************************************************************************
++// *******************************************************************************************
++
++#define numColumnAddrBits 9
++#define numBankAddrBits 2
++#define ClkSelect 1 //0 : tRP = 2, tRCD = 1, tRAS = 3, tRC = 4
++ //1 : tRP = 2, tRCD = 2, tRAS = 5, tRC = 8
++ //2 : tRP = 3, tRCD = 3, tRAS = 7, tRC = 10
++ //3 : tRP = 3, tRCD = 3, tRAS = 7, tRC = 11
++//64 meg option
++#define M64_numRowAddrBits 13 //for k4s561632a
++#define M64_SA1111_mask 0 //(1<<12)
++#define M64_DRI_cnt (((99530*64)>>M64_numRowAddrBits)>>5) //(# of cycles/ms * # of ms for entire refresh period)/ # of rows/refresh period /32
++#define M64_MDCNFG_VAL 1+((numColumnAddrBits-8)<<3)+((M64_numRowAddrBits-11)<<5)+((numBankAddrBits-1)<<7)+(ClkSelect<<8)+(1<<11)+(M64_SA1111_mask) //DLATCH0, latch return data with return clock
++#define M64_MDREFR_VAL (1<<16)+(1<<15)+(M64_DRI_cnt&0xfff) //don't set bit 20: APD (buggy), bit 16: K1RUN, 15:E1PIN
++//#define M64_MDREFR_VAL (1<<20)+(1<<16)+(1<<15)+(M64_DRI_cnt&0xfff) //20: APD, bit 16: K1RUN, 15:E1PIN
++// 13 9 2 2 (4bytes per address)=2**26=64 MB
++#define M64_MEM_SIZE (1<<(M64_numRowAddrBits+numColumnAddrBits+numBankAddrBits+2))
++#define M64_MEM_END ((MEM_START)+M64_MEM_SIZE)
++
++//32 meg option
++#define M32_numRowAddrBits 12 //for MT48LC8M16A2 - 75 B
++#define M32_SA1111_mask 0
++#define M32_DRI_cnt (((99530*64)>>M32_numRowAddrBits)>>5) //(# of cycles/ms * # of ms for entire refresh period)/ # of rows/refresh period /32
++#define M32_MDCNFG_VAL 1+((numColumnAddrBits-8)<<3)+((M32_numRowAddrBits-11)<<5)+((numBankAddrBits-1)<<7)+(ClkSelect<<8)+(1<<11)+(M32_SA1111_mask) //DLATCH0, latch return data with return clock
++#define M32_MDREFR_VAL (1<<16)+(1<<15)+(M32_DRI_cnt&0xfff) //don't set bit 20: APD (buggy), bit 16: K1RUN, 15:E1PIN
++// 12 9 2 2 (4bytes per address)=2**25=32 MB
++#define M32_MEM_SIZE (1<<(M32_numRowAddrBits+numColumnAddrBits+numBankAddrBits+2))
++#define M32_MEM_END ((MEM_START)+M32_MEM_SIZE)
++// *******************************************************************************************
++//out: rTemp - memory size
++.macro CalcMemSize rBase,rTemp,mem_control_base
++ BigMov \rBase,\mem_control_base
++ ldr \rTemp,[\rBase,#MDCNFG]
++ movs \rTemp,\rTemp,LSR #2+1 //bit 2 - 1 means 16 bit mode, 0 means 32 bit mode, mov to carry flag
++ tst \rTemp,#1<<(5-3) //is number of row address bits 12 or 13 ?
++ moveq \rTemp,#M64_MEM_SIZE
++ movne \rTemp,#M32_MEM_SIZE
++ movcs \rTemp,\rTemp,LSR #1 //half as much if 16 bit mode
++.endm
++
++
++#define CH_NULL 0x00
++#define CH_BACKSPACE 0x08
++#define CH_LF 0x0a
++#define CH_CR 0x0d
++#define CH_CAN 0x18
++#define CH_SPACE 0x20 //" "
++#define CH_EXCLAMATION 0x21 //!
++#define CH_DQUOTE 0x22 //"
++#define CH_POUND 0x23 //#
++#define CH_DOLLAR 0x24 //$
++#define CH_PERCENT 0x25 //%
++#define CH_AMPERSAND 0x26 //&
++#define CH_SQUOTE 0x27 //'
++#define CH_OPEN_PAREN 0x28 //(
++#define CH_CLOSE_PAREN 0x29 //)
++#define CH_ASTERISK 0x2a //*
++#define CH_PLUS 0x2b //+
++#define CH_COMMA 0x2c //,
++#define CH_HYPHEN 0x2d //-
++#define CH_MINUS 0x2d //-
++#define CH_PERIOD 0x2e //.
++#define CH_FSLASH 0x2f // /
++#define CH_0 0x30
++#define CH_1 0x31
++#define CH_2 0x32
++#define CH_3 0x33
++#define CH_4 0x34
++#define CH_5 0x35
++#define CH_6 0x36
++#define CH_7 0x37
++#define CH_8 0x38
++#define CH_9 0x39
++#define CH_COLON 0x3a //:
++#define CH_SEMICOLON 0x3b //;
++#define CH_LESS_THAN 0x3c //<
++#define CH_EQUAL 0x3d //=
++#define CH_GREATER_THAN 0x3e //>
++#define CH_QUESTION_MARK 0x3f //?
++#define CH_AT_SIGN 0x40 //@
++
++#define CH_A 0x41
++#define CH_B 0x42
++#define CH_C 0x43
++#define CH_D 0x44
++#define CH_E 0x45
++#define CH_F 0x46
++#define CH_G 0x47
++#define CH_H 0x48
++#define CH_I 0x49
++#define CH_J 0x4a
++#define CH_K 0x4b
++#define CH_L 0x4c
++#define CH_M 0x4d
++#define CH_N 0x4e
++#define CH_O 0x4f
++#define CH_P 0x50
++#define CH_Q 0x51
++#define CH_R 0x52
++#define CH_S 0x53
++#define CH_T 0x54
++#define CH_U 0x55
++#define CH_V 0x56
++#define CH_W 0x57
++#define CH_X 0x58
++#define CH_Y 0x59
++#define CH_Z 0x5a
++#define CH_OPEN_SQUARE 0x5b //[
++#define CH_BSLASH 0x5c //\..
++#define CH_CLOSE_SQUARE 0x5d //]
++#define CH_CARET 0x5e //^
++#define CH__ 0x5f //_
++#define CH_OPEN_SQUOTE 0x60 //`
++
++#define CH_a 0x61
++#define CH_b 0x62
++#define CH_c 0x63
++#define CH_d 0x64
++#define CH_e 0x65
++#define CH_f 0x66
++#define CH_g 0x67
++#define CH_h 0x68
++#define CH_i 0x69
++#define CH_j 0x6a
++#define CH_k 0x6b
++#define CH_l 0x6c
++#define CH_m 0x6d
++#define CH_n 0x6e
++#define CH_o 0x6f
++#define CH_p 0x70
++#define CH_q 0x71
++#define CH_r 0x72
++#define CH_s 0x73
++#define CH_t 0x74
++#define CH_u 0x75
++#define CH_v 0x76
++#define CH_w 0x77
++#define CH_x 0x78
++#define CH_y 0x79
++#define CH_z 0x7a
++#define CH_OPEN_CURLY 0x7b //{
++#define CH_VERTICAL_BAR 0x7c //|
++#define CH_CLOSE_CURLY 0x7d //}
++#define CH_TILDE 0x7e //~
++#define CH_DELETE 0x7f
++
++
++.macro STARTUPTEXT
++ GBLS AreaName
++ AREA |.astart|,ALIGN=2,CODE
++AreaName SETS "|.astart|"
++.endm
++
++.macro DUP count,val
++ LCLA cnt
++cnt SETA $count
++ WHILE ( cnt<>0)
++ DCD $val
++cnt SETA cnt-1
++ WEND
++.endm
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/arch-pxa/pxa-regs.h u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxa-regs.h
+--- u-boot-1.1.2/include/asm-arm/arch-pxa/pxa-regs.h 2003-06-27 23:32:42.000000000 +0200
++++ u-boot-1.1.2-neon/include/asm-arm/arch-pxa/pxa-regs.h 2007-08-11 21:07:21.000000000 +0200
+@@ -107,6 +107,17 @@
+ #define DCSR_RUN (1 << 31) /* Run Bit (read / write) */
+ #define DCSR_NODESC (1 << 30) /* No-Descriptor Fetch (read / write) */
+ #define DCSR_STOPIRQEN (1 << 29) /* Stop Interrupt Enable (read / write) */
++
++#if defined(CONFIG_PXA27X)
++#define DCSR_EORIRQEN (1 << 28) /* End of Receive Interrupt Enable (R/W) */
++#define DCSR_EORJMPEN (1 << 27) /* Jump to next descriptor on EOR */
++#define DCSR_EORSTOPEN (1 << 26) /* STOP on an EOR */
++#define DCSR_SETCMPST (1 << 25) /* Set Descriptor Compare Status */
++#define DCSR_CLRCMPST (1 << 24) /* Clear Descriptor Compare Status */
++#define DCSR_CMPST (1 << 10) /* The Descriptor Compare Status */
++#define DCSR_ENRINTR (1 << 9) /* The end of Receive */
++#endif
++
+ #define DCSR_REQPEND (1 << 8) /* Request Pending (read-only) */
+ #define DCSR_STOPSTATE (1 << 3) /* Stop State (read-only) */
+ #define DCSR_ENDINTR (1 << 2) /* End Interrupt (read / write) */
+@@ -156,6 +167,10 @@
+ #define DRCMR38 __REG(0x40000198) /* Request to Channel Map Register for USB endpoint 14 Request */
+ #define DRCMR39 __REG(0x4000019C) /* Reserved */
+
++#define DRCMR68 __REG(0x40001110) /* Request to Channel Map Register for Camera FIFO 0 Request */
++#define DRCMR69 __REG(0x40001114) /* Request to Channel Map Register for Camera FIFO 1 Request */
++#define DRCMR70 __REG(0x40001118) /* Request to Channel Map Register for Camera FIFO 2 Request */
++
+ #define DRCMRRXSADR DRCMR2
+ #define DRCMRTXSADR DRCMR3
+ #define DRCMRRXBTRBR DRCMR4
+@@ -424,6 +439,12 @@
+ #define ISR __REG(0x40301698) /* I2C Status Register - ISR */
+ #define ISAR __REG(0x403016A0) /* I2C Slave Address Register - ISAR */
+
++#define PWRIBMR __REG(0x40f00180) /* Power I2C Bus Monitor Register-IBMR */
++#define PWRIDBR __REG(0x40f00188) /* Power I2C Data Buffer Register-IDBR */
++#define PWRICR __REG(0x40f00190) /* Power I2C Control Register - ICR */
++#define PWRISR __REG(0x40f00198) /* Power I2C Status Register - ISR */
++#define PWRISAR __REG(0x40f001A0) /* Power I2C Slave Address Register-ISAR */
++
+ /* ----- Control register bits ---------------------------------------- */
+
+ #define ICR_START 0x1 /* start bit */
+@@ -460,11 +481,9 @@
+ /*
+ * Serial Audio Controller
+ */
+-
+-
+ /* FIXME the audio defines collide w/ the SA1111 defines. I don't like these
+- * short defines because there is too much chance of namespace collision */
+-
++ * short defines because there is too much chance of namespace collision
++ */
+ /*#define SACR0 __REG(0x40400000) / Global Control Register */
+ /*#define SACR1 __REG(0x40400004) / Serial Audio I 2 S/MSB-Justified Control Register */
+ /*#define SASR0 __REG(0x4040000C) / Serial Audio I 2 S/MSB-Justified Interface and FIFO Status Register */
+@@ -711,10 +730,68 @@
+ #define USIR1_IR15 (1 << 7) /* Interrup request ep 15 */
+
+
++#if defined(CONFIG_PXA27X)
+ /*
+- * Fast Infrared Communication Port
++ * USB Host Controller
+ */
++#define USBH_BASE 0x4C000000
++#define UHCREV __REG(0x4C000000)
++#define UHCHCON __REG(0x4C000004)
++#define UHCCOMS __REG(0x4C000008)
++#define UHCINTS __REG(0x4C00000C)
++#define UHCINTE __REG(0x4C000010)
++#define UHCINTD __REG(0x4C000014)
++#define UHCHCCA __REG(0x4C000018)
++#define UHCPCED __REG(0x4C00001C)
++#define UHCCHED __REG(0x4C000020)
++#define UHCCCED __REG(0x4C000024)
++#define UHCBHED __REG(0x4C000028)
++#define UHCBCED __REG(0x4C00002C)
++#define UHCDHEAD __REG(0x4C000030)
++#define UHCFMI __REG(0x4C000034)
++#define UHCFMR __REG(0x4C000038)
++#define UHCFMN __REG(0x4C00003C)
++#define UHCPERS __REG(0x4C000040)
++#define UHCLST __REG(0x4C000044)
++#define UHCRHDA __REG(0x4C000048)
++#define UHCRHDB __REG(0x4C00004C)
++#define UHCRHS __REG(0x4C000050)
++#define UHCRHPS1 __REG(0x4C000054)
++#define UHCRHPS2 __REG(0x4C000058)
++#define UHCRHPS3 __REG(0x4C00005C)
++#define UHCSTAT __REG(0x4C000060)
++#define UHCHR __REG(0x4C000064)
++#define UHCHIE __REG(0x4C000068)
++#define UHCHIT __REG(0x4C00006C)
++
++#define UHCHR_FSBIR (1<<0)
++#define UHCHR_FHR (1<<1)
++#define UHCHR_CGR (1<<2)
++#define UHCHR_SSDC (1<<3)
++#define UHCHR_UIT (1<<4)
++#define UHCHR_SSE (1<<5)
++#define UHCHR_PSPL (1<<6)
++#define UHCHR_PCPL (1<<7)
++#define UHCHR_SSEP0 (1<<9)
++#define UHCHR_SSEP1 (1<<10)
++#define UHCHR_SSEP2 (1<<11)
++
++#define UHCHIE_UPRIE (1<<13)
++#define UHCHIE_UPS2IE (1<<12)
++#define UHCHIE_UPS1IE (1<<11)
++#define UHCHIE_TAIE (1<<10)
++#define UHCHIE_HBAIE (1<<8)
++#define UHCHIE_RWIE (1<<7)
++
++#define UHCCOMS_HCR 1
++#define UHCRHS_LPS 1
++#define UHCHR_SSE (1<<5)
++
++#endif
+
++/*
++ * Fast Infrared Communication Port
++ */
+ #define ICCR0 __REG(0x40800000) /* ICP Control Register 0 */
+ #define ICCR1 __REG(0x40800004) /* ICP Control Register 1 */
+ #define ICCR2 __REG(0x40800008) /* ICP Control Register 2 */
+@@ -731,7 +808,21 @@
+ #define RTAR __REG(0x40900004) /* RTC Alarm Register */
+ #define RTSR __REG(0x40900008) /* RTC Status Register */
+ #define RTTR __REG(0x4090000C) /* RTC Timer Trim Register */
+-
++#define RDAR1 __REG(0x40900018) /* Wristwatch Day Alarm Reg 1 */
++#define RDAR2 __REG(0x40900020) /* Wristwatch Day Alarm Reg 2 */
++#define RYAR1 __REG(0x4090001C) /* Wristwatch Year Alarm Reg 1 */
++#define RYAR2 __REG(0x40900024) /* Wristwatch Year Alarm Reg 2 */
++#define SWAR1 __REG(0x4090002C) /* Stopwatch Alarm Register 1 */
++#define SWAR2 __REG(0x40900030) /* Stopwatch Alarm Register 2 */
++#define PIAR __REG(0x40900038) /* Periodic Interrupt Alarm Register */
++#define RDCR __REG(0x40900010) /* RTC Day Count Register. */
++#define RYCR __REG(0x40900014) /* RTC Year Count Register. */
++#define SWCR __REG(0x40900028) /* Stopwatch Count Register */
++#define RTCPICR __REG(0x40900034) /* Periodic Interrupt Counter Register */
++
++#define RTSR_PICE (1 << 15) /* Peridoc interrupt count enable */
++#define RTSR_PIALE (1 << 14) /* Peridoc interrupt Alarm enable */
++#define RTSR_PIAL (1 << 13) /* Peridoc interrupt Alarm status */
+ #define RTSR_HZE (1 << 3) /* HZ interrupt enable */
+ #define RTSR_ALE (1 << 2) /* RTC alarm interrupt enable */
+ #define RTSR_HZ (1 << 1) /* HZ rising-edge detected */
+@@ -831,6 +922,37 @@
+ /* More handy macros. The argument is a literal GPIO number. */
+
+ #define GPIO_bit(x) (1 << ((x) & 0x1f))
++
++#ifdef CONFIG_PXA27X
++
++/* Interrupt Controller */
++
++#define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */
++#define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */
++#define ICLR2 __REG(0x40D000A4) /* Interrupt Controller Level Register 2 */
++#define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */
++#define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */
++
++#define _GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3)
++#define _GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3)
++#define _GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3)
++#define _GPCR(x) __REG2(0x40E00024, ((x) & 0x60) >> 3)
++#define _GRER(x) __REG2(0x40E00030, ((x) & 0x60) >> 3)
++#define _GFER(x) __REG2(0x40E0003C, ((x) & 0x60) >> 3)
++#define _GEDR(x) __REG2(0x40E00048, ((x) & 0x60) >> 3)
++#define _GAFR(x) __REG2(0x40E00054, ((x) & 0x70) >> 2)
++
++#define GPLR(x) ((((x) & 0x7f) < 96) ? _GPLR(x) : GPLR3)
++#define GPDR(x) ((((x) & 0x7f) < 96) ? _GPDR(x) : GPDR3)
++#define GPSR(x) ((((x) & 0x7f) < 96) ? _GPSR(x) : GPSR3)
++#define GPCR(x) ((((x) & 0x7f) < 96) ? _GPCR(x) : GPCR3)
++#define GRER(x) ((((x) & 0x7f) < 96) ? _GRER(x) : GRER3)
++#define GFER(x) ((((x) & 0x7f) < 96) ? _GFER(x) : GFER3)
++#define GEDR(x) ((((x) & 0x7f) < 96) ? _GEDR(x) : GEDR3)
++#define GAFR(x) ((((x) & 0x7f) < 96) ? _GAFR(x) : \
++ ((((x) & 0x7f) < 112) ? GAFR3_L : GAFR3_U))
++#else
++
+ #define GPLR(x) __REG2(0x40E00000, ((x) & 0x60) >> 3)
+ #define GPDR(x) __REG2(0x40E0000C, ((x) & 0x60) >> 3)
+ #define GPSR(x) __REG2(0x40E00018, ((x) & 0x60) >> 3)
+@@ -840,6 +962,8 @@
+ #define GEDR(x) __REG2(0x40E00048, ((x) & 0x60) >> 3)
+ #define GAFR(x) __REG2(0x40E00054, ((x) & 0x70) >> 2)
+
++#endif
++
+ /* GPIO alternate function assignments */
+
+ #define GPIO1_RST 1 /* reset */
+@@ -1038,6 +1162,8 @@
+ #define GPIO79_nCS_3_MD (79 | GPIO_ALT_FN_2_OUT)
+ #define GPIO80_nCS_4_MD (80 | GPIO_ALT_FN_2_OUT)
+
++#define GPIO117_SCL (117 | GPIO_ALT_FN_1_OUT)
++#define GPIO118_SDA (118 | GPIO_ALT_FN_1_OUT)
+
+ /*
+ * Power Manager
+@@ -1054,8 +1180,62 @@
+ #define PGSR0 __REG(0x40F00020) /* Power Manager GPIO Sleep State Register for GP[31-0] */
+ #define PGSR1 __REG(0x40F00024) /* Power Manager GPIO Sleep State Register for GP[63-32] */
+ #define PGSR2 __REG(0x40F00028) /* Power Manager GPIO Sleep State Register for GP[84-64] */
++#define PGSR3 __REG(0x40F0002C) /* Power Manager GPIO Sleep State Register for GP[118-96] */
+ #define RCSR __REG(0x40F00030) /* Reset Controller Status Register */
+
++#define PSLR __REG(0x40F00034) /* Power Manager Sleep Config Register */
++#define PSTR __REG(0x40F00038) /* Power Manager Standby Config Register */
++#define PSNR __REG(0x40F0003C) /* Power Manager Sense Config Register */
++#define PVCR __REG(0x40F00040) /* Power Manager VoltageControl Register */
++#define PKWR __REG(0x40F00050) /* Power Manager KB Wake-up Enable Reg */
++#define PKSR __REG(0x40F00054) /* Power Manager KB Level-Detect Register */
++#define PCMD(x) __REG(0x40F00080 + x*4)
++#define PCMD0 __REG(0x40F00080 + 0 * 4)
++#define PCMD1 __REG(0x40F00080 + 1 * 4)
++#define PCMD2 __REG(0x40F00080 + 2 * 4)
++#define PCMD3 __REG(0x40F00080 + 3 * 4)
++#define PCMD4 __REG(0x40F00080 + 4 * 4)
++#define PCMD5 __REG(0x40F00080 + 5 * 4)
++#define PCMD6 __REG(0x40F00080 + 6 * 4)
++#define PCMD7 __REG(0x40F00080 + 7 * 4)
++#define PCMD8 __REG(0x40F00080 + 8 * 4)
++#define PCMD9 __REG(0x40F00080 + 9 * 4)
++#define PCMD10 __REG(0x40F00080 + 10 * 4)
++#define PCMD11 __REG(0x40F00080 + 11 * 4)
++#define PCMD12 __REG(0x40F00080 + 12 * 4)
++#define PCMD13 __REG(0x40F00080 + 13 * 4)
++#define PCMD14 __REG(0x40F00080 + 14 * 4)
++#define PCMD15 __REG(0x40F00080 + 15 * 4)
++#define PCMD16 __REG(0x40F00080 + 16 * 4)
++#define PCMD17 __REG(0x40F00080 + 17 * 4)
++#define PCMD18 __REG(0x40F00080 + 18 * 4)
++#define PCMD19 __REG(0x40F00080 + 19 * 4)
++#define PCMD20 __REG(0x40F00080 + 20 * 4)
++#define PCMD21 __REG(0x40F00080 + 21 * 4)
++#define PCMD22 __REG(0x40F00080 + 22 * 4)
++#define PCMD23 __REG(0x40F00080 + 23 * 4)
++#define PCMD24 __REG(0x40F00080 + 24 * 4)
++#define PCMD25 __REG(0x40F00080 + 25 * 4)
++#define PCMD26 __REG(0x40F00080 + 26 * 4)
++#define PCMD27 __REG(0x40F00080 + 27 * 4)
++#define PCMD28 __REG(0x40F00080 + 28 * 4)
++#define PCMD29 __REG(0x40F00080 + 29 * 4)
++#define PCMD30 __REG(0x40F00080 + 30 * 4)
++#define PCMD31 __REG(0x40F00080 + 31 * 4)
++
++#define PCMD_MBC (1<<12)
++#define PCMD_DCE (1<<11)
++#define PCMD_LC (1<<10)
++/* FIXME: PCMD_SQC need be checked. */
++#define PCMD_SQC (3<<8) /* currently only bit 8 is changerable, */
++ /* bit 9 should be 0 all day. */
++#define PVCR_VCSA (0x1<<14)
++#define PVCR_CommandDelay (0xf80)
++/* define MACRO for Power Manager General Configuration Register (PCFR) */
++#define PCFR_FVC (0x1 << 10)
++#define PCFR_PI2C_EN (0x1 << 6)
++
++#define PSSR_OTGPH (1 << 6) /* OTG Peripheral control Hold */
+ #define PSSR_RDH (1 << 5) /* Read Disable Hold */
+ #define PSSR_PH (1 << 4) /* Peripheral Control Hold */
+ #define PSSR_VFS (1 << 2) /* VDD Fault Status */
+@@ -1117,14 +1297,29 @@
+ #define OSCC __REG(0x41300008) /* Oscillator Configuration Register */
+
+ #define CCCR_N_MASK 0x0380 /* Run Mode Frequency to Turbo Mode Frequency Multiplier */
++#if !defined(CONFIG_PXA27X)
+ #define CCCR_M_MASK 0x0060 /* Memory Frequency to Run Mode Frequency Multiplier */
++#endif
+ #define CCCR_L_MASK 0x001f /* Crystal Frequency to Memory Frequency Multiplier */
+
++#define CKEN24_CAMERA (1 << 24) /* Camera Interface Clock Enable */
++#define CKEN23_SSP1 (1 << 23) /* SSP1 Unit Clock Enable */
++#define CKEN22_MEMC (1 << 22) /* Memory Controller Clock Enable */
++#define CKEN21_MEMSTK (1 << 21) /* Memory Stick Host Controller */
++#define CKEN20_IM (1 << 20) /* Internal Memory Clock Enable */
++#define CKEN19_KEYPAD (1 << 19) /* Keypad Interface Clock Enable */
++#define CKEN18_USIM (1 << 18) /* USIM Unit Clock Enable */
++#define CKEN17_MSL (1 << 17) /* MSL Unit Clock Enable */
+ #define CKEN16_LCD (1 << 16) /* LCD Unit Clock Enable */
++#define CKEN15_PWRI2C (1 << 15) /* PWR I2C Unit Clock Enable */
+ #define CKEN14_I2C (1 << 14) /* I2C Unit Clock Enable */
+ #define CKEN13_FICP (1 << 13) /* FICP Unit Clock Enable */
+ #define CKEN12_MMC (1 << 12) /* MMC Unit Clock Enable */
+ #define CKEN11_USB (1 << 11) /* USB Unit Clock Enable */
++#if defined(CONFIG_PXA27X)
++#define CKEN10_USBHOST (1 << 10) /* USB Host Unit Clock Enable */
++#define CKEN24_CAMERA (1 << 24) /* Camera Unit Clock Enable */
++#endif
+ #define CKEN8_I2S (1 << 8) /* I2S Unit Clock Enable */
+ #define CKEN7_BTUART (1 << 7) /* BTUART Unit Clock Enable */
+ #define CKEN6_FFUART (1 << 6) /* FFUART Unit Clock Enable */
+@@ -1137,6 +1332,7 @@
+ #define OSCC_OON (1 << 1) /* 32.768kHz OON (write-once only bit) */
+ #define OSCC_OOK (1 << 0) /* 32.768kHz OOK (read-only bit) */
+
++#if !defined(CONFIG_PXA27X)
+ #define CCCR_L09 (0x1F)
+ #define CCCR_L27 (0x1)
+ #define CCCR_L32 (0x2)
+@@ -1153,6 +1349,7 @@
+ #define CCCR_N20 (0x4 << 7)
+ #define CCCR_N25 (0x5 << 7)
+ #define CCCR_N30 (0x6 << 7)
++#endif
+
+ /*
+ * LCD
+@@ -1164,7 +1361,8 @@
+ #define LCCR3 __REG(0x4400000C) /* LCD Controller Control Register 3 */
+ #define DFBR0 __REG(0x44000020) /* DMA Channel 0 Frame Branch Register */
+ #define DFBR1 __REG(0x44000024) /* DMA Channel 1 Frame Branch Register */
+-#define LCSR __REG(0x44000038) /* LCD Controller Status Register */
++#define LCSR0 __REG(0x44000038) /* LCD Controller Status Register */
++#define LCSR1 __REG(0x44000034) /* LCD Controller Status Register */
+ #define LIIDR __REG(0x4400003C) /* LCD Controller Interrupt ID Register */
+ #define TMEDRGBR __REG(0x44000040) /* TMED RGB Seed Register */
+ #define TMEDCR __REG(0x44000044) /* TMED Control Register */
+@@ -1194,6 +1392,11 @@
+ #define LCCR0_PDD_S 12
+ #define LCCR0_BM (1 << 20) /* Branch mask */
+ #define LCCR0_OUM (1 << 21) /* Output FIFO underrun mask */
++#if defined(CONFIG_PXA27X)
++#define LCCR0_LCDT (1 << 22) /* LCD Panel Type */
++#define LCCR0_RDSTM (1 << 23) /* Read Status Interrupt Mask */
++#define LCCR0_CMDIM (1 << 24) /* Command Interrupt Mask */
++#endif
+
+ #define LCCR1_PPL Fld (10, 0) /* Pixels Per Line - 1 */
+ #define LCCR1_DisWdth(Pixel) /* Display Width [1..800 pix.] */ \
+@@ -1257,6 +1460,11 @@
+ #endif
+ #define LCCR3_DPC (1 << 27) /* double pixel clock mode */
+
++#define LCCR3_PDFOR_0 (0 << 30)
++#define LCCR3_PDFOR_1 (1 << 30)
++#define LCCR3_PDFOR_2 (2 << 30)
++#define LCCR3_PDFOR_3 (3 << 30)
++
+
+ #define LCCR3_PCD Fld (8, 0) /* Pixel Clock Divisor */
+ #define LCCR3_PixClkDiv(Div) /* Pixel Clock Divisor */ \
+@@ -1265,7 +1473,7 @@
+
+ #define LCCR3_BPP Fld (3, 24) /* Bit Per Pixel */
+ #define LCCR3_Bpp(Bpp) /* Bit Per Pixel */ \
+- (((Bpp) << FShft (LCCR3_BPP)))
++ ((((Bpp&0x7) << FShft (LCCR3_BPP)))|(((Bpp&0x8)<<26)))
+
+ #define LCCR3_ACB Fld (8, 8) /* AC Bias */
+ #define LCCR3_Acb(Acb) /* BAC Bias */ \
+@@ -1280,33 +1488,50 @@
+ #define LCCR3_VrtSnchL (LCCR3_VSP*1) /* Vertical Synchronization pulse */
+ /* active Low */
+
+-#define LCSR_LDD (1 << 0) /* LCD Disable Done */
+-#define LCSR_SOF (1 << 1) /* Start of frame */
+-#define LCSR_BER (1 << 2) /* Bus error */
+-#define LCSR_ABC (1 << 3) /* AC Bias count */
+-#define LCSR_IUL (1 << 4) /* input FIFO underrun Lower panel */
+-#define LCSR_IUU (1 << 5) /* input FIFO underrun Upper panel */
+-#define LCSR_OU (1 << 6) /* output FIFO underrun */
+-#define LCSR_QD (1 << 7) /* quick disable */
+-#define LCSR_EOF (1 << 8) /* end of frame */
+-#define LCSR_BS (1 << 9) /* branch status */
+-#define LCSR_SINT (1 << 10) /* subsequent interrupt */
+-
+-#define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */
+-
+-#define LCSR_LDD (1 << 0) /* LCD Disable Done */
+-#define LCSR_SOF (1 << 1) /* Start of frame */
+-#define LCSR_BER (1 << 2) /* Bus error */
+-#define LCSR_ABC (1 << 3) /* AC Bias count */
+-#define LCSR_IUL (1 << 4) /* input FIFO underrun Lower panel */
+-#define LCSR_IUU (1 << 5) /* input FIFO underrun Upper panel */
+-#define LCSR_OU (1 << 6) /* output FIFO underrun */
+-#define LCSR_QD (1 << 7) /* quick disable */
+-#define LCSR_EOF (1 << 8) /* end of frame */
+-#define LCSR_BS (1 << 9) /* branch status */
+-#define LCSR_SINT (1 << 10) /* subsequent interrupt */
++#define LCSR0_LDD (1 << 0) /* LCD Disable Done */
++#define LCSR0_SOF (1 << 1) /* Start of frame */
++#define LCSR0_BER (1 << 2) /* Bus error */
++#define LCSR0_ABC (1 << 3) /* AC Bias count */
++#define LCSR0_IUL (1 << 4) /* input FIFO underrun Lower panel */
++#define LCSR0_IUU (1 << 5) /* input FIFO underrun Upper panel */
++#define LCSR0_OU (1 << 6) /* output FIFO underrun */
++#define LCSR0_QD (1 << 7) /* quick disable */
++#define LCSR0_EOF0 (1 << 8) /* end of frame */
++#define LCSR0_BS (1 << 9) /* branch status */
++#define LCSR0_SINT (1 << 10) /* subsequent interrupt */
++
++#define LCSR1_SOF1 (1 << 0)
++#define LCSR1_SOF2 (1 << 1)
++#define LCSR1_SOF3 (1 << 2)
++#define LCSR1_SOF4 (1 << 3)
++#define LCSR1_SOF5 (1 << 4)
++#define LCSR1_SOF6 (1 << 5)
++
++#define LCSR1_EOF1 (1 << 8)
++#define LCSR1_EOF2 (1 << 9)
++#define LCSR1_EOF3 (1 << 10)
++#define LCSR1_EOF4 (1 << 11)
++#define LCSR1_EOF5 (1 << 12)
++#define LCSR1_EOF6 (1 << 13)
++
++#define LCSR1_BS1 (1 << 16)
++#define LCSR1_BS2 (1 << 17)
++#define LCSR1_BS3 (1 << 18)
++#define LCSR1_BS4 (1 << 19)
++#define LCSR1_BS5 (1 << 20)
++#define LCSR1_BS6 (1 << 21)
++
++#define LCSR1_IU2 (1 << 25)
++#define LCSR1_IU3 (1 << 26)
++#define LCSR1_IU4 (1 << 27)
++#define LCSR1_IU5 (1 << 28)
++#define LCSR1_IU6 (1 << 29)
+
+ #define LDCMD_PAL (1 << 26) /* instructs DMA to load palette buffer */
++#if defined(CONFIG_PXA27X)
++#define LDCMD_SOFINT (1 << 22)
++#define LDCMD_EOFINT (1 << 21)
++#endif
+
+ /*
+ * Memory controller
+@@ -1369,5 +1594,191 @@
+ #define MDREFR_K0RUN (1 << 13) /* SDCLK0 Run Control/Status */
+ #define MDREFR_E0PIN (1 << 12) /* SDCKE0 Level Control/Status */
+
++#if defined(CONFIG_PXA27X)
+
+-#endif
++#define ARB_CNTRL __REG(0x48000048) /* Arbiter Control Register */
++
++#define ARB_DMA_SLV_PARK (1<<31) /* Be parked with DMA slave when idle */
++#define ARB_CI_PARK (1<<30) /* Be parked with Camera Interface when idle */
++#define ARB_EX_MEM_PARK (1<<29) /* Be parked with external MEMC when idle */
++#define ARB_INT_MEM_PARK (1<<28) /* Be parked with internal MEMC when idle */
++#define ARB_USB_PARK (1<<27) /* Be parked with USB when idle */
++#define ARB_LCD_PARK (1<<26) /* Be parked with LCD when idle */
++#define ARB_DMA_PARK (1<<25) /* Be parked with DMA when idle */
++#define ARB_CORE_PARK (1<<24) /* Be parked with core when idle */
++#define ARB_LOCK_FLAG (1<<23) /* Only Locking masters gain access to the bus */
++
++/* Interrupt Controller */
++
++#define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */
++#define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */
++#define ICLR2 __REG(0x40D000A4) /* Interrupt Controller Level Register 2 */
++#define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */
++#define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */
++
++/* General Purpose I/O */
++
++#define GAFR3_L __REG(0x40E0006C) /* GPIO Alternate Function Select Register GPIO<111:96> */
++#define GAFR3_U __REG(0x40E00070) /* GPIO Alternate Function Select Register GPIO<127:112> */
++#define GPLR3 __REG(0x40E00100) /* GPIO Pin-Level Register GPIO<127:96> */
++#define GPDR3 __REG(0x40E0010C) /* GPIO Pin Direction Register GPIO<127:96> */
++#define GPSR3 __REG(0x40E00118) /* GPIO Pin Output Set Register GPIO<127:96> */
++#define GPCR3 __REG(0x40E00124) /* GPIO Pin Output Clear Register GPIO <127:96> */
++#define GRER3 __REG(0x40E00130) /* GPIO Rising-Edge Detect Register GPIO<127:96> */
++#define GFER3 __REG(0x40E0013C) /* GPIO Falling-Edge Detect Register GPIO<31:0> */
++#define GEDR3 __REG(0x40E00148) /* GPIO Edge Detect Status Register GPIO<127:96> */
++
++/* Core Clock */
++
++#define CCSR __REG(0x4130000C) /* Core Clock Status Register */
++
++#define CKEN23_SSP1 (1 << 23) /* SSP1 Unit Clock Enable */
++#define CKEN22_MEMC (1 << 22) /* Memory Controler */
++#define CKEN21_MSHC (1 << 21) /* Memery Stick Host Controller */
++#define CKEN20_IM (1 << 20) /* Internal Memory Clock Enable */
++#define CKEN19_KEYPAD (1 << 19) /* Keypad Interface Clock Enable */
++#define CKEN18_USIM (1 << 18) /* USIM Unit Clock Enable */
++#define CKEN17_MSL (1 << 17) /* MSL Interface Unit Clock Enable */
++#define CKEN15_PWR_I2C (1 << 15) /* PWR_I2C Unit Clock Enable */
++#define CKEN9_OST (1 << 9) /* OS Timer Unit Clock Enable */
++#define CKEN4_SSP3 (1 << 4) /* SSP3 Unit Clock Enable */
++
++/* Memory controller */
++
++#define MDREFR_K0DB4 (1 << 29) /* SDCLK[0] divide by 4 */
++
++/* LCD registers */
++#define LCCR4 __REG(0x44000010) /* LCD Controller Control Register 4 */
++#define LCCR5 __REG(0x44000014) /* LCD Controller Control Register 5 */
++#define FBR0 __REG(0x44000020) /* DMA Channel 0 Frame Branch Register */
++#define FBR1 __REG(0x44000024) /* DMA Channel 1 Frame Branch Register */
++#define FBR2 __REG(0x44000028) /* DMA Channel 2 Frame Branch Register */
++#define FBR3 __REG(0x4400002C) /* DMA Channel 3 Frame Branch Register */
++#define FBR4 __REG(0x44000030) /* DMA Channel 4 Frame Branch Register */
++#define FDADR2 __REG(0x44000220) /* DMA Channel 2 Frame Descriptor Address Register */
++#define FSADR2 __REG(0x44000224) /* DMA Channel 2 Frame Source Address Register */
++#define FIDR2 __REG(0x44000228) /* DMA Channel 2 Frame ID Register */
++#define LDCMD2 __REG(0x4400022C) /* DMA Channel 2 Command Register */
++#define FDADR3 __REG(0x44000230) /* DMA Channel 3 Frame Descriptor Address Register */
++#define FSADR3 __REG(0x44000234) /* DMA Channel 3 Frame Source Address Register */
++#define FIDR3 __REG(0x44000238) /* DMA Channel 3 Frame ID Register */
++#define LDCMD3 __REG(0x4400023C) /* DMA Channel 3 Command Register */
++#define FDADR4 __REG(0x44000240) /* DMA Channel 4 Frame Descriptor Address Register */
++#define FSADR4 __REG(0x44000244) /* DMA Channel 4 Frame Source Address Register */
++#define FIDR4 __REG(0x44000248) /* DMA Channel 4 Frame ID Register */
++#define LDCMD4 __REG(0x4400024C) /* DMA Channel 4 Command Register */
++#define FDADR5 __REG(0x44000250) /* DMA Channel 5 Frame Descriptor Address Register */
++#define FSADR5 __REG(0x44000254) /* DMA Channel 5 Frame Source Address Register */
++#define FIDR5 __REG(0x44000258) /* DMA Channel 5 Frame ID Register */
++#define LDCMD5 __REG(0x4400025C) /* DMA Channel 5 Command Register */
++
++#define OVL1C1 __REG(0x44000050) /* Overlay 1 Control Register 1 */
++#define OVL1C2 __REG(0x44000060) /* Overlay 1 Control Register 2 */
++#define OVL2C1 __REG(0x44000070) /* Overlay 2 Control Register 1 */
++#define OVL2C2 __REG(0x44000080) /* Overlay 2 Control Register 2 */
++#define CCR __REG(0x44000090) /* Cursor Control Register */
++
++#define FBR5 __REG(0x44000110) /* DMA Channel 5 Frame Branch Register */
++#define FBR6 __REG(0x44000114) /* DMA Channel 6 Frame Branch Register */
++
++#define LCCR0_LDDALT (1<<26) /* LDD Alternate mapping bit when base pixel is RGBT16 */
++#define LCCR0_OUC (1<<25) /* Overlay Underlay Control Bit */
++
++#define LCCR5_SOFM1 (1<<0) /* Start Of Frame Mask for Overlay 1 (channel 1) */
++#define LCCR5_SOFM2 (1<<1) /* Start Of Frame Mask for Overlay 2 (channel 2) */
++#define LCCR5_SOFM3 (1<<2) /* Start Of Frame Mask for Overlay 2 (channel 3) */
++#define LCCR5_SOFM4 (1<<3) /* Start Of Frame Mask for Overlay 2 (channel 4) */
++#define LCCR5_SOFM5 (1<<4) /* Start Of Frame Mask for cursor (channel 5) */
++#define LCCR5_SOFM6 (1<<5) /* Start Of Frame Mask for command data (channel 6) */
++
++#define LCCR5_EOFM1 (1<<8) /* End Of Frame Mask for Overlay 1 (channel 1) */
++#define LCCR5_EOFM2 (1<<9) /* End Of Frame Mask for Overlay 2 (channel 2) */
++#define LCCR5_EOFM3 (1<<10) /* End Of Frame Mask for Overlay 2 (channel 3) */
++#define LCCR5_EOFM4 (1<<11) /* End Of Frame Mask for Overlay 2 (channel 4) */
++#define LCCR5_EOFM5 (1<<12) /* End Of Frame Mask for cursor (channel 5) */
++#define LCCR5_EOFM6 (1<<13) /* End Of Frame Mask for command data (channel 6) */
++
++#define LCCR5_BSM1 (1<<16) /* Branch mask for Overlay 1 (channel 1) */
++#define LCCR5_BSM2 (1<<17) /* Branch mask for Overlay 2 (channel 2) */
++#define LCCR5_BSM3 (1<<18) /* Branch mask for Overlay 2 (channel 3) */
++#define LCCR5_BSM4 (1<<19) /* Branch mask for Overlay 2 (channel 4) */
++#define LCCR5_BSM5 (1<<20) /* Branch mask for cursor (channel 5) */
++#define LCCR5_BSM6 (1<<21) /* Branch mask for data command (channel 6) */
++
++#define LCCR5_IUM1 (1<<24) /* Input FIFO Underrun Mask for Overlay 1 */
++#define LCCR5_IUM2 (1<<25) /* Input FIFO Underrun Mask for Overlay 2 */
++#define LCCR5_IUM3 (1<<26) /* Input FIFO Underrun Mask for Overlay 2 */
++#define LCCR5_IUM4 (1<<27) /* Input FIFO Underrun Mask for Overlay 2 */
++#define LCCR5_IUM5 (1<<28) /* Input FIFO Underrun Mask for cursor */
++#define LCCR5_IUM6 (1<<29) /* Input FIFO Underrun Mask for data command */
++
++#define OVL1C1_O1EN (1<<31) /* Enable bit for Overlay 1 */
++#define OVL2C1_O2EN (1<<31) /* Enable bit for Overlay 2 */
++#define CCR_CEN (1<<31) /* Enable bit for Cursor */
++
++/* Keypad controller */
++
++#define KPC __REG(0x41500000) /* Keypad Interface Control register */
++#define KPDK __REG(0x41500008) /* Keypad Interface Direct Key register */
++#define KPREC __REG(0x41500010) /* Keypad Intefcace Rotary Encoder register */
++#define KPMK __REG(0x41500018) /* Keypad Intefcace Matrix Key register */
++#define KPAS __REG(0x41500020) /* Keypad Interface Automatic Scan register */
++#define KPASMKP0 __REG(0x41500028) /* Keypad Interface Automatic Scan Multiple Key Presser register 0 */
++#define KPASMKP1 __REG(0x41500030) /* Keypad Interface Automatic Scan Multiple Key Presser register 1 */
++#define KPASMKP2 __REG(0x41500038) /* Keypad Interface Automatic Scan Multiple Key Presser register 2 */
++#define KPASMKP3 __REG(0x41500040) /* Keypad Interface Automatic Scan Multiple Key Presser register 3 */
++#define KPKDI __REG(0x41500048) /* Keypad Interface Key Debounce Interval register */
++
++#define KPC_AS (0x1 << 30) /* Automatic Scan bit */
++#define KPC_ASACT (0x1 << 29) /* Automatic Scan on Activity */
++#define KPC_MI (0x1 << 22) /* Matrix interrupt bit */
++#define KPC_IMKP (0x1 << 21) /* Ignore Multiple Key Press */
++#define KPC_MS7 (0x1 << 20) /* Matrix scan line 7 */
++#define KPC_MS6 (0x1 << 19) /* Matrix scan line 6 */
++#define KPC_MS5 (0x1 << 18) /* Matrix scan line 5 */
++#define KPC_MS4 (0x1 << 17) /* Matrix scan line 4 */
++#define KPC_MS3 (0x1 << 16) /* Matrix scan line 3 */
++#define KPC_MS2 (0x1 << 15) /* Matrix scan line 2 */
++#define KPC_MS1 (0x1 << 14) /* Matrix scan line 1 */
++#define KPC_MS0 (0x1 << 13) /* Matrix scan line 0 */
++#define KPC_ME (0x1 << 12) /* Matrix Keypad Enable */
++#define KPC_MIE (0x1 << 11) /* Matrix Interrupt Enable */
++#define KPC_DK_DEB_SEL (0x1 << 9) /* Direct Key Debounce select */
++#define KPC_DI (0x1 << 5) /* Direct key interrupt bit */
++#define KPC_DEE0 (0x1 << 2) /* Rotary Encoder 0 Enable */
++#define KPC_DE (0x1 << 1) /* Direct Keypad Enable */
++#define KPC_DIE (0x1 << 0) /* Direct Keypad interrupt Enable */
++
++#define KPDK_DKP (0x1 << 31)
++#define KPDK_DK7 (0x1 << 7)
++#define KPDK_DK6 (0x1 << 6)
++#define KPDK_DK5 (0x1 << 5)
++#define KPDK_DK4 (0x1 << 4)
++#define KPDK_DK3 (0x1 << 3)
++#define KPDK_DK2 (0x1 << 2)
++#define KPDK_DK1 (0x1 << 1)
++#define KPDK_DK0 (0x1 << 0)
++
++#define KPREC_OF1 (0x1 << 31)
++#define kPREC_UF1 (0x1 << 30)
++#define KPREC_OF0 (0x1 << 15)
++#define KPREC_UF0 (0x1 << 14)
++
++#define KPMK_MKP (0x1 << 31)
++#define KPAS_SO (0x1 << 31)
++#define KPASMKPx_SO (0x1 << 31)
++
++#define GPIO113_BIT (1 << 17)/* GPIO113 in GPSR, GPCR, bit 17 */
++#define PSLR __REG(0x40F00034)
++#define PSTR __REG(0x40F00038) /* Power Manager Standby Configuration Reg */
++#define PSNR __REG(0x40F0003C) /* Power Manager Sense Configuration Reg */
++#define PVCR __REG(0x40F00040) /* Power Manager Voltage Change Control Reg */
++#define PKWR __REG(0x40F00050) /* Power Manager KB Wake-Up Enable Reg */
++#define PKSR __REG(0x40F00054) /* Power Manager KB Level-Detect Status Reg */
++#define OSMR4 __REG(0x40A00080) /* */
++#define OSCR4 __REG(0x40A00040) /* OS Timer Counter Register */
++#define OMCR4 __REG(0x40A000C0) /* */
++
++#endif /* CONFIG_PXA27X */
++
++#endif /* _PXA_REGS_H_ */
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/mach-types.h u-boot-1.1.2-neon/include/asm-arm/mach-types.h
+--- u-boot-1.1.2/include/asm-arm/mach-types.h 2004-10-10 20:41:14.000000000 +0200
++++ u-boot-1.1.2-neon/include/asm-arm/mach-types.h 2007-08-11 21:07:21.000000000 +0200
+@@ -624,6 +624,9 @@
+ #define MACH_TYPE_RMS100 611
+ #define MACH_TYPE_KB9200 612
+ #define MACH_TYPE_SX1 613
++#define MACH_TYPE_NEON 332
++#define MACH_TYPE_BD2003 332
++#define MACH_TYPE_HALOGEN 332
+
+ #ifdef CONFIG_ARCH_EBSA110
+ # ifdef machine_arch_type
+@@ -7945,6 +7948,42 @@
+ # define machine_is_sx1() (0)
+ #endif
+
++#ifdef CONFIG_ARCH_NEON
++# ifdef machine_arch_type
++# undef machine_arch_type
++# define machine_arch_type __machine_arch_type
++# else
++# define machine_arch_type MACH_TYPE_NEON
++# endif
++# define machine_is_neon() (machine_arch_type == MACH_TYPE_NEON)
++#else
++# define machine_is_neon() (0)
++#endif
++
++#ifdef CONFIG_ARCH_BD2003
++# ifdef machine_arch_type
++# undef machine_arch_type
++# define machine_arch_type __machine_arch_type
++# else
++# define machine_arch_type MACH_TYPE_BD2003
++# endif
++# define machine_is_bd2003() (machine_arch_type == MACH_TYPE_BD2003)
++#else
++# define machine_is_bd2003() (0)
++#endif
++
++#ifdef CONFIG_ARCH_HALOGEN
++# ifdef machine_arch_type
++# undef machine_arch_type
++# define machine_arch_type __machine_arch_type
++# else
++# define machine_arch_type MACH_TYPE_HALOGEN
++# endif
++# define machine_is_halogen() (machine_arch_type == MACH_TYPE_HALOGEN)
++#else
++# define machine_is_halogen() (0)
++#endif
++
+ /*
+ * These have not yet been registered
+ */
+diff -u -r --new-file u-boot-1.1.2/include/asm-arm/processor.h u-boot-1.1.2-neon/include/asm-arm/processor.h
+--- u-boot-1.1.2/include/asm-arm/processor.h 2003-06-26 00:26:36.000000000 +0200
++++ u-boot-1.1.2-neon/include/asm-arm/processor.h 2007-08-11 21:07:21.000000000 +0200
+@@ -48,11 +48,22 @@
+ #include <asm/proc/processor.h>
+ #include <asm/types.h>
+
++#ifdef arm
++#warning arm defined by preprocessor
++#define armX arm
++#undef arm
++#endif
++
+ union debug_insn {
+ u32 arm;
+ u16 thumb;
+ };
+
++#ifdef armX
++#define arm
++#undef armX
++#endif
++
+ struct debug_entry {
+ u32 address;
+ union debug_insn insn;
+diff -u -r --new-file u-boot-1.1.2/include/cmd_confdefs.h u-boot-1.1.2-neon/include/cmd_confdefs.h
+--- u-boot-1.1.2/include/cmd_confdefs.h 2004-12-16 18:59:53.000000000 +0100
++++ u-boot-1.1.2-neon/include/cmd_confdefs.h 2007-08-11 21:07:21.000000000 +0200
+@@ -92,6 +92,8 @@
+ #define CFG_CMD_XIMG 0x0400000000000000ULL /* Load part of Multi Image */
+ #define CFG_CMD_UNIVERSE 0x0800000000000000ULL /* Tundra Universe Support */
+ #define CFG_CMD_EXT2 0x1000000000000000ULL /* EXT2 Support */
++#define CFG_CMD_LCDPANEL 0x2000000000000000ULL /* Dynamic LCD Panel Support */
++#define CFG_CMD_NOT 0x4000000000000000ULL /* Negate a command */
+
+ #define CFG_CMD_ALL 0xFFFFFFFFFFFFFFFFULL /* ALL commands */
+
+diff -u -r --new-file u-boot-1.1.2/include/configs/bd2003.h u-boot-1.1.2-neon/include/configs/bd2003.h
+--- u-boot-1.1.2/include/configs/bd2003.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/configs/bd2003.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,315 @@
++#ifndef __CONFIG_H
++#define __CONFIG_H
++
++/*
++ * bd2003.h
++ *
++ * This header file declares the configuration constants for the Boundary
++ * Devices BD2003 board.
++ *
++ * Change History :
++ *
++ * $Log: bd2003.h,v $
++ * Revision 1.7 2005/07/18 01:51:59 tkisky
++ * -define display types
++ *
++ * Revision 1.6 2005/07/17 22:52:10 ericn
++ * -fix comment
++ *
++ * Revision 1.5 2005/07/17 22:36:37 ericn
++ * -merge w/boundaryLib
++ *
++ * Revision 1.4 2005/07/02 18:45:55 ericn
++ * -bring up-to-date
++ *
++ * Revision 1.3 2005/04/20 09:05:36 tkisky
++ * -include select.h
++ *
++ * Revision 1.2 2005/04/15 10:40:52 tkisky
++ * -remove LCD_XRES,LCD_YRES
++ *
++ * Revision 1.1 2005/04/09 17:49:24 ericn
++ * -Initial import
++ *
++ *
++ * 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
++ *
++ * Copyright Boundary Devices, Inc. 2005
++ */
++
++/*
++ * If we are developing, we might want to start armboot from ram
++ * so we MUST NOT initialize critical regs like mem-timing ...
++ */
++#include "select.h"
++
++#define CONFIG_INIT_CRITICAL /* undef for developing */
++#define CONFIG_SETUP_MEMORY_TAGS 1
++#define CONFIG_INITRD_TAG 1
++
++/*
++ * High Level Configuration Options
++ * (easy to change)
++ */
++#define CONFIG_PXA250 1 /* This is an PXA250 CPU */
++#define PXALCD 1 /* Using the PXA display controller */
++#define CONFIG_LCD 1
++
++#define CONFIG_MMC 1
++#define BOARD_LATE_INIT 1
++
++#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
++
++/*
++ * Size of malloc() pool
++ */
++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
++#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
++#define CFG_MMU_SPACE_RESERVED (1<<14)
++
++/*
++ * Hardware drivers
++ */
++#define CONFIG_DRIVER_SMC91111
++#define CONFIG_SMC91111_BASE 0x10000300
++#define CONFIG_SMC_USE_32_BIT
++
++/*
++ * select serial console configuration
++ */
++#define CONFIG_FFUART 1 /* we use FFUART on BD2003 */
++
++/* allow to overwrite serial and ethaddr */
++//#define CONFIG_ENV_OVERWRITE
++
++#define CONFIG_BAUDRATE 115200
++
++#define SKIP_COMMANDS ( CFG_CMD_MISC \
++ | CFG_CMD_BDI \
++ | CFG_CMD_BOOTD \
++ | CFG_CMD_LOADS \
++ | CFG_CMD_LOADB \
++ | CFG_CMD_ITEST \
++ | CFG_CMD_FPGA \
++ | CFG_CMD_ECHO \
++ | CFG_CMD_DIAG \
++ | CFG_CMD_DATE \
++ | CFG_CMD_BOOTP \
++ | CFG_CMD_NFS \
++ )
++// | CFG_CMD_FLASH
++// | CFG_CMD_DHCP
++// | CFG_CMD_NET
++// | CFG_CMD_MEMORY
++// | CFG_CMD_ENV
++
++#define CONFIG_COMMANDS ( (CONFIG_CMD_DFL \
++ | CFG_CMD_MMC \
++ | CFG_CMD_FAT \
++ | CFG_CMD_LCDPANEL \
++ | CFG_CMD_FLASH \
++ | CFG_CMD_DHCP \
++ | CFG_CMD_ENV \
++ | CFG_CMD_BMP) & ~(SKIP_COMMANDS) )
++
++/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
++#include <cmd_confdefs.h>
++#define CONFIG_BOOTDELAY 3
++#define CONFIG_BOOTCOMMAND "mmcinit; " \
++ "fatload mmc 0 a0000000 init.scr ; autoscr a0000000 ; "
++#define CONFIG_BOOTARGS "console=ttyS0,115200 DEBUG=1 ENV=/etc/bashrc init=/linuxrc rw mtdparts=phys:1024k(armboot),256k(params),-(rootfs1) root=/dev/mtdblock3 rootfstype=cramfs"
++#define CONFIG_CMDLINE_TAG
++
++#define CONFIG_GZIP
++
++/*
++ * Choose one of the following:
++ *
++ * hitachi_qvga
++ * sharp_qvga
++ * hitachi_hvga
++ * sharp_vga
++ * hitachi_wvga - 7 or 9 inch
++ */
++#ifndef DA320X240
++#define DA320X240 0
++#define DA640X240 1
++#define DA800X480 2
++#define DA640X480 3
++#define DA240X320 4
++#define DA800X600 5
++#define DA1024X768 6
++#define DP480X320 7
++#define DP320X240 8
++#define DL122X32 9
++#endif
++
++#if DISPLAY_TYPE == DA640X240
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_hvga" "\0"
++#elif DISPLAY_TYPE == DA240X320
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=qvga_portrait" "\0"
++#elif DISPLAY_TYPE == DA320X240
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_qvga" "\0"
++#elif DISPLAY_TYPE == DA8000X480
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_wvga" "\0"
++#elif DISPLAY_TYPE == DA640X480
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=sharp_vga" "\0"
++#elif DISPLAY_TYPE == DA800X480
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_wvga" "\0"
++#elif DISPLAY_TYPE == DA1024X768
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=crt1024x768" "\0"
++#else
++#error No display selected
++#endif
++
++#define LCD_BPP LCD_COLOR8
++
++
++#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
++#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
++#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
++#endif
++
++/*
++ * Miscellaneous configurable options
++ */
++#define CFG_HUSH_PARSER 1
++#define CFG_PROMPT_HUSH_PS2 "> "
++
++#define CFG_LONGHELP /* undef to save memory */
++#ifdef CFG_HUSH_PARSER
++#define CFG_PROMPT "$ " /* Monitor Command Prompt */
++#else
++#define CFG_PROMPT "=> " /* Monitor Command Prompt */
++#endif
++#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
++#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
++#define CFG_MAXARGS 16 /* max number of command args */
++#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
++#define CFG_DEVICE_NULLDEV 1
++
++#define CFG_MEMTEST_START 0xa0400000 /* memtest works on */
++#define CFG_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */
++
++#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
++
++#define CFG_LOAD_ADDR 0xa0030000 /* default load address */
++
++#define CFG_HZ 3686400 /* incrementer freq: 3.6864 MHz */
++#define CFG_CPUSPEED 0x161 /* set core clock to 400/200/100 MHz */
++
++ /* valid baudrates */
++#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
++#define CFG_MMC_BASE 0xF0000000
++
++/*
++ * Stack sizes
++ *
++ * The stack sizes are set up in start.S using the settings below
++ */
++#define CONFIG_STACKSIZE (128*1024) /* regular stack */
++#ifdef CONFIG_USE_IRQ
++#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
++#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
++#endif
++
++/*
++ * Physical Memory Map
++ */
++#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
++#define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */
++#define PHYS_SDRAM_1_SIZE 0x02000000 /* 32 MB */
++
++#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */
++#define PHYS_FLASH_2 0x04000000 /* Flash Bank #2 */
++#define PHYS_FLASH_SIZE 0x02000000 /* 32 MB */
++#define PHYS_FLASH_BANK_SIZE 0x02000000 /* 32 MB Banks */
++#define PHYS_FLASH_SECT_SIZE 0x00040000 /* 256 KB sectors (x2) */
++
++#define CFG_DRAM_BASE 0xa0000000
++#define CFG_DRAM_SIZE 0x04000000
++
++
++/*
++ * Memory settings
++ */
++#define CFG_MSC0_VAL 0x23F223F2
++#define CFG_MSC1_VAL 0x3FF1A441
++#define CFG_MSC2_VAL 0x7FF97FF1
++#define CFG_MDCNFG_VAL 0x00001AC9
++#define CFG_MDREFR_VAL 0x00018018
++#define CFG_MDMRS_VAL 0x00000000
++
++/*
++ * FLASH and environment organization
++ */
++#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
++#define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
++
++/* timeout values are in ticks */
++#define CFG_FLASH_ERASE_TOUT (25*CFG_HZ) /* Timeout for Flash Erase */
++#define CFG_FLASH_WRITE_TOUT (25*CFG_HZ) /* Timeout for Flash Write */
++
++/*
++ * Environment is saved in flash at offset 1MB
++ */
++#define CFG_ENV_IS_IN_FLASH 1
++#define CFG_FLASH_BASE 0
++#define CFG_ENV_ADDR ((CFG_FLASH_BASE)+0x100000) /* Addr of Environment Sector */
++#define CFG_ENV_OFFSET ((CFG_ENV_ADDR)-(CFG_FLASH_BASE))
++#define CFG_ENV_SIZE PHYS_FLASH_SECT_SIZE /* Total Size of Environment Sector */
++
++/*
++ * GPIO settings
++ */
++#define CFG_GPSR0_VAL 0x00008000
++#define CFG_GPSR1_VAL 0x00FC0382
++#define CFG_GPSR2_VAL 0x0001FFFF
++#define CFG_GPCR0_VAL 0x00000000
++#define CFG_GPCR1_VAL 0x00000000
++#define CFG_GPCR2_VAL 0x00000000
++#define CFG_GPDR0_VAL 0x0060A800
++#define CFG_GPDR1_VAL 0x00FF0382
++#define CFG_GPDR2_VAL 0x0001C000
++#define CFG_GAFR0_L_VAL 0x98400000
++#define CFG_GAFR0_U_VAL 0x00002950
++#define CFG_GAFR1_L_VAL 0x000A9558
++#define CFG_GAFR1_U_VAL 0x0005AAAA
++#define CFG_GAFR2_L_VAL 0xA0000000
++#define CFG_GAFR2_U_VAL 0x00000002
++
++#define CFG_PSSR_VAL 0x20
++
++/*
++ * PCMCIA and CF Interfaces
++ */
++#define CFG_MECR_VAL 0x00000000
++#define CFG_MCMEM0_VAL 0x00010504
++#define CFG_MCMEM1_VAL 0x00010504
++#define CFG_MCATT0_VAL 0x00010504
++#define CFG_MCATT1_VAL 0x00010504
++#define CFG_MCIO0_VAL 0x00004715
++#define CFG_MCIO1_VAL 0x00004715
++
++#ifndef __ASSEMBLY__
++
++extern unsigned long const fbStart ;
++extern unsigned long paletteRegs ;
++
++#endif /* _ASMLANGUAGE */
++
++#endif
++
+diff -u -r --new-file u-boot-1.1.2/include/configs/.cvsignore u-boot-1.1.2-neon/include/configs/.cvsignore
+--- u-boot-1.1.2/include/configs/.cvsignore 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/configs/.cvsignore 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1 @@
++select.h
+diff -u -r --new-file u-boot-1.1.2/include/configs/halogen.h u-boot-1.1.2-neon/include/configs/halogen.h
+--- u-boot-1.1.2/include/configs/halogen.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/configs/halogen.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,325 @@
++#ifndef __CONFIG_H
++#define __CONFIG_H
++
++/*
++ * halogen.h
++ *
++ * This header file declares the configuration constants for the Boundary
++ * Devices Halogen (PXA-270) boards.
++ *
++ * Change History :
++ *
++ * $Log: halogen.h,v $
++ * Revision 1.6 2005/07/18 01:51:59 tkisky
++ * -define display types
++ *
++ * Revision 1.5 2005/07/17 22:52:10 ericn
++ * -fix comment
++ *
++ * Revision 1.4 2005/07/17 22:36:37 ericn
++ * -merge w/boundaryLib
++ *
++ * Revision 1.3 2005/07/16 16:26:00 ericn
++ * -fix name, memsize
++ *
++ * Revision 1.2 2005/07/10 14:32:45 ericn
++ * -include USB
++ *
++ * Revision 1.1 2005/07/04 16:40:32 ericn
++ * -Initial import
++ *
++ *
++ * 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
++ *
++ * Copyright Boundary Devices, Inc. 2005
++ */
++
++/*
++ * If we are developing, we might want to start armboot from ram
++ * so we MUST NOT initialize critical regs like mem-timing ...
++ */
++#include "select.h"
++
++#define CONFIG_INIT_CRITICAL /* undef for developing */
++#define CONFIG_SETUP_MEMORY_TAGS 1
++#define CONFIG_INITRD_TAG 1
++
++/*
++ * High Level Configuration Options
++ * (easy to change)
++ */
++#define CONFIG_PXA270 1 /* This is a PXA270 CPU */
++#define CONFIG_PXA27X 1 /* Which is a PXA27X */
++
++#define PXALCD 1 /* Using the PXA display controller */
++#define CONFIG_LCD 1
++
++#define CONFIG_MMC 1
++#define BOARD_LATE_INIT 1
++
++#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
++
++/*
++ * Size of malloc() pool
++ */
++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
++#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
++#define CFG_MMU_SPACE_RESERVED (1<<14)
++
++/*
++ * Hardware drivers
++ */
++#define CONFIG_DRIVER_SMC91111
++#define CONFIG_SMC91111_BASE 0x10000300
++#define CONFIG_SMC_USE_32_BIT
++
++/************************************************************
++ * USB support
++ ************************************************************/
++#define LITTLEENDIAN 1 /* Needed by usb_ohci.c */
++#define CFG_DEVICE_DEREGISTER 1 /* Needed by usb_kbd */
++#define CONFIG_DOS_PARTITION 1
++#define CONFIG_USB_OHCI 1
++#define CONFIG_USB_KEYBOARD 1
++#define CONFIG_USB_STORAGE 1
++
++/*
++ * select serial console configuration
++ */
++#define CONFIG_FFUART 1 /* we use FFUART on HALOGEN */
++
++/* allow to overwrite serial and ethaddr */
++//#define CONFIG_ENV_OVERWRITE
++
++#define CONFIG_BAUDRATE 115200
++
++#define SKIP_COMMANDS ( CFG_CMD_MISC \
++ | CFG_CMD_BDI \
++ | CFG_CMD_BOOTD \
++ | CFG_CMD_LOADS \
++ | CFG_CMD_LOADB \
++ | CFG_CMD_ITEST \
++ | CFG_CMD_FPGA \
++ | CFG_CMD_ECHO \
++ | CFG_CMD_DIAG \
++ | CFG_CMD_DATE \
++ | CFG_CMD_BOOTP \
++ | CFG_CMD_NFS \
++ )
++// | CFG_CMD_FLASH
++// | CFG_CMD_DHCP
++// | CFG_CMD_NET
++// | CFG_CMD_MEMORY
++// | CFG_CMD_ENV
++
++#define CONFIG_COMMANDS ( (CONFIG_CMD_DFL \
++ | CFG_CMD_MMC \
++ | CFG_CMD_FAT \
++ | CFG_CMD_LCDPANEL \
++ | CFG_CMD_FLASH \
++ | CFG_CMD_DHCP \
++ | CFG_CMD_ENV \
++ | CFG_CMD_USB \
++ | CFG_CMD_BMP) & ~(SKIP_COMMANDS) )
++
++/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
++#include <cmd_confdefs.h>
++#define CONFIG_BOOTDELAY 3
++#define CONFIG_BOOTCOMMAND "mmcinit; " \
++ "fatload mmc 0 a0000000 init.scr ; autoscr a0000000 ; "
++#define CONFIG_BOOTARGS "console=ttyS0,115200 DEBUG=1 ENV=/etc/bashrc init=/linuxrc rw mtdparts=phys:1024k(armboot),256k(params),-(rootfs1) root=/dev/mtdblock3 rootfstype=cramfs"
++#define CONFIG_CMDLINE_TAG
++
++#define CONFIG_GZIP
++
++/*
++ * Choose one of the following:
++ *
++ * hitachi_qvga
++ * sharp_qvga
++ * hitachi_hvga
++ * sharp_vga
++ * hitachi_wvga - 7 or 9 inch
++ */
++#ifndef DA320X240
++#define DA320X240 0
++#define DA640X240 1
++#define DA800X480 2
++#define DA640X480 3
++#define DA240X320 4
++#define DA800X600 5
++#define DA1024X768 6
++#define DP480X320 7
++#define DP320X240 8
++#define DL122X32 9
++#endif
++
++#if DISPLAY_TYPE == DA640X240
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_hvga" "\0"
++#elif DISPLAY_TYPE == DA240X320
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=qvga_portrait" "\0"
++#elif DISPLAY_TYPE == DA320X240
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_qvga" "\0"
++#elif DISPLAY_TYPE == DA8000X480
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_wvga" "\0"
++#elif DISPLAY_TYPE == DA640X480
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=sharp_vga" "\0"
++#elif DISPLAY_TYPE == DA800X480
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_wvga" "\0"
++#elif DISPLAY_TYPE == DA1024X768
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=crt1024x768" "\0"
++#else
++#error No display selected
++#endif
++
++#define LCD_BPP LCD_COLOR8
++
++
++#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
++#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
++#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
++#endif
++
++/*
++ * Miscellaneous configurable options
++ */
++#define CFG_HUSH_PARSER 1
++#define CFG_PROMPT_HUSH_PS2 "> "
++
++#define CFG_LONGHELP /* undef to save memory */
++#ifdef CFG_HUSH_PARSER
++#define CFG_PROMPT "$ " /* Monitor Command Prompt */
++#else
++#define CFG_PROMPT "=> " /* Monitor Command Prompt */
++#endif
++#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
++#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
++#define CFG_MAXARGS 16 /* max number of command args */
++#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
++#define CFG_DEVICE_NULLDEV 1
++
++#define CFG_MEMTEST_START 0xa0400000 /* memtest works on */
++#define CFG_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */
++
++#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
++
++#define CFG_LOAD_ADDR 0xa0030000 /* default load address */
++
++#define CFG_HZ 3686400 /* incrementer freq: 3.6864 MHz */
++#define CFG_CPUSPEED 0x161 /* set core clock to 400/200/100 MHz */
++
++ /* valid baudrates */
++#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
++#define CFG_MMC_BASE 0xF0000000
++
++/*
++ * Stack sizes
++ *
++ * The stack sizes are set up in start.S using the settings below
++ */
++#define CONFIG_STACKSIZE (128*1024) /* regular stack */
++#ifdef CONFIG_USE_IRQ
++#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
++#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
++#endif
++
++/*
++ * Physical Memory Map
++ */
++#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
++#define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */
++#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
++
++#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */
++#define PHYS_FLASH_2 0x04000000 /* Flash Bank #2 */
++#define PHYS_FLASH_SIZE 0x02000000 /* 32 MB */
++#define PHYS_FLASH_BANK_SIZE 0x02000000 /* 32 MB Banks */
++#define PHYS_FLASH_SECT_SIZE 0x00040000 /* 256 KB sectors (x2) */
++
++#define CFG_DRAM_BASE 0xa0000000
++#define CFG_DRAM_SIZE 0x04000000
++
++
++/*
++ * Memory settings
++ */
++#define CFG_MSC0_VAL 0x23F223F2
++#define CFG_MSC1_VAL 0x3FF1A441
++#define CFG_MSC2_VAL 0x7FF97FF1
++#define CFG_MDCNFG_VAL 0x00001AC9
++#define CFG_MDREFR_VAL 0x00018018
++#define CFG_MDMRS_VAL 0x00000000
++
++/*
++ * FLASH and environment organization
++ */
++#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
++#define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
++
++/* timeout values are in ticks */
++#define CFG_FLASH_ERASE_TOUT (25*CFG_HZ) /* Timeout for Flash Erase */
++#define CFG_FLASH_WRITE_TOUT (25*CFG_HZ) /* Timeout for Flash Write */
++
++/*
++ * Environment is saved in flash at offset 1MB
++ */
++#define CFG_ENV_IS_IN_FLASH 1
++#define CFG_FLASH_BASE 0
++#define CFG_ENV_ADDR ((CFG_FLASH_BASE)+0x100000) /* Addr of Environment Sector */
++#define CFG_ENV_OFFSET ((CFG_ENV_ADDR)-(CFG_FLASH_BASE))
++#define CFG_ENV_SIZE PHYS_FLASH_SECT_SIZE /* Total Size of Environment Sector */
++
++/*
++ * GPIO settings
++ */
++#define CFG_GPSR0_VAL 0x00008000
++#define CFG_GPSR1_VAL 0x00FC0382
++#define CFG_GPSR2_VAL 0x0001FFFF
++#define CFG_GPCR0_VAL 0x00000000
++#define CFG_GPCR1_VAL 0x00000000
++#define CFG_GPCR2_VAL 0x00000000
++#define CFG_GPDR0_VAL 0x0060A800
++#define CFG_GPDR1_VAL 0x00FF0382
++#define CFG_GPDR2_VAL 0x0001C000
++#define CFG_GAFR0_L_VAL 0x98400000
++#define CFG_GAFR0_U_VAL 0x00002950
++#define CFG_GAFR1_L_VAL 0x000A9558
++#define CFG_GAFR1_U_VAL 0x0005AAAA
++#define CFG_GAFR2_L_VAL 0xA0000000
++#define CFG_GAFR2_U_VAL 0x00000002
++
++#define CFG_PSSR_VAL 0x20
++
++/*
++ * PCMCIA and CF Interfaces
++ */
++#define CFG_MECR_VAL 0x00000000
++#define CFG_MCMEM0_VAL 0x00010504
++#define CFG_MCMEM1_VAL 0x00010504
++#define CFG_MCATT0_VAL 0x00010504
++#define CFG_MCATT1_VAL 0x00010504
++#define CFG_MCIO0_VAL 0x00004715
++#define CFG_MCIO1_VAL 0x00004715
++
++#ifndef __ASSEMBLY__
++
++extern unsigned long const fbStart ;
++extern unsigned long paletteRegs ;
++
++#endif /* _ASMLANGUAGE */
++
++#endif
++
+diff -u -r --new-file u-boot-1.1.2/include/configs/neon.h u-boot-1.1.2-neon/include/configs/neon.h
+--- u-boot-1.1.2/include/configs/neon.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/configs/neon.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,395 @@
++#ifndef __CONFIG_H
++#define __CONFIG_H
++
++/*
++ * neon.h
++ *
++ * This header file declares the configuration constants for the Boundary
++ * Devices Neon board.
++ *
++ * Change History :
++ *
++ * $Log: neon.h,v $
++ * Revision 1.27 2006/05/30 15:52:17 ericn
++ * -clear screen after SD wait loop
++ *
++ * Revision 1.26 2006/05/27 22:11:50 ericn
++ * -include 'not', 'sleep' commands, wait for SD, <esc><esc><esc> for prompt
++ *
++ * Revision 1.25 2005/10/22 02:09:31 ericn
++ * -add CONFIG_SUPPORT_VFAT
++ *
++ * Revision 1.24 2005/07/23 19:35:42 ericn
++ * -fix name
++ *
++ * Revision 1.23 2005/07/23 17:13:25 ericn
++ * -add USB support
++ *
++ * Revision 1.22 2005/07/18 01:48:15 tkisky
++ * -define display types
++ *
++ * Revision 1.21 2005/07/17 22:52:10 ericn
++ * -fix comment
++ *
++ * Revision 1.20 2005/07/17 22:36:37 ericn
++ * -merge w/boundaryLib
++ *
++ * Revision 1.19 2005/07/02 18:46:16 ericn
++ * -Neon always has CONFIG_SM501
++ *
++ * Revision 1.18 2005/07/02 14:57:11 ericn
++ * -include INITRD tag
++ *
++ * Revision 1.17 2005/06/02 04:55:06 ericn
++ * -auto-choose qvga_portrait for DA240X320
++ *
++ * Revision 1.16 2005/06/02 04:10:30 ericn
++ * -save environment in flash
++ *
++ * Revision 1.15 2005/05/08 22:07:31 ericn
++ * -added 1024x768, 800x480 options
++ *
++ * Revision 1.14 2005/05/05 04:11:53 ericn
++ * -add flash commands, sharp_vga display selector
++ *
++ * Revision 1.13 2005/05/05 03:22:20 ericn
++ * -change default load addr to WinCE's
++ *
++ * Revision 1.12 2005/05/04 04:22:23 ericn
++ * -updated to allow DHCP
++ *
++ * Revision 1.11 2005/05/03 15:28:56 ericn
++ * -include DHCP support
++ *
++ * Revision 1.10 2005/05/02 15:14:26 ericn
++ * -add SMC driver, remove hard-coded MAC
++ *
++ * Revision 1.9 2005/05/01 15:21:41 ericn
++ * -change crtPalette -> paletteRegs
++ *
++ * Revision 1.8 2005/04/28 03:41:23 ericn
++ * -pass RAM qty to Linux
++ *
++ * Revision 1.7 2005/04/28 03:35:32 ericn
++ * -default to cramfs
++ *
++ * Revision 1.6 2005/04/22 01:57:39 ericn
++ * -fix default boot args
++ *
++ * Revision 1.5 2005/04/20 09:05:36 tkisky
++ * -include select.h
++ *
++ * Revision 1.4 2005/04/18 13:49:10 ericn
++ * -default wvga, use init.scr
++ *
++ * Revision 1.3 2005/04/18 03:58:48 ericn
++ * -added autoscr, hush parser support
++ *
++ * Revision 1.2 2005/04/15 10:41:35 tkisky
++ * -remove LCD_XRES,LCD_YRES, remove extra mmcinit
++ *
++ * Revision 1.1 2005/04/09 17:49:25 ericn
++ * -Initial import
++ *
++ *
++ * 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
++ *
++ * Copyright Boundary Devices, Inc. 2005
++ */
++
++/*
++ * If we are developing, we might want to start armboot from ram
++ * so we MUST NOT initialize critical regs like mem-timing ...
++ */
++#include "select.h"
++
++#define CONFIG_INIT_CRITICAL /* undef for developing */
++#define CONFIG_SETUP_MEMORY_TAGS 1
++#define CONFIG_INITRD_TAG 1
++
++/*
++ * High Level Configuration Options
++ * (easy to change)
++ */
++#define CONFIG_PXA250 1 /* This is an PXA250 CPU */
++#define CONFIG_NEON 1 /* on a Neon Board */
++#define CONFIG_SM501 1
++#define CONFIG_LCD 1
++
++#define CONFIG_MMC 1
++#define BOARD_LATE_INIT 1
++
++#undef CONFIG_USE_IRQ /* we don't need IRQ/FIQ stuff */
++
++/*
++ * Size of malloc() pool
++ */
++#define CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
++#define CFG_GBL_DATA_SIZE 128 /* size in bytes reserved for initial data */
++#define CFG_MMU_SPACE_RESERVED (1<<14)
++
++/*
++ * Hardware drivers
++ */
++#define CONFIG_DRIVER_SMC91111
++#define CONFIG_SMC91111_BASE 0x10000300
++#define CONFIG_SMC_USE_32_BIT
++
++/************************************************************
++ * USB support
++ ************************************************************/
++#define LITTLEENDIAN 1 /* Needed by usb_ohci.c */
++#define CFG_DEVICE_DEREGISTER 1 /* Needed by usb_kbd */
++#define CONFIG_DOS_PARTITION 1
++#define CONFIG_USB_OHCI 1
++#define CONFIG_USB_KEYBOARD 1
++#define CONFIG_USB_STORAGE 1
++
++/*
++ * select serial console configuration
++ */
++#define CONFIG_FFUART 1 /* we use FFUART on NEON */
++
++/* allow to overwrite serial and ethaddr */
++//#define CONFIG_ENV_OVERWRITE
++
++#define CONFIG_BAUDRATE 115200
++
++#define SKIP_COMMANDS ( CFG_CMD_BDI \
++ | CFG_CMD_BOOTD \
++ | CFG_CMD_LOADS \
++ | CFG_CMD_LOADB \
++ | CFG_CMD_ITEST \
++ | CFG_CMD_FPGA \
++ | CFG_CMD_ECHO \
++ | CFG_CMD_DIAG \
++ | CFG_CMD_DATE \
++ | CFG_CMD_BOOTP \
++ | CFG_CMD_NFS \
++ )
++// | CFG_CMD_FLASH
++// | CFG_CMD_DHCP
++// | CFG_CMD_NET
++// | CFG_CMD_MEMORY
++// | CFG_CMD_ENV
++
++#define CONFIG_SUPPORT_VFAT
++#define CONFIG_COMMANDS ( (CONFIG_CMD_DFL \
++ | CFG_CMD_MMC \
++ | CFG_CMD_FAT \
++ | CFG_CMD_LCDPANEL \
++ | CFG_CMD_FLASH \
++ | CFG_CMD_DHCP \
++ | CFG_CMD_ENV \
++ | CFG_CMD_USB \
++ | CFG_CMD_NOT \
++ | CFG_CMD_MISC \
++ | CFG_CMD_BMP) & ~(SKIP_COMMANDS) )
++
++/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
++#include <cmd_confdefs.h>
++#define CONFIG_BOOTDELAY 3
++#define CONFIG_BOOTCOMMAND "while not mmcdet ; do cls ; lecho \"insert SD card\" ; sleep 1 ; done ; cls" \
++ "if mmcwp ; then lecho \"write protected\" ; else lecho \"not write protected\" ; fi ; " \
++ "mmcinit; " \
++ "if fatload mmc 0 a0000000 init.scr ; then autoscr a0000000 ; fi"
++#define CONFIG_BOOTARGS "console=ttyS0,115200 DEBUG=1 ENV=/etc/bashrc init=/linuxrc rw mtdparts=phys:1024k(armboot),256k(params),-(rootfs1) root=/dev/mtdblock3 rootfstype=cramfs"
++#define CONFIG_CMDLINE_TAG
++
++#define CONFIG_GZIP
++
++#define CONFIG_AUTOBOOT_KEYED /* Enable password protection */
++#define CONFIG_AUTOBOOT_PROMPT "\nEnter password - autoboot in %d sec...\n"
++#define CONFIG_AUTOBOOT_DELAY_STR "\x1b\x1b\x1b"
++
++/*
++ * Choose one of the following:
++ *
++ * hitachi_qvga
++ * sharp_qvga
++ * hitachi_hvga
++ * sharp_vga
++ * hitachi_wvga - 7 or 9 inch
++ */
++#ifndef DA320X240
++#define DA320X240 0
++#define DA640X240 1
++#define DA800X480 2
++#define DA640X480 3
++#define DA240X320 4
++#define DA800X600 5
++#define DA1024X768 6
++#define DP480X320 7
++#define DP320X240 8
++#define DL122X32 9
++#endif
++
++#if DISPLAY_TYPE == DA640X240
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_hvga" "\0"
++#elif DISPLAY_TYPE == DA240X320
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=qvga_portrait" "\0"
++#elif DISPLAY_TYPE == DA320X240
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_qvga" "\0"
++#elif DISPLAY_TYPE == DA8000X480
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_wvga" "\0"
++#elif DISPLAY_TYPE == DA640X480
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=sharp_vga" "\0"
++#elif DISPLAY_TYPE == DA800X480
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=hitachi_wvga" "\0"
++#elif DISPLAY_TYPE == DA1024X768
++#define CONFIG_EXTRA_ENV_SETTINGS "panel=crt1024x768" "\0"
++#else
++#error No display selected
++#endif
++
++#define LCD_BPP LCD_COLOR8
++
++
++#if (CONFIG_COMMANDS & CFG_CMD_KGDB)
++#define CONFIG_KGDB_BAUDRATE 230400 /* speed to run kgdb serial port */
++#define CONFIG_KGDB_SER_INDEX 2 /* which serial port to use */
++#endif
++
++/*
++ * Miscellaneous configurable options
++ */
++#define CFG_HUSH_PARSER 1
++#define CFG_PROMPT_HUSH_PS2 "> "
++
++#define CFG_LONGHELP /* undef to save memory */
++#ifdef CFG_HUSH_PARSER
++#define CFG_PROMPT "$ " /* Monitor Command Prompt */
++#else
++#define CFG_PROMPT "=> " /* Monitor Command Prompt */
++#endif
++#define CFG_CBSIZE 256 /* Console I/O Buffer Size */
++#define CFG_PBSIZE (CFG_CBSIZE+sizeof(CFG_PROMPT)+16) /* Print Buffer Size */
++#define CFG_MAXARGS 16 /* max number of command args */
++#define CFG_BARGSIZE CFG_CBSIZE /* Boot Argument Buffer Size */
++#define CFG_DEVICE_NULLDEV 1
++
++#define CFG_MEMTEST_START 0xa0400000 /* memtest works on */
++#define CFG_MEMTEST_END 0xa0800000 /* 4 ... 8 MB in DRAM */
++
++#undef CFG_CLKS_IN_HZ /* everything, incl board info, in Hz */
++
++#define CFG_LOAD_ADDR 0xa0030000 /* default load address */
++
++#define CFG_HZ 3686400 /* incrementer freq: 3.6864 MHz */
++#define CFG_CPUSPEED 0x161 /* set core clock to 400/200/100 MHz */
++
++ /* valid baudrates */
++#define CFG_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, 115200 }
++#define CFG_MMC_BASE 0xF0000000
++
++/*
++ * Stack sizes
++ *
++ * The stack sizes are set up in start.S using the settings below
++ */
++#define CONFIG_STACKSIZE (128*1024) /* regular stack */
++#ifdef CONFIG_USE_IRQ
++#define CONFIG_STACKSIZE_IRQ (4*1024) /* IRQ stack */
++#define CONFIG_STACKSIZE_FIQ (4*1024) /* FIQ stack */
++#endif
++
++/*
++ * Physical Memory Map
++ */
++#define CONFIG_NR_DRAM_BANKS 1 /* we have 1 bank of DRAM */
++#define PHYS_SDRAM_1 0xa0000000 /* SDRAM Bank #1 */
++#define PHYS_SDRAM_1_SIZE 0x04000000 /* 64 MB */
++
++#define PHYS_FLASH_1 0x00000000 /* Flash Bank #1 */
++#define PHYS_FLASH_2 0x04000000 /* Flash Bank #2 */
++#define PHYS_FLASH_SIZE 0x02000000 /* 32 MB */
++#define PHYS_FLASH_BANK_SIZE 0x02000000 /* 32 MB Banks */
++#define PHYS_FLASH_SECT_SIZE 0x00040000 /* 256 KB sectors (x2) */
++
++#define CFG_DRAM_BASE 0xa0000000
++#define CFG_DRAM_SIZE 0x04000000
++
++
++/*
++ * Memory settings
++ */
++#define CFG_MSC0_VAL 0x23F223F2
++#define CFG_MSC1_VAL 0x3FF1A441
++#define CFG_MSC2_VAL 0x7FF97FF1
++#define CFG_MDCNFG_VAL 0x00001AC9
++#define CFG_MDREFR_VAL 0x00018018
++#define CFG_MDMRS_VAL 0x00000000
++
++/*
++ * FLASH and environment organization
++ */
++#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
++#define CFG_MAX_FLASH_SECT 128 /* max number of sectors on one chip */
++
++/* timeout values are in ticks */
++#define CFG_FLASH_ERASE_TOUT (25*CFG_HZ) /* Timeout for Flash Erase */
++#define CFG_FLASH_WRITE_TOUT (25*CFG_HZ) /* Timeout for Flash Write */
++
++/*
++ * Environment is saved in flash at offset 1MB
++ */
++#define CFG_ENV_IS_IN_FLASH 1
++#define CFG_FLASH_BASE 0
++#define CFG_ENV_ADDR ((CFG_FLASH_BASE)+0x100000) /* Addr of Environment Sector */
++#define CFG_ENV_OFFSET ((CFG_ENV_ADDR)-(CFG_FLASH_BASE))
++#define CFG_ENV_SIZE PHYS_FLASH_SECT_SIZE /* Total Size of Environment Sector */
++
++/*
++ * GPIO settings
++ */
++#define CFG_GPSR0_VAL 0x00008000
++#define CFG_GPSR1_VAL 0x00FC0382
++#define CFG_GPSR2_VAL 0x0001FFFF
++#define CFG_GPCR0_VAL 0x00000000
++#define CFG_GPCR1_VAL 0x00000000
++#define CFG_GPCR2_VAL 0x00000000
++#define CFG_GPDR0_VAL 0x0060A800
++#define CFG_GPDR1_VAL 0x00FF0382
++#define CFG_GPDR2_VAL 0x0001C000
++#define CFG_GAFR0_L_VAL 0x98400000
++#define CFG_GAFR0_U_VAL 0x00002950
++#define CFG_GAFR1_L_VAL 0x000A9558
++#define CFG_GAFR1_U_VAL 0x0005AAAA
++#define CFG_GAFR2_L_VAL 0xA0000000
++#define CFG_GAFR2_U_VAL 0x00000002
++
++#define CFG_PSSR_VAL 0x20
++
++/*
++ * PCMCIA and CF Interfaces
++ */
++#define CFG_MECR_VAL 0x00000000
++#define CFG_MCMEM0_VAL 0x00010504
++#define CFG_MCMEM1_VAL 0x00010504
++#define CFG_MCATT0_VAL 0x00010504
++#define CFG_MCATT1_VAL 0x00010504
++#define CFG_MCIO0_VAL 0x00004715
++#define CFG_MCIO1_VAL 0x00004715
++
++#ifndef __ASSEMBLY__
++
++extern unsigned long const fbStart ;
++extern unsigned long paletteRegs ;
++
++#endif /* _ASMLANGUAGE */
++
++#endif
++
+diff -u -r --new-file u-boot-1.1.2/include/fat.h u-boot-1.1.2-neon/include/fat.h
+--- u-boot-1.1.2/include/fat.h 2004-04-23 22:32:07.000000000 +0200
++++ u-boot-1.1.2-neon/include/fat.h 2007-08-11 21:07:21.000000000 +0200
+@@ -177,13 +177,13 @@
+
+ /* Private filesystem parameters */
+ typedef struct {
++ __u8 fatbuf[FATBUFSIZE]; /* Current FAT buffer */
+ int fatsize; /* Size of FAT in bits */
+ __u16 fatlength; /* Length of FAT in sectors */
+ __u16 fat_sect; /* Starting sector of the FAT */
+ __u16 rootdir_sect; /* Start sector of root directory */
+ __u16 clust_size; /* Size of clusters in sectors */
+ short data_begin; /* The sector of the first cluster, can be negative */
+- __u8 fatbuf[FATBUFSIZE]; /* Current FAT buffer */
+ int fatbufnum; /* Used by get_fatent, init to -1 */
+ } fsdata;
+
+diff -u -r --new-file u-boot-1.1.2/include/lcd.h u-boot-1.1.2-neon/include/lcd.h
+--- u-boot-1.1.2/include/lcd.h 2004-10-10 01:26:01.000000000 +0200
++++ u-boot-1.1.2-neon/include/lcd.h 2007-08-11 21:07:21.000000000 +0200
+@@ -31,7 +31,6 @@
+
+ extern char lcd_is_enabled;
+
+-extern int lcd_line_length;
+ extern int lcd_color_fg;
+ extern int lcd_color_bg;
+
+@@ -53,6 +52,7 @@
+ ushort vl_row; /* Number of rows (i.e. 480) */
+ ushort vl_width; /* Width of display area in millimeters */
+ ushort vl_height; /* Height of display area in millimeters */
++ int vl_lcd_line_length;
+
+ /* LCD configuration register */
+ u_char vl_clkp; /* Clock polarity */
+@@ -77,7 +77,7 @@
+
+ extern vidinfo_t panel_info;
+
+-#elif defined CONFIG_PXA250
++#elif defined( PXALCD )
+ /*
+ * PXA LCD DMA descriptor
+ */
+@@ -119,6 +119,7 @@
+ ushort vl_row; /* Number of rows (i.e. 480) */
+ ushort vl_width; /* Width of display area in millimeters */
+ ushort vl_height; /* Height of display area in millimeters */
++ int vl_lcd_line_length;
+
+ /* LCD configuration register */
+ u_char vl_clkp; /* Clock polarity */
+@@ -148,7 +149,29 @@
+
+ extern vidinfo_t panel_info;
+
+-#endif /* CONFIG_MPC823 or CONFIG_PXA250 */
++#if defined( CONFIG_PXA250 )
++ #define PALETTEVAL_TYPE u16
++#elif defined( CONFIG_PXA270 )
++ #define PALETTEVAL_TYPE u32
++#else
++#error no processor defined
++#endif
++
++#elif defined( CONFIG_SM501 )
++
++/*
++ * LCD controller stucture for PXA CPU
++ */
++typedef struct vidinfo {
++ ushort vl_col; /* Number of columns (i.e. 640) */
++ ushort vl_row; /* Number of rows (i.e. 480) */
++ int vl_lcd_line_length;
++ u_char vl_bpix; /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
++} vidinfo_t;
++
++extern vidinfo_t panel_info;
++
++#endif /* CONFIG_MPC823 */
+
+ /* Video functions */
+
+@@ -272,7 +295,7 @@
+ #endif
+
+ #define CONSOLE_COLS (panel_info.vl_col / VIDEO_FONT_WIDTH)
+-#define CONSOLE_ROW_SIZE (VIDEO_FONT_HEIGHT * lcd_line_length)
++#define CONSOLE_ROW_SIZE (VIDEO_FONT_HEIGHT * panel_info.vl_lcd_line_length)
+ #define CONSOLE_ROW_FIRST (lcd_console_address)
+ #define CONSOLE_ROW_SECOND (lcd_console_address + CONSOLE_ROW_SIZE)
+ #define CONSOLE_ROW_LAST (lcd_console_address + CONSOLE_SIZE \
+diff -u -r --new-file u-boot-1.1.2/include/lcd_panels.h u-boot-1.1.2-neon/include/lcd_panels.h
+--- u-boot-1.1.2/include/lcd_panels.h 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/include/lcd_panels.h 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,83 @@
++#ifndef __LCD_PANELS_H__
++#define __LCD_PANELS_H__ "$Id: lcd_panels.h,v 1.3 2005/06/02 04:03:37 ericn Exp $"
++
++/*
++ * lcd_panels.h
++ *
++ * This header file declares the lcd_panel_info_t
++ * data type and the num_lcd_panels and lcd_panels
++ * constants for use in initializing a variety of displays.
++ *
++ * Note that this is based on the pxafb_mach_info structure
++ * in linux-2.4.19/drivers/video/pxafb.h (Nico's patches),
++ * but differs in a couple of respects:
++ *
++ * Doesn't support the color-mapping stuff
++ * Includes an 'active' flag
++ *
++ * Doesn't include the lccr0 and lccr3 fields, since most of
++ * the fields in those registers are display controller options,
++ * not panel options, and the others (so far) can have reasonable
++ * defaults. When (if) we need to support a non-standard display,
++ * we can fill in the blanks with defaults in the previously
++ * supported displays and compute lccr0 and lccr3.
++ *
++ * Change History :
++ *
++ * $Log: lcd_panels.h,v $
++ * Revision 1.3 2005/06/02 04:03:37 ericn
++ * -added rotation field
++ *
++ * Revision 1.2 2005/04/30 20:33:36 ericn
++ * -added CRT support
++ *
++ * Revision 1.1 2005/04/09 17:49:18 ericn
++ * -Initial import
++ *
++ *
++ * Copyright Boundary Devices, Inc. 2005
++ */
++
++struct lcd_panel_info_t {
++ char const *name ;
++ unsigned long pixclock;
++
++ unsigned short xres;
++ unsigned short yres;
++
++ unsigned act_high ; // clock is active high
++ unsigned hsync_len;
++ unsigned left_margin;
++ unsigned right_margin;
++ unsigned vsync_len;
++ unsigned upper_margin;
++ unsigned lower_margin;
++ unsigned active ; // active matrix (TFT) LCD
++ unsigned crt ; // 1 == CRT, not LCD
++ unsigned rotation ;
++};
++
++#ifdef __cplusplus
++extern "C" {
++#endif
++
++extern unsigned const num_lcd_panels ;
++extern struct lcd_panel_info_t const * const lcd_panels ;
++
++extern struct lcd_panel_info_t const *find_lcd_panel( char const * name );
++
++
++//
++// Each platform needs to define this routine, and
++// set cur_lcd_panel within
++//
++void set_lcd_panel( struct lcd_panel_info_t const *panel );
++extern struct lcd_panel_info_t const *cur_lcd_panel ;
++void disable_lcd_panel( void );
++
++#ifdef __CPLUSPLUS
++};
++#endif
++
++#endif
++
+diff -u -r --new-file u-boot-1.1.2/include/part.h u-boot-1.1.2-neon/include/part.h
+--- u-boot-1.1.2/include/part.h 2004-04-18 19:39:40.000000000 +0200
++++ u-boot-1.1.2-neon/include/part.h 2007-08-11 21:07:21.000000000 +0200
+@@ -24,6 +24,48 @@
+ #define _PART_H
+ #include <ide.h>
+
++enum {
++/* These three have identical behaviour; use the second one if DOS fdisk gets
++ confused about extended/logical partitions starting past cylinder 1023. */
++ DOS_EXTENDED_PARTITION = 5,
++ LINUX_EXTENDED_PARTITION = 0x85,
++ WIN98_EXTENDED_PARTITION = 0x0f,
++
++ LINUX_SWAP_PARTITION = 0x82,
++ LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */
++
++ SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION,
++
++ DM6_PARTITION = 0x54, /* has DDO: use xlated geom & offset */
++ EZD_PARTITION = 0x55, /* EZ-DRIVE */
++ DM6_AUX1PARTITION = 0x51, /* no DDO: use xlated geom */
++ DM6_AUX3PARTITION = 0x53, /* no DDO: use xlated geom */
++
++ FREEBSD_PARTITION = 0xa5, /* FreeBSD Partition ID */
++ OPENBSD_PARTITION = 0xa6, /* OpenBSD Partition ID */
++ NETBSD_PARTITION = 0xa9, /* NetBSD Partition ID */
++ BSDI_PARTITION = 0xb7, /* BSDI Partition ID */
++/* Ours is not to wonder why.. */
++ BSD_PARTITION = FREEBSD_PARTITION,
++ MINIX_PARTITION = 0x81, /* Minix Partition ID */
++ PLAN9_PARTITION = 0x39, /* Plan 9 Partition ID */
++ UNIXWARE_PARTITION = 0x63, /* Partition ID, same as */
++ /* GNU_HURD and SCO Unix */
++};
++
++struct partition {
++ unsigned char boot_ind; /* 0x80 - active */
++ unsigned char head; /* starting head */
++ unsigned char sector; /* starting sector */
++ unsigned char cyl; /* starting cylinder */
++ unsigned char sys_ind; /* What partition type */
++ unsigned char end_head; /* end head */
++ unsigned char end_sector; /* end sector */
++ unsigned char end_cyl; /* end cylinder */
++ unsigned int start_sect; /* starting sector counting from 0 */
++ unsigned int nr_sects; /* nr of sectors in partition */
++} __attribute__((packed));
++
+ typedef struct block_dev_desc {
+ int if_type; /* type of the interface */
+ int dev; /* device number */
+@@ -118,4 +160,15 @@
+ int test_part_amiga (block_dev_desc_t *dev_desc);
+ #endif
+
++/* Value returned by `fnmatch' if STRING does not match PATTERN. */
++#define FNM_NOMATCH 1
++
++/* Bits set in the FLAGS argument to `fnmatch'. */
++#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
++#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
++#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
++#define FNM_NOSYS (-1)
++
++int fnmatch(const char *pattern, const char *string, int flags);
++
+ #endif /* _PART_H */
+diff -u -r --new-file u-boot-1.1.2/lib_arm/armlinux.c u-boot-1.1.2-neon/lib_arm/armlinux.c
+--- u-boot-1.1.2/lib_arm/armlinux.c 2004-10-10 01:26:01.000000000 +0200
++++ u-boot-1.1.2-neon/lib_arm/armlinux.c 2007-08-11 21:07:21.000000000 +0200
+@@ -29,6 +29,7 @@
+ #ifdef CONFIG_HAS_DATAFLASH
+ #include <dataflash.h>
+ #endif
++#include "lcd_panels.h"
+
+ /*cmd_boot.c*/
+ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
+@@ -88,6 +89,16 @@
+
+ #ifdef CONFIG_CMDLINE_TAG
+ char *commandline = getenv ("bootargs");
++ if( ( 0 != cur_lcd_panel ) && ( 0 != cur_lcd_panel->rotation ) )
++ {
++ char temp[80];
++ int addedLen = sprintf( temp, " fbrotation=%u", cur_lcd_panel->rotation );
++ unsigned cmdLen = strlen( commandline );
++ char *bigger = (char *)malloc( cmdLen + addedLen + 1 );
++ strcpy( bigger, commandline );
++ strcpy( bigger+cmdLen, temp );
++ commandline = bigger ;
++ }
+ #endif
+
+ theKernel = (void (*)(int, int, uint))ntohl(hdr->ih_ep);
+@@ -365,6 +376,7 @@
+ * We only use it to pass the address and size, the other entries
+ * in the tag_videolfb are not of interest.
+ */
++#ifdef VESA_DISPLAY
+ params->hdr.tag = ATAG_VIDEOLFB;
+ params->hdr.size = tag_size (tag_videolfb);
+
+@@ -374,6 +386,7 @@
+ params->u.videolfb.lfb_size = calc_fbsize();
+
+ params = tag_next (params);
++#endif
+ }
+ #endif /* CONFIG_VFD || CONFIG_LCD */
+
+diff -u -r --new-file u-boot-1.1.2/lib_arm/board.c u-boot-1.1.2-neon/lib_arm/board.c
+--- u-boot-1.1.2/lib_arm/board.c 2004-08-02 00:48:22.000000000 +0200
++++ u-boot-1.1.2-neon/lib_arm/board.c 2007-08-11 21:07:21.000000000 +0200
+@@ -216,7 +216,10 @@
+ #endif
+
+ /* Pointer is writable since we allocated a register for it */
+- gd = (gd_t*)(_armboot_start - CFG_MALLOC_LEN - sizeof(gd_t));
++#ifndef CFG_MMU_SPACE_RESERVED
++#define CFG_MMU_SPACE_RESERVED 0
++#endif
++ gd = (gd_t*)(_armboot_start - CFG_MMU_SPACE_RESERVED - CFG_MALLOC_LEN - sizeof(gd_t));
+ /* compiler optimization barrier needed for GCC >= 3.4 */
+ __asm__ __volatile__("": : :"memory");
+
+@@ -263,7 +266,7 @@
+ #endif /* CONFIG_LCD */
+
+ /* armboot_start is defined in the board-specific linker script */
+- mem_malloc_init (_armboot_start - CFG_MALLOC_LEN);
++ mem_malloc_init (_armboot_start - CFG_MMU_SPACE_RESERVED - CFG_MALLOC_LEN);
+
+ #if (CONFIG_COMMANDS & CFG_CMD_NAND)
+ puts ("NAND:");
+diff -u -r --new-file u-boot-1.1.2/make_all u-boot-1.1.2-neon/make_all
+--- u-boot-1.1.2/make_all 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/make_all 2007-08-11 21:07:21.000000000 +0200
+@@ -0,0 +1,31 @@
++#!/bin/sh
++halogen1_clock="416"
++halogen2_clock="416"
++bd2003_clock="400"
++neon_clock="400"
++neonb_clock="400"
++
++SOFTWARE="LINUX"
++
++targets="halogen1 halogen2 bd2003 neon neonb"
++for suff in $targets ; do
++ make distclean ;
++ REV=""
++ PLATFORM="$suff"
++ if [ $suff = "halogen1" ] ; then REV="1\n"; PLATFORM="halogen"
++ else
++ if [ $suff = "halogen2" ] ; then REV="2\n"; PLATFORM="halogen"
++ fi
++ fi
++ eval clock=\$$suff"_clock"
++ echo -e "DA640X240\n$REV$SOFTWARE\ny\n$clock\n" | make $PLATFORM"_config" ;
++ make u-boot.bin ;
++ mv u-boot.bin u-boot-$suff
++done
++
++
++for suff in $targets ; do
++ mv u-boot-$suff u-boot-$suff.bin
++done
++
++zip u-boot-binaries.zip u-boot-*.bin
+diff -u -r --new-file u-boot-1.1.2/Makefile u-boot-1.1.2-neon/Makefile
+--- u-boot-1.1.2/Makefile 2004-12-19 10:58:11.000000000 +0100
++++ u-boot-1.1.2-neon/Makefile 2007-08-11 21:17:14.000000000 +0200
+@@ -57,7 +57,7 @@
+ CROSS_COMPILE = ppc_8xx-
+ endif
+ ifeq ($(ARCH),arm)
+-CROSS_COMPILE = arm-linux-
++CROSS_COMPILE = arm-elf-
+ endif
+ ifeq ($(ARCH),i386)
+ ifeq ($(HOSTARCH),i386)
+@@ -89,6 +89,9 @@
+ #########################################################################
+ # U-Boot objects....order is important (i.e. start must be first)
+
++ifeq ($(CPU),pxa)
++OBJS =
++else
+ OBJS = cpu/$(CPU)/start.o
+ ifeq ($(CPU),i386)
+ OBJS += cpu/$(CPU)/start16.o
+@@ -100,6 +103,7 @@
+ ifeq ($(CPU),mpc85xx)
+ OBJS += cpu/$(CPU)/resetvec.o
+ endif
++endif
+
+ LIBS = lib_generic/libgeneric.a
+ LIBS += board/$(BOARDDIR)/lib$(BOARD).a
+@@ -121,7 +125,8 @@
+ .PHONY : $(LIBS)
+
+ # Add GCC lib
+-PLATFORM_LIBS += --no-warn-mismatch -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc
++LIBGCC_DIRNAME := $(shell dirname "`$(CC) $(CFLAGS) -print-libgcc-file-name`")
++PLATFORM_LIBS += --no-warn-mismatch -L "$(LIBGCC_DIRNAME)" -lgcc
+
+
+ # The "tools" are needed early, so put this first
+@@ -129,13 +134,14 @@
+ SUBDIRS = tools \
+ examples \
+ post \
+- post/cpu
++ post/cpu \
++ cpu/$(CPU)
+ .PHONY : $(SUBDIRS)
+
+ #########################################################################
+ #########################################################################
+
+-ALL = u-boot.srec u-boot.bin System.map
++ALL = u-boot.srec u-boot.bin System.map init.scr upgrade.scr
+
+ all: $(ALL)
+
+@@ -192,6 +198,12 @@
+ grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \
+ sort > System.map
+
++init.scr: board/$(BOARDDIR)/init.script
++ tools/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "autoscript" -d $< $@
++
++upgrade.scr: upgrade.script
++ tools/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "U-Boot upgrade script" -d $< $@
++
+ #########################################################################
+ else
+ all install u-boot u-boot.srec depend dep:
+@@ -203,6 +215,7 @@
+
+ unconfig:
+ @rm -f include/config.h include/config.mk board/*/config.tmp
++ @rm -f select.mk include/configs/select.h
+
+ #========================================================================
+ # PowerPC
+@@ -1388,6 +1401,22 @@
+ wepep250_config : unconfig
+ @./mkconfig $(@:_config=) arm pxa wepep250
+
++bd-neon_config : unconfig
++ @./mkconfig $(@:_config=) arm pxa neon
++ ./Configure --PLATFORM_TYPE=NEON
++
++neonb_config : unconfig
++ @./mkconfig neon arm pxa neon
++ ./Configure --PLATFORM_TYPE=NEONB --SOFTWARE_TYPE=WINCE --DISPLAY_TYPE=DA640X240
++
++bd2003_config : unconfig
++ @./mkconfig $(@:_config=) arm pxa bd2003
++ ./Configure --PLATFORM_TYPE=BD2003
++
++halogen_config : unconfig
++ @./mkconfig $(@:_config=) arm pxa halogen
++ ./Configure --PLATFORM_TYPE=HALOGEN
++
+ xaeniax_config : unconfig
+ @./mkconfig $(@:_config=) arm pxa xaeniax
+
+@@ -1558,10 +1587,16 @@
+ #########################################################################
+ #########################################################################
+
++ifeq ($(HOSTOS),cygwin)
++FIND = /bin/find
++else
++FIND = find
++endif
++
+ clean:
+- find . -type f \
++ $(FIND) . -type f \
+ \( -name 'core' -o -name '*.bak' -o -name '*~' \
+- -o -name '*.o' -o -name '*.a' \) -print \
++ -o -name '*.o' -o -name '*.a' -o -name '*.lst' \) -print \
+ | xargs rm -f
+ rm -f examples/hello_world examples/timer \
+ examples/eepro100_eeprom examples/sched \
+@@ -1575,7 +1610,7 @@
+ rm -f board/trab/trab_fkt
+
+ clobber: clean
+- find . -type f \( -name .depend \
++ $(FIND) . -type f \( -name .depend \
+ -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \
+ -print0 \
+ | xargs -0 rm -f
+@@ -1585,6 +1620,8 @@
+ rm -f tools/crc32.c tools/environment.c tools/env/crc32.c
+ rm -f tools/inca-swap-bytes cpu/mpc824x/bedbug_603e.c
+ rm -f include/asm/proc include/asm/arch include/asm
++ cd tools && rm -f *.exe
++ rm -f include/configs/select.h select.mk select.log
+
+ mrproper \
+ distclean: clobber unconfig
+diff -u -r --new-file u-boot-1.1.2/patches/arm_flags.patch u-boot-1.1.2-neon/patches/arm_flags.patch
+--- u-boot-1.1.2/patches/arm_flags.patch 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/patches/arm_flags.patch 2007-08-11 21:01:36.000000000 +0200
+@@ -0,0 +1,15 @@
++
++#
++# Patch managed by http://www.holgerschurig.de/patcher.html
++#
++
++--- u-boot-1.1.2/cpu/pxa/config.mk~armflags
+++++ u-boot-1.1.2/cpu/pxa/config.mk
++@@ -23,6 +23,6 @@
++ #
++
++ PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
++- -mshort-load-bytes -msoft-float
+++ -msoft-float
++
++ PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=strongarm1100
+diff -u -r --new-file u-boot-1.1.2/patches/series u-boot-1.1.2-neon/patches/series
+--- u-boot-1.1.2/patches/series 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/patches/series 2007-08-11 21:01:36.000000000 +0200
+@@ -0,0 +1,2 @@
++arm_flags.patch -p1
++u-boot-2006-06-03.patch.gz -p1
+Binary files u-boot-1.1.2/patches/u-boot-2006-06-03.patch.gz and u-boot-1.1.2-neon/patches/u-boot-2006-06-03.patch.gz differ
+diff -u -r --new-file u-boot-1.1.2/.pc/applied-patches u-boot-1.1.2-neon/.pc/applied-patches
+--- u-boot-1.1.2/.pc/applied-patches 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/.pc/applied-patches 2007-08-11 21:01:36.000000000 +0200
+@@ -0,0 +1 @@
++arm_flags.patch
+diff -u -r --new-file u-boot-1.1.2/.pc/arm_flags.patch/cpu/pxa/config.mk u-boot-1.1.2-neon/.pc/arm_flags.patch/cpu/pxa/config.mk
+--- u-boot-1.1.2/.pc/arm_flags.patch/cpu/pxa/config.mk 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/.pc/arm_flags.patch/cpu/pxa/config.mk 2003-05-23 14:36:21.000000000 +0200
+@@ -0,0 +1,28 @@
++#
++# (C) Copyright 2002
++# Sysgo Real-Time Solutions, GmbH <www.elinos.com>
++# Marius Groeger <mgroeger@sysgo.de>
++#
++# See file CREDITS for list of people who contributed to this
++# project.
++#
++# This program is free software; you can redistribute it and/or
++# modify it under the terms of the GNU General Public License as
++# published by the Free Software Foundation; either version 2 of
++# the License, or (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++# MA 02111-1307 USA
++#
++
++PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
++ -mshort-load-bytes -msoft-float
++
++PLATFORM_CPPFLAGS += -mapcs-32 -march=armv4 -mtune=strongarm1100
+diff -u -r --new-file u-boot-1.1.2/.pc/.version u-boot-1.1.2-neon/.pc/.version
+--- u-boot-1.1.2/.pc/.version 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/.pc/.version 2007-08-11 21:01:36.000000000 +0200
+@@ -0,0 +1 @@
++2
+diff -u -r --new-file u-boot-1.1.2/README u-boot-1.1.2-neon/README
+--- u-boot-1.1.2/README 2004-12-16 22:44:03.000000000 +0100
++++ u-boot-1.1.2-neon/README 2007-08-11 21:07:19.000000000 +0200
+@@ -608,6 +608,7 @@
+ CFG_CMD_ITEST Integer/string test of 2 values
+ CFG_CMD_JFFS2 * JFFS2 Support
+ CFG_CMD_KGDB * kgdb
++ CFG_CMD_LCDPANEL * Dynamic LCD Panel support
+ CFG_CMD_LOADB loadb
+ CFG_CMD_LOADS loads
+ CFG_CMD_MEMORY md, mm, nm, mw, cp, cmp, crc, base,
+@@ -812,6 +813,9 @@
+ for differential drivers: 0x00001000
+ for single ended drivers: 0x00005000
+
++- Dynamic LCD Panel support
++ Allows the choice of an LCD panel through the environment.
++ Also allows prompting for panel characteristics.
+
+ - MMC Support:
+ The MMC controller on the Intel PXA is supported. To
+diff -u -r --new-file u-boot-1.1.2/tools/mkimage.c u-boot-1.1.2-neon/tools/mkimage.c
+--- u-boot-1.1.2/tools/mkimage.c 2004-11-21 01:06:36.000000000 +0100
++++ u-boot-1.1.2-neon/tools/mkimage.c 2007-08-11 21:07:22.000000000 +0200
+@@ -618,10 +618,10 @@
+ printf ("Image Name: %.*s\n", IH_NMLEN, hdr->ih_name);
+ printf ("Created: %s", ctime(&timestamp));
+ printf ("Image Type: "); print_type(hdr);
+- printf ("Data Size: %d Bytes = %.2f kB = %.2f MB\n",
++ printf ("Data Size: %ld Bytes = %.2f kB = %.2f MB\n",
+ size, (double)size / 1.024e3, (double)size / 1.048576e6 );
+- printf ("Load Address: 0x%08X\n", ntohl(hdr->ih_load));
+- printf ("Entry Point: 0x%08X\n", ntohl(hdr->ih_ep));
++ printf ("Load Address: 0x%08lX\n", ntohl(hdr->ih_load));
++ printf ("Entry Point: 0x%08lX\n", ntohl(hdr->ih_ep));
+
+ if (hdr->ih_type == IH_TYPE_MULTI || hdr->ih_type == IH_TYPE_SCRIPT) {
+ int i, ptrs;
+@@ -640,7 +640,7 @@
+ for (i=0; len_ptr[i]; ++i) {
+ size = ntohl(len_ptr[i]);
+
+- printf (" Image %d: %8d Bytes = %4d kB = %d MB\n",
++ printf (" Image %d: %8ld Bytes = %4ld kB = %ld MB\n",
+ i, size, size>>10, size>>20);
+ if (hdr->ih_type == IH_TYPE_SCRIPT && i > 0) {
+ /*
+@@ -648,7 +648,7 @@
+ * if planning to do something with
+ * multiple files
+ */
+- printf (" Offset = %08X\n", pos);
++ printf (" Offset = %08lX\n", pos);
+ }
+ /* copy_file() will pad the first files to even word align */
+ size += 3;
+diff -u -r --new-file u-boot-1.1.2/upgrade.script u-boot-1.1.2-neon/upgrade.script
+--- u-boot-1.1.2/upgrade.script 1970-01-01 01:00:00.000000000 +0100
++++ u-boot-1.1.2-neon/upgrade.script 2007-08-11 21:07:22.000000000 +0200
+@@ -0,0 +1,32 @@
++lecho "---------> upgrade to newest U-Boot"
++echo "---------> upgrade to newest U-Boot"
++if fatload mmc 0 a0008000 u-boot-*.bin ; then
++ if cmp.b 0 a0008000 $filesize ; then
++ fatload mmc 0 a0008000 *.bmp
++ bmp display a0008000
++ lecho 'Already upgraded. Latest U-Boot is installed' ;
++ echo 'Already upgraded. Latest U-Boot is installed' ;
++ if mmcwp ; then
++ lecho "write protected" ;
++ else
++ lecho "not write protected" ;
++ fi
++ else
++ lecho 'Old U-Boot found. Upgrading' ;
++ echo 'Old U-Boot found. Upgrading' ;
++ protect off all ;
++ lecho 'Erasing' ;
++ echo 'Erasing' ;
++ erase 0 3FFFF ;
++ lecho 'Programming' ;
++ echo 'Programming' ;
++ cp.b a0008000 0 $filesize ;
++ lecho 'Done programming. Cycle power' ;
++ echo 'Done programming. Cycle power' ;
++ fi
++else
++ lecho 'Error loading new U-Boot from SD card'
++ echo 'Error loading new U-Boot from SD card'
++ lecho 'Should have u-boot-neon-something.bin'
++ echo 'Should have u-boot-neon-something.bin'
++fi
+\ No newline at end of file
diff --git a/packages/uboot/u-boot-mkimage-openmoko-native_oe.bb b/packages/uboot/u-boot-mkimage-openmoko-native_oe.bb
index 8d69a54c4c..d0d47d84d8 100644
--- a/packages/uboot/u-boot-mkimage-openmoko-native_oe.bb
+++ b/packages/uboot/u-boot-mkimage-openmoko-native_oe.bb
@@ -55,6 +55,7 @@ file://uboot-gta02.patch;patch=1 \
file://uboot-s3c2443.patch;patch=1 \
file://uboot-smdk2443.patch;patch=1 \
file://unbusy-i2c.patch;patch=1 \
+file://makefile-no-dirafter.patch;patch=1 \
"
PROVIDES = ""
diff --git a/packages/uboot/u-boot_1.1.2.bb b/packages/uboot/u-boot_1.1.2.bb
index 02fff45968..82b169ccc4 100644
--- a/packages/uboot/u-boot_1.1.2.bb
+++ b/packages/uboot/u-boot_1.1.2.bb
@@ -1,4 +1,4 @@
-PR = "r1"
+PR = "r2"
require u-boot.inc
SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
@@ -10,6 +10,7 @@ SRC_URI_append_mnci = "file://mnci.patch;patch=1 \
file://command-names.patch;patch=1"
SRC_URI_append_magicbox = "file://u-boot-emetec.patch;patch=1 "
+SRC_URI_append_bd-neon = "file://u-boot-1.1.2-neon.patch;patch=1"
# TODO: SRC_URI_append_rt3000
diff --git a/packages/uboot/uboot-openmoko_1.2.0+gitf34024d4a328e6edd906456da98d2c537155c4f7+svn2943.bb b/packages/uboot/uboot-openmoko_1.2.0+gitf34024d4a328e6edd906456da98d2c537155c4f7+svn2943.bb
index 2a09c76f09..1cee1edf37 100644
--- a/packages/uboot/uboot-openmoko_1.2.0+gitf34024d4a328e6edd906456da98d2c537155c4f7+svn2943.bb
+++ b/packages/uboot/uboot-openmoko_1.2.0+gitf34024d4a328e6edd906456da98d2c537155c4f7+svn2943.bb
@@ -19,6 +19,7 @@ SRC_URI = "\
svn://svn.openmoko.org/trunk/src/target/u-boot;module=patches;rev=${UBOOT_OPENMOKO_REV};proto=http \
file://uboot-eabi-fix-HACK.patch \
file://uboot-20070311-tools_makefile_ln_sf.patch;patch=1 \
+ file://makefile-no-dirafter.patch;patch=1 \
"
EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
diff --git a/packages/uboot/uboot-openmoko_svn.bb b/packages/uboot/uboot-openmoko_svn.bb
index 3669b409da..a13b3df461 100644
--- a/packages/uboot/uboot-openmoko_svn.bb
+++ b/packages/uboot/uboot-openmoko_svn.bb
@@ -5,11 +5,11 @@ SECTION = "bootloader"
PRIORITY = "optional"
PROVIDES = "virtual/bootloader"
PV = "1.2.0+git${SRCDATE}+svnr${SRCREV}"
-PR = "r1"
+PR = "r2"
SRCREV_FORMAT = "patches"
-UBOOT_MACHINES = "gta01bv2 gta01bv3 gta01bv4 smdk2440 hxd8 qt2410 gta02v1 gta02v2"
+UBOOT_MACHINES = "gta01bv2 gta01bv3 gta01bv4 smdk2440 hxd8 qt2410 gta02v1 gta02v2 gta02v3 gta02v4"
DEFAULT_PREFERENCE = "-1"
@@ -18,6 +18,7 @@ SRC_URI = "\
svn://svn.openmoko.org/trunk/src/target/u-boot;module=patches;proto=http;name=patches \
file://uboot-eabi-fix-HACK.patch \
file://uboot-20070311-tools_makefile_ln_sf.patch;patch=1 \
+ file://makefile-no-dirafter.patch;patch=1 \
"
S = "${WORKDIR}/git"
diff --git a/packages/uclibc/elf2flt_svn.bb b/packages/uclibc/elf2flt_svn.bb
index ef142baf06..0fac49d468 100644
--- a/packages/uclibc/elf2flt_svn.bb
+++ b/packages/uclibc/elf2flt_svn.bb
@@ -9,7 +9,7 @@ SRC_URI = "svn://sources.blackfin.uclinux.org/toolchain/trunk;module=${PN}"
S = "${WORKDIR}/${PN}"
-EXTRA_OECONF = " --with-libbfd=${CROSS_DIR}/${TARGET_SYS}/lib/libbfd.a \
- --with-libiberty=${CROSS_DIR}/${TARGET_SYS}/lib/libiberty.a \
- --with-bfd-include-dir=${CROSS_DIR}/${TARGET_SYS}/include \
+EXTRA_OECONF = " --with-libbfd=${STAGING_DIR}/${TARGET_SYS}/lib/libbfd.a \
+ --with-libiberty=${STAGING_DIR}/${TARGET_SYS}/lib/libiberty.a \
+ --with-bfd-include-dir=${STAGING_DIR}/${TARGET_SYS}/include \
"
diff --git a/packages/uclibc/uclibc-0.9.29/cm-x270/.mtn2git_empty b/packages/uclibc/uclibc-0.9.29/cm-x270/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.29/cm-x270/.mtn2git_empty
diff --git a/packages/uclibc/uclibc-0.9.29/compulab-pxa270/uClibc.machine b/packages/uclibc/uclibc-0.9.29/cm-x270/uClibc.machine
index e27931cf6b..e27931cf6b 100644
--- a/packages/uclibc/uclibc-0.9.29/compulab-pxa270/uClibc.machine
+++ b/packages/uclibc/uclibc-0.9.29/cm-x270/uClibc.machine
diff --git a/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-001-fix-mmap.patch b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-001-fix-mmap.patch
new file mode 100644
index 0000000000..4775e8c332
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-001-fix-mmap.patch
@@ -0,0 +1,91 @@
+--- uClibc-0.9.29.oorig/test/mmap/mmap2.c (revision 0)
++++ uClibc-0.9.29/test/mmap/mmap2.c (revision 18616)
+@@ -0,0 +1,41 @@
++/* When trying to map /dev/mem with offset 0xFFFFF000 on the ARM platform, mmap
++ * returns -EOVERFLOW.
++ *
++ * Since off_t is defined as a long int and the sign bit is set in the address,
++ * the shift operation shifts in ones instead of zeroes
++ * from the left. This results the offset sent to the kernel function becomes
++ * 0xFFFFFFFF instead of 0x000FFFFF with MMAP2_PAGE_SHIFT set to 12.
++ */
++
++#include <unistd.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <sys/mman.h>
++
++#define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]\n", \
++ __LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0)
++
++#define MAP_SIZE 4096UL
++#define MAP_MASK (MAP_SIZE - 1)
++
++int main(int argc, char **argv) {
++ void* map_base = 0;
++ int fd;
++ off_t target = 0xfffff000;
++ if((fd = open("/dev/mem", O_RDWR | O_SYNC)) == -1) FATAL;
++ printf("/dev/mem opened.\n");
++ fflush(stdout);
++
++ /* Map one page */
++ map_base = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED,
++ fd, target & ~MAP_MASK);
++ if(map_base == (void *) -1) FATAL;
++ printf("Memory mapped at address %p.\n", map_base);
++ fflush(stdout);
++ if(munmap(map_base, MAP_SIZE) == -1) FATAL;
++ close(fd);
++ return 0;
++}
+--- uClibc-0.9.29.oorig/libc/sysdeps/linux/arm/mmap.c (revision 18615)
++++ uClibc-0.9.29/libc/sysdeps/linux/arm/mmap.c (revision 18616)
+@@ -27,7 +27,6 @@ __ptr_t mmap(__ptr_t addr, size_t len, i
+
+ #elif defined (__NR_mmap2)
+ #define __NR__mmap __NR_mmap2
+-
+ #ifndef MMAP2_PAGE_SHIFT
+ # define MMAP2_PAGE_SHIFT 12
+ #endif
+@@ -39,9 +38,17 @@ __ptr_t mmap(__ptr_t addr, size_t len, i
+ {
+ /* check if offset is page aligned */
+ if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1))
++ {
++ __set_errno(EINVAL);
+ return MAP_FAILED;
++ }
++#ifdef __USE_FILE_OFFSET64
++ return (__ptr_t) _mmap (addr, len, prot, flags,
++ fd,((__u_quad_t) offset >> MMAP2_PAGE_SHIFT));
++#else
+ return (__ptr_t) _mmap (addr, len, prot, flags,
+- fd,(off_t) (offset >> MMAP2_PAGE_SHIFT));
++ fd,((__u_long) offset >> MMAP2_PAGE_SHIFT));
++#endif
+ }
+ #elif defined (__NR_mmap)
+ # define __NR__mmap __NR_mmap
+--- uClibc-0.9.29.oorig/libc/sysdeps/linux/common/mmap64.c (revision 18615)
++++ uClibc-0.9.29/libc/sysdeps/linux/common/mmap64.c (revision 18616)
+@@ -58,8 +58,13 @@ __ptr_t mmap64(__ptr_t addr, size_t len,
+ __set_errno(EINVAL);
+ return MAP_FAILED;
+ }
+-
+- return __syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT));
++#ifdef __USE_FILE_OFFSET64
++ return __syscall_mmap2(addr, len, prot, flags,
++ fd,((__u_quad_t)offset >> MMAP2_PAGE_SHIFT));
++#else
++ return __syscall_mmap2(addr, len, prot, flags,
++ fd,((__u_long)offset >> MMAP2_PAGE_SHIFT));
++#endif
+ }
+
+ # endif
diff --git a/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-conditional-sched_affinity.patch b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-conditional-sched_affinity.patch
new file mode 100644
index 0000000000..509c42af52
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-conditional-sched_affinity.patch
@@ -0,0 +1,53 @@
+diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c
+--- uClibc-0.9.29/libc/sysdeps/linux/common/sched_getaffinity.c 2007-02-12 16:52:32.000000000 -0600
++++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_getaffinity.c 2007-05-09 18:05:09.397411811 -0500
+@@ -29,6 +29,7 @@
+ #include <sys/param.h>
+ #include <sys/types.h>
+
++#ifdef __NR_sched_getaffinity
+ libc_hidden_proto(memset)
+
+ #define __NR___syscall_sched_getaffinity __NR_sched_getaffinity
+@@ -48,5 +49,15 @@
+ }
+ return res;
+ }
++#else
++/*
++int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset)
++{
++ __set_errno(ENOSYS);
++ return -1;
++}
++*/
+ #endif
+ #endif
++
++#endif
+diff -ur uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c
+--- uClibc-0.9.29/libc/sysdeps/linux/common/sched_setaffinity.c 2007-02-12 16:52:32.000000000 -0600
++++ uClibc-0.9.29-patched/libc/sysdeps/linux/common/sched_setaffinity.c 2007-05-09 18:05:09.397411811 -0500
+@@ -31,6 +31,7 @@
+ #include <sys/types.h>
+ #include <alloca.h>
+
++#ifdef __NR_sched_setaffinity
+ libc_hidden_proto(getpid)
+
+ #define __NR___syscall_sched_setaffinity __NR_sched_setaffinity
+@@ -74,5 +75,14 @@
+
+ return INLINE_SYSCALL (sched_setaffinity, 3, pid, cpusetsize, cpuset);
+ }
++#else
++/*
++int sched_setaffinity(pid_t pid, size_t cpusetsize, const cpu_set_t *cpuset)
++{
++ __set_errno(ENOSYS);
++ return -1;
++}
++*/
++#endif
+ #endif
+ #endif
diff --git a/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch
new file mode 100644
index 0000000000..7b246c1ad7
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-fix-gethostent_r-failure-retval.patch
@@ -0,0 +1,12 @@
+diff -ur uClibc-0.9.29/libc/inet/resolv.c uClibc-0.9.29-patched/libc/inet/resolv.c
+--- uClibc-0.9.29/libc/inet/resolv.c 2007-04-23 12:01:05.000000000 -0500
++++ uClibc-0.9.29-patched/libc/inet/resolv.c 2007-05-09 18:05:33.563404419 -0500
+@@ -1700,7 +1700,7 @@
+ int gethostent_r(struct hostent *result_buf, char *buf, size_t buflen,
+ struct hostent **result, int *h_errnop)
+ {
+- int ret;
++ int ret = HOST_NOT_FOUND;
+
+ __UCLIBC_MUTEX_LOCK(mylock);
+ if (__gethostent_fp == NULL) {
diff --git a/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-fix-internal_function-definition.patch b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-fix-internal_function-definition.patch
new file mode 100644
index 0000000000..9b88d826f1
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-fix-internal_function-definition.patch
@@ -0,0 +1,51 @@
+Index: uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h
+===================================================================
+--- uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (revision 18898)
++++ uClibc/libc/sysdeps/linux/i386/bits/uClibc_arch_features.h (working copy)
+@@ -42,6 +42,8 @@
+ /* define if target supports IEEE signed zero floats */
+ #define __UCLIBC_HAVE_SIGNED_ZERO__
+
++#if defined _LIBC
+ #define internal_function __attribute__ ((regparm (3), stdcall))
++#endif
+
+ #endif /* _BITS_UCLIBC_ARCH_FEATURES_H */
+Index: uClibc/include/libc-symbols.h
+===================================================================
+--- uClibc/include/libc-symbols.h (revision 18898)
++++ uClibc/include/libc-symbols.h (working copy)
+@@ -22,6 +22,16 @@
+ #ifndef _LIBC_SYMBOLS_H
+ #define _LIBC_SYMBOLS_H 1
+
++/* This is defined for the compilation of all C library code. features.h
++ tests this to avoid inclusion of stubs.h while compiling the library,
++ before stubs.h has been generated. Some library code that is shared
++ with other packages also tests this symbol to see if it is being
++ compiled as part of the C library. We must define this before including
++ config.h, because it makes some definitions conditional on whether libc
++ itself is being compiled, or just some generator program. */
++#define _LIBC 1
++
++
+ /* This file's macros are included implicitly in the compilation of every
+ file in the C library by -imacros.
+
+@@ -40,16 +50,6 @@
+
+ #include <bits/uClibc_arch_features.h>
+
+-
+-/* This is defined for the compilation of all C library code. features.h
+- tests this to avoid inclusion of stubs.h while compiling the library,
+- before stubs.h has been generated. Some library code that is shared
+- with other packages also tests this symbol to see if it is being
+- compiled as part of the C library. We must define this before including
+- config.h, because it makes some definitions conditional on whether libc
+- itself is being compiled, or just some generator program. */
+-#define _LIBC 1
+-
+ /* Enable declarations of GNU extensions, since we are compiling them. */
+ #define _GNU_SOURCE 1
+
diff --git a/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-rm-whitespace.patch b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-rm-whitespace.patch
new file mode 100644
index 0000000000..6004f91e32
--- /dev/null
+++ b/packages/uclibc/uclibc-0.9.29/uClibc-0.9.29-rm-whitespace.patch
@@ -0,0 +1,86 @@
+diff -urN uClibc-0.9.29-0rig/include/assert.h uClibc-0.9.29/include/assert.h
+--- uClibc-0.9.29-0rig/include/assert.h 2005-11-03 23:42:46.000000000 +0100
++++ uClibc-0.9.29/include/assert.h 2007-08-13 19:10:57.000000000 +0200
+@@ -31,7 +31,7 @@
+ #define _ASSERT_H 1
+ #include <features.h>
+
+-#if defined __cplusplus && __GNUC_PREREQ (2,95)
++#if defined __cplusplus && __GNUC_PREREQ(2,95)
+ # define __ASSERT_VOID_CAST static_cast<void>
+ #else
+ # define __ASSERT_VOID_CAST (void)
+@@ -59,13 +59,17 @@
+ (__ASSERT_VOID_CAST ((expr) ? 0 : \
+ (__assert (__STRING(expr), __FILE__, __LINE__, \
+ __ASSERT_FUNCTION), 0)))
+-
++
++/* Define some temporaries to workaround tinyx makedepend bug */
++#define __GNUC_PREREQ_2_6 __GNUC_PREREQ(2, 6)
++#define __GNUC_PREREQ_2_4 __GNUC_PREREQ(2, 4)
+ /* Version 2.4 and later of GCC define a magical variable `__PRETTY_FUNCTION__'
+ which contains the name of the function currently being defined.
+ This is broken in G++ before version 2.6.
+ C9x has a similar variable called __func__, but prefer the GCC one since
+ it demangles C++ function names. */
+-# if defined __cplusplus ? __GNUC_PREREQ (2, 6) : __GNUC_PREREQ (2, 4)
++
++# if defined __cplusplus ? __GNUC_PREREQ_2_6 : __GNUC_PREREQ_2_4
+ # define __ASSERT_FUNCTION __PRETTY_FUNCTION__
+ # else
+ # if defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L
+diff -urN uClibc-0.9.29-0rig/include/complex.h uClibc-0.9.29/include/complex.h
+--- uClibc-0.9.29-0rig/include/complex.h 2002-05-09 10:15:21.000000000 +0200
++++ uClibc-0.9.29/include/complex.h 2007-08-13 17:55:29.000000000 +0200
+@@ -33,7 +33,7 @@
+ /* We might need to add support for more compilers here. But since ISO
+ C99 is out hopefully all maintained compilers will soon provide the data
+ types `float complex' and `double complex'. */
+-#if __GNUC_PREREQ (2, 7) && !__GNUC_PREREQ (2, 97)
++#if __GNUC_PREREQ(2, 7) && !__GNUC_PREREQ(2, 97)
+ # define _Complex __complex__
+ #endif
+
+diff -urN uClibc-0.9.29-0rig/include/features.h uClibc-0.9.29/include/features.h
+--- uClibc-0.9.29-0rig/include/features.h 2006-11-29 22:10:04.000000000 +0100
++++ uClibc-0.9.29/include/features.h 2007-08-13 17:55:51.000000000 +0200
+@@ -143,7 +143,7 @@
+
+ /* Convenience macros to test the versions of glibc and gcc.
+ Use them like this:
+- #if __GNUC_PREREQ (2,8)
++ #if __GNUC_PREREQ(2,8)
+ ... code requiring gcc 2.8 or later ...
+ #endif
+ Note - they won't work for gcc1 or glibc1, since the _MINOR macros
+@@ -297,7 +297,7 @@
+ /* uClibc does not support _FORTIFY_SOURCE */
+ #undef _FORTIFY_SOURCE
+ #if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
+- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
++ && __GNUC_PREREQ(4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
+ # if _FORTIFY_SOURCE > 1
+ # define __USE_FORTIFY_LEVEL 2
+ # else
+@@ -366,7 +366,7 @@
+ #endif /* !ASSEMBLER */
+
+ /* Decide whether we can define 'extern inline' functions in headers. */
+-#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
++#if __GNUC_PREREQ(2, 7) && defined __OPTIMIZE__ \
+ && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
+ # define __USE_EXTERN_INLINES 1
+ #endif
+diff -urN uClibc-0.9.29-0rig/include/tgmath.h uClibc-0.9.29/include/tgmath.h
+--- uClibc-0.9.29-0rig/include/tgmath.h 2002-05-09 10:15:21.000000000 +0200
++++ uClibc-0.9.29/include/tgmath.h 2007-08-13 17:56:17.000000000 +0200
+@@ -34,7 +34,7 @@
+ do not try this for now and instead concentrate only on GNU CC. Once
+ we have more information support for other compilers might follow. */
+
+-#if __GNUC_PREREQ (2, 7)
++#if __GNUC_PREREQ(2, 7)
+
+ # ifdef __NO_LONG_DOUBLE_MATH
+ # define __tgml(fct) fct
diff --git a/packages/uclibc/uclibc_0.9.29.bb b/packages/uclibc/uclibc_0.9.29.bb
index f00a347aa8..9ec20d61de 100644
--- a/packages/uclibc/uclibc_0.9.29.bb
+++ b/packages/uclibc/uclibc_0.9.29.bb
@@ -7,7 +7,7 @@
# on whether the base patches apply to the selected (SRCDATE) svn release.
#
UCLIBC_BASE ?= "0.9.29"
-PR = "r7"
+PR = "r8"
require uclibc.inc
@@ -16,7 +16,12 @@ PROVIDES += "virtual/${TARGET_PREFIX}libc-for-gcc"
SRC_URI += "file://uClibc.machine file://uClibc.distro \
file://errno_values.h.patch;patch=1 \
file://termios.h.patch;patch=1 \
- "
+ file://uClibc-0.9.29-001-fix-mmap.patch;patch=1 \
+ file://uClibc-0.9.29-conditional-sched_affinity.patch;patch=1 \
+ file://uClibc-0.9.29-fix-gethostent_r-failure-retval.patch;patch=1 \
+ file://uClibc-0.9.29-fix-internal_function-definition.patch;patch=1 \
+ file://uClibc-0.9.29-rm-whitespace.patch;patch=1 \
+ "
# mmap-unsigned-shift_bugid1303.patch
# http://uclibc.org/lists/uclibc-cvs/2007-May/011360.html;patch=1"
diff --git a/packages/uicmoc/uicmoc4-native_4.3.1.bb b/packages/uicmoc/uicmoc4-native_4.3.1.bb
index d2ddec77e3..df39a494b2 100644
--- a/packages/uicmoc/uicmoc4-native_4.3.1.bb
+++ b/packages/uicmoc/uicmoc4-native_4.3.1.bb
@@ -26,6 +26,7 @@ EXTRA_OECONF = "-prefix ${STAGING_DIR}/${BUILD_SYS}/qt4 \
EXTRA_OEMAKE = " "
do_configure() {
+ sed -i 's:^QT += xml qt3support$:QT += xml qt3support network:' "${S}"/src/tools/uic3/uic3.pro
echo yes | ./configure ${EXTRA_OECONF} || die "Configuring qt failed. EXTRA_OECONF was ${EXTRA_OECONF}"
}
diff --git a/packages/usbpath/.mtn2git_empty b/packages/usbpath/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/usbpath/.mtn2git_empty
diff --git a/packages/usbpath/usbpath-native_svn.bb b/packages/usbpath/usbpath-native_svn.bb
new file mode 100644
index 0000000000..3b5ef7bdcd
--- /dev/null
+++ b/packages/usbpath/usbpath-native_svn.bb
@@ -0,0 +1,8 @@
+require usbpath_svn.bb
+inherit native
+DEPENDS = "libusb-native"
+
+do_stage () {
+ autotools_stage_all
+}
+
diff --git a/packages/usbpath/usbpath_svn.bb b/packages/usbpath/usbpath_svn.bb
new file mode 100644
index 0000000000..0a06477b9a
--- /dev/null
+++ b/packages/usbpath/usbpath_svn.bb
@@ -0,0 +1,18 @@
+DESCRIPTION = "Convert the physical locations of a USB device to/from its number"
+AUTHOR = "Werner Almesberger <werner@openmoko.org>"
+SECTION = "console/utils"
+LICENSE = "GPL"
+DEPENDS = "libusb"
+
+PV = "0.0+svnr${SRCREV}"
+
+SRC_URI = "svn://svn.openmoko.org/trunk/src/host;module=usbpath;proto=http"
+
+S = "${WORKDIR}/usbpath"
+
+inherit autotools
+
+do_stage () {
+ autotools_stage_all
+}
+
diff --git a/packages/vlan/vlan_1.9.bb b/packages/vlan/vlan_1.9.bb
new file mode 100644
index 0000000000..3a10e898ab
--- /dev/null
+++ b/packages/vlan/vlan_1.9.bb
@@ -0,0 +1,24 @@
+DESCRIPTION = "802.1q vlan support program"
+RRECOMMENDS = "kernel-module-8021q"
+PR = "r0"
+
+S = "${WORKDIR}/vlan/"
+
+SRC_URI = "http://www.candelatech.com/~greear/vlan/vlan.${PV}.tar.gz \
+ "
+
+inherit base
+
+CCFLAGS = "-g -D_GNU_SOURCE -Wall -I${STAGING_INCDIR}"
+LDLIBS = ""
+
+do_compile() {
+ ${CC} ${CCFLAGS} -c vconfig.c
+ ${CC} ${CCFLAGS} ${LDFLAGS} -o vconfig vconfig.o ${LDLIBS}
+}
+
+do_install() {
+ install -d "${D}${sbindir}"
+ install -m 755 "${S}/vconfig" "${D}${sbindir}/vconfig"
+}
+
diff --git a/packages/vlc/vlc-gpe_0.8.4.bb b/packages/vlc/vlc-gpe_0.8.4.bb
index cd3ab47e2b..1bded75984 100644
--- a/packages/vlc/vlc-gpe_0.8.4.bb
+++ b/packages/vlc/vlc-gpe_0.8.4.bb
@@ -3,7 +3,7 @@ HOMEPAGE = "http://www.videolan.org"
LICENSE = "GPL"
PRIORITY = "optional"
SECTION = "gpe"
-PR = "r2"
+PR = "r3"
DEPENDS = "gtk+ freetype gnutls tremor faad2 ffmpeg flac liba52 libid3tag libmad mpeg2dec"
@@ -11,8 +11,8 @@ SRC_URI = "http://download.videolan.org/pub/videolan/vlc/${PV}/vlc-${PV}.tar.gz
file://pda-interface.patch;patch=1"
S = "${WORKDIR}/vlc-${PV}"
-export GTK2_CFLAGS = "`pkg-config --cflags gtk+-2.0 gthread-2.0`"
-export GTK2_LIBS = "`pkg-config --libs gtk+-2.0 gthread-2.0`"
+export GTK2_CFLAGS = "`${STAGING_BINDIR_NATIVE}/pkg-config --cflags gtk+-2.0 gthread-2.0`"
+export GTK2_LIBS = "`${STAGING_BINDIR_NATIVE}/pkg-config --libs gtk+-2.0 gthread-2.0`"
export vlc_WORKAROUNDLDFLAGS = "lib/libvlc.a"
LDFLAGS_append = " -L${STAGING_LIBDIR} -lpostproc"
diff --git a/packages/webkit/files/WebKit.pri b/packages/webkit/files/WebKit.pri
index 0375102a0c..0c47afe7fd 100644
--- a/packages/webkit/files/WebKit.pri
+++ b/packages/webkit/files/WebKit.pri
@@ -6,14 +6,17 @@ isEmpty(OUTPUT_DIR) {
CONFIG(debug):OUTPUT_DIR=$$PWD/WebKitBuild/Debug
}
-!gdk-port:CONFIG += qt-port
+!gtk-port:CONFIG += qt-port
qt-port:DEFINES += BUILDING_QT__=1
-qt-port:!building-libs:LIBS += -L$$OUTPUT_DIR/lib -lQtWebKit
-gdk-port:CONFIG += link_pkgconfig
-gdk-port:PKGCONFIG += cairo gdk-2.0 gtk+-2.0 libcurl
-gdk-port:DEFINES += BUILDING_GDK__=1 BUILDING_CAIRO__
-gdk-port:LIBS += -L$$OUTPUT_DIR/lib -lWebKitGdk $$system(icu-config --ldflags) -ljpeg -lpng -lcurl
-gdk-port:QMAKE_CXXFLAGS += $$system(icu-config --cppflags)
+qt-port:!building-libs {
+ QMAKE_LIBDIR = $$OUTPUT_DIR/lib $$QMAKE_LIBDIR
+ LIBS += -lQtWebKit
+}
+gtk-port:CONFIG += link_pkgconfig
+gtk-port:PKGCONFIG += cairo cairo-ft gdk-2.0 gtk+-2.0 libcurl
+gtk-port:DEFINES += BUILDING_GTK__=1 BUILDING_CAIRO__
+gtk-port:LIBS += -L$$OUTPUT_DIR/lib -lWebKitGtk $$system(icu-config --ldflags) -ljpeg -lpng
+gtk-port:QMAKE_CXXFLAGS += $$system(icu-config --cppflags)
DEFINES += USE_SYSTEM_MALLOC
CONFIG(release) {
@@ -22,13 +25,13 @@ CONFIG(release) {
BASE_DIR = $$PWD
qt-port:INCLUDEPATH += \
- $$PWD/WebKitQt/Api
-gdk-port:INCLUDEPATH += \
- $$BASE_DIR/WebCore/platform/gdk \
+ $$PWD/WebKit/qt/Api
+gtk-port:INCLUDEPATH += \
+ $$BASE_DIR/WebCore/platform/gtk \
$$BASE_DIR/WebCore/platform/network/curl \
$$BASE_DIR/WebCore/platform/graphics/cairo \
- $$BASE_DIR/WebCore/loader/gdk \
- $$BASE_DIR/WebCore/page/gdk \
+ $$BASE_DIR/WebCore/loader/gtk \
+ $$BASE_DIR/WebCore/page/gtk \
$$BASE_DIR/WebKit/gtk/Api \
$$BASE_DIR/WebKit/gtk/WebCoreSupport
INCLUDEPATH += \
diff --git a/packages/webkit/files/WebKit.pro b/packages/webkit/files/WebKit.pro
index 335d11e6e7..dca2614109 100644
--- a/packages/webkit/files/WebKit.pro
+++ b/packages/webkit/files/WebKit.pro
@@ -1,13 +1,16 @@
TEMPLATE = subdirs
CONFIG += ordered
-!gdk-port:CONFIG += qt-port
-qt-port:SUBDIRS += WebKitQt/Plugins
+!gtk-port:CONFIG += qt-port
+qt-port:!win32-*:SUBDIRS += WebKit/qt/Plugins
SUBDIRS += \
WebCore \
JavaScriptCore/kjs/testkjs.pro
-qt-port:SUBDIRS += \
- WebKitQt/QtLauncher \
- WebKitTools/DumpRenderTree/DumpRenderTree.qtproj/DumpRenderTree.pro
-gdk-port:SUBDIRS += \
- WebKitTools/GdkLauncher
+qt-port {
+ SUBDIRS += WebKit/qt/QtLauncher
+
+ !win32-*: SUBDIRS += WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
+}
+
+gtk-port:SUBDIRS += \
+ WebKitTools/GtkLauncher
diff --git a/packages/webkit/webkit-gtk_svn.bb b/packages/webkit/webkit-gtk_svn.bb
index 077baec95e..208ec25719 100644
--- a/packages/webkit/webkit-gtk_svn.bb
+++ b/packages/webkit/webkit-gtk_svn.bb
@@ -23,10 +23,10 @@ SRC_URI = "\
S = "${WORKDIR}/"
do_configure() {
- qmake2 -spec ${QMAKESPEC} CONFIG+=gdk-port CONFIG-=qt CONFIG-=release CONFIG+=debug
+ qmake2 -spec ${QMAKESPEC} CONFIG+=gtk-port CONFIG-=qt CONFIG-=release CONFIG+=debug
mkdir -p WebKitBuilds/Debug
cd WebKitBuilds/Debug
- PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gdk-port $PWD/../../WebKit.pro \
+ PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gtk-port $PWD/../../WebKit.pro \
WEBKIT_INC_DIR=${prefix}/include WEBKIT_LIB_DIR=${libdir}
}
@@ -43,9 +43,9 @@ do_install() {
install -d ${D}${libdir}
install -d ${D}${libdir}/pkgconfig
- install -m 0755 ${S}/WebKitBuilds/Debug/WebKitTools/GdkLauncher/GdkLauncher ${D}${bindir}
+ install -m 0755 ${S}/WebKitBuilds/Debug/WebKitTools/GtkLauncher/GtkLauncher ${D}${bindir}
cd ${S}/WebKitBuilds/Debug
- PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gdk-port $PWD/../../WebKit.pro \
+ PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gtk-port $PWD/../../WebKit.pro \
WEBKIT_INC_DIR=${D}${prefix}/include WEBKIT_LIB_DIR=${D}${libdir}
oe_runmake install
}
@@ -54,12 +54,13 @@ do_stage() {
install -d ${STAGING_LIBDIR}
install -d ${STAGING_INCDIR}
cd ${S}/WebKitBuilds/Debug
- PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gdk-port $PWD/../../WebKit.pro \
+ PWD=`pwd` qmake2 -spec ${QMAKESPEC} -r OUTPUT_DIR=$PWD/ CONFIG-=qt CONFIG+=gtk-port $PWD/../../WebKit.pro \
WEBKIT_INC_DIR=${STAGING_INCDIR} WEBKIT_LIB_DIR=${STAGING_LIBDIR}
oe_runmake install
}
-PACKAGES =+ "webkit-gdklauncher-dbg webkit-gdklauncher"
-FILES_webkit-gdklauncher = "${bindir}/GdkLauncher"
-FILES_webkit-gdklauncher-dbg = "${bindir}/.debug/GdkLauncher"
+PACKAGES =+ "webkit-gtklauncher-dbg webkit-gtklauncher"
+
+FILES_webkit-gtklauncher = "${bindir}/GtkLauncher"
+FILES_webkit-gtklauncher-dbg = "${bindir}/.debug/GtkLauncher"
diff --git a/packages/wifistix/.mtn2git_empty b/packages/wifistix/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/wifistix/.mtn2git_empty
diff --git a/packages/wifistix/wifistix-modules/.mtn2git_empty b/packages/wifistix/wifistix-modules/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/.mtn2git_empty
diff --git a/packages/wifistix/wifistix-modules/2.6.17-new-pcmcia-layer.patch b/packages/wifistix/wifistix-modules/2.6.17-new-pcmcia-layer.patch
new file mode 100644
index 0000000000..209df1b121
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/2.6.17-new-pcmcia-layer.patch
@@ -0,0 +1,484 @@
+Index: src_cf8385/io/mcf/cf_io.c
+===================================================================
+--- src_cf8385.orig/io/mcf/cf_io.c
++++ src_cf8385/io/mcf/cf_io.c
+@@ -49,17 +49,15 @@ Change log:
+
+ dev_info_t cfio_dev_info = "mcf25";
+
+-dev_link_t *dev_list = NULL;
+-
+-MODULE_PARM(interrupt_steer, "1-4i");
+-
+-INT_MODULE_PARM(irq_mask, CF_IRQMASK);
+-
+ /* Module Variables */
+ static int interrupt_steer[IRQINFO2_LEN] = { -1 };
++static u_int irq_mask = CF_IRQMASK;
++
++module_param_array(interrupt_steer, int, NULL, 0);
++module_param(irq_mask, int, 0);
+
+ typedef struct _if_pcmcia_info_t {
+- dev_link_t link;
++ struct pcmcia_device *p_dev;
+ dev_node_t node;
+ int stop;
+ struct bus_operations *bus;
+@@ -81,22 +79,9 @@ struct cf_card_rec cardp;
+ * @param arg pointer to dev_link_t
+ * @return N/A
+ */
+-static void cf_release(ulong arg)
++static void mv8385_cf_release(struct pcmcia_device *arg)
+ {
+- dev_link_t *link = (dev_link_t *) arg;
+-
+- link->dev = NULL;
+-
+- link->conf.Vcc = 0;
+- pcmcia_release_configuration(link->handle);
+- if (link->io.NumPorts1)
+- pcmcia_release_io(link->handle, &link->io);
+-
+- if (link->irq.AssignedIRQ)
+- pcmcia_release_irq(link->handle, &link->irq);
+-
+- link->state &= ~DEV_CONFIG;
+-
++ pcmcia_disable_device(arg);
+ } /* cf_release */
+
+
+@@ -107,41 +92,9 @@ static void cf_release(ulong arg)
+ * @return N/A
+ */
+
+-static void cf_detach(dev_link_t * link)
++static void mv8385_cf_detach(struct pcmcia_device * link)
+ {
+- dev_link_t **p;
+-
+- for (p = &dev_list; *p; p = &(*p)->next)
+- if (*p == link)
+- break;
+-
+- if (*p == NULL)
+- return;
+-
+-#ifdef LINUX_2_4
+- del_timer_sync(&link->release);
+-#endif
+-
+- if (((if_pcmcia_info_t *) link->priv)->eth_dev) {
+- printk("Before calling wlan_remove function\n");
+- cardp.remove(&cardp);
+- printk("After calling wlan_remove function\n");
+- }
+-
+- if (link->state & DEV_CONFIG) {
+- cf_release((u32) link);
+- }
+-
+- ((if_pcmcia_info_t *) link->priv)->eth_dev = NULL;
+-
+- if (link->handle) {
+-#ifdef LINUX_2_4
+- pcmcia_reset_card(link->handle, NULL);
+-#endif
+- pcmcia_deregister_client(link->handle);
+- }
+-
+- *p = link->next;
++ mv8385_cf_release(link);
+ /* This points to the parent if_pcmcia_info_t struct */
+ if (link->priv)
+ kfree(link->priv);
+@@ -152,9 +105,8 @@ static void cf_detach(dev_link_t * link)
+ * @param link pointer to dev_link_t
+ * @return N/A
+ */
+-static void cf_config(dev_link_t * link)
++static int mv8385_cf_config(struct pcmcia_device * link)
+ {
+- client_handle_t handle = link->handle;
+ if_pcmcia_info_t *dev = link->priv;
+ tuple_t tuple;
+ cisparse_t parse;
+@@ -169,22 +121,14 @@ static void cf_config(dev_link_t * link)
+ tuple.TupleDataMax = sizeof(buf);
+ tuple.TupleOffset = 0;
+
+- if (pcmcia_get_first_tuple(handle, &tuple))
+- goto onerror;
+- if (pcmcia_get_tuple_data(handle, &tuple))
+- goto onerror;
+- if (pcmcia_parse_tuple(handle, &tuple, &parse))
+- goto onerror;
++ if(pcmcia_get_first_tuple(link, &tuple)) goto onerror;
++ if(pcmcia_get_tuple_data(link, &tuple)) goto onerror;
++ if(pcmcia_parse_tuple(link, &tuple, &parse)) goto onerror;
+
+ link->conf.ConfigBase = parse.config.base;
+ link->conf.Present = parse.config.rmask[0];
+
+- link->state |= DEV_CONFIG;
+-
+- if (pcmcia_get_configuration_info(handle, &conf))
+- goto onerror;
+-
+- link->conf.Vcc = conf.Vcc;
++ if(pcmcia_get_configuration_info(link, &conf)) goto onerror;
+
+ /*
+ The Configuration table consists of a series of configuration table
+@@ -194,15 +138,9 @@ static void cf_config(dev_link_t * link)
+
+ tuple.DesiredTuple = CISTPL_CFTABLE_ENTRY;
+
+- if (pcmcia_get_first_tuple(handle, &tuple))
+- goto onerror;
+-
+- if (pcmcia_get_tuple_data(handle, &tuple) != CS_SUCCESS)
+- goto onerror;
+-
+- if (pcmcia_parse_tuple(handle, &tuple, &parse) != CS_SUCCESS)
+- goto onerror;
+-
++ if(pcmcia_get_first_tuple(link, &tuple)) goto onerror;
++ if (pcmcia_get_tuple_data(link, &tuple) != CS_SUCCESS ||
++ pcmcia_parse_tuple(link, &tuple, &parse) != CS_SUCCESS) goto onerror;
+
+ link->conf.ConfigIndex = cfg->index;
+
+@@ -237,19 +175,18 @@ static void cf_config(dev_link_t * link)
+ link->io.NumPorts2 = io->win[1].len;
+ }
+
+- if (pcmcia_request_io(link->handle, &link->io)
++ if (pcmcia_request_io(link, &link->io)
+ != CS_SUCCESS) {
+- pcmcia_release_io(link->handle, &link->io);
+ printk("Request IO Error !!\n");
+ goto onerror;
+ }
+ }
+
+ if (link->conf.Attributes & CONF_ENABLE_IRQ)
+- if (pcmcia_request_irq(link->handle, &link->irq))
++ if (pcmcia_request_irq(link, &link->irq))
+ goto onerror;
+
+- if (pcmcia_request_configuration(link->handle, &link->conf))
++ if (pcmcia_request_configuration(link, &link->conf))
+ goto onerror;
+
+ cardp.irq = link->irq.AssignedIRQ;
+@@ -271,97 +208,40 @@ static void cf_config(dev_link_t * link)
+
+ strcpy(dev->node.dev_name, cardp.eth_dev->name);
+ dev->node.major = dev->node.minor = 0;
+- link->dev = &dev->node;
++ link->dev_node = &dev->node;
+
+- link->state &= ~DEV_CONFIG_PENDING;
+- return;
++ return 0;
+
+ onerror:
+ printk("card configuration failed...calling cf_release function\n");
+- cf_release((u32) link);
+- link->state &= ~DEV_CONFIG_PENDING;
++ mv8385_cf_release(link);
+ cardp.flag = 1;
++ return -ENODEV;
+
+ } /* cf_config */
+
+
+ /**
+- * @brief CF BUS driver Event handler
+- * @param event event id
+- * @param priority event priority
+- * @param args pointer to event_callback_args_t
+- * @return 0
+- */
+-static int cf_event(event_t event, int priority, event_callback_args_t *args)
+-{
+- dev_link_t *link = args->client_data;
+- if_pcmcia_info_t *dev = link->priv;
+-
+- switch (event) {
+- case CS_EVENT_CARD_INSERTION:
+- link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
+-#ifdef LINUX_2_4
+- dev->bus = args->bus;
+-#endif
+- cf_config(link);
+- break;
+-
+- case CS_EVENT_CARD_REMOVAL:
+- link->state &= ~DEV_PRESENT;
+- printk("card removal event detected\n");
+- if (link->state & DEV_CONFIG) {
+- ((if_pcmcia_info_t *) link->priv)->stop = 1;
+- printk("Before calling release function\n");
+-#ifdef LINUX_2_4
+-#define REMOVE_TIMEOUT (HZ/20)
+- mod_timer(&link->release, jiffies + REMOVE_TIMEOUT);
+-#else
+- cf_detach(link);
+-#endif
+- printk("After calling release function\n");
+- }
+- break;
+- case CS_EVENT_CARD_RESET:
+- if (link->state & DEV_CONFIG) {
+- pcmcia_request_configuration(link->handle, &link->conf);
+- }
+- dev->stop = 0;
+- break;
+- }
+-
+- return 0;
+-} /* cf_event */
+-
+-/**
+ * @brief attach CF BUS driver
+ * @return pointer to dev_link_t
+ */
+
+-static dev_link_t *cf_attach(void)
++static int mv8385_cf_probe(struct pcmcia_device *link)
+ {
+ u8 i;
+- int status;
+ if_pcmcia_info_t *ifinfo;
+- dev_link_t *link;
+- client_reg_t client_reg;
+
+ printk("Entering cf_attach()\n");
+
+ /* Allocate space for PCMCIA information */
+ if (!(ifinfo = kmalloc(sizeof(if_pcmcia_info_t), GFP_KERNEL))) {
+- return NULL;
++ return -ENOMEM;
+ }
+
+ memset(ifinfo, 0, sizeof(if_pcmcia_info_t));
+- link = &ifinfo->link;
++ ifinfo->p_dev = link;
+ link->priv = ifinfo;
+
+-#ifdef LINUX_2_4
+- init_timer(&link->release);
+- link->release.function = &cf_release;
+- link->release.data = (ulong) link;
+-#endif
+-
+ link->irq.Attributes = IRQ_TYPE_EXCLUSIVE;
+ link->irq.IRQInfo1 = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
+
+@@ -380,38 +260,13 @@ static dev_link_t *cf_attach(void)
+ link->irq.Handler = NULL;
+
+ link->conf.Attributes = 0;
+-#define VCC_VALUE 50
+- link->conf.Vcc = VCC_VALUE;
+- link->conf.Vpp1 = 0;
+- link->conf.Vpp2 = 0;
++ link->conf.Vpp = 0;
+ link->conf.IntType = INT_MEMORY_AND_IO;
+ link->conf.ConfigIndex = 1;
+ link->conf.Present = PRESENT_OPTION;
+
+- link->next = dev_list;
+- dev_list = link;
+- client_reg.dev_info = &cfio_dev_info;
+- client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
+- client_reg.EventMask = CS_EVENT_CARD_INSERTION |
+- CS_EVENT_CARD_REMOVAL | CS_EVENT_CARD_RESET;
+- client_reg.event_handler = &cf_event;
+- client_reg.event_callback_args.client_data = link;
+- client_reg.Version = CF_VERSION;
+-
+- printk("Before registering the client\n");
+-
+- if ((status = pcmcia_register_client(&link->handle,
+- &client_reg)) != CS_SUCCESS) {
+- printk("Registering the client failed\n");
+- CS_ERROR(link->handle, RegisterClient, status);
+- cf_detach(link);
+- return NULL;
+- }
+-
+- printk("Leaving cf_attach()\n");
+-
+- return link;
+-} /* cf_attach */
++ return mv8385_cf_config(link);
++} /* cf_probe */
+
+
+ #ifndef LINUX_2_4
+@@ -428,9 +283,8 @@ static struct pcmcia_driver cfio_cs_driv
+ .drv = {
+ .name = "mcf25"
+ },
+- .attach = cf_attach,
+- .detach = cf_detach,
+- .event = cf_event,
++ .probe = mv8385_cf_probe,
++ .remove = mv8385_cf_detach,
+ .id_table = cfio_ids,
+ };
+ #endif
+@@ -449,28 +303,11 @@ static struct pcmcia_driver cfio_cs_driv
+ u32 *register_cf_driver(cf_notifier_fn_add add,
+ cf_notifier_fn_remove remove, void *arg)
+ {
+-#ifdef LINUX_2_4
+- servinfo_t serv;
+-#endif
+-
+ cardp.add = add;
+ cardp.remove = remove;
+ cardp.host_int_mask = 0;
+-
+-#ifdef LINUX_2_4
+- pcmcia_get_card_services_info(&serv);
+-
+- if (serv.Revision != CS_RELEASE_CODE) {
+- return NULL;
+- }
+-#endif
+-
+ printk("Before register driver\n");
+-#ifdef LINUX_2_4
+- register_pccard_driver(&cfio_dev_info, &cf_attach, &cf_detach);
+-#else
+ pcmcia_register_driver(&cfio_cs_driver);
+-#endif
+ printk("After register driver\n");
+
+ return (u32 *) &cardp;
+@@ -482,22 +319,7 @@ u32 *register_cf_driver(cf_notifier_fn_a
+ */
+ void unregister_cf_driver( void )
+ {
+-
+-#ifdef LINUX_2_4
+- unregister_pccard_driver(&cfio_dev_info);
+-#else
+ pcmcia_unregister_driver(&cfio_cs_driver);
+-#endif
+-
+- cf_detach(dev_list);
+-
+- while (dev_list != NULL) {
+-#ifdef LINUX_2_4
+- del_timer(&dev_list->release);
+-#endif
+- if (dev_list->state & DEV_CONFIG)
+- cf_release((u32) dev_list);
+- }
+ }
+
+
+@@ -508,6 +330,8 @@ void unregister_cf_driver( void )
+ */
+ s16 cfio_read_cfg_reg(void* priv)
+ {
++ if_pcmcia_info_t *ifinfo = (if_pcmcia_info_t *)priv;
++
+ conf_reg_t reg;
+
+ reg.Function = 0;
+@@ -515,7 +339,7 @@ s16 cfio_read_cfg_reg(void* priv)
+ reg.Offset = 0;
+ reg.Value = 0;
+
+- pcmcia_access_configuration_register(dev_list->handle, &reg);
++ pcmcia_access_configuration_register(ifinfo->p_dev, &reg);
+ return 0;
+ }
+
+Index: src_cf8385/io/mcf/cfio_io.h
+===================================================================
+--- src_cf8385.orig/io/mcf/cfio_io.h
++++ src_cf8385/io/mcf/cfio_io.h
+@@ -82,7 +82,6 @@ typedef void * (*cf_notifier_fn_add) (s
+ typedef int (*cf_notifier_fn_remove) (struct cf_card_rec *);
+
+ extern dev_info_t cfio_dev_info;
+-extern dev_link_t *dev_list;
+
+ extern struct cf_card_rec cardp;
+ s16 cfio_read_cfg_reg(void *priv);
+Index: src_cf8385/if/if_mcf/if_cf.c
+===================================================================
+--- src_cf8385.orig/if/if_mcf/if_cf.c
++++ src_cf8385/if/if_mcf/if_cf.c
+@@ -32,11 +32,9 @@ Change log:
+ do { \
+ tuple.DesiredTuple = X; \
+ \
+- if (!handle) \
++ if (pcmcia_get_first_tuple((&cisinfo), &tuple)) \
+ goto error; \
+- if (pcmcia_get_first_tuple(handle, &tuple)) \
+- goto error; \
+- if (pcmcia_get_tuple_data(handle, &tuple)) \
++ if (pcmcia_get_tuple_data((&cisinfo), &tuple)) \
+ goto error; \
+ \
+ cisbuf[ofs++] = tuple.TupleCode; \
+@@ -48,7 +46,7 @@ Change log:
+ int *register_cf_driver(cf_notifier_fn_add ,cf_notifier_fn_remove , void *);
+ void unregister_cf_driver(void);
+
+-static dev_link_t cisinfo;
++static struct pcmcia_device cisinfo;
+
+ static u16 int_cause = 0;
+
+@@ -771,7 +769,6 @@ int sbi_host_to_card(wlan_private *priv,
+ int sbi_get_cis_info(wlan_private *priv)
+ {
+ wlan_adapter *Adapter = priv->adapter;
+- client_handle_t handle = cisinfo.handle;
+ tuple_t tuple;
+ char buf[64], cisbuf[512];
+ int ofs=0, count=6;
+@@ -793,9 +790,9 @@ int sbi_get_cis_info(wlan_private *priv)
+
+ do
+ {
+- if (pcmcia_get_next_tuple(handle, &tuple))
++ if (pcmcia_get_next_tuple((&cisinfo), &tuple))
+ goto error;
+- if (pcmcia_get_tuple_data(handle, &tuple))
++ if (pcmcia_get_tuple_data((&cisinfo), &tuple))
+ goto error;
+
+ cisbuf[ofs++] = tuple.TupleCode;
+Index: src_cf8385/wlan/wlan_fw.c
+===================================================================
+--- src_cf8385.orig/wlan/wlan_fw.c
++++ src_cf8385/wlan/wlan_fw.c
+@@ -21,11 +21,11 @@ Change log:
+ ********************************************************/
+
+
+-u8 *helper_name=NULL;
+-u8 *fw_name=NULL;
++static char *helper_name=NULL;
++static char *fw_name=NULL;
+
+-MODULE_PARM( helper_name, "s");
+-MODULE_PARM( fw_name, "s" );
++module_param( helper_name, charp, 0);
++module_param( fw_name, charp, 0);
+
+
+ /********************************************************
diff --git a/packages/wifistix/wifistix-modules/bad-cast.patch b/packages/wifistix/wifistix-modules/bad-cast.patch
new file mode 100644
index 0000000000..5f4f48c27b
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/bad-cast.patch
@@ -0,0 +1,13 @@
+Index: src_cf8385/wlan/wlan_wext.c
+===================================================================
+--- src_cf8385.orig/wlan/wlan_wext.c
++++ src_cf8385/wlan/wlan_wext.c
+@@ -1023,7 +1023,7 @@ static int wlan_txcontrol(wlan_private *
+ return -EFAULT;
+ }
+ copy_from_user(&data,wrq->u.data.pointer,sizeof(int));
+- (u32)Adapter->PktTxCtrl = data;
++ Adapter->PktTxCtrl = (u32)data;
+ }
+
+ wrq->u.data.length = 1;
diff --git a/packages/wifistix/wifistix-modules/fix-essid-truncation.patch b/packages/wifistix/wifistix-modules/fix-essid-truncation.patch
new file mode 100644
index 0000000000..c9185eab03
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/fix-essid-truncation.patch
@@ -0,0 +1,13 @@
+Index: src_cf8385/wlan/wlan_join.c
+===================================================================
+--- src_cf8385.orig/wlan/wlan_join.c
++++ src_cf8385/wlan/wlan_join.c
+@@ -213,7 +213,7 @@ int wlan_set_essid(struct net_device* de
+ } else {
+ /* Set the SSID */
+ memcpy(reqSSID.Ssid, extra, dwrq->length);
+- reqSSID.SsidLength = dwrq->length - 1;
++ reqSSID.SsidLength = dwrq->length;
+ }
+
+ PRINTM(INFO, "Requested new SSID = %s\n",
diff --git a/packages/wifistix/wifistix-modules/install-properly.patch b/packages/wifistix/wifistix-modules/install-properly.patch
new file mode 100644
index 0000000000..ebc00ed867
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/install-properly.patch
@@ -0,0 +1,14 @@
+Index: src_cf8385/Makefile
+===================================================================
+--- src_cf8385.orig/Makefile
++++ src_cf8385/Makefile
+@@ -2014,8 +2014,7 @@ endif
+
+ ifeq ($(CONFIG_CF),y)
+ ifeq ($(KVER),2.6)
+- cp -f cfio.$(MODEXT) $(INSTALLDIR)/
+- cp -f mcf25.$(MODEXT) $(INSTALLDIR)/
++ $(MAKE) -C $(KERNELDIR) M=$(PWD) INSTALL_MOD_PATH="$(INSTALL_MOD_PATH)" modules_install
+ else
+ cp -f io/mcf/cfio.$(MODEXT) $(INSTALLDIR)/
+ $(LD) -r -o $(INSTALLDIR)/mcf25.$(MODEXT) cf8xxx.$(MODEXT)
diff --git a/packages/wifistix/wifistix-modules/marvell-devicename.patch b/packages/wifistix/wifistix-modules/marvell-devicename.patch
new file mode 100644
index 0000000000..62ebe89883
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/marvell-devicename.patch
@@ -0,0 +1,11 @@
+--- src_cf8385-orig/wlan/wlan_main.c 2006-05-06 17:24:51.000000000 -0700
++++ src_cf8385/wlan/wlan_main.c 2006-05-06 17:26:14.000000000 -0700
+@@ -873,7 +873,7 @@
+ #ifdef LINUX_2_4
+ if (!(dev = init_etherdev(dev, sizeof(wlan_private)))) {
+ #else
+- if (!(dev = alloc_etherdev(sizeof(wlan_private)))) {
++ if (!(dev = alloc_netdev(sizeof(wlan_private), "wlan%d", ether_setup))) {
+ #endif
+ PRINTM(MSG, "Init ethernet device failed!\n");
+ return NULL;
diff --git a/packages/wifistix/wifistix-modules/marvell-devicetable.patch b/packages/wifistix/wifistix-modules/marvell-devicetable.patch
new file mode 100644
index 0000000000..5d726a582b
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/marvell-devicetable.patch
@@ -0,0 +1,25 @@
+--- src_cf8385/io/mcf/cf_io-orig.c 2006-04-29 16:26:16.000000000 -0700
++++ src_cf8385/io/mcf/cf_io.c 2006-04-29 16:32:59.000000000 -0700
+@@ -415,6 +415,14 @@
+
+
+ #ifndef LINUX_2_4
++static struct pcmcia_device_id cfio_ids[] = {
++ PCMCIA_DEVICE_MANF_CARD(0x02df, 0x8103),
++ PCMCIA_DEVICE_PROD_ID12("Marvell", "88W8300 802.11g PC Card",
++ 0xE86284BA, 0x8C78E0CD),
++ PCMCIA_DEVICE_NULL,
++};
++MODULE_DEVICE_TABLE(pcmcia, cfio_ids);
++
+ static struct pcmcia_driver cfio_cs_driver = {
+ .owner = THIS_MODULE,
+ .drv = {
+@@ -423,6 +431,7 @@
+ .attach = cf_attach,
+ .detach = cf_detach,
+ .event = cf_event,
++ .id_table = cfio_ids,
+ };
+ #endif
+
diff --git a/packages/wifistix/wifistix-modules/marvell-gumstix.patch b/packages/wifistix/wifistix-modules/marvell-gumstix.patch
new file mode 100644
index 0000000000..5c336e3fa1
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/marvell-gumstix.patch
@@ -0,0 +1,24 @@
+--- src_cf8385/Makefile 2006-03-06 16:15:36.000000000 -0800
++++ /tmp/Makefile 2006-04-28 15:45:26.000000000 -0700
+@@ -36,9 +36,6 @@
+ # Valid options for OMAP1510: 15, 16
+ KERNEL_WE=16
+
+-CC= $(CROSS)gcc
+-LD= $(CROSS)ld
+-
+ BACKUP= /root/backup
+ YMD= `date +%Y%m%d%H%M`
+
+@@ -1095,6 +1092,11 @@
+ CROSS=$(TOOLPATH_iMX21)/arm-linux-
+ endif
+ endif
++ifeq ($(CONFIG_GUMSTIX), y)
++ INSTALLDIR=$(TARGET_DIR)
++ TOOLPATH=$(STAGING_DIR)/bin
++ CFLAGS += -DNOMEMCOPY
++endif
+ ifeq ($(CONFIG_BULVERDE), y)
+ INSTALLDIR=$(BULVERDE_DIR)
+ ifeq ($(CONFIG_SD),y)
diff --git a/packages/wifistix/wifistix-modules/no-more-config-h.patch b/packages/wifistix/wifistix-modules/no-more-config-h.patch
new file mode 100644
index 0000000000..8bd7a14e58
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/no-more-config-h.patch
@@ -0,0 +1,24 @@
+Index: src_cf8385/io/mcf/cfio_io.h
+===================================================================
+--- src_cf8385.orig/io/mcf/cfio_io.h
++++ src_cf8385/io/mcf/cfio_io.h
+@@ -51,7 +51,6 @@ Change log:
+ #include <linux/skbuff.h>
+ #include <linux/if_arp.h>
+ #include <linux/ioport.h>
+-#include <linux/config.h>
+
+ #include <pcmcia/version.h>
+ #include <pcmcia/cs_types.h>
+Index: src_cf8385/os/linux/os_headers.h
+===================================================================
+--- src_cf8385.orig/os/linux/os_headers.h
++++ src_cf8385/os/linux/os_headers.h
+@@ -32,7 +32,6 @@
+ #include <linux/proc_fs.h>
+ #include <linux/ptrace.h>
+ #include <linux/string.h>
+-#include <linux/config.h>
+ #include <linux/ioport.h>
+
+
diff --git a/packages/wifistix/wifistix-modules/realtime-kernel.patch b/packages/wifistix/wifistix-modules/realtime-kernel.patch
new file mode 100644
index 0000000000..49a86c29de
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/realtime-kernel.patch
@@ -0,0 +1,25 @@
+Index: src_cf8385/if/if_mcf/if_cf.c
+===================================================================
+--- src_cf8385.orig/if/if_mcf/if_cf.c
++++ src_cf8385/if/if_mcf/if_cf.c
+@@ -238,10 +238,9 @@ static void init_cf_addr(wlan_private *p
+ * @brief This function is interrupt handler.
+ * @param iqr interrupt number
+ * @param dev_id pointer to net_device structure
+- * @param regs pointer to pt_regs structure
+ * @return n/a
+ */
+-static IRQ_RET_TYPE cf_interrupt(int irq, void *dev_id, struct pt_regs *regs)
++static IRQ_RET_TYPE cf_interrupt(int irq, void *dev_id)
+ {
+ struct net_device *dev = dev_id;
+ wlan_private *priv = (wlan_private *) dev->priv;
+@@ -710,7 +709,7 @@ int sbi_register_dev(wlan_private * priv
+
+ PRINTM(INFO, "IRQ %d\n", cardp.irq);
+
+- ret = request_irq(cardp.irq, cf_interrupt, SA_SHIRQ,
++ ret = request_irq(cardp.irq, cf_interrupt, IRQF_SHARED,
+ "cf_irq", priv->wlan_dev.netdev );
+
+ if (ret != 0)
diff --git a/packages/wifistix/wifistix-modules/sbi-no-inline.patch b/packages/wifistix/wifistix-modules/sbi-no-inline.patch
new file mode 100644
index 0000000000..204ebc78b5
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/sbi-no-inline.patch
@@ -0,0 +1,13 @@
+--- src_cf8385/wlan/sbi.h
++++ src_cf8385/wlan/sbi.h
+@@ -92,8 +92,8 @@
+ u16 npayload);
+ int sbi_enable_host_int(wlan_private *);
+
+-inline int sbi_exit_deep_sleep(wlan_private *);
+-inline int sbi_reset_deepsleep_wakeup(wlan_private *);
++int sbi_exit_deep_sleep(wlan_private *);
++int sbi_reset_deepsleep_wakeup(wlan_private *);
+
+ #ifdef ENABLE_PM
+ inline int sbi_suspend(wlan_private *);
diff --git a/packages/wifistix/wifistix-modules/struct-changes.patch b/packages/wifistix/wifistix-modules/struct-changes.patch
new file mode 100644
index 0000000000..d935796900
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/struct-changes.patch
@@ -0,0 +1,13 @@
+Index: src_cf8385/wlan/wlan_main.c
+===================================================================
+--- src_cf8385.orig/wlan/wlan_main.c
++++ src_cf8385/wlan/wlan_main.c
+@@ -912,7 +912,7 @@ static wlan_private *wlan_add_card(void
+ dev->watchdog_timeo = WLAN_WATCHDOG_TIMEOUT;
+
+ #ifdef WIRELESS_EXT
+- dev->get_wireless_stats = wlan_get_wireless_stats;
++ wlan_handler_def.get_wireless_stats = wlan_get_wireless_stats;
+ dev->wireless_handlers = (struct iw_handler_def *) &wlan_handler_def;
+ #endif
+ #endif /* linux */
diff --git a/packages/wifistix/wifistix-modules/wifistix.conf b/packages/wifistix/wifistix-modules/wifistix.conf
new file mode 100644
index 0000000000..117d8a2281
--- /dev/null
+++ b/packages/wifistix/wifistix-modules/wifistix.conf
@@ -0,0 +1,4 @@
+install pcmcia /sbin/modprobe --ignore-install pcmcia && modprobe pxa2xx-cs
+
+alias wlan0 mcf25
+
diff --git a/packages/wifistix/wifistix-modules_5.0.16.p0.bb b/packages/wifistix/wifistix-modules_5.0.16.p0.bb
new file mode 100644
index 0000000000..923f24e27a
--- /dev/null
+++ b/packages/wifistix/wifistix-modules_5.0.16.p0.bb
@@ -0,0 +1,50 @@
+DESCRIPTION = "Linux Driver for Marvel 88W8385 802.11b/g Wifi Module used in Gumstix daughtercards"
+SECTION = "base"
+PRIORITY = "optional"
+HOMEPAGE = "http://www.gumstix.com"
+LICENSE = "GPL"
+RDEPENDS = "kernel (${KERNEL_VERSION})"
+DEPENDS = "virtual/kernel"
+PR = "r0"
+
+SRC_URI = "http://files.gumstix.com/cf8385-5.0.16.p0-26306.tbz \
+ file://wifistix.conf \
+ file://marvell-devicename.patch;patch=1 \
+ file://marvell-devicetable.patch;patch=1 \
+ file://marvell-gumstix.patch;patch=1 \
+ file://sbi-no-inline.patch;patch=1 \
+ file://2.6.17-new-pcmcia-layer.patch;patch=1 \
+ file://bad-cast.patch;patch=1 \
+ file://struct-changes.patch;patch=1 \
+ file://no-more-config-h.patch;patch=1 \
+ file://realtime-kernel.patch;patch=1 \
+ file://install-properly.patch;patch=1 \
+ file://fix-essid-truncation.patch;patch=1"
+
+S = "${WORKDIR}/src_cf8385"
+
+inherit module-base
+
+EXTRA_OEMAKE = 'CONFIG_GUMSTIX=y CONFIG_DEBUG=n KVER=2.6 \
+ KERNELDIR="${KERNEL_SOURCE}" ARCH="${TARGET_ARCH}" \
+ CC="${KERNEL_CC}" EXTRA_CFLAGS="${CFLAGS}" \
+ INSTALL_MOD_PATH="${D}"'
+
+do_compile() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake
+}
+
+do_install() {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake install
+
+ install -m 0755 -d ${D}${sysconfdir}/modprobe.d
+ install -m 0644 ${WORKDIR}/wifistix.conf ${D}${sysconfdir}/modprobe.d/wifistix.conf
+}
+
+PACKAGES = "${PN}"
+FILES_${PN} = "${base_libdir}/modules/"
+FILES_${PN} += "${sysconfdir}/modprobe.d/"
+CONFFILES_${PN} = "${sysconfdir}/modprobe.d/wifistix.conf"
+
diff --git a/packages/xorg-xserver/xserver-kdrive-1.2.0/kdrive-imageon.patch b/packages/xorg-xserver/xserver-kdrive-1.2.0/kdrive-imageon.patch
deleted file mode 100644
index b143eedff3..0000000000
--- a/packages/xorg-xserver/xserver-kdrive-1.2.0/kdrive-imageon.patch
+++ /dev/null
@@ -1,9079 +0,0 @@
-# Author: Manuel Teira <manuel.teira@telefonica.net> (sirfred in #oe)
-# Description: New driver for the Imageon ATI Card. Implementing:
-# -Hardware solid fills
-# -Hardware bitblt
-# -Hardware cursors
-# -XV Extension
-# -Internal and External Imageon offscreen memory support
-# -Hardware RandR rotation (without using a shadow framebuffer)
-# -Support for RandR mode changing
-
-#
-# Patch managed by http://www.holgerschurig.de/patcher.html
-#
-
-Index: xorg-server-1.2.0/configure.ac
-===================================================================
---- xorg-server-1.2.0.orig/configure.ac 2007-06-17 10:49:00.000000000 +0200
-+++ xorg-server-1.2.0/configure.ac 2007-06-17 10:49:02.000000000 +0200
-@@ -444,6 +444,7 @@
- AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
- AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
- AC_ARG_ENABLE(xsdl, AS_HELP_STRING([--enable-xsdl], [Build the kdrive Xsdl server (default: auto)]), [XSDL=$enableval], [XSDL=auto])
-+AC_ARG_ENABLE(imageon, AS_HELP_STRING([--enable-imageon], [Build the kdrive Ximageon server (default: no)]), [KDRIVEIMAGEON=$enableval], [KDRIVEIMAGEON=no])
- dnl xprint
- AC_ARG_ENABLE(freetype, AS_HELP_STRING([ --enable-freetype], [Build Xprint FreeType backend (default: yes)]), [XP_USE_FREETYPE=$enableval],[XP_USE_FREETYPE=no])
- AC_ARG_WITH(freetype-config, AS_HELP_STRING([ --with-freetype-config=PROG], [Use FreeType configuration program PROG (default: auto)]), freetype_config=$withval, freetype_config=auto)
-@@ -1581,6 +1582,11 @@
- AC_SUBST([XSDL_INCS])
-
-
-+AM_CONDITIONAL(KDRIVEIMAGEON, [test "x$KDRIVEIMAGEON" = xyes])
-+if test "x$KDRIVEIMAGEON" = xyes; then
-+ AC_DEFINE(KDRIVEIMAGEON, 1, [Build Ximageon server])
-+fi
-+
- dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers)
- AC_DEFINE(__XKBDEFRULES__, "xorg", [Default XKB rules])
- AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data])
-@@ -1806,6 +1812,7 @@
- hw/kdrive/epson/Makefile
- hw/kdrive/fake/Makefile
- hw/kdrive/fbdev/Makefile
-+hw/kdrive/imageon/Makefile
- hw/kdrive/i810/Makefile
- hw/kdrive/linux/Makefile
- hw/kdrive/mach64/Makefile
-Index: xorg-server-1.2.0/hw/kdrive/Makefile.am
-===================================================================
---- xorg-server-1.2.0.orig/hw/kdrive/Makefile.am 2007-06-17 10:49:00.000000000 +0200
-+++ xorg-server-1.2.0/hw/kdrive/Makefile.am 2007-06-17 11:03:40.000000000 +0200
-@@ -1,24 +1,15 @@
--if KDRIVEVESA
--VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga neomagic nvidia pm2 r128 \
-- smi via
--endif
--
- if KDRIVEFBDEV
--FBDEV_SUBDIRS = fbdev epson
--endif
--
--if XSDLSERVER
--XSDL_SUBDIRS = sdl
--endif
--
--if XEPHYR
--XEPHYR_SUBDIRS = ephyr
-+FBDEV_SUBDIRS = fbdev
- endif
-
- if KDRIVELINUX
- LINUX_SUBDIRS = linux
- endif
-
-+if KDRIVEIMAGEON
-+IMAGEON_SUBDIRS = imageon
-+endif
-+
- SUBDIRS = \
- src \
- $(LINUX_SUBDIRS) \
-@@ -26,7 +17,7 @@
- $(FBDEV_SUBDIRS) \
- $(VESA_SUBDIRS) \
- $(XEPHYR_SUBDIRS) \
-- fake
-+ $(IMAGEON_SUBDIRS)
-
- DIST_SUBDIRS = vesa ati chips epson i810 mach64 mga neomagic nvidia pm2 r128 \
- smi via fbdev sdl ephyr src linux fake sis300
-Index: xorg-server-1.2.0/hw/kdrive/imageon/Makefile.am
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/Makefile.am 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,47 @@
-+if KDRIVEFBDEV
-+FBDEV_INCLUDES =-I$(top_srcdir)/hw/kdrive/fbdev
-+FBDEV_LIBS = $(top_builddir)/hw/kdrive/fbdev/libfbdev.a
-+endif
-+
-+INCLUDES = \
-+ @KDRIVE_INCS@ \
-+ $(FBDEV_INCLUDES) \
-+ @KDRIVE_CFLAGS@
-+
-+bin_PROGRAMS = Ximageon
-+
-+if TSLIB
-+TSLIB_FLAG = -lts
-+endif
-+
-+noinst_LIBRARIES = libimageon.a
-+
-+libimageon_a_SOURCES = \
-+ imageon.h \
-+ imageon_regs.h \
-+ imageon_const.h \
-+ imageon.c \
-+ imageon_cursor.c \
-+ imageon_draw.c \
-+ imageon_support.c \
-+ imageon_video.c
-+
-+
-+
-+Ximageon_SOURCES = \
-+ imageon_stub.c
-+
-+W100_LIBS = \
-+ libimageon.a \
-+ $(FBDEV_LIBS) \
-+ @KDRIVE_LIBS@
-+
-+Ximageon_LDADD = \
-+ $(W100_LIBS) \
-+ @XSERVER_LIBS@ \
-+ $(TSLIB_FLAG)
-+
-+
-+Ximageon_DEPENDENCIES = \
-+ libimageon.a \
-+ $(FBDEV_LIBS)
-Index: xorg-server-1.2.0/hw/kdrive/imageon/imageon.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/imageon.c 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,606 @@
-+/*
-+ * Copyright © 2007 Manuel Teira
-+ *
-+ * 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 Manuel Teira not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Manuel Teira makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MANUEL TEIRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL MANUEL TEIRA 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 "imageon.h"
-+#include "imageon_regs.h"
-+#include "imageon_support.h"
-+
-+W100CardEntry w100_cards[] = {
-+ {0x1002, 0x5644, 0, "ATI Imageon 3200"},
-+ {0x1002, 0x5741, W100XVSupport, "ATI Imageon 100"},
-+ {0x1002, 0x5744, 0, "ATI Imageon 3220"},
-+ {0, 0, 0, NULL}
-+};
-+
-+W100ModeSpec w100_modes[] = {
-+ {800, 600, 16, W100_EXTMEM, FALSE},
-+ {640, 480, 16, W100_EXTMEM, FALSE},
-+ {320, 240, 16, W100_INTMEM, FALSE},
-+ { 0, 0, 0, 0, FALSE}
-+};
-+
-+W100StartupInfo w100StartupInfo;
-+
-+extern void (*tslib_transform_coords)(long *x, long *y, void *closure);
-+extern void *tslib_transform_closure;
-+
-+static void
-+W100Startup(W100CardInfo *w100c)
-+{
-+ int i;
-+ DBG_IMAGEON(("--W100Startup\n"));
-+ W100ModeSpec *modes;
-+ /* Take the current graphics mode */
-+ if (!W100GetFbMode(w100c, &w100StartupInfo.mode)) {
-+ ErrorF("(E) Unable to get current mode\n");
-+ }
-+ w100StartupInfo.randr = W100GetRotation(w100c);
-+ w100StartupInfo.portrait = w100StartupInfo.mode.width < w100StartupInfo.mode.height;
-+
-+ /* Test the valid modes */
-+ for (modes = w100_modes; modes->width; modes++) {
-+ modes->supported = W100CheckFbMode(w100c, modes);
-+ }
-+
-+ DBG_IMAGEON(("Startup Mode: %dx%d@%d, rot: %d, portrait: %s\n",
-+ w100StartupInfo.mode.width,
-+ w100StartupInfo.mode.height,
-+ w100StartupInfo.mode.bpp,
-+ w100StartupInfo.randr,
-+ w100StartupInfo.portrait ? "Yes" : "No"));
-+
-+ /* Tell the kernel to never switch off external memory */
-+ W100SysFsSet(w100c, W100_SYSFS_BASE "extmem", "1");
-+
-+ /* Disable framebuffer accel */
-+ W100SysFsSet(w100c, W100_SYSFS_BASE "accel", "0");
-+
-+ /* Enable fastsysclk */
-+ W100SysFsSet(w100c, W100_SYSFS_BASE "fastpllclk", "1");
-+
-+}
-+
-+
-+static Bool
-+W100Map(KdCardInfo * card, W100CardInfo *w100c)
-+{
-+ DBG_IMAGEON(("--W100Map\n"));
-+ w100c->mem_base = (CARD8 *) KdMapDevice(W100_MEM_BASE, W100_MEM_SIZE);
-+
-+ if (w100c->mem_base == NULL) {
-+ return FALSE;
-+ }
-+
-+ w100c->reg_base = w100c->mem_base + W100_REG_OFFSET;
-+
-+ /*
-+ * It doesn't matter mapping all the area as registers.
-+ * There's only difference when HAVE_ASM_MTRR_H is defined.
-+ * So, this call is doing nothing.
-+ */
-+ KdSetMappedMode(W100_MEM_BASE, W100_MEM_SIZE, KD_MAPPED_MODE_REGISTERS);
-+
-+ return TRUE;
-+}
-+
-+static void
-+W100Unmap(KdCardInfo * card, W100CardInfo *w100c)
-+{
-+ DBG_IMAGEON(("--W100Unmap\n"));
-+ if (w100c->mem_base) {
-+ KdResetMappedMode(W100_MEM_BASE, W100_MEM_SIZE,
-+ KD_MAPPED_MODE_REGISTERS);
-+ KdUnmapDevice((void *) w100c->mem_base, W100_MEM_SIZE);
-+ w100c->mem_base = w100c->reg_base = 0;
-+ }
-+}
-+
-+static void W100MemSetup(W100CardInfo *w100c)
-+{
-+ int reg_value;
-+ int int_start, int_size;
-+ int ext_start, ext_size;
-+ int i;
-+ DBG_IMAGEON(("--W100MemSetup\n"));
-+
-+ for (i = 0; i < w100c->num_memareas; i++) {
-+ xfree(w100c->memareas[i]);
-+ }
-+ xfree(w100c->memareas);
-+
-+ reg_value = MMIO_IN32(mmMC_FB_LOCATION);
-+ int_start = (reg_value & 0xffff) << 8;
-+ int_size = (((reg_value >> 16) & 0xffff) - (reg_value & 0xffff)) << 8;
-+ DBG_IMAGEON(("(I) MC_FB_LOCATION: 0x%08x. Start: 0x%08x, size: %d\n",
-+ reg_value, int_start, int_size));
-+
-+ reg_value = MMIO_IN32(mmMC_EXT_MEM_LOCATION);
-+ ext_start = (reg_value & 0xffff) << 8;
-+ ext_size = (((reg_value >> 16) & 0xffff) - (reg_value & 0xffff)) << 8;
-+ DBG_IMAGEON(("(I) MC_EXT_MEM_LOCATION: 0x%08x. Start: 0x%08x, size: %d\n",
-+ reg_value, ext_start, ext_size));
-+
-+ w100c->num_memareas = (ext_size > 0) ? 2 : 1;
-+ w100c->memareas = xcalloc(sizeof(W100MemArea *), w100c->num_memareas);
-+
-+ w100c->memareas[W100_INTMEM] = xcalloc(sizeof(W100MemArea), 1);
-+ w100c->memareas[W100_INTMEM]->priority = KD_VIDMEM_MAXPRIO;
-+ w100c->memareas[W100_INTMEM]->start = (CARD8 *) int_start;
-+ w100c->memareas[W100_INTMEM]->size = int_size;
-+
-+ if (w100c->num_memareas == 2) {
-+ w100c->memareas[W100_EXTMEM] = xcalloc(sizeof(W100MemArea), 1);
-+ w100c->memareas[W100_EXTMEM]->priority = KD_VIDMEM_MINPRIO;
-+ w100c->memareas[W100_EXTMEM]->start = (CARD8 *) ext_start;
-+ w100c->memareas[W100_EXTMEM]->size = ext_size;
-+ }
-+
-+ for (i = 0; i < w100c->num_memareas; i++) {
-+ DBG_IMAGEON(("(I) Memory mapped at 0x%08x(0x%08x), size %d bytes\n",
-+ W100_CARD2HOST(w100c->memareas[i]->start),
-+ w100c->memareas[i]->start,
-+ w100c->memareas[i]->size));
-+ }
-+
-+}
-+
-+static Bool
-+W100CardInit(KdCardInfo * card)
-+{
-+ W100CardInfo *w100c;
-+
-+ W100CardEntry *model = &w100_cards[0];
-+ static Bool initialized = FALSE;
-+
-+ DBG_IMAGEON(("--W100CardInit\n"));
-+
-+ w100c = xcalloc(sizeof(W100CardInfo), 1);
-+ if (w100c == NULL)
-+ return FALSE;
-+
-+ if (!fbdevInitialize(card, &w100c->fbdev)) {
-+ return FALSE;
-+ }
-+
-+ if (!W100Map(card, w100c)) {
-+ xfree(w100c);
-+ return FALSE;
-+ }
-+ card->driver = w100c;
-+
-+ while (model->name) {
-+ if (model->device == card->attr.deviceID) {
-+ w100c->card_id = model;
-+ break;
-+ }
-+ model++;
-+ }
-+
-+ ErrorF("(I) Using ATI card: %s\n", w100c->card_id->name);
-+
-+ if (!initialized) {
-+ initialized = TRUE;
-+ W100Startup(w100c);
-+ }
-+
-+ w100c->hw_window.mode = W100GetModeSpec(w100c, &w100StartupInfo.mode);
-+ w100c->hw_window.randr = w100StartupInfo.randr;
-+
-+ tslib_transform_closure = w100c;
-+ tslib_transform_coords = W100TransformTsLibCoordinates;
-+ return TRUE;
-+}
-+
-+
-+static void
-+W100CardFini(KdCardInfo * card)
-+{
-+ W100CardInfo *w100c = (W100CardInfo *) card->driver;
-+
-+ DBG_IMAGEON(("--W100CardFini\n"));
-+ W100Unmap(card, w100c);
-+ fbdevCardFini(card);
-+}
-+
-+static void
-+W100Setup(KdScreenInfo *screen)
-+{
-+ W100CardInfo(screen);
-+ W100MemArea *mem;
-+ KdMouseMatrix m;
-+ int fb_size, i;
-+
-+ DBG_IMAGEON(("--W100Setup\n"));
-+
-+ /* Adjust mode */
-+ w100c->hw_window.width = screen->width;
-+ w100c->hw_window.height = screen->height;
-+ w100c->hw_window.bpp = screen->fb[0].bitsPerPixel;
-+ W100SetupGraphicWindow(w100c);
-+
-+ /* Get some register values */
-+ w100c->regs.ENG_CNTL = MMIO_IN32(mmENG_CNTL);
-+ w100c->regs.VIDEO_CTRL = MMIO_IN32(mmVIDEO_CTRL);
-+ w100c->regs.GRAPHIC_H_DISP = MMIO_IN32(mmGRAPHIC_H_DISP);
-+ w100c->regs.GRAPHIC_V_DISP = MMIO_IN32(mmGRAPHIC_V_DISP);
-+ w100c->regs.DISP_DEBUG2 = MMIO_IN32(mmDISP_DEBUG2);
-+
-+ W100MemSetup(w100c);
-+
-+ /* Clear the VideoMemAreas set up by the framebuffer initialization */
-+ for (i = 0; i < screen->num_videomem_areas; i++) {
-+ xfree(screen->videomem_areas[i]);
-+ }
-+ xfree(screen->videomem_areas);
-+
-+ screen->videomem_areas = xcalloc(sizeof(KdVideoMemArea *),
-+ w100c->num_memareas);
-+ screen->num_videomem_areas = w100c->num_memareas;
-+
-+ screen->fb[0].byteStride = screen->width * screen->fb[0].bitsPerPixel / 8;
-+ fb_size = screen->fb[0].byteStride * screen->height;
-+
-+ DBG_IMAGEON(("(I) Framebuffer required size: %d bytes\n", fb_size));
-+
-+ for (i = 0; i < w100c->num_memareas; i++) {
-+ mem = w100c->memareas[i];
-+ screen->videomem_areas[i] = xcalloc(sizeof(KdVideoMemArea), 1);
-+ screen->videomem_areas[i]->priority = mem->priority;
-+ screen->videomem_areas[i]->base = W100_CARD2HOST(mem->start);
-+ screen->videomem_areas[i]->size = mem->size;
-+ if (w100c->hw_window.mode->fbpool == i) {
-+ DBG_IMAGEON(("(I) FrameBuffer in w100 memzone 0x%08x(0x%08x)\n",
-+ W100_CARD2HOST(mem->start), mem->start));
-+ screen->videomem_areas[i]->available_offset = fb_size;
-+ screen->fb[0].frameBuffer = W100_CARD2HOST(mem->start);
-+ } else {
-+ screen->videomem_areas[i]->available_offset = 0;
-+ }
-+ DBG_IMAGEON(("New videomem_area(priority:%d, start:0x%08x, size:%d, available_offset:%d\n",
-+ screen->videomem_areas[i]->priority,
-+ screen->videomem_areas[i]->base,
-+ screen->videomem_areas[i]->size,
-+ screen->videomem_areas[i]->available_offset));
-+ }
-+
-+
-+ w100c->hw_window.offset = W100_HOST2CARD(screen->fb[0].frameBuffer);
-+
-+ KdComputeMouseMatrix(&m, screen->randr,
-+ w100StartupInfo.portrait ?
-+ W100_MIN(screen->width, screen->height) :
-+ W100_MAX(screen->width, screen->height),
-+ w100StartupInfo.portrait ?
-+ W100_MAX(screen->width, screen->height) :
-+ W100_MIN(screen->width, screen->height));
-+
-+ KdSetMouseMatrix(&m);
-+
-+ DBG_IMAGEON(("Window(width:%d,height:%d,bpp:%d,offset:0x%08x"
-+ "(0x%08x), randr:%d)\n",
-+ w100c->hw_window.width,
-+ w100c->hw_window.height,
-+ w100c->hw_window.bpp,
-+ w100c->hw_window.offset,
-+ screen->fb[0].frameBuffer,
-+ w100c->hw_window.randr));
-+
-+}
-+
-+static Bool
-+W100ScreenInit(KdScreenInfo * screen)
-+{
-+ W100ScreenInfo *w100s;
-+ W100CardInfo(screen);
-+ Bool success = FALSE;
-+
-+ DBG_IMAGEON(("--W100ScreenInit\n"));
-+ w100s = xcalloc(sizeof(W100ScreenInfo), 1);
-+ if (w100s == NULL)
-+ return FALSE;
-+
-+ w100s->w100c = w100c;
-+ w100s->screen = screen;
-+ screen->driver = w100s;
-+
-+ success = fbdevScreenInitialize(screen, &w100s->fbdev);
-+
-+ if (!success) {
-+ screen->driver = NULL;
-+ xfree(w100s);
-+ return FALSE;
-+ }
-+
-+ W100Setup(screen);
-+
-+ return TRUE;
-+}
-+
-+static void
-+W100ScreenFini(KdScreenInfo * screen)
-+{
-+ W100ScreenInfo *w100s = (W100ScreenInfo *) screen->driver;
-+ DBG_IMAGEON(("--W100ScreenFini\n"));
-+ fbdevScreenFini(screen);
-+ xfree(w100s);
-+ screen->driver = 0;
-+}
-+
-+static Bool
-+W100InitScreen(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+
-+ DBG_IMAGEON(("--W100InitScreen\n"));
-+ if (w100c->card_id->caps & W100XVSupport) {
-+ W100InitVideo(pScreen);
-+ }
-+ return fbdevInitScreen(pScreen);
-+}
-+
-+#ifdef RANDR
-+
-+static Bool W100RandRSetConfig(ScreenPtr pScreen,
-+ Rotation randr,
-+ int rate,
-+ RRScreenSizePtr pSize)
-+{
-+ KdScreenPriv(pScreen);
-+ KdScreenInfo *screen = pScreenPriv->screen;
-+ W100CardInfo(pScreenPriv);
-+ Bool screenEnabled = pScreenPriv->enabled;
-+
-+ DBG_IMAGEON(("--W100RandRSetConfig(randr:%d,pSize:%dx%d)\n",
-+ randr, pSize->width, pSize->height));
-+
-+ if (screenEnabled) {
-+ KdDisableScreen(pScreen);
-+ }
-+
-+ if (randr & (RR_Rotate_0|RR_Rotate_180)) {
-+ pScreen->mmWidth = screen->width_mm;
-+ pScreen->mmHeight = screen->height_mm;
-+ pScreen->width = pSize->width;
-+ pScreen->height = pSize->height;
-+ } else {
-+ pScreen->mmWidth = screen->height_mm;
-+ pScreen->mmHeight = screen->width_mm;
-+ pScreen->width = pSize->height;
-+ pScreen->height = pSize->width;
-+ }
-+
-+ screen->randr = randr;
-+ screen->width = pScreen->width;
-+ screen->height = pScreen->height;
-+ w100c->hw_window.randr = KdSubRotation(w100StartupInfo.randr, randr);
-+ w100c->hw_window.mode = W100GetBestMode(w100c, pScreen->width, pScreen->height);
-+
-+ KdOffscreenSwapOut(screen->pScreen);
-+
-+ W100Setup(screen);
-+
-+ DBG_IMAGEON(("ModifyPixMapHeader(width:%d,height:%d,depth:%d,bpp:%d,bs:%d,fb:0x%08x)\n", pScreen->width, pScreen->height,
-+ screen->fb[0].depth,
-+ screen->fb[0].bitsPerPixel,
-+ screen->fb[0].byteStride,
-+ screen->fb[0].frameBuffer));
-+
-+
-+ (*pScreen->ModifyPixmapHeader) (fbGetScreenPixmap(pScreen),
-+ pScreen->width,
-+ pScreen->height,
-+ screen->fb[0].depth,
-+ screen->fb[0].bitsPerPixel,
-+ screen->fb[0].byteStride,
-+ screen->fb[0].frameBuffer);
-+
-+
-+ if (screenEnabled) {
-+ KdEnableScreen(pScreen);
-+ }
-+ return TRUE;
-+}
-+
-+static Bool W100RandRGetInfo(ScreenPtr pScreen, Rotation *rotations)
-+{
-+ KdScreenPriv(pScreen);
-+ KdScreenInfo *screen = pScreenPriv->screen;
-+ W100CardInfo(pScreenPriv);
-+ RRScreenSizePtr pSize;
-+ Rotation randr;
-+ W100ModeSpec *modes;
-+ int i;
-+
-+ DBG_IMAGEON(("--W100RandRGetInfo\n"));
-+
-+ *rotations = RR_Rotate_All;
-+
-+ for (modes = w100_modes; modes->width; modes++) {
-+ if (modes->supported) {
-+ pSize = RRRegisterSize(pScreen,
-+ modes->width,
-+ modes->height,
-+ screen->width_mm,
-+ screen->height_mm);
-+ if (modes == w100c->hw_window.mode) {
-+ RRSetCurrentConfig(pScreen, screen->randr, 0, pSize);
-+ }
-+ }
-+ }
-+
-+ return TRUE;
-+}
-+
-+static Bool W100RandRInit(ScreenPtr pScreen)
-+{
-+ rrScrPrivPtr pScrPriv = rrGetScrPriv(pScreen);
-+ DBG_IMAGEON(("--W100RandRInit\n"));
-+ pScrPriv->rrSetConfig = W100RandRSetConfig;
-+ pScrPriv->rrGetInfo = W100RandRGetInfo;
-+ return TRUE;
-+}
-+
-+#endif
-+
-+static Bool
-+W100FinishInitScreen(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ DBG_IMAGEON(("--W100FinishInitScreen\n"));
-+ if (!fbdevFinishInitScreen(pScreen))
-+ return FALSE;
-+
-+#ifdef RANDR
-+ if (!W100RandRInit(pScreen))
-+ return FALSE;
-+#endif
-+ return TRUE;
-+}
-+
-+static Bool
-+W100CreateResources(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+
-+ return fbdevCreateResources(pScreen);
-+}
-+
-+static void
-+W100Preserve(KdCardInfo * card)
-+{
-+ W100CardInfo *w100c = card->driver;
-+ DBG_IMAGEON(("--W100Preserve\n"));
-+
-+ fbdevPreserve(card);
-+}
-+
-+static void
-+W100Restore(KdCardInfo * card)
-+{
-+ W100CardInfo *w100c = card->driver;
-+ DBG_IMAGEON(("--W100Restore\n"));
-+ fbdevRestore(card);
-+}
-+
-+static Bool
-+W100DPMS(ScreenPtr pScreen, int mode)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ DBG_IMAGEON(("--W100DPMS\n"));
-+ return fbdevDPMS(pScreen, mode);
-+}
-+
-+static Bool
-+W100Enable(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+
-+ DBG_IMAGEON(("--W100Enable\n"));
-+
-+ /*
-+ if (!fbdevEnable(pScreen))
-+ return FALSE;
-+ */
-+
-+ if (w100c->mem_base == NULL) {
-+ if (!W100Map(pScreenPriv->screen->card, w100c)) {
-+ return FALSE;
-+ }
-+ W100Setup(pScreenPriv->screen);
-+ }
-+ W100SetupGraphicEngine(w100c);
-+
-+ graphic_offset_u go;
-+ go.val = MMIO_IN32(mmGRAPHIC_OFFSET);
-+ DBG_IMAGEON(("Graphic offset is 0x%08x(0x%08x)\n",
-+ go.f.graphic_offset,
-+ W100_CARD2HOST(go.f.graphic_offset)));
-+
-+
-+ return TRUE;
-+}
-+
-+static void
-+W100Disable(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ DBG_IMAGEON(("--W100Disable\n"));
-+ //W100Unmap(pScreenPriv->card, w100c);
-+
-+ fbdevDisable(pScreen);
-+}
-+
-+static void
-+W100GetColors(ScreenPtr pScreen, int fb, int n, xColorItem * pdefs)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+
-+ fbdevGetColors(pScreen, fb, n, pdefs);
-+}
-+
-+static void
-+W100PutColors(ScreenPtr pScreen, int fb, int n, xColorItem * pdefs)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+
-+ fbdevPutColors(pScreen, fb, n, pdefs);
-+}
-+
-+KdCardFuncs W100Funcs = {
-+ W100CardInit, /* cardinit */
-+ W100ScreenInit, /* scrinit */
-+ W100InitScreen, /* initScreen */
-+ W100FinishInitScreen, /* finishInitScreen */
-+ W100CreateResources, /* createRes */
-+ W100Preserve, /* preserve */
-+ W100Enable, /* enable */
-+ W100DPMS, /* dpms */
-+ W100Disable, /* disable */
-+ W100Restore, /* restore */
-+ W100ScreenFini, /* scrfini */
-+ W100CardFini, /* cardfini */
-+
-+ W100CursorInit, /* initCursor */
-+ W100CursorEnable, /* enableCursor */
-+ W100CursorDisable, /* disableCursor */
-+ W100CursorFini, /* finiCursor */
-+ W100RecolorCursor, /* recolorCursor */
-+
-+ W100InitAccel, /* initAccel */
-+ W100EnableAccel, /* enableAccel */
-+ W100DisableAccel, /* disableAccel */
-+ W100FiniAccel, /* finiAccel */
-+
-+ W100GetColors, /* getColors */
-+ W100PutColors, /* putColors */
-+};
-Index: xorg-server-1.2.0/hw/kdrive/imageon/imageon_const.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/imageon_const.h 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,161 @@
-+/*
-+ * Copyright © 2007 Manuel Teira
-+ *
-+ * 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 Manuel Teira not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Manuel Teira makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MANUEL TEIRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL MANUEL TEIRA 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 __IMAGEON_CONST_H__
-+#define __IMAGEON_CONST_H__
-+
-+// DP_GUI_MASTER_CNTL.GMC_Brush_DataType
-+// DP_DATATYPE.Brush_DataType
-+#define DP_BRUSH_8x8MONOOPA 0 //8x8 mono pattern (expanded to frgd, bkgd)
-+#define DP_BRUSH_8x8MONOTRA 1 //8x8 mono pattern (expanded to frgd, leave_alone)
-+#define DP_PEN_32x1MONOOPA 6 //32x1 mono pattern (expanded to frgd, bkgd)
-+#define DP_PEN_32x1MONOTRA 7 //32x1 mono pattern (expanded to frgd, leave_alone)
-+#define DP_BRUSH_8x8COLOR 10 //8x8 color pattern
-+#define DP_BRUSH_SOLIDCOLOR 13 //solid color pattern (frgd)
-+#define DP_BRUSH_NONE 15 //no brush used
-+
-+#define SIZE_BRUSH_8x8MONO 2
-+#define SIZE_PEN_32x1MONO 1
-+#define SIZE_BRUSH_8x8COLOR_8 16
-+#define SIZE_BRUSH_8x8COLOR_16 32
-+#define MAX_BRUSH_SIZE SIZE_BRUSH_8x8COLOR_16
-+
-+// DP_GUI_MASTER_CNTL.GMC_Dst_DataType
-+// DP_DATATYPE.Dp_Dst_DataType
-+#define DP_DST_8BPP 2 // 8 bpp grey scale
-+#define DP_DST_16BPP_1555 3 //16 bpp aRGB 1555
-+#define DP_DST_16BPP_444 5 //16 bpp aRGB 4444
-+
-+// DP_GUI_MASTER_CNTL.GMC_Src_DataType
-+// DP_DATATYPE.Dp_Src_DataType
-+#define DP_SRC_1BPP_OPA 0 //mono (expanded to frgd, bkgd)
-+#define DP_SRC_1BPP_TRA 1 //mono (expanded to frgd, leave_alone)
-+#define DP_SRC_COLOR_SAME_AS_DST 3 //color (same as DST)
-+#define DP_SRC_SOLID_COLOR_BLT 4 //solid color for Blt (use frgd)
-+#define DP_SRC_4BPP 5 //4 bpp
-+#define DP_SRC_12BPP_PACKED 6 //12 bpp packed
-+
-+// DP_GUI_MASTER_CNTL.GMC_Byte_Pix_Order
-+// DP_DATATYPE.Dp_Byte_Pix_Order
-+#define DP_PIX_ORDER_MSB2LSB 0 //monochrome pixel order from MSBit to LSBit
-+#define DP_PIX_ORDER_LSB2MSB 1 //monochrome pixel order from LSBit to MSBit
-+
-+// DP_GUI_MASTER_CNTL.GMC_Dp_Src_Source
-+#define DP_SRC_MEM_LINEAR 1 //loaded from memory (linear trajectory)
-+#define DP_SRC_MEM_RECTANGULAR 2 //loaded from memory (rectangular trajectory)
-+#define DP_SRC_HOSTDATA_BIT 3 //loaded from hostdata (linear trajectory)
-+#define DP_SRC_HOSTDATA_BYTE 4 //loaded from hostdata (linear trajectory & byte-aligned)
-+
-+// DP_GUI_MASTER_CNTL.GMC_Dp_Op
-+#define DP_OP_ROP 0
-+#define DP_OP_ARITHMETIC 1
-+
-+// E2_ARITHMETIC_CNTL.opcode
-+#define E2_OPC_GLBALP_ADD_SRC2 0
-+#define E2_OPC_GLBALP_SUB_SRC2 1
-+#define E2_OPC_SRC1_ADD_SRC2 2
-+#define E2_OPC_SRC1_SUB_SRC2 3
-+#define E2_OPC_DST_SADDBLEND_SRC2 4
-+#define E2_OPC_DST_CADDBLEND_SRC2 5
-+#define E2_OPC_DST_CSUBBLEND_SRC2 6
-+#define E2_OPC_LF_SRC2 7
-+#define E2_OPC_SCALE_SRC2 8
-+#define E2_OPC_STRETCH_SRC2 9
-+#define E2_OPC_SRC1_4BPPCPYWEXP 10
-+#define E2_OPC_MC1 11
-+#define E2_OPC_MC2 12
-+#define E2_OPC_MC1_IDCT 13
-+#define E2_OPC_MC2_IDCT 14
-+#define E2_OPC_IDCT_ONLY_IFRAME 15
-+
-+// E2_ARITHMETIC_CNTL.clamp
-+#define E2_CLAMP_OFF 0
-+#define E2_CLAMP_ON 1
-+
-+// E2_ARITHMETIC_CNTL.rounding
-+#define E2_ROUNDING_TRUNCATE 0
-+#define E2_ROUNDING_TO_INFINITY 1
-+
-+// E2_ARITHMETIC_CNTL.srcblend
-+#define E2_SRCBLEND_GLOBALALPHA 0
-+#define E2_SRCBLEND_ZERO 1
-+#define E2_SRCBLEND_SRC2ALPHA 2
-+#define E2_SRCBLEND_DSTALPHA 3
-+#define E2_SRCBLEND_ALPHA1PLANE 4
-+
-+// E2_ARITHMETIC_CNTL.destblend
-+#define E2_DSTBLEND_GLOBALALPHA 0
-+#define E2_DSTBLEND_ZERO 1
-+#define E2_DSTBLEND_SRC2ALPHA 2
-+#define E2_DSTBLEND_DSTALPHA 3
-+#define E2_DSTBLEND_ALPHA1PLANE 4
-+
-+// LCD_FORMAT.lcd_type
-+#define LCDTYPE_TFT333 0
-+#define LCDTYPE_TFT444 1
-+#define LCDTYPE_TFT555 2
-+#define LCDTYPE_TFT666 3
-+#define LCDTYPE_COLSTNPACK4 4
-+#define LCDTYPE_COLSTNPACK8F1 5
-+#define LCDTYPE_COLSTNPACK8F2 6
-+#define LCDTYPE_COLSTNPACK16 7
-+#define LCDTYPE_MONSTNPACK4 8
-+#define LCDTYPE_MONSTNPACK8 9
-+
-+// CP_RB_CNTL.rb_bufsz
-+#define RB_SIZE_2K 8
-+#define RB_SIZE_4K 9
-+#define RB_SIZE_8K 10
-+#define RB_SIZE_16K 11
-+#define RB_SIZE_32K 12
-+#define RB_SIZE_64K 13
-+
-+// GRAPHIC_CTRL.color_depth
-+#define COLOR_DEPTH_1BPP 0
-+#define COLOR_DEPTH_2BPP 1
-+#define COLOR_DEPTH_4BPP 2
-+#define COLOR_DEPTH_8BPP 3
-+#define COLOR_DEPTH_332 4
-+#define COLOR_DEPTH_A444 5
-+#define COLOR_DEPTH_A555 6
-+
-+// VIDEO_CTRL.video_mode
-+#define VIDEO_MODE_422 0
-+#define VIDEO_MODE_420 1
-+
-+// CLR_CMP_CNTL.cmp_fcn_src
-+#define CMP_FCN_SRC_NEQ 4
-+#define CMP_FCN_SRC_EQ 5
-+
-+// CLR_CMP_CNTL.cmp_src
-+#define CMP_SRC_SRC 1
-+
-+// Overlay formats
-+#define OVLFORMAT_YUV422 (6)
-+#define OVLFORMAT_YUV420 (7)
-+#define OVLFORMAT_RGB565 (5)
-+#define OVLFORMAT_EQU_DISPLAY (8)
-+
-+#define W100_CLK_SRC_XTAL 0
-+#define W100_CLK_SRC_PLL 1
-+
-+#endif
-Index: xorg-server-1.2.0/hw/kdrive/imageon/imageon_cursor.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/imageon_cursor.c 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,569 @@
-+/*
-+ * Copyright © 2007 Manuel Teira
-+ *
-+ * 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 Manuel Teira not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Manuel Teira makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MANUEL TEIRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL MANUEL TEIRA 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 "cursorstr.h"
-+#include "imageon.h"
-+#include "imageon_regs.h"
-+
-+#define W100_CURSOR_HEIGHT (16)
-+#define W100_CURSOR_WIDTH (16)
-+#define W100_CURSOR_PITCH (W100_CURSOR_WIDTH / 4)
-+
-+#define W100_CURSOR_SIZE W100_CURSOR_PITCH * W100_CURSOR_WIDTH
-+
-+static CARD16 expand2bpp[256];
-+
-+static CARD16 spread_byte(CARD8 b)
-+{
-+ CARD16 s = b;
-+
-+ s = ((s & 0x00f0) << 4) | (s & 0x000f);
-+ s = ((s & 0x0c0c) << 2) | (s & 0x0303);
-+ s = ((s & 0x2222) << 1) | (s & 0x1111);
-+ return s;
-+}
-+
-+static void W100InitExpansionTable()
-+{
-+ int i;
-+ for (i = 0; i < 256; i++) {
-+ expand2bpp[i] = spread_byte(i);
-+ }
-+}
-+
-+#define BigEndian(v) \
-+ (((v & 0x000000ff) << 24) | \
-+ ((v & 0x0000ff00) << 8) | \
-+ ((v & 0x00ff0000) >> 8) | \
-+ ((v & 0xff000000) >> 24))
-+
-+#define PixelOffset(x, y) \
-+ (((y) * W100_CURSOR_PITCH + ((x) / 4)) >> 2)
-+
-+#define PixelShift(x, y) \
-+ (2 * ((x) % 16))
-+
-+#define PixelMask(x, y) \
-+ ((0xc0000000) >> PixelShift(x, y))
-+
-+#define PixelVal(src, x, y) \
-+ ((*(src + PixelOffset(x, y)) & PixelMask(x, y)) >> (30 - PixelShift(x, y)))
-+
-+#define SetPixelVal(ptr, x, y, val) \
-+ *(((CARD32 *)(ptr)) + PixelOffset(x, y)) = \
-+ *(((CARD32 *)(ptr)) + PixelOffset(x, y)) & ~PixelMask(x, y) | \
-+ ((val) & 0x03) << (30 - PixelShift(x2, y2))
-+
-+#define DUMP_CURSOR(src) do { \
-+ int x; \
-+ int y; \
-+ for (y = 0; y < W100_CURSOR_HEIGHT; y++) { \
-+ DBG_IMAGEON(("Line %02d: ", y)); \
-+ for (x = 0; x < W100_CURSOR_WIDTH; x++) { \
-+ DBG_IMAGEON(("%d", PixelVal(src,x,y))); \
-+ } \
-+ DBG_IMAGEON(("\n")); \
-+ } \
-+ DBG_IMAGEON((".\n")); \
-+} while (0)
-+
-+static void
-+W100RotateCursor(int randr, CARD32 *src, CARD32 *dst)
-+{
-+ int x1, y1, x2, y2;
-+
-+ switch (randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ x1 = 0;
-+ y1 = 0;
-+ for (y2 = 0; y2 < W100_CURSOR_HEIGHT; y2++) {
-+ for (x2 = W100_CURSOR_WIDTH - 1; x2 >= 0; --x2) {
-+ SetPixelVal(dst, x2, y2, PixelVal(src, x1, y1));
-+ ++x1;
-+ if (x1 >= W100_CURSOR_WIDTH) {
-+ x1 = 0;
-+ ++y1;
-+ }
-+ }
-+ }
-+ break;
-+ case RR_Rotate_90:
-+ x1 = 0;
-+ y1 = 0;
-+ for (x2 = W100_CURSOR_WIDTH - 1; x2 >= 0; --x2) {
-+ for (y2 = W100_CURSOR_HEIGHT - 1; y2 >=0; --y2) {
-+ SetPixelVal(dst, x2, y2, PixelVal(src, x1, y1));
-+ ++x1;
-+ if (x1 >= W100_CURSOR_WIDTH) {
-+ x1 = 0;
-+ ++y1;
-+ }
-+ }
-+ }
-+ break;
-+ case RR_Rotate_180:
-+ x1 = 0;
-+ y1 = 0;
-+ for (y2 = W100_CURSOR_HEIGHT - 1; y2 >= 0; --y2) {
-+ for (x2 = 0; x2 < W100_CURSOR_WIDTH; x2++) {
-+ SetPixelVal(dst, x2, y2, PixelVal(src, x1, y1));
-+ ++x1;
-+ if (x1 >= W100_CURSOR_WIDTH) {
-+ x1 = 0;
-+ ++y1;
-+ }
-+ }
-+ }
-+ break;
-+ case RR_Rotate_270:
-+ x1 = 0;
-+ y1 = 0;
-+ for (x2 = 0; x2 < W100_CURSOR_WIDTH; x2++) {
-+ for (y2 = 0; y2 < W100_CURSOR_HEIGHT; y2++) {
-+ SetPixelVal(dst, x2, y2, PixelVal(src, x1, y1));
-+ ++x1;
-+ if (x1 >= W100_CURSOR_WIDTH) {
-+ x1 = 0;
-+ ++y1;
-+ }
-+ }
-+ }
-+ break;
-+ }
-+}
-+
-+static void
-+W100SetCursorColors(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+ CursorPtr pCursor = pCurPriv->pCursor;
-+ CursorBitsPtr bits = pCursor->bits;
-+ cursor_color_u fgcolor;
-+ cursor_color_u bgcolor;
-+
-+ fgcolor.f.cur_color_r = pCursor->foreRed >> 8;
-+ fgcolor.f.cur_color_g = pCursor->foreGreen >> 8;
-+ fgcolor.f.cur_color_b = pCursor->foreBlue >> 8;
-+
-+ bgcolor.f.cur_color_r = pCursor->backRed >> 8;
-+ bgcolor.f.cur_color_g = pCursor->backGreen >> 8;
-+ bgcolor.f.cur_color_b = pCursor->backBlue >> 8;
-+
-+ DBG_IMAGEON(("W100SetCursorColors fg(%02x,%02x,%02x), bg(%02x,%02x,%02x)\n",
-+ fgcolor.f.cur_color_r,
-+ fgcolor.f.cur_color_g,
-+ fgcolor.f.cur_color_b,
-+ bgcolor.f.cur_color_r,
-+ bgcolor.f.cur_color_g,
-+ bgcolor.f.cur_color_b));
-+
-+ W100DisableDisplayUpdate(w100c);
-+ MMIO_OUT32(mmCURSOR1_COLOR0, bgcolor.val);
-+ MMIO_OUT32(mmCURSOR1_COLOR1, fgcolor.val);
-+ W100EnableDisplayUpdate(w100c);
-+
-+}
-+
-+static void
-+W100LoadCursor(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+ CursorPtr pCursor = pCurPriv->pCursor;
-+ CursorBitsPtr bits = pCursor->bits;
-+ CARD32 *dst;
-+ CARD8 tmpCursor0[W100_CURSOR_SIZE];
-+ CARD8 tmpCursor1[W100_CURSOR_SIZE];
-+ CARD32 expValue, expMask;
-+ CARD32 *src;
-+ CARD32 *mask;
-+ int lwsrc;
-+ int line, i;
-+ int h, w;
-+
-+
-+ pCurPriv->pCursor = pCursor;
-+ pCurPriv->xhot = bits->xhot;
-+ pCurPriv->yhot = bits->yhot;
-+
-+ memset(tmpCursor0, 0xaa, W100_CURSOR_SIZE);
-+
-+ h = bits->height;
-+ w = bits->width;
-+ if (h > W100_CURSOR_HEIGHT) {
-+ h = W100_CURSOR_HEIGHT;
-+ }
-+
-+ if (w > W100_CURSOR_WIDTH) {
-+ w = W100_CURSOR_WIDTH;
-+ }
-+
-+ src = (CARD32*) bits->source;
-+ dst = (CARD32*) tmpCursor0;
-+ mask = (CARD32*) bits->mask;
-+
-+ lwsrc = BitmapBytePad(bits->width) >> 2;
-+
-+ for (line = 0; line < h; line++) {
-+ for (i = 0; i < lwsrc; i++) {
-+ expValue =
-+ (expand2bpp[src[i] & 0xff]) |
-+ (expand2bpp[(src[i] >> 8) & 0xff] << 16);
-+ expMask =
-+ (expand2bpp[mask[i] & 0xff]) |
-+ (expand2bpp[(mask[i] >> 8) & 0xff] << 16);
-+ expMask |= (expMask << 1); /* Expand 01 -> 11, 00 -> 00 */
-+ dst[i] = (0xaaaaaaaa & ~expMask) | (expValue & expMask);
-+ }
-+ src += lwsrc;
-+ mask += lwsrc;
-+ dst += lwsrc;
-+ }
-+
-+ /* Rotate the pixmap to get the correct orientation */
-+ W100RotateCursor(w100c->hw_window.randr,
-+ (CARD32*) tmpCursor0,
-+ (CARD32*) tmpCursor1);
-+
-+ DUMP_CURSOR((CARD32*)tmpCursor1);
-+ /* Correct endianness */
-+ src = (CARD32*) tmpCursor1;
-+ dst = (CARD32*) (pCurPriv->area->vidmem->base + pCurPriv->area->offset);
-+ DBG_IMAGEON(("W100LoadCursor(xhot:%d,yhot:%d,width:%d,height:%d) dst(0x%08x)\n",
-+ bits->xhot, bits->yhot,
-+ bits->width, bits->height,
-+ dst));
-+
-+ for (line = 0; line < h; line++) {
-+ for (i = 0; i < lwsrc; i++) {
-+ dst[i] = BigEndian(src[i]);
-+ }
-+ src += lwsrc;
-+ dst += lwsrc;
-+ }
-+
-+ W100SetCursorColors(pScreen);
-+}
-+
-+static void
-+W100UnloadCursor(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ cursor_h_pos_u hpos;
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+
-+ DBG_IMAGEON(("W100UnloadCursor pCurPriv:%p\n", pCurPriv));
-+
-+ hpos.val = pCurPriv->hpos;
-+ hpos.f.cur_en = 0;
-+
-+ W100DisableDisplayUpdate(w100c);
-+ MMIO_OUT32(mmCURSOR1_H_POS, hpos.val);
-+ W100EnableDisplayUpdate(w100c);
-+ pCurPriv->hpos = hpos.val;
-+}
-+
-+static void
-+W100MoveCursor(ScreenPtr pScreen, int x, int y)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+ int xoffs, yoffs;
-+ cursor_offset_u cursor_offset;
-+ cursor_h_pos_u hpos;
-+ cursor_v_pos_u vpos;
-+ graphic_h_disp_u graphic_hdisp;
-+ graphic_v_disp_u graphic_vdisp;
-+ BoxRec cursorBox, deviceBox;
-+
-+
-+ if (!pCurPriv->has_cursor) {
-+ return;
-+ }
-+ if (!pScreenPriv->enabled) {
-+ return;
-+ }
-+
-+ graphic_hdisp.val = w100c->regs.GRAPHIC_H_DISP;
-+ graphic_vdisp.val = w100c->regs.GRAPHIC_V_DISP;
-+ xoffs = 0;
-+ yoffs = 0;
-+ cursorBox.x1 = x - pCurPriv->xhot;
-+ cursorBox.y1 = y - pCurPriv->yhot;
-+ cursorBox.x2 = cursorBox.x1 + pCurPriv->width - 1;
-+ cursorBox.y2 = cursorBox.y1 + pCurPriv->height - 1;
-+ W100MapToDevice(w100c, &cursorBox, &deviceBox);
-+
-+ if (deviceBox.x1 < 0) {
-+ xoffs = -deviceBox.x1;
-+ deviceBox.x1 = 0;
-+ }
-+
-+ if (deviceBox.y1 < 0) {
-+ yoffs = -deviceBox.y1;
-+ deviceBox.y1 = 0;
-+ }
-+
-+ hpos.f.cur_h_start = graphic_hdisp.f.graphic_h_start + deviceBox.x1;
-+ hpos.f.cur_h_end = graphic_hdisp.f.graphic_h_start + deviceBox.x2 + 1;
-+ hpos.f.cur_en = 1;
-+ vpos.f.cur_v_start = graphic_vdisp.f.graphic_v_start + deviceBox.y1;
-+ vpos.f.cur_v_end = graphic_vdisp.f.graphic_v_start + deviceBox.y2 + 1;
-+
-+ cursor_offset.f.cur_x_offset = xoffs;
-+ cursor_offset.f.cur_y_offset = yoffs;
-+ cursor_offset.f.cur_offset = (CARD32)
-+ W100_HOST2CARD(pCurPriv->area->vidmem->base
-+ + pCurPriv->area->offset);
-+ DBG_IMAGEON(("W100MoveCursor dst(x:%d,y:%d),"
-+ "hwpos(hpos.start:%d,hpos.end:%d,vpos.start:%d,vpos.end:%d),"
-+ "mapped(x:%d,y:%d,xoffs:%d,yoffs:%d)\n",
-+ x, y,
-+ hpos.f.cur_h_start, hpos.f.cur_h_end,
-+ vpos.f.cur_v_start, vpos.f.cur_v_end,
-+ deviceBox.x1, deviceBox.y1, xoffs, yoffs));
-+
-+ W100DisableDisplayUpdate(w100c);
-+ MMIO_OUT32(mmCURSOR1_OFFSET, cursor_offset.val);
-+ MMIO_OUT32(mmCURSOR1_V_POS, vpos.val);
-+ MMIO_OUT32(mmCURSOR1_H_POS, hpos.val);
-+ W100EnableDisplayUpdate(w100c);
-+
-+ pCurPriv->hpos = hpos.val;
-+ pCurPriv->vpos = vpos.val;
-+ pCurPriv->coffset = cursor_offset.val;
-+
-+}
-+
-+static Bool
-+W100RealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+ DBG_IMAGEON(("W100RealizeCursor\n"));
-+
-+ if (!pScreenPriv->enabled) {
-+ return TRUE;
-+ }
-+
-+ if (pCursor && pCurPriv->pCursor == pCursor) {
-+ int x, y;
-+ miPointerPosition(&x, &y);
-+ W100LoadCursor(pScreen);
-+ W100MoveCursor(pScreen, x, y);
-+ }
-+ return TRUE;
-+}
-+
-+
-+static Bool
-+W100UnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
-+{
-+ DBG_IMAGEON(("W100UnrealizeCursor\n"));
-+ return TRUE;
-+}
-+
-+
-+static void
-+W100SetCursor(ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+
-+ pCurPriv->pCursor = pCursor;
-+
-+ if (!pScreenPriv->enabled) {
-+ return;
-+ }
-+
-+ if (pCursor) {
-+ W100LoadCursor(pScreen);
-+ W100MoveCursor(pScreen, x, y);
-+ } else {
-+ W100UnloadCursor(pScreen);
-+ }
-+}
-+
-+
-+miPointerSpriteFuncRec W100PointerSpriteFuncs = {
-+ W100RealizeCursor,
-+ W100UnrealizeCursor,
-+ W100SetCursor,
-+ W100MoveCursor,
-+};
-+
-+static void
-+W100QueryBestSize(int class, unsigned short *pwidth, unsigned short *pheight,
-+ ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+
-+ switch (class) {
-+ case CursorShape:
-+ if (*pwidth > pCurPriv->width) {
-+ *pwidth = pCurPriv->width;
-+ }
-+ if (*pheight > pCurPriv->height) {
-+ *pheight = pCurPriv->height;
-+ }
-+ if (*pwidth > pScreen->width) {
-+ *pwidth = pScreen->width;
-+ }
-+ if (*pheight > pScreen->height) {
-+ *pheight = pScreen->height;
-+ }
-+ break;
-+ default:
-+ fbQueryBestSize(class, pwidth, pheight, pScreen);
-+ break;
-+ }
-+}
-+
-+static void
-+W100CursorSave(ScreenPtr pScreen, KdOffscreenArea *area)
-+{
-+ KdScreenPriv(pScreen);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+ DBG_IMAGEON(("W100CursorSave\n"));
-+
-+ pCurPriv->area = NULL;
-+}
-+
-+void
-+W100CursorEnable(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+
-+ if (!pCurPriv->has_cursor) {
-+ return;
-+ }
-+
-+ DBG_IMAGEON(("W100CursorEnable\n"));
-+
-+ if (pCurPriv->area == NULL) {
-+ pCurPriv->area = KdOffscreenAlloc(pScreen,
-+ W100_CURSOR_SIZE, 0, TRUE,
-+ W100CursorSave, w100s);
-+ }
-+ if (pCurPriv->area == NULL) {
-+ FatalError("Couldn't allocate offscreen memory for cursor.\n");
-+ } else {
-+ DBG_IMAGEON(("Cursor memory at 0x%08x(0x%08x)\n",
-+ pCurPriv->area->vidmem->base + pCurPriv->area->offset,
-+ W100_HOST2CARD(pCurPriv->area->vidmem->base
-+ + pCurPriv->area->offset)));
-+ }
-+ if (pCurPriv->pCursor) {
-+ int x, y;
-+ miPointerPosition(&x, &y);
-+ W100LoadCursor(pScreen);
-+ W100MoveCursor(pScreen, x, y);
-+ } else {
-+ W100UnloadCursor(pScreen);
-+ }
-+}
-+
-+
-+void
-+W100CursorDisable(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+ DBG_IMAGEON(("W100CursorDisable\n"));
-+
-+ if (!pScreenPriv->enabled || !pCurPriv->has_cursor) {
-+ return;
-+ }
-+
-+ if (pCurPriv->pCursor) {
-+ W100UnloadCursor(pScreen);
-+ }
-+
-+ pCurPriv->area = NULL;
-+}
-+
-+Bool
-+W100CursorInit(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+
-+ DBG_IMAGEON(("W100CursorInit\n"));
-+
-+ pCurPriv->width = W100_CURSOR_WIDTH;
-+ pCurPriv->height = W100_CURSOR_HEIGHT;
-+ pScreen->QueryBestSize = W100QueryBestSize;
-+ miPointerInitialize(pScreen,
-+ &W100PointerSpriteFuncs,
-+ &kdPointerScreenFuncs,
-+ FALSE);
-+ pCurPriv->has_cursor = TRUE;
-+ pCurPriv->pCursor = NULL;
-+ W100InitExpansionTable();
-+ return TRUE;
-+}
-+
-+
-+void
-+W100RecolorCursor(ScreenPtr pScreen, int ndef, xColorItem *pdef)
-+{
-+ return;
-+}
-+
-+
-+void
-+W100CursorFini(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100ScreenInfo(pScreenPriv);
-+ W100Cursor *pCurPriv = &w100s->cursor;
-+
-+ pCurPriv->has_cursor = FALSE;
-+ pCurPriv->pCursor = NULL;
-+}
-Index: xorg-server-1.2.0/hw/kdrive/imageon/imageon_draw.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/imageon_draw.c 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,238 @@
-+/*
-+ * Copyright © 2007 Manuel Teira
-+ *
-+ * 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 Manuel Teira not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Manuel Teira makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MANUEL TEIRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL MANUEL TEIRA 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 "imageon.h"
-+#include "imageon_regs.h"
-+#include "imageon_const.h"
-+#include "imageon_support.h"
-+#include "kaa.h"
-+
-+static W100CardInfo *currentCard;
-+
-+void
-+W100WaitMarker(ScreenPtr pScreen, int marker)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100WaitIdle(w100c);
-+}
-+
-+Bool
-+W100PrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg)
-+{
-+ KdScreenPriv(pPix->drawable.pScreen);
-+ W100ScreenInfo(pScreenPriv);
-+ W100CardInfo(pScreenPriv);
-+ W100PortPrivPtr pPortPriv = w100s->pAdaptor->pPortPrivates[0].ptr;
-+ int fifoEntries = 4;
-+
-+ DBG_IMAGEON(("W100PrepareSolid(alu:%d, pm:0x%08x, fg:%d)\n",
-+ alu, pm, fg));
-+
-+ W100ResetContext(w100c);
-+ W100SetPixelMask(w100c, pm);
-+
-+ if (W100SetDestinationPixmap(pPix)) {
-+ if (w100c->ctx.mask.enable) {
-+ ++fifoEntries;
-+ }
-+ if (W100WaitCmdFifoEntries(w100c, fifoEntries)) {
-+ MMIO_OUT32(mmDP_GUI_MASTER_CNTL, W100ComputeSolidGmc(w100c, alu));
-+ MMIO_OUT32(mmDST_PITCH, w100c->ctx.dst.pitch);
-+ MMIO_OUT32(mmDST_OFFSET, w100c->ctx.dst.offset);
-+ MMIO_OUT32(mmDP_BRUSH_FRGD_CLR, fg);
-+
-+ if (w100c->ctx.mask.enable) {
-+ MMIO_OUT32(mmDP_WRITE_MSK, pm);
-+ }
-+ currentCard = w100c;
-+ return TRUE;
-+ }
-+ }
-+ ErrorF("Error in W100PrepareSolid\n");
-+ return FALSE;
-+}
-+
-+void
-+W100Solid(int x1, int y1, int x2, int y2)
-+{
-+ W100CardInfo *w100c = currentCard;
-+ DBG_IMAGEON(("W100Solid(x1:%d,y1:%d,x2:%d,y2:%d)\n", x1, y1, x2, y2));
-+
-+ if (W100WaitCmdFifoEntries(w100c, 2)) {
-+ MMIO_OUT32(mmDST_Y_X, (y1 << 16) | x1);
-+ MMIO_OUT32(mmDST_HEIGHT_WIDTH, ((y2 - y1) << 16) | (x2 - x1));
-+ } else {
-+ ErrorF("Error in W100Solid\n");
-+ }
-+}
-+
-+void
-+W100DoneSolid(void)
-+{
-+}
-+
-+
-+Bool
-+W100PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst,
-+ int dx, int dy, int alu, Pixel pm)
-+{
-+ KdScreenPriv(pDst->drawable.pScreen);
-+ W100ScreenInfo(pScreenPriv);
-+ W100CardInfo(pScreenPriv);
-+ dp_datatype_u datatype;
-+
-+ int fifoEntries = 6;
-+
-+ W100ResetContext(w100c);
-+ W100SetPixelMask(w100c, pm);
-+ W100SetXForm(w100c, dx, dy);
-+
-+ if (W100SetSourcePixmap(pSrc) && W100SetDestinationPixmap(pDst)) {
-+ DBG_IMAGEON(("W100PrepareCopy(src(pitch:%d,offset:0x%08x),"
-+ "dst(pitch:%d,offset:0x%08x))\n",
-+ w100c->ctx.src.pitch,
-+ w100c->ctx.src.offset,
-+ w100c->ctx.dst.pitch,
-+ w100c->ctx.dst.offset));
-+ if (w100c->ctx.mask.enable) {
-+ ++fifoEntries;
-+ }
-+
-+ if (W100WaitCmdFifoEntries(w100c, fifoEntries)) {
-+ MMIO_OUT32(mmSRC_PITCH, w100c->ctx.src.pitch);
-+ MMIO_OUT32(mmSRC_OFFSET, w100c->ctx.src.offset);
-+ MMIO_OUT32(mmDST_PITCH, w100c->ctx.dst.pitch);
-+ MMIO_OUT32(mmDST_OFFSET, w100c->ctx.dst.offset);
-+ MMIO_OUT32(mmDP_GUI_MASTER_CNTL, W100ComputeCopyGmc(w100c, alu));
-+ if (w100c->ctx.mask.enable) {
-+ MMIO_OUT32(mmDP_WRITE_MSK, pm);
-+ }
-+ MMIO_OUT32(mmDP_CNTL, w100c->ctx.xform.dataPath);
-+ currentCard = w100c;
-+ return TRUE;
-+ }
-+ }
-+ ErrorF("Error in W100PrepareCopy\n");
-+ return FALSE;
-+}
-+
-+void
-+W100Copy(int srcX, int srcY, int dstX, int dstY, int w, int h)
-+{
-+ W100CardInfo *w100c = currentCard;
-+ DBG_IMAGEON(("W100Copy(src(x:%d,y:%d),dst(x:%d,y:%d),w:%d,h:%d)\n",
-+ srcX, srcY,
-+ dstX, dstY,
-+ w, h));
-+ if (w100c->ctx.xform.dx < 0) {
-+ dstX += w - 1;
-+ srcX += w - 1;
-+ }
-+
-+ if (w100c->ctx.xform.dy < 0) {
-+ dstY += h - 1;
-+ srcY += h - 1;
-+ }
-+
-+ if (W100WaitCmdFifoEntries(w100c, 3)) {
-+ MMIO_OUT32(mmSRC_Y_X, (srcY << 16) | srcX);
-+ MMIO_OUT32(mmDST_Y_X, (dstY << 16) | dstX);
-+ MMIO_OUT32(mmDST_HEIGHT_WIDTH, (h << 16) | w);
-+ } else {
-+ ErrorF("Error in W100Copy\n");
-+ }
-+}
-+
-+void
-+W100DoneCopy(void)
-+{
-+}
-+
-+Bool
-+W100InitAccel(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100ScreenInfo(pScreenPriv);
-+
-+
-+ DBG_IMAGEON(("--W100InitAccel: %d/%d depth/bpp\n",
-+ pScreenPriv->screen->fb[0].depth,
-+ pScreenPriv->screen->fb[0].bitsPerPixel));
-+
-+ memset(&w100s->kaa, 0, sizeof(KaaScreenInfoRec));
-+ w100s->kaa.waitMarker = W100WaitMarker;
-+ w100s->kaa.PrepareSolid = W100PrepareSolid;
-+ w100s->kaa.Solid = W100Solid;
-+ w100s->kaa.DoneSolid = W100DoneSolid;
-+ w100s->kaa.PrepareCopy = W100PrepareCopy;
-+ w100s->kaa.Copy = W100Copy;
-+ w100s->kaa.DoneCopy = W100DoneCopy;
-+
-+ w100s->kaa.flags |= KAA_OFFSCREEN_PIXMAPS;
-+ /* Offset alignment, not sure if this is enought */
-+ w100s->kaa.offsetAlign = 0;
-+ w100s->kaa.pitchAlign = 16;
-+
-+ if (!kaaDrawInit(pScreen, &w100s->kaa)) {
-+ return FALSE;
-+ }
-+ DBG_IMAGEON(("KAA flags: 0x%08x\n", w100s->kaa.flags));
-+ return TRUE;
-+}
-+
-+void
-+W100EnableAccel(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100ScreenInfo(pScreenPriv);
-+ W100CardInfo(pScreenPriv);
-+
-+ DBG_IMAGEON(("--W100EnableAccel\n"));
-+
-+ w100s->kaa.PrepareBlend = NULL;
-+ w100s->kaa.Blend = NULL;
-+ w100s->kaa.DoneBlend = NULL;
-+ w100s->kaa.CheckComposite = NULL;
-+ w100s->kaa.PrepareComposite = NULL;
-+ w100s->kaa.Composite = NULL;
-+ w100s->kaa.DoneComposite = NULL;
-+ w100s->kaa.UploadToScreen = NULL;
-+ w100s->kaa.UploadToScratch = NULL;
-+ kaaMarkSync(pScreen);
-+}
-+
-+void
-+W100DisableAccel(ScreenPtr pScreen)
-+{
-+ DBG_IMAGEON(("--W100DisableAccel\n"));
-+}
-+
-+void
-+W100FiniAccel(ScreenPtr pScreen)
-+{
-+ DBG_IMAGEON(("--W100FiniAccel\n"));
-+}
-Index: xorg-server-1.2.0/hw/kdrive/imageon/imageon.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/imageon.h 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,284 @@
-+/*
-+ * Copyright © 2007 Manuel Teira
-+ *
-+ * 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 Manuel Teira not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Manuel Teira makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MANUEL TEIRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL MANUEL TEIRA 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 _IMAGEON_H_
-+#define _IMAGEON_H_
-+
-+#ifdef HAVE_CONFIG_H
-+#include <kdrive-config.h>
-+#endif
-+
-+#include <fbdev.h>
-+
-+#include <kxv.h>
-+
-+#define DEBUG_IMAGEON 0
-+#if DEBUG_IMAGEON
-+#define DBG_IMAGEON(a) ErrorF a
-+#else
-+#define DBG_IMAGEON(a)
-+#endif
-+
-+
-+#define W100_MEM_BASE (0x08000000)
-+#define W100_REG_OFFSET (0x00010000)
-+#define W100_REG_BASE (W100_MEM_BASE + W100_REG_OFFSET)
-+#define W100_MEM_SIZE (0x01000000)
-+#define W100_REG_SIZE (0x00002000)
-+#define W100_CMDFIFO_SIZE (16)
-+
-+#define W100_CARD2HOST(x) (w100c->mem_base + (CARD32)(x))
-+#define W100_HOST2CARD(x) ((x) - (CARD32)(w100c->mem_base))
-+#define W100_MEMAREAS (2)
-+#define W100_INTMEM (0)
-+#define W100_EXTMEM (1)
-+
-+#define W100_SYSFS_BASE "/sys/bus/platform/devices/w100fb/"
-+
-+#define MMIO_OUT32(a, v) (*(VOL32 *)((w100c->reg_base) + (a)) = (v))
-+#define MMIO_IN32(a) (*(VOL32 *)((w100c->reg_base) + (a)))
-+
-+#define W100_MAX(x, y) ((x) > (y) ? x : y)
-+#define W100_MIN(x, y) ((x) < (y) ? x : y)
-+
-+#define W100_ALIGN(q, a) ((q + a - 1) & ~(a - 1))
-+
-+#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))
-+
-+typedef volatile CARD8 VOL8;
-+typedef volatile CARD16 VOL16;
-+typedef volatile CARD32 VOL32;
-+
-+typedef struct _W100CardEntry {
-+ CARD16 vendor;
-+ CARD16 device;
-+ CARD8 caps;
-+ char *name;
-+} W100CardEntry;
-+
-+
-+typedef enum _W100Caps {
-+ W100XVSupport = 1
-+} W100Caps;
-+
-+typedef struct _W100ModeSpec {
-+ CARD16 width;
-+ CARD16 height;
-+ CARD8 bpp;
-+ CARD8 fbpool;
-+ Bool supported;
-+} W100ModeSpec;
-+
-+typedef struct _W100BoxRec {
-+ CARD16 x;
-+ CARD16 y;
-+ CARD16 w;
-+ CARD16 h;
-+} W100BoxRec, *W100BoxPtr;
-+
-+typedef struct _W100Mode {
-+ CARD16 width;
-+ CARD16 height;
-+ CARD8 bpp;
-+} W100Mode;
-+
-+typedef struct _W100MemArea {
-+ CARD8 *start;
-+ CARD32 size;
-+ CARD8 priority;
-+} W100MemArea;
-+
-+typedef struct _W100StartupInfo {
-+ W100CardEntry *card_id;
-+ W100Mode mode;
-+ Bool portrait;
-+ int randr;
-+} W100StartupInfo;
-+
-+typedef struct _W100CardInfo {
-+ FbdevPriv fbdev;
-+ W100CardEntry *card_id;
-+ CARD8 *mem_base;
-+ CARD8 *reg_base;
-+ W100MemArea **memareas;
-+ int num_memareas;
-+ int cmdfifo_entries;
-+ struct {
-+ CARD32 ENG_CNTL;
-+ CARD32 VIDEO_CTRL;
-+ CARD32 GRAPHIC_H_DISP;
-+ CARD32 GRAPHIC_V_DISP;
-+ CARD32 DISP_DEBUG2;
-+ } regs;
-+ struct {
-+ CARD8 *offset;
-+ CARD16 width;
-+ CARD16 height;
-+ int randr;
-+ W100ModeSpec *mode;
-+ CARD8 bpp;
-+ } hw_window;
-+ CARD8 last_dst_videomem;
-+ CARD8 last_src_videomem;
-+ struct {
-+ struct {
-+ CARD8 datatype;
-+ CARD32 pitch;
-+ CARD32 offset;
-+ CARD8 videomem;
-+ } dst;
-+ struct {
-+ CARD8 datatype;
-+ CARD32 pitch;
-+ CARD32 offset;
-+ CARD8 videomem;
-+ } src;
-+ struct {
-+ int dx;
-+ int dy;
-+ int randr;
-+ Bool mirror;
-+ CARD32 dataPath;
-+ } xform;
-+ struct {
-+ Pixel pm;
-+ Bool enable;
-+ } mask;
-+ } ctx;
-+} W100CardInfo;
-+
-+#define W100GetCardInfo(kd) ((W100CardInfo *) ((kd)->card->driver))
-+#define W100CardInfo(kd) W100CardInfo *w100c = W100GetCardInfo(kd)
-+
-+typedef struct _W100Cursor {
-+ int width, height;
-+ int xhot, yhot;
-+ Bool has_cursor;
-+ CursorPtr pCursor;
-+ KdOffscreenArea *area;
-+ CARD32 vpos;
-+ CARD32 hpos;
-+ CARD32 coffset;
-+} W100Cursor;
-+
-+typedef struct _W100ScreenInfo {
-+ FbdevScrPriv fbdev;
-+ KaaScreenInfoRec kaa;
-+ W100CardInfo *w100c;
-+ KdScreenInfo *screen;
-+ KdVideoAdaptorPtr pAdaptor;
-+ W100Cursor cursor;
-+} W100ScreenInfo;
-+
-+#define W100GetScreenInfo(kd) ((W100ScreenInfo *) ((kd)->screen->driver))
-+#define W100ScreenInfo(kd) W100ScreenInfo *w100s = W100GetScreenInfo(kd)
-+
-+typedef enum _W100VideoStatus {
-+ W100_OVERLAY_ON = 1,
-+ W100_OVERLAY_CONFIGURED = 2
-+} W100VideoStatus;
-+
-+
-+typedef struct _W100PortPriv {
-+ CARD32 videoStatus;
-+ CARD32 videoCtrl;
-+ RegionRec clip;
-+ struct {
-+ int width; /* Source width */
-+ int height; /* Source height */
-+ unsigned char *buffer; /* Source buffer */
-+ int id; /* Source FOURCC */
-+ int size; /* Size of source rect (bytes) */
-+ KdOffscreenArea *surface; /* Source surface (on card memory) */
-+ BoxRec box; /* Source rect boundaries */
-+ } src;
-+ struct {
-+ BoxRec box; /* Screen rectangle */
-+ } dst;
-+ struct {
-+ int size; /* Size of the overlay surface (bytes) */
-+ KdOffscreenArea *surface; /* Overlay surface (on card memory) */
-+ BoxRec box; /* Overlay box (util size) */
-+ BoxRec frame; /* Overlay box (plus corrections) */
-+ Bool changed; /* To avoid recalculations */
-+ int horExp; /* Horizontal expansion */
-+ int verExp; /* Vertical expansion */
-+ int maxSize; /* Maximum allowed surface size (bytes) */
-+ int colorKey; /* Colour to replace with overlay */
-+ int brightness; /* Brigthness */
-+ } ovl;
-+ struct {
-+ int size; /* Number of planes */
-+ int bpp; /* bpp of the planes */
-+ int offset[3]; /* Planes offsets */
-+ CARD32 yplane; /* Offset (card) of Y plane */
-+ CARD32 uplane; /* Offset (card) of U plane */
-+ CARD32 vplane; /* Offset (card) of V plane */
-+ } planes;
-+ Bool changed; /* To track changes and avoid recalculations */
-+} W100PortPrivRec, *W100PortPrivPtr;
-+
-+extern KdCardFuncs W100Funcs;
-+
-+/* imageon_draw.c */
-+void W100WaitMarker(ScreenPtr pScreen, int marker);
-+Bool W100PrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg);
-+void W100Solid(int x1, int y1, int x2, int y2);
-+Bool W100PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst,
-+ int dx, int dy, int alu, Pixel pm);
-+void W100Copy(int srcX, int srcY, int dstX, int dstY, int w, int h);
-+void W100DoneCopy(void);
-+Bool W100InitAccel(ScreenPtr pScreen);
-+void W100EnableAccel(ScreenPtr pScreen);
-+void W100DisableAccel(ScreenPtr pScreen);
-+void W100FiniAccel(ScreenPtr pScreen);
-+/* imageon_cursor.c */
-+void W100CursorEnable(ScreenPtr pScreen);
-+void W100CursorDisable(ScreenPtr pScreen);
-+Bool W100CursorInit(ScreenPtr pScreen);
-+void W100RecolorCursor(ScreenPtr pScreen, int ndef, xColorItem * pdef);
-+void W100CursorFini(ScreenPtr pScreen);
-+
-+
-+
-+
-+#endif /* _IMAGEON_H_ */
-Index: xorg-server-1.2.0/hw/kdrive/imageon/imageon_regs.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/imageon_regs.h 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,4155 @@
-+/*
-+ * Copyright © 2007 Manuel Teira
-+ *
-+ * 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 Manuel Teira not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Manuel Teira makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MANUEL TEIRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL MANUEL TEIRA 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 __IMAGEON_REGS_H__
-+#define __IMAGEON_REGS_H__
-+
-+/* Block CIF Start: */
-+#define mmCHIP_ID 0x0000
-+#define mmREVISION_ID 0x0004
-+#define mmWRAP_BUF_A 0x0008
-+#define mmWRAP_BUF_B 0x000C
-+#define mmWRAP_TOP_DIR 0x0010
-+#define mmWRAP_START_DIR 0x0014
-+#define mmCIF_CNTL 0x0018
-+#define mmCFGREG_BASE 0x001C
-+#define mmCIF_IO 0x0020
-+#define mmCIF_READ_DBG 0x0024
-+#define mmCIF_WRITE_DBG 0x0028
-+#define cfgIND_ADDR_A_0 0x0000
-+#define cfgIND_ADDR_A_1 0x0001
-+#define cfgIND_ADDR_A_2 0x0002
-+#define cfgIND_DATA_A 0x0003
-+#define cfgREG_BASE 0x0004
-+#define cfgINTF_CNTL 0x0005
-+#define cfgSTATUS 0x0006
-+#define cfgCPU_DEFAULTS 0x0007
-+#define cfgIND_ADDR_B_0 0x0008
-+#define cfgIND_ADDR_B_1 0x0009
-+#define cfgIND_ADDR_B_2 0x000A
-+#define cfgIND_DATA_B 0x000B
-+#define cfgPM4_RPTR 0x000C
-+#define cfgSCRATCH 0x000D
-+#define cfgPM4_WRPTR_0 0x000E
-+#define cfgPM4_WRPTR_1 0x000F
-+/* Block CIF End: */
-+
-+/* Block CP Start: */
-+#define mmCP_RB_CNTL 0x0210
-+#define mmCP_RB_BASE 0x0214
-+#define mmCP_RB_RPTR_ADDR 0x0218
-+#define mmCP_RB_RPTR 0x021C
-+#define mmCP_RB_RPTR_WR 0x02F8
-+#define mmCP_RB_WPTR 0x0220
-+#define mmCP_IB_BASE 0x0228
-+#define mmCP_IB_BUFSZ 0x022C
-+#define mmCP_CSQ_CNTL 0x0230
-+#define mmCP_CSQ_APER_PRIMARY 0x0300
-+#define mmCP_CSQ_APER_INDIRECT 0x0340
-+#define mmCP_ME_CNTL 0x0240
-+#define mmCP_ME_RAM_ADDR 0x0244
-+#define mmCP_ME_RAM_RADDR 0x0248
-+#define mmCP_ME_RAM_DATAH 0x024C
-+#define mmCP_ME_RAM_DATAL 0x0250
-+#define mmCP_DEBUG 0x025C
-+#define mmSCRATCH_REG0 0x0260
-+#define mmSCRATCH_REG1 0x0264
-+#define mmSCRATCH_REG2 0x0268
-+#define mmSCRATCH_REG3 0x026C
-+#define mmSCRATCH_REG4 0x0270
-+#define mmSCRATCH_REG5 0x0274
-+#define mmSCRATCH_UMSK 0x0280
-+#define mmSCRATCH_ADDR 0x0284
-+#define mmCP_CSQ_ADDR 0x02E4
-+#define mmCP_CSQ_DATA 0x02E8
-+#define mmCP_CSQ_STAT 0x02EC
-+#define mmCP_STAT 0x02F0
-+#define mmGEN_INT_CNTL 0x0200
-+#define mmGEN_INT_STATUS 0x0204
-+/* Block CP End: */
-+
-+/* Block DISPLAY Start: */
-+#define mmLCD_FORMAT 0x0410
-+#define mmGRAPHIC_CTRL 0x0414
-+#define mmGRAPHIC_OFFSET 0x0418
-+#define mmGRAPHIC_PITCH 0x041C
-+#define mmCRTC_TOTAL 0x0420
-+#define mmACTIVE_H_DISP 0x0424
-+#define mmACTIVE_V_DISP 0x0428
-+#define mmGRAPHIC_H_DISP 0x042C
-+#define mmGRAPHIC_V_DISP 0x0430
-+#define mmVIDEO_CTRL 0x0434
-+#define mmGRAPHIC_KEY 0x0438
-+#define mmVIDEO_Y_OFFSET 0x043C
-+#define mmVIDEO_Y_PITCH 0x0440
-+#define mmVIDEO_U_OFFSET 0x0444
-+#define mmVIDEO_U_PITCH 0x0448
-+#define mmVIDEO_V_OFFSET 0x044C
-+#define mmVIDEO_V_PITCH 0x0450
-+#define mmVIDEO_H_POS 0x0454
-+#define mmVIDEO_V_POS 0x0458
-+#define mmBRIGHTNESS_CNTL 0x045C
-+#define mmCURSOR1_OFFSET 0x0460
-+#define mmCURSOR1_H_POS 0x0464
-+#define mmCURSOR1_V_POS 0x0468
-+#define mmCURSOR1_COLOR0 0x046C
-+#define mmCURSOR1_COLOR1 0x0470
-+#define mmCURSOR2_OFFSET 0x0474
-+#define mmCURSOR2_H_POS 0x0478
-+#define mmCURSOR2_V_POS 0x047C
-+#define mmCURSOR2_COLOR0 0x0480
-+#define mmCURSOR2_COLOR1 0x0484
-+#define mmDISP_INT_CNTL 0x0488
-+#define mmCRTC_SS 0x048C
-+#define mmCRTC_LS 0x0490
-+#define mmCRTC_REV 0x0494
-+#define mmCRTC_DCLK 0x049C
-+#define mmCRTC_GS 0x04A0
-+#define mmCRTC_VPOS_GS 0x04A4
-+#define mmCRTC_GCLK 0x04A8
-+#define mmCRTC_GOE 0x04AC
-+#define mmCRTC_FRAME 0x04B0
-+#define mmCRTC_FRAME_VPOS 0x04B4
-+#define mmGPIO_DATA 0x04B8
-+#define mmGPIO_CNTL1 0x04BC
-+#define mmGPIO_CNTL2 0x04C0
-+#define mmLCDD_CNTL1 0x04C4
-+#define mmLCDD_CNTL2 0x04C8
-+#define mmGENLCD_CNTL1 0x04CC
-+#define mmGENLCD_CNTL2 0x04D0
-+#define mmDISP_DEBUG 0x04D4
-+#define mmDISP_DB_BUF_CNTL 0x04D8
-+#define mmDISP_CRC_SIG 0x04DC
-+#define mmCRTC_DEFAULT_COUNT 0x04E0
-+#define mmLCD_BACKGROUND_COLOR 0x04E4
-+#define mmCRTC_PS2 0x04E8
-+#define mmCRTC_PS2_VPOS 0x04EC
-+#define mmCRTC_PS1_ACTIVE 0x04F0
-+#define mmCRTC_PS1_NACTIVE 0x04F4
-+#define mmCRTC_GCLK_EXT 0x04F8
-+#define mmCRTC_ALW 0x04FC
-+#define mmCRTC_ALW_VPOS 0x0500
-+#define mmCRTC_PSK 0x0504
-+#define mmCRTC_PSK_HPOS 0x0508
-+#define mmCRTC_CV4_START 0x050C
-+#define mmCRTC_CV4_END 0x0510
-+#define mmCRTC_CV4_HPOS 0x0514
-+#define mmCRTC_ECK 0x051C
-+#define mmREFRESH_CNTL 0x0520
-+#define mmGENLCD_CNTL3 0x0524
-+#define mmGPIO_DATA2 0x0528
-+#define mmGPIO_CNTL3 0x052C
-+#define mmGPIO_CNTL4 0x0530
-+#define mmCHIP_STRAP 0x0534
-+#define mmDISP_DEBUG2 0x0538
-+#define mmDEBUG_BUS_CNTL 0x053C
-+#define mmGAMMA_VALUE1 0x0540
-+#define mmGAMMA_VALUE2 0x0544
-+#define mmGAMMA_SLOPE 0x0548
-+#define mmGEN_STATUS 0x054C
-+#define mmHW_INT 0x0550
-+/* Block DISPLAY End: */
-+
-+/* Block GFX Start: */
-+#define mmDST_OFFSET 0x1004
-+#define mmDST_PITCH 0x1008
-+#define mmDST_PITCH_OFFSET 0x102C
-+#define mmDST_X 0x101C
-+#define mmDST_Y 0x1020
-+#define mmDST_X_Y 0x1194
-+#define mmDST_Y_X 0x1038
-+#define mmDST_WIDTH 0x100C
-+#define mmDST_HEIGHT 0x1010
-+#define mmDST_WIDTH_HEIGHT 0x1198
-+#define mmDST_HEIGHT_WIDTH 0x103C
-+#define mmDST_HEIGHT_WIDTH_8 0x118C
-+#define mmDST_HEIGHT_Y 0x11A0
-+#define mmDST_WIDTH_X 0x1188
-+#define mmDST_WIDTH_X_INCY 0x119C
-+#define mmDST_LINE_START 0x1090
-+#define mmDST_LINE_END 0x1094
-+#define mmBRUSH_OFFSET 0x108C
-+#define mmBRUSH_Y_X 0x1074
-+#define mmDP_BRUSH_FRGD_CLR 0x107C
-+#define mmDP_BRUSH_BKGD_CLR 0x1078
-+#define mmSRC2_OFFSET 0x1060
-+#define mmSRC2_PITCH 0x1064
-+#define mmSRC2_PITCH_OFFSET 0x1068
-+#define mmSRC2_X 0x1050
-+#define mmSRC2_Y 0x1054
-+#define mmSRC2_X_Y 0x1058
-+#define mmSRC2_WIDTH 0x1080
-+#define mmSRC2_HEIGHT 0x1084
-+#define mmSRC2_INC 0x1088
-+#define mmSRC_OFFSET 0x11AC
-+#define mmSRC_PITCH 0x11B0
-+#define mmSRC_PITCH_OFFSET 0x1028
-+#define mmSRC_X 0x1014
-+#define mmSRC_Y 0x1018
-+#define mmSRC_X_Y 0x1190
-+#define mmSRC_Y_X 0x1034
-+#define mmSRC_WIDTH 0x1040
-+#define mmSRC_HEIGHT 0x1044
-+#define mmSRC_INC 0x1048
-+#define mmHOST_DATA0 0x13C0
-+#define mmHOST_DATA1 0x13C4
-+#define mmHOST_DATA2 0x13C8
-+#define mmHOST_DATA3 0x13CC
-+#define mmHOST_DATA4 0x13D0
-+#define mmHOST_DATA5 0x13D4
-+#define mmHOST_DATA6 0x13D8
-+#define mmHOST_DATA7 0x13DC
-+#define mmHOST_DATA_LAST 0x13E0
-+#define mmDP_SRC_FRGD_CLR 0x1240
-+#define mmDP_SRC_BKGD_CLR 0x1244
-+#define mmSC_LEFT 0x1140
-+#define mmSC_RIGHT 0x1144
-+#define mmSC_TOP 0x1148
-+#define mmSC_BOTTOM 0x114C
-+#define mmSRC_SC_RIGHT 0x1154
-+#define mmSRC_SC_BOTTOM 0x115C
-+#define mmDP_CNTL 0x11C8
-+#define mmDP_CNTL_DST_DIR 0x11CC
-+#define mmDP_DATATYPE 0x12C4
-+#define mmDP_MIX 0x12C8
-+#define mmDP_WRITE_MSK 0x12CC
-+#define mmCLR_CMP_CLR_SRC 0x1234
-+#define mmCLR_CMP_CLR_DST 0x1238
-+#define mmCLR_CMP_CNTL 0x1230
-+#define mmCLR_CMP_MSK 0x123C
-+#define mmDEFAULT_PITCH_OFFSET 0x10A0
-+#define mmDEFAULT_SC_BOTTOM_RIGHT 0x10A8
-+#define mmDEFAULT2_SC_BOTTOM_RIGHT 0x10AC
-+#define mmREF1_PITCH_OFFSET 0x10B8
-+#define mmREF2_PITCH_OFFSET 0x10BC
-+#define mmREF3_PITCH_OFFSET 0x10C0
-+#define mmREF4_PITCH_OFFSET 0x10C4
-+#define mmREF5_PITCH_OFFSET 0x10C8
-+#define mmREF6_PITCH_OFFSET 0x10CC
-+#define mmDP_GUI_MASTER_CNTL 0x106C
-+#define mmSC_TOP_LEFT 0x11BC
-+#define mmSC_BOTTOM_RIGHT 0x11C0
-+#define mmSRC_SC_BOTTOM_RIGHT 0x11C4
-+#define mmGLOBAL_ALPHA 0x1210
-+#define mmFILTER_COEF 0x1214
-+#define mmMVC_CNTL_START 0x11E0
-+#define mmE2_ARITHMETIC_CNTL 0x1220
-+#define mmDEBUG0 0x1280
-+#define mmDEBUG1 0x1284
-+#define mmDEBUG2 0x1288
-+#define mmDEBUG3 0x128C
-+#define mmDEBUG4 0x1290
-+#define mmDEBUG5 0x1294
-+#define mmDEBUG6 0x1298
-+#define mmDEBUG7 0x129C
-+#define mmDEBUG8 0x12A0
-+#define mmDEBUG9 0x12A4
-+#define mmDEBUG10 0x12A8
-+#define mmDEBUG11 0x12AC
-+#define mmDEBUG12 0x12B0
-+#define mmDEBUG13 0x12B4
-+#define mmDEBUG14 0x12B8
-+#define mmDEBUG15 0x12BC
-+#define mmENG_CNTL 0x13E8
-+#define mmENG_PERF_CNT 0x13F0
-+/* Block GFX End: */
-+
-+/* Block IDCT Start: */
-+#define mmIDCT_RUNS 0x0C00
-+#define mmIDCT_LEVELS 0x0C04
-+#define mmIDCT_CONTROL 0x0C3C
-+#define mmIDCT_AUTH_CONTROL 0x0C08
-+#define mmIDCT_AUTH 0x0C0C
-+/* Block IDCT End: */
-+
-+/* Block MC Start: */
-+#define mmMEM_CNTL 0x0180
-+#define mmMEM_ARB 0x0184
-+#define mmMC_FB_LOCATION 0x0188
-+#define mmMEM_EXT_CNTL 0x018C
-+#define mmMC_EXT_MEM_LOCATION 0x0190
-+#define mmMEM_EXT_TIMING_CNTL 0x0194
-+#define mmMEM_SDRAM_MODE_REG 0x0198
-+#define mmMEM_IO_CNTL 0x019C
-+#define mmMC_DEBUG 0x01A0
-+#define mmMC_BIST_CTRL 0x01A4
-+#define mmMC_BIST_COLLAR_READ 0x01A8
-+#define mmTC_MISMATCH 0x01AC
-+#define mmMC_PERF_MON_CNTL 0x01B0
-+#define mmMC_PERF_COUNTERS 0x01B4
-+/* Block MC End: */
-+
-+/* Block RBBM Start: */
-+#define mmWAIT_UNTIL 0x1400
-+#define mmISYNC_CNTL 0x1404
-+#define mmRBBM_GUICNTL 0x1408
-+#define mmRBBM_STATUS 0x0140
-+#define mmRBBM_STATUS_alt_1 0x140C
-+#define mmRBBM_CNTL 0x0144
-+#define mmRBBM_SOFT_RESET 0x0148
-+#define mmNQWAIT_UNTIL 0x0150
-+#define mmRBBM_DEBUG 0x016C
-+#define mmRBBM_CMDFIFO_ADDR 0x0170
-+#define mmRBBM_CMDFIFO_DATAL 0x0174
-+#define mmRBBM_CMDFIFO_DATAH 0x0178
-+#define mmRBBM_CMDFIFO_STAT 0x017C
-+/* Block RBBM End: */
-+
-+/* Block CG Start: */
-+#define mmCLK_PIN_CNTL 0x0080
-+#define mmPLL_REF_FB_DIV 0x0084
-+#define mmPLL_CNTL 0x0088
-+#define mmSCLK_CNTL 0x008C
-+#define mmPCLK_CNTL 0x0090
-+#define mmCLK_TEST_CNTL 0x0094
-+#define mmPWRMGT_CNTL 0x0098
-+#define mmPWRMGT_STATUS 0x009C
-+/* Block CG End: */
-+
-+/* default value definitions */
-+#define defCHIP_ID 0x00001002
-+#define defREVISION_ID 0x00000000
-+#define defWRAP_BUF_A 0x01000000
-+#define defWRAP_BUF_B 0x01000000
-+#define defWRAP_TOP_DIR 0x00000000
-+#define defWRAP_START_DIR 0x00000000
-+//#define defCIF_CNTL 0x00082900
-+#define defCIF_CNTL 0x00182d00 //??updated by Tobey Z.for Sharp,Oct11,2002
-+#define defCFGREG_BASE 0x00000000
-+//#define defCIF_IO 0x000c0800
-+#define defCIF_IO 0x000C0902 //??updated by Tobey Z.for Sharp,Oct11,2002
-+#define defCIF_READ_DBG 0x00018223
-+#define defCIF_WRITE_DBG 0x00002100
-+#define defIND_ADDR_A_0 0x00000000
-+#define defIND_ADDR_A_1 0x00000000
-+#define defIND_ADDR_A_2 0x00000000
-+#define defIND_DATA_A 0x00000000
-+#define defREG_BASE 0x00000001
-+#define defINTF_CNTL 0x00000011
-+#define defSTATUS 0x00000000
-+#define defCPU_DEFAULTS 0x00000006
-+#define defIND_ADDR_B_0 0x00000000
-+#define defIND_ADDR_B_1 0x00000000
-+#define defIND_ADDR_B_2 0x00000000
-+#define defIND_DATA_B 0x00000000
-+#define defPM4_RPTR 0x00000000
-+#define defSCRATCH 0x00000000
-+#define defPM4_WRPTR_0 0x00000000
-+#define defPM4_WRPTR_1 0x00000000
-+#define defCP_RB_CNTL 0x00000000
-+#define defCP_RB_BASE 0x00000000
-+#define defCP_RB_RPTR_ADDR 0x00000000
-+#define defCP_RB_RPTR 0x00000000
-+#define defCP_RB_RPTR_WR 0x00000000
-+#define defCP_RB_WPTR 0x00000000
-+#define defCP_IB_BASE 0x00000000
-+#define defCP_IB_BUFSZ 0x00000000
-+#define defCP_CSQ_CNTL 0x00000000
-+#define defCP_CSQ_APER_PRIMARY 0x00000000
-+#define defCP_CSQ_APER_INDIRECT 0x00000000
-+#define defCP_ME_CNTL 0x40000000
-+#define defCP_ME_RAM_ADDR 0x00000000
-+#define defCP_ME_RAM_RADDR 0x00000000
-+#define defCP_ME_RAM_DATAH 0x00000000
-+#define defCP_ME_RAM_DATAL 0x00000000
-+#define defCP_DEBUG 0x00000000
-+#define defSCRATCH_REG0 0x00000000
-+#define defSCRATCH_REG1 0x00000000
-+#define defSCRATCH_REG2 0x00000000
-+#define defSCRATCH_REG3 0x00000000
-+#define defSCRATCH_REG4 0x00000000
-+#define defSCRATCH_REG5 0x00000000
-+#define defSCRATCH_UMSK 0x00000000
-+#define defSCRATCH_ADDR 0x00000000
-+#define defCP_CSQ_ADDR 0x00000000
-+#define defCP_CSQ_DATA 0x00000000
-+#define defCP_CSQ_STAT 0x00000000
-+#define defCP_STAT 0x00000000
-+#define defGEN_INT_CNTL 0x00000000
-+#define defGEN_INT_STATUS_rd 0x00080000
-+#define defGEN_INT_STATUS_wr 0x00000000
-+#define defLCD_FORMAT 0x00000000
-+#define defGRAPHIC_CTRL 0x00000000
-+#define defGRAPHIC_OFFSET 0x00000000
-+#define defGRAPHIC_PITCH 0x00000000
-+#define defCRTC_TOTAL 0x00000000
-+#define defACTIVE_H_DISP 0x00000000
-+#define defACTIVE_V_DISP 0x00000000
-+#define defGRAPHIC_H_DISP 0x00000000
-+#define defGRAPHIC_V_DISP 0x00000000
-+#define defVIDEO_CTRL 0x00000000
-+#define defGRAPHIC_KEY 0x00000000
-+#define defVIDEO_Y_OFFSET 0x00000000
-+#define defVIDEO_Y_PITCH 0x00000000
-+#define defVIDEO_U_OFFSET 0x00000000
-+#define defVIDEO_U_PITCH 0x00000000
-+#define defVIDEO_V_OFFSET 0x00000000
-+#define defVIDEO_V_PITCH 0x00000000
-+#define defVIDEO_H_POS 0x00000000
-+#define defVIDEO_V_POS 0x00000000
-+#define defBRIGHTNESS_CNTL 0x00000000
-+#define defCURSOR1_OFFSET 0x00000000
-+#define defCURSOR1_H_POS 0x00000000
-+#define defCURSOR1_V_POS 0x00000000
-+#define defCURSOR1_COLOR0 0x00000000
-+#define defCURSOR1_COLOR1 0x00000000
-+#define defCURSOR2_OFFSET 0x00000000
-+#define defCURSOR2_H_POS 0x00000000
-+#define defCURSOR2_V_POS 0x00000000
-+#define defCURSOR2_COLOR0 0x00000000
-+#define defCURSOR2_COLOR1 0x00000000
-+#define defDISP_INT_CNTL 0x00000000
-+#define defCRTC_SS 0x00000000
-+#define defCRTC_LS 0x00000000
-+#define defCRTC_REV 0x00000000
-+#define defCRTC_DCLK 0x00000000
-+#define defCRTC_GS 0x00000000
-+#define defCRTC_VPOS_GS 0x00000000
-+#define defCRTC_GCLK 0x00000000
-+#define defCRTC_GOE 0x00000000
-+#define defCRTC_FRAME 0x00000000
-+#define defCRTC_FRAME_VPOS 0x00000000
-+#define defGPIO_DATA 0x00000000
-+#define defGPIO_CNTL1 0xff00ff00
-+#define defGPIO_CNTL2 0x00000000
-+#define defLCDD_CNTL1 0x0000ffff
-+#define defLCDD_CNTL2 0x00000000
-+#define defGENLCD_CNTL1 0x00aaa002
-+#define defGENLCD_CNTL2 0x00000002
-+#define defDISP_DEBUG 0x00000000
-+#define defDISP_DB_BUF_CNTL_rd 0x00000000
-+#define defDISP_DB_BUF_CNTL_wr 0x00000000
-+#define defDISP_CRC_SIG 0x00000000
-+#define defCRTC_DEFAULT_COUNT 0x00000000
-+#define defLCD_BACKGROUND_COLOR 0x00000000
-+#define defCRTC_PS2 0x00000000
-+#define defCRTC_PS2_VPOS 0x00000000
-+#define defCRTC_PS1_ACTIVE 0x00000000
-+#define defCRTC_PS1_NACTIVE 0x00000000
-+#define defCRTC_GCLK_EXT 0x00000000
-+#define defCRTC_ALW 0x00000000
-+#define defCRTC_ALW_VPOS 0x00000000
-+#define defCRTC_PSK 0x00000000
-+#define defCRTC_PSK_HPOS 0x00000000
-+#define defCRTC_CV4_START 0x00000000
-+#define defCRTC_CV4_END 0x00000000
-+#define defCRTC_CV4_HPOS 0x00000000
-+#define defCRTC_ECK 0x00000000
-+#define defREFRESH_CNTL 0x00000000
-+#define defGENLCD_CNTL3 0x000002aa
-+#define defGPIO_DATA2 0x00000000
-+#define defGPIO_CNTL3 0x00000000
-+#define defGPIO_CNTL4 0x00000000
-+#define defCHIP_STRAP 0x00000000
-+#define defDISP_DEBUG2 0x00000000
-+#define defDEBUG_BUS_CNTL 0x00000000
-+#define defGAMMA_VALUE1 0x00000000
-+#define defGAMMA_VALUE2 0x00000000
-+#define defGAMMA_SLOPE 0x00000000
-+#define defGEN_STATUS 0x00000000
-+#define defHW_INT 0x00000000
-+#define defDST_OFFSET 0x00000000
-+#define defDST_PITCH 0x00000000
-+#define defDST_PITCH_OFFSET 0x00000000
-+#define defDST_X 0x00000000
-+#define defDST_Y 0x00000000
-+#define defDST_X_Y 0x00000000
-+#define defDST_Y_X 0x00000000
-+#define defDST_WIDTH 0x00000000
-+#define defDST_HEIGHT 0x00000000
-+#define defDST_WIDTH_HEIGHT 0x00000000
-+#define defDST_HEIGHT_WIDTH 0x00000000
-+#define defDST_HEIGHT_WIDTH_8 0x00000000
-+#define defDST_HEIGHT_Y 0x00000000
-+#define defDST_WIDTH_X 0x00000000
-+#define defDST_WIDTH_X_INCY 0x00000000
-+#define defDST_LINE_START 0x00000000
-+#define defDST_LINE_END 0x00000000
-+#define defBRUSH_OFFSET 0x00000000
-+#define defBRUSH_Y_X 0x00000000
-+#define defDP_BRUSH_FRGD_CLR 0x00000000
-+#define defDP_BRUSH_BKGD_CLR 0x00000000
-+#define defSRC2_OFFSET 0x00000000
-+#define defSRC2_PITCH 0x00000000
-+#define defSRC2_PITCH_OFFSET 0x00000000
-+#define defSRC2_X 0x00000000
-+#define defSRC2_Y 0x00000000
-+#define defSRC2_X_Y 0x00000000
-+#define defSRC2_WIDTH 0x00000000
-+#define defSRC2_HEIGHT 0x00000000
-+#define defSRC2_INC 0x00000000
-+#define defSRC_OFFSET 0x00000000
-+#define defSRC_PITCH 0x00000000
-+#define defSRC_PITCH_OFFSET 0x00000000
-+#define defSRC_X 0x00000000
-+#define defSRC_Y 0x00000000
-+#define defSRC_X_Y 0x00000000
-+#define defSRC_Y_X 0x00000000
-+#define defSRC_WIDTH 0x00000000
-+#define defSRC_HEIGHT 0x00000000
-+#define defSRC_INC 0x00000000
-+#define defHOST_DATA0 0x00000000
-+#define defHOST_DATA1 0x00000000
-+#define defHOST_DATA2 0x00000000
-+#define defHOST_DATA3 0x00000000
-+#define defHOST_DATA4 0x00000000
-+#define defHOST_DATA5 0x00000000
-+#define defHOST_DATA6 0x00000000
-+#define defHOST_DATA7 0x00000000
-+#define defHOST_DATA_LAST 0x00000000
-+#define defDP_SRC_FRGD_CLR 0x00000000
-+#define defDP_SRC_BKGD_CLR 0x00000000
-+#define defSC_LEFT 0x00000000
-+#define defSC_RIGHT 0x00000000
-+#define defSC_TOP 0x00000000
-+#define defSC_BOTTOM 0x00000000
-+#define defSRC_SC_RIGHT 0x00000000
-+#define defSRC_SC_BOTTOM 0x00000000
-+#define defDP_CNTL 0x00000000
-+#define defDP_CNTL_DST_DIR 0x00000000
-+#define defDP_DATATYPE 0x00000000
-+#define defDP_MIX 0x00000000
-+#define defDP_WRITE_MSK 0x00000000
-+#define defCLR_CMP_CLR_SRC 0x00000000
-+#define defCLR_CMP_CLR_DST 0x00000000
-+#define defCLR_CMP_CNTL 0x00000000
-+#define defCLR_CMP_MSK 0x00000000
-+#define defDEFAULT_PITCH_OFFSET 0x00000000
-+#define defDEFAULT_SC_BOTTOM_RIGHT 0x00000000
-+#define defDEFAULT2_SC_BOTTOM_RIGHT 0x00000000
-+#define defREF1_PITCH_OFFSET 0x00000000
-+#define defREF2_PITCH_OFFSET 0x00000000
-+#define defREF3_PITCH_OFFSET 0x00000000
-+#define defREF4_PITCH_OFFSET 0x00000000
-+#define defREF5_PITCH_OFFSET 0x00000000
-+#define defREF6_PITCH_OFFSET 0x00000000
-+#define defDP_GUI_MASTER_CNTL 0x00000000
-+#define defSC_TOP_LEFT 0x00000000
-+#define defSC_BOTTOM_RIGHT 0x00000000
-+#define defSRC_SC_BOTTOM_RIGHT 0x00000000
-+#define defGLOBAL_ALPHA 0x00000000
-+#define defFILTER_COEF 0x00000000
-+#define defMVC_CNTL_START 0x00000000
-+#define defE2_ARITHMETIC_CNTL 0x00000000
-+#define defDEBUG0 0x00000000
-+#define defDEBUG1 0x00000000
-+#define defDEBUG2 0x00000000
-+#define defDEBUG3 0x00000000
-+#define defDEBUG4 0x00000000
-+#define defDEBUG5 0x00000000
-+#define defDEBUG6 0x00000000
-+#define defDEBUG7 0x00000000
-+#define defDEBUG8 0x00000000
-+#define defDEBUG9 0x00000000
-+#define defDEBUG10 0x00000000
-+#define defDEBUG11 0x00000000
-+#define defDEBUG12 0x00000000
-+#define defDEBUG13 0x00000000
-+#define defDEBUG14 0x00000000
-+#define defDEBUG15 0x00000000
-+#define defENG_CNTL 0x00000003
-+#define defENG_PERF_CNT 0x00000000
-+#define defIDCT_RUNS 0x00000000
-+#define defIDCT_LEVELS 0x00000000
-+#define defIDCT_CONTROL 0x00000000
-+#define defIDCT_AUTH_CONTROL 0x00000000
-+#define defIDCT_AUTH 0x00000000
-+#define defMEM_CNTL 0x00000006
-+#define defMEM_ARB 0x00000000
-+#define defMC_FB_LOCATION 0x00ff0000
-+#define defMEM_EXT_CNTL 0x00040010
-+#define defMC_EXT_MEM_LOCATION 0x07ff0000
-+#define defMEM_EXT_TIMING_CNTL 0x00140c73
-+#define defMEM_SDRAM_MODE_REG 0x00050000
-+#define defMEM_IO_CNTL 0x00ff00ff
-+#define defMC_DEBUG 0x00000000
-+#define defMC_BIST_CTRL 0x00000000
-+#define defMC_BIST_COLLAR_READ 0x00000000
-+#define defTC_MISMATCH 0x00000000
-+#define defMC_PERF_MON_CNTL 0x00000000
-+#define defMC_PERF_COUNTERS 0x00000000
-+#define defWAIT_UNTIL 0xc5cdcdcd
-+#define defISYNC_CNTL 0x00000000
-+#define defRBBM_GUICNTL 0x00000000
-+#define defRBBM_STATUS 0x81cdcd40
-+#define defRBBM_CNTL 0x0000000f
-+#define defRBBM_SOFT_RESET 0x00000000
-+#define defNQWAIT_UNTIL 0x00000001
-+#define defRBBM_DEBUG 0x00000000
-+#define defRBBM_CMDFIFO_ADDR 0x0000000d
-+#define defRBBM_CMDFIFO_DATAL 0xcdcdcdcd
-+#define defRBBM_CMDFIFO_DATAH 0x00000dcd
-+#define defRBBM_CMDFIFO_STAT 0x00000d0d
-+#define defCLK_PIN_CNTL 0x0000003f
-+#define defPLL_REF_FB_DIV 0x5a500000
-+#define defPLL_CNTL 0x4b000203
-+#define defSCLK_CNTL 0x00ff0300
-+#define defPCLK_CNTL 0x00010000
-+#define defCLK_TEST_CNTL 0x00000000
-+#define defPWRMGT_CNTL 0x00000004
-+#define defPWRMGT_STATUS 0x00000001
-+
-+#define CFG_BASE_BOOT_DEFAULT 0x0
-+#define CFG_BASE_VALUE 0x0
-+#define REG_BASE_BOOT_DEFAULT 0x01
-+#define REG_BASE_VALUE 0x10000
-+#define MEM_INT_BASE_VALUE 0x100000
-+#define MEM_INT_TOP_VALUE_W100 0x15ffff
-+#define MEM_EXT_BASE_VALUE 0x800000
-+#define MEM_EXT_TOP_VALUE 0x9fffff
-+#define WRAP_BUF_BASE_VALUE 0x80000
-+#define WRAP_BUF_TOP_VALUE 0xbffff
-+
-+
-+/* data structure definitions */
-+
-+typedef struct _chip_id_t {
-+ unsigned long vendor_id : 16;
-+ unsigned long device_id : 16;
-+ } chip_id_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ chip_id_t f;
-+} chip_id_u;
-+
-+typedef struct _revision_id_t {
-+ unsigned long minor_rev_id : 4;
-+ unsigned long major_rev_id : 4;
-+ unsigned long : 24;
-+ } revision_id_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ revision_id_t f;
-+} revision_id_u;
-+
-+typedef struct _wrap_buf_a_t {
-+ unsigned long offset_addr_a : 24;
-+ unsigned long block_size_a : 3;
-+ unsigned long : 5;
-+ } wrap_buf_a_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ wrap_buf_a_t f;
-+} wrap_buf_a_u;
-+
-+typedef struct _wrap_buf_b_t {
-+ unsigned long offset_addr_b : 24;
-+ unsigned long block_size_b : 3;
-+ unsigned long : 5;
-+ } wrap_buf_b_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ wrap_buf_b_t f;
-+} wrap_buf_b_u;
-+
-+typedef struct _wrap_top_dir_t {
-+ unsigned long top_addr : 23;
-+ unsigned long : 9;
-+ } wrap_top_dir_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ wrap_top_dir_t f;
-+} wrap_top_dir_u;
-+
-+typedef struct _wrap_start_dir_t {
-+ unsigned long start_addr : 23;
-+ unsigned long : 9;
-+ } wrap_start_dir_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ wrap_start_dir_t f;
-+} wrap_start_dir_u;
-+
-+typedef struct _cif_cntl_t {
-+ unsigned long swap_reg : 2;
-+ unsigned long swap_fbuf_1 : 2;
-+ unsigned long swap_fbuf_2 : 2;
-+ unsigned long swap_fbuf_3 : 2;
-+ unsigned long pmi_int_disable : 1;
-+ unsigned long pmi_schmen_disable : 1;
-+ unsigned long intb_oe : 1;
-+ unsigned long en_wait_to_compensate_dq_prop_dly : 1;
-+ unsigned long compensate_wait_rd_size : 2;
-+ unsigned long wait_asserted_timeout_val : 2;
-+ unsigned long wait_masked_val : 2;
-+ unsigned long en_wait_timeout : 1;
-+ unsigned long en_one_clk_setup_before_wait : 1;
-+ unsigned long interrupt_active_high : 1;
-+ unsigned long en_overwrite_straps : 1;
-+ unsigned long strap_wait_active_hi : 1;
-+ unsigned long lat_busy_count : 2;
-+ unsigned long lat_rd_pm4_sclk_busy : 1;
-+ unsigned long dis_system_bits : 1;
-+ unsigned long dis_mr : 1;
-+ unsigned long cif_spare_1 : 4;
-+ } cif_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cif_cntl_t f;
-+} cif_cntl_u;
-+
-+typedef struct _cfgreg_base_t {
-+ unsigned long cfgreg_base : 24;
-+ unsigned long : 8;
-+ } cfgreg_base_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cfgreg_base_t f;
-+} cfgreg_base_u;
-+
-+typedef struct _cif_io_t {
-+ unsigned long dq_srp : 1;
-+ unsigned long dq_srn : 1;
-+ unsigned long dq_sp : 4;
-+ unsigned long dq_sn : 4;
-+ unsigned long waitb_srp : 1;
-+ unsigned long waitb_srn : 1;
-+ unsigned long waitb_sp : 4;
-+ unsigned long waitb_sn : 4;
-+ unsigned long intb_srp : 1;
-+ unsigned long intb_srn : 1;
-+ unsigned long intb_sp : 4;
-+ unsigned long intb_sn : 4;
-+ unsigned long : 2;
-+ } cif_io_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cif_io_t f;
-+} cif_io_u;
-+
-+typedef struct _cif_read_dbg_t {
-+ unsigned long unpacker_pre_fetch_trig_gen : 2;
-+ unsigned long dly_second_rd_fetch_trig : 1;
-+ unsigned long rst_rd_burst_id : 1;
-+ unsigned long dis_rd_burst_id : 1;
-+ unsigned long en_block_rd_when_packer_is_not_emp : 1;
-+ unsigned long dis_pre_fetch_cntl_sm : 1;
-+ unsigned long rbbm_chrncy_dis : 1;
-+ unsigned long rbbm_rd_after_wr_lat : 2;
-+ unsigned long dis_be_during_rd : 1;
-+ unsigned long one_clk_invalidate_pulse : 1;
-+ unsigned long dis_chnl_priority : 1;
-+ unsigned long rst_read_path_a_pls : 1;
-+ unsigned long rst_read_path_b_pls : 1;
-+ unsigned long dis_reg_rd_fetch_trig : 1;
-+ unsigned long dis_rd_fetch_trig_from_ind_addr : 1;
-+ unsigned long dis_rd_same_byte_to_trig_fetch : 1;
-+ unsigned long dis_dir_wrap : 1;
-+ unsigned long dis_ring_buf_to_force_dec : 1;
-+ unsigned long dis_addr_comp_in_16bit : 1;
-+ unsigned long clr_w : 1;
-+ unsigned long err_rd_tag_is_3 : 1;
-+ unsigned long err_load_when_ful_a : 1;
-+ unsigned long err_load_when_ful_b : 1;
-+ unsigned long : 7;
-+ } cif_read_dbg_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cif_read_dbg_t f;
-+} cif_read_dbg_u;
-+
-+typedef struct _cif_write_dbg_t {
-+ unsigned long packer_timeout_count : 2;
-+ unsigned long en_upper_load_cond : 1;
-+ unsigned long en_chnl_change_cond : 1;
-+ unsigned long dis_addr_comp_cond : 1;
-+ unsigned long dis_load_same_byte_addr_cond : 1;
-+ unsigned long dis_timeout_cond : 1;
-+ unsigned long dis_timeout_during_rbbm : 1;
-+ unsigned long dis_packer_ful_during_rbbm_timeout : 1;
-+ unsigned long en_dword_split_to_rbbm : 1;
-+ unsigned long en_dummy_val : 1;
-+ unsigned long dummy_val_sel : 1;
-+ unsigned long mask_pm4_wrptr_dec : 1;
-+ unsigned long dis_mc_clean_cond : 1;
-+ unsigned long err_two_reqi_during_ful : 1;
-+ unsigned long err_reqi_during_idle_clk : 1;
-+ unsigned long err_global : 1;
-+ unsigned long en_wr_buf_dbg_load : 1;
-+ unsigned long en_wr_buf_dbg_path : 1;
-+ unsigned long sel_wr_buf_byte : 3;
-+ unsigned long dis_rd_flush_wr : 1;
-+ unsigned long dis_packer_ful_cond : 1;
-+ unsigned long dis_invalidate_by_ops_chnl : 1;
-+ unsigned long en_halt_when_reqi_err : 1;
-+ unsigned long cif_spare_2 : 5;
-+ unsigned long : 1;
-+ } cif_write_dbg_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cif_write_dbg_t f;
-+} cif_write_dbg_u;
-+
-+typedef struct _ind_addr_a_0_t {
-+ unsigned char ind_addr_a_0 : 8;
-+ } ind_addr_a_0_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ ind_addr_a_0_t f;
-+} ind_addr_a_0_u;
-+
-+typedef struct _ind_addr_a_1_t {
-+ unsigned char ind_addr_a_1 : 8;
-+ } ind_addr_a_1_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ ind_addr_a_1_t f;
-+} ind_addr_a_1_u;
-+
-+typedef struct _ind_addr_a_2_t {
-+ unsigned char ind_addr_a_2 : 8;
-+ } ind_addr_a_2_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ ind_addr_a_2_t f;
-+} ind_addr_a_2_u;
-+
-+typedef struct _ind_data_a_t {
-+ unsigned char ind_data_a : 8;
-+ } ind_data_a_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ ind_data_a_t f;
-+} ind_data_a_u;
-+
-+typedef struct _reg_base_t {
-+ unsigned char reg_base : 8;
-+ } reg_base_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ reg_base_t f;
-+} reg_base_u;
-+
-+typedef struct _intf_cntl_t {
-+ unsigned char ad_inc_a : 1;
-+ unsigned char ring_buf_a : 1;
-+ unsigned char rd_fetch_trigger_a : 1;
-+ unsigned char rd_data_rdy_a : 1;
-+ unsigned char ad_inc_b : 1;
-+ unsigned char ring_buf_b : 1;
-+ unsigned char rd_fetch_trigger_b : 1;
-+ unsigned char rd_data_rdy_b : 1;
-+ } intf_cntl_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ intf_cntl_t f;
-+} intf_cntl_u;
-+
-+typedef struct _status_t {
-+ unsigned char wr_fifo_available_space : 2;
-+ unsigned char fbuf_wr_pipe_emp : 1;
-+ unsigned char soft_reset : 1;
-+ unsigned char system_pwm_mode : 2;
-+ unsigned char mem_access_dis : 1;
-+ unsigned char en_pre_fetch : 1;
-+ } status_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ status_t f;
-+} status_u;
-+
-+typedef struct _cpu_defaults_t {
-+ unsigned char unpack_rd_data : 1;
-+ unsigned char access_ind_addr_a : 1;
-+ unsigned char access_ind_addr_b : 1;
-+ unsigned char access_scratch_reg : 1;
-+ unsigned char pack_wr_data : 1;
-+ unsigned char transition_size : 1;
-+ unsigned char en_read_buf_mode : 1;
-+ unsigned char rd_fetch_scratch : 1;
-+ } cpu_defaults_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ cpu_defaults_t f;
-+} cpu_defaults_u;
-+
-+typedef struct _ind_addr_b_0_t {
-+ unsigned char ind_addr_b_0 : 8;
-+ } ind_addr_b_0_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ ind_addr_b_0_t f;
-+} ind_addr_b_0_u;
-+
-+typedef struct _ind_addr_b_1_t {
-+ unsigned char ind_addr_b_1 : 8;
-+ } ind_addr_b_1_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ ind_addr_b_1_t f;
-+} ind_addr_b_1_u;
-+
-+typedef struct _ind_addr_b_2_t {
-+ unsigned char ind_addr_b_2 : 8;
-+ } ind_addr_b_2_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ ind_addr_b_2_t f;
-+} ind_addr_b_2_u;
-+
-+typedef struct _ind_data_b_t {
-+ unsigned char ind_data_b : 8;
-+ } ind_data_b_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ ind_data_b_t f;
-+} ind_data_b_u;
-+
-+typedef struct _pm4_rptr_t {
-+ unsigned char pm4_rptr : 8;
-+ } pm4_rptr_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ pm4_rptr_t f;
-+} pm4_rptr_u;
-+
-+typedef struct _scratch_t {
-+ unsigned char scratch : 8;
-+ } scratch_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ scratch_t f;
-+} scratch_u;
-+
-+typedef struct _pm4_wrptr_0_t {
-+ unsigned char pm4_wrptr_0 : 8;
-+ } pm4_wrptr_0_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ pm4_wrptr_0_t f;
-+} pm4_wrptr_0_u;
-+
-+typedef struct _pm4_wrptr_1_t {
-+ unsigned char pm4_wrptr_1 : 6;
-+ unsigned char rd_fetch_pm4_rptr : 1;
-+ unsigned char wrptr_atomic_update_w : 1;
-+ } pm4_wrptr_1_t;
-+
-+typedef union {
-+ unsigned char val : 8;
-+ pm4_wrptr_1_t f;
-+} pm4_wrptr_1_u;
-+
-+typedef struct _cp_rb_cntl_t {
-+ unsigned long rb_bufsz : 6;
-+ unsigned long : 2;
-+ unsigned long rb_blksz : 6;
-+ unsigned long : 2;
-+ unsigned long buf_swap : 2;
-+ unsigned long max_fetch : 2;
-+ unsigned long : 7;
-+ unsigned long rb_no_update : 1;
-+ unsigned long : 3;
-+ unsigned long rb_rptr_wr_ena : 1;
-+ } cp_rb_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_rb_cntl_t f;
-+} cp_rb_cntl_u;
-+
-+typedef struct _cp_rb_base_t {
-+ unsigned long : 2;
-+ unsigned long rb_base : 22;
-+ unsigned long : 8;
-+ } cp_rb_base_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_rb_base_t f;
-+} cp_rb_base_u;
-+
-+typedef struct _cp_rb_rptr_addr_t {
-+ unsigned long rb_rptr_swap : 2;
-+ unsigned long rb_rptr_addr : 22;
-+ unsigned long : 8;
-+ } cp_rb_rptr_addr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_rb_rptr_addr_t f;
-+} cp_rb_rptr_addr_u;
-+
-+typedef struct _cp_rb_rptr_t {
-+ unsigned long rb_rptr : 23;
-+ unsigned long : 9;
-+ } cp_rb_rptr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_rb_rptr_t f;
-+} cp_rb_rptr_u;
-+
-+typedef struct _cp_rb_rptr_wr_t {
-+ unsigned long rb_rptr_wr : 23;
-+ unsigned long : 9;
-+ } cp_rb_rptr_wr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_rb_rptr_wr_t f;
-+} cp_rb_rptr_wr_u;
-+
-+typedef struct _cp_rb_wptr_t {
-+ unsigned long rb_wptr : 23;
-+ unsigned long : 9;
-+ } cp_rb_wptr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_rb_wptr_t f;
-+} cp_rb_wptr_u;
-+
-+typedef struct _cp_ib_base_t {
-+ unsigned long : 2;
-+ unsigned long ib_base : 22;
-+ unsigned long : 8;
-+ } cp_ib_base_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_ib_base_t f;
-+} cp_ib_base_u;
-+
-+typedef struct _cp_ib_bufsz_t {
-+ unsigned long ib_bufsz : 23;
-+ unsigned long : 9;
-+ } cp_ib_bufsz_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_ib_bufsz_t f;
-+} cp_ib_bufsz_u;
-+
-+typedef struct _cp_csq_cntl_t {
-+ unsigned long csq_cnt_primary : 8;
-+ unsigned long csq_cnt_indirect : 8;
-+ unsigned long : 12;
-+ unsigned long csq_mode : 4;
-+ } cp_csq_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_csq_cntl_t f;
-+} cp_csq_cntl_u;
-+
-+typedef struct _cp_csq_aper_primary_t {
-+ unsigned long cp_csq_aper_primary : 32;
-+ } cp_csq_aper_primary_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_csq_aper_primary_t f;
-+} cp_csq_aper_primary_u;
-+
-+typedef struct _cp_csq_aper_indirect_t {
-+ unsigned long cp_csq_aper_indirect : 32;
-+ } cp_csq_aper_indirect_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_csq_aper_indirect_t f;
-+} cp_csq_aper_indirect_u;
-+
-+typedef struct _cp_me_cntl_t {
-+ unsigned long me_stat : 16;
-+ unsigned long me_statmux : 5;
-+ unsigned long : 8;
-+ unsigned long me_busy : 1;
-+ unsigned long me_mode : 1;
-+ unsigned long me_step : 1;
-+ } cp_me_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_me_cntl_t f;
-+} cp_me_cntl_u;
-+
-+typedef struct _cp_me_ram_addr_t {
-+ unsigned long me_ram_addr : 8;
-+ unsigned long : 24;
-+ } cp_me_ram_addr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_me_ram_addr_t f;
-+} cp_me_ram_addr_u;
-+
-+typedef struct _cp_me_ram_raddr_t {
-+ unsigned long me_ram_raddr : 8;
-+ unsigned long : 24;
-+ } cp_me_ram_raddr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_me_ram_raddr_t f;
-+} cp_me_ram_raddr_u;
-+
-+typedef struct _cp_me_ram_datah_t {
-+ unsigned long me_ram_datah : 6;
-+ unsigned long : 26;
-+ } cp_me_ram_datah_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_me_ram_datah_t f;
-+} cp_me_ram_datah_u;
-+
-+typedef struct _cp_me_ram_datal_t {
-+ unsigned long me_ram_datal : 32;
-+ } cp_me_ram_datal_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_me_ram_datal_t f;
-+} cp_me_ram_datal_u;
-+
-+typedef struct _cp_debug_t {
-+ unsigned long cp_debug : 32;
-+ } cp_debug_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_debug_t f;
-+} cp_debug_u;
-+
-+typedef struct _scratch_reg0_t {
-+ unsigned long scratch_reg0 : 32;
-+ } scratch_reg0_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ scratch_reg0_t f;
-+} scratch_reg0_u;
-+
-+typedef struct _scratch_reg1_t {
-+ unsigned long scratch_reg1 : 32;
-+ } scratch_reg1_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ scratch_reg1_t f;
-+} scratch_reg1_u;
-+
-+typedef struct _scratch_reg2_t {
-+ unsigned long scratch_reg2 : 32;
-+ } scratch_reg2_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ scratch_reg2_t f;
-+} scratch_reg2_u;
-+
-+typedef struct _scratch_reg3_t {
-+ unsigned long scratch_reg3 : 32;
-+ } scratch_reg3_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ scratch_reg3_t f;
-+} scratch_reg3_u;
-+
-+typedef struct _scratch_reg4_t {
-+ unsigned long scratch_reg4 : 32;
-+ } scratch_reg4_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ scratch_reg4_t f;
-+} scratch_reg4_u;
-+
-+typedef struct _scratch_reg5_t {
-+ unsigned long scratch_reg5 : 32;
-+ } scratch_reg5_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ scratch_reg5_t f;
-+} scratch_reg5_u;
-+
-+typedef struct _scratch_umsk_t {
-+ unsigned long scratch_umsk : 6;
-+ unsigned long : 10;
-+ unsigned long scratch_swap : 2;
-+ unsigned long : 14;
-+ } scratch_umsk_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ scratch_umsk_t f;
-+} scratch_umsk_u;
-+
-+typedef struct _scratch_addr_t {
-+ unsigned long : 5;
-+ unsigned long scratch_addr : 27;
-+ } scratch_addr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ scratch_addr_t f;
-+} scratch_addr_u;
-+
-+typedef struct _cp_csq_addr_t {
-+ unsigned long : 2;
-+ unsigned long csq_addr : 8;
-+ unsigned long : 22;
-+ } cp_csq_addr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_csq_addr_t f;
-+} cp_csq_addr_u;
-+
-+typedef struct _cp_csq_data_t {
-+ unsigned long csq_data : 32;
-+ } cp_csq_data_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_csq_data_t f;
-+} cp_csq_data_u;
-+
-+typedef struct _cp_csq_stat_t {
-+ unsigned long csq_rptr_primary : 8;
-+ unsigned long csq_wptr_primary : 8;
-+ unsigned long csq_rptr_indirect : 8;
-+ unsigned long csq_wptr_indirect : 8;
-+ } cp_csq_stat_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_csq_stat_t f;
-+} cp_csq_stat_u;
-+
-+typedef struct _cp_stat_t {
-+ unsigned long mru_busy : 1;
-+ unsigned long mwu_busy : 1;
-+ unsigned long rsiu_busy : 1;
-+ unsigned long rciu_busy : 1;
-+ unsigned long : 5;
-+ unsigned long csf_primary_busy : 1;
-+ unsigned long csf_indirect_busy : 1;
-+ unsigned long csq_primary_busy : 1;
-+ unsigned long csq_indirect_busy : 1;
-+ unsigned long csi_busy : 1;
-+ unsigned long : 14;
-+ unsigned long guidma_busy : 1;
-+ unsigned long viddma_busy : 1;
-+ unsigned long cmdstrm_busy : 1;
-+ unsigned long cp_busy : 1;
-+ } cp_stat_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cp_stat_t f;
-+} cp_stat_u;
-+
-+typedef struct _gen_int_cntl_t {
-+ unsigned long crtc_vblank_mask : 1;
-+ unsigned long crtc_vline_mask : 1;
-+ unsigned long crtc_hwint1_mask : 1;
-+ unsigned long crtc_hwint2_mask : 1;
-+ unsigned long : 15;
-+ unsigned long gui_idle_mask : 1;
-+ unsigned long : 8;
-+ unsigned long pm4_idle_int_mask : 1;
-+ unsigned long dvi_i2c_int_mask : 1;
-+ unsigned long : 2;
-+ } gen_int_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gen_int_cntl_t f;
-+} gen_int_cntl_u;
-+
-+typedef struct _gen_int_status_rd_t {
-+ unsigned long crtc_vblank_stat : 1;
-+ unsigned long crtc_vline_stat : 1;
-+ unsigned long crtc_hwint1_stat : 1;
-+ unsigned long crtc_hwint2_stat : 1;
-+ unsigned long : 15;
-+ unsigned long gui_idle_stat : 1;
-+ unsigned long : 8;
-+ unsigned long pm4_idle_int_stat : 1;
-+ unsigned long dvi_i2c_int_stat : 1;
-+ unsigned long : 2;
-+ } gen_int_status_rd_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gen_int_status_rd_t f;
-+} gen_int_status_rd_u;
-+
-+typedef struct _gen_int_status_wr_t {
-+ unsigned long crtc_vblank_stat_ak : 1;
-+ unsigned long crtc_vline_stat_ak : 1;
-+ unsigned long crtc_hwint1_stat_ak : 1;
-+ unsigned long crtc_hwint2_stat_ak : 1;
-+ unsigned long : 15;
-+ unsigned long gui_idle_stat_ak : 1;
-+ unsigned long : 8;
-+ unsigned long pm4_idle_int_ak : 1;
-+ unsigned long dvi_i2c_int_ak : 1;
-+ unsigned long : 2;
-+ } gen_int_status_wr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gen_int_status_wr_t f;
-+} gen_int_status_wr_u;
-+
-+typedef struct _lcd_format_t {
-+ unsigned long lcd_type : 4;
-+ unsigned long color_to_mono : 1;
-+ unsigned long data_inv : 1;
-+ unsigned long stn_fm : 2;
-+ unsigned long tft_fm : 2;
-+ unsigned long scan_lr_en : 1;
-+ unsigned long scan_ud_en : 1;
-+ unsigned long pol_inv : 1;
-+ unsigned long rst_fm : 1;
-+ unsigned long yuv_to_rgb : 1;
-+ unsigned long hr_tft : 1;
-+ unsigned long ulc_panel : 1;
-+ unsigned long : 15;
-+ } lcd_format_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ lcd_format_t f;
-+} lcd_format_u;
-+
-+typedef struct _graphic_ctrl_t {
-+ unsigned long color_depth : 3;
-+ unsigned long portrait_mode : 2;
-+ unsigned long low_power_on : 1;
-+ unsigned long req_freq : 4;
-+ unsigned long en_crtc : 1;
-+ unsigned long en_graphic_req : 1;
-+ unsigned long en_graphic_crtc : 1;
-+ unsigned long total_req_graphic : 9;
-+ unsigned long lcd_pclk_on : 1;
-+ unsigned long lcd_sclk_on : 1;
-+ unsigned long pclk_running : 1;
-+ unsigned long sclk_running : 1;
-+ unsigned long : 6;
-+ } graphic_ctrl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ graphic_ctrl_t f;
-+} graphic_ctrl_u;
-+
-+typedef struct _graphic_offset_t {
-+ unsigned long graphic_offset : 24;
-+ unsigned long : 8;
-+ } graphic_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ graphic_offset_t f;
-+} graphic_offset_u;
-+
-+typedef struct _graphic_pitch_t {
-+ unsigned long graphic_pitch : 11;
-+ unsigned long : 21;
-+ } graphic_pitch_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ graphic_pitch_t f;
-+} graphic_pitch_u;
-+
-+typedef struct _crtc_total_t {
-+ unsigned long crtc_h_total : 10;
-+ unsigned long : 6;
-+ unsigned long crtc_v_total : 10;
-+ unsigned long : 6;
-+ } crtc_total_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_total_t f;
-+} crtc_total_u;
-+
-+typedef struct _active_h_disp_t {
-+ unsigned long active_h_start : 10;
-+ unsigned long : 6;
-+ unsigned long active_h_end : 10;
-+ unsigned long : 6;
-+ } active_h_disp_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ active_h_disp_t f;
-+} active_h_disp_u;
-+
-+typedef struct _active_v_disp_t {
-+ unsigned long active_v_start : 10;
-+ unsigned long : 6;
-+ unsigned long active_v_end : 10;
-+ unsigned long : 6;
-+ } active_v_disp_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ active_v_disp_t f;
-+} active_v_disp_u;
-+
-+typedef struct _graphic_h_disp_t {
-+ unsigned long graphic_h_start : 10;
-+ unsigned long : 6;
-+ unsigned long graphic_h_end : 10;
-+ unsigned long : 6;
-+ } graphic_h_disp_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ graphic_h_disp_t f;
-+} graphic_h_disp_u;
-+
-+typedef struct _graphic_v_disp_t {
-+ unsigned long graphic_v_start : 10;
-+ unsigned long : 6;
-+ unsigned long graphic_v_end : 10;
-+ unsigned long : 6;
-+ } graphic_v_disp_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ graphic_v_disp_t f;
-+} graphic_v_disp_u;
-+
-+typedef struct _video_ctrl_t {
-+ unsigned long video_mode : 1;
-+ unsigned long keyer_en : 1;
-+ unsigned long en_video_req : 1;
-+ unsigned long en_graphic_req_video : 1;
-+ unsigned long en_video_crtc : 1;
-+ unsigned long video_hor_exp : 2;
-+ unsigned long video_ver_exp : 2;
-+ unsigned long uv_combine : 1;
-+ unsigned long total_req_video : 9;
-+ unsigned long video_ch_sel : 1;
-+ unsigned long video_portrait : 2;
-+ unsigned long yuv2rgb_en : 1;
-+ unsigned long yuv2rgb_option : 1;
-+ unsigned long video_inv_hor : 1;
-+ unsigned long video_inv_ver : 1;
-+ unsigned long gamma_sel : 2;
-+ unsigned long dis_limit : 1;
-+ unsigned long en_uv_hblend : 1;
-+ unsigned long rgb_gamma_sel : 2;
-+ } video_ctrl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ video_ctrl_t f;
-+} video_ctrl_u;
-+
-+typedef struct _graphic_key_t {
-+ unsigned long keyer_color : 16;
-+ unsigned long keyer_mask : 16;
-+ } graphic_key_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ graphic_key_t f;
-+} graphic_key_u;
-+
-+typedef struct _video_y_offset_t {
-+ unsigned long y_offset : 24;
-+ unsigned long : 8;
-+ } video_y_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ video_y_offset_t f;
-+} video_y_offset_u;
-+
-+typedef struct _video_y_pitch_t {
-+ unsigned long y_pitch : 11;
-+ unsigned long : 21;
-+ } video_y_pitch_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ video_y_pitch_t f;
-+} video_y_pitch_u;
-+
-+typedef struct _video_u_offset_t {
-+ unsigned long u_offset : 24;
-+ unsigned long : 8;
-+ } video_u_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ video_u_offset_t f;
-+} video_u_offset_u;
-+
-+typedef struct _video_u_pitch_t {
-+ unsigned long u_pitch : 11;
-+ unsigned long : 21;
-+ } video_u_pitch_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ video_u_pitch_t f;
-+} video_u_pitch_u;
-+
-+typedef struct _video_v_offset_t {
-+ unsigned long v_offset : 24;
-+ unsigned long : 8;
-+ } video_v_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ video_v_offset_t f;
-+} video_v_offset_u;
-+
-+typedef struct _video_v_pitch_t {
-+ unsigned long v_pitch : 11;
-+ unsigned long : 21;
-+ } video_v_pitch_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ video_v_pitch_t f;
-+} video_v_pitch_u;
-+
-+typedef struct _video_h_pos_t {
-+ unsigned long video_h_start : 10;
-+ unsigned long : 6;
-+ unsigned long video_h_end : 10;
-+ unsigned long : 6;
-+ } video_h_pos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ video_h_pos_t f;
-+} video_h_pos_u;
-+
-+typedef struct _video_v_pos_t {
-+ unsigned long video_v_start : 10;
-+ unsigned long : 6;
-+ unsigned long video_v_end : 10;
-+ unsigned long : 6;
-+ } video_v_pos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ video_v_pos_t f;
-+} video_v_pos_u;
-+
-+typedef struct _brightness_cntl_t {
-+ unsigned long brightness : 7;
-+ unsigned long : 25;
-+ } brightness_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ brightness_cntl_t f;
-+} brightness_cntl_u;
-+
-+typedef struct _cursor1_offset_t {
-+ unsigned long cur1_offset : 24;
-+ unsigned long cur1_x_offset : 4;
-+ unsigned long cur1_y_offset : 4;
-+ } cursor1_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor1_offset_t f;
-+} cursor1_offset_u;
-+
-+typedef struct _cursor1_h_pos_t {
-+ unsigned long cur1_h_start : 10;
-+ unsigned long : 6;
-+ unsigned long cur1_h_end : 10;
-+ unsigned long : 5;
-+ unsigned long cur1_en : 1;
-+ } cursor1_h_pos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor1_h_pos_t f;
-+} cursor1_h_pos_u;
-+
-+typedef struct _cursor1_v_pos_t {
-+ unsigned long cur1_v_start : 10;
-+ unsigned long : 6;
-+ unsigned long cur1_v_end : 10;
-+ unsigned long : 6;
-+ } cursor1_v_pos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor1_v_pos_t f;
-+} cursor1_v_pos_u;
-+
-+typedef struct _cursor1_color0_t {
-+ unsigned long cur1_color0_r : 8;
-+ unsigned long cur1_color0_g : 8;
-+ unsigned long cur1_color0_b : 8;
-+ unsigned long : 8;
-+ } cursor1_color0_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor1_color0_t f;
-+} cursor1_color0_u;
-+
-+typedef struct _cursor1_color1_t {
-+ unsigned long cur1_color1_r : 8;
-+ unsigned long cur1_color1_g : 8;
-+ unsigned long cur1_color1_b : 8;
-+ unsigned long : 8;
-+ } cursor1_color1_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor1_color1_t f;
-+} cursor1_color1_u;
-+
-+typedef struct _cursor2_offset_t {
-+ unsigned long cur2_offset : 24;
-+ unsigned long cur2_x_offset : 4;
-+ unsigned long cur2_y_offset : 4;
-+ } cursor2_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor2_offset_t f;
-+} cursor2_offset_u;
-+
-+typedef struct _cursor2_h_pos_t {
-+ unsigned long cur2_h_start : 10;
-+ unsigned long : 6;
-+ unsigned long cur2_h_end : 10;
-+ unsigned long : 5;
-+ unsigned long cur2_en : 1;
-+ } cursor2_h_pos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor2_h_pos_t f;
-+} cursor2_h_pos_u;
-+
-+typedef struct _cursor2_v_pos_t {
-+ unsigned long cur2_v_start : 10;
-+ unsigned long : 6;
-+ unsigned long cur2_v_end : 10;
-+ unsigned long : 6;
-+ } cursor2_v_pos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor2_v_pos_t f;
-+} cursor2_v_pos_u;
-+
-+typedef struct _cursor2_color0_t {
-+ unsigned long cur2_color0_r : 8;
-+ unsigned long cur2_color0_g : 8;
-+ unsigned long cur2_color0_b : 8;
-+ unsigned long : 8;
-+ } cursor2_color0_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor2_color0_t f;
-+} cursor2_color0_u;
-+
-+typedef struct _cursor2_color1_t {
-+ unsigned long cur2_color1_r : 8;
-+ unsigned long cur2_color1_g : 8;
-+ unsigned long cur2_color1_b : 8;
-+ unsigned long : 8;
-+ } cursor2_color1_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor2_color1_t f;
-+} cursor2_color1_u;
-+
-+typedef struct _disp_int_cntl_t {
-+ unsigned long vline_int_pos : 10;
-+ unsigned long : 6;
-+ unsigned long hpos_int_pos : 10;
-+ unsigned long : 4;
-+ unsigned long vblank_int_pol : 1;
-+ unsigned long frame_int_pol : 1;
-+ } disp_int_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ disp_int_cntl_t f;
-+} disp_int_cntl_u;
-+
-+typedef struct _crtc_ss_t {
-+ unsigned long ss_start : 10;
-+ unsigned long : 6;
-+ unsigned long ss_end : 10;
-+ unsigned long : 2;
-+ unsigned long ss_align : 1;
-+ unsigned long ss_pol : 1;
-+ unsigned long ss_run_mode : 1;
-+ unsigned long ss_en : 1;
-+ } crtc_ss_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_ss_t f;
-+} crtc_ss_u;
-+
-+typedef struct _crtc_ls_t {
-+ unsigned long ls_start : 10;
-+ unsigned long : 6;
-+ unsigned long ls_end : 10;
-+ unsigned long : 2;
-+ unsigned long ls_align : 1;
-+ unsigned long ls_pol : 1;
-+ unsigned long ls_run_mode : 1;
-+ unsigned long ls_en : 1;
-+ } crtc_ls_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_ls_t f;
-+} crtc_ls_u;
-+
-+typedef struct _crtc_rev_t {
-+ unsigned long rev_pos : 10;
-+ unsigned long : 6;
-+ unsigned long rev_align : 1;
-+ unsigned long rev_freq_nref : 5;
-+ unsigned long rev_en : 1;
-+ unsigned long : 9;
-+ } crtc_rev_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_rev_t f;
-+} crtc_rev_u;
-+
-+typedef struct _crtc_dclk_t {
-+ unsigned long dclk_start : 10;
-+ unsigned long : 6;
-+ unsigned long dclk_end : 10;
-+ unsigned long : 1;
-+ unsigned long dclk_run_mode : 2;
-+ unsigned long dclk_pol : 1;
-+ unsigned long dclk_align : 1;
-+ unsigned long dclk_en : 1;
-+ } crtc_dclk_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_dclk_t f;
-+} crtc_dclk_u;
-+
-+typedef struct _crtc_gs_t {
-+ unsigned long gs_start : 10;
-+ unsigned long : 6;
-+ unsigned long gs_end : 10;
-+ unsigned long : 3;
-+ unsigned long gs_align : 1;
-+ unsigned long gs_pol : 1;
-+ unsigned long gs_en : 1;
-+ } crtc_gs_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_gs_t f;
-+} crtc_gs_u;
-+
-+typedef struct _crtc_vpos_gs_t {
-+ unsigned long gs_vpos_start : 10;
-+ unsigned long : 6;
-+ unsigned long gs_vpos_end : 10;
-+ unsigned long : 6;
-+ } crtc_vpos_gs_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_vpos_gs_t f;
-+} crtc_vpos_gs_u;
-+
-+typedef struct _crtc_gclk_t {
-+ unsigned long gclk_start : 10;
-+ unsigned long : 6;
-+ unsigned long gclk_end : 10;
-+ unsigned long : 3;
-+ unsigned long gclk_align : 1;
-+ unsigned long gclk_pol : 1;
-+ unsigned long gclk_en : 1;
-+ } crtc_gclk_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_gclk_t f;
-+} crtc_gclk_u;
-+
-+typedef struct _crtc_goe_t {
-+ unsigned long goe_start : 10;
-+ unsigned long : 6;
-+ unsigned long goe_end : 10;
-+ unsigned long : 3;
-+ unsigned long goe_align : 1;
-+ unsigned long goe_pol : 1;
-+ unsigned long goe_en : 1;
-+ } crtc_goe_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_goe_t f;
-+} crtc_goe_u;
-+
-+typedef struct _crtc_frame_t {
-+ unsigned long crtc_fr_start : 10;
-+ unsigned long : 6;
-+ unsigned long crtc_fr_end : 10;
-+ unsigned long : 4;
-+ unsigned long crtc_frame_en : 1;
-+ unsigned long crtc_frame_align : 1;
-+ } crtc_frame_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_frame_t f;
-+} crtc_frame_u;
-+
-+typedef struct _crtc_frame_vpos_t {
-+ unsigned long crtc_fr_vpos : 10;
-+ unsigned long : 22;
-+ } crtc_frame_vpos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_frame_vpos_t f;
-+} crtc_frame_vpos_u;
-+
-+typedef struct _gpio_data_t {
-+ unsigned long gio_out : 16;
-+ unsigned long gio_in : 16;
-+ } gpio_data_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gpio_data_t f;
-+} gpio_data_u;
-+
-+typedef struct _gpio_cntl1_t {
-+ unsigned long gio_pd : 16;
-+ unsigned long gio_schmen : 16;
-+ } gpio_cntl1_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gpio_cntl1_t f;
-+} gpio_cntl1_u;
-+
-+typedef struct _gpio_cntl2_t {
-+ unsigned long gio_oe : 16;
-+ unsigned long gio_srp : 1;
-+ unsigned long gio_srn : 1;
-+ unsigned long gio_sp : 4;
-+ unsigned long gio_sn : 4;
-+ unsigned long : 6;
-+ } gpio_cntl2_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gpio_cntl2_t f;
-+} gpio_cntl2_u;
-+
-+typedef struct _lcdd_cntl1_t {
-+ unsigned long lcdd_pd : 18;
-+ unsigned long lcdd_srp : 1;
-+ unsigned long lcdd_srn : 1;
-+ unsigned long lcdd_sp : 4;
-+ unsigned long lcdd_sn : 4;
-+ unsigned long lcdd_align : 1;
-+ unsigned long : 3;
-+ } lcdd_cntl1_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ lcdd_cntl1_t f;
-+} lcdd_cntl1_u;
-+
-+typedef struct _lcdd_cntl2_t {
-+ unsigned long lcdd_oe : 18;
-+ unsigned long : 14;
-+ } lcdd_cntl2_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ lcdd_cntl2_t f;
-+} lcdd_cntl2_u;
-+
-+typedef struct _genlcd_cntl1_t {
-+ unsigned long dclk_oe : 1;
-+ unsigned long dclk_pd : 1;
-+ unsigned long dclk_srp : 1;
-+ unsigned long dclk_srn : 1;
-+ unsigned long dclk_sp : 4;
-+ unsigned long dclk_sn : 4;
-+ unsigned long ss_oe : 1;
-+ unsigned long ss_pd : 1;
-+ unsigned long ls_oe : 1;
-+ unsigned long ls_pd : 1;
-+ unsigned long gs_oe : 1;
-+ unsigned long gs_pd : 1;
-+ unsigned long goe_oe : 1;
-+ unsigned long goe_pd : 1;
-+ unsigned long rev_oe : 1;
-+ unsigned long rev_pd : 1;
-+ unsigned long frame_oe : 1;
-+ unsigned long frame_pd : 1;
-+ unsigned long : 8;
-+ } genlcd_cntl1_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ genlcd_cntl1_t f;
-+} genlcd_cntl1_u;
-+
-+typedef struct _genlcd_cntl2_t {
-+ unsigned long gclk_oe : 1;
-+ unsigned long gclk_pd : 1;
-+ unsigned long gclk_srp : 1;
-+ unsigned long gclk_srn : 1;
-+ unsigned long gclk_sp : 4;
-+ unsigned long gclk_sn : 4;
-+ unsigned long genlcd_srp : 1;
-+ unsigned long genlcd_srn : 1;
-+ unsigned long genlcd_sp : 4;
-+ unsigned long genlcd_sn : 4;
-+ unsigned long : 10;
-+ } genlcd_cntl2_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ genlcd_cntl2_t f;
-+} genlcd_cntl2_u;
-+
-+typedef struct _disp_debug_t {
-+ unsigned long disp_debug : 32;
-+ } disp_debug_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ disp_debug_t f;
-+} disp_debug_u;
-+
-+typedef struct _disp_db_buf_cntl_rd_t {
-+ unsigned long en_db_buf : 1;
-+ unsigned long update_db_buf_done : 1;
-+ unsigned long db_buf_cntl : 6;
-+ unsigned long : 24;
-+ } disp_db_buf_cntl_rd_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ disp_db_buf_cntl_rd_t f;
-+} disp_db_buf_cntl_rd_u;
-+
-+typedef struct _disp_db_buf_cntl_wr_t {
-+ unsigned long en_db_buf : 1;
-+ unsigned long update_db_buf : 1;
-+ unsigned long db_buf_cntl : 6;
-+ unsigned long : 24;
-+ } disp_db_buf_cntl_wr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ disp_db_buf_cntl_wr_t f;
-+} disp_db_buf_cntl_wr_u;
-+
-+typedef struct _disp_crc_sig_t {
-+ unsigned long crc_sig_r : 6;
-+ unsigned long crc_sig_g : 6;
-+ unsigned long crc_sig_b : 6;
-+ unsigned long crc_cont_en : 1;
-+ unsigned long crc_en : 1;
-+ unsigned long crc_mask_en : 1;
-+ unsigned long crc_sig_cntl : 6;
-+ unsigned long : 5;
-+ } disp_crc_sig_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ disp_crc_sig_t f;
-+} disp_crc_sig_u;
-+
-+typedef struct _crtc_default_count_t {
-+ unsigned long crtc_hcount_def : 10;
-+ unsigned long : 6;
-+ unsigned long crtc_vcount_def : 10;
-+ unsigned long : 6;
-+ } crtc_default_count_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_default_count_t f;
-+} crtc_default_count_u;
-+
-+typedef struct _lcd_background_color_t {
-+ unsigned long lcd_bg_red : 8;
-+ unsigned long lcd_bg_green : 8;
-+ unsigned long lcd_bg_blue : 8;
-+ unsigned long : 8;
-+ } lcd_background_color_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ lcd_background_color_t f;
-+} lcd_background_color_u;
-+
-+typedef struct _crtc_ps2_t {
-+ unsigned long ps2_start : 10;
-+ unsigned long : 6;
-+ unsigned long ps2_end : 10;
-+ unsigned long : 4;
-+ unsigned long ps2_pol : 1;
-+ unsigned long ps2_en : 1;
-+ } crtc_ps2_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_ps2_t f;
-+} crtc_ps2_u;
-+
-+typedef struct _crtc_ps2_vpos_t {
-+ unsigned long ps2_vpos_start : 10;
-+ unsigned long : 6;
-+ unsigned long ps2_vpos_end : 10;
-+ unsigned long : 6;
-+ } crtc_ps2_vpos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_ps2_vpos_t f;
-+} crtc_ps2_vpos_u;
-+
-+typedef struct _crtc_ps1_active_t {
-+ unsigned long ps1_h_start : 10;
-+ unsigned long : 6;
-+ unsigned long ps1_h_end : 10;
-+ unsigned long : 3;
-+ unsigned long ps1_pol : 1;
-+ unsigned long ps1_en : 1;
-+ unsigned long ps1_use_nactive : 1;
-+ } crtc_ps1_active_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_ps1_active_t f;
-+} crtc_ps1_active_u;
-+
-+typedef struct _crtc_ps1_nactive_t {
-+ unsigned long ps1_h_start_na : 10;
-+ unsigned long : 6;
-+ unsigned long ps1_h_end_na : 10;
-+ unsigned long : 5;
-+ unsigned long ps1_en_na : 1;
-+ } crtc_ps1_nactive_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_ps1_nactive_t f;
-+} crtc_ps1_nactive_u;
-+
-+typedef struct _crtc_gclk_ext_t {
-+ unsigned long gclk_alter_start : 10;
-+ unsigned long : 6;
-+ unsigned long gclk_alter_width : 2;
-+ unsigned long gclk_en_alter : 1;
-+ unsigned long gclk_db_width : 2;
-+ unsigned long : 11;
-+ } crtc_gclk_ext_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_gclk_ext_t f;
-+} crtc_gclk_ext_u;
-+
-+typedef struct _crtc_alw_t {
-+ unsigned long alw_hstart : 10;
-+ unsigned long : 6;
-+ unsigned long alw_hend : 10;
-+ unsigned long : 4;
-+ unsigned long alw_delay : 1;
-+ unsigned long alw_en : 1;
-+ } crtc_alw_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_alw_t f;
-+} crtc_alw_u;
-+
-+typedef struct _crtc_alw_vpos_t {
-+ unsigned long alw_vstart : 10;
-+ unsigned long : 6;
-+ unsigned long alw_vend : 10;
-+ unsigned long : 6;
-+ } crtc_alw_vpos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_alw_vpos_t f;
-+} crtc_alw_vpos_u;
-+
-+typedef struct _crtc_psk_t {
-+ unsigned long psk_vstart : 10;
-+ unsigned long : 6;
-+ unsigned long psk_vend : 10;
-+ unsigned long : 4;
-+ unsigned long psk_pol : 1;
-+ unsigned long psk_en : 1;
-+ } crtc_psk_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_psk_t f;
-+} crtc_psk_u;
-+
-+typedef struct _crtc_psk_hpos_t {
-+ unsigned long psk_hstart : 10;
-+ unsigned long : 6;
-+ unsigned long psk_hend : 10;
-+ unsigned long : 6;
-+ } crtc_psk_hpos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_psk_hpos_t f;
-+} crtc_psk_hpos_u;
-+
-+typedef struct _crtc_cv4_start_t {
-+ unsigned long cv4_vstart : 10;
-+ unsigned long : 20;
-+ unsigned long cv4_pol : 1;
-+ unsigned long cv4_en : 1;
-+ } crtc_cv4_start_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_cv4_start_t f;
-+} crtc_cv4_start_u;
-+
-+typedef struct _crtc_cv4_end_t {
-+ unsigned long cv4_vend1 : 10;
-+ unsigned long : 6;
-+ unsigned long cv4_vend2 : 10;
-+ unsigned long : 6;
-+ } crtc_cv4_end_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_cv4_end_t f;
-+} crtc_cv4_end_u;
-+
-+typedef struct _crtc_cv4_hpos_t {
-+ unsigned long cv4_hstart : 10;
-+ unsigned long : 6;
-+ unsigned long cv4_hend : 10;
-+ unsigned long : 6;
-+ } crtc_cv4_hpos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_cv4_hpos_t f;
-+} crtc_cv4_hpos_u;
-+
-+typedef struct _crtc_eck_t {
-+ unsigned long eck_freq1 : 3;
-+ unsigned long eck_en : 1;
-+ unsigned long : 28;
-+ } crtc_eck_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ crtc_eck_t f;
-+} crtc_eck_u;
-+
-+typedef struct _refresh_cntl_t {
-+ unsigned long ref_frame : 3;
-+ unsigned long nref_frame : 5;
-+ unsigned long ref_cntl : 1;
-+ unsigned long stop_sm_nref : 1;
-+ unsigned long stop_req_nref : 1;
-+ unsigned long : 21;
-+ } refresh_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ refresh_cntl_t f;
-+} refresh_cntl_u;
-+
-+typedef struct _genlcd_cntl3_t {
-+ unsigned long ps1_oe : 1;
-+ unsigned long ps1_pd : 1;
-+ unsigned long ps2_oe : 1;
-+ unsigned long ps2_pd : 1;
-+ unsigned long rev2_oe : 1;
-+ unsigned long rev2_pd : 1;
-+ unsigned long awl_oe : 1;
-+ unsigned long awl_pd : 1;
-+ unsigned long dinv_oe : 1;
-+ unsigned long dinv_pd : 1;
-+ unsigned long psk_out : 1;
-+ unsigned long psd_out : 1;
-+ unsigned long eck_out : 1;
-+ unsigned long cv4_out : 1;
-+ unsigned long ps1_out : 1;
-+ unsigned long ps2_out : 1;
-+ unsigned long rev_out : 1;
-+ unsigned long rev2_out : 1;
-+ unsigned long : 14;
-+ } genlcd_cntl3_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ genlcd_cntl3_t f;
-+} genlcd_cntl3_u;
-+
-+typedef struct _gpio_data2_t {
-+ unsigned long gio2_out : 16;
-+ unsigned long gio2_in : 16;
-+ } gpio_data2_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gpio_data2_t f;
-+} gpio_data2_u;
-+
-+typedef struct _gpio_cntl3_t {
-+ unsigned long gio2_pd : 16;
-+ unsigned long gio2_schmen : 16;
-+ } gpio_cntl3_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gpio_cntl3_t f;
-+} gpio_cntl3_u;
-+
-+typedef struct _gpio_cntl4_t {
-+ unsigned long gio2_oe : 16;
-+ unsigned long : 16;
-+ } gpio_cntl4_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gpio_cntl4_t f;
-+} gpio_cntl4_u;
-+
-+typedef struct _chip_strap_t {
-+ unsigned long config_strap : 8;
-+ unsigned long pkg_strap : 1;
-+ unsigned long : 23;
-+ } chip_strap_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ chip_strap_t f;
-+} chip_strap_u;
-+
-+typedef struct _disp_debug2_t {
-+ unsigned long disp_debug2 : 32;
-+ } disp_debug2_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ disp_debug2_t f;
-+} disp_debug2_u;
-+
-+typedef struct _debug_bus_cntl_t {
-+ unsigned long debug_testmux : 4;
-+ unsigned long debug_testsel : 4;
-+ unsigned long debug_gioa_sel : 2;
-+ unsigned long debug_giob_sel : 2;
-+ unsigned long debug_clk_sel : 1;
-+ unsigned long debug_clk_inv : 1;
-+ unsigned long : 2;
-+ unsigned long debug_bus : 16;
-+ } debug_bus_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug_bus_cntl_t f;
-+} debug_bus_cntl_u;
-+
-+typedef struct _gamma_value1_t {
-+ unsigned long gamma1 : 8;
-+ unsigned long gamma2 : 8;
-+ unsigned long gamma3 : 8;
-+ unsigned long gamma4 : 8;
-+ } gamma_value1_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gamma_value1_t f;
-+} gamma_value1_u;
-+
-+typedef struct _gamma_value2_t {
-+ unsigned long gamma5 : 8;
-+ unsigned long gamma6 : 8;
-+ unsigned long gamma7 : 8;
-+ unsigned long gamma8 : 8;
-+ } gamma_value2_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gamma_value2_t f;
-+} gamma_value2_u;
-+
-+typedef struct _gamma_slope_t {
-+ unsigned long slope1 : 3;
-+ unsigned long slope2 : 3;
-+ unsigned long slope3 : 3;
-+ unsigned long slope4 : 3;
-+ unsigned long slope5 : 3;
-+ unsigned long slope6 : 3;
-+ unsigned long slope7 : 3;
-+ unsigned long slope8 : 3;
-+ unsigned long : 8;
-+ } gamma_slope_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gamma_slope_t f;
-+} gamma_slope_u;
-+
-+typedef struct _gen_status_t {
-+ unsigned long status : 16;
-+ unsigned long : 16;
-+ } gen_status_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ gen_status_t f;
-+} gen_status_u;
-+
-+typedef struct _hw_int_t {
-+ unsigned long hwint1_pos : 5;
-+ unsigned long hwint2_pos : 5;
-+ unsigned long hwint1_pol : 1;
-+ unsigned long hwint2_pol : 1;
-+ unsigned long hwint1_en_db : 1;
-+ unsigned long hwint2_en_db : 1;
-+ unsigned long : 18;
-+ } hw_int_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ hw_int_t f;
-+} hw_int_u;
-+
-+typedef struct _dst_offset_t {
-+ unsigned long dst_offset : 24;
-+ unsigned long : 8;
-+ } dst_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_offset_t f;
-+} dst_offset_u;
-+
-+typedef struct _dst_pitch_t {
-+ unsigned long dst_pitch : 14;
-+ unsigned long mc_dst_pitch_mul : 2;
-+ unsigned long : 16;
-+ } dst_pitch_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_pitch_t f;
-+} dst_pitch_u;
-+
-+typedef struct _dst_pitch_offset_t {
-+ unsigned long dst_offset : 20;
-+ unsigned long dst_pitch : 10;
-+ unsigned long mc_dst_pitch_mul : 2;
-+ } dst_pitch_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_pitch_offset_t f;
-+} dst_pitch_offset_u;
-+
-+typedef struct _dst_x_t {
-+ unsigned long dst_x : 14;
-+ unsigned long : 18;
-+ } dst_x_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_x_t f;
-+} dst_x_u;
-+
-+typedef struct _dst_y_t {
-+ unsigned long dst_y : 14;
-+ unsigned long : 18;
-+ } dst_y_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_y_t f;
-+} dst_y_u;
-+
-+typedef struct _dst_x_y_t {
-+ unsigned long dst_y : 14;
-+ unsigned long : 2;
-+ unsigned long dst_x : 14;
-+ unsigned long : 2;
-+ } dst_x_y_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_x_y_t f;
-+} dst_x_y_u;
-+
-+typedef struct _dst_y_x_t {
-+ unsigned long dst_x : 14;
-+ unsigned long : 2;
-+ unsigned long dst_y : 14;
-+ unsigned long : 2;
-+ } dst_y_x_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_y_x_t f;
-+} dst_y_x_u;
-+
-+typedef struct _dst_width_t {
-+ unsigned long dst_width_b0 : 8;
-+ unsigned long dst_width_b1 : 6;
-+ unsigned long : 18;
-+ } dst_width_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_width_t f;
-+} dst_width_u;
-+
-+typedef struct _dst_height_t {
-+ unsigned long dst_height : 14;
-+ unsigned long : 18;
-+ } dst_height_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_height_t f;
-+} dst_height_u;
-+
-+typedef struct _dst_width_height_t {
-+ unsigned long dst_height : 14;
-+ unsigned long : 2;
-+ unsigned long dst_width_b0 : 8;
-+ unsigned long dst_width_b1 : 6;
-+ unsigned long : 2;
-+ } dst_width_height_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_width_height_t f;
-+} dst_width_height_u;
-+
-+typedef struct _dst_height_width_t {
-+ unsigned long dst_width_b0 : 8;
-+ unsigned long dst_width_b1 : 6;
-+ unsigned long : 2;
-+ unsigned long dst_height : 14;
-+ unsigned long : 2;
-+ } dst_height_width_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_height_width_t f;
-+} dst_height_width_u;
-+
-+typedef struct _dst_height_width_8_t {
-+ unsigned long : 16;
-+ unsigned long dst_width_b0 : 8;
-+ unsigned long dst_height : 8;
-+ } dst_height_width_8_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_height_width_8_t f;
-+} dst_height_width_8_u;
-+
-+typedef struct _dst_height_y_t {
-+ unsigned long dst_y : 14;
-+ unsigned long : 2;
-+ unsigned long dst_height : 14;
-+ unsigned long : 2;
-+ } dst_height_y_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_height_y_t f;
-+} dst_height_y_u;
-+
-+typedef struct _dst_width_x_t {
-+ unsigned long dst_x : 14;
-+ unsigned long : 2;
-+ unsigned long dst_width_b0 : 8;
-+ unsigned long dst_width_b1 : 6;
-+ unsigned long : 2;
-+ } dst_width_x_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_width_x_t f;
-+} dst_width_x_u;
-+
-+typedef struct _dst_width_x_incy_t {
-+ unsigned long dst_x : 14;
-+ unsigned long : 2;
-+ unsigned long dst_width_b0 : 8;
-+ unsigned long dst_width_b1 : 6;
-+ unsigned long : 2;
-+ } dst_width_x_incy_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_width_x_incy_t f;
-+} dst_width_x_incy_u;
-+
-+typedef struct _dst_line_start_t {
-+ unsigned long dst_start_x : 14;
-+ unsigned long : 2;
-+ unsigned long dst_start_y : 14;
-+ unsigned long : 2;
-+ } dst_line_start_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_line_start_t f;
-+} dst_line_start_u;
-+
-+typedef struct _dst_line_end_t {
-+ unsigned long dst_end_x : 14;
-+ unsigned long : 2;
-+ unsigned long dst_end_y_b0 : 8;
-+ unsigned long dst_end_y_b1 : 6;
-+ unsigned long : 2;
-+ } dst_line_end_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dst_line_end_t f;
-+} dst_line_end_u;
-+
-+typedef struct _brush_offset_t {
-+ unsigned long brush_offset : 24;
-+ unsigned long : 8;
-+ } brush_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ brush_offset_t f;
-+} brush_offset_u;
-+
-+typedef struct _brush_y_x_t {
-+ unsigned long brush_x : 5;
-+ unsigned long : 3;
-+ unsigned long brush_y : 3;
-+ unsigned long : 21;
-+ } brush_y_x_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ brush_y_x_t f;
-+} brush_y_x_u;
-+
-+typedef struct _dp_brush_frgd_clr_t {
-+ unsigned long dp_brush_frgd_clr : 32;
-+ } dp_brush_frgd_clr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dp_brush_frgd_clr_t f;
-+} dp_brush_frgd_clr_u;
-+
-+typedef struct _dp_brush_bkgd_clr_t {
-+ unsigned long dp_brush_bkgd_clr : 32;
-+ } dp_brush_bkgd_clr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dp_brush_bkgd_clr_t f;
-+} dp_brush_bkgd_clr_u;
-+
-+typedef struct _src2_offset_t {
-+ unsigned long src2_offset : 24;
-+ unsigned long : 8;
-+ } src2_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src2_offset_t f;
-+} src2_offset_u;
-+
-+typedef struct _src2_pitch_t {
-+ unsigned long src2_pitch : 14;
-+ unsigned long src2_pitch_mul : 2;
-+ unsigned long : 16;
-+ } src2_pitch_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src2_pitch_t f;
-+} src2_pitch_u;
-+
-+typedef struct _src2_pitch_offset_t {
-+ unsigned long src2_offset : 20;
-+ unsigned long : 2;
-+ unsigned long src2_pitch : 8;
-+ unsigned long src2_pitch_mul : 2;
-+ } src2_pitch_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src2_pitch_offset_t f;
-+} src2_pitch_offset_u;
-+
-+typedef struct _src2_x_t {
-+ unsigned long src_x : 14;
-+ unsigned long : 18;
-+ } src2_x_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src2_x_t f;
-+} src2_x_u;
-+
-+typedef struct _src2_y_t {
-+ unsigned long src_y : 14;
-+ unsigned long : 18;
-+ } src2_y_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src2_y_t f;
-+} src2_y_u;
-+
-+typedef struct _src2_x_y_t {
-+ unsigned long src_y : 14;
-+ unsigned long : 2;
-+ unsigned long src_x : 14;
-+ unsigned long : 2;
-+ } src2_x_y_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src2_x_y_t f;
-+} src2_x_y_u;
-+
-+typedef struct _src2_width_t {
-+ unsigned long src2_width : 14;
-+ unsigned long : 18;
-+ } src2_width_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src2_width_t f;
-+} src2_width_u;
-+
-+typedef struct _src2_height_t {
-+ unsigned long src2_height : 14;
-+ unsigned long : 18;
-+ } src2_height_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src2_height_t f;
-+} src2_height_u;
-+
-+typedef struct _src2_inc_t {
-+ unsigned long src2_xinc : 6;
-+ unsigned long : 2;
-+ unsigned long src2_yinc : 6;
-+ unsigned long : 18;
-+ } src2_inc_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src2_inc_t f;
-+} src2_inc_u;
-+
-+typedef struct _src_offset_t {
-+ unsigned long src_offset : 24;
-+ unsigned long : 8;
-+ } src_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_offset_t f;
-+} src_offset_u;
-+
-+typedef struct _src_pitch_t {
-+ unsigned long src_pitch : 14;
-+ unsigned long src_pitch_mul : 2;
-+ unsigned long : 16;
-+ } src_pitch_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_pitch_t f;
-+} src_pitch_u;
-+
-+typedef struct _src_pitch_offset_t {
-+ unsigned long src_offset : 20;
-+ unsigned long src_pitch : 10;
-+ unsigned long src_pitch_mul : 2;
-+ } src_pitch_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_pitch_offset_t f;
-+} src_pitch_offset_u;
-+
-+typedef struct _src_x_t {
-+ unsigned long src_x : 14;
-+ unsigned long : 18;
-+ } src_x_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_x_t f;
-+} src_x_u;
-+
-+typedef struct _src_y_t {
-+ unsigned long src_y : 14;
-+ unsigned long : 18;
-+ } src_y_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_y_t f;
-+} src_y_u;
-+
-+typedef struct _src_x_y_t {
-+ unsigned long src_y : 14;
-+ unsigned long : 2;
-+ unsigned long src_x : 14;
-+ unsigned long : 2;
-+ } src_x_y_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_x_y_t f;
-+} src_x_y_u;
-+
-+typedef struct _src_y_x_t {
-+ unsigned long src_x : 14;
-+ unsigned long : 2;
-+ unsigned long src_y : 14;
-+ unsigned long : 2;
-+ } src_y_x_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_y_x_t f;
-+} src_y_x_u;
-+
-+typedef struct _src_width_t {
-+ unsigned long src_width : 14;
-+ unsigned long : 18;
-+ } src_width_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_width_t f;
-+} src_width_u;
-+
-+typedef struct _src_height_t {
-+ unsigned long src_height : 14;
-+ unsigned long : 18;
-+ } src_height_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_height_t f;
-+} src_height_u;
-+
-+typedef struct _src_inc_t {
-+ unsigned long src_xinc : 6;
-+ unsigned long : 2;
-+ unsigned long src_yinc : 6;
-+ unsigned long : 18;
-+ } src_inc_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_inc_t f;
-+} src_inc_u;
-+
-+typedef struct _host_data0_t {
-+ unsigned long host_data : 32;
-+ } host_data0_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ host_data0_t f;
-+} host_data0_u;
-+
-+typedef struct _host_data1_t {
-+ unsigned long host_data : 32;
-+ } host_data1_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ host_data1_t f;
-+} host_data1_u;
-+
-+typedef struct _host_data2_t {
-+ unsigned long host_data : 32;
-+ } host_data2_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ host_data2_t f;
-+} host_data2_u;
-+
-+typedef struct _host_data3_t {
-+ unsigned long host_data : 32;
-+ } host_data3_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ host_data3_t f;
-+} host_data3_u;
-+
-+typedef struct _host_data4_t {
-+ unsigned long host_data : 32;
-+ } host_data4_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ host_data4_t f;
-+} host_data4_u;
-+
-+typedef struct _host_data5_t {
-+ unsigned long host_data : 32;
-+ } host_data5_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ host_data5_t f;
-+} host_data5_u;
-+
-+typedef struct _host_data6_t {
-+ unsigned long host_data : 32;
-+ } host_data6_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ host_data6_t f;
-+} host_data6_u;
-+
-+typedef struct _host_data7_t {
-+ unsigned long host_data : 32;
-+ } host_data7_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ host_data7_t f;
-+} host_data7_u;
-+
-+typedef struct _host_data_last_t {
-+ unsigned long host_data_last : 32;
-+ } host_data_last_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ host_data_last_t f;
-+} host_data_last_u;
-+
-+typedef struct _dp_src_frgd_clr_t {
-+ unsigned long dp_src_frgd_clr : 32;
-+ } dp_src_frgd_clr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dp_src_frgd_clr_t f;
-+} dp_src_frgd_clr_u;
-+
-+typedef struct _dp_src_bkgd_clr_t {
-+ unsigned long dp_src_bkgd_clr : 32;
-+ } dp_src_bkgd_clr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dp_src_bkgd_clr_t f;
-+} dp_src_bkgd_clr_u;
-+
-+typedef struct _sc_left_t {
-+ unsigned long sc_left : 14;
-+ unsigned long : 18;
-+ } sc_left_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ sc_left_t f;
-+} sc_left_u;
-+
-+typedef struct _sc_right_t {
-+ unsigned long sc_right : 14;
-+ unsigned long : 18;
-+ } sc_right_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ sc_right_t f;
-+} sc_right_u;
-+
-+typedef struct _sc_top_t {
-+ unsigned long sc_top : 14;
-+ unsigned long : 18;
-+ } sc_top_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ sc_top_t f;
-+} sc_top_u;
-+
-+typedef struct _sc_bottom_t {
-+ unsigned long sc_bottom : 14;
-+ unsigned long : 18;
-+ } sc_bottom_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ sc_bottom_t f;
-+} sc_bottom_u;
-+
-+typedef struct _src_sc_right_t {
-+ unsigned long sc_right : 14;
-+ unsigned long : 18;
-+ } src_sc_right_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_sc_right_t f;
-+} src_sc_right_u;
-+
-+typedef struct _src_sc_bottom_t {
-+ unsigned long sc_bottom : 14;
-+ unsigned long : 18;
-+ } src_sc_bottom_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_sc_bottom_t f;
-+} src_sc_bottom_u;
-+
-+typedef struct _dp_cntl_t {
-+ unsigned long dst_x_dir : 1;
-+ unsigned long dst_y_dir : 1;
-+ unsigned long src_x_dir : 1;
-+ unsigned long src_y_dir : 1;
-+ unsigned long dst_major_x : 1;
-+ unsigned long src_major_x : 1;
-+ unsigned long : 26;
-+ } dp_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dp_cntl_t f;
-+} dp_cntl_u;
-+
-+typedef struct _dp_cntl_dst_dir_t {
-+ unsigned long : 15;
-+ unsigned long dst_y_dir : 1;
-+ unsigned long : 15;
-+ unsigned long dst_x_dir : 1;
-+ } dp_cntl_dst_dir_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dp_cntl_dst_dir_t f;
-+} dp_cntl_dst_dir_u;
-+
-+typedef struct _dp_datatype_t {
-+ unsigned long dp_dst_datatype : 4;
-+ unsigned long : 4;
-+ unsigned long dp_brush_datatype : 4;
-+ unsigned long dp_src2_type : 1;
-+ unsigned long dp_src2_datatype : 3;
-+ unsigned long dp_src_datatype : 3;
-+ unsigned long : 11;
-+ unsigned long dp_byte_pix_order : 1;
-+ unsigned long : 1;
-+ } dp_datatype_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dp_datatype_t f;
-+} dp_datatype_u;
-+
-+typedef struct _dp_mix_t {
-+ unsigned long : 8;
-+ unsigned long dp_src_source : 3;
-+ unsigned long dp_src2_source : 3;
-+ unsigned long : 2;
-+ unsigned long dp_rop3 : 8;
-+ unsigned long dp_op : 1;
-+ unsigned long : 7;
-+ } dp_mix_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dp_mix_t f;
-+} dp_mix_u;
-+
-+typedef struct _dp_write_msk_t {
-+ unsigned long dp_write_msk : 32;
-+ } dp_write_msk_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dp_write_msk_t f;
-+} dp_write_msk_u;
-+
-+typedef struct _clr_cmp_clr_src_t {
-+ unsigned long clr_cmp_clr_src : 32;
-+ } clr_cmp_clr_src_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ clr_cmp_clr_src_t f;
-+} clr_cmp_clr_src_u;
-+
-+typedef struct _clr_cmp_clr_dst_t {
-+ unsigned long clr_cmp_clr_dst : 32;
-+ } clr_cmp_clr_dst_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ clr_cmp_clr_dst_t f;
-+} clr_cmp_clr_dst_u;
-+
-+typedef struct _clr_cmp_cntl_t {
-+ unsigned long clr_cmp_fcn_src : 3;
-+ unsigned long : 5;
-+ unsigned long clr_cmp_fcn_dst : 3;
-+ unsigned long : 13;
-+ unsigned long clr_cmp_src : 2;
-+ unsigned long : 6;
-+ } clr_cmp_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ clr_cmp_cntl_t f;
-+} clr_cmp_cntl_u;
-+
-+typedef struct _clr_cmp_msk_t {
-+ unsigned long clr_cmp_msk : 32;
-+ } clr_cmp_msk_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ clr_cmp_msk_t f;
-+} clr_cmp_msk_u;
-+
-+typedef struct _default_pitch_offset_t {
-+ unsigned long default_offset : 20;
-+ unsigned long default_pitch : 10;
-+ unsigned long : 2;
-+ } default_pitch_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ default_pitch_offset_t f;
-+} default_pitch_offset_u;
-+
-+typedef struct _default_sc_bottom_right_t {
-+ unsigned long default_sc_right : 14;
-+ unsigned long : 2;
-+ unsigned long default_sc_bottom : 14;
-+ unsigned long : 2;
-+ } default_sc_bottom_right_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ default_sc_bottom_right_t f;
-+} default_sc_bottom_right_u;
-+
-+typedef struct _default2_sc_bottom_right_t {
-+ unsigned long default_sc_right : 14;
-+ unsigned long : 2;
-+ unsigned long default_sc_bottom : 14;
-+ unsigned long : 2;
-+ } default2_sc_bottom_right_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ default2_sc_bottom_right_t f;
-+} default2_sc_bottom_right_u;
-+
-+typedef struct _ref1_pitch_offset_t {
-+ unsigned long offset : 20;
-+ unsigned long : 2;
-+ unsigned long pitch : 8;
-+ unsigned long : 2;
-+ } ref1_pitch_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ ref1_pitch_offset_t f;
-+} ref1_pitch_offset_u;
-+
-+typedef struct _ref2_pitch_offset_t {
-+ unsigned long offset : 20;
-+ unsigned long : 2;
-+ unsigned long pitch : 8;
-+ unsigned long : 2;
-+ } ref2_pitch_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ ref2_pitch_offset_t f;
-+} ref2_pitch_offset_u;
-+
-+typedef struct _ref3_pitch_offset_t {
-+ unsigned long offset : 20;
-+ unsigned long : 2;
-+ unsigned long pitch : 8;
-+ unsigned long : 2;
-+ } ref3_pitch_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ ref3_pitch_offset_t f;
-+} ref3_pitch_offset_u;
-+
-+typedef struct _ref4_pitch_offset_t {
-+ unsigned long offset : 20;
-+ unsigned long : 2;
-+ unsigned long pitch : 8;
-+ unsigned long : 2;
-+ } ref4_pitch_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ ref4_pitch_offset_t f;
-+} ref4_pitch_offset_u;
-+
-+typedef struct _ref5_pitch_offset_t {
-+ unsigned long offset : 20;
-+ unsigned long : 2;
-+ unsigned long pitch : 8;
-+ unsigned long : 2;
-+ } ref5_pitch_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ ref5_pitch_offset_t f;
-+} ref5_pitch_offset_u;
-+
-+typedef struct _ref6_pitch_offset_t {
-+ unsigned long offset : 20;
-+ unsigned long : 2;
-+ unsigned long pitch : 8;
-+ unsigned long : 2;
-+ } ref6_pitch_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ ref6_pitch_offset_t f;
-+} ref6_pitch_offset_u;
-+
-+typedef struct _dp_gui_master_cntl_t {
-+ unsigned long gmc_src_pitch_offset_cntl : 1;
-+ unsigned long gmc_dst_pitch_offset_cntl : 1;
-+ unsigned long gmc_src_clipping : 1;
-+ unsigned long gmc_dst_clipping : 1;
-+ unsigned long gmc_brush_datatype : 4;
-+ unsigned long gmc_dst_datatype : 4;
-+ unsigned long gmc_src_datatype : 3;
-+ unsigned long gmc_byte_pix_order : 1;
-+ unsigned long gmc_default_sel : 1;
-+ unsigned long gmc_rop3 : 8;
-+ unsigned long gmc_dp_src_source : 3;
-+ unsigned long gmc_clr_cmp_fcn_dis : 1;
-+ unsigned long : 1;
-+ unsigned long gmc_wr_msk_dis : 1;
-+ unsigned long gmc_dp_op : 1;
-+ } dp_gui_master_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ dp_gui_master_cntl_t f;
-+} dp_gui_master_cntl_u;
-+
-+typedef struct _sc_top_left_t {
-+ unsigned long sc_left : 14;
-+ unsigned long : 2;
-+ unsigned long sc_top : 14;
-+ unsigned long : 2;
-+ } sc_top_left_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ sc_top_left_t f;
-+} sc_top_left_u;
-+
-+typedef struct _sc_bottom_right_t {
-+ unsigned long sc_right : 14;
-+ unsigned long : 2;
-+ unsigned long sc_bottom : 14;
-+ unsigned long : 2;
-+ } sc_bottom_right_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ sc_bottom_right_t f;
-+} sc_bottom_right_u;
-+
-+typedef struct _src_sc_bottom_right_t {
-+ unsigned long sc_right : 14;
-+ unsigned long : 2;
-+ unsigned long sc_bottom : 14;
-+ unsigned long : 2;
-+ } src_sc_bottom_right_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ src_sc_bottom_right_t f;
-+} src_sc_bottom_right_u;
-+
-+typedef struct _global_alpha_t {
-+ unsigned long alpha_r : 8;
-+ unsigned long alpha_g : 8;
-+ unsigned long alpha_b : 8;
-+ unsigned long alpha_a : 8;
-+ } global_alpha_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ global_alpha_t f;
-+} global_alpha_u;
-+
-+typedef struct _filter_coef_t {
-+ unsigned long c_4 : 4;
-+ unsigned long c_3 : 4;
-+ unsigned long c_2 : 4;
-+ unsigned long c_1 : 4;
-+ unsigned long c1 : 4;
-+ unsigned long c2 : 4;
-+ unsigned long c3 : 4;
-+ unsigned long c4 : 4;
-+ } filter_coef_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ filter_coef_t f;
-+} filter_coef_u;
-+
-+typedef struct _mvc_cntl_start_t {
-+ unsigned long mc_cntl_src_1_index : 4;
-+ unsigned long mc_cntl_dst_offset : 20;
-+ unsigned long mc_dst_pitch_mul : 2;
-+ unsigned long mc_cntl_src_2_index : 3;
-+ unsigned long mc_cntl_width_height_sel : 3;
-+ } mvc_cntl_start_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mvc_cntl_start_t f;
-+} mvc_cntl_start_u;
-+
-+typedef struct _e2_arithmetic_cntl_t {
-+ unsigned long opcode : 5;
-+ unsigned long shiftright : 4;
-+ unsigned long clamp : 1;
-+ unsigned long rounding : 2;
-+ unsigned long filter_n : 3;
-+ unsigned long : 1;
-+ unsigned long srcblend_inv : 1;
-+ unsigned long srcblend : 4;
-+ unsigned long : 3;
-+ unsigned long dstblend_inv : 1;
-+ unsigned long dstblend : 4;
-+ unsigned long dst_signed : 1;
-+ unsigned long autoinc : 1;
-+ unsigned long : 1;
-+ } e2_arithmetic_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ e2_arithmetic_cntl_t f;
-+} e2_arithmetic_cntl_u;
-+
-+typedef struct _debug0_t {
-+ unsigned long debug0_r : 8;
-+ unsigned long : 8;
-+ unsigned long debug0_rw : 8;
-+ unsigned long : 8;
-+ } debug0_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug0_t f;
-+} debug0_u;
-+
-+typedef struct _debug1_t {
-+ unsigned long debug1_r : 8;
-+ unsigned long : 8;
-+ unsigned long debug1_rw : 8;
-+ unsigned long : 8;
-+ } debug1_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug1_t f;
-+} debug1_u;
-+
-+typedef struct _debug2_t {
-+ unsigned long debug2_r : 8;
-+ unsigned long : 8;
-+ unsigned long debug2_rw : 8;
-+ unsigned long : 8;
-+ } debug2_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug2_t f;
-+} debug2_u;
-+
-+typedef struct _debug3_t {
-+ unsigned long : 32;
-+ } debug3_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug3_t f;
-+} debug3_u;
-+
-+typedef struct _debug4_t {
-+ unsigned long : 32;
-+ } debug4_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug4_t f;
-+} debug4_u;
-+
-+typedef struct _debug5_t {
-+ unsigned long : 32;
-+ } debug5_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug5_t f;
-+} debug5_u;
-+
-+typedef struct _debug6_t {
-+ unsigned long : 32;
-+ } debug6_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug6_t f;
-+} debug6_u;
-+
-+typedef struct _debug7_t {
-+ unsigned long : 32;
-+ } debug7_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug7_t f;
-+} debug7_u;
-+
-+typedef struct _debug8_t {
-+ unsigned long : 32;
-+ } debug8_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug8_t f;
-+} debug8_u;
-+
-+typedef struct _debug9_t {
-+ unsigned long : 32;
-+ } debug9_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug9_t f;
-+} debug9_u;
-+
-+typedef struct _debug10_t {
-+ unsigned long : 32;
-+ } debug10_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug10_t f;
-+} debug10_u;
-+
-+typedef struct _debug11_t {
-+ unsigned long : 32;
-+ } debug11_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug11_t f;
-+} debug11_u;
-+
-+typedef struct _debug12_t {
-+ unsigned long : 32;
-+ } debug12_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug12_t f;
-+} debug12_u;
-+
-+typedef struct _debug13_t {
-+ unsigned long : 32;
-+ } debug13_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug13_t f;
-+} debug13_u;
-+
-+typedef struct _debug14_t {
-+ unsigned long : 32;
-+ } debug14_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug14_t f;
-+} debug14_u;
-+
-+typedef struct _debug15_t {
-+ unsigned long : 32;
-+ } debug15_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ debug15_t f;
-+} debug15_u;
-+
-+typedef struct _eng_cntl_t {
-+ unsigned long erc_reg_rd_ws : 1;
-+ unsigned long erc_reg_wr_ws : 1;
-+ unsigned long erc_idle_reg_wr : 1;
-+ unsigned long dis_engine_triggers : 1;
-+ unsigned long dis_rop_src_uses_dst_w_h : 1;
-+ unsigned long dis_src_uses_dst_dirmaj : 1;
-+ unsigned long : 6;
-+ unsigned long force_3dclk_when_2dclk : 1;
-+ unsigned long : 19;
-+ } eng_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ eng_cntl_t f;
-+} eng_cntl_u;
-+
-+typedef struct _eng_perf_cnt_t {
-+ unsigned long perf_cnt : 20;
-+ unsigned long perf_sel : 4;
-+ unsigned long perf_en : 1;
-+ unsigned long : 3;
-+ unsigned long perf_clr : 1;
-+ unsigned long : 3;
-+ } eng_perf_cnt_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ eng_perf_cnt_t f;
-+} eng_perf_cnt_u;
-+
-+typedef struct _idct_runs_t {
-+ unsigned long idct_runs_3 : 8;
-+ unsigned long idct_runs_2 : 8;
-+ unsigned long idct_runs_1 : 8;
-+ unsigned long idct_runs_0 : 8;
-+ } idct_runs_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ idct_runs_t f;
-+} idct_runs_u;
-+
-+typedef struct _idct_levels_t {
-+ unsigned long idct_level_hi : 16;
-+ unsigned long idct_level_lo : 16;
-+ } idct_levels_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ idct_levels_t f;
-+} idct_levels_u;
-+
-+typedef struct _idct_control_t {
-+ unsigned long idct_ctl_luma_rd_format : 2;
-+ unsigned long idct_ctl_chroma_rd_format : 2;
-+ unsigned long idct_ctl_scan_pattern : 1;
-+ unsigned long idct_ctl_intra : 1;
-+ unsigned long idct_ctl_flush : 1;
-+ unsigned long idct_ctl_passthru : 1;
-+ unsigned long idct_ctl_sw_reset : 1;
-+ unsigned long idct_ctl_constreq : 1;
-+ unsigned long idct_ctl_scramble : 1;
-+ unsigned long idct_ctl_alt_scan : 1;
-+ unsigned long : 20;
-+ } idct_control_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ idct_control_t f;
-+} idct_control_u;
-+
-+typedef struct _idct_auth_control_t {
-+ unsigned long control_bits : 32;
-+ } idct_auth_control_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ idct_auth_control_t f;
-+} idct_auth_control_u;
-+
-+typedef struct _idct_auth_t {
-+ unsigned long auth : 32;
-+ } idct_auth_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ idct_auth_t f;
-+} idct_auth_u;
-+
-+typedef struct _mem_cntl_t {
-+ unsigned long : 1;
-+ unsigned long en_mem_ch1 : 1;
-+ unsigned long en_mem_ch2 : 1;
-+ unsigned long int_mem_mapping : 1;
-+ unsigned long : 28;
-+ } mem_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mem_cntl_t f;
-+} mem_cntl_u;
-+
-+typedef struct _mem_arb_t {
-+ unsigned long disp_time_slot : 4;
-+ unsigned long disp_timer : 4;
-+ unsigned long arb_option : 1;
-+ unsigned long : 23;
-+ } mem_arb_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mem_arb_t f;
-+} mem_arb_u;
-+
-+typedef struct _mc_fb_location_t {
-+ unsigned long mc_fb_start : 16;
-+ unsigned long mc_fb_top : 16;
-+ } mc_fb_location_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mc_fb_location_t f;
-+} mc_fb_location_u;
-+
-+typedef struct _mem_ext_cntl_t {
-+ unsigned long mem_ext_enable : 1;
-+ unsigned long mem_ap_enable : 1;
-+ unsigned long mem_addr_mapping : 2;
-+ unsigned long mem_wdoe_cntl : 2;
-+ unsigned long mem_wdoe_extend : 1;
-+ unsigned long : 1;
-+ unsigned long mem_page_timer : 8;
-+ unsigned long mem_dynamic_cke : 1;
-+ unsigned long mem_sdram_tri_en : 1;
-+ unsigned long mem_self_refresh_en : 1;
-+ unsigned long mem_power_down : 1;
-+ unsigned long mem_hw_power_down_en : 1;
-+ unsigned long mem_power_down_stat : 1;
-+ unsigned long : 3;
-+ unsigned long mem_pd_mck : 1;
-+ unsigned long mem_pd_ma : 1;
-+ unsigned long mem_pd_mdq : 1;
-+ unsigned long mem_tristate_mck : 1;
-+ unsigned long mem_tristate_ma : 1;
-+ unsigned long mem_tristate_mcke : 1;
-+ unsigned long mem_invert_mck : 1;
-+ } mem_ext_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mem_ext_cntl_t f;
-+} mem_ext_cntl_u;
-+
-+typedef struct _mc_ext_mem_location_t {
-+ unsigned long mc_ext_mem_start : 16;
-+ unsigned long mc_ext_mem_top : 16;
-+ } mc_ext_mem_location_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mc_ext_mem_location_t f;
-+} mc_ext_mem_location_u;
-+
-+typedef struct _mem_ext_timing_cntl_t {
-+ unsigned long mem_trp : 2;
-+ unsigned long mem_trcd : 2;
-+ unsigned long mem_tras : 3;
-+ unsigned long : 1;
-+ unsigned long mem_trrd : 2;
-+ unsigned long mem_tr2w : 2;
-+ unsigned long mem_twr : 2;
-+ unsigned long : 4;
-+ unsigned long mem_twr_mode : 1;
-+ unsigned long : 1;
-+ unsigned long mem_refresh_dis : 1;
-+ unsigned long : 3;
-+ unsigned long mem_refresh_rate : 8;
-+ } mem_ext_timing_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mem_ext_timing_cntl_t f;
-+} mem_ext_timing_cntl_u;
-+
-+typedef struct _mem_sdram_mode_reg_t {
-+ unsigned long mem_mode_reg : 14;
-+ unsigned long : 2;
-+ unsigned long mem_read_latency : 2;
-+ unsigned long mem_schmen_latency : 2;
-+ unsigned long mem_cas_latency : 2;
-+ unsigned long mem_schmen_extend : 1;
-+ unsigned long : 8;
-+ unsigned long mem_sdram_reset : 1;
-+ } mem_sdram_mode_reg_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mem_sdram_mode_reg_t f;
-+} mem_sdram_mode_reg_u;
-+
-+typedef struct _mem_io_cntl_t {
-+ unsigned long mem_sn_mck : 4;
-+ unsigned long mem_sn_ma : 4;
-+ unsigned long mem_sn_mdq : 4;
-+ unsigned long mem_srn_mck : 1;
-+ unsigned long mem_srn_ma : 1;
-+ unsigned long mem_srn_mdq : 1;
-+ unsigned long : 1;
-+ unsigned long mem_sp_mck : 4;
-+ unsigned long mem_sp_ma : 4;
-+ unsigned long mem_sp_mdq : 4;
-+ unsigned long mem_srp_mck : 1;
-+ unsigned long mem_srp_ma : 1;
-+ unsigned long mem_srp_mdq : 1;
-+ unsigned long : 1;
-+ } mem_io_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mem_io_cntl_t f;
-+} mem_io_cntl_u;
-+
-+typedef struct _mc_debug_t {
-+ unsigned long mc_debug : 32;
-+ } mc_debug_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mc_debug_t f;
-+} mc_debug_u;
-+
-+typedef struct _mc_bist_ctrl_t {
-+ unsigned long mc_bist_ctrl : 32;
-+ } mc_bist_ctrl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mc_bist_ctrl_t f;
-+} mc_bist_ctrl_u;
-+
-+typedef struct _mc_bist_collar_read_t {
-+ unsigned long mc_bist_collar_read : 32;
-+ } mc_bist_collar_read_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mc_bist_collar_read_t f;
-+} mc_bist_collar_read_u;
-+
-+typedef struct _tc_mismatch_t {
-+ unsigned long tc_mismatch : 24;
-+ unsigned long : 8;
-+ } tc_mismatch_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ tc_mismatch_t f;
-+} tc_mismatch_u;
-+
-+typedef struct _mc_perf_mon_cntl_t {
-+ unsigned long clr_perf : 1;
-+ unsigned long en_perf : 1;
-+ unsigned long : 2;
-+ unsigned long perf_op_a : 2;
-+ unsigned long perf_op_b : 2;
-+ unsigned long : 8;
-+ unsigned long monitor_period : 8;
-+ unsigned long perf_count_a_overflow : 1;
-+ unsigned long perf_count_b_overflow : 1;
-+ unsigned long : 6;
-+ } mc_perf_mon_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mc_perf_mon_cntl_t f;
-+} mc_perf_mon_cntl_u;
-+
-+typedef struct _mc_perf_counters_t {
-+ unsigned long mc_perf_counter_a : 16;
-+ unsigned long mc_perf_counter_b : 16;
-+ } mc_perf_counters_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ mc_perf_counters_t f;
-+} mc_perf_counters_u;
-+
-+typedef struct _wait_until_t {
-+ unsigned long wait_crtc_pflip : 1;
-+ unsigned long wait_re_crtc_vline : 1;
-+ unsigned long wait_fe_crtc_vline : 1;
-+ unsigned long wait_crtc_vline : 1;
-+ unsigned long wait_dma_viph0_idle : 1;
-+ unsigned long wait_dma_viph1_idle : 1;
-+ unsigned long wait_dma_viph2_idle : 1;
-+ unsigned long wait_dma_viph3_idle : 1;
-+ unsigned long wait_dma_vid_idle : 1;
-+ unsigned long wait_dma_gui_idle : 1;
-+ unsigned long wait_cmdfifo : 1;
-+ unsigned long wait_ov0_flip : 1;
-+ unsigned long wait_ov0_slicedone : 1;
-+ unsigned long : 1;
-+ unsigned long wait_2d_idle : 1;
-+ unsigned long wait_3d_idle : 1;
-+ unsigned long wait_2d_idleclean : 1;
-+ unsigned long wait_3d_idleclean : 1;
-+ unsigned long wait_host_idleclean : 1;
-+ unsigned long wait_extern_sig : 1;
-+ unsigned long cmdfifo_entries : 7;
-+ unsigned long : 3;
-+ unsigned long wait_both_crtc_pflip : 1;
-+ unsigned long eng_display_select : 1;
-+ } wait_until_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ wait_until_t f;
-+} wait_until_u;
-+
-+typedef struct _isync_cntl_t {
-+ unsigned long isync_any2d_idle3d : 1;
-+ unsigned long isync_any3d_idle2d : 1;
-+ unsigned long isync_trig2d_idle3d : 1;
-+ unsigned long isync_trig3d_idle2d : 1;
-+ unsigned long isync_wait_idlegui : 1;
-+ unsigned long isync_cpscratch_idlegui : 1;
-+ unsigned long : 26;
-+ } isync_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ isync_cntl_t f;
-+} isync_cntl_u;
-+
-+typedef struct _rbbm_guicntl_t {
-+ unsigned long host_data_swap : 2;
-+ unsigned long : 30;
-+ } rbbm_guicntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ rbbm_guicntl_t f;
-+} rbbm_guicntl_u;
-+
-+typedef struct _rbbm_status_t {
-+ unsigned long cmdfifo_avail : 7;
-+ unsigned long : 1;
-+ unsigned long hirq_on_rbb : 1;
-+ unsigned long cprq_on_rbb : 1;
-+ unsigned long cfrq_on_rbb : 1;
-+ unsigned long hirq_in_rtbuf : 1;
-+ unsigned long cprq_in_rtbuf : 1;
-+ unsigned long cfrq_in_rtbuf : 1;
-+ unsigned long cf_pipe_busy : 1;
-+ unsigned long eng_ev_busy : 1;
-+ unsigned long cp_cmdstrm_busy : 1;
-+ unsigned long e2_busy : 1;
-+ unsigned long rb2d_busy : 1;
-+ unsigned long rb3d_busy : 1;
-+ unsigned long se_busy : 1;
-+ unsigned long re_busy : 1;
-+ unsigned long tam_busy : 1;
-+ unsigned long tdm_busy : 1;
-+ unsigned long pb_busy : 1;
-+ unsigned long : 6;
-+ unsigned long gui_active : 1;
-+ } rbbm_status_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ rbbm_status_t f;
-+} rbbm_status_u;
-+
-+typedef struct _rbbm_cntl_t {
-+ unsigned long rb_settle : 4;
-+ unsigned long abortclks_hi : 3;
-+ unsigned long : 1;
-+ unsigned long abortclks_cp : 3;
-+ unsigned long : 1;
-+ unsigned long abortclks_cfifo : 3;
-+ unsigned long : 2;
-+ unsigned long cpq_data_swap : 1;
-+ unsigned long : 3;
-+ unsigned long no_abort_idct : 1;
-+ unsigned long no_abort_bios : 1;
-+ unsigned long no_abort_fb : 1;
-+ unsigned long no_abort_cp : 1;
-+ unsigned long no_abort_hi : 1;
-+ unsigned long no_abort_hdp : 1;
-+ unsigned long no_abort_mc : 1;
-+ unsigned long no_abort_aic : 1;
-+ unsigned long no_abort_vip : 1;
-+ unsigned long no_abort_disp : 1;
-+ unsigned long no_abort_cg : 1;
-+ } rbbm_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ rbbm_cntl_t f;
-+} rbbm_cntl_u;
-+
-+typedef struct _rbbm_soft_reset_t {
-+ unsigned long soft_reset_cp : 1;
-+ unsigned long soft_reset_hi : 1;
-+ unsigned long reserved3 : 3;
-+ unsigned long soft_reset_e2 : 1;
-+ unsigned long reserved2 : 2;
-+ unsigned long soft_reset_mc : 1;
-+ unsigned long reserved1 : 2;
-+ unsigned long soft_reset_disp : 1;
-+ unsigned long soft_reset_cg : 1;
-+ unsigned long : 19;
-+ } rbbm_soft_reset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ rbbm_soft_reset_t f;
-+} rbbm_soft_reset_u;
-+
-+typedef struct _nqwait_until_t {
-+ unsigned long wait_gui_idle : 1;
-+ unsigned long : 31;
-+ } nqwait_until_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ nqwait_until_t f;
-+} nqwait_until_u;
-+
-+typedef struct _rbbm_debug_t {
-+ unsigned long rbbm_debug : 32;
-+ } rbbm_debug_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ rbbm_debug_t f;
-+} rbbm_debug_u;
-+
-+typedef struct _rbbm_cmdfifo_addr_t {
-+ unsigned long cmdfifo_addr : 6;
-+ unsigned long : 26;
-+ } rbbm_cmdfifo_addr_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ rbbm_cmdfifo_addr_t f;
-+} rbbm_cmdfifo_addr_u;
-+
-+typedef struct _rbbm_cmdfifo_datal_t {
-+ unsigned long cmdfifo_datal : 32;
-+ } rbbm_cmdfifo_datal_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ rbbm_cmdfifo_datal_t f;
-+} rbbm_cmdfifo_datal_u;
-+
-+typedef struct _rbbm_cmdfifo_datah_t {
-+ unsigned long cmdfifo_datah : 12;
-+ unsigned long : 20;
-+ } rbbm_cmdfifo_datah_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ rbbm_cmdfifo_datah_t f;
-+} rbbm_cmdfifo_datah_u;
-+
-+typedef struct _rbbm_cmdfifo_stat_t {
-+ unsigned long cmdfifo_rptr : 6;
-+ unsigned long : 2;
-+ unsigned long cmdfifo_wptr : 6;
-+ unsigned long : 18;
-+ } rbbm_cmdfifo_stat_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ rbbm_cmdfifo_stat_t f;
-+} rbbm_cmdfifo_stat_u;
-+
-+typedef struct _clk_pin_cntl_t {
-+ unsigned long osc_en : 1;
-+ unsigned long osc_gain : 5;
-+ unsigned long dont_use_xtalin : 1;
-+ unsigned long xtalin_pm_en : 1;
-+ unsigned long xtalin_dbl_en : 1;
-+ unsigned long : 7;
-+ unsigned long cg_debug : 16;
-+ } clk_pin_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ clk_pin_cntl_t f;
-+} clk_pin_cntl_u;
-+
-+typedef struct _pll_ref_fb_div_t {
-+ unsigned long pll_ref_div : 4;
-+ unsigned long : 4;
-+ unsigned long pll_fb_div_int : 6;
-+ unsigned long : 2;
-+ unsigned long pll_fb_div_frac : 3;
-+ unsigned long : 1;
-+ unsigned long pll_reset_time : 4;
-+ unsigned long pll_lock_time : 8;
-+ } pll_ref_fb_div_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ pll_ref_fb_div_t f;
-+} pll_ref_fb_div_u;
-+
-+typedef struct _pll_cntl_t {
-+ unsigned long pll_pwdn : 1;
-+ unsigned long pll_reset : 1;
-+ unsigned long pll_pm_en : 1;
-+ unsigned long pll_mode : 1;
-+ unsigned long pll_refclk_sel : 1;
-+ unsigned long pll_fbclk_sel : 1;
-+ unsigned long pll_tcpoff : 1;
-+ unsigned long pll_pcp : 3;
-+ unsigned long pll_pvg : 3;
-+ unsigned long pll_vcofr : 1;
-+ unsigned long pll_ioffset : 2;
-+ unsigned long pll_pecc_mode : 2;
-+ unsigned long pll_pecc_scon : 2;
-+ unsigned long pll_dactal : 4;
-+ unsigned long pll_cp_clip : 2;
-+ unsigned long pll_conf : 3;
-+ unsigned long pll_mbctrl : 2;
-+ unsigned long pll_ring_off : 1;
-+ } pll_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ pll_cntl_t f;
-+} pll_cntl_u;
-+
-+typedef struct _sclk_cntl_t {
-+ unsigned long sclk_src_sel : 2;
-+ unsigned long : 2;
-+ unsigned long sclk_post_div_fast : 4;
-+ unsigned long sclk_clkon_hys : 3;
-+ unsigned long sclk_post_div_slow : 4;
-+ unsigned long disp_cg_ok2switch_en : 1;
-+ unsigned long sclk_force_reg : 1;
-+ unsigned long sclk_force_disp : 1;
-+ unsigned long sclk_force_mc : 1;
-+ unsigned long sclk_force_extmc : 1;
-+ unsigned long sclk_force_cp : 1;
-+ unsigned long sclk_force_e2 : 1;
-+ unsigned long sclk_force_e3 : 1;
-+ unsigned long sclk_force_idct : 1;
-+ unsigned long sclk_force_bist : 1;
-+ unsigned long busy_extend_cp : 1;
-+ unsigned long busy_extend_e2 : 1;
-+ unsigned long busy_extend_e3 : 1;
-+ unsigned long busy_extend_idct : 1;
-+ unsigned long : 3;
-+ } sclk_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ sclk_cntl_t f;
-+} sclk_cntl_u;
-+
-+typedef struct _pclk_cntl_t {
-+ unsigned long pclk_src_sel : 2;
-+ unsigned long : 2;
-+ unsigned long pclk_post_div : 4;
-+ unsigned long : 8;
-+ unsigned long pclk_force_disp : 1;
-+ unsigned long : 15;
-+ } pclk_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ pclk_cntl_t f;
-+} pclk_cntl_u;
-+
-+typedef struct _clk_test_cntl_t {
-+ unsigned long testclk_sel : 4;
-+ unsigned long : 3;
-+ unsigned long start_check_freq : 1;
-+ unsigned long tstcount_rst : 1;
-+ unsigned long : 15;
-+ unsigned long test_count : 8;
-+ } clk_test_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ clk_test_cntl_t f;
-+} clk_test_cntl_u;
-+
-+typedef struct _pwrmgt_cntl_t {
-+ unsigned long pwm_enable : 1;
-+ unsigned long : 1;
-+ unsigned long pwm_mode_req : 2;
-+ unsigned long pwm_wakeup_cond : 2;
-+ unsigned long pwm_fast_noml_hw_en : 1;
-+ unsigned long pwm_noml_fast_hw_en : 1;
-+ unsigned long pwm_fast_noml_cond : 4;
-+ unsigned long pwm_noml_fast_cond : 4;
-+ unsigned long pwm_idle_timer : 8;
-+ unsigned long pwm_busy_timer : 8;
-+ } pwrmgt_cntl_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ pwrmgt_cntl_t f;
-+} pwrmgt_cntl_u;
-+
-+typedef struct _pwrmgt_status_t {
-+ unsigned long pwm_mode : 2;
-+ unsigned long : 30;
-+ } pwrmgt_status_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ pwrmgt_status_t f;
-+} pwrmgt_status_u;
-+
-+typedef struct _cursor_offset_t {
-+ unsigned long cur_offset : 24;
-+ unsigned long cur_x_offset : 4;
-+ unsigned long cur_y_offset : 4;
-+} cursor_offset_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor_offset_t f;
-+} cursor_offset_u;
-+
-+typedef struct _cursor_h_pos_t {
-+ unsigned long cur_h_start : 10;
-+ unsigned long : 6;
-+ unsigned long cur_h_end : 10;
-+ unsigned long : 5;
-+ unsigned long cur_en : 1;
-+} cursor_h_pos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor_h_pos_t f;
-+} cursor_h_pos_u;
-+
-+typedef struct _cursor_v_pos_t {
-+ unsigned long cur_v_start : 10;
-+ unsigned long : 6;
-+ unsigned long cur_v_end : 10;
-+ unsigned long : 6;
-+} cursor_v_pos_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor_v_pos_t f;
-+} cursor_v_pos_u;
-+
-+typedef struct _cursor_color_t {
-+ unsigned long cur_color_r : 8;
-+ unsigned long cur_color_g : 8;
-+ unsigned long cur_color_b : 8;
-+ unsigned long : 8;
-+} cursor_color_t;
-+
-+typedef union {
-+ unsigned long val : 32;
-+ cursor_color_t f;
-+} cursor_color_u;
-+
-+#endif
-Index: xorg-server-1.2.0/hw/kdrive/imageon/imageon_stub.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/imageon_stub.c 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,95 @@
-+/*
-+ * Copyright © 2007 Manuel Teira
-+ *
-+ * 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 Manuel Teira not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Manuel Teira makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MANUEL TEIRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL MANUEL TEIRA 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 "imageon.h"
-+#include "imageon_regs.h"
-+#include "klinux.h"
-+
-+extern W100CardEntry w100_cards[];
-+
-+static Bool
-+FindW100(CARD16 vendor, CARD16 device, KdCardAttr * attr)
-+{
-+ CARD8 *mmio;
-+ CARD32 chip_id;
-+ Bool found = FALSE;
-+
-+ mmio = KdMapDevice(W100_REG_BASE, W100_REG_SIZE);
-+ KdSetMappedMode((CARD32) mmio, W100_REG_SIZE,
-+ KD_MAPPED_MODE_REGISTERS);
-+
-+ chip_id = (*(VOL32 *)(mmio + mmCHIP_ID));
-+ if ((vendor | (device << 16)) == chip_id) {
-+ ErrorF("(I) Found W100 Chip ID: %08x\n\n", chip_id);
-+ attr->deviceID = device;
-+ attr->vendorID = vendor;
-+ found = TRUE;
-+ }
-+ KdUnmapDevice(mmio, W100_REG_SIZE);
-+ return found;
-+}
-+
-+
-+void
-+InitCard(char *name)
-+{
-+ int i;
-+ W100CardEntry *entry;
-+ KdCardAttr attr;
-+
-+ for (entry = w100_cards; entry->name; entry++) {
-+ if (FindW100(entry->vendor, entry->device, &attr)) {
-+ KdCardInfoAdd(&W100Funcs, &attr, 0);
-+ break;
-+ }
-+ }
-+}
-+
-+void
-+InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv)
-+{
-+ KdInitOutput(pScreenInfo, argc, argv);
-+}
-+
-+void
-+InitInput(int argc, char **argv)
-+{
-+ KdInitInput(&LinuxMouseFuncs, &LinuxKeyboardFuncs);
-+#ifdef TOUCHSCREEN
-+ KdAddMouseDriver(&TsFuncs);
-+#endif
-+}
-+
-+void
-+ddxUseMsg(void)
-+{
-+ KdUseMsg();
-+}
-+
-+int
-+ddxProcessArgument(int argc, char **argv, int i)
-+{
-+ return KdProcessArgument(argc, argv, i);
-+}
-Index: xorg-server-1.2.0/hw/kdrive/imageon/imageon_support.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/imageon_support.c 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,1474 @@
-+/*
-+ * Copyright © 2007 Manuel Teira
-+ *
-+ * 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 Manuel Teira not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Manuel Teira makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MANUEL TEIRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL MANUEL TEIRA 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 <sys/time.h>
-+
-+#include "imageon.h"
-+#include "imageon_regs.h"
-+#include "imageon_const.h"
-+
-+CARD8 W100SolidRop[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 */
-+};
-+
-+CARD8 W100BltRop[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 */
-+};
-+
-+extern W100ModeSpec w100_modes[];
-+extern W100StartupInfo w100StartupInfo;
-+
-+void W100DisableDisplayUpdate(W100CardInfo *w100c)
-+{
-+ disp_db_buf_cntl_wr_u disp_db_buf_cntl;
-+
-+ disp_db_buf_cntl.f.db_buf_cntl = 30;
-+ disp_db_buf_cntl.f.en_db_buf = 0;
-+ disp_db_buf_cntl.f.update_db_buf = 0;
-+ MMIO_OUT32(mmDISP_DB_BUF_CNTL, disp_db_buf_cntl.val);
-+}
-+
-+void W100EnableDisplayUpdate(W100CardInfo *w100c)
-+{
-+ disp_db_buf_cntl_wr_u disp_db_buf_cntl;
-+
-+ disp_db_buf_cntl.f.db_buf_cntl = 30;
-+ disp_db_buf_cntl.f.en_db_buf = 1;
-+ disp_db_buf_cntl.f.update_db_buf = 1;
-+ MMIO_OUT32(mmDISP_DB_BUF_CNTL, disp_db_buf_cntl.val);
-+}
-+
-+void W100SetupGraphicEngine(W100CardInfo *w100c)
-+{
-+ eng_cntl_u eng_cntl;
-+ sc_bottom_right_u bottomright;
-+ rbbm_cntl_u rbbm_cntl;
-+ dst_pitch_u dpitch;
-+ dst_offset_u doffset;
-+ src_pitch_u spitch;
-+ src_offset_u soffset;
-+ sc_top_left_u tl;
-+ sc_bottom_right_u br;
-+ src_sc_bottom_right_u srcbr;
-+ dp_gui_master_cntl_u gmc;
-+ dp_mix_u dp_mix;
-+ dp_cntl_u dp_cntl;
-+ dp_datatype_u dp_datatype;
-+
-+ DBG_IMAGEON(("W100SetupGraphicEngine(offset:%p, pitch:%d)\n",
-+ w100c->hw_window.offset,
-+ w100c->hw_window.width));
-+
-+ eng_cntl.val = MMIO_IN32(mmENG_CNTL);
-+ eng_cntl.f.erc_reg_wr_ws = 0;
-+ MMIO_OUT32(mmENG_CNTL, eng_cntl.val);
-+
-+ rbbm_cntl.val = 0;
-+ rbbm_cntl.f.abortclks_hi = 4;
-+ rbbm_cntl.f.abortclks_cp = 4;
-+ rbbm_cntl.f.abortclks_cfifo = 2;
-+ MMIO_OUT32(mmRBBM_CNTL, rbbm_cntl.val);
-+
-+ bottomright.val = 0;
-+ bottomright.f.sc_bottom = 0x1fff;
-+ bottomright.f.sc_right = 0x1fff;
-+ MMIO_OUT32(mmDEFAULT_SC_BOTTOM_RIGHT, bottomright.val);
-+
-+ dpitch.val = 0;
-+ dpitch.f.dst_pitch = w100c->hw_window.width;
-+ MMIO_OUT32(mmDST_PITCH, dpitch.val);
-+
-+ doffset.val = 0;
-+ doffset.f.dst_offset = (CARD32) w100c->hw_window.offset;
-+ MMIO_OUT32(mmDST_OFFSET, doffset.val);
-+
-+ spitch.val = 0;
-+ spitch.f.src_pitch = w100c->hw_window.width;
-+ MMIO_OUT32(mmSRC_PITCH, spitch.val);
-+ soffset.val = 0;
-+ soffset.f.src_offset = (CARD32) w100c->hw_window.offset;
-+ MMIO_OUT32(mmSRC_OFFSET, soffset.val);
-+
-+ tl.f.sc_left = tl.f.sc_top = 0;
-+ br.f.sc_right = br.f.sc_bottom = 0x1fff;
-+ MMIO_OUT32(mmSC_TOP_LEFT, tl.val);
-+ MMIO_OUT32(mmSC_BOTTOM_RIGHT, br.val);
-+
-+ srcbr.f.sc_right = srcbr.f.sc_bottom = 0x1fff;
-+ MMIO_OUT32(mmSRC_SC_BOTTOM_RIGHT, br.val);
-+
-+ gmc.val = dp_datatype.val = dp_mix.val = dp_cntl.val = 0;
-+
-+ dp_cntl.f.dst_x_dir = 1;
-+ dp_cntl.f.dst_y_dir = 1;
-+ dp_cntl.f.src_x_dir = 1;
-+ dp_cntl.f.src_y_dir = 1;
-+ dp_cntl.f.dst_major_x = 1;
-+ dp_cntl.f.src_major_x = 1;
-+ MMIO_OUT32(mmDP_CNTL, dp_cntl.val);
-+
-+ gmc.f.gmc_src_pitch_offset_cntl = 1;
-+ gmc.f.gmc_dst_pitch_offset_cntl = 1;
-+ gmc.f.gmc_src_clipping = 1;
-+ gmc.f.gmc_dst_clipping = 1;
-+ gmc.f.gmc_brush_datatype = DP_BRUSH_SOLIDCOLOR;
-+ gmc.f.gmc_dst_datatype = DP_DST_16BPP_1555;
-+ gmc.f.gmc_src_datatype = DP_SRC_SOLID_COLOR_BLT;
-+ gmc.f.gmc_byte_pix_order = DP_PIX_ORDER_LSB2MSB;
-+ gmc.f.gmc_default_sel = 0;
-+ gmc.f.gmc_rop3 = W100SolidRop[GXcopy];
-+ gmc.f.gmc_dp_src_source = DP_SRC_MEM_RECTANGULAR;
-+ gmc.f.gmc_clr_cmp_fcn_dis = 1;
-+ gmc.f.gmc_wr_msk_dis = 1;
-+ gmc.f.gmc_dp_op = DP_OP_ROP;
-+ MMIO_OUT32(mmDP_GUI_MASTER_CNTL, gmc.val);
-+
-+ dp_datatype.f.dp_dst_datatype = gmc.f.gmc_dst_datatype;
-+ dp_datatype.f.dp_brush_datatype = gmc.f.gmc_brush_datatype;
-+ dp_datatype.f.dp_src2_type = 0;
-+ dp_datatype.f.dp_src2_datatype = gmc.f.gmc_src_datatype;
-+ dp_datatype.f.dp_src_datatype = gmc.f.gmc_src_datatype;
-+ dp_datatype.f.dp_byte_pix_order = gmc.f.gmc_byte_pix_order;
-+ MMIO_OUT32(mmDP_DATATYPE, dp_datatype.val);
-+
-+ dp_mix.f.dp_src_source = gmc.f.gmc_dp_src_source;
-+ dp_mix.f.dp_src2_source = gmc.f.gmc_dp_src_source;
-+ dp_mix.f.dp_rop3 = gmc.f.gmc_rop3;
-+ dp_mix.f.dp_op = gmc.f.gmc_dp_op;
-+ MMIO_OUT32(mmDP_MIX, dp_mix.val);
-+}
-+
-+void W100ResetGraphicEngine(W100CardInfo *w100c)
-+{
-+ rbbm_soft_reset_u sreset;
-+ sclk_cntl_u sclk_cntl;
-+ CARD32 restore_sclk;
-+
-+ ErrorF("->W100ResetGraphicEngine\n");
-+ sclk_cntl.val = restore_sclk = MMIO_IN32(mmSCLK_CNTL);
-+
-+ sclk_cntl.f.sclk_force_e2 = 1;
-+ sclk_cntl.f.sclk_force_e3 = 1;
-+ sclk_cntl.f.sclk_force_idct = 1;
-+ MMIO_OUT32(mmSCLK_CNTL, sclk_cntl.val);
-+
-+ sreset.val = 0;
-+ sreset.f.soft_reset_e2 = 1;
-+ MMIO_OUT32(mmRBBM_SOFT_RESET, sreset.val);
-+ sreset.f.soft_reset_e2 = 0;
-+ MMIO_OUT32(mmRBBM_SOFT_RESET, 0);
-+
-+ MMIO_OUT32(mmSCLK_CNTL, restore_sclk);
-+ ErrorF("<-W100ResetGraphicEngine\n");
-+}
-+
-+W100ModeSpec *W100GetModeSpec(W100CardInfo *w100c, W100Mode *mode)
-+{
-+ W100ModeSpec *modes;
-+ for (modes = w100_modes; modes->width; modes++) {
-+ if ((modes->bpp == mode->bpp) &&
-+ (((modes->width == mode->width) &&
-+ (modes->height == mode->height)) ||
-+ ((modes->width == mode->height) &&
-+ (modes->height == mode->width)))) {
-+ return modes;
-+ }
-+ }
-+ ErrorF("No matching mode spec for %dx%d@%d\n",
-+ mode->width, mode->height, mode->bpp);
-+ return NULL;
-+}
-+
-+W100ModeSpec *W100GetBestMode(W100CardInfo *w100c, int width, int height)
-+{
-+ unsigned int best_x = 0xffffffff;
-+ unsigned int best_y = 0xffffffff;
-+ W100ModeSpec *modes, *best_mode = NULL;
-+ for (modes = w100_modes; modes->width; modes++) {
-+ if (modes->supported) {
-+ if (((modes->width >= width) && (modes->width < best_x)) &&
-+ ((modes->height >= height) && (modes->height < best_y))) {
-+ best_mode = modes;
-+ best_x = modes->width;
-+ best_y = modes->height;
-+ } else if (((modes->width >= height) && (modes->width < best_y)) &&
-+ ((modes->height >= width) && (modes->height < best_x))) {
-+ best_mode = modes;
-+ best_x = modes->height;
-+ best_y = modes->width;
-+ }
-+ }
-+ }
-+ if (!best_mode) {
-+ ErrorF("No matching mode spec for %dx%d\n", width, height);
-+ }
-+ return best_mode;
-+}
-+
-+Bool W100GetFbMode(W100CardInfo *w100c, W100Mode *mode)
-+{
-+ struct fb_var_screeninfo vinfo;
-+ int i;
-+
-+ if (ioctl(w100c->fbdev.fd, FBIOGET_VSCREENINFO, &vinfo) != 0) {
-+ ErrorF("Unable to get framebuffer mode\n");
-+ return FALSE;
-+ }
-+
-+ mode->width = vinfo.xres;
-+ mode->height = vinfo.yres;
-+ mode->bpp = vinfo.bits_per_pixel;
-+}
-+
-+Bool W100CheckFbMode(W100CardInfo *w100c, W100ModeSpec *modes)
-+{
-+ struct fb_var_screeninfo vinfo;
-+
-+ vinfo.xres = vinfo.xres_virtual = modes->width;
-+ vinfo.yres = vinfo.yres_virtual = modes->height;
-+ vinfo.bits_per_pixel = modes->bpp;
-+ vinfo.activate = FB_ACTIVATE_TEST;
-+
-+ if (ioctl(w100c->fbdev.fd, FBIOPUT_VSCREENINFO, &vinfo) != 0) {
-+ ErrorF("(W) Mode %dx%d@%d not supported\n",
-+ vinfo.xres,
-+ vinfo.yres,
-+ vinfo.bits_per_pixel);
-+ return FALSE;
-+ }
-+ DBG_IMAGEON(("(I) Mode %dx%d@%d supported\n",
-+ vinfo.xres,
-+ vinfo.yres,
-+ vinfo.bits_per_pixel));
-+ return TRUE;
-+}
-+
-+Bool W100SetFbMode(W100CardInfo *w100c)
-+{
-+ struct fb_var_screeninfo vinfo;
-+ int randr = KdSubRotation(w100c->hw_window.randr, w100StartupInfo.randr);
-+
-+ if (randr & (RR_Rotate_0 | RR_Rotate_180)) {
-+ vinfo.xres = vinfo.xres_virtual = w100c->hw_window.mode->width;
-+ vinfo.yres = vinfo.yres_virtual = w100c->hw_window.mode->height;
-+ } else {
-+ vinfo.xres = vinfo.xres_virtual = w100c->hw_window.mode->height;
-+ vinfo.yres = vinfo.yres_virtual = w100c->hw_window.mode->width;
-+ }
-+ vinfo.bits_per_pixel = w100c->hw_window.mode->bpp;
-+ vinfo.activate = FB_ACTIVATE_NOW;
-+ int flip = (w100c->hw_window.randr > RR_Rotate_90) ? 1 : 0;
-+
-+ DBG_IMAGEON(("Asking framebuffer for mode %dx%d@%d. Flipped:%d\n",
-+ vinfo.xres, vinfo.yres, vinfo.bits_per_pixel, flip));
-+ if (ioctl(w100c->fbdev.fd, FBIOPUT_VSCREENINFO, &vinfo) != 0) {
-+ ErrorF("Error setting mode %dx%d@%d\n",
-+ vinfo.xres,
-+ vinfo.yres,
-+ vinfo.bits_per_pixel);
-+ return FALSE;
-+ }
-+ W100SysFsSet(w100c, W100_SYSFS_BASE "flip", flip ? "1" : "0");
-+ return TRUE;
-+}
-+
-+void W100SetupGraphicWindow(W100CardInfo *w100c)
-+{
-+ DBG_IMAGEON(("W100SetupGraphicWindow(width:%d,height:%d,randr:%d)\n",
-+ w100c->hw_window.width,
-+ w100c->hw_window.height,
-+ w100c->hw_window.randr));
-+
-+ if (!W100SetFbMode(w100c)) {
-+ ErrorF("Error Setting Graphic Window\n");
-+ }
-+}
-+
-+void W100EnableGraphicWindow(W100CardInfo *w100c)
-+{
-+ graphic_ctrl_u gc;
-+
-+ gc.val = MMIO_IN32(mmGRAPHIC_CTRL);
-+ gc.f.en_graphic_crtc = 1;
-+ gc.f.en_graphic_req = 1;
-+ W100DisableDisplayUpdate(w100c);
-+ MMIO_OUT32(mmGRAPHIC_CTRL, gc.val);
-+ W100EnableDisplayUpdate(w100c);
-+}
-+
-+void W100DisableGraphicWindow(W100CardInfo *w100c)
-+{
-+ graphic_ctrl_u gc;
-+
-+ gc.val = MMIO_IN32(mmGRAPHIC_CTRL);
-+ gc.f.en_graphic_crtc = 0;
-+ gc.f.en_graphic_req = 0;
-+ W100DisableDisplayUpdate(w100c);
-+ MMIO_OUT32(mmGRAPHIC_CTRL, gc.val);
-+ W100EnableDisplayUpdate(w100c);
-+}
-+
-+inline Bool W100WaitCmdFifoEntries(W100CardInfo *w100c, int entries)
-+{
-+ rbbm_status_u rbbmStatus;
-+ TIMEOUT_LOCALS;
-+
-+ if (entries > W100_CMDFIFO_SIZE)
-+ return FALSE;
-+
-+ if (entries <= w100c->cmdfifo_entries) {
-+ w100c->cmdfifo_entries -= entries;
-+ return TRUE;
-+ }
-+
-+ WHILE_NOT_TIMEOUT(.2) {
-+ rbbmStatus.val = MMIO_IN32(mmRBBM_STATUS);
-+ w100c->cmdfifo_entries = rbbmStatus.f.cmdfifo_avail;
-+ if (w100c->cmdfifo_entries >= entries) {
-+ break;
-+ }
-+ }
-+ if (TIMEDOUT()) {
-+ ErrorF("Not enough CMDFIFO entries: %d (%d needed)\n",
-+ w100c->cmdfifo_entries, entries);
-+ return FALSE;
-+ }
-+ w100c->cmdfifo_entries -= entries;
-+ return TRUE;
-+}
-+
-+Bool W100WaitIdle(W100CardInfo *w100c)
-+{
-+ rbbm_status_u rbbm_status;
-+ TIMEOUT_LOCALS;
-+
-+ DBG_IMAGEON(("W100WaitIdle\n"));
-+ if (!W100WaitCmdFifoEntries(w100c, W100_CMDFIFO_SIZE)) {
-+ return FALSE;
-+ }
-+
-+ WHILE_NOT_TIMEOUT(.2) {
-+ rbbm_status.val = MMIO_IN32(mmRBBM_STATUS);
-+ if (rbbm_status.f.gui_active == 0) {
-+ break;
-+ }
-+ }
-+ if (TIMEDOUT()) {
-+ ErrorF("Timeout waiting for idle. rbbm_status: 0x%08x\n"
-+ " .cmdfifo_avail : %d\n"
-+ " .cf_pipe_busy : %d\n"
-+ " .eng_ev_busy : %d\n"
-+ " .cp_cmdstrm_busy : %d\n"
-+ " .e2_busy : %d\n"
-+ " .rb2d_busy : %d\n"
-+ " .rb3d_busy : %d\n"
-+ " .se_busy : %d\n"
-+ " .re_busy : %d\n"
-+ " .tam_busy : %d\n"
-+ " .tdm_busy : %d\n"
-+ " .pb_busy : %d\n"
-+ " .gui_active : %d\n",
-+ rbbm_status.val,
-+ rbbm_status.f.cmdfifo_avail,
-+ rbbm_status.f.cf_pipe_busy,
-+ rbbm_status.f.eng_ev_busy,
-+ rbbm_status.f.cp_cmdstrm_busy,
-+ rbbm_status.f.e2_busy,
-+ rbbm_status.f.rb2d_busy,
-+ rbbm_status.f.rb3d_busy,
-+ rbbm_status.f.se_busy,
-+ rbbm_status.f.re_busy,
-+ rbbm_status.f.tam_busy,
-+ rbbm_status.f.tdm_busy,
-+ rbbm_status.f.pb_busy,
-+ rbbm_status.f.gui_active);
-+ ErrorF("Last context: src(datatype:%d,pitch:%d,offset:0x%08x)\n"
-+ " dst(datatype:%d,pitch:%d,offset:0x%08x)\n"
-+ " xform(dx:%d,dy:%d)\n"
-+ " mask(pm:0x%08x,enable:%d)\n",
-+ w100c->ctx.src.datatype,
-+ w100c->ctx.src.pitch,
-+ w100c->ctx.src.offset,
-+ w100c->ctx.dst.datatype,
-+ w100c->ctx.dst.pitch,
-+ w100c->ctx.dst.offset,
-+ w100c->ctx.xform.dx,
-+ w100c->ctx.xform.dy,
-+ w100c->ctx.mask.pm,
-+ w100c->ctx.mask.enable);
-+
-+ return FALSE;
-+ }
-+
-+ return TRUE;
-+}
-+
-+void W100ResetContext(W100CardInfo *w100c)
-+{
-+ w100c->ctx.dst.datatype = DP_DST_16BPP_1555;
-+ w100c->ctx.dst.pitch = 0;
-+ w100c->ctx.dst.offset = 0;
-+ w100c->ctx.dst.videomem = 0;
-+
-+ w100c->ctx.src.datatype = DP_SRC_COLOR_SAME_AS_DST;
-+ w100c->ctx.src.pitch = 0;
-+ w100c->ctx.src.offset = 0;
-+ w100c->ctx.src.videomem = 0;
-+
-+ w100c->ctx.xform.dx = 0;
-+ w100c->ctx.xform.dy = 0;
-+ w100c->ctx.xform.randr = 0;
-+ w100c->ctx.xform.mirror = FALSE;
-+ w100c->ctx.xform.dataPath = 0x0000003f;
-+
-+ w100c->ctx.mask.pm = 0;
-+ w100c->ctx.mask.enable = FALSE;
-+}
-+
-+CARD32 W100ComputeSolidGmc(W100CardInfo *w100c, CARD8 alu)
-+{
-+ dp_gui_master_cntl_u gmc;
-+
-+ gmc.val = 0;
-+ gmc.f.gmc_dst_pitch_offset_cntl = 1;
-+ gmc.f.gmc_dst_clipping = 0;
-+ gmc.f.gmc_brush_datatype = DP_BRUSH_SOLIDCOLOR;
-+ gmc.f.gmc_dst_datatype = w100c->ctx.dst.datatype;
-+ gmc.f.gmc_dp_op = DP_OP_ROP;
-+ gmc.f.gmc_byte_pix_order = DP_PIX_ORDER_LSB2MSB;
-+ gmc.f.gmc_dp_src_source = DP_SRC_MEM_RECTANGULAR;
-+ gmc.f.gmc_rop3 = W100SolidRop[alu];
-+ gmc.f.gmc_clr_cmp_fcn_dis = 1;
-+ if (w100c->ctx.mask.enable) {
-+ gmc.f.gmc_wr_msk_dis = 0;
-+ } else {
-+ gmc.f.gmc_wr_msk_dis = 1;
-+ }
-+ return gmc.val;
-+}
-+
-+CARD32 W100ComputeCopyGmc(W100CardInfo *w100c, CARD8 alu)
-+{
-+ dp_gui_master_cntl_u gmc;
-+
-+ gmc.val = 0;
-+ gmc.f.gmc_src_pitch_offset_cntl = 1;
-+ gmc.f.gmc_dst_pitch_offset_cntl = 1;
-+ gmc.f.gmc_dst_clipping = 0;
-+ gmc.f.gmc_src_clipping = 0;
-+ gmc.f.gmc_src_datatype = w100c->ctx.src.datatype;
-+ gmc.f.gmc_dp_src_source = DP_SRC_MEM_RECTANGULAR;
-+ gmc.f.gmc_brush_datatype = DP_BRUSH_NONE;
-+ gmc.f.gmc_dst_datatype = w100c->ctx.dst.datatype;
-+ gmc.f.gmc_dp_op = DP_OP_ROP;
-+ gmc.f.gmc_byte_pix_order = DP_PIX_ORDER_LSB2MSB;
-+ gmc.f.gmc_rop3 = W100BltRop[alu];
-+ gmc.f.gmc_clr_cmp_fcn_dis = 1;
-+ if (w100c->ctx.mask.enable) {
-+ gmc.f.gmc_wr_msk_dis = 0;
-+ } else {
-+ gmc.f.gmc_wr_msk_dis = 1;
-+ }
-+ return gmc.val;
-+}
-+
-+CARD32 W100ComputeAritGmc(W100CardInfo *w100c, CARD8 alu)
-+{
-+ dp_gui_master_cntl_u gmc;
-+
-+ gmc.val = 0;
-+ gmc.f.gmc_src_pitch_offset_cntl = 1;
-+ gmc.f.gmc_dst_pitch_offset_cntl = 1;
-+ gmc.f.gmc_dst_clipping = 0;
-+ gmc.f.gmc_src_clipping = 0;
-+ gmc.f.gmc_src_datatype = w100c->ctx.src.datatype;
-+ gmc.f.gmc_dst_datatype = w100c->ctx.dst.datatype;
-+ gmc.f.gmc_dp_src_source = DP_SRC_MEM_RECTANGULAR;
-+ gmc.f.gmc_brush_datatype = DP_BRUSH_NONE;
-+ gmc.f.gmc_dp_op = DP_OP_ARITHMETIC;
-+ gmc.f.gmc_byte_pix_order = DP_PIX_ORDER_LSB2MSB;
-+ gmc.f.gmc_rop3 = W100BltRop[alu];
-+ gmc.f.gmc_clr_cmp_fcn_dis = 1;
-+ if (w100c->ctx.mask.enable) {
-+ gmc.f.gmc_wr_msk_dis = 0;
-+ } else {
-+ gmc.f.gmc_wr_msk_dis = 1;
-+ }
-+ return gmc.val;
-+}
-+
-+void W100SetXForm(W100CardInfo *w100c, int dx, int dy)
-+{
-+ dp_cntl_u dp_cntl;
-+
-+ w100c->ctx.xform.dx = dx;
-+ w100c->ctx.xform.dy = dy;
-+
-+ dp_cntl.val = 0;
-+ dp_cntl.f.src_x_dir = 1;
-+ dp_cntl.f.src_y_dir = 1;
-+ dp_cntl.f.src_major_x = 1;
-+ dp_cntl.f.dst_major_x = 1;
-+
-+ if (dx >= 0) {
-+ dp_cntl.f.dst_x_dir = 1;
-+ } else {
-+ dp_cntl.f.dst_x_dir = 0;
-+ }
-+ if (dy >= 0) {
-+ dp_cntl.f.dst_y_dir = 1;
-+ } else {
-+ dp_cntl.f.dst_y_dir = 0;
-+ }
-+ w100c->ctx.xform.dataPath = dp_cntl.val;
-+}
-+
-+void W100SetRotation(W100CardInfo *w100c,
-+ int randr,
-+ Bool mirror)
-+{
-+ dp_cntl_u dp_cntl;
-+ w100c->ctx.xform.randr = randr;
-+ w100c->ctx.xform.mirror = mirror;
-+ dp_cntl.val = 0;
-+ dp_cntl.f.src_x_dir = 1;
-+ dp_cntl.f.src_y_dir = 1;
-+ dp_cntl.f.src_major_x = 1;
-+
-+
-+ switch (randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ dp_cntl.f.dst_x_dir = mirror ? 0 : 1;
-+ dp_cntl.f.dst_y_dir = 1;
-+ dp_cntl.f.dst_major_x = 1;
-+ break;
-+ case RR_Rotate_90:
-+ dp_cntl.f.dst_x_dir = 0;
-+ dp_cntl.f.dst_y_dir = mirror ? 0 : 1;
-+ dp_cntl.f.dst_major_x = 0;
-+ break;
-+ case RR_Rotate_180:
-+ dp_cntl.f.dst_x_dir = mirror ? 1 : 0;
-+ dp_cntl.f.dst_y_dir = 0;
-+ dp_cntl.f.dst_major_x = 1;
-+ break;
-+ case RR_Rotate_270:
-+ dp_cntl.f.dst_x_dir = 1;
-+ dp_cntl.f.dst_y_dir = mirror ? 1 : 0;
-+ dp_cntl.f.dst_major_x = 0;
-+ break;
-+ }
-+ w100c->ctx.xform.dataPath = dp_cntl.val;
-+}
-+
-+void W100SetPixelMask(W100CardInfo *w100c, Pixel mask)
-+{
-+ if (mask != 0xffffffff) {
-+ w100c->ctx.mask.enable = TRUE;
-+ w100c->ctx.mask.pm = mask;
-+ } else {
-+ w100c->ctx.mask.enable = FALSE;
-+ }
-+}
-+
-+Bool W100SetSource(KdScreenInfo *screen,
-+ CARD32 srcPitch,
-+ CARD32 srcOffset,
-+ CARD8 bpp)
-+{
-+ W100CardInfo(screen);
-+ int i;
-+ w100c->ctx.src.pitch = srcPitch * 8 / bpp;
-+ switch (bpp) {
-+ case 1:
-+ w100c->ctx.src.datatype = DP_SRC_1BPP_OPA;
-+ break;
-+ case 4:
-+ w100c->ctx.src.datatype = DP_SRC_4BPP;
-+ break;
-+ case 12:
-+ w100c->ctx.src.datatype = DP_SRC_12BPP_PACKED;
-+ break;
-+ case 8:
-+ case 16:
-+ w100c->ctx.src.datatype = DP_SRC_COLOR_SAME_AS_DST;
-+ break;
-+ default:
-+ return FALSE;
-+ }
-+
-+ for (i = 0; i < screen->num_videomem_areas; i++) {
-+ KdVideoMemArea *vidmem = screen->videomem_areas[i];
-+ if ((((CARD8*)srcOffset) >= vidmem->base) &&
-+ (((CARD8*)srcOffset) <= (vidmem->base + vidmem->size))) {
-+ w100c->ctx.src.offset = (CARD32) W100_HOST2CARD(srcOffset);
-+ if (w100c->last_src_videomem != i) {
-+ W100WaitIdle(w100c);
-+ }
-+ w100c->last_src_videomem = i;
-+ DBG_IMAGEON(("Setting src(pitch:%d,offset:0x%08x,type:%d)\n",
-+ w100c->ctx.src.pitch,
-+ w100c->ctx.src.offset,
-+ w100c->ctx.src.datatype));
-+ return TRUE;
-+ }
-+ }
-+ return FALSE;
-+}
-+
-+Bool W100SetDestination(KdScreenInfo *screen,
-+ CARD32 dstPitch,
-+ CARD32 dstOffset,
-+ CARD8 bpp)
-+{
-+ W100CardInfo(screen);
-+ int i;
-+ w100c->ctx.dst.pitch = dstPitch * 8 / bpp;
-+ switch (bpp) {
-+ case 8:
-+ w100c->ctx.dst.datatype = DP_DST_8BPP;
-+ break;
-+ case 16:
-+ w100c->ctx.dst.datatype = DP_DST_16BPP_1555;
-+ break;
-+ default:
-+ return FALSE;
-+ }
-+
-+ for (i = 0; i < screen->num_videomem_areas; i++) {
-+ KdVideoMemArea *vidmem = screen->videomem_areas[i];
-+ if ((((CARD8*)dstOffset) >= vidmem->base) &&
-+ (((CARD8*)dstOffset) <= (vidmem->base + vidmem->size))) {
-+ w100c->ctx.dst.offset = (CARD32) W100_HOST2CARD(dstOffset);
-+ if (w100c->last_dst_videomem != i) {
-+ W100WaitIdle(w100c);
-+ }
-+ w100c->last_dst_videomem = i;
-+ DBG_IMAGEON(("Setting dst(pitch:%d,offset:0x%08x,type:%d)\n",
-+ w100c->ctx.dst.pitch,
-+ w100c->ctx.dst.offset,
-+ w100c->ctx.dst.datatype));
-+ return TRUE;
-+ }
-+ }
-+ return FALSE;
-+}
-+
-+Bool W100SetSourcePixmap(PixmapPtr pPix)
-+{
-+ KdScreenPriv(pPix->drawable.pScreen);
-+
-+ return W100SetSource(pScreenPriv->screen,
-+ pPix->devKind,
-+ (CARD32) pPix->devPrivate.ptr,
-+ pPix->drawable.bitsPerPixel);
-+}
-+
-+Bool W100SetDestinationPixmap(PixmapPtr pPix)
-+{
-+ KdScreenPriv(pPix->drawable.pScreen);
-+
-+ return W100SetDestination(pScreenPriv->screen,
-+ pPix->devKind,
-+ (CARD32) pPix->devPrivate.ptr,
-+ pPix->drawable.bitsPerPixel);
-+}
-+
-+void W100MapToDevice(W100CardInfo *w100c, BoxPtr src, BoxPtr dst)
-+{
-+ switch (w100c->hw_window.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ dst->x1 = src->x1;
-+ dst->y1 = src->y1;
-+ dst->x2 = src->x2;
-+ dst->y2 = src->y2;
-+ break;
-+ case RR_Rotate_90:
-+ dst->x1 = w100c->hw_window.height - src->y2 - 1;
-+ dst->y1 = src->x1;
-+ dst->x2 = w100c->hw_window.height - src->y1 - 1;
-+ dst->y2 = src->x2;
-+ break;
-+ case RR_Rotate_180:
-+ dst->x1 = w100c->hw_window.width - src->x2 - 1;
-+ dst->y1 = w100c->hw_window.height - src->y2 - 1;
-+ dst->x2 = w100c->hw_window.width - src->x1 - 1;
-+ dst->y2 = w100c->hw_window.height - src->y1 - 1;
-+ break;
-+ case RR_Rotate_270:
-+ dst->x1 = src->y1;
-+ dst->y1 = w100c->hw_window.width - src->x2 - 1;
-+ dst->x2 = src->y2;
-+ dst->y2 = w100c->hw_window.width - src->x1 - 1;
-+ break;
-+ }
-+ DBG_IMAGEON(("MapToDevice (x1:%d,y1:%d,x2:%d,y2:%d)->(x1:%d,y1:%d,x2:%d,y2:%d)\n",
-+ src->x1, src->y1, src->x2, src->y2,
-+ dst->x1, dst->y1, dst->x2, dst->y2));
-+}
-+
-+void W100MapFromDevice(W100CardInfo *w100c, BoxPtr src, BoxPtr dst)
-+{
-+ switch (w100c->hw_window.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ dst->x1 = src->x1;
-+ dst->y1 = src->y1;
-+ dst->x2 = src->x2;
-+ dst->y2 = src->y2;
-+ break;
-+ case RR_Rotate_90:
-+ dst->x1 = src->y1;
-+ dst->y1 = w100c->hw_window.height - src->x2 - 1;
-+ dst->x2 = src->y2;
-+ dst->y2 = w100c->hw_window.height - src->x1 - 1;
-+ break;
-+ case RR_Rotate_180:
-+ dst->x1 = w100c->hw_window.width - src->x2 - 1;
-+ dst->y1 = w100c->hw_window.height - src->y2 - 1;
-+ dst->x2 = w100c->hw_window.width - src->x1 - 1;
-+ dst->y2 = w100c->hw_window.height - src->y1 - 1;
-+ break;
-+ case RR_Rotate_270:
-+ dst->x1 = w100c->hw_window.height - src->y2 - 1;
-+ dst->y1 = src->x1;
-+ dst->x2 = w100c->hw_window.width - src->y1 - 1;
-+ dst->y2 = src->x2;
-+ break;
-+ }
-+ DBG_IMAGEON(("MapFromDevice (x1:%d,y1:%d,x2:%d,y2:%d)->(x1:%d,y1:%d,x2:%d,y2:%d)\n",
-+ src->x1, src->y1, src->x2, src->y2,
-+ dst->x1, dst->y1, dst->x2, dst->y2));
-+}
-+
-+void W100MoveTo(BoxPtr src, int x, int y)
-+{
-+ src->x1 += x;
-+ src->y1 += y;
-+ src->x2 += x;
-+ src->y2 += y;
-+}
-+
-+void W100ChangeOrigin(BoxPtr src, int x, int y)
-+{
-+ src->x1 -= x;
-+ src->y1 -= y;
-+ src->x2 -= x;
-+ src->y2 -= y;
-+}
-+
-+void W100ScaleBox(BoxPtr src, BoxPtr dst, int scale)
-+{
-+ if (scale >= 0) {
-+ dst->x1 = src->x1 << scale;
-+ dst->x2 = src->x2 << scale;
-+ dst->y1 = src->y1 << scale;
-+ dst->y2 = src->y2 << scale;
-+ } else {
-+ dst->x1 = src->x1 >> -scale;
-+ dst->x2 = src->x2 >> -scale;
-+ dst->y1 = src->y1 >> -scale;
-+ dst->y2 = src->y2 >> -scale;
-+ }
-+}
-+
-+void W100TrajectoryOrigin(W100CardInfo *w100c, BoxPtr box, short *x, short *y)
-+{
-+ switch (w100c->ctx.xform.randr & RR_Rotate_All) {
-+ case RR_Rotate_0:
-+ if (w100c->ctx.xform.mirror) {
-+ *x = box->x2;
-+ } else {
-+ *x = box->x1;
-+ }
-+ *y = box->y1;
-+ break;
-+ case RR_Rotate_90:
-+ *x = box->x2;
-+ if (w100c->ctx.xform.mirror) {
-+ *y = box->y2;
-+ } else {
-+ *y = box->y1;
-+ }
-+ break;
-+ case RR_Rotate_180:
-+ if (w100c->ctx.xform.mirror) {
-+ *x = box->x1;
-+ } else {
-+ *x = box->x2;
-+ }
-+ *y = box->y2;
-+ break;
-+ case RR_Rotate_270:
-+ *x = box->x1;
-+ if (w100c->ctx.xform.mirror) {
-+ *y = box->y1;
-+ } else {
-+ *y = box->y2;
-+ }
-+ }
-+}
-+
-+CARD8 W100GetScaler(CARD16 dstsize, CARD16 srcsize)
-+{
-+ return W100_MAX(1, W100_MIN(31, ((16 * srcsize) + dstsize - 1) / dstsize));
-+
-+}
-+
-+CARD16 W100ApplyScaler(CARD16 srcsize, CARD8 scaler)
-+{
-+ return ((srcsize * 16) + (scaler - 1)) / scaler;
-+}
-+
-+
-+static void W100Blt(KdScreenInfo *screen,
-+ int randr, int bpp,
-+ CARD32 srcOffset,
-+ CARD16 srcPitch,
-+ BoxPtr srcBox,
-+ CARD32 dstOffset,
-+ CARD16 dstPitch,
-+ BoxPtr dstBox)
-+{
-+ ScreenPtr pScreen = screen->pScreen;
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ int fifoEntries = 9;
-+ Bool hasXForm = FALSE;
-+ eng_cntl_u eng_cntl;
-+ src_x_y_u src_x_y;
-+ dst_x_y_u dst_x_y;
-+ src_width_u src_width;
-+ src_height_u src_height;
-+ dst_width_height_u dst_width_height;
-+ CARD16 dstX;
-+ CARD16 dstY;
-+
-+ if (randr & (RR_Rotate_90|RR_Rotate_270)) {
-+ hasXForm = TRUE;
-+ eng_cntl.val = w100c->regs.ENG_CNTL;
-+ eng_cntl.f.dis_rop_src_uses_dst_w_h = 1;
-+ eng_cntl.f.dis_src_uses_dst_dirmaj = 1;
-+ fifoEntries += 4;
-+ }
-+
-+ W100ResetContext(w100c);
-+ W100SetRotation(w100c, randr, FALSE);
-+ W100SetSource(screen, srcPitch, srcOffset, bpp);
-+ W100SetDestination(screen, dstPitch, dstOffset, bpp);
-+ W100TrajectoryOrigin(w100c, dstBox, &dstX, &dstY);
-+
-+ src_x_y.f.src_x = srcBox->x1;
-+ src_x_y.f.src_y = srcBox->y1;
-+ dst_x_y.f.dst_x = dstX;
-+ dst_x_y.f.dst_y = dstY;
-+ src_width.f.src_width = srcBox->x2 - srcBox->x1 + 1;
-+ src_height.f.src_height = srcBox->y2 - srcBox->y1 + 1;
-+ dst_width_height.f.dst_height = dstBox->y2 - dstBox->y1 + 1;
-+ dst_width_height.f.dst_width_b0 = (dstBox->x2 - dstBox->x1 + 1) & 0xff;
-+ dst_width_height.f.dst_width_b1 = ((dstBox->x2 - dstBox->x1 + 1) >> 8) & 0x3f;
-+
-+ DBG_IMAGEON(("W100Blt src(x:%d,y:%d,w:%d,h:%d) dst(x:%d,y:%d,w:%d,h:%d)\n",
-+ src_x_y.f.src_x,
-+ src_x_y.f.src_y,
-+ src_width.f.src_width,
-+ src_height.f.src_height,
-+ dst_x_y.f.dst_x,
-+ dst_x_y.f.dst_y,
-+ dst_width_height.f.dst_width_b0 |
-+ dst_width_height.f.dst_width_b1 << 8,
-+ dst_width_height.f.dst_height));
-+
-+ if (W100WaitCmdFifoEntries(w100c, fifoEntries)) {
-+ MMIO_OUT32(mmDST_PITCH, w100c->ctx.dst.pitch);
-+ MMIO_OUT32(mmDST_OFFSET, w100c->ctx.dst.offset);
-+ MMIO_OUT32(mmSRC_PITCH, w100c->ctx.src.pitch);
-+ MMIO_OUT32(mmSRC_OFFSET, w100c->ctx.src.offset);
-+ MMIO_OUT32(mmDP_GUI_MASTER_CNTL, W100ComputeCopyGmc(w100c, GXcopy));
-+ MMIO_OUT32(mmDP_CNTL, w100c->ctx.xform.dataPath);
-+ if (hasXForm) {
-+ MMIO_OUT32(mmENG_CNTL, eng_cntl.val);
-+ MMIO_OUT32(mmSRC_WIDTH, src_width.val);
-+ MMIO_OUT32(mmSRC_HEIGHT, src_height.val);
-+ }
-+ MMIO_OUT32(mmSRC_X_Y, src_x_y.val);
-+ MMIO_OUT32(mmDST_X_Y, dst_x_y.val);
-+ MMIO_OUT32(mmDST_WIDTH_HEIGHT, dst_width_height.val);
-+ /* Restore state */
-+ if (hasXForm) {
-+ MMIO_OUT32(mmENG_CNTL, w100c->regs.ENG_CNTL);
-+ }
-+ } else {
-+ ErrorF("Unable to perform Blitting\n");
-+ }
-+}
-+
-+static void W100StretchBlt(KdScreenInfo *screen,
-+ int randr,
-+ int bpp,
-+ CARD32 srcOffset,
-+ CARD16 srcPitch,
-+ BoxPtr srcBox,
-+ CARD32 dstOffset,
-+ CARD16 dstPitch,
-+ BoxPtr dstBox,
-+ CARD8 xscaler,
-+ CARD8 yscaler)
-+{
-+ ScreenPtr pScreen = screen->pScreen;
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ Bool hasXForm = FALSE;
-+ dp_datatype_u dp_datatype;
-+ dp_mix_u dp_mix;
-+ eng_cntl_u eng_cntl;
-+ e2_arithmetic_cntl_u e2;
-+ src_inc_u src_inc;
-+ src_x_y_u src_x_y;
-+ dst_x_y_u dst_x_y;
-+ src_width_u src_width;
-+ src_height_u src_height;
-+ dst_width_height_u dst_width_height;
-+ int firstStage = 10;
-+ int secondStage = 10;
-+ CARD16 dx, dy, sw, sh, dw, dh;
-+ BoxRec dst;
-+
-+ DBG_IMAGEON(("W100StretchBlt(randr:%d,bpp:%d,"
-+ "src(x1:%d,y1:%d,x2:%d,y2:%d,pitch:%d,offset:%d),"
-+ "dst(x1:%d,y1:%d,x2:%d,y2:%d,pitch:%d,offset:%d),"
-+ "xscaler:%d,yscaler:%d)\n",
-+ randr, bpp,
-+ srcBox->x1, srcBox->y1, srcBox->x2, srcBox->y2,
-+ srcPitch, srcOffset,
-+ dstBox->x1, dstBox->y1, dstBox->x2, dstBox->y2,
-+ dstPitch, dstOffset,
-+ xscaler, yscaler));
-+
-+ sw = W100ApplyScaler(srcBox->x2 - srcBox->x1 + 1, xscaler);
-+ sh = W100ApplyScaler(srcBox->y2 - srcBox->y1 + 1, yscaler);
-+
-+ if (randr & (RR_Rotate_90|RR_Rotate_270)) {
-+ hasXForm = TRUE;
-+ eng_cntl.val = w100c->regs.ENG_CNTL;
-+ eng_cntl.f.dis_rop_src_uses_dst_w_h = 1;
-+ eng_cntl.f.dis_src_uses_dst_dirmaj = 1;
-+ ++firstStage;
-+ ++secondStage;
-+ dh = sw;
-+ dw = sh;
-+ } else {
-+ dh = sh;
-+ dw = sw;
-+ }
-+
-+ dst.x1 = dstBox->x1;
-+ dst.y1 = dstBox->y1;
-+ dst.x2 = dst.x1 + dw - 1;
-+ dst.y2 = dst.y1 + dh - 1;
-+
-+ W100ResetContext(w100c);
-+ W100SetRotation(w100c, randr, FALSE);
-+ W100SetSource(screen, srcPitch, srcOffset, bpp);
-+ W100SetDestination(screen, dstPitch, dstOffset, bpp);
-+ W100TrajectoryOrigin(w100c, &dst, &dx, &dy);
-+
-+ src_inc.val = 0;
-+ src_inc.f.src_xinc = xscaler;
-+ src_inc.f.src_yinc = yscaler;
-+
-+ dp_datatype.val = 0;
-+ dp_datatype.f.dp_brush_datatype = DP_BRUSH_SOLIDCOLOR;
-+ dp_datatype.f.dp_dst_datatype = w100c->ctx.dst.datatype;
-+ dp_datatype.f.dp_src_datatype = w100c->ctx.src.datatype;
-+ dp_datatype.f.dp_byte_pix_order = DP_PIX_ORDER_LSB2MSB;
-+
-+ dp_mix.val = 0;
-+ dp_mix.f.dp_op = DP_OP_ARITHMETIC;
-+ dp_mix.f.dp_src_source = DP_SRC_MEM_RECTANGULAR;
-+ dp_mix.f.dp_rop3 = W100BltRop[GXcopy];
-+
-+ e2.val = 0;
-+ e2.f.opcode = E2_OPC_STRETCH_SRC2;
-+ e2.f.srcblend = E2_SRCBLEND_ZERO;
-+ e2.f.dstblend = E2_DSTBLEND_ZERO;
-+
-+ src_x_y.f.src_x = srcBox->x1;
-+ src_x_y.f.src_y = srcBox->y1;
-+ dst_x_y.f.dst_x = dx;
-+ dst_x_y.f.dst_y = dy;
-+ src_width.f.src_width = sw + 1;
-+ src_height.f.src_height = sh;
-+ dst_width_height.f.dst_height = dh;
-+ dst_width_height.f.dst_width_b0 = dw & 0xff;
-+ dst_width_height.f.dst_width_b1 = (dw >> 8) & 0x3f;
-+
-+
-+ if (W100WaitCmdFifoEntries(w100c, firstStage)) {
-+ /* Set Source */
-+ MMIO_OUT32(mmSRC_PITCH, w100c->ctx.src.pitch);
-+ MMIO_OUT32(mmSRC_OFFSET, w100c->ctx.src.offset);
-+
-+ /* Set Destination */
-+ MMIO_OUT32(mmDST_PITCH, w100c->ctx.dst.pitch);
-+ MMIO_OUT32(mmDST_OFFSET, w100c->ctx.dst.offset);
-+
-+ /* Prepare for Stretch Operation */
-+ MMIO_OUT32(mmDP_GUI_MASTER_CNTL, W100ComputeAritGmc(w100c, GXcopy));
-+ MMIO_OUT32(mmDP_DATATYPE, dp_datatype.val);
-+ MMIO_OUT32(mmDP_MIX, dp_mix.val);
-+ MMIO_OUT32(mmE2_ARITHMETIC_CNTL, e2.val);
-+
-+ /* Set Data Trajectory */
-+ if (hasXForm) {
-+ MMIO_OUT32(mmENG_CNTL, eng_cntl.val);
-+ }
-+ MMIO_OUT32(mmDP_CNTL, w100c->ctx.xform.dataPath);
-+ } else {
-+ ErrorF("Error preparing for Stretch operation\n");
-+ return;
-+ }
-+
-+ if (W100WaitCmdFifoEntries(w100c, secondStage)) {
-+ /* Perform blitting */
-+ MMIO_OUT32(mmSRC_X_Y, src_x_y.val);
-+ MMIO_OUT32(mmDST_X_Y, dst_x_y.val);
-+ MMIO_OUT32(mmSRC_WIDTH, src_width.val);
-+ MMIO_OUT32(mmSRC_HEIGHT, src_height.val);
-+ MMIO_OUT32(mmSRC_INC, src_inc.val);
-+ MMIO_OUT32(mmDST_WIDTH_HEIGHT, dst_width_height.val);
-+ /* Restore state */
-+ if (hasXForm) {
-+ MMIO_OUT32(mmENG_CNTL, w100c->regs.ENG_CNTL);
-+ }
-+ } else {
-+ ErrorF("Error performing Stretch operation\n");
-+ }
-+}
-+
-+static void W100ScaledBlt(KdScreenInfo *screen,
-+ int randr,
-+ int bpp,
-+ CARD32 srcOffset,
-+ CARD16 srcPitch,
-+ BoxPtr srcBox,
-+ CARD32 dstOffset,
-+ CARD16 dstPitch,
-+ BoxPtr dstBox,
-+ CARD8 xscaler,
-+ CARD8 yscaler)
-+{
-+ ScreenPtr pScreen = screen->pScreen;
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ Bool hasXForm = FALSE;
-+ dp_datatype_u dp_datatype;
-+ dp_mix_u dp_mix;
-+ eng_cntl_u eng_cntl;
-+ e2_arithmetic_cntl_u e2;
-+ src_inc_u src_inc;
-+ src_x_y_u src_x_y;
-+ src2_x_y_u src2_x_y;
-+ dst_x_y_u dst_x_y;
-+ src_width_u src_width;
-+ src_height_u src_height;
-+ dst_width_height_u dst_width_height;
-+ int firstStage = 11;
-+ int secondStage = 11;
-+ CARD16 dx, dy, sw, sh, dw, dh;
-+ BoxRec dst;
-+
-+ DBG_IMAGEON(("W100ScaledBlt(randr:%d,bpp:%d,"
-+ "src(x1:%d,y1:%d,x2:%d,y2:%d,pitch:%d,offset:%d),"
-+ "dst(x1:%d,y1:%d,x2:%d,y2:%d,pitch:%d,offset:%d),"
-+ "xscaler:%d,yscaler:%d)\n",
-+ randr, bpp,
-+ srcBox->x1, srcBox->y1, srcBox->x2, srcBox->y2,
-+ srcPitch, srcOffset,
-+ dstBox->x1, dstBox->y1, dstBox->x2, dstBox->y2,
-+ dstPitch, dstOffset,
-+ xscaler, yscaler));
-+
-+ sw = W100ApplyScaler(srcBox->x2 - srcBox->x1 + 1, xscaler);
-+ sh = W100ApplyScaler(srcBox->y2 - srcBox->y1 + 1, yscaler);
-+
-+ if (randr & (RR_Rotate_90|RR_Rotate_270)) {
-+ hasXForm = TRUE;
-+ eng_cntl.val = w100c->regs.ENG_CNTL;
-+ eng_cntl.f.dis_rop_src_uses_dst_w_h = 1;
-+ eng_cntl.f.dis_src_uses_dst_dirmaj = 1;
-+ ++firstStage;
-+ ++secondStage;
-+ dh = sw;
-+ dw = sh;
-+ } else {
-+ dh = sh;
-+ dw = sw;
-+ }
-+
-+ dst.x1 = dstBox->x1;
-+ dst.y1 = dstBox->y1;
-+ dst.x2 = dst.x1 + dw - 1;
-+ dst.y2 = dst.y1 + dh - 1;
-+
-+ W100ResetContext(w100c);
-+ W100SetRotation(w100c, randr, FALSE);
-+ W100SetSource(screen, srcPitch, srcOffset, bpp);
-+ W100SetDestination(screen, dstPitch, dstOffset, bpp);
-+ W100TrajectoryOrigin(w100c, &dst, &dx, &dy);
-+
-+ DBG_IMAGEON(("Corrected dst(x1:%d,y1:%d,x2:%d,y2:%d). Origin(%d,%d)\n",
-+ dst.x1, dst.y1, dst.x2, dst.y2,
-+ dx, dy));
-+
-+ src_inc.val = 0;
-+ src_inc.f.src_xinc = xscaler;
-+ src_inc.f.src_yinc = yscaler;
-+
-+ dp_datatype.val = 0;
-+ dp_datatype.f.dp_brush_datatype = DP_BRUSH_SOLIDCOLOR;
-+ dp_datatype.f.dp_src2_type = 1;
-+ dp_datatype.f.dp_dst_datatype = w100c->ctx.dst.datatype;
-+ dp_datatype.f.dp_src2_datatype = w100c->ctx.src.datatype;
-+ dp_datatype.f.dp_src_datatype = w100c->ctx.src.datatype;
-+ dp_datatype.f.dp_byte_pix_order = DP_PIX_ORDER_LSB2MSB;
-+
-+ dp_mix.val = 0;
-+ dp_mix.f.dp_op = DP_OP_ARITHMETIC;
-+ dp_mix.f.dp_src_source = DP_SRC_MEM_RECTANGULAR;
-+ dp_mix.f.dp_src2_source = DP_SRC_MEM_RECTANGULAR;
-+ dp_mix.f.dp_rop3 = W100BltRop[GXcopy];
-+
-+ e2.val = 0;
-+ e2.f.opcode = E2_OPC_SCALE_SRC2;
-+ e2.f.srcblend = E2_SRCBLEND_ZERO;
-+ e2.f.dstblend = E2_DSTBLEND_ZERO;
-+
-+
-+ src_x_y.f.src_x = srcBox->x1;
-+ src_x_y.f.src_y = srcBox->y1;
-+ src2_x_y.f.src_x = srcBox->x1;
-+ src2_x_y.f.src_y = srcBox->y1 + 4;
-+ dst_x_y.f.dst_x = dx;
-+ dst_x_y.f.dst_y = dy;
-+ src_width.f.src_width = sw + 1;
-+ src_height.f.src_height = sh;
-+ dst_width_height.f.dst_height = dh;
-+ dst_width_height.f.dst_width_b0 = dw & 0xff;
-+ dst_width_height.f.dst_width_b1 = (dw >> 8) & 0x3f;
-+
-+ if (W100WaitCmdFifoEntries(w100c, firstStage)) {
-+ /* Set Source */
-+ MMIO_OUT32(mmSRC_PITCH, w100c->ctx.src.pitch);
-+ MMIO_OUT32(mmSRC_OFFSET, w100c->ctx.src.offset);
-+
-+ /* Set Destination */
-+ MMIO_OUT32(mmDST_PITCH, w100c->ctx.dst.pitch);
-+ MMIO_OUT32(mmDST_OFFSET, w100c->ctx.dst.offset);
-+ /* Set second source */
-+ MMIO_OUT32(mmSRC2_PITCH, w100c->ctx.src.pitch);
-+ MMIO_OUT32(mmSRC2_OFFSET, w100c->ctx.src.offset);
-+
-+ /* Prepare for Stretch Operation */
-+ MMIO_OUT32(mmDP_GUI_MASTER_CNTL, W100ComputeAritGmc(w100c, GXcopy));
-+ MMIO_OUT32(mmDP_DATATYPE, dp_datatype.val);
-+ MMIO_OUT32(mmDP_MIX, dp_mix.val);
-+ MMIO_OUT32(mmE2_ARITHMETIC_CNTL, e2.val);
-+ /* Set Data Trajectory */
-+ if (hasXForm) {
-+ MMIO_OUT32(mmENG_CNTL, eng_cntl.val);
-+ }
-+ MMIO_OUT32(mmDP_CNTL, w100c->ctx.xform.dataPath);
-+ } else {
-+ ErrorF("Unable to prepare for Scaled Blitting\n");
-+ return;
-+ }
-+ if (W100WaitCmdFifoEntries(w100c, secondStage)) {
-+ /* Perform blitting */
-+ MMIO_OUT32(mmSRC_X_Y, src_x_y.val);
-+ MMIO_OUT32(mmSRC2_X_Y, src2_x_y.val);
-+ MMIO_OUT32(mmSRC2_WIDTH, src_width.val);
-+ MMIO_OUT32(mmSRC2_HEIGHT, src_height.val);
-+ MMIO_OUT32(mmSRC_INC, src_inc.val);
-+ MMIO_OUT32(mmSRC2_INC, src_inc.val);
-+ MMIO_OUT32(mmDST_X_Y, dst_x_y.val);
-+ MMIO_OUT32(mmSRC_WIDTH, src_width.val);
-+ MMIO_OUT32(mmSRC_HEIGHT, src_height.val);
-+ MMIO_OUT32(mmDST_WIDTH_HEIGHT, dst_width_height.val);
-+ /* Restore state */
-+ if (hasXForm) {
-+ MMIO_OUT32(mmENG_CNTL, w100c->regs.ENG_CNTL);
-+ }
-+ /* Without this, solid blitting is no longer working correctly */
-+ dp_datatype.f.dp_src2_type = 0;
-+ MMIO_OUT32(mmDP_DATATYPE, dp_datatype.val);
-+ } else {
-+ ErrorF("Unable to perform Scaled Blitting\n");
-+ }
-+}
-+
-+void W100PlanarBlt(KdScreenInfo *screen,
-+ int planes, int planeOffsets[],
-+ int bpp, int randr,
-+ KdOffscreenArea *src,
-+ int srcW,
-+ int srcH,
-+ BoxPtr srcBox,
-+ KdOffscreenArea *dst,
-+ int dstW,
-+ int dstH,
-+ BoxPtr dstBox)
-+{
-+ ScreenPtr pScreen = screen->pScreen;
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+
-+ CARD16 dstBoxW, dstBoxH, srcBoxW, srcBoxH;
-+ CARD8 *srcOffset, *dstBase, *dstOffset;
-+ int xerror, yerror;
-+ unsigned int subsampling[] = {0, 1, 1};
-+ int plane;
-+ srcBoxW = srcBox->x2 - srcBox->x1 + 1;
-+ srcBoxH = srcBox->y2 - srcBox->y1 + 1;
-+ if (randr & (RR_Rotate_90 | RR_Rotate_270)) {
-+ dstBoxW = dstBox->y2 - dstBox->y1 + 1;
-+ dstBoxH = dstBox->x2 - dstBox->x1 + 1;
-+ } else {
-+ dstBoxW = dstBox->x2 - dstBox->x1 + 1;
-+ dstBoxH = dstBox->y2 - dstBox->y1 + 1;
-+ }
-+
-+ Bool stretch = ((srcBoxW != dstBoxW) || (srcBoxH != dstBoxH));
-+ CARD8 xscaler, yscaler;
-+ BoxRec dstb = *dstBox;
-+
-+ DBG_IMAGEON(("W100PlanarBlt(planes:%d,bpp:%d,randr:%d,"
-+ "src(x1:%d,y1:%d,x2:%d,y2:%d,w:%d,h:%d),"
-+ "dst(x1:%d,y1:%d,x2:%d,y2:%d,w:%d,h:%d)\n",
-+ planes, bpp, randr,
-+ srcBox->x1, srcBox->y1, srcBox->x2, srcBox->y2, srcW, srcH,
-+ dstBox->x1, dstBox->y1, dstBox->x2, dstBox->y2, dstW, dstH));
-+
-+ xerror = yerror = 0;
-+ if (stretch) {
-+ xscaler = W100GetScaler(dstBoxW, srcBoxW);
-+ yscaler = W100GetScaler(dstBoxH, srcBoxH);
-+ if (xscaler != 16 || yscaler != 16) {
-+ xerror = (dstBoxW - W100ApplyScaler(srcBoxW, xscaler)) / 2;
-+ yerror = (dstBoxH - W100ApplyScaler(srcBoxH, yscaler)) / 2;
-+ DBG_IMAGEON(("Stretching with xscaler:%d,yscaler:%d,"
-+ "xerror:%d,yerror:%d\n",
-+ xscaler, yscaler, xerror, yerror));
-+ } else {
-+ xerror = yerror = 0;
-+ stretch = FALSE;
-+ }
-+ }
-+
-+ W100MoveTo(&dstb, xerror, yerror);
-+
-+ srcOffset = src->vidmem->base + src->offset;
-+ dstBase = dst->vidmem->base + dst->offset;
-+ for (plane = 0; plane < planes; plane++) {
-+ BoxRec srcCBox;
-+ BoxRec dstCBox;
-+ dstOffset = dstBase + planeOffsets[plane];
-+ W100ScaleBox(srcBox, &srcCBox, -subsampling[plane]);
-+ W100ScaleBox(&dstb, &dstCBox, -subsampling[plane]);
-+ if (stretch) {
-+ W100ScaledBlt(screen, randr, bpp,
-+ (CARD32) srcOffset,
-+ srcW >> subsampling[plane],
-+ &srcCBox,
-+ (CARD32) dstOffset,
-+ dstW >> subsampling[plane],
-+ &dstCBox,
-+ xscaler, yscaler);
-+ } else {
-+ W100Blt(screen, randr, bpp,
-+ (CARD32) srcOffset,
-+ srcW >> subsampling[plane],
-+ &srcCBox,
-+ (CARD32) dstOffset,
-+ dstW >> subsampling[plane],
-+ &dstCBox);
-+ }
-+ srcOffset += (srcW * srcH) >> (subsampling[plane] * 2);
-+ }
-+}
-+
-+void W100SetBrightness(W100CardInfo *w100c, CARD8 value)
-+{
-+ brightness_cntl_u brightness;
-+ brightness.val = 0;
-+ brightness.f.brightness = value;
-+ MMIO_OUT32(mmBRIGHTNESS_CNTL, brightness.val);
-+}
-+
-+CARD8 W100GetBrightness(W100CardInfo *w100c)
-+{
-+ brightness_cntl_u brightness;
-+ brightness.val = MMIO_IN32(mmBRIGHTNESS_CNTL);
-+ return brightness.f.brightness;
-+}
-+
-+int W100GetRotation(W100CardInfo *w100c)
-+{
-+ graphic_ctrl_u gc;
-+ int randr;
-+
-+ gc.val = MMIO_IN32(mmGRAPHIC_CTRL);
-+
-+ switch (gc.f.portrait_mode) {
-+ case 0:
-+ randr = RR_Rotate_0;
-+ break;
-+ case 1:
-+ randr = RR_Rotate_90;
-+ break;
-+ case 2:
-+ randr = RR_Rotate_270;
-+ break;
-+ case 3:
-+ randr = RR_Rotate_180;
-+ break;
-+ }
-+ return randr;
-+}
-+
-+Bool W100SysFsSet(W100CardInfo *w100c, const char *path, const char *value)
-+{
-+ FILE *fd;
-+ if ((fd = fopen(path, "w")) == NULL) {
-+ ErrorF("(E) Error in W100SysFsSet: Unable to open '%s'\n", path);
-+ return FALSE;
-+ }
-+ fprintf(fd, "%s", value);
-+ fclose(fd);
-+ return TRUE;
-+}
-+
-+Bool W100SysFsGet(W100CardInfo *w100c, const char *path, char *value)
-+{
-+ FILE *fd;
-+ if ((fd = fopen(path, "r")) == NULL) {
-+ ErrorF("(E) Error in W100SysFsGet: Unable to open '%s'\n", path);
-+ return FALSE;
-+ }
-+ fscanf(fd, "%s", value);
-+ fclose(fd);
-+ return TRUE;
-+}
-+
-+void W100TransformTsLibCoordinates(long *x, long *y, void *closure)
-+{
-+ W100CardInfo *w100c = closure;
-+
-+ if (w100c->hw_window.mode->width == 320) {
-+ *x >>= 1;
-+ *y >>= 1;
-+ }
-+}
-+
-+void W100VSync(W100CardInfo *w100c)
-+{
-+ int timeout = 30000; /* VSync timeout = 30[ms] > 16.8[ms] */
-+ active_v_disp_u active_v_disp;
-+ disp_int_cntl_u disp_int_cntl;
-+ gen_int_cntl_u gen_int_cntl;
-+ gen_int_status_wr_u gen_int_status;
-+
-+ active_v_disp.val = MMIO_IN32(mmACTIVE_V_DISP);
-+
-+ /*set vline pos */
-+ disp_int_cntl.val = 0;
-+ disp_int_cntl.f.vline_int_pos = active_v_disp.f.active_v_end;
-+ MMIO_OUT32(mmDISP_INT_CNTL, disp_int_cntl.val);
-+
-+ /* disable vline irq */
-+ gen_int_cntl.val = MMIO_IN32(mmGEN_INT_CNTL);
-+ gen_int_cntl.f.crtc_vline_mask = 0;
-+ MMIO_OUT32(mmGEN_INT_CNTL, gen_int_cntl.val);
-+
-+ /* clear vline irq status */
-+ gen_int_status.val = 0;
-+ gen_int_status.f.crtc_vline_stat_ak = 1;
-+ MMIO_OUT32(mmGEN_INT_STATUS, gen_int_status.val);
-+
-+ /* enable vline irq */
-+ gen_int_cntl.f.crtc_vline_mask = 1;
-+ MMIO_OUT32(gen_int_cntl.val, mmGEN_INT_CNTL);
-+
-+ /* clear vline irq status */
-+ MMIO_OUT32(mmGEN_INT_STATUS, gen_int_status.val);
-+
-+ while (timeout > 0) {
-+ if (MMIO_IN32(mmGEN_INT_STATUS) & 0x00000002) {
-+ break;
-+ }
-+ usleep(1);
-+ timeout--;
-+ }
-+
-+ /* disable vline irq */
-+ gen_int_cntl.f.crtc_vline_mask = 0;
-+ MMIO_OUT32(mmGEN_INT_CNTL, gen_int_cntl.val);
-+
-+ /* clear vline irq status */
-+ MMIO_OUT32(mmGEN_INT_STATUS, gen_int_status.val);
-+}
-+
-+
-Index: xorg-server-1.2.0/hw/kdrive/imageon/imageon_video.c
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/imageon_video.c 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,1172 @@
-+/*
-+ * Copyright © 2007 Manuel Teira
-+ *
-+ * 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 Manuel Teira not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Manuel Teira makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MANUEL TEIRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL MANUEL TEIRA 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 "imageon.h"
-+#include "imageon_regs.h"
-+#include "imageon_support.h"
-+#include "imageon_const.h"
-+#include "kaa.h"
-+
-+#include <X11/extensions/Xv.h>
-+#include "fourcc.h"
-+
-+static Atom xvBrightness;
-+static Atom xvMaxOverlaySize;
-+static Atom xvColorKey;
-+
-+#define IMAGE_MAX_WIDTH 720
-+#define IMAGE_MAX_HEIGHT 576
-+
-+#define W_ALIGN 0
-+#define H_ALIGN 0
-+
-+#define OVL_W_ALIGN 16
-+#define OVL_H_ALIGN 16
-+
-+#define OVL_MAX_SIZE 196608
-+
-+static KdVideoEncodingRec DummyEncoding[1] = {
-+ {0, "XV_IMAGE", IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT, {1, 1}}
-+};
-+
-+#define NUM_IMAGES (4)
-+static KdImageRec Images[NUM_IMAGES] = {
-+ XVIMAGE_YUY2,
-+ XVIMAGE_YV12,
-+ XVIMAGE_I420,
-+ XVIMAGE_UYVY
-+};
-+
-+#define NUM_FORMATS (3)
-+static KdVideoFormatRec Formats[NUM_FORMATS] = {
-+ {15, TrueColor},
-+ {16, TrueColor},
-+ {24, TrueColor}
-+};
-+
-+#define NUM_ATTRIBUTES (3)
-+static KdAttributeRec Attributes[NUM_ATTRIBUTES] = {
-+ {XvSettable | XvGettable, 0, (1 << 16) - 1, "XV_COLORKEY"},
-+ {XvSettable | XvGettable, 0, 127, "XV_BRIGHTNESS"},
-+ {XvSettable | XvGettable, 0, 392960, "XV_MAXOVERLAYSIZE"}
-+};
-+
-+#define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE)
-+
-+#define NUM_OVL_RESIZERS (10)
-+static struct {
-+ CARD8 xfactor;
-+ CARD8 yfactor;
-+} ovlResizers[NUM_OVL_RESIZERS] = {
-+ { 0, 0 },
-+ { 0, 1 }, { 1, 0 }, { 1, 1 },
-+ { 1, 2 }, { 2, 1 }, { 2, 2 },
-+ { 2, 3 }, { 3, 2 }, { 3, 3 }
-+};
-+
-+static int W100SurfaceSize(W100PortPrivPtr port, short w, short h)
-+{
-+ int size = 0;
-+ DBG_IMAGEON(("W100SurfaceSize for id=%08x, w=%d, h=%d\n",
-+ port->src.id, w, h));
-+
-+ switch (port->src.id) {
-+ case FOURCC_YV12:
-+ case FOURCC_I420:
-+ size = (3 * w * h) / 2;
-+ break;
-+ case FOURCC_UYVY:
-+ case FOURCC_YUY2:
-+ size = w * h * 2;
-+ break;
-+ }
-+ return size;
-+}
-+
-+static void W100ClearSurface(KdScreenInfo *screen,
-+ KdOffscreenArea *area,
-+ CARD16 x,
-+ CARD16 y,
-+ CARD16 pitch,
-+ CARD16 width,
-+ CARD16 height,
-+ int id)
-+{
-+ W100CardInfo(screen);
-+ int nplanes;
-+ unsigned int subsampling[] = {0, 1, 1};
-+ unsigned int zero[] = {0, 0x80, 0x80};
-+ int bpp;
-+ int plane;
-+ CARD8 *dstOffset = area->vidmem->base + area->offset;
-+
-+ switch (id) {
-+ case FOURCC_UYVY:
-+ case FOURCC_YUY2:
-+ nplanes = 1;
-+ bpp = 16;
-+ break;
-+ case FOURCC_YV12:
-+ case FOURCC_I420:
-+ nplanes = 3;
-+ bpp = 8;
-+ }
-+
-+ DBG_IMAGEON(("Clearing surface with planes:%d, bpp:%d, pitch:%d, height:%d\n",
-+ nplanes, bpp, pitch, height));
-+
-+ W100ResetContext(w100c);
-+ for (plane = 0; plane < nplanes; plane++) {
-+ W100SetDestination(screen,
-+ pitch >> subsampling[plane],
-+ (CARD32) dstOffset,
-+ bpp);
-+ if (W100WaitCmdFifoEntries(w100c, 6)) {
-+ MMIO_OUT32(mmDST_PITCH, w100c->ctx.dst.pitch);
-+ MMIO_OUT32(mmDST_OFFSET, w100c->ctx.dst.offset);
-+ MMIO_OUT32(mmDP_GUI_MASTER_CNTL,
-+ W100ComputeSolidGmc(w100c, GXcopy));
-+ MMIO_OUT32(mmDP_BRUSH_FRGD_CLR, zero[plane]);
-+ MMIO_OUT32(mmDST_Y_X, 0);
-+ MMIO_OUT32(mmDST_HEIGHT_WIDTH, (height << 16) | width);
-+ } else {
-+ ErrorF("Error clearing surface\n");
-+ break;
-+ }
-+ dstOffset += (pitch * height) >> (subsampling[plane] * 2);
-+ }
-+}
-+
-+static void W100OverlaySetup(KdScreenInfo *screen)
-+{
-+ W100ScreenInfo *w100s = screen->driver;
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+ CARD16 w, h, pitch;
-+ video_ctrl_u video_ctrl;
-+ video_y_offset_u video_y_offset;
-+ video_y_pitch_u video_y_pitch;
-+ video_u_offset_u video_u_offset;
-+ video_u_pitch_u video_u_pitch;
-+ video_v_offset_u video_v_offset;
-+ video_v_pitch_u video_v_pitch;
-+ graphic_key_u graphic_key;
-+ video_h_pos_u video_hpos;
-+ video_v_pos_u video_vpos;
-+ graphic_h_disp_u graphic_h_disp;
-+ graphic_v_disp_u graphic_v_disp;
-+
-+ w = pitch = port->ovl.frame.x2 - port->ovl.frame.x1 + 1;
-+ h = port->ovl.frame.y2 - port->ovl.frame.y1 + 1;
-+
-+ ErrorF("W100OverlaySetup(ovlX:%d,ovlY:%d,ovlWidth:%d,ovlHeight:%d,"
-+ "videoHorExp:%d,videoVerExp:%d,YPlane:0x%08x,UPlane:0x%08x,"
-+ "VPlane:0x%08x)\n",
-+ port->ovl.frame.x1, port->ovl.frame.y1, w, h,
-+ port->ovl.horExp,
-+ port->ovl.verExp,
-+ port->planes.yplane,
-+ port->planes.uplane,
-+ port->planes.vplane);
-+
-+ if (port->videoStatus & W100_OVERLAY_CONFIGURED) {
-+ return;
-+ }
-+
-+ w <<= port->ovl.horExp;
-+ h <<= port->ovl.verExp;
-+
-+ video_ctrl.val = w100c->regs.VIDEO_CTRL;
-+
-+ video_ctrl.f.video_inv_hor = 0;
-+ video_ctrl.f.video_inv_ver = 0;
-+ video_ctrl.f.yuv2rgb_option = 0;
-+ video_ctrl.f.video_hor_exp = port->ovl.horExp;
-+ video_ctrl.f.video_ver_exp = port->ovl.verExp;
-+ video_ctrl.f.video_ch_sel = 0;
-+
-+ video_ctrl.f.yuv2rgb_en = 1;
-+ //Only support this, by the moment
-+ video_ctrl.f.video_mode = OVLFORMAT_YUV420;
-+
-+
-+ video_y_pitch.val = 0;
-+ video_u_pitch.val = 0;
-+ video_v_pitch.val = 0;
-+ video_y_pitch.f.y_pitch = pitch;
-+ video_u_pitch.f.u_pitch = pitch >> 1;
-+ video_v_pitch.f.v_pitch = pitch >> 1;
-+
-+ video_y_offset.val = 0;
-+ video_u_offset.val = 0;
-+ video_v_offset.val = 0;
-+ video_y_offset.f.y_offset = port->planes.yplane;
-+ video_u_offset.f.u_offset = port->planes.uplane;
-+ video_v_offset.f.v_offset = port->planes.vplane;
-+
-+ graphic_key.val = 0;
-+ graphic_key.f.keyer_color = port->ovl.colorKey;
-+ graphic_key.f.keyer_mask = 0xffffUL;
-+ video_ctrl.f.keyer_en = 1;
-+
-+ graphic_h_disp.val = w100c->regs.GRAPHIC_H_DISP;
-+ graphic_v_disp.val = w100c->regs.GRAPHIC_V_DISP;
-+
-+ video_hpos.f.video_h_start = graphic_h_disp.f.graphic_h_start
-+ + port->ovl.frame.x1;
-+ video_hpos.f.video_h_end = video_hpos.f.video_h_start + w;
-+
-+ video_vpos.f.video_v_start = graphic_v_disp.f.graphic_v_start
-+ + port->ovl.frame.y1;
-+ video_vpos.f.video_v_end = video_vpos.f.video_v_start + h;
-+ if (video_hpos.f.video_h_end > graphic_h_disp.f.graphic_h_end) {
-+ w = graphic_h_disp.f.graphic_h_end - video_hpos.f.video_h_start;
-+ }
-+
-+ //This is possibly not valid for non planar modes
-+ video_ctrl.f.total_req_video = (w + 3) / 4;
-+
-+ W100DisableDisplayUpdate(w100c);
-+ //This need to be tuned deeply, to get an stable
-+ //overlay image:
-+ //Best results seems to be present with 0x40xxxxxx
-+ //But overlay surface must be located in a 8 dot multiple
-+ MMIO_OUT32(mmDISP_DEBUG2,
-+ (w100c->regs.DISP_DEBUG2 & ~0xff000000) | 0x40000000 );
-+ MMIO_OUT32(mmGRAPHIC_KEY, graphic_key.val);
-+ MMIO_OUT32(mmVIDEO_Y_OFFSET, video_y_offset.val);
-+ MMIO_OUT32(mmVIDEO_Y_PITCH, video_y_pitch.val);
-+ MMIO_OUT32(mmVIDEO_U_OFFSET, video_u_offset.val);
-+ MMIO_OUT32(mmVIDEO_U_PITCH, video_u_pitch.val);
-+ MMIO_OUT32(mmVIDEO_V_OFFSET, video_v_offset.val);
-+ MMIO_OUT32(mmVIDEO_V_PITCH, video_v_pitch.val);
-+ MMIO_OUT32(mmVIDEO_CTRL, video_ctrl.val);
-+ MMIO_OUT32(mmVIDEO_H_POS, video_hpos.val);
-+ MMIO_OUT32(mmVIDEO_V_POS, video_vpos.val);
-+ W100EnableDisplayUpdate(w100c);
-+
-+ port->videoCtrl = video_ctrl.val;
-+ port->videoStatus |= W100_OVERLAY_CONFIGURED;
-+}
-+
-+static void W100OverlayEnable(KdScreenInfo *screen)
-+{
-+ W100ScreenInfo *w100s = screen->driver;
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+ video_ctrl_u video_ctrl;
-+
-+ if (!(port->videoStatus & W100_OVERLAY_CONFIGURED)) {
-+ W100OverlaySetup(screen);
-+ }
-+
-+ if (!(port->videoStatus & W100_OVERLAY_ON)) {
-+ ErrorF("W100OverlayEnable()\n");
-+ video_ctrl.val = port->videoCtrl;
-+ video_ctrl.f.en_video_req = 1;
-+ video_ctrl.f.en_video_crtc = 1;
-+ video_ctrl.f.en_graphic_req_video = 1;
-+ W100DisableDisplayUpdate(w100c);
-+ MMIO_OUT32(mmVIDEO_CTRL, video_ctrl.val);
-+ W100EnableDisplayUpdate(w100c);
-+ port->videoCtrl = video_ctrl.val;
-+ port->videoStatus |= W100_OVERLAY_ON;
-+ }
-+}
-+
-+static void W100OverlayDisable(KdScreenInfo *screen)
-+{
-+
-+ W100ScreenInfo *w100s = screen->driver;
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+
-+ video_ctrl_u video_ctrl;
-+
-+ if ((port->videoStatus & W100_OVERLAY_ON)) {
-+ ErrorF("W100OverlayDisable()\n");
-+ video_ctrl.val = port->videoCtrl;
-+ video_ctrl.f.en_video_req = 0;
-+ video_ctrl.f.en_video_crtc = 0;
-+ video_ctrl.f.en_graphic_req_video = 0;
-+ W100DisableDisplayUpdate(w100c);
-+ MMIO_OUT32(mmVIDEO_CTRL, video_ctrl.val);
-+ W100EnableDisplayUpdate(w100c);
-+ port->videoCtrl = video_ctrl.val;
-+ port->videoStatus &= ~W100_OVERLAY_ON;
-+ }
-+}
-+
-+static void W100VideoSave(ScreenPtr pScreen, KdOffscreenArea *area)
-+{
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+
-+ if (port->src.surface == area) {
-+ port->src.surface = NULL;
-+ }
-+
-+ if (port->ovl.surface == area) {
-+ port->ovl.surface = NULL;
-+ }
-+}
-+
-+static void W100SaveSurface(CARD8 *src, int size, const char *file)
-+{
-+ int fd;
-+ if (fd = open(file, O_WRONLY | O_CREAT | O_TRUNC,
-+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) {
-+ write(fd, (void*) src, size);
-+ close(fd);
-+ }
-+}
-+
-+static void W100HostPlanarData(KdScreenInfo *screen)
-+{
-+ W100ScreenInfo *w100s = screen->driver;
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+ KdOffscreenArea *dst = port->src.surface;
-+ CARD8 *src = port->src.buffer;
-+ CARD16 srcPitch = port->src.width; //WARN: padding?
-+ CARD16 srcHeight = port->src.height;
-+ CARD16 dstPitch = port->src.box.x2 - port->src.box.x1 + 1; //WARN: padding?
-+ CARD16 dstHeight = port->src.box.y2 - port->src.box.y1 + 1;
-+ CARD16 srcX = port->src.box.x1;
-+ CARD16 srcY = port->src.box.y1;
-+ CARD16 dstX = 0;
-+ CARD16 dstY = 0;
-+ CARD16 w = dstPitch;
-+ CARD16 h = dstHeight;
-+ CARD8 *dstBase = dst->vidmem->base + dst->offset;
-+ CARD8 *dstPtr;
-+ CARD8 *srcPtr;
-+ int i;
-+
-+ srcPtr = src + (srcY * srcPitch) + srcX;
-+ dstPtr = dstBase + (dstY * dstPitch) + dstX;
-+
-+ DBG_IMAGEON(("W100HostPlanarData(src(pitch:%d,offset:0x%08x,x:%d,y:%d),"
-+ "dst(pitch:%d,offset:0x%08x,x:%d,y:%d), w:%d,h:%d)\n",
-+ srcPitch, srcPtr, srcX, srcY,
-+ dstPitch, dstPtr, dstX, dstY,
-+ w, h));
-+
-+ /* Copy Y plane */
-+ for (i = 0; i < h; i++) {
-+ memcpy(dstPtr, srcPtr, w);
-+ dstPtr += dstPitch;
-+ srcPtr += srcPitch;
-+ }
-+ /* Copy U plane */
-+ dstPtr = dstBase + (dstHeight * dstPitch) //Start of U Plane
-+ + (dstX >> 1) //X Offset
-+ + ((dstY * dstPitch) >> 2); //Y Offset
-+ if (port->src.id == FOURCC_I420) {
-+ srcPtr = src + (srcHeight * srcPitch) //Start of U Plane
-+ + (srcX >> 1) //X Offset
-+ + ((srcY * srcPitch) >> 2); //Y Offset
-+ } else {
-+ srcPtr = src + ((5 * srcHeight * srcPitch) / 4) //Start of U Plane
-+ + (srcX >> 1) //X Offset
-+ + ((srcY * srcPitch) >> 2); //Y Offset
-+ }
-+ for (i = 0; i < (h >> 1); i++) {
-+ memcpy(dstPtr, srcPtr, w >> 1); //U Plane scanline
-+ srcPtr += srcPitch >> 1;
-+ dstPtr += dstPitch >> 1;
-+ }
-+
-+ /* Copy V plane */
-+ dstPtr = dstBase + ((5 * dstHeight * dstPitch) / 4) //Start of V Plane
-+ + (dstX >> 1) //X Offset
-+ + ((dstY * dstPitch) >> 2); //Y Offset
-+ if (port->src.id == FOURCC_I420) {
-+ srcPtr = src + ((5 * srcHeight * srcPitch) / 4) //Start of V Plane
-+ + (srcX >> 1) //X Offset
-+ + ((srcY * srcPitch) >> 2); //Y Offset
-+ } else {
-+ srcPtr = src + (srcHeight * srcPitch) //Start of V Plane
-+ + (srcX >> 1) //X Offset
-+ + ((srcY * srcPitch) >> 2); //Y Offset
-+ }
-+ for (i = 0; i < (h >> 1); i++) {
-+ memcpy(dstPtr, srcPtr, w >> 1); //V Plane scanline
-+ srcPtr += srcPitch >> 1;
-+ dstPtr += dstPitch >> 1;
-+ }
-+}
-+
-+static void W100HostPackedData(KdScreenInfo *screen)
-+{
-+ W100ScreenInfo *w100s = screen->driver;
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+ KdOffscreenArea *dst = port->src.surface;
-+ CARD8 *src = port->src.buffer;
-+ CARD16 srcPitch = port->src.width << 1; //WARN: padding?
-+ CARD16 dstPitch = (port->src.box.x2 - port->src.box.x1 + 1) << 1;
-+ CARD16 srcX = port->src.box.x1;
-+ CARD16 srcY = port->src.box.y1;
-+ CARD16 dstX = 0;
-+ CARD16 dstY = 0;
-+ CARD16 w = port->src.box.x2 - port->src.box.x1 + 1;
-+ CARD16 h = port->src.box.y2 - port->src.box.y1 + 1;
-+
-+ CARD8 *dstBase = dst->vidmem->base + dst->offset;
-+ CARD8 *dstPtr = dstBase + (dstY * dstPitch) + (dstX << 1);
-+ CARD8 *srcPtr = src + (srcY + srcPitch) + (srcX << 1);
-+
-+ DBG_IMAGEON(("W100HostPackedData(src(pitch:%d,offset:0x%08x,x:%d,y:%d),"
-+ "dst(pitch:%d,offset:0x%08x,x:%d,y:%d), w:%d,h:%d)\n",
-+ srcPitch, srcPtr, srcX, srcY,
-+ dstPitch, dstPtr, dstX, dstY,
-+ w, h));
-+ while (h--) {
-+ memcpy(dstPtr, srcPtr, (w << 1)); /* 16bpp assumed */
-+ srcPtr += srcPitch;
-+ dstPtr += dstPitch;
-+ }
-+}
-+
-+
-+static void W100StopVideo(KdScreenInfo *screen, pointer data, Bool exit)
-+{
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = (W100PortPrivPtr)data;
-+
-+ DBG_IMAGEON(("W100StopVideo(exit:%d)\n", exit));
-+
-+ REGION_EMPTY(screen->pScreen, &port->clip);
-+
-+ if (exit) {
-+ if (port->videoStatus & W100_OVERLAY_ON) {
-+ W100OverlayDisable(screen);
-+ }
-+ if (port->src.surface) {
-+ KdOffscreenFree(screen->pScreen, port->src.surface);
-+ port->src.surface = NULL;
-+ }
-+
-+ if (port->ovl.surface) {
-+ KdOffscreenFree(screen->pScreen, port->ovl.surface);
-+ port->ovl.surface = NULL;
-+ }
-+ port->src.id = -1; // Just to avoid cached values.
-+ } else {
-+ if (port->videoStatus & W100_OVERLAY_ON) {
-+ W100OverlayDisable(screen);
-+ }
-+ }
-+}
-+
-+static int W100SetPortAttribute(KdScreenInfo *screen,
-+ Atom attribute,
-+ int value,
-+ pointer data)
-+{
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = (W100PortPrivPtr)data;
-+
-+ if (attribute == xvBrightness) {
-+ DBG_IMAGEON(("Setting Brightness attribute to %d\n", value));
-+ W100SetBrightness(w100c, value);
-+ port->ovl.brightness = value;
-+ } else if (attribute == xvMaxOverlaySize) {
-+ DBG_IMAGEON(("Setting MaxOverlaySize to %d\n", value));
-+ port->ovl.maxSize = value;
-+ } else if (attribute == xvColorKey) {
-+ DBG_IMAGEON(("Setting ColorKey attribute to %d\n", value));
-+ port->ovl.colorKey = value;
-+ }
-+ return Success;
-+}
-+
-+static int W100GetPortAttribute(KdScreenInfo *screen,
-+ Atom attribute,
-+ int *value,
-+ pointer data)
-+{
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = (W100PortPrivPtr)data;
-+
-+ if (attribute == xvBrightness) {
-+ DBG_IMAGEON(("Getting Brightness attribute\n"));
-+ *value = port->ovl.brightness;
-+ } else if (attribute == xvMaxOverlaySize) {
-+ *value = port->ovl.maxSize;
-+ DBG_IMAGEON(("Getting Contrast attribute\n"));
-+ } else if (attribute == xvColorKey) {
-+ DBG_IMAGEON(("Getting ColorKey attribute\n"));
-+ *value = port->ovl.colorKey;
-+ }
-+ return Success;
-+}
-+
-+static void W100QueryBestSize(KdScreenInfo *screen,
-+ Bool motion,
-+ short vid_w, short vid_h, /*Video dimensions */
-+ short drw_w, short drw_h, /*Drawable dimensions */
-+ unsigned int *p_w,
-+ unsigned int *p_h,
-+ pointer data)
-+{
-+ DBG_IMAGEON(("W100QueryBestSize(vid_w:%d,vid_h:%d,drw_w:%d,drw_h:%d)\n",
-+ vid_w, vid_h, drw_w, drw_h));
-+ int xscaler = W100GetScaler(drw_w, vid_w);
-+ int yscaler = W100GetScaler(drw_h, vid_h);
-+ *p_w = W100ApplyScaler(vid_w, xscaler);
-+ *p_h = W100ApplyScaler(vid_h, yscaler);
-+}
-+
-+static int W100QueryImageAttributes(KdScreenInfo *screen,
-+ int id,
-+ unsigned short *w, unsigned short *h,
-+ int *pitches, int *offsets)
-+{
-+ int size, tmp;
-+
-+ DBG_IMAGEON(("W100QueryImageAttributes(id:%d,w:%d,h:%d)\n", id, *w, *h));
-+
-+ if (*w > IMAGE_MAX_WIDTH) {
-+ *w = IMAGE_MAX_WIDTH;
-+ }
-+ if (*h > IMAGE_MAX_HEIGHT) {
-+ *h = IMAGE_MAX_HEIGHT;
-+ }
-+
-+ if (W_ALIGN) {
-+ *w = (*w + (W_ALIGN - 1)) & ~(W_ALIGN - 1);
-+ }
-+ if (H_ALIGN) {
-+ *h = (*h + (H_ALIGN - 1)) & ~(H_ALIGN - 1);
-+ }
-+
-+ if (offsets) {
-+ offsets[0] = 0;
-+ }
-+
-+ switch (id) {
-+ /* Planar formats */
-+ 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;
-+ /* Packed Formats */
-+ case FOURCC_UYVY:
-+ case FOURCC_YUY2:
-+ default:
-+ size = *w << 1;
-+ if (pitches) pitches[0] = size;
-+ size *= *h;
-+ break;
-+ }
-+ return size;
-+}
-+
-+static void W100ClipVideo(BoxPtr src, BoxPtr dst, BoxPtr extents,
-+ short width, short height)
-+{
-+ INT32 vscale, hscale, delta;
-+ INT32 diff, x1, x2, y1, y2;
-+
-+ hscale = ((src->x2 - src->x1) << 16) / (dst->x2 - dst->x1);
-+ vscale = ((src->y2 - src->y1) << 16) / (dst->y2 - dst->y1);
-+
-+ x1 = src->x1 << 16;
-+ x2 = src->x2 << 16;
-+ y1 = src->y1 << 16;
-+ y2 = src->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;
-+ }
-+
-+ src->x1 = x1 >> 16;
-+ src->x2 = x2 >> 16;
-+ src->y1 = y1 >> 16;
-+ src->y2 = y2 >> 16;
-+}
-+
-+static Bool W100SetOverlaySource(W100PortPrivPtr port,
-+ unsigned char *buffer,
-+ int id,
-+ short src_x, short src_y,
-+ short src_w, short src_h,
-+ short width, short height,
-+ short drw_x, short drw_y,
-+ short drw_w, short drw_h,
-+ RegionPtr clipBoxes)
-+{
-+
-+ BoxRec srcBox, dstBox;
-+ Bool changed = FALSE;
-+
-+ srcBox.x1 = src_x;
-+ srcBox.x2 = src_x + src_w - 1;
-+ srcBox.y1 = src_y;
-+ srcBox.y2 = src_y + src_h - 1;
-+
-+ dstBox.x1 = drw_x;
-+ dstBox.x2 = drw_x + drw_w - 1;
-+ dstBox.y1 = drw_y;
-+ dstBox.y2 = drw_y + drw_h - 1;
-+
-+ W100ClipVideo(&srcBox, &dstBox,
-+ REGION_EXTENTS(pScreen, clipBoxes),
-+ width, height);
-+
-+ port->src.buffer = buffer;
-+ port->ovl.changed = FALSE;
-+
-+ if (port->src.id != id) {
-+ port->src.id = id;
-+ changed = TRUE;
-+ port->ovl.changed = TRUE;
-+ }
-+ if (port->src.box.x1 != srcBox.x1) {
-+ port->src.box.x1 = srcBox.x1;
-+ changed = TRUE;
-+ }
-+ if (port->src.box.x2 != srcBox.x2) {
-+ port->src.box.x2 = srcBox.x2;
-+ changed = TRUE;
-+ }
-+ if (port->src.box.y1 != srcBox.y1) {
-+ port->src.box.y1 = srcBox.y1;
-+ changed = TRUE;
-+ }
-+ if (port->src.box.y2 != srcBox.y2) {
-+ port->src.box.y2 = srcBox.y2;
-+ changed = TRUE;
-+ }
-+ if (port->src.width != width) {
-+ port->src.width = width;
-+ changed = TRUE;
-+ }
-+ if (port->src.height != height) {
-+ port->src.height = height;
-+ changed = TRUE;
-+ }
-+
-+ if (port->dst.box.x1 != dstBox.x1) {
-+ port->dst.box.x1 = dstBox.x1;
-+ changed = TRUE;
-+ }
-+ if (port->dst.box.x2 != dstBox.x2) {
-+ port->dst.box.x2 = dstBox.x2;
-+ changed = TRUE;
-+ }
-+ if (port->dst.box.y1 != dstBox.y1) {
-+ port->dst.box.y1 = dstBox.y1;
-+ changed = TRUE;
-+ }
-+ if (port->dst.box.y2 != dstBox.y2) {
-+ port->dst.box.y2 = dstBox.y2;
-+ changed = TRUE;
-+ }
-+
-+ if (changed) {
-+ port->src.size = W100SurfaceSize(port,
-+ srcBox.x2 - srcBox.x1 + 1,
-+ srcBox.y2 - srcBox.y1 + 1);
-+ }
-+ port->changed = changed;
-+ return changed;
-+}
-+
-+
-+
-+static int W100SetOverlaySurfaces(KdScreenInfo *screen,
-+ short x, short y, short w, short h)
-+{
-+ W100ScreenInfo *w100s = screen->driver;
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+
-+ if (port->ovl.changed ||
-+ (port->ovl.frame.x1 != x) ||
-+ (port->ovl.frame.y1 != y) ||
-+ (port->ovl.frame.x2 != (x + w - 1)) ||
-+ (port->ovl.frame.y2 != (y + h - 1))) {
-+
-+ port->ovl.changed = TRUE;
-+ port->ovl.frame.x1 = x;
-+ port->ovl.frame.x2 = x + w - 1;
-+ port->ovl.frame.y1 = y;
-+ port->ovl.frame.y2 = y + h - 1;
-+
-+ W100MapToDevice(w100c, &port->dst.box, &port->ovl.box);
-+ W100ChangeOrigin(&port->ovl.box,
-+ port->ovl.frame.x1, port->ovl.frame.y1);
-+ port->ovl.box.x2 >>= port->ovl.horExp;
-+ port->ovl.box.y2 >>= port->ovl.verExp;
-+ DBG_IMAGEON(("Translated ovl.box(x1:%d,y1:%d,x2:%d,y2:%d)\n",
-+ port->ovl.box.x1, port->ovl.box.y1,
-+ port->ovl.box.x2, port->ovl.box.y2));
-+ }
-+
-+ switch (port->src.id) {
-+ case FOURCC_YV12:
-+ case FOURCC_I420:
-+ port->planes.size = 3;
-+ port->planes.offset[0] = 0;
-+ port->planes.offset[1] = w * h;
-+ port->planes.offset[2] = (5 * (w * h)) / 4;
-+ port->planes.bpp = 8;
-+ break;
-+ case FOURCC_UYVY:
-+ case FOURCC_YUY2:
-+ port->planes.size = 1;
-+ port->planes.offset[0] = 0;
-+ port->planes.bpp = 16;
-+ break;
-+ }
-+
-+ if (port->ovl.surface && port->ovl.size != port->ovl.surface->size) {
-+ KdOffscreenFree(screen->pScreen, port->ovl.surface);
-+ KdOffscreenFree(screen->pScreen, port->src.surface);
-+ port->ovl.surface = NULL;
-+ port->src.surface = NULL;
-+ }
-+ if (port->src.surface && port->src.size != port->src.surface->size) {
-+ KdOffscreenFree(screen->pScreen, port->src.surface);
-+ port->src.surface = NULL;
-+ }
-+
-+ if (!port->ovl.surface) {
-+ port->ovl.surface = KdOffscreenAllocPrio(screen->pScreen,
-+ port->ovl.size, 0, TRUE,
-+ W100VideoSave,
-+ port,
-+ KD_VIDMEM_MAXPRIO,
-+ KD_VIDMEM_MAXPRIO,
-+ TRUE);
-+ if (!port->ovl.surface) {
-+ ErrorF("Using external memory for overlay surface. "
-+ "Expect bad performance\n");
-+ port->ovl.surface = KdOffscreenAlloc(screen->pScreen,
-+ port->ovl.size, 0, TRUE,
-+ W100VideoSave,
-+ port);
-+ }
-+ if (!port->ovl.surface) {
-+ ErrorF("Unable to allocate %d bytes for overlay surface\n",
-+ port->ovl.size);
-+ return BadAlloc;
-+ }
-+
-+ W100ClearSurface(screen, port->ovl.surface,
-+ 0, 0,
-+ (w * port->planes.bpp / 8),
-+ w, h, port->src.id);
-+ }
-+ if (!port->src.surface) {
-+ port->src.surface = KdOffscreenAlloc(screen->pScreen,
-+ port->src.size, 0, TRUE,
-+ W100VideoSave,
-+ port);
-+ if (!port->src.surface) {
-+ ErrorF("Unable to allocate %d bytes for offscreen surface\n",
-+ port->src.size);
-+ return BadAlloc;
-+ }
-+ }
-+
-+ CARD32 baseAddr = (CARD32) W100_HOST2CARD(port->ovl.surface->vidmem->base +
-+ port->ovl.surface->offset);
-+
-+
-+ switch (port->src.id) {
-+ case FOURCC_YV12:
-+ case FOURCC_I420:
-+ port->planes.yplane = baseAddr + port->planes.offset[0];
-+ port->planes.uplane = baseAddr + port->planes.offset[1];
-+ port->planes.vplane = baseAddr + port->planes.offset[2];
-+ break;
-+ case FOURCC_UYVY:
-+ case FOURCC_YUY2:
-+ port->planes.yplane = baseAddr + port->planes.offset[0];
-+ port->planes.uplane = 0;
-+ port->planes.vplane = 0;
-+ break;
-+ }
-+
-+ return Success;
-+}
-+
-+static int W100OvlSetup(KdScreenInfo *screen)
-+{
-+ W100ScreenInfo *w100s = screen->driver;
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+ BoxRec ovlBox;
-+ short x, y, w, h;
-+ int i;
-+
-+ W100MapToDevice(w100c, &port->dst.box, &ovlBox);
-+
-+ x = ovlBox.x1 & ~7;
-+ y = ovlBox.y1;
-+
-+ for (i = 0; i < NUM_OVL_RESIZERS; i++) {
-+ w = (ovlBox.x2 - x + 1) >> ovlResizers[i].xfactor;
-+ h = (ovlBox.y2 - y + 1) >> ovlResizers[i].yfactor;
-+ w = W100_ALIGN(w, OVL_W_ALIGN);
-+ h = W100_ALIGN(h, OVL_H_ALIGN);
-+ port->ovl.size = W100SurfaceSize(port, w, h);
-+ DBG_IMAGEON(("Trying overlay surface (x:%d,y:%d,w:%d,h:%d). Size %d."
-+ " xfactor:%d, yfactor:%d\n",
-+ x, y, w, h, port->ovl.size,
-+ ovlResizers[i].xfactor,
-+ ovlResizers[i].yfactor));
-+ if (port->ovl.size <= port->ovl.maxSize) {
-+ ErrorF("Using (x=%d,y=%d,w=%d,h=%d) overlay surface (%d bytes). "
-+ "Resizer(xfactor:%d,yfactor:%d)\n",
-+ x, y, w, h, port->ovl.size,
-+ ovlResizers[i].xfactor, ovlResizers[i].yfactor);
-+ port->ovl.horExp = ovlResizers[i].xfactor;
-+ port->ovl.verExp = ovlResizers[i].yfactor;
-+ return W100SetOverlaySurfaces(screen, x, y, w, h);
-+ }
-+ }
-+ return BadAlloc;
-+}
-+
-+static void W100OvlHostData(KdScreenInfo *screen)
-+{
-+ W100ScreenInfo *w100s = screen->driver;
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+
-+ W100WaitIdle(w100c);
-+ switch (port->src.id) {
-+ case FOURCC_YV12:
-+ case FOURCC_I420:
-+ W100HostPlanarData(screen);
-+ break;
-+ case FOURCC_UYVY:
-+ case FOURCC_YUY2:
-+ W100HostPackedData(screen);
-+ break;
-+ }
-+}
-+
-+static void W100OvlBlt(KdScreenInfo *screen)
-+{
-+ W100ScreenInfo *w100s = screen->driver;
-+ W100CardInfo(screen);
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+ static int frame = 0;
-+ int srcW = port->src.box.x2 - port->src.box.x1 + 1;
-+ int srcH = port->src.box.y2 - port->src.box.y1 + 1;
-+ int dstW = port->ovl.frame.x2 - port->ovl.frame.x1 + 1;
-+ int dstH = port->ovl.frame.y2 - port->ovl.frame.y1 + 1;
-+
-+ DBG_IMAGEON(("ovl.box(x1:%d,y1:%d,x2:%d,y2:%d),"
-+ "src.box(x1:%d,y1:%d,x2:%d,y2:%d),"
-+ "dstW:%d, dstH:%d\n",
-+ port->ovl.box.x1, port->ovl.box.y1,
-+ port->ovl.box.x2, port->ovl.box.y2,
-+ port->src.box.x1, port->src.box.y1,
-+ port->src.box.x2, port->src.box.y2,
-+ dstW, dstH));
-+
-+ W100PlanarBlt(screen, //KdScreenInfo* screen
-+ port->planes.size, //int planes
-+ port->planes.offset, //int planeOffsets[]
-+ port->planes.bpp, //int bpp
-+ w100c->hw_window.randr, //int randr
-+ port->src.surface, //KdOffscrenArea *src
-+ srcW, //int srcW
-+ srcH, //int srcH
-+ &port->src.box, //BoxPtr srcBox
-+ port->ovl.surface, //KdOffscreenArea *dst
-+ dstW, //int dstW
-+ dstH, //int dstH
-+ &port->ovl.box); //BoxPtr dstBox
-+
-+#if 0
-+ if (++frame == 10) {
-+ W100SaveSurface(port->src.surface->vidmem->base +
-+ port->src.surface->offset,
-+ port->src.surface->size,
-+ "/media/card/kdrive/source.yuv");
-+ W100SaveSurface(port->ovl.surface->vidmem->base +
-+ port->ovl.surface->offset,
-+ port->ovl.surface->size,
-+ "/media/card/kdrive/ovl.yuv");
-+ exit(1);
-+ }
-+#endif
-+}
-+
-+static void W100OvlUpdate(KdScreenInfo *screen)
-+{
-+ W100ScreenInfo *w100s = screen->driver;
-+ W100PortPrivPtr port = w100s->pAdaptor->pPortPrivates[0].ptr;
-+
-+ if (port->videoStatus & W100_OVERLAY_ON) {
-+ W100OverlayDisable(screen);
-+ }
-+ port->videoStatus &= ~W100_OVERLAY_CONFIGURED;
-+
-+ W100OverlayEnable(screen);
-+}
-+
-+static int W100PutImage(KdScreenInfo *screen,
-+ DrawablePtr pDraw, /* Destination drawable */
-+ short src_x, short src_y, /* Source coordinates */
-+ short drw_x, short drw_y, /* Destination coordinates */
-+ short src_w, short src_h, /* Source rectangle to put */
-+ short drw_w, short drw_h, /* Destination size */
-+ int id, /* FOURCC id */
-+ unsigned char *buffer, /* Source data */
-+ short width, /* Source width */
-+ short height, /* Source height */
-+ Bool sync, /* Sync before returning */
-+ RegionPtr clipBoxes,
-+ pointer data)
-+{
-+ ScreenPtr pScreen = screen->pScreen;
-+ KdScreenPriv(pScreen);
-+ W100CardInfo(pScreenPriv);
-+ W100ScreenInfo(pScreenPriv);
-+ W100PortPrivPtr port = (W100PortPrivPtr) data;
-+ int errCode;
-+
-+ DBG_IMAGEON(("W100PutImage(src(x:%d,y:%d,w:%d,h:%d),"
-+ "drw(x:%d,y:%d,w:%d,h:%d),"
-+ "width:%d,height:%d), buffer:%p)\n",
-+ src_x,src_y,src_w,src_h,
-+ drw_x,drw_y,drw_w,drw_h,
-+ width, height,
-+ buffer));
-+
-+ if (W100SetOverlaySource(port, buffer, id,
-+ src_x, src_y, src_w, src_h,
-+ width, height,
-+ drw_x, drw_y, drw_w, drw_h,
-+ clipBoxes)) {
-+ if ((errCode = W100OvlSetup(screen)) != Success) {
-+ return errCode;
-+ }
-+ }
-+ W100OvlHostData(screen);
-+ /* Update cliplist */
-+ if(!REGION_EQUAL(screen->pScreen, &port->clip, clipBoxes)) {
-+ REGION_COPY(screen->pScreen, &port->clip, clipBoxes);
-+ KXVPaintRegion(pDraw, &port->clip, port->ovl.colorKey);
-+ }
-+
-+ W100OvlBlt(screen);
-+
-+ if (port->ovl.changed) {
-+ W100OvlUpdate(screen);
-+ }
-+ return Success;
-+}
-+
-+static KdVideoAdaptorPtr
-+W100SetupImageVideo(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100ScreenInfo(pScreenPriv);
-+ W100CardInfo(pScreenPriv);
-+ KdVideoAdaptorPtr adaptor;
-+ W100PortPrivPtr port;
-+
-+ adaptor = xcalloc(1, sizeof(KdVideoAdaptorRec)
-+ + sizeof(W100PortPrivRec)
-+ + sizeof(DevUnion));
-+ if (adaptor == NULL) {
-+ return NULL;
-+ }
-+
-+ adaptor->type = XvWindowMask | XvInputMask | XvImageMask;
-+ adaptor->flags = VIDEO_OVERLAID_IMAGES | VIDEO_CLIP_TO_VIEWPORT;
-+ adaptor->name = "ATI (C) Imageon Video Overlay";
-+ adaptor->nEncodings = 1;
-+ adaptor->pEncodings = DummyEncoding;
-+ adaptor->nFormats = NUM_FORMATS;
-+ adaptor->pFormats = Formats;
-+ adaptor->nPorts = 1;
-+ adaptor->pPortPrivates = (DevUnion*)(&adaptor[1]);
-+
-+ port = (W100PortPrivPtr)(&adaptor->pPortPrivates[1]);
-+
-+ adaptor->pPortPrivates[0].ptr = (pointer)(port);
-+
-+ adaptor->nAttributes = NUM_ATTRIBUTES;
-+ adaptor->pAttributes = Attributes;
-+ adaptor->pImages = Images;
-+ adaptor->nImages = NUM_IMAGES;
-+ adaptor->PutVideo = NULL;
-+ adaptor->PutStill = NULL;
-+ adaptor->GetVideo = NULL;
-+ adaptor->GetStill = NULL;
-+ adaptor->StopVideo = W100StopVideo;
-+ adaptor->SetPortAttribute = W100SetPortAttribute;
-+ adaptor->GetPortAttribute = W100GetPortAttribute;
-+ adaptor->QueryBestSize = W100QueryBestSize;
-+ adaptor->PutImage = W100PutImage;
-+ adaptor->ReputImage = NULL;
-+ adaptor->QueryImageAttributes = W100QueryImageAttributes;
-+
-+ REGION_INIT(pScreen, &port->clip, NullBox, 0);
-+
-+ w100s->pAdaptor = adaptor;
-+
-+ xvBrightness = MAKE_ATOM("XV_BRIGHTNESS");
-+ xvColorKey = MAKE_ATOM("XV_COLORKEY");
-+ xvMaxOverlaySize = MAKE_ATOM("XV_MAXOVERLAYSIZE");
-+
-+ port->ovl.maxSize = OVL_MAX_SIZE;
-+ port->ovl.colorKey = 0xff00;
-+ port->ovl.brightness = W100GetBrightness(w100c);
-+ return adaptor;
-+}
-+
-+Bool W100InitVideo(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100ScreenInfo(pScreenPriv);
-+ W100CardInfo(pScreenPriv);
-+ KdScreenInfo *screen = pScreenPriv->screen;
-+ KdVideoAdaptorPtr *adaptors, *newAdaptors = NULL;
-+ KdVideoAdaptorPtr newAdaptor = NULL;
-+ int num_adaptors;
-+
-+ w100s->pAdaptor = NULL;
-+
-+ if (w100c->reg_base == NULL)
-+ return FALSE;
-+
-+ num_adaptors = KdXVListGenericAdaptors(screen, &adaptors);
-+
-+ newAdaptor = W100SetupImageVideo(pScreen);
-+
-+ if (newAdaptor) {
-+ 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
-+W100FiniVideo(ScreenPtr pScreen)
-+{
-+ KdScreenPriv(pScreen);
-+ W100ScreenInfo(pScreenPriv);
-+ KdVideoAdaptorPtr adaptor = w100s->pAdaptor;
-+ W100PortPrivPtr port;
-+ int i;
-+
-+ if (!adaptor)
-+ return;
-+
-+ port = (W100PortPrivPtr)(&adaptor->pPortPrivates[0].ptr);
-+ REGION_UNINIT(pScreen, &port->clip);
-+
-+ xfree(adaptor);
-+ w100s->pAdaptor = NULL;
-+}
-+
-Index: xorg-server-1.2.0/hw/kdrive/imageon/imageon_support.h
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ xorg-server-1.2.0/hw/kdrive/imageon/imageon_support.h 2007-06-17 10:49:02.000000000 +0200
-@@ -0,0 +1,108 @@
-+/*
-+ * Copyright © 2007 Manuel Teira
-+ *
-+ * 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 Manuel Teira not be used in
-+ * advertising or publicity pertaining to distribution of the software without
-+ * specific, written prior permission. Manuel Teira makes no
-+ * representations about the suitability of this software for any purpose. It
-+ * is provided "as is" without express or implied warranty.
-+ *
-+ * MANUEL TEIRA DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+ * EVENT SHALL MANUEL TEIRA 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 _IMAGEON_SUPPORT_H_
-+#define _IMAGEON_SUPPORT_H
-+
-+#include "imageon.h"
-+
-+extern CARD8 W100SolidRop[16];
-+extern CARD8 W100BltRop[16];
-+
-+/* Card control */
-+void W100DisableDisplayUpdate(W100CardInfo *w100c);
-+void W100EnableDisplayUpdate(W100CardInfo *w100c);
-+void W100SetupGraphicEngine(W100CardInfo *w100c);
-+void W100ResetGraphicEngine(W100CardInfo *w100c);
-+void W100SetupGraphicWindow(W100CardInfo *w100c);
-+void W100EnableGraphicWindow(W100CardInfo *w100c);
-+void W100DisableGraphicWindow(W100CardInfo *w100c);
-+void W100VSync(W100CardInfo *w100c);
-+
-+/* Wait for card slots */
-+__inline__ Bool W100WaitCmdFifoEntries(W100CardInfo *w100c, int entries);
-+Bool W100WaitIdle(W100CardInfo *w100c);
-+
-+/* Set context of the current operation */
-+void W100ResetContext(W100CardInfo *w100c);
-+CARD32 W100ComputeSolidGmc(W100CardInfo *w100c, CARD8 alu);
-+CARD32 W100ComputeCopyGmc(W100CardInfo *w100c, CARD8 alu);
-+CARD32 W100ComputeAritGmc(W100CardInfo *w100c, CARD8 alu);
-+void W100SetXForm(W100CardInfo *w100c, int dx, int dy);
-+void W100SetRotation(W100CardInfo *w100c, int randr, Bool mirror);
-+void W100SetPixelMask(W100CardInfo *w100c, Pixel mask);
-+Bool W100SetSource(KdScreenInfo *screen, CARD32 srcPitch,
-+ CARD32 srcOffset, CARD8 bpp);
-+Bool W100SetDestination(KdScreenInfo *screen, CARD32 dstPitch,
-+ CARD32 dstOffset, CARD8 bpp);
-+Bool W100SetSourcePixmap(PixmapPtr pPix);
-+Bool W100SetDestinationPixmap(PixmapPtr pPix);
-+
-+/* Scaler related functions */
-+CARD8 W100GetScaler(CARD16 dstsize, CARD16 srcsize);
-+CARD16 W100ApplyScaler(CARD16 srcsize, CARD8 scaler);
-+
-+/* Blitting functions */
-+void W100PlanarBlt(KdScreenInfo *screen, int planes, int planeOffsets[],
-+ int bpp, int randr,
-+ KdOffscreenArea *src, int srcW, int srcH, BoxPtr srcBox,
-+ KdOffscreenArea *dst, int dstW, int dstH, BoxPtr dstBox);
-+static void W100ScaledBlt(KdScreenInfo *screen, int randr, int bpp,
-+ CARD32 srcOffset, CARD16 srcPitch, BoxPtr srcBox,
-+ CARD32 dstOffset, CARD16 dstPitch, BoxPtr dstBox,
-+ CARD8 xscaler, CARD8 yscaler);
-+static void W100StretchBlt(KdScreenInfo *screen, int randr, int bpp,
-+ CARD32 srcOffset, CARD16 srcPitch, BoxPtr srcBox,
-+ CARD32 dstOffset, CARD16 dstPitch, BoxPtr dstBox,
-+ CARD8 xscaler, CARD8 yscaler);
-+static void W100Blt(KdScreenInfo *screen, int randr, int bpp,
-+ CARD32 srcOffset, CARD16 srcPitch, BoxPtr srcBox,
-+ CARD32 dstOffset, CARD16 dstPitch, BoxPtr dstBox);
-+
-+/* Brightness functions */
-+CARD8 W100GetBrightness(W100CardInfo *w100c);
-+void W100SetBrightness(W100CardInfo *w100c, CARD8 value);
-+
-+
-+/* Get and set mode and rotation info */
-+int W100GetRotation(W100CardInfo *w100c);
-+W100ModeSpec *W100GetModeSpec(W100CardInfo *w100c, W100Mode *mode);
-+Bool W100GetFbMode(W100CardInfo *w100c, W100Mode *mode);
-+Bool W100CheckFbMode(W100CardInfo *w100c, W100ModeSpec *modes);
-+W100ModeSpec *W100GetBestMode(W100CardInfo *w100c, int width, int height);
-+
-+/* SysFS helpers */
-+Bool W100SysFsGet(W100CardInfo *w100c, const char *path, char *value);
-+Bool W100SysFsSet(W100CardInfo *w100c, const char *path, const char *value);
-+
-+/* Coordinate transformations */
-+void W100TransformTsLibCoordinates(long *x, long *y, void *closure);
-+void W100MapToDevice(W100CardInfo *w100c, BoxPtr src, BoxPtr dst);
-+void W100MapFromDevice(W100CardInfo *w100c, BoxPtr src, BoxPtr dst);
-+void W100ChangeOrigin(BoxPtr src, int x, int y);
-+void W100TrajectoryOrigin(W100CardInfo *w100c, BoxPtr box, short *x, short *y);
-+void W100ScaleBox(BoxPtr src, BoxPtr dst, int scale);
-+void W100MoveTo(BoxPtr src, int x, int y);
-+
-+
-+
-+#endif
-Index: xorg-server-1.2.0/hw/kdrive/linux/tslib.c
-===================================================================
---- xorg-server-1.2.0.orig/hw/kdrive/linux/tslib.c 2007-01-23 06:39:15.000000000 +0100
-+++ xorg-server-1.2.0/hw/kdrive/linux/tslib.c 2007-06-17 10:49:02.000000000 +0200
-@@ -92,6 +92,10 @@
- void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
- void *tslib_raw_event_closure;
-
-+/* To support randr hot resolution change */
-+void (*tslib_transform_coords)(long *x, long *y, void *closure);
-+void *tslib_transform_closure;
-+
- int TsInputType = 0;
- int KdTsPhyScreen = 0; /* XXX Togo .. */
-
-@@ -121,7 +125,9 @@
- flags = (event.pressure) ? KD_BUTTON_1 : 0;
- x = event.x;
- y = event.y;
--
-+ if (tslib_transform_coords) {
-+ tslib_transform_coords(&x, &y, tslib_transform_closure);
-+ }
- KdEnqueueMouseEvent (mi, flags, x, y);
- }
- }
diff --git a/packages/xorg-xserver/xserver-kdrive-imageon_1.2.0.bb b/packages/xorg-xserver/xserver-kdrive-imageon_1.2.0.bb
index 8ed650266b..26f8666076 100644
--- a/packages/xorg-xserver/xserver-kdrive-imageon_1.2.0.bb
+++ b/packages/xorg-xserver/xserver-kdrive-imageon_1.2.0.bb
@@ -7,7 +7,7 @@ DEPENDS += "libxkbfile libxcalibrate"
PROVIDES = "virtual/xserver"
PE = "1"
-PR = "r2"
+PR = "r3"
FILESPATH = "${FILE_DIRNAME}/xserver-kdrive-1.2.0:${FILE_DIRNAME}/xserver-kdrive"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
@@ -20,6 +20,7 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://kdrive-vidmemarea.patch;patch=1 \
file://kdrive-imageon.patch;patch=1 \
file://xcalibrate_coords.patch;patch=1 \
+ file://enable-builtin-fonts.patch;patch=1 \
"
S = "${WORKDIR}/xorg-server-${PV}"
diff --git a/packages/xorg-xserver/xserver-kdrive/gumstix-kmode.patch b/packages/xorg-xserver/xserver-kdrive/gumstix-kmode.patch
new file mode 100644
index 0000000000..56817a7001
--- /dev/null
+++ b/packages/xorg-xserver/xserver-kdrive/gumstix-kmode.patch
@@ -0,0 +1,23 @@
+--- /tmp/kmode.c 2007-10-07 11:49:52.000000000 +0200
++++ xorg-server-1.3.0.0/hw/kdrive/src/kmode.c 2007-10-07 11:51:57.962045000 +0200
+@@ -119,7 +119,19 @@
+ 0, 0, 0, KdSyncNegative, /* 59.940 */
+ },
+
+-
++
++/* gumstix console-vx */
++ { 480, 272, 60, 0, /* VESA */
++ 0, 0, 0, KdSyncNegative, /* 31.469 */
++ 0, 0, 0, KdSyncNegative, /* 59.940 */
++ },
++
++ { 272, 480, 60, 0, /* VESA */
++ 0, 0, 0, KdSyncNegative, /* 31.469 */
++ 0, 0, 0, KdSyncNegative, /* 59.940 */
++ },
++
++
+ /* 800x600 modes */
+ { 800, 600, 85, 56250, /* VESA */
+ 32, 152, 248, KdSyncPositive, /* 53.674 */
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 5f0896f3ed..3cc67078a0 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 = "r17"
+PR = "r19"
SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
${KDRIVE_COMMON_PATCHES} \
@@ -19,7 +19,9 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
file://w100.patch;patch=1 \
file://w100-autofoo.patch;patch=1 \
file://w100-fix-offscreen-bmp.patch;patch=1 \
- "
+ file://kdrive-1.3-18bpp.patch;patch=1 \
+ file://gumstix-kmode.patch;patch=1 \
+"
S = "${WORKDIR}/xorg-server-${PV}"
diff --git a/packages/xserver-common/files/ghi270/.mtn2git_empty b/packages/xserver-common/files/ghi270/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/xserver-common/files/ghi270/.mtn2git_empty
diff --git a/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/Xserver b/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/Xserver
index 489010a414..f7fe52d84e 100644
--- a/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/Xserver
+++ b/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/Xserver
@@ -91,9 +91,9 @@ case `module_id` in
modprobe mbxfb
ARGS="$ARGS -br -fb /dev/fb1" ;;
"GTA01" | "GTA02")
- ARGS="$ARGS -dpi 285 -screen 480x640 -hide-cursor -root-ppm /usr/share/pixmaps/xsplash.ppm" ;;
+ ARGS="$ARGS -dpi 285 -screen 480x640 -hide-cursor -root-ppm /usr/share/pixmaps/xsplash-vga.ppm" ;;
"Motorola Ezx Platform")
- ARGS="$ARGS -dpi 170 -screen 240x320 -hide-cursor -root-ppm /usr/share/pixmaps/xsplash.ppm" ;;
+ ARGS="$ARGS -dpi 170 -screen 240x320 -hide-cursor -root-ppm /usr/share/pixmaps/xsplash-qvga.ppm" ;;
"Nokia N800")
ARGS="$ARGS -br -dpi 225 -screen 800x480x16 -mouse tslib" ;;
*)
diff --git a/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/xsplash-qvga.ppm b/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/xsplash-qvga.ppm
new file mode 100644
index 0000000000..88df5e5476
--- /dev/null
+++ b/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/xsplash-qvga.ppm
Binary files differ
diff --git a/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/xsplash-vga.ppm b/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/xsplash-vga.ppm
new file mode 100644
index 0000000000..90eb056056
--- /dev/null
+++ b/packages/xserver-kdrive-common/xserver-kdrive-common/openmoko/xsplash-vga.ppm
Binary files differ
diff --git a/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb b/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb
index 9329cd2e52..e85e4f0ce9 100644
--- a/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb
+++ b/packages/xserver-kdrive-common/xserver-kdrive-common_0.1.bb
@@ -2,7 +2,7 @@ DESCRIPTION = "Common X11 scripts"
LICENSE = "GPL"
SECTION = "x11"
RDEPENDS_${PN} = "xmodmap libxrandr xdpyinfo xtscal xinit"
-PR = "r18"
+PR = "r20"
SRC_URI = "\
file://Xdefaults \
@@ -15,6 +15,11 @@ SRC_URI = "\
file://90xXWindowManager \
"
+SRC_URI_append_openmoko = "\
+ file://xsplash-vga.ppm \
+ file://xsplash-qvga.ppm \
+"
+
etcFiles = "\
Xdefaults \
Xinit \
@@ -29,8 +34,6 @@ sessionFiles = "\
S = "${WORKDIR}"
-PACKAGE_ARCH = "all"
-
do_install() {
install -d ${D}/${sysconfdir}/X11/Xsession.d
for i in ${etcFiles}; do
@@ -39,4 +42,14 @@ do_install() {
for i in ${sessionFiles}; do
install -m 0755 ${WORKDIR}/$i ${D}/${sysconfdir}/X11/Xsession.d/
done
+
+ # branding-foo. yes, /usr/share/pixmaps is hardcoded here, since it's
+ # also hardcoded in the Xserver script...
+ if [ "x${DISTRO}" = "xopenmoko" ]; then
+ install -d ${D}/usr/share/pixmaps
+ install -m 0755 ${WORKDIR}/*.ppm ${D}/usr/share/pixmaps
+ fi
}
+
+PACKAGE_ARCH = "all"
+
diff --git a/packages/yaffs2/yaffs2-utils-native_cvs.bb b/packages/yaffs2/yaffs2-utils-native_cvs.bb
index 7c6442b77d..d192b52d03 100644
--- a/packages/yaffs2/yaffs2-utils-native_cvs.bb
+++ b/packages/yaffs2/yaffs2-utils-native_cvs.bb
@@ -1,6 +1,6 @@
require yaffs2-utils_cvs.bb
inherit native
-DEPENDS = ""
+DEPENDS = "mtd-utils-native"
CFLAGS += "-I.. -DCONFIG_YAFFS_UTIL"
diff --git a/site/arm-common b/site/arm-common
index bfc141072b..fb050dbcf1 100644
--- a/site/arm-common
+++ b/site/arm-common
@@ -158,15 +158,15 @@ nano_cv_func_regexec_segv_emptystr=${nano_cv_func_regexec_segv_emptystr=no}
# ORBit2
ac_cv_alignof_CORBA_boolean=1
ac_cv_alignof_CORBA_char=1
-ac_cv_alignof_CORBA_double=4
+ac_cv_alignof_CORBA_double=8
ac_cv_alignof_CORBA_float=4
ac_cv_alignof_CORBA_long=4
-ac_cv_alignof_CORBA_long_double=4
-ac_cv_alignof_CORBA_long_long=4
+ac_cv_alignof_CORBA_long_double=8
+ac_cv_alignof_CORBA_long_long=8
ac_cv_alignof_CORBA_octet=1
ac_cv_alignof_CORBA_pointer=4
ac_cv_alignof_CORBA_short=2
-ac_cv_alignof_CORBA_struct=4
+ac_cv_alignof_CORBA_struct=1
ac_cv_alignof_CORBA_wchar=2
ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo=yes}
diff --git a/site/arm-linux b/site/arm-linux
index d45c8f87c2..9aea75b5a9 100644
--- a/site/arm-linux
+++ b/site/arm-linux
@@ -168,6 +168,9 @@ ac_cv_file___dev_ptc_=yes
#mono
mono_cv_uscore=${mono_cv_uscore=no}
+# guile
+ac_cv_func_pthread_attr_getstack=${ac_cv_func_pthread_attr_getstack=yes}
+
# gnet
ac_cv_member_struct_sockaddr_sa_len=${ac_cv_member_struct_sockaddr_sa_len=no}
ac_cv_gnet_have_abstract_sockets=${ac_cv_gnet_have_abstract_sockets=no}
diff --git a/site/common-glibc b/site/common-glibc
index 8e0e90d614..edbf4b41ee 100644
--- a/site/common-glibc
+++ b/site/common-glibc
@@ -21,6 +21,9 @@ ac_cv_func_vsnprintf_c99=${ac_cv_func_vsnprintf_c99=yes}
glib_cv_compliant_posix_memalign=${glib_cv_compliant_posix_memalign=1}
glib_cv_long_long_format=${glib_cv_long_long_format=ll}
+#dbus-glib
+ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
+
# gnucash
am_cv_scanf_lld=${am_cv_scanf_lld=yes}
diff --git a/site/common-uclibc b/site/common-uclibc
index a57abdbef8..3112d3ed6c 100644
--- a/site/common-uclibc
+++ b/site/common-uclibc
@@ -1,6 +1,9 @@
# general
ac_cv_have_decl_sys_siglist=${ac_cv_have_decl_sys_siglist=no}
+#dbus-glib
+ac_cv_have_abstract_sockets=${ac_cv_have_abstract_sockets=yes}
+
# bash
bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist=no}
bash_cv_sys_siglist=${bash_cv_sys_siglist=no}